diff --git a/.DS_Store b/.DS_Store index ab9d6f92ce..3cf501c27a 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/antdesign.327d013c.async.js b/antdesign.327d013c.async.js index 50278b3cb6..37c2e3a694 100644 --- a/antdesign.327d013c.async.js +++ b/antdesign.327d013c.async.js @@ -37,8 +37,8 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-motion/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/LoadingIcon.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("pVnL"),a=n.n(r),i=n("lSNA"),o=n.n(i),s=n("J4zp"),l=n.n(s),c=n("q1tI"),u=n("V/uB"),d=n.n(u),f=n("0G8d"),h=n.n(f),p=n("xddM"),m=n.n(p),v=n("ESPI"),g=n.n(v),y=n("Z/ur"),b=n.n(y),w=n("J84W"),x=n.n(w),k=n("sKbD"),S=n.n(k),C=n("72Ab"),_=n.n(C),N=n("kbBi"),j=n.n(N),O=n("8XRh"),E=n("TSYQ"),A=n.n(E),P=n("H84U");var L=n("lwsE"),T=n.n(L),I=n("W8MJ"),M=n.n(I),z=n("7W2i"),R=n.n(z),B=n("LQ03"),F=n.n(B),D=function(e){R()(n,e);var t=F()(n);function n(){var e;return T()(this,n),(e=t.apply(this,arguments)).state={error:void 0,info:{componentStack:""}},e}return M()(n,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){var e=this.props,t=e.message,n=e.description,r=e.children,a=this.state,i=a.error,o=a.info,s=o&&o.componentStack?o.componentStack:null,l=void 0===t?(i||"").toString():t,u=void 0===n?s:n;return i?c.createElement(K,{type:"error",message:l,description:c.createElement("pre",null,u)}):r}}]),n}(c.Component),q=n("0n0R"),H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a0){var j="button"===p?"".concat(C,"-button"):C;N=h.map((function(e){return"string"==typeof e?s.createElement(w,{ref:t,key:e,prefixCls:j,disabled:v,value:e,checked:f===e},e):s.createElement(w,{ref:t,key:"radio-group-value-options-".concat(e.value),prefixCls:j,disabled:e.disabled||v,value:e.value,checked:f===e.value,style:e.style},e.label)}))}var O=y||o,E=u()(_,"".concat(_,"-").concat(m),(n={},a()(n,"".concat(_,"-").concat(O),O),a()(n,"".concat(_,"-rtl"),"rtl"===i),n),d);return s.createElement("div",{className:E,style:b,onMouseEnter:k,onMouseLeave:S,id:x},N)}())}));_.defaultProps={buttonStyle:"outline"};var N=s.memo(_),j=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);ar?a>=i?10+e:20+e:a<=i?10+e:e}(e,t),r=k||void 0===y(I)[t];return c.createElement("span",{className:"".concat(z,"-only"),style:{transition:r?"none":void 0,msTransform:"translateY(".concat(100*-n,"%)"),WebkitTransform:"translateY(".concat(100*-n,"%)"),transform:"translateY(".concat(100*-n,"%)")},key:t},function(e,t){for(var n=[],r=0;r<30;r++)n.push(c.createElement("p",{key:r.toString(),className:f()(t,{current:e===r})},r%10));return n}(n,"".concat(z,"-only-unit")))}return c.createElement("span",{key:"symbol",className:"".concat(z,"-symbol")},e)},B=l()(l()({},b),{style:a,className:f()(z,r),title:i});return a&&a.borderColor&&(B.style=l()(l()({},a),{boxShadow:"0 0 0 1px ".concat(a.borderColor," inset")})),u?Object(v.a)(u,{className:f()("".concat(z,"-custom-component"),u.props&&u.props.className)}):c.createElement(s,B,N&&Number(N)%1==0?y(N).map((function(e,t){return R(e,t)})).reverse():N)},w=n("09Wf");function x(e){return-1!==w.a.indexOf(e)}var k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);aS?"".concat(S,"+"):y},D=function(){return!!d||!!p},q=function(){var e=F();return"0"===e||0===e},H=function(){return _&&!q()||D()},U=function(){return H()?"":F()},V=function(){return"rtl"===R?E?l()({left:parseInt(E[0],10),marginTop:E[1]},A):A:E?l()({right:-parseInt(E[0],10),marginTop:E[1]},A):A},W=function(){var e=U();return(null==e||""===e||q()&&!T)&&!H()},K=function(){var e=y;if(e&&"object"===o()(e))return Object(v.a)(e,{style:l()(l()({},V()),e.props&&e.props.style)})},G=f()((t={},a()(t,"".concat(B,"-status-dot"),D()),a()(t,"".concat(B,"-status-").concat(d),!!d),a()(t,"".concat(B,"-status-").concat(p),x(p)),t)),Y={};p&&!x(p)&&(Y.background=p);var J=f()(P,B,(n={},a()(n,"".concat(B,"-status"),D()),a()(n,"".concat(B,"-not-a-wrapper"),!s),a()(n,"".concat(B,"-rtl"),"rtl"===R),n));if(!s&&D()){var Q=V(),X=Q&&Q.color;return c.createElement("span",l()({},I,{className:J,style:Q}),c.createElement("span",{className:G,style:Y}),c.createElement("span",{style:{color:X},className:"".concat(B,"-status-text")},h))}return c.createElement("span",l()({},I,{className:J}),s,c.createElement(u.a,{component:"",showProp:"data-show",transitionName:s?"".concat(B,"-zoom"):"",transitionAppear:!0},function(){var e,t=z("scroll-number",i),n=U(),r=H(),o=W(),s=f()((e={},a()(e,"".concat(B,"-dot"),r),a()(e,"".concat(B,"-count"),!r),a()(e,"".concat(B,"-count-sm"),"small"===j),a()(e,"".concat(B,"-multiple-words"),!r&&y&&y.toString&&y.toString().length>1),a()(e,"".concat(B,"-status-").concat(d),!!d),a()(e,"".concat(B,"-status-").concat(p),x(p)),e)),l=V();return p&&!x(p)&&((l=l||{}).background=p),o?null:c.createElement(b,{prefixCls:t,"data-show":!o,className:s,count:n,displayComponent:K(),title:O||("string"==typeof y||"number"==typeof y?y:void 0),style:l,key:"scrollNumber"})}()),W()||!h?null:c.createElement("span",{className:"".concat(B,"-status-text")},h))};S.Ribbon=function(e){var t,n=e.className,r=e.prefixCls,i=e.style,o=e.color,s=e.children,u=e.text,d=e.placement,h=void 0===d?"end":d,p=c.useContext(m.b),v=p.getPrefixCls,g=p.direction,y=v("ribbon",r),b=x(o),w=f()(y,n,"".concat(y,"-placement-").concat(h),(t={},a()(t,"".concat(y,"-rtl"),"rtl"===g),a()(t,"".concat(y,"-color-").concat(o),b),t)),k={},S={};return o&&!b&&(k.background=o,S.color=o),c.createElement("div",{className:"".concat(y,"-wrapper")},s,c.createElement("div",{className:w,style:l()(l()({},k),i)},u,c.createElement("div",{className:"".concat(y,"-corner"),style:S})))};t.a=S},KtWR: /*!************************************************************************!*\ @@ -1620,7 +1620,7 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/motion.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tree/utils/iconUtil.js because of ./src/pages/virtualSpaces/Lists/Video/components/AddLink.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/debounce.js (<- Module is not an ECMAScript module) */ @@ -1696,9 +1696,9 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/RightOutlined.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/hooks/useBreakpoint.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/layouts/virtualDetail/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/index.js */ @@ -1917,7 +1917,7 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/message/index.js (referenced with cjs require), ./node_modules/antd/lib/notification/index.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/useNotification.js */ @@ -2016,7 +2016,7 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/throttleByAnimationFrame.js because of ./src/pages/HttpStatus/SixActivities.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ @@ -2032,14 +2032,14 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/responsiveObserve.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/col.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/responsiveObserve.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/col.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/hooks/useBreakpoint.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/row.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js because of ./src/pages/virtualSpaces/Index/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/row.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n("RIqP"),a=n.n(r),i=n("pVnL"),o=n.n(i),s=n("lSNA"),l=n.n(s),c=n("J4zp"),u=n.n(c),d=n("cDf5"),f=n.n(d),h=n("q1tI"),p=n("TSYQ"),m=n.n(p),v=n("W9HT"),g=n("5OYt"),y=n("ACnJ"),b=n("H84U"),w=n("NUBc"),x=n("qrJ5"),k=n("/kpp"),S=n("0n0R"),C=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a0&&h.createElement("ul",{className:"".concat(g,"-item-action"),key:"actions"},a.map((function(e,t){return h.createElement("li",{key:"".concat(g,"-item-action-").concat(t)},e,t!==a.length-1&&h.createElement("em",{className:"".concat(g,"-item-action-split")}))}))),w=f?"div":"li",x=h.createElement(w,o()({},u,{className:m()("".concat(g,"-item"),s,l()({},"".concat(g,"-item-no-flex"),!("vertical"===p?i:(h.Children.forEach(r,(function(e){"string"==typeof e&&(t=!0)})),!(t&&h.Children.count(r)>1)))))}),"vertical"===p&&i?[h.createElement("div",{className:"".concat(g,"-item-main"),key:"content"},r,y),h.createElement("div",{className:"".concat(g,"-item-extra"),key:"extra"},i)]:[r,y,Object(S.a)(i,{key:"extra"})]);return f?h.createElement(k.a,{flex:1,style:c},x):x};_.Meta=function(e){var t=e.prefixCls,n=e.className,r=e.avatar,a=e.title,i=e.description,s=C(e,["prefixCls","className","avatar","title","description"]),l=(0,h.useContext(b.b).getPrefixCls)("list",t),c=m()("".concat(l,"-item-meta"),n),u=h.createElement("div",{className:"".concat(l,"-item-meta-content")},a&&h.createElement("h4",{className:"".concat(l,"-item-meta-title")},a),i&&h.createElement("div",{className:"".concat(l,"-item-meta-description")},i));return h.createElement("div",o()({},s,{className:c}),r&&h.createElement("div",{className:"".concat(l,"-item-meta-avatar")},r),(a||i)&&u)};var N=_,j=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);ace&&(le.current=ce);var ue=r?h.createElement("div",{className:"".concat(re,"-pagination")},h.createElement(w.a,o()({},le,{onChange:te,onShowSizeChange:ne}))):null,de=a()(A);r&&A.length>(le.current-1)*le.pageSize&&(de=a()(A).splice((le.current-1)*le.pageSize,le.pageSize));var fe=Object(g.a)(),he=h.useMemo((function(){for(var e=0;e0){var ve=de.map((function(e,t){return function(e,t){return R?((n="function"==typeof z?z(e):"string"==typeof z?e[z]:e.key)||(n="list-item-".concat(t)),$[t]=n,R(e,t)):null;var n}(e,t)})),ge=h.Children.map(ve,(function(e,t){return h.createElement("div",{key:$[t],style:pe},e)}));me=N?h.createElement(x.a,{gutter:N.gutter},ge):h.createElement("ul",{className:"".concat(re,"-items")},ve)}else S||ie||(me=function(e,t){return h.createElement("div",{className:"".concat(e,"-empty-text")},B&&B.emptyText||t("List"))}(re,X));var ye=le.position||"bottom";return h.createElement(O.Provider,{value:{grid:N,itemLayout:C}},h.createElement("div",o()({className:se},F),("top"===ye||"both"===ye)&&ue,L&&h.createElement("div",{className:"".concat(re,"-header")},L),h.createElement(v.a,ae,me,S),T&&h.createElement("div",{className:"".concat(re,"-footer")},T),_||("bottom"===ye||"both"===ye)&&ue))}E.Item=N;t.b=E},Vl3Y: /*!*********************************************************!*\ @@ -2056,16 +2056,16 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/hooks/useForceUpdate.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/col.js because of ./src/utils/util.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/row.js because of ./src/utils/util.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/utils/util.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/Engineering/Lists/CourseMatrix/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/Engineering/Lists/CourseMatrix/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/col.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/row.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/utils/fetch.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/isEqual.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ @@ -2128,11 +2128,11 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js because of ./src/pages/Engineering/Evaluate/List/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/Engineering/Lists/CourseMatrix/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/Detail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-dropdown/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("pVnL"),a=n.n(r),i=n("lSNA"),o=n.n(i),s=n("q1tI"),l=n("eDIo"),c=n("TSYQ"),u=n.n(c),d=n("fEPi"),f=n.n(d),h=n("J4zp"),p=n.n(h),m=n("cCPh"),v=n.n(m),g=n("2/Rp"),y=n("H84U"),b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a=0?"slide-down":"slide-up"),trigger:E,overlay:function(){return function(t){var n,r=e.overlay;n="function"==typeof r?r():r;var a=(n=s.Children.only("string"==typeof n?s.createElement("span",null,n):n)).props;Object(S.a)(!a.mode||"vertical"===a.mode,"Dropdown",'mode="'.concat(a.mode,"\" is not supported for Dropdown's Menu."));var i=a.selectable,o=void 0!==i&&i,l=a.focusable,c=void 0===l||l,u=s.createElement("span",{className:"".concat(t,"-menu-submenu-arrow")},s.createElement(f.a,{className:"".concat(t,"-menu-submenu-arrow-icon")}));return"string"==typeof n.type?n:Object(_.a)(n,{mode:"vertical",selectable:o,focusable:c,expandIcon:u})}(C)},placement:function(){var t=e.placement;return void 0!==t?t:"rtl"===p?"bottomRight":"bottomLeft"}()}),j)});N.Button=k,N.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1};var j=t.a=N},XCrF: @@ -2188,8 +2188,8 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/createSuper.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/context.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/utils/fetch.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return g}));var r=n("pVnL"),a=n.n(r),i=n("lwsE"),o=n.n(i),s=n("W8MJ"),l=n.n(s),c=n("7W2i"),u=n.n(c),d=n("LQ03"),f=n.n(d),h=n("q1tI"),p=n("ZvpZ").a,m=n("YlG9"),v=function(e){u()(n,e);var t=f()(n);function n(){return o()(this,n),t.apply(this,arguments)}return l()(n,[{key:"getLocale",value:function(){var e=this.props,t=e.componentName,n=e.defaultLocale||p[t||"global"],r=this.context,i=t&&r?r[t]:{};return a()(a()({},"function"==typeof n?n():n),i||{})}},{key:"getLocaleCode",value:function(){var e=this.context,t=e&&e.locale;return e&&e.exist&&!t?p.locale:t}},{key:"render",value:function(){return this.props.children(this.getLocale(),this.getLocaleCode(),this.context)}}]),n}(h.Component);function g(e,t){var n=h.useContext(m.a);return[h.useMemo((function(){var r=t||p[e||"global"],i=e&&n?n[e]:{};return a()(a()({},"function"==typeof r?r():r),i||{})}),[e,t,n])]}v.defaultProps={componentName:"global"},v.contextType=m.a},YNAk: /*!*********************************************************************!*\ !*** ./node_modules/@ant-design/icons/lib/icons/CaretDownFilled.js ***! @@ -2267,8 +2267,8 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/layout/layout.js because of ./src/pages/Messages/component/LeftNav.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/layout/layout.js because of ./src/layouts/virtualDetail/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return P})),n.d(t,"b",(function(){return I}));var r,a=n("lSNA"),i=n.n(a),o=n("pVnL"),s=n.n(o),l=n("lwsE"),c=n.n(l),u=n("W8MJ"),d=n.n(u),f=n("7W2i"),h=n.n(f),p=n("LQ03"),m=n.n(p),v=n("q1tI"),g=n("TSYQ"),y=n.n(g),b=n("BGR+"),w=n("T1rO"),x=n.n(w),k=n("fEPi"),S=n.n(k),C=n("DFhj"),_=n.n(C),N=n("PKem"),j=n("H84U"),O=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},E=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a0&&void 0!==arguments[0]?arguments[0]:"";return r+=1,"".concat(e).concat(r)}),T=function(e){h()(n,e);var t=m()(n);function n(e){var r,a,o;return c()(this,n),(r=t.call(this,e)).responsiveHandler=function(e){r.setState({below:e.matches});var t=r.props.onBreakpoint,n=r.state.collapsed;t&&t(e.matches),n!==e.matches&&r.setCollapsed(e.matches,"responsive")},r.setCollapsed=function(e,t){"collapsed"in r.props||r.setState({collapsed:e});var n=r.props.onCollapse;n&&n(e,t)},r.toggle=function(){var e=!r.state.collapsed;r.setCollapsed(e,"clickTrigger")},r.renderSider=function(e){var t,n=e.getPrefixCls,a=r.props,o=a.prefixCls,l=a.className,c=a.theme,u=a.collapsible,d=a.reverseArrow,f=a.trigger,h=a.style,p=a.width,m=a.collapsedWidth,g=a.zeroWidthTriggerStyle,w=a.children,k=E(a,["prefixCls","className","theme","collapsible","reverseArrow","trigger","style","width","collapsedWidth","zeroWidthTriggerStyle","children"]),C=r.state,N=C.collapsed,j=C.below,A=n("layout-sider",o),P=Object(b.default)(k,["collapsed","defaultCollapsed","onCollapse","breakpoint","onBreakpoint","siderHook","zeroWidthTriggerStyle"]),L=N?m:p,T=O(L)?"".concat(L,"px"):String(L),I=0===parseFloat(String(m||0))?v.createElement("span",{onClick:r.toggle,className:y()("".concat(A,"-zero-width-trigger"),"".concat(A,"-zero-width-trigger-").concat(d?"right":"left")),style:g},f||v.createElement(x.a,null)):null,M={expanded:d?v.createElement(S.a,null):v.createElement(_.a,null),collapsed:d?v.createElement(_.a,null):v.createElement(S.a,null)}[N?"collapsed":"expanded"],z=null!==f?I||v.createElement("div",{className:"".concat(A,"-trigger"),onClick:r.toggle,style:{width:T}},f||M):null,R=s()(s()({},h),{flex:"0 0 ".concat(T),maxWidth:T,minWidth:T,width:T}),B=y()(l,A,"".concat(A,"-").concat(c),(t={},i()(t,"".concat(A,"-collapsed"),!!N),i()(t,"".concat(A,"-has-trigger"),u&&null!==f&&!I),i()(t,"".concat(A,"-below"),!!j),i()(t,"".concat(A,"-zero-width"),0===parseFloat(T)),t));return v.createElement("aside",s()({className:B},P,{style:R}),v.createElement("div",{className:"".concat(A,"-children")},w),u||j&&I?z:null)},r.uniqueId=L("ant-sider-"),"undefined"!=typeof window&&(a=window.matchMedia),a&&e.breakpoint&&e.breakpoint in A&&(r.mql=a("(max-width: ".concat(A[e.breakpoint],")"))),o="collapsed"in e?e.collapsed:e.defaultCollapsed,r.state={collapsed:o,below:!1},r}return d()(n,[{key:"componentDidMount",value:function(){var e;this.mql&&(this.mql.addListener(this.responsiveHandler),this.responsiveHandler(this.mql)),null===(e=this.props)||void 0===e||e.siderHook.addSider(this.uniqueId)}},{key:"componentWillUnmount",value:function(){var e,t;null===(e=null==this?void 0:this.mql)||void 0===e||e.removeListener(this.responsiveHandler),null===(t=this.props)||void 0===t||t.siderHook.removeSider(this.uniqueId)}},{key:"render",value:function(){var e=this.state.collapsed,t=this.props.collapsedWidth;return v.createElement(P.Provider,{value:{siderCollapsed:e,collapsedWidth:t}},v.createElement(j.a,null,this.renderSider))}}],[{key:"getDerivedStateFromProps",value:function(e){return"collapsed"in e?{collapsed:e.collapsed}:null}}]),n}(v.Component);T.defaultProps={collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80,style:{},theme:"dark"};var I=function(e){h()(n,e);var t=m()(n);function n(){return c()(this,n),t.apply(this,arguments)}return d()(n,[{key:"render",value:function(){var e=this;return v.createElement(N.a.Consumer,null,(function(t){return v.createElement(T,s()({},t,e.props))}))}}]),n}(v.Component)},"Znn+": @@ -2349,10 +2349,10 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/dropdown.js because of ./src/.umi-production/plugin-locale/SelectLang.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/dropdown.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ @@ -2403,10 +2403,10 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js because of ./src/utils/util.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js because of ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/Engineering/Lists/CourseMatrix/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js because of ./src/layouts/virtualDetail/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/index.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ @@ -2433,7 +2433,7 @@ var a;self,a=function(e,n){return function(){var a={"./src/plugin/hyperlinks.js" \*****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/components/AntdIcon.js because of ./src/components/CoverUpload/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/components/AntdIcon.js because of ./src/pages/virtualSpaces/Lists/Video/components/AddLink.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("VTBJ"),a=n("q1tI"),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},o=n("6VBw"),s=function(e,t){return a.createElement(o.a,Object(r.a)(Object(r.a)({},e),{},{ref:t,icon:i}))};s.displayName="UserOutlined";t.a=a.forwardRef(s)},cWXX: /*!******************************************************!*\ @@ -2869,13 +2869,13 @@ function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(e){var n,r,a,i, \************************************************************/ /*! exports provided: default */ /*! exports used: default */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/css-animation/es/index.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/css-animation/es/index.js because of ./node_modules/rc-dialog/node_modules/rc-animate/es/AnimateChild.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/RightOutlined.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/node_modules/rc-animate/es/Animate.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/node_modules/rc-animate/es/Animate.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ @@ -3044,13 +3044,13 @@ function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(e){var n,r,a,i, /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/button.js because of ./src/pages/Engineering/Evaluate/List/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js because of ./src/pages/Engineering/Evaluate/List/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/pages/Engineering/Lists/CourseMatrix/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/locale.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/button.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/Detail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/Detail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/locale.js because of ./src/layouts/virtualDetail/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-dialog/es/DialogWrap.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ @@ -3086,9 +3086,9 @@ function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(e){var n,r,a,i, /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/node_modules/rc-checkbox/es/index.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/node_modules/rc-checkbox/es/index.js because of ./src/pages/Engineering/Lists/CourseMatrix/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("lSNA"),a=n.n(r),i=n("pVnL"),o=n.n(i),s=n("lwsE"),l=n.n(s),c=n("W8MJ"),u=n.n(c),d=n("PJYZ"),f=n.n(d),h=n("7W2i"),p=n.n(h),m=n("LQ03"),v=n.n(m),g=n("q1tI"),y=n("TSYQ"),b=n.n(y),w=n("+6Fa"),x=n("RIqP"),k=n.n(x),S=n("BGR+"),C=n("H84U"),_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a0&&(w=r.getOptions().map((function(e){return g.createElement(L,{prefixCls:m,key:e.value.toString(),disabled:"disabled"in e?e.disabled:s.disabled,value:e.value,checked:-1!==l.value.indexOf(e.value),onChange:e.onChange,className:"".concat(v,"-item"),style:e.style},e.label)})));var x={toggleOption:r.toggleOption,value:r.state.value,disabled:r.props.disabled,name:r.props.name,registerValue:r.registerValue,cancelValue:r.cancelValue},k=b()(v,u,a()({},"".concat(v,"-rtl"),"rtl"===n));return g.createElement("div",o()({className:k,style:d},y),g.createElement(N.Provider,{value:x},w))},r.state={value:e.value||e.defaultValue||[],registeredValues:[]},r}return u()(n,[{key:"getOptions",value:function(){return this.props.options.map((function(e){return"string"==typeof e?{label:e,value:e}:e}))}},{key:"render",value:function(){return g.createElement(C.a,null,this.renderGroup)}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value||[]}:null}}]),n}(g.PureComponent);j.defaultProps={options:[]};var O=j,E=n("uaoM"),A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a0&&(N=i.createElement(o.FormProvider,{validateMessages:j},s)),i.createElement(x.a,{size:g},i.createElement(w.b.Provider,{value:_},i.createElement(y,{locale:m||r,_ANT_MARK__:"internalMark"},N)))}(n,s)}))}))}},wFql: /*!***************************************************************!*\ @@ -3593,14 +3593,14 @@ e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setProtot /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/raf.js because of ./src/pages/Engineering/Evaluate/List/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/ref.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/index.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/TextArea.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/raf.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/Detail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/ref.js because of ./src/pages/Engineering/Lists/CourseMatrix/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/Engineering/Lists/CourseMatrix/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/index.js because of ./src/layouts/virtualDetail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/TextArea.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/layouts/virtualDetail/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js because of ./src/pages/Engineering/Lists/CourseMatrix/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/copy-to-clipboard/index.js (<- Module is not an ECMAScript module) */ @@ -3791,12 +3791,12 @@ e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setProtot /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/Engineering/Navigation/Home/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/wave.js because of ./src/pages/Search/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/Engineering/Lists/CourseMatrix/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/wave.js because of ./src/pages/MyProblem/LeftPanel/Description/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/Engineering/Lists/CourseMatrix/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/layouts/virtualDetail/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-motion/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/LoadingIcon.js (referenced with cjs require)) */ diff --git a/color.less b/color.less index f65ab59b3a..b2fa9444e2 100644 --- a/color.less +++ b/color.less @@ -727,42 +727,42 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-form-item-has-success.ant-form-item-has-feedback .ant-form-item-children-icon {color: @success-color;} .ant-form-item-has-warning .ant-form-item-explain, .ant-form-item-has-warning .ant-form-item-split {color: @warning-color;} .ant-form-item-has-warning .ant-input, .ant-form-item-has-warning .ant-input-affix-wrapper, .ant-form-item-has-warning .ant-input:hover, .ant-form-item-has-warning .ant-input-affix-wrapper:hover {border-color: @warning-color;} -.ant-form-item-has-warning .ant-input:focus, .ant-form-item-has-warning .ant-input-affix-wrapper:focus, .ant-form-item-has-warning .ant-input-focused, .ant-form-item-has-warning .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(188, 109, 218, 0.2);} +.ant-form-item-has-warning .ant-input:focus, .ant-form-item-has-warning .ant-input-affix-wrapper:focus, .ant-form-item-has-warning .ant-input-focused, .ant-form-item-has-warning .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(231, 152, 139, 0.2);} .ant-form-item-has-warning .ant-input:not(.ant-form-item-has-warning .ant-input-disabled) {background-color: #fff;} .ant-form-item-has-warning .ant-input-affix-wrapper:not(.ant-form-item-has-warning .ant-input-affix-wrapper-disabled) {background-color: #fff;} .ant-form-item-has-warning .ant-input-affix-wrapper input:focus {box-shadow: none !important;} -.ant-form-item-has-warning .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(188, 109, 218, 0.2);} +.ant-form-item-has-warning .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(231, 152, 139, 0.2);} .ant-form-item-has-warning .ant-input-prefix {color: @warning-color;} .ant-form-item-has-warning .ant-input-group-addon {color: @warning-color;border-color: @warning-color;} .ant-form-item-has-warning .has-feedback {color: @warning-color;} .ant-form-item-has-warning.ant-form-item-has-feedback .ant-form-item-children-icon {color: @warning-color;} .ant-form-item-has-warning .ant-select:not(.ant-select-borderless) .ant-select-selector {border-color: @warning-color !important;} -.ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(188, 109, 218, 0.2);} +.ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-warning .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(231, 152, 139, 0.2);} .ant-form-item-has-warning .ant-input-number, .ant-form-item-has-warning .ant-picker {border-color: @warning-color;} -.ant-form-item-has-warning .ant-input-number-focused, .ant-form-item-has-warning .ant-picker-focused, .ant-form-item-has-warning .ant-input-number:focus, .ant-form-item-has-warning .ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(188, 109, 218, 0.2);} +.ant-form-item-has-warning .ant-input-number-focused, .ant-form-item-has-warning .ant-picker-focused, .ant-form-item-has-warning .ant-input-number:focus, .ant-form-item-has-warning .ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(231, 152, 139, 0.2);} .ant-form-item-has-warning .ant-input-number:not([disabled]):hover, .ant-form-item-has-warning .ant-picker:not([disabled]):hover {border-color: @warning-color;} -.ant-form-item-has-warning .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(188, 109, 218, 0.2);} +.ant-form-item-has-warning .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{warning-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(231, 152, 139, 0.2);} .ant-form-item-has-error .ant-form-item-explain, .ant-form-item-has-error .ant-form-item-split {color: @error-color;} .ant-form-item-has-error .ant-input, .ant-form-item-has-error .ant-input-affix-wrapper, .ant-form-item-has-error .ant-input:hover, .ant-form-item-has-error .ant-input-affix-wrapper:hover {border-color: @error-color;} -.ant-form-item-has-error .ant-input:focus, .ant-form-item-has-error .ant-input-affix-wrapper:focus, .ant-form-item-has-error .ant-input-focused, .ant-form-item-has-error .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(197, 22, 146, 0.2);} +.ant-form-item-has-error .ant-input:focus, .ant-form-item-has-error .ant-input-affix-wrapper:focus, .ant-form-item-has-error .ant-input-focused, .ant-form-item-has-error .ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(221, 173, 20, 0.2);} .ant-form-item-has-error .ant-input:not(.ant-form-item-has-error .ant-input-disabled) {background-color: #fff;} .ant-form-item-has-error .ant-input-affix-wrapper:not(.ant-form-item-has-error .ant-input-affix-wrapper-disabled) {background-color: #fff;} .ant-form-item-has-error .ant-input-affix-wrapper input:focus {box-shadow: none !important;} -.ant-form-item-has-error .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(197, 22, 146, 0.2);} +.ant-form-item-has-error .ant-calendar-picker-open .ant-calendar-picker-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(221, 173, 20, 0.2);} .ant-form-item-has-error .ant-input-prefix {color: @error-color;} .ant-form-item-has-error .ant-input-group-addon {color: @error-color;border-color: @error-color;} .ant-form-item-has-error .has-feedback {color: @error-color;} .ant-form-item-has-error.ant-form-item-has-feedback .ant-form-item-children-icon {color: @error-color;} .ant-form-item-has-error .ant-select:not(.ant-select-borderless) .ant-select-selector {border-color: @error-color !important;} -.ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(197, 22, 146, 0.2);} +.ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-open .ant-select-selector, .ant-form-item-has-error .ant-select:not(.ant-select-borderless).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(221, 173, 20, 0.2);} .ant-form-item-has-error .ant-input-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {border: 0;} .ant-form-item-has-error .ant-select.ant-select-auto-complete .ant-input:focus {border-color: @error-color;} .ant-form-item-has-error .ant-input-number, .ant-form-item-has-error .ant-picker {border-color: @error-color;} -.ant-form-item-has-error .ant-input-number-focused, .ant-form-item-has-error .ant-picker-focused, .ant-form-item-has-error .ant-input-number:focus, .ant-form-item-has-error .ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(197, 22, 146, 0.2);} +.ant-form-item-has-error .ant-input-number-focused, .ant-form-item-has-error .ant-picker-focused, .ant-form-item-has-error .ant-input-number:focus, .ant-form-item-has-error .ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(221, 173, 20, 0.2);} .ant-form-item-has-error .ant-input-number:not([disabled]):hover, .ant-form-item-has-error .ant-picker:not([disabled]):hover {border-color: @error-color;} .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):hover {border-color: @error-color;} -.ant-form-item-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(197, 22, 146, 0.2);} -.ant-form-item-has-error .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(197, 22, 146, 0.2);} +.ant-form-item-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor, .ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(221, 173, 20, 0.2);} +.ant-form-item-has-error .ant-cascader-picker:focus .ant-cascader-input {border-color: color(~`colorPalette("@{error-color}", 5)`);border-right-width: 1px !important;box-shadow: 0 0 0 2px rgba(221, 173, 20, 0.2);} .ant-form-item-has-error .ant-transfer-list {border-color: @error-color;} .ant-form-item-has-error .ant-transfer-list-search:not([disabled]) {border-color: @border-color-base;} .ant-form-item-has-error .ant-transfer-list-search:not([disabled]):hover {border-color: color(~`colorPalette("@{primary-color}", 5)`);border-right-width: 1px !important;} @@ -1473,7 +1473,7 @@ tr.ant-table-expanded-row:hover > td {background: #fbfbfb;} .ant-tag-gold-inverse {color: #fff;background: #faad14;border-color: #faad14;} .ant-tag-cyan {color: #13c2c2;background: #e6fffb;border-color: #87e8de;} .ant-tag-cyan-inverse {color: #fff;background: #13c2c2;border-color: #13c2c2;} -.ant-tag-lime {color: #a0d911;background: #fcffe6;border-color: #eaff8f;} +.ant-tag-lime {color: #a0d911;background: color(~`colorPalette("@{modal-header-border-color-split}", 1)`);border-color: #eaff8f;} .ant-tag-lime-inverse {color: #fff;background: #a0d911;border-color: #a0d911;} .ant-tag-green {color: #52c41a;background: #f6ffed;border-color: #b7eb8f;} .ant-tag-green-inverse {color: #fff;background: #52c41a;border-color: #52c41a;} diff --git a/index.html b/index.html index ab901a4e39..fb4039be88 100644 --- a/index.html +++ b/index.html @@ -127,6 +127,6 @@ - + diff --git a/layouts__ShixunDetail__index.90e3d3dd.async.js b/layouts__ShixunDetail__index.90e3d3dd.async.js index a7c522701a..f754d9567c 100644 --- a/layouts__ShixunDetail__index.90e3d3dd.async.js +++ b/layouts__ShixunDetail__index.90e3d3dd.async.js @@ -642,14 +642,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/monaco-editor.38977551.async.js b/monaco-editor.38977551.async.js index 2018991762..c5e46103a5 100644 --- a/monaco-editor.38977551.async.js +++ b/monaco-editor.38977551.async.js @@ -36,7 +36,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/position.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js */function(e,t,n){"use strict";n.r(t),n.d(t,"DragAndDropController",(function(){return f}));n("OhnE");var i,o=n("pmY6"),r=n("MNsG"),s=n("sswD"),a=n("cGHE"),u=n("aokT"),l=n("gCVg"),c=function(){function e(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}return e.prototype.getEditOperations=function(e,t){var n=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new u.a(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new l.a(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new l.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumberthis.selection.endLineNumber?this.targetSelection=new l.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber ?(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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:m,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function n(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||C.defaults,this.rules=t.normal,this.options.pedantic?this.rules=t.pedantic:this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,t._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,t.def=h(t.def).replace("label",t._label).replace("title",t._title).getRegex(),t.bullet=/(?:[*+-]|\d{1,9}\.)/,t.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,t.item=h(t.item,"gm").replace(/bull/g,t.bullet).getRegex(),t.list=h(t.list).replace(/bull/g,t.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+t.def.source+")").getRegex(),t._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",t._comment=//,t.html=h(t.html,"i").replace("comment",t._comment).replace("tag",t._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t.paragraph=h(t.paragraph).replace("hr",t.hr).replace("heading",t.heading).replace("lheading",t.lheading).replace("tag",t._tag).getRegex(),t.blockquote=h(t.blockquote).replace("paragraph",t.paragraph).getRegex(),t.normal=v({},t),t.gfm=v({},t.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=h(t.paragraph).replace("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|").getRegex(),t.tables=v({},t.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),t.pedantic=v({},t.normal,{html:h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",t._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),n.rules=t,n.lex=function(e,t){return new n(t).lex(e)},n.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},n.prototype.token=function(e,n){var i,o,r,s,a,u,l,c,d,h,p,f,g,m,v,y;for(e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:b(r,"\n")});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2]?r[2].trim():r[2],text:r[3]||""});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if((r=this.rules.nptable.exec(e))&&(u={type:"table",header:_(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/\n$/,"").split("\n"):[]}).header.length===u.align.length){for(e=e.substring(r[0].length),p=0;p ?/gm,""),this.token(r,n),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),l={type:"list_start",ordered:m=(s=r[2]).length>1,start:m?+s:"",loose:!1},this.tokens.push(l),c=[],i=!1,g=(r=r[0].match(this.rules.item)).length,p=0;p1?1===a.length:a.length>1||this.options.smartLists&&a!==s)&&(e=r.slice(p+1).join("\n")+e,p=g-1)),o=i||/\n\n(?!\s*$)/.test(u),p!==g-1&&(i="\n"===u.charAt(u.length-1),o||(o=i)),o&&(l.loose=!0),y=void 0,(v=/^\[[ xX]\] /.test(u))&&(y=" "!==u[1],u=u.replace(/^\[[ xX]\] +/,"")),d={type:"list_item_start",task:v,checked:y,loose:o},c.push(d),this.tokens.push(d),this.token(u,!1),this.tokens.push({type:"list_item_end"});if(l.loose)for(g=c.length,p=0;p?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:m,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:m,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~",o.em=h(o.em).replace(/punctuation/g,o._punctuation).getRegex(),o._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,o._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,o._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])?)+(?![-_])/,o.autolink=h(o.autolink).replace("scheme",o._scheme).replace("email",o._email).getRegex(),o._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,o.tag=h(o.tag).replace("comment",t._comment).replace("attribute",o._attribute).getRegex(),o._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|`(?!`)|[^\[\]\\`])*?/,o._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/,o._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,o.link=h(o.link).replace("label",o._label).replace("href",o._href).replace("title",o._title).getRegex(),o.reflink=h(o.reflink).replace("label",o._label).getRegex(),o.normal=v({},o),o.pedantic=v({},o.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:h(/^!?\[(label)\]\((.*?)\)/).replace("label",o._label).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",o._label).getRegex()}),o.gfm=v({},o.normal,{escape:h(o.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]*?(?:(?=[\\/i.test(s[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(s[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0])&&(this.inRawBlock=!1),e=e.substring(s[0].length),u+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):c(s[0]):s[0];else if(s=this.rules.link.exec(e)){var l=y(s[2],"()");if(l>-1){var d=s[0].length-(s[2].length-l)-(s[3]||"").length;s[2]=s[2].substring(0,l),s[0]=s[0].substring(0,d).trim(),s[3]=""}e=e.substring(s[0].length),this.inLink=!0,i=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i))?(i=t[1],o=t[3]):o="":o=s[3]?s[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),u+=this.outputLink(s,{href:r.escapes(i),title:r.escapes(o)}),this.inLink=!1}else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){u+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,u+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),u+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),u+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),u+=this.renderer.codespan(c(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),u+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),u+=this.renderer.del(this.output(s[1]));else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),i="@"===s[2]?"mailto:"+(n=c(this.mangle(s[1]))):n=c(s[1]),u+=this.renderer.link(i,null,n);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.text.exec(e))e=e.substring(s[0].length),this.inRawBlock?u+=this.renderer.text(s[0]):u+=this.renderer.text(c(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===s[2])i="mailto:"+(n=c(s[0]));else{do{a=s[0],s[0]=this.rules._backpedal.exec(s[0])[0]}while(a!==s[0]);n=c(s[0]),i="www."===s[1]?"http://"+n:n}e=e.substring(s[0].length),u+=this.renderer.link(i,null,n)}return u},r.escapes=function(e){return e?e.replace(r.rules._escapes,"$1"):e},r.prototype.outputLink=function(e,t){var n=t.href,i=t.title?c(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,c(e[1]))},r.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},r.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,o=0;o.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},s.prototype.code=function(e,t,n){var i=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,i);null!=o&&o!==e&&(n=!0,e=o)}return i?'
'+(n?e:c(e,!0))+"
\n":"
"+(n?e:c(e,!0))+"
"},s.prototype.blockquote=function(e){return"
\n"+e+"
\n"},s.prototype.html=function(e){return e},s.prototype.heading=function(e,t,n,i){return this.options.headerIds?"'+e+"\n":""+e+"\n"},s.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},s.prototype.list=function(e,t,n){var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},s.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},s.prototype.checkbox=function(e){return" "},s.prototype.paragraph=function(e){return"

    "+e+"

    \n"},s.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},s.prototype.tablerow=function(e){return"\n"+e+"\n"},s.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},s.prototype.strong=function(e){return""+e+""},s.prototype.em=function(e){return""+e+""},s.prototype.codespan=function(e){return""+e+""},s.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},s.prototype.del=function(e){return""+e+""},s.prototype.link=function(e,t,n){if(null===(e=p(this.options.sanitize,this.options.baseUrl,e)))return n;var i='"},s.prototype.image=function(e,t,n){if(null===(e=p(this.options.sanitize,this.options.baseUrl,e)))return n;var i=''+n+'":">"},s.prototype.text=function(e){return e},a.prototype.strong=a.prototype.em=a.prototype.codespan=a.prototype.del=a.prototype.text=function(e){return e},a.prototype.link=a.prototype.image=function(e,t,n){return""+n},a.prototype.br=function(){return""},u.parse=function(e,t){return new u(t).parse(e)},u.prototype.parse=function(e){this.inline=new r(e.links,this.options),this.inlineText=new r(e.links,v({},this.options,{renderer:new a})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},u.prototype.next=function(){return this.token=this.tokens.pop()},u.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},u.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},u.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,d(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,o="",r="";for(n="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},c.escapeTest=/[&<>"']/,c.escapeReplace=/[&<>"']/g,c.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},c.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,c.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var f={},g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function m(){}function v(e){for(var t,n,i=1;i=0&&"\\"===n[o];)i=!i;return i?"|":" |"})).split(/ \|/),i=0;if(n.length>t)n.splice(t);else for(;n.lengthAn error occurred:

    "+c(e.message+"",!0)+"
    ";throw e}}m.exec=m,C.options=C.setOptions=function(e){return v(C.defaults,e),C},C.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new s,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},C.defaults=C.getDefaults(),C.Parser=u,C.parser=u.parse,C.Renderer=s,C.TextRenderer=a,C.Lexer=n,C.lexer=n.lex,C.InlineLexer=r,C.inlineLexer=r.output,C.Slugger=l,C.parse=C,i=C}).call(void 0);i.Parser,i.parser;var l=i.Renderer,c=(i.TextRenderer,i.Lexer,i.lexer,i.InlineLexer,i.inlineLexer,i.parse);let d;!function e(t,n,i){function o(s,a){if(!n[s]){if(!t[s]){if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[s]={exports:{}};t[s][0].call(l.exports,(function(e){return o(t[s][1][e]||e)}),l,l.exports,e,t,n,i)}return n[s].exports}for(var r=!1,s=0;s\s]+))?)*)\s*(\/?)\s*>/,a=/^<\s*\/\s*([\w:-]+)[^>]*>/,u=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,l=/^=0&&(t.comment&&t.comment(e.substring(4,i)),e=e.substring(i+3),n=!1):c.test(e)?f(a,m):l.test(e)&&f(s,g);var i;!function(){if(!n)return;var i,o=e.indexOf("<");o>=0?(i=e.substring(0,o),e=e.substring(o)):(i=e,e="");t.chars&&t.chars(i)}()}();var i=e===h;h=e,i&&(e="")}function f(t,i){var o=e.match(t);o&&(e=e.substring(o[0].length),o[0].replace(t,i),n=!1)}function g(e,n,s,a){var l={},c=o(n),h=r.voids[c]||!!a;s.replace(u,(function(e,t,n,o,r){l[t]=void 0===n&&void 0===o&&void 0===r?void 0:i.decode(n||o||r||"")})),h||d.push(c),t.start&&t.start(c,l,h)}function m(e,n){var i,r=0,s=o(n);if(s)for(r=d.length-1;r>=0&&d[r]!==s;r--);if(r>=0){for(i=d.length-1;i>=r;i--)t.end&&t.end(d[i]);d.length=r}}m()}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],8:[function(e,t,n){var i=e("he"),o=e("./lowercase"),r=e("./attributes"),s=e("./elements");t.exports=function(e,t){var n,a=t||{};return d(),{start:function(e,t,s){var c=o(e);if(n.ignoring)return void l(c);if(-1===(a.allowedTags||[]).indexOf(c))return void l(c);if(a.filter&&!a.filter({tag:c,attrs:t}))return void l(c);u("<"),u(c),Object.keys(t).forEach((function(e){var n=t[e],s=(a.allowedClasses||{})[c]||[],l=(a.allowedAttributes||{})[c]||[];l=l.concat((a.allowedAttributes||{})["*"]||[]);var d=o(e);("class"===d&&-1===l.indexOf(d)?(n=n.split(" ").filter((function(e){return s&&-1!==s.indexOf(e)})).join(" ").trim()).length:-1!==l.indexOf(d)&&(!0!==r.uris[d]||function(e){var t=e[0];if("#"===t||"/"===t)return!0;var n=e.indexOf(":");if(-1===n)return!0;var i=e.indexOf("?");if(-1!==i&&n>i)return!0;var o=e.indexOf("#");if(-1!==o&&n>o)return!0;return a.allowedSchemes.some((function(t){return 0===e.indexOf(t+":")}))}(n)))&&(u(" "),u(e),"string"==typeof n&&(u('="'),u(i.encode(n)),u('"')))})),u(s?"/>":">")},end:function(e){var t=o(e);-1!==(a.allowedTags||[]).indexOf(t)&&!1===n.ignoring?(u("")):c(t)},chars:function(e){!1===n.ignoring&&u(a.transformText?a.transformText(e):e)}};function u(t){e.push(t)}function l(e){s.voids[e]||(!1===n.ignoring?n={ignoring:e,depth:1}:n.ignoring===e&&n.depth++)}function c(e){n.ignoring===e&&--n.depth<=0&&d()}function d(){n={ignoring:!1,depth:0}}}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],9:[function(e,t,n){var i={"&":"&","<":"<",">":">",'"':""","'":"'"},o={"&":"&","<":"<",">":">",""":'"',"'":"'"},r=/(&|<|>|"|')/g,s=/[&<>"']/g;function a(e){return i[e]}function u(e){return o[e]}function l(e){return null==e?"":String(e).replace(s,a)}function c(e){return null==e?"":String(e).replace(r,u)}l.options=c.options={},t.exports={encode:l,escape:l,decode:c,unescape:c,version:"1.0.0-browser"}},{}],10:[function(e,t,n){function i(e,t){return e[t]=!0,e}t.exports=function(e){return e.reduce(i,{})}},{}]},{},[4]);var h=d,p=n("Q4rV"),f=n("qj0h"),g=n("N0LK"),m=n("bY76"),v=n("tYmi"),_=n("Vhoy");var b,y=n("W9cx"),C=n("WBhO"),w=n("TQUy"),S=n("Cg/j"),O=n("MI8n"),L=n("pmY6"),D=n("twdY"),x=(b=function(e,t){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),N=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},k=function(e,t){return function(n,i){t(n,i,e)}},E=function(e){function t(t,n,i){void 0===i&&(i=y.b);var o=e.call(this)||this;return o._editor=t,o._modeService=n,o._openerService=i,o._onDidRenderCodeBlock=o._register(new O.a),o.onDidRenderCodeBlock=o._onDidRenderCodeBlock.event,o}return x(t,e),t.prototype.getOptions=function(e){var t=this;return{codeBlockRenderer:function(e,n){var i=null;if(e)i=t._modeService.getModeIdForLanguageName(e);else{var o=t._editor.getModel();o&&(i=o.getLanguageIdentifier().language)}return t._modeService.triggerMode(i||""),Promise.resolve(!0).then((function(e){var t=D.B.getPromise(i||"");return t?t.then((function(e){return Object(w.b)(n,e)})):Object(w.b)(n,void 0)})).then((function(e){return''+e+""}))},codeBlockRenderCallback:function(){return t._onDidRenderCodeBlock.fire()},actionHandler:{callback:function(e){t._openerService.open(e,{fromUserGesture:!0}).catch(s.e)},disposeables:e}}},t.prototype.render=function(e){var t=new L.b;return{element:e?function(e,t){void 0===t&&(t={});var n,i=Object(r.a)(t),d=function(t){var n;try{n=Object(p.a)(decodeURIComponent(t))}catch(e){}return n?(n=Object(f.b)(n,(function(t){return e.uris&&e.uris[t]?m.a.revive(e.uris[t]):void 0})),encodeURIComponent(JSON.stringify(n))):t},b=function(t,n){var i=e.uris&&e.uris[t];if(!i)return t;var r=m.a.revive(i);return m.a.parse(t).toString()===r.toString()?t:(n&&(r=o.s(r)),r.query&&(r=r.with({query:d(r.query)})),r.toString(!0))},y=new Promise((function(e){return n=e})),C=new l;C.image=function(e,t,n){var i,o=[],r=[];return e&&(e=(i=Object(a.d)(e)).href,o=i.dimensions,e=b(e,!0),r.push('src="'+e+'"')),n&&r.push('alt="'+n+'"'),t&&r.push('title="'+t+'"'),o.length&&(r=r.concat(o)),""},C.link=function(t,n,i){return t===i&&(i=Object(a.e)(i)),t=b(t,!1),n=Object(a.e)(n),!(t=Object(a.e)(t))||t.match(/^data:|javascript:/i)||t.match(/^command:/i)&&!e.isTrusted||t.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?i:'
    /g,">").replace(/"/g,""").replace(/'/g,"'"))+'" title="'+(n||t)+'">'+i+""},C.paragraph=function(t){return"

    "+(e.supportThemeIcons?Object(_.c)(t):t)+"

    "},t.codeBlockRenderer&&(C.code=function(e,n){var o=t.codeBlockRenderer(n,e),r=u.b.nextId(),s=Promise.all([o,y]).then((function(e){var t=e[0],n=i.querySelector('div[data-code="'+r+'"]');n&&(n.innerHTML=t)})).catch((function(e){}));return t.codeBlockRenderCallback&&s.then(t.codeBlockRenderCallback),'
    '+Object(g.o)(e)+"
    "});var w=t.actionHandler;w&&w.disposeables.add(o.o(i,"click",(function(e){var t=e.target;if("A"===t.tagName||(t=t.parentElement)&&"A"===t.tagName)try{var n=t.dataset.href;n&&w.callback(n,e)}catch(e){Object(s.e)(e)}finally{e.preventDefault()}})));var S={sanitize:!0,renderer:C},O=[v.b.http,v.b.https,v.b.mailto,v.b.data,v.b.file,v.b.vscodeRemote,v.b.vscodeRemoteResource];e.isTrusted&&O.push(v.b.command);var L=c(e.supportThemeIcons?Object(_.b)(e.value):e.value,S);return i.innerHTML=h(L,{allowedSchemes:O,allowedAttributes:{a:["href","name","target","data-href"],iframe:["allowfullscreen","frameborder","src"],img:["src","title","alt","width","height"],div:["class","data-code"],span:["class"]}}),n(),i}(e,this.getOptions(t)):document.createElement("span"),dispose:function(){return t.dispose()}}},t=N([k(1,C.a),k(2,Object(S.d)(y.a))],t)}(L.a)},"3rx1": /*!*****************************************************************!*\ @@ -380,14 +380,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/platform.js (<- Module uses injected variables (process, global)) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/types.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/uri.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/widget/embeddedCodeEditorWidget.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/position.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -395,13 +395,13 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToSymbol.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesController.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/referencesModel.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/peekView/peekView.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensController.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -424,11 +424,11 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/arrays.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/assert.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -442,19 +442,19 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/glob.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/iterator.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/keybindingLabels.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/keybindingLabels.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/gotoLine.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/linkedList.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/map.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/marshalling.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/network.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/objects.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/path.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/path.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/platform.js (<- Module uses injected variables (process, global)) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/range.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/severity.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/range.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/gotoLine.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/severity.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/stopwatch.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/types.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/uri.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -463,33 +463,33 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/config/commonEditorConfig.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/config/fontInfo.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/lineTokens.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/position.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/stringBuilder.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/token.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/token.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorAction.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorCommon.js because of ./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/tokensStore.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/wordHelper.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/nullMode.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/format/formatActions.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js */ @@ -504,14 +504,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -519,10 +519,10 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/label/common/label.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/log/common/log.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/find/findController.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/registry/common/platform.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -629,21 +629,21 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/touch.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/arrays.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/async.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/errors.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/rename/rename.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/position.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeAction.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/types.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ @@ -654,7 +654,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -810,14 +810,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/browser.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/globalMouseMoveMonitor.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/mouseEvent.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/async.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/platform.js (<- Module uses injected variables (process, global)) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/scrollable.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */function(e,t,n){"use strict";n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return I})),n.d(t,"a",(function(){return M}));n("eq1K");var i,o=n("D3Dy"),r=n("EffR"),s=n("ZlPH"),a=n("XSiN"),u=n("AKMP"),l=n("G300"),c=n("X+cX"),d=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(e){function t(t){var n=e.call(this)||this;return n._onActivate=t.onActivate,n.bgDomNode=document.createElement("div"),n.bgDomNode.className="arrow-background",n.bgDomNode.style.position="absolute",n.bgDomNode.style.width=t.bgWidth+"px",n.bgDomNode.style.height=t.bgHeight+"px",void 0!==t.top&&(n.bgDomNode.style.top="0px"),void 0!==t.left&&(n.bgDomNode.style.left="0px"),void 0!==t.bottom&&(n.bgDomNode.style.bottom="0px"),void 0!==t.right&&(n.bgDomNode.style.right="0px"),n.domNode=document.createElement("div"),n.domNode.className=t.className,n.domNode.style.position="absolute",n.domNode.style.width="11px",n.domNode.style.height="11px",void 0!==t.top&&(n.domNode.style.top=t.top+"px"),void 0!==t.left&&(n.domNode.style.left=t.left+"px"),void 0!==t.bottom&&(n.domNode.style.bottom=t.bottom+"px"),void 0!==t.right&&(n.domNode.style.right=t.right+"px"),n._mouseMoveMonitor=n._register(new u.a),n.onmousedown(n.bgDomNode,(function(e){return n._arrowMouseDown(e)})),n.onmousedown(n.domNode,(function(e){return n._arrowMouseDown(e)})),n._mousedownRepeatTimer=n._register(new c.c),n._mousedownScheduleRepeatTimer=n._register(new c.e),n}return d(t,e),t.prototype._arrowMouseDown=function(e){var t=this;this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet((function(){t._mousedownRepeatTimer.cancelAndSet((function(){return t._onActivate()}),1e3/24)}),200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,u.b,(function(e){}),(function(){t._mousedownRepeatTimer.cancel(),t._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()},t}(l.a),p=n("pmY6"),f=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),g=function(e){function t(t,n,i){var o=e.call(this)||this;return o._visibility=t,o._visibleClassName=n,o._invisibleClassName=i,o._domNode=null,o._isVisible=!1,o._isNeeded=!1,o._shouldBeVisible=!1,o._revealTimer=o._register(new c.e),o}return f(t,e),t.prototype.applyVisibilitySetting=function(e){return 2!==this._visibility&&(3===this._visibility||e)},t.prototype.setShouldBeVisible=function(e){var t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())},t.prototype.setIsNeeded=function(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())},t.prototype.setDomNode=function(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)},t.prototype.ensureVisibility=function(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)},t.prototype._reveal=function(){var e=this;this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((function(){e._domNode&&e._domNode.setClassName(e._visibleClassName)}),0))},t.prototype._hide=function(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))},t}(p.a),m=n("MNsG"),v=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),_=function(e){function t(t){var n=e.call(this)||this;return n._lazyRender=t.lazyRender,n._host=t.host,n._scrollable=t.scrollable,n._scrollbarState=t.scrollbarState,n._visibilityController=n._register(new g(t.visibility,"visible scrollbar "+t.extraScrollbarClassName,"invisible scrollbar "+t.extraScrollbarClassName)),n._visibilityController.setIsNeeded(n._scrollbarState.isNeeded()),n._mouseMoveMonitor=n._register(new u.a),n._shouldRender=!0,n.domNode=Object(s.b)(document.createElement("div")),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n._visibilityController.setDomNode(n.domNode),n.domNode.setPosition("absolute"),n.onmousedown(n.domNode.domNode,(function(e){return n._domNodeMouseDown(e)})),n}return v(t,e),t.prototype._createArrow=function(e){var t=this._register(new h(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)},t.prototype._createSlider=function(e,t,n,i){var o=this;this.slider=Object(s.b)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof n&&this.slider.setWidth(n),"number"==typeof i&&this.slider.setHeight(i),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,(function(e){e.leftButton&&(e.preventDefault(),o._sliderMouseDown(e,(function(){})))})),this.onclick(this.slider.domNode,(function(e){e.leftButton&&e.stopPropagation()}))},t.prototype._onElementSize=function(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype._onElementScrollSize=function(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype._onElementScrollPosition=function(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype.beginReveal=function(){this._visibilityController.setShouldBeVisible(!0)},t.prototype.beginHide=function(){this._visibilityController.setShouldBeVisible(!1)},t.prototype.render=function(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))},t.prototype._domNodeMouseDown=function(e){e.target===this.domNode.domNode&&this._onMouseDown(e)},t.prototype.delegateMouseDown=function(e){var t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),i=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);n<=o&&o<=i?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(function(){}))):this._onMouseDown(e)},t.prototype._onMouseDown=function(e){var t,n;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,n=e.browserEvent.offsetY;else{var i=r.C(this.domNode.domNode);t=e.posx-i.left,n=e.posy-i.top}this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(t,n))),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(function(){})))},t.prototype._sliderMouseDown=function(e,t){var n=this,i=this._sliderMousePosition(e),o=this._sliderOrthogonalMousePosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,u.b,(function(e){var t=n._sliderOrthogonalMousePosition(e),s=Math.abs(t-o);if(m.h&&s>140)n._setDesiredScrollPositionNow(r.getScrollPosition());else{var a=n._sliderMousePosition(e)-i;n._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(a))}}),(function(){n.slider.toggleClassName("active",!1),n._host.onDragEnd(),t()})),this._host.onDragStart()},t.prototype._setDesiredScrollPositionNow=function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)},t}(l.a),b=function(){function e(e,t,n,i,o,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=i,this._scrollSize=o,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}return e.prototype.clone=function(){return new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)},e.prototype.setVisibleSize=function(e){var t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollSize=function(e){var t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollPosition=function(e){var t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)},e._computeValues=function(e,t,n,i,o){var r=Math.max(0,n-e),s=Math.max(0,r-2*t),a=i>0&&i>n;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};var u=Math.round(Math.max(20,Math.floor(n*s/i))),l=(s-u)/(i-n),c=o*l;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(u),computedSliderRatio:l,computedSliderPosition:Math.round(c)}},e.prototype._refreshComputedValues=function(){var t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition},e.prototype.getArrowSize=function(){return this._arrowSize},e.prototype.getScrollPosition=function(){return this._scrollPosition},e.prototype.getRectangleLargeSize=function(){return this._computedAvailableSize},e.prototype.getRectangleSmallSize=function(){return this._scrollbarSize},e.prototype.isNeeded=function(){return this._computedIsNeeded},e.prototype.getSliderSize=function(){return this._computedSliderSize},e.prototype.getSliderPosition=function(){return this._computedSliderPosition},e.prototype.getDesiredScrollPositionFromOffset=function(e){if(!this._computedIsNeeded)return 0;var t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)},e.prototype.getDesiredScrollPositionFromDelta=function(e){if(!this._computedIsNeeded)return 0;var t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)},e}(),y=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),C=function(e){function t(t,n,i){var o=this,r=t.getScrollDimensions(),s=t.getCurrentScrollPosition();if(o=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new b(n.horizontalHasArrows?n.arrowSize:0,2===n.horizontal?0:n.horizontalScrollbarSize,2===n.vertical?0:n.verticalScrollbarSize,r.width,r.scrollWidth,s.scrollLeft),visibility:n.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this,n.horizontalHasArrows){var u=(n.arrowSize-11)/2,l=(n.horizontalScrollbarSize-11)/2;o._createArrow({className:"left-arrow",top:l,left:u,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new a.c(null,1,0))}}),o._createArrow({className:"right-arrow",top:l,left:void 0,bottom:void 0,right:u,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new a.c(null,-1,0))}})}return o._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,void 0,n.horizontalSliderSize),o}return y(t,e),t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),this.slider.setLeft(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return e},t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy},t.prototype.writeScrollPosition=function(e,t){e.scrollLeft=t},t}(_),w=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),S=function(e){function t(t,n,i){var o=this,r=t.getScrollDimensions(),s=t.getCurrentScrollPosition();if(o=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new b(n.verticalHasArrows?n.arrowSize:0,2===n.vertical?0:n.verticalScrollbarSize,0,r.height,r.scrollHeight,s.scrollTop),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this,n.verticalHasArrows){var u=(n.arrowSize-11)/2,l=(n.verticalScrollbarSize-11)/2;o._createArrow({className:"up-arrow",top:u,left:l,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return o._host.onMouseWheel(new a.c(null,0,1))}}),o._createArrow({className:"down-arrow",top:void 0,left:l,bottom:u,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return o._host.onMouseWheel(new a.c(null,0,-1))}})}return o._createSlider(0,Math.floor((n.verticalScrollbarSize-n.verticalSliderSize)/2),n.verticalSliderSize,void 0),o}return w(t,e),t.prototype._updateSlider=function(e,t){this.slider.setHeight(e),this.slider.setTop(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return t},t.prototype._sliderMousePosition=function(e){return e.posy},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posx},t.prototype.writeScrollPosition=function(e,t){e.scrollTop=t},t}(_),O=n("MI8n"),L=n("QuOb"),D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),x=function(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0},N=function(){function e(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}return e.prototype.isPhysicalMouseWheel=function(){if(-1===this._front&&-1===this._rear)return!1;for(var e=1,t=0,n=1,i=this._rear;;){var o=i===this._front?e:Math.pow(2,-n);if(e-=o,t+=this._memory[i].score*o,i===this._front)break;i=(this._capacity+i-1)%this._capacity,n++}return t<=.5},e.prototype.accept=function(e,t,n){var i=new x(e,t,n);i.score=this._computeScore(i),-1===this._front&&-1===this._rear?(this._memory[0]=i,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i)},e.prototype._computeScore=function(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;var t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return(Math.abs(e.deltaX-Math.round(e.deltaX))>0||Math.abs(e.deltaY-Math.round(e.deltaY))>0)&&(t+=.25),Math.min(Math.max(t,0),1)},e.INSTANCE=new e,e}(),k=function(e){function t(t,n,i){var o=e.call(this)||this;o._onScroll=o._register(new O.a),o.onScroll=o._onScroll.event,t.style.overflow="hidden",o._options=T(n),o._scrollable=i,o._register(o._scrollable.onScroll((function(e){o._onDidScroll(e),o._onScroll.fire(e)})));var r={onMouseWheel:function(e){return o._onMouseWheel(e)},onDragStart:function(){return o._onDragStart()},onDragEnd:function(){return o._onDragEnd()}};return o._verticalScrollbar=o._register(new S(o._scrollable,o._options,r)),o._horizontalScrollbar=o._register(new C(o._scrollable,o._options,r)),o._domNode=document.createElement("div"),o._domNode.className="monaco-scrollable-element "+o._options.className,o._domNode.setAttribute("role","presentation"),o._domNode.style.position="relative",o._domNode.style.overflow="hidden",o._domNode.appendChild(t),o._domNode.appendChild(o._horizontalScrollbar.domNode.domNode),o._domNode.appendChild(o._verticalScrollbar.domNode.domNode),o._options.useShadows?(o._leftShadowDomNode=Object(s.b)(document.createElement("div")),o._leftShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._leftShadowDomNode.domNode),o._topShadowDomNode=Object(s.b)(document.createElement("div")),o._topShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._topShadowDomNode.domNode),o._topLeftShadowDomNode=Object(s.b)(document.createElement("div")),o._topLeftShadowDomNode.setClassName("shadow top-left-corner"),o._domNode.appendChild(o._topLeftShadowDomNode.domNode)):(o._leftShadowDomNode=null,o._topShadowDomNode=null,o._topLeftShadowDomNode=null),o._listenOnDomNode=o._options.listenOnDomNode||o._domNode,o._mouseWheelToDispose=[],o._setListeningToMouseWheel(o._options.handleMouseWheel),o.onmouseover(o._listenOnDomNode,(function(e){return o._onMouseOver(e)})),o.onnonbubblingmouseout(o._listenOnDomNode,(function(e){return o._onMouseOut(e)})),o._hideTimeout=o._register(new c.e),o._isDragging=!1,o._mouseIsOver=!1,o._shouldRender=!0,o._revealOnScroll=!0,o}return D(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=Object(p.f)(this._mouseWheelToDispose),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getOverviewRulerLayoutInfo=function(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._verticalScrollbar.delegateMouseDown(e)},t.prototype.getScrollDimensions=function(){return this._scrollable.getScrollDimensions()},t.prototype.setScrollDimensions=function(e){this._scrollable.setScrollDimensions(e)},t.prototype.updateClassName=function(e){this._options.className=e,m.e&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className},t.prototype.updateOptions=function(e){var t=T(e);this._options.handleMouseWheel=t.handleMouseWheel,this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity,this._options.fastScrollSensitivity=t.fastScrollSensitivity,this._setListeningToMouseWheel(this._options.handleMouseWheel),this._options.lazyRender||this._render()},t.prototype._setListeningToMouseWheel=function(e){var t=this;if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Object(p.f)(this._mouseWheelToDispose),e)){this._mouseWheelToDispose.push(r.j(this._listenOnDomNode,o.f?"mousewheel":"wheel",(function(e){t._onMouseWheel(new a.c(e))}),{passive:!1}))}},t.prototype._onMouseWheel=function(e){var t,n=N.INSTANCE;if(n.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var i=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(i=(t=[o,i])[0],o=t[1]);var r=!m.e&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||o||(o=i,i=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,i*=this._options.fastScrollSensitivity);var s=this._scrollable.getFutureScrollPosition(),a={};if(i){var u=s.scrollTop-50*i;this._verticalScrollbar.writeScrollPosition(a,u)}if(o){var l=s.scrollLeft-50*o;this._horizontalScrollbar.writeScrollPosition(a,l)}if(a=this._scrollable.validateScrollPosition(a),s.scrollLeft!==a.scrollLeft||s.scrollTop!==a.scrollTop)this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),this._shouldRender=!0}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())},t.prototype._onDidScroll=function(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()},t.prototype.renderNow=function(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()},t.prototype._render=function(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){var e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(n?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(n?" left":""))}},t.prototype._onDragStart=function(){this._isDragging=!0,this._reveal()},t.prototype._onDragEnd=function(){this._isDragging=!1,this._hide()},t.prototype._onMouseOut=function(e){this._mouseIsOver=!1,this._hide()},t.prototype._onMouseOver=function(e){this._mouseIsOver=!0,this._reveal()},t.prototype._reveal=function(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()},t.prototype._hide=function(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())},t.prototype._scheduleHide=function(){var e=this;this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((function(){return e._hide()}),500)},t}(l.a),E=function(e){function t(t,n){var i=this;(n=n||{}).mouseWheelSmoothScroll=!1;var o=new L.a(0,(function(e){return r.W(e)}));return(i=e.call(this,t,n,o)||this)._register(o),i}return D(t,e),t.prototype.setScrollPosition=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.getScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t}(k),I=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return D(t,e),t}(k),M=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._element=t,i.onScroll((function(e){e.scrollTopChanged&&(i._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(i._element.scrollLeft=e.scrollLeft)})),i.scanDomNode(),i}return D(t,e),t.prototype.scanDomNode=function(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})},t}(E);function T(e){var t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,m.e&&(t.className+=" mac"),t}},"GR/f": +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/scrollable.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */function(e,t,n){"use strict";n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return I})),n.d(t,"a",(function(){return M}));n("eq1K");var i,o=n("D3Dy"),r=n("EffR"),s=n("ZlPH"),a=n("XSiN"),u=n("AKMP"),l=n("G300"),c=n("X+cX"),d=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(e){function t(t){var n=e.call(this)||this;return n._onActivate=t.onActivate,n.bgDomNode=document.createElement("div"),n.bgDomNode.className="arrow-background",n.bgDomNode.style.position="absolute",n.bgDomNode.style.width=t.bgWidth+"px",n.bgDomNode.style.height=t.bgHeight+"px",void 0!==t.top&&(n.bgDomNode.style.top="0px"),void 0!==t.left&&(n.bgDomNode.style.left="0px"),void 0!==t.bottom&&(n.bgDomNode.style.bottom="0px"),void 0!==t.right&&(n.bgDomNode.style.right="0px"),n.domNode=document.createElement("div"),n.domNode.className=t.className,n.domNode.style.position="absolute",n.domNode.style.width="11px",n.domNode.style.height="11px",void 0!==t.top&&(n.domNode.style.top=t.top+"px"),void 0!==t.left&&(n.domNode.style.left=t.left+"px"),void 0!==t.bottom&&(n.domNode.style.bottom=t.bottom+"px"),void 0!==t.right&&(n.domNode.style.right=t.right+"px"),n._mouseMoveMonitor=n._register(new u.a),n.onmousedown(n.bgDomNode,(function(e){return n._arrowMouseDown(e)})),n.onmousedown(n.domNode,(function(e){return n._arrowMouseDown(e)})),n._mousedownRepeatTimer=n._register(new c.c),n._mousedownScheduleRepeatTimer=n._register(new c.e),n}return d(t,e),t.prototype._arrowMouseDown=function(e){var t=this;this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet((function(){t._mousedownRepeatTimer.cancelAndSet((function(){return t._onActivate()}),1e3/24)}),200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,u.b,(function(e){}),(function(){t._mousedownRepeatTimer.cancel(),t._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()},t}(l.a),p=n("pmY6"),f=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),g=function(e){function t(t,n,i){var o=e.call(this)||this;return o._visibility=t,o._visibleClassName=n,o._invisibleClassName=i,o._domNode=null,o._isVisible=!1,o._isNeeded=!1,o._shouldBeVisible=!1,o._revealTimer=o._register(new c.e),o}return f(t,e),t.prototype.applyVisibilitySetting=function(e){return 2!==this._visibility&&(3===this._visibility||e)},t.prototype.setShouldBeVisible=function(e){var t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())},t.prototype.setIsNeeded=function(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())},t.prototype.setDomNode=function(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)},t.prototype.ensureVisibility=function(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)},t.prototype._reveal=function(){var e=this;this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((function(){e._domNode&&e._domNode.setClassName(e._visibleClassName)}),0))},t.prototype._hide=function(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))},t}(p.a),m=n("MNsG"),v=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),_=function(e){function t(t){var n=e.call(this)||this;return n._lazyRender=t.lazyRender,n._host=t.host,n._scrollable=t.scrollable,n._scrollbarState=t.scrollbarState,n._visibilityController=n._register(new g(t.visibility,"visible scrollbar "+t.extraScrollbarClassName,"invisible scrollbar "+t.extraScrollbarClassName)),n._visibilityController.setIsNeeded(n._scrollbarState.isNeeded()),n._mouseMoveMonitor=n._register(new u.a),n._shouldRender=!0,n.domNode=Object(s.b)(document.createElement("div")),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n._visibilityController.setDomNode(n.domNode),n.domNode.setPosition("absolute"),n.onmousedown(n.domNode.domNode,(function(e){return n._domNodeMouseDown(e)})),n}return v(t,e),t.prototype._createArrow=function(e){var t=this._register(new h(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)},t.prototype._createSlider=function(e,t,n,i){var o=this;this.slider=Object(s.b)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof n&&this.slider.setWidth(n),"number"==typeof i&&this.slider.setHeight(i),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,(function(e){e.leftButton&&(e.preventDefault(),o._sliderMouseDown(e,(function(){})))})),this.onclick(this.slider.domNode,(function(e){e.leftButton&&e.stopPropagation()}))},t.prototype._onElementSize=function(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype._onElementScrollSize=function(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype._onElementScrollPosition=function(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype.beginReveal=function(){this._visibilityController.setShouldBeVisible(!0)},t.prototype.beginHide=function(){this._visibilityController.setShouldBeVisible(!1)},t.prototype.render=function(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))},t.prototype._domNodeMouseDown=function(e){e.target===this.domNode.domNode&&this._onMouseDown(e)},t.prototype.delegateMouseDown=function(e){var t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),i=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);n<=o&&o<=i?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(function(){}))):this._onMouseDown(e)},t.prototype._onMouseDown=function(e){var t,n;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,n=e.browserEvent.offsetY;else{var i=r.C(this.domNode.domNode);t=e.posx-i.left,n=e.posy-i.top}this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(t,n))),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(function(){})))},t.prototype._sliderMouseDown=function(e,t){var n=this,i=this._sliderMousePosition(e),o=this._sliderOrthogonalMousePosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,u.b,(function(e){var t=n._sliderOrthogonalMousePosition(e),s=Math.abs(t-o);if(m.h&&s>140)n._setDesiredScrollPositionNow(r.getScrollPosition());else{var a=n._sliderMousePosition(e)-i;n._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(a))}}),(function(){n.slider.toggleClassName("active",!1),n._host.onDragEnd(),t()})),this._host.onDragStart()},t.prototype._setDesiredScrollPositionNow=function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)},t}(l.a),b=function(){function e(e,t,n,i,o,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=i,this._scrollSize=o,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}return e.prototype.clone=function(){return new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)},e.prototype.setVisibleSize=function(e){var t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollSize=function(e){var t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollPosition=function(e){var t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)},e._computeValues=function(e,t,n,i,o){var r=Math.max(0,n-e),s=Math.max(0,r-2*t),a=i>0&&i>n;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};var u=Math.round(Math.max(20,Math.floor(n*s/i))),l=(s-u)/(i-n),c=o*l;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(u),computedSliderRatio:l,computedSliderPosition:Math.round(c)}},e.prototype._refreshComputedValues=function(){var t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition},e.prototype.getArrowSize=function(){return this._arrowSize},e.prototype.getScrollPosition=function(){return this._scrollPosition},e.prototype.getRectangleLargeSize=function(){return this._computedAvailableSize},e.prototype.getRectangleSmallSize=function(){return this._scrollbarSize},e.prototype.isNeeded=function(){return this._computedIsNeeded},e.prototype.getSliderSize=function(){return this._computedSliderSize},e.prototype.getSliderPosition=function(){return this._computedSliderPosition},e.prototype.getDesiredScrollPositionFromOffset=function(e){if(!this._computedIsNeeded)return 0;var t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)},e.prototype.getDesiredScrollPositionFromDelta=function(e){if(!this._computedIsNeeded)return 0;var t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)},e}(),y=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),C=function(e){function t(t,n,i){var o=this,r=t.getScrollDimensions(),s=t.getCurrentScrollPosition();if(o=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new b(n.horizontalHasArrows?n.arrowSize:0,2===n.horizontal?0:n.horizontalScrollbarSize,2===n.vertical?0:n.verticalScrollbarSize,r.width,r.scrollWidth,s.scrollLeft),visibility:n.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this,n.horizontalHasArrows){var u=(n.arrowSize-11)/2,l=(n.horizontalScrollbarSize-11)/2;o._createArrow({className:"left-arrow",top:l,left:u,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new a.c(null,1,0))}}),o._createArrow({className:"right-arrow",top:l,left:void 0,bottom:void 0,right:u,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new a.c(null,-1,0))}})}return o._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,void 0,n.horizontalSliderSize),o}return y(t,e),t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),this.slider.setLeft(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return e},t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy},t.prototype.writeScrollPosition=function(e,t){e.scrollLeft=t},t}(_),w=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),S=function(e){function t(t,n,i){var o=this,r=t.getScrollDimensions(),s=t.getCurrentScrollPosition();if(o=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new b(n.verticalHasArrows?n.arrowSize:0,2===n.vertical?0:n.verticalScrollbarSize,0,r.height,r.scrollHeight,s.scrollTop),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this,n.verticalHasArrows){var u=(n.arrowSize-11)/2,l=(n.verticalScrollbarSize-11)/2;o._createArrow({className:"up-arrow",top:u,left:l,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return o._host.onMouseWheel(new a.c(null,0,1))}}),o._createArrow({className:"down-arrow",top:void 0,left:l,bottom:u,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return o._host.onMouseWheel(new a.c(null,0,-1))}})}return o._createSlider(0,Math.floor((n.verticalScrollbarSize-n.verticalSliderSize)/2),n.verticalSliderSize,void 0),o}return w(t,e),t.prototype._updateSlider=function(e,t){this.slider.setHeight(e),this.slider.setTop(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return t},t.prototype._sliderMousePosition=function(e){return e.posy},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posx},t.prototype.writeScrollPosition=function(e,t){e.scrollTop=t},t}(_),O=n("MI8n"),L=n("QuOb"),D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),x=function(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0},N=function(){function e(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}return e.prototype.isPhysicalMouseWheel=function(){if(-1===this._front&&-1===this._rear)return!1;for(var e=1,t=0,n=1,i=this._rear;;){var o=i===this._front?e:Math.pow(2,-n);if(e-=o,t+=this._memory[i].score*o,i===this._front)break;i=(this._capacity+i-1)%this._capacity,n++}return t<=.5},e.prototype.accept=function(e,t,n){var i=new x(e,t,n);i.score=this._computeScore(i),-1===this._front&&-1===this._rear?(this._memory[0]=i,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i)},e.prototype._computeScore=function(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;var t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return(Math.abs(e.deltaX-Math.round(e.deltaX))>0||Math.abs(e.deltaY-Math.round(e.deltaY))>0)&&(t+=.25),Math.min(Math.max(t,0),1)},e.INSTANCE=new e,e}(),k=function(e){function t(t,n,i){var o=e.call(this)||this;o._onScroll=o._register(new O.a),o.onScroll=o._onScroll.event,t.style.overflow="hidden",o._options=T(n),o._scrollable=i,o._register(o._scrollable.onScroll((function(e){o._onDidScroll(e),o._onScroll.fire(e)})));var r={onMouseWheel:function(e){return o._onMouseWheel(e)},onDragStart:function(){return o._onDragStart()},onDragEnd:function(){return o._onDragEnd()}};return o._verticalScrollbar=o._register(new S(o._scrollable,o._options,r)),o._horizontalScrollbar=o._register(new C(o._scrollable,o._options,r)),o._domNode=document.createElement("div"),o._domNode.className="monaco-scrollable-element "+o._options.className,o._domNode.setAttribute("role","presentation"),o._domNode.style.position="relative",o._domNode.style.overflow="hidden",o._domNode.appendChild(t),o._domNode.appendChild(o._horizontalScrollbar.domNode.domNode),o._domNode.appendChild(o._verticalScrollbar.domNode.domNode),o._options.useShadows?(o._leftShadowDomNode=Object(s.b)(document.createElement("div")),o._leftShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._leftShadowDomNode.domNode),o._topShadowDomNode=Object(s.b)(document.createElement("div")),o._topShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._topShadowDomNode.domNode),o._topLeftShadowDomNode=Object(s.b)(document.createElement("div")),o._topLeftShadowDomNode.setClassName("shadow top-left-corner"),o._domNode.appendChild(o._topLeftShadowDomNode.domNode)):(o._leftShadowDomNode=null,o._topShadowDomNode=null,o._topLeftShadowDomNode=null),o._listenOnDomNode=o._options.listenOnDomNode||o._domNode,o._mouseWheelToDispose=[],o._setListeningToMouseWheel(o._options.handleMouseWheel),o.onmouseover(o._listenOnDomNode,(function(e){return o._onMouseOver(e)})),o.onnonbubblingmouseout(o._listenOnDomNode,(function(e){return o._onMouseOut(e)})),o._hideTimeout=o._register(new c.e),o._isDragging=!1,o._mouseIsOver=!1,o._shouldRender=!0,o._revealOnScroll=!0,o}return D(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=Object(p.f)(this._mouseWheelToDispose),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getOverviewRulerLayoutInfo=function(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._verticalScrollbar.delegateMouseDown(e)},t.prototype.getScrollDimensions=function(){return this._scrollable.getScrollDimensions()},t.prototype.setScrollDimensions=function(e){this._scrollable.setScrollDimensions(e)},t.prototype.updateClassName=function(e){this._options.className=e,m.e&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className},t.prototype.updateOptions=function(e){var t=T(e);this._options.handleMouseWheel=t.handleMouseWheel,this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity,this._options.fastScrollSensitivity=t.fastScrollSensitivity,this._setListeningToMouseWheel(this._options.handleMouseWheel),this._options.lazyRender||this._render()},t.prototype._setListeningToMouseWheel=function(e){var t=this;if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Object(p.f)(this._mouseWheelToDispose),e)){this._mouseWheelToDispose.push(r.j(this._listenOnDomNode,o.f?"mousewheel":"wheel",(function(e){t._onMouseWheel(new a.c(e))}),{passive:!1}))}},t.prototype._onMouseWheel=function(e){var t,n=N.INSTANCE;if(n.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var i=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(i=(t=[o,i])[0],o=t[1]);var r=!m.e&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||o||(o=i,i=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,i*=this._options.fastScrollSensitivity);var s=this._scrollable.getFutureScrollPosition(),a={};if(i){var u=s.scrollTop-50*i;this._verticalScrollbar.writeScrollPosition(a,u)}if(o){var l=s.scrollLeft-50*o;this._horizontalScrollbar.writeScrollPosition(a,l)}if(a=this._scrollable.validateScrollPosition(a),s.scrollLeft!==a.scrollLeft||s.scrollTop!==a.scrollTop)this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),this._shouldRender=!0}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())},t.prototype._onDidScroll=function(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()},t.prototype.renderNow=function(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()},t.prototype._render=function(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){var e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(n?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(n?" left":""))}},t.prototype._onDragStart=function(){this._isDragging=!0,this._reveal()},t.prototype._onDragEnd=function(){this._isDragging=!1,this._hide()},t.prototype._onMouseOut=function(e){this._mouseIsOver=!1,this._hide()},t.prototype._onMouseOver=function(e){this._mouseIsOver=!0,this._reveal()},t.prototype._reveal=function(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()},t.prototype._hide=function(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())},t.prototype._scheduleHide=function(){var e=this;this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((function(){return e._hide()}),500)},t}(l.a),E=function(e){function t(t,n){var i=this;(n=n||{}).mouseWheelSmoothScroll=!1;var o=new L.a(0,(function(e){return r.W(e)}));return(i=e.call(this,t,n,o)||this)._register(o),i}return D(t,e),t.prototype.setScrollPosition=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.getScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t}(k),I=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return D(t,e),t}(k),M=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._element=t,i.onScroll((function(e){e.scrollTopChanged&&(i._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(i._element.scrollLeft=e.scrollLeft)})),i.scanDomNode(),i}return D(t,e),t.prototype.scanDomNode=function(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})},t}(E);function T(e){var t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,m.e&&(t.className+=" mac"),t}},"GR/f": /*!********************************************************************************************************!*\ !*** ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorTypeOperations.js + 1 modules ***! \********************************************************************************************************/ @@ -825,14 +825,14 @@ /*! exports used: TypeOperations, TypeWithAutoClosingCommand */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/errors.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/commands/replaceCommand.js because of ./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordPartOperations/wordPartOperations.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/controller/cursorCommon.js because of ./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/controller/wordCharacterClassifier.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return v}));var i,o=n("/cxE"),r=n("N0LK"),s=n("LCkn"),a=n("zN7H"),u=n("aokT"),l=n("gCVg"),c=function(){function e(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(new u.a(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new u.a(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),i=n[0].range,o=n[1].range;return new l.a(i.endLineNumber,i.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)},e}(),d=n("Ll0s"),h=n("5v8Y"),p=n("KDc4"),f=n("cMvZ"),g=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=function(){function e(){}return e.indent=function(e,t,n){if(null===t||null===n)return[];for(var i=[],o=0,r=n.length;o1){var l=void 0;for(l=i-1;l>=1;l--){var c=n.getLineContent(l);if(r.D(c)>=0)break}if(l<1)return null;var d=n.getLineMaxColumn(l),h=f.a.getEnterAction(t.autoIndent,n,new u.a(l,d,l,d));h&&(s=h.indentation+h.appendText)}return o&&(o===p.a.Indent&&(s=e.shiftIndent(t,s)),o===p.a.Outdent&&(s=e.unshiftIndent(t,s)),s=t.normalizeIndentation(s)),s||null},e._replaceJumpToNextIndent=function(e,t,n,i){var o="",r=n.getStartPosition();if(e.insertSpaces)for(var a=d.a.visibleColumnFromColumn2(e,t,r),u=e.indentSize,l=u-a%u,c=0;c=4){var y=f.a.getIndentForEnter(t.autoIndent,n,o,{unshiftIndent:function(n){return e.unshiftIndent(t,n)},shiftIndent:function(n){return e.shiftIndent(t,n)},normalizeIndentation:function(e){return t.normalizeIndentation(e)}});if(y){var C=d.a.visibleColumnFromColumn2(t,n,o.getEndPosition()),w=o.endColumn,S="\n";b!==t.normalizeIndentation(y.beforeEnter)&&(S=t.normalizeIndentation(y.beforeEnter)+_.substring(b.length,o.startColumn-1)+"\n",o=new u.a(o.startLineNumber,1,o.endLineNumber,o.endColumn));var O=n.getLineContent(o.endLineNumber),L=r.q(O);if(o=L>=0?o.setEndPosition(o.endLineNumber,Math.max(o.endColumn,L+1)):o.setEndPosition(o.endLineNumber,n.getLineMaxColumn(o.endLineNumber)),i)return new s.e(o,S+t.normalizeIndentation(y.afterEnter),!0);var D=0;return w<=L+1&&(t.insertSpaces||(C=Math.ceil(C/t.indentSize)),D=Math.min(C+1-t.normalizeIndentation(y.afterEnter).length-1,0)),new s.d(o,S+t.normalizeIndentation(y.afterEnter),0,D,!0)}}return e._typeCommand(o,"\n"+t.normalizeIndentation(b),i)},e._isAutoIndentType=function(e,t,n){if(e.autoIndent<4)return!1;for(var i=0,o=n.length;i2?l.charCodeAt(u.column-2):0)&&c)return!1;if("auto"===e.autoClosingOvertype){for(var h=!1,p=0,f=i.length;p=0||n.indexOf(t)>=0},e._isBeforeClosingBrace=function(t,n,i){var o=t.autoClosingPairsClose2.get(i);if(!o)return!1;for(var r=e._autoClosingPairIsSymmetric(n),s=0,a=o;sr.open.length){for(var c=!0,d=0,h=n;dv.column-1){var b=_.charAt(v.column-1);if(!e._isBeforeClosingBrace(t,l,b)&&!c(b))return null}if(!n.isCheapToTokenize(v.lineNumber))return null;if(1===l.open.length&&a&&"always"!==u){var y=Object(h.a)(t.wordSeparators);if(s&&v.column>1&&0===y.get(_.charCodeAt(v.column-2)))return null;if(!s&&v.column>2&&0===y.get(_.charCodeAt(v.column-3)))return null}n.forceTokenization(v.lineNumber);var C=n.getLineTokens(v.lineNumber),w=!1;try{w=f.a.shouldAutoClosePair(l,C,s?v.column:v.column-1)}catch(e){Object(o.e)(e)}if(!w)return null}return l},e._runAutoClosingOpenCharType=function(e,t,n,i,o,r,s){for(var a=[],u=0,l=i.length;u1){var l=void 0;for(l=i-1;l>=1;l--){var c=n.getLineContent(l);if(r.D(c)>=0)break}if(l<1)return null;var d=n.getLineMaxColumn(l),h=f.a.getEnterAction(t.autoIndent,n,new u.a(l,d,l,d));h&&(s=h.indentation+h.appendText)}return o&&(o===p.a.Indent&&(s=e.shiftIndent(t,s)),o===p.a.Outdent&&(s=e.unshiftIndent(t,s)),s=t.normalizeIndentation(s)),s||null},e._replaceJumpToNextIndent=function(e,t,n,i){var o="",r=n.getStartPosition();if(e.insertSpaces)for(var a=d.a.visibleColumnFromColumn2(e,t,r),u=e.indentSize,l=u-a%u,c=0;c=4){var y=f.a.getIndentForEnter(t.autoIndent,n,o,{unshiftIndent:function(n){return e.unshiftIndent(t,n)},shiftIndent:function(n){return e.shiftIndent(t,n)},normalizeIndentation:function(e){return t.normalizeIndentation(e)}});if(y){var C=d.a.visibleColumnFromColumn2(t,n,o.getEndPosition()),w=o.endColumn,S="\n";b!==t.normalizeIndentation(y.beforeEnter)&&(S=t.normalizeIndentation(y.beforeEnter)+_.substring(b.length,o.startColumn-1)+"\n",o=new u.a(o.startLineNumber,1,o.endLineNumber,o.endColumn));var O=n.getLineContent(o.endLineNumber),L=r.q(O);if(o=L>=0?o.setEndPosition(o.endLineNumber,Math.max(o.endColumn,L+1)):o.setEndPosition(o.endLineNumber,n.getLineMaxColumn(o.endLineNumber)),i)return new s.e(o,S+t.normalizeIndentation(y.afterEnter),!0);var D=0;return w<=L+1&&(t.insertSpaces||(C=Math.ceil(C/t.indentSize)),D=Math.min(C+1-t.normalizeIndentation(y.afterEnter).length-1,0)),new s.d(o,S+t.normalizeIndentation(y.afterEnter),0,D,!0)}}return e._typeCommand(o,"\n"+t.normalizeIndentation(b),i)},e._isAutoIndentType=function(e,t,n){if(e.autoIndent<4)return!1;for(var i=0,o=n.length;i2?l.charCodeAt(u.column-2):0)&&c)return!1;if("auto"===e.autoClosingOvertype){for(var h=!1,p=0,f=i.length;p=0||n.indexOf(t)>=0},e._isBeforeClosingBrace=function(t,n,i){var o=t.autoClosingPairsClose2.get(i);if(!o)return!1;for(var r=e._autoClosingPairIsSymmetric(n),s=0,a=o;sr.open.length){for(var c=!0,d=0,h=n;dv.column-1){var b=_.charAt(v.column-1);if(!e._isBeforeClosingBrace(t,l,b)&&!c(b))return null}if(!n.isCheapToTokenize(v.lineNumber))return null;if(1===l.open.length&&a&&"always"!==u){var y=Object(h.a)(t.wordSeparators);if(s&&v.column>1&&0===y.get(_.charCodeAt(v.column-2)))return null;if(!s&&v.column>2&&0===y.get(_.charCodeAt(v.column-3)))return null}n.forceTokenization(v.lineNumber);var C=n.getLineTokens(v.lineNumber),w=!1;try{w=f.a.shouldAutoClosePair(l,C,s?v.column:v.column-1)}catch(e){Object(o.e)(e)}if(!w)return null}return l},e._runAutoClosingOpenCharType=function(e,t,n,i,o,r,s){for(var a=[],u=0,l=i.length;u=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},b=function(e,t){return function(n,i){t(n,i,e)}},y=function(){function e(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.run=function(t,n){var i=this;this.currentRequest&&this.currentRequest.cancel();var o=this.editor.getSelection(),a=this.editor.getModel();if(a&&o){var u=o;if(u.startLineNumber===u.endLineNumber){var l=new d.a(this.editor,5),h=a.uri;return this.editorWorkerService.canNavigateValueSet(h)?(this.currentRequest=Object(g.f)((function(e){return i.editorWorkerService.navigateValueSet(h,u,n)})),this.currentRequest.then((function(n){if(n&&n.range&&n.value&&l.validate(i.editor)){var o=r.a.lift(n.range),a=n.range,d=n.value.length-(u.endColumn-u.startColumn);a={startLineNumber:a.startLineNumber,startColumn:a.startColumn,endLineNumber:a.endLineNumber,endColumn:a.startColumn+n.value.length},d>1&&(u=new s.a(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn+d-1));var h=new c(o,u,n.value);i.editor.pushUndoStop(),i.editor.executeCommand(t,h),i.editor.pushUndoStop(),i.decorationIds=i.editor.deltaDecorations(i.decorationIds,[{range:a,options:e.DECORATION}]),i.decorationRemover&&i.decorationRemover.cancel(),i.decorationRemover=Object(g.l)(350),i.decorationRemover.then((function(){return i.decorationIds=i.editor.deltaDecorations(i.decorationIds,[])})).catch(m.e)}})).catch(m.e)):Promise.resolve(void 0)}}},e.ID="editor.contrib.inPlaceReplaceController",e.DECORATION=f.a.register({className:"valueSetReplacement"}),e=_([b(1,l.a)],e)}(),C=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.up",label:o.a("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:a.a.writable,kbOpts:{kbExpr:a.a.editorTextFocus,primary:3154,weight:100}})||this}return v(t,e),t.prototype.run=function(e,t){var n=y.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)},t}(u.b),w=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.down",label:o.a("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:a.a.writable,kbOpts:{kbExpr:a.a.editorTextFocus,primary:3156,weight:100}})||this}return v(t,e),t.prototype.run=function(e,t){var n=y.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)},t}(u.b);Object(u.h)(y.ID,y),Object(u.f)(C),Object(u.f)(w),Object(h.e)((function(e,t){var n=e.getColor(p.d);n&&t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px "+n+"; }")}))},Gw4z: /*!********************************************************************************!*\ @@ -867,7 +867,7 @@ \********************************************************************************/ /*! exports provided: StringDiffSequence, stringDiff, Debug, MyArray, LcsDiff */ /*! exports used: LcsDiff, stringDiff */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/hash.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js */function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var i=function(){function e(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}return e.prototype.getOriginalEnd=function(){return this.originalStart+this.originalLength},e.prototype.getModifiedEnd=function(){return this.modifiedStart+this.modifiedLength},e}(),o=n("7afs"),r=function(){function e(e){this.source=e}return e.prototype.getElements=function(){for(var e=this.source,t=new Int32Array(e.length),n=0,i=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new i(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),c=function(){function e(t,n,i){void 0===i&&(i=null),this.ContinueProcessingPredicate=i;var o=e._getElements(t),r=o[0],s=o[1],a=o[2],u=e._getElements(n),l=u[0],c=u[1],d=u[2];this._hasStrings=a&&d,this._originalStringElements=r,this._originalElementsOrHash=s,this._modifiedStringElements=l,this._modifiedElementsOrHash=c,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e._isStringArray=function(e){return e.length>0&&"string"==typeof e[0]},e._getElements=function(t){var n=t.getElements();if(e._isStringArray(n)){for(var i=new Int32Array(n.length),r=0,s=n.length;r=e&&o>=n&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||n>o){var s=void 0;return n<=o?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new i(e,0,n,o-n+1)]):e<=t?(a.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[new i(e,t-e+1,n,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}var u=[0],l=[0],c=this.ComputeRecursionPoint(e,t,n,o,u,l,r),d=u[0],h=l[0];if(null!==c)return c;if(!r[0]){var p=this.ComputeDiffRecursive(e,d,n,h,r),f=[];return f=r[0]?[new i(d+1,t-(d+1)+1,h+1,o-(h+1)+1)]:this.ComputeDiffRecursive(d+1,t,h+1,o,r),this.ConcatenateChanges(p,f)}return[new i(e,t-e+1,n,o-n+1)]},e.prototype.WALKTRACE=function(e,t,n,o,r,s,a,u,c,d,h,p,f,g,m,v,_,b){var y,C=null,w=new l,S=t,O=n,L=f[0]-v[0]-o,D=-1073741824,x=this.m_forwardHistory.length-1;do{(I=L+e)===S||I=0&&(e=(c=this.m_forwardHistory[x])[0],S=1,O=c.length-1)}while(--x>=-1);if(y=w.getReverseChanges(),b[0]){var N=f[0]+1,k=v[0]+1;if(null!==y&&y.length>0){var E=y[y.length-1];N=Math.max(N,E.getOriginalEnd()),k=Math.max(k,E.getModifiedEnd())}C=[new i(N,p-N+1,k,m-k+1)]}else{w=new l,S=s,O=a,L=f[0]-v[0]-u,D=1073741824,x=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{var I;(I=L+r)===S||I=d[I+1]?(g=(h=d[I+1]-1)-L-u,h>D&&w.MarkNextChange(),D=h+1,w.AddOriginalElement(h+1,g+1),L=I+1-r):(g=(h=d[I-1])-L-u,h>D&&w.MarkNextChange(),D=h,w.AddModifiedElement(h+1,g+1),L=I-1-r),x>=0&&(r=(d=this.m_reverseHistory[x])[0],S=1,O=d.length-1)}while(--x>=-1);C=w.getChanges()}return this.ConcatenateChanges(y,C)},e.prototype.ComputeRecursionPoint=function(e,t,n,o,r,s,a){var l=0,c=0,d=0,h=0,p=0,f=0;e--,n--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var g=t-e+(o-n),m=g+1,v=new Int32Array(m),_=new Int32Array(m),b=o-n,y=t-e,C=e-n,w=t-o,S=(y-b)%2==0;v[b]=e,_[y]=t,a[0]=!1;for(var O=1;O<=g/2+1;O++){var L=0,D=0;d=this.ClipDiagonalBound(b-O,O,b,m),h=this.ClipDiagonalBound(b+O,O,b,m);for(var x=d;x<=h;x+=2){c=(l=x===d||xL+D&&(L=l,D=c),!S&&Math.abs(x-y)<=O-1&&l>=_[x])return r[0]=l,s[0]=c,N<=_[x]&&O<=1448?this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a):null}var k=(L-e+(D-n)-O)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(L,k))return a[0]=!0,r[0]=L,s[0]=D,k>0&&O<=1448?this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a):(e++,n++,[new i(e,t-e+1,n,o-n+1)]);p=this.ClipDiagonalBound(y-O,O,y,m),f=this.ClipDiagonalBound(y+O,O,y,m);for(x=p;x<=f;x+=2){c=(l=x===p||x=_[x+1]?_[x+1]-1:_[x-1])-(x-y)-w;for(N=l;l>e&&c>n&&this.ElementsAreEqual(l,c);)l--,c--;if(_[x]=l,S&&Math.abs(x-b)<=O&&l<=v[x])return r[0]=l,s[0]=c,N>=v[x]&&O<=1448?this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a):null}if(O<=1447){var E=new Int32Array(h-d+2);E[0]=b-d+1,u.Copy2(v,d,E,1,h-d+1),this.m_forwardHistory.push(E),(E=new Int32Array(f-p+2))[0]=y-p+1,u.Copy2(_,p,E,1,f-p+1),this.m_reverseHistory.push(E)}}return this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a)},e.prototype.PrettifyChanges=function(e){for(var t=0;t0,s=n.modifiedLength>0;n.originalStart+n.originalLength=0;t--){n=e[t],i=0,o=0;if(t>0){var u=e[t-1];u.originalLength>0&&(i=u.originalStart+u.originalLength),u.modifiedLength>0&&(o=u.modifiedStart+u.modifiedLength)}r=n.originalLength>0,s=n.modifiedLength>0;for(var l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),d=1;;d++){var h=n.originalStart-d,p=n.modifiedStart-d;if(hc&&(c=f,l=d)}n.originalStart-=l,n.modifiedStart-=l}return e},e.prototype._OriginalIsBoundary=function(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){var i=new Array(e.length+t.length-1);return u.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],u.Copy(t,1,i,e.length,t.length-1),i}i=new Array(e.length+t.length);return u.Copy(e,0,i,0,e.length),u.Copy(t,0,i,e.length,t.length),i},e.prototype.ChangesOverlap=function(e,t,n){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var o=e.originalStart,r=e.originalLength,s=e.modifiedStart,u=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(u=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new i(o,r,s,u),!0}return n[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,i){if(e>=0&&e0||this.m_modifiedCount>0)&&this.m_changes.push(new i(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),c=function(){function e(t,n,i){void 0===i&&(i=null),this.ContinueProcessingPredicate=i;var o=e._getElements(t),r=o[0],s=o[1],a=o[2],u=e._getElements(n),l=u[0],c=u[1],d=u[2];this._hasStrings=a&&d,this._originalStringElements=r,this._originalElementsOrHash=s,this._modifiedStringElements=l,this._modifiedElementsOrHash=c,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e._isStringArray=function(e){return e.length>0&&"string"==typeof e[0]},e._getElements=function(t){var n=t.getElements();if(e._isStringArray(n)){for(var i=new Int32Array(n.length),r=0,s=n.length;r=e&&o>=n&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||n>o){var s=void 0;return n<=o?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new i(e,0,n,o-n+1)]):e<=t?(a.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[new i(e,t-e+1,n,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(n===o+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}var u=[0],l=[0],c=this.ComputeRecursionPoint(e,t,n,o,u,l,r),d=u[0],h=l[0];if(null!==c)return c;if(!r[0]){var p=this.ComputeDiffRecursive(e,d,n,h,r),f=[];return f=r[0]?[new i(d+1,t-(d+1)+1,h+1,o-(h+1)+1)]:this.ComputeDiffRecursive(d+1,t,h+1,o,r),this.ConcatenateChanges(p,f)}return[new i(e,t-e+1,n,o-n+1)]},e.prototype.WALKTRACE=function(e,t,n,o,r,s,a,u,c,d,h,p,f,g,m,v,_,b){var y,C=null,w=new l,S=t,O=n,L=f[0]-v[0]-o,D=-1073741824,x=this.m_forwardHistory.length-1;do{(I=L+e)===S||I=0&&(e=(c=this.m_forwardHistory[x])[0],S=1,O=c.length-1)}while(--x>=-1);if(y=w.getReverseChanges(),b[0]){var N=f[0]+1,k=v[0]+1;if(null!==y&&y.length>0){var E=y[y.length-1];N=Math.max(N,E.getOriginalEnd()),k=Math.max(k,E.getModifiedEnd())}C=[new i(N,p-N+1,k,m-k+1)]}else{w=new l,S=s,O=a,L=f[0]-v[0]-u,D=1073741824,x=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{var I;(I=L+r)===S||I=d[I+1]?(g=(h=d[I+1]-1)-L-u,h>D&&w.MarkNextChange(),D=h+1,w.AddOriginalElement(h+1,g+1),L=I+1-r):(g=(h=d[I-1])-L-u,h>D&&w.MarkNextChange(),D=h,w.AddModifiedElement(h+1,g+1),L=I-1-r),x>=0&&(r=(d=this.m_reverseHistory[x])[0],S=1,O=d.length-1)}while(--x>=-1);C=w.getChanges()}return this.ConcatenateChanges(y,C)},e.prototype.ComputeRecursionPoint=function(e,t,n,o,r,s,a){var l=0,c=0,d=0,h=0,p=0,f=0;e--,n--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var g=t-e+(o-n),m=g+1,v=new Int32Array(m),_=new Int32Array(m),b=o-n,y=t-e,C=e-n,w=t-o,S=(y-b)%2==0;v[b]=e,_[y]=t,a[0]=!1;for(var O=1;O<=g/2+1;O++){var L=0,D=0;d=this.ClipDiagonalBound(b-O,O,b,m),h=this.ClipDiagonalBound(b+O,O,b,m);for(var x=d;x<=h;x+=2){c=(l=x===d||xL+D&&(L=l,D=c),!S&&Math.abs(x-y)<=O-1&&l>=_[x])return r[0]=l,s[0]=c,N<=_[x]&&O<=1448?this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a):null}var k=(L-e+(D-n)-O)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(L,k))return a[0]=!0,r[0]=L,s[0]=D,k>0&&O<=1448?this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a):(e++,n++,[new i(e,t-e+1,n,o-n+1)]);p=this.ClipDiagonalBound(y-O,O,y,m),f=this.ClipDiagonalBound(y+O,O,y,m);for(x=p;x<=f;x+=2){c=(l=x===p||x=_[x+1]?_[x+1]-1:_[x-1])-(x-y)-w;for(N=l;l>e&&c>n&&this.ElementsAreEqual(l,c);)l--,c--;if(_[x]=l,S&&Math.abs(x-b)<=O&&l<=v[x])return r[0]=l,s[0]=c,N>=v[x]&&O<=1448?this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a):null}if(O<=1447){var E=new Int32Array(h-d+2);E[0]=b-d+1,u.Copy2(v,d,E,1,h-d+1),this.m_forwardHistory.push(E),(E=new Int32Array(f-p+2))[0]=y-p+1,u.Copy2(_,p,E,1,f-p+1),this.m_reverseHistory.push(E)}}return this.WALKTRACE(b,d,h,C,y,p,f,w,v,_,l,t,r,c,o,s,S,a)},e.prototype.PrettifyChanges=function(e){for(var t=0;t0,s=n.modifiedLength>0;n.originalStart+n.originalLength=0;t--){n=e[t],i=0,o=0;if(t>0){var u=e[t-1];u.originalLength>0&&(i=u.originalStart+u.originalLength),u.modifiedLength>0&&(o=u.modifiedStart+u.modifiedLength)}r=n.originalLength>0,s=n.modifiedLength>0;for(var l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),d=1;;d++){var h=n.originalStart-d,p=n.modifiedStart-d;if(hc&&(c=f,l=d)}n.originalStart-=l,n.modifiedStart-=l}return e},e.prototype._OriginalIsBoundary=function(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){var i=new Array(e.length+t.length-1);return u.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],u.Copy(t,1,i,e.length,t.length-1),i}i=new Array(e.length+t.length);return u.Copy(e,0,i,0,e.length),u.Copy(t,0,i,e.length,t.length),i},e.prototype.ChangesOverlap=function(e,t,n){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var o=e.originalStart,r=e.originalLength,s=e.modifiedStart,u=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(u=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new i(o,r,s,u),!0}return n[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,i){if(e>=0&&e=3)for(var o=0,r=this._regExpRules.length;o=2&&n.length>0&&i.length>0)for(o=0,r=this._brackets.length;o=2&&n.length>0)for(o=0,r=this._brackets.length;o1){var o=void 0,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;var s=e.getLineContent(o);if(!n.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return o;r=o}}return-1},e.prototype.getInheritIndentForLine=function(e,t,n,i){if(void 0===i&&(i=!0),e<4)return null;var o=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!o)return null;if(n<=1)return{indentation:"",action:null};var s=this.getPrecedingValidLine(t,n,o);if(s<0)return null;if(s<1)return{indentation:"",action:null};var u=t.getLineContent(s);if(o.shouldIncrease(u)||o.shouldIndentNextLine(u))return{indentation:r.t(u),action:a.a.Indent,line:s};if(o.shouldDecrease(u))return{indentation:r.t(u),action:null,line:s};if(1===s)return{indentation:r.t(t.getLineContent(s)),action:null,line:s};var l=s-1,c=o.getIndentMetadata(t.getLineContent(l));if(!(3&c)&&4&c){for(var d=0,h=l-1;h>0;h--)if(!o.shouldIndentNextLine(t.getLineContent(h))){d=h;break}return{indentation:r.t(t.getLineContent(d+1)),action:null,line:d+1}}if(i)return{indentation:r.t(t.getLineContent(s)),action:null,line:s};for(h=s;h>0;h--){var p=t.getLineContent(h);if(o.shouldIncrease(p))return{indentation:r.t(p),action:a.a.Indent,line:h};if(o.shouldIndentNextLine(p)){d=0;for(var f=h-1;f>0;f--)if(!o.shouldIndentNextLine(t.getLineContent(h))){d=f;break}return{indentation:r.t(t.getLineContent(d+1)),action:null,line:d+1}}if(o.shouldDecrease(p))return{indentation:r.t(p),action:null,line:h}}return{indentation:r.t(t.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,n,i,o){if(e<4)return null;var s=this._getRichEditSupport(n);if(!s)return null;var u=this.getIndentRulesSupport(n);if(!u)return null;var l=this.getInheritIndentForLine(e,t,i),c=t.getLineContent(i);if(l){var d=l.line;if(void 0!==d){var h=s.onEnter(e,"",t.getLineContent(d),"");if(h){var p=r.t(t.getLineContent(d));return h.removeText&&(p=p.substring(0,p.length-h.removeText)),h.indentAction===a.a.Indent||h.indentAction===a.a.IndentOutdent?p=o.shiftIndent(p):h.indentAction===a.a.Outdent&&(p=o.unshiftIndent(p)),u.shouldDecrease(c)&&(p=o.unshiftIndent(p)),h.appendText&&(p+=h.appendText),r.t(p)}}return u.shouldDecrease(c)?l.action===a.a.Indent?l.indentation:o.unshiftIndent(l.indentation):l.action===a.a.Indent?o.shiftIndent(l.indentation):l.indentation}return null},e.prototype.getIndentForEnter=function(e,t,n,i){if(e<4)return null;t.forceTokenization(n.startLineNumber);var o,s,l=t.getLineTokens(n.startLineNumber),c=Object(u.a)(l,n.startColumn-1),d=c.getLineContent(),h=!1;(c.firstCharOffset>0&&l.getLanguageId(0)!==c.languageId?(h=!0,o=d.substr(0,n.startColumn-1-c.firstCharOffset)):o=l.getLineContent().substring(0,n.startColumn-1),n.isEmpty())?s=d.substr(n.startColumn-1-c.firstCharOffset):s=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-c.firstCharOffset);var p=this.getIndentRulesSupport(c.languageId);if(!p)return null;var f=o,g=r.t(o),m={getLineTokens:function(e){return t.getLineTokens(e)},getLanguageIdentifier:function(){return t.getLanguageIdentifier()},getLanguageIdAtPosition:function(e,n){return t.getLanguageIdAtPosition(e,n)},getLineContent:function(e){return e===n.startLineNumber?f:t.getLineContent(e)}},v=r.t(l.getLineContent()),_=this.getInheritIndentForLine(e,m,n.startLineNumber+1);if(!_){var b=h?v:g;return{beforeEnter:b,afterEnter:b}}var y=h?v:_.indentation;return _.action===a.a.Indent&&(y=i.shiftIndent(y)),p.shouldDecrease(s)&&(y=i.unshiftIndent(y)),{beforeEnter:h?v:g,afterEnter:y}},e.prototype.getIndentActionForType=function(e,t,n,i,o){if(e<4)return null;var r=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),s=this.getIndentRulesSupport(r.languageId);if(!s)return null;var u,l=r.getLineContent(),c=l.substr(0,n.startColumn-1-r.firstCharOffset);n.isEmpty()?u=l.substr(n.startColumn-1-r.firstCharOffset):u=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-r.firstCharOffset);if(!s.shouldDecrease(c+u)&&s.shouldDecrease(c+i+u)){var d=this.getInheritIndentForLine(e,t,n.startLineNumber,!1);if(!d)return null;var h=d.indentation;return d.action!==a.a.Indent&&(h=o.unshiftIndent(h)),h}return null},e.prototype.getIndentMetadata=function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null},e.prototype.getEnterAction=function(e,t,n){var i=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),o=this._getRichEditSupport(i.languageId);if(!o)return null;var r,s=i.getLineContent(),u=s.substr(0,n.startColumn-1-i.firstCharOffset);n.isEmpty()?r=s.substr(n.startColumn-1-i.firstCharOffset):r=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-i.firstCharOffset);var l="";if(n.startLineNumber>1&&0===i.firstCharOffset){var c=this.getScopedLineTokens(t,n.startLineNumber-1);c.languageId===i.languageId&&(l=c.getLineContent())}var d=o.onEnter(e,l,u,r);if(!d)return null;var h=d.indentAction,p=d.appendText,f=d.removeText||0;p||(p=h===a.a.Indent||h===a.a.IndentOutdent?"\t":"");var g=this.getIndentationAtPosition(t,n.startLineNumber,n.startColumn);return f&&(g=g.substring(0,g.length-f)),{indentAction:h,appendText:p,removeText:f,indentation:g}},e.prototype.getIndentationAtPosition=function(e,t,n){var i=e.getLineContent(t),o=r.t(i);return o.length>n-1&&(o=o.substring(0,n-1)),o},e.prototype.getScopedLineTokens=function(e,t,n){e.forceTokenization(t);var i=e.getLineTokens(t),o=void 0===n?e.getLineMaxColumn(t)-1:n-1;return Object(u.a)(i,o)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.brackets||null},e}())},"ci+S": +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js because of ./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var i=n("MI8n"),o=n("pmY6"),r=n("N0LK"),s=n("0JNc"),a=n("KDc4"),u=n("BFtn"),l=function(){function e(t){if(t.autoClosingPairs?this._autoClosingPairs=t.autoClosingPairs.map((function(e){return new a.b(e)})):t.brackets?this._autoClosingPairs=t.brackets.map((function(e){return new a.b({open:e[0],close:e[1]})})):this._autoClosingPairs=[],t.__electricCharacterSupport&&t.__electricCharacterSupport.docComment){var n=t.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.b({open:n.open,close:n.close||""}))}this._autoCloseBefore="string"==typeof t.autoCloseBefore?t.autoCloseBefore:e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=t.surroundingPairs||this._autoClosingPairs}return e.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs},e.prototype.getAutoCloseBeforeSet=function(){return this._autoCloseBefore},e.shouldAutoClosePair=function(e,t,n){if(0===t.getTokenCount())return!0;var i=t.findTokenIndexAtOffset(n-2),o=t.getStandardTokenType(i);return e.isOK(o)},e.prototype.getSurroundingPairs=function(){return this._surroundingPairs},e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t",e}(),c=n("EIAu"),d=function(){function e(e){this._richEditBrackets=e}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,n=this._richEditBrackets.brackets;t=3)for(var o=0,r=this._regExpRules.length;o=2&&n.length>0&&i.length>0)for(o=0,r=this._brackets.length;o=2&&n.length>0)for(o=0,r=this._brackets.length;o1){var o=void 0,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;var s=e.getLineContent(o);if(!n.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return o;r=o}}return-1},e.prototype.getInheritIndentForLine=function(e,t,n,i){if(void 0===i&&(i=!0),e<4)return null;var o=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!o)return null;if(n<=1)return{indentation:"",action:null};var s=this.getPrecedingValidLine(t,n,o);if(s<0)return null;if(s<1)return{indentation:"",action:null};var u=t.getLineContent(s);if(o.shouldIncrease(u)||o.shouldIndentNextLine(u))return{indentation:r.t(u),action:a.a.Indent,line:s};if(o.shouldDecrease(u))return{indentation:r.t(u),action:null,line:s};if(1===s)return{indentation:r.t(t.getLineContent(s)),action:null,line:s};var l=s-1,c=o.getIndentMetadata(t.getLineContent(l));if(!(3&c)&&4&c){for(var d=0,h=l-1;h>0;h--)if(!o.shouldIndentNextLine(t.getLineContent(h))){d=h;break}return{indentation:r.t(t.getLineContent(d+1)),action:null,line:d+1}}if(i)return{indentation:r.t(t.getLineContent(s)),action:null,line:s};for(h=s;h>0;h--){var p=t.getLineContent(h);if(o.shouldIncrease(p))return{indentation:r.t(p),action:a.a.Indent,line:h};if(o.shouldIndentNextLine(p)){d=0;for(var f=h-1;f>0;f--)if(!o.shouldIndentNextLine(t.getLineContent(h))){d=f;break}return{indentation:r.t(t.getLineContent(d+1)),action:null,line:d+1}}if(o.shouldDecrease(p))return{indentation:r.t(p),action:null,line:h}}return{indentation:r.t(t.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,n,i,o){if(e<4)return null;var s=this._getRichEditSupport(n);if(!s)return null;var u=this.getIndentRulesSupport(n);if(!u)return null;var l=this.getInheritIndentForLine(e,t,i),c=t.getLineContent(i);if(l){var d=l.line;if(void 0!==d){var h=s.onEnter(e,"",t.getLineContent(d),"");if(h){var p=r.t(t.getLineContent(d));return h.removeText&&(p=p.substring(0,p.length-h.removeText)),h.indentAction===a.a.Indent||h.indentAction===a.a.IndentOutdent?p=o.shiftIndent(p):h.indentAction===a.a.Outdent&&(p=o.unshiftIndent(p)),u.shouldDecrease(c)&&(p=o.unshiftIndent(p)),h.appendText&&(p+=h.appendText),r.t(p)}}return u.shouldDecrease(c)?l.action===a.a.Indent?l.indentation:o.unshiftIndent(l.indentation):l.action===a.a.Indent?o.shiftIndent(l.indentation):l.indentation}return null},e.prototype.getIndentForEnter=function(e,t,n,i){if(e<4)return null;t.forceTokenization(n.startLineNumber);var o,s,l=t.getLineTokens(n.startLineNumber),c=Object(u.a)(l,n.startColumn-1),d=c.getLineContent(),h=!1;(c.firstCharOffset>0&&l.getLanguageId(0)!==c.languageId?(h=!0,o=d.substr(0,n.startColumn-1-c.firstCharOffset)):o=l.getLineContent().substring(0,n.startColumn-1),n.isEmpty())?s=d.substr(n.startColumn-1-c.firstCharOffset):s=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-c.firstCharOffset);var p=this.getIndentRulesSupport(c.languageId);if(!p)return null;var f=o,g=r.t(o),m={getLineTokens:function(e){return t.getLineTokens(e)},getLanguageIdentifier:function(){return t.getLanguageIdentifier()},getLanguageIdAtPosition:function(e,n){return t.getLanguageIdAtPosition(e,n)},getLineContent:function(e){return e===n.startLineNumber?f:t.getLineContent(e)}},v=r.t(l.getLineContent()),_=this.getInheritIndentForLine(e,m,n.startLineNumber+1);if(!_){var b=h?v:g;return{beforeEnter:b,afterEnter:b}}var y=h?v:_.indentation;return _.action===a.a.Indent&&(y=i.shiftIndent(y)),p.shouldDecrease(s)&&(y=i.unshiftIndent(y)),{beforeEnter:h?v:g,afterEnter:y}},e.prototype.getIndentActionForType=function(e,t,n,i,o){if(e<4)return null;var r=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),s=this.getIndentRulesSupport(r.languageId);if(!s)return null;var u,l=r.getLineContent(),c=l.substr(0,n.startColumn-1-r.firstCharOffset);n.isEmpty()?u=l.substr(n.startColumn-1-r.firstCharOffset):u=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-r.firstCharOffset);if(!s.shouldDecrease(c+u)&&s.shouldDecrease(c+i+u)){var d=this.getInheritIndentForLine(e,t,n.startLineNumber,!1);if(!d)return null;var h=d.indentation;return d.action!==a.a.Indent&&(h=o.unshiftIndent(h)),h}return null},e.prototype.getIndentMetadata=function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null},e.prototype.getEnterAction=function(e,t,n){var i=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),o=this._getRichEditSupport(i.languageId);if(!o)return null;var r,s=i.getLineContent(),u=s.substr(0,n.startColumn-1-i.firstCharOffset);n.isEmpty()?r=s.substr(n.startColumn-1-i.firstCharOffset):r=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-i.firstCharOffset);var l="";if(n.startLineNumber>1&&0===i.firstCharOffset){var c=this.getScopedLineTokens(t,n.startLineNumber-1);c.languageId===i.languageId&&(l=c.getLineContent())}var d=o.onEnter(e,l,u,r);if(!d)return null;var h=d.indentAction,p=d.appendText,f=d.removeText||0;p||(p=h===a.a.Indent||h===a.a.IndentOutdent?"\t":"");var g=this.getIndentationAtPosition(t,n.startLineNumber,n.startColumn);return f&&(g=g.substring(0,g.length-f)),{indentAction:h,appendText:p,removeText:f,indentation:g}},e.prototype.getIndentationAtPosition=function(e,t,n){var i=e.getLineContent(t),o=r.t(i);return o.length>n-1&&(o=o.substring(0,n-1)),o},e.prototype.getScopedLineTokens=function(e,t,n){e.forceTokenization(t);var i=e.getLineTokens(t),o=void 0===n?e.getLineMaxColumn(t)-1:n-1;return Object(u.a)(i,o)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.brackets||null},e}())},"ci+S": /*!***********************************************************************************************************!*\ !*** ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css ***! \***********************************************************************************************************/ @@ -1634,9 +1634,9 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/color.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/decorators.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/filters.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/filters.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/numbers.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/numbers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/objects.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/platform.js (<- Module uses injected variables (process, global)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/types.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -1650,10 +1650,10 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/arrays.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/async.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/cancellation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/codicons.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/codicons.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/errors.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/functional.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/hash.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/hash.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorDetector.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/map.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -1661,12 +1661,12 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/core/editorState.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/view/editorColorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js */ @@ -1700,7 +1700,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfiguration.js because of ./node_modules/monaco-editor/esm/vs/editor/browser/controller/coreCommands.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */function(e,t,n){"use strict";n.r(t),n.d(t,"DuplicateSelectionAction",(function(){return E})),n.d(t,"AbstractSortLinesAction",(function(){return P})),n.d(t,"SortLinesAscendingAction",(function(){return R})),n.d(t,"SortLinesDescendingAction",(function(){return A})),n.d(t,"TrimTrailingWhitespaceAction",(function(){return F})),n.d(t,"DeleteLinesAction",(function(){return j})),n.d(t,"IndentLinesAction",(function(){return W})),n.d(t,"InsertLineBeforeAction",(function(){return B})),n.d(t,"InsertLineAfterAction",(function(){return H})),n.d(t,"AbstractDeleteAllToBoundaryAction",(function(){return z})),n.d(t,"DeleteAllLeftAction",(function(){return U})),n.d(t,"DeleteAllRightAction",(function(){return K})),n.d(t,"JoinLinesAction",(function(){return q})),n.d(t,"TransposeAction",(function(){return G})),n.d(t,"AbstractCaseAction",(function(){return Y})),n.d(t,"UpperCaseAction",(function(){return Z})),n.d(t,"LowerCaseAction",(function(){return X})),n.d(t,"TitleCaseAction",(function(){return Q}));var i=n("3/fG"),o=n("/kV6"),r=n("1YUG"),s=n("sswD"),a=n("LCkn"),u=n("N0LK"),l=n("0/Sa"),c=n("aokT"),d=function(){function e(e,t){this._selection=e,this._cursors=t,this._selectionId=null}return e.prototype.getEditOperations=function(e,t){for(var n=function(e,t){t.sort((function(e,t){return e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber}));for(var n=t.length-2;n>=0;n--)t[n].lineNumber===t[n+1].lineNumber&&t.splice(n,1);for(var i=[],o=0,r=0,s=t.length,a=1,d=e.getLineCount();a<=d;a++){var h=e.getLineContent(a),p=h.length+1,f=0;if(!(r=i.startLineNumber+1&&t<=i.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)};var L=b.a.getGoodIndentForLine(this._autoIndent,d,e.getLanguageIdAtPosition(g,1),i.startLineNumber+1,l);if(null!==L){O=u.t(e.getLineContent(i.startLineNumber));if((k=y(L,r))!==(E=y(O,r))){var D=k-E;this.getIndentEditsOfMovingBlock(e,t,i,r,a,D)}}}}else t.addEditOperation(new c.a(i.startLineNumber,1,i.startLineNumber,1),v+"\n")}else{var x;if(g=i.startLineNumber-1,m=e.getLineContent(g),t.addEditOperation(new c.a(g,1,g+1,1),null),t.addEditOperation(new c.a(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+m),this.shouldAutoIndent(e,i))if(d.getLineContent=function(t){return t===g?e.getLineContent(i.startLineNumber):e.getLineContent(t)},null!==(x=this.matchEnterRule(e,l,r,i.startLineNumber,i.startLineNumber-2)))0!==x&&this.getIndentEditsOfMovingBlock(e,t,i,r,a,x);else{var N=b.a.getGoodIndentForLine(this._autoIndent,d,e.getLanguageIdAtPosition(i.startLineNumber,1),g,l);if(null!==N){var k,E,I=u.t(e.getLineContent(i.startLineNumber));if((k=y(N,r))!==(E=y(I,r))){D=k-E;this.getIndentEditsOfMovingBlock(e,t,i,r,a,D)}}}}}this._selectionId=t.trackSelection(i)}else this._selectionId=t.trackSelection(this._selection)},e.prototype.buildIndentConverter=function(e,t,n){return{shiftIndent:function(i){return v.a.shiftIndent(i,i.length+1,e,t,n)},unshiftIndent:function(i){return v.a.unshiftIndent(i,i.length+1,e,t,n)}}},e.prototype.matchEnterRule=function(e,t,n,i,o,r){for(var s=o;s>=1;){var a=void 0;if(a=s===o&&void 0!==r?r:e.getLineContent(s),u.D(a)>=0)break;s--}if(s<1||i>e.getLineCount())return null;var l=e.getLineMaxColumn(s),d=b.a.getEnterAction(this._autoIndent,e,new c.a(s,l,s,l));if(d){var h=d.indentation;d.indentAction===_.a.None||d.indentAction===_.a.Indent?h=d.indentation+d.appendText:d.indentAction===_.a.IndentOutdent?h=d.indentation:d.indentAction===_.a.Outdent&&(h=t.unshiftIndent(d.indentation)+d.appendText);var p=e.getLineContent(i);if(this.trimLeft(p).indexOf(this.trimLeft(h))>=0){var f=u.t(e.getLineContent(i)),g=u.t(h),m=b.a.getIndentMetadata(e,i);return null!==m&&2&m&&(g=t.unshiftIndent(g)),y(g,n)-y(f,n)}}return null},e.prototype.trimLeft=function(e){return e.replace(/^\s+/,"")},e.prototype.shouldAutoIndent=function(e,t){if(this._autoIndent<4)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;var n=e.getLanguageIdAtPosition(t.startLineNumber,1);return n===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==b.a.getIndentRulesSupport(n)},e.prototype.getIndentEditsOfMovingBlock=function(e,t,n,i,o,r){for(var s=n.startLineNumber;s<=n.endLineNumber;s++){var a=e.getLineContent(s),l=u.t(a),d=C(y(l,i)+r,i,o);d!==l&&(t.addEditOperation(new c.a(s,1,s,l.length+1),d),s===n.endLineNumber&&n.endColumn<=l.length+1&&""===d&&(this._moveEndLineSelectionShrink=!0))}},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=o)return null;for(var r=[],s=i;s<=o;s++)r.push(e.getLineContent(s));var a=r.slice(0);return a.sort(S.getCollator().compare),!0===n&&(a=a.reverse()),{startLineNumber:i,endLineNumber:o,before:r,after:a}}var L,D=(L=function(e,t){return(L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}L(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),x=function(e){function t(t,n){var i=e.call(this,n)||this;return i.down=t,i}return D(t,e),t.prototype.run=function(e,t){for(var n=[],i=0,o=t.getSelections()||[];i1&&(d-=1,p=i.getLineMaxColumn(d)),r.push(l.a.replace(new f.a(d,p,h,g),"")),s.push(new f.a(d-o,c.positionColumn,d-o,c.positionColumn)),o+=c.endLineNumber-c.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}}},t.prototype._getLinesToRemove=function(e){var t=e.getSelections().map((function(e){var t=e.endLineNumber;return e.startLineNumber=t[o].startLineNumber?i.endLineNumber=t[o].endLineNumber:(n.push(i),i=t[o]);return n.push(i),n},t}(s.b),W=function(e){function t(){return e.call(this,{id:"editor.action.indentLines",label:i.a("lines.indent","Indent Line"),alias:"Indent Line",precondition:g.a.writable,kbOpts:{kbExpr:g.a.editorTextFocus,primary:2137,weight:100}})||this}return D(t,e),t.prototype.run=function(e,t){var n=t._getCursors();n&&(t.pushUndoStop(),t.executeCommands(this.id,h.a.indent(n.context.config,t.getModel(),t.getSelections())),t.pushUndoStop())},t}(s.b),V=function(e){function t(){return e.call(this,{id:"editor.action.outdentLines",label:i.a("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:g.a.writable,kbOpts:{kbExpr:g.a.editorTextFocus,primary:2135,weight:100}})||this}return D(t,e),t.prototype.run=function(e,t){r.CoreEditingCommands.Outdent.runEditorCommand(e,t,null)},t}(s.b),B=function(e){function t(){return e.call(this,{id:"editor.action.insertLineBefore",label:i.a("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:g.a.writable,kbOpts:{kbExpr:g.a.editorTextFocus,primary:3075,weight:100}})||this}return D(t,e),t.prototype.run=function(e,t){var n=t._getCursors();n&&(t.pushUndoStop(),t.executeCommands(this.id,h.a.lineInsertBefore(n.context.config,t.getModel(),t.getSelections())))},t}(s.b),H=function(e){function t(){return e.call(this,{id:"editor.action.insertLineAfter",label:i.a("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:g.a.writable,kbOpts:{kbExpr:g.a.editorTextFocus,primary:2051,weight:100}})||this}return D(t,e),t.prototype.run=function(e,t){var n=t._getCursors();n&&(t.pushUndoStop(),t.executeCommands(this.id,h.a.lineInsertAfter(n.context.config,t.getModel(),t.getSelections())))},t}(s.b),z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.run=function(e,t){if(t.hasModel()){for(var n=t.getSelection(),i=this._getRangesToDelete(t),o=[],r=0,s=i.length-1;r0){var s=t.startLineNumber-o;r=new f.a(s,t.startColumn,s,t.startColumn)}else r=new f.a(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?n=r:i.push(r)})),n&&i.unshift(n),i},t.prototype._getRangesToDelete=function(e){var t=e.getSelections();if(null===t)return[];var n=t,i=e.getModel();return null===i?[]:(n.sort(c.a.compareRangesUsingStarts),n=n.map((function(e){if(e.isEmpty()){if(1===e.startColumn){var t=Math.max(1,e.startLineNumber-1),n=1===e.startLineNumber?1:i.getLineContent(t).length+1;return new c.a(t,n,e.startLineNumber,1)}return new c.a(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new c.a(e.startLineNumber,1,e.endLineNumber,e.endColumn)})))},t}(z),K=function(e){function t(){return e.call(this,{id:"deleteAllRight",label:i.a("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:g.a.writable,kbOpts:{kbExpr:g.a.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})||this}return D(t,e),t.prototype._getEndCursorState=function(e,t){for(var n=null,i=[],o=0,r=t.length;oe.endLineNumber+1?(o.push(e),t):new f.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new f.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)}));o.push(r);var s=t.getModel();if(null!==s){for(var a=[],u=[],d=i,h=0,p=0,g=o.length;p=1){var x=!0;""===S&&(x=!1),!x||" "!==S.charAt(S.length-1)&&"\t"!==S.charAt(S.length-1)||(x=!1,S=S.replace(/[\s\uFEFF\xA0]+$/g," "));var N=L.substr(D-1);S+=(x?" ":"")+N,_=x?N.length+1:N.length}else _=0}var k=new c.a(v,1,b,y);if(!k.isEmpty()){var E=void 0;m.isEmpty()?(a.push(l.a.replace(k,S)),E=new f.a(k.startLineNumber-h,S.length-_+1,v-h,S.length-_+1)):m.startLineNumber===m.endLineNumber?(a.push(l.a.replace(k,S)),E=new f.a(m.startLineNumber-h,m.startColumn,m.endLineNumber-h,m.endColumn)):(a.push(l.a.replace(k,S)),E=new f.a(m.startLineNumber-h,m.startColumn,m.startLineNumber-h,S.length-C)),null!==c.a.intersectRanges(k,i)?d=E:u.push(E)}h+=k.endLineNumber-k.startLineNumber}u.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,a,u),t.pushUndoStop()}}}},t}(s.b),G=function(e){function t(){return e.call(this,{id:"editor.action.transpose",label:i.a("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:g.a.writable})||this}return D(t,e),t.prototype.run=function(e,t){var n=t.getSelections();if(null!==n){var i=t.getModel();if(null!==i){for(var o=[],r=0,s=n.length;r=d){if(l.lineNumber===i.getLineCount())continue;var h=new c.a(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),p=i.getValueInRange(h).split("").reverse().join("");o.push(new a.a(new f.a(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),p))}else{h=new c.a(l.lineNumber,Math.max(1,l.column-1),l.lineNumber,l.column+1),p=i.getValueInRange(h).split("").reverse().join("");o.push(new a.b(h,p,new f.a(l.lineNumber,l.column+1,l.lineNumber,l.column+1)))}}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}},t}(s.b),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.run=function(e,t){var n=t.getSelections();if(null!==n){var i=t.getModel();if(null!==i){for(var o=t.getOption(96),r=[],s=0,u=n.length;s=0?(o=!0,i+=s):o?(o=!1,i+=s.toLocaleUpperCase()):i+=s.toLocaleLowerCase()}return i},t}(Y);Object(s.f)(N),Object(s.f)(k),Object(s.f)(E),Object(s.f)(M),Object(s.f)(T),Object(s.f)(R),Object(s.f)(A),Object(s.f)(F),Object(s.f)(j),Object(s.f)(W),Object(s.f)(V),Object(s.f)(B),Object(s.f)(H),Object(s.f)(U),Object(s.f)(K),Object(s.f)(q),Object(s.f)(G),Object(s.f)(Z),Object(s.f)(X),Object(s.f)(Q)},dgXF: /*!*****************************************************************************************!*\ !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js + 7 modules ***! @@ -1718,9 +1718,9 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -1759,28 +1759,28 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/codiconLabel/codiconLabel.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickOutline.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/gotoLine.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/list/listWidget.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/arrays.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/async.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/cancellation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/errors.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/filters.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/links/links.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/filters.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/htmlContent.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/keyCodes.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/map.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/network.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/platform.js (<- Module uses injected variables (process, global)) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/types.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/uri.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/linesOperations/linesOperations.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/position.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ @@ -1788,7 +1788,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordHighlighter/wordHighlighter.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/modesRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modeService.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/documentSymbols/outlineTree.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickOutline.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/markdown/markdownRenderer.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/hover/hover.js */ @@ -1800,7 +1800,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -1831,7 +1831,7 @@ /*! exports provided: ContextMenuController */ /*! all exports used */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -1847,18 +1847,18 @@ /*! exports provided: ElementsDragAndDropData, ExternalElementsDragAndDropData, DesktopDragAndDropData, ListView */ /*! exports used: ElementsDragAndDropData, ListView */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/browser.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dnd.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dnd.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/touch.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/arrays.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/async.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/decorators.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/objects.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/range.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return O})),n.d(t,"b",(function(){return x}));var i=n("qj0h"),o=n("pmY6"),r=n("pg8w"),s=n("EffR"),a=n("MI8n"),u=n("4y0V"),l=n("GJhM"),c=n("nuFA");function d(e,t){for(var n=[],i=0,o=t;i=r.range.end)){if(e.end=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},w=function(){for(var e=0,t=0,n=arguments.length;t=this.items.length?(this.rangeMap=new f,this.rangeMap.splice(0,0,v),this.items=v,d=[]):(this.rangeMap.splice(e,t,v),d=(i=this.items).splice.apply(i,w([e,t],v)));var _=n.length-t,b=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),y=h(g,_),C=c.a.intersect(b,y);for(l=C.start;l=-1&&en&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}},e.prototype.teardownDragAndDropScrollTopAnimation=function(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},e.prototype.getItemIndexFromEventTarget=function(e){for(var t=e;t instanceof HTMLElement&&t!==this.rowsContainer;){var n=t.getAttribute("data-index");if(n){var i=Number(n);if(!isNaN(i))return i}t=t.parentElement}},e.prototype.getRenderRange=function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}},e.prototype._rerender=function(e,t){var n,i,o=this.getRenderRange(e,t);e===this.elementTop(o.start)?(n=o.start,i=0):o.end-o.start>1&&(n=o.start+1,i=this.elementTop(n)-e);for(var r=0;;){for(var s=this.getRenderRange(e,t),a=!1,u=s.start;u=r.range.end)){if(e.end=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},w=function(){for(var e=0,t=0,n=arguments.length;t=this.items.length?(this.rangeMap=new f,this.rangeMap.splice(0,0,v),this.items=v,d=[]):(this.rangeMap.splice(e,t,v),d=(i=this.items).splice.apply(i,w([e,t],v)));var _=n.length-t,b=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),y=h(g,_),C=c.a.intersect(b,y);for(l=C.start;l=-1&&en&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}},e.prototype.teardownDragAndDropScrollTopAnimation=function(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},e.prototype.getItemIndexFromEventTarget=function(e){for(var t=e;t instanceof HTMLElement&&t!==this.rowsContainer;){var n=t.getAttribute("data-index");if(n){var i=Number(n);if(!isNaN(i))return i}t=t.parentElement}},e.prototype.getRenderRange=function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}},e.prototype._rerender=function(e,t){var n,i,o=this.getRenderRange(e,t);e===this.elementTop(o.start)?(n=o.start,i=0):o.end-o.start>1&&(n=o.start+1,i=this.elementTop(n)-e);for(var r=0;;){for(var s=this.getRenderRange(e,t),a=!1,u=s.start;u0&&0===e.minimapLeft?e.minimapWidth:0},e.prototype._onViewZoneTop=function(e){this.domNode.style.top=e+"px"},e.prototype._onViewZoneHeight=function(e){if(this.domNode.style.height=e+"px",this.container){var t=e-this._decoratingElementsHeight();this.container.style.height=t+"px";var n=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(n))}this._resizeSash&&this._resizeSash.layout()},Object.defineProperty(e.prototype,"position",{get:function(){var e=this._positionMarkerId[0];if(e){var t=this.editor.getModel();if(t){var n=t.getDecorationRange(e);if(n)return n.getStartPosition()}}},enumerable:!0,configurable:!0}),e.prototype.show=function(e,t){var n=_.a.isIRange(e)?_.a.lift(e):_.a.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:n,options:b.a.EMPTY}])},e.prototype.hide=function(){var e=this;this._viewZone&&(this.editor.changeViewZones((function(t){e._viewZone&&t.removeZone(e._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()},e.prototype._decoratingElementsHeight=function(){var e=this.editor.getOption(49),t=0;this.options.showArrow&&(t+=2*Math.round(e/3));this.options.showFrame&&(t+=2*Math.round(e/9));return t},e.prototype._showImpl=function(e,t){var n=this,i=e.getStartPosition(),o=this.editor.getLayoutInfo(),r=this._getWidth(o);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(o)+"px";var s=document.createElement("div");s.style.overflow="hidden";var a=this.editor.getOption(49),u=this.editor.getLayoutInfo().height/a*.8;t>=u&&(t=u);var l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(c=Math.round(a/9)),this.editor.changeViewZones((function(e){n._viewZone&&e.removeZone(n._viewZone.id),n._overlayWidget&&(n.editor.removeOverlayWidget(n._overlayWidget),n._overlayWidget=null),n.domNode.style.top="-1000px",n._viewZone=new w(s,i.lineNumber,i.column,t,(function(e){return n._onViewZoneTop(e)}),(function(e){return n._onViewZoneHeight(e)})),n._viewZone.id=e.addZone(n._viewZone),n._overlayWidget=new S("vs.editor.contrib.zoneWidget"+n._viewZone.id,n.domNode),n.editor.addOverlayWidget(n._overlayWidget)})),this.container&&this.options.showFrame){var d=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=d+"px",this.container.style.borderBottomWidth=d+"px"}var h=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=h+"px",this.container.style.overflow="hidden"),this._doLayout(h,r),this.options.keepEditorSelection||this.editor.setSelection(e);var p=this.editor.getModel();if(p){var f=e.endLineNumber+1;f<=p.getLineCount()?this.revealLine(f,!1):this.revealLine(p.getLineCount(),!0)}},e.prototype.revealLine=function(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(e,0)},e.prototype.setCssClass=function(e,t){this.container&&(t&&this.container.classList.remove(t),s.f(this.container,e))},e.prototype._onWidth=function(e){},e.prototype._doLayout=function(e,t){},e.prototype._relayout=function(e){var t=this;this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((function(n){t._viewZone&&(t._viewZone.heightInLines=e,n.layoutZone(t._viewZone.id))}))},e.prototype._initSash=function(){var e,t=this;this._resizeSash||(this._resizeSash=this._disposables.add(new g.a(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((function(n){t._viewZone&&(e={startY:n.startY,heightInLines:t._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((function(){e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((function(n){if(e){var i=(n.currentY-e.startY)/t.editor.getOption(49),o=i<0?Math.ceil(i):Math.floor(i),r=e.heightInLines+o;r>5&&r<35&&t._relayout(r)}}))))},e.prototype.getHorizontalSashLeft=function(){return 0},e.prototype.getHorizontalSashTop=function(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2},e.prototype.getHorizontalSashWidth=function(){var e=this.editor.getLayoutInfo();return e.width-e.minimapWidth},e}(),D=n("3/fG"),x=n("T8No"),N=n("Cg/j"),k=n("9fML"),E=n("sswD"),I=n("MD5Z"),M=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),T=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},P=function(e,t){return function(n,i){t(n,i,e)}},R=Object(N.c)("IPeekViewService");Object(k.b)(R,function(){function e(){this._widgets=new Map}return e.prototype.addExclusiveWidget=function(e,t){var n=this,i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose());this._widgets.set(e,{widget:t,listener:t.onDidClose((function(){var i=n._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),n._widgets.delete(e))}))})},e}()),(r=o||(o={})).inPeekEditor=new x.d("inReferenceSearchEditor",!0),r.notInPeekEditor=r.inPeekEditor.toNegated();var A=function(){function e(e,t){e instanceof f.a&&o.inPeekEditor.bindTo(t)}return e.prototype.dispose=function(){},e.ID="editor.contrib.referenceController",e=T([P(1,x.c)],e)}();function F(e){var t=e.get(p.a).getFocusedCodeEditor();return t instanceof f.a?t.getParentEditor():t}Object(E.h)(A.ID,A);var j={headerBackgroundColor:l.a.white,primaryHeadingColor:l.a.fromHex("#333333"),secondaryHeadingColor:l.a.fromHex("#6c6c6cb3")},W=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this,t,n)||this;return i._onDidClose=new c.a,i.onDidClose=i._onDidClose.event,d.g(i.options,j,!1),i}return M(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._onDidClose.fire(this)},t.prototype.style=function(t){var n=this.options;t.headerBackgroundColor&&(n.headerBackgroundColor=t.headerBackgroundColor),t.primaryHeadingColor&&(n.primaryHeadingColor=t.primaryHeadingColor),t.secondaryHeadingColor&&(n.secondaryHeadingColor=t.secondaryHeadingColor),e.prototype.style.call(this,t)},t.prototype._applyStyles=function(){e.prototype._applyStyles.call(this);var t=this.options;this._headElement&&t.headerBackgroundColor&&(this._headElement.style.backgroundColor=t.headerBackgroundColor.toString()),this._primaryHeading&&t.primaryHeadingColor&&(this._primaryHeading.style.color=t.primaryHeadingColor.toString()),this._secondaryHeading&&t.secondaryHeadingColor&&(this._secondaryHeading.style.color=t.secondaryHeadingColor.toString()),this._bodyElement&&t.frameColor&&(this._bodyElement.style.borderColor=t.frameColor.toString())},t.prototype._fillContainer=function(e){this.setCssClass("peekview-widget"),this._headElement=s.a(".head"),this._bodyElement=s.a(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)},t.prototype._fillHead=function(e){var t=this,n=s.a(".peekview-title");s.q(this._headElement,n),s.o(n,"click",(function(e){return t._onTitleClick(e)})),this._fillTitleIcon(n),this._primaryHeading=s.a("span.filename"),this._secondaryHeading=s.a("span.dirname"),this._metaHeading=s.a("span.meta"),s.q(n,this._primaryHeading,this._secondaryHeading,this._metaHeading);var i=s.a(".peekview-actions");s.q(this._headElement,i);var o=this._getActionBarOptions();this._actionbarWidget=new a.a(i,o),this._disposables.add(this._actionbarWidget),this._actionbarWidget.push(new u.a("peekview.close",D.a("label.close","Close"),"codicon-close",!0,(function(){return t.dispose(),Promise.resolve()})),{label:!1,icon:!0})},t.prototype._fillTitleIcon=function(e){},t.prototype._getActionBarOptions=function(){return{}},t.prototype._onTitleClick=function(e){},t.prototype.setTitle=function(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerHTML=h.o(e),this._primaryHeading.setAttribute("aria-label",e),t?this._secondaryHeading.innerHTML=h.o(t):s.t(this._secondaryHeading))},t.prototype.setMetaTitle=function(e){this._metaHeading&&(e?(this._metaHeading.innerHTML=h.o(e),s.X(this._metaHeading)):s.J(this._metaHeading))},t.prototype._doLayout=function(e,t){if(!this._isShowing&&e<0)this.dispose();else{var n=Math.ceil(1.2*this.editor.getOption(49)),i=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(i,t)}},t.prototype._doLayoutHead=function(e,t){this._headElement&&(this._headElement.style.height=e+"px",this._headElement.style.lineHeight=this._headElement.style.height)},t.prototype._doLayoutBody=function(e,t){this._bodyElement&&(this._bodyElement.style.height=e+"px")},t}(L),V=Object(I.Tb)("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},D.a("peekViewTitleBackground","Background color of the peek view title area.")),B=Object(I.Tb)("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},D.a("peekViewTitleForeground","Color of the peek view title.")),H=Object(I.Tb)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161e6",hc:"#FFFFFF99"},D.a("peekViewTitleInfoForeground","Color of the peek view title info.")),z=Object(I.Tb)("peekView.border",{dark:"#007acc",light:"#007acc",hc:I.e},D.a("peekViewBorder","Color of the peek view borders and arrow.")),U=Object(I.Tb)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:l.a.black},D.a("peekViewResultsBackground","Background color of the peek view result list.")),K=Object(I.Tb)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:l.a.white},D.a("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),q=Object(I.Tb)("peekViewResult.fileForeground",{dark:l.a.white,light:"#1E1E1E",hc:l.a.white},D.a("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),G=Object(I.Tb)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},D.a("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),Y=Object(I.Tb)("peekViewResult.selectionForeground",{dark:l.a.white,light:"#6C6C6C",hc:l.a.white},D.a("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),Z=Object(I.Tb)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:l.a.black},D.a("peekViewEditorBackground","Background color of the peek view editor.")),X=Object(I.Tb)("peekViewEditorGutter.background",{dark:Z,light:Z,hc:Z},D.a("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),Q=Object(I.Tb)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},D.a("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),J=Object(I.Tb)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},D.a("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),$=Object(I.Tb)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:I.b},D.a("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},ic2d: /*!********************************************************************************!*\ @@ -2027,7 +2027,7 @@ \********************************************************************************************/ /*! exports provided: IListService, ListService, WorkbenchListSupportsMultiSelectContextKey, WorkbenchListFocusContextKey, WorkbenchListHasSelectionOrFocus, WorkbenchListDoubleSelection, WorkbenchListMultiSelection, WorkbenchListSupportsKeyboardNavigation, WorkbenchListAutomaticKeyboardNavigationKey, WorkbenchListAutomaticKeyboardNavigation, didBindWorkbenchListAutomaticKeyboardNavigation, multiSelectModifierSettingKey, openModeSettingKey, horizontalScrollingKey, keyboardNavigationSettingKey, automaticKeyboardNavigationSettingKey, WorkbenchObjectTree, WorkbenchDataTree, WorkbenchAsyncDataTree, WorkbenchCompressibleAsyncDataTree */ /*! exports used: IListService, ListService, WorkbenchAsyncDataTree, WorkbenchListFocusContextKey */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dnd.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dnd.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/keyboardEvent.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2039,11 +2039,11 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/decorators.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/errors.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/filters.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/filters.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickCommand.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/iterator.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/map.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/numbers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/numbers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/platform.js (<- Module uses injected variables (process, global)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.js */ @@ -2093,7 +2093,7 @@ /*! exports provided: MarkerController, NextMarkerAction */ /*! all exports used */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/dom.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/contextmenu/contextmenu.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/arrays.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/color.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2101,7 +2101,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/event.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/labels.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/severity.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2113,7 +2113,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */function(e,t,n){"use strict";n.r(t),n.d(t,"MarkerController",(function(){return q})),n.d(t,"NextMarkerAction",(function(){return Y}));var i,o=n("3/fG"),r=n("MI8n"),s=n("pmY6"),a=n("T8No"),u=n("tADe"),l=n("aokT"),c=n("sswD"),d=n("t9D7"),h=n("wQH0"),p=(n("/oaI"),n("EffR")),f=n("MD5Z"),g=n("zrhQ"),m=n("GJhM"),v=n("3rx1"),_=n("6OMU"),b=n("iNS8"),y=n("gslv"),C=n("S3by");(i||(i={})).className=function(e){switch(e){case C.a.Ignore:return"severity-ignore codicon-info";case C.a.Info:return"codicon-info";case C.a.Warning:return"codicon-warning";case C.a.Error:return"codicon-error"}return""},Object(d.e)((function(e,t){var n=e.getColor(f.Pb);n&&t.addRule("\n\t\t\t.monaco-editor .zone-widget .codicon-error,\n\t\t\t.markers-panel .marker-icon.codicon-error,\n\t\t\t.extensions-viewlet > .extensions .codicon-error,\n\t\t\t.monaco-dialog-box .dialog-message-row .codicon-error {\n\t\t\t\tcolor: "+n+";\n\t\t\t}\n\t\t");var i=e.getColor(f.Rb);n&&t.addRule("\n\t\t\t.monaco-editor .zone-widget .codicon-warning,\n\t\t\t.markers-panel .marker-icon.codicon-warning,\n\t\t\t.extensions-viewlet > .extensions .codicon-warning,\n\t\t\t.extension-editor .codicon-warning,\n\t\t\t.monaco-dialog-box .dialog-message-row .codicon-warning {\n\t\t\t\tcolor: "+i+";\n\t\t\t}\n\t\t");var o=e.getColor(f.Qb);n&&t.addRule("\n\t\t\t.monaco-editor .zone-widget .codicon-info,\n\t\t\t.markers-panel .marker-icon.codicon-info,\n\t\t\t.extensions-viewlet > .extensions .codicon-info,\n\t\t\t.extension-editor .codicon-info,\n\t\t\t.monaco-dialog-box .dialog-message-row .codicon-info {\n\t\t\t\tcolor: "+o+";\n\t\t\t}\n\t\t")}));var w,S=(w=function(e,t){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),O=function(){function e(e,t,n,i){var o=this;this._openerService=i,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new s.b,this._editor=t;var r=document.createElement("div");r.className="descriptioncontainer",r.setAttribute("aria-live","assertive"),r.setAttribute("role","alert"),this._messageBlock=document.createElement("div"),p.f(this._messageBlock,"message"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(p.o(this._relatedBlock,"click",(function(e){e.preventDefault();var t=o._relatedDiagnostics.get(e.target);t&&n(t)}))),this._scrollable=new m.b(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((function(e){r.style.left="-"+e.scrollLeft+"px",r.style.top="-"+e.scrollTop+"px"}))),this._disposables.add(this._scrollable)}return e.prototype.dispose=function(){Object(s.f)(this._disposables)},e.prototype.update=function(e){var t=this,n=e.source,i=e.message,o=e.relatedInformation,r=e.code,s=((null==n?void 0:n.length)||0)+"()".length;r&&(s+="string"==typeof r?r.length:r.value.length);var a=i.split(/\r\n|\r|\n/g);this._lines=a.length,this._longestLineLength=0;for(var u=0,l=a;u1?o.a("problems","{0} of {1} problems",n,r):o.a("change","{0} of {1} problem",n,r);this.setTitle(Object(y.b)(d.uri),h)}this._icon.className="codicon "+i.className(u.c.toSeverity(this._severity)),this.editor.revealPositionInCenter(c,0),this.editor.focus()},t.prototype.updateMarker=function(e){this._container.classList.remove("stale"),this._message.update(e)},t.prototype.showStale=function(){this._container.classList.add("stale"),this._relayout()},t.prototype._doLayoutBody=function(t,n){e.prototype._doLayoutBody.call(this,t,n),this._heightInPixel=t,this._message.layout(t,n),this._container.style.height=t+"px"},t.prototype._onWidth=function(e){this._message.layout(this._heightInPixel,e)},t.prototype._relayout=function(){e.prototype._relayout.call(this,this.computeRequiredHeight())},t.prototype.computeRequiredHeight=function(){return 3+this._message.getHeightInLines()},t}(b.c),D=Object(f.Kb)(f.q,f.p),x=Object(f.Kb)(f.P,f.O),N=Object(f.Kb)(f.H,f.G),k=Object(f.Tb)("editorMarkerNavigationError.background",{dark:D,light:D,hc:D},o.a("editorMarkerNavigationError","Editor marker navigation widget error color.")),E=Object(f.Tb)("editorMarkerNavigationWarning.background",{dark:x,light:x,hc:x},o.a("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),I=Object(f.Tb)("editorMarkerNavigationInfo.background",{dark:N,light:N,hc:N},o.a("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),M=Object(f.Tb)("editorMarkerNavigation.background",{dark:"#2D2D30",light:g.a.white,hc:"#0C141F"},o.a("editorMarkerNavigationBackground","Editor marker navigation widget background."));Object(d.e)((function(e,t){var n=e.getColor(f.ec);n&&(t.addRule(".monaco-editor .marker-widget a { color: "+n+"; }"),t.addRule(".monaco-editor .marker-widget a.code-link span:hover { color: "+n+"; }"))}));var T=n("N0LK"),P=n("Vxe3"),R=n("/cxE"),A=n("fjLI"),F=n("8HAY"),j=n("bexQ"),W=n("W9cx"),V=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),B=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},H=function(e,t){return function(n,i){t(n,i,e)}},z=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((i=i.apply(e,t||[])).next())}))},U=function(e,t){var n,i,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]=0?this._markers[this._nextIdx]:void 0;this._markers=e||[],this._markers.sort(G.compareMarker),this._nextIdx=t?Math.max(-1,Object(_.c)(this._markers,t,G.compareMarker)):-1,this._onMarkerSetChanged.fire(this)},e.prototype.withoutWatchingEditorPosition=function(e){this._ignoreSelectionChange=!0;try{e()}finally{this._ignoreSelectionChange=!1}},e.prototype._initIdx=function(e){for(var t=!1,n=this._editor.getPosition(),i=0;i0?this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length:i=!0),n!==this._nextIdx){var o=this._markers[this._nextIdx];this._onCurrentMarkerChanged.fire(o)}return i},e.prototype.canNavigate=function(){return this._markers.length>0},e.prototype.findMarkerAtPosition=function(e){return Object(_.h)(this._markers,(function(t){return l.a.containsPosition(t,e)}))},Object.defineProperty(e.prototype,"total",{get:function(){return this._markers.length},enumerable:!0,configurable:!0}),e.prototype.indexOf=function(e){return 1+this._markers.indexOf(e)},e.prototype.dispose=function(){this._toUnbind.dispose()},e}(),q=function(){function e(e,t,n,i,o,r,a){this._markerService=t,this._contextKeyService=n,this._themeService=i,this._editorService=o,this._keybindingService=r,this._openerService=a,this._model=null,this._widget=null,this._disposeOnClose=new s.b,this._editor=e,this._widgetVisible=J.bindTo(this._contextKeyService)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){this._cleanUp(),this._disposeOnClose.dispose()},e.prototype._cleanUp=function(){this._widgetVisible.reset(),this._disposeOnClose.clear(),this._widget=null,this._model=null},e.prototype.getOrCreateModel=function(){var e=this;if(this._model)return this._model;var t=this._getMarkers();this._model=new K(this._editor,t),this._markerService.onMarkerChanged(this._onMarkerChanged,this,this._disposeOnClose);var n=this._keybindingService.lookupKeybinding(Z.ID),i=this._keybindingService.lookupKeybinding(Y.ID),o=[new F.a(Y.ID,Y.LABEL+(i?" ("+i.getLabel()+")":""),"show-next-problem codicon-chevron-down",this._model.canNavigate(),(function(){return z(e,void 0,void 0,(function(){return U(this,(function(e){return this._model&&this._model.move(!0,!0),[2]}))}))})),new F.a(Z.ID,Z.LABEL+(n?" ("+n.getLabel()+")":""),"show-previous-problem codicon-chevron-up",this._model.canNavigate(),(function(){return z(e,void 0,void 0,(function(){return U(this,(function(e){return this._model&&this._model.move(!1,!0),[2]}))}))}))];this._widget=new L(this._editor,o,this._themeService,this._openerService),this._widgetVisible.set(!0),this._widget.onDidClose((function(){return e.closeMarkersNavigation()}),this,this._disposeOnClose),this._disposeOnClose.add(this._model),this._disposeOnClose.add(this._widget);for(var r=0,s=o;re.length)return!1;for(var o=0;o=65&&r<=90&&r+32===s||s>=65&&s<=90&&s+32===r))return!1}return!0},e.prototype._createOperationsForBlockComment=function(t,n,i,o,r,s){var a,u=t.startLineNumber,l=t.startColumn,d=t.endLineNumber,h=t.endColumn,p=r.getLineContent(u),f=r.getLineContent(d),g=p.lastIndexOf(n,l-1+n.length),m=f.indexOf(i,h-1-i.length);if(-1!==g&&-1!==m)if(u===d){p.substring(g+n.length,m).indexOf(i)>=0&&(g=-1,m=-1)}else{var v=p.substring(g+n.length),_=f.substring(0,m);(v.indexOf(i)>=0||_.indexOf(i)>=0)&&(g=-1,m=-1)}-1!==g&&-1!==m?(o&&g+n.length0&&32===f.charCodeAt(m-1)&&(i=" "+i,m-=1),a=e._createRemoveBlockCommentOperations(new c.a(u,g+n.length+1,d,m+1),n,i)):(a=e._createAddBlockCommentOperations(t,n,i,this._insertSpace),this._usedEndToken=1===a.length?i:null);for(var b=0,y=a;ba?r-1:r}},e}(),m=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),v=function(e){function t(t,n){var i=e.call(this,n)||this;return i._type=t,i}return m(t,e),t.prototype.run=function(e,t){if(t.hasModel()){for(var n=t.getModel(),i=[],o=t.getSelections(),r=n.getOptions(),s=t.getOption(13),a=0,u=o;ae.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)},enumerable:!0,configurable:!0}),e.prototype.selectNextColorPresentation=function(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)},e.prototype.guessColorPresentation=function(e,t){for(var n=0;n0,n&&i)?e:void 0;var t,n,i}),(function(e){Object(F.f)(e)}))}));return Promise.all(i).then(A.d)}Object(a.k)("_executeHoverProvider",(function(e,t){return j(e,t,h.a.None)}));var W=n("X+cX"),V=function(){function e(e,t,n,i,o){var r=this;this._computer=e,this._state=0,this._hoverTime=o,this._firstWaitScheduler=new W.d((function(){return r._triggerAsyncComputation()}),0),this._secondWaitScheduler=new W.d((function(){return r._triggerSyncComputation()}),0),this._loadingMessageScheduler=new W.d((function(){return r._showLoadingMessage()}),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=t,this._errorCallback=n,this._progressCallback=i}return e.prototype.setHoverTime=function(e){this._hoverTime=e},e.prototype._firstWaitTime=function(){return this._hoverTime/2},e.prototype._secondWaitTime=function(){return this._hoverTime/2},e.prototype._loadingMessageTime=function(){return 3*this._hoverTime},e.prototype._triggerAsyncComputation=function(){var e=this;this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=Object(W.f)((function(t){return e._computer.computeAsync(t)})),this._asyncComputationPromise.then((function(t){e._asyncComputationPromiseDone=!0,e._withAsyncResult(t)}),(function(t){return e._onError(t)}))):this._asyncComputationPromiseDone=!0},e.prototype._triggerSyncComputation=function(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))},e.prototype._showLoadingMessage=function(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())},e.prototype._withAsyncResult=function(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))},e.prototype._onComplete=function(e){this._completeCallback&&this._completeCallback(e)},e.prototype._onError=function(e){this._errorCallback?this._errorCallback(e):Object(F.e)(e)},e.prototype._onProgress=function(e){this._progressCallback&&this._progressCallback(e)},e.prototype.start=function(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}},e.prototype.cancel=function(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0},e}(),B=n("GJhM"),H=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),z=function(){for(var e=0,t=0,n=arguments.length;tthis._editor.getModel().getLineCount())return[];var i=b.ColorDetector.get(this._editor),o=t.getLineMaxColumn(n),r=this._editor.getLineDecorations(n),s=!1,a=this._range,l=r.map((function(r){var l=r.range.startLineNumber===n?r.range.startColumn:1,c=r.range.endLineNumber===n?r.range.endColumn:o;if(l>a.startColumn||a.endColumn>c)return null;var d=new u.a(a.startLineNumber,l,a.startLineNumber,c),h=e._markerDecorationsService.getMarker(t,r);if(h)return new oe(d,h);var p=i.getColorData(r.range.getStartPosition());if(!s&&p){s=!0;var g=p.colorInfo,m=g.color,v=g.range;return new ie(v,m,p.provider)}return Object(f.b)(r.options.hoverMessage)?null:{contents:r.options.hoverMessage?Object(A.b)(r.options.hoverMessage):[],range:d}}));return Object(A.d)(l)},e.prototype.onResult=function(e,t){this._result=t?e.concat(this._result.sort((function(e,t){return e instanceof ie?-1:t instanceof ie?1:0}))):this._result.concat(e)},e.prototype.getResult=function(){return this._result.slice(0)},e.prototype.getResultWithLoadingMessage=function(){return this._result.slice(0).concat([this._getLoadingMessage()])},e.prototype._getLoadingMessage=function(){return{range:this._range,contents:[(new f.a).appendText(o.a("modesContentHover.loading","Loading..."))]}},e}(),se={type:2,filter:{include:$.b.QuickFix}},ae=function(e){function t(n,i,o,r,a,u){void 0===u&&(u=Z.b);var l=e.call(this,t.ID,n)||this;return l._themeService=o,l._keybindingService=r,l._modeService=a,l._openerService=u,l.renderDisposable=l._register(new s.d),l._messages=[],l._lastRange=null,l._computer=new re(l._editor,i),l._highlightDecorations=[],l._isChangingDecorations=!1,l._shouldFocus=!1,l._colorPicker=null,l._hoverOperation=new V(l._computer,(function(e){return l._withResult(e,!0)}),null,(function(e){return l._withResult(e,!1)}),l._editor.getOption(44).delay),l._register(d.o(l.getDomNode(),d.d.FOCUS,(function(){l._colorPicker&&d.f(l.getDomNode(),"colorpicker-hover")}))),l._register(d.o(l.getDomNode(),d.d.BLUR,(function(){d.P(l.getDomNode(),"colorpicker-hover")}))),l._register(n.onDidChangeConfiguration((function(e){l._hoverOperation.setHoverTime(l._editor.getOption(44).delay)}))),l._register(v.B.onDidChange((function(e){l.isVisible&&l._lastRange&&l._messages.length>0&&(l._domNode.textContent="",l._renderMessages(l._lastRange,l._messages))}))),l}return ee(t,e),t.prototype.dispose=function(){this._hoverOperation.cancel(),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))},t.prototype.startShowingAt=function(e,t,n){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition&&this._showAtPosition.lineNumber===e.startLineNumber){for(var i=[],o=0,r=this._messages.length;o=e.endColumn&&i.push(s)}if(i.length>0){if(function(e,t){if(!e&&t||e&&!t||e.length!==t.length)return!1;for(var n=0;n0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()},t.prototype._renderMessages=function(e,n){var i=this;this.renderDisposable.dispose(),this._colorPicker=null;var o=1073741824,r=n[0].range?u.a.lift(n[0].range):null,a=document.createDocumentFragment(),l=!0,c=!1,m=new s.b,v=[];if(n.forEach((function(e){if(e.range)if(o=Math.min(o,e.range.startColumn),r=r?u.a.plusRange(r,e.range):u.a.lift(e.range),e instanceof ie){c=!0;var t=e.color,n=t.red,g=t.green,b=t.blue,y=t.alpha,w=new p.c(Math.round(255*n),Math.round(255*g),Math.round(255*b),y),S=new p.a(w);if(!i._editor.hasModel())return;var O=i._editor.getModel(),L=new u.a(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn),D={range:e.range,color:e.color},x=new C(S,[],0),N=new R(a,x,i._editor.getOption(105),i._themeService);Object(_.a)(O,D,e.provider,h.a.None).then((function(t){if(x.colorPresentations=t||[],i._editor.hasModel()){var n=i._editor.getModel().getValueInRange(e.range);x.guessColorPresentation(S,n);var o=function(){var e,t;x.presentation.textEdit?(e=[x.presentation.textEdit],t=(t=new u.a(x.presentation.textEdit.range.startLineNumber,x.presentation.textEdit.range.startColumn,x.presentation.textEdit.range.endLineNumber,x.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber,t.startColumn+x.presentation.textEdit.text.length)):(e=[{identifier:null,range:L,text:x.presentation.label,forceMoveMarkers:!1}],t=L.setEndPosition(L.endLineNumber,L.startColumn+x.presentation.label.length)),i._editor.pushUndoStop(),i._editor.executeEdits("colorpicker",e),x.presentation.additionalTextEdits&&(e=te(x.presentation.additionalTextEdits),i._editor.executeEdits("colorpicker",e),i.hide()),i._editor.pushUndoStop(),L=t},r=function(t){return Object(_.a)(O,{range:L,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},e.provider,h.a.None).then((function(e){x.colorPresentations=e||[]}))},l=x.onColorFlushed((function(e){r(e).then(o)})),c=x.onDidChangeColor(r);i._colorPicker=N,i.showAt(L.getStartPosition(),L,i._shouldFocus),i.updateContents(a),i._colorPicker.layout(),i.renderDisposable.value=Object(s.e)(l,c,N,m)}}))}else e instanceof oe?(v.push(e),l=!1):e.contents.filter((function(e){return!Object(f.b)(e)})).forEach((function(e){var t=ne("div.hover-row.markdown-hover"),n=d.q(t,ne("div.hover-contents")),o=m.add(new q.a(i._editor,i._modeService,i._openerService));m.add(o.onDidRenderCodeBlock((function(){n.className="hover-contents code-hover-contents",i.onContentsChange()})));var r=m.add(o.render(e));n.appendChild(r.element),a.appendChild(t),l=!1}))})),v.length){v.forEach((function(e){return a.appendChild(i.renderMarkerHover(e))}));var b=1===v.length?v[0]:v.sort((function(e,t){return G.c.compare(e.marker.severity,t.marker.severity)}))[0];a.appendChild(this.renderMarkerStatusbar(b))}c||l||(this.showAt(new g.a(e.startLineNumber,o),r,this._shouldFocus),this.updateContents(a)),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,r?[{range:r,options:t._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1},t.prototype.renderMarkerHover=function(e){var t=this,n=ne("div.hover-row"),i=d.q(n,ne("div.marker.hover-contents")),o=e.marker,r=o.source,s=o.message,a=o.code,u=o.relatedInformation;this._editor.applyFontInfo(i);var l=d.q(i,ne("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=s,r||a)if("string"==typeof a)(c=d.q(i,ne("span"))).style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=r&&a?r+"("+a+")":r||"("+a+")";else if(a){var c,h=ne("span");if(r)d.q(h,ne("span")).innerText=r;this._codeLink=d.q(h,ne("a.code-link")),this._codeLink.setAttribute("href",a.link.toString()),this._codeLink.onclick=function(e){t._openerService.open(a.link),e.preventDefault(),e.stopPropagation()},d.q(this._codeLink,ne("span")).innerText=a.value,(c=d.q(i,h)).style.opacity="0.6",c.style.paddingLeft="6px"}if(Object(A.q)(u))for(var p=function(e,n,o,r){var s=d.q(i,ne("div"));s.style.marginTop="8px";var a=d.q(s,ne("a"));a.innerText=Object(Y.b)(n)+"("+o+", "+r+"): ",a.style.cursor="pointer",a.onclick=function(e){e.stopPropagation(),e.preventDefault(),t._openerService&&t._openerService.open(n.with({fragment:o+","+r}),{fromUserGesture:!0}).catch(F.e)};var u=d.q(s,ne("span"));u.innerText=e,f._editor.applyFontInfo(u)},f=this,g=0,m=u;g0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()},t.prototype._renderMessages=function(e,t){this._renderDisposeables.clear();for(var n=document.createDocumentFragment(),i=0,o=t;i=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},me=function(e,t){return function(n,i){t(n,i,e)}},ve=function(){function e(e,t,n,i,o,r){var a=this;this._editor=e,this._openerService=t,this._modeService=n,this._markerDecorationsService=i,this._keybindingService=o,this._themeService=r,this._toUnhook=new s.b,this._contentWidget=new s.d,this._glyphWidget=new s.d,this._isMouseDown=!1,this._hoverClicked=!1,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((function(e){e.hasChanged(44)&&(a._hideWidgets(),a._unhookEvents(),a._hookEvents())}))}return Object.defineProperty(e.prototype,"contentWidget",{get:function(){return this._contentWidget.value||this._createHoverWidgets(),this._contentWidget.value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"glyphWidget",{get:function(){return this._glyphWidget.value||this._createHoverWidgets(),this._glyphWidget.value},enumerable:!0,configurable:!0}),e.get=function(t){return t.getContribution(e.ID)},e.prototype._hookEvents=function(){var e=this,t=function(){return e._hideWidgets()},n=this._editor.getOption(44);this._isHoverEnabled=n.enabled,this._isHoverSticky=n.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((function(t){return e._onEditorMouseDown(t)}))),this._toUnhook.add(this._editor.onMouseUp((function(t){return e._onEditorMouseUp(t)}))),this._toUnhook.add(this._editor.onMouseMove((function(t){return e._onEditorMouseMove(t)}))),this._toUnhook.add(this._editor.onKeyDown((function(t){return e._onKeyDown(t)}))),this._toUnhook.add(this._editor.onDidChangeModelDecorations((function(){return e._onModelDecorationsChanged()})))):this._toUnhook.add(this._editor.onMouseMove(t)),this._toUnhook.add(this._editor.onMouseLeave(t)),this._toUnhook.add(this._editor.onDidChangeModel(t)),this._toUnhook.add(this._editor.onDidScrollChange((function(t){return e._onEditorScrollChanged(t)})))},e.prototype._unhookEvents=function(){this._toUnhook.clear()},e.prototype._onModelDecorationsChanged=function(){this.contentWidget.onModelDecorationsChanged(),this.glyphWidget.onModelDecorationsChanged()},e.prototype._onEditorScrollChanged=function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()},e.prototype._onEditorMouseDown=function(e){this._isMouseDown=!0;var t=e.target.type;9!==t||e.target.detail!==ae.ID?12===t&&e.target.detail===ce.ID||(12!==t&&e.target.detail!==ce.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0},e.prototype._onEditorMouseUp=function(e){this._isMouseDown=!1},e.prototype._onEditorMouseMove=function(e){var t=e.target.type;if(!(this._isMouseDown&&this._hoverClicked&&this.contentWidget.isColorPickerVisible()||this._isHoverSticky&&9===t&&e.target.detail===ae.ID||this._isHoverSticky&&12===t&&e.target.detail===ce.ID)){if(7===t){var n=this._editor.getOption(34).typicalHalfwidthCharacterWidth/2,i=e.target.detail;i&&!i.isAfterLines&&"number"==typeof i.horizontalDistanceToText&&i.horizontalDistanceToText=0;t--)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e.prototype.redo=function(e){for(var t=0;t0){var e=this.past.pop();try{e.undo(this.model)}catch(e){return Object(i.e)(e),this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.canUndo=function(){return this.past.length>0||null!==this.currentOpenStackElement},e.prototype.redo=function(){if(this.future.length>0){var e=this.future.pop();try{e.redo(this.model)}catch(e){return Object(i.e)(e),this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e.prototype.canRedo=function(){return this.future.length>0},e}(),v=function(){this.spacesDiff=0,this.looksLikeAlignment=!1};function _(e,t,n,i,o){var r;for(o.spacesDiff=0,o.looksLikeAlignment=!1,r=0;r0&&a>0||l>0&&c>0)){var d=Math.abs(a-c),h=Math.abs(s-l);if(0===d)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?o++:m>1&&r++,_(s,a,h,g,l),!l.looksLikeAlignment||n&&t===l.spacesDiff)){var S=l.spacesDiff;S<=8&&u[S]++,s=h,a=g}}var O=n;o!==r&&(O=oD&&(D=t,L=e)})),4===L&&u[4]>0&&u[2]>0&&u[2]>=u[4]/2&&(L=2)}return{insertSpaces:O,tabSize:L}}function y(e){return(1&e.metadata)>>>0}function C(e,t){e.metadata=254&e.metadata|t<<0}function w(e){return(2&e.metadata)>>>1==1}function S(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function O(e){return(4&e.metadata)>>>2==1}function L(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function D(e){return(8&e.metadata)>>>3==1}function x(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function N(e,t){e.metadata=207&e.metadata|t<<4}function k(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}var E=function(){function e(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,C(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,L(this,!1),N(this,1),x(this,!1),k(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,S(this,!1)}return e.prototype.reset=function(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;L(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),N(this,this.options.stickiness),x(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),k(this,this.options.collapseOnReplaceEdit)},e.prototype.setCachedOffsets=function(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),I=new E(null,0,0);I.parent=I,I.left=I,I.right=I,C(I,0);var M=function(){function e(){this.root=I,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,t,n,i,o){return this.root===I?[]:function(e,t,n,i,o,r){var s=e.root,a=0,u=0,l=0,c=[],d=0;for(;s!==I;)if(w(s))S(s.left,!1),S(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!w(s.left)){if(a+s.maxEndn)S(s,!0);else{if((l=a+s.end)>=t){s.setCachedOffsets(u,l,r);var h=!0;i&&s.ownerId&&s.ownerId!==i&&(h=!1),o&&O(s)&&(h=!1),h&&(c[d++]=s)}S(s,!0),s.right===I||w(s.right)||(a+=s.delta,s=s.right)}}return S(e.root,!1),c}(this,e,t,n,i,o)},e.prototype.search=function(e,t,n){return this.root===I?[]:function(e,t,n,i){var o=e.root,r=0,s=0,a=0,u=[],l=0;for(;o!==I;)if(w(o))S(o.left,!1),S(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;else if(o.left===I||w(o.left)){s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,i);var c=!0;t&&o.ownerId&&o.ownerId!==t&&(c=!1),n&&O(o)&&(c=!1),c&&(u[l++]=o),S(o,!0),o.right===I||w(o.right)||(r+=o.delta,o=o.right)}else o=o.left;return S(e.root,!1),u}(this,e,t,n)},e.prototype.collectNodesFromOwner=function(e){return function(e,t){var n=e.root,i=[],o=0;for(;n!==I;)w(n)?(S(n.left,!1),S(n.right,!1),n=n.parent):n.left===I||w(n.left)?(n.ownerId===t&&(i[o++]=n),S(n,!0),n.right===I||w(n.right)||(n=n.right)):n=n.left;return S(e.root,!1),i}(this,e)},e.prototype.collectNodesPostOrder=function(){return function(e){var t=e.root,n=[],i=0;for(;t!==I;)w(t)?(S(t.left,!1),S(t.right,!1),t=t.parent):t.left===I||w(t.left)?t.right===I||w(t.right)?(n[i++]=t,S(t,!0)):t=t.right:t=t.left;return S(e.root,!1),n}(this)},e.prototype.insert=function(e){R(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){A(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){for(var n=e,i=0;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;var o=n.start+i,r=n.end+i;n.setCachedOffsets(o,r,t)},e.prototype.acceptReplace=function(e,t,n,i){for(var o=function(e,t,n){var i=e.root,o=0,r=0,s=0,a=[],u=0;for(;i!==I;)if(w(i))S(i.left,!1),S(i.right,!1),i===i.parent.right&&(o-=i.parent.delta),i=i.parent;else{if(!w(i.left)){if(o+i.maxEndn?S(i,!0):((s=o+i.end)>=t&&(i.setCachedOffsets(r,s,0),a[u++]=i),S(i,!0),i.right===I||w(i.right)||(o+=i.delta,i=i.right))}return S(e.root,!1),a}(this,e,e+t),r=0,s=o.length;rn?(o.start+=s,o.end+=s,o.delta+=s,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),S(o,!0)):(S(o,!0),o.right===I||w(o.right)||(r+=o.delta,o=o.right))}S(e.root,!1)}(this,e,e+t,n),this._normalizeDeltaIfNecessary();for(r=0,s=o.length;rn)&&(1!==i&&(2===i||t))}function P(e,t,n,i,o){var r=function(e){return(48&e.metadata)>>>4}(e),s=0===r||2===r,a=1===r||2===r,u=n-t,l=i,c=Math.min(u,l),d=e.start,h=!1,p=e.end,f=!1;t<=d&&p<=n&&function(e){return(64&e.metadata)>>>6==1}(e)&&(e.start=t,h=!0,e.end=t,f=!0);var g=o?1:u>0?2:0;if(!h&&T(d,s,t,g)&&(h=!0),!f&&T(p,a,t,g)&&(f=!0),c>0&&!o){g=u>l?2:0;!h&&T(d,s,t+c,g)&&(h=!0),!f&&T(p,a,t+c,g)&&(f=!0)}g=o?1:0;!h&&T(d,s,n,g)&&(e.start=t+l,h=!0),!f&&T(p,a,n,g)&&(e.end=t+l,f=!0);var m=l-u;h||(e.start=Math.max(0,d+m)),f||(e.end=Math.max(0,p+m)),e.start>e.end&&(e.end=e.start)}function R(e,t){if(e.root===I)return t.parent=I,t.left=I,t.right=I,C(t,0),e.root=t,e.root;!function(e,t){var n=0,i=e.root,o=t.start,r=t.end;for(;;){if(z(o,r,i.start+n,i.end+n)<0){if(i.left===I){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===I){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}}t.parent=i,t.left=I,t.right=I,C(t,1)}(e,t),H(t.parent);for(var n=t;n!==e.root&&1===y(n.parent);){var i;if(n.parent===n.parent.parent.left)1===y(i=n.parent.parent.right)?(C(n.parent,0),C(i,0),C(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&j(e,n=n.parent),C(n.parent,0),C(n.parent.parent,1),W(e,n.parent.parent));else 1===y(i=n.parent.parent.left)?(C(n.parent,0),C(i,0),C(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&W(e,n=n.parent),C(n.parent,0),C(n.parent.parent,1),j(e,n.parent.parent))}return C(e.root,0),t}function A(e,t){var n,i;if(t.left===I?(i=t,(n=t.right).delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===I?(n=t.left,i=t):((n=(i=function(e){for(;e.left!==I;)e=e.left;return e}(t.right)).right).start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,C(n,0),t.detach(),F(),B(n),void(e.root.parent=I);var o,r=1===y(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,C(i,y(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==I&&(i.left.parent=i),i.right!==I&&(i.right.parent=i)),t.detach(),r)return H(n.parent),i!==t&&(H(i),H(i.parent)),void F();for(H(n),H(n.parent),i!==t&&(H(i),H(i.parent));n!==e.root&&0===y(n);)n===n.parent.left?(1===y(o=n.parent.right)&&(C(o,0),C(n.parent,1),j(e,n.parent),o=n.parent.right),0===y(o.left)&&0===y(o.right)?(C(o,1),n=n.parent):(0===y(o.right)&&(C(o.left,0),C(o,1),W(e,o),o=n.parent.right),C(o,y(n.parent)),C(n.parent,0),C(o.right,0),j(e,n.parent),n=e.root)):(1===y(o=n.parent.left)&&(C(o,0),C(n.parent,1),W(e,n.parent),o=n.parent.left),0===y(o.left)&&0===y(o.right)?(C(o,1),n=n.parent):(0===y(o.left)&&(C(o.right,0),C(o,1),j(e,o),o=n.parent.left),C(o,y(n.parent)),C(n.parent,0),C(o.left,0),W(e,n.parent),n=e.root));C(n,0),F()}function F(){I.parent=I,I.delta=0,I.start=0,I.end=0}function j(e,t){var n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==I&&(n.left.parent=t),n.parent=t.parent,t.parent===I?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,B(t),B(n)}function W(e,t){var n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==I&&(n.right.parent=t),n.parent=t.parent,t.parent===I?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,B(t),B(n)}function V(e){var t=e.end;if(e.left!==I){var n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==I){var i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function B(e){e.maxEnd=V(e)}function H(e){for(;e!==I;){var t=V(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function z(e,t,n,i){return e===n?t-i:e-n}var U=function(){function e(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}return e.prototype.next=function(){if(this.right!==K)return q(this.right);for(var e=this;e.parent!==K&&e.parent.left!==e;)e=e.parent;return e.parent===K?K:e.parent},e.prototype.prev=function(){if(this.left!==K)return G(this.left);for(var e=this;e.parent!==K&&e.parent.right!==e;)e=e.parent;return e.parent===K?K:e.parent},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),K=new U(null,0);function q(e){for(;e.left!==K;)e=e.left;return e}function G(e){for(;e.right!==K;)e=e.right;return e}function Y(e){return e===K?0:e.size_left+e.piece.length+Y(e.right)}function Z(e){return e===K?0:e.lf_left+e.piece.lineFeedCnt+Z(e.right)}function X(){K.parent=K}function Q(e,t){var n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==K&&(n.left.parent=t),n.parent=t.parent,t.parent===K?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function J(e,t){var n=t.left;t.left=n.right,n.right!==K&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===K?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function $(e,t){var n,i;if(n=t.left===K?(i=t).right:t.right===K?(i=t).left:(i=q(t.right)).right,i===e.root)return e.root=n,n.color=0,t.detach(),X(),void(e.root.parent=K);var o=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,ne(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,ne(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==K&&(i.left.parent=i),i.right!==K&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,ne(e,i)),t.detach(),n.parent.left===n){var r=Y(n),s=Z(n);if(r!==n.parent.size_left||s!==n.parent.lf_left){var a=r-n.parent.size_left,u=s-n.parent.lf_left;n.parent.size_left=r,n.parent.lf_left=s,te(e,n.parent,a,u)}}if(ne(e,n.parent),o)X();else{for(var l;n!==e.root&&0===n.color;)n===n.parent.left?(1===(l=n.parent.right).color&&(l.color=0,n.parent.color=1,Q(e,n.parent),l=n.parent.right),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.right.color&&(l.left.color=0,l.color=1,J(e,l),l=n.parent.right),l.color=n.parent.color,n.parent.color=0,l.right.color=0,Q(e,n.parent),n=e.root)):(1===(l=n.parent.left).color&&(l.color=0,n.parent.color=1,J(e,n.parent),l=n.parent.left),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.left.color&&(l.right.color=0,l.color=1,Q(e,l),l=n.parent.left),l.color=n.parent.color,n.parent.color=0,l.left.color=0,J(e,n.parent),n=e.root));n.color=0,X()}}function ee(e,t){for(ne(e,t);t!==e.root&&1===t.parent.color;){var n;if(t.parent===t.parent.parent.left)1===(n=t.parent.parent.right).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Q(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,J(e,t.parent.parent));else 1===(n=t.parent.parent.left).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&J(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Q(e,t.parent.parent))}e.root.color=0}function te(e,t,n,i){for(;t!==e.root&&t!==K;)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function ne(e,t){var n=0,i=0;if(t!==e.root){if(0===n){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;n=Y((t=t.parent).left)-t.size_left,i=Z(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i}for(;t!==e.root&&(0!==n||0!==i);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}K.parent=K,K.left=K,K.right=K,K.color=0;var ie=n("jAJ/");function oe(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}var re=function(e,t,n,i,o){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=o};function se(e,t){void 0===t&&(t=!0);for(var n=[0],i=1,o=0,r=e.length;o=0;t--){var n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null},e.prototype.set=function(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)},e.prototype.valdiate=function(e){for(var t=!1,n=this._cache,i=0;i=e)&&(n[i]=null,t=!0)}if(t){for(var r=[],s=0,a=n;s0){e[o].lineStarts||(e[o].lineStarts=se(e[o].buffer));var s=new ue(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),i=this.rbInsertRight(i,s)}this._searchCache=new ce(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var t=this,n=65535-Math.floor(21845),i=2*n,o="",r=0,s=[];if(this.iterate(this.root,(function(a){var u=t.getNodeContent(a),l=u.length;if(r<=n||r+l0){var a=o.replace(/\r\n|\r|\n/g,e);s.push(new le(a,se(a)))}this.create(s,e,!0)},e.prototype.getEOL=function(){return this._EOL},e.prototype.setEOL=function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)},e.prototype.getOffsetAt=function(e,t){for(var n=0,i=this.root;i!==K;)if(i.left!==K&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e)return(n+=i.size_left)+(this.getAccumulatedValue(i,e-i.lf_left-2)+t-1);e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,n=0,i=e;t!==K;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var o=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+o.index,0===o.index){var r=i-this.getOffsetAt(n+1,1);return new l.a(n+1,r+1)}return new l.a(n+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===K){r=i-e-this.getOffsetAt(n+1,1);return new l.a(n+1,r+1)}t=t.right}return new l.a(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){var n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(o+e.remainder,o+t.remainder)}var r=e.node,s=this._buffers[r.piece.bufferIndex].buffer,a=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start),u=s.substring(a+e.remainder,a+r.piece.length);for(r=r.next();r!==K;){var l=this._buffers[r.piece.bufferIndex].buffer,c=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);if(r===t.node){u+=l.substring(c,c+t.remainder);break}u+=l.substr(c,r.piece.length),r=r.next()}return u},e.prototype.getLinesContent=function(){var e=this,t=[],n=0,i="",o=!1;return this.iterate(this.root,(function(r){if(r===K)return!0;var s=r.piece,a=s.length;if(0===a)return!0;var u=e._buffers[s.bufferIndex].buffer,l=e._buffers[s.bufferIndex].lineStarts,c=s.start.line,d=s.end.line,h=l[c]+s.start.column;if(o&&(10===u.charCodeAt(h)&&(h++,a--),t[n++]=i,i="",o=!1,0===a))return!0;if(c===d)return e._EOLNormalized||13!==u.charCodeAt(h+a-1)?i+=u.substr(h,a):(o=!0,i+=u.substr(h,a-1)),!0;i+=e._EOLNormalized?u.substring(h,Math.max(h,l[c+1]-e._EOLLength)):u.substring(h,l[c+1]).replace(/(\r\n|\r|\n)$/,""),t[n++]=i;for(var p=c+1;p=_)return l;this.positionInBuffer(e,f(h.index)-m,b);var y=this.getLineFeedCnt(e.piece.bufferIndex,o,b),C=b.line===o.line?b.column-o.column+i:b.column+1,w=C+h[0].length;if(d[l++]=Object(ie.d)(new c.a(n+y,C,n+y,w),h,a),f(h.index)+h[0].length>=_)return l;if(l>=u)return l}}while(h);return l},e.prototype.findMatchesLineByLine=function(e,t,n,i){var o=[],r=0,s=new ie.b(t.wordSeparators,t.regex),a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];var u=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===u)return[];var l=this.positionInBuffer(a.node,a.remainder),c=this.positionInBuffer(u.node,u.remainder);if(a.node===u.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,l,c,t,n,i,r,o),o;for(var d=e.startLineNumber,h=a.node;h!==u.node;){var p=this.getLineFeedCnt(h.piece.bufferIndex,l,h.piece.end);if(p>=1){var f=this._buffers[h.piece.bufferIndex].lineStarts,g=this.offsetInBuffer(h.piece.bufferIndex,h.piece.start),m=f[l.line+p],v=d===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(h,s,d,v,l,this.positionInBuffer(h,m-g),t,n,i,r,o))>=i)return o;d+=p}var _=d===e.startLineNumber?e.startColumn-1:0;if(d===e.endLineNumber){var b=this.getLineContent(d).substring(_,e.endColumn-1);return r=this._findMatchesInLine(t,s,b,e.endLineNumber,_,r,o,n,i),o}if((r=this._findMatchesInLine(t,s,this.getLineContent(d).substr(_),d,_,r,o,n,i))>=i)return o;d++,h=(a=this.nodeAt2(d,1)).node,l=this.positionInBuffer(a.node,a.remainder)}if(d===e.endLineNumber){var y=d===e.startLineNumber?e.startColumn-1:0;b=this.getLineContent(d).substring(y,e.endColumn-1);return r=this._findMatchesInLine(t,s,b,e.endLineNumber,y,r,o,n,i),o}var C=d===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(u.node,s,d,C,l,c,t,n,i,r,o),o},e.prototype._findMatchesInLine=function(e,t,n,i,o,r,s,a,u){var l,d=e.wordSeparators;if(!a&&e.simpleSearch){for(var p=e.simpleSearch,f=p.length,g=n.length,m=-f;-1!==(m=n.indexOf(p,m+f));)if((!d||Object(ie.e)(d,n,g,m,f))&&(s[r++]=new h.b(new c.a(i,m+1+o,i,m+1+f+o),null),r>=u))return r;return r}t.reset(0);do{if((l=t.next(n))&&(s[r++]=Object(ie.d)(new c.a(i,l.index+1+o,i,l.index+1+l[0].length+o),l,a),r>=u))return r}while(l);return r},e.prototype.insert=function(e,t,n){if(void 0===n&&(n=!1),this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==K){var i=this.nodeAt(e),o=i.node,r=i.remainder,s=i.nodeStartOffset,a=o.piece,u=a.bufferIndex,l=this.positionInBuffer(o,r);if(0===o.piece.bufferIndex&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.length<65535)return this.appendToNode(o,t),void this.computeBufferMetadata();if(s===e)this.insertContentToNodeLeft(t,o),this._searchCache.valdiate(e);else if(s+o.piece.length>e){var c=[],d=new ue(a.bufferIndex,l,a.end,this.getLineFeedCnt(a.bufferIndex,l,a.end),this.offsetInBuffer(u,a.end)-this.offsetInBuffer(u,l));if(this.shouldCheckCRLF()&&this.endWithCR(t))if(10===this.nodeCharCodeAt(o,r)){var h={line:d.start.line+1,column:0};d=new ue(d.bufferIndex,h,d.end,this.getLineFeedCnt(d.bufferIndex,h,d.end),d.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(o,r-1)){var p=this.positionInBuffer(o,r-1);this.deleteNodeTail(o,p),t="\r"+t,0===o.piece.length&&c.push(o)}else this.deleteNodeTail(o,l);else this.deleteNodeTail(o,l);var f=this.createNewPieces(t);d.length>0&&this.rbInsertRight(o,d);for(var g=o,m=0;m=0;u--)a=this.rbInsertLeft(a,s[u]);this.validateCRLFWithPrevNode(a),this.deleteNodes(n)},e.prototype.insertContentToNodeRight=function(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i,r=1;r=c))break;a=l+1}return n?(n.line=l,n.column=s-d,null):{line:l,column:s-d}},e.prototype.getLineFeedCnt=function(e,t,n){if(0===n.column)return n.line-t.line;var i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;var o=i[n.line+1],r=i[n.line]+n.column;if(o>r+1)return n.line-t.line;var s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?n.line-t.line+1:n.line-t.line},e.prototype.offsetInBuffer=function(e,t){return this._buffers[e].lineStarts[t.line]+t.column},e.prototype.deleteNodes=function(e){for(var t=0;t65535){for(var t=[];e.length>65535;){var n=e.charCodeAt(65534),i=void 0;13===n||n>=55296&&n<=56319?(i=e.substring(0,65534),e=e.substring(65534)):(i=e.substring(0,65535),e=e.substring(65535));var o=se(i);t.push(new ue(this._buffers.length,{line:0,column:0},{line:o.length-1,column:i.length-o[o.length-1]},o.length-1,i.length)),this._buffers.push(new le(i,o))}var r=se(e);return t.push(new ue(this._buffers.length,{line:0,column:0},{line:r.length-1,column:e.length-r[r.length-1]},r.length-1,e.length)),this._buffers.push(new le(e,r)),t}var s=this._buffers[0].buffer.length,a=se(e,!1),u=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===s&&0!==s&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},u=this._lastChangeBufferPos;for(var l=0;l=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),u=this.getAccumulatedValue(n,e-n.lf_left-1),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return l+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:l,nodeStartLineNumber:c-(e-1-n.lf_left)}),s.substring(a+r,a+u-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=s.substring(a+r,a+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,l+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==K;){s=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){u=this.getAccumulatedValue(n,0),a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=s.substring(a,a+u-t)}a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=s.substr(a,n.piece.length),n=n.next()}return i},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,n=0;e!==K;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(r!==o)return{index:r,remainder:0}}return{index:o,remainder:i.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column},e.prototype.deleteNodeTail=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),r=t,s=this.offsetInBuffer(n.bufferIndex,r),a=this.getLineFeedCnt(n.bufferIndex,n.start,r),u=a-i,l=s-o,c=n.length+l;e.piece=new ue(n.bufferIndex,n.start,r,a,c),te(this,e,l,u)},e.prototype.deleteNodeHead=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),r=t,s=this.getLineFeedCnt(n.bufferIndex,r,n.end),a=s-i,u=o-this.offsetInBuffer(n.bufferIndex,r),l=n.length+u;e.piece=new ue(n.bufferIndex,r,n.end,s,l),te(this,e,u,a)},e.prototype.shrinkNode=function(e,t,n){var i=e.piece,o=i.start,r=i.end,s=i.length,a=i.lineFeedCnt,u=t,l=this.getLineFeedCnt(i.bufferIndex,i.start,u),c=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new ue(i.bufferIndex,i.start,u,l,c),te(this,e,c-s,l-a);var d=new ue(i.bufferIndex,n,r,this.getLineFeedCnt(i.bufferIndex,n,r),this.offsetInBuffer(i.bufferIndex,r)-this.offsetInBuffer(i.bufferIndex,n)),h=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(h)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var o=se(t,!1),r=0;re)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;var o={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(o),o}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){for(var n=this.root,i=0;n!==K;)if(n.left!==K&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var o=this.getAccumulatedValue(n,e-n.lf_left-2),r=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,r),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){if((o=this.getAccumulatedValue(n,e-n.lf_left-2))+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i};t-=n.piece.length-o;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==K;){if(n.piece.lineFeedCnt>0){r=this.getAccumulatedValue(n,0);var s=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,r),nodeStartOffset:s}}if(n.piece.length>=t-1)return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)};t-=n.piece.length,n=n.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)},e.prototype.offsetOfNode=function(e){if(!e)return 0;for(var t=e.size_left;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t},e.prototype.shouldCheckCRLF=function(){return!(this._EOLNormalized&&"\n"===this._EOL)},e.prototype.startWithLF=function(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===K||0===e.piece.lineFeedCnt)return!1;var t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;return i!==n.length-1&&(!(n[i+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o))},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==K&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)},e.prototype.validateCRLFWithPrevNode=function(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}},e.prototype.validateCRLFWithNextNode=function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}},e.prototype.fixCRLF=function(e,t){var n,i=[],o=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new ue(e.piece.bufferIndex,e.piece.start,n,s,r),te(this,e,-1,-1),0===e.piece.length&&i.push(e);var a={line:t.piece.start.line+1,column:0},u=t.piece.length-1,l=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new ue(t.piece.bufferIndex,a,t.piece.end,l,u),te(this,t,-1,-1),0===t.piece.length&&i.push(t);var c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(var d=0;d0){v.sort((function(e,t){return t.lineNumber-e.lineNumber})),S=[];u=0;for(var O=v.length;u0&&v[u-1].lineNumber===b)){var L=v[u].oldContent,D=this.getLineContent(b);0!==D.length&&D!==L&&-1===s.q(D)&&S.push(b)}}}return new h.a(C,w,S)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){for(var t=!1,n=e[0].range,i=e[e.length-1].range,o=new c.a(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn),r=n.startLineNumber,s=n.startColumn,a=[],u=0,l=e.length;u0){var h=a.lines.length,p=a.lines[0],f=a.lines[h-1];d=1===h?new c.a(u,l,u,l+p.length):new c.a(u,l,u+h-1,f.length+1)}else d=new c.a(u,l,u,l);n=d.endLineNumber,i=d.endColumn,t.push(d),o=a}return t},e._sortOpsAscending=function(e,t){var n=c.a.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n},e._sortOpsDescending=function(e,t){var n=c.a.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n},e}(),pe=function(){function e(e,t,n,i,o,r,s,a){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=o,this._containsRTL=r,this._isBasicASCII=s,this._normalizeEOL=a}return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var i=0,o=n.length;i=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}},e.prototype._acceptChunk1=function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))},e.prototype._acceptChunk2=function(e){var t=function(e,t){e.length=0,e[0]=0;for(var n=1,i=0,o=0,r=0,s=!0,a=0,u=t.length;a126)&&(s=!1)}var c=new re(oe(e),i,o,r,s);return e.length=0,c}(this._tmpLineStarts,e);this.chunks.push(new le(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=s.i(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new pe(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.isBasicASCII,e)},e.prototype._finish=function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=se(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}(),ge=function(){this.changeType=1},me=function(e,t){this.changeType=2,this.lineNumber=e,this.detail=t},ve=function(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t},_e=function(e,t,n){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n},be=function(){this.changeType=5},ye=function(){function e(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i}return e.prototype.containsEvent=function(e){for(var t=0,n=this.changes.length;t=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++},e.prototype._deleteLines=function(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)},e.prototype._insertLines=function(e,t){if(0!==t){for(var n=[],i=[],o=0;o=0;o--)this._invalidateLine(e.startLineNumber+o-1);this._acceptDeleteRange(e),this._acceptInsertText(new l.a(e.startLineNumber,e.startColumn),t)},e.prototype._acceptDeleteRange=function(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)},e.prototype._acceptInsertText=function(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)},e}(),Ie=function(e){function t(t){var n=e.call(this)||this;return n._isDisposed=!1,n._textModel=t,n._tokenizationStateStore=new Ee,n._tokenizationSupport=null,n._register(Oe.B.onDidChange((function(e){var t=n._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(n._resetTokenizationState(),n._textModel.clearTokens())}))),n._register(n._textModel.onDidChangeRawContentFast((function(e){e.containsEvent(1)&&n._resetTokenizationState()}))),n._register(n._textModel.onDidChangeContentFast((function(e){for(var t=0,i=e.changes.length;t1);){if(this._tokenizeOneInvalidLine(t)>=e)break}this._beginBackgroundTokenization(),this._textModel.setTokens(t.tokens)},t.prototype.tokenizeViewport=function(e,t){var n=new xe.b;this._tokenizeViewport(n,e,t),this._textModel.setTokens(n.tokens)},t.prototype.reset=function(){this._resetTokenizationState(),this._textModel.clearTokens()},t.prototype.forceTokenization=function(e){var t=new xe.b;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)},t.prototype.isCheapToTokenize=function(e){if(!this._tokenizationSupport)return!0;var t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e0&&s>=1;s--){var a=this._textModel.getLineFirstNonWhitespaceColumn(s);if(0!==a&&a=0;s--){l=(h=Me(u,this._tokenizationSupport,o[s],l)).endState}for(var c=t;c<=n;c++){var d=this._textModel.getLineContent(c),h=Me(u,this._tokenizationSupport,d,l);e.add(c,h.tokens),this._tokenizationStateStore.setFakeTokens(c-1),l=h.endState}}},t}(r.a);function Me(e,t,n,o){var r=null;if(t)try{r=t.tokenize2(n,o.clone(),0)}catch(e){Object(i.e)(e)}return r||(r=Object(Le.e)(e.id,n,o,0)),Se.a.convertToEndOffset(r.tokens,n.length),r}var Te=n("0JNc"),Pe=n("cMvZ"),Re=n("BFtn"),Ae=n("EIAu"),Fe=n("746U"),je=n("zrhQ"),We=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function Ve(e){var t=new fe;return t.acceptChunk(e),t.finish()}function Be(e,t){return("string"==typeof e?Ve(e):e).create(t)}var He=0,ze=function(){throw new Error("Invalid change accessor")},Ue=function(e){function t(n,i,r,u){void 0===u&&(u=null);var l=e.call(this)||this;l._onWillDispose=l._register(new o.a),l.onWillDispose=l._onWillDispose.event,l._onDidChangeDecorations=l._register(new $e),l.onDidChangeDecorations=l._onDidChangeDecorations.event,l._onDidChangeLanguage=l._register(new o.a),l.onDidChangeLanguage=l._onDidChangeLanguage.event,l._onDidChangeLanguageConfiguration=l._register(new o.a),l.onDidChangeLanguageConfiguration=l._onDidChangeLanguageConfiguration.event,l._onDidChangeTokens=l._register(new o.a),l.onDidChangeTokens=l._onDidChangeTokens.event,l._onDidChangeOptions=l._register(new o.a),l.onDidChangeOptions=l._onDidChangeOptions.event,l._onDidChangeAttached=l._register(new o.a),l.onDidChangeAttached=l._onDidChangeAttached.event,l._eventEmitter=l._register(new et),He++,l.id="$model"+He,l.isForSimpleWidget=i.isForSimpleWidget,l._associatedResource=null==u?a.a.parse("inmemory://model/"+He):u,l._attachedEditorCount=0,l._buffer=Be(n,i.defaultEOL),l._options=t.resolveOptions(l._buffer,i);var d=l._buffer.getLineCount(),h=l._buffer.getValueLengthInRange(new c.a(1,1,d,l._buffer.getLineLength(d)+1),0);return i.largeFileOptimizations?l._isTooLargeForTokenization=h>t.LARGE_FILE_SIZE_THRESHOLD||d>t.LARGE_FILE_LINE_COUNT_THRESHOLD:l._isTooLargeForTokenization=!1,l._isTooLargeForSyncing=h>t.MODEL_SYNC_LIMIT,l._versionId=1,l._alternativeVersionId=1,l._isDisposed=!1,l._isDisposing=!1,l._languageIdentifier=r||Le.a,l._languageRegistryListener=Pe.a.onDidChange((function(e){e.languageIdentifier.id===l._languageIdentifier.id&&l._onDidChangeLanguageConfiguration.fire({})})),l._instanceId=s.M(He),l._lastDecorationId=0,l._decorations=Object.create(null),l._decorationsTree=new Ke,l._commandManager=new m(l),l._isUndoing=!1,l._isRedoing=!1,l._trimAutoWhitespaceLines=null,l._tokens=new xe.d,l._tokens2=new xe.e,l._tokenization=new Ie(l),l}return We(t,e),t.createFromString=function(e,n,i,o){return void 0===n&&(n=t.DEFAULT_CREATION_OPTIONS),void 0===i&&(i=null),void 0===o&&(o=null),new t(e,n,i,o)},t.resolveOptions=function(e,t){if(t.detectIndentation){var n=b(e,t.tabSize,t.insertSpaces);return new h.e({tabSize:n.tabSize,indentSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new h.e({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})},t.prototype.onDidChangeRawContentFast=function(e){return this._eventEmitter.fastEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeRawContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeContentFast=function(e){return this._eventEmitter.fastEvent((function(t){return e(t.contentChangedEvent)}))},t.prototype.onDidChangeContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.contentChangedEvent)}))},t.prototype.dispose=function(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,e.prototype.dispose.call(this),this._isDisposing=!1},t.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!")},t.prototype._emitContentChangedEvent=function(e,t){this._isDisposing||this._eventEmitter.fire(new Ce(e,t))},t.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=Be(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}},t.prototype._createContentChanged2=function(e,t,n,i,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}},t.prototype.setValueFromTextBuffer=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),o=this.getLineMaxColumn(i);this._buffer=e,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new Ke,this._commandManager=new m(this),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new ye([new ge],this._versionId,!1,!1),this._createContentChanged2(new c.a(1,1,i,o),0,n,this.getValue(),!1,!1,!0))}},t.prototype.setEOL=function(e){this._assertNotDisposed();var t=1===e?"\r\n":"\n";if(this._buffer.getEOL()!==t){var n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new ye([new be],this._versionId,!1,!1),this._createContentChanged2(new c.a(1,1,o,r),0,i,this.getValue(),!1,!1,!1))}},t.prototype._onBeforeEOLChange=function(){var e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)},t.prototype._onAfterEOLChange=function(){for(var e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder(),n=0,i=t.length;n0},t.prototype.getAttachedEditorCount=function(){return this._attachedEditorCount},t.prototype.isTooLargeForSyncing=function(){return this._isTooLargeForSyncing},t.prototype.isTooLargeForTokenization=function(){return this._isTooLargeForTokenization},t.prototype.isDisposed=function(){return this._isDisposed},t.prototype.isDominatedByLongLines=function(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;for(var e=0,t=0,n=this._buffer.getLineCount(),i=1;i<=n;i++){var o=this._buffer.getLineLength(i);o>=1e4?t+=o:e+=o}return t>e},Object.defineProperty(t.prototype,"uri",{get:function(){return this._associatedResource},enumerable:!0,configurable:!0}),t.prototype.getOptions=function(){return this._assertNotDisposed(),this._options},t.prototype.getFormattingOptions=function(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}},t.prototype.updateOptions=function(e){this._assertNotDisposed();var t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.indentSize?e.indentSize:this._options.indentSize,i=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=new h.e({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o});if(!this._options.equals(r)){var s=this._options.createChangeEvent(r);this._options=r,this._onDidChangeOptions.fire(s)}},t.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var n=b(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})},t._normalizeIndentationFromWhitespace=function(e,t,n){for(var i=0,o=0;othis.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)},t.prototype.getLineLength=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)},t.prototype.getLinesContent=function(){return this._assertNotDisposed(),this._buffer.getLinesContent()},t.prototype.getEOL=function(){return this._assertNotDisposed(),this._buffer.getEOL()},t.prototype.getLineMinColumn=function(e){return this._assertNotDisposed(),1},t.prototype.getLineMaxColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1},t.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)},t.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)},t.prototype._validateRangeRelaxedNoAllocations=function(e){var t,n,i=this._buffer.getLineCount(),o=e.startLineNumber,r=e.startColumn;if(o<1)t=1,n=1;else if(o>i)t=i,n=this.getLineMaxColumn(t);else{if(t=0|o,r<=1)n=1;else n=r>=(h=this.getLineMaxColumn(t))?h:0|r}var s,a,u=e.endLineNumber,l=e.endColumn;if(u<1)s=1,a=1;else if(u>i)s=i,a=this.getLineMaxColumn(s);else{var h;if(s=0|u,l<=1)a=1;else a=l>=(h=this.getLineMaxColumn(s))?h:0|l}return o===t&&r===n&&u===s&&l===a&&e instanceof c.a&&!(e instanceof d.a)?e:new c.a(t,n,s,a)},t.prototype._isValidPosition=function(e,t,n){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===n){var i=this._buffer.getLineCharCode(e,t-2);if(s.z(i))return!1}return!0},t.prototype._validatePosition=function(e,t,n){var i=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(i<1)return new l.a(1,1);if(i>r)return new l.a(r,this.getLineMaxColumn(r));if(o<=1)return new l.a(i,1);var a=this.getLineMaxColumn(i);if(o>=a)return new l.a(i,a);if(1===n){var u=this._buffer.getLineCharCode(i,o-2);if(s.z(u))return new l.a(i,o-1)}return new l.a(i,o)},t.prototype.validatePosition=function(e){return this._assertNotDisposed(),e instanceof l.a&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)},t.prototype._isValidRange=function(e,t){var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(n,i,0))return!1;if(!this._isValidPosition(o,r,0))return!1;if(1===t){var a=i>1?this._buffer.getLineCharCode(n,i-2):0,u=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,l=s.z(a),c=s.z(u);return!l&&!c}return!0},t.prototype.validateRange=function(e){if(this._assertNotDisposed(),e instanceof c.a&&!(e instanceof d.a)&&this._isValidRange(e,1))return e;var t=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),i=t.lineNumber,o=t.column,r=n.lineNumber,a=n.column,u=o>1?this._buffer.getLineCharCode(i,o-2):0,l=a>1&&a<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,a-2):0,h=s.z(u),p=s.z(l);return h||p?i===r&&o===a?new c.a(i,o-1,r,a-1):h&&p?new c.a(i,o-1,r,a+1):h?new c.a(i,o-1,r,a):new c.a(i,o,r,a+1):new c.a(i,o,r,a)},t.prototype.modifyPosition=function(e,t){this._assertNotDisposed();var n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))},t.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new c.a(1,1,e,this.getLineMaxColumn(e))},t.prototype.findMatchesLineByLine=function(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)},t.prototype.findMatches=function(e,t,n,i,o,r,s){var a;if(void 0===s&&(s=999),this._assertNotDisposed(),a=c.a.isIRange(t)?this.validateRange(t):this.getFullModelRange(),!n&&e.indexOf("\n")<0){var u=new ie.a(e,n,i,o).parseSearchRequest();return u?this.findMatchesLineByLine(a,u,r,s):[]}return ie.c.findMatches(this,new ie.a(e,n,i,o),a,r,s)},t.prototype.findNextMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){var a=new ie.a(e,n,i,o).parseSearchRequest();if(!a)return null;var u=this.getLineCount(),l=new c.a(s.lineNumber,s.column,u,this.getLineMaxColumn(u)),d=this.findMatchesLineByLine(l,a,r,1);return ie.c.findNextMatch(this,new ie.a(e,n,i,o),s,r),d.length>0?d[0]:(l=new c.a(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(d=this.findMatchesLineByLine(l,a,r,1)).length>0?d[0]:null)}return ie.c.findNextMatch(this,new ie.a(e,n,i,o),s,r)},t.prototype.findPreviousMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);return ie.c.findPreviousMatch(this,new ie.a(e,n,i,o),s,r)},t.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},t.prototype.pushEOL=function(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype.pushEditOperations=function(e,t,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._pushEditOperations=function(e,t,n){var i=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var o=t.map((function(e){return{range:i.validateRange(e.range),text:e.text}})),r=!0,s=0,a=e.length;su.endLineNumber,f=u.startLineNumber>_.endLineNumber;if(!p&&!f){l=!0;break}}if(!l){r=!1;break}}if(r)for(s=0,a=this._trimAutoWhitespaceLines.length;s_.endLineNumber)&&!(g===_.startLineNumber&&_.startColumn===m&&_.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(0)||g===_.startLineNumber&&1===_.startColumn&&_.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(b.length-1))){v=!1;break}}v&&t.push({range:new c.a(g,1,g,m),text:null})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,n)},t.prototype.applyEdits=function(e){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._applyEdits(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._applyEdits=function(e){for(var t=0,n=e.length;t0?l.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(l.rangeOffset,l.rangeLength,l.text.length,l.forceMoveMarkers);for(var f=l.range.startLineNumber,g=l.range.endLineNumber,m=g-f,v=d,_=Math.min(m,v),b=v-m,y=_;y>=0;y--){var C=f+y,w=r-u-b+C;a.push(new me(C,this.getLineContent(w)))}if(_this.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)},t.prototype.getLinesDecorations=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new c.a(r,1,s,a),n,i)},t.prototype.getDecorationsInRange=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!1);var i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)},t.prototype.getOverviewRulerDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(i)},t.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!1,n);return this._ensureNodesHaveRanges(i)},t.prototype._getDecorationsInRange=function(e,t,n){var i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(i,o,t,n,r);return this._ensureNodesHaveRanges(s)},t.prototype._ensureNodesHaveRanges=function(e){for(var t=0,n=e.length;tthis.getLineCount())throw new Error("Illegal value for lineNumber");this._tokens.setTokens(this._languageIdentifier.id,e-1,this._buffer.getLineLength(e),t)},t.prototype.setTokens=function(e){if(0!==e.length){for(var t=[],n=0,i=e.length;nthis.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)},t.prototype.isCheapToTokenize=function(e){return this._tokenization.isCheapToTokenize(e)},t.prototype.tokenizeIfCheap=function(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)},t.prototype.getLineTokens=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)},t.prototype._getLineTokens=function(e){var t=this.getLineContent(e),n=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,n)},t.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},t.prototype.getModeId=function(){return this._languageIdentifier.language},t.prototype.setMode=function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}},t.prototype.getLanguageIdAtPosition=function(e,t){var n=this.validatePosition(new l.a(e,t)),i=this.getLineTokens(n.lineNumber);return i.getLanguageId(i.findTokenIndexAtOffset(n.column-1))},t.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var n=this.validatePosition(e),i=this.getLineContent(n.lineNumber),o=this._getLineTokens(n.lineNumber),r=o.findTokenIndexAtOffset(n.column-1),s=t._findLanguageBoundaries(o,r),a=s[0],u=s[1],l=Object(Te.d)(n.column,Pe.a.getWordDefinition(o.getLanguageId(r)),i.substring(a,u),a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(r>0&&a===n.column-1){var c=t._findLanguageBoundaries(o,r-1),d=c[0],h=c[1],p=Object(Te.d)(n.column,Pe.a.getWordDefinition(o.getLanguageId(r-1)),i.substring(d,h),d);if(p&&p.startColumn<=e.column&&e.column<=p.endColumn)return p}return null},t._findLanguageBoundaries=function(e,t){for(var n=e.getLanguageId(t),i=0,o=t;o>=0&&e.getLanguageId(o)===n;o--)i=e.getStartOffset(o);for(var r=e.getLineContent().length,s=(o=t,e.getCount());o=0;u--){var l=n.getEndOffset(u);if(l<=a)break;Object(Re.b)(n.getStandardTokenType(u))&&(a=l)}for(var c=Math.min(o.length,e.column-1+s.maxBracketLength),d=null;;){if(!(m=Ae.a.findNextBracketInRange(s.forwardRegex,t,o,a,c)))break;if(m.startColumn<=e.column&&e.column<=m.endColumn){var h=o.substring(m.startColumn-1,m.endColumn-1).toLowerCase();(v=this._matchFoundBracket(m,s.textIsBracket[h],s.textIsOpenBracket[h]))&&(d=v)}a=m.endColumn-1}if(d)return d}if(r>0&&n.getStartOffset(r)===e.column-1){var p=r-1,f=Pe.a.getBracketsSupport(n.getLanguageId(p));if(f&&!Object(Re.b)(n.getStandardTokenType(p))){for(a=Math.max(0,e.column-1-f.maxBracketLength),c=Math.min(o.length,e.column-1+f.maxBracketLength),u=p+1;u=c)break;Object(Re.b)(n.getStandardTokenType(u))&&(c=g)}var m;if((m=Ae.a.findPrevBracketInRange(f.reversedRegex,t,o,a,c))&&m.startColumn<=e.column&&e.column<=m.endColumn){var v;h=o.substring(m.startColumn-1,m.endColumn-1).toLowerCase();if(v=this._matchFoundBracket(m,f.textIsBracket[h],f.textIsOpenBracket[h]))return v}}}return null},t.prototype._matchFoundBracket=function(e,t,n){if(!t)return null;var i;if(n){if(i=this._findMatchingBracketDown(t,e.getEndPosition()))return[e,i]}else if(i=this._findMatchingBracketUp(t,e.getStartPosition()))return[e,i];return null},t.prototype._findMatchingBracketUp=function(e,t){for(var n=e.languageIdentifier.id,i=e.reversedRegex,o=-1,r=function(t,n,r,s){for(;;){var a=Ae.a.findPrevBracketInRange(i,t,n,r,s);if(!a)break;var u=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return a;s=a.startColumn-1}return null},s=t.lineNumber;s>=1;s--){var a=this._getLineTokens(s),u=a.getCount(),l=this._buffer.getLineContent(s),c=u-1,d=l.length,h=l.length;s===t.lineNumber&&(c=a.findTokenIndexAtOffset(t.column-1),d=t.column-1,h=t.column-1);for(var p=!0;c>=0;c--){var f,g=a.getLanguageId(c)===n&&!Object(Re.b)(a.getStandardTokenType(c));if(g)p?d=a.getStartOffset(c):(d=a.getStartOffset(c),h=a.getEndOffset(c));else if(p&&d!==h)if(f=r(s,l,d,h))return f;p=g}if(p&&d!==h)if(f=r(s,l,d,h))return f}return null},t.prototype._findMatchingBracketDown=function(e,t){for(var n=e.languageIdentifier.id,i=e.forwardRegex,o=1,r=function(t,n,r,s){for(;;){var a=Ae.a.findNextBracketInRange(i,t,n,r,s);if(!a)break;var u=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return a;r=a.endColumn-1}return null},s=this.getLineCount(),a=t.lineNumber;a<=s;a++){var u=this._getLineTokens(a),l=u.getCount(),c=this._buffer.getLineContent(a),d=0,h=0,p=0;a===t.lineNumber&&(d=u.findTokenIndexAtOffset(t.column-1),h=t.column-1,p=t.column-1);for(var f=!0;d=1;o--){var r=this._getLineTokens(o),s=r.getCount(),a=this._buffer.getLineContent(o),u=s-1,l=a.length,c=a.length;if(o===t.lineNumber)u=r.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1,n!==(h=r.getLanguageId(u))&&(n=h,i=Pe.a.getBracketsSupport(n));for(var d=!0;u>=0;u--){var h;if(n!==(h=r.getLanguageId(u))){if(i&&d&&l!==c){if(p=Ae.a.findPrevBracketInRange(i.reversedRegex,o,a,l,c))return this._toFoundBracket(i,p);d=!1}n=h,i=Pe.a.getBracketsSupport(n)}var p,f=!!i&&!Object(Re.b)(r.getStandardTokenType(u));if(f)d?l=r.getStartOffset(u):(l=r.getStartOffset(u),c=r.getEndOffset(u));else if(i&&d&&l!==c)if(p=Ae.a.findPrevBracketInRange(i.reversedRegex,o,a,l,c))return this._toFoundBracket(i,p);d=f}if(i&&d&&l!==c)if(p=Ae.a.findPrevBracketInRange(i.reversedRegex,o,a,l,c))return this._toFoundBracket(i,p)}return null},t.prototype.findNextBracket=function(e){for(var t=this.validatePosition(e),n=this.getLineCount(),i=-1,o=null,r=t.lineNumber;r<=n;r++){var s=this._getLineTokens(r),a=s.getCount(),u=this._buffer.getLineContent(r),l=0,c=0,d=0;if(r===t.lineNumber)l=s.findTokenIndexAtOffset(t.column-1),c=t.column-1,d=t.column-1,i!==(p=s.getLanguageId(l))&&(i=p,o=Pe.a.getBracketsSupport(i));for(var h=!0;lt)return null;var p=this._getLineTokens(h),f=p.getCount(),g=this._buffer.getLineContent(h),m=0,v=0,_=0;if(h===i.lineNumber)m=p.findTokenIndexAtOffset(i.column-1),v=i.column-1,_=i.column-1,l!==(y=p.getLanguageId(m))&&a(l=y,c=Pe.a.getBracketsSupport(l));for(var b=!0;mo)throw new Error("Illegal value for lineNumber");for(var r=Pe.a.getFoldingRules(this._languageIdentifier.id),s=Boolean(r&&r.offSide),a=-2,u=-1,l=-2,c=-1,d=function(e){if(-1!==a&&(-2===a||a>e-1)){a=-1,u=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){a=t,u=n;break}}}if(-2===l){l=-1,c=-1;for(t=e;t=0){l=t,c=r;break}}}},h=-2,p=-1,f=-2,g=-1,m=function(e){if(-2===h){h=-1,p=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){h=t,p=n;break}}}if(-1!==f&&(-2===f||f=0){f=t,g=r;break}}}},v=0,_=!0,b=0,y=!0,C=0,w=0;_||y;w++){var S=e-w,O=e+w;if(0!==w&&(S<1||So||O>n)&&(y=!1),w>5e4&&(_=!1,y=!1),_){var L=void 0;if((D=this._computeIndentLevel(S-1))>=0?(l=S-1,c=D,L=Math.ceil(D/this._options.indentSize)):(d(S),L=this._getIndentLevelForWhitespaceLine(s,u,c)),0===w){if(v=S,b=O,0===(C=L))return{startLineNumber:v,endLineNumber:b,indent:C};continue}L>=C?v=S:_=!1}if(y){var D,x=void 0;(D=this._computeIndentLevel(O-1))>=0?(h=O-1,p=D,x=Math.ceil(D/this._options.indentSize)):(m(O),x=this._getIndentLevelForWhitespaceLine(s,p,g)),x>=C?b=O:y=!1}}return{startLineNumber:v,endLineNumber:b,indent:C}},t.prototype.getLinesIndentGuides=function(e,t){this._assertNotDisposed();var n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");for(var i=Pe.a.getFoldingRules(this._languageIdentifier.id),o=Boolean(i&&i.offSide),r=new Array(t-e+1),s=-2,a=-1,u=-2,l=-1,c=e;c<=t;c++){var d=c-e,h=this._computeIndentLevel(c-1);if(h>=0)s=c-1,a=h,r[d]=Math.ceil(h/this._options.indentSize);else{if(-2===s){s=-1,a=-1;for(var p=c-2;p>=0;p--){if((f=this._computeIndentLevel(p))>=0){s=p,a=f;break}}}if(-1!==u&&(-2===u||u=0){u=p,l=f;break}}}r[d]=this._getIndentLevelForWhitespaceLine(o,a,l)}}return r},t.prototype._getIndentLevelForWhitespaceLine=function(e,t,n){return-1===t||-1===n?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))},t}(r.a)},tXSY: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/supports/richEditBrackets.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js */function(e,t,n){"use strict";n.d(t,"b",(function(){return Ue})),n.d(t,"a",(function(){return Xe}));var i=n("/cxE"),o=n("MI8n"),r=n("pmY6"),s=n("N0LK"),a=n("bY76"),u=n("/UlZ"),l=n("cGHE"),c=n("aokT"),d=n("gCVg"),h=n("M1Kb"),p=function(){function e(e,t){this.beforeVersionId=e,this.beforeCursorState=t,this.afterCursorState=null,this.afterVersionId=-1,this.editOperations=[]}return e.prototype.undo=function(e){for(var t=this.editOperations.length-1;t>=0;t--)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e.prototype.redo=function(e){for(var t=0;t0){var e=this.past.pop();try{e.undo(this.model)}catch(e){return Object(i.e)(e),this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.canUndo=function(){return this.past.length>0||null!==this.currentOpenStackElement},e.prototype.redo=function(){if(this.future.length>0){var e=this.future.pop();try{e.redo(this.model)}catch(e){return Object(i.e)(e),this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e.prototype.canRedo=function(){return this.future.length>0},e}(),v=function(){this.spacesDiff=0,this.looksLikeAlignment=!1};function _(e,t,n,i,o){var r;for(o.spacesDiff=0,o.looksLikeAlignment=!1,r=0;r0&&a>0||l>0&&c>0)){var d=Math.abs(a-c),h=Math.abs(s-l);if(0===d)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?o++:m>1&&r++,_(s,a,h,g,l),!l.looksLikeAlignment||n&&t===l.spacesDiff)){var S=l.spacesDiff;S<=8&&u[S]++,s=h,a=g}}var O=n;o!==r&&(O=oD&&(D=t,L=e)})),4===L&&u[4]>0&&u[2]>0&&u[2]>=u[4]/2&&(L=2)}return{insertSpaces:O,tabSize:L}}function y(e){return(1&e.metadata)>>>0}function C(e,t){e.metadata=254&e.metadata|t<<0}function w(e){return(2&e.metadata)>>>1==1}function S(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function O(e){return(4&e.metadata)>>>2==1}function L(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function D(e){return(8&e.metadata)>>>3==1}function x(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function N(e,t){e.metadata=207&e.metadata|t<<4}function k(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}var E=function(){function e(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,C(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,L(this,!1),N(this,1),x(this,!1),k(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,S(this,!1)}return e.prototype.reset=function(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;L(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),N(this,this.options.stickiness),x(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),k(this,this.options.collapseOnReplaceEdit)},e.prototype.setCachedOffsets=function(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),I=new E(null,0,0);I.parent=I,I.left=I,I.right=I,C(I,0);var M=function(){function e(){this.root=I,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,t,n,i,o){return this.root===I?[]:function(e,t,n,i,o,r){var s=e.root,a=0,u=0,l=0,c=[],d=0;for(;s!==I;)if(w(s))S(s.left,!1),S(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!w(s.left)){if(a+s.maxEndn)S(s,!0);else{if((l=a+s.end)>=t){s.setCachedOffsets(u,l,r);var h=!0;i&&s.ownerId&&s.ownerId!==i&&(h=!1),o&&O(s)&&(h=!1),h&&(c[d++]=s)}S(s,!0),s.right===I||w(s.right)||(a+=s.delta,s=s.right)}}return S(e.root,!1),c}(this,e,t,n,i,o)},e.prototype.search=function(e,t,n){return this.root===I?[]:function(e,t,n,i){var o=e.root,r=0,s=0,a=0,u=[],l=0;for(;o!==I;)if(w(o))S(o.left,!1),S(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;else if(o.left===I||w(o.left)){s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,i);var c=!0;t&&o.ownerId&&o.ownerId!==t&&(c=!1),n&&O(o)&&(c=!1),c&&(u[l++]=o),S(o,!0),o.right===I||w(o.right)||(r+=o.delta,o=o.right)}else o=o.left;return S(e.root,!1),u}(this,e,t,n)},e.prototype.collectNodesFromOwner=function(e){return function(e,t){var n=e.root,i=[],o=0;for(;n!==I;)w(n)?(S(n.left,!1),S(n.right,!1),n=n.parent):n.left===I||w(n.left)?(n.ownerId===t&&(i[o++]=n),S(n,!0),n.right===I||w(n.right)||(n=n.right)):n=n.left;return S(e.root,!1),i}(this,e)},e.prototype.collectNodesPostOrder=function(){return function(e){var t=e.root,n=[],i=0;for(;t!==I;)w(t)?(S(t.left,!1),S(t.right,!1),t=t.parent):t.left===I||w(t.left)?t.right===I||w(t.right)?(n[i++]=t,S(t,!0)):t=t.right:t=t.left;return S(e.root,!1),n}(this)},e.prototype.insert=function(e){R(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){A(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){for(var n=e,i=0;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;var o=n.start+i,r=n.end+i;n.setCachedOffsets(o,r,t)},e.prototype.acceptReplace=function(e,t,n,i){for(var o=function(e,t,n){var i=e.root,o=0,r=0,s=0,a=[],u=0;for(;i!==I;)if(w(i))S(i.left,!1),S(i.right,!1),i===i.parent.right&&(o-=i.parent.delta),i=i.parent;else{if(!w(i.left)){if(o+i.maxEndn?S(i,!0):((s=o+i.end)>=t&&(i.setCachedOffsets(r,s,0),a[u++]=i),S(i,!0),i.right===I||w(i.right)||(o+=i.delta,i=i.right))}return S(e.root,!1),a}(this,e,e+t),r=0,s=o.length;rn?(o.start+=s,o.end+=s,o.delta+=s,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),S(o,!0)):(S(o,!0),o.right===I||w(o.right)||(r+=o.delta,o=o.right))}S(e.root,!1)}(this,e,e+t,n),this._normalizeDeltaIfNecessary();for(r=0,s=o.length;rn)&&(1!==i&&(2===i||t))}function P(e,t,n,i,o){var r=function(e){return(48&e.metadata)>>>4}(e),s=0===r||2===r,a=1===r||2===r,u=n-t,l=i,c=Math.min(u,l),d=e.start,h=!1,p=e.end,f=!1;t<=d&&p<=n&&function(e){return(64&e.metadata)>>>6==1}(e)&&(e.start=t,h=!0,e.end=t,f=!0);var g=o?1:u>0?2:0;if(!h&&T(d,s,t,g)&&(h=!0),!f&&T(p,a,t,g)&&(f=!0),c>0&&!o){g=u>l?2:0;!h&&T(d,s,t+c,g)&&(h=!0),!f&&T(p,a,t+c,g)&&(f=!0)}g=o?1:0;!h&&T(d,s,n,g)&&(e.start=t+l,h=!0),!f&&T(p,a,n,g)&&(e.end=t+l,f=!0);var m=l-u;h||(e.start=Math.max(0,d+m)),f||(e.end=Math.max(0,p+m)),e.start>e.end&&(e.end=e.start)}function R(e,t){if(e.root===I)return t.parent=I,t.left=I,t.right=I,C(t,0),e.root=t,e.root;!function(e,t){var n=0,i=e.root,o=t.start,r=t.end;for(;;){if(z(o,r,i.start+n,i.end+n)<0){if(i.left===I){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===I){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}}t.parent=i,t.left=I,t.right=I,C(t,1)}(e,t),H(t.parent);for(var n=t;n!==e.root&&1===y(n.parent);){var i;if(n.parent===n.parent.parent.left)1===y(i=n.parent.parent.right)?(C(n.parent,0),C(i,0),C(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&j(e,n=n.parent),C(n.parent,0),C(n.parent.parent,1),W(e,n.parent.parent));else 1===y(i=n.parent.parent.left)?(C(n.parent,0),C(i,0),C(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&W(e,n=n.parent),C(n.parent,0),C(n.parent.parent,1),j(e,n.parent.parent))}return C(e.root,0),t}function A(e,t){var n,i;if(t.left===I?(i=t,(n=t.right).delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===I?(n=t.left,i=t):((n=(i=function(e){for(;e.left!==I;)e=e.left;return e}(t.right)).right).start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,C(n,0),t.detach(),F(),B(n),void(e.root.parent=I);var o,r=1===y(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,C(i,y(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==I&&(i.left.parent=i),i.right!==I&&(i.right.parent=i)),t.detach(),r)return H(n.parent),i!==t&&(H(i),H(i.parent)),void F();for(H(n),H(n.parent),i!==t&&(H(i),H(i.parent));n!==e.root&&0===y(n);)n===n.parent.left?(1===y(o=n.parent.right)&&(C(o,0),C(n.parent,1),j(e,n.parent),o=n.parent.right),0===y(o.left)&&0===y(o.right)?(C(o,1),n=n.parent):(0===y(o.right)&&(C(o.left,0),C(o,1),W(e,o),o=n.parent.right),C(o,y(n.parent)),C(n.parent,0),C(o.right,0),j(e,n.parent),n=e.root)):(1===y(o=n.parent.left)&&(C(o,0),C(n.parent,1),W(e,n.parent),o=n.parent.left),0===y(o.left)&&0===y(o.right)?(C(o,1),n=n.parent):(0===y(o.left)&&(C(o.right,0),C(o,1),j(e,o),o=n.parent.left),C(o,y(n.parent)),C(n.parent,0),C(o.left,0),W(e,n.parent),n=e.root));C(n,0),F()}function F(){I.parent=I,I.delta=0,I.start=0,I.end=0}function j(e,t){var n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==I&&(n.left.parent=t),n.parent=t.parent,t.parent===I?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,B(t),B(n)}function W(e,t){var n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==I&&(n.right.parent=t),n.parent=t.parent,t.parent===I?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,B(t),B(n)}function V(e){var t=e.end;if(e.left!==I){var n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==I){var i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function B(e){e.maxEnd=V(e)}function H(e){for(;e!==I;){var t=V(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function z(e,t,n,i){return e===n?t-i:e-n}var U=function(){function e(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}return e.prototype.next=function(){if(this.right!==K)return q(this.right);for(var e=this;e.parent!==K&&e.parent.left!==e;)e=e.parent;return e.parent===K?K:e.parent},e.prototype.prev=function(){if(this.left!==K)return G(this.left);for(var e=this;e.parent!==K&&e.parent.right!==e;)e=e.parent;return e.parent===K?K:e.parent},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),K=new U(null,0);function q(e){for(;e.left!==K;)e=e.left;return e}function G(e){for(;e.right!==K;)e=e.right;return e}function Y(e){return e===K?0:e.size_left+e.piece.length+Y(e.right)}function Z(e){return e===K?0:e.lf_left+e.piece.lineFeedCnt+Z(e.right)}function X(){K.parent=K}function Q(e,t){var n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==K&&(n.left.parent=t),n.parent=t.parent,t.parent===K?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function J(e,t){var n=t.left;t.left=n.right,n.right!==K&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===K?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function $(e,t){var n,i;if(n=t.left===K?(i=t).right:t.right===K?(i=t).left:(i=q(t.right)).right,i===e.root)return e.root=n,n.color=0,t.detach(),X(),void(e.root.parent=K);var o=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,ne(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,ne(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==K&&(i.left.parent=i),i.right!==K&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,ne(e,i)),t.detach(),n.parent.left===n){var r=Y(n),s=Z(n);if(r!==n.parent.size_left||s!==n.parent.lf_left){var a=r-n.parent.size_left,u=s-n.parent.lf_left;n.parent.size_left=r,n.parent.lf_left=s,te(e,n.parent,a,u)}}if(ne(e,n.parent),o)X();else{for(var l;n!==e.root&&0===n.color;)n===n.parent.left?(1===(l=n.parent.right).color&&(l.color=0,n.parent.color=1,Q(e,n.parent),l=n.parent.right),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.right.color&&(l.left.color=0,l.color=1,J(e,l),l=n.parent.right),l.color=n.parent.color,n.parent.color=0,l.right.color=0,Q(e,n.parent),n=e.root)):(1===(l=n.parent.left).color&&(l.color=0,n.parent.color=1,J(e,n.parent),l=n.parent.left),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.left.color&&(l.right.color=0,l.color=1,Q(e,l),l=n.parent.left),l.color=n.parent.color,n.parent.color=0,l.left.color=0,J(e,n.parent),n=e.root));n.color=0,X()}}function ee(e,t){for(ne(e,t);t!==e.root&&1===t.parent.color;){var n;if(t.parent===t.parent.parent.left)1===(n=t.parent.parent.right).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Q(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,J(e,t.parent.parent));else 1===(n=t.parent.parent.left).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&J(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Q(e,t.parent.parent))}e.root.color=0}function te(e,t,n,i){for(;t!==e.root&&t!==K;)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function ne(e,t){var n=0,i=0;if(t!==e.root){if(0===n){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;n=Y((t=t.parent).left)-t.size_left,i=Z(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i}for(;t!==e.root&&(0!==n||0!==i);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}K.parent=K,K.left=K,K.right=K,K.color=0;var ie=n("jAJ/");function oe(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}var re=function(e,t,n,i,o){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=o};function se(e,t){void 0===t&&(t=!0);for(var n=[0],i=1,o=0,r=e.length;o=0;t--){var n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null},e.prototype.set=function(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)},e.prototype.valdiate=function(e){for(var t=!1,n=this._cache,i=0;i=e)&&(n[i]=null,t=!0)}if(t){for(var r=[],s=0,a=n;s0){e[o].lineStarts||(e[o].lineStarts=se(e[o].buffer));var s=new ue(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),i=this.rbInsertRight(i,s)}this._searchCache=new ce(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var t=this,n=65535-Math.floor(21845),i=2*n,o="",r=0,s=[];if(this.iterate(this.root,(function(a){var u=t.getNodeContent(a),l=u.length;if(r<=n||r+l0){var a=o.replace(/\r\n|\r|\n/g,e);s.push(new le(a,se(a)))}this.create(s,e,!0)},e.prototype.getEOL=function(){return this._EOL},e.prototype.setEOL=function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)},e.prototype.getOffsetAt=function(e,t){for(var n=0,i=this.root;i!==K;)if(i.left!==K&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e)return(n+=i.size_left)+(this.getAccumulatedValue(i,e-i.lf_left-2)+t-1);e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,n=0,i=e;t!==K;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var o=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+o.index,0===o.index){var r=i-this.getOffsetAt(n+1,1);return new l.a(n+1,r+1)}return new l.a(n+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===K){r=i-e-this.getOffsetAt(n+1,1);return new l.a(n+1,r+1)}t=t.right}return new l.a(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){var n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(o+e.remainder,o+t.remainder)}var r=e.node,s=this._buffers[r.piece.bufferIndex].buffer,a=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start),u=s.substring(a+e.remainder,a+r.piece.length);for(r=r.next();r!==K;){var l=this._buffers[r.piece.bufferIndex].buffer,c=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);if(r===t.node){u+=l.substring(c,c+t.remainder);break}u+=l.substr(c,r.piece.length),r=r.next()}return u},e.prototype.getLinesContent=function(){var e=this,t=[],n=0,i="",o=!1;return this.iterate(this.root,(function(r){if(r===K)return!0;var s=r.piece,a=s.length;if(0===a)return!0;var u=e._buffers[s.bufferIndex].buffer,l=e._buffers[s.bufferIndex].lineStarts,c=s.start.line,d=s.end.line,h=l[c]+s.start.column;if(o&&(10===u.charCodeAt(h)&&(h++,a--),t[n++]=i,i="",o=!1,0===a))return!0;if(c===d)return e._EOLNormalized||13!==u.charCodeAt(h+a-1)?i+=u.substr(h,a):(o=!0,i+=u.substr(h,a-1)),!0;i+=e._EOLNormalized?u.substring(h,Math.max(h,l[c+1]-e._EOLLength)):u.substring(h,l[c+1]).replace(/(\r\n|\r|\n)$/,""),t[n++]=i;for(var p=c+1;p=_)return l;this.positionInBuffer(e,f(h.index)-m,b);var y=this.getLineFeedCnt(e.piece.bufferIndex,o,b),C=b.line===o.line?b.column-o.column+i:b.column+1,w=C+h[0].length;if(d[l++]=Object(ie.d)(new c.a(n+y,C,n+y,w),h,a),f(h.index)+h[0].length>=_)return l;if(l>=u)return l}}while(h);return l},e.prototype.findMatchesLineByLine=function(e,t,n,i){var o=[],r=0,s=new ie.b(t.wordSeparators,t.regex),a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];var u=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===u)return[];var l=this.positionInBuffer(a.node,a.remainder),c=this.positionInBuffer(u.node,u.remainder);if(a.node===u.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,l,c,t,n,i,r,o),o;for(var d=e.startLineNumber,h=a.node;h!==u.node;){var p=this.getLineFeedCnt(h.piece.bufferIndex,l,h.piece.end);if(p>=1){var f=this._buffers[h.piece.bufferIndex].lineStarts,g=this.offsetInBuffer(h.piece.bufferIndex,h.piece.start),m=f[l.line+p],v=d===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(h,s,d,v,l,this.positionInBuffer(h,m-g),t,n,i,r,o))>=i)return o;d+=p}var _=d===e.startLineNumber?e.startColumn-1:0;if(d===e.endLineNumber){var b=this.getLineContent(d).substring(_,e.endColumn-1);return r=this._findMatchesInLine(t,s,b,e.endLineNumber,_,r,o,n,i),o}if((r=this._findMatchesInLine(t,s,this.getLineContent(d).substr(_),d,_,r,o,n,i))>=i)return o;d++,h=(a=this.nodeAt2(d,1)).node,l=this.positionInBuffer(a.node,a.remainder)}if(d===e.endLineNumber){var y=d===e.startLineNumber?e.startColumn-1:0;b=this.getLineContent(d).substring(y,e.endColumn-1);return r=this._findMatchesInLine(t,s,b,e.endLineNumber,y,r,o,n,i),o}var C=d===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(u.node,s,d,C,l,c,t,n,i,r,o),o},e.prototype._findMatchesInLine=function(e,t,n,i,o,r,s,a,u){var l,d=e.wordSeparators;if(!a&&e.simpleSearch){for(var p=e.simpleSearch,f=p.length,g=n.length,m=-f;-1!==(m=n.indexOf(p,m+f));)if((!d||Object(ie.e)(d,n,g,m,f))&&(s[r++]=new h.b(new c.a(i,m+1+o,i,m+1+f+o),null),r>=u))return r;return r}t.reset(0);do{if((l=t.next(n))&&(s[r++]=Object(ie.d)(new c.a(i,l.index+1+o,i,l.index+1+l[0].length+o),l,a),r>=u))return r}while(l);return r},e.prototype.insert=function(e,t,n){if(void 0===n&&(n=!1),this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==K){var i=this.nodeAt(e),o=i.node,r=i.remainder,s=i.nodeStartOffset,a=o.piece,u=a.bufferIndex,l=this.positionInBuffer(o,r);if(0===o.piece.bufferIndex&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.length<65535)return this.appendToNode(o,t),void this.computeBufferMetadata();if(s===e)this.insertContentToNodeLeft(t,o),this._searchCache.valdiate(e);else if(s+o.piece.length>e){var c=[],d=new ue(a.bufferIndex,l,a.end,this.getLineFeedCnt(a.bufferIndex,l,a.end),this.offsetInBuffer(u,a.end)-this.offsetInBuffer(u,l));if(this.shouldCheckCRLF()&&this.endWithCR(t))if(10===this.nodeCharCodeAt(o,r)){var h={line:d.start.line+1,column:0};d=new ue(d.bufferIndex,h,d.end,this.getLineFeedCnt(d.bufferIndex,h,d.end),d.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(o,r-1)){var p=this.positionInBuffer(o,r-1);this.deleteNodeTail(o,p),t="\r"+t,0===o.piece.length&&c.push(o)}else this.deleteNodeTail(o,l);else this.deleteNodeTail(o,l);var f=this.createNewPieces(t);d.length>0&&this.rbInsertRight(o,d);for(var g=o,m=0;m=0;u--)a=this.rbInsertLeft(a,s[u]);this.validateCRLFWithPrevNode(a),this.deleteNodes(n)},e.prototype.insertContentToNodeRight=function(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i,r=1;r=c))break;a=l+1}return n?(n.line=l,n.column=s-d,null):{line:l,column:s-d}},e.prototype.getLineFeedCnt=function(e,t,n){if(0===n.column)return n.line-t.line;var i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;var o=i[n.line+1],r=i[n.line]+n.column;if(o>r+1)return n.line-t.line;var s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?n.line-t.line+1:n.line-t.line},e.prototype.offsetInBuffer=function(e,t){return this._buffers[e].lineStarts[t.line]+t.column},e.prototype.deleteNodes=function(e){for(var t=0;t65535){for(var t=[];e.length>65535;){var n=e.charCodeAt(65534),i=void 0;13===n||n>=55296&&n<=56319?(i=e.substring(0,65534),e=e.substring(65534)):(i=e.substring(0,65535),e=e.substring(65535));var o=se(i);t.push(new ue(this._buffers.length,{line:0,column:0},{line:o.length-1,column:i.length-o[o.length-1]},o.length-1,i.length)),this._buffers.push(new le(i,o))}var r=se(e);return t.push(new ue(this._buffers.length,{line:0,column:0},{line:r.length-1,column:e.length-r[r.length-1]},r.length-1,e.length)),this._buffers.push(new le(e,r)),t}var s=this._buffers[0].buffer.length,a=se(e,!1),u=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===s&&0!==s&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},u=this._lastChangeBufferPos;for(var l=0;l=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),u=this.getAccumulatedValue(n,e-n.lf_left-1),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return l+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:l,nodeStartLineNumber:c-(e-1-n.lf_left)}),s.substring(a+r,a+u-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=s.substring(a+r,a+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,l+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==K;){s=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){u=this.getAccumulatedValue(n,0),a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=s.substring(a,a+u-t)}a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=s.substr(a,n.piece.length),n=n.next()}return i},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,n=0;e!==K;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(r!==o)return{index:r,remainder:0}}return{index:o,remainder:i.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column},e.prototype.deleteNodeTail=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),r=t,s=this.offsetInBuffer(n.bufferIndex,r),a=this.getLineFeedCnt(n.bufferIndex,n.start,r),u=a-i,l=s-o,c=n.length+l;e.piece=new ue(n.bufferIndex,n.start,r,a,c),te(this,e,l,u)},e.prototype.deleteNodeHead=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),r=t,s=this.getLineFeedCnt(n.bufferIndex,r,n.end),a=s-i,u=o-this.offsetInBuffer(n.bufferIndex,r),l=n.length+u;e.piece=new ue(n.bufferIndex,r,n.end,s,l),te(this,e,u,a)},e.prototype.shrinkNode=function(e,t,n){var i=e.piece,o=i.start,r=i.end,s=i.length,a=i.lineFeedCnt,u=t,l=this.getLineFeedCnt(i.bufferIndex,i.start,u),c=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new ue(i.bufferIndex,i.start,u,l,c),te(this,e,c-s,l-a);var d=new ue(i.bufferIndex,n,r,this.getLineFeedCnt(i.bufferIndex,n,r),this.offsetInBuffer(i.bufferIndex,r)-this.offsetInBuffer(i.bufferIndex,n)),h=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(h)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var o=se(t,!1),r=0;re)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;var o={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(o),o}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){for(var n=this.root,i=0;n!==K;)if(n.left!==K&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var o=this.getAccumulatedValue(n,e-n.lf_left-2),r=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,r),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){if((o=this.getAccumulatedValue(n,e-n.lf_left-2))+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i};t-=n.piece.length-o;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==K;){if(n.piece.lineFeedCnt>0){r=this.getAccumulatedValue(n,0);var s=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,r),nodeStartOffset:s}}if(n.piece.length>=t-1)return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)};t-=n.piece.length,n=n.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)},e.prototype.offsetOfNode=function(e){if(!e)return 0;for(var t=e.size_left;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t},e.prototype.shouldCheckCRLF=function(){return!(this._EOLNormalized&&"\n"===this._EOL)},e.prototype.startWithLF=function(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===K||0===e.piece.lineFeedCnt)return!1;var t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;return i!==n.length-1&&(!(n[i+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o))},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==K&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)},e.prototype.validateCRLFWithPrevNode=function(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}},e.prototype.validateCRLFWithNextNode=function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}},e.prototype.fixCRLF=function(e,t){var n,i=[],o=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new ue(e.piece.bufferIndex,e.piece.start,n,s,r),te(this,e,-1,-1),0===e.piece.length&&i.push(e);var a={line:t.piece.start.line+1,column:0},u=t.piece.length-1,l=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new ue(t.piece.bufferIndex,a,t.piece.end,l,u),te(this,t,-1,-1),0===t.piece.length&&i.push(t);var c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(var d=0;d0){v.sort((function(e,t){return t.lineNumber-e.lineNumber})),S=[];u=0;for(var O=v.length;u0&&v[u-1].lineNumber===b)){var L=v[u].oldContent,D=this.getLineContent(b);0!==D.length&&D!==L&&-1===s.q(D)&&S.push(b)}}}return new h.a(C,w,S)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){for(var t=!1,n=e[0].range,i=e[e.length-1].range,o=new c.a(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn),r=n.startLineNumber,s=n.startColumn,a=[],u=0,l=e.length;u0){var h=a.lines.length,p=a.lines[0],f=a.lines[h-1];d=1===h?new c.a(u,l,u,l+p.length):new c.a(u,l,u+h-1,f.length+1)}else d=new c.a(u,l,u,l);n=d.endLineNumber,i=d.endColumn,t.push(d),o=a}return t},e._sortOpsAscending=function(e,t){var n=c.a.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n},e._sortOpsDescending=function(e,t){var n=c.a.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n},e}(),pe=function(){function e(e,t,n,i,o,r,s,a){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=o,this._containsRTL=r,this._isBasicASCII=s,this._normalizeEOL=a}return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var i=0,o=n.length;i=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}},e.prototype._acceptChunk1=function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))},e.prototype._acceptChunk2=function(e){var t=function(e,t){e.length=0,e[0]=0;for(var n=1,i=0,o=0,r=0,s=!0,a=0,u=t.length;a126)&&(s=!1)}var c=new re(oe(e),i,o,r,s);return e.length=0,c}(this._tmpLineStarts,e);this.chunks.push(new le(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=s.i(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new pe(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.isBasicASCII,e)},e.prototype._finish=function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=se(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}(),ge=function(){this.changeType=1},me=function(e,t){this.changeType=2,this.lineNumber=e,this.detail=t},ve=function(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t},_e=function(e,t,n){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n},be=function(){this.changeType=5},ye=function(){function e(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i}return e.prototype.containsEvent=function(e){for(var t=0,n=this.changes.length;t=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++},e.prototype._deleteLines=function(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)},e.prototype._insertLines=function(e,t){if(0!==t){for(var n=[],i=[],o=0;o=0;o--)this._invalidateLine(e.startLineNumber+o-1);this._acceptDeleteRange(e),this._acceptInsertText(new l.a(e.startLineNumber,e.startColumn),t)},e.prototype._acceptDeleteRange=function(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)},e.prototype._acceptInsertText=function(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)},e}(),Ie=function(e){function t(t){var n=e.call(this)||this;return n._isDisposed=!1,n._textModel=t,n._tokenizationStateStore=new Ee,n._tokenizationSupport=null,n._register(Oe.B.onDidChange((function(e){var t=n._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(n._resetTokenizationState(),n._textModel.clearTokens())}))),n._register(n._textModel.onDidChangeRawContentFast((function(e){e.containsEvent(1)&&n._resetTokenizationState()}))),n._register(n._textModel.onDidChangeContentFast((function(e){for(var t=0,i=e.changes.length;t1);){if(this._tokenizeOneInvalidLine(t)>=e)break}this._beginBackgroundTokenization(),this._textModel.setTokens(t.tokens)},t.prototype.tokenizeViewport=function(e,t){var n=new xe.b;this._tokenizeViewport(n,e,t),this._textModel.setTokens(n.tokens)},t.prototype.reset=function(){this._resetTokenizationState(),this._textModel.clearTokens()},t.prototype.forceTokenization=function(e){var t=new xe.b;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)},t.prototype.isCheapToTokenize=function(e){if(!this._tokenizationSupport)return!0;var t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e0&&s>=1;s--){var a=this._textModel.getLineFirstNonWhitespaceColumn(s);if(0!==a&&a=0;s--){l=(h=Me(u,this._tokenizationSupport,o[s],l)).endState}for(var c=t;c<=n;c++){var d=this._textModel.getLineContent(c),h=Me(u,this._tokenizationSupport,d,l);e.add(c,h.tokens),this._tokenizationStateStore.setFakeTokens(c-1),l=h.endState}}},t}(r.a);function Me(e,t,n,o){var r=null;if(t)try{r=t.tokenize2(n,o.clone(),0)}catch(e){Object(i.e)(e)}return r||(r=Object(Le.e)(e.id,n,o,0)),Se.a.convertToEndOffset(r.tokens,n.length),r}var Te=n("0JNc"),Pe=n("cMvZ"),Re=n("BFtn"),Ae=n("EIAu"),Fe=n("746U"),je=n("zrhQ"),We=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function Ve(e){var t=new fe;return t.acceptChunk(e),t.finish()}function Be(e,t){return("string"==typeof e?Ve(e):e).create(t)}var He=0,ze=function(){throw new Error("Invalid change accessor")},Ue=function(e){function t(n,i,r,u){void 0===u&&(u=null);var l=e.call(this)||this;l._onWillDispose=l._register(new o.a),l.onWillDispose=l._onWillDispose.event,l._onDidChangeDecorations=l._register(new $e),l.onDidChangeDecorations=l._onDidChangeDecorations.event,l._onDidChangeLanguage=l._register(new o.a),l.onDidChangeLanguage=l._onDidChangeLanguage.event,l._onDidChangeLanguageConfiguration=l._register(new o.a),l.onDidChangeLanguageConfiguration=l._onDidChangeLanguageConfiguration.event,l._onDidChangeTokens=l._register(new o.a),l.onDidChangeTokens=l._onDidChangeTokens.event,l._onDidChangeOptions=l._register(new o.a),l.onDidChangeOptions=l._onDidChangeOptions.event,l._onDidChangeAttached=l._register(new o.a),l.onDidChangeAttached=l._onDidChangeAttached.event,l._eventEmitter=l._register(new et),He++,l.id="$model"+He,l.isForSimpleWidget=i.isForSimpleWidget,l._associatedResource=null==u?a.a.parse("inmemory://model/"+He):u,l._attachedEditorCount=0,l._buffer=Be(n,i.defaultEOL),l._options=t.resolveOptions(l._buffer,i);var d=l._buffer.getLineCount(),h=l._buffer.getValueLengthInRange(new c.a(1,1,d,l._buffer.getLineLength(d)+1),0);return i.largeFileOptimizations?l._isTooLargeForTokenization=h>t.LARGE_FILE_SIZE_THRESHOLD||d>t.LARGE_FILE_LINE_COUNT_THRESHOLD:l._isTooLargeForTokenization=!1,l._isTooLargeForSyncing=h>t.MODEL_SYNC_LIMIT,l._versionId=1,l._alternativeVersionId=1,l._isDisposed=!1,l._isDisposing=!1,l._languageIdentifier=r||Le.a,l._languageRegistryListener=Pe.a.onDidChange((function(e){e.languageIdentifier.id===l._languageIdentifier.id&&l._onDidChangeLanguageConfiguration.fire({})})),l._instanceId=s.M(He),l._lastDecorationId=0,l._decorations=Object.create(null),l._decorationsTree=new Ke,l._commandManager=new m(l),l._isUndoing=!1,l._isRedoing=!1,l._trimAutoWhitespaceLines=null,l._tokens=new xe.d,l._tokens2=new xe.e,l._tokenization=new Ie(l),l}return We(t,e),t.createFromString=function(e,n,i,o){return void 0===n&&(n=t.DEFAULT_CREATION_OPTIONS),void 0===i&&(i=null),void 0===o&&(o=null),new t(e,n,i,o)},t.resolveOptions=function(e,t){if(t.detectIndentation){var n=b(e,t.tabSize,t.insertSpaces);return new h.e({tabSize:n.tabSize,indentSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new h.e({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})},t.prototype.onDidChangeRawContentFast=function(e){return this._eventEmitter.fastEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeRawContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.rawContentChangedEvent)}))},t.prototype.onDidChangeContentFast=function(e){return this._eventEmitter.fastEvent((function(t){return e(t.contentChangedEvent)}))},t.prototype.onDidChangeContent=function(e){return this._eventEmitter.slowEvent((function(t){return e(t.contentChangedEvent)}))},t.prototype.dispose=function(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,e.prototype.dispose.call(this),this._isDisposing=!1},t.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!")},t.prototype._emitContentChangedEvent=function(e,t){this._isDisposing||this._eventEmitter.fire(new Ce(e,t))},t.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=Be(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}},t.prototype._createContentChanged2=function(e,t,n,i,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}},t.prototype.setValueFromTextBuffer=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),o=this.getLineMaxColumn(i);this._buffer=e,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new Ke,this._commandManager=new m(this),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new ye([new ge],this._versionId,!1,!1),this._createContentChanged2(new c.a(1,1,i,o),0,n,this.getValue(),!1,!1,!0))}},t.prototype.setEOL=function(e){this._assertNotDisposed();var t=1===e?"\r\n":"\n";if(this._buffer.getEOL()!==t){var n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new ye([new be],this._versionId,!1,!1),this._createContentChanged2(new c.a(1,1,o,r),0,i,this.getValue(),!1,!1,!1))}},t.prototype._onBeforeEOLChange=function(){var e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)},t.prototype._onAfterEOLChange=function(){for(var e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder(),n=0,i=t.length;n0},t.prototype.getAttachedEditorCount=function(){return this._attachedEditorCount},t.prototype.isTooLargeForSyncing=function(){return this._isTooLargeForSyncing},t.prototype.isTooLargeForTokenization=function(){return this._isTooLargeForTokenization},t.prototype.isDisposed=function(){return this._isDisposed},t.prototype.isDominatedByLongLines=function(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;for(var e=0,t=0,n=this._buffer.getLineCount(),i=1;i<=n;i++){var o=this._buffer.getLineLength(i);o>=1e4?t+=o:e+=o}return t>e},Object.defineProperty(t.prototype,"uri",{get:function(){return this._associatedResource},enumerable:!0,configurable:!0}),t.prototype.getOptions=function(){return this._assertNotDisposed(),this._options},t.prototype.getFormattingOptions=function(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}},t.prototype.updateOptions=function(e){this._assertNotDisposed();var t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.indentSize?e.indentSize:this._options.indentSize,i=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=new h.e({tabSize:t,indentSize:n,insertSpaces:i,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o});if(!this._options.equals(r)){var s=this._options.createChangeEvent(r);this._options=r,this._onDidChangeOptions.fire(s)}},t.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var n=b(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})},t._normalizeIndentationFromWhitespace=function(e,t,n){for(var i=0,o=0;othis.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)},t.prototype.getLineLength=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)},t.prototype.getLinesContent=function(){return this._assertNotDisposed(),this._buffer.getLinesContent()},t.prototype.getEOL=function(){return this._assertNotDisposed(),this._buffer.getEOL()},t.prototype.getLineMinColumn=function(e){return this._assertNotDisposed(),1},t.prototype.getLineMaxColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1},t.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)},t.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)},t.prototype._validateRangeRelaxedNoAllocations=function(e){var t,n,i=this._buffer.getLineCount(),o=e.startLineNumber,r=e.startColumn;if(o<1)t=1,n=1;else if(o>i)t=i,n=this.getLineMaxColumn(t);else{if(t=0|o,r<=1)n=1;else n=r>=(h=this.getLineMaxColumn(t))?h:0|r}var s,a,u=e.endLineNumber,l=e.endColumn;if(u<1)s=1,a=1;else if(u>i)s=i,a=this.getLineMaxColumn(s);else{var h;if(s=0|u,l<=1)a=1;else a=l>=(h=this.getLineMaxColumn(s))?h:0|l}return o===t&&r===n&&u===s&&l===a&&e instanceof c.a&&!(e instanceof d.a)?e:new c.a(t,n,s,a)},t.prototype._isValidPosition=function(e,t,n){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===n){var i=this._buffer.getLineCharCode(e,t-2);if(s.z(i))return!1}return!0},t.prototype._validatePosition=function(e,t,n){var i=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(i<1)return new l.a(1,1);if(i>r)return new l.a(r,this.getLineMaxColumn(r));if(o<=1)return new l.a(i,1);var a=this.getLineMaxColumn(i);if(o>=a)return new l.a(i,a);if(1===n){var u=this._buffer.getLineCharCode(i,o-2);if(s.z(u))return new l.a(i,o-1)}return new l.a(i,o)},t.prototype.validatePosition=function(e){return this._assertNotDisposed(),e instanceof l.a&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)},t.prototype._isValidRange=function(e,t){var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(n,i,0))return!1;if(!this._isValidPosition(o,r,0))return!1;if(1===t){var a=i>1?this._buffer.getLineCharCode(n,i-2):0,u=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,l=s.z(a),c=s.z(u);return!l&&!c}return!0},t.prototype.validateRange=function(e){if(this._assertNotDisposed(),e instanceof c.a&&!(e instanceof d.a)&&this._isValidRange(e,1))return e;var t=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),i=t.lineNumber,o=t.column,r=n.lineNumber,a=n.column,u=o>1?this._buffer.getLineCharCode(i,o-2):0,l=a>1&&a<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,a-2):0,h=s.z(u),p=s.z(l);return h||p?i===r&&o===a?new c.a(i,o-1,r,a-1):h&&p?new c.a(i,o-1,r,a+1):h?new c.a(i,o-1,r,a):new c.a(i,o,r,a+1):new c.a(i,o,r,a)},t.prototype.modifyPosition=function(e,t){this._assertNotDisposed();var n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))},t.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new c.a(1,1,e,this.getLineMaxColumn(e))},t.prototype.findMatchesLineByLine=function(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)},t.prototype.findMatches=function(e,t,n,i,o,r,s){var a;if(void 0===s&&(s=999),this._assertNotDisposed(),a=c.a.isIRange(t)?this.validateRange(t):this.getFullModelRange(),!n&&e.indexOf("\n")<0){var u=new ie.a(e,n,i,o).parseSearchRequest();return u?this.findMatchesLineByLine(a,u,r,s):[]}return ie.c.findMatches(this,new ie.a(e,n,i,o),a,r,s)},t.prototype.findNextMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){var a=new ie.a(e,n,i,o).parseSearchRequest();if(!a)return null;var u=this.getLineCount(),l=new c.a(s.lineNumber,s.column,u,this.getLineMaxColumn(u)),d=this.findMatchesLineByLine(l,a,r,1);return ie.c.findNextMatch(this,new ie.a(e,n,i,o),s,r),d.length>0?d[0]:(l=new c.a(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(d=this.findMatchesLineByLine(l,a,r,1)).length>0?d[0]:null)}return ie.c.findNextMatch(this,new ie.a(e,n,i,o),s,r)},t.prototype.findPreviousMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);return ie.c.findPreviousMatch(this,new ie.a(e,n,i,o),s,r)},t.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},t.prototype.pushEOL=function(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype.pushEditOperations=function(e,t,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._pushEditOperations=function(e,t,n){var i=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var o=t.map((function(e){return{range:i.validateRange(e.range),text:e.text}})),r=!0,s=0,a=e.length;su.endLineNumber,f=u.startLineNumber>_.endLineNumber;if(!p&&!f){l=!0;break}}if(!l){r=!1;break}}if(r)for(s=0,a=this._trimAutoWhitespaceLines.length;s_.endLineNumber)&&!(g===_.startLineNumber&&_.startColumn===m&&_.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(0)||g===_.startLineNumber&&1===_.startColumn&&_.isEmpty()&&b&&b.length>0&&"\n"===b.charAt(b.length-1))){v=!1;break}}v&&t.push({range:new c.a(g,1,g,m),text:null})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,n)},t.prototype.applyEdits=function(e){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._applyEdits(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._applyEdits=function(e){for(var t=0,n=e.length;t0?l.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(l.rangeOffset,l.rangeLength,l.text.length,l.forceMoveMarkers);for(var f=l.range.startLineNumber,g=l.range.endLineNumber,m=g-f,v=d,_=Math.min(m,v),b=v-m,y=_;y>=0;y--){var C=f+y,w=r-u-b+C;a.push(new me(C,this.getLineContent(w)))}if(_this.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)},t.prototype.getLinesDecorations=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new c.a(r,1,s,a),n,i)},t.prototype.getDecorationsInRange=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!1);var i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)},t.prototype.getOverviewRulerDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(i)},t.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!1,n);return this._ensureNodesHaveRanges(i)},t.prototype._getDecorationsInRange=function(e,t,n){var i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(i,o,t,n,r);return this._ensureNodesHaveRanges(s)},t.prototype._ensureNodesHaveRanges=function(e){for(var t=0,n=e.length;tthis.getLineCount())throw new Error("Illegal value for lineNumber");this._tokens.setTokens(this._languageIdentifier.id,e-1,this._buffer.getLineLength(e),t)},t.prototype.setTokens=function(e){if(0!==e.length){for(var t=[],n=0,i=e.length;nthis.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)},t.prototype.isCheapToTokenize=function(e){return this._tokenization.isCheapToTokenize(e)},t.prototype.tokenizeIfCheap=function(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)},t.prototype.getLineTokens=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)},t.prototype._getLineTokens=function(e){var t=this.getLineContent(e),n=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,n)},t.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},t.prototype.getModeId=function(){return this._languageIdentifier.language},t.prototype.setMode=function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}},t.prototype.getLanguageIdAtPosition=function(e,t){var n=this.validatePosition(new l.a(e,t)),i=this.getLineTokens(n.lineNumber);return i.getLanguageId(i.findTokenIndexAtOffset(n.column-1))},t.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var n=this.validatePosition(e),i=this.getLineContent(n.lineNumber),o=this._getLineTokens(n.lineNumber),r=o.findTokenIndexAtOffset(n.column-1),s=t._findLanguageBoundaries(o,r),a=s[0],u=s[1],l=Object(Te.d)(n.column,Pe.a.getWordDefinition(o.getLanguageId(r)),i.substring(a,u),a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(r>0&&a===n.column-1){var c=t._findLanguageBoundaries(o,r-1),d=c[0],h=c[1],p=Object(Te.d)(n.column,Pe.a.getWordDefinition(o.getLanguageId(r-1)),i.substring(d,h),d);if(p&&p.startColumn<=e.column&&e.column<=p.endColumn)return p}return null},t._findLanguageBoundaries=function(e,t){for(var n=e.getLanguageId(t),i=0,o=t;o>=0&&e.getLanguageId(o)===n;o--)i=e.getStartOffset(o);for(var r=e.getLineContent().length,s=(o=t,e.getCount());o=0;u--){var l=n.getEndOffset(u);if(l<=a)break;Object(Re.b)(n.getStandardTokenType(u))&&(a=l)}for(var c=Math.min(o.length,e.column-1+s.maxBracketLength),d=null;;){if(!(m=Ae.a.findNextBracketInRange(s.forwardRegex,t,o,a,c)))break;if(m.startColumn<=e.column&&e.column<=m.endColumn){var h=o.substring(m.startColumn-1,m.endColumn-1).toLowerCase();(v=this._matchFoundBracket(m,s.textIsBracket[h],s.textIsOpenBracket[h]))&&(d=v)}a=m.endColumn-1}if(d)return d}if(r>0&&n.getStartOffset(r)===e.column-1){var p=r-1,f=Pe.a.getBracketsSupport(n.getLanguageId(p));if(f&&!Object(Re.b)(n.getStandardTokenType(p))){for(a=Math.max(0,e.column-1-f.maxBracketLength),c=Math.min(o.length,e.column-1+f.maxBracketLength),u=p+1;u=c)break;Object(Re.b)(n.getStandardTokenType(u))&&(c=g)}var m;if((m=Ae.a.findPrevBracketInRange(f.reversedRegex,t,o,a,c))&&m.startColumn<=e.column&&e.column<=m.endColumn){var v;h=o.substring(m.startColumn-1,m.endColumn-1).toLowerCase();if(v=this._matchFoundBracket(m,f.textIsBracket[h],f.textIsOpenBracket[h]))return v}}}return null},t.prototype._matchFoundBracket=function(e,t,n){if(!t)return null;var i;if(n){if(i=this._findMatchingBracketDown(t,e.getEndPosition()))return[e,i]}else if(i=this._findMatchingBracketUp(t,e.getStartPosition()))return[e,i];return null},t.prototype._findMatchingBracketUp=function(e,t){for(var n=e.languageIdentifier.id,i=e.reversedRegex,o=-1,r=function(t,n,r,s){for(;;){var a=Ae.a.findPrevBracketInRange(i,t,n,r,s);if(!a)break;var u=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return a;s=a.startColumn-1}return null},s=t.lineNumber;s>=1;s--){var a=this._getLineTokens(s),u=a.getCount(),l=this._buffer.getLineContent(s),c=u-1,d=l.length,h=l.length;s===t.lineNumber&&(c=a.findTokenIndexAtOffset(t.column-1),d=t.column-1,h=t.column-1);for(var p=!0;c>=0;c--){var f,g=a.getLanguageId(c)===n&&!Object(Re.b)(a.getStandardTokenType(c));if(g)p?d=a.getStartOffset(c):(d=a.getStartOffset(c),h=a.getEndOffset(c));else if(p&&d!==h)if(f=r(s,l,d,h))return f;p=g}if(p&&d!==h)if(f=r(s,l,d,h))return f}return null},t.prototype._findMatchingBracketDown=function(e,t){for(var n=e.languageIdentifier.id,i=e.forwardRegex,o=1,r=function(t,n,r,s){for(;;){var a=Ae.a.findNextBracketInRange(i,t,n,r,s);if(!a)break;var u=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return a;r=a.endColumn-1}return null},s=this.getLineCount(),a=t.lineNumber;a<=s;a++){var u=this._getLineTokens(a),l=u.getCount(),c=this._buffer.getLineContent(a),d=0,h=0,p=0;a===t.lineNumber&&(d=u.findTokenIndexAtOffset(t.column-1),h=t.column-1,p=t.column-1);for(var f=!0;d=1;o--){var r=this._getLineTokens(o),s=r.getCount(),a=this._buffer.getLineContent(o),u=s-1,l=a.length,c=a.length;if(o===t.lineNumber)u=r.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1,n!==(h=r.getLanguageId(u))&&(n=h,i=Pe.a.getBracketsSupport(n));for(var d=!0;u>=0;u--){var h;if(n!==(h=r.getLanguageId(u))){if(i&&d&&l!==c){if(p=Ae.a.findPrevBracketInRange(i.reversedRegex,o,a,l,c))return this._toFoundBracket(i,p);d=!1}n=h,i=Pe.a.getBracketsSupport(n)}var p,f=!!i&&!Object(Re.b)(r.getStandardTokenType(u));if(f)d?l=r.getStartOffset(u):(l=r.getStartOffset(u),c=r.getEndOffset(u));else if(i&&d&&l!==c)if(p=Ae.a.findPrevBracketInRange(i.reversedRegex,o,a,l,c))return this._toFoundBracket(i,p);d=f}if(i&&d&&l!==c)if(p=Ae.a.findPrevBracketInRange(i.reversedRegex,o,a,l,c))return this._toFoundBracket(i,p)}return null},t.prototype.findNextBracket=function(e){for(var t=this.validatePosition(e),n=this.getLineCount(),i=-1,o=null,r=t.lineNumber;r<=n;r++){var s=this._getLineTokens(r),a=s.getCount(),u=this._buffer.getLineContent(r),l=0,c=0,d=0;if(r===t.lineNumber)l=s.findTokenIndexAtOffset(t.column-1),c=t.column-1,d=t.column-1,i!==(p=s.getLanguageId(l))&&(i=p,o=Pe.a.getBracketsSupport(i));for(var h=!0;lt)return null;var p=this._getLineTokens(h),f=p.getCount(),g=this._buffer.getLineContent(h),m=0,v=0,_=0;if(h===i.lineNumber)m=p.findTokenIndexAtOffset(i.column-1),v=i.column-1,_=i.column-1,l!==(y=p.getLanguageId(m))&&a(l=y,c=Pe.a.getBracketsSupport(l));for(var b=!0;mo)throw new Error("Illegal value for lineNumber");for(var r=Pe.a.getFoldingRules(this._languageIdentifier.id),s=Boolean(r&&r.offSide),a=-2,u=-1,l=-2,c=-1,d=function(e){if(-1!==a&&(-2===a||a>e-1)){a=-1,u=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){a=t,u=n;break}}}if(-2===l){l=-1,c=-1;for(t=e;t=0){l=t,c=r;break}}}},h=-2,p=-1,f=-2,g=-1,m=function(e){if(-2===h){h=-1,p=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){h=t,p=n;break}}}if(-1!==f&&(-2===f||f=0){f=t,g=r;break}}}},v=0,_=!0,b=0,y=!0,C=0,w=0;_||y;w++){var S=e-w,O=e+w;if(0!==w&&(S<1||So||O>n)&&(y=!1),w>5e4&&(_=!1,y=!1),_){var L=void 0;if((D=this._computeIndentLevel(S-1))>=0?(l=S-1,c=D,L=Math.ceil(D/this._options.indentSize)):(d(S),L=this._getIndentLevelForWhitespaceLine(s,u,c)),0===w){if(v=S,b=O,0===(C=L))return{startLineNumber:v,endLineNumber:b,indent:C};continue}L>=C?v=S:_=!1}if(y){var D,x=void 0;(D=this._computeIndentLevel(O-1))>=0?(h=O-1,p=D,x=Math.ceil(D/this._options.indentSize)):(m(O),x=this._getIndentLevelForWhitespaceLine(s,p,g)),x>=C?b=O:y=!1}}return{startLineNumber:v,endLineNumber:b,indent:C}},t.prototype.getLinesIndentGuides=function(e,t){this._assertNotDisposed();var n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");for(var i=Pe.a.getFoldingRules(this._languageIdentifier.id),o=Boolean(i&&i.offSide),r=new Array(t-e+1),s=-2,a=-1,u=-2,l=-1,c=e;c<=t;c++){var d=c-e,h=this._computeIndentLevel(c-1);if(h>=0)s=c-1,a=h,r[d]=Math.ceil(h/this._options.indentSize);else{if(-2===s){s=-1,a=-1;for(var p=c-2;p>=0;p--){if((f=this._computeIndentLevel(p))>=0){s=p,a=f;break}}}if(-1!==u&&(-2===u||u=0){u=p,l=f;break}}}r[d]=this._getIndentLevelForWhitespaceLine(o,a,l)}}return r},t.prototype._getIndentLevelForWhitespaceLine=function(e,t,n){return-1===t||-1===n?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))},t}(r.a)},tXSY: /*!****************************************************************************************************!*\ !*** ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js + 3 modules ***! \****************************************************************************************************/ @@ -2556,8 +2556,8 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/arrays.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/labels.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/lifecycle.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/path.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/path.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/resources.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/gotoError.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/uri.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2565,8 +2565,8 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/range.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/core/selection.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/editorContextKeys.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/multicursor/multicursor.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModel.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplace.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/modes/languageConfigurationRegistry.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetParser.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggest.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestController.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/nls.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2649,7 +2649,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/base/common/strings.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/editor.api.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/extensions.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return _})),n.d(t,"d",(function(){return b})),n.d(t,"c",(function(){return y}));var i,o=n("N0LK"),r=n("JQT/"),s=n("pmY6"),a=n("sswD"),u=n("T8No"),l=n("24hK"),c=n("Cg/j"),d=n("9fML"),h=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=Object(c.c)("IEditorCancelService"),f=new u.d("cancellableOperation",!1);Object(d.b)(p,function(){function e(){this._tokens=new WeakMap}return e.prototype.add=function(e,t){var n,i=this._tokens.get(e);return i||(i=e.invokeWithinContext((function(e){return{key:f.bindTo(e.get(u.c)),tokens:new l.a}})),this._tokens.set(e,i)),i.key.set(!0),n=i.tokens.push(t),function(){n&&(n(),i.key.set(!i.tokens.isEmpty()),n=void 0)}},e.prototype.cancel=function(e){var t=this._tokens.get(e);if(t){var n=t.tokens.pop();n&&(n.cancel(),t.key.set(!t.tokens.isEmpty()))}},e}(),!0);var g=function(e){function t(t,n){var i=e.call(this,n)||this;return i.editor=t,i._unregister=t.invokeWithinContext((function(e){return e.get(p).add(t,i)})),i}return h(t,e),t.prototype.dispose=function(){this._unregister(),e.prototype.dispose.call(this)},t}(r.b);Object(a.g)(new(function(e){function t(){return e.call(this,{id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:f})||this}return h(t,e),t.prototype.runEditorCommand=function(e,t){e.get(p).cancel(t)},t}(a.c)));var m=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),v=function(){function e(e,t){if(this.flags=t,0!=(1&this.flags)){var n=e.getModel();this.modelVersionId=n?o.r("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;0!=(4&this.flags)?this.position=e.getPosition():this.position=null,0!=(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!=(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}return e.prototype._equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.modelVersionId===n.modelVersionId&&(this.scrollLeft===n.scrollLeft&&this.scrollTop===n.scrollTop&&(!(!this.position&&n.position||this.position&&!n.position||this.position&&n.position&&!this.position.equals(n.position))&&!(!this.selection&&n.selection||this.selection&&!n.selection||this.selection&&n.selection&&!this.selection.equalsRange(n.selection))))},e.prototype.validate=function(t){return this._equals(new e(t,this.flags))},e}(),_=function(e){function t(t,n,i){var o=e.call(this,t,i)||this;return o.editor=t,o._listener=new s.b,4&n&&o._listener.add(t.onDidChangeCursorPosition((function(e){return o.cancel()}))),2&n&&o._listener.add(t.onDidChangeCursorSelection((function(e){return o.cancel()}))),8&n&&o._listener.add(t.onDidScrollChange((function(e){return o.cancel()}))),1&n&&(o._listener.add(t.onDidChangeModel((function(e){return o.cancel()}))),o._listener.add(t.onDidChangeModelContent((function(e){return o.cancel()})))),o}return m(t,e),t.prototype.dispose=function(){this._listener.dispose(),e.prototype.dispose.call(this)},t}(g),b=function(e){function t(t,n){var i=e.call(this,n)||this;return i._listener=t.onDidChangeContent((function(){return i.cancel()})),i}return m(t,e),t.prototype.dispose=function(){this._listener.dispose(),e.prototype.dispose.call(this)},t}(r.b),y=function(){function e(e,t){this._visiblePosition=e,this._visiblePositionScrollDelta=t}return e.capture=function(t){var n=null,i=0;if(0!==t.getScrollTop()){var o=t.getVisibleRanges();if(o.length>0){n=o[0].getStartPosition();var r=t.getTopForPosition(n.lineNumber,n.column);i=t.getScrollTop()-r}}return new e(n,i)},e.prototype.restore=function(e){if(this._visiblePosition){var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}},e}()},vMFT: /*!****************************************************************************!*\ !*** ./node_modules/monaco-editor/esm/vs/base/parts/tree/browser/tree.css ***! diff --git a/p__Classrooms__Lists__Attachment__index.91d3e3e9.async.js b/p__Classrooms__Lists__Attachment__index.91d3e3e9.async.js index 32efa7566e..56cc5b3898 100644 --- a/p__Classrooms__Lists__Attachment__index.91d3e3e9.async.js +++ b/p__Classrooms__Lists__Attachment__index.91d3e3e9.async.js @@ -467,14 +467,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Attendance__Detail__index.a7061f20.async.js b/p__Classrooms__Lists__Attendance__Detail__index.a7061f20.async.js index 82d30a26aa..9003cfe389 100644 --- a/p__Classrooms__Lists__Attendance__Detail__index.a7061f20.async.js +++ b/p__Classrooms__Lists__Attendance__Detail__index.a7061f20.async.js @@ -265,14 +265,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__CommonHomework__Detail__index.5d24489b.async.js b/p__Classrooms__Lists__CommonHomework__Detail__index.5d24489b.async.js index 3dbb393b7a..f25af89bc4 100644 --- a/p__Classrooms__Lists__CommonHomework__Detail__index.5d24489b.async.js +++ b/p__Classrooms__Lists__CommonHomework__Detail__index.5d24489b.async.js @@ -1146,14 +1146,14 @@ t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<>1,u=-7,h=n?i-1:0,d= /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__CommonHomework__EditWork__index.79634fd1.async.js b/p__Classrooms__Lists__CommonHomework__EditWork__index.6bfd758f.async.js similarity index 60% rename from p__Classrooms__Lists__CommonHomework__EditWork__index.79634fd1.async.js rename to p__Classrooms__Lists__CommonHomework__EditWork__index.6bfd758f.async.js index 7144e737b9..b30892dcfc 100644 --- a/p__Classrooms__Lists__CommonHomework__EditWork__index.79634fd1.async.js +++ b/p__Classrooms__Lists__CommonHomework__EditWork__index.6bfd758f.async.js @@ -3,50 +3,50 @@ !*** ./node_modules/codemirror/mode/stex/stex.js ***! \***************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){"use strict";t.defineMode("stex",(function(t,e){function r(t,e){t.cmdState.push(e)}function i(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function n(t,e,r){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=r,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var s={};function o(t,e){t.f=e}function a(t,e){var n;if(t.match(/^\\[a-zA-Z@]+/)){var a=t.current().slice(1);return r(e,n=new(n=s.hasOwnProperty(a)?s[a]:s.DEFAULT)),o(e,c),n.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return o(e,(function(t,e){return l(t,e,"\\]")})),"keyword";if(t.match("\\("))return o(e,(function(t,e){return l(t,e,"\\)")})),"keyword";if(t.match("$$"))return o(e,(function(t,e){return l(t,e,"$$")})),"keyword";if(t.match("$"))return o(e,(function(t,e){return l(t,e,"$")})),"keyword";var u=t.next();return"%"==u?(t.skipToEnd(),"comment"):"}"==u||"]"==u?(n=i(e))?(n.closeBracket(u),o(e,c),"bracket"):"error":"{"==u||"["==u?(r(e,n=new(n=s.DEFAULT)),"bracket"):/\d/.test(u)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),"begin"==(n=function(t){for(var e=t.cmdState,r=e.length-1;r>=0;r--){var i=e[r];if("DEFAULT"!=i.name)return i}return{styleIdentifier:function(){return null}}}(e)).name&&(n.argument=t.current()),n.styleIdentifier())}function l(t,e,r){if(t.eatSpace())return null;if(r&&t.match(r))return o(e,a),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/]/))return"tag";if(t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=t.next();return"{"==i||"}"==i||"["==i||"]"==i||"("==i||")"==i?"bracket":"%"==i?(t.skipToEnd(),"comment"):"error"}function c(t,e){var r=t.peek();return"{"==r||"["==r?(i(e).openBracket(r),t.eat(r),o(e,a),"bracket"):/[ \t\r]/.test(r)?(t.eat(r),null):(o(e,a),function(t){var e=t.cmdState.pop();e&&e.closeBracket()}(e),a(t,e))}return s.importmodule=n("importmodule","tag",["string","builtin"]),s.documentclass=n("documentclass","tag",["","atom"]),s.usepackage=n("usepackage","tag",["atom"]),s.begin=n("begin","tag",["atom"]),s.end=n("end","tag",["atom"]),s.label=n("label","tag",["atom"]),s.ref=n("ref","tag",["atom"]),s.eqref=n("eqref","tag",["atom"]),s.cite=n("cite","tag",["atom"]),s.bibitem=n("bibitem","tag",["atom"]),s.Bibitem=n("Bibitem","tag",["atom"]),s.RBibitem=n("RBibitem","tag",["atom"]),s.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:e.inMathMode?function(t,e){return l(t,e)}:a}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=a,t.cmdState.length=0},lineComment:"%"}})),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")}(r(/*! ../../lib/codemirror */"VrN/"))},"19Vz": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){!function(t){"use strict";t.defineMode("stex",(function(t,e){function i(t,e){t.cmdState.push(e)}function r(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function n(t,e,i){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=i,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var s={};function o(t,e){t.f=e}function a(t,e){var n;if(t.match(/^\\[a-zA-Z@]+/)){var a=t.current().slice(1);return i(e,n=new(n=s.hasOwnProperty(a)?s[a]:s.DEFAULT)),o(e,c),n.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return o(e,(function(t,e){return l(t,e,"\\]")})),"keyword";if(t.match("\\("))return o(e,(function(t,e){return l(t,e,"\\)")})),"keyword";if(t.match("$$"))return o(e,(function(t,e){return l(t,e,"$$")})),"keyword";if(t.match("$"))return o(e,(function(t,e){return l(t,e,"$")})),"keyword";var u=t.next();return"%"==u?(t.skipToEnd(),"comment"):"}"==u||"]"==u?(n=r(e))?(n.closeBracket(u),o(e,c),"bracket"):"error":"{"==u||"["==u?(i(e,n=new(n=s.DEFAULT)),"bracket"):/\d/.test(u)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),"begin"==(n=function(t){for(var e=t.cmdState,i=e.length-1;i>=0;i--){var r=e[i];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(e)).name&&(n.argument=t.current()),n.styleIdentifier())}function l(t,e,i){if(t.eatSpace())return null;if(i&&t.match(i))return o(e,a),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/]/))return"tag";if(t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=t.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(t.skipToEnd(),"comment"):"error"}function c(t,e){var i=t.peek();return"{"==i||"["==i?(r(e).openBracket(i),t.eat(i),o(e,a),"bracket"):/[ \t\r]/.test(i)?(t.eat(i),null):(o(e,a),function(t){var e=t.cmdState.pop();e&&e.closeBracket()}(e),a(t,e))}return s.importmodule=n("importmodule","tag",["string","builtin"]),s.documentclass=n("documentclass","tag",["","atom"]),s.usepackage=n("usepackage","tag",["atom"]),s.begin=n("begin","tag",["atom"]),s.end=n("end","tag",["atom"]),s.label=n("label","tag",["atom"]),s.ref=n("ref","tag",["atom"]),s.eqref=n("eqref","tag",["atom"]),s.cite=n("cite","tag",["atom"]),s.bibitem=n("bibitem","tag",["atom"]),s.Bibitem=n("Bibitem","tag",["atom"]),s.RBibitem=n("RBibitem","tag",["atom"]),s.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:e.inMathMode?function(t,e){return l(t,e)}:a}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=a,t.cmdState.length=0},lineComment:"%"}})),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")}(i(/*! ../../lib/codemirror */"VrN/"))},"19Vz": /*!**************************************************************!*\ !*** ./node_modules/codemirror/addon/display/placeholder.js ***! \**************************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){function e(t){t.state.placeholder&&(t.state.placeholder.parentNode.removeChild(t.state.placeholder),t.state.placeholder=null)}function r(t){e(t);var r=t.state.placeholder=document.createElement("pre");r.style.cssText="height: 0; overflow: visible",r.style.direction=t.getOption("direction"),r.className="CodeMirror-placeholder CodeMirror-line-like";var i=t.getOption("placeholder");"string"==typeof i&&(i=document.createTextNode(i)),r.appendChild(i),t.display.lineSpace.insertBefore(r,t.display.lineSpace.firstChild)}function i(t){s(t)&&r(t)}function n(t){var i=t.getWrapperElement(),n=s(t);i.className=i.className.replace(" CodeMirror-empty","")+(n?" CodeMirror-empty":""),n?r(t):e(t)}function s(t){return 1===t.lineCount()&&""===t.getLine(0)}t.defineOption("placeholder","",(function(s,o,a){var l=a&&a!=t.Init;if(o&&!l)s.on("blur",i),s.on("change",n),s.on("swapDoc",n),t.on(s.getInputField(),"compositionupdate",s.state.placeholderCompose=function(){!function(t){setTimeout((function(){var i=!1,n=t.getInputField();"TEXTAREA"==n.nodeName?i=!n.value:1==t.lineCount()&&(i=!/[^\u200b]/.test(n.querySelector(".CodeMirror-line").textContent)),i?r(t):e(t)}),20)}(s)}),n(s);else if(!o&&l){s.off("blur",i),s.off("change",n),s.off("swapDoc",n),t.off(s.getInputField(),"compositionupdate",s.state.placeholderCompose),e(s);var c=s.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}o&&!s.hasFocus()&&i(s)}))}(r(/*! ../../lib/codemirror */"VrN/"))},"1eCo": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){!function(t){function e(t){t.state.placeholder&&(t.state.placeholder.parentNode.removeChild(t.state.placeholder),t.state.placeholder=null)}function i(t){e(t);var i=t.state.placeholder=document.createElement("pre");i.style.cssText="height: 0; overflow: visible",i.style.direction=t.getOption("direction"),i.className="CodeMirror-placeholder CodeMirror-line-like";var r=t.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),i.appendChild(r),t.display.lineSpace.insertBefore(i,t.display.lineSpace.firstChild)}function r(t){s(t)&&i(t)}function n(t){var r=t.getWrapperElement(),n=s(t);r.className=r.className.replace(" CodeMirror-empty","")+(n?" CodeMirror-empty":""),n?i(t):e(t)}function s(t){return 1===t.lineCount()&&""===t.getLine(0)}t.defineOption("placeholder","",(function(s,o,a){var l=a&&a!=t.Init;if(o&&!l)s.on("blur",r),s.on("change",n),s.on("swapDoc",n),t.on(s.getInputField(),"compositionupdate",s.state.placeholderCompose=function(){!function(t){setTimeout((function(){var r=!1,n=t.getInputField();"TEXTAREA"==n.nodeName?r=!n.value:1==t.lineCount()&&(r=!/[^\u200b]/.test(n.querySelector(".CodeMirror-line").textContent)),r?i(t):e(t)}),20)}(s)}),n(s);else if(!o&&l){s.off("blur",r),s.off("change",n),s.off("swapDoc",n),t.off(s.getInputField(),"compositionupdate",s.state.placeholderCompose),e(s);var c=s.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}o&&!s.hasFocus()&&r(s)}))}(i(/*! ../../lib/codemirror */"VrN/"))},"1eCo": /*!*************************************************!*\ !*** ./node_modules/codemirror/mode/xml/xml.js ***! \*************************************************/ /*! no static exports found */ /*! all exports used */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(i,n){var s,o,a=i.indentUnit,l={},c=n.htmlMode?e:r;for(var u in c)l[u]=c[u];for(var u in n)l[u]=n[u];function h(t,e){function r(r){return e.tokenize=r,r(t,e)}var i=t.next();return"<"==i?t.eat("!")?t.eat("[")?t.match("CDATA[")?r(f("atom","]]>")):null:t.match("--")?r(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),r(function t(e){return function(r,i){for(var n;null!=(n=r.next());){if("<"==n)return i.tokenize=t(e+1),i.tokenize(r,i);if(">"==n){if(1==e){i.tokenize=h;break}return i.tokenize=t(e-1),i.tokenize(r,i)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(s=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==i?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var r,i,n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=h,s=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return s="equals",null;if("<"==n){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var o=e.tokenize(t,e);return o?o+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=(r=n,(i=function(t,e){for(;!t.eol();)if(t.next()==r){e.tokenize=d;break}return"string"}).isInAttribute=!0,i),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(r,i){for(;!r.eol();){if(r.match(e)){i.tokenize=h;break}r.next()}return t}}function p(t,e,r){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=r,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function g(t){t.context&&(t.context=t.context.prev)}function m(t,e){for(var r;;){if(!t.context)return;if(r=t.context.tagName,!l.contextGrabbers.hasOwnProperty(r)||!l.contextGrabbers[r].hasOwnProperty(e))return;g(t)}}function v(t,e,r){return"openTag"==t?(r.tagStart=e.column(),y):"closeTag"==t?b:v}function y(t,e,r){return"word"==t?(r.tagName=e.current(),o="tag",C):l.allowMissingTagName&&"endTag"==t?(o="tag bracket",C(t,0,r)):(o="error",y)}function b(t,e,r){if("word"==t){var i=e.current();return r.context&&r.context.tagName!=i&&l.implicitlyClosed.hasOwnProperty(r.context.tagName)&&g(r),r.context&&r.context.tagName==i||!1===l.matchClosing?(o="tag",x):(o="tag error",S)}return l.allowMissingTagName&&"endTag"==t?(o="tag bracket",x(t,0,r)):(o="error",S)}function x(t,e,r){return"endTag"!=t?(o="error",x):(g(r),v)}function S(t,e,r){return o="error",x(t,0,r)}function C(t,e,r){if("word"==t)return o="attribute",w;if("endTag"==t||"selfcloseTag"==t){var i=r.tagName,n=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(i)?m(r,i):(m(r,i),r.context=new p(r,i,n==r.indented)),v}return o="error",C}function w(t,e,r){return"equals"==t?k:(l.allowMissing||(o="error"),C(t,0,r))}function k(t,e,r){return"string"==t?E:"word"==t&&l.allowUnquoted?(o="string",C):(o="error",C(t,0,r))}function E(t,e,r){return"string"==t?E:C(t,0,r)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:v,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;s=null;var r=e.tokenize(t,e);return(r||s)&&"comment"!=r&&(o=null,e.state=e.state(s||r,t,e),o&&(r="error"==o?r+" error":o)),r},indent:function(e,r,i){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(n&&n.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=h)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==k&&(t.state=C)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],r=t.context;r;r=r.prev)r.tagName&&e.push(r.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(r(/*! ../../lib/codemirror */"VrN/"))},"500L": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},i={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(r,n){var s,o,a=r.indentUnit,l={},c=n.htmlMode?e:i;for(var u in c)l[u]=c[u];for(var u in n)l[u]=n[u];function h(t,e){function i(i){return e.tokenize=i,i(t,e)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?i(f("atom","]]>")):null:t.match("--")?i(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),i(function t(e){return function(i,r){for(var n;null!=(n=i.next());){if("<"==n)return r.tokenize=t(e+1),r.tokenize(i,r);if(">"==n){if(1==e){r.tokenize=h;break}return r.tokenize=t(e-1),r.tokenize(i,r)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(s=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var i,r,n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=h,s=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return s="equals",null;if("<"==n){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var o=e.tokenize(t,e);return o?o+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=(i=n,(r=function(t,e){for(;!t.eol();)if(t.next()==i){e.tokenize=d;break}return"string"}).isInAttribute=!0,r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(i,r){for(;!i.eol();){if(i.match(e)){r.tokenize=h;break}i.next()}return t}}function p(t,e,i){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=i,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function g(t){t.context&&(t.context=t.context.prev)}function m(t,e){for(var i;;){if(!t.context)return;if(i=t.context.tagName,!l.contextGrabbers.hasOwnProperty(i)||!l.contextGrabbers[i].hasOwnProperty(e))return;g(t)}}function v(t,e,i){return"openTag"==t?(i.tagStart=e.column(),y):"closeTag"==t?b:v}function y(t,e,i){return"word"==t?(i.tagName=e.current(),o="tag",C):l.allowMissingTagName&&"endTag"==t?(o="tag bracket",C(t,0,i)):(o="error",y)}function b(t,e,i){if("word"==t){var r=e.current();return i.context&&i.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(i.context.tagName)&&g(i),i.context&&i.context.tagName==r||!1===l.matchClosing?(o="tag",x):(o="tag error",S)}return l.allowMissingTagName&&"endTag"==t?(o="tag bracket",x(t,0,i)):(o="error",S)}function x(t,e,i){return"endTag"!=t?(o="error",x):(g(i),v)}function S(t,e,i){return o="error",x(t,0,i)}function C(t,e,i){if("word"==t)return o="attribute",w;if("endTag"==t||"selfcloseTag"==t){var r=i.tagName,n=i.tagStart;return i.tagName=i.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(r)?m(i,r):(m(i,r),i.context=new p(i,r,n==i.indented)),v}return o="error",C}function w(t,e,i){return"equals"==t?k:(l.allowMissing||(o="error"),C(t,0,i))}function k(t,e,i){return"string"==t?E:"word"==t&&l.allowUnquoted?(o="string",C):(o="error",C(t,0,i))}function E(t,e,i){return"string"==t?E:C(t,0,i)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:v,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;s=null;var i=e.tokenize(t,e);return(i||s)&&"comment"!=i&&(o=null,e.state=e.state(s||i,t,e),o&&(i="error"==o?i+" error":o)),i},indent:function(e,i,r){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(n&&n.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==k&&(t.state=C)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],i=t.context;i;i=i.prev)i.tagName&&e.push(i.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(i(/*! ../../lib/codemirror */"VrN/"))},"500L": /*!**********************************************!*\ !*** ./src/components/MultiUpload/index.tsx ***! \**********************************************/ /*! exports provided: coverToFileList, default */ -/*! exports used: coverToFileList, default */function(t,e,r){"use strict";r.d(e,"a",(function(){return x}));r(/*! antd/es/button/style */"+L6B");var i=r(/*! antd/es/button */"2/Rp"),n=(r(/*! antd/es/modal/style */"2qtc"),r(/*! antd/es/modal */"kLXV")),s=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=(r(/*! antd/es/message/style */"miYZ"),r(/*! antd/es/message */"tsqr")),l=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),c=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),u=(r(/*! antd/es/upload/style */"DZo9"),r(/*! antd/es/upload */"8z0m")),h=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),d=r.n(h),f=r(/*! react */"q1tI"),p=r.n(f),g=r(/*! @/utils/env */"m3rI"),m=r(/*! @/pages/MoopCases/FormPanel/service */"wzkS"),v=r(/*! ../SingleUpload */"y5JW"),y=r(/*! @ant-design/icons */"LtfV"),b=u.a.Dragger;function x(t){var e=[];return t&&t.length>0&&(e=t.map((function(t){return{uid:t.id,id:t.id,name:t.title+v.c+t.filesize,url:t.url,filesize:t.filesize,status:"done",response:{id:t.id}}}))),e}e.b=function(t){var e=t.value,r=t.onChange,h=t.action,x=t.className,S=t.maxSize,C=void 0===S?150:S,w=t.title,k=void 0===w?"上传附件":w,E=t.showRemoveModal,T=void 0!==E&&E,L=t.accept,A=void 0===L?"":L,D=t.additionalText,R=t.isDragger,O=t.number,_=void 0===O?1e3:O,I=t.aloneClear,M=void 0!==I&&I,P=t.restrict,N=void 0===P||P,F=Object(f.useState)(!1),B=Object(c.a)(F,2),j=B[0],U=B[1],H=Object(f.useState)(e||[]),G=Object(c.a)(H,2),z=G[0],W=G[1];Object(f.useEffect)((function(){e&&(W(Object(l.a)(e)),_===(null==e?void 0:e.length)&&U(!0))}),[e]);var V,K=function(){setTimeout((function(){z.pop(),W(Object(l.a)(z))}),500)},q={multiple:!0,disabled:j,accept:A,withCredentials:!0,fileList:z,beforeUpload:function(t,e){var r=t.size/1024/1024;return z.concat(e).length>_?(z.pop(),W(Object(l.a)(z)),a.b.error("最多只能上传".concat(_,"个文件")),M?Promise.reject():(K(),!1)):r=_?U(!0):U(!1),W(Object(l.a)(e)),e=e.map((function(t){var e,r;null!=t&&null!==(e=t.response)&&void 0!==e&&e.id&&(t.url="/api/attachments/".concat(null==t||null===(r=t.response)||void 0===r?void 0:r.id));return-1===t.name.indexOf(v.c)&&(t.name="".concat(t.name).concat(v.c).concat(Object(v.a)(t.size))),Object(o.a)({},t)})),console.log("info:",t),r(e)},onRemove:(V=Object(s.a)(d.a.mark((function t(e){var r;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=function(){var t=Object(s.a)(d.a.mark((function t(){var r;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.response?e.response.id:e.id)){t.next=8;break}return t.next=4,Object(m.d)(e.response?e.response.id:e.uid);case 4:return r=t.sent,t.abrupt("return",r);case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),!T){t.next=5;break}return t.abrupt("return",new Promise((function(t,e){var i;n.a.confirm({centered:!0,width:530,okText:"确定",cancelText:"取消",title:"提示",content:p.a.createElement("div",{className:"tc font16"},"是否确认删除?"),onOk:(i=Object(s.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:e.sent,a.b.success("删除成功"),t(!0);case 5:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)}),onCancel:function(){return t(!1)}})})));case 5:return t.next=7,r();case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t)}))),function(t){return V.apply(this,arguments)})};return p.a.createElement("div",{className:"multi-upload ".concat(x||"")},R&&p.a.createElement(b,q,p.a.createElement("p",{className:"ant-upload-drag-icon"},p.a.createElement(y.a,null)),p.a.createElement("p",{className:"ant-upload-text"},"点击上传图标,选择要上传的文件或将文件拖拽到此",p.a.createElement("br",null),p.a.createElement("span",{style:{display:N?"block":"none"}},"(单个文件最大限制为",C,"MB) ")),D),!R&&p.a.createElement(u.a,q,p.a.createElement(i.a,{disabled:j},k),p.a.createElement("span",{onClick:function(t){t.preventDefault(),t.stopPropagation()},style:{marginLeft:10,color:"#FA6400",display:N?"block":"none"}},"(单个文件最大",C,"MB) ")))}},"55Ip": +/*! exports used: coverToFileList, default */function(t,e,i){"use strict";i.d(e,"a",(function(){return x}));i(/*! antd/es/button/style */"+L6B");var r=i(/*! antd/es/button */"2/Rp"),n=(i(/*! antd/es/modal/style */"2qtc"),i(/*! antd/es/modal */"kLXV")),s=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=(i(/*! antd/es/message/style */"miYZ"),i(/*! antd/es/message */"tsqr")),l=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),c=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),u=(i(/*! antd/es/upload/style */"DZo9"),i(/*! antd/es/upload */"8z0m")),h=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),d=i.n(h),f=i(/*! react */"q1tI"),p=i.n(f),g=i(/*! @/utils/env */"m3rI"),m=i(/*! @/pages/MoopCases/FormPanel/service */"wzkS"),v=i(/*! ../SingleUpload */"y5JW"),y=i(/*! @ant-design/icons */"LtfV"),b=u.a.Dragger;function x(t){var e=[];return t&&t.length>0&&(e=t.map((function(t){return{uid:t.id,id:t.id,name:t.title+v.c+t.filesize,url:t.url,filesize:t.filesize,status:"done",response:{id:t.id}}}))),e}e.b=function(t){var e=t.value,i=t.onChange,h=t.action,x=t.className,S=t.maxSize,C=void 0===S?150:S,w=t.title,k=void 0===w?"上传附件":w,E=t.showRemoveModal,T=void 0!==E&&E,L=t.accept,A=void 0===L?"":L,D=t.additionalText,R=t.isDragger,O=t.number,_=void 0===O?1e3:O,I=t.aloneClear,M=void 0!==I&&I,P=t.restrict,N=void 0===P||P,F=Object(f.useState)(!1),B=Object(c.a)(F,2),j=B[0],U=B[1],H=Object(f.useState)(e||[]),G=Object(c.a)(H,2),z=G[0],W=G[1];Object(f.useEffect)((function(){e&&(W(Object(l.a)(e)),_===(null==e?void 0:e.length)&&U(!0))}),[e]);var V,K=function(){setTimeout((function(){z.pop(),W(Object(l.a)(z))}),500)},q={multiple:!0,disabled:j,accept:A,withCredentials:!0,fileList:z,beforeUpload:function(t,e){var i=t.size/1024/1024;return z.concat(e).length>_?(z.pop(),W(Object(l.a)(z)),a.b.error("最多只能上传".concat(_,"个文件")),M?Promise.reject():(K(),!1)):i=_?U(!0):U(!1),W(Object(l.a)(e)),e=e.map((function(t){var e,i;null!=t&&null!==(e=t.response)&&void 0!==e&&e.id&&(t.url="/api/attachments/".concat(null==t||null===(i=t.response)||void 0===i?void 0:i.id));return-1===t.name.indexOf(v.c)&&(t.name="".concat(t.name).concat(v.c).concat(Object(v.a)(t.size))),Object(o.a)({},t)})),console.log("info:",t),i(e)},onRemove:(V=Object(s.a)(d.a.mark((function t(e){var i;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=function(){var t=Object(s.a)(d.a.mark((function t(){var i;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.response?e.response.id:e.id)){t.next=8;break}return t.next=4,Object(m.d)(e.response?e.response.id:e.uid);case 4:return i=t.sent,t.abrupt("return",i);case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),!T){t.next=5;break}return t.abrupt("return",new Promise((function(t,e){var r;n.a.confirm({centered:!0,width:530,okText:"确定",cancelText:"取消",title:"提示",content:p.a.createElement("div",{className:"tc font16"},"是否确认删除?"),onOk:(r=Object(s.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i();case 2:e.sent,a.b.success("删除成功"),t(!0);case 5:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)}),onCancel:function(){return t(!1)}})})));case 5:return t.next=7,i();case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t)}))),function(t){return V.apply(this,arguments)})};return p.a.createElement("div",{className:"multi-upload ".concat(x||"")},R&&p.a.createElement(b,q,p.a.createElement("p",{className:"ant-upload-drag-icon"},p.a.createElement(y.a,null)),p.a.createElement("p",{className:"ant-upload-text"},"点击上传图标,选择要上传的文件或将文件拖拽到此",p.a.createElement("br",null),p.a.createElement("span",{style:{display:N?"block":"none"}},"(单个文件最大限制为",C,"MB) ")),D),!R&&p.a.createElement(u.a,q,p.a.createElement(r.a,{disabled:j},k),p.a.createElement("span",{onClick:function(t){t.preventDefault(),t.stopPropagation()},style:{marginLeft:10,color:"#FA6400",display:N?"block":"none"}},"(单个文件最大",C,"MB) ")))}},"55Ip": /*!***************************************************************!*\ !*** ./node_modules/react-router-dom/esm/react-router-dom.js ***! \***************************************************************/ /*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */ -/*! exports used: Link, NavLink */function(t,e,r){"use strict";r.d(e,"a",(function(){return m})),r.d(e,"b",(function(){return b}));var i=r(/*! react-router */"Ty5D"),n=r(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),s=r(/*! react */"q1tI"),o=r.n(s),a=r(/*! history */"YS25"),l=(r(/*! prop-types */"17x9"),r(/*! @babel/runtime/helpers/esm/extends */"wx14")),c=r(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),u=r(/*! tiny-invariant */"9R94");o.a.Component;o.a.Component;var h=function(t,e){return"function"==typeof t?t(e):t},d=function(t,e){return"string"==typeof t?Object(a.c)(t,null,null,e):t},f=function(t){return t},p=o.a.forwardRef;void 0===p&&(p=f);var g=p((function(t,e){var r=t.innerRef,i=t.navigate,n=t.onClick,s=Object(c.a)(t,["innerRef","navigate","onClick"]),a=s.target,u=Object(l.a)({},s,{onClick:function(t){try{n&&n(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||a&&"_self"!==a||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),i())}});return u.ref=f!==p&&e||r,o.a.createElement("a",u)}));var m=p((function(t,e){var r=t.component,n=void 0===r?g:r,s=t.replace,a=t.to,m=t.innerRef,v=Object(c.a)(t,["component","replace","to","innerRef"]);return o.a.createElement(i.e.Consumer,null,(function(t){t||Object(u.a)(!1);var r=t.history,i=d(h(a,t.location),t.location),c=i?r.createHref(i):"",g=Object(l.a)({},v,{href:c,navigate:function(){var e=h(a,t.location);(s?r.replace:r.push)(e)}});return f!==p?g.ref=e||m:g.innerRef=m,o.a.createElement(n,g)}))})),v=function(t){return t},y=o.a.forwardRef;void 0===y&&(y=v);var b=y((function(t,e){var r=t["aria-current"],n=void 0===r?"page":r,s=t.activeClassName,a=void 0===s?"active":s,f=t.activeStyle,p=t.className,g=t.exact,b=t.isActive,x=t.location,S=t.sensitive,C=t.strict,w=t.style,k=t.to,E=t.innerRef,T=Object(c.a)(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.a.createElement(i.e.Consumer,null,(function(t){t||Object(u.a)(!1);var r=x||t.location,s=d(h(k,r),r),c=s.pathname,L=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),A=L?Object(i.f)(r.pathname,{path:L,exact:g,sensitive:S,strict:C}):null,D=!!(b?b(A,r):A),R=D?function(){for(var t=arguments.length,e=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:0,r=(l[t[e+0]]+l[t[e+1]]+l[t[e+2]]+l[t[e+3]]+"-"+l[t[e+4]]+l[t[e+5]]+"-"+l[t[e+6]]+l[t[e+7]]+"-"+l[t[e+8]]+l[t[e+9]]+"-"+l[t[e+10]]+l[t[e+11]]+l[t[e+12]]+l[t[e+13]]+l[t[e+14]]+l[t[e+15]]).toLowerCase();if(!a(r))throw TypeError("Stringified UUID is invalid");return r};e.a=function(t,e,r){var i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(var n=0;n<16;++n)e[r+n]=i[n];return e}return u(i)}},"7ahc": +/*! exports used: default */function(t,e,i){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),n=new Uint8Array(16);function s(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var a=function(t){return"string"==typeof t&&o.test(t)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(l[t[e+0]]+l[t[e+1]]+l[t[e+2]]+l[t[e+3]]+"-"+l[t[e+4]]+l[t[e+5]]+"-"+l[t[e+6]]+l[t[e+7]]+"-"+l[t[e+8]]+l[t[e+9]]+"-"+l[t[e+10]]+l[t[e+11]]+l[t[e+12]]+l[t[e+13]]+l[t[e+14]]+l[t[e+15]]).toLowerCase();if(!a(i))throw TypeError("Stringified UUID is invalid");return i};e.a=function(t,e,i){var r=(t=t||{}).random||(t.rng||s)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){i=i||0;for(var n=0;n<16;++n)e[i+n]=r[n];return e}return u(r)}},"7ahc": /*!*************************************************************!*\ !*** ./src/components/markdown-editor/code-block/index.tsx ***! \*************************************************************/ /*! exports provided: default, MyCodeMirror */ -/*! exports used: MyCodeMirror, default */function(t,e,r){"use strict";r.d(e,"a",(function(){return m}));var i=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),n=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),s=(r(/*! antd/es/button/style */"+L6B"),r(/*! antd/es/button */"2/Rp")),o=(r(/*! antd/es/form/style */"y8nQ"),r(/*! antd/es/form */"Vl3Y")),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(r(/*! antd/es/select/style */"OaEy"),r(/*! antd/es/select */"2fM7")),c=r(/*! react */"q1tI"),u=r.n(c),h=r(/*! codemirror */"VrN/"),d=r.n(h),f=(r(/*! codemirror/lib/codemirror.css */"p77/"),r(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},g={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function m(t){var e=t.value,r=t.onChange,n=t.mode,s=t.options,o=void 0===s?{}:s,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(a.a)(h,2),p=f[0],g=f[1];return Object(c.useEffect)((function(){if(p){function t(t){var e=t.getValue();r&&r(e)}return p.on("change",t),function(){p.off("change",t)}}}),[p,r]),Object(c.useEffect)((function(){p&&p.setOption("mode",n)}),[p,n]),Object(c.useEffect)((function(){p&&(e===p.getValue()&&""!==e||setTimeout((function(){p.setValue(e||" ")}),300))}),[p,e]),Object(c.useEffect)((function(){if(l.current&&!p){var t=d.a.fromTextArea(l.current,Object(i.a)({mode:n,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},o));g(t)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}e.b=function(t){var e=t.callback,r=t.onCancel,i=Object(c.useState)("python"),h=Object(a.a)(i,2),d=h[0],v=h[1];return u.a.createElement(o.a,Object(n.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(t){e(t)}}),u.a.createElement(o.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(t){v(g[t][1])}},Object.keys(g).map((function(t){return u.a.createElement(f,{key:t,value:t},g[t][0])})))),u.a.createElement(o.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(m,{mode:d})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(s.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(s.a,{type:"ghost",onClick:r},"取消")))}},"8EBN": +/*! exports used: MyCodeMirror, default */function(t,e,i){"use strict";i.d(e,"a",(function(){return m}));var r=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),n=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),s=(i(/*! antd/es/button/style */"+L6B"),i(/*! antd/es/button */"2/Rp")),o=(i(/*! antd/es/form/style */"y8nQ"),i(/*! antd/es/form */"Vl3Y")),a=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(i(/*! antd/es/select/style */"OaEy"),i(/*! antd/es/select */"2fM7")),c=i(/*! react */"q1tI"),u=i.n(c),h=i(/*! codemirror */"VrN/"),d=i.n(h),f=(i(/*! codemirror/lib/codemirror.css */"p77/"),i(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},g={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function m(t){var e=t.value,i=t.onChange,n=t.mode,s=t.options,o=void 0===s?{}:s,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(a.a)(h,2),p=f[0],g=f[1];return Object(c.useEffect)((function(){if(p){function t(t){var e=t.getValue();i&&i(e)}return p.on("change",t),function(){p.off("change",t)}}}),[p,i]),Object(c.useEffect)((function(){p&&p.setOption("mode",n)}),[p,n]),Object(c.useEffect)((function(){p&&(e===p.getValue()&&""!==e||setTimeout((function(){p.setValue(e||" ")}),300))}),[p,e]),Object(c.useEffect)((function(){if(l.current&&!p){var t=d.a.fromTextArea(l.current,Object(r.a)({mode:n,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},o));g(t)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}e.b=function(t){var e=t.callback,i=t.onCancel,r=Object(c.useState)("python"),h=Object(a.a)(r,2),d=h[0],v=h[1];return u.a.createElement(o.a,Object(n.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(t){e(t)}}),u.a.createElement(o.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(t){v(g[t][1])}},Object.keys(g).map((function(t){return u.a.createElement(f,{key:t,value:t},g[t][0])})))),u.a.createElement(o.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(m,{mode:d})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(s.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(s.a,{type:"ghost",onClick:i},"取消")))}},"8EBN": /*!**********************************************!*\ !*** ./node_modules/codemirror/mode/meta.js ***! \**********************************************/ /*! no static exports found */ /*! all exports used */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){"use strict";t.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var e=0;e-1&&e.substring(n+1,e.length);if(s)return t.findModeByExtension(s)},t.findModeByName=function(e){e=e.toLowerCase();for(var r=0;r-1&&e.substring(n+1,e.length);if(s)return t.findModeByExtension(s)},t.findModeByName=function(e){e=e.toLowerCase();for(var i=0;i"],v=new f.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){g.length=0,m=["
      "]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function S(){return function t(e,r,i,n){if(r>=e.length||e[r].level<=i)return r;var s=e[r];n.push("
    • "+s.text+"");var o=[];return r=t(e,++r,s.level,o),o.length>0&&(n.push("
        "),o.forEach((function(t){n.push(t)})),n.push("
      ")),n.push("
    • "),r=t(e,r,i,n)}(g,0,0,m),m.push("
    "),m.join("")}var C={heading:function(t){var e=y.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},fences:function(t){var e=this.rules.block.fences.exec(t);if(e){var r=e[0],i=function(t,e){var r=t.match(/^(\s+)(?:```)/);if(null===r)return e;var i=r[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:Object(a.a)(e,1)[0].length>=i.length?t.slice(i.length):t})).join("\n")}(r,e[3]||""),n=e[2]?e[2].trim():e[2];if(["latex","katex","math"].indexOf(n)>=0){var s=E(),o=i;i=s,T[s]={type:"block",expression:o}}return{type:"code",raw:r,lang:n,text:i}}}},w=/(?:\${2})([^\n`]+?)(?:\${2})/gi,k=0,E=function(){return"__special_katext_id_".concat(k++,"__")},T={};function L(){k=0,T={}}function A(t){return t=t.replace(w,(function(t,e){var r=E();return T[r]={type:"inline",expression:e},r}))}var D=v.listitem;v.listitem=function(t){return D(A(t))};var R=v.paragraph;v.paragraph=function(t){return R(A(t))};var O=v.tablecell;v.tablecell=function(t,e){return O(A(t),e)},v.code=function(t,e,r){var i=(e||"").match(/\S*/)[0];return i?["latex","katex","math"].indexOf(i)>=0?"

    ".concat(t,"

    "):'
    ').concat(r?t:Object(p.escape)(t,!0),"
    \n"):'
    '+(r?t:Object(p.escape)(t,!0))+"
    "},v.heading=function(t,e,r){var i=this.options.headerPrefix+r.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return g.push({anchor:i,level:e,text:t}),"'+t+""},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:C,renderer:v});var _=f.a,I=(r("SJMd"),r("ulZh")),M=r.n(I),P=r("m3rI"),N=r("Oy/b"),F=r("p5ED"),B=r("ErOA"),j=function(t,e){return(j=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function U(t,e){function r(){this.constructor=t}j(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function H(t,e,r,i){return new(r||(r=Promise))((function(n,s){function o(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))}function G(t,e){var r,i,n,s,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,i&&(n=2&s[0]?i.return:s[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;switch(i=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]',"select"),this.addActionButton(r,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(r,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(r,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(r,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(r,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(r,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(r,'',"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(t){var r=document.createElement("div");r.className=""+e.toolbarButtonStyleClass.name,r.setAttribute("data-type-name",t.typeName),r.innerHTML=t.icon,r.addEventListener("click",(function(){e.markerToolbarButtonClicked(r,t)})),e.buttons.push(r),e.markerButtons.push(r)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var i=document.createElement("div");i.className=this.toolbarBlockStyleClass.name,i.style.whiteSpace="nowrap",i.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(i),this.addActionButton(i,'',"render"),this.addActionButton(i,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},t.prototype.addButtonClickListener=function(t){this.buttonClickListeners.push(t)},t.prototype.removeButtonClickListener=function(t){this.buttonClickListeners.indexOf(t)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(t),1)},t.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},t.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var t=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var e=0;e0&&this.buttonClickListeners.forEach((function(t){return t("marker",e)})),this.markerButtonOverflowBlock.style.display="none"},t.prototype.actionToolbarButtonClicked=function(t,e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("action",e)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},t.prototype.setActiveButton=function(t){this.resetButtonStyles(),t.className=t.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),t.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},t.prototype.setActiveMarkerButton=function(t){var e=this.markerButtons.find((function(e){return e.getAttribute("data-type-name")===t}));e&&this.setActiveButton(e)},t.prototype.setCurrentMarker=function(t){var e=this;this.currentMarker=t,this.buttons.filter((function(t){return/delete|notes/.test(t.getAttribute("data-action"))})).forEach((function(t){void 0===e.currentMarker?(t.style.fillOpacity="0.4",t.style.pointerEvents="none"):(t.style.fillOpacity="1",t.style.pointerEvents="all")}))},t}(),Q=function(){function t(t,e,r,i){this.panels=[],this.panelButtons=[],this.markerjsContainer=t,this.displayMode=e,this.uiStyleSettings=r,this.styles=i,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return t.prototype.addStyles=function(){var t;this.toolboxStyleClass=this.styles.addClass(new $("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new $("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new $("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new $("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new $("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new $("toolbox-panel-row_colors","\n background-color: "+(null!==(t=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==t?t:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new $("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new $("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new X("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new X("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},t.prototype.show=function(t){var e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==e?e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},t.prototype.setPanelButtons=function(t){var e,r,i=this;this.panels=t,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==e?e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(r=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==r?r:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(t){var e;t.uiStyleSettings=i.uiStyleSettings;var r=document.createElement("div");r.className=i.toolboxButtonStyleClass.name+" "+(null!==(e=i.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==e?e:i.toolboxButtonStyleColorsClass.name),r.innerHTML=t.icon,r.title=t.title,r.addEventListener("click",(function(){i.panelButtonClick(t)})),i.panelButtons.push(r),i.buttonRow.appendChild(r)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},t.prototype.panelButtonClick=function(t){var e=this,r=-1;if(t!==this.activePanel){r=this.panels.indexOf(t),this.panelRow.innerHTML="";var i=t.getUi();i.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(i),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=t}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===e.displayMode?e.panelRow.style.display="none":e.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(t,i){var n,s;t.className=e.toolboxButtonStyleClass.name+" "+(i===r?""+(null!==(n=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==n?n:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(s=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==s?s:e.toolboxButtonStyleColorsClass.name))}))},t}(),J=function(t,e){this.title=t,this.icon=e},tt=function(t){function e(e,r,i,n){var s=t.call(this,e,n||'')||this;return s.colors=[],s.addTransparent=!1,s.colorBoxes=[],s.colors=r,s.currentColor=i,s.setCurrentColor=s.setCurrentColor.bind(s),s.getColorBox=s.getColorBox.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.whiteSpace="nowrap",this.colors.forEach((function(r){var i=t.getColorBox(r);e.appendChild(i),t.colorBoxes.push(i)})),e},e.prototype.getColorBox=function(t){var e=this,r=this.uiStyleSettings.toolbarHeight/4,i=this.uiStyleSettings.toolbarHeight-r,n=document.createElement("div");n.style.display="inline-block",n.style.boxSizing="content-box",n.style.width=i-2+"px",n.style.height=i-2+"px",n.style.padding="1px",n.style.marginRight="2px",n.style.marginBottom="2px",n.style.borderWidth="2px",n.style.borderStyle="solid",n.style.borderRadius=(i+2)/2+"px",n.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",n.addEventListener("click",(function(){e.setCurrentColor(t,n)}));var s=document.createElement("div");return s.style.display="inline-block",s.style.width=i-2+"px",s.style.height=i-2+"px",s.style.backgroundColor=t,s.style.borderRadius=i/2+"px","transparent"===t&&(s.style.fill=this.uiStyleSettings.toolboxAccentColor,s.innerHTML='\n \n '),n.appendChild(s),n},e.prototype.setCurrentColor=function(t,e){var r=this;this.currentColor=t,this.colorBoxes.forEach((function(t){t.style.borderColor=t===e?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},e}(J),et=function(){function t(t,e,r){this._state="new",this._isSelected=!1,this._container=t,this._overlayContainer=e,this.globalSettings=r,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(t.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!1},Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},t.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},t.prototype.pointerDown=function(t,e){},t.prototype.dblClick=function(t,e){},t.prototype.manipulate=function(t){},t.prototype.pointerUp=function(t){this.stateChanged()},t.prototype.dispose=function(){},t.prototype.addMarkerVisualToContainer=function(t){this.container.childNodes.length>0?this.container.insertBefore(t,this.container.childNodes[0]):this.container.appendChild(t)},t.prototype.getState=function(){return{typeName:t.typeName,state:this.state,notes:this.notes}},t.prototype.restoreState=function(t){this._state=t.state,this.notes=t.notes},t.prototype.scale=function(t,e){},t.prototype.colorChanged=function(t){this.onColorChanged&&this.onColorChanged(t),this.stateChanged()},t.prototype.fillColorChanged=function(t){this.onFillColorChanged&&this.onFillColorChanged(t),this.stateChanged()},t.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var t=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),t.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(t)&&this.onStateChanged(this)}},t.typeName="MarkerBase",t}(),rt=function(){function t(){this.findGripByVisual=this.findGripByVisual.bind(this)}return t.prototype.findGripByVisual=function(t){return this.topLeft.ownsTarget(t)?this.topLeft:this.topCenter.ownsTarget(t)?this.topCenter:this.topRight.ownsTarget(t)?this.topRight:this.centerLeft.ownsTarget(t)?this.centerLeft:this.centerRight.ownsTarget(t)?this.centerRight:this.bottomLeft.ownsTarget(t)?this.bottomLeft:this.bottomCenter.ownsTarget(t)?this.bottomCenter:this.bottomRight.ownsTarget(t)?this.bottomRight:void 0},t}(),it=function(){function t(){this.GRIP_SIZE=10,this.visual=W.createGroup(),this.visual.appendChild(W.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(W.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t}(),nt=function(){function t(){}return t.toITransformMatrix=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},t.toSVGMatrix=function(t,e){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},t}(),st=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.left=0,n.top=0,n.width=0,n.height=0,n.defaultSize={x:50,y:20},n.offsetX=0,n.offsetY=0,n.rotationAngle=0,n.CB_DISTANCE=10,n._suppressMarkerCreateEvent=!1,n.container.transform.baseVal.appendItem(W.createTransform()),n.setupControlBox(),n}return U(e,t),Object.defineProperty(e.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var e=W.createTransform();this._visual.transform.baseVal.appendItem(e)},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!!(void 0!==this.controlGrips.findGripByVisual(e)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(e))},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),"new"===this.state&&(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 i=this.unrotatePoint(e);if(this.manipulationStartX=i.x,this.manipulationStartY=i.y,this.offsetX=i.x-this.left,this.offsetY=i.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(r),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(r)){this.activeGrip=this.rotatorGrip;var n=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=n.x-this.width/2,this.top=n.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var s=this.container.transform.baseVal.getItem(0);s.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(s,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},e.prototype.pointerUp=function(e){var r=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(e),this._state="select","creating"===r&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},e.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},e.prototype.manipulate=function(t){var e=this.unrotatePoint(t);"creating"===this.state?this.resize(t):"move"===this.state?(this.left=this.manipulationStartLeft+(e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(e):"rotate"===this.state&&this.rotate(t)},e.prototype.resize=function(t){var e=this.manipulationStartLeft,r=this.manipulationStartWidth,i=this.manipulationStartTop,n=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:e=this.manipulationStartLeft+t.x-this.manipulationStartX,r=this.manipulationStartWidth+this.manipulationStartLeft-e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:r=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:i=this.manipulationStartTop+t.y-this.manipulationStartY,n=this.manipulationStartHeight+this.manipulationStartTop-i;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:n=this.manipulationStartHeight+t.y-this.manipulationStartY}r>=0?(this.left=e,this.width=r):(this.left=e+r,this.width=-r),n>=0?(this.top=i,this.height=n):(this.top=i+n,this.height=-n),this.setSize()},e.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},e.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var e=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*e,this.applyRotation()}},e.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},e.prototype.rotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM(),r=W.createPoint(t.x,t.y);return{x:(r=r.matrixTransform(e)).x,y:r.y}},e.prototype.unrotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM();e=e.inverse();var r=W.createPoint(t.x,t.y);return{x:(r=r.matrixTransform(e)).x,y:r.y}},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=W.createGroup();var t=W.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=W.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),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=W.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 rt,this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(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()},e.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(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},e.prototype.createGrip=function(){var t=new it;return t.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,e=-t/2,r=e,i=(this.width+this.CB_DISTANCE)/2-t/2,n=(this.height+this.CB_DISTANCE)/2-t/2,s=this.height+this.CB_DISTANCE-t/2,o=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,e,r),this.positionGrip(this.controlGrips.topCenter.visual,i,r),this.positionGrip(this.controlGrips.topRight.visual,o,r),this.positionGrip(this.controlGrips.centerLeft.visual,e,n),this.positionGrip(this.controlGrips.centerRight.visual,o,n),this.positionGrip(this.controlGrips.bottomLeft.visual,e,s),this.positionGrip(this.controlGrips.bottomCenter.visual,i,s),this.positionGrip(this.controlGrips.bottomRight.visual,o,s),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,i,r-3*this.CB_DISTANCE)},e.prototype.positionGrip=function(t,e,r){var i=t.transform.baseVal.getItem(0);i.setTranslate(e,r),t.transform.baseVal.replaceItem(i,0)},e.prototype.hideControlBox=function(){this.controlBox.style.display="none"},e.prototype.showControlBox=function(){this.controlBox.style.display=""},e.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:nt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:nt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var r=e;this.left=r.left,this.top=r.top,this.width=r.width,this.height=r.height,this.rotationAngle=r.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(nt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,r.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(nt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,r.containerTransformMatrix))},e.prototype.scale=function(e,r){t.prototype.scale.call(this,e,r);var i=this.rotatePoint({x:this.left,y:this.top}),n=this.unrotatePoint({x:i.x*e,y:i.y*r});this.left=n.x,this.top=n.y,this.width=this.width*e,this.height=this.height*r,this.adjustControlBox()},e}(et),ot=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.fillColor="transparent",n.strokeColor="transparent",n.strokeWidth=0,n.strokeDasharray="",n.opacity=1,n.setStrokeColor=n.setStrokeColor.bind(n),n.setFillColor=n.setFillColor.bind(n),n.setStrokeWidth=n.setStrokeWidth.bind(n),n.setStrokeDasharray=n.setStrokeDasharray.bind(n),n.createVisual=n.createVisual.bind(n),n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},e.prototype.createVisual=function(){this.visual=W.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)},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},e.prototype.setSize=function(){t.prototype.setSize.call(this),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&W.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&W.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&W.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&W.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){var r=e;this.fillColor=r.fillColor,this.strokeColor=r.strokeColor,this.strokeWidth=r.strokeWidth,this.strokeDasharray=r.strokeDasharray,this.opacity=r.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,r){t.prototype.scale.call(this,e,r),this.setSize()},e.title="Rectangle marker",e}(st),at=function(t){function e(e,r,i,n){var s=t.call(this,e,n||'')||this;return s.widths=[],s.widthBoxes=[],s.widths=r,s.currentWidth=i,s.setCurrentWidth=s.setCurrentWidth.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.widths.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.flexGrow="2",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=r===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentWidth(r,i)})),e.appendChild(i);var n=document.createElement("div");n.innerText=r.toString(),n.style.marginRight="5px",i.appendChild(n);var s=document.createElement("div");s.style.minHeight="20px",s.style.flexGrow="2",s.style.display="flex",s.style.alignItems="center";var o=document.createElement("hr");o.style.minWidth="20px",o.style.border="0px",o.style.borderTop=r+"px solid "+t.uiStyleSettings.toolboxColor,o.style.flexGrow="2",s.appendChild(o),i.appendChild(s),t.widthBoxes.push(i)})),e},e.prototype.setCurrentWidth=function(t,e){var r=this;this.currentWidth=t,this.widthBoxes.forEach((function(t){t.style.borderColor=t===e?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},e}(J),lt=function(t){function e(e,r,i,n){var s=t.call(this,e,n||'')||this;return s.styles=[],s.styleBoxes=[],s.styles=r,s.currentStyle=i,s.setCurrentStyle=s.setCurrentStyle.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.styles.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.styles.length-5+"%",i.style.borderColor=r===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentStyle(r,i)})),e.appendChild(i);var n=document.createElement("div");n.style.minHeight="20px",n.style.flexGrow="2",n.style.overflow="hidden";var s='\n \n ";n.innerHTML=s,i.appendChild(n),t.styleBoxes.push(i)})),e},e.prototype.setCurrentStyle=function(t,e){var r=this;this.currentStyle=t,this.styleBoxes.forEach((function(t){t.style.borderColor=t===e?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},e}(J),ct=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.strokeColor=i.defaultColor,n.strokeWidth=i.defaultStrokeWidth,n.strokeDasharray=i.defaultStrokeDasharray,n.strokePanel=new tt("Line color",i.defaultColorSet,i.defaultColor),n.strokePanel.onColorChanged=n.setStrokeColor,n.strokeWidthPanel=new at("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),n.strokeWidthPanel.onWidthChanged=n.setStrokeWidth,n.strokeStylePanel=new lt("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),n.strokeStylePanel.onStyleChanged=n.setStrokeDasharray,n}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=t.prototype.getState.call(this);return r.typeName=e.typeName,r},e.typeName="FrameMarker",e.title="Frame marker",e.icon='',e}(ot),ut=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},ht=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.x1=0,n.y1=0,n.x2=0,n.y2=0,n.defaultLength=50,n.manipulationStartX=0,n.manipulationStartY=0,n.manipulationStartX1=0,n.manipulationStartY1=0,n.manipulationStartX2=0,n.manipulationStartY2=0,n.setupControlBox(),n}return U(e,t),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!(!this.grip1.ownsTarget(e)&&!this.grip2.ownsTarget(e))},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),this.manipulationStartX=e.x,this.manipulationStartY=e.y,"new"===this.state&&(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,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(r)?this.activeGrip=this.grip1:this.grip2.ownsTarget(r)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},e.prototype.pointerUp=function(e){var r=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&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","creating"===r&&this.onMarkerCreated&&this.onMarkerCreated(this)},e.prototype.adjustVisual=function(){},e.prototype.manipulate=function(t){"creating"===this.state?this.resize(t):"move"===this.state?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(t)},e.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=W.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){this.positionGrips()},e.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},e.prototype.createGrip=function(){var t=new it;return t.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},e.prototype.positionGrip=function(t,e,r){var i=t.transform.baseVal.getItem(0);i.setTranslate(e,r),t.transform.baseVal.replaceItem(i,0)},e.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var r=e;this.x1=r.x1,this.y1=r.y1,this.x2=r.x2,this.y2=r.y2},e.prototype.scale=function(e,r){t.prototype.scale.call(this,e,r),this.x1=this.x1*e,this.y1=this.y1*r,this.x2=this.x2*e,this.y2=this.y2*r,this.adjustVisual(),this.adjustControlBox()},e}(et),dt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.strokeColor="transparent",n.strokeWidth=0,n.strokeDasharray="",n.setStrokeColor=n.setStrokeColor.bind(n),n.setStrokeWidth=n.setStrokeWidth.bind(n),n.setStrokeDasharray=n.setStrokeDasharray.bind(n),n.strokeColor=i.defaultColor,n.strokeWidth=i.defaultStrokeWidth,n.strokeDasharray=i.defaultStrokeDasharray,n.strokePanel=new tt("Line color",i.defaultColorSet,i.defaultColor),n.strokePanel.onColorChanged=n.setStrokeColor,n.strokeWidthPanel=new at("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),n.strokeWidthPanel.onWidthChanged=n.setStrokeWidth,n.strokeStylePanel=new lt("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),n.strokeStylePanel.onStyleChanged=n.setStrokeDasharray,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorLine&&e!==this.visibleLine)},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.selectorLine=W.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=W.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)},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},e.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()),W.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),W.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),W.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},t.prototype.getState.call(this));return r.typeName=e.typeName,r},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var r=e;this.strokeColor=r.strokeColor,this.strokeWidth=r.strokeWidth,this.strokeDasharray=r.strokeDasharray,this.createVisual(),this.adjustVisual()},e.typeName="LineMarker",e.title="Line marker",e.icon='',e}(ht),ft=function(t){function e(e,r,i,n){var s=t.call(this,e,n||'')||this;return s.fonts=[],s.fontBoxes=[],s.fonts=r,s.currentFont=i,s.setCurrentFont=s.setCurrentFont.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.flexGrow="2",this.fonts.forEach((function(r){var i=document.createElement("div");i.style.display="inline-block",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.fonts.length-5+"%",i.style.borderColor=r===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentFont(r,i)})),e.appendChild(i);var n=document.createElement("div");n.style.display="flex",n.style.minHeight="20px",n.style.flexGrow="2",n.style.fontFamily=r,n.style.overflow="hidden";var s=document.createElement("div");s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",s.innerHTML="The quick brown fox jumps over the lazy dog",n.appendChild(s),i.appendChild(n),t.fontBoxes.push(i)})),e},e.prototype.setCurrentFont=function(t,e){var r=this;this.currentFont=t,this.fontBoxes.forEach((function(t){t.style.borderColor=t===e?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},e}(J),pt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.color="transparent",n.padding=5,n.DEFAULT_TEXT="your text here",n.text=n.DEFAULT_TEXT,n.isMoved=!1,n.color=i.defaultColor,n.fontFamily=i.defaultFontFamily,n.defaultSize={x:100,y:30},n.setColor=n.setColor.bind(n),n.setFont=n.setFont.bind(n),n.renderText=n.renderText.bind(n),n.sizeText=n.sizeText.bind(n),n.textEditDivClicked=n.textEditDivClicked.bind(n),n.showTextEditor=n.showTextEditor.bind(n),n.setSize=n.setSize.bind(n),n.positionTextEditor=n.positionTextEditor.bind(n),n.colorPanel=new tt("Color",i.defaultColorSet,i.defaultColor),n.colorPanel.onColorChanged=n.setColor,n.fontFamilyPanel=new ft("Font",i.defaultFontFamilies,i.defaultFontFamily),n.fontFamilyPanel.onFontChanged=n.setFont,n}return U(e,t),e.prototype.ownsTarget=function(e){if(t.prototype.ownsTarget.call(this,e)||e===this.visual||e===this.textElement||e===this.bgRectangle)return!0;var r=!1;return this.textElement.childNodes.forEach((function(t){t===e&&(r=!0)})),r},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.bgRectangle=W.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=W.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(W.createTransform()),this.textElement.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.renderText=function(){var t=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(e){t.textElement.appendChild(W.createTSpan(""===e.trim()?" ":e.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},e.prototype.getTextScale=function(){var t=this.textElement.getBBox(),e=1;if(t.width>0&&t.height>0){var r=(1*this.width-this.width*this.padding*2/100)/t.width,i=(1*this.height-this.height*this.padding*2/100)/t.height;e=Math.min(r,i)}return e},e.prototype.getTextPosition=function(t){var e=this.textElement.getBBox(),r=0,i=0;return e.width>0&&e.height>0&&(r=(this.width-e.width*t)/2,i=this.height/2-e.height*t/2),{x:r,y:i}},e.prototype.sizeText=function(){var t=this.textElement.getBBox(),e=this.getTextScale(),r=this.getTextPosition(e);r.y-=t.y*e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+r.x+"px, "+r.y+"px) scale("+e+", "+e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(r.x,r.y),this.textElement.transform.baseVal.getItem(1).setScale(e,e))},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.isMoved=!0,this.setSize(),this.sizeText()},e.prototype.setSize=function(){t.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},e.prototype.pointerUp=function(e){var r=this.state;"creating"===r&&(this._suppressMarkerCreateEvent=!0),t.prototype.pointerUp.call(this,e),this.setSize(),("creating"===r||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.showTextEditor=function(){var t=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(t){t.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var e=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&e>.9;)e-=.1,t.textEditor.style.fontSize=Math.max(e,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(t){if(t.clipboardData){var e=t.clipboardData.getData("text"),r=window.getSelection();if(!r.rangeCount)return!1;r.deleteFromDocument(),r.getRangeAt(0).insertNode(document.createTextNode(e)),t.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},e.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var t=this.getTextScale(),e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),r=this.textElement.getBBox(),i={x:r.width*t,y:r.height*t};e.x-=i.x/2,e.y-=i.y/2,this.textEditor.style.top=e.y+"px",this.textEditor.style.left=e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-e.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},e.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},e.prototype.select=function(){t.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},e.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),t.prototype.deselect.call(this)},e.prototype.dblClick=function(e,r){t.prototype.dblClick.call(this,e,r),this.showTextEditor()},e.prototype.setColor=function(t){this.textElement&&W.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},e.prototype.setFont=function(t){this.textElement&&W.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},e.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},e.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},t.prototype.getState.call(this));return r.typeName=e.typeName,r},e.prototype.restoreState=function(e){var r=e;this.color=r.color,this.fontFamily=r.fontFamily,this.padding=r.padding,this.text=r.text,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,r){t.prototype.scale.call(this,e,r),this.setSize(),this.sizeText(),this.positionTextEditor()},e.typeName="TextMarker",e.title="Text marker",e.icon='',e}(st),gt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.color="transparent",n.lineWidth=3,n.drawing=!1,n.pixelRatio=1,n.color=i.defaultColor,n.lineWidth=i.defaultStrokeWidth,n.pixelRatio=i.freehandPixelRatio,n.setColor=n.setColor.bind(n),n.addCanvas=n.addCanvas.bind(n),n.finishCreation=n.finishCreation.bind(n),n.setLineWidth=n.setLineWidth.bind(n),n.colorPanel=new tt("Color",i.defaultColorSet,i.defaultColor),n.colorPanel.onColorChanged=n.setColor,n.lineWidthPanel=new at("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),n.lineWidthPanel.onWidthChanged=n.setLineWidth,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.drawingImage)},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.drawingImage=W.createImage(),this.visual.appendChild(this.drawingImage);var t=W.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,r){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(e.x,e.y),this.drawing=!0):t.prototype.pointerDown.call(this,e,r)},e.prototype.manipulate=function(e){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(e.x,e.y),this.canvasContext.stroke()):t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):t.prototype.pointerUp.call(this,e)},e.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)},e.prototype.select=function(){"creating"===this.state&&this.finishCreation(),t.prototype.select.call(this)},e.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),t.prototype.deselect.call(this)},e.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],r=e[0],i=e[1],n=e[2],s=e[3],o=!1,a=0;a0&&(o=!0,as&&(s=a),l>n&&(n=l));if(o){this.left=r/this.pixelRatio,this.top=i/this.pixelRatio,this.width=(n-r)/this.pixelRatio,this.height=(s-i)/this.pixelRatio;var c=document.createElement("canvas");c.width=n-r,c.height=s-i,c.getContext("2d").putImageData(this.canvasContext.getImageData(r,i,n-r,s-i),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},e.prototype.setDrawingImage=function(){W.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},e.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},e.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=Object.assign({drawingImgUrl:this.drawingImgUrl},t.prototype.getState.call(this));return r.typeName=e.typeName,r},e.prototype.restoreState=function(e){this.createVisual(),t.prototype.restoreState.call(this,e),this.drawingImgUrl=e.drawingImgUrl,this.setDrawingImage()},e.prototype.scale=function(e,r){t.prototype.scale.call(this,e,r),this.setDrawingImage()},e.typeName="FreehandMarker",e.title="Freehand marker",e.icon='',e}(st),mt=function(t){function e(e,r,i){var n=t.call(this,e,i||'')||this;return n.typeBoxes=[],n.currentType=r,n.setCurrentType=n.setCurrentType.bind(n),n}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2";for(var r=function(r){var n="both";switch(r){case 0:n="both";break;case 1:n="start";break;case 2:n="end";break;case 3:n="none"}var s=document.createElement("div");if(s.style.display="flex",s.style.flexGrow="2",s.style.alignItems="center",s.style.justifyContent="space-between",s.style.padding="5px",s.style.borderWidth="2px",s.style.borderStyle="solid",s.style.borderColor=n===i.currentType?i.uiStyleSettings.toolboxAccentColor:"transparent",s.addEventListener("click",(function(){t.setCurrentType(n,s)})),e.appendChild(s),"both"===n||"start"===n){var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.minHeight="20px",o.innerHTML='\n \n ',o.style.marginLeft="5px",s.appendChild(o)}var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",a.appendChild(l),s.appendChild(a),"both"===n||"end"===n){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='\n \n ',c.style.marginRight="5px",s.appendChild(c)}i.typeBoxes.push(s)},i=this,n=0;n<4;n++)r(n);return e},e.prototype.setCurrentType=function(t,e){var r=this;this.currentType=t,this.typeBoxes.forEach((function(t){t.style.borderColor=t===e?void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},e}(J),vt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.arrowType="end",n.arrowBaseHeight=10,n.arrowBaseWidth=10,n.getArrowPoints=n.getArrowPoints.bind(n),n.setArrowType=n.setArrowType.bind(n),n.arrowTypePanel=new mt("Arrow type","end"),n.arrowTypePanel.onArrowTypeChanged=n.setArrowType,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.arrow1&&e!==this.arrow2)},e.prototype.getArrowPoints=function(t,e){var r=this.arrowBaseWidth+2*this.strokeWidth,i=this.arrowBaseHeight+2*this.strokeWidth;return t-r/2+","+(e+i/2)+" "+t+","+(e-i/2)+" "+(t+r/2)+","+(e+i/2)},e.prototype.createTips=function(){this.arrow1=W.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=W.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.arrow2)},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),"creating"===this.state&&this.createTips()},e.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",W.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),W.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),r=this.arrow1.transform.baseVal.getItem(0);r.setRotate(e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(r,0);var i=this.arrow2.transform.baseVal.getItem(0);i.setRotate(e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(i,0)}},e.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=Object.assign({arrowType:this.arrowType},t.prototype.getState.call(this));return r.typeName=e.typeName,r},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var r=e;this.arrowType=r.arrowType,this.createTips(),this.adjustVisual()},e.typeName="ArrowMarker",e.title="Arrow marker",e.icon='',e}(dt),yt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.fillColor=i.defaultFillColor,n.strokeWidth=0,n.fillPanel=new tt("Color",i.defaultColorSet,i.defaultFillColor),n.fillPanel.onColorChanged=n.setFillColor,n}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=t.prototype.getState.call(this);return r.typeName=e.typeName,r},e.typeName="CoverMarker",e.title="Cover marker",e.icon='',e}(ot),bt=function(t){function e(e,r,i,n){var s=t.call(this,e,n||'')||this;return s.opacities=[],s.opacityBoxes=[],s.opacities=r,s.currentOpacity=i,s.setCurrentOpacity=s.setCurrentOpacity.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",e.style.justifyContent="space-between",this.opacities.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=r===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentOpacity(r,i)})),e.appendChild(i);var n=document.createElement("div");n.innerText=100*r+"%",i.appendChild(n),t.opacityBoxes.push(i)})),e},e.prototype.setCurrentOpacity=function(t,e){var r=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(t){t.style.borderColor=t===e?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},e}(J),xt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.setOpacity=n.setOpacity.bind(n),n.fillColor=i.defaultHighlightColor,n.strokeWidth=0,n.opacity=i.defaultHighlightOpacity,n.fillPanel=new tt("Color",i.defaultColorSet,n.fillColor),n.fillPanel.onColorChanged=n.setFillColor,n.opacityPanel=new bt("Opacity",i.defaultOpacitySteps,n.opacity),n.opacityPanel.onOpacityChanged=n.setOpacity,n}return U(e,t),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&W.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=t.prototype.getState.call(this);return r.typeName=e.typeName,r},e.typeName="HighlightMarker",e.title="Highlight marker",e.icon='',e}(yt),St='',Ct=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.bgColor="transparent",n.tipPosition={x:0,y:0},n.tipBase1Position={x:0,y:0},n.tipBase2Position={x:0,y:0},n.tipMoving=!1,n.color=i.defaultStrokeColor,n.bgColor=i.defaultFillColor,n.fontFamily=i.defaultFontFamily,n.defaultSize={x:100,y:30},n.setBgColor=n.setBgColor.bind(n),n.getTipPoints=n.getTipPoints.bind(n),n.positionTip=n.positionTip.bind(n),n.setTipPoints=n.setTipPoints.bind(n),n.colorPanel=new tt("Text color",i.defaultColorSet,n.color,''),n.colorPanel.onColorChanged=n.setColor,n.bgColorPanel=new tt("Fill color",i.defaultColorSet,n.bgColor,St),n.bgColorPanel.onColorChanged=n.setBgColor,n.fontFamilyPanel=new ft("Font",i.defaultFontFamilies,i.defaultFontFamily),n.fontFamilyPanel.onFontChanged=n.setFont,n.tipGrip=new it,n.tipGrip.visual.transform.baseVal.appendItem(W.createTransform()),n.controlBox.appendChild(n.tipGrip.visual),n}return U(e,t),e.prototype.ownsTarget=function(e){return t.prototype.ownsTarget.call(this,e)||this.tipGrip.ownsTarget(e)||this.tip===e},e.prototype.createTip=function(){W.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=W.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},e.prototype.pointerDown=function(e,r){"new"===this.state&&t.prototype.pointerDown.call(this,e,r),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(r)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):t.prototype.pointerDown.call(this,e,r)},e.prototype.pointerUp=function(e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,t.prototype.pointerUp.call(this,e);else{var r="creating"===this.state;t.prototype.pointerUp.call(this,e),this.setTipPoints(r),this.positionTip()}},e.prototype.manipulate=function(e){if(this.tipMoving){var r=this.unrotatePoint(e);this.tipPosition={x:r.x-this.manipulationStartLeft,y:r.y-this.manipulationStartTop},this.positionTip()}else t.prototype.manipulate.call(this,e)},e.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(W.setAttributes(this.bgRectangle,[["fill",t]]),W.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},e.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},e.prototype.setTipPoints=function(t){void 0===t&&(t=!1);var e=Math.min(this.height/2,15),r=this.height/5;t&&(this.tipPosition={x:e+r/2,y:this.height+20});var i=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?i.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),r=this.tip1.transform.baseVal.getItem(0);r.setRotate(e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(r,0);var i=this.tip2.transform.baseVal.getItem(0);i.setRotate(e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(i,0)}},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=t.prototype.getState.call(this);return r.typeName=e.typeName,r},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e),this.createTips(),this.adjustVisual()},e.typeName="MeasurementMarker",e.title="Measurement marker",e.icon='',e}(dt),Et=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.strokePanel.colors=i.defaultColorSet,n.fillColor="transparent",n}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=t.prototype.getState.call(this);return r.typeName=e.typeName,r},e.typeName="EllipseFrameMarker",e.title="Ellipse frame marker",e.icon='',e}(wt),Tt=function(){function t(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),t.prototype.addUndoStep=function(t){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(t)||(this.undoStack.push(t),JSON.stringify(this.lastRedoStep)!==JSON.stringify(t)&&this.redoStack.splice(0,this.redoStack.length))},t.prototype.replaceLastUndoStep=function(t){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=t)},t.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},t.prototype.undo=function(){if(this.undoStack.length>1){var t=this.undoStack.pop();return void 0!==t&&this.redoStack.push(t),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},t.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},t}(),Lt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.strokeColor="transparent",n.strokeWidth=0,n.strokeDasharray="",n.curveX=0,n.curveY=0,n.manipulationStartCurveX=0,n.manipulationStartCurveY=0,n.setStrokeColor=n.setStrokeColor.bind(n),n.setStrokeWidth=n.setStrokeWidth.bind(n),n.setStrokeDasharray=n.setStrokeDasharray.bind(n),n.positionGrips=n.positionGrips.bind(n),n.addControlGrips=n.addControlGrips.bind(n),n.adjustVisual=n.adjustVisual.bind(n),n.setupControlBox=n.setupControlBox.bind(n),n.resize=n.resize.bind(n),n.strokeColor=i.defaultColor,n.strokeWidth=i.defaultStrokeWidth,n.strokeDasharray=i.defaultStrokeDasharray,n.strokePanel=new tt("Line color",i.defaultColorSet,i.defaultColor),n.strokePanel.onColorChanged=n.setStrokeColor,n.strokeWidthPanel=new at("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),n.strokeWidthPanel.onWidthChanged=n.setStrokeWidth,n.strokeStylePanel=new lt("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),n.strokeStylePanel.onStyleChanged=n.setStrokeDasharray,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorCurve&&e!==this.visibleCurve&&!this.curveGrip.ownsTarget(e))},e.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.selectorCurve=W.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=W.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)},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=e.x,this.curveY=e.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(r)&&(this.activeGrip=this.curveGrip,this._state="resize")},e.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),W.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),W.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),W.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=W.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=W.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)},e.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,t.prototype.addControlGrips.call(this)},e.prototype.positionGrips=function(){t.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()))},e.prototype.manipulate=function(e){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+e.y-this.manipulationStartY),t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){this.activeGrip===this.curveGrip&&(this.curveX=e.x,this.curveY=e.y),t.prototype.resize.call(this,e),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},e.prototype.scale=function(e,r){this.curveX=this.curveX*e,this.curveY=this.curveY*r,t.prototype.scale.call(this,e,r)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},t.prototype.getState.call(this));return r.typeName=e.typeName,r},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var r=e;this.strokeColor=r.strokeColor,this.strokeWidth=r.strokeWidth,this.strokeDasharray=r.strokeDasharray,this.curveX=r.curveX,this.curveY=r.curveY,this.createVisual(),this.adjustVisual()},e.typeName="CurveMarker",e.title="Curve marker",e.icon='',e}(ht),At=function(){function t(t,e){void 0===e&&(e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=t,this.cancelable=e}return Object.defineProperty(t.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this._defaultPrevented=!0},t}(),Dt=function(t){function e(e,r,i){var n=t.call(this,e,!1)||this;return n.dataUrl=r,n.state=i,n}return U(e,t),e}(At),Rt=function(t){function e(e,r,i){void 0===i&&(i=!1);var n=t.call(this,e,i)||this;return n.marker=r,n}return U(e,t),e}(At),Ot=function(){function t(){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 t.prototype.addEventListener=function(t,e){this[t].push(e)},t.prototype.removeEventListener=function(t,e){var r=this[t].indexOf(e);r>-1&&this[t].splice(r,1)},t}(),_t=function(){function t(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ut,this._isOpen=!1,this.undoRedoManager=new Tt,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 Ot,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=t.instanceCounter++,this.styles=new Y(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.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(t.prototype,"ALL_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,Et,wt,xt,Ct,kt,yt,dt,Lt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,wt,xt,Ct]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,xt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(t){var e=this;this._availableMarkerTypes.splice(0),t.forEach((function(t){if("string"==typeof t){var r=e.ALL_MARKER_TYPES.find((function(e){return e.typeName===t}));void 0!==r&&e._availableMarkerTypes.push(r)}else e._availableMarkerTypes.push(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(t){this._zoomLevel=t,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(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),V.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},t.prototype.show=function(){var t=this;void 0===this.styles.styleSheetRoot&&void 0!==q.styleSheetRoot&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(e){return e(new At(t))}))},t.prototype.render=function(){return H(this,void 0,void 0,(function(){var t;return G(this,(function(e){switch(e.label){case 0:return this.setCurrentMarker(),(t=new K).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.markersOnly=this.renderMarkersOnly,t.width=this.renderWidth,t.height=this.renderHeight,[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return e.sent(),[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,e.sent()]}}))}))},t.prototype.close=function(t){var e=this;if(void 0===t&&(t=!1),this.isOpen){var r=!1;t||this.eventListeners.beforeclose.forEach((function(t){var i=new At(e,!0);t(i),i.defaultPrevented&&(r=!0)})),r||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(t){return t(new At(e))})),this.detachEvents(),this._isOpen=!1)}},t.prototype.addMarkersToToolbar=function(){for(var t,e=[],r=0;rthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*t:this.editorCanvas.clientWidth,r=e',t.title="Powered by marker.js",t.style.display="grid",t.style.alignItems="center",t.style.justifyItems="center",t.style.padding="3px",t.style.width="20px",t.style.height="20px",this.logoUI.appendChild(t),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},t.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?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")},t.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"},t.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},t.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&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 t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?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=void 0!==this.uiStyleSettings.zIndex?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="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Z(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","popup"===this.settings.displayMode&&(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","popup"===this.settings.displayMode&&(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-1&&this.markers.splice(this.markers.indexOf(t),1),t.dispose()},t.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},t.prototype.toolbarButtonClicked=function(t,e){if("marker"===t&&void 0!==e)this.createNewMarker(e);else if("action"===t)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":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},t.prototype.deleteSelectedMarker=function(){var t=this;if(void 0!==this._currentMarker){var e=!1;if(this.eventListeners.markerbeforedelete.forEach((function(r){var i=new Rt(t,t._currentMarker,!0);r(i),i.defaultPrevented&&(e=!0)})),!e){var r=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(e){return e(new Rt(t,r))}))}}},t.prototype.clear=function(){var t=this,e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(r){var i=new Rt(t,void 0,!0);r(i),i.defaultPrevented&&(e=!0)})),!e)){this.setCurrentMarker();for(var r=function(e){var r=i.markers[e];i.setCurrentMarker(i.markers[e]),i._currentMarker.dispose(),i.markerImage.removeChild(i._currentMarker.container),i.markers.splice(i.markers.indexOf(i._currentMarker),1),i.eventListeners.markerdelete.forEach((function(e){return e(new Rt(t,r))}))},i=this,n=this.markers.length-1;n>=0;n--)r(n);this.addUndoStep()}},Object.defineProperty(t.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),t.prototype.showNotesEditor=function(){var t;void 0!==this._currentMarker&&(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=null!==(t=this._currentMarker.notes)&&void 0!==t?t:"",this.overlayContainer.appendChild(this.notesArea))},t.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},t.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},t.prototype.addUndoStep=function(){var t=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var e=this.getState(),r=this.undoRedoManager.getLastUndoStep();if(!r||r.width===e.width&&r.height===e.height){var i=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(e),i1&&this.panTo({x:t.clientX,y:t.clientY}))},t.prototype.onPointerUp=function(t){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(t.clientX,t.clientY)),this.isDragging=!1,this.addUndoStep()},t.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},t.prototype.onKeyUp=function(t){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==t.key&&"Backspace"!==t.key||this.deleteSelectedMarker()},t.prototype.clientToLocalCoordinates=function(t,e){var r=this.markerImage.getBoundingClientRect();return{x:(t-r.left)/this.zoomLevel,y:(e-r.top)/this.zoomLevel}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"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()},t.prototype.addLicenseKey=function(t){V.addKey(t)},t.prototype.addEventListener=function(t,e){this.eventListeners.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.eventListeners.removeEventListener(t,e)},t.prototype.renderState=function(t){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(t),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),t.prototype.focus=function(){var t=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(e){return e(new At(t))})))},t.prototype.blur=function(){var t=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(e){return e(new At(t))})))},t.instanceCounter=0,t}(),It=function(t,e){return(It=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)}; +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,i){"use strict";i("DYRE");var r=i("zeV3"),n=(i("+L6B"),i("2/Rp")),s=i("k1fw"),o=i("9og8"),a=i("tJVT"),l=i("WmNS"),c=i.n(l),u=i("q1tI"),h=i.n(u),d=(i("vg9a"),i("DlQD")),f=i.n(d),p=i("rUJ1");var g=[],m=["
      "],v=new f.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){g.length=0,m=["
        "]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function S(){return function t(e,i,r,n){if(i>=e.length||e[i].level<=r)return i;var s=e[i];n.push("
      • "+s.text+"");var o=[];return i=t(e,++i,s.level,o),o.length>0&&(n.push("
          "),o.forEach((function(t){n.push(t)})),n.push("
        ")),n.push("
      • "),i=t(e,i,r,n)}(g,0,0,m),m.push("
      "),m.join("")}var C={heading:function(t){var e=y.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},fences:function(t){var e=this.rules.block.fences.exec(t);if(e){var i=e[0],r=function(t,e){var i=t.match(/^(\s+)(?:```)/);if(null===i)return e;var r=i[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:Object(a.a)(e,1)[0].length>=r.length?t.slice(r.length):t})).join("\n")}(i,e[3]||""),n=e[2]?e[2].trim():e[2];if(["latex","katex","math"].indexOf(n)>=0){var s=E(),o=r;r=s,T[s]={type:"block",expression:o}}return{type:"code",raw:i,lang:n,text:r}}}},w=/(?:\${2})([^\n`]+?)(?:\${2})/gi,k=0,E=function(){return"__special_katext_id_".concat(k++,"__")},T={};function L(){k=0,T={}}function A(t){return t=t.replace(w,(function(t,e){var i=E();return T[i]={type:"inline",expression:e},i}))}var D=v.listitem;v.listitem=function(t){return D(A(t))};var R=v.paragraph;v.paragraph=function(t){return R(A(t))};var O=v.tablecell;v.tablecell=function(t,e){return O(A(t),e)},v.code=function(t,e,i){var r=(e||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"

      ".concat(t,"

      "):'
      ').concat(i?t:Object(p.escape)(t,!0),"
      \n"):'
      '+(i?t:Object(p.escape)(t,!0))+"
      "},v.heading=function(t,e,i){var r=this.options.headerPrefix+i.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return g.push({anchor:r,level:e,text:t}),"'+t+""},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:C,renderer:v});var _=f.a,I=(i("SJMd"),i("ulZh")),M=i.n(I),P=i("m3rI"),N=i("Oy/b"),F=i("p5ED"),B=i("ErOA"),j=function(t,e){return(j=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function U(t,e){function i(){this.constructor=t}j(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function H(t,e,i,r){return new(i||(i=Promise))((function(n,s){function o(t){try{l(r.next(t))}catch(t){s(t)}}function a(t){try{l(r.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))}function G(t,e){var i,r,n,s,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(n=2&s[0]?r.return:s[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;switch(r=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]',"select"),this.addActionButton(i,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(i,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(i,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(i,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(i,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(i,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(i,'',"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(t){var i=document.createElement("div");i.className=""+e.toolbarButtonStyleClass.name,i.setAttribute("data-type-name",t.typeName),i.innerHTML=t.icon,i.addEventListener("click",(function(){e.markerToolbarButtonClicked(i,t)})),e.buttons.push(i),e.markerButtons.push(i)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var r=document.createElement("div");r.className=this.toolbarBlockStyleClass.name,r.style.whiteSpace="nowrap",r.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(r),this.addActionButton(r,'',"render"),this.addActionButton(r,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},t.prototype.addButtonClickListener=function(t){this.buttonClickListeners.push(t)},t.prototype.removeButtonClickListener=function(t){this.buttonClickListeners.indexOf(t)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(t),1)},t.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},t.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var t=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var e=0;e0&&this.buttonClickListeners.forEach((function(t){return t("marker",e)})),this.markerButtonOverflowBlock.style.display="none"},t.prototype.actionToolbarButtonClicked=function(t,e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("action",e)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},t.prototype.setActiveButton=function(t){this.resetButtonStyles(),t.className=t.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),t.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},t.prototype.setActiveMarkerButton=function(t){var e=this.markerButtons.find((function(e){return e.getAttribute("data-type-name")===t}));e&&this.setActiveButton(e)},t.prototype.setCurrentMarker=function(t){var e=this;this.currentMarker=t,this.buttons.filter((function(t){return/delete|notes/.test(t.getAttribute("data-action"))})).forEach((function(t){void 0===e.currentMarker?(t.style.fillOpacity="0.4",t.style.pointerEvents="none"):(t.style.fillOpacity="1",t.style.pointerEvents="all")}))},t}(),Q=function(){function t(t,e,i,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=t,this.displayMode=e,this.uiStyleSettings=i,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return t.prototype.addStyles=function(){var t;this.toolboxStyleClass=this.styles.addClass(new $("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new $("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new $("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new $("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new $("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new $("toolbox-panel-row_colors","\n background-color: "+(null!==(t=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==t?t:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new $("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new $("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new X("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new X("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},t.prototype.show=function(t){var e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==e?e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},t.prototype.setPanelButtons=function(t){var e,i,r=this;this.panels=t,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==e?e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(i=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==i?i:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(t){var e;t.uiStyleSettings=r.uiStyleSettings;var i=document.createElement("div");i.className=r.toolboxButtonStyleClass.name+" "+(null!==(e=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==e?e:r.toolboxButtonStyleColorsClass.name),i.innerHTML=t.icon,i.title=t.title,i.addEventListener("click",(function(){r.panelButtonClick(t)})),r.panelButtons.push(i),r.buttonRow.appendChild(i)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},t.prototype.panelButtonClick=function(t){var e=this,i=-1;if(t!==this.activePanel){i=this.panels.indexOf(t),this.panelRow.innerHTML="";var r=t.getUi();r.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(r),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=t}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===e.displayMode?e.panelRow.style.display="none":e.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(t,r){var n,s;t.className=e.toolboxButtonStyleClass.name+" "+(r===i?""+(null!==(n=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==n?n:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(s=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==s?s:e.toolboxButtonStyleColorsClass.name))}))},t}(),J=function(t,e){this.title=t,this.icon=e},tt=function(t){function e(e,i,r,n){var s=t.call(this,e,n||'')||this;return s.colors=[],s.addTransparent=!1,s.colorBoxes=[],s.colors=i,s.currentColor=r,s.setCurrentColor=s.setCurrentColor.bind(s),s.getColorBox=s.getColorBox.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.whiteSpace="nowrap",this.colors.forEach((function(i){var r=t.getColorBox(i);e.appendChild(r),t.colorBoxes.push(r)})),e},e.prototype.getColorBox=function(t){var e=this,i=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-i,n=document.createElement("div");n.style.display="inline-block",n.style.boxSizing="content-box",n.style.width=r-2+"px",n.style.height=r-2+"px",n.style.padding="1px",n.style.marginRight="2px",n.style.marginBottom="2px",n.style.borderWidth="2px",n.style.borderStyle="solid",n.style.borderRadius=(r+2)/2+"px",n.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",n.addEventListener("click",(function(){e.setCurrentColor(t,n)}));var s=document.createElement("div");return s.style.display="inline-block",s.style.width=r-2+"px",s.style.height=r-2+"px",s.style.backgroundColor=t,s.style.borderRadius=r/2+"px","transparent"===t&&(s.style.fill=this.uiStyleSettings.toolboxAccentColor,s.innerHTML='\n \n '),n.appendChild(s),n},e.prototype.setCurrentColor=function(t,e){var i=this;this.currentColor=t,this.colorBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},e}(J),et=function(){function t(t,e,i){this._state="new",this._isSelected=!1,this._container=t,this._overlayContainer=e,this.globalSettings=i,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(t.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!1},Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},t.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},t.prototype.pointerDown=function(t,e){},t.prototype.dblClick=function(t,e){},t.prototype.manipulate=function(t){},t.prototype.pointerUp=function(t){this.stateChanged()},t.prototype.dispose=function(){},t.prototype.addMarkerVisualToContainer=function(t){this.container.childNodes.length>0?this.container.insertBefore(t,this.container.childNodes[0]):this.container.appendChild(t)},t.prototype.getState=function(){return{typeName:t.typeName,state:this.state,notes:this.notes}},t.prototype.restoreState=function(t){this._state=t.state,this.notes=t.notes},t.prototype.scale=function(t,e){},t.prototype.colorChanged=function(t){this.onColorChanged&&this.onColorChanged(t),this.stateChanged()},t.prototype.fillColorChanged=function(t){this.onFillColorChanged&&this.onFillColorChanged(t),this.stateChanged()},t.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var t=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),t.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(t)&&this.onStateChanged(this)}},t.typeName="MarkerBase",t}(),it=function(){function t(){this.findGripByVisual=this.findGripByVisual.bind(this)}return t.prototype.findGripByVisual=function(t){return this.topLeft.ownsTarget(t)?this.topLeft:this.topCenter.ownsTarget(t)?this.topCenter:this.topRight.ownsTarget(t)?this.topRight:this.centerLeft.ownsTarget(t)?this.centerLeft:this.centerRight.ownsTarget(t)?this.centerRight:this.bottomLeft.ownsTarget(t)?this.bottomLeft:this.bottomCenter.ownsTarget(t)?this.bottomCenter:this.bottomRight.ownsTarget(t)?this.bottomRight:void 0},t}(),rt=function(){function t(){this.GRIP_SIZE=10,this.visual=W.createGroup(),this.visual.appendChild(W.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(W.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t}(),nt=function(){function t(){}return t.toITransformMatrix=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},t.toSVGMatrix=function(t,e){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},t}(),st=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.left=0,n.top=0,n.width=0,n.height=0,n.defaultSize={x:50,y:20},n.offsetX=0,n.offsetY=0,n.rotationAngle=0,n.CB_DISTANCE=10,n._suppressMarkerCreateEvent=!1,n.container.transform.baseVal.appendItem(W.createTransform()),n.setupControlBox(),n}return U(e,t),Object.defineProperty(e.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var e=W.createTransform();this._visual.transform.baseVal.appendItem(e)},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!!(void 0!==this.controlGrips.findGripByVisual(e)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(e))},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(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 r=this.unrotatePoint(e);if(this.manipulationStartX=r.x,this.manipulationStartY=r.y,this.offsetX=r.x-this.left,this.offsetY=r.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(i),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(i)){this.activeGrip=this.rotatorGrip;var n=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=n.x-this.width/2,this.top=n.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var s=this.container.transform.baseVal.getItem(0);s.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(s,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},e.prototype.pointerUp=function(e){var i=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(e),this._state="select","creating"===i&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},e.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},e.prototype.manipulate=function(t){var e=this.unrotatePoint(t);"creating"===this.state?this.resize(t):"move"===this.state?(this.left=this.manipulationStartLeft+(e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(e):"rotate"===this.state&&this.rotate(t)},e.prototype.resize=function(t){var e=this.manipulationStartLeft,i=this.manipulationStartWidth,r=this.manipulationStartTop,n=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:e=this.manipulationStartLeft+t.x-this.manipulationStartX,i=this.manipulationStartWidth+this.manipulationStartLeft-e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:i=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+t.y-this.manipulationStartY,n=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:n=this.manipulationStartHeight+t.y-this.manipulationStartY}i>=0?(this.left=e,this.width=i):(this.left=e+i,this.width=-i),n>=0?(this.top=r,this.height=n):(this.top=r+n,this.height=-n),this.setSize()},e.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},e.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var e=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*e,this.applyRotation()}},e.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},e.prototype.rotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM(),i=W.createPoint(t.x,t.y);return{x:(i=i.matrixTransform(e)).x,y:i.y}},e.prototype.unrotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM();e=e.inverse();var i=W.createPoint(t.x,t.y);return{x:(i=i.matrixTransform(e)).x,y:i.y}},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=W.createGroup();var t=W.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=W.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),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=W.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 it,this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(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()},e.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(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},e.prototype.createGrip=function(){var t=new rt;return t.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,e=-t/2,i=e,r=(this.width+this.CB_DISTANCE)/2-t/2,n=(this.height+this.CB_DISTANCE)/2-t/2,s=this.height+this.CB_DISTANCE-t/2,o=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,e,i),this.positionGrip(this.controlGrips.topCenter.visual,r,i),this.positionGrip(this.controlGrips.topRight.visual,o,i),this.positionGrip(this.controlGrips.centerLeft.visual,e,n),this.positionGrip(this.controlGrips.centerRight.visual,o,n),this.positionGrip(this.controlGrips.bottomLeft.visual,e,s),this.positionGrip(this.controlGrips.bottomCenter.visual,r,s),this.positionGrip(this.controlGrips.bottomRight.visual,o,s),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,i-3*this.CB_DISTANCE)},e.prototype.positionGrip=function(t,e,i){var r=t.transform.baseVal.getItem(0);r.setTranslate(e,i),t.transform.baseVal.replaceItem(r,0)},e.prototype.hideControlBox=function(){this.controlBox.style.display="none"},e.prototype.showControlBox=function(){this.controlBox.style.display=""},e.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:nt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:nt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.left=i.left,this.top=i.top,this.width=i.width,this.height=i.height,this.rotationAngle=i.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(nt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,i.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(nt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,i.containerTransformMatrix))},e.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i);var r=this.rotatePoint({x:this.left,y:this.top}),n=this.unrotatePoint({x:r.x*e,y:r.y*i});this.left=n.x,this.top=n.y,this.width=this.width*e,this.height=this.height*i,this.adjustControlBox()},e}(et),ot=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.fillColor="transparent",n.strokeColor="transparent",n.strokeWidth=0,n.strokeDasharray="",n.opacity=1,n.setStrokeColor=n.setStrokeColor.bind(n),n.setFillColor=n.setFillColor.bind(n),n.setStrokeWidth=n.setStrokeWidth.bind(n),n.setStrokeDasharray=n.setStrokeDasharray.bind(n),n.createVisual=n.createVisual.bind(n),n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},e.prototype.createVisual=function(){this.visual=W.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)},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},e.prototype.setSize=function(){t.prototype.setSize.call(this),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&W.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&W.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&W.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&W.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){var i=e;this.fillColor=i.fillColor,this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.opacity=i.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize()},e.title="Rectangle marker",e}(st),at=function(t){function e(e,i,r,n){var s=t.call(this,e,n||'')||this;return s.widths=[],s.widthBoxes=[],s.widths=i,s.currentWidth=r,s.setCurrentWidth=s.setCurrentWidth.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.widths.forEach((function(i){var r=document.createElement("div");r.style.display="flex",r.style.flexGrow="2",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=i===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentWidth(i,r)})),e.appendChild(r);var n=document.createElement("div");n.innerText=i.toString(),n.style.marginRight="5px",r.appendChild(n);var s=document.createElement("div");s.style.minHeight="20px",s.style.flexGrow="2",s.style.display="flex",s.style.alignItems="center";var o=document.createElement("hr");o.style.minWidth="20px",o.style.border="0px",o.style.borderTop=i+"px solid "+t.uiStyleSettings.toolboxColor,o.style.flexGrow="2",s.appendChild(o),r.appendChild(s),t.widthBoxes.push(r)})),e},e.prototype.setCurrentWidth=function(t,e){var i=this;this.currentWidth=t,this.widthBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},e}(J),lt=function(t){function e(e,i,r,n){var s=t.call(this,e,n||'')||this;return s.styles=[],s.styleBoxes=[],s.styles=i,s.currentStyle=r,s.setCurrentStyle=s.setCurrentStyle.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.styles.forEach((function(i){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/t.styles.length-5+"%",r.style.borderColor=i===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentStyle(i,r)})),e.appendChild(r);var n=document.createElement("div");n.style.minHeight="20px",n.style.flexGrow="2",n.style.overflow="hidden";var s='\n \n ";n.innerHTML=s,r.appendChild(n),t.styleBoxes.push(r)})),e},e.prototype.setCurrentStyle=function(t,e){var i=this;this.currentStyle=t,this.styleBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},e}(J),ct=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.strokeColor=r.defaultColor,n.strokeWidth=r.defaultStrokeWidth,n.strokeDasharray=r.defaultStrokeDasharray,n.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),n.strokePanel.onColorChanged=n.setStrokeColor,n.strokeWidthPanel=new at("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),n.strokeWidthPanel.onWidthChanged=n.setStrokeWidth,n.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),n.strokeStylePanel.onStyleChanged=n.setStrokeDasharray,n}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=t.prototype.getState.call(this);return i.typeName=e.typeName,i},e.typeName="FrameMarker",e.title="Frame marker",e.icon='',e}(ot),ut=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},ht=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.x1=0,n.y1=0,n.x2=0,n.y2=0,n.defaultLength=50,n.manipulationStartX=0,n.manipulationStartY=0,n.manipulationStartX1=0,n.manipulationStartY1=0,n.manipulationStartX2=0,n.manipulationStartY2=0,n.setupControlBox(),n}return U(e,t),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!(!this.grip1.ownsTarget(e)&&!this.grip2.ownsTarget(e))},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.manipulationStartX=e.x,this.manipulationStartY=e.y,"new"===this.state&&(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,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(i)?this.activeGrip=this.grip1:this.grip2.ownsTarget(i)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},e.prototype.pointerUp=function(e){var i=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&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","creating"===i&&this.onMarkerCreated&&this.onMarkerCreated(this)},e.prototype.adjustVisual=function(){},e.prototype.manipulate=function(t){"creating"===this.state?this.resize(t):"move"===this.state?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(t)},e.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=W.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){this.positionGrips()},e.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},e.prototype.createGrip=function(){var t=new rt;return t.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},e.prototype.positionGrip=function(t,e,i){var r=t.transform.baseVal.getItem(0);r.setTranslate(e,i),t.transform.baseVal.replaceItem(r,0)},e.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.x1=i.x1,this.y1=i.y1,this.x2=i.x2,this.y2=i.y2},e.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.x1=this.x1*e,this.y1=this.y1*i,this.x2=this.x2*e,this.y2=this.y2*i,this.adjustVisual(),this.adjustControlBox()},e}(et),dt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.strokeColor="transparent",n.strokeWidth=0,n.strokeDasharray="",n.setStrokeColor=n.setStrokeColor.bind(n),n.setStrokeWidth=n.setStrokeWidth.bind(n),n.setStrokeDasharray=n.setStrokeDasharray.bind(n),n.strokeColor=r.defaultColor,n.strokeWidth=r.defaultStrokeWidth,n.strokeDasharray=r.defaultStrokeDasharray,n.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),n.strokePanel.onColorChanged=n.setStrokeColor,n.strokeWidthPanel=new at("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),n.strokeWidthPanel.onWidthChanged=n.setStrokeWidth,n.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),n.strokeStylePanel.onStyleChanged=n.setStrokeDasharray,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorLine&&e!==this.visibleLine)},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.selectorLine=W.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=W.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)},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},e.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()),W.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),W.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),W.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},t.prototype.getState.call(this));return i.typeName=e.typeName,i},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.createVisual(),this.adjustVisual()},e.typeName="LineMarker",e.title="Line marker",e.icon='',e}(ht),ft=function(t){function e(e,i,r,n){var s=t.call(this,e,n||'')||this;return s.fonts=[],s.fontBoxes=[],s.fonts=i,s.currentFont=r,s.setCurrentFont=s.setCurrentFont.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.flexGrow="2",this.fonts.forEach((function(i){var r=document.createElement("div");r.style.display="inline-block",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/t.fonts.length-5+"%",r.style.borderColor=i===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentFont(i,r)})),e.appendChild(r);var n=document.createElement("div");n.style.display="flex",n.style.minHeight="20px",n.style.flexGrow="2",n.style.fontFamily=i,n.style.overflow="hidden";var s=document.createElement("div");s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",s.innerHTML="The quick brown fox jumps over the lazy dog",n.appendChild(s),r.appendChild(n),t.fontBoxes.push(r)})),e},e.prototype.setCurrentFont=function(t,e){var i=this;this.currentFont=t,this.fontBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},e}(J),pt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.color="transparent",n.padding=5,n.DEFAULT_TEXT="your text here",n.text=n.DEFAULT_TEXT,n.isMoved=!1,n.color=r.defaultColor,n.fontFamily=r.defaultFontFamily,n.defaultSize={x:100,y:30},n.setColor=n.setColor.bind(n),n.setFont=n.setFont.bind(n),n.renderText=n.renderText.bind(n),n.sizeText=n.sizeText.bind(n),n.textEditDivClicked=n.textEditDivClicked.bind(n),n.showTextEditor=n.showTextEditor.bind(n),n.setSize=n.setSize.bind(n),n.positionTextEditor=n.positionTextEditor.bind(n),n.colorPanel=new tt("Color",r.defaultColorSet,r.defaultColor),n.colorPanel.onColorChanged=n.setColor,n.fontFamilyPanel=new ft("Font",r.defaultFontFamilies,r.defaultFontFamily),n.fontFamilyPanel.onFontChanged=n.setFont,n}return U(e,t),e.prototype.ownsTarget=function(e){if(t.prototype.ownsTarget.call(this,e)||e===this.visual||e===this.textElement||e===this.bgRectangle)return!0;var i=!1;return this.textElement.childNodes.forEach((function(t){t===e&&(i=!0)})),i},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.bgRectangle=W.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=W.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(W.createTransform()),this.textElement.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.renderText=function(){var t=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(e){t.textElement.appendChild(W.createTSpan(""===e.trim()?" ":e.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},e.prototype.getTextScale=function(){var t=this.textElement.getBBox(),e=1;if(t.width>0&&t.height>0){var i=(1*this.width-this.width*this.padding*2/100)/t.width,r=(1*this.height-this.height*this.padding*2/100)/t.height;e=Math.min(i,r)}return e},e.prototype.getTextPosition=function(t){var e=this.textElement.getBBox(),i=0,r=0;return e.width>0&&e.height>0&&(i=(this.width-e.width*t)/2,r=this.height/2-e.height*t/2),{x:i,y:r}},e.prototype.sizeText=function(){var t=this.textElement.getBBox(),e=this.getTextScale(),i=this.getTextPosition(e);i.y-=t.y*e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+i.x+"px, "+i.y+"px) scale("+e+", "+e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(i.x,i.y),this.textElement.transform.baseVal.getItem(1).setScale(e,e))},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.isMoved=!0,this.setSize(),this.sizeText()},e.prototype.setSize=function(){t.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},e.prototype.pointerUp=function(e){var i=this.state;"creating"===i&&(this._suppressMarkerCreateEvent=!0),t.prototype.pointerUp.call(this,e),this.setSize(),("creating"===i||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.showTextEditor=function(){var t=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(t){t.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var e=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&e>.9;)e-=.1,t.textEditor.style.fontSize=Math.max(e,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(t){if(t.clipboardData){var e=t.clipboardData.getData("text"),i=window.getSelection();if(!i.rangeCount)return!1;i.deleteFromDocument(),i.getRangeAt(0).insertNode(document.createTextNode(e)),t.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},e.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var t=this.getTextScale(),e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),i=this.textElement.getBBox(),r={x:i.width*t,y:i.height*t};e.x-=r.x/2,e.y-=r.y/2,this.textEditor.style.top=e.y+"px",this.textEditor.style.left=e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-e.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},e.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},e.prototype.select=function(){t.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},e.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),t.prototype.deselect.call(this)},e.prototype.dblClick=function(e,i){t.prototype.dblClick.call(this,e,i),this.showTextEditor()},e.prototype.setColor=function(t){this.textElement&&W.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},e.prototype.setFont=function(t){this.textElement&&W.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},e.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},e.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},t.prototype.getState.call(this));return i.typeName=e.typeName,i},e.prototype.restoreState=function(e){var i=e;this.color=i.color,this.fontFamily=i.fontFamily,this.padding=i.padding,this.text=i.text,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize(),this.sizeText(),this.positionTextEditor()},e.typeName="TextMarker",e.title="Text marker",e.icon='',e}(st),gt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.color="transparent",n.lineWidth=3,n.drawing=!1,n.pixelRatio=1,n.color=r.defaultColor,n.lineWidth=r.defaultStrokeWidth,n.pixelRatio=r.freehandPixelRatio,n.setColor=n.setColor.bind(n),n.addCanvas=n.addCanvas.bind(n),n.finishCreation=n.finishCreation.bind(n),n.setLineWidth=n.setLineWidth.bind(n),n.colorPanel=new tt("Color",r.defaultColorSet,r.defaultColor),n.colorPanel.onColorChanged=n.setColor,n.lineWidthPanel=new at("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),n.lineWidthPanel.onWidthChanged=n.setLineWidth,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.drawingImage)},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.drawingImage=W.createImage(),this.visual.appendChild(this.drawingImage);var t=W.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,i){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(e.x,e.y),this.drawing=!0):t.prototype.pointerDown.call(this,e,i)},e.prototype.manipulate=function(e){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(e.x,e.y),this.canvasContext.stroke()):t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):t.prototype.pointerUp.call(this,e)},e.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)},e.prototype.select=function(){"creating"===this.state&&this.finishCreation(),t.prototype.select.call(this)},e.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),t.prototype.deselect.call(this)},e.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],i=e[0],r=e[1],n=e[2],s=e[3],o=!1,a=0;a0&&(o=!0,as&&(s=a),l>n&&(n=l));if(o){this.left=i/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(n-i)/this.pixelRatio,this.height=(s-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=n-i,c.height=s-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(i,r,n-i,s-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},e.prototype.setDrawingImage=function(){W.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},e.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},e.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=Object.assign({drawingImgUrl:this.drawingImgUrl},t.prototype.getState.call(this));return i.typeName=e.typeName,i},e.prototype.restoreState=function(e){this.createVisual(),t.prototype.restoreState.call(this,e),this.drawingImgUrl=e.drawingImgUrl,this.setDrawingImage()},e.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setDrawingImage()},e.typeName="FreehandMarker",e.title="Freehand marker",e.icon='',e}(st),mt=function(t){function e(e,i,r){var n=t.call(this,e,r||'')||this;return n.typeBoxes=[],n.currentType=i,n.setCurrentType=n.setCurrentType.bind(n),n}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2";for(var i=function(i){var n="both";switch(i){case 0:n="both";break;case 1:n="start";break;case 2:n="end";break;case 3:n="none"}var s=document.createElement("div");if(s.style.display="flex",s.style.flexGrow="2",s.style.alignItems="center",s.style.justifyContent="space-between",s.style.padding="5px",s.style.borderWidth="2px",s.style.borderStyle="solid",s.style.borderColor=n===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",s.addEventListener("click",(function(){t.setCurrentType(n,s)})),e.appendChild(s),"both"===n||"start"===n){var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.minHeight="20px",o.innerHTML='\n \n ',o.style.marginLeft="5px",s.appendChild(o)}var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",a.appendChild(l),s.appendChild(a),"both"===n||"end"===n){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='\n \n ',c.style.marginRight="5px",s.appendChild(c)}r.typeBoxes.push(s)},r=this,n=0;n<4;n++)i(n);return e},e.prototype.setCurrentType=function(t,e){var i=this;this.currentType=t,this.typeBoxes.forEach((function(t){t.style.borderColor=t===e?void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},e}(J),vt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.arrowType="end",n.arrowBaseHeight=10,n.arrowBaseWidth=10,n.getArrowPoints=n.getArrowPoints.bind(n),n.setArrowType=n.setArrowType.bind(n),n.arrowTypePanel=new mt("Arrow type","end"),n.arrowTypePanel.onArrowTypeChanged=n.setArrowType,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.arrow1&&e!==this.arrow2)},e.prototype.getArrowPoints=function(t,e){var i=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return t-i/2+","+(e+r/2)+" "+t+","+(e-r/2)+" "+(t+i/2)+","+(e+r/2)},e.prototype.createTips=function(){this.arrow1=W.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=W.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.arrow2)},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"creating"===this.state&&this.createTips()},e.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",W.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),W.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),i=this.arrow1.transform.baseVal.getItem(0);i.setRotate(e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(i,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},e.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=Object.assign({arrowType:this.arrowType},t.prototype.getState.call(this));return i.typeName=e.typeName,i},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.arrowType=i.arrowType,this.createTips(),this.adjustVisual()},e.typeName="ArrowMarker",e.title="Arrow marker",e.icon='',e}(dt),yt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.fillColor=r.defaultFillColor,n.strokeWidth=0,n.fillPanel=new tt("Color",r.defaultColorSet,r.defaultFillColor),n.fillPanel.onColorChanged=n.setFillColor,n}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=t.prototype.getState.call(this);return i.typeName=e.typeName,i},e.typeName="CoverMarker",e.title="Cover marker",e.icon='',e}(ot),bt=function(t){function e(e,i,r,n){var s=t.call(this,e,n||'')||this;return s.opacities=[],s.opacityBoxes=[],s.opacities=i,s.currentOpacity=r,s.setCurrentOpacity=s.setCurrentOpacity.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",e.style.justifyContent="space-between",this.opacities.forEach((function(i){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=i===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentOpacity(i,r)})),e.appendChild(r);var n=document.createElement("div");n.innerText=100*i+"%",r.appendChild(n),t.opacityBoxes.push(r)})),e},e.prototype.setCurrentOpacity=function(t,e){var i=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},e}(J),xt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.setOpacity=n.setOpacity.bind(n),n.fillColor=r.defaultHighlightColor,n.strokeWidth=0,n.opacity=r.defaultHighlightOpacity,n.fillPanel=new tt("Color",r.defaultColorSet,n.fillColor),n.fillPanel.onColorChanged=n.setFillColor,n.opacityPanel=new bt("Opacity",r.defaultOpacitySteps,n.opacity),n.opacityPanel.onOpacityChanged=n.setOpacity,n}return U(e,t),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&W.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=t.prototype.getState.call(this);return i.typeName=e.typeName,i},e.typeName="HighlightMarker",e.title="Highlight marker",e.icon='',e}(yt),St='',Ct=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.bgColor="transparent",n.tipPosition={x:0,y:0},n.tipBase1Position={x:0,y:0},n.tipBase2Position={x:0,y:0},n.tipMoving=!1,n.color=r.defaultStrokeColor,n.bgColor=r.defaultFillColor,n.fontFamily=r.defaultFontFamily,n.defaultSize={x:100,y:30},n.setBgColor=n.setBgColor.bind(n),n.getTipPoints=n.getTipPoints.bind(n),n.positionTip=n.positionTip.bind(n),n.setTipPoints=n.setTipPoints.bind(n),n.colorPanel=new tt("Text color",r.defaultColorSet,n.color,''),n.colorPanel.onColorChanged=n.setColor,n.bgColorPanel=new tt("Fill color",r.defaultColorSet,n.bgColor,St),n.bgColorPanel.onColorChanged=n.setBgColor,n.fontFamilyPanel=new ft("Font",r.defaultFontFamilies,r.defaultFontFamily),n.fontFamilyPanel.onFontChanged=n.setFont,n.tipGrip=new rt,n.tipGrip.visual.transform.baseVal.appendItem(W.createTransform()),n.controlBox.appendChild(n.tipGrip.visual),n}return U(e,t),e.prototype.ownsTarget=function(e){return t.prototype.ownsTarget.call(this,e)||this.tipGrip.ownsTarget(e)||this.tip===e},e.prototype.createTip=function(){W.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=W.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},e.prototype.pointerDown=function(e,i){"new"===this.state&&t.prototype.pointerDown.call(this,e,i),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(i)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):t.prototype.pointerDown.call(this,e,i)},e.prototype.pointerUp=function(e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,t.prototype.pointerUp.call(this,e);else{var i="creating"===this.state;t.prototype.pointerUp.call(this,e),this.setTipPoints(i),this.positionTip()}},e.prototype.manipulate=function(e){if(this.tipMoving){var i=this.unrotatePoint(e);this.tipPosition={x:i.x-this.manipulationStartLeft,y:i.y-this.manipulationStartTop},this.positionTip()}else t.prototype.manipulate.call(this,e)},e.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(W.setAttributes(this.bgRectangle,[["fill",t]]),W.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},e.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},e.prototype.setTipPoints=function(t){void 0===t&&(t=!1);var e=Math.min(this.height/2,15),i=this.height/5;t&&(this.tipPosition={x:e+i/2,y:this.height+20});var r=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?r.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),i=this.tip1.transform.baseVal.getItem(0);i.setRotate(e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(i,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=t.prototype.getState.call(this);return i.typeName=e.typeName,i},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e),this.createTips(),this.adjustVisual()},e.typeName="MeasurementMarker",e.title="Measurement marker",e.icon='',e}(dt),Et=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.strokePanel.colors=r.defaultColorSet,n.fillColor="transparent",n}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=t.prototype.getState.call(this);return i.typeName=e.typeName,i},e.typeName="EllipseFrameMarker",e.title="Ellipse frame marker",e.icon='',e}(wt),Tt=function(){function t(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),t.prototype.addUndoStep=function(t){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(t)||(this.undoStack.push(t),JSON.stringify(this.lastRedoStep)!==JSON.stringify(t)&&this.redoStack.splice(0,this.redoStack.length))},t.prototype.replaceLastUndoStep=function(t){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=t)},t.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},t.prototype.undo=function(){if(this.undoStack.length>1){var t=this.undoStack.pop();return void 0!==t&&this.redoStack.push(t),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},t.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},t}(),Lt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.strokeColor="transparent",n.strokeWidth=0,n.strokeDasharray="",n.curveX=0,n.curveY=0,n.manipulationStartCurveX=0,n.manipulationStartCurveY=0,n.setStrokeColor=n.setStrokeColor.bind(n),n.setStrokeWidth=n.setStrokeWidth.bind(n),n.setStrokeDasharray=n.setStrokeDasharray.bind(n),n.positionGrips=n.positionGrips.bind(n),n.addControlGrips=n.addControlGrips.bind(n),n.adjustVisual=n.adjustVisual.bind(n),n.setupControlBox=n.setupControlBox.bind(n),n.resize=n.resize.bind(n),n.strokeColor=r.defaultColor,n.strokeWidth=r.defaultStrokeWidth,n.strokeDasharray=r.defaultStrokeDasharray,n.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),n.strokePanel.onColorChanged=n.setStrokeColor,n.strokeWidthPanel=new at("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),n.strokeWidthPanel.onWidthChanged=n.setStrokeWidth,n.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),n.strokeStylePanel.onStyleChanged=n.setStrokeDasharray,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorCurve&&e!==this.visibleCurve&&!this.curveGrip.ownsTarget(e))},e.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.selectorCurve=W.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=W.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)},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=e.x,this.curveY=e.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(i)&&(this.activeGrip=this.curveGrip,this._state="resize")},e.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),W.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),W.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),W.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=W.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=W.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)},e.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,t.prototype.addControlGrips.call(this)},e.prototype.positionGrips=function(){t.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()))},e.prototype.manipulate=function(e){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+e.y-this.manipulationStartY),t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){this.activeGrip===this.curveGrip&&(this.curveX=e.x,this.curveY=e.y),t.prototype.resize.call(this,e),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},e.prototype.scale=function(e,i){this.curveX=this.curveX*e,this.curveY=this.curveY*i,t.prototype.scale.call(this,e,i)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},t.prototype.getState.call(this));return i.typeName=e.typeName,i},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.curveX=i.curveX,this.curveY=i.curveY,this.createVisual(),this.adjustVisual()},e.typeName="CurveMarker",e.title="Curve marker",e.icon='',e}(ht),At=function(){function t(t,e){void 0===e&&(e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=t,this.cancelable=e}return Object.defineProperty(t.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this._defaultPrevented=!0},t}(),Dt=function(t){function e(e,i,r){var n=t.call(this,e,!1)||this;return n.dataUrl=i,n.state=r,n}return U(e,t),e}(At),Rt=function(t){function e(e,i,r){void 0===r&&(r=!1);var n=t.call(this,e,r)||this;return n.marker=i,n}return U(e,t),e}(At),Ot=function(){function t(){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 t.prototype.addEventListener=function(t,e){this[t].push(e)},t.prototype.removeEventListener=function(t,e){var i=this[t].indexOf(e);i>-1&&this[t].splice(i,1)},t}(),_t=function(){function t(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ut,this._isOpen=!1,this.undoRedoManager=new Tt,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 Ot,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=t.instanceCounter++,this.styles=new Y(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.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(t.prototype,"ALL_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,Et,wt,xt,Ct,kt,yt,dt,Lt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,wt,xt,Ct]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,xt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(t){var e=this;this._availableMarkerTypes.splice(0),t.forEach((function(t){if("string"==typeof t){var i=e.ALL_MARKER_TYPES.find((function(e){return e.typeName===t}));void 0!==i&&e._availableMarkerTypes.push(i)}else e._availableMarkerTypes.push(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(t){this._zoomLevel=t,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(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),V.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},t.prototype.show=function(){var t=this;void 0===this.styles.styleSheetRoot&&void 0!==q.styleSheetRoot&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(e){return e(new At(t))}))},t.prototype.render=function(){return H(this,void 0,void 0,(function(){var t;return G(this,(function(e){switch(e.label){case 0:return this.setCurrentMarker(),(t=new K).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.markersOnly=this.renderMarkersOnly,t.width=this.renderWidth,t.height=this.renderHeight,[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return e.sent(),[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,e.sent()]}}))}))},t.prototype.close=function(t){var e=this;if(void 0===t&&(t=!1),this.isOpen){var i=!1;t||this.eventListeners.beforeclose.forEach((function(t){var r=new At(e,!0);t(r),r.defaultPrevented&&(i=!0)})),i||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(t){return t(new At(e))})),this.detachEvents(),this._isOpen=!1)}},t.prototype.addMarkersToToolbar=function(){for(var t,e=[],i=0;ithis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*t:this.editorCanvas.clientWidth,i=e',t.title="Powered by marker.js",t.style.display="grid",t.style.alignItems="center",t.style.justifyItems="center",t.style.padding="3px",t.style.width="20px",t.style.height="20px",this.logoUI.appendChild(t),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},t.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?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")},t.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"},t.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},t.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&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 t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?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=void 0!==this.uiStyleSettings.zIndex?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="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Z(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","popup"===this.settings.displayMode&&(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","popup"===this.settings.displayMode&&(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-1&&this.markers.splice(this.markers.indexOf(t),1),t.dispose()},t.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},t.prototype.toolbarButtonClicked=function(t,e){if("marker"===t&&void 0!==e)this.createNewMarker(e);else if("action"===t)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":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},t.prototype.deleteSelectedMarker=function(){var t=this;if(void 0!==this._currentMarker){var e=!1;if(this.eventListeners.markerbeforedelete.forEach((function(i){var r=new Rt(t,t._currentMarker,!0);i(r),r.defaultPrevented&&(e=!0)})),!e){var i=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(e){return e(new Rt(t,i))}))}}},t.prototype.clear=function(){var t=this,e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(i){var r=new Rt(t,void 0,!0);i(r),r.defaultPrevented&&(e=!0)})),!e)){this.setCurrentMarker();for(var i=function(e){var i=r.markers[e];r.setCurrentMarker(r.markers[e]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(e){return e(new Rt(t,i))}))},r=this,n=this.markers.length-1;n>=0;n--)i(n);this.addUndoStep()}},Object.defineProperty(t.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),t.prototype.showNotesEditor=function(){var t;void 0!==this._currentMarker&&(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=null!==(t=this._currentMarker.notes)&&void 0!==t?t:"",this.overlayContainer.appendChild(this.notesArea))},t.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},t.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},t.prototype.addUndoStep=function(){var t=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var e=this.getState(),i=this.undoRedoManager.getLastUndoStep();if(!i||i.width===e.width&&i.height===e.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(e),r1&&this.panTo({x:t.clientX,y:t.clientY}))},t.prototype.onPointerUp=function(t){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(t.clientX,t.clientY)),this.isDragging=!1,this.addUndoStep()},t.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},t.prototype.onKeyUp=function(t){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==t.key&&"Backspace"!==t.key||this.deleteSelectedMarker()},t.prototype.clientToLocalCoordinates=function(t,e){var i=this.markerImage.getBoundingClientRect();return{x:(t-i.left)/this.zoomLevel,y:(e-i.top)/this.zoomLevel}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"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()},t.prototype.addLicenseKey=function(t){V.addKey(t)},t.prototype.addEventListener=function(t,e){this.eventListeners.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.eventListeners.removeEventListener(t,e)},t.prototype.renderState=function(t){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(t),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),t.prototype.focus=function(){var t=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(e){return e(new At(t))})))},t.prototype.blur=function(){var t=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(e){return e(new At(t))})))},t.instanceCounter=0,t}(),It=function(t,e){return(It=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)}; /* ********************************** cropro version 1.2.0 @license SEE LICENSE IN LICENSE @@ -89,55 +89,55 @@ 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. -***************************************************************************** */function Mt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}It(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Pt(t,e,r,i){return new(r||(r=Promise))((function(n,s){function o(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))}function Nt(t,e){var r,i,n,s,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,i&&(n=2&s[0]?i.return:s[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;switch(i=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]0&&e>0){var r=new qt(t,e),i=r.ratio>=1?20:r.getHorizontalLength(20),n=r.ratio<1?20:r.getVerticalLength(20),s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(s);var o=Bt.createDefs();s.appendChild(o);var a=Bt.createElement("clipPath",[["id","text-bg-clip"]]);o.appendChild(a);var l=Bt.createPath(Bt.getHollowRectanglePath((24-i)/2,(24-n)/2,i,n,(24-i)/2+2,(24-n)/2+2,i-4,n-4));s.appendChild(l);var c=Bt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Bt.createTSpan(t+":"+e)),s.appendChild(c);var u=c.getBBox();Bt.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=Bt.createPath(Bt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(u.width))/2,(24-Math.ceil(u.height))/2,Math.ceil(u.width),Math.ceil(u.height)));return a.appendChild(h),Bt.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(s),s.outerHTML}return''},t}(),Xt=function(t){function e(e,r,i){var n=t.call(this,e,r)||this;return n.isDropdownOpen=!1,n.onClick=n.dropdownButtonClicked,n.dropdownButtons=i,n}return Mt(e,t),e.prototype.setupDropdown=function(){var t=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(e){e.className=t.className,e.colorsClassName=t.colorsClassName,t.dropdownBlock.appendChild(e.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},e.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},e.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},e.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},e.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},e.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},e}(Vt),$t=function(){function t(t,e){this.GRIP_SIZE=10,this.color=t,this.fillColor=e,this.visual=Bt.createGroup(),this.visual.appendChild(Bt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Bt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t.prototype.setCenter=function(t,e){this.visual.childNodes.forEach((function(r){return Bt.setAttributes(r,[["cx",t.toString()],["cy",e.toString()]])}))},t}(),Zt=function(){function t(t,e,r,i){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=t,this.canvasHeight=e,this.margin=r,this.container=i,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(t.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(t){this._aspectRatio=t,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.gridContainer&&Bt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(t){this._zoomFactor=t,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),t.prototype.open=function(){var t=this;this.cropShadeElement=Bt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Bt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var e=0;ethis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-e.height/2),Bt.setAttributes(this.cropRectElement,[["x",e.x.toString()],["y",e.y.toString()],["width",e.width.toString()],["height",e.height.toString()]]);var r=e.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(t,i){var n=e.y+r*(i+1);Bt.setAttributes(t,[["x1",""+e.x],["y1",""+n],["x2",""+(e.x+e.width)],["y2",""+n]])}));var i=e.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(t,r){var n=e.x+i*(r+1);Bt.setAttributes(t,[["x1",""+n],["y1",""+e.y],["x2",""+n],["y2",""+(e.y+e.height)]])})),Bt.setAttributes(this.cropShadeElement,[["d",Bt.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},t.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)},t.prototype.clientToLocalCoordinates=function(t,e){var r=this.container.getBoundingClientRect();return{x:t-r.left+this.margin,y:e-r.top+this.margin}},t.prototype.onPointerDown=function(t){this.container.setPointerCapture(t.pointerId),this.previousPoint=this.clientToLocalCoordinates(t.clientX,t.clientY),this.cropRectElement===t.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(t.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(t.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(t.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(t.target)&&(this.activeGrip=this.bottomRightGrip)},t.prototype.onPointerMove=function(t){if(this.isMoving)this.move(this.clientToLocalCoordinates(t.clientX,t.clientY));else if(this.activeGrip){var e=this.clientToLocalCoordinates(t.clientX,t.clientY);this.resize(e)}t.preventDefault()},t.prototype.onPointerUp=function(t){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(t.pointerId)},t.prototype.move=function(t){var e=t.x-this.previousPoint.x,r=t.y-this.previousPoint.y;1!==this.zoomFactor&&(e=-e/this.zoomFactor,r=-r/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+r),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=t},t.prototype.resize=function(t){var e=Object.assign({},this.cropRect),r=t.x-this.previousPoint.x,i=t.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:e.x+rthis.canvasWidth*this.zoomFactor&&(r=this.canvasWidth*this.zoomFactor-e.width),e.width+=r}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(r),e.height=this.aspectRatio.getVerticalLength(e.width)):(e.y+=i,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+=i}e.width<10&&(e.x=this.cropRect.x,e.width=10),e.height<10&&(e.y=this.cropRect.y,e.height=10),this.previousPoint=t,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))},t.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var t=this.cropRect.x+this.cropRect.width/2,e=this.cropRect.y+this.cropRect.height/2,r=this.aspectRatio.getHorizontalLength(this.cropRect.height),i=this.aspectRatio.getVerticalLength(this.cropRect.width);r/this.canvasWidththis.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=t-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)}},t.prototype.getRescaledRect=function(t,e,r,i,n,s){var o=r/t,a=i/e;return{x:(n.x-s)*o+s,y:(n.y-s)*a+s,width:n.width*o,height:n.height*a}},t.prototype.scaleCanvas=function(t,e){var r=this.getRescaledRect(this.canvasWidth,this.canvasHeight,t,e,this.cropRect,this.margin);this.canvasWidth=t,this.canvasHeight=e,this.onCropChange&&this.onCropChange(r),this.setCropRectangle(r)},t}(),Qt=function(){function t(t){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=t,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(t.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),t.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},t.prototype.onPointerDown=function(t){this.controlContainer.setPointerCapture(t.pointerId),this.isDragging=!0,this.previousPoint={x:t.clientX,y:t.clientY}},t.prototype.onPointerMove=function(t){this.isDragging&&(this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.previousPoint.x=t.clientX)},t.prototype.onPointerUp=function(t){this.isDragging&&this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(t.pointerId)},t.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var t=this.angleLabelText.getBBox();Bt.setAttributes(this.angleLabelElement,[["x",((this.width-t.width)/2).toString()],["y",(this.height/2).toString()]])}},t.prototype.positionScaleShape=function(){if(this.scaleShape){var t=this.scaleShape.transform.baseVal.getItem(0);t.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(t,0)}},t.prototype.getVisual=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("width",this.width+"px"),t.setAttribute("height",this.height+"px"),t.setAttribute("viewBox","0 0 "+this.width+" "+this.height),t.style.flexShrink="0",document.body.appendChild(t);for(var e="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,r=1;r<=this.width/5+10;r++){var i=r%5==0?this.height/3:this.height/6;e+="h4v"+-i+"h1v"+i}e+="v1H0Z",this.scaleShape=Bt.createPath(e);var n=Bt.createTransform();this.scaleShape.transform.baseVal.appendItem(n),t.appendChild(this.scaleShape),this.angleLabelElement=Bt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Bt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var s=Bt.createTSpan("");return s.innerHTML="°",this.angleLabelElement.appendChild(s),t.appendChild(this.angleLabelElement),document.body.removeChild(t),t},t}(),Jt=function(){function t(){this.naturalSize=!1,this.imageType="image/png"}return t.prototype.rasterize=function(t,e,r,i,n,s,o){var a=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=t.width.baseVal.value-2*i,c.height=t.height.baseVal.value-2*i;var u=1,h=1;!0===a.naturalSize?(u=e.naturalWidth/(t.width.baseVal.value-2*i)/s,h=e.naturalHeight/(t.height.baseVal.value-2*i)/o,c.width=e.naturalWidth/s,c.height=e.naturalHeight/o):void 0!==a.width&&void 0!==a.height&&(u=a.width/r.width,h=a.height/r.height,c.width*=u,c.height*=h);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(n*Math.PI/180),d.scale(s,o),d.translate(-c.width/2,-c.height/2),d.drawImage(e,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=r.width*u,f.height=r.height*h,f.getContext("2d").putImageData(d.getImageData((r.x-i)*u,(r.y-i)*h,r.width*u,r.height*h),0,0),l(f.toDataURL(a.imageType,a.imageQuality))}))},t}(),te=function(){function t(e){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=t.instanceCounter++,this.styles=new jt(this.instanceNo),this.target=e,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(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(t){this._zoomToCropEnabled=t,t?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gridLines",{get:function(){return this._gridLines},set:function(t){this._gridLines=t,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(t){this._rotationAngle=t,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"aspectRatio",{get:function(){var t;return null!==(t=this._aspectRatio)&&void 0!==t?t:this.aspectRatios[0]},set:function(t){this._aspectRatio=t},enumerable:!1,configurable:!0}),t.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(),"popup"===this.displayMode&&this.onPopupResize(),this._isOpen=!0},t.prototype.show=function(){this.showUI(),this.open()},t.prototype.close=function(t){void 0===t&&(t=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),t||this.closeEventListeners.forEach((function(t){return t()})),this._isOpen=!1)},t.prototype.addRenderEventListener=function(t){this.renderEventListeners.push(t)},t.prototype.removeRenderEventListener=function(t){this.renderEventListeners.indexOf(t)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(t),1)},t.prototype.addCloseEventListener=function(t){this.closeEventListeners.push(t)},t.prototype.removeCloseEventListener=function(t){this.closeEventListeners.indexOf(t)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(t),1)},t.prototype.setupResizeObserver=function(){var t=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){t.resize(t.target.clientWidth,t.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},t.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var t=1*this.target.clientWidth/this.target.clientHeight,e=this.contentDiv.clientWidth/t>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*t:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,r=e+2*this.CANVAS_MARGINt+this.CANVAS_MARGIN?this.target.offsetTop-(t+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=void 0!==this.styles.settings.zIndex?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=void 0!==this.styles.settings.zIndex?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="popup"===this.displayMode?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,"popup"===this.displayMode&&(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","popup"===this.displayMode&&(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},t.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},t.prototype.addTopToolbar=function(){var t=this;this.topToolbar=new Gt,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 Wt;e.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(e);var r=[];this.aspectRatios.forEach((function(e){var i=new Vt(Yt.getIcon(e.horizontal,e.vertical),0===e.horizontal&&0===e.vertical?"FREE":e.horizontal+":"+e.vertical);i.onClick=function(){return t.ratioButtonClicked(e)},r.push(i)})),this.aspectRatioButton=new Xt(Yt.getIcon(0,0),"Aspect ratio",r),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 i=new Vt('',"Toggle grid");i.isActive=this.isGridVisible,i.onClick=function(){t.isGridVisible=!t.isGridVisible,i.isActive=t.isGridVisible},e.addButton(i);var n=new Vt('',"Zoom to selection");if(n.isActive=this.zoomToCropEnabled,n.onClick=function(){t.zoomToCropEnabled=!t.zoomToCropEnabled,n.isActive=t.zoomToCropEnabled},e.addButton(n),!Ft.isLicensed){var s=new Kt;this.topToolbar.addElementBlock(s);var o=document.createElement("div");o.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var a=document.createElement("a");a.style.color="currentColor",a.href="https://markerjs.com/products/cropro",a.target="_blank",a.innerHTML='',o.appendChild(a),s.addElement(o)}var l=new Wt;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new Vt('',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new Vt('',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},t.prototype.addBottomToolbar=function(){var t=this;this.bottomToolbar=new Gt,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 Wt;e.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(e);var r=new Vt('',"Rotate left");r.onClick=this.rotateLeftButtonClicked,e.addButton(r);var i=new Vt('',"Rotate right");i.onClick=this.rotateRightButtonClicked,e.addButton(i);var n=new Kt;n.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(n),this.straightener=new Qt("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(e){t.rotateBy(e),t.straightener.angle=t.rotationAngle},n.addElement(this.straightener.getUI());var s=new Wt;s.minWidth=2*this.toolbarHeight+"px",s.contentAlign="end",this.bottomToolbar.addButtonBlock(s);var o=new Vt('',"Flip horizontal");o.onClick=this.flipHorizontallyButtonClicked,s.addButton(o);var a=new Vt('',"Flip vertical");a.onClick=this.flipVerticallyButtonClicked,s.addButton(a)},t.prototype.ratioButtonClicked=function(t){this.aspectRatio=t,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},t.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Yt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},t.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new qt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},t.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},t.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},t.prototype.restoreState=function(t){if(t){var e=this.cropLayer.getRescaledRect(t.width,t.height,this.imageWidth,this.imageHeight,t.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(e),this.cropRectChanged(e),this.flippedHorizontally=t.flippedHorizontally,this.flippedVertically=t.flippedVertically,this.applyFlip(),this.rotationAngle=t.rotationAngle,this.applyRotation()}},t.prototype.clientToLocalCoordinates=function(t,e){var r=this.cropImage.getBoundingClientRect();return{x:t-r.left,y:e-r.top}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var t=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=t+"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()},t.prototype.rotateLeftButtonClicked=function(){var t=this.rotationAngle-90;this.rotationAngle%90!=0&&(t+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateRightButtonClicked=function(){var t=this.rotationAngle+90;this.rotationAngle%90!=0&&(t-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateTo=function(t){t=(t=t>180?t-360:t)<=-180?t+360:t,this.rotationAngle=t,this.applyRotation()},t.prototype.rotateBy=function(t){this.rotateTo((this.rotationAngle+t)%360)},t.prototype.applyRotation=function(){var t=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 r=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/r.width,this.imageHeight/r.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=t},t.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},t.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},t.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},t.prototype.startRenderAndClose=function(){return Pt(this,void 0,void 0,(function(){var t,e;return Nt(this,(function(r){switch(r.label){case 0:return[4,this.render()];case 1:return t=r.sent(),e=this.getState(),this.renderEventListeners.forEach((function(r){return r(t,e)})),this.close(!0),[2]}}))}))},t.prototype.render=function(){return Pt(this,void 0,void 0,(function(){var t;return Nt(this,(function(e){switch(e.label){case 0:return(t=new Jt).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.width=this.renderWidth,t.height=this.renderHeight,this.unzoomFromCrop(),Bt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,t.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,t.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()]}}))}))},t.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ht("toolbar","\n width: "+("inline"===this.displayMode?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+";\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.toolbarHeight+"px;\n box-sizing: content-box;\n overflow: hidden;\n line-height: 0px;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new Ht("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new Ht("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var t=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ht("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*t)+"px;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new Ht("toolbar_dropdown","\n position: absolute;\n max-width: "+4*this.toolbarHeight+"px;\n z-index: 20;\n white-space: normal;\n box-sizing: content-box;\n box-shadow: 3px 3px rgba(33, 33, 33, 0.1);\n margin: "+("inline"===this.displayMode?"0":this.popupMargin)+"px;\n line-height: 0px;\n ")),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Ht("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ht("toolbar_straightener_block","\n display: flex;\n overflow: hidden;\n justify-content: center;\n -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%);\n ")),this.toolbarStraightenerStyleClass=this.styles.addClass(new Ht("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ht("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},t.instanceCounter=0,t}(),ee=r("8hTe"),re=r.n(ee),ie=/]*>/g;e.a=function(t){var e=t.value,r=void 0===e?"":e,l=t.edit,d=void 0!==l&&l,f=t.className,p=t.showTextOnly,g=t.showLines,m=t.replaces,v=t.zoomImg,y=t.hasMask,C=t.style,w=void 0===C?{}:C,k=t.stylesPrev,E=void 0===k?{}:k,A=String(r),D=Object(u.useRef)(),R=Object(u.useRef)(),O=Object(u.useState)(""),I=Object(a.a)(O,2),j=I[0],U=I[1],H=Object(u.useState)("office"),G=Object(a.a)(H,2),z=G[0],W=G[1],V=Object(u.useMemo)((function(){try{A=(A=A.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+P.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+P.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+P.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")).replace(new RegExp("(?[TOC]

      ",S()),b()),t=(t=t.replace(/(__special_katext_id_\d+__)/g,(function(t,r){var i=e[r],n=i.type,s=i.expression;return Object(N.renderToString)(function(t){var e=document.createElement("div");return e.innerHTML=t,0===e.childNodes.length?"":e.childNodes[0].nodeValue}(s)||"",{displayMode:"block"===n,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),L(),p){var r=document.createElement("div");return r.innerHTML=t,r.innerText}return setTimeout((function(){return Y()}),500),t}),[A]),K=Object(u.useRef)();function q(t){var e=t.target;if("IMG"===e.tagName.toUpperCase()){if(v){var r=e.getAttribute("src");U(r),W("image")}}else if("A"===e.tagName.toUpperCase()){var i=e.getAttribute("href");if(i.indexOf("office")>-1)t.preventDefault(),U(i),W("office");else if(i.indexOf("application/pdf")>-1)t.preventDefault(),U(i),W("pdf");else if(i.indexOf("type=text")>-1)t.preventDefault(),U(i),W("html");else if(i.startsWith("#")){t.preventDefault();var n=document.getElementById(i.replace("#",""));n&&n.scrollIntoView(!0)}}}x.WebkitLineClamp=g,g&&(w=Object(s.a)(Object(s.a)({},w),x));var Y=function(){var t,e=null===(t=K.current)||void 0===t?void 0:t.querySelectorAll("video");null==e||e.forEach((function(t){if(t.oncontextmenu=function(){return!1},t.src.indexOf(".m3u8")>-1)if(t.canPlayType("application/vnd.apple.mpegurl"));else if(M.a.isSupported()){var e=new M.a;e.loadSource(t.src),e.attachMedia(t)}}))};Object(u.useEffect)((function(){if(K.current&&V&&V.match(ie)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",q),function(){K.current.removeEventListener("click",q),L(),b()}}),[V,K.current,q]);return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:K,style:Object(s.a)({},w),className:"".concat(f||""," markdown-body ").concat(re.a.mdBody),onMouseOver:function(t){d&&("IMG"===t.target.nodeName?(D.current.style.display="flex",D.current.style.width=t.target.clientWidth+"px",D.current.style.height=t.target.clientHeight+"px",D.current.style.top=t.target.offsetTop+"px",D.current.style.left=t.target.offsetLeft+"px",R.current.src=t.target.getAttribute("src")):D.current.style.display="none")},dangerouslySetInnerHTML:{__html:V}}),h.a.createElement("div",{ref:D,className:re.a.button},h.a.createElement(i.a,null,h.a.createElement(n.a,{onClick:function(){return(t=new te(R.current)).displayMode="popup",t.addRenderEventListener(function(){var t=Object(o.a)(c.a.mark((function t(e){var r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return D.current.style.display="none",t.next=3,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e}});case 3:null!=(r=t.sent)&&r.id&&m(R.current.getAttribute("src").replace(P.a.API_SERVER,""),"/api/attachments/".concat(null==r?void 0:r.id,"?type=").concat(r.content_type));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),void t.show();var t}},"裁剪"),h.a.createElement(n.a,{onClick:function(){return(t=new _t(R.current)).settings.displayMode="popup",t.addEventListener("render",function(){var t=Object(o.a)(c.a.mark((function t(e){var r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(D.current.style.display="none",!R.current){t.next=6;break}return t.next=4,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e.dataUrl}});case 4:null!=(r=t.sent)&&r.id&&m(R.current.getAttribute("src").replace(P.a.API_SERVER,""),"/api/attachments/".concat(null==r?void 0:r.id,"?type=").concat(r.content_type));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.show(),void(window.markerArea=t);var t}},"编辑"))),h.a.createElement("img",{ref:R,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),h.a.createElement(F.a,{close:!0,data:j,hasMask:y,type:null!=j&&j.length?z:"",style:Object(s.a)({},E),onClose:function(){return U("")}}))}},"9VGf": +***************************************************************************** */function Mt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}It(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function Pt(t,e,i,r){return new(i||(i=Promise))((function(n,s){function o(t){try{l(r.next(t))}catch(t){s(t)}}function a(t){try{l(r.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))}function Nt(t,e){var i,r,n,s,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(n=2&s[0]?r.return:s[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;switch(r=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]0&&e>0){var i=new qt(t,e),r=i.ratio>=1?20:i.getHorizontalLength(20),n=i.ratio<1?20:i.getVerticalLength(20),s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(s);var o=Bt.createDefs();s.appendChild(o);var a=Bt.createElement("clipPath",[["id","text-bg-clip"]]);o.appendChild(a);var l=Bt.createPath(Bt.getHollowRectanglePath((24-r)/2,(24-n)/2,r,n,(24-r)/2+2,(24-n)/2+2,r-4,n-4));s.appendChild(l);var c=Bt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Bt.createTSpan(t+":"+e)),s.appendChild(c);var u=c.getBBox();Bt.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=Bt.createPath(Bt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(u.width))/2,(24-Math.ceil(u.height))/2,Math.ceil(u.width),Math.ceil(u.height)));return a.appendChild(h),Bt.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(s),s.outerHTML}return''},t}(),Xt=function(t){function e(e,i,r){var n=t.call(this,e,i)||this;return n.isDropdownOpen=!1,n.onClick=n.dropdownButtonClicked,n.dropdownButtons=r,n}return Mt(e,t),e.prototype.setupDropdown=function(){var t=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(e){e.className=t.className,e.colorsClassName=t.colorsClassName,t.dropdownBlock.appendChild(e.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},e.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},e.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},e.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},e.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},e.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},e}(Vt),$t=function(){function t(t,e){this.GRIP_SIZE=10,this.color=t,this.fillColor=e,this.visual=Bt.createGroup(),this.visual.appendChild(Bt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Bt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t.prototype.setCenter=function(t,e){this.visual.childNodes.forEach((function(i){return Bt.setAttributes(i,[["cx",t.toString()],["cy",e.toString()]])}))},t}(),Zt=function(){function t(t,e,i,r){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=t,this.canvasHeight=e,this.margin=i,this.container=r,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(t.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(t){this._aspectRatio=t,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.gridContainer&&Bt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(t){this._zoomFactor=t,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),t.prototype.open=function(){var t=this;this.cropShadeElement=Bt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Bt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var e=0;ethis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-e.height/2),Bt.setAttributes(this.cropRectElement,[["x",e.x.toString()],["y",e.y.toString()],["width",e.width.toString()],["height",e.height.toString()]]);var i=e.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(t,r){var n=e.y+i*(r+1);Bt.setAttributes(t,[["x1",""+e.x],["y1",""+n],["x2",""+(e.x+e.width)],["y2",""+n]])}));var r=e.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(t,i){var n=e.x+r*(i+1);Bt.setAttributes(t,[["x1",""+n],["y1",""+e.y],["x2",""+n],["y2",""+(e.y+e.height)]])})),Bt.setAttributes(this.cropShadeElement,[["d",Bt.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},t.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)},t.prototype.clientToLocalCoordinates=function(t,e){var i=this.container.getBoundingClientRect();return{x:t-i.left+this.margin,y:e-i.top+this.margin}},t.prototype.onPointerDown=function(t){this.container.setPointerCapture(t.pointerId),this.previousPoint=this.clientToLocalCoordinates(t.clientX,t.clientY),this.cropRectElement===t.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(t.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(t.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(t.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(t.target)&&(this.activeGrip=this.bottomRightGrip)},t.prototype.onPointerMove=function(t){if(this.isMoving)this.move(this.clientToLocalCoordinates(t.clientX,t.clientY));else if(this.activeGrip){var e=this.clientToLocalCoordinates(t.clientX,t.clientY);this.resize(e)}t.preventDefault()},t.prototype.onPointerUp=function(t){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(t.pointerId)},t.prototype.move=function(t){var e=t.x-this.previousPoint.x,i=t.y-this.previousPoint.y;1!==this.zoomFactor&&(e=-e/this.zoomFactor,i=-i/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+i),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=t},t.prototype.resize=function(t){var e=Object.assign({},this.cropRect),i=t.x-this.previousPoint.x,r=t.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:e.x+ithis.canvasWidth*this.zoomFactor&&(i=this.canvasWidth*this.zoomFactor-e.width),e.width+=i}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(i),e.height=this.aspectRatio.getVerticalLength(e.width)):(e.y+=r,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+=r}e.width<10&&(e.x=this.cropRect.x,e.width=10),e.height<10&&(e.y=this.cropRect.y,e.height=10),this.previousPoint=t,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))},t.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var t=this.cropRect.x+this.cropRect.width/2,e=this.cropRect.y+this.cropRect.height/2,i=this.aspectRatio.getHorizontalLength(this.cropRect.height),r=this.aspectRatio.getVerticalLength(this.cropRect.width);i/this.canvasWidththis.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=t-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)}},t.prototype.getRescaledRect=function(t,e,i,r,n,s){var o=i/t,a=r/e;return{x:(n.x-s)*o+s,y:(n.y-s)*a+s,width:n.width*o,height:n.height*a}},t.prototype.scaleCanvas=function(t,e){var i=this.getRescaledRect(this.canvasWidth,this.canvasHeight,t,e,this.cropRect,this.margin);this.canvasWidth=t,this.canvasHeight=e,this.onCropChange&&this.onCropChange(i),this.setCropRectangle(i)},t}(),Qt=function(){function t(t){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=t,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(t.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),t.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},t.prototype.onPointerDown=function(t){this.controlContainer.setPointerCapture(t.pointerId),this.isDragging=!0,this.previousPoint={x:t.clientX,y:t.clientY}},t.prototype.onPointerMove=function(t){this.isDragging&&(this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.previousPoint.x=t.clientX)},t.prototype.onPointerUp=function(t){this.isDragging&&this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(t.pointerId)},t.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var t=this.angleLabelText.getBBox();Bt.setAttributes(this.angleLabelElement,[["x",((this.width-t.width)/2).toString()],["y",(this.height/2).toString()]])}},t.prototype.positionScaleShape=function(){if(this.scaleShape){var t=this.scaleShape.transform.baseVal.getItem(0);t.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(t,0)}},t.prototype.getVisual=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("width",this.width+"px"),t.setAttribute("height",this.height+"px"),t.setAttribute("viewBox","0 0 "+this.width+" "+this.height),t.style.flexShrink="0",document.body.appendChild(t);for(var e="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,i=1;i<=this.width/5+10;i++){var r=i%5==0?this.height/3:this.height/6;e+="h4v"+-r+"h1v"+r}e+="v1H0Z",this.scaleShape=Bt.createPath(e);var n=Bt.createTransform();this.scaleShape.transform.baseVal.appendItem(n),t.appendChild(this.scaleShape),this.angleLabelElement=Bt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Bt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var s=Bt.createTSpan("");return s.innerHTML="°",this.angleLabelElement.appendChild(s),t.appendChild(this.angleLabelElement),document.body.removeChild(t),t},t}(),Jt=function(){function t(){this.naturalSize=!1,this.imageType="image/png"}return t.prototype.rasterize=function(t,e,i,r,n,s,o){var a=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=t.width.baseVal.value-2*r,c.height=t.height.baseVal.value-2*r;var u=1,h=1;!0===a.naturalSize?(u=e.naturalWidth/(t.width.baseVal.value-2*r)/s,h=e.naturalHeight/(t.height.baseVal.value-2*r)/o,c.width=e.naturalWidth/s,c.height=e.naturalHeight/o):void 0!==a.width&&void 0!==a.height&&(u=a.width/i.width,h=a.height/i.height,c.width*=u,c.height*=h);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(n*Math.PI/180),d.scale(s,o),d.translate(-c.width/2,-c.height/2),d.drawImage(e,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=i.width*u,f.height=i.height*h,f.getContext("2d").putImageData(d.getImageData((i.x-r)*u,(i.y-r)*h,i.width*u,i.height*h),0,0),l(f.toDataURL(a.imageType,a.imageQuality))}))},t}(),te=function(){function t(e){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=t.instanceCounter++,this.styles=new jt(this.instanceNo),this.target=e,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(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(t){this._zoomToCropEnabled=t,t?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gridLines",{get:function(){return this._gridLines},set:function(t){this._gridLines=t,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(t){this._rotationAngle=t,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"aspectRatio",{get:function(){var t;return null!==(t=this._aspectRatio)&&void 0!==t?t:this.aspectRatios[0]},set:function(t){this._aspectRatio=t},enumerable:!1,configurable:!0}),t.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(),"popup"===this.displayMode&&this.onPopupResize(),this._isOpen=!0},t.prototype.show=function(){this.showUI(),this.open()},t.prototype.close=function(t){void 0===t&&(t=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),t||this.closeEventListeners.forEach((function(t){return t()})),this._isOpen=!1)},t.prototype.addRenderEventListener=function(t){this.renderEventListeners.push(t)},t.prototype.removeRenderEventListener=function(t){this.renderEventListeners.indexOf(t)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(t),1)},t.prototype.addCloseEventListener=function(t){this.closeEventListeners.push(t)},t.prototype.removeCloseEventListener=function(t){this.closeEventListeners.indexOf(t)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(t),1)},t.prototype.setupResizeObserver=function(){var t=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){t.resize(t.target.clientWidth,t.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},t.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var t=1*this.target.clientWidth/this.target.clientHeight,e=this.contentDiv.clientWidth/t>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*t:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,i=e+2*this.CANVAS_MARGINt+this.CANVAS_MARGIN?this.target.offsetTop-(t+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=void 0!==this.styles.settings.zIndex?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=void 0!==this.styles.settings.zIndex?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="popup"===this.displayMode?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,"popup"===this.displayMode&&(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","popup"===this.displayMode&&(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},t.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},t.prototype.addTopToolbar=function(){var t=this;this.topToolbar=new Gt,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 Wt;e.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(e);var i=[];this.aspectRatios.forEach((function(e){var r=new Vt(Yt.getIcon(e.horizontal,e.vertical),0===e.horizontal&&0===e.vertical?"FREE":e.horizontal+":"+e.vertical);r.onClick=function(){return t.ratioButtonClicked(e)},i.push(r)})),this.aspectRatioButton=new Xt(Yt.getIcon(0,0),"Aspect ratio",i),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 r=new Vt('',"Toggle grid");r.isActive=this.isGridVisible,r.onClick=function(){t.isGridVisible=!t.isGridVisible,r.isActive=t.isGridVisible},e.addButton(r);var n=new Vt('',"Zoom to selection");if(n.isActive=this.zoomToCropEnabled,n.onClick=function(){t.zoomToCropEnabled=!t.zoomToCropEnabled,n.isActive=t.zoomToCropEnabled},e.addButton(n),!Ft.isLicensed){var s=new Kt;this.topToolbar.addElementBlock(s);var o=document.createElement("div");o.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var a=document.createElement("a");a.style.color="currentColor",a.href="https://markerjs.com/products/cropro",a.target="_blank",a.innerHTML='',o.appendChild(a),s.addElement(o)}var l=new Wt;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new Vt('',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new Vt('',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},t.prototype.addBottomToolbar=function(){var t=this;this.bottomToolbar=new Gt,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 Wt;e.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(e);var i=new Vt('',"Rotate left");i.onClick=this.rotateLeftButtonClicked,e.addButton(i);var r=new Vt('',"Rotate right");r.onClick=this.rotateRightButtonClicked,e.addButton(r);var n=new Kt;n.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(n),this.straightener=new Qt("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(e){t.rotateBy(e),t.straightener.angle=t.rotationAngle},n.addElement(this.straightener.getUI());var s=new Wt;s.minWidth=2*this.toolbarHeight+"px",s.contentAlign="end",this.bottomToolbar.addButtonBlock(s);var o=new Vt('',"Flip horizontal");o.onClick=this.flipHorizontallyButtonClicked,s.addButton(o);var a=new Vt('',"Flip vertical");a.onClick=this.flipVerticallyButtonClicked,s.addButton(a)},t.prototype.ratioButtonClicked=function(t){this.aspectRatio=t,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},t.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Yt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},t.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new qt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},t.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},t.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},t.prototype.restoreState=function(t){if(t){var e=this.cropLayer.getRescaledRect(t.width,t.height,this.imageWidth,this.imageHeight,t.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(e),this.cropRectChanged(e),this.flippedHorizontally=t.flippedHorizontally,this.flippedVertically=t.flippedVertically,this.applyFlip(),this.rotationAngle=t.rotationAngle,this.applyRotation()}},t.prototype.clientToLocalCoordinates=function(t,e){var i=this.cropImage.getBoundingClientRect();return{x:t-i.left,y:e-i.top}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var t=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=t+"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()},t.prototype.rotateLeftButtonClicked=function(){var t=this.rotationAngle-90;this.rotationAngle%90!=0&&(t+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateRightButtonClicked=function(){var t=this.rotationAngle+90;this.rotationAngle%90!=0&&(t-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateTo=function(t){t=(t=t>180?t-360:t)<=-180?t+360:t,this.rotationAngle=t,this.applyRotation()},t.prototype.rotateBy=function(t){this.rotateTo((this.rotationAngle+t)%360)},t.prototype.applyRotation=function(){var t=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 i=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/i.width,this.imageHeight/i.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=t},t.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},t.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},t.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},t.prototype.startRenderAndClose=function(){return Pt(this,void 0,void 0,(function(){var t,e;return Nt(this,(function(i){switch(i.label){case 0:return[4,this.render()];case 1:return t=i.sent(),e=this.getState(),this.renderEventListeners.forEach((function(i){return i(t,e)})),this.close(!0),[2]}}))}))},t.prototype.render=function(){return Pt(this,void 0,void 0,(function(){var t;return Nt(this,(function(e){switch(e.label){case 0:return(t=new Jt).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.width=this.renderWidth,t.height=this.renderHeight,this.unzoomFromCrop(),Bt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,t.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,t.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()]}}))}))},t.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ht("toolbar","\n width: "+("inline"===this.displayMode?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+";\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.toolbarHeight+"px;\n box-sizing: content-box;\n overflow: hidden;\n line-height: 0px;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new Ht("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new Ht("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var t=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ht("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*t)+"px;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new Ht("toolbar_dropdown","\n position: absolute;\n max-width: "+4*this.toolbarHeight+"px;\n z-index: 20;\n white-space: normal;\n box-sizing: content-box;\n box-shadow: 3px 3px rgba(33, 33, 33, 0.1);\n margin: "+("inline"===this.displayMode?"0":this.popupMargin)+"px;\n line-height: 0px;\n ")),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Ht("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ht("toolbar_straightener_block","\n display: flex;\n overflow: hidden;\n justify-content: center;\n -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%);\n ")),this.toolbarStraightenerStyleClass=this.styles.addClass(new Ht("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ht("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},t.instanceCounter=0,t}(),ee=i("8hTe"),ie=i.n(ee),re=/]*>/g;e.a=function(t){var e=t.value,i=void 0===e?"":e,l=t.edit,d=void 0!==l&&l,f=t.className,p=t.showTextOnly,g=t.showLines,m=t.replaces,v=t.zoomImg,y=t.hasMask,C=t.style,w=void 0===C?{}:C,k=t.stylesPrev,E=void 0===k?{}:k,A=String(i),D=Object(u.useRef)(),R=Object(u.useRef)(),O=Object(u.useState)(""),I=Object(a.a)(O,2),j=I[0],U=I[1],H=Object(u.useState)("office"),G=Object(a.a)(H,2),z=G[0],W=G[1],V=Object(u.useMemo)((function(){try{A=(A=A.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+P.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+P.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+P.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")).replace(new RegExp("(?[TOC]

      ",S()),b()),t=(t=t.replace(/(__special_katext_id_\d+__)/g,(function(t,i){var r=e[i],n=r.type,s=r.expression;return Object(N.renderToString)(function(t){var e=document.createElement("div");return e.innerHTML=t,0===e.childNodes.length?"":e.childNodes[0].nodeValue}(s)||"",{displayMode:"block"===n,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),L(),p){var i=document.createElement("div");return i.innerHTML=t,i.innerText}return setTimeout((function(){return Y()}),500),t}),[A]),K=Object(u.useRef)();function q(t){var e=t.target;if("IMG"===e.tagName.toUpperCase()){if(v){var i=e.getAttribute("src");U(i),W("image")}}else if("A"===e.tagName.toUpperCase()){var r=e.getAttribute("href");if(r.indexOf("office")>-1)t.preventDefault(),U(r),W("office");else if(r.indexOf("application/pdf")>-1)t.preventDefault(),U(r),W("pdf");else if(r.indexOf("type=text")>-1)t.preventDefault(),U(r),W("html");else if(r.startsWith("#")){t.preventDefault();var n=document.getElementById(r.replace("#",""));n&&n.scrollIntoView(!0)}}}x.WebkitLineClamp=g,g&&(w=Object(s.a)(Object(s.a)({},w),x));var Y=function(){var t,e=null===(t=K.current)||void 0===t?void 0:t.querySelectorAll("video");null==e||e.forEach((function(t){if(t.oncontextmenu=function(){return!1},t.src.indexOf(".m3u8")>-1)if(t.canPlayType("application/vnd.apple.mpegurl"));else if(M.a.isSupported()){var e=new M.a;e.loadSource(t.src),e.attachMedia(t)}}))};Object(u.useEffect)((function(){if(K.current&&V&&V.match(re)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",q),function(){K.current.removeEventListener("click",q),L(),b()}}),[V,K.current,q]);return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:K,style:Object(s.a)({},w),className:"".concat(f||""," markdown-body ").concat(ie.a.mdBody),onMouseOver:function(t){d&&("IMG"===t.target.nodeName?(D.current.style.display="flex",D.current.style.width=t.target.clientWidth+"px",D.current.style.height=t.target.clientHeight+"px",D.current.style.top=t.target.offsetTop+"px",D.current.style.left=t.target.offsetLeft+"px",R.current.src=t.target.getAttribute("src")):D.current.style.display="none")},dangerouslySetInnerHTML:{__html:V}}),h.a.createElement("div",{ref:D,className:ie.a.button},h.a.createElement(r.a,null,h.a.createElement(n.a,{onClick:function(){return(t=new te(R.current)).displayMode="popup",t.addRenderEventListener(function(){var t=Object(o.a)(c.a.mark((function t(e){var i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return D.current.style.display="none",t.next=3,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e}});case 3:null!=(i=t.sent)&&i.id&&m(R.current.getAttribute("src").replace(P.a.API_SERVER,""),"/api/attachments/".concat(null==i?void 0:i.id,"?type=").concat(i.content_type));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),void t.show();var t}},"裁剪"),h.a.createElement(n.a,{onClick:function(){return(t=new _t(R.current)).settings.displayMode="popup",t.addEventListener("render",function(){var t=Object(o.a)(c.a.mark((function t(e){var i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(D.current.style.display="none",!R.current){t.next=6;break}return t.next=4,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e.dataUrl}});case 4:null!=(i=t.sent)&&i.id&&m(R.current.getAttribute("src").replace(P.a.API_SERVER,""),"/api/attachments/".concat(null==i?void 0:i.id,"?type=").concat(i.content_type));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.show(),void(window.markerArea=t);var t}},"编辑"))),h.a.createElement("img",{ref:R,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),h.a.createElement(F.a,{close:!0,data:j,hasMask:y,type:null!=j&&j.length?z:"",style:Object(s.a)({},E),onClose:function(){return U("")}}))}},"9VGf": /*!****************************************!*\ !*** ./src/components/useInterval.tsx ***! \****************************************/ /*! exports provided: default */ -/*! exports used: default */function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var i=r(/*! react */"q1tI");function n(t,e){var r=Object(i.useRef)();Object(i.useEffect)((function(){r.current=t})),Object(i.useEffect)((function(){if(null!==e){var t=setInterval((function(){r.current()}),e);return function(){return clearInterval(t)}}}),[e])}},BU3w: +/*! exports used: default */function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var r=i(/*! react */"q1tI");function n(t,e){var i=Object(r.useRef)();Object(r.useEffect)((function(){i.current=t})),Object(r.useEffect)((function(){if(null!==e){var t=setInterval((function(){i.current()}),e);return function(){return clearInterval(t)}}}),[e])}},BU3w: /*!***************************************************!*\ !*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***! \***************************************************/ /*! exports provided: injectCSS, updateCSS */ -/*! exports used: updateCSS */function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var i=r(/*! ./canUseDom */"MNnm");function n(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function s(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(i.a)())return null;var s,o=document.createElement("style");(null===(e=r.csp)||void 0===e?void 0:e.nonce)&&(o.nonce=null===(s=r.csp)||void 0===s?void 0:s.nonce);o.innerHTML=t;var a=n(r),l=a.firstChild;return r.prepend&&a.prepend?a.prepend(o):r.prepend&&l?a.insertBefore(o,l):a.appendChild(o),o}var o=new Map;function a(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n(r);if(!o.has(i)){var a=s("",r),l=a.parentNode;o.set(i,l),l.removeChild(a)}var c=Array.from(o.get(i).children).find((function(t){return"STYLE"===t.tagName&&t["rc-util-key"]===e}));if(c){var u,h,d;if((null===(u=r.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(h=r.csp)||void 0===h?void 0:h.nonce))c.nonce=null===(d=r.csp)||void 0===d?void 0:d.nonce;return c.innerHTML!==t&&(c.innerHTML=t),c}var f=s(t,r);return f["rc-util-key"]=e,f}},Bd2K: +/*! exports used: updateCSS */function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var r=i(/*! ./canUseDom */"MNnm");function n(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function s(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(r.a)())return null;var s,o=document.createElement("style");(null===(e=i.csp)||void 0===e?void 0:e.nonce)&&(o.nonce=null===(s=i.csp)||void 0===s?void 0:s.nonce);o.innerHTML=t;var a=n(i),l=a.firstChild;return i.prepend&&a.prepend?a.prepend(o):i.prepend&&l?a.insertBefore(o,l):a.appendChild(o),o}var o=new Map;function a(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n(i);if(!o.has(r)){var a=s("",i),l=a.parentNode;o.set(r,l),l.removeChild(a)}var c=Array.from(o.get(r).children).find((function(t){return"STYLE"===t.tagName&&t["rc-util-key"]===e}));if(c){var u,h,d;if((null===(u=i.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(h=i.csp)||void 0===h?void 0:h.nonce))c.nonce=null===(d=i.csp)||void 0===d?void 0:d.nonce;return c.innerHTML!==t&&(c.innerHTML=t),c}var f=s(t,i);return f["rc-util-key"]=e,f}},Bd2K: /*!********************************************************!*\ !*** ./node_modules/codemirror/addon/edit/closetag.js ***! \********************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){t.defineOption("autoCloseTags",!1,(function(o,a,l){if(l!=t.Init&&l&&o.removeKeyMap("autoCloseTags"),a){var c={name:"autoCloseTags"};"object"==typeof a&&!1===a.whenClosing||(c["'/'"]=function(e){return function(e){return e.getOption("disableInput")?t.Pass:i(e,!0)}(e)}),"object"==typeof a&&!1===a.whenOpening||(c["'>'"]=function(i){return function(i){if(i.getOption("disableInput"))return t.Pass;for(var o=i.listSelections(),a=[],l=i.getOption("autoCloseTags"),c=0;cu.ch&&(g=g.slice(0,g.length-h.end+u.ch));var b=g.toLowerCase();if(!g||"string"==h.type&&(h.end!=u.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||1==h.string.length)||"tag"==h.type&&p.close||h.string.indexOf("/")==u.ch-h.start-1||v&&n(v,b)>-1||s(i,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],g,u,!0))return t.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&n(x,g)>-1)a[c]={text:"/>",newPos:t.Pos(u.line,u.ch+2)};else{var S=y&&n(y,b)>-1;a[c]={indent:S,text:">"+(S?"\n\n":"")+"",newPos:S?t.Pos(u.line+1,0):t.Pos(u.line,u.ch+1)}}}var C="object"==typeof l&&l.dontIndentOnAutoClose;for(c=o.length-1;c>=0;c--){var w=a[c];i.replaceRange(w.text,o[c].head,o[c].anchor,"+insert");var k=i.listSelections().slice(0);k[c]={head:w.newPos,anchor:w.newPos},i.setSelections(k),!C&&w.indent&&(i.indentLine(w.newPos.line,null,!0),i.indentLine(w.newPos.line+1,null,!0))}}(i)}),o.addKeyMap(c)}}));var e=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],r=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function i(e,r){for(var i=e.listSelections(),n=[],o=r?"/":""!=e.getLine(u.line).charAt(h.end)&&(p+=">"),n[c]=p}if(e.replaceSelections(n),i=e.listSelections(),!l)for(c=0;c=0&&r[c]==i;c--)++l;for(n=a.to,c=1;c'"]=function(r){return function(r){if(r.getOption("disableInput"))return t.Pass;for(var o=r.listSelections(),a=[],l=r.getOption("autoCloseTags"),c=0;cu.ch&&(g=g.slice(0,g.length-h.end+u.ch));var b=g.toLowerCase();if(!g||"string"==h.type&&(h.end!=u.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||1==h.string.length)||"tag"==h.type&&p.close||h.string.indexOf("/")==u.ch-h.start-1||v&&n(v,b)>-1||s(r,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],g,u,!0))return t.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&n(x,g)>-1)a[c]={text:"/>",newPos:t.Pos(u.line,u.ch+2)};else{var S=y&&n(y,b)>-1;a[c]={indent:S,text:">"+(S?"\n\n":"")+"",newPos:S?t.Pos(u.line+1,0):t.Pos(u.line,u.ch+1)}}}var C="object"==typeof l&&l.dontIndentOnAutoClose;for(c=o.length-1;c>=0;c--){var w=a[c];r.replaceRange(w.text,o[c].head,o[c].anchor,"+insert");var k=r.listSelections().slice(0);k[c]={head:w.newPos,anchor:w.newPos},r.setSelections(k),!C&&w.indent&&(r.indentLine(w.newPos.line,null,!0),r.indentLine(w.newPos.line+1,null,!0))}}(r)}),o.addKeyMap(c)}}));var e=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],i=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(e,i){for(var r=e.listSelections(),n=[],o=i?"/":""!=e.getLine(u.line).charAt(h.end)&&(p+=">"),n[c]=p}if(e.replaceSelections(n),r=e.listSelections(),!l)for(c=0;c=0&&i[c]==r;c--)++l;for(n=a.to,c=1;c0){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"",r=[],i=0;i0){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"",i=[],r=0;rt.length)&&(e=t.length);for(var r=0,i=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(i=t[Symbol.iterator]()).next.bind(i)}var i=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){function e(){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}}t.exports={defaults:{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},getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}})),n=(i.defaults,i.getDefaults,i.changeDefaults,/[&<>"']/),s=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(t){return l[t]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(t){return t.replace(u,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}var d=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,g={},m=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(t,e){g[" "+t]||(m.test(t)?g[" "+t]=t+"/":g[" "+t]=x(t,"/",!0));var r=-1===(t=g[" "+t]).indexOf(":");return"//"===e.substring(0,2)?r?e:t.replace(v,"$1")+e:"/"===e.charAt(0)?r?e:t.replace(y,"$1")+e:t+e}function x(t,e,r){var i=t.length;if(0===i)return"";for(var n=0;n=0&&"\\"===r[n];)i=!i;return i?"|":" |"})).split(/ \|/),i=0;if(r.length>e)r.splice(e);else for(;r.length1?{type:"space",raw:e[0]}:{raw:"\n"}},e.code=function(t,e){var r=this.rules.block.code.exec(t);if(r){var i=e[e.length-1];if(i&&"paragraph"===i.type)return{raw:r[0],text:r[0].trimRight()};var n=r[0].replace(/^ {4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:_(n,"\n")}}},e.fences=function(t){var e=this.rules.block.fences.exec(t);if(e){var r=e[0],i=function(t,e){var r=t.match(/^(\s+)(?:```)/);if(null===r)return e;var i=r[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:e[0].length>=i.length?t.slice(i.length):t})).join("\n")}(r,e[3]||"");return{type:"code",raw:r,lang:e[2]?e[2].trim():e[2],text:i}}},e.heading=function(t){var e=this.rules.block.heading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},e.nptable=function(t){var e=this.rules.block.nptable.exec(t);if(e){var r={type:"table",header:I(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(r.header.length===r.align.length){var i,n=r.align.length;for(i=0;i ?/gm,"");return{type:"blockquote",raw:e[0],text:r}}},e.list=function(t){var e=this.rules.block.list.exec(t);if(e){for(var r,i,n,s,o,a,l,c=e[0],u=e[2],h=u.length>1,d=")"===u[u.length-1],f={type:"list",raw:c,ordered:h,start:h?+u.slice(0,-1):"",loose:!1,items:[]},p=e[0].match(this.rules.block.item),g=!1,m=p.length,v=0;v1||this.options.smartLists&&n!==u)&&(s=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-s.length),v=m-1)),o=g||/\n\n(?!\s*$)/.test(r),v!==m-1&&(g="\n"===r.charAt(r.length-1),o||(o=g)),o&&(f.loose=!0),l=void 0,(a=/^\[[ xX]\] /.test(r))&&(l=" "!==r[1],r=r.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:a,checked:l,loose:o,text:r});return f}},e.html=function(t){var e=this.rules.block.html.exec(t);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):M(e[0]):e[0]}},e.def=function(t){var e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}},e.table=function(t){var e=this.rules.block.table.exec(t);if(e){var r={type:"table",header:I(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(r.header.length===r.align.length){r.raw=e[0];var i,n=r.align.length;for(i=0;i/i.test(i[0])&&(e=!1),!r&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?r=!0:r&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(r=!1),{type:this.options.sanitize?"text":"html",raw:i[0],inLink:e,inRawBlock:r,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):M(i[0]):i[0]}},e.link=function(t){var e=this.rules.inline.link.exec(t);if(e){var r=P(e[2],"()");if(r>-1){var i=(0===e[0].indexOf("!")?5:4)+e[1].length+r;e[2]=e[2].substring(0,r),e[0]=e[0].substring(0,i).trim(),e[3]=""}var n=e[2],s="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);o?(n=o[1],s=o[3]):s=""}else s=e[3]?e[3].slice(1,-1):"";return N(e,{href:(n=n.trim().replace(/^<([\s\S]*)>$/,"$1"))?n.replace(this.rules.inline._escapes,"$1"):n,title:s?s.replace(this.rules.inline._escapes,"$1"):s},e[0])}},e.reflink=function(t,e){var r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){var i=(r[2]||r[1]).replace(/\s+/g," ");if(!(i=e[i.toLowerCase()])||!i.href){var n=r[0].charAt(0);return{type:"text",raw:n,text:n}}return N(r,i,r[0])}},e.strong=function(t,e,r){void 0===r&&(r="");var i=this.rules.inline.strong.start.exec(t);if(i&&(!i[1]||i[1]&&(""===r||this.rules.inline.punctuation.exec(r)))){e=e.slice(-1*t.length);var n,s="**"===i[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(s.lastIndex=0;null!=(i=s.exec(e));)if(n=this.rules.inline.strong.middle.exec(e.slice(0,i.index+3)))return{type:"strong",raw:t.slice(0,n[0].length),text:t.slice(2,n[0].length-2)}}},e.em=function(t,e,r){void 0===r&&(r="");var i=this.rules.inline.em.start.exec(t);if(i&&(!i[1]||i[1]&&(""===r||this.rules.inline.punctuation.exec(r)))){e=e.slice(-1*t.length);var n,s="*"===i[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(s.lastIndex=0;null!=(i=s.exec(e));)if(n=this.rules.inline.em.middle.exec(e.slice(0,i.index+2)))return{type:"em",raw:t.slice(0,n[0].length),text:t.slice(1,n[0].length-1)}}},e.codespan=function(t){var e=this.rules.inline.code.exec(t);if(e){var r=e[2].replace(/\n/g," "),i=/[^ ]/.test(r),n=r.startsWith(" ")&&r.endsWith(" ");return i&&n&&(r=r.substring(1,r.length-1)),r=M(r,!0),{type:"codespan",raw:e[0],text:r}}},e.br=function(t){var e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}},e.del=function(t){var e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[1]}},e.autolink=function(t,e){var r,i,n=this.rules.inline.autolink.exec(t);if(n)return i="@"===n[2]?"mailto:"+(r=M(this.options.mangle?e(n[1]):n[1])):r=M(n[1]),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}},e.url=function(t,e){var r;if(r=this.rules.inline.url.exec(t)){var i,n;if("@"===r[2])n="mailto:"+(i=M(this.options.mangle?e(r[0]):r[0]));else{var s;do{s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(s!==r[0]);i=M(r[0]),n="www."===r[1]?"http://"+i:i}return{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}},e.inlineText=function(t,e,r){var i,n=this.rules.inline.text.exec(t);if(n)return i=e?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):M(n[0]):n[0]:M(this.options.smartypants?r(n[0]):n[0]),{type:"text",raw:n[0],text:i}},t}(),B=E,j=w,U=T,H={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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:B,table:B,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=j(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=j(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=j(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._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",H._comment=//,H.html=j(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=j(H._paragraph).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=j(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=U({},H),H.gfm=U({},H.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*|$)"}),H.gfm.nptable=j(H.gfm.nptable).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=j(H.gfm.table).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=U({},H.normal,{html:j("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:B,paragraph:j(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:B,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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:B,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};G.punctuation=j(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",G._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",G.em.start=j(G.em.start).replace(/punctuation/g,G._punctuation).getRegex(),G.em.middle=j(G.em.middle).replace(/punctuation/g,G._punctuation).replace(/overlapSkip/g,G._overlapSkip).getRegex(),G.em.endAst=j(G.em.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.em.endUnd=j(G.em.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.start=j(G.strong.start).replace(/punctuation/g,G._punctuation).getRegex(),G.strong.middle=j(G.strong.middle).replace(/punctuation/g,G._punctuation).replace(/blockSkip/g,G._blockSkip).getRegex(),G.strong.endAst=j(G.strong.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.endUnd=j(G.strong.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=j(G._blockSkip,"g").getRegex(),G.overlapSkip=j(G._overlapSkip,"g").getRegex(),G._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,G._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])?)+(?![-_])/,G.autolink=j(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex(),G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,G.tag=j(G.tag).replace("comment",H._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=j(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=j(G.reflink).replace("label",G._label).getRegex(),G.reflinkSearch=j(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex(),G.normal=U({},G),G.pedantic=U({},G.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:j(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:j(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=U({},G.normal,{escape:j(G.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]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),i+="&#"+r+";";return i}var X=function(){function e(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||W,this.options.tokenizer=this.options.tokenizer||new F,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var e={block:V.normal,inline:K.normal};this.options.pedantic?(e.block=V.pedantic,e.inline=K.pedantic):this.options.gfm&&(e.block=V.gfm,this.options.breaks?e.inline=K.breaks:e.inline=K.gfm),this.tokenizer.rules=e}e.lex=function(t,r){return new e(r).lex(t)};var r,i,n,s=e.prototype;return s.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens,!0),this.inline(this.tokens),this.tokens},s.blockTokens=function(t,e,r){var i,n,s,o;for(void 0===e&&(e=[]),void 0===r&&(r=!0),t=t.replace(/^ +$/gm,"");t;)if(i=this.tokenizer.space(t))t=t.substring(i.raw.length),i.type&&e.push(i);else if(i=this.tokenizer.code(t,e))t=t.substring(i.raw.length),i.type?e.push(i):((o=e[e.length-1]).raw+="\n"+i.raw,o.text+="\n"+i.text);else if(i=this.tokenizer.fences(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.heading(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.nptable(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.hr(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.blockquote(t))t=t.substring(i.raw.length),i.tokens=this.blockTokens(i.text,[],r),e.push(i);else if(i=this.tokenizer.list(t)){for(t=t.substring(i.raw.length),s=i.items.length,n=0;n0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(a));)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(s=this.tokenizer.escape(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.tag(t,r,i))t=t.substring(s.raw.length),r=s.inLink,i=s.inRawBlock,e.push(s);else if(s=this.tokenizer.link(t))t=t.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,i)),e.push(s);else if(s=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,i)),e.push(s);else if(s=this.tokenizer.strong(t,a,n))t=t.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],r,i),e.push(s);else if(s=this.tokenizer.em(t,a,n))t=t.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],r,i),e.push(s);else if(s=this.tokenizer.codespan(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.br(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.del(t))t=t.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],r,i),e.push(s);else if(s=this.tokenizer.autolink(t,Y))t=t.substring(s.raw.length),e.push(s);else if(r||!(s=this.tokenizer.url(t,Y))){if(s=this.tokenizer.inlineText(t,i,q))t=t.substring(s.raw.length),n=s.raw.slice(-1),e.push(s);else if(t){var c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else t=t.substring(s.raw.length),e.push(s);return e},r=e,n=[{key:"rules",get:function(){return{block:V,inline:K}}}],(i=null)&&t(r.prototype,i),n&&t(r,n),e}(),$=i.defaults,Z=k,Q=S,J=function(){function t(t){this.options=t||$}var e=t.prototype;return e.code=function(t,e,r){var i=(e||"").match(/\S*/)[0];if(this.options.highlight){var n=this.options.highlight(t,i);null!=n&&n!==t&&(r=!0,t=n)}return i?'
      '+(r?t:Q(t,!0))+"
      \n":"
      "+(r?t:Q(t,!0))+"
      \n"},e.blockquote=function(t){return"
      \n"+t+"
      \n"},e.html=function(t){return t},e.heading=function(t,e,r,i){return this.options.headerIds?"'+t+"\n":""+t+"\n"},e.hr=function(){return this.options.xhtml?"
      \n":"
      \n"},e.list=function(t,e,r){var i=e?"ol":"ul";return"<"+i+(e&&1!==r?' start="'+r+'"':"")+">\n"+t+"\n"},e.listitem=function(t){return"
    • "+t+"
    • \n"},e.checkbox=function(t){return" "},e.paragraph=function(t){return"

      "+t+"

      \n"},e.table=function(t,e){return e&&(e=""+e+""),"\n\n"+t+"\n"+e+"
      \n"},e.tablerow=function(t){return"\n"+t+"\n"},e.tablecell=function(t,e){var r=e.header?"th":"td";return(e.align?"<"+r+' align="'+e.align+'">':"<"+r+">")+t+"\n"},e.strong=function(t){return""+t+""},e.em=function(t){return""+t+""},e.codespan=function(t){return""+t+""},e.br=function(){return this.options.xhtml?"
      ":"
      "},e.del=function(t){return""+t+""},e.link=function(t,e,r){if(null===(t=Z(this.options.sanitize,this.options.baseUrl,t)))return r;var i='"},e.image=function(t,e,r){if(null===(t=Z(this.options.sanitize,this.options.baseUrl,t)))return r;var i=''+r+'":">"},e.text=function(t){return t},t}(),tt=function(){function t(){}var e=t.prototype;return e.strong=function(t){return t},e.em=function(t){return t},e.codespan=function(t){return t},e.del=function(t){return t},e.html=function(t){return t},e.text=function(t){return t},e.link=function(t,e,r){return""+r},e.image=function(t,e,r){return""+r},e.br=function(){return""},t}(),et=function(){function t(){this.seen={}}return t.prototype.slug=function(t){var e=t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(e)){var r=e;do{this.seen[r]++,e=r+"-"+this.seen[r]}while(this.seen.hasOwnProperty(e))}return this.seen[e]=0,e},t}(),rt=i.defaults,it=C,nt=function(){function t(t){this.options=t||rt,this.options.renderer=this.options.renderer||new J,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new tt,this.slugger=new et}t.parse=function(e,r){return new t(r).parse(e)};var e=t.prototype;return e.parse=function(t,e){void 0===e&&(e=!0);var r,i,n,s,o,a,l,c,u,h,d,f,p,g,m,v,y,b,x="",S=t.length;for(r=0;r0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,p),u+=this.renderer.listitem(g,y,v);x+=this.renderer.list(u,d,f);continue;case"html":x+=this.renderer.html(h.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;r+1An error occurred:

      "+at(t.message+"",!0)+"
      ";throw t}}return ht.options=ht.setOptions=function(t){return st(ht.defaults,t),ct(ht.defaults),ht},ht.getDefaults=lt,ht.defaults=ut,ht.use=function(t){var e=st({},t);if(t.renderer&&function(){var r=ht.defaults.renderer||new J,i=function(e){var i=r[e];r[e]=function(){for(var n=arguments.length,s=new Array(n),o=0;ot.length)&&(e=t.length);for(var i=0,r=new Array(e);i=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}var r=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){function e(){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}}t.exports={defaults:{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},getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}})),n=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),s=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(t){return l[t]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(t){return t.replace(u,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}var d=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,g={},m=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(t,e){g[" "+t]||(m.test(t)?g[" "+t]=t+"/":g[" "+t]=x(t,"/",!0));var i=-1===(t=g[" "+t]).indexOf(":");return"//"===e.substring(0,2)?i?e:t.replace(v,"$1")+e:"/"===e.charAt(0)?i?e:t.replace(y,"$1")+e:t+e}function x(t,e,i){var r=t.length;if(0===r)return"";for(var n=0;n=0&&"\\"===i[n];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(i.length>e)i.splice(e);else for(;i.length1?{type:"space",raw:e[0]}:{raw:"\n"}},e.code=function(t,e){var i=this.rules.block.code.exec(t);if(i){var r=e[e.length-1];if(r&&"paragraph"===r.type)return{raw:i[0],text:i[0].trimRight()};var n=i[0].replace(/^ {4}/gm,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?n:_(n,"\n")}}},e.fences=function(t){var e=this.rules.block.fences.exec(t);if(e){var i=e[0],r=function(t,e){var i=t.match(/^(\s+)(?:```)/);if(null===i)return e;var r=i[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:e[0].length>=r.length?t.slice(r.length):t})).join("\n")}(i,e[3]||"");return{type:"code",raw:i,lang:e[2]?e[2].trim():e[2],text:r}}},e.heading=function(t){var e=this.rules.block.heading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},e.nptable=function(t){var e=this.rules.block.nptable.exec(t);if(e){var i={type:"table",header:I(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(i.header.length===i.align.length){var r,n=i.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:e[0],text:i}}},e.list=function(t){var e=this.rules.block.list.exec(t);if(e){for(var i,r,n,s,o,a,l,c=e[0],u=e[2],h=u.length>1,d=")"===u[u.length-1],f={type:"list",raw:c,ordered:h,start:h?+u.slice(0,-1):"",loose:!1,items:[]},p=e[0].match(this.rules.block.item),g=!1,m=p.length,v=0;v1||this.options.smartLists&&n!==u)&&(s=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-s.length),v=m-1)),o=g||/\n\n(?!\s*$)/.test(i),v!==m-1&&(g="\n"===i.charAt(i.length-1),o||(o=g)),o&&(f.loose=!0),l=void 0,(a=/^\[[ xX]\] /.test(i))&&(l=" "!==i[1],i=i.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:a,checked:l,loose:o,text:i});return f}},e.html=function(t){var e=this.rules.block.html.exec(t);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):M(e[0]):e[0]}},e.def=function(t){var e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}},e.table=function(t){var e=this.rules.block.table.exec(t);if(e){var i={type:"table",header:I(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=e[0];var r,n=i.align.length;for(r=0;r/i.test(r[0])&&(e=!1),!i&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?i=!0:i&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(i=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:e,inRawBlock:i,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):M(r[0]):r[0]}},e.link=function(t){var e=this.rules.inline.link.exec(t);if(e){var i=P(e[2],"()");if(i>-1){var r=(0===e[0].indexOf("!")?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,r).trim(),e[3]=""}var n=e[2],s="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);o?(n=o[1],s=o[3]):s=""}else s=e[3]?e[3].slice(1,-1):"";return N(e,{href:(n=n.trim().replace(/^<([\s\S]*)>$/,"$1"))?n.replace(this.rules.inline._escapes,"$1"):n,title:s?s.replace(this.rules.inline._escapes,"$1"):s},e[0])}},e.reflink=function(t,e){var i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){var r=(i[2]||i[1]).replace(/\s+/g," ");if(!(r=e[r.toLowerCase()])||!r.href){var n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return N(i,r,i[0])}},e.strong=function(t,e,i){void 0===i&&(i="");var r=this.rules.inline.strong.start.exec(t);if(r&&(!r[1]||r[1]&&(""===i||this.rules.inline.punctuation.exec(i)))){e=e.slice(-1*t.length);var n,s="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(s.lastIndex=0;null!=(r=s.exec(e));)if(n=this.rules.inline.strong.middle.exec(e.slice(0,r.index+3)))return{type:"strong",raw:t.slice(0,n[0].length),text:t.slice(2,n[0].length-2)}}},e.em=function(t,e,i){void 0===i&&(i="");var r=this.rules.inline.em.start.exec(t);if(r&&(!r[1]||r[1]&&(""===i||this.rules.inline.punctuation.exec(i)))){e=e.slice(-1*t.length);var n,s="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(s.lastIndex=0;null!=(r=s.exec(e));)if(n=this.rules.inline.em.middle.exec(e.slice(0,r.index+2)))return{type:"em",raw:t.slice(0,n[0].length),text:t.slice(1,n[0].length-1)}}},e.codespan=function(t){var e=this.rules.inline.code.exec(t);if(e){var i=e[2].replace(/\n/g," "),r=/[^ ]/.test(i),n=i.startsWith(" ")&&i.endsWith(" ");return r&&n&&(i=i.substring(1,i.length-1)),i=M(i,!0),{type:"codespan",raw:e[0],text:i}}},e.br=function(t){var e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}},e.del=function(t){var e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[1]}},e.autolink=function(t,e){var i,r,n=this.rules.inline.autolink.exec(t);if(n)return r="@"===n[2]?"mailto:"+(i=M(this.options.mangle?e(n[1]):n[1])):i=M(n[1]),{type:"link",raw:n[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}},e.url=function(t,e){var i;if(i=this.rules.inline.url.exec(t)){var r,n;if("@"===i[2])n="mailto:"+(r=M(this.options.mangle?e(i[0]):i[0]));else{var s;do{s=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(s!==i[0]);r=M(i[0]),n="www."===i[1]?"http://"+r:r}return{type:"link",raw:i[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}},e.inlineText=function(t,e,i){var r,n=this.rules.inline.text.exec(t);if(n)return r=e?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):M(n[0]):n[0]:M(this.options.smartypants?i(n[0]):n[0]),{type:"text",raw:n[0],text:r}},t}(),B=E,j=w,U=T,H={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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:B,table:B,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=j(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=j(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=j(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._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",H._comment=//,H.html=j(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=j(H._paragraph).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=j(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=U({},H),H.gfm=U({},H.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*|$)"}),H.gfm.nptable=j(H.gfm.nptable).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=j(H.gfm.table).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=U({},H.normal,{html:j("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:B,paragraph:j(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:B,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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:B,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};G.punctuation=j(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",G._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",G.em.start=j(G.em.start).replace(/punctuation/g,G._punctuation).getRegex(),G.em.middle=j(G.em.middle).replace(/punctuation/g,G._punctuation).replace(/overlapSkip/g,G._overlapSkip).getRegex(),G.em.endAst=j(G.em.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.em.endUnd=j(G.em.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.start=j(G.strong.start).replace(/punctuation/g,G._punctuation).getRegex(),G.strong.middle=j(G.strong.middle).replace(/punctuation/g,G._punctuation).replace(/blockSkip/g,G._blockSkip).getRegex(),G.strong.endAst=j(G.strong.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.endUnd=j(G.strong.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=j(G._blockSkip,"g").getRegex(),G.overlapSkip=j(G._overlapSkip,"g").getRegex(),G._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,G._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])?)+(?![-_])/,G.autolink=j(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex(),G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,G.tag=j(G.tag).replace("comment",H._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=j(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=j(G.reflink).replace("label",G._label).getRegex(),G.reflinkSearch=j(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex(),G.normal=U({},G),G.pedantic=U({},G.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:j(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:j(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=U({},G.normal,{escape:j(G.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]*?(?:(?=[\\.5&&(i="x"+i.toString(16)),r+="&#"+i+";";return r}var X=function(){function e(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||W,this.options.tokenizer=this.options.tokenizer||new F,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var e={block:V.normal,inline:K.normal};this.options.pedantic?(e.block=V.pedantic,e.inline=K.pedantic):this.options.gfm&&(e.block=V.gfm,this.options.breaks?e.inline=K.breaks:e.inline=K.gfm),this.tokenizer.rules=e}e.lex=function(t,i){return new e(i).lex(t)};var i,r,n,s=e.prototype;return s.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens,!0),this.inline(this.tokens),this.tokens},s.blockTokens=function(t,e,i){var r,n,s,o;for(void 0===e&&(e=[]),void 0===i&&(i=!0),t=t.replace(/^ +$/gm,"");t;)if(r=this.tokenizer.space(t))t=t.substring(r.raw.length),r.type&&e.push(r);else if(r=this.tokenizer.code(t,e))t=t.substring(r.raw.length),r.type?e.push(r):((o=e[e.length-1]).raw+="\n"+r.raw,o.text+="\n"+r.text);else if(r=this.tokenizer.fences(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.heading(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.nptable(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.hr(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.blockquote(t))t=t.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],i),e.push(r);else if(r=this.tokenizer.list(t)){for(t=t.substring(r.raw.length),s=r.items.length,n=0;n0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(a));)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(s=this.tokenizer.escape(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.tag(t,i,r))t=t.substring(s.raw.length),i=s.inLink,r=s.inRawBlock,e.push(s);else if(s=this.tokenizer.link(t))t=t.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,r)),e.push(s);else if(s=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,r)),e.push(s);else if(s=this.tokenizer.strong(t,a,n))t=t.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],i,r),e.push(s);else if(s=this.tokenizer.em(t,a,n))t=t.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],i,r),e.push(s);else if(s=this.tokenizer.codespan(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.br(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.del(t))t=t.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],i,r),e.push(s);else if(s=this.tokenizer.autolink(t,Y))t=t.substring(s.raw.length),e.push(s);else if(i||!(s=this.tokenizer.url(t,Y))){if(s=this.tokenizer.inlineText(t,r,q))t=t.substring(s.raw.length),n=s.raw.slice(-1),e.push(s);else if(t){var c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else t=t.substring(s.raw.length),e.push(s);return e},i=e,n=[{key:"rules",get:function(){return{block:V,inline:K}}}],(r=null)&&t(i.prototype,r),n&&t(i,n),e}(),$=r.defaults,Z=k,Q=S,J=function(){function t(t){this.options=t||$}var e=t.prototype;return e.code=function(t,e,i){var r=(e||"").match(/\S*/)[0];if(this.options.highlight){var n=this.options.highlight(t,r);null!=n&&n!==t&&(i=!0,t=n)}return r?'
      '+(i?t:Q(t,!0))+"
      \n":"
      "+(i?t:Q(t,!0))+"
      \n"},e.blockquote=function(t){return"
      \n"+t+"
      \n"},e.html=function(t){return t},e.heading=function(t,e,i,r){return this.options.headerIds?"'+t+"\n":""+t+"\n"},e.hr=function(){return this.options.xhtml?"
      \n":"
      \n"},e.list=function(t,e,i){var r=e?"ol":"ul";return"<"+r+(e&&1!==i?' start="'+i+'"':"")+">\n"+t+"\n"},e.listitem=function(t){return"
    • "+t+"
    • \n"},e.checkbox=function(t){return" "},e.paragraph=function(t){return"

      "+t+"

      \n"},e.table=function(t,e){return e&&(e=""+e+""),"\n\n"+t+"\n"+e+"
      \n"},e.tablerow=function(t){return"\n"+t+"\n"},e.tablecell=function(t,e){var i=e.header?"th":"td";return(e.align?"<"+i+' align="'+e.align+'">':"<"+i+">")+t+"\n"},e.strong=function(t){return""+t+""},e.em=function(t){return""+t+""},e.codespan=function(t){return""+t+""},e.br=function(){return this.options.xhtml?"
      ":"
      "},e.del=function(t){return""+t+""},e.link=function(t,e,i){if(null===(t=Z(this.options.sanitize,this.options.baseUrl,t)))return i;var r='
      "},e.image=function(t,e,i){if(null===(t=Z(this.options.sanitize,this.options.baseUrl,t)))return i;var r=''+i+'":">"},e.text=function(t){return t},t}(),tt=function(){function t(){}var e=t.prototype;return e.strong=function(t){return t},e.em=function(t){return t},e.codespan=function(t){return t},e.del=function(t){return t},e.html=function(t){return t},e.text=function(t){return t},e.link=function(t,e,i){return""+i},e.image=function(t,e,i){return""+i},e.br=function(){return""},t}(),et=function(){function t(){this.seen={}}return t.prototype.slug=function(t){var e=t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(e)){var i=e;do{this.seen[i]++,e=i+"-"+this.seen[i]}while(this.seen.hasOwnProperty(e))}return this.seen[e]=0,e},t}(),it=r.defaults,rt=C,nt=function(){function t(t){this.options=t||it,this.options.renderer=this.options.renderer||new J,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new tt,this.slugger=new et}t.parse=function(e,i){return new t(i).parse(e)};var e=t.prototype;return e.parse=function(t,e){void 0===e&&(e=!0);var i,r,n,s,o,a,l,c,u,h,d,f,p,g,m,v,y,b,x="",S=t.length;for(i=0;i0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,p),u+=this.renderer.listitem(g,y,v);x+=this.renderer.list(u,d,f);continue;case"html":x+=this.renderer.html(h.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;i+1An error occurred:

      "+at(t.message+"",!0)+"
      ";throw t}}return ht.options=ht.setOptions=function(t){return st(ht.defaults,t),ct(ht.defaults),ht},ht.getDefaults=lt,ht.defaults=ut,ht.use=function(t){var e=st({},t);if(t.renderer&&function(){var i=ht.defaults.renderer||new J,r=function(e){var r=i[e];i[e]=function(){for(var n=arguments.length,s=new Array(n),o=0;o",triples:"",explode:"[]{}"},r=t.Pos;function i(t,r){return"pairs"==r&&"string"==typeof t?t:"object"==typeof t&&null!=t[r]?t[r]:e[r]}t.defineOption("autoCloseBrackets",!1,(function(e,r,o){o&&o!=t.Init&&(e.removeKeyMap(n),e.state.closeBrackets=null),r&&(s(i(r,"pairs")),e.state.closeBrackets=r,e.addKeyMap(n))}));var n={Backspace:function(e){var n=a(e);if(!n||e.getOption("disableInput"))return t.Pass;for(var s=i(n,"pairs"),o=e.listSelections(),c=0;c=0;c--){var h=o[c].head;e.replaceRange("",r(h.line,h.ch-1),r(h.line,h.ch+1),"+delete")}},Enter:function(e){var r=a(e),n=r&&i(r,"explode");if(!n||e.getOption("disableInput"))return t.Pass;for(var s=e.listSelections(),o=0;o1&&d.indexOf(n)>=0&&e.getRange(r(b.line,b.ch-2),b)==n+n){if(b.ch>2&&/\bstring/.test(e.getTokenTypeAt(r(b.line,b.ch-2))))return t.Pass;v="addFour"}else if(f){var S=0==b.ch?" ":e.getRange(r(b.line,b.ch-1),b);if(t.isWordChar(x)||S==n||t.isWordChar(S))return t.Pass;v="both"}else{if(!g||!(0===x.length||/\s/.test(x)||h.indexOf(x)>-1))return t.Pass;v="both"}else v=f&&c(e,b)?"both":d.indexOf(n)>=0&&e.getRange(b,r(b.line,b.ch+3))==n+n+n?"skipThree":"skip";if(u){if(u!=v)return t.Pass}else u=v}var C=l%2?o.charAt(l-1):n,w=l%2?n:o.charAt(l+1);e.operation((function(){if("skip"==u)e.execCommand("goCharRight");else if("skipThree"==u)for(var i=0;i<3;i++)e.execCommand("goCharRight");else if("surround"==u){var n=e.getSelections();for(i=0;i0,{anchor:new r(s.anchor.line,s.anchor.ch+(o?-1:1)),head:new r(s.head.line,s.head.ch+(o?1:-1))});e.setSelections(n)}else"both"==u?(e.replaceSelection(C+w,null),e.triggerElectric(C+w),e.execCommand("goCharLeft")):"addFour"==u&&(e.replaceSelection(C+C+C+C,"before"),e.execCommand("goCharRight"));var s,o}))}(n,e)}}function a(t){var e=t.state.closeBrackets;return!e||e.override?e:t.getModeAt(t.getCursor()).closeBrackets||e}function l(t,e){var i=t.getRange(r(e.line,e.ch-1),r(e.line,e.ch+1));return 2==i.length?i:null}function c(t,e){var i=t.getTokenAt(r(e.line,e.ch+1));return/\bstring/.test(i.type)&&i.start==e.ch&&(0==e.ch||!/\bstring/.test(t.getTokenTypeAt(e)))}s(e.pairs+"`")}(r(/*! ../../lib/codemirror */"VrN/"))},GfqC: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){!function(t){var e={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},i=t.Pos;function r(t,i){return"pairs"==i&&"string"==typeof t?t:"object"==typeof t&&null!=t[i]?t[i]:e[i]}t.defineOption("autoCloseBrackets",!1,(function(e,i,o){o&&o!=t.Init&&(e.removeKeyMap(n),e.state.closeBrackets=null),i&&(s(r(i,"pairs")),e.state.closeBrackets=i,e.addKeyMap(n))}));var n={Backspace:function(e){var n=a(e);if(!n||e.getOption("disableInput"))return t.Pass;for(var s=r(n,"pairs"),o=e.listSelections(),c=0;c=0;c--){var h=o[c].head;e.replaceRange("",i(h.line,h.ch-1),i(h.line,h.ch+1),"+delete")}},Enter:function(e){var i=a(e),n=i&&r(i,"explode");if(!n||e.getOption("disableInput"))return t.Pass;for(var s=e.listSelections(),o=0;o1&&d.indexOf(n)>=0&&e.getRange(i(b.line,b.ch-2),b)==n+n){if(b.ch>2&&/\bstring/.test(e.getTokenTypeAt(i(b.line,b.ch-2))))return t.Pass;v="addFour"}else if(f){var S=0==b.ch?" ":e.getRange(i(b.line,b.ch-1),b);if(t.isWordChar(x)||S==n||t.isWordChar(S))return t.Pass;v="both"}else{if(!g||!(0===x.length||/\s/.test(x)||h.indexOf(x)>-1))return t.Pass;v="both"}else v=f&&c(e,b)?"both":d.indexOf(n)>=0&&e.getRange(b,i(b.line,b.ch+3))==n+n+n?"skipThree":"skip";if(u){if(u!=v)return t.Pass}else u=v}var C=l%2?o.charAt(l-1):n,w=l%2?n:o.charAt(l+1);e.operation((function(){if("skip"==u)e.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)e.execCommand("goCharRight");else if("surround"==u){var n=e.getSelections();for(r=0;r0,{anchor:new i(s.anchor.line,s.anchor.ch+(o?-1:1)),head:new i(s.head.line,s.head.ch+(o?1:-1))});e.setSelections(n)}else"both"==u?(e.replaceSelection(C+w,null),e.triggerElectric(C+w),e.execCommand("goCharLeft")):"addFour"==u&&(e.replaceSelection(C+C+C+C,"before"),e.execCommand("goCharRight"));var s,o}))}(n,e)}}function a(t){var e=t.state.closeBrackets;return!e||e.override?e:t.getModeAt(t.getCursor()).closeBrackets||e}function l(t,e){var r=t.getRange(i(e.line,e.ch-1),i(e.line,e.ch+1));return 2==r.length?r:null}function c(t,e){var r=t.getTokenAt(i(e.line,e.ch+1));return/\bstring/.test(r.type)&&r.start==e.ch&&(0==e.ch||!/\bstring/.test(t.getTokenTypeAt(e)))}s(e.pairs+"`")}(i(/*! ../../lib/codemirror */"VrN/"))},GfqC: /*!********************************************************!*\ !*** ./node_modules/rc-upload/es/index.js + 6 modules ***! \********************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,r){"use strict";var i=r("q1tI"),n=r.n(i),s=r("TSYQ"),o=r.n(s);function a(t){var e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch(t){return e}}function l(t){var e=new XMLHttpRequest;t.onProgress&&e.upload&&(e.upload.onprogress=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),t.onProgress(e)});var r=new FormData;t.data&&Object.keys(t.data).forEach((function(e){var i=t.data[e];Array.isArray(i)?i.forEach((function(t){r.append(e+"[]",t)})):r.append(e,t.data[e])})),t.file instanceof Blob?r.append(t.filename,t.file,t.file.name):r.append(t.filename,t.file),e.onerror=function(e){t.onError(e)},e.onload=function(){return e.status<200||e.status>=300?t.onError(function(t,e){var r="cannot "+t.method+" "+t.action+" "+e.status+"'",i=new Error(r);return i.status=e.status,i.method=t.method,i.url=t.action,i}(t,e),a(e)):t.onSuccess(a(e),e)},e.open(t.method,t.action,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var i=t.headers||{};return null!==i["X-Requested-With"]&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(i).forEach((function(t){null!==i[t]&&e.setRequestHeader(t,i[t])})),e.send(r),{abort:function(){e.abort()}}}var c=+new Date,u=0;function h(){return"rc-upload-"+c+"-"+ ++u}var d=function(t,e){if(t&&e){var r=Array.isArray(e)?e:e.split(","),i=t.name||"",n=t.type||"",s=n.replace(/\/.*$/,"");return r.some((function(t){var e,r,o=t.trim();return"."===o.charAt(0)?(e=i.toLowerCase(),r=o.toLowerCase(),-1!==e.indexOf(r,e.length-r.length)):/\/\*$/.test(o)?s===o.replace(/\/.*$/,""):n===o}))}return!0};var f=function(t,e,r){var i=function t(i,n){n=n||"",i.isFile?i.file((function(t){r(t)&&(i.fullPath&&!t.webkitRelativePath&&(Object.defineProperties(t,{webkitRelativePath:{writable:!0}}),t.webkitRelativePath=i.fullPath.replace(/^\//,""),Object.defineProperties(t,{webkitRelativePath:{writable:!1}})),e([t]))})):i.isDirectory&&function(t,e){var r=t.createReader(),i=[];!function t(){r.readEntries((function(r){var n=Array.prototype.slice.apply(r);i=i.concat(n),!n.length?e(i):t()}))}()}(i,(function(e){e.forEach((function(e){t(e,""+n+i.name+"/")}))}))};t.forEach((function(t){i(t.webkitGetAsEntry())}))},p=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i]);return r}(r,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),S=o()((v(t={},s,!0),v(t,s+"-disabled",l),v(t,a,a),t)),C=l?{}:{onClick:m?this.onClick:function(){},onKeyDown:m?this.onKeyDown:function(){},onMouseEnter:y,onMouseLeave:b,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return n.a.createElement(i,p({},C,{className:S,role:"button",style:u}),n.a.createElement("input",p({},(e=x,Object.keys(e).reduce((function(t,r){return"data-"!==r.substr(0,5)&&"aria-"!==r.substr(0,5)&&"role"!==r||(t[r]=e[r]),t}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(t){return t.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:d,directory:g?"directory":null,webkitdirectory:g?"webkitdirectory":null,multiple:h,onChange:this.onChange})),f)}}]),e}(i.Component),S=Object.assign||function(t){for(var e=1;e0&&(e.percent=e.loaded/e.total*100),t.onProgress(e)});var i=new FormData;t.data&&Object.keys(t.data).forEach((function(e){var r=t.data[e];Array.isArray(r)?r.forEach((function(t){i.append(e+"[]",t)})):i.append(e,t.data[e])})),t.file instanceof Blob?i.append(t.filename,t.file,t.file.name):i.append(t.filename,t.file),e.onerror=function(e){t.onError(e)},e.onload=function(){return e.status<200||e.status>=300?t.onError(function(t,e){var i="cannot "+t.method+" "+t.action+" "+e.status+"'",r=new Error(i);return r.status=e.status,r.method=t.method,r.url=t.action,r}(t,e),a(e)):t.onSuccess(a(e),e)},e.open(t.method,t.action,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var r=t.headers||{};return null!==r["X-Requested-With"]&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(t){null!==r[t]&&e.setRequestHeader(t,r[t])})),e.send(i),{abort:function(){e.abort()}}}var c=+new Date,u=0;function h(){return"rc-upload-"+c+"-"+ ++u}var d=function(t,e){if(t&&e){var i=Array.isArray(e)?e:e.split(","),r=t.name||"",n=t.type||"",s=n.replace(/\/.*$/,"");return i.some((function(t){var e,i,o=t.trim();return"."===o.charAt(0)?(e=r.toLowerCase(),i=o.toLowerCase(),-1!==e.indexOf(i,e.length-i.length)):/\/\*$/.test(o)?s===o.replace(/\/.*$/,""):n===o}))}return!0};var f=function(t,e,i){var r=function t(r,n){n=n||"",r.isFile?r.file((function(t){i(t)&&(r.fullPath&&!t.webkitRelativePath&&(Object.defineProperties(t,{webkitRelativePath:{writable:!0}}),t.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(t,{webkitRelativePath:{writable:!1}})),e([t]))})):r.isDirectory&&function(t,e){var i=t.createReader(),r=[];!function t(){i.readEntries((function(i){var n=Array.prototype.slice.apply(i);r=r.concat(n),!n.length?e(r):t()}))}()}(r,(function(e){e.forEach((function(e){t(e,""+n+r.name+"/")}))}))};t.forEach((function(t){r(t.webkitGetAsEntry())}))},p=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r]);return i}(i,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),S=o()((v(t={},s,!0),v(t,s+"-disabled",l),v(t,a,a),t)),C=l?{}:{onClick:m?this.onClick:function(){},onKeyDown:m?this.onKeyDown:function(){},onMouseEnter:y,onMouseLeave:b,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return n.a.createElement(r,p({},C,{className:S,role:"button",style:u}),n.a.createElement("input",p({},(e=x,Object.keys(e).reduce((function(t,i){return"data-"!==i.substr(0,5)&&"aria-"!==i.substr(0,5)&&"role"!==i||(t[i]=e[i]),t}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(t){return t.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:d,directory:g?"directory":null,webkitdirectory:g?"webkitdirectory":null,multiple:h,onChange:this.onChange})),f)}}]),e}(r.Component),S=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:1,r=_.length,i=0;i1&&void 0!==arguments[1]&&arguments[1];return Object(E.a)(t).map((function(t,r){if(!a.isValidElement(t)||!t.type)return null;var i=t.type.isSelectOptGroup,n=t.key,s=t.props,o=s.children,l=Object(c.a)(s,["children"]);return e||!i?T(t):Object(k.a)(Object(k.a)({key:"__RC_SELECT_GRP__".concat(null===n?r:n,"__"),label:n},l),{},{options:L(o)})})).filter((function(t){return t}))}var A=r("2Qr1"),D=r("qNPg"),R=r("U8pU"),O=r("Kwbf"),_=r("WKfj");var I=function(t){var e=t.mode,r=t.options,i=t.children,n=t.backfill,s=t.allowClear,o=t.placeholder,l=t.getInputElement,c=t.showSearch,u=t.onSearch,h=t.defaultOpen,d=t.autoFocus,f=t.labelInValue,p=t.value,g=t.inputValue,m=t.optionLabelProp,v="multiple"===e||"tags"===e,y=void 0!==c?c:v||"combobox"===e,b=r||L(i);if(Object(O.a)("tags"!==e||b.every((function(t){return!t.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===e||"combobox"===e){var x=b.some((function(t){return t.options?t.options.some((function(t){return"number"==typeof("value"in t?t.value:t.key)})):"number"==typeof("value"in t?t.value:t.key)}));Object(O.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(O.a)("combobox"!==e||!m,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(O.a)("combobox"===e||!n,"`backfill` only works with `combobox` mode."),Object(O.a)("combobox"===e||!l,"`getInputElement` only work with `combobox` mode."),Object(O.b)("combobox"!==e||!l||!s||!o,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==e&&"tags"!==e&&Object(O.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(O.b)(!h||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=p){var S=Object(_.d)(p);Object(O.a)(!f||S.every((function(t){return"object"===Object(R.a)(t)&&("key"in t||"value"in t)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(O.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(i){var C=null;Object(E.a)(i).some((function(t){if(!a.isValidElement(t)||!t.type)return!1;var e=t.type;return!e.isSelectOption&&(e.isSelectOptGroup?!Object(E.a)(t.props.children).every((function(e){return!(a.isValidElement(e)&&t.type&&!e.type.isSelectOption)||(C=e.type,!1)})):(C=e,!0))})),C&&Object(O.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(C.displayName||C.name||C,"`.")),Object(O.a)(void 0===g,"`inputValue` is deprecated, please use `searchValue` instead.")}},M=Object(D.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:L,flattenOptions:A.d,getLabeledValue:A.e,filterOptions:A.b,isValueDisabled:A.g,findValueOption:A.c,warningProps:I,fillOptionsWithMissingValue:A.a}),P=function(t){Object(s.a)(r,t);var e=Object(o.a)(r);function r(){var t;return Object(i.a)(this,r),(t=e.apply(this,arguments)).selectRef=a.createRef(),t.focus=function(){t.selectRef.current.focus()},t.blur=function(){t.selectRef.current.blur()},t}return Object(n.a)(r,[{key:"render",value:function(){return a.createElement(M,Object.assign({ref:this.selectRef},this.props))}}]),r}(a.Component);P.Option=S,P.OptGroup=w;var N=P;e.c=N},M8RZ: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,i){"use strict";i.d(e,"b",(function(){return S})),i.d(e,"a",(function(){return w}));var r=i("1OyB"),n=i("vuIU"),s=i("Ji7U"),o=i("LK+K"),a=i("q1tI"),l=i("rePB"),c=i("Ff2n"),u=i("ODXe"),h=i("4IlW"),d=i("bX4T"),f=i("YrtM"),p=i("TSYQ"),g=i.n(p),m=i("+nKL"),v=i("8OUc"),y=a.forwardRef((function(t,e){var i=t.prefixCls,r=t.id,n=t.flattenOptions,s=t.childrenAsData,o=t.values,p=t.searchValue,y=t.multiple,b=t.defaultActiveFirstOption,x=t.height,S=t.itemHeight,C=t.notFoundContent,w=t.open,k=t.menuItemSelectedIcon,E=t.virtual,T=t.onSelect,L=t.onToggleOpen,A=t.onActiveValue,D=t.onScroll,R=t.onMouseEnter,O="".concat(i,"-item"),_=Object(f.a)((function(){return n}),[w,n],(function(t,e){return e[0]&&t[1]!==e[1]})),I=a.useRef(null),M=function(t){t.preventDefault()},P=function(t){I.current&&I.current.scrollTo({index:t})},N=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=_.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];return Object(E.a)(t).map((function(t,i){if(!a.isValidElement(t)||!t.type)return null;var r=t.type.isSelectOptGroup,n=t.key,s=t.props,o=s.children,l=Object(c.a)(s,["children"]);return e||!r?T(t):Object(k.a)(Object(k.a)({key:"__RC_SELECT_GRP__".concat(null===n?i:n,"__"),label:n},l),{},{options:L(o)})})).filter((function(t){return t}))}var A=i("2Qr1"),D=i("qNPg"),R=i("U8pU"),O=i("Kwbf"),_=i("WKfj");var I=function(t){var e=t.mode,i=t.options,r=t.children,n=t.backfill,s=t.allowClear,o=t.placeholder,l=t.getInputElement,c=t.showSearch,u=t.onSearch,h=t.defaultOpen,d=t.autoFocus,f=t.labelInValue,p=t.value,g=t.inputValue,m=t.optionLabelProp,v="multiple"===e||"tags"===e,y=void 0!==c?c:v||"combobox"===e,b=i||L(r);if(Object(O.a)("tags"!==e||b.every((function(t){return!t.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===e||"combobox"===e){var x=b.some((function(t){return t.options?t.options.some((function(t){return"number"==typeof("value"in t?t.value:t.key)})):"number"==typeof("value"in t?t.value:t.key)}));Object(O.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(O.a)("combobox"!==e||!m,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(O.a)("combobox"===e||!n,"`backfill` only works with `combobox` mode."),Object(O.a)("combobox"===e||!l,"`getInputElement` only work with `combobox` mode."),Object(O.b)("combobox"!==e||!l||!s||!o,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==e&&"tags"!==e&&Object(O.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(O.b)(!h||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=p){var S=Object(_.d)(p);Object(O.a)(!f||S.every((function(t){return"object"===Object(R.a)(t)&&("key"in t||"value"in t)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(O.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var C=null;Object(E.a)(r).some((function(t){if(!a.isValidElement(t)||!t.type)return!1;var e=t.type;return!e.isSelectOption&&(e.isSelectOptGroup?!Object(E.a)(t.props.children).every((function(e){return!(a.isValidElement(e)&&t.type&&!e.type.isSelectOption)||(C=e.type,!1)})):(C=e,!0))})),C&&Object(O.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(C.displayName||C.name||C,"`.")),Object(O.a)(void 0===g,"`inputValue` is deprecated, please use `searchValue` instead.")}},M=Object(D.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:L,flattenOptions:A.d,getLabeledValue:A.e,filterOptions:A.b,isValueDisabled:A.g,findValueOption:A.c,warningProps:I,fillOptionsWithMissingValue:A.a}),P=function(t){Object(s.a)(i,t);var e=Object(o.a)(i);function i(){var t;return Object(r.a)(this,i),(t=e.apply(this,arguments)).selectRef=a.createRef(),t.focus=function(){t.selectRef.current.focus()},t.blur=function(){t.selectRef.current.blur()},t}return Object(n.a)(i,[{key:"render",value:function(){return a.createElement(M,Object.assign({ref:this.selectRef},this.props))}}]),i}(a.Component);P.Option=S,P.OptGroup=w;var N=P;e.c=N},M8RZ: /*!**********************************!*\ !*** ./src/components/modal.tsx ***! \**********************************/ /*! exports provided: default */ -/*! exports used: default */function(t,e,r){"use strict";r.d(e,"a",(function(){return u}));var i=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),n=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),s=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),o=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),a=r(/*! react */"q1tI"),l=r.n(a),c=r(/*! react-dom */"i8i4"),u=function(t){Object(s.a)(r,t);var e=Object(o.a)(r);function r(t){var n;Object(i.a)(this,r),n=e.call(this,t);var s=window.document;return n.node=s.createElement("div"),s.body.appendChild(n.node),n}return Object(n.a)(r,[{key:"render",value:function(){var t=this.props.children;return Object(c.createPortal)(t,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),r}(l.a.Component)},Ot1p: +/*! exports used: default */function(t,e,i){"use strict";i.d(e,"a",(function(){return u}));var r=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),n=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),s=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),o=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),a=i(/*! react */"q1tI"),l=i.n(a),c=i(/*! react-dom */"i8i4"),u=function(t){Object(s.a)(i,t);var e=Object(o.a)(i);function i(t){var n;Object(r.a)(this,i),n=e.call(this,t);var s=window.document;return n.node=s.createElement("div"),s.body.appendChild(n.node),n}return Object(n.a)(i,[{key:"render",value:function(){var t=this.props.children;return Object(c.createPortal)(t,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),i}(l.a.Component)},Ot1p: /*!**************************************************************!*\ !*** ./src/components/markdown-editor/index.tsx + 6 modules ***! \**************************************************************/ @@ -206,18 +206,18 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/codemirror/lib/codemirror.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/uuid/dist/esm-browser/v4.js */function(t,e,r){"use strict";r("2qtc");var i=r("kLXV"),n=r("rAM+"),s=(r("miYZ"),r("tsqr")),o=r("9og8"),a=r("tJVT"),l=r("jrin"),c=r("WmNS"),u=r.n(c),h=r("q1tI"),d=r.n(h),f=r("VrN/"),p=r.n(f),g=r("bdgK"),m=(r("p77/"),r("Bd2K"),r("ELLl"),r("19Vz"),r("lZu9"),r("+NIl"),r("kSUc"),r("9Bee")),v=function(t){var e=t.value,r=void 0===e?"":e,i=(t.className,t.showTextOnly,t.showLines,t.style,Object(h.useMemo)((function(){return""}),[r]));return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:i}}))},y=r("0Owb"),b=(r("dejd"),r("C+DQ"),r("1vsH")),x=r("m3rI"),S=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function C(t){var e=t.onActionCallback,r=t.title,i=t.icon,n=t.actionName,s=t.className,o=void 0===s?"":s,a=t.children;return d.a.createElement("a",{title:r,className:o,onClick:function(){e(n)}},d.a.createElement("i",{className:"md-iconfont ".concat(i)}),a)}var w=function(t){var e=t.watch,r=t.showNullButton,i=t.onActionCallback,n=t.fullScreen,s=t.insertTemp,o=t.hidetoolBar,a=t.uuid;t.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(b.D)("_educoder_session_login"),"&_educoder_session=").concat(Object(b.D)("_educoder_session"),"&key=").concat(a,"&api=").concat(encodeURIComponent(x.a.PROXY_SERVER)));var l=[].concat(S,[{title:"".concat(e?"关闭实时预览":"开启实时预览"),icon:"".concat(e?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!o&&l.map((function(t,e){return d.a.createElement("li",{key:e},t.actionName?d.a.createElement(C,Object(y.a)({},t,{onActionCallback:i})):d.a.createElement("span",{className:"v-line"}))})),r?d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:i},d.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,s&&d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(s),onActionCallback:i},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(C,{icon:"".concat(n?"icon-shrink":"icon-enlarge"),title:n?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:i})))},k=r("M8RZ"),E=(r("+L6B"),r("2/Rp")),T=(r("y8nQ"),r("Vl3Y")),L=(r("5NDa"),r("5rEg")),A={labelCol:{span:4},wrapperCol:{span:20}},D=function(t){var e=t.callback,r=t.onCancel;return d.a.createElement(T.a,Object(y.a)({},A,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(t){e(t)}}),d.a.createElement(T.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(L.a,null)),d.a.createElement(T.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(L.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:r},"取消")))},R=r("7ahc"),O=r("k1fw"),_=(r("HmJG"),r("BjJ7")),I=T.a.useForm,M={width:280,marginRight:10},P={labelCol:{span:5},wrapperCol:{span:19}},N=function(t){var e=t.callback,r=t.onCancel,i=I(),n=Object(a.a)(i,1)[0],s=Object(h.useRef)();function o(t,e){n.setFieldsValue({src:"/api/attachments/".concat(t.id,"?type=").concat(t.content_type),type:e.type})}return d.a.createElement(T.a,Object(y.a)({form:n},P,{className:"upload-image-panel",onFinish:function(t){e(Object(O.a)(Object(O.a)({},t),{},{name:s.current}))}}),d.a.createElement(T.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(T.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(L.a,{style:M})),d.a.createElement(F,{onFileChange:function(t){var e=t.target.files[0];s.current=e.name,B(e,o)}}))),d.a.createElement(T.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(L.a,{style:{width:264}})),d.a.createElement(T.a.Item,{style:{textAlign:"right"}},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:r},"取消")))};function F(t){var e=t.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:e}))}function B(t,e){if(!t)throw new String("没有文件");var r=new FormData;r.append("editormd-image-file",t),r.append("file_param_name","editormd-image-file"),r.append("byxhr","true");var i=new window.XMLHttpRequest;i.withCredentials=!0,i.addEventListener("load",(function(r){e(JSON.parse(r.target.responseText),t)}),!1),i.addEventListener("error",(function(t){console.error(t)}),!1),i.open("POST","".concat(_.a,"/api/attachments.json")),i.send(r)}r("giR+");var j,U,H=r("fyUT"),G=(r("7Kak"),r("9yH6")),z=G.a.Group,W={margin:"0 8px"},V=function(t){var e=t.callback,r=t.onCancel;return d.a.createElement(T.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(t){e(t)}},d.a.createElement("div",{className:"flex-container"},d.a.createElement("span",{style:W},"单元格数:"),d.a.createElement("span",{style:W},"行数"),d.a.createElement(T.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(H.a,null)),d.a.createElement("span",{style:W},"列数"),d.a.createElement(T.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(H.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:W},"对齐方式:"),d.a.createElement(T.a.Item,{name:"align"},d.a.createElement(z,null,d.a.createElement(G.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(G.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(G.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(G.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:r},"取消")))},K=r("ErOA"),q=r("7Cbv"),Y="------------",X={default:Y,left:":".concat(Y),center:":".concat(Y,":"),right:"".concat(Y,":")},$=r("9VGf");function Z(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}var Q=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",J=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],tt=(j={},Object(l.a)(j,Q+"-B","bold"),Object(l.a)(j,Q+"-I","italic"),j),et=(U={},Object(l.a)(U,"link","添加链接"),Object(l.a)(U,"code-block","添加代码块"),Object(l.a)(U,"upload-image","添加文件"),Object(l.a)(U,"add-table","添加表格"),U);e.a=function(t){var e=t.defaultValue,r=void 0===e?"":e,c=t.onChange,f=t.width,y=void 0===f?"100%":f,b=t.height,S=void 0===b?400:b,C=t.miniToolbar,E=void 0!==C&&C,T=t.isFocus,L=void 0!==T&&T,A=t.watch,O=t.insertTemp,_=t.mode,I=void 0===_?"markdown":_,M=t.id,P=void 0===M?"markdown-editor-id":M,F=t.showResizeBar,j=void 0!==F&&F,U=t.noStorage,H=void 0!==U&&U,G=t.showNullButton,z=void 0!==G&&G,W=t.hidetoolBar,Y=void 0!==W&&W,Q=t.fullScreen,rt=void 0!==Q&&Q,it=t.onBlur,nt=t.onCMBeforeChange,st=t.onFullScreen,ot=t.className,at=void 0===ot?"":ot,lt=t.disablePaste,ct=void 0!==lt&<,ut=t.placeholder,ht=void 0===ut?"":ut,dt=t.values,ft=void 0===dt?"":dt,pt=Object(h.useState)(null),gt=Object(a.a)(pt,2),mt=gt[0],vt=gt[1],yt=Object(h.useState)(r),bt=Object(a.a)(yt,2),xt=bt[0],St=bt[1],Ct=Object(h.useState)(A),wt=Object(a.a)(Ct,2),kt=wt[0],Et=wt[1],Tt=Object(h.useState)(rt),Lt=Object(a.a)(Tt,2),At=Lt[0],Dt=Lt[1],Rt=Object(h.useState)(""),Ot=Object(a.a)(Rt,2),_t=Ot[0],It=Ot[1],Mt=Object(h.useState)(0),Pt=Object(a.a)(Mt,2),Nt=Pt[0],Ft=Pt[1],Bt=Object(h.useState)(S),jt=Object(a.a)(Bt,2),Ut=jt[0],Ht=jt[1],Gt=Object(h.useState)(!1),zt=Object(a.a)(Gt,2),Wt=(zt[0],zt[1]),Vt=Object(h.useRef)(Object(q.a)()),Kt=Object(h.useRef)(!1),qt=Object(h.useRef)(),Yt=Object(h.useRef)(),Xt=Object(h.useRef)(),$t=Object(h.useRef)(),Zt=Object(h.useRef)(),Qt=function(){var t=Object(o.a)(u.a.mark((function t(){var e,r;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(K.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Vt.current}});case 2:null!=(r=t.sent)&&null!==(e=r.attachments)&&void 0!==e&&e.length&&(console.log("cm:",mt,Yt),r.attachments.map((function(t){t.content_type.indexOf("image")>-1?mt.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):t.content_type.indexOf("video")>-1?mt.replaceSelection('')):t.content_type.indexOf("pdf")>-1?mt.replaceSelection('
      ').concat(t.name,"")):mt.replaceSelection("[".concat(t.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")"))})));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();Object(h.useEffect)((function(){St(ft),null==mt||mt.setValue(ft)}),[ft]),Object(h.useEffect)((function(){null==st||st(At)}),[At]),Object(h.useEffect)((function(){if(Yt.current){var t=p.a.fromTextArea(Yt.current,{mode:I,lineNumbers:!E,lineWrapping:!0,value:r,autoCloseTags:!0,autoCloseBrackets:!0});function e(e,r){if(!ct){var i=r.clipboardData;if(i){var n=i.types.toString(),o=i.items;if("Files"===n||i.types.indexOf("Files")>-1){if(r.preventDefault(),"stex"==I)return;try{var a,l=o[1];"file"===(null===(a=o[0])||void 0===a?void 0:a.kind)&&(l=o[0]);var c=l.getAsFile(),u=c.name.split(".").pop();B(c,(function(e){var r,i,n;e.id?(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("video"))>-1?t.replaceSelection('')):(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("pdf"))>-1?t.replaceSelection('').concat(c.name,"")):J.includes(u)?t.replaceSelection('').concat(c.name,"")):t.replaceSelection("[".concat(c.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(r){s.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}r.preventDefault()}return L&&t.focus(),t.on("paste",e),t.on("dragleave",(function(t,e){Xt.current.classList.remove("mouse-hover-md")})),t.on("dragover",(function(t,e){Xt.current.classList.add("mouse-hover-md")})),t.on("drop",(function(e,r){var i;if(Xt.current.classList.add("mouse-hover-md"),(i=r.dataTransfer.files).length>0){r.preventDefault(),r.stopPropagation();for(var n=function(e){var r=i[e],n=r.name.split(".").pop();B(r,(function(e){var i,s,o;e.id?(null==r||null===(i=r.type)||void 0===i?void 0:i.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==r||null===(s=r.type)||void 0===s?void 0:s.indexOf("video"))>-1?t.replaceSelection('')):(null==r||null===(o=r.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?t.replaceSelection('').concat(r.name,"")):J.includes(n)?t.replaceSelection('').concat(r.name,"")):t.replaceSelection("[".concat(r.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))},s=0;s0||i.target.offsetWidth>0)&&(Jt(),mt.setSize("100%","100%"),mt.refresh())}}catch(t){r.e(t)}finally{r.f()}}));return t.observe(Yt.current.parentElement),t}();return function(){t.unobserve(Yt.current.parentElement)}}}),[mt,Jt]),Object(h.useEffect)((function(){if(mt){for(var t=[],e=function(){var e=i[r],n=(s=Object(a.a)(e,2))[0],o=s[1],c=Object(l.a)({},n,(function(){te(o)}));t.push(c),mt.addKeyMap(c)},r=0,i=Object.entries(tt);r0){var t=(new Date).getTime(),e=window.sessionStorage.getItem(P);t>=Nt+1e4&&(!e||e!==xt)&&(window.sessionStorage.setItem(P,xt),Wt(!0))}}),1e4),Object(h.useEffect)((function(){Et(A)}),[mt,A]),Object(h.useEffect)((function(){mt&&L&&mt.focus()}),[mt,L]),Object(h.useEffect)((function(){if(kt&&mt){var t=mt.getScrollerElement();function e(t){var e=t.target;if(Zt.current){var r=e.scrollTop/e.scrollHeight;Zt.current.scrollTop=Zt.current.scrollHeight*r}}return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[mt,kt]),Object(h.useEffect)((function(){if(mt&&nt){function t(t,e){nt(t,e)}return mt.on("beforeChange",t),function(){mt.off("beforeChange",t)}}}),[mt,nt]),Object(h.useEffect)((function(){if(mt&&it){function t(){it(mt.getValue())}return mt.on("blur",t),function(){mt.off("blur",t)}}}),[mt,it]),Object(h.useEffect)((function(){if(mt){function t(t){var e=t.getValue();St(e),Ft((new Date).getTime()),t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(e)}return mt.on("change",t),function(){mt.off("change",t)}}}),[mt,c]),Object(h.useEffect)((function(){mt&&(null==r?(mt.setValue(""),St("")):r!==mt.getValue()&&(mt.setValue(r),St(r),mt.setCursor(mt.lineCount(),0)))}),[mt,r]);var te=Object(h.useCallback)((function(t){var e=mt.getCursor(),r=mt.getSelection(),i=r.split("\n");switch(t){case"bold":return mt.replaceSelection("**"+r+"**"),""===r&&mt.setCursor(e.line,e.ch+2),mt.focus();case"italic":return mt.replaceSelection("*"+r+"*"),""===r&&mt.setCursor(e.line,e.ch+1),mt.focus();case"code":return mt.replaceSelection("`"+r+"`"),""===r&&mt.setCursor(e.line,e.ch+1),mt.focus();case"inline-latex":return mt.replaceSelection("`$$"+r+"$$`"),""===r&&mt.setCursor(e.line,e.ch+3),mt.focus();case"latex":return mt.replaceSelection("```latex\n"+r+"\n```"),mt.setCursor(e.line+1,r.length+1),mt.focus();case"line-break":return mt.replaceSelection("
      \n"),mt.focus();case"list-ul":return""===r?mt.replaceSelection("- "+r):mt.replaceSelection(i.map((function(t){return""===t?"":"- ".concat(t)})).join("\n")),mt.focus();case"list-ol":return""===r?mt.replaceSelection("1. "+r):mt.replaceSelection(i.map((function(t,e){return""===t?"":"".concat(e+1,". ").concat(t)})).join("\n")),mt.focus();case"add-null-ch":return""===r&&mt.setCursor(e.line,e.ch+1),mt.replaceSelection("▁"),mt.focus();case"inster-template-1":return""===r&&mt.setCursor(e.line,e.ch),mt.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),mt.focus();case"eraser":return mt.setValue(""),mt.focus();case"trigger-watch":return Et(!kt),mt.focus();case"trigger-full-screen":return Dt(!At),mt.focus();case"link":return void It("link");case"code-block":return void It("code-block");case"upload-image":return void It("upload-image");case"add-table":return void It("add-table");default:throw new Error}}),[mt,kt,At]),ee=Object(h.useCallback)((function(t){switch(It(""),_t){case"link":var e=t.title,r=t.link;return mt.replaceSelection("[".concat(e,"](").concat(r,")")),mt.focus();case"code-block":var i=t.language,n=t.content;return mt.replaceSelection(["```"+i,n,"```"].join("\n")),mt.focus();case"upload-image":var s=t.src,o=t.alt,a=t.name;return s.indexOf("type=image")>-1?mt.replaceSelection("![ ".concat(o||""," ]( ").concat(s,' "').concat(o||"",'" )')):s.indexOf("type=application/pdf")>-1?mt.replaceSelection('').concat(a,"")):mt.replaceSelection('').concat(a,"")),mt.focus();case"add-table":for(var l=t.row,c=t.col,u=t.align,h="\n",d=0;d300&&(i=300),Ht(S+i+"px")}}return t.addEventListener("mousedown",i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",n),function(){t.removeEventListener("mousedown",i),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",n)}}}),[mt,$t]),Object(h.useEffect)((function(){Ht(S)}),[S]);var ne={width:Z(y),height:Z(Ut)};Object(h.useMemo)((function(){if(Nt){var t=new Date(Nt),e=t.getHours(),r=t.getMinutes(),i=t.getSeconds();return r=r<10?"0"+r:r,i=i<10?"0"+i:i,"".concat(e=e<10?"0"+e:e,":").concat(r,":").concat(i)}return 0}),[Nt]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Xt},d.a.createElement("div",{className:"markdown-editor-container ".concat(at," ").concat(kt?"on-preview":""," ").concat(E?"mini":""," ").concat(At?"full-screen":""),style:ne},d.a.createElement(w,{insertTemp:O,watch:kt,fullScreen:At,showNullButton:z,onActionCallback:te,hidetoolBar:Y,uuid:Vt.current,setOpenPhones:function(){Kt.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:Yt,placeholder:ht})),kt?d.a.createElement("div",{ref:Zt,className:"preview-container"},"stex"===I&&d.a.createElement(v,{value:xt}),"stex"!==I&&d.a.createElement(m.a,{edit:!0,value:xt,replaces:function(t,e){var r=mt.getValue();r=r.replace(t,e),St(r),null==mt||mt.setValue(r)}})):null))),j?d.a.createElement("a",{ref:$t,className:"editor-resize"}):null,d.a.createElement(k.a,null,et[_t]?d.a.createElement(i.a,{centered:!0,title:et[_t],visible:!0,onCancel:ie,footer:null},re):null))}},SJMd: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/uuid/dist/esm-browser/v4.js */function(t,e,i){"use strict";i("2qtc");var r=i("kLXV"),n=i("rAM+"),s=(i("miYZ"),i("tsqr")),o=i("9og8"),a=i("tJVT"),l=i("jrin"),c=i("WmNS"),u=i.n(c),h=i("q1tI"),d=i.n(h),f=i("VrN/"),p=i.n(f),g=i("bdgK"),m=(i("p77/"),i("Bd2K"),i("ELLl"),i("19Vz"),i("lZu9"),i("+NIl"),i("kSUc"),i("9Bee")),v=function(t){var e=t.value,i=void 0===e?"":e,r=(t.className,t.showTextOnly,t.showLines,t.style,Object(h.useMemo)((function(){return""}),[i]));return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},y=i("0Owb"),b=(i("dejd"),i("C+DQ"),i("1vsH")),x=i("m3rI"),S=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function C(t){var e=t.onActionCallback,i=t.title,r=t.icon,n=t.actionName,s=t.className,o=void 0===s?"":s,a=t.children;return d.a.createElement("a",{title:i,className:o,onClick:function(){e(n)}},d.a.createElement("i",{className:"md-iconfont ".concat(r)}),a)}var w=function(t){var e=t.watch,i=t.showNullButton,r=t.onActionCallback,n=t.fullScreen,s=t.insertTemp,o=t.hidetoolBar,a=t.uuid;t.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(b.D)("_educoder_session_login"),"&_educoder_session=").concat(Object(b.D)("_educoder_session"),"&key=").concat(a,"&api=").concat(encodeURIComponent(x.a.PROXY_SERVER)));var l=[].concat(S,[{title:"".concat(e?"关闭实时预览":"开启实时预览"),icon:"".concat(e?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!o&&l.map((function(t,e){return d.a.createElement("li",{key:e},t.actionName?d.a.createElement(C,Object(y.a)({},t,{onActionCallback:r})):d.a.createElement("span",{className:"v-line"}))})),i?d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,s&&d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(s),onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(C,{icon:"".concat(n?"icon-shrink":"icon-enlarge"),title:n?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},k=i("M8RZ"),E=(i("+L6B"),i("2/Rp")),T=(i("y8nQ"),i("Vl3Y")),L=(i("5NDa"),i("5rEg")),A={labelCol:{span:4},wrapperCol:{span:20}},D=function(t){var e=t.callback,i=t.onCancel;return d.a.createElement(T.a,Object(y.a)({},A,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(t){e(t)}}),d.a.createElement(T.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(L.a,null)),d.a.createElement(T.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(L.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:i},"取消")))},R=i("7ahc"),O=i("k1fw"),_=(i("HmJG"),i("BjJ7")),I=T.a.useForm,M={width:280,marginRight:10},P={labelCol:{span:5},wrapperCol:{span:19}},N=function(t){var e=t.callback,i=t.onCancel,r=I(),n=Object(a.a)(r,1)[0],s=Object(h.useRef)();function o(t,e){n.setFieldsValue({src:"/api/attachments/".concat(t.id,"?type=").concat(t.content_type),type:e.type})}return d.a.createElement(T.a,Object(y.a)({form:n},P,{className:"upload-image-panel",onFinish:function(t){e(Object(O.a)(Object(O.a)({},t),{},{name:s.current}))}}),d.a.createElement(T.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(T.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(L.a,{style:M})),d.a.createElement(F,{onFileChange:function(t){var e=t.target.files[0];s.current=e.name,B(e,o)}}))),d.a.createElement(T.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(L.a,{style:{width:264}})),d.a.createElement(T.a.Item,{style:{textAlign:"right"}},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:i},"取消")))};function F(t){var e=t.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:e}))}function B(t,e){if(!t)throw new String("没有文件");var i=new FormData;i.append("editormd-image-file",t),i.append("file_param_name","editormd-image-file"),i.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(i){e(JSON.parse(i.target.responseText),t)}),!1),r.addEventListener("error",(function(t){console.error(t)}),!1),r.open("POST","".concat(_.a,"/api/attachments.json")),r.send(i)}i("giR+");var j,U,H=i("fyUT"),G=(i("7Kak"),i("9yH6")),z=G.a.Group,W={margin:"0 8px"},V=function(t){var e=t.callback,i=t.onCancel;return d.a.createElement(T.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(t){e(t)}},d.a.createElement("div",{className:"flex-container"},d.a.createElement("span",{style:W},"单元格数:"),d.a.createElement("span",{style:W},"行数"),d.a.createElement(T.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(H.a,null)),d.a.createElement("span",{style:W},"列数"),d.a.createElement(T.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(H.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:W},"对齐方式:"),d.a.createElement(T.a.Item,{name:"align"},d.a.createElement(z,null,d.a.createElement(G.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(G.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(G.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(G.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:i},"取消")))},K=i("ErOA"),q=i("7Cbv"),Y="------------",X={default:Y,left:":".concat(Y),center:":".concat(Y,":"),right:"".concat(Y,":")},$=i("9VGf");function Z(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}var Q=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",J=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],tt=(j={},Object(l.a)(j,Q+"-B","bold"),Object(l.a)(j,Q+"-I","italic"),j),et=(U={},Object(l.a)(U,"link","添加链接"),Object(l.a)(U,"code-block","添加代码块"),Object(l.a)(U,"upload-image","添加文件"),Object(l.a)(U,"add-table","添加表格"),U);e.a=function(t){var e=t.defaultValue,i=void 0===e?"":e,c=t.onChange,f=t.width,y=void 0===f?"100%":f,b=t.height,S=void 0===b?400:b,C=t.miniToolbar,E=void 0!==C&&C,T=t.isFocus,L=void 0!==T&&T,A=t.watch,O=t.insertTemp,_=t.mode,I=void 0===_?"markdown":_,M=t.id,P=void 0===M?"markdown-editor-id":M,F=t.showResizeBar,j=void 0!==F&&F,U=t.noStorage,H=void 0!==U&&U,G=t.showNullButton,z=void 0!==G&&G,W=t.hidetoolBar,Y=void 0!==W&&W,Q=t.fullScreen,it=void 0!==Q&&Q,rt=t.onBlur,nt=t.onCMBeforeChange,st=t.onFullScreen,ot=t.className,at=void 0===ot?"":ot,lt=t.disablePaste,ct=void 0!==lt&<,ut=t.placeholder,ht=void 0===ut?"":ut,dt=t.values,ft=void 0===dt?"":dt,pt=Object(h.useState)(null),gt=Object(a.a)(pt,2),mt=gt[0],vt=gt[1],yt=Object(h.useState)(i),bt=Object(a.a)(yt,2),xt=bt[0],St=bt[1],Ct=Object(h.useState)(A),wt=Object(a.a)(Ct,2),kt=wt[0],Et=wt[1],Tt=Object(h.useState)(it),Lt=Object(a.a)(Tt,2),At=Lt[0],Dt=Lt[1],Rt=Object(h.useState)(""),Ot=Object(a.a)(Rt,2),_t=Ot[0],It=Ot[1],Mt=Object(h.useState)(0),Pt=Object(a.a)(Mt,2),Nt=Pt[0],Ft=Pt[1],Bt=Object(h.useState)(S),jt=Object(a.a)(Bt,2),Ut=jt[0],Ht=jt[1],Gt=Object(h.useState)(!1),zt=Object(a.a)(Gt,2),Wt=(zt[0],zt[1]),Vt=Object(h.useRef)(Object(q.a)()),Kt=Object(h.useRef)(!1),qt=Object(h.useRef)(),Yt=Object(h.useRef)(),Xt=Object(h.useRef)(),$t=Object(h.useRef)(),Zt=Object(h.useRef)(),Qt=function(){var t=Object(o.a)(u.a.mark((function t(){var e,i;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(K.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Vt.current}});case 2:null!=(i=t.sent)&&null!==(e=i.attachments)&&void 0!==e&&e.length&&(console.log("cm:",mt,Yt),i.attachments.map((function(t){t.content_type.indexOf("image")>-1?mt.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):t.content_type.indexOf("video")>-1?mt.replaceSelection('')):t.content_type.indexOf("pdf")>-1?mt.replaceSelection('').concat(t.name,"")):mt.replaceSelection("[".concat(t.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")"))})));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();Object(h.useEffect)((function(){St(ft),null==mt||mt.setValue(ft)}),[ft]),Object(h.useEffect)((function(){null==st||st(At)}),[At]),Object(h.useEffect)((function(){if(Yt.current){var t=p.a.fromTextArea(Yt.current,{mode:I,lineNumbers:!E,lineWrapping:!0,value:i,autoCloseTags:!0,autoCloseBrackets:!0});function e(e,i){if(!ct){var r=i.clipboardData;if(r){var n=r.types.toString(),o=r.items;if("Files"===n||r.types.indexOf("Files")>-1){if(i.preventDefault(),"stex"==I)return;try{var a,l=o[1];"file"===(null===(a=o[0])||void 0===a?void 0:a.kind)&&(l=o[0]);var c=l.getAsFile(),u=c.name.split(".").pop();B(c,(function(e){var i,r,n;e.id?(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?t.replaceSelection('')):(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("pdf"))>-1?t.replaceSelection('').concat(c.name,"")):J.includes(u)?t.replaceSelection('').concat(c.name,"")):t.replaceSelection("[".concat(c.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(i){s.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}i.preventDefault()}return L&&t.focus(),t.on("paste",e),t.on("dragleave",(function(t,e){Xt.current.classList.remove("mouse-hover-md")})),t.on("dragover",(function(t,e){Xt.current.classList.add("mouse-hover-md")})),t.on("drop",(function(e,i){var r;if(Xt.current.classList.add("mouse-hover-md"),(r=i.dataTransfer.files).length>0){i.preventDefault(),i.stopPropagation();for(var n=function(e){var i=r[e],n=i.name.split(".").pop();B(i,(function(e){var r,s,o;e.id?(null==i||null===(r=i.type)||void 0===r?void 0:r.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==i||null===(s=i.type)||void 0===s?void 0:s.indexOf("video"))>-1?t.replaceSelection('')):(null==i||null===(o=i.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?t.replaceSelection('').concat(i.name,"")):J.includes(n)?t.replaceSelection('').concat(i.name,"")):t.replaceSelection("[".concat(i.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))},s=0;s0||r.target.offsetWidth>0)&&(Jt(),mt.setSize("100%","100%"),mt.refresh())}}catch(t){i.e(t)}finally{i.f()}}));return t.observe(Yt.current.parentElement),t}();return function(){t.unobserve(Yt.current.parentElement)}}}),[mt,Jt]),Object(h.useEffect)((function(){if(mt){for(var t=[],e=function(){var e=r[i],n=(s=Object(a.a)(e,2))[0],o=s[1],c=Object(l.a)({},n,(function(){te(o)}));t.push(c),mt.addKeyMap(c)},i=0,r=Object.entries(tt);i0){var t=(new Date).getTime(),e=window.sessionStorage.getItem(P);t>=Nt+1e4&&(!e||e!==xt)&&(window.sessionStorage.setItem(P,xt),Wt(!0))}}),1e4),Object(h.useEffect)((function(){Et(A)}),[mt,A]),Object(h.useEffect)((function(){mt&&L&&mt.focus()}),[mt,L]),Object(h.useEffect)((function(){if(kt&&mt){var t=mt.getScrollerElement();function e(t){var e=t.target;if(Zt.current){var i=e.scrollTop/e.scrollHeight;Zt.current.scrollTop=Zt.current.scrollHeight*i}}return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[mt,kt]),Object(h.useEffect)((function(){if(mt&&nt){function t(t,e){nt(t,e)}return mt.on("beforeChange",t),function(){mt.off("beforeChange",t)}}}),[mt,nt]),Object(h.useEffect)((function(){if(mt&&rt){function t(){rt(mt.getValue())}return mt.on("blur",t),function(){mt.off("blur",t)}}}),[mt,rt]),Object(h.useEffect)((function(){if(mt){function t(t){var e=t.getValue();St(e),Ft((new Date).getTime()),t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(e)}return mt.on("change",t),function(){mt.off("change",t)}}}),[mt,c]),Object(h.useEffect)((function(){mt&&(null==i?(mt.setValue(""),St("")):i!==mt.getValue()&&(mt.setValue(i),St(i),mt.setCursor(mt.lineCount(),0)))}),[mt,i]);var te=Object(h.useCallback)((function(t){var e=mt.getCursor(),i=mt.getSelection(),r=i.split("\n");switch(t){case"bold":return mt.replaceSelection("**"+i+"**"),""===i&&mt.setCursor(e.line,e.ch+2),mt.focus();case"italic":return mt.replaceSelection("*"+i+"*"),""===i&&mt.setCursor(e.line,e.ch+1),mt.focus();case"code":return mt.replaceSelection("`"+i+"`"),""===i&&mt.setCursor(e.line,e.ch+1),mt.focus();case"inline-latex":return mt.replaceSelection("`$$"+i+"$$`"),""===i&&mt.setCursor(e.line,e.ch+3),mt.focus();case"latex":return mt.replaceSelection("```latex\n"+i+"\n```"),mt.setCursor(e.line+1,i.length+1),mt.focus();case"line-break":return mt.replaceSelection("
      \n"),mt.focus();case"list-ul":return""===i?mt.replaceSelection("- "+i):mt.replaceSelection(r.map((function(t){return""===t?"":"- ".concat(t)})).join("\n")),mt.focus();case"list-ol":return""===i?mt.replaceSelection("1. "+i):mt.replaceSelection(r.map((function(t,e){return""===t?"":"".concat(e+1,". ").concat(t)})).join("\n")),mt.focus();case"add-null-ch":return""===i&&mt.setCursor(e.line,e.ch+1),mt.replaceSelection("▁"),mt.focus();case"inster-template-1":return""===i&&mt.setCursor(e.line,e.ch),mt.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),mt.focus();case"eraser":return mt.setValue(""),mt.focus();case"trigger-watch":return Et(!kt),mt.focus();case"trigger-full-screen":return Dt(!At),mt.focus();case"link":return void It("link");case"code-block":return void It("code-block");case"upload-image":return void It("upload-image");case"add-table":return void It("add-table");default:throw new Error}}),[mt,kt,At]),ee=Object(h.useCallback)((function(t){switch(It(""),_t){case"link":var e=t.title,i=t.link;return mt.replaceSelection("[".concat(e,"](").concat(i,")")),mt.focus();case"code-block":var r=t.language,n=t.content;return mt.replaceSelection(["```"+r,n,"```"].join("\n")),mt.focus();case"upload-image":var s=t.src,o=t.alt,a=t.name;return s.indexOf("type=image")>-1?mt.replaceSelection("![ ".concat(o||""," ]( ").concat(s,' "').concat(o||"",'" )')):s.indexOf("type=application/pdf")>-1?mt.replaceSelection('').concat(a,"")):mt.replaceSelection('').concat(a,"")),mt.focus();case"add-table":for(var l=t.row,c=t.col,u=t.align,h="\n",d=0;d300&&(r=300),Ht(S+r+"px")}}return t.addEventListener("mousedown",r),document.addEventListener("mousemove",s),document.addEventListener("mouseup",n),function(){t.removeEventListener("mousedown",r),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",n)}}}),[mt,$t]),Object(h.useEffect)((function(){Ht(S)}),[S]);var ne={width:Z(y),height:Z(Ut)};Object(h.useMemo)((function(){if(Nt){var t=new Date(Nt),e=t.getHours(),i=t.getMinutes(),r=t.getSeconds();return i=i<10?"0"+i:i,r=r<10?"0"+r:r,"".concat(e=e<10?"0"+e:e,":").concat(i,":").concat(r)}return 0}),[Nt]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Xt},d.a.createElement("div",{className:"markdown-editor-container ".concat(at," ").concat(kt?"on-preview":""," ").concat(E?"mini":""," ").concat(At?"full-screen":""),style:ne},d.a.createElement(w,{insertTemp:O,watch:kt,fullScreen:At,showNullButton:z,onActionCallback:te,hidetoolBar:Y,uuid:Vt.current,setOpenPhones:function(){Kt.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:Yt,placeholder:ht})),kt?d.a.createElement("div",{ref:Zt,className:"preview-container"},"stex"===I&&d.a.createElement(v,{value:xt}),"stex"!==I&&d.a.createElement(m.a,{edit:!0,value:xt,replaces:function(t,e){var i=mt.getValue();i=i.replace(t,e),St(i),null==mt||mt.setValue(i)}})):null))),j?d.a.createElement("a",{ref:$t,className:"editor-resize"}):null,d.a.createElement(k.a,null,et[_t]?d.a.createElement(r.a,{centered:!0,title:et[_t],visible:!0,onCancel:re,footer:null},ie):null))}},SJMd: /*!****************************************************!*\ !*** ./node_modules/code-prettify/src/prettify.js ***! \****************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var t=window,e=["break,continue,do,else,for,if,return,while"],r=[[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],i=[r,"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"],n=[r,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[r,"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"],o=[r,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],a="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",l=[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"],c=[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"],u=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],h=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;function d(t,e,r,i,n){if(r){var s={sourceNode:t,pre:1,langExtension:null,numberLines:null,sourceCode:r,spans:null,basePos:e,decorations:null};i(s),n.push.apply(n,s.decorations)}}var f=/\S/;function p(t){for(var e=void 0,r=t.firstChild;r;r=r.nextSibling){var i=r.nodeType;e=1===i?e?t:r:3===i&&f.test(r.nodeValue)?t:e}return e===t?void 0:e}function g(t,e){var r,i={};!function(){for(var n=t.concat(e),s=[],o={},a=0,l=n.length;a=0;)i[u.charAt(h)]=c;var d=c[1],f=""+d;o.hasOwnProperty(f)||(s.push(d),o[f]=null)}s.push(/[\0-\uffff]/),r=function(t){for(var e=0,r=!1,i=!1,n=0,s=t.length;n122||(u<65||h>90||r.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||r.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}r.sort((function(t,e){return t[0]-e[0]||e[1]-t[1]}));var d=[],f=[];for(s=0;sp[0]&&(p[1]+1>p[0]&&n.push("-"),n.push(l(p[1])))}return n.push("]"),n.join("")}function u(t){for(var i=t.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")),n=i.length,s=[],o=0,a=0;o=2&&"["===d?i[o]=c(h):"\\"!==d&&(i[o]=h.replace(/[a-zA-Z]/g,(function(t){var e=t.charCodeAt(0);return"["+String.fromCharCode(-33&e,32|e)+"]"})))}return i.join("")}var h=[];for(n=0,s=t.length;n=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(m=!1,y="src"),m||(f[v]=y)}var w=u;if(u+=v.length,m){var k=b[1],E=v.indexOf(k),T=E+k.length;b[2]&&(E=(T=v.length-b[2].length)-k.length);var L=y.substring(5);d(l,a+w,v.substring(0,E),s,c),d(l,a+w+E,k,S(L,k),c),d(l,a+w+T,v.substring(T),s,c)}else c.push(a+w,y)}t.decorations=c};return s}function m(t){var e=[],r=[];t.tripleQuotedStrings?e.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):t.multiLineStrings?e.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):e.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),t.verbatimStrings&&r.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var i=t.hashComments;i&&(t.cStyleComments?(i>1?e.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):e.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),r.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):e.push(["com",/^#[^\r\n]*/,null,"#"])),t.cStyleComments&&(r.push(["com",/^\/\/[^\r\n]*/,null]),r.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var n=t.regexLiterals;if(n){var s=n>1?"":"\n\r",o=s?".":"[\\S\\s]",a="/(?=[^/*"+s+"])(?:[^/\\x5B\\x5C"+s+"]|\\x5C"+o+"|\\x5B(?:[^\\x5C\\x5D"+s+"]|\\x5C"+o+")*(?:\\x5D|$))+/";r.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+a+")")])}var l=t.types;l&&r.push(["typ",l]);var c=(""+t.keywords).replace(/^ | $/g,"");c.length&&r.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),e.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return t.regexLiterals&&(u+="(?!s*/)"),r.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i,null],["lit",new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(u),null]),g(e,r)}var v=m({keywords:[i,s,n,o,a,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(t,e,r){for(var i=/(?:^|\s)nocode(?:\s|$)/,n=/\r\n?|\n/,s=t.ownerDocument,o=s.createElement("li");t.firstChild;)o.appendChild(t.firstChild);var a=[o];function l(t){var e=t.nodeType;if(1!=e||i.test(t.className)){if((3==e||4==e)&&r){var o=t.nodeValue,a=o.match(n);if(a){var u=o.substring(0,a.index);t.nodeValue=u;var h=o.substring(a.index+a[0].length);if(h)t.parentNode.insertBefore(s.createTextNode(h),t.nextSibling);c(t),u||t.parentNode.removeChild(t)}}}else if("br"===t.nodeName)c(t),t.parentNode&&t.parentNode.removeChild(t);else for(var d=t.firstChild;d;d=d.nextSibling)l(d)}function c(t){for(;!t.nextSibling;)if(!(t=t.parentNode))return;for(var e,r=function t(e,r){var i=r?e.cloneNode(!1):e,n=e.parentNode;if(n){var s=t(n,1),o=e.nextSibling;s.appendChild(i);for(var a=o;a;a=o)o=a.nextSibling,s.appendChild(a)}return i}(t.nextSibling,0);(e=r.parentNode)&&1===e.nodeType;)r=e;a.push(r)}for(var u=0;u=0;){var n=r[i];b.hasOwnProperty(n)?t.console&&console.warn("cannot override language handler %s",n):b[n]=e}}function S(t,e){return t&&b.hasOwnProperty(t)||(t=/^\s*=x&&(u+=2),a>=S&&(f+=2)}}finally{v&&(v.style.display=y)}}(e)}catch(e){t.console&&console.log(e&&e.stack||e)}}function w(t,e,r){var i=r||!1,n=e||null,s=document.createElement("div");return s.innerHTML="
      "+t+"
      ",s=s.firstChild,i&&y(s,i,!0),C({langExtension:n,numberLines:i,sourceNode:s,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),s.innerHTML}function k(e,r){var i=r||document.body,n=i.ownerDocument||document;function s(t){return i.getElementsByTagName(t)}for(var o=[s("pre"),s("code"),s("xmp")],a=[],l=0;l]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),x(g([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["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"]),x(g([],[["atv",/^[\s\S]+/]]),["uq.val"]),x(m({keywords:i,hashComments:!0,cStyleComments:!0,types:h}),["c","cc","cpp","cxx","cyc","m"]),x(m({keywords:"null,true,false"}),["json"]),x(m({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:h}),["cs"]),x(m({keywords:n,cStyleComments:!0}),["java"]),x(m({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(m({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(m({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(m({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(m({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),x(m({keywords:"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",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),x(g([],[["str",/^[\s\S]+/]]),["regex"]);var E=t.PR={createSimpleLexer:g,registerLangHandler:x,sourceDecorator:m,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:w,prettyPrint:k},T=t.define;"function"==typeof T&&T.amd&&T("google-code-prettify",[],(function(){return E}))}()},"VrN/": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var t=window,e=["break,continue,do,else,for,if,return,while"],i=[[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"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],r=[i,"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"],n=[i,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[i,"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"],o=[i,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],a="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",l=[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"],c=[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"],u=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],h=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;function d(t,e,i,r,n){if(i){var s={sourceNode:t,pre:1,langExtension:null,numberLines:null,sourceCode:i,spans:null,basePos:e,decorations:null};r(s),n.push.apply(n,s.decorations)}}var f=/\S/;function p(t){for(var e=void 0,i=t.firstChild;i;i=i.nextSibling){var r=i.nodeType;e=1===r?e?t:i:3===r&&f.test(i.nodeValue)?t:e}return e===t?void 0:e}function g(t,e){var i,r={};!function(){for(var n=t.concat(e),s=[],o={},a=0,l=n.length;a=0;)r[u.charAt(h)]=c;var d=c[1],f=""+d;o.hasOwnProperty(f)||(s.push(d),o[f]=null)}s.push(/[\0-\uffff]/),i=function(t){for(var e=0,i=!1,r=!1,n=0,s=t.length;n122||(u<65||h>90||i.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||i.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}i.sort((function(t,e){return t[0]-e[0]||e[1]-t[1]}));var d=[],f=[];for(s=0;sp[0]&&(p[1]+1>p[0]&&n.push("-"),n.push(l(p[1])))}return n.push("]"),n.join("")}function u(t){for(var r=t.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")),n=r.length,s=[],o=0,a=0;o=2&&"["===d?r[o]=c(h):"\\"!==d&&(r[o]=h.replace(/[a-zA-Z]/g,(function(t){var e=t.charCodeAt(0);return"["+String.fromCharCode(-33&e,32|e)+"]"})))}return r.join("")}var h=[];for(n=0,s=t.length;n=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(m=!1,y="src"),m||(f[v]=y)}var w=u;if(u+=v.length,m){var k=b[1],E=v.indexOf(k),T=E+k.length;b[2]&&(E=(T=v.length-b[2].length)-k.length);var L=y.substring(5);d(l,a+w,v.substring(0,E),s,c),d(l,a+w+E,k,S(L,k),c),d(l,a+w+T,v.substring(T),s,c)}else c.push(a+w,y)}t.decorations=c};return s}function m(t){var e=[],i=[];t.tripleQuotedStrings?e.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):t.multiLineStrings?e.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):e.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),t.verbatimStrings&&i.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=t.hashComments;r&&(t.cStyleComments?(r>1?e.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):e.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),i.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):e.push(["com",/^#[^\r\n]*/,null,"#"])),t.cStyleComments&&(i.push(["com",/^\/\/[^\r\n]*/,null]),i.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var n=t.regexLiterals;if(n){var s=n>1?"":"\n\r",o=s?".":"[\\S\\s]",a="/(?=[^/*"+s+"])(?:[^/\\x5B\\x5C"+s+"]|\\x5C"+o+"|\\x5B(?:[^\\x5C\\x5D"+s+"]|\\x5C"+o+")*(?:\\x5D|$))+/";i.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+a+")")])}var l=t.types;l&&i.push(["typ",l]);var c=(""+t.keywords).replace(/^ | $/g,"");c.length&&i.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),e.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return t.regexLiterals&&(u+="(?!s*/)"),i.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i,null],["lit",new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(u),null]),g(e,i)}var v=m({keywords:[r,s,n,o,a,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(t,e,i){for(var r=/(?:^|\s)nocode(?:\s|$)/,n=/\r\n?|\n/,s=t.ownerDocument,o=s.createElement("li");t.firstChild;)o.appendChild(t.firstChild);var a=[o];function l(t){var e=t.nodeType;if(1!=e||r.test(t.className)){if((3==e||4==e)&&i){var o=t.nodeValue,a=o.match(n);if(a){var u=o.substring(0,a.index);t.nodeValue=u;var h=o.substring(a.index+a[0].length);if(h)t.parentNode.insertBefore(s.createTextNode(h),t.nextSibling);c(t),u||t.parentNode.removeChild(t)}}}else if("br"===t.nodeName)c(t),t.parentNode&&t.parentNode.removeChild(t);else for(var d=t.firstChild;d;d=d.nextSibling)l(d)}function c(t){for(;!t.nextSibling;)if(!(t=t.parentNode))return;for(var e,i=function t(e,i){var r=i?e.cloneNode(!1):e,n=e.parentNode;if(n){var s=t(n,1),o=e.nextSibling;s.appendChild(r);for(var a=o;a;a=o)o=a.nextSibling,s.appendChild(a)}return r}(t.nextSibling,0);(e=i.parentNode)&&1===e.nodeType;)i=e;a.push(i)}for(var u=0;u=0;){var n=i[r];b.hasOwnProperty(n)?t.console&&console.warn("cannot override language handler %s",n):b[n]=e}}function S(t,e){return t&&b.hasOwnProperty(t)||(t=/^\s*=x&&(u+=2),a>=S&&(f+=2)}}finally{v&&(v.style.display=y)}}(e)}catch(e){t.console&&console.log(e&&e.stack||e)}}function w(t,e,i){var r=i||!1,n=e||null,s=document.createElement("div");return s.innerHTML="
      "+t+"
      ",s=s.firstChild,r&&y(s,r,!0),C({langExtension:n,numberLines:r,sourceNode:s,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),s.innerHTML}function k(e,i){var r=i||document.body,n=r.ownerDocument||document;function s(t){return r.getElementsByTagName(t)}for(var o=[s("pre"),s("code"),s("xmp")],a=[],l=0;l]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),x(g([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["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"]),x(g([],[["atv",/^[\s\S]+/]]),["uq.val"]),x(m({keywords:r,hashComments:!0,cStyleComments:!0,types:h}),["c","cc","cpp","cxx","cyc","m"]),x(m({keywords:"null,true,false"}),["json"]),x(m({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:h}),["cs"]),x(m({keywords:n,cStyleComments:!0}),["java"]),x(m({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(m({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(m({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(m({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(m({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),x(m({keywords:"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",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),x(g([],[["str",/^[\s\S]+/]]),["regex"]);var E=t.PR={createSimpleLexer:g,registerLangHandler:x,sourceDecorator:m,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:w,prettyPrint:k},T=t.define;"function"==typeof T&&T.amd&&T("google-code-prettify",[],(function(){return E}))}()},"VrN/": /*!***************************************************!*\ !*** ./node_modules/codemirror/lib/codemirror.js ***! \***************************************************/ /*! no static exports found */ /*! all exports used */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,r=/gecko\/\d/i.test(t),i=/MSIE \d/.test(t),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),s=/Edge\/(\d+)/.exec(t),o=i||n||s,a=o&&(i?document.documentMode||6:+(s||n)[1]),l=!s&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!s&&/Chrome\//.test(t),h=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),g=!s&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),m=/Android/.test(t),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=g||/Mac/.test(e),b=/\bCrOS\b/.test(t),x=/win/i.test(e),S=h&&t.match(/Version\/(\d*\.\d*)/);S&&(S=Number(S[1])),S&&S>=15&&(h=!1,l=!0);var C=y&&(c||h&&(null==S||S<12.11)),w=r||o&&a>=9;function k(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var E,T=function(t,e){var r=t.className,i=k(e).exec(r);if(i){var n=r.slice(i.index+i[0].length);t.className=r.slice(0,i.index)+(n?i[1]+n:"")}};function L(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function A(t,e){return L(t).appendChild(e)}function D(t,e,r,i){var n=document.createElement(t);if(r&&(n.className=r),i&&(n.style.cssText=i),"string"==typeof e)n.appendChild(document.createTextNode(e));else if(e)for(var s=0;s=e)return o+(e-s);o+=a-s,o+=r-o%r,s=a+1}}g?P=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(P=function(t){try{t.select()}catch(t){}});var j=function(){this.id=null,this.f=null,this.time=0,this.handler=N(this.onTimeout,this)};function U(t,e){for(var r=0;r=e)return i+Math.min(o,e-n);if(n+=s-i,i=s+1,(n+=r-n%r)>=e)return i}}var K=[""];function q(t){for(;K.length<=t;)K.push(Y(K)+" ");return K[t]}function Y(t){return t[t.length-1]}function X(t,e){for(var r=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Q.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&J(t))||e.test(t):J(t)}function et(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var rt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function it(t){return t.charCodeAt(0)>=768&&rt.test(t)}function nt(t,e,r){for(;(r<0?e>0:er?-1:1;;){if(e==r)return e;var n=(e+r)/2,s=i<0?Math.ceil(n):Math.floor(n);if(s==e)return t(s)?e:r;t(s)?r=s:e=s+i}}var ot=null;function at(t,e,r){var i;ot=null;for(var n=0;ne)return n;s.to==e&&(s.from!=s.to&&"before"==r?i=n:ot=n),s.from==e&&(s.from!=s.to&&"before"!=r?i=n:ot=n)}return null!=i?i:ot}var lt=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,r=/[LRr]/,i=/[Lb1n]/,n=/[1n]/;function s(t,e,r){this.level=t,this.from=e,this.to=r}return function(o,a){var l="ltr"==a?"L":"R";if(0==o.length||"ltr"==a&&!t.test(o))return!1;for(var c,u=o.length,h=[],d=0;d-1&&(i[e]=n.slice(0,s).concat(n.slice(s+1)))}}}function pt(t,e){var r=dt(t,e);if(r.length)for(var i=Array.prototype.slice.call(arguments,2),n=0;n0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){ft(this,t,e)}}function bt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function xt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function St(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ct(t){bt(t),xt(t)}function wt(t){return t.target||t.srcElement}function kt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var Et,Tt,Lt=function(){if(o&&a<9)return!1;var t=D("div");return"draggable"in t||"dragDrop"in t}();function At(t){if(null==Et){var e=D("span","​");A(t,D("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Et=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&a<8))}var r=Et?D("span","​"):D("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Dt(t){if(null!=Tt)return Tt;var e=A(t,document.createTextNode("AخA")),r=E(e,0,1).getBoundingClientRect(),i=E(e,1,2).getBoundingClientRect();return L(t),!(!r||r.left==r.right)&&(Tt=i.right-r.right<3)}var Rt,Ot=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,r=[],i=t.length;e<=i;){var n=t.indexOf("\n",e);-1==n&&(n=t.length);var s=t.slice(e,"\r"==t.charAt(n-1)?n-1:n),o=s.indexOf("\r");-1!=o?(r.push(s.slice(0,o)),e+=o+1):(r.push(s),e=n+1)}return r}:function(t){return t.split(/\r\n?|\n/)},_t=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},It="oncopy"in(Rt=D("div"))||(Rt.setAttribute("oncopy","return;"),"function"==typeof Rt.oncopy),Mt=null,Pt={},Nt={};function Ft(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Pt[t]=e}function Bt(t){if("string"==typeof t&&Nt.hasOwnProperty(t))t=Nt[t];else if(t&&"string"==typeof t.name&&Nt.hasOwnProperty(t.name)){var e=Nt[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Bt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Bt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function jt(t,e){e=Bt(e);var r=Pt[e.name];if(!r)return jt(t,"text/plain");var i=r(t,e);if(Ut.hasOwnProperty(e.name)){var n=Ut[e.name];for(var s in n)n.hasOwnProperty(s)&&(i.hasOwnProperty(s)&&(i["_"+s]=i[s]),i[s]=n[s])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)i[o]=e.modeProps[o];return i}var Ut={};function Ht(t,e){F(e,Ut.hasOwnProperty(t)?Ut[t]:Ut[t]={})}function Gt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var r={};for(var i in e){var n=e[i];n instanceof Array&&(n=n.concat([])),r[i]=n}return r}function zt(t,e){for(var r;t.innerMode&&(r=t.innerMode(e))&&r.mode!=t;)e=r.state,t=r.mode;return r||{mode:t,state:e}}function Wt(t,e,r){return!t.startState||t.startState(e,r)}var Vt=function(t,e,r){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Kt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var r=t;!r.lines;)for(var i=0;;++i){var n=r.children[i],s=n.chunkSize();if(e=t.first&&er?te(r,Kt(t,r).text.length):function(t,e){var r=t.ch;return null==r||r>e?te(t.line,e):r<0?te(t.line,0):t}(e,Kt(t,e.line).text.length)}function le(t,e){for(var r=[],i=0;i=this.string.length},Vt.prototype.sol=function(){return this.pos==this.lineStart},Vt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vt.prototype.next=function(){if(this.pose},Vt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Vt.prototype.skipToEnd=function(){this.pos=this.string.length},Vt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Vt.prototype.backUp=function(t){this.pos-=t},Vt.prototype.column=function(){return this.lastColumnPos0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var n=function(t){return r?t.toLowerCase():t};if(n(this.string.substr(this.pos,t.length))==n(t))return!1!==e&&(this.pos+=t.length),!0},Vt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Vt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Vt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ce=function(t,e){this.state=t,this.lookAhead=e},ue=function(t,e,r,i){this.state=e,this.doc=t,this.line=r,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function he(t,e,r,i){var n=[t.state.modeGen],s={};xe(t,e.text,t.doc.mode,r,(function(t,e){return n.push(t,e)}),s,i);for(var o=r.state,a=function(i){r.baseTokens=n;var a=t.state.overlays[i],l=1,c=0;r.state=!0,xe(t,e.text,a.mode,r,(function(t,e){for(var r=l;ct&&n.splice(l,1,t,n[l+1],i),l+=2,c=Math.min(t,i)}if(e)if(a.opaque)n.splice(r,l-r,t,"overlay "+e),l=r+2;else for(;rt.options.maxHighlightLength&&Gt(t.doc.mode,i.state),s=he(t,e,i);n&&(i.state=n),e.stateAfter=i.save(!n),e.styles=s.styles,s.classes?e.styleClasses=s.classes:e.styleClasses&&(e.styleClasses=null),r===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function fe(t,e,r){var i=t.doc,n=t.display;if(!i.mode.startState)return new ue(i,!0,e);var s=function(t,e,r){for(var i,n,s=t.doc,o=r?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>o;--a){if(a<=s.first)return s.first;var l=Kt(s,a-1),c=l.stateAfter;if(c&&(!r||a+(c instanceof ce?c.lookAhead:0)<=s.modeFrontier))return a;var u=B(l.text,null,t.options.tabSize);(null==n||i>u)&&(n=a-1,i=u)}return n}(t,e,r),o=s>i.first&&Kt(i,s-1).stateAfter,a=o?ue.fromSaved(i,o,s):new ue(i,Wt(i.mode),s);return i.iter(s,e,(function(r){pe(t,r.text,a);var i=a.line;r.stateAfter=i==e-1||i%5==0||i>=n.viewFrom&&ie.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}ue.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ue.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(t,e,r){return e instanceof ce?new ue(t,Gt(t.mode,e.state),r,e.lookAhead):new ue(t,Gt(t.mode,e),r)},ue.prototype.save=function(t){var e=!1!==t?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(e,this.maxLookAhead):e};var ve=function(t,e,r){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=r};function ye(t,e,r,i){var n,s,o=t.doc,a=o.mode,l=Kt(o,(e=ae(o,e)).line),c=fe(t,e.line,r),u=new Vt(l.text,t.options.tabSize,c);for(i&&(s=[]);(i||u.post.options.maxHighlightLength?(a=!1,o&&pe(t,e,i,h.pos),h.pos=e.length,l=null):l=be(me(r,h,i.state,d),s),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;c=e:s.to>e);(i||(i=[])).push(new we(o,s.from,a?null:s.to))}}return i}(r,n,o),l=function(t,e,r){var i;if(t)for(var n=0;n=e:s.to>e)||s.from==e&&"bookmark"==o.type&&(!r||s.marker.insertLeft)){var a=null==s.from||(o.inclusiveLeft?s.from<=e:s.from0&&a)for(var b=0;be)&&(!r||_e(r,s.marker)<0)&&(r=s.marker)}return r}function Fe(t,e,r,i,n){var s=Kt(t,e),o=Ce&&s.markedSpans;if(o)for(var a=0;a=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&n.inclusiveLeft?ee(c.to,r)>=0:ee(c.to,r)>0)||u>=0&&(l.marker.inclusiveRight&&n.inclusiveLeft?ee(c.from,i)<=0:ee(c.from,i)<0)))return!0}}}function Be(t){for(var e;e=Me(t);)t=e.find(-1,!0).line;return t}function je(t,e){var r=Kt(t,e),i=Be(r);return r==i?e:$t(i)}function Ue(t,e){if(e>t.lastLine())return e;var r,i=Kt(t,e);if(!He(t,i))return e;for(;r=Pe(i);)i=r.find(1,!0).line;return $t(i)+1}function He(t,e){var r=Ce&&e.markedSpans;if(r)for(var i=void 0,n=0;ne.maxLineLength&&(e.maxLineLength=r,e.maxLine=t)}))}var Ke=function(t,e,r){this.text=t,De(this,e),this.height=r?r(this):1};function qe(t){t.parent=null,Ae(t)}Ke.prototype.lineNo=function(){return $t(this)},yt(Ke);var Ye={},Xe={};function $e(t,e){if(!t||/^\s*$/.test(t))return null;var r=e.addModeClass?Xe:Ye;return r[t]||(r[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var r=R("span",null,null,l?"padding-right: .1px":null),i={pre:R("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var n=0;n<=(e.rest?e.rest.length:0);n++){var s=n?e.rest[n-1]:e.line,o=void 0;i.pos=0,i.addToken=Je,Dt(t.display.measure)&&(o=ct(s,t.doc.direction))&&(i.addToken=tr(i.addToken,o)),i.map=[],rr(s,i,de(t,s,e!=t.display.externalMeasured&&$t(s))),s.styleClasses&&(s.styleClasses.bgClass&&(i.bgClass=M(s.styleClasses.bgClass,i.bgClass||"")),s.styleClasses.textClass&&(i.textClass=M(s.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(At(t.display.measure))),0==n?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var a=i.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return pt(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=M(i.pre.className,i.textClass||"")),i}function Qe(t){var e=D("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Je(t,e,r,i,n,s,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var r=e,i="",n=0;nc&&h.from<=c);d++);if(h.to>=u)return t(r,i,n,s,o,a,l);t(r,i.slice(0,h.to-c),n,s,null,a,l),s=null,i=i.slice(h.to-c),c=h.to}}}function er(t,e,r,i){var n=!i&&r.widgetNode;n&&t.map.push(t.pos,t.pos+e,n),!i&&t.cm.display.input.needsContentAttribute&&(n||(n=t.content.appendChild(document.createElement("span"))),n.setAttribute("cm-marker",r.id)),n&&(t.cm.display.input.setUneditable(n),t.content.appendChild(n)),t.pos+=e,t.trailingSpace=!1}function rr(t,e,r){var i=t.markedSpans,n=t.text,s=0;if(i)for(var o,a,l,c,u,h,d,f=n.length,p=0,g=1,m="",v=0;;){if(v==p){l=c=u=a="",d=null,h=null,v=1/0;for(var y=[],b=void 0,x=0;xp||C.collapsed&&S.to==p&&S.from==p)){if(null!=S.to&&S.to!=p&&v>S.to&&(v=S.to,c=""),C.className&&(l+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&S.from==p&&(u+=" "+C.startStyle),C.endStyle&&S.to==v&&(b||(b=[])).push(C.endStyle,S.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var w in C.attributes)(d||(d={}))[w]=C.attributes[w];C.collapsed&&(!h||_e(h.marker,C)<0)&&(h=S)}else S.from>p&&v>S.from&&(v=S.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var L=p+m.length;if(!h){var A=L>T?m.slice(0,T-p):m;e.addToken(e,A,o?o+l:l,u,p+A.length==v?c:"",a,d)}if(L>=T){m=m.slice(T-p),p=T;break}p=L,u=""}m=n.slice(s,s=r[g++]),o=$e(r[g++],e.cm.options)}}else for(var D=1;Dr)return{map:t.measure.maps[n],cache:t.measure.caches[n],before:!0}}function Dr(t,e,r,i){return _r(t,Or(t,e),r,i)}function Rr(t,e){if(e>=t.display.viewFrom&&e=r.lineN&&e2&&s.push((l.bottom+c.top)/2-r.top)}}s.push(r.bottom-r.top)}}(t,e.view,e.rect),e.hasHeights=!0),(s=function(t,e,r,i){var n,s=Pr(e.map,r,i),l=s.node,c=s.start,u=s.end,h=s.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&it(e.line.text.charAt(s.coverStart+c));)--c;for(;s.coverStart+u1}(t))return e;var r=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*r,right:e.right*r,top:e.top*i,bottom:e.bottom*i}}(t.display.measure,n))}else{var f;c>0&&(h=i="right"),n=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==i?f.length-1:0]:l.getBoundingClientRect()}if(o&&a<9&&!c&&(!n||!n.left&&!n.right)){var p=l.parentNode.getClientRects()[0];n=p?{left:p.left,right:p.left+ii(t.display),top:p.top,bottom:p.bottom}:Mr}for(var g=n.top-e.rect.top,m=n.bottom-e.rect.top,v=(g+m)/2,y=e.view.measure.heights,b=0;be)&&(n=(s=l-a)-1,e>=l&&(o="right")),null!=n){if(i=t[c+2],a==l&&r==(i.insertLeft?"left":"right")&&(o=r),"left"==r&&0==n)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)i=t[2+(c-=3)],o="left";if("right"==r&&n==l-a)for(;c=0&&(r=t[n]).left==r.right;n--);return r}function Fr(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=i.text.length?(l=i.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return o("before"==c?l-1:l,"before"==c);function u(t,e,r){return o(r?t-1:t,1==a[e].level!=r)}var h=at(a,l,c),d=ot,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function qr(t,e){var r=0;e=ae(t.doc,e),t.options.lineWrapping||(r=ii(t.display)*e.ch);var i=Kt(t.doc,e.line),n=ze(i)+Cr(t.display);return{left:r,right:r,top:n,bottom:n+i.height}}function Yr(t,e,r,i,n){var s=te(t,e,r);return s.xRel=n,i&&(s.outside=i),s}function Xr(t,e,r){var i=t.doc;if((r+=t.display.viewOffset)<0)return Yr(i.first,0,null,-1,-1);var n=Zt(i,r),s=i.first+i.size-1;if(n>s)return Yr(i.first+i.size-1,Kt(i,s).text.length,null,1,1);e<0&&(e=0);for(var o=Kt(i,n);;){var a=Jr(t,o,n,e,r),l=Ne(o,a.ch+(a.xRel>0||a.outside>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==n)return c;o=Kt(i,n=c.line)}}function $r(t,e,r,i){i-=Gr(e);var n=e.text.length,s=st((function(e){return _r(t,r,e-1).bottom<=i}),n,0);return{begin:s,end:n=st((function(e){return _r(t,r,e).top>i}),s,n)}}function Zr(t,e,r,i){return r||(r=Or(t,e)),$r(t,e,r,zr(t,e,_r(t,r,i),"line").top)}function Qr(t,e,r,i){return!(t.bottom<=r)&&(t.top>r||(i?t.left:t.right)>e)}function Jr(t,e,r,i,n){n-=ze(e);var s=Or(t,e),o=Gr(e),a=0,l=e.text.length,c=!0,u=ct(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?ei:ti)(t,e,r,s,u,i,n);a=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,g=null,m=st((function(e){var r=_r(t,s,e);return r.top+=o,r.bottom+=o,!!Qr(r,i,n,!1)&&(r.top<=n&&r.left<=i&&(p=e,g=r),!0)}),a,l),v=!1;if(g){var y=i-g.left=x.bottom?1:0}return Yr(r,m=nt(e.text,m,1),f,v,i-d)}function ti(t,e,r,i,n,s,o){var a=st((function(a){var l=n[a],c=1!=l.level;return Qr(Kr(t,te(r,c?l.to:l.from,c?"before":"after"),"line",e,i),s,o,!0)}),0,n.length-1),l=n[a];if(a>0){var c=1!=l.level,u=Kr(t,te(r,c?l.from:l.to,c?"after":"before"),"line",e,i);Qr(u,s,o,!0)&&u.top>o&&(l=n[a-1])}return l}function ei(t,e,r,i,n,s,o){var a=$r(t,e,i,o),l=a.begin,c=a.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=_r(t,i,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=pg)&&(u=f,h=g)}}return u||(u=n[n.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function ri(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Ir){Ir=D("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Ir.appendChild(document.createTextNode("x")),Ir.appendChild(D("br"));Ir.appendChild(document.createTextNode("x"))}A(t.measure,Ir);var r=Ir.offsetHeight/50;return r>3&&(t.cachedTextHeight=r),L(t.measure),r||1}function ii(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=D("span","xxxxxxxxxx"),r=D("pre",[e],"CodeMirror-line-like");A(t.measure,r);var i=e.getBoundingClientRect(),n=(i.right-i.left)/10;return n>2&&(t.cachedCharWidth=n),n||10}function ni(t){for(var e=t.display,r={},i={},n=e.gutters.clientLeft,s=e.gutters.firstChild,o=0;s;s=s.nextSibling,++o){var a=t.display.gutterSpecs[o].className;r[a]=s.offsetLeft+s.clientLeft+n,i[a]=s.clientWidth}return{fixedPos:si(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:r,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function si(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function oi(t){var e=ri(t.display),r=t.options.lineWrapping,i=r&&Math.max(5,t.display.scroller.clientWidth/ii(t.display)-3);return function(n){if(He(t.doc,n))return 0;var s=0;if(n.widgets)for(var o=0;o0&&(l=Kt(t.doc,c.line).text).length==c.ch){var u=B(l,l.length,t.options.tabSize)-l.length;c=te(c.line,Math.max(0,Math.round((s-kr(t.display).left)/ii(t.display))-u))}return c}function ci(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var r=t.display.view,i=0;ie)&&(n.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=n.viewTo)Ce&&je(t.doc,e)n.viewFrom?di(t):(n.viewFrom+=i,n.viewTo+=i);else if(e<=n.viewFrom&&r>=n.viewTo)di(t);else if(e<=n.viewFrom){var s=fi(t,r,r+i,1);s?(n.view=n.view.slice(s.index),n.viewFrom=s.lineN,n.viewTo+=i):di(t)}else if(r>=n.viewTo){var o=fi(t,e,e,-1);o?(n.view=n.view.slice(0,o.index),n.viewTo=o.lineN):di(t)}else{var a=fi(t,e,e,-1),l=fi(t,r,r+i,1);a&&l?(n.view=n.view.slice(0,a.index).concat(nr(t,a.lineN,l.lineN)).concat(n.view.slice(l.index)),n.viewTo+=i):di(t)}var c=n.externalMeasured;c&&(r=n.lineN&&e=i.viewTo)){var s=i.view[ci(t,e)];if(null!=s.node){var o=s.changes||(s.changes=[]);-1==U(o,r)&&o.push(r)}}}function di(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function fi(t,e,r,i){var n,s=ci(t,e),o=t.display.view;if(!Ce||r==t.doc.first+t.doc.size)return{index:s,lineN:r};for(var a=t.display.viewFrom,l=0;l0){if(s==o.length-1)return null;n=a+o[s].size-e,s++}else n=a-e;e+=n,r+=n}for(;je(t.doc,r)!=r;){if(s==(i<0?0:o.length-1))return null;r+=i*o[s-(i<0?1:0)].size,s+=i}return{index:s,lineN:r}}function pi(t){for(var e=t.display.view,r=0,i=0;i=t.display.viewTo||a.to().linee||e==r&&o.to==e)&&(i(Math.max(o.from,e),Math.min(o.to,r),1==o.level?"rtl":"ltr",s),n=!0)}n||i(e,r,"ltr")}(g,r||0,null==i?d:i,(function(t,e,n,h){var m="ltr"==n,v=f(t,m?"left":"right"),y=f(e-1,m?"right":"left"),b=null==r&&0==t,x=null==i&&e==d,S=0==h,C=!g||h==g.length-1;if(y.top-v.top<=3){var w=(c?x:b)&&C,k=(c?b:x)&&S?a:(m?v:y).left,E=w?l:(m?y:v).right;u(k,v.top,E-k,v.bottom)}else{var T,L,A,D;m?(T=c&&b&&S?a:v.left,L=c?l:p(t,n,"before"),A=c?a:p(e,n,"after"),D=c&&x&&C?l:y.right):(T=c?p(t,n,"before"):a,L=!c&&b&&S?l:v.right,A=!c&&x&&C?a:y.left,D=c?p(e,n,"after"):l),u(T,v.top,L-T,v.bottom),v.bottom0?e.blinker=setInterval((function(){t.hasFocus()||ki(t),e.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Si(t){t.state.focused||(t.display.input.focus(),wi(t))}function Ci(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,ki(t))}),100)}function wi(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(pt(t,"focus",t,e),t.state.focused=!0,I(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),xi(t))}function ki(t,e){t.state.delayingBlurEvent||(t.state.focused&&(pt(t,"blur",t,e),t.state.focused=!1,T(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function Ei(t){for(var e=t.display,r=e.lineDiv.offsetTop,i=0;i.005||d<-.005)&&(Xt(n.line,l),Ti(n.line),n.rest))for(var f=0;ft.display.sizerWidth){var p=Math.ceil(c/ii(t.display));p>t.display.maxLineLength&&(t.display.maxLineLength=p,t.display.maxLine=n.line,t.display.maxLineChanged=!0)}}}}function Ti(t){if(t.widgets)for(var e=0;e=o&&(s=Zt(e,ze(Kt(e,l))-t.wrapper.clientHeight),o=l)}return{from:s,to:Math.max(o,s+1)}}function Ai(t,e){var r=t.display,i=ri(t.display);e.top<0&&(e.top=0);var n=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:r.scroller.scrollTop,s=Lr(t),o={};e.bottom-e.top>s&&(e.bottom=e.top+s);var a=t.doc.height+wr(r),l=e.topa-i;if(e.topn+s){var u=Math.min(e.top,(c?a:e.bottom)-s);u!=n&&(o.scrollTop=u)}var h=t.options.fixedGutter?0:r.gutters.offsetWidth,d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:r.scroller.scrollLeft-h,f=Tr(t)-r.gutters.offsetWidth,p=e.right-e.left>f;return p&&(e.right=e.left+f),e.left<10?o.scrollLeft=0:e.leftf+d-3&&(o.scrollLeft=e.right+(p?0:10)-f),o}function Di(t,e){null!=e&&(_i(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Ri(t){_i(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Oi(t,e,r){null==e&&null==r||_i(t),null!=e&&(t.curOp.scrollLeft=e),null!=r&&(t.curOp.scrollTop=r)}function _i(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Ii(t,qr(t,e.from),qr(t,e.to),e.margin))}function Ii(t,e,r,i){var n=Ai(t,{left:Math.min(e.left,r.left),top:Math.min(e.top,r.top)-i,right:Math.max(e.right,r.right),bottom:Math.max(e.bottom,r.bottom)+i});Oi(t,n.scrollLeft,n.scrollTop)}function Mi(t,e){Math.abs(t.doc.scrollTop-e)<2||(r||ln(t,{top:e}),Pi(t,e,!0),r&&ln(t),rn(t,100))}function Pi(t,e,r){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||r)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Ni(t,e,r,i){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(r?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!i||(t.doc.scrollLeft=e,hn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Fi(t){var e=t.display,r=e.gutters.offsetWidth,i=Math.round(t.doc.height+wr(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?r:0,docHeight:i,scrollHeight:i+Er(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:r}}var Bi=function(t,e,r){this.cm=r;var i=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=n.tabIndex=-1,t(i),t(n),ht(i,"scroll",(function(){i.clientHeight&&e(i.scrollTop,"vertical")})),ht(n,"scroll",(function(){n.clientWidth&&e(n.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Bi.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,r=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var n=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+n)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=r?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var s=t.viewWidth-t.barLeft-(r?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+s)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?i:0,bottom:e?i:0}},Bi.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Bi.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Bi.prototype.zeroWidthHack=function(){var t=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new j,this.disableVert=new j},Bi.prototype.enableZeroWidthBar=function(t,e,r){t.style.pointerEvents="auto",e.set(1e3,(function i(){var n=t.getBoundingClientRect();("vert"==r?document.elementFromPoint(n.right-1,(n.top+n.bottom)/2):document.elementFromPoint((n.right+n.left)/2,n.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}))},Bi.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ji=function(){};function Ui(t,e){e||(e=Fi(t));var r=t.display.barWidth,i=t.display.barHeight;Hi(t,e);for(var n=0;n<4&&r!=t.display.barWidth||i!=t.display.barHeight;n++)r!=t.display.barWidth&&t.options.lineWrapping&&Ei(t),Hi(t,Fi(t)),r=t.display.barWidth,i=t.display.barHeight}function Hi(t,e){var r=t.display,i=r.scrollbars.update(e);r.sizer.style.paddingRight=(r.barWidth=i.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=i.bottom)+"px",r.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=i.bottom+"px",r.scrollbarFiller.style.width=i.right+"px"):r.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=i.bottom+"px",r.gutterFiller.style.width=e.gutterWidth+"px"):r.gutterFiller.style.display=""}ji.prototype.update=function(){return{bottom:0,right:0}},ji.prototype.setScrollLeft=function(){},ji.prototype.setScrollTop=function(){},ji.prototype.clear=function(){};var Gi={native:Bi,null:ji};function zi(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&T(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Gi[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,r){"horizontal"==r?Ni(t,e):Mi(t,e)}),t),t.display.scrollbars.addClass&&I(t.display.wrapper,t.display.scrollbars.addClass)}var Wi=0;function Vi(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wi},e=t.curOp,sr?sr.ops.push(e):e.ownsGroup=sr={ops:[e],delayedCallbacks:[]}}function Ki(t){var e=t.curOp;e&&function(t,e){var r=t.ownsGroup;if(r)try{!function(t){var e=t.delayedCallbacks,r=0;do{for(;r=r.viewTo)||r.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new sn(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Yi(t){t.updatedDisplay=t.mustUpdate&&on(t.cm,t.update)}function Xi(t){var e=t.cm,r=e.display;t.updatedDisplay&&Ei(e),t.barMeasure=Fi(e),r.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Dr(e,r.maxLine,r.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+t.adjustWidthTo+Er(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+t.adjustWidthTo-Tr(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=r.input.prepareSelection())}function $i(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(n=!1),null!=n&&!p){var s=D("div","​",null,"position: absolute;\n top: "+(e.top-r.viewOffset-Cr(t.display))+"px;\n height: "+(e.bottom-e.top+Er(t)+r.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(n),t.display.lineSpace.removeChild(s)}}}(e,function(t,e,r,i){var n;null==i&&(i=0),t.options.lineWrapping||e!=r||(r="before"==(e=e.ch?te(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?te(e.line,e.ch+1,"before"):e);for(var s=0;s<5;s++){var o=!1,a=Kr(t,e),l=r&&r!=e?Kr(t,r):a,c=Ai(t,n={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Mi(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(Ni(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(o=!0)),!o)break}return n}(e,ae(i,t.scrollToPos.from),ae(i,t.scrollToPos.to),t.scrollToPos.margin));var n=t.maybeHiddenMarkers,s=t.maybeUnhiddenMarkers;if(n)for(var o=0;o=t.display.viewTo)){var r=+new Date+t.options.workTime,i=fe(t,e.highlightFrontier),n=[];e.iter(i.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(s){if(i.line>=t.display.viewFrom){var o=s.styles,a=s.text.length>t.options.maxHighlightLength?Gt(e.mode,i.state):null,l=he(t,s,i,!0);a&&(i.state=a),s.styles=l.styles;var c=s.styleClasses,u=l.classes;u?s.styleClasses=u:c&&(s.styleClasses=null);for(var h=!o||o.length!=s.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&dr)return rn(t,t.options.workDelay),!0})),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),n.length&&Qi(t,(function(){for(var e=0;e=r.viewFrom&&e.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==pi(t))return!1;dn(t)&&(di(t),e.dims=ni(t));var n=i.first+i.size,s=Math.max(e.visible.from-t.options.viewportMargin,i.first),o=Math.min(n,e.visible.to+t.options.viewportMargin);r.viewFromo&&r.viewTo-o<20&&(o=Math.min(n,r.viewTo)),Ce&&(s=je(t.doc,s),o=Ue(t.doc,o));var a=s!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=e.wrapperHeight||r.lastWrapWidth!=e.wrapperWidth;!function(t,e,r){var i=t.display;0==i.view.length||e>=i.viewTo||r<=i.viewFrom?(i.view=nr(t,e,r),i.viewFrom=e):(i.viewFrom>e?i.view=nr(t,e,i.viewFrom).concat(i.view):i.viewFromr&&(i.view=i.view.slice(0,ci(t,r)))),i.viewTo=r}(t,s,o),r.viewOffset=ze(Kt(t.doc,r.viewFrom)),t.display.mover.style.top=r.viewOffset+"px";var c=pi(t);if(!a&&0==c&&!e.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=_();if(!e||!O(t.display.lineDiv,e))return null;var r={activeElt:e};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&O(t.display.lineDiv,i.anchorNode)&&(r.anchorNode=i.anchorNode,r.anchorOffset=i.anchorOffset,r.focusNode=i.focusNode,r.focusOffset=i.focusOffset)}return r}(t);return c>4&&(r.lineDiv.style.display="none"),function(t,e,r){var i=t.display,n=t.options.lineNumbers,s=i.lineDiv,o=s.firstChild;function a(e){var r=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),r}for(var c=i.view,u=i.viewFrom,h=0;h-1&&(f=!1),cr(t,d,u,r)),f&&(L(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Jt(t.options,u)))),o=d.node.nextSibling}else{var p=mr(t,d,u,r);s.insertBefore(p,o)}u+=d.size}for(;o;)o=a(o)}(t,r.updateLineNumbers,e.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(t){if(t&&t.activeElt&&t.activeElt!=_()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&O(document.body,t.anchorNode)&&O(document.body,t.focusNode))){var e=window.getSelection(),r=document.createRange();r.setEnd(t.anchorNode,t.anchorOffset),r.collapse(!1),e.removeAllRanges(),e.addRange(r),e.extend(t.focusNode,t.focusOffset)}}(u),L(r.cursorDiv),L(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,a&&(r.lastWrapHeight=e.wrapperHeight,r.lastWrapWidth=e.wrapperWidth,rn(t,400)),r.updateLineNumbers=null,!0}function an(t,e){for(var r=e.viewport,i=!0;;i=!1){if(i&&t.options.lineWrapping&&e.oldDisplayWidth!=Tr(t))i&&(e.visible=Li(t.display,t.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(t.doc.height+wr(t.display)-Lr(t),r.top)}),e.visible=Li(t.display,t.doc,r),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!on(t,e))break;Ei(t);var n=Fi(t);gi(t),Ui(t,n),un(t,n),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function ln(t,e){var r=new sn(t,e);if(on(t,r)){Ei(t),an(t,r);var i=Fi(t);gi(t),Ui(t,i),un(t,i),r.finish()}}function cn(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function un(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Er(t)+"px"}function hn(t){var e=t.display,r=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=si(e)-e.scroller.scrollLeft+t.doc.scrollLeft,n=e.gutters.offsetWidth,s=i+"px",o=0;oa.clientWidth,u=a.scrollHeight>a.clientHeight;if(n&&c||s&&u){if(s&&y&&l)t:for(var d=e.target,f=o.view;d!=a;d=d.parentNode)for(var p=0;p=0&&ee(t,i.to())<=0)return r}return-1};var wn=function(t,e){this.anchor=t,this.head=e};function kn(t,e,r){var i=t&&t.options.selectionsMayTouch,n=e[r];e.sort((function(t,e){return ee(t.from(),e.from())})),r=U(e,n);for(var s=1;s0:l>=0){var c=se(a.from(),o.from()),u=ne(a.to(),o.to()),h=a.empty()?o.from()==o.head:a.from()==a.head;s<=r&&--r,e.splice(--s,2,new wn(h?u:c,h?c:u))}}return new Cn(e,r)}function En(t,e){return new Cn([new wn(t,e||t)],0)}function Tn(t){return t.text?te(t.from.line+t.text.length-1,Y(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Ln(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return Tn(e);var r=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=Tn(e).ch-e.to.ch),te(r,i)}function An(t,e){for(var r=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,v)}ar(t,"change",t,e)}function Mn(t,e,r){!function t(i,n,s){if(i.linked)for(var o=0;oa-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(s=function(t,e){return e?(jn(t.done),Y(t.done)):t.done.length&&!Y(t.done).ranges?Y(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Y(t.done)):void 0}(n,n.lastOp==i)))o=Y(s.changes),0==ee(e.from,e.to)&&0==ee(e.from,o.to)?o.to=Tn(e):s.changes.push(Bn(t,e));else{var l=Y(n.done);for(l&&l.ranges||Gn(t.sel,n.done),s={changes:[Bn(t,e)],generation:n.generation},n.done.push(s);n.done.length>n.undoDepth;)n.done.shift(),n.done[0].ranges||n.done.shift()}n.done.push(r),n.generation=++n.maxGeneration,n.lastModTime=n.lastSelTime=a,n.lastOp=n.lastSelOp=i,n.lastOrigin=n.lastSelOrigin=e.origin,o||pt(t,"historyAdded")}function Hn(t,e,r,i){var n=t.history,s=i&&i.origin;r==n.lastSelOp||s&&n.lastSelOrigin==s&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==s||function(t,e,r,i){var n=e.charAt(0);return"*"==n||"+"==n&&r.ranges.length==i.ranges.length&&r.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,s,Y(n.done),e))?n.done[n.done.length-1]=e:Gn(e,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=s,n.lastSelOp=r,i&&!1!==i.clearRedo&&jn(n.undone)}function Gn(t,e){var r=Y(e);r&&r.ranges&&r.equals(t)||e.push(t)}function zn(t,e,r,i){var n=e["spans_"+t.id],s=0;t.iter(Math.max(t.first,r),Math.min(t.first+t.size,i),(function(r){r.markedSpans&&((n||(n=e["spans_"+t.id]={}))[s]=r.markedSpans),++s}))}function Wn(t){if(!t)return null;for(var e,r=0;r-1&&(Y(a)[h]=c[h],delete c[h])}}}return i}function qn(t,e,r,i){if(i){var n=t.anchor;if(r){var s=ee(e,n)<0;s!=ee(r,n)<0?(n=e,e=r):s!=ee(e,r)<0&&(e=r)}return new wn(n,e)}return new wn(r||e,e)}function Yn(t,e,r,i,n){null==n&&(n=t.cm&&(t.cm.display.shift||t.extend)),Jn(t,new Cn([qn(t.sel.primary(),e,r,n)],0),i)}function Xn(t,e,r){for(var i=[],n=t.cm&&(t.cm.display.shift||t.extend),s=0;s=e.ch:a.to>e.ch))){if(n&&(pt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(s.markedSpans){--o;continue}break}if(!l.atomic)continue;if(r){var h=l.find(i<0?1:-1),d=void 0;if((i<0?u:c)&&(h=os(t,h,-i,h&&h.line==e.line?s:null)),h&&h.line==e.line&&(d=ee(h,r))&&(i<0?d<0:d>0))return ns(t,h,e,i,n)}var f=l.find(i<0?-1:1);return(i<0?c:u)&&(f=os(t,f,i,f.line==e.line?s:null)),f?ns(t,f,e,i,n):null}}return e}function ss(t,e,r,i,n){var s=i||1,o=ns(t,e,r,s,n)||!n&&ns(t,e,r,s,!0)||ns(t,e,r,-s,n)||!n&&ns(t,e,r,-s,!0);return o||(t.cantEdit=!0,te(t.first,0))}function os(t,e,r,i){return r<0&&0==e.ch?e.line>t.first?ae(t,te(e.line-1)):null:r>0&&e.ch==(i||Kt(t,e.line)).text.length?e.line0)){var u=[l,1],h=ee(c.from,a.from),d=ee(c.to,a.to);(h<0||!o.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(d>0||!o.inclusiveRight&&!d)&&u.push({from:a.to,to:c.to}),n.splice.apply(n,u),l+=u.length-3}}return n}(t,e.from,e.to);if(i)for(var n=i.length-1;n>=0;--n)us(t,{from:i[n].from,to:i[n].to,text:n?[""]:e.text,origin:e.origin});else us(t,e)}}function us(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var r=An(t,e);Un(t,e,r,t.cm?t.cm.curOp.id:NaN),fs(t,e,r,Te(t,e));var i=[];Mn(t,(function(t,r){r||-1!=U(i,t.history)||(vs(t.history,e),i.push(t.history)),fs(t,e,null,Te(t,e))}))}}function hs(t,e,r){var i=t.cm&&t.cm.state.suppressEdits;if(!i||r){for(var n,s=t.history,o=t.sel,a="undo"==e?s.done:s.undone,l="undo"==e?s.undone:s.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function ds(t,e){if(0!=e&&(t.first+=e,t.sel=new Cn(X(t.sel.ranges,(function(t){return new wn(te(t.anchor.line+e,t.anchor.ch),te(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){ui(t.cm,t.first,t.first-e,e);for(var r=t.cm.display,i=r.viewFrom;it.lastLine())){if(e.from.lines&&(e={from:e.from,to:te(s,Kt(t,s).text.length),text:[e.text[0]],origin:e.origin}),e.removed=qt(t,e.from,e.to),r||(r=An(t,e)),t.cm?function(t,e,r){var i=t.doc,n=t.display,s=e.from,o=e.to,a=!1,l=s.line;t.options.lineWrapping||(l=$t(Be(Kt(i,s.line))),i.iter(l,o.line+1,(function(t){if(t==n.maxLine)return a=!0,!0}))),i.sel.contains(e.from,e.to)>-1&&mt(t),In(i,e,r,oi(t)),t.options.lineWrapping||(i.iter(l,s.line+e.text.length,(function(t){var e=We(t);e>n.maxLineLength&&(n.maxLine=t,n.maxLineLength=e,n.maxLineChanged=!0,a=!1)})),a&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontierr;i--){var n=Kt(t,i).stateAfter;if(n&&(!(n instanceof ce)||i+n.lookAhead1||!(this.children[0]instanceof bs))){var a=[];this.collapse(a),this.children=[new bs(a)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var o=n.lines.length%25+25,a=o;a10);t.parent.maybeSpill()}},iterN:function(t,e,r){for(var i=0;i0||0==o&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=R("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(Fe(t,e.line,e,r,s)||e.line!=r.line&&Fe(t,r.line,e,r,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ce=!0}s.addToHistory&&Un(t,{from:e,to:r,origin:"markText"},t.sel,NaN);var a,l=e.line,c=t.cm;if(t.iter(l,r.line+1,(function(t){c&&s.collapsed&&!c.options.lineWrapping&&Be(t)==c.display.maxLine&&(a=!0),s.collapsed&&l!=e.line&&Xt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new we(s,l==e.line?e.ch:null,l==r.line?r.ch:null)),++l})),s.collapsed&&t.iter(e.line,r.line+1,(function(e){He(t,e)&&Xt(e,0)})),s.clearOnEnter&&ht(s,"beforeCursorEnter",(function(){return s.clear()})),s.readOnly&&(Se=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++ws,s.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),s.collapsed)ui(c,e.line,r.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var u=e.line;u<=r.line;u++)hi(c,u,"text");s.atomic&&rs(c.doc),ar(c,"markerAdded",c,s)}return s}ks.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Vi(t),vt(this,"clear")){var r=this.find();r&&ar(this,"clear",r.from,r.to)}for(var i=null,n=null,s=0;st.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&ui(t,i,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&rs(t.doc)),t&&ar(t,"markerCleared",t,this,i,n),e&&Ki(t),this.parent&&this.parent.clear()}},ks.prototype.find=function(t,e){var r,i;null==t&&"bookmark"==this.type&&(t=1);for(var n=0;n=0;l--)cs(this,i[l]);a?Qn(this,a):this.cm&&Ri(this.cm)})),undo:en((function(){hs(this,"undo")})),redo:en((function(){hs(this,"redo")})),undoSelection:en((function(){hs(this,"undo",!0)})),redoSelection:en((function(){hs(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,r=0,i=0;i=t.ch)&&e.push(n.marker.parent||n.marker)}return e},findMarks:function(t,e,r){t=ae(this,t),e=ae(this,e);var i=[],n=t.line;return this.iter(t.line,e.line+1,(function(s){var o=s.markedSpans;if(o)for(var a=0;a=l.to||null==l.from&&n!=t.line||null!=l.from&&n==e.line&&l.from>=e.ch||r&&!r(l.marker)||i.push(l.marker.parent||l.marker)}++n})),i},getAllMarks:function(){var t=[];return this.iter((function(e){var r=e.markedSpans;if(r)for(var i=0;it)return e=t,!0;t-=s,++r})),ae(this,te(r,e))},indexFromPos:function(t){var e=(t=ae(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),ts(e.doc,En(r,r)),d)for(var f=0;f=0;e--)ps(t.doc,"",i[e].from,i[e].to,"+delete");Ri(t)}))}function Zs(t,e,r){var i=nt(t.text,e+r,r);return i<0||i>t.text.length?null:i}function Qs(t,e,r){var i=Zs(t,e.ch,r);return null==i?null:new te(e.line,i,r<0?"after":"before")}function Js(t,e,r,i,n){if(t){"rtl"==e.doc.direction&&(n=-n);var s=ct(r,e.doc.direction);if(s){var o,a=n<0?Y(s):s[0],l=n<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var c=Or(e,r);o=n<0?r.text.length-1:0;var u=_r(e,c,o).top;o=st((function(t){return _r(e,c,t).top==u}),n<0==(1==a.level)?a.from:a.to-1,o),"before"==l&&(o=Zs(r,o,1))}else o=n<0?a.to:a.from;return new te(i,o,l)}}return new te(i,n<0?r.text.length:0,n<0?"before":"after")}Gs.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Gs.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Gs.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Gs.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Gs.default=y?Gs.macDefault:Gs.pcDefault;var to={selectAll:as,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),G)},killLine:function(t){return $s(t,(function(e){if(e.empty()){var r=Kt(t.doc,e.head.line).text.length;return e.head.ch==r&&e.head.line0)n=new te(n.line,n.ch+1),t.replaceRange(s.charAt(n.ch-1)+s.charAt(n.ch-2),te(n.line,n.ch-2),n,"+transpose");else if(n.line>t.doc.first){var o=Kt(t.doc,n.line-1).text;o&&(n=new te(n.line,1),t.replaceRange(s.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),te(n.line-1,o.length-1),n,"+transpose"))}r.push(new wn(n,n))}t.setSelections(r)}))},newlineAndIndent:function(t){return Qi(t,(function(){for(var e=t.listSelections(),r=e.length-1;r>=0;r--)t.replaceRange(t.doc.lineSeparator(),e[r].anchor,e[r].head,"+input");e=t.listSelections();for(var i=0;i-1&&(ee((n=c.ranges[n]).from(),e)<0||e.xRel>0)&&(ee(n.to(),e)>0||e.xRel<0)?function(t,e,r,i){var n=t.display,s=!1,c=Ji(t,(function(e){l&&(n.scroller.draggable=!1),t.state.draggingText=!1,ft(n.wrapper.ownerDocument,"mouseup",c),ft(n.wrapper.ownerDocument,"mousemove",u),ft(n.scroller,"dragstart",h),ft(n.scroller,"drop",c),s||(bt(e),i.addNew||Yn(t.doc,r,null,null,i.extend),l&&!d||o&&9==a?setTimeout((function(){n.wrapper.ownerDocument.body.focus({preventScroll:!0}),n.input.focus()}),20):n.input.focus())})),u=function(t){s=s||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return s=!0};l&&(n.scroller.draggable=!0),t.state.draggingText=c,c.copy=!i.moveOnDrag,n.scroller.dragDrop&&n.scroller.dragDrop(),ht(n.wrapper.ownerDocument,"mouseup",c),ht(n.wrapper.ownerDocument,"mousemove",u),ht(n.scroller,"dragstart",h),ht(n.scroller,"drop",c),Ci(t),setTimeout((function(){return n.input.focus()}),20)}(t,i,e,s):function(t,e,r,i){var n=t.display,s=t.doc;bt(e);var o,a,l=s.sel,c=l.ranges;if(i.addNew&&!i.extend?(a=s.sel.contains(r),o=a>-1?c[a]:new wn(r,r)):(o=s.sel.primary(),a=s.sel.primIndex),"rectangle"==i.unit)i.addNew||(o=new wn(r,r)),r=li(t,e,!0,!0),a=-1;else{var u=vo(t,r,i.unit);o=i.extend?qn(o,u.anchor,u.head,i.extend):u}i.addNew?-1==a?(a=c.length,Jn(s,kn(t,c.concat([o]),a),{scroll:!1,origin:"*mouse"})):c.length>1&&c[a].empty()&&"char"==i.unit&&!i.extend?(Jn(s,kn(t,c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),l=s.sel):$n(s,a,o,z):(a=0,Jn(s,new Cn([o],0),z),l=s.sel);var h=r;function d(e){if(0!=ee(h,e))if(h=e,"rectangle"==i.unit){for(var n=[],c=t.options.tabSize,u=B(Kt(s,r.line).text,r.ch,c),d=B(Kt(s,e.line).text,e.ch,c),f=Math.min(u,d),p=Math.max(u,d),g=Math.min(r.line,e.line),m=Math.min(t.lastLine(),Math.max(r.line,e.line));g<=m;g++){var v=Kt(s,g).text,y=V(v,f,c);f==p?n.push(new wn(te(g,y),te(g,y))):v.length>y&&n.push(new wn(te(g,y),te(g,V(v,p,c))))}n.length||n.push(new wn(r,r)),Jn(s,kn(t,l.ranges.slice(0,a).concat(n),a),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=o,S=vo(t,e,i.unit),C=x.anchor;ee(S.anchor,C)>0?(b=S.head,C=se(x.from(),S.anchor)):(b=S.anchor,C=ne(x.to(),S.head));var w=l.ranges.slice(0);w[a]=function(t,e){var r=e.anchor,i=e.head,n=Kt(t.doc,r.line);if(0==ee(r,i)&&r.sticky==i.sticky)return e;var s=ct(n);if(!s)return e;var o=at(s,r.ch,r.sticky),a=s[o];if(a.from!=r.ch&&a.to!=r.ch)return e;var l,c=o+(a.from==r.ch==(1!=a.level)?0:1);if(0==c||c==s.length)return e;if(i.line!=r.line)l=(i.line-r.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=at(s,i.ch,i.sticky),h=u-o||(i.ch-r.ch)*(1==a.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=s[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,g=f?"after":"before";return r.ch==p&&r.sticky==g?e:new wn(new te(r.line,p,g),i)}(t,new wn(ae(s,C),b)),Jn(s,kn(t,w,a),z)}}var f=n.wrapper.getBoundingClientRect(),p=0;function g(e){t.state.selectingText=!1,p=1/0,e&&(bt(e),n.input.focus()),ft(n.wrapper.ownerDocument,"mousemove",m),ft(n.wrapper.ownerDocument,"mouseup",v),s.history.lastSelOrigin=null}var m=Ji(t,(function(e){0!==e.buttons&&kt(e)?function e(r){var o=++p,a=li(t,r,!0,"rectangle"==i.unit);if(a)if(0!=ee(a,h)){t.curOp.focus=_(),d(a);var l=Li(n,s);(a.line>=l.to||a.linef.bottom?20:0;c&&setTimeout(Ji(t,(function(){p==o&&(n.scroller.scrollTop+=c,e(r))})),50)}}(e):g(e)})),v=Ji(t,g);t.state.selectingText=v,ht(n.wrapper.ownerDocument,"mousemove",m),ht(n.wrapper.ownerDocument,"mouseup",v)}(t,i,e,s)}(e,i,s,t):wt(t)==r.scroller&&bt(t):2==n?(i&&Yn(e.doc,i),setTimeout((function(){return r.input.focus()}),20)):3==n&&(w?e.display.input.onContextMenu(t):Ci(e)))}}function vo(t,e,r){if("char"==r)return new wn(e,e);if("word"==r)return t.findWordAt(e);if("line"==r)return new wn(te(e.line,0),ae(t.doc,te(e.line+1,0)));var i=r(t,e);return new wn(i.from,i.to)}function yo(t,e,r,i){var n,s;if(e.touches)n=e.touches[0].clientX,s=e.touches[0].clientY;else try{n=e.clientX,s=e.clientY}catch(t){return!1}if(n>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&bt(e);var o=t.display,a=o.lineDiv.getBoundingClientRect();if(s>a.bottom||!vt(t,r))return St(e);s-=a.top-o.viewOffset;for(var l=0;l=n)return pt(t,r,t,Zt(t.doc,s),t.display.gutterSpecs[l].className,e),St(e)}}function bo(t,e){return yo(t,e,"gutterClick",!0)}function xo(t,e){Sr(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&yo(t,e,"gutterContextMenu",!1)}(t,e)||gt(t,e,"contextmenu")||w||t.display.input.onContextMenu(e)}function So(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),jr(t)}go.prototype.compare=function(t,e,r){return this.time+400>t&&0==ee(e,this.pos)&&r==this.button};var Co={toString:function(){return"CodeMirror.Init"}},wo={},ko={};function Eo(t,e,r){if(!e!=!(r&&r!=Co)){var i=t.display.dragFunctions,n=e?ht:ft;n(t.display.scroller,"dragstart",i.start),n(t.display.scroller,"dragenter",i.enter),n(t.display.scroller,"dragover",i.over),n(t.display.scroller,"dragleave",i.leave),n(t.display.scroller,"drop",i.drop)}}function To(t){t.options.lineWrapping?(I(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(T(t.display.wrapper,"CodeMirror-wrap"),Ve(t)),ai(t),ui(t),jr(t),setTimeout((function(){return Ui(t)}),100)}function Lo(t,e){var r=this;if(!(this instanceof Lo))return new Lo(t,e);this.options=e=e?F(e):{},F(wo,e,!1);var i=e.value;"string"==typeof i?i=new Rs(i,e.mode,null,e.lineSeparator,e.direction):e.mode&&(i.modeOption=e.mode),this.doc=i;var n=new Lo.inputStyles[e.inputStyle](this),s=this.display=new mn(t,i,n,e);for(var c in s.wrapper.CodeMirror=this,So(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),zi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new j,keySeq:null,specialChars:null},e.autofocus&&!v&&s.input.focus(),o&&a<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",Ji(t,mo)),ht(e.scroller,"dblclick",o&&a<11?Ji(t,(function(e){if(!gt(t,e)){var r=li(t,e);if(r&&!bo(t,e)&&!Sr(t.display,e)){bt(e);var i=t.findWordAt(r);Yn(t.doc,i.anchor,i.head)}}})):function(e){return gt(t,e)||bt(e)}),ht(e.scroller,"contextmenu",(function(e){return xo(t,e)})),ht(e.input.getField(),"contextmenu",(function(r){e.scroller.contains(r.target)||xo(t,r)}));var r,i={end:0};function n(){e.activeTouch&&(r=setTimeout((function(){return e.activeTouch=null}),1e3),(i=e.activeTouch).end=+new Date)}function s(t,e){if(null==e.left)return!0;var r=e.left-t.left,i=e.top-t.top;return r*r+i*i>400}ht(e.scroller,"touchstart",(function(n){if(!gt(t,n)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(n)&&!bo(t,n)){e.input.ensurePolled(),clearTimeout(r);var s=+new Date;e.activeTouch={start:s,moved:!1,prev:s-i.end<=300?i:null},1==n.touches.length&&(e.activeTouch.left=n.touches[0].pageX,e.activeTouch.top=n.touches[0].pageY)}})),ht(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ht(e.scroller,"touchend",(function(r){var i=e.activeTouch;if(i&&!Sr(e,r)&&null!=i.left&&!i.moved&&new Date-i.start<300){var o,a=t.coordsChar(e.activeTouch,"page");o=!i.prev||s(i,i.prev)?new wn(a,a):!i.prev.prev||s(i,i.prev.prev)?t.findWordAt(a):new wn(te(a.line,0),ae(t.doc,te(a.line+1,0))),t.setSelection(o.anchor,o.head),t.focus(),bt(r)}n()})),ht(e.scroller,"touchcancel",n),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Mi(t,e.scroller.scrollTop),Ni(t,e.scroller.scrollLeft,!0),pt(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return Sn(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return Sn(t,e)})),ht(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){gt(t,e)||Ct(e)},over:function(e){gt(t,e)||(function(t,e){var r=li(t,e);if(r){var i=document.createDocumentFragment();vi(t,r,i),t.display.dragCursor||(t.display.dragCursor=D("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),A(t.display.dragCursor,i)}}(t,e),Ct(e))},start:function(e){return function(t,e){if(o&&(!t.state.draggingText||+new Date-Os<100))Ct(e);else if(!gt(t,e)&&!Sr(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var r=D("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(r.width=r.height=1,t.display.wrapper.appendChild(r),r._top=r.offsetTop),e.dataTransfer.setDragImage(r,0,0),h&&r.parentNode.removeChild(r)}}(t,e)},drop:Ji(t,_s),leave:function(e){gt(t,e)||Is(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return uo.call(t,e)})),ht(l,"keydown",Ji(t,co)),ht(l,"keypress",Ji(t,ho)),ht(l,"focus",(function(e){return wi(t,e)})),ht(l,"blur",(function(e){return ki(t,e)}))}(this),Ns(),Vi(this),this.curOp.forceUpdate=!0,Pn(this,i),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&wi(r)}),20):ki(this),ko)ko.hasOwnProperty(c)&&ko[c](this,e[c],Co);dn(this),e.finishInit&&e.finishInit(this);for(var u=0;u150)){if(!i)return;r="prev"}}else c=0,r="not";"prev"==r?c=e>s.first?B(Kt(s,e-1).text,null,o):0:"add"==r?c=l+t.options.indentUnit:"subtract"==r?c=l-t.options.indentUnit:"number"==typeof r&&(c=l+r),c=Math.max(0,c);var h="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/o);f;--f)d+=o,h+="\t";if(do,l=Ot(e),c=null;if(a&&i.ranges.length>1)if(Ro&&Ro.text.join("\n")==e){if(i.ranges.length%Ro.text.length==0){c=[];for(var u=0;u=0;d--){var f=i.ranges[d],p=f.from(),g=f.to();f.empty()&&(r&&r>0?p=te(p.line,p.ch-r):t.state.overwrite&&!a?g=te(g.line,Math.min(Kt(s,g.line).text.length,g.ch+Y(l).length)):a&&Ro&&Ro.lineWise&&Ro.text.join("\n")==l.join("\n")&&(p=g=te(p.line,0)));var m={from:p,to:g,text:c?c[d%c.length]:l,origin:n||(a?"paste":t.state.cutIncoming>o?"cut":"+input")};cs(t.doc,m),ar(t,"inputRead",t,m)}e&&!a&&Mo(t,e),Ri(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Io(t,e){var r=t.clipboardData&&t.clipboardData.getData("Text");if(r)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Qi(e,(function(){return _o(e,r,0,null,"paste")})),!0}function Mo(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var r=t.doc.sel,i=r.ranges.length-1;i>=0;i--){var n=r.ranges[i];if(!(n.head.ch>100||i&&r.ranges[i-1].head.line==n.head.line)){var s=t.getModeAt(n.head),o=!1;if(s.electricChars){for(var a=0;a-1){o=Do(t,n.head.line,"smart");break}}else s.electricInput&&s.electricInput.test(Kt(t.doc,n.head.line).text.slice(0,n.head.ch))&&(o=Do(t,n.head.line,"smart"));o&&ar(t,"electricInput",t,n.head.line)}}}function Po(t){for(var e=[],r=[],i=0;i0?0:-1));o=isNaN(u)?null:new te(e.line,Math.max(0,Math.min(a.text.length,e.ch+r*(u>=55296&&u<56320?2:1))),-r)}else o=n?function(t,e,r,i){var n=ct(e,t.doc.direction);if(!n)return Qs(e,r,i);r.ch>=e.text.length?(r.ch=e.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var s=at(n,r.ch,r.sticky),o=n[s];if("ltr"==t.doc.direction&&o.level%2==0&&(i>0?o.to>r.ch:o.from=o.from&&d>=u.begin)){var f=h?"before":"after";return new te(r.line,d,f)}}var p=function(t,e,i){for(var s=function(t,e){return e?new te(r.line,l(t,1),"before"):new te(r.line,t,"after")};t>=0&&t0==(1!=o.level),c=a?i.begin:l(i.end,-1);if(o.from<=c&&c0?u.end:l(u.begin,-1);return null==m||i>0&&m==e.text.length||!(g=p(i>0?0:n.length-1,i,c(m)))?null:g}(t.cm,a,e,r):Qs(a,e,r);if(null==o){if(s||(c=e.line+l)=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(a=Kt(t,c))))return!1;e=Js(n,t.cm,a,e.line,l)}else e=o;return!0}if("char"==i||"codepoint"==i)c();else if("column"==i)c(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(r<0)||c(!f);f=!1){var p=a.text.charAt(e.ch)||"\n",g=tt(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){r<0&&(r=1,c(),e.sticky="after");break}if(g&&(u=g),r>0&&!c(!f))break}var m=ss(t,e,s,o,!0);return re(s,m)&&(m.hitSide=!0),m}function jo(t,e,r,i){var n,s,o=t.doc,a=e.left;if("page"==i){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ri(t.display),3);n=(r>0?e.bottom:e.top)+r*c}else"line"==i&&(n=r>0?e.bottom+3:e.top-3);for(;(s=Xr(t,a,n)).outside;){if(r<0?n<=0:n>=o.height){s.hitSide=!0;break}n+=5*r}return s}var Uo=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new j,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ho(t,e){var r=Rr(t,e.line);if(!r||r.hidden)return null;var i=Kt(t.doc,e.line),n=Ar(r,i,e.line),s=ct(i,t.doc.direction),o="left";s&&(o=at(s,e.ch)%2?"right":"left");var a=Pr(n.map,e.ch,o);return a.offset="right"==a.collapse?a.end:a.start,a}function Go(t,e){return e&&(t.bad=!0),t}function zo(t,e,r){var i;if(e==t.display.lineDiv){if(!(i=t.display.lineDiv.childNodes[r]))return Go(t.clipPos(te(t.display.viewTo-1)),!0);e=null,r=0}else for(i=e;;i=i.parentNode){if(!i||i==t.display.lineDiv)return null;if(i.parentNode&&i.parentNode==t.display.lineDiv)break}for(var n=0;n=e.display.viewTo||s.line=e.display.viewFrom&&Ho(e,n)||{node:l[0].measure.map[2],offset:0},u=s.linei.firstLine()&&(o=te(o.line-1,Kt(i.doc,o.line-1).length)),a.ch==Kt(i.doc,a.line).text.length&&a.linen.viewTo-1)return!1;o.line==n.viewFrom||0==(t=ci(i,o.line))?(e=$t(n.view[0].line),r=n.view[0].node):(e=$t(n.view[t].line),r=n.view[t-1].node.nextSibling);var l,c,u=ci(i,a.line);if(u==n.view.length-1?(l=n.viewTo-1,c=n.lineDiv.lastChild):(l=$t(n.view[u+1].line)-1,c=n.view[u+1].node.previousSibling),!r)return!1;for(var h=i.doc.splitLines(function(t,e,r,i,n){var s="",o=!1,a=t.doc.lineSeparator(),l=!1;function c(){o&&(s+=a,l&&(s+=a),o=l=!1)}function u(t){t&&(c(),s+=t)}function h(e){if(1==e.nodeType){var r=e.getAttribute("cm-text");if(r)return void u(r);var s,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(te(i,0),te(n+1,0),(m=+d,function(t){return t.id==m}));return void(f.length&&(s=f[0].find(0))&&u(qt(t.doc,s.from,s.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&c();for(var g=0;g1&&d.length>1;)if(Y(h)==Y(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),e++}for(var f=0,p=0,g=h[0],m=d[0],v=Math.min(g.length,m.length);fo.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var S=te(e,f),C=te(l,d.length?Y(d).length-p:0);return h.length>1||h[0]||ee(S,C)?(ps(i.doc,h,S,C,"+input"),!0):void 0},Uo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Uo.prototype.reset=function(){this.forceCompositionEnd()},Uo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Uo.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Uo.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Qi(this.cm,(function(){return ui(t.cm)}))},Uo.prototype.setUneditable=function(t){t.contentEditable="false"},Uo.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Ji(this.cm,_o)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Uo.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Uo.prototype.onContextMenu=function(){},Uo.prototype.resetPosition=function(){},Uo.prototype.needsContentAttribute=!0;var Vo=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new j,this.hasSelection=!1,this.composing=null};Vo.prototype.init=function(t){var e=this,r=this,i=this.cm;this.createField(t);var n=this.textarea;function s(t){if(!gt(i,t)){if(i.somethingSelected())Oo({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=Po(i);Oo({lineWise:!0,text:e.text}),"cut"==t.type?i.setSelections(e.ranges,null,G):(r.prevInput="",n.value=e.text.join("\n"),P(n))}"cut"==t.type&&(i.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(n.style.width="0px"),ht(n,"input",(function(){o&&a>=9&&e.hasSelection&&(e.hasSelection=null),r.poll()})),ht(n,"paste",(function(t){gt(i,t)||Io(t,i)||(i.state.pasteIncoming=+new Date,r.fastPoll())})),ht(n,"cut",s),ht(n,"copy",s),ht(t.scroller,"paste",(function(e){if(!Sr(t,e)&&!gt(i,e)){if(!n.dispatchEvent)return i.state.pasteIncoming=+new Date,void r.focus();var s=new Event("paste");s.clipboardData=e.clipboardData,n.dispatchEvent(s)}})),ht(t.lineSpace,"selectstart",(function(e){Sr(t,e)||bt(e)})),ht(n,"compositionstart",(function(){var t=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}})),ht(n,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},Vo.prototype.createField=function(t){this.wrapper=Fo(),this.textarea=this.wrapper.firstChild},Vo.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Vo.prototype.prepareSelection=function(){var t=this.cm,e=t.display,r=t.doc,i=mi(t);if(t.options.moveInputWithCursor){var n=Kr(t,r.sel.primary().head,"div"),s=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,n.top+o.top-s.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,n.left+o.left-s.left))}return i},Vo.prototype.showSelection=function(t){var e=this.cm.display;A(e.cursorDiv,t.cursors),A(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Vo.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var r=e.getSelection();this.textarea.value=r,e.state.focused&&P(this.textarea),o&&a>=9&&(this.hasSelection=r)}else t||(this.prevInput=this.textarea.value="",o&&a>=9&&(this.hasSelection=null))}},Vo.prototype.getField=function(){return this.textarea},Vo.prototype.supportsTouch=function(){return!1},Vo.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||_()!=this.textarea))try{this.textarea.focus()}catch(t){}},Vo.prototype.blur=function(){this.textarea.blur()},Vo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Vo.prototype.receivedFocus=function(){this.slowPoll()},Vo.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Vo.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function r(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,r))}))},Vo.prototype.poll=function(){var t=this,e=this.cm,r=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||_t(r)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var n=r.value;if(n==i&&!e.somethingSelected())return!1;if(o&&a>=9&&this.hasSelection===n||y&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var s=n.charCodeAt(0);if(8203!=s||i||(i="​"),8666==s)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(i.length,n.length);l1e3||n.indexOf("\n")>-1?r.value=t.prevInput="":t.prevInput=n,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Vo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Vo.prototype.onKeyPress=function(){o&&a>=9&&(this.hasSelection=null),this.fastPoll()},Vo.prototype.onContextMenu=function(t){var e=this,r=e.cm,i=r.display,n=e.textarea;e.contextMenuPending&&e.contextMenuPending();var s=li(r,t),c=i.scroller.scrollTop;if(s&&!h){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(s)&&Ji(r,Jn)(r.doc,En(s),G);var u,d=n.style.cssText,f=e.wrapper.style.cssText,p=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",n.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-p.top-5)+"px; left: "+(t.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),i.input.focus(),l&&window.scrollTo(null,u),i.input.reset(),r.somethingSelected()||(n.value=e.prevInput=" "),e.contextMenuPending=v,i.selForContextMenu=r.doc.sel,clearTimeout(i.detectingSelectAll),o&&a>=9&&m(),w){Ct(t);var g=function(){ft(window,"mouseup",g),setTimeout(v,20)};ht(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=n.selectionStart){var t=r.somethingSelected(),s="​"+(t?n.value:"");n.value="⇚",n.value=s,e.prevInput=t?"":"​",n.selectionStart=1,n.selectionEnd=s.length,i.selForContextMenu=r.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,n.style.cssText=d,o&&a<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=n.selectionStart)){(!o||o&&a<9)&&m();var t=0,s=function(){i.selForContextMenu==r.doc.sel&&0==n.selectionStart&&n.selectionEnd>0&&"​"==e.prevInput?Ji(r,as)(r):t++<10?i.detectingSelectAll=setTimeout(s,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(s,200)}}},Vo.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Vo.prototype.setUneditable=function(){},Vo.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function r(r,i,n,s){t.defaults[r]=i,n&&(e[r]=s?function(t,e,r){r!=Co&&n(t,e,r)}:n)}t.defineOption=r,t.Init=Co,r("value","",(function(t,e){return t.setValue(e)}),!0),r("mode",null,(function(t,e){t.doc.modeOption=e,Rn(t)}),!0),r("indentUnit",2,Rn,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(t){On(t),jr(t),ui(t)}),!0),r("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var r=[],i=t.doc.first;t.doc.iter((function(t){for(var n=0;;){var s=t.text.indexOf(e,n);if(-1==s)break;n=s+e.length,r.push(te(i,s))}i++}));for(var n=r.length-1;n>=0;n--)ps(t.doc,e,r[n],te(r[n].line,r[n].ch+e.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,r){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),r!=Co&&t.refresh()})),r("specialCharPlaceholder",Qe,(function(t){return t.refresh()}),!0),r("electricChars",!0),r("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),r("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),r("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),r("rtlMoveVisually",!x),r("wholeLineUpdateBefore",!0),r("theme","default",(function(t){So(t),gn(t)}),!0),r("keyMap","default",(function(t,e,r){var i=Xs(e),n=r!=Co&&Xs(r);n&&n.detach&&n.detach(t,i),i.attach&&i.attach(t,n||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,To,!0),r("gutters",[],(function(t,e){t.display.gutterSpecs=fn(e,t.options.lineNumbers),gn(t)}),!0),r("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?si(t.display)+"px":"0",t.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(t){return Ui(t)}),!0),r("scrollbarStyle","native",(function(t){zi(t),Ui(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=fn(t.options.gutters,e),gn(t)}),!0),r("firstLineNumber",1,gn,!0),r("lineNumberFormatter",(function(t){return t}),gn,!0),r("showCursorWhenSelecting",!1,gi,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(t,e){"nocursor"==e&&(ki(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),r("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),r("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),r("dragDrop",!0,Eo),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,gi,!0),r("singleCursorHeightPerLine",!0,gi,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,On,!0),r("addModeClass",!1,On,!0),r("pollInterval",100),r("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),r("historyEventDelay",1250),r("viewportMargin",10,(function(t){return t.refresh()}),!0),r("maxHighlightLength",1e4,On,!0),r("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),r("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),r("autofocus",null),r("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),r("phrases",null)}(Lo),function(t){var e=t.optionHandlers,r=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,r){var i=this.options,n=i[t];i[t]==r&&"mode"!=t||(i[t]=r,e.hasOwnProperty(t)&&Ji(this,e[t])(this,r,n),pt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Xs(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,r=0;rr&&(Do(this,n.head.line,t,!0),r=n.head.line,i==this.doc.sel.primIndex&&Ri(this));else{var s=n.from(),o=n.to(),a=Math.max(r,s.line);r=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=a;l0&&$n(this.doc,i,new wn(s,c[i].to()),G)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,te(t),e,!0)},getTokenTypeAt:function(t){t=ae(this.doc,t);var e,r=de(this,Kt(this.doc,t.line)),i=0,n=(r.length-1)/2,s=t.ch;if(0==s)e=r[2];else for(;;){var o=i+n>>1;if((o?r[2*o-1]:0)>=s)n=o;else{if(!(r[2*o+1]s&&(t=s,n=!0),i=Kt(this.doc,t)}else i=t;return zr(this,i,{top:0,left:0},e||"page",r||n).top+(n?this.doc.height-ze(i):0)},defaultTextHeight:function(){return ri(this.display)},defaultCharWidth:function(){return ii(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,r,i,n){var s,o,a,l=this.display,c=(t=Kr(this,ae(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==i)c=t.top;else if("above"==i||"near"==i){var h=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>h)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=h&&(c=t.bottom),u+e.offsetWidth>d&&(u=d-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==n?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==n?u=0:"middle"==n&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),r&&(s=this,o={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(a=Ai(s,o)).scrollTop&&Mi(s,a.scrollTop),null!=a.scrollLeft&&Ni(s,a.scrollLeft))},triggerOnKeyDown:tn(co),triggerOnKeyPress:tn(ho),triggerOnKeyUp:uo,triggerOnMouseDown:tn(mo),execCommand:function(t){if(to.hasOwnProperty(t))return to[t].call(null,this)},triggerElectric:tn((function(t){Mo(this,t)})),findPosH:function(t,e,r,i){var n=1;e<0&&(n=-1,e=-e);for(var s=ae(this.doc,t),o=0;o0&&o(e.charAt(r-1));)--r;for(;i.5||this.options.lineWrapping)&&ai(this),pt(this,"refresh",this)})),swapDoc:tn((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Pn(this,t),jr(this),this.display.input.reset(),Oi(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ar(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(t),t.registerHelper=function(e,i,n){r.hasOwnProperty(e)||(r[e]=t[e]={_global:[]}),r[e][i]=n},t.registerGlobalHelper=function(e,i,n,s){t.registerHelper(e,i,s),r[e]._global.push({pred:n,val:s})}}(Lo);var Ko="iter insert remove copy getEditor constructor".split(" ");for(var qo in Rs.prototype)Rs.prototype.hasOwnProperty(qo)&&U(Ko,qo)<0&&(Lo.prototype[qo]=function(t){return function(){return t.apply(this.doc,arguments)}}(Rs.prototype[qo]));return yt(Rs),Lo.inputStyles={textarea:Vo,contenteditable:Uo},Lo.defineMode=function(t){Lo.defaults.mode||"null"==t||(Lo.defaults.mode=t),Ft.apply(this,arguments)},Lo.defineMIME=function(t,e){Nt[t]=e},Lo.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Lo.defineMIME("text/plain","null"),Lo.defineExtension=function(t,e){Lo.prototype[t]=e},Lo.defineDocExtension=function(t,e){Rs.prototype[t]=e},Lo.fromTextArea=function(t,e){if((e=e?F(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var r=_();e.autofocus=r==t||null!=t.getAttribute("autofocus")&&r==document.body}function i(){t.value=a.getValue()}var n;if(t.form&&(ht(t.form,"submit",i),!e.leaveSubmitMethodAlone)){var s=t.form;n=s.submit;try{var o=s.submit=function(){i(),s.submit=n,s.submit(),s.submit=o}}catch(t){}}e.finishInit=function(r){r.save=i,r.getTextArea=function(){return t},r.toTextArea=function(){r.toTextArea=isNaN,i(),t.parentNode.removeChild(r.getWrapperElement()),t.style.display="",t.form&&(ft(t.form,"submit",i),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=n))}},t.style.display="none";var a=Lo((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return a},function(t){t.off=ft,t.on=ht,t.wheelEventPixels=xn,t.Doc=Rs,t.splitLines=Ot,t.countColumn=B,t.findColumn=V,t.isWordChar=J,t.Pass=H,t.signal=pt,t.Line=Ke,t.changeEnd=Tn,t.scrollbarModel=Gi,t.Pos=te,t.cmpPos=ee,t.modes=Pt,t.mimeModes=Nt,t.resolveMode=Bt,t.getMode=jt,t.modeExtensions=Ut,t.extendMode=Ht,t.copyState=Gt,t.startState=Wt,t.innerMode=zt,t.commands=to,t.keyMap=Gs,t.keyName=Ys,t.isModifierKey=Ks,t.lookupKey=Vs,t.normalizeKeyMap=Ws,t.StringStream=Vt,t.SharedTextMarker=Ts,t.TextMarker=ks,t.LineWidget=Ss,t.e_preventDefault=bt,t.e_stopPropagation=xt,t.e_stop=Ct,t.addClass=I,t.contains=O,t.rmClass=T,t.keyNames=Bs}(Lo),Lo.version="5.58.2",Lo}()},Y1PL: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,i=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),s=/Edge\/(\d+)/.exec(t),o=r||n||s,a=o&&(r?document.documentMode||6:+(s||n)[1]),l=!s&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!s&&/Chrome\//.test(t),h=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),g=!s&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),m=/Android/.test(t),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=g||/Mac/.test(e),b=/\bCrOS\b/.test(t),x=/win/i.test(e),S=h&&t.match(/Version\/(\d*\.\d*)/);S&&(S=Number(S[1])),S&&S>=15&&(h=!1,l=!0);var C=y&&(c||h&&(null==S||S<12.11)),w=i||o&&a>=9;function k(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var E,T=function(t,e){var i=t.className,r=k(e).exec(i);if(r){var n=i.slice(r.index+r[0].length);t.className=i.slice(0,r.index)+(n?r[1]+n:"")}};function L(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function A(t,e){return L(t).appendChild(e)}function D(t,e,i,r){var n=document.createElement(t);if(i&&(n.className=i),r&&(n.style.cssText=r),"string"==typeof e)n.appendChild(document.createTextNode(e));else if(e)for(var s=0;s=e)return o+(e-s);o+=a-s,o+=i-o%i,s=a+1}}g?P=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(P=function(t){try{t.select()}catch(t){}});var j=function(){this.id=null,this.f=null,this.time=0,this.handler=N(this.onTimeout,this)};function U(t,e){for(var i=0;i=e)return r+Math.min(o,e-n);if(n+=s-r,r=s+1,(n+=i-n%i)>=e)return r}}var K=[""];function q(t){for(;K.length<=t;)K.push(Y(K)+" ");return K[t]}function Y(t){return t[t.length-1]}function X(t,e){for(var i=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||Q.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&J(t))||e.test(t):J(t)}function et(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var it=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function rt(t){return t.charCodeAt(0)>=768&&it.test(t)}function nt(t,e,i){for(;(i<0?e>0:ei?-1:1;;){if(e==i)return e;var n=(e+i)/2,s=r<0?Math.ceil(n):Math.floor(n);if(s==e)return t(s)?e:i;t(s)?i=s:e=s+r}}var ot=null;function at(t,e,i){var r;ot=null;for(var n=0;ne)return n;s.to==e&&(s.from!=s.to&&"before"==i?r=n:ot=n),s.from==e&&(s.from!=s.to&&"before"!=i?r=n:ot=n)}return null!=r?r:ot}var lt=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,i=/[LRr]/,r=/[Lb1n]/,n=/[1n]/;function s(t,e,i){this.level=t,this.from=e,this.to=i}return function(o,a){var l="ltr"==a?"L":"R";if(0==o.length||"ltr"==a&&!t.test(o))return!1;for(var c,u=o.length,h=[],d=0;d-1&&(r[e]=n.slice(0,s).concat(n.slice(s+1)))}}}function pt(t,e){var i=dt(t,e);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){ft(this,t,e)}}function bt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function xt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function St(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ct(t){bt(t),xt(t)}function wt(t){return t.target||t.srcElement}function kt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var Et,Tt,Lt=function(){if(o&&a<9)return!1;var t=D("div");return"draggable"in t||"dragDrop"in t}();function At(t){if(null==Et){var e=D("span","​");A(t,D("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Et=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&a<8))}var i=Et?D("span","​"):D("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Dt(t){if(null!=Tt)return Tt;var e=A(t,document.createTextNode("AخA")),i=E(e,0,1).getBoundingClientRect(),r=E(e,1,2).getBoundingClientRect();return L(t),!(!i||i.left==i.right)&&(Tt=r.right-i.right<3)}var Rt,Ot=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,i=[],r=t.length;e<=r;){var n=t.indexOf("\n",e);-1==n&&(n=t.length);var s=t.slice(e,"\r"==t.charAt(n-1)?n-1:n),o=s.indexOf("\r");-1!=o?(i.push(s.slice(0,o)),e+=o+1):(i.push(s),e=n+1)}return i}:function(t){return t.split(/\r\n?|\n/)},_t=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},It="oncopy"in(Rt=D("div"))||(Rt.setAttribute("oncopy","return;"),"function"==typeof Rt.oncopy),Mt=null,Pt={},Nt={};function Ft(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Pt[t]=e}function Bt(t){if("string"==typeof t&&Nt.hasOwnProperty(t))t=Nt[t];else if(t&&"string"==typeof t.name&&Nt.hasOwnProperty(t.name)){var e=Nt[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Bt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Bt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function jt(t,e){e=Bt(e);var i=Pt[e.name];if(!i)return jt(t,"text/plain");var r=i(t,e);if(Ut.hasOwnProperty(e.name)){var n=Ut[e.name];for(var s in n)n.hasOwnProperty(s)&&(r.hasOwnProperty(s)&&(r["_"+s]=r[s]),r[s]=n[s])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)r[o]=e.modeProps[o];return r}var Ut={};function Ht(t,e){F(e,Ut.hasOwnProperty(t)?Ut[t]:Ut[t]={})}function Gt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var i={};for(var r in e){var n=e[r];n instanceof Array&&(n=n.concat([])),i[r]=n}return i}function zt(t,e){for(var i;t.innerMode&&(i=t.innerMode(e))&&i.mode!=t;)e=i.state,t=i.mode;return i||{mode:t,state:e}}function Wt(t,e,i){return!t.startState||t.startState(e,i)}var Vt=function(t,e,i){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};function Kt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var i=t;!i.lines;)for(var r=0;;++r){var n=i.children[r],s=n.chunkSize();if(e=t.first&&ei?te(i,Kt(t,i).text.length):function(t,e){var i=t.ch;return null==i||i>e?te(t.line,e):i<0?te(t.line,0):t}(e,Kt(t,e.line).text.length)}function le(t,e){for(var i=[],r=0;r=this.string.length},Vt.prototype.sol=function(){return this.pos==this.lineStart},Vt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vt.prototype.next=function(){if(this.pose},Vt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Vt.prototype.skipToEnd=function(){this.pos=this.string.length},Vt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Vt.prototype.backUp=function(t){this.pos-=t},Vt.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var n=function(t){return i?t.toLowerCase():t};if(n(this.string.substr(this.pos,t.length))==n(t))return!1!==e&&(this.pos+=t.length),!0},Vt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Vt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Vt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ce=function(t,e){this.state=t,this.lookAhead=e},ue=function(t,e,i,r){this.state=e,this.doc=t,this.line=i,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function he(t,e,i,r){var n=[t.state.modeGen],s={};xe(t,e.text,t.doc.mode,i,(function(t,e){return n.push(t,e)}),s,r);for(var o=i.state,a=function(r){i.baseTokens=n;var a=t.state.overlays[r],l=1,c=0;i.state=!0,xe(t,e.text,a.mode,i,(function(t,e){for(var i=l;ct&&n.splice(l,1,t,n[l+1],r),l+=2,c=Math.min(t,r)}if(e)if(a.opaque)n.splice(i,l-i,t,"overlay "+e),l=i+2;else for(;it.options.maxHighlightLength&&Gt(t.doc.mode,r.state),s=he(t,e,r);n&&(r.state=n),e.stateAfter=r.save(!n),e.styles=s.styles,s.classes?e.styleClasses=s.classes:e.styleClasses&&(e.styleClasses=null),i===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function fe(t,e,i){var r=t.doc,n=t.display;if(!r.mode.startState)return new ue(r,!0,e);var s=function(t,e,i){for(var r,n,s=t.doc,o=i?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>o;--a){if(a<=s.first)return s.first;var l=Kt(s,a-1),c=l.stateAfter;if(c&&(!i||a+(c instanceof ce?c.lookAhead:0)<=s.modeFrontier))return a;var u=B(l.text,null,t.options.tabSize);(null==n||r>u)&&(n=a-1,r=u)}return n}(t,e,i),o=s>r.first&&Kt(r,s-1).stateAfter,a=o?ue.fromSaved(r,o,s):new ue(r,Wt(r.mode),s);return r.iter(s,e,(function(i){pe(t,i.text,a);var r=a.line;i.stateAfter=r==e-1||r%5==0||r>=n.viewFrom&&re.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}ue.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ue.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(t,e,i){return e instanceof ce?new ue(t,Gt(t.mode,e.state),i,e.lookAhead):new ue(t,Gt(t.mode,e),i)},ue.prototype.save=function(t){var e=!1!==t?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(e,this.maxLookAhead):e};var ve=function(t,e,i){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=i};function ye(t,e,i,r){var n,s,o=t.doc,a=o.mode,l=Kt(o,(e=ae(o,e)).line),c=fe(t,e.line,i),u=new Vt(l.text,t.options.tabSize,c);for(r&&(s=[]);(r||u.post.options.maxHighlightLength?(a=!1,o&&pe(t,e,r,h.pos),h.pos=e.length,l=null):l=be(me(i,h,r.state,d),s),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;c=e:s.to>e);(r||(r=[])).push(new we(o,s.from,a?null:s.to))}}return r}(i,n,o),l=function(t,e,i){var r;if(t)for(var n=0;n=e:s.to>e)||s.from==e&&"bookmark"==o.type&&(!i||s.marker.insertLeft)){var a=null==s.from||(o.inclusiveLeft?s.from<=e:s.from0&&a)for(var b=0;be)&&(!i||_e(i,s.marker)<0)&&(i=s.marker)}return i}function Fe(t,e,i,r,n){var s=Kt(t,e),o=Ce&&s.markedSpans;if(o)for(var a=0;a=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&n.inclusiveLeft?ee(c.to,i)>=0:ee(c.to,i)>0)||u>=0&&(l.marker.inclusiveRight&&n.inclusiveLeft?ee(c.from,r)<=0:ee(c.from,r)<0)))return!0}}}function Be(t){for(var e;e=Me(t);)t=e.find(-1,!0).line;return t}function je(t,e){var i=Kt(t,e),r=Be(i);return i==r?e:$t(r)}function Ue(t,e){if(e>t.lastLine())return e;var i,r=Kt(t,e);if(!He(t,r))return e;for(;i=Pe(r);)r=i.find(1,!0).line;return $t(r)+1}function He(t,e){var i=Ce&&e.markedSpans;if(i)for(var r=void 0,n=0;ne.maxLineLength&&(e.maxLineLength=i,e.maxLine=t)}))}var Ke=function(t,e,i){this.text=t,De(this,e),this.height=i?i(this):1};function qe(t){t.parent=null,Ae(t)}Ke.prototype.lineNo=function(){return $t(this)},yt(Ke);var Ye={},Xe={};function $e(t,e){if(!t||/^\s*$/.test(t))return null;var i=e.addModeClass?Xe:Ye;return i[t]||(i[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var i=R("span",null,null,l?"padding-right: .1px":null),r={pre:R("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var n=0;n<=(e.rest?e.rest.length:0);n++){var s=n?e.rest[n-1]:e.line,o=void 0;r.pos=0,r.addToken=Je,Dt(t.display.measure)&&(o=ct(s,t.doc.direction))&&(r.addToken=ti(r.addToken,o)),r.map=[],ii(s,r,de(t,s,e!=t.display.externalMeasured&&$t(s))),s.styleClasses&&(s.styleClasses.bgClass&&(r.bgClass=M(s.styleClasses.bgClass,r.bgClass||"")),s.styleClasses.textClass&&(r.textClass=M(s.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(At(t.display.measure))),0==n?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var a=r.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=M(r.pre.className,r.textClass||"")),r}function Qe(t){var e=D("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Je(t,e,i,r,n,s,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var i=e,r="",n=0;nc&&h.from<=c);d++);if(h.to>=u)return t(i,r,n,s,o,a,l);t(i,r.slice(0,h.to-c),n,s,null,a,l),s=null,r=r.slice(h.to-c),c=h.to}}}function ei(t,e,i,r){var n=!r&&i.widgetNode;n&&t.map.push(t.pos,t.pos+e,n),!r&&t.cm.display.input.needsContentAttribute&&(n||(n=t.content.appendChild(document.createElement("span"))),n.setAttribute("cm-marker",i.id)),n&&(t.cm.display.input.setUneditable(n),t.content.appendChild(n)),t.pos+=e,t.trailingSpace=!1}function ii(t,e,i){var r=t.markedSpans,n=t.text,s=0;if(r)for(var o,a,l,c,u,h,d,f=n.length,p=0,g=1,m="",v=0;;){if(v==p){l=c=u=a="",d=null,h=null,v=1/0;for(var y=[],b=void 0,x=0;xp||C.collapsed&&S.to==p&&S.from==p)){if(null!=S.to&&S.to!=p&&v>S.to&&(v=S.to,c=""),C.className&&(l+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&S.from==p&&(u+=" "+C.startStyle),C.endStyle&&S.to==v&&(b||(b=[])).push(C.endStyle,S.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var w in C.attributes)(d||(d={}))[w]=C.attributes[w];C.collapsed&&(!h||_e(h.marker,C)<0)&&(h=S)}else S.from>p&&v>S.from&&(v=S.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var L=p+m.length;if(!h){var A=L>T?m.slice(0,T-p):m;e.addToken(e,A,o?o+l:l,u,p+A.length==v?c:"",a,d)}if(L>=T){m=m.slice(T-p),p=T;break}p=L,u=""}m=n.slice(s,s=i[g++]),o=$e(i[g++],e.cm.options)}}else for(var D=1;Di)return{map:t.measure.maps[n],cache:t.measure.caches[n],before:!0}}function Di(t,e,i,r){return _i(t,Oi(t,e),i,r)}function Ri(t,e){if(e>=t.display.viewFrom&&e=i.lineN&&e2&&s.push((l.bottom+c.top)/2-i.top)}}s.push(i.bottom-i.top)}}(t,e.view,e.rect),e.hasHeights=!0),(s=function(t,e,i,r){var n,s=Pi(e.map,i,r),l=s.node,c=s.start,u=s.end,h=s.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&rt(e.line.text.charAt(s.coverStart+c));)--c;for(;s.coverStart+u1}(t))return e;var i=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*i,right:e.right*i,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,n))}else{var f;c>0&&(h=r="right"),n=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(o&&a<9&&!c&&(!n||!n.left&&!n.right)){var p=l.parentNode.getClientRects()[0];n=p?{left:p.left,right:p.left+rr(t.display),top:p.top,bottom:p.bottom}:Mi}for(var g=n.top-e.rect.top,m=n.bottom-e.rect.top,v=(g+m)/2,y=e.view.measure.heights,b=0;be)&&(n=(s=l-a)-1,e>=l&&(o="right")),null!=n){if(r=t[c+2],a==l&&i==(r.insertLeft?"left":"right")&&(o=i),"left"==i&&0==n)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],o="left";if("right"==i&&n==l-a)for(;c=0&&(i=t[n]).left==i.right;n--);return i}function Fi(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return o("before"==c?l-1:l,"before"==c);function u(t,e,i){return o(i?t-1:t,1==a[e].level!=i)}var h=at(a,l,c),d=ot,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function qi(t,e){var i=0;e=ae(t.doc,e),t.options.lineWrapping||(i=rr(t.display)*e.ch);var r=Kt(t.doc,e.line),n=ze(r)+Ci(t.display);return{left:i,right:i,top:n,bottom:n+r.height}}function Yi(t,e,i,r,n){var s=te(t,e,i);return s.xRel=n,r&&(s.outside=r),s}function Xi(t,e,i){var r=t.doc;if((i+=t.display.viewOffset)<0)return Yi(r.first,0,null,-1,-1);var n=Zt(r,i),s=r.first+r.size-1;if(n>s)return Yi(r.first+r.size-1,Kt(r,s).text.length,null,1,1);e<0&&(e=0);for(var o=Kt(r,n);;){var a=Ji(t,o,n,e,i),l=Ne(o,a.ch+(a.xRel>0||a.outside>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==n)return c;o=Kt(r,n=c.line)}}function $i(t,e,i,r){r-=Gi(e);var n=e.text.length,s=st((function(e){return _i(t,i,e-1).bottom<=r}),n,0);return{begin:s,end:n=st((function(e){return _i(t,i,e).top>r}),s,n)}}function Zi(t,e,i,r){return i||(i=Oi(t,e)),$i(t,e,i,zi(t,e,_i(t,i,r),"line").top)}function Qi(t,e,i,r){return!(t.bottom<=i)&&(t.top>i||(r?t.left:t.right)>e)}function Ji(t,e,i,r,n){n-=ze(e);var s=Oi(t,e),o=Gi(e),a=0,l=e.text.length,c=!0,u=ct(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?er:tr)(t,e,i,s,u,r,n);a=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,g=null,m=st((function(e){var i=_i(t,s,e);return i.top+=o,i.bottom+=o,!!Qi(i,r,n,!1)&&(i.top<=n&&i.left<=r&&(p=e,g=i),!0)}),a,l),v=!1;if(g){var y=r-g.left=x.bottom?1:0}return Yi(i,m=nt(e.text,m,1),f,v,r-d)}function tr(t,e,i,r,n,s,o){var a=st((function(a){var l=n[a],c=1!=l.level;return Qi(Ki(t,te(i,c?l.to:l.from,c?"before":"after"),"line",e,r),s,o,!0)}),0,n.length-1),l=n[a];if(a>0){var c=1!=l.level,u=Ki(t,te(i,c?l.from:l.to,c?"after":"before"),"line",e,r);Qi(u,s,o,!0)&&u.top>o&&(l=n[a-1])}return l}function er(t,e,i,r,n,s,o){var a=$i(t,e,r,o),l=a.begin,c=a.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=_i(t,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=pg)&&(u=f,h=g)}}return u||(u=n[n.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function ir(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Ii){Ii=D("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Ii.appendChild(document.createTextNode("x")),Ii.appendChild(D("br"));Ii.appendChild(document.createTextNode("x"))}A(t.measure,Ii);var i=Ii.offsetHeight/50;return i>3&&(t.cachedTextHeight=i),L(t.measure),i||1}function rr(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=D("span","xxxxxxxxxx"),i=D("pre",[e],"CodeMirror-line-like");A(t.measure,i);var r=e.getBoundingClientRect(),n=(r.right-r.left)/10;return n>2&&(t.cachedCharWidth=n),n||10}function nr(t){for(var e=t.display,i={},r={},n=e.gutters.clientLeft,s=e.gutters.firstChild,o=0;s;s=s.nextSibling,++o){var a=t.display.gutterSpecs[o].className;i[a]=s.offsetLeft+s.clientLeft+n,r[a]=s.clientWidth}return{fixedPos:sr(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:i,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function sr(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function or(t){var e=ir(t.display),i=t.options.lineWrapping,r=i&&Math.max(5,t.display.scroller.clientWidth/rr(t.display)-3);return function(n){if(He(t.doc,n))return 0;var s=0;if(n.widgets)for(var o=0;o0&&(l=Kt(t.doc,c.line).text).length==c.ch){var u=B(l,l.length,t.options.tabSize)-l.length;c=te(c.line,Math.max(0,Math.round((s-ki(t.display).left)/rr(t.display))-u))}return c}function cr(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var i=t.display.view,r=0;re)&&(n.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=n.viewTo)Ce&&je(t.doc,e)n.viewFrom?dr(t):(n.viewFrom+=r,n.viewTo+=r);else if(e<=n.viewFrom&&i>=n.viewTo)dr(t);else if(e<=n.viewFrom){var s=fr(t,i,i+r,1);s?(n.view=n.view.slice(s.index),n.viewFrom=s.lineN,n.viewTo+=r):dr(t)}else if(i>=n.viewTo){var o=fr(t,e,e,-1);o?(n.view=n.view.slice(0,o.index),n.viewTo=o.lineN):dr(t)}else{var a=fr(t,e,e,-1),l=fr(t,i,i+r,1);a&&l?(n.view=n.view.slice(0,a.index).concat(ni(t,a.lineN,l.lineN)).concat(n.view.slice(l.index)),n.viewTo+=r):dr(t)}var c=n.externalMeasured;c&&(i=n.lineN&&e=r.viewTo)){var s=r.view[cr(t,e)];if(null!=s.node){var o=s.changes||(s.changes=[]);-1==U(o,i)&&o.push(i)}}}function dr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function fr(t,e,i,r){var n,s=cr(t,e),o=t.display.view;if(!Ce||i==t.doc.first+t.doc.size)return{index:s,lineN:i};for(var a=t.display.viewFrom,l=0;l0){if(s==o.length-1)return null;n=a+o[s].size-e,s++}else n=a-e;e+=n,i+=n}for(;je(t.doc,i)!=i;){if(s==(r<0?0:o.length-1))return null;i+=r*o[s-(r<0?1:0)].size,s+=r}return{index:s,lineN:i}}function pr(t){for(var e=t.display.view,i=0,r=0;r=t.display.viewTo||a.to().linee||e==i&&o.to==e)&&(r(Math.max(o.from,e),Math.min(o.to,i),1==o.level?"rtl":"ltr",s),n=!0)}n||r(e,i,"ltr")}(g,i||0,null==r?d:r,(function(t,e,n,h){var m="ltr"==n,v=f(t,m?"left":"right"),y=f(e-1,m?"right":"left"),b=null==i&&0==t,x=null==r&&e==d,S=0==h,C=!g||h==g.length-1;if(y.top-v.top<=3){var w=(c?x:b)&&C,k=(c?b:x)&&S?a:(m?v:y).left,E=w?l:(m?y:v).right;u(k,v.top,E-k,v.bottom)}else{var T,L,A,D;m?(T=c&&b&&S?a:v.left,L=c?l:p(t,n,"before"),A=c?a:p(e,n,"after"),D=c&&x&&C?l:y.right):(T=c?p(t,n,"before"):a,L=!c&&b&&S?l:v.right,A=!c&&x&&C?a:y.left,D=c?p(e,n,"after"):l),u(T,v.top,L-T,v.bottom),v.bottom0?e.blinker=setInterval((function(){t.hasFocus()||kr(t),e.cursorDiv.style.visibility=(i=!i)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Sr(t){t.state.focused||(t.display.input.focus(),wr(t))}function Cr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,kr(t))}),100)}function wr(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(pt(t,"focus",t,e),t.state.focused=!0,I(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),xr(t))}function kr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(pt(t,"blur",t,e),t.state.focused=!1,T(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function Er(t){for(var e=t.display,i=e.lineDiv.offsetTop,r=0;r.005||d<-.005)&&(Xt(n.line,l),Tr(n.line),n.rest))for(var f=0;ft.display.sizerWidth){var p=Math.ceil(c/rr(t.display));p>t.display.maxLineLength&&(t.display.maxLineLength=p,t.display.maxLine=n.line,t.display.maxLineChanged=!0)}}}}function Tr(t){if(t.widgets)for(var e=0;e=o&&(s=Zt(e,ze(Kt(e,l))-t.wrapper.clientHeight),o=l)}return{from:s,to:Math.max(o,s+1)}}function Ar(t,e){var i=t.display,r=ir(t.display);e.top<0&&(e.top=0);var n=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:i.scroller.scrollTop,s=Li(t),o={};e.bottom-e.top>s&&(e.bottom=e.top+s);var a=t.doc.height+wi(i),l=e.topa-r;if(e.topn+s){var u=Math.min(e.top,(c?a:e.bottom)-s);u!=n&&(o.scrollTop=u)}var h=t.options.fixedGutter?0:i.gutters.offsetWidth,d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:i.scroller.scrollLeft-h,f=Ti(t)-i.gutters.offsetWidth,p=e.right-e.left>f;return p&&(e.right=e.left+f),e.left<10?o.scrollLeft=0:e.leftf+d-3&&(o.scrollLeft=e.right+(p?0:10)-f),o}function Dr(t,e){null!=e&&(_r(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Rr(t){_r(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Or(t,e,i){null==e&&null==i||_r(t),null!=e&&(t.curOp.scrollLeft=e),null!=i&&(t.curOp.scrollTop=i)}function _r(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Ir(t,qi(t,e.from),qi(t,e.to),e.margin))}function Ir(t,e,i,r){var n=Ar(t,{left:Math.min(e.left,i.left),top:Math.min(e.top,i.top)-r,right:Math.max(e.right,i.right),bottom:Math.max(e.bottom,i.bottom)+r});Or(t,n.scrollLeft,n.scrollTop)}function Mr(t,e){Math.abs(t.doc.scrollTop-e)<2||(i||ln(t,{top:e}),Pr(t,e,!0),i&&ln(t),rn(t,100))}function Pr(t,e,i){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||i)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Nr(t,e,i,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(i?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,hn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Fr(t){var e=t.display,i=e.gutters.offsetWidth,r=Math.round(t.doc.height+wi(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?i:0,docHeight:r,scrollHeight:r+Ei(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:i}}var Br=function(t,e,i){this.cm=i;var r=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=n.tabIndex=-1,t(r),t(n),ht(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),ht(n,"scroll",(function(){n.clientWidth&&e(n.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,i=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var n=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+n)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=i?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var s=t.viewWidth-t.barLeft-(i?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+s)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?r:0,bottom:e?r:0}},Br.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var t=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new j,this.disableVert=new j},Br.prototype.enableZeroWidthBar=function(t,e,i){t.style.pointerEvents="auto",e.set(1e3,(function r(){var n=t.getBoundingClientRect();("vert"==i?document.elementFromPoint(n.right-1,(n.top+n.bottom)/2):document.elementFromPoint((n.right+n.left)/2,n.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)}))},Br.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var jr=function(){};function Ur(t,e){e||(e=Fr(t));var i=t.display.barWidth,r=t.display.barHeight;Hr(t,e);for(var n=0;n<4&&i!=t.display.barWidth||r!=t.display.barHeight;n++)i!=t.display.barWidth&&t.options.lineWrapping&&Er(t),Hr(t,Fr(t)),i=t.display.barWidth,r=t.display.barHeight}function Hr(t,e){var i=t.display,r=i.scrollbars.update(e);i.sizer.style.paddingRight=(i.barWidth=r.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=r.bottom)+"px",i.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=r.bottom+"px",i.scrollbarFiller.style.width=r.right+"px"):i.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=r.bottom+"px",i.gutterFiller.style.width=e.gutterWidth+"px"):i.gutterFiller.style.display=""}jr.prototype.update=function(){return{bottom:0,right:0}},jr.prototype.setScrollLeft=function(){},jr.prototype.setScrollTop=function(){},jr.prototype.clear=function(){};var Gr={native:Br,null:jr};function zr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&T(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Gr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,i){"horizontal"==i?Nr(t,e):Mr(t,e)}),t),t.display.scrollbars.addClass&&I(t.display.wrapper,t.display.scrollbars.addClass)}var Wr=0;function Vr(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wr},e=t.curOp,si?si.ops.push(e):e.ownsGroup=si={ops:[e],delayedCallbacks:[]}}function Kr(t){var e=t.curOp;e&&function(t,e){var i=t.ownsGroup;if(i)try{!function(t){var e=t.delayedCallbacks,i=0;do{for(;i=i.viewTo)||i.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new sn(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Yr(t){t.updatedDisplay=t.mustUpdate&&on(t.cm,t.update)}function Xr(t){var e=t.cm,i=e.display;t.updatedDisplay&&Er(e),t.barMeasure=Fr(e),i.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Di(e,i.maxLine,i.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+t.adjustWidthTo+Ei(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+t.adjustWidthTo-Ti(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=i.input.prepareSelection())}function $r(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(n=!1),null!=n&&!p){var s=D("div","​",null,"position: absolute;\n top: "+(e.top-i.viewOffset-Ci(t.display))+"px;\n height: "+(e.bottom-e.top+Ei(t)+i.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(n),t.display.lineSpace.removeChild(s)}}}(e,function(t,e,i,r){var n;null==r&&(r=0),t.options.lineWrapping||e!=i||(i="before"==(e=e.ch?te(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?te(e.line,e.ch+1,"before"):e);for(var s=0;s<5;s++){var o=!1,a=Ki(t,e),l=i&&i!=e?Ki(t,i):a,c=Ar(t,n={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-r,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+r}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Mr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(Nr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(o=!0)),!o)break}return n}(e,ae(r,t.scrollToPos.from),ae(r,t.scrollToPos.to),t.scrollToPos.margin));var n=t.maybeHiddenMarkers,s=t.maybeUnhiddenMarkers;if(n)for(var o=0;o=t.display.viewTo)){var i=+new Date+t.options.workTime,r=fe(t,e.highlightFrontier),n=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(s){if(r.line>=t.display.viewFrom){var o=s.styles,a=s.text.length>t.options.maxHighlightLength?Gt(e.mode,r.state):null,l=he(t,s,r,!0);a&&(r.state=a),s.styles=l.styles;var c=s.styleClasses,u=l.classes;u?s.styleClasses=u:c&&(s.styleClasses=null);for(var h=!o||o.length!=s.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&di)return rn(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),n.length&&Qr(t,(function(){for(var e=0;e=i.viewFrom&&e.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==pr(t))return!1;dn(t)&&(dr(t),e.dims=nr(t));var n=r.first+r.size,s=Math.max(e.visible.from-t.options.viewportMargin,r.first),o=Math.min(n,e.visible.to+t.options.viewportMargin);i.viewFromo&&i.viewTo-o<20&&(o=Math.min(n,i.viewTo)),Ce&&(s=je(t.doc,s),o=Ue(t.doc,o));var a=s!=i.viewFrom||o!=i.viewTo||i.lastWrapHeight!=e.wrapperHeight||i.lastWrapWidth!=e.wrapperWidth;!function(t,e,i){var r=t.display;0==r.view.length||e>=r.viewTo||i<=r.viewFrom?(r.view=ni(t,e,i),r.viewFrom=e):(r.viewFrom>e?r.view=ni(t,e,r.viewFrom).concat(r.view):r.viewFromi&&(r.view=r.view.slice(0,cr(t,i)))),r.viewTo=i}(t,s,o),i.viewOffset=ze(Kt(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=pr(t);if(!a&&0==c&&!e.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=_();if(!e||!O(t.display.lineDiv,e))return null;var i={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&O(t.display.lineDiv,r.anchorNode)&&(i.anchorNode=r.anchorNode,i.anchorOffset=r.anchorOffset,i.focusNode=r.focusNode,i.focusOffset=r.focusOffset)}return i}(t);return c>4&&(i.lineDiv.style.display="none"),function(t,e,i){var r=t.display,n=t.options.lineNumbers,s=r.lineDiv,o=s.firstChild;function a(e){var i=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),i}for(var c=r.view,u=r.viewFrom,h=0;h-1&&(f=!1),ci(t,d,u,i)),f&&(L(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Jt(t.options,u)))),o=d.node.nextSibling}else{var p=mi(t,d,u,i);s.insertBefore(p,o)}u+=d.size}for(;o;)o=a(o)}(t,i.updateLineNumbers,e.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,function(t){if(t&&t.activeElt&&t.activeElt!=_()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&O(document.body,t.anchorNode)&&O(document.body,t.focusNode))){var e=window.getSelection(),i=document.createRange();i.setEnd(t.anchorNode,t.anchorOffset),i.collapse(!1),e.removeAllRanges(),e.addRange(i),e.extend(t.focusNode,t.focusOffset)}}(u),L(i.cursorDiv),L(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,a&&(i.lastWrapHeight=e.wrapperHeight,i.lastWrapWidth=e.wrapperWidth,rn(t,400)),i.updateLineNumbers=null,!0}function an(t,e){for(var i=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Ti(t))r&&(e.visible=Lr(t.display,t.doc,i));else if(i&&null!=i.top&&(i={top:Math.min(t.doc.height+wi(t.display)-Li(t),i.top)}),e.visible=Lr(t.display,t.doc,i),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!on(t,e))break;Er(t);var n=Fr(t);gr(t),Ur(t,n),un(t,n),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function ln(t,e){var i=new sn(t,e);if(on(t,i)){Er(t),an(t,i);var r=Fr(t);gr(t),Ur(t,r),un(t,r),i.finish()}}function cn(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function un(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Ei(t)+"px"}function hn(t){var e=t.display,i=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=sr(e)-e.scroller.scrollLeft+t.doc.scrollLeft,n=e.gutters.offsetWidth,s=r+"px",o=0;oa.clientWidth,u=a.scrollHeight>a.clientHeight;if(n&&c||s&&u){if(s&&y&&l)t:for(var d=e.target,f=o.view;d!=a;d=d.parentNode)for(var p=0;p=0&&ee(t,r.to())<=0)return i}return-1};var wn=function(t,e){this.anchor=t,this.head=e};function kn(t,e,i){var r=t&&t.options.selectionsMayTouch,n=e[i];e.sort((function(t,e){return ee(t.from(),e.from())})),i=U(e,n);for(var s=1;s0:l>=0){var c=se(a.from(),o.from()),u=ne(a.to(),o.to()),h=a.empty()?o.from()==o.head:a.from()==a.head;s<=i&&--i,e.splice(--s,2,new wn(h?u:c,h?c:u))}}return new Cn(e,i)}function En(t,e){return new Cn([new wn(t,e||t)],0)}function Tn(t){return t.text?te(t.from.line+t.text.length-1,Y(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Ln(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return Tn(e);var i=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=Tn(e).ch-e.to.ch),te(i,r)}function An(t,e){for(var i=[],r=0;r1&&t.remove(a.line+1,p-1),t.insert(a.line+1,v)}ai(t,"change",t,e)}function Mn(t,e,i){!function t(r,n,s){if(r.linked)for(var o=0;oa-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(s=function(t,e){return e?(jn(t.done),Y(t.done)):t.done.length&&!Y(t.done).ranges?Y(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Y(t.done)):void 0}(n,n.lastOp==r)))o=Y(s.changes),0==ee(e.from,e.to)&&0==ee(e.from,o.to)?o.to=Tn(e):s.changes.push(Bn(t,e));else{var l=Y(n.done);for(l&&l.ranges||Gn(t.sel,n.done),s={changes:[Bn(t,e)],generation:n.generation},n.done.push(s);n.done.length>n.undoDepth;)n.done.shift(),n.done[0].ranges||n.done.shift()}n.done.push(i),n.generation=++n.maxGeneration,n.lastModTime=n.lastSelTime=a,n.lastOp=n.lastSelOp=r,n.lastOrigin=n.lastSelOrigin=e.origin,o||pt(t,"historyAdded")}function Hn(t,e,i,r){var n=t.history,s=r&&r.origin;i==n.lastSelOp||s&&n.lastSelOrigin==s&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==s||function(t,e,i,r){var n=e.charAt(0);return"*"==n||"+"==n&&i.ranges.length==r.ranges.length&&i.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,s,Y(n.done),e))?n.done[n.done.length-1]=e:Gn(e,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=s,n.lastSelOp=i,r&&!1!==r.clearRedo&&jn(n.undone)}function Gn(t,e){var i=Y(e);i&&i.ranges&&i.equals(t)||e.push(t)}function zn(t,e,i,r){var n=e["spans_"+t.id],s=0;t.iter(Math.max(t.first,i),Math.min(t.first+t.size,r),(function(i){i.markedSpans&&((n||(n=e["spans_"+t.id]={}))[s]=i.markedSpans),++s}))}function Wn(t){if(!t)return null;for(var e,i=0;i-1&&(Y(a)[h]=c[h],delete c[h])}}}return r}function qn(t,e,i,r){if(r){var n=t.anchor;if(i){var s=ee(e,n)<0;s!=ee(i,n)<0?(n=e,e=i):s!=ee(e,i)<0&&(e=i)}return new wn(n,e)}return new wn(i||e,e)}function Yn(t,e,i,r,n){null==n&&(n=t.cm&&(t.cm.display.shift||t.extend)),Jn(t,new Cn([qn(t.sel.primary(),e,i,n)],0),r)}function Xn(t,e,i){for(var r=[],n=t.cm&&(t.cm.display.shift||t.extend),s=0;s=e.ch:a.to>e.ch))){if(n&&(pt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(s.markedSpans){--o;continue}break}if(!l.atomic)continue;if(i){var h=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(h=os(t,h,-r,h&&h.line==e.line?s:null)),h&&h.line==e.line&&(d=ee(h,i))&&(r<0?d<0:d>0))return ns(t,h,e,r,n)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=os(t,f,r,f.line==e.line?s:null)),f?ns(t,f,e,r,n):null}}return e}function ss(t,e,i,r,n){var s=r||1,o=ns(t,e,i,s,n)||!n&&ns(t,e,i,s,!0)||ns(t,e,i,-s,n)||!n&&ns(t,e,i,-s,!0);return o||(t.cantEdit=!0,te(t.first,0))}function os(t,e,i,r){return i<0&&0==e.ch?e.line>t.first?ae(t,te(e.line-1)):null:i>0&&e.ch==(r||Kt(t,e.line)).text.length?e.line0)){var u=[l,1],h=ee(c.from,a.from),d=ee(c.to,a.to);(h<0||!o.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(d>0||!o.inclusiveRight&&!d)&&u.push({from:a.to,to:c.to}),n.splice.apply(n,u),l+=u.length-3}}return n}(t,e.from,e.to);if(r)for(var n=r.length-1;n>=0;--n)us(t,{from:r[n].from,to:r[n].to,text:n?[""]:e.text,origin:e.origin});else us(t,e)}}function us(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var i=An(t,e);Un(t,e,i,t.cm?t.cm.curOp.id:NaN),fs(t,e,i,Te(t,e));var r=[];Mn(t,(function(t,i){i||-1!=U(r,t.history)||(vs(t.history,e),r.push(t.history)),fs(t,e,null,Te(t,e))}))}}function hs(t,e,i){var r=t.cm&&t.cm.state.suppressEdits;if(!r||i){for(var n,s=t.history,o=t.sel,a="undo"==e?s.done:s.undone,l="undo"==e?s.undone:s.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function ds(t,e){if(0!=e&&(t.first+=e,t.sel=new Cn(X(t.sel.ranges,(function(t){return new wn(te(t.anchor.line+e,t.anchor.ch),te(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){ur(t.cm,t.first,t.first-e,e);for(var i=t.cm.display,r=i.viewFrom;rt.lastLine())){if(e.from.lines&&(e={from:e.from,to:te(s,Kt(t,s).text.length),text:[e.text[0]],origin:e.origin}),e.removed=qt(t,e.from,e.to),i||(i=An(t,e)),t.cm?function(t,e,i){var r=t.doc,n=t.display,s=e.from,o=e.to,a=!1,l=s.line;t.options.lineWrapping||(l=$t(Be(Kt(r,s.line))),r.iter(l,o.line+1,(function(t){if(t==n.maxLine)return a=!0,!0}))),r.sel.contains(e.from,e.to)>-1&&mt(t),In(r,e,i,or(t)),t.options.lineWrapping||(r.iter(l,s.line+e.text.length,(function(t){var e=We(t);e>n.maxLineLength&&(n.maxLine=t,n.maxLineLength=e,n.maxLineChanged=!0,a=!1)})),a&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontieri;r--){var n=Kt(t,r).stateAfter;if(n&&(!(n instanceof ce)||r+n.lookAhead1||!(this.children[0]instanceof bs))){var a=[];this.collapse(a),this.children=[new bs(a)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var o=n.lines.length%25+25,a=o;a10);t.parent.maybeSpill()}},iterN:function(t,e,i){for(var r=0;r0||0==o&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=R("span",[s.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(Fe(t,e.line,e,i,s)||e.line!=i.line&&Fe(t,i.line,e,i,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ce=!0}s.addToHistory&&Un(t,{from:e,to:i,origin:"markText"},t.sel,NaN);var a,l=e.line,c=t.cm;if(t.iter(l,i.line+1,(function(t){c&&s.collapsed&&!c.options.lineWrapping&&Be(t)==c.display.maxLine&&(a=!0),s.collapsed&&l!=e.line&&Xt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new we(s,l==e.line?e.ch:null,l==i.line?i.ch:null)),++l})),s.collapsed&&t.iter(e.line,i.line+1,(function(e){He(t,e)&&Xt(e,0)})),s.clearOnEnter&&ht(s,"beforeCursorEnter",(function(){return s.clear()})),s.readOnly&&(Se=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++ws,s.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),s.collapsed)ur(c,e.line,i.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var u=e.line;u<=i.line;u++)hr(c,u,"text");s.atomic&&is(c.doc),ai(c,"markerAdded",c,s)}return s}ks.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Vr(t),vt(this,"clear")){var i=this.find();i&&ai(this,"clear",i.from,i.to)}for(var r=null,n=null,s=0;st.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&ur(t,r,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&is(t.doc)),t&&ai(t,"markerCleared",t,this,r,n),e&&Kr(t),this.parent&&this.parent.clear()}},ks.prototype.find=function(t,e){var i,r;null==t&&"bookmark"==this.type&&(t=1);for(var n=0;n=0;l--)cs(this,r[l]);a?Qn(this,a):this.cm&&Rr(this.cm)})),undo:en((function(){hs(this,"undo")})),redo:en((function(){hs(this,"redo")})),undoSelection:en((function(){hs(this,"undo",!0)})),redoSelection:en((function(){hs(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,i=0,r=0;r=t.ch)&&e.push(n.marker.parent||n.marker)}return e},findMarks:function(t,e,i){t=ae(this,t),e=ae(this,e);var r=[],n=t.line;return this.iter(t.line,e.line+1,(function(s){var o=s.markedSpans;if(o)for(var a=0;a=l.to||null==l.from&&n!=t.line||null!=l.from&&n==e.line&&l.from>=e.ch||i&&!i(l.marker)||r.push(l.marker.parent||l.marker)}++n})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var i=e.markedSpans;if(i)for(var r=0;rt)return e=t,!0;t-=s,++i})),ae(this,te(i,e))},indexFromPos:function(t){var e=(t=ae(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),ts(e.doc,En(i,i)),d)for(var f=0;f=0;e--)ps(t.doc,"",r[e].from,r[e].to,"+delete");Rr(t)}))}function Zs(t,e,i){var r=nt(t.text,e+i,i);return r<0||r>t.text.length?null:r}function Qs(t,e,i){var r=Zs(t,e.ch,i);return null==r?null:new te(e.line,r,i<0?"after":"before")}function Js(t,e,i,r,n){if(t){"rtl"==e.doc.direction&&(n=-n);var s=ct(i,e.doc.direction);if(s){var o,a=n<0?Y(s):s[0],l=n<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var c=Oi(e,i);o=n<0?i.text.length-1:0;var u=_i(e,c,o).top;o=st((function(t){return _i(e,c,t).top==u}),n<0==(1==a.level)?a.from:a.to-1,o),"before"==l&&(o=Zs(i,o,1))}else o=n<0?a.to:a.from;return new te(r,o,l)}}return new te(r,n<0?i.text.length:0,n<0?"before":"after")}Gs.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Gs.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Gs.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Gs.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Gs.default=y?Gs.macDefault:Gs.pcDefault;var to={selectAll:as,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),G)},killLine:function(t){return $s(t,(function(e){if(e.empty()){var i=Kt(t.doc,e.head.line).text.length;return e.head.ch==i&&e.head.line0)n=new te(n.line,n.ch+1),t.replaceRange(s.charAt(n.ch-1)+s.charAt(n.ch-2),te(n.line,n.ch-2),n,"+transpose");else if(n.line>t.doc.first){var o=Kt(t.doc,n.line-1).text;o&&(n=new te(n.line,1),t.replaceRange(s.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),te(n.line-1,o.length-1),n,"+transpose"))}i.push(new wn(n,n))}t.setSelections(i)}))},newlineAndIndent:function(t){return Qr(t,(function(){for(var e=t.listSelections(),i=e.length-1;i>=0;i--)t.replaceRange(t.doc.lineSeparator(),e[i].anchor,e[i].head,"+input");e=t.listSelections();for(var r=0;r-1&&(ee((n=c.ranges[n]).from(),e)<0||e.xRel>0)&&(ee(n.to(),e)>0||e.xRel<0)?function(t,e,i,r){var n=t.display,s=!1,c=Jr(t,(function(e){l&&(n.scroller.draggable=!1),t.state.draggingText=!1,ft(n.wrapper.ownerDocument,"mouseup",c),ft(n.wrapper.ownerDocument,"mousemove",u),ft(n.scroller,"dragstart",h),ft(n.scroller,"drop",c),s||(bt(e),r.addNew||Yn(t.doc,i,null,null,r.extend),l&&!d||o&&9==a?setTimeout((function(){n.wrapper.ownerDocument.body.focus({preventScroll:!0}),n.input.focus()}),20):n.input.focus())})),u=function(t){s=s||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return s=!0};l&&(n.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,n.scroller.dragDrop&&n.scroller.dragDrop(),ht(n.wrapper.ownerDocument,"mouseup",c),ht(n.wrapper.ownerDocument,"mousemove",u),ht(n.scroller,"dragstart",h),ht(n.scroller,"drop",c),Cr(t),setTimeout((function(){return n.input.focus()}),20)}(t,r,e,s):function(t,e,i,r){var n=t.display,s=t.doc;bt(e);var o,a,l=s.sel,c=l.ranges;if(r.addNew&&!r.extend?(a=s.sel.contains(i),o=a>-1?c[a]:new wn(i,i)):(o=s.sel.primary(),a=s.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new wn(i,i)),i=lr(t,e,!0,!0),a=-1;else{var u=vo(t,i,r.unit);o=r.extend?qn(o,u.anchor,u.head,r.extend):u}r.addNew?-1==a?(a=c.length,Jn(s,kn(t,c.concat([o]),a),{scroll:!1,origin:"*mouse"})):c.length>1&&c[a].empty()&&"char"==r.unit&&!r.extend?(Jn(s,kn(t,c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),l=s.sel):$n(s,a,o,z):(a=0,Jn(s,new Cn([o],0),z),l=s.sel);var h=i;function d(e){if(0!=ee(h,e))if(h=e,"rectangle"==r.unit){for(var n=[],c=t.options.tabSize,u=B(Kt(s,i.line).text,i.ch,c),d=B(Kt(s,e.line).text,e.ch,c),f=Math.min(u,d),p=Math.max(u,d),g=Math.min(i.line,e.line),m=Math.min(t.lastLine(),Math.max(i.line,e.line));g<=m;g++){var v=Kt(s,g).text,y=V(v,f,c);f==p?n.push(new wn(te(g,y),te(g,y))):v.length>y&&n.push(new wn(te(g,y),te(g,V(v,p,c))))}n.length||n.push(new wn(i,i)),Jn(s,kn(t,l.ranges.slice(0,a).concat(n),a),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=o,S=vo(t,e,r.unit),C=x.anchor;ee(S.anchor,C)>0?(b=S.head,C=se(x.from(),S.anchor)):(b=S.anchor,C=ne(x.to(),S.head));var w=l.ranges.slice(0);w[a]=function(t,e){var i=e.anchor,r=e.head,n=Kt(t.doc,i.line);if(0==ee(i,r)&&i.sticky==r.sticky)return e;var s=ct(n);if(!s)return e;var o=at(s,i.ch,i.sticky),a=s[o];if(a.from!=i.ch&&a.to!=i.ch)return e;var l,c=o+(a.from==i.ch==(1!=a.level)?0:1);if(0==c||c==s.length)return e;if(r.line!=i.line)l=(r.line-i.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=at(s,r.ch,r.sticky),h=u-o||(r.ch-i.ch)*(1==a.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=s[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,g=f?"after":"before";return i.ch==p&&i.sticky==g?e:new wn(new te(i.line,p,g),r)}(t,new wn(ae(s,C),b)),Jn(s,kn(t,w,a),z)}}var f=n.wrapper.getBoundingClientRect(),p=0;function g(e){t.state.selectingText=!1,p=1/0,e&&(bt(e),n.input.focus()),ft(n.wrapper.ownerDocument,"mousemove",m),ft(n.wrapper.ownerDocument,"mouseup",v),s.history.lastSelOrigin=null}var m=Jr(t,(function(e){0!==e.buttons&&kt(e)?function e(i){var o=++p,a=lr(t,i,!0,"rectangle"==r.unit);if(a)if(0!=ee(a,h)){t.curOp.focus=_(),d(a);var l=Lr(n,s);(a.line>=l.to||a.linef.bottom?20:0;c&&setTimeout(Jr(t,(function(){p==o&&(n.scroller.scrollTop+=c,e(i))})),50)}}(e):g(e)})),v=Jr(t,g);t.state.selectingText=v,ht(n.wrapper.ownerDocument,"mousemove",m),ht(n.wrapper.ownerDocument,"mouseup",v)}(t,r,e,s)}(e,r,s,t):wt(t)==i.scroller&&bt(t):2==n?(r&&Yn(e.doc,r),setTimeout((function(){return i.input.focus()}),20)):3==n&&(w?e.display.input.onContextMenu(t):Cr(e)))}}function vo(t,e,i){if("char"==i)return new wn(e,e);if("word"==i)return t.findWordAt(e);if("line"==i)return new wn(te(e.line,0),ae(t.doc,te(e.line+1,0)));var r=i(t,e);return new wn(r.from,r.to)}function yo(t,e,i,r){var n,s;if(e.touches)n=e.touches[0].clientX,s=e.touches[0].clientY;else try{n=e.clientX,s=e.clientY}catch(t){return!1}if(n>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&bt(e);var o=t.display,a=o.lineDiv.getBoundingClientRect();if(s>a.bottom||!vt(t,i))return St(e);s-=a.top-o.viewOffset;for(var l=0;l=n)return pt(t,i,t,Zt(t.doc,s),t.display.gutterSpecs[l].className,e),St(e)}}function bo(t,e){return yo(t,e,"gutterClick",!0)}function xo(t,e){Si(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&yo(t,e,"gutterContextMenu",!1)}(t,e)||gt(t,e,"contextmenu")||w||t.display.input.onContextMenu(e)}function So(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ji(t)}go.prototype.compare=function(t,e,i){return this.time+400>t&&0==ee(e,this.pos)&&i==this.button};var Co={toString:function(){return"CodeMirror.Init"}},wo={},ko={};function Eo(t,e,i){if(!e!=!(i&&i!=Co)){var r=t.display.dragFunctions,n=e?ht:ft;n(t.display.scroller,"dragstart",r.start),n(t.display.scroller,"dragenter",r.enter),n(t.display.scroller,"dragover",r.over),n(t.display.scroller,"dragleave",r.leave),n(t.display.scroller,"drop",r.drop)}}function To(t){t.options.lineWrapping?(I(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(T(t.display.wrapper,"CodeMirror-wrap"),Ve(t)),ar(t),ur(t),ji(t),setTimeout((function(){return Ur(t)}),100)}function Lo(t,e){var i=this;if(!(this instanceof Lo))return new Lo(t,e);this.options=e=e?F(e):{},F(wo,e,!1);var r=e.value;"string"==typeof r?r=new Rs(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var n=new Lo.inputStyles[e.inputStyle](this),s=this.display=new mn(t,r,n,e);for(var c in s.wrapper.CodeMirror=this,So(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),zr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new j,keySeq:null,specialChars:null},e.autofocus&&!v&&s.input.focus(),o&&a<11&&setTimeout((function(){return i.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",Jr(t,mo)),ht(e.scroller,"dblclick",o&&a<11?Jr(t,(function(e){if(!gt(t,e)){var i=lr(t,e);if(i&&!bo(t,e)&&!Si(t.display,e)){bt(e);var r=t.findWordAt(i);Yn(t.doc,r.anchor,r.head)}}})):function(e){return gt(t,e)||bt(e)}),ht(e.scroller,"contextmenu",(function(e){return xo(t,e)})),ht(e.input.getField(),"contextmenu",(function(i){e.scroller.contains(i.target)||xo(t,i)}));var i,r={end:0};function n(){e.activeTouch&&(i=setTimeout((function(){return e.activeTouch=null}),1e3),(r=e.activeTouch).end=+new Date)}function s(t,e){if(null==e.left)return!0;var i=e.left-t.left,r=e.top-t.top;return i*i+r*r>400}ht(e.scroller,"touchstart",(function(n){if(!gt(t,n)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(n)&&!bo(t,n)){e.input.ensurePolled(),clearTimeout(i);var s=+new Date;e.activeTouch={start:s,moved:!1,prev:s-r.end<=300?r:null},1==n.touches.length&&(e.activeTouch.left=n.touches[0].pageX,e.activeTouch.top=n.touches[0].pageY)}})),ht(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ht(e.scroller,"touchend",(function(i){var r=e.activeTouch;if(r&&!Si(e,i)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,a=t.coordsChar(e.activeTouch,"page");o=!r.prev||s(r,r.prev)?new wn(a,a):!r.prev.prev||s(r,r.prev.prev)?t.findWordAt(a):new wn(te(a.line,0),ae(t.doc,te(a.line+1,0))),t.setSelection(o.anchor,o.head),t.focus(),bt(i)}n()})),ht(e.scroller,"touchcancel",n),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Mr(t,e.scroller.scrollTop),Nr(t,e.scroller.scrollLeft,!0),pt(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return Sn(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return Sn(t,e)})),ht(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){gt(t,e)||Ct(e)},over:function(e){gt(t,e)||(function(t,e){var i=lr(t,e);if(i){var r=document.createDocumentFragment();vr(t,i,r),t.display.dragCursor||(t.display.dragCursor=D("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),A(t.display.dragCursor,r)}}(t,e),Ct(e))},start:function(e){return function(t,e){if(o&&(!t.state.draggingText||+new Date-Os<100))Ct(e);else if(!gt(t,e)&&!Si(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var i=D("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(i.width=i.height=1,t.display.wrapper.appendChild(i),i._top=i.offsetTop),e.dataTransfer.setDragImage(i,0,0),h&&i.parentNode.removeChild(i)}}(t,e)},drop:Jr(t,_s),leave:function(e){gt(t,e)||Is(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return uo.call(t,e)})),ht(l,"keydown",Jr(t,co)),ht(l,"keypress",Jr(t,ho)),ht(l,"focus",(function(e){return wr(t,e)})),ht(l,"blur",(function(e){return kr(t,e)}))}(this),Ns(),Vr(this),this.curOp.forceUpdate=!0,Pn(this,r),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){i.hasFocus()&&!i.state.focused&&wr(i)}),20):kr(this),ko)ko.hasOwnProperty(c)&&ko[c](this,e[c],Co);dn(this),e.finishInit&&e.finishInit(this);for(var u=0;u150)){if(!r)return;i="prev"}}else c=0,i="not";"prev"==i?c=e>s.first?B(Kt(s,e-1).text,null,o):0:"add"==i?c=l+t.options.indentUnit:"subtract"==i?c=l-t.options.indentUnit:"number"==typeof i&&(c=l+i),c=Math.max(0,c);var h="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/o);f;--f)d+=o,h+="\t";if(do,l=Ot(e),c=null;if(a&&r.ranges.length>1)if(Ro&&Ro.text.join("\n")==e){if(r.ranges.length%Ro.text.length==0){c=[];for(var u=0;u=0;d--){var f=r.ranges[d],p=f.from(),g=f.to();f.empty()&&(i&&i>0?p=te(p.line,p.ch-i):t.state.overwrite&&!a?g=te(g.line,Math.min(Kt(s,g.line).text.length,g.ch+Y(l).length)):a&&Ro&&Ro.lineWise&&Ro.text.join("\n")==l.join("\n")&&(p=g=te(p.line,0)));var m={from:p,to:g,text:c?c[d%c.length]:l,origin:n||(a?"paste":t.state.cutIncoming>o?"cut":"+input")};cs(t.doc,m),ai(t,"inputRead",t,m)}e&&!a&&Mo(t,e),Rr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Io(t,e){var i=t.clipboardData&&t.clipboardData.getData("Text");if(i)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Qr(e,(function(){return _o(e,i,0,null,"paste")})),!0}function Mo(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var i=t.doc.sel,r=i.ranges.length-1;r>=0;r--){var n=i.ranges[r];if(!(n.head.ch>100||r&&i.ranges[r-1].head.line==n.head.line)){var s=t.getModeAt(n.head),o=!1;if(s.electricChars){for(var a=0;a-1){o=Do(t,n.head.line,"smart");break}}else s.electricInput&&s.electricInput.test(Kt(t.doc,n.head.line).text.slice(0,n.head.ch))&&(o=Do(t,n.head.line,"smart"));o&&ai(t,"electricInput",t,n.head.line)}}}function Po(t){for(var e=[],i=[],r=0;r0?0:-1));o=isNaN(u)?null:new te(e.line,Math.max(0,Math.min(a.text.length,e.ch+i*(u>=55296&&u<56320?2:1))),-i)}else o=n?function(t,e,i,r){var n=ct(e,t.doc.direction);if(!n)return Qs(e,i,r);i.ch>=e.text.length?(i.ch=e.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var s=at(n,i.ch,i.sticky),o=n[s];if("ltr"==t.doc.direction&&o.level%2==0&&(r>0?o.to>i.ch:o.from=o.from&&d>=u.begin)){var f=h?"before":"after";return new te(i.line,d,f)}}var p=function(t,e,r){for(var s=function(t,e){return e?new te(i.line,l(t,1),"before"):new te(i.line,t,"after")};t>=0&&t0==(1!=o.level),c=a?r.begin:l(r.end,-1);if(o.from<=c&&c0?u.end:l(u.begin,-1);return null==m||r>0&&m==e.text.length||!(g=p(r>0?0:n.length-1,r,c(m)))?null:g}(t.cm,a,e,i):Qs(a,e,i);if(null==o){if(s||(c=e.line+l)=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(a=Kt(t,c))))return!1;e=Js(n,t.cm,a,e.line,l)}else e=o;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,h="group"==r,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(i<0)||c(!f);f=!1){var p=a.text.charAt(e.ch)||"\n",g=tt(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){i<0&&(i=1,c(),e.sticky="after");break}if(g&&(u=g),i>0&&!c(!f))break}var m=ss(t,e,s,o,!0);return ie(s,m)&&(m.hitSide=!0),m}function jo(t,e,i,r){var n,s,o=t.doc,a=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ir(t.display),3);n=(i>0?e.bottom:e.top)+i*c}else"line"==r&&(n=i>0?e.bottom+3:e.top-3);for(;(s=Xi(t,a,n)).outside;){if(i<0?n<=0:n>=o.height){s.hitSide=!0;break}n+=5*i}return s}var Uo=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new j,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ho(t,e){var i=Ri(t,e.line);if(!i||i.hidden)return null;var r=Kt(t.doc,e.line),n=Ai(i,r,e.line),s=ct(r,t.doc.direction),o="left";s&&(o=at(s,e.ch)%2?"right":"left");var a=Pi(n.map,e.ch,o);return a.offset="right"==a.collapse?a.end:a.start,a}function Go(t,e){return e&&(t.bad=!0),t}function zo(t,e,i){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[i]))return Go(t.clipPos(te(t.display.viewTo-1)),!0);e=null,i=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var n=0;n=e.display.viewTo||s.line=e.display.viewFrom&&Ho(e,n)||{node:l[0].measure.map[2],offset:0},u=s.liner.firstLine()&&(o=te(o.line-1,Kt(r.doc,o.line-1).length)),a.ch==Kt(r.doc,a.line).text.length&&a.linen.viewTo-1)return!1;o.line==n.viewFrom||0==(t=cr(r,o.line))?(e=$t(n.view[0].line),i=n.view[0].node):(e=$t(n.view[t].line),i=n.view[t-1].node.nextSibling);var l,c,u=cr(r,a.line);if(u==n.view.length-1?(l=n.viewTo-1,c=n.lineDiv.lastChild):(l=$t(n.view[u+1].line)-1,c=n.view[u+1].node.previousSibling),!i)return!1;for(var h=r.doc.splitLines(function(t,e,i,r,n){var s="",o=!1,a=t.doc.lineSeparator(),l=!1;function c(){o&&(s+=a,l&&(s+=a),o=l=!1)}function u(t){t&&(c(),s+=t)}function h(e){if(1==e.nodeType){var i=e.getAttribute("cm-text");if(i)return void u(i);var s,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(te(r,0),te(n+1,0),(m=+d,function(t){return t.id==m}));return void(f.length&&(s=f[0].find(0))&&u(qt(t.doc,s.from,s.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&c();for(var g=0;g1&&d.length>1;)if(Y(h)==Y(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),e++}for(var f=0,p=0,g=h[0],m=d[0],v=Math.min(g.length,m.length);fo.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var S=te(e,f),C=te(l,d.length?Y(d).length-p:0);return h.length>1||h[0]||ee(S,C)?(ps(r.doc,h,S,C,"+input"),!0):void 0},Uo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Uo.prototype.reset=function(){this.forceCompositionEnd()},Uo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Uo.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Uo.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return ur(t.cm)}))},Uo.prototype.setUneditable=function(t){t.contentEditable="false"},Uo.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Jr(this.cm,_o)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Uo.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Uo.prototype.onContextMenu=function(){},Uo.prototype.resetPosition=function(){},Uo.prototype.needsContentAttribute=!0;var Vo=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new j,this.hasSelection=!1,this.composing=null};Vo.prototype.init=function(t){var e=this,i=this,r=this.cm;this.createField(t);var n=this.textarea;function s(t){if(!gt(r,t)){if(r.somethingSelected())Oo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Po(r);Oo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,G):(i.prevInput="",n.value=e.text.join("\n"),P(n))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(n.style.width="0px"),ht(n,"input",(function(){o&&a>=9&&e.hasSelection&&(e.hasSelection=null),i.poll()})),ht(n,"paste",(function(t){gt(r,t)||Io(t,r)||(r.state.pasteIncoming=+new Date,i.fastPoll())})),ht(n,"cut",s),ht(n,"copy",s),ht(t.scroller,"paste",(function(e){if(!Si(t,e)&&!gt(r,e)){if(!n.dispatchEvent)return r.state.pasteIncoming=+new Date,void i.focus();var s=new Event("paste");s.clipboardData=e.clipboardData,n.dispatchEvent(s)}})),ht(t.lineSpace,"selectstart",(function(e){Si(t,e)||bt(e)})),ht(n,"compositionstart",(function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ht(n,"compositionend",(function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)}))},Vo.prototype.createField=function(t){this.wrapper=Fo(),this.textarea=this.wrapper.firstChild},Vo.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Vo.prototype.prepareSelection=function(){var t=this.cm,e=t.display,i=t.doc,r=mr(t);if(t.options.moveInputWithCursor){var n=Ki(t,i.sel.primary().head,"div"),s=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,n.top+o.top-s.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,n.left+o.left-s.left))}return r},Vo.prototype.showSelection=function(t){var e=this.cm.display;A(e.cursorDiv,t.cursors),A(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Vo.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var i=e.getSelection();this.textarea.value=i,e.state.focused&&P(this.textarea),o&&a>=9&&(this.hasSelection=i)}else t||(this.prevInput=this.textarea.value="",o&&a>=9&&(this.hasSelection=null))}},Vo.prototype.getField=function(){return this.textarea},Vo.prototype.supportsTouch=function(){return!1},Vo.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||_()!=this.textarea))try{this.textarea.focus()}catch(t){}},Vo.prototype.blur=function(){this.textarea.blur()},Vo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Vo.prototype.receivedFocus=function(){this.slowPoll()},Vo.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Vo.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function i(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,i))}))},Vo.prototype.poll=function(){var t=this,e=this.cm,i=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||_t(i)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var n=i.value;if(n==r&&!e.somethingSelected())return!1;if(o&&a>=9&&this.hasSelection===n||y&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var s=n.charCodeAt(0);if(8203!=s||r||(r="​"),8666==s)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,n.length);l1e3||n.indexOf("\n")>-1?i.value=t.prevInput="":t.prevInput=n,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Vo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Vo.prototype.onKeyPress=function(){o&&a>=9&&(this.hasSelection=null),this.fastPoll()},Vo.prototype.onContextMenu=function(t){var e=this,i=e.cm,r=i.display,n=e.textarea;e.contextMenuPending&&e.contextMenuPending();var s=lr(i,t),c=r.scroller.scrollTop;if(s&&!h){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(s)&&Jr(i,Jn)(i.doc,En(s),G);var u,d=n.style.cssText,f=e.wrapper.style.cssText,p=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",n.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-p.top-5)+"px; left: "+(t.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),i.somethingSelected()||(n.value=e.prevInput=" "),e.contextMenuPending=v,r.selForContextMenu=i.doc.sel,clearTimeout(r.detectingSelectAll),o&&a>=9&&m(),w){Ct(t);var g=function(){ft(window,"mouseup",g),setTimeout(v,20)};ht(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=n.selectionStart){var t=i.somethingSelected(),s="​"+(t?n.value:"");n.value="⇚",n.value=s,e.prevInput=t?"":"​",n.selectionStart=1,n.selectionEnd=s.length,r.selForContextMenu=i.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,n.style.cssText=d,o&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=n.selectionStart)){(!o||o&&a<9)&&m();var t=0,s=function(){r.selForContextMenu==i.doc.sel&&0==n.selectionStart&&n.selectionEnd>0&&"​"==e.prevInput?Jr(i,as)(i):t++<10?r.detectingSelectAll=setTimeout(s,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(s,200)}}},Vo.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Vo.prototype.setUneditable=function(){},Vo.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function i(i,r,n,s){t.defaults[i]=r,n&&(e[i]=s?function(t,e,i){i!=Co&&n(t,e,i)}:n)}t.defineOption=i,t.Init=Co,i("value","",(function(t,e){return t.setValue(e)}),!0),i("mode",null,(function(t,e){t.doc.modeOption=e,Rn(t)}),!0),i("indentUnit",2,Rn,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,(function(t){On(t),ji(t),ur(t)}),!0),i("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var i=[],r=t.doc.first;t.doc.iter((function(t){for(var n=0;;){var s=t.text.indexOf(e,n);if(-1==s)break;n=s+e.length,i.push(te(r,s))}r++}));for(var n=i.length-1;n>=0;n--)ps(t.doc,e,i[n],te(i[n].line,i[n].ch+e.length))}})),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,i){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),i!=Co&&t.refresh()})),i("specialCharPlaceholder",Qe,(function(t){return t.refresh()}),!0),i("electricChars",!0),i("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),i("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),i("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),i("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),i("rtlMoveVisually",!x),i("wholeLineUpdateBefore",!0),i("theme","default",(function(t){So(t),gn(t)}),!0),i("keyMap","default",(function(t,e,i){var r=Xs(e),n=i!=Co&&Xs(i);n&&n.detach&&n.detach(t,r),r.attach&&r.attach(t,n||null)})),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,To,!0),i("gutters",[],(function(t,e){t.display.gutterSpecs=fn(e,t.options.lineNumbers),gn(t)}),!0),i("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?sr(t.display)+"px":"0",t.refresh()}),!0),i("coverGutterNextToScrollbar",!1,(function(t){return Ur(t)}),!0),i("scrollbarStyle","native",(function(t){zr(t),Ur(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),i("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=fn(t.options.gutters,e),gn(t)}),!0),i("firstLineNumber",1,gn,!0),i("lineNumberFormatter",(function(t){return t}),gn,!0),i("showCursorWhenSelecting",!1,gr,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,(function(t,e){"nocursor"==e&&(kr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),i("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),i("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),i("dragDrop",!0,Eo),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,gr,!0),i("singleCursorHeightPerLine",!0,gr,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,On,!0),i("addModeClass",!1,On,!0),i("pollInterval",100),i("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),i("historyEventDelay",1250),i("viewportMargin",10,(function(t){return t.refresh()}),!0),i("maxHighlightLength",1e4,On,!0),i("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),i("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),i("autofocus",null),i("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),i("phrases",null)}(Lo),function(t){var e=t.optionHandlers,i=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,i){var r=this.options,n=r[t];r[t]==i&&"mode"!=t||(r[t]=i,e.hasOwnProperty(t)&&Jr(this,e[t])(this,i,n),pt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Xs(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,i=0;ii&&(Do(this,n.head.line,t,!0),i=n.head.line,r==this.doc.sel.primIndex&&Rr(this));else{var s=n.from(),o=n.to(),a=Math.max(i,s.line);i=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=a;l0&&$n(this.doc,r,new wn(s,c[r].to()),G)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,te(t),e,!0)},getTokenTypeAt:function(t){t=ae(this.doc,t);var e,i=de(this,Kt(this.doc,t.line)),r=0,n=(i.length-1)/2,s=t.ch;if(0==s)e=i[2];else for(;;){var o=r+n>>1;if((o?i[2*o-1]:0)>=s)n=o;else{if(!(i[2*o+1]s&&(t=s,n=!0),r=Kt(this.doc,t)}else r=t;return zi(this,r,{top:0,left:0},e||"page",i||n).top+(n?this.doc.height-ze(r):0)},defaultTextHeight:function(){return ir(this.display)},defaultCharWidth:function(){return rr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,i,r,n){var s,o,a,l=this.display,c=(t=Ki(this,ae(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==r)c=t.top;else if("above"==r||"near"==r){var h=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>h)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=h&&(c=t.bottom),u+e.offsetWidth>d&&(u=d-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==n?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==n?u=0:"middle"==n&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),i&&(s=this,o={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(a=Ar(s,o)).scrollTop&&Mr(s,a.scrollTop),null!=a.scrollLeft&&Nr(s,a.scrollLeft))},triggerOnKeyDown:tn(co),triggerOnKeyPress:tn(ho),triggerOnKeyUp:uo,triggerOnMouseDown:tn(mo),execCommand:function(t){if(to.hasOwnProperty(t))return to[t].call(null,this)},triggerElectric:tn((function(t){Mo(this,t)})),findPosH:function(t,e,i,r){var n=1;e<0&&(n=-1,e=-e);for(var s=ae(this.doc,t),o=0;o0&&o(e.charAt(i-1));)--i;for(;r.5||this.options.lineWrapping)&&ar(this),pt(this,"refresh",this)})),swapDoc:tn((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Pn(this,t),ji(this),this.display.input.reset(),Or(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ai(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(t),t.registerHelper=function(e,r,n){i.hasOwnProperty(e)||(i[e]=t[e]={_global:[]}),i[e][r]=n},t.registerGlobalHelper=function(e,r,n,s){t.registerHelper(e,r,s),i[e]._global.push({pred:n,val:s})}}(Lo);var Ko="iter insert remove copy getEditor constructor".split(" ");for(var qo in Rs.prototype)Rs.prototype.hasOwnProperty(qo)&&U(Ko,qo)<0&&(Lo.prototype[qo]=function(t){return function(){return t.apply(this.doc,arguments)}}(Rs.prototype[qo]));return yt(Rs),Lo.inputStyles={textarea:Vo,contenteditable:Uo},Lo.defineMode=function(t){Lo.defaults.mode||"null"==t||(Lo.defaults.mode=t),Ft.apply(this,arguments)},Lo.defineMIME=function(t,e){Nt[t]=e},Lo.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Lo.defineMIME("text/plain","null"),Lo.defineExtension=function(t,e){Lo.prototype[t]=e},Lo.defineDocExtension=function(t,e){Rs.prototype[t]=e},Lo.fromTextArea=function(t,e){if((e=e?F(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var i=_();e.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}function r(){t.value=a.getValue()}var n;if(t.form&&(ht(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var s=t.form;n=s.submit;try{var o=s.submit=function(){r(),s.submit=n,s.submit(),s.submit=o}}catch(t){}}e.finishInit=function(i){i.save=r,i.getTextArea=function(){return t},i.toTextArea=function(){i.toTextArea=isNaN,r(),t.parentNode.removeChild(i.getWrapperElement()),t.style.display="",t.form&&(ft(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=n))}},t.style.display="none";var a=Lo((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return a},function(t){t.off=ft,t.on=ht,t.wheelEventPixels=xn,t.Doc=Rs,t.splitLines=Ot,t.countColumn=B,t.findColumn=V,t.isWordChar=J,t.Pass=H,t.signal=pt,t.Line=Ke,t.changeEnd=Tn,t.scrollbarModel=Gr,t.Pos=te,t.cmpPos=ee,t.modes=Pt,t.mimeModes=Nt,t.resolveMode=Bt,t.getMode=jt,t.modeExtensions=Ut,t.extendMode=Ht,t.copyState=Gt,t.startState=Wt,t.innerMode=zt,t.commands=to,t.keyMap=Gs,t.keyName=Ys,t.isModifierKey=Ks,t.lookupKey=Vs,t.normalizeKeyMap=Ws,t.StringStream=Vt,t.SharedTextMarker=Ts,t.TextMarker=ks,t.LineWidget=Ss,t.e_preventDefault=bt,t.e_stopPropagation=xt,t.e_stop=Ct,t.addClass=I,t.contains=O,t.rmClass=T,t.keyNames=Bs}(Lo),Lo.version="5.58.2",Lo}()},Y1PL: /*!**********************************************************!*\ !*** ./node_modules/rc-textarea/es/index.js + 7 modules ***! \**********************************************************/ @@ -238,7 +238,7 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(t,e,r){"use strict";r.r(e),r.d(e,"ResizableTextArea",(function(){return I}));var i=r("wx14"),n=r("1OyB"),s=r("vuIU"),o=r("Ji7U"),a=r("LK+K"),l=r("q1tI"),c=r("VTBJ"),u=r("rePB"),h=r("Zm9Q"),d=(r("Kwbf"),r("c+Xe")),f=r("m+aA"),p=r("bdgK"),g=new Map;var m=new p.default((function(t){t.forEach((function(t){var e,r=t.target;null===(e=g.get(r))||void 0===e||e.forEach((function(t){return t(r)}))}))}));var v=function(t){Object(o.a)(r,t);var e=Object(a.a)(r);function r(){return Object(n.a)(this,r),e.apply(this,arguments)}return Object(s.a)(r,[{key:"render",value:function(){return this.props.children}}]),r}(l.Component),y=l.createContext(null);function b(t){var e=t.children,r=t.disabled,i=l.useRef(null),n=l.useRef(null),s=l.useContext(y),o=l.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),a=l.isValidElement(e)&&Object(d.c)(e),u=a?e.ref:null,h=l.useMemo((function(){return Object(d.a)(u,i)}),[u,i]),p=l.useRef(t);p.current=t;var b=l.useCallback((function(t){var e=p.current,r=e.onResize,i=e.data,n=t.getBoundingClientRect(),a=n.width,l=n.height,u=t.offsetWidth,h=t.offsetHeight,d=Math.floor(a),f=Math.floor(l);if(o.current.width!==d||o.current.height!==f||o.current.offsetWidth!==u||o.current.offsetHeight!==h){var g={width:d,height:f,offsetWidth:u,offsetHeight:h};o.current=g;var m=u===Math.round(a)?a:u,v=h===Math.round(l)?l:h,y=Object(c.a)(Object(c.a)({},g),{},{offsetWidth:m,offsetHeight:v});null==s||s(y,t,i),r&&Promise.resolve().then((function(){r(y,t)}))}}),[]);return l.useEffect((function(){var t,e,s=Object(f.a)(i.current)||Object(f.a)(n.current);return s&&!r&&(t=s,e=b,g.has(t)||(g.set(t,new Set),m.observe(t)),g.get(t).add(e)),function(){return function(t,e){g.has(t)&&(g.get(t).delete(e),g.get(t).size||(m.unobserve(t),g.delete(t)))}(s,b)}}),[i.current,r]),l.createElement(v,{ref:n},a?l.cloneElement(e,{ref:h}):e)}function x(t){var e=t.children;return Object(h.a)(e).map((function(e,r){var n=(null==e?void 0:e.key)||"".concat("rc-observer-key","-").concat(r);return l.createElement(b,Object(i.a)({},t,{key:n}),e)}))}x.Collection=function(t){var e=t.children,r=t.onBatchResize,i=l.useRef(0),n=l.useRef([]),s=l.useContext(y),o=l.useCallback((function(t,e,o){i.current+=1;var a=i.current;n.current.push({size:t,element:e,data:o}),Promise.resolve().then((function(){a===i.current&&(null==r||r(n.current),n.current=[])})),null==s||s(t,e,o)}),[r,s]);return l.createElement(y.Provider,{value:o},e)};var S,C=x,w=r("bT9E"),k=r("TSYQ"),E=r.n(k),T="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",L=["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"],A={};function D(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&A[r])return A[r];var i=window.getComputedStyle(t),n=i.getPropertyValue("box-sizing")||i.getPropertyValue("-moz-box-sizing")||i.getPropertyValue("-webkit-box-sizing"),s=parseFloat(i.getPropertyValue("padding-bottom"))+parseFloat(i.getPropertyValue("padding-top")),o=parseFloat(i.getPropertyValue("border-bottom-width"))+parseFloat(i.getPropertyValue("border-top-width")),a=L.map((function(t){return"".concat(t,":").concat(i.getPropertyValue(t))})).join(";"),l={sizingStyle:a,paddingSize:s,borderSize:o,boxSizing:n};return e&&r&&(A[r]=l),l}var R,O=r("Gytx"),_=r.n(O);!function(t){t[t.NONE=0]="NONE",t[t.RESIZING=1]="RESIZING",t[t.RESIZED=2]="RESIZED"}(R||(R={}));var I=function(t){Object(o.a)(r,t);var e=Object(a.a)(r);function r(t){var s;return Object(n.a)(this,r),(s=e.call(this,t)).nextFrameActionId=void 0,s.resizeFrameId=void 0,s.textArea=void 0,s.saveTextArea=function(t){s.textArea=t},s.handleResize=function(t){var e=s.state.resizeStatus,r=s.props,i=r.autoSize,n=r.onResize;e===R.NONE&&("function"==typeof n&&n(t),i&&s.resizeOnNextFrame())},s.resizeOnNextFrame=function(){cancelAnimationFrame(s.nextFrameActionId),s.nextFrameActionId=requestAnimationFrame(s.resizeTextarea)},s.resizeTextarea=function(){var t=s.props.autoSize;if(t&&s.textArea){var e=t.minRows,r=t.maxRows,i=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;S||((S=document.createElement("textarea")).setAttribute("tab-index","-1"),S.setAttribute("aria-hidden","true"),document.body.appendChild(S)),t.getAttribute("wrap")?S.setAttribute("wrap",t.getAttribute("wrap")):S.removeAttribute("wrap");var n=D(t,e),s=n.paddingSize,o=n.borderSize,a=n.boxSizing,l=n.sizingStyle;S.setAttribute("style","".concat(l,";").concat(T)),S.value=t.value||t.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,d=S.scrollHeight;if("border-box"===a?d+=o:"content-box"===a&&(d-=s),null!==r||null!==i){S.value=" ";var f=S.scrollHeight-s;null!==r&&(u=f*r,"border-box"===a&&(u=u+s+o),d=Math.max(u,d)),null!==i&&(h=f*i,"border-box"===a&&(h=h+s+o),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(s.textArea,!1,e,r);s.setState({textareaStyles:i,resizeStatus:R.RESIZING},(function(){cancelAnimationFrame(s.resizeFrameId),s.resizeFrameId=requestAnimationFrame((function(){s.setState({resizeStatus:R.RESIZED},(function(){s.resizeFrameId=requestAnimationFrame((function(){s.setState({resizeStatus:R.NONE}),s.fixFirefoxAutoScroll()}))}))}))}))}},s.renderTextArea=function(){var t=s.props,e=t.prefixCls,r=void 0===e?"rc-textarea":e,n=t.autoSize,o=t.onResize,a=t.className,h=t.disabled,d=s.state,f=d.textareaStyles,p=d.resizeStatus,g=Object(w.a)(s.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),m=E()(r,a,Object(u.a)({},"".concat(r,"-disabled"),h));"value"in g&&(g.value=g.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},s.props.style),f),p===R.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(C,{onResize:s.handleResize,disabled:!(n||o)},l.createElement("textarea",Object(i.a)({},g,{className:m,style:v,ref:s.saveTextArea})))},s.state={textareaStyles:{},resizeStatus:R.NONE},s}return Object(s.a)(r,[{key:"componentDidUpdate",value:function(t){t.value===this.props.value&&_()(t.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 t=this.textArea.selectionStart,e=this.textArea.selectionEnd;this.textArea.setSelectionRange(t,e)}}catch(t){}}},{key:"render",value:function(){return this.renderTextArea()}}]),r}(l.Component),M=function(t){Object(o.a)(r,t);var e=Object(a.a)(r);function r(t){var i;Object(n.a)(this,r),(i=e.call(this,t)).resizableTextArea=void 0,i.focus=function(){i.resizableTextArea.textArea.focus()},i.saveTextArea=function(t){i.resizableTextArea=t},i.handleChange=function(t){var e=i.props.onChange;i.setValue(t.target.value,(function(){i.resizableTextArea.resizeTextarea()})),e&&e(t)},i.handleKeyDown=function(t){var e=i.props,r=e.onPressEnter,n=e.onKeyDown;13===t.keyCode&&r&&r(t),n&&n(t)};var s=void 0===t.value||null===t.value?t.defaultValue:t.value;return i.state={value:s},i}return Object(s.a)(r,[{key:"setValue",value:function(t,e){"value"in this.props||this.setState({value:t},e)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(I,Object(i.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(t){return"value"in t?{value:t.value}:null}}]),r}(l.Component);e.default=M},ZW9T: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(t,e,i){"use strict";i.r(e),i.d(e,"ResizableTextArea",(function(){return I}));var r=i("wx14"),n=i("1OyB"),s=i("vuIU"),o=i("Ji7U"),a=i("LK+K"),l=i("q1tI"),c=i("VTBJ"),u=i("rePB"),h=i("Zm9Q"),d=(i("Kwbf"),i("c+Xe")),f=i("m+aA"),p=i("bdgK"),g=new Map;var m=new p.default((function(t){t.forEach((function(t){var e,i=t.target;null===(e=g.get(i))||void 0===e||e.forEach((function(t){return t(i)}))}))}));var v=function(t){Object(o.a)(i,t);var e=Object(a.a)(i);function i(){return Object(n.a)(this,i),e.apply(this,arguments)}return Object(s.a)(i,[{key:"render",value:function(){return this.props.children}}]),i}(l.Component),y=l.createContext(null);function b(t){var e=t.children,i=t.disabled,r=l.useRef(null),n=l.useRef(null),s=l.useContext(y),o=l.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),a=l.isValidElement(e)&&Object(d.c)(e),u=a?e.ref:null,h=l.useMemo((function(){return Object(d.a)(u,r)}),[u,r]),p=l.useRef(t);p.current=t;var b=l.useCallback((function(t){var e=p.current,i=e.onResize,r=e.data,n=t.getBoundingClientRect(),a=n.width,l=n.height,u=t.offsetWidth,h=t.offsetHeight,d=Math.floor(a),f=Math.floor(l);if(o.current.width!==d||o.current.height!==f||o.current.offsetWidth!==u||o.current.offsetHeight!==h){var g={width:d,height:f,offsetWidth:u,offsetHeight:h};o.current=g;var m=u===Math.round(a)?a:u,v=h===Math.round(l)?l:h,y=Object(c.a)(Object(c.a)({},g),{},{offsetWidth:m,offsetHeight:v});null==s||s(y,t,r),i&&Promise.resolve().then((function(){i(y,t)}))}}),[]);return l.useEffect((function(){var t,e,s=Object(f.a)(r.current)||Object(f.a)(n.current);return s&&!i&&(t=s,e=b,g.has(t)||(g.set(t,new Set),m.observe(t)),g.get(t).add(e)),function(){return function(t,e){g.has(t)&&(g.get(t).delete(e),g.get(t).size||(m.unobserve(t),g.delete(t)))}(s,b)}}),[r.current,i]),l.createElement(v,{ref:n},a?l.cloneElement(e,{ref:h}):e)}function x(t){var e=t.children;return Object(h.a)(e).map((function(e,i){var n=(null==e?void 0:e.key)||"".concat("rc-observer-key","-").concat(i);return l.createElement(b,Object(r.a)({},t,{key:n}),e)}))}x.Collection=function(t){var e=t.children,i=t.onBatchResize,r=l.useRef(0),n=l.useRef([]),s=l.useContext(y),o=l.useCallback((function(t,e,o){r.current+=1;var a=r.current;n.current.push({size:t,element:e,data:o}),Promise.resolve().then((function(){a===r.current&&(null==i||i(n.current),n.current=[])})),null==s||s(t,e,o)}),[i,s]);return l.createElement(y.Provider,{value:o},e)};var S,C=x,w=i("bT9E"),k=i("TSYQ"),E=i.n(k),T="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",L=["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"],A={};function D(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&A[i])return A[i];var r=window.getComputedStyle(t),n=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),s=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),a=L.map((function(t){return"".concat(t,":").concat(r.getPropertyValue(t))})).join(";"),l={sizingStyle:a,paddingSize:s,borderSize:o,boxSizing:n};return e&&i&&(A[i]=l),l}var R,O=i("Gytx"),_=i.n(O);!function(t){t[t.NONE=0]="NONE",t[t.RESIZING=1]="RESIZING",t[t.RESIZED=2]="RESIZED"}(R||(R={}));var I=function(t){Object(o.a)(i,t);var e=Object(a.a)(i);function i(t){var s;return Object(n.a)(this,i),(s=e.call(this,t)).nextFrameActionId=void 0,s.resizeFrameId=void 0,s.textArea=void 0,s.saveTextArea=function(t){s.textArea=t},s.handleResize=function(t){var e=s.state.resizeStatus,i=s.props,r=i.autoSize,n=i.onResize;e===R.NONE&&("function"==typeof n&&n(t),r&&s.resizeOnNextFrame())},s.resizeOnNextFrame=function(){cancelAnimationFrame(s.nextFrameActionId),s.nextFrameActionId=requestAnimationFrame(s.resizeTextarea)},s.resizeTextarea=function(){var t=s.props.autoSize;if(t&&s.textArea){var e=t.minRows,i=t.maxRows,r=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;S||((S=document.createElement("textarea")).setAttribute("tab-index","-1"),S.setAttribute("aria-hidden","true"),document.body.appendChild(S)),t.getAttribute("wrap")?S.setAttribute("wrap",t.getAttribute("wrap")):S.removeAttribute("wrap");var n=D(t,e),s=n.paddingSize,o=n.borderSize,a=n.boxSizing,l=n.sizingStyle;S.setAttribute("style","".concat(l,";").concat(T)),S.value=t.value||t.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,d=S.scrollHeight;if("border-box"===a?d+=o:"content-box"===a&&(d-=s),null!==i||null!==r){S.value=" ";var f=S.scrollHeight-s;null!==i&&(u=f*i,"border-box"===a&&(u=u+s+o),d=Math.max(u,d)),null!==r&&(h=f*r,"border-box"===a&&(h=h+s+o),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(s.textArea,!1,e,i);s.setState({textareaStyles:r,resizeStatus:R.RESIZING},(function(){cancelAnimationFrame(s.resizeFrameId),s.resizeFrameId=requestAnimationFrame((function(){s.setState({resizeStatus:R.RESIZED},(function(){s.resizeFrameId=requestAnimationFrame((function(){s.setState({resizeStatus:R.NONE}),s.fixFirefoxAutoScroll()}))}))}))}))}},s.renderTextArea=function(){var t=s.props,e=t.prefixCls,i=void 0===e?"rc-textarea":e,n=t.autoSize,o=t.onResize,a=t.className,h=t.disabled,d=s.state,f=d.textareaStyles,p=d.resizeStatus,g=Object(w.a)(s.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),m=E()(i,a,Object(u.a)({},"".concat(i,"-disabled"),h));"value"in g&&(g.value=g.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},s.props.style),f),p===R.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(C,{onResize:s.handleResize,disabled:!(n||o)},l.createElement("textarea",Object(r.a)({},g,{className:m,style:v,ref:s.saveTextArea})))},s.state={textareaStyles:{},resizeStatus:R.NONE},s}return Object(s.a)(i,[{key:"componentDidUpdate",value:function(t){t.value===this.props.value&&_()(t.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 t=this.textArea.selectionStart,e=this.textArea.selectionEnd;this.textArea.setSelectionRange(t,e)}}catch(t){}}},{key:"render",value:function(){return this.renderTextArea()}}]),i}(l.Component),M=function(t){Object(o.a)(i,t);var e=Object(a.a)(i);function i(t){var r;Object(n.a)(this,i),(r=e.call(this,t)).resizableTextArea=void 0,r.focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(t){r.resizableTextArea=t},r.handleChange=function(t){var e=r.props.onChange;r.setValue(t.target.value,(function(){r.resizableTextArea.resizeTextarea()})),e&&e(t)},r.handleKeyDown=function(t){var e=r.props,i=e.onPressEnter,n=e.onKeyDown;13===t.keyCode&&i&&i(t),n&&n(t)};var s=void 0===t.value||null===t.value?t.defaultValue:t.value;return r.state={value:s},r}return Object(s.a)(i,[{key:"setValue",value:function(t,e){"value"in this.props||this.setState({value:t},e)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(I,Object(r.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(t){return"value"in t?{value:t.value}:null}}]),i}(l.Component);e.default=M},ZW9T: /*!************************************************************!*\ !*** ./src/components/monaco-editor/index.jsx + 1 modules ***! \************************************************************/ @@ -251,33 +251,33 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */function(t,e,r){"use strict";r.d(e,"a",(function(){return v}));var i=r("k1fw"),n=(r("miYZ"),r("tsqr")),s=r("rAM+"),o=r("tJVT"),a=r("PpiC"),l=r("q1tI"),c=r.n(l),u=r("bdgK");function h(t,e,r,n,s){var o=e.getWordUntilPosition(r),a={startLineNumber:r.lineNumber,endLineNumber:r.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=n.map((function(e){return{label:e,kind:t.languages.CompletionItemKind.Keyword,insertText:e,insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:a}}));return s.map((function(t){l.push(Object(i.a)(Object(i.a)({},t),{},{range:a}))})),l}r("LvDl");function d(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}function f(){}var p={"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 g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t;if(Array.isArray(t)){for(var r=0;r0||i.target.offsetWidth>0)&&V.current.instance.layout()}}catch(t){r.e(t)}finally{r.f()}}))).observe(W.current),t}();return Q(!0),function(){var t=V.current.instance;t.dispose();var e=t.getModel();e&&e.dispose(),V.current.subscription&&V.current.subscription.dispose(),P&&window.removeEventListener("paste",tt),r.unobserve(W.current)}}catch(t){}}))}),[]),Object(l.useEffect)((function(){if(V.current.instance&&Z)return document.addEventListener("keydown",et,!1),function(){document.removeEventListener("keydown",et)}}),[O,Z]),Object(l.useEffect)((function(){var t=V.current.instance;if(t&&Z){var e=g(S);m.editor.setModelLanguage(t.getModel(),e),console.log("language:",S,t.getModel(),e)}}),[S,Z]),Object(l.useEffect)((function(){V.current.instance&&Z&&m.editor.setTheme(D)}),[D,Z]),Object(l.useEffect)((function(){var t=V.current.instance;t&&Z&&(t.updateOptions(Object(i.a)({},E)),setTimeout((function(){t.getModel().updateOptions(Object(i.a)({},E))}),200))}),[JSON.stringify(E),Z]),Object(l.useEffect)((function(){var t=V.current.instance;t&&Z&&t.layout()}),[p,y,Z]);var nt=Object(l.useState)(d(p)),st=Object(o.a)(nt,2),ot=st[0],at=(st[1],Object(l.useState)(d(y))),lt=Object(o.a)(at,2),ct=lt[0],ut=lt[1],ht=Object(i.a)(Object(i.a)({},w),{},{width:ot,height:ct});return c.a.createElement("div",{className:"my-monaco-editor",ref:W,style:ht})};function v(t){var e=t.width,n=void 0===e?"100%":e,a=t.height,h=void 0===a?"100%":a,f=t.original,p=t.modified,g=t.language,v=t.options,y=void 0===v?{}:v,b=Object(l.useRef)(),x=Object(l.useState)(null),S=Object(o.a)(x,2),C=S[0],w=S[1];Object(l.useEffect)((function(){b.current&&r.e(/*! import() | monaco-editor */27).then(r.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(t){var e=(m=t).editor.createDiffEditor(b.current,Object(i.a)(Object(i.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},y),{},{wordWrap:!0}));w(e);var r=function(t){var e;return b.current&&(e=new u.default((function(e){var r,i=Object(s.a)(e);try{for(i.s();!(r=i.n()).done;){var n=r.value;(n.target.offsetHeight>0||n.target.offsetWidth>0)&&t.layout()}}catch(t){i.e(t)}finally{i.f()}}))).observe(b.current),e}(e);return function(){e.dispose();var t=e.getModel();t&&t.dispose(),r.unobserve(b.current)}}))}),[]),Object(l.useEffect)((function(){C&&C.setModel({original:m.editor.createModel(f,g),modified:m.editor.createModel(p,g)})}),[f,p,g,C]);var k={width:d(n),height:d(h)};return c.a.createElement("div",{className:"my-diff-editor",ref:b,style:k})}},ZpRC: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */function(t,e,i){"use strict";i.d(e,"a",(function(){return v}));var r=i("k1fw"),n=(i("miYZ"),i("tsqr")),s=i("rAM+"),o=i("tJVT"),a=i("PpiC"),l=i("q1tI"),c=i.n(l),u=i("bdgK");function h(t,e,i,n,s){var o=e.getWordUntilPosition(i),a={startLineNumber:i.lineNumber,endLineNumber:i.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=n.map((function(e){return{label:e,kind:t.languages.CompletionItemKind.Keyword,insertText:e,insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:a}}));return s.map((function(t){l.push(Object(r.a)(Object(r.a)({},t),{},{range:a}))})),l}i("LvDl");function d(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}function f(){}var p={"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 g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t;if(Array.isArray(t)){for(var i=0;i0||r.target.offsetWidth>0)&&V.current.instance.layout()}}catch(t){i.e(t)}finally{i.f()}}))).observe(W.current),t}();return Q(!0),function(){var t=V.current.instance;t.dispose();var e=t.getModel();e&&e.dispose(),V.current.subscription&&V.current.subscription.dispose(),P&&window.removeEventListener("paste",tt),i.unobserve(W.current)}}catch(t){}}))}),[]),Object(l.useEffect)((function(){if(V.current.instance&&Z)return document.addEventListener("keydown",et,!1),function(){document.removeEventListener("keydown",et)}}),[O,Z]),Object(l.useEffect)((function(){var t=V.current.instance;if(t&&Z){var e=g(S);m.editor.setModelLanguage(t.getModel(),e),console.log("language:",S,t.getModel(),e)}}),[S,Z]),Object(l.useEffect)((function(){V.current.instance&&Z&&m.editor.setTheme(D)}),[D,Z]),Object(l.useEffect)((function(){var t=V.current.instance;t&&Z&&(t.updateOptions(Object(r.a)({},E)),setTimeout((function(){t.getModel().updateOptions(Object(r.a)({},E))}),200))}),[JSON.stringify(E),Z]),Object(l.useEffect)((function(){var t=V.current.instance;t&&Z&&t.layout()}),[p,y,Z]);var nt=Object(l.useState)(d(p)),st=Object(o.a)(nt,2),ot=st[0],at=(st[1],Object(l.useState)(d(y))),lt=Object(o.a)(at,2),ct=lt[0],ut=lt[1],ht=Object(r.a)(Object(r.a)({},w),{},{width:ot,height:ct});return c.a.createElement("div",{className:"my-monaco-editor",ref:W,style:ht})};function v(t){var e=t.width,n=void 0===e?"100%":e,a=t.height,h=void 0===a?"100%":a,f=t.original,p=t.modified,g=t.language,v=t.options,y=void 0===v?{}:v,b=Object(l.useRef)(),x=Object(l.useState)(null),S=Object(o.a)(x,2),C=S[0],w=S[1];Object(l.useEffect)((function(){b.current&&i.e(/*! import() | monaco-editor */27).then(i.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(t){var e=(m=t).editor.createDiffEditor(b.current,Object(r.a)(Object(r.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},y),{},{wordWrap:!0}));w(e);var i=function(t){var e;return b.current&&(e=new u.default((function(e){var i,r=Object(s.a)(e);try{for(r.s();!(i=r.n()).done;){var n=i.value;(n.target.offsetHeight>0||n.target.offsetWidth>0)&&t.layout()}}catch(t){r.e(t)}finally{r.f()}}))).observe(b.current),e}(e);return function(){e.dispose();var t=e.getModel();t&&t.dispose(),i.unobserve(b.current)}}))}),[]),Object(l.useEffect)((function(){C&&C.setModel({original:m.editor.createModel(f,g),modified:m.editor.createModel(p,g)})}),[f,p,g,C]);var k={width:d(n),height:d(h)};return c.a.createElement("div",{className:"my-diff-editor",ref:b,style:k})}},ZpRC: /*!*************************************************************************!*\ !*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***! \*************************************************************************/ /*! exports provided: default */ -/*! exports used: default */function(t,e,r){"use strict";function i(t){return"object"==typeof t&&null!=t&&1===t.nodeType}function n(t,e){return(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function s(t,e){if(t.clientHeighte||s>t&&o=e&&a>=r?s-t-i:o>e&&ar?o-e+n:0}var a=function(t,e){var r=window,n=e.scrollMode,a=e.block,l=e.inline,c=e.boundary,u=e.skipOverflowHiddenElements,h="function"==typeof c?c:function(t){return t!==c};if(!i(t))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],p=t;i(p)&&h(p);){if((p=p.parentElement)===d){f.push(p);break}null!=p&&p===document.body&&s(p)&&!s(document.documentElement)||null!=p&&s(p,u)&&f.push(p)}for(var g=r.visualViewport?r.visualViewport.width:innerWidth,m=r.visualViewport?r.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=t.getBoundingClientRect(),x=b.height,S=b.width,C=b.top,w=b.right,k=b.bottom,E=b.left,T="start"===a||"nearest"===a?C:"end"===a?k:C+x/2,L="center"===l?E+S/2:"end"===l?w:E,A=[],D=0;D=0&&E>=0&&k<=m&&w<=g&&C>=M&&k<=N&&E>=F&&w<=P)return A;var B=getComputedStyle(R),j=parseInt(B.borderLeftWidth,10),U=parseInt(B.borderTopWidth,10),H=parseInt(B.borderRightWidth,10),G=parseInt(B.borderBottomWidth,10),z=0,W=0,V="offsetWidth"in R?R.offsetWidth-R.clientWidth-j-H:0,K="offsetHeight"in R?R.offsetHeight-R.clientHeight-U-G:0;if(d===R)z="start"===a?T:"end"===a?T-m:"nearest"===a?o(y,y+m,m,U,G,y+T,y+T+x,x):T-m/2,W="start"===l?L:"center"===l?L-g/2:"end"===l?L-g:o(v,v+g,g,j,H,v+L,v+L+S,S),z=Math.max(0,z+y),W=Math.max(0,W+v);else{z="start"===a?T-M-U:"end"===a?T-N+G+K:"nearest"===a?o(M,N,_,U,G+K,T,T+x,x):T-(M+_/2)+K/2,W="start"===l?L-F-j:"center"===l?L-(F+I/2)+V/2:"end"===l?L-P+H+V:o(F,P,I,j,H+V,L,L+S,S);var q=R.scrollLeft,Y=R.scrollTop;T+=Y-(z=Math.max(0,Math.min(Y+z,R.scrollHeight-_+K))),L+=q-(W=Math.max(0,Math.min(q+W,R.scrollWidth-I+V)))}A.push({el:R,top:z,left:W})}return A};function l(t){return t===Object(t)&&0!==Object.keys(t).length}e.a=function(t,e){var r=!t.ownerDocument.documentElement.contains(t);if(l(e)&&"function"==typeof e.behavior)return e.behavior(r?[]:a(t,e));if(!r){var i=function(t){return!1===t?{block:"end",inline:"nearest"}:l(t)?t:{block:"start",inline:"nearest"}}(e);return function(t,e){void 0===e&&(e="auto");var r="scrollBehavior"in document.body.style;t.forEach((function(t){var i=t.el,n=t.top,s=t.left;i.scroll&&r?i.scroll({top:n,left:s,behavior:e}):(i.scrollTop=n,i.scrollLeft=s)}))}(a(t,i),i.behavior)}}},Zss7: +/*! exports used: default */function(t,e,i){"use strict";function r(t){return"object"==typeof t&&null!=t&&1===t.nodeType}function n(t,e){return(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function s(t,e){if(t.clientHeighte||s>t&&o=e&&a>=i?s-t-r:o>e&&ai?o-e+n:0}var a=function(t,e){var i=window,n=e.scrollMode,a=e.block,l=e.inline,c=e.boundary,u=e.skipOverflowHiddenElements,h="function"==typeof c?c:function(t){return t!==c};if(!r(t))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],p=t;r(p)&&h(p);){if((p=p.parentElement)===d){f.push(p);break}null!=p&&p===document.body&&s(p)&&!s(document.documentElement)||null!=p&&s(p,u)&&f.push(p)}for(var g=i.visualViewport?i.visualViewport.width:innerWidth,m=i.visualViewport?i.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=t.getBoundingClientRect(),x=b.height,S=b.width,C=b.top,w=b.right,k=b.bottom,E=b.left,T="start"===a||"nearest"===a?C:"end"===a?k:C+x/2,L="center"===l?E+S/2:"end"===l?w:E,A=[],D=0;D=0&&E>=0&&k<=m&&w<=g&&C>=M&&k<=N&&E>=F&&w<=P)return A;var B=getComputedStyle(R),j=parseInt(B.borderLeftWidth,10),U=parseInt(B.borderTopWidth,10),H=parseInt(B.borderRightWidth,10),G=parseInt(B.borderBottomWidth,10),z=0,W=0,V="offsetWidth"in R?R.offsetWidth-R.clientWidth-j-H:0,K="offsetHeight"in R?R.offsetHeight-R.clientHeight-U-G:0;if(d===R)z="start"===a?T:"end"===a?T-m:"nearest"===a?o(y,y+m,m,U,G,y+T,y+T+x,x):T-m/2,W="start"===l?L:"center"===l?L-g/2:"end"===l?L-g:o(v,v+g,g,j,H,v+L,v+L+S,S),z=Math.max(0,z+y),W=Math.max(0,W+v);else{z="start"===a?T-M-U:"end"===a?T-N+G+K:"nearest"===a?o(M,N,_,U,G+K,T,T+x,x):T-(M+_/2)+K/2,W="start"===l?L-F-j:"center"===l?L-(F+I/2)+V/2:"end"===l?L-P+H+V:o(F,P,I,j,H+V,L,L+S,S);var q=R.scrollLeft,Y=R.scrollTop;T+=Y-(z=Math.max(0,Math.min(Y+z,R.scrollHeight-_+K))),L+=q-(W=Math.max(0,Math.min(q+W,R.scrollWidth-I+V)))}A.push({el:R,top:z,left:W})}return A};function l(t){return t===Object(t)&&0!==Object.keys(t).length}e.a=function(t,e){var i=!t.ownerDocument.documentElement.contains(t);if(l(e)&&"function"==typeof e.behavior)return e.behavior(i?[]:a(t,e));if(!i){var r=function(t){return!1===t?{block:"end",inline:"nearest"}:l(t)?t:{block:"start",inline:"nearest"}}(e);return function(t,e){void 0===e&&(e="auto");var i="scrollBehavior"in document.body.style;t.forEach((function(t){var r=t.el,n=t.top,s=t.left;r.scroll&&i?r.scroll({top:n,left:s,behavior:e}):(r.scrollTop=n,r.scrollLeft=s)}))}(a(t,r),r.behavior)}}},Zss7: /*!**********************************************!*\ !*** ./node_modules/tinycolor2/tinycolor.js ***! \**********************************************/ /*! no static exports found */ /*! exports used: default */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){var i;!function(n){var s=/^\s+/,o=/\s+$/,a=0,l=n.round,c=n.min,u=n.max,h=n.random;function d(t,e){if(e=e||{},(t=t||"")instanceof d)return t;if(!(this instanceof d))return new d(t,e);var r=function(t){var e={r:0,g:0,b:0},r=1,i=null,a=null,l=null,h=!1,d=!1;"string"==typeof t&&(t=function(t){t=t.replace(s,"").replace(o,"").toLowerCase();var e,r=!1;if(R[t])t=R[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=z.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=z.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=z.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=z.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=z.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=z.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=z.hex8.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),a:j(e[4]),format:r?"name":"hex8"};if(e=z.hex6.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),format:r?"name":"hex"};if(e=z.hex4.exec(t))return{r:P(e[1]+""+e[1]),g:P(e[2]+""+e[2]),b:P(e[3]+""+e[3]),a:j(e[4]+""+e[4]),format:r?"name":"hex8"};if(e=z.hex3.exec(t))return{r:P(e[1]+""+e[1]),g:P(e[2]+""+e[2]),b:P(e[3]+""+e[3]),format:r?"name":"hex"};return!1}(t));"object"==typeof t&&(W(t.r)&&W(t.g)&&W(t.b)?(f=t.r,p=t.g,g=t.b,e={r:255*I(f,255),g:255*I(p,255),b:255*I(g,255)},h=!0,d="%"===String(t.r).substr(-1)?"prgb":"rgb"):W(t.h)&&W(t.s)&&W(t.v)?(i=F(t.s),a=F(t.v),e=function(t,e,r){t=6*I(t,360),e=I(e,100),r=I(r,100);var i=n.floor(t),s=t-i,o=r*(1-e),a=r*(1-s*e),l=r*(1-(1-s)*e),c=i%6;return{r:255*[r,a,o,o,l,r][c],g:255*[l,r,r,a,o,o][c],b:255*[o,o,l,r,r,a][c]}}(t.h,i,a),h=!0,d="hsv"):W(t.h)&&W(t.s)&&W(t.l)&&(i=F(t.s),l=F(t.l),e=function(t,e,r){var i,n,s;function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=I(t,360),e=I(e,100),r=I(r,100),0===e)i=n=s=r;else{var a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;i=o(l,a,t+1/3),n=o(l,a,t),s=o(l,a,t-1/3)}return{r:255*i,g:255*n,b:255*s}}(t.h,i,l),h=!0,d="hsl"),t.hasOwnProperty("a")&&(r=t.a));var f,p,g;return r=_(r),{ok:h,format:t.format||d,r:c(255,u(e.r,0)),g:c(255,u(e.g,0)),b:c(255,u(e.b,0)),a:r}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=l(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=r.ok,this._tc_id=a++}function f(t,e,r){t=I(t,255),e=I(e,255),r=I(r,255);var i,n,s=u(t,e,r),o=c(t,e,r),a=(s+o)/2;if(s==o)i=n=0;else{var l=s-o;switch(n=a>.5?l/(2-s-o):l/(s+o),s){case t:i=(e-r)/l+(e>1)+720)%360;--e;)i.h=(i.h+n)%360,s.push(d(i));return s}function D(t,e){e=e||6;for(var r=d(t).toHsv(),i=r.h,n=r.s,s=r.v,o=[],a=1/e;e--;)o.push(d({h:i,s:n,v:s})),s=(s+a)%1;return o}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,i=this.toRgb();return t=i.r/255,e=i.g/255,r=i.b/255,.2126*(t<=.03928?t/12.92:n.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:n.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:n.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=_(t),this._roundA=l(100*this._a)/100,this},toHsv:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=p(this._r,this._g,this._b),e=l(360*t.h),r=l(100*t.s),i=l(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+i+"%)":"hsva("+e+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=f(this._r,this._g,this._b),e=l(360*t.h),r=l(100*t.s),i=l(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+i+"%)":"hsla("+e+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return g(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,i,n){var s=[N(l(t).toString(16)),N(l(e).toString(16)),N(l(r).toString(16)),N(B(i))];if(n&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1))return s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0);return s.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*I(this._r,255))+"%",g:l(100*I(this._g,255))+"%",b:l(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%)":"rgba("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(O[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+m(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var n=d(t);r="#"+m(n._r,n._g,n._b,n._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0;return e||!i||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(S,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(k,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(L,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},d.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]="a"===i?t[i]:F(t[i]));t=r}return d(t,e)},d.equals=function(t,e){return!(!t||!e)&&d(t).toRgbString()==d(e).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(t,e,r){r=0===r?0:r||50;var i=d(t).toRgb(),n=d(e).toRgb(),s=r/100;return d({r:(n.r-i.r)*s+i.r,g:(n.g-i.g)*s+i.g,b:(n.b-i.b)*s+i.b,a:(n.a-i.a)*s+i.a})},d.readability=function(t,e){var r=d(t),i=d(e);return(n.max(r.getLuminance(),i.getLuminance())+.05)/(n.min(r.getLuminance(),i.getLuminance())+.05)},d.isReadable=function(t,e,r){var i,n,s=d.readability(t,e);switch(n=!1,(i=function(t){var e,r;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==r&&"large"!==r&&(r="small");return{level:e,size:r}}(r)).level+i.size){case"AAsmall":case"AAAlarge":n=s>=4.5;break;case"AAlarge":n=s>=3;break;case"AAAsmall":n=s>=7}return n},d.mostReadable=function(t,e,r){var i,n,s,o,a=null,l=0;n=(r=r||{}).includeFallbackColors,s=r.level,o=r.size;for(var c=0;cl&&(l=i,a=d(e[c]));return d.isReadable(t,a,{level:s,size:o})||!n?a:(r.includeFallbackColors=!1,d.mostReadable(t,["#fff","#000"],r))};var R=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},O=d.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(R);function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function I(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=c(e,u(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),n.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function M(t){return c(1,u(0,t))}function P(t){return parseInt(t,16)}function N(t){return 1==t.length?"0"+t:""+t}function F(t){return t<=1&&(t=100*t+"%"),t}function B(t){return n.round(255*parseFloat(t)).toString(16)}function j(t){return P(t)/255}var U,H,G,z=(H="[\\s|\\(]+("+(U="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",G="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+G),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+G),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+G),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(t){return!!z.CSS_UNIT.exec(t)}t.exports?t.exports=d:void 0===(i=function(){return d}.call(e,r,e,t))||(t.exports=i)}(Math)},bT9E: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){var r;!function(n){var s=/^\s+/,o=/\s+$/,a=0,l=n.round,c=n.min,u=n.max,h=n.random;function d(t,e){if(e=e||{},(t=t||"")instanceof d)return t;if(!(this instanceof d))return new d(t,e);var i=function(t){var e={r:0,g:0,b:0},i=1,r=null,a=null,l=null,h=!1,d=!1;"string"==typeof t&&(t=function(t){t=t.replace(s,"").replace(o,"").toLowerCase();var e,i=!1;if(R[t])t=R[t],i=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=z.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=z.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=z.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=z.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=z.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=z.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=z.hex8.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),a:j(e[4]),format:i?"name":"hex8"};if(e=z.hex6.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),format:i?"name":"hex"};if(e=z.hex4.exec(t))return{r:P(e[1]+""+e[1]),g:P(e[2]+""+e[2]),b:P(e[3]+""+e[3]),a:j(e[4]+""+e[4]),format:i?"name":"hex8"};if(e=z.hex3.exec(t))return{r:P(e[1]+""+e[1]),g:P(e[2]+""+e[2]),b:P(e[3]+""+e[3]),format:i?"name":"hex"};return!1}(t));"object"==typeof t&&(W(t.r)&&W(t.g)&&W(t.b)?(f=t.r,p=t.g,g=t.b,e={r:255*I(f,255),g:255*I(p,255),b:255*I(g,255)},h=!0,d="%"===String(t.r).substr(-1)?"prgb":"rgb"):W(t.h)&&W(t.s)&&W(t.v)?(r=F(t.s),a=F(t.v),e=function(t,e,i){t=6*I(t,360),e=I(e,100),i=I(i,100);var r=n.floor(t),s=t-r,o=i*(1-e),a=i*(1-s*e),l=i*(1-(1-s)*e),c=r%6;return{r:255*[i,a,o,o,l,i][c],g:255*[l,i,i,a,o,o][c],b:255*[o,o,l,i,i,a][c]}}(t.h,r,a),h=!0,d="hsv"):W(t.h)&&W(t.s)&&W(t.l)&&(r=F(t.s),l=F(t.l),e=function(t,e,i){var r,n,s;function o(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}if(t=I(t,360),e=I(e,100),i=I(i,100),0===e)r=n=s=i;else{var a=i<.5?i*(1+e):i+e-i*e,l=2*i-a;r=o(l,a,t+1/3),n=o(l,a,t),s=o(l,a,t-1/3)}return{r:255*r,g:255*n,b:255*s}}(t.h,r,l),h=!0,d="hsl"),t.hasOwnProperty("a")&&(i=t.a));var f,p,g;return i=_(i),{ok:h,format:t.format||d,r:c(255,u(e.r,0)),g:c(255,u(e.g,0)),b:c(255,u(e.b,0)),a:i}}(t);this._originalInput=t,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=l(100*this._a)/100,this._format=e.format||i.format,this._gradientType=e.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=i.ok,this._tc_id=a++}function f(t,e,i){t=I(t,255),e=I(e,255),i=I(i,255);var r,n,s=u(t,e,i),o=c(t,e,i),a=(s+o)/2;if(s==o)r=n=0;else{var l=s-o;switch(n=a>.5?l/(2-s-o):l/(s+o),s){case t:r=(e-i)/l+(e>1)+720)%360;--e;)r.h=(r.h+n)%360,s.push(d(r));return s}function D(t,e){e=e||6;for(var i=d(t).toHsv(),r=i.h,n=i.s,s=i.v,o=[],a=1/e;e--;)o.push(d({h:r,s:n,v:s})),s=(s+a)%1;return o}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,i,r=this.toRgb();return t=r.r/255,e=r.g/255,i=r.b/255,.2126*(t<=.03928?t/12.92:n.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:n.pow((e+.055)/1.055,2.4))+.0722*(i<=.03928?i/12.92:n.pow((i+.055)/1.055,2.4))},setAlpha:function(t){return this._a=_(t),this._roundA=l(100*this._a)/100,this},toHsv:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=p(this._r,this._g,this._b),e=l(360*t.h),i=l(100*t.s),r=l(100*t.v);return 1==this._a?"hsv("+e+", "+i+"%, "+r+"%)":"hsva("+e+", "+i+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=f(this._r,this._g,this._b),e=l(360*t.h),i=l(100*t.s),r=l(100*t.l);return 1==this._a?"hsl("+e+", "+i+"%, "+r+"%)":"hsla("+e+", "+i+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return g(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,i,r,n){var s=[N(l(t).toString(16)),N(l(e).toString(16)),N(l(i).toString(16)),N(B(r))];if(n&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1))return s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0);return s.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*I(this._r,255))+"%",g:l(100*I(this._g,255))+"%",b:l(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%)":"rgba("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(O[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+m(this._r,this._g,this._b,this._a),i=e,r=this._gradientType?"GradientType = 1, ":"";if(t){var n=d(t);i="#"+m(n._r,n._g,n._b,n._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+i+")"},toString:function(t){var e=!!t;t=t||this._format;var i=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(i=this.toRgbString()),"prgb"===t&&(i=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(i=this.toHexString()),"hex3"===t&&(i=this.toHexString(!0)),"hex4"===t&&(i=this.toHex8String(!0)),"hex8"===t&&(i=this.toHex8String()),"name"===t&&(i=this.toName()),"hsl"===t&&(i=this.toHslString()),"hsv"===t&&(i=this.toHsvString()),i||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(t,e){var i=t.apply(null,[this].concat([].slice.call(e)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(S,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(k,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(L,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},d.fromRatio=function(t,e){if("object"==typeof t){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]="a"===r?t[r]:F(t[r]));t=i}return d(t,e)},d.equals=function(t,e){return!(!t||!e)&&d(t).toRgbString()==d(e).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(t,e,i){i=0===i?0:i||50;var r=d(t).toRgb(),n=d(e).toRgb(),s=i/100;return d({r:(n.r-r.r)*s+r.r,g:(n.g-r.g)*s+r.g,b:(n.b-r.b)*s+r.b,a:(n.a-r.a)*s+r.a})},d.readability=function(t,e){var i=d(t),r=d(e);return(n.max(i.getLuminance(),r.getLuminance())+.05)/(n.min(i.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(t,e,i){var r,n,s=d.readability(t,e);switch(n=!1,(r=function(t){var e,i;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),i=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==i&&"large"!==i&&(i="small");return{level:e,size:i}}(i)).level+r.size){case"AAsmall":case"AAAlarge":n=s>=4.5;break;case"AAlarge":n=s>=3;break;case"AAAsmall":n=s>=7}return n},d.mostReadable=function(t,e,i){var r,n,s,o,a=null,l=0;n=(i=i||{}).includeFallbackColors,s=i.level,o=i.size;for(var c=0;cl&&(l=r,a=d(e[c]));return d.isReadable(t,a,{level:s,size:o})||!n?a:(i.includeFallbackColors=!1,d.mostReadable(t,["#fff","#000"],i))};var R=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},O=d.hexNames=function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}(R);function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function I(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var i=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=c(e,u(0,parseFloat(t))),i&&(t=parseInt(t*e,10)/100),n.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function M(t){return c(1,u(0,t))}function P(t){return parseInt(t,16)}function N(t){return 1==t.length?"0"+t:""+t}function F(t){return t<=1&&(t=100*t+"%"),t}function B(t){return n.round(255*parseFloat(t)).toString(16)}function j(t){return P(t)/255}var U,H,G,z=(H="[\\s|\\(]+("+(U="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",G="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+G),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+G),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+G),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(t){return!!z.CSS_UNIT.exec(t)}t.exports?t.exports=d:void 0===(r=function(){return d}.call(e,i,e,t))||(t.exports=r)}(Math)},bT9E: /*!*****************************************!*\ !*** ./node_modules/rc-util/es/omit.js ***! \*****************************************/ /*! exports provided: default */ -/*! exports used: default */function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var i=r(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function n(t,e){var r=Object(i.a)({},t);return Array.isArray(e)&&e.forEach((function(t){delete r[t]})),r}},c5Ni: +/*! exports used: default */function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var r=i(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function n(t,e){var i=Object(r.a)({},t);return Array.isArray(e)&&e.forEach((function(t){delete i[t]})),i}},c5Ni: /*!******************************************************!*\ !*** ./node_modules/codemirror/theme/blackboard.css ***! \******************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){},dejd: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){},dejd: /*!***********************************************************!*\ !*** ./src/components/markdown-editor/toolbar/index.less ***! \***********************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){},dmUQ: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){},dmUQ: /*!**************************************************************!*\ !*** ./node_modules/rc-input-number/es/index.js + 1 modules ***! \**************************************************************/ @@ -292,446 +292,446 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,r){"use strict";var i=r("Ff2n"),n=r("rePB"),s=r("1OyB"),o=r("vuIU"),a=r("Ji7U"),l=r("md7G"),c=r("foSv"),u=r("q1tI"),h=r.n(u),d=r("TSYQ"),f=r.n(d),p=r("4IlW");function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function m(t){for(var e=1;e1?a-1:0),c=1;c1?r-1:0),s=1;s=0)return parseInt(e.slice(e.indexOf("e-")+2),10);var r=0;return e.indexOf(".")>=0&&(r=e.length-e.indexOf(".")-1),r},i.getInputDisplayValue=function(t){var e,r=t||i.state,n=r.focused,s=r.inputValue,o=r.value;null==(e=n?s:i.toPrecisionAsStep(o))&&(e="");var a=i.formatWrapper(e);return S(i.props.decimalSeparator)&&(a=a.toString().replace(".",i.props.decimalSeparator)),a},i.recordCursorPosition=function(){try{i.cursorStart=i.input.selectionStart,i.cursorEnd=i.input.selectionEnd,i.currentValue=i.input.value,i.cursorBefore=i.input.value.substring(0,i.cursorStart),i.cursorAfter=i.input.value.substring(i.cursorEnd)}catch(t){}},i.restoreByAfter=function(t){if(void 0===t)return!1;var e=i.input.value,r=e.lastIndexOf(t);if(-1===r)return!1;var n=i.cursorBefore.length;return i.lastKeyCode===p.a.DELETE&&i.cursorBefore.charAt(n-1)===t[0]?(i.fixCaret(n,n),!0):r+t.length===e.length&&(i.fixCaret(r,r),!0)},i.partRestoreByAfter=function(t){return void 0!==t&&Array.prototype.some.call(t,(function(e,r){var n=t.substring(r);return i.restoreByAfter(n)}))},i.isNotCompleteNumber=function(t){return isNaN(t)||""===t||null===t||t&&t.toString().indexOf(".")===t.toString().length-1},i.stop=function(){i.autoStepTimer&&clearTimeout(i.autoStepTimer)},i.down=function(t,e,r){i.pressingUpOrDown=!0,i.step("down",t,e,r)},i.up=function(t,e,r){i.pressingUpOrDown=!0,i.step("up",t,e,r)},i.saveInput=function(t){i.input=t};var n=t.value;void 0===n&&(n=t.defaultValue),i.state={focused:t.autoFocus};var o=i.getValidValue(i.toNumber(n));return i.state=m(m({},i.state),{},{inputValue:i.toPrecisionAsStep(o),value:o}),i}return Object(o.a)(r,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(t){var e=this.props,r=e.value,i=e.onChange,n=e.max,s=e.min,o=this.state.focused;if(t){if(!C(t.value,r)||!C(t.max,n)||!C(t.min,s)){var a,l=o?r:this.getValidValue(r);a=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:a})}var c="value"in this.props?r:this.state.value;"max"in this.props&&t.max!==n&&"number"==typeof c&&c>n&&i&&i(n),"min"in this.props&&t.min!==s&&"number"==typeof c&&c1&&void 0!==arguments[1]?arguments[1]:this.props.min,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,i=parseFloat(t);return isNaN(i)?t:(ir&&(i=r),i)}},{key:"setValue",value:function(t,e){var r=this.props.precision,i=this.isNotCompleteNumber(parseFloat(t))?null:parseFloat(t),n=this.state.value,s=void 0===n?null:n,o=this.state.inputValue,a=void 0===o?null:o,l="number"==typeof i?i.toFixed(r):"".concat(i),c=i!==s||l!=="".concat(a);return"value"in this.props?(a=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:a},e)):this.setState({value:i,inputValue:this.toPrecisionAsStep(t)},e),c&&this.props.onChange(i),i}},{key:"getMaxPrecision",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.props,i=r.precision,n=r.step;if(S(i))return i;var s=this.getPrecision(e),o=this.getPrecision(n),a=this.getPrecision(t);return t?Math.max(a,s+o):s+o}},{key:"getPrecisionFactor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.getMaxPrecision(t,e);return Math.pow(10,r)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(t){return this.props.formatter?this.props.formatter(t):t}},{key:"toPrecisionAsStep",value:function(t){if(this.isNotCompleteNumber(t)||""===t)return t;var e=Math.abs(this.getMaxPrecision(t));return isNaN(e)?t.toString():Number(t).toFixed(e)}},{key:"toNumber",value:function(t){var e=this.props.precision,r=this.state.focused,i=t&&t.length>16&&r;return this.isNotCompleteNumber(t)||i?t:S(e)?Math.round(t*Math.pow(10,e))/Math.pow(10,e):Number(t)}},{key:"upStep",value:function(t,e){var r=this.props.step,i=this.getPrecisionFactor(t,e),n=Math.abs(this.getMaxPrecision(t,e)),s=((i*t+i*r*e)/i).toFixed(n);return this.toNumber(s)}},{key:"downStep",value:function(t,e){var r=this.props.step,i=this.getPrecisionFactor(t,e),n=Math.abs(this.getMaxPrecision(t,e)),s=((i*t-i*r*e)/i).toFixed(n);return this.toNumber(s)}},{key:"step",value:function(t,e){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0;this.stop(),e&&(e.persist(),e.preventDefault());var s=this.props;if(!s.disabled){var o=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(o)){var a=this["".concat(t,"Step")](o,i),l=a>s.max||as.max?a=s.max:a=p)||s||o,q=(U||0===U)&&(isNaN(U)||Number(U)<=g)||s||o,Y=f()("".concat(r,"-handler"),"".concat(r,"-handler-up"),Object(n.a)({},"".concat(r,"-handler-up-disabled"),K)),X=f()("".concat(r,"-handler"),"".concat(r,"-handler-down"),Object(n.a)({},"".concat(r,"-handler-down-disabled"),q)),$=a?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Z=a?{onTouchStart:q?y:this.down,onTouchEnd:this.stop}:{onMouseDown:q?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:G,style:m,title:v,onMouseEnter:x,onMouseLeave:S,onMouseOver:C,onMouseOut:w,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(r,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:Y}),c||h.a.createElement("span",{unselectable:"on",className:"".concat(r,"-handler-up-inner"),onClick:b})),h.a.createElement("span",Object.assign({unselectable:"on"},Z,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:X}),u||h.a.createElement("span",{unselectable:"on",className:"".concat(r,"-handler-down-inner"),onClick:b}))),h.a.createElement("div",{className:"".concat(r,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":g,"aria-valuemax":p,"aria-valuenow":U,required:k,type:L,placeholder:A,onPaste:N,onClick:E,onMouseUp:this.onMouseUp,className:"".concat(r,"-input"),tabIndex:T,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:W?this.onKeyDown:y,onKeyUp:W?this.onKeyUp:y,autoFocus:M,maxLength:I,readOnly:o,disabled:s,max:p,min:g,step:_,name:P,title:v,id:D,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(V),pattern:O,inputMode:R,onInput:F},z))))}}]),r}(h.a.Component);w.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:y,onKeyDown:y,onPressEnter:y,onFocus:y,onBlur:y,parser:function(t){return t.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var k=w;e.a=k},h78n: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,i){"use strict";var r=i("Ff2n"),n=i("rePB"),s=i("1OyB"),o=i("vuIU"),a=i("Ji7U"),l=i("md7G"),c=i("foSv"),u=i("q1tI"),h=i.n(u),d=i("TSYQ"),f=i.n(d),p=i("4IlW");function g(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function m(t){for(var e=1;e1?a-1:0),c=1;c1?i-1:0),s=1;s=0)return parseInt(e.slice(e.indexOf("e-")+2),10);var i=0;return e.indexOf(".")>=0&&(i=e.length-e.indexOf(".")-1),i},r.getInputDisplayValue=function(t){var e,i=t||r.state,n=i.focused,s=i.inputValue,o=i.value;null==(e=n?s:r.toPrecisionAsStep(o))&&(e="");var a=r.formatWrapper(e);return S(r.props.decimalSeparator)&&(a=a.toString().replace(".",r.props.decimalSeparator)),a},r.recordCursorPosition=function(){try{r.cursorStart=r.input.selectionStart,r.cursorEnd=r.input.selectionEnd,r.currentValue=r.input.value,r.cursorBefore=r.input.value.substring(0,r.cursorStart),r.cursorAfter=r.input.value.substring(r.cursorEnd)}catch(t){}},r.restoreByAfter=function(t){if(void 0===t)return!1;var e=r.input.value,i=e.lastIndexOf(t);if(-1===i)return!1;var n=r.cursorBefore.length;return r.lastKeyCode===p.a.DELETE&&r.cursorBefore.charAt(n-1)===t[0]?(r.fixCaret(n,n),!0):i+t.length===e.length&&(r.fixCaret(i,i),!0)},r.partRestoreByAfter=function(t){return void 0!==t&&Array.prototype.some.call(t,(function(e,i){var n=t.substring(i);return r.restoreByAfter(n)}))},r.isNotCompleteNumber=function(t){return isNaN(t)||""===t||null===t||t&&t.toString().indexOf(".")===t.toString().length-1},r.stop=function(){r.autoStepTimer&&clearTimeout(r.autoStepTimer)},r.down=function(t,e,i){r.pressingUpOrDown=!0,r.step("down",t,e,i)},r.up=function(t,e,i){r.pressingUpOrDown=!0,r.step("up",t,e,i)},r.saveInput=function(t){r.input=t};var n=t.value;void 0===n&&(n=t.defaultValue),r.state={focused:t.autoFocus};var o=r.getValidValue(r.toNumber(n));return r.state=m(m({},r.state),{},{inputValue:r.toPrecisionAsStep(o),value:o}),r}return Object(o.a)(i,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(t){var e=this.props,i=e.value,r=e.onChange,n=e.max,s=e.min,o=this.state.focused;if(t){if(!C(t.value,i)||!C(t.max,n)||!C(t.min,s)){var a,l=o?i:this.getValidValue(i);a=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:a})}var c="value"in this.props?i:this.state.value;"max"in this.props&&t.max!==n&&"number"==typeof c&&c>n&&r&&r(n),"min"in this.props&&t.min!==s&&"number"==typeof c&&c1&&void 0!==arguments[1]?arguments[1]:this.props.min,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,r=parseFloat(t);return isNaN(r)?t:(ri&&(r=i),r)}},{key:"setValue",value:function(t,e){var i=this.props.precision,r=this.isNotCompleteNumber(parseFloat(t))?null:parseFloat(t),n=this.state.value,s=void 0===n?null:n,o=this.state.inputValue,a=void 0===o?null:o,l="number"==typeof r?r.toFixed(i):"".concat(r),c=r!==s||l!=="".concat(a);return"value"in this.props?(a=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:a},e)):this.setState({value:r,inputValue:this.toPrecisionAsStep(t)},e),c&&this.props.onChange(r),r}},{key:"getMaxPrecision",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.props,r=i.precision,n=i.step;if(S(r))return r;var s=this.getPrecision(e),o=this.getPrecision(n),a=this.getPrecision(t);return t?Math.max(a,s+o):s+o}},{key:"getPrecisionFactor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.getMaxPrecision(t,e);return Math.pow(10,i)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(t){return this.props.formatter?this.props.formatter(t):t}},{key:"toPrecisionAsStep",value:function(t){if(this.isNotCompleteNumber(t)||""===t)return t;var e=Math.abs(this.getMaxPrecision(t));return isNaN(e)?t.toString():Number(t).toFixed(e)}},{key:"toNumber",value:function(t){var e=this.props.precision,i=this.state.focused,r=t&&t.length>16&&i;return this.isNotCompleteNumber(t)||r?t:S(e)?Math.round(t*Math.pow(10,e))/Math.pow(10,e):Number(t)}},{key:"upStep",value:function(t,e){var i=this.props.step,r=this.getPrecisionFactor(t,e),n=Math.abs(this.getMaxPrecision(t,e)),s=((r*t+r*i*e)/r).toFixed(n);return this.toNumber(s)}},{key:"downStep",value:function(t,e){var i=this.props.step,r=this.getPrecisionFactor(t,e),n=Math.abs(this.getMaxPrecision(t,e)),s=((r*t-r*i*e)/r).toFixed(n);return this.toNumber(s)}},{key:"step",value:function(t,e){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0;this.stop(),e&&(e.persist(),e.preventDefault());var s=this.props;if(!s.disabled){var o=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(o)){var a=this["".concat(t,"Step")](o,r),l=a>s.max||as.max?a=s.max:a=p)||s||o,q=(U||0===U)&&(isNaN(U)||Number(U)<=g)||s||o,Y=f()("".concat(i,"-handler"),"".concat(i,"-handler-up"),Object(n.a)({},"".concat(i,"-handler-up-disabled"),K)),X=f()("".concat(i,"-handler"),"".concat(i,"-handler-down"),Object(n.a)({},"".concat(i,"-handler-down-disabled"),q)),$=a?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Z=a?{onTouchStart:q?y:this.down,onTouchEnd:this.stop}:{onMouseDown:q?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:G,style:m,title:v,onMouseEnter:x,onMouseLeave:S,onMouseOver:C,onMouseOut:w,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(i,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:Y}),c||h.a.createElement("span",{unselectable:"on",className:"".concat(i,"-handler-up-inner"),onClick:b})),h.a.createElement("span",Object.assign({unselectable:"on"},Z,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:X}),u||h.a.createElement("span",{unselectable:"on",className:"".concat(i,"-handler-down-inner"),onClick:b}))),h.a.createElement("div",{className:"".concat(i,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":g,"aria-valuemax":p,"aria-valuenow":U,required:k,type:L,placeholder:A,onPaste:N,onClick:E,onMouseUp:this.onMouseUp,className:"".concat(i,"-input"),tabIndex:T,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:W?this.onKeyDown:y,onKeyUp:W?this.onKeyUp:y,autoFocus:M,maxLength:I,readOnly:o,disabled:s,max:p,min:g,step:_,name:P,title:v,id:D,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(V),pattern:O,inputMode:R,onInput:F},z))))}}]),i}(h.a.Component);w.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:y,onKeyDown:y,onPressEnter:y,onFocus:y,onBlur:y,parser:function(t){return t.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var k=w;e.a=k},h78n: /*!**********************************************************!*\ !*** ./node_modules/rc-progress/es/index.js + 3 modules ***! \**********************************************************/ /*! exports provided: Line, Circle, default */ /*! exports used: Circle */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,r){"use strict";r.d(e,"a",(function(){return w}));var i=r("q1tI"),n=r.n(i),s=r("TSYQ"),o=r.n(s),a={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},l=function(t){var e=t.map((function(){return Object(i.useRef)()})),r=Object(i.useRef)();return Object(i.useEffect)((function(){var t=Date.now(),i=!1;Object.keys(e).forEach((function(n){var s=e[n].current;if(s){i=!0;var o=s.style;o.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(o.transitionDuration="0s, 0s")}})),i&&(r.current=Date.now())})),[e]};function c(){return(c=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,i=new Array(e);r=0||(n[r]=t[r]);return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var f=function(t){var e=t.className,r=t.percent,i=t.prefixCls,s=t.strokeColor,a=t.strokeLinecap,h=t.strokeWidth,f=t.style,p=t.trailColor,g=t.trailWidth,m=t.transition,v=d(t,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete v.gapPosition;var y=Array.isArray(r)?r:[r],b=Array.isArray(s)?s:[s],x=u(l(y),1)[0],S=h/2,C=100-h/2,w="M ".concat("round"===a?S:0,",").concat(S,"\n L ").concat("round"===a?C:100,",").concat(S),k="0 0 100 ".concat(h),E=0;return n.a.createElement("svg",c({className:o()("".concat(i,"-line"),e),viewBox:k,preserveAspectRatio:"none",style:f},v),n.a.createElement("path",{className:"".concat(i,"-line-trail"),d:w,strokeLinecap:a,stroke:p,strokeWidth:g||h,fillOpacity:"0"}),y.map((function(t,e){var r={strokeDasharray:"".concat(t,"px, 100px"),strokeDashoffset:"-".concat(E,"px"),transition:m||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},s=b[e]||b[b.length-1];return E+=t,n.a.createElement("path",{key:e,className:"".concat(i,"-line-path"),d:w,strokeLinecap:a,stroke:s,strokeWidth:h,fillOpacity:"0",ref:x[e],style:r})})))};f.defaultProps=a;function p(){return(p=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,i=new Array(e);r=0||(n[r]=t[r]);return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var y=0;function b(t){return+t.replace("%","")}function x(t){return Array.isArray(t)?t:[t]}function S(t,e,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5?arguments[5]:void 0,o=50-i/2,a=0,l=-o,c=0,u=-2*o;switch(s){case"left":a=-o,l=0,c=2*o,u=0;break;case"right":a=o,l=0,c=-2*o,u=0;break;case"bottom":l=o,u=2*o}var h="M 50,50 m ".concat(a,",").concat(l,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(c,",").concat(-u,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(-c,",").concat(u),d=2*Math.PI*o,f={stroke:r,strokeDasharray:"".concat(e/100*(d-n),"px ").concat(d,"px"),strokeDashoffset:"-".concat(n/2+t/100*(d-n),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:h,pathStyle:f}}var C=function(t){var e,r=t.prefixCls,s=t.strokeWidth,a=t.trailWidth,c=t.gapDegree,u=t.gapPosition,h=t.trailColor,d=t.strokeLinecap,f=t.style,m=t.className,C=t.strokeColor,w=t.percent,k=v(t,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),E=Object(i.useMemo)((function(){return y+=1}),[]),T=S(0,100,h,s,c,u),L=T.pathString,A=T.pathStyle,D=x(w),R=x(C),O=R.find((function(t){return"[object Object]"===Object.prototype.toString.call(t)})),_=g(l(D),1)[0];return n.a.createElement("svg",p({className:o()("".concat(r,"-circle"),m),viewBox:"0 0 100 100",style:f},k),O&&n.a.createElement("defs",null,n.a.createElement("linearGradient",{id:"".concat(r,"-gradient-").concat(E),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(O).sort((function(t,e){return b(t)-b(e)})).map((function(t,e){return n.a.createElement("stop",{key:e,offset:t,stopColor:O[t]})})))),n.a.createElement("path",{className:"".concat(r,"-circle-trail"),d:L,stroke:h,strokeLinecap:d,strokeWidth:a||s,fillOpacity:"0",style:A}),(e=0,D.map((function(t,i){var o=R[i]||R[R.length-1],a="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(r,"-gradient-").concat(E,")"):"",l=S(e,t,o,s,c,u);return e+=t,n.a.createElement("path",{key:i,className:"".concat(r,"-circle-path"),d:l.pathString,stroke:a,strokeLinecap:d,strokeWidth:s,opacity:0===t?0:1,fillOpacity:"0",style:l.pathStyle,ref:_[i]})}))).reverse())};C.defaultProps=a;var w=C},kIve: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,i){"use strict";i.d(e,"a",(function(){return w}));var r=i("q1tI"),n=i.n(r),s=i("TSYQ"),o=i.n(s),a={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},l=function(t){var e=t.map((function(){return Object(r.useRef)()})),i=Object(r.useRef)();return Object(r.useEffect)((function(){var t=Date.now(),r=!1;Object.keys(e).forEach((function(n){var s=e[n].current;if(s){r=!0;var o=s.style;o.transitionDuration=".3s, .3s, .3s, .06s",i.current&&t-i.current<100&&(o.transitionDuration="0s, 0s")}})),r&&(i.current=Date.now())})),[e]};function c(){return(c=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var i=0,r=new Array(e);i=0||(n[i]=t[i]);return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}var f=function(t){var e=t.className,i=t.percent,r=t.prefixCls,s=t.strokeColor,a=t.strokeLinecap,h=t.strokeWidth,f=t.style,p=t.trailColor,g=t.trailWidth,m=t.transition,v=d(t,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete v.gapPosition;var y=Array.isArray(i)?i:[i],b=Array.isArray(s)?s:[s],x=u(l(y),1)[0],S=h/2,C=100-h/2,w="M ".concat("round"===a?S:0,",").concat(S,"\n L ").concat("round"===a?C:100,",").concat(S),k="0 0 100 ".concat(h),E=0;return n.a.createElement("svg",c({className:o()("".concat(r,"-line"),e),viewBox:k,preserveAspectRatio:"none",style:f},v),n.a.createElement("path",{className:"".concat(r,"-line-trail"),d:w,strokeLinecap:a,stroke:p,strokeWidth:g||h,fillOpacity:"0"}),y.map((function(t,e){var i={strokeDasharray:"".concat(t,"px, 100px"),strokeDashoffset:"-".concat(E,"px"),transition:m||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},s=b[e]||b[b.length-1];return E+=t,n.a.createElement("path",{key:e,className:"".concat(r,"-line-path"),d:w,strokeLinecap:a,stroke:s,strokeWidth:h,fillOpacity:"0",ref:x[e],style:i})})))};f.defaultProps=a;function p(){return(p=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var i=0,r=new Array(e);i=0||(n[i]=t[i]);return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}var y=0;function b(t){return+t.replace("%","")}function x(t){return Array.isArray(t)?t:[t]}function S(t,e,i,r){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5?arguments[5]:void 0,o=50-r/2,a=0,l=-o,c=0,u=-2*o;switch(s){case"left":a=-o,l=0,c=2*o,u=0;break;case"right":a=o,l=0,c=-2*o,u=0;break;case"bottom":l=o,u=2*o}var h="M 50,50 m ".concat(a,",").concat(l,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(c,",").concat(-u,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(-c,",").concat(u),d=2*Math.PI*o,f={stroke:i,strokeDasharray:"".concat(e/100*(d-n),"px ").concat(d,"px"),strokeDashoffset:"-".concat(n/2+t/100*(d-n),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:h,pathStyle:f}}var C=function(t){var e,i=t.prefixCls,s=t.strokeWidth,a=t.trailWidth,c=t.gapDegree,u=t.gapPosition,h=t.trailColor,d=t.strokeLinecap,f=t.style,m=t.className,C=t.strokeColor,w=t.percent,k=v(t,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),E=Object(r.useMemo)((function(){return y+=1}),[]),T=S(0,100,h,s,c,u),L=T.pathString,A=T.pathStyle,D=x(w),R=x(C),O=R.find((function(t){return"[object Object]"===Object.prototype.toString.call(t)})),_=g(l(D),1)[0];return n.a.createElement("svg",p({className:o()("".concat(i,"-circle"),m),viewBox:"0 0 100 100",style:f},k),O&&n.a.createElement("defs",null,n.a.createElement("linearGradient",{id:"".concat(i,"-gradient-").concat(E),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(O).sort((function(t,e){return b(t)-b(e)})).map((function(t,e){return n.a.createElement("stop",{key:e,offset:t,stopColor:O[t]})})))),n.a.createElement("path",{className:"".concat(i,"-circle-trail"),d:L,stroke:h,strokeLinecap:d,strokeWidth:a||s,fillOpacity:"0",style:A}),(e=0,D.map((function(t,r){var o=R[r]||R[R.length-1],a="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(i,"-gradient-").concat(E,")"):"",l=S(e,t,o,s,c,u);return e+=t,n.a.createElement("path",{key:r,className:"".concat(i,"-circle-path"),d:l.pathString,stroke:a,strokeLinecap:d,strokeWidth:s,opacity:0===t?0:1,fillOpacity:"0",style:l.pathStyle,ref:_[r]})}))).reverse())};C.defaultProps=a;var w=C},kIve: /*!*******************************************************************************!*\ !*** ./src/pages/Classrooms/Lists/CommonHomework/EditWork/index.less?modules ***! \*******************************************************************************/ /*! no static exports found */ /*! exports used: default */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){t.exports={flex_box_center:"flex_box_center___2YmNs",flex_space_between:"flex_space_between___3cie6",flex_box_vertical_center:"flex_box_vertical_center___1vbui",flex_box_center_end:"flex_box_center_end___3QaEj",flex_box_column:"flex_box_column___2YnBA",bg:"bg___2KgPr",flexRow:"flexRow___20msk",flexJustifyCenter:"flexJustifyCenter___VWd-s",flexAlignEnd:"flexAlignEnd___12xa2",flexAlignCenter:"flexAlignCenter___f7wGa",flexColumn:"flexColumn___1anL6",formWrap:"formWrap___2xv2p",titleWrap:"titleWrap___1jA2m",fieldWrap:"fieldWrap___1Km0q",mdWrap:"mdWrap___1BgRF",backgroundFa:"backgroundFa___1Q2SP",button:"button___17k3W",searchMember:"searchMember___2ZqFW"}},kSUc: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports={flex_box_center:"flex_box_center___2YmNs",flex_space_between:"flex_space_between___3cie6",flex_box_vertical_center:"flex_box_vertical_center___1vbui",flex_box_center_end:"flex_box_center_end___3QaEj",flex_box_column:"flex_box_column___2YnBA",bg:"bg___2KgPr",flexRow:"flexRow___20msk",flexJustifyCenter:"flexJustifyCenter___VWd-s",flexAlignEnd:"flexAlignEnd___12xa2",flexAlignCenter:"flexAlignCenter___f7wGa",flexColumn:"flexColumn___1anL6",formWrap:"formWrap___2xv2p",titleWrap:"titleWrap___1jA2m",fieldWrap:"fieldWrap___1Km0q",mdWrap:"mdWrap___1BgRF",titleWrapper:"titleWrapper___3xrLI",backgroundFa:"backgroundFa___1Q2SP",button:"button___17k3W",searchMember:"searchMember___2ZqFW"}},kSUc: /*!***************************************************!*\ !*** ./src/components/markdown-editor/index.less ***! \***************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){},lZu9: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){},lZu9: /*!***********************************************************!*\ !*** ./node_modules/codemirror/mode/markdown/markdown.js ***! \***********************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){"use strict";t.defineMode("markdown",(function(e,r){var i=t.getMode(e,"text/html"),n="null"==i.name;void 0===r.highlightFormatting&&(r.highlightFormatting=!1),void 0===r.maxBlockquoteDepth&&(r.maxBlockquoteDepth=0),void 0===r.taskLists&&(r.taskLists=!1),void 0===r.strikethrough&&(r.strikethrough=!1),void 0===r.emoji&&(r.emoji=!1),void 0===r.fencedCodeBlockHighlighting&&(r.fencedCodeBlockHighlighting=!0),void 0===r.fencedCodeBlockDefaultMode&&(r.fencedCodeBlockDefaultMode="text/plain"),void 0===r.xml&&(r.xml=!0),void 0===r.tokenTypeOverrides&&(r.tokenTypeOverrides={});var s={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var o in s)s.hasOwnProperty(o)&&r.tokenTypeOverrides[o]&&(s[o]=r.tokenTypeOverrides[o]);var a=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=r.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,d=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function m(t,e,r){return e.f=e.inline=r,r(t,e)}function v(t,e,r){return e.f=e.block=r,r(t,e)}function y(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==x){var r=n;if(!r){var s=t.innerMode(i,e.htmlState);r="xml"==s.mode.name&&null===s.state.tagStart&&!s.state.context&&s.state.tokenize.isInText}r&&(e.f=k,e.block=b,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function b(i,n){var o,d=i.column()===n.indentation,g=!(o=n.prevLine.stream)||!/\S/.test(o.string),v=n.indentedCode,y=n.prevLine.hr,b=!1!==n.list,x=(n.listStack[n.listStack.length-1]||0)+3;n.indentedCode=!1;var w=n.indentation;if(null===n.indentationDiff&&(n.indentationDiff=n.indentation,b)){for(n.list=null;w=4&&(v||n.prevLine.fencedCodeEnd||n.prevLine.header||g))return i.skipToEnd(),n.indentedCode=!0,s.code;if(i.eatSpace())return null;if(d&&n.indentation<=x&&(T=i.match(u))&&T[1].length<=6)return n.quote=0,n.header=T[1].length,n.thisLine.header=!0,r.highlightFormatting&&(n.formatting="header"),n.f=n.inline,C(n);if(n.indentation<=x&&i.eat(">"))return n.quote=d?1:n.quote+1,r.highlightFormatting&&(n.formatting="quote"),i.eatSpace(),C(n);if(!E&&!n.setext&&d&&n.indentation<=x&&(T=i.match(l))){var L=T[1]?"ol":"ul";return n.indentation=w+i.current().length,n.list=!0,n.quote=0,n.listStack.push(n.indentation),n.em=!1,n.strong=!1,n.code=!1,n.strikethrough=!1,r.taskLists&&i.match(c,!1)&&(n.taskList=!0),n.f=n.inline,r.highlightFormatting&&(n.formatting=["list","list-"+L]),C(n)}return d&&n.indentation<=x&&(T=i.match(f,!0))?(n.quote=0,n.fencedEndRE=new RegExp(T[1]+"+ *$"),n.localMode=r.fencedCodeBlockHighlighting&&function(r){if(t.findModeByName){var i=t.findModeByName(r);i&&(r=i.mime||i.mimes[0])}var n=t.getMode(e,r);return"null"==n.name?null:n}(T[2]||r.fencedCodeBlockDefaultMode),n.localMode&&(n.localState=t.startState(n.localMode)),n.f=n.block=S,r.highlightFormatting&&(n.formatting="code-block"),n.code=-1,C(n)):n.setext||!(k&&b||n.quote||!1!==n.list||n.code||E||p.test(i.string))&&(T=i.lookAhead(1))&&(T=T.match(h))?(n.setext?(n.header=n.setext,n.setext=0,i.skipToEnd(),r.highlightFormatting&&(n.formatting="header")):(n.header="="==T[0].charAt(0)?1:2,n.setext=n.header),n.thisLine.header=!0,n.f=n.inline,C(n)):E?(i.skipToEnd(),n.hr=!0,n.thisLine.hr=!0,s.hr):"["===i.peek()?m(i,n,A):m(i,n,n.inline)}function x(e,r){var s=i.token(e,r.htmlState);if(!n){var o=t.innerMode(i,r.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||r.md_inside&&e.current().indexOf(">")>-1)&&(r.f=k,r.block=b,r.htmlState=null)}return s}function S(t,e){var i,n=e.listStack[e.listStack.length-1]||0,o=e.indentation=t.quote?e.push(s.formatting+"-"+t.formatting[i]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(s.linkHref,"url"):(t.strong&&e.push(s.strong),t.em&&e.push(s.em),t.strikethrough&&e.push(s.strikethrough),t.emoji&&e.push(s.emoji),t.linkText&&e.push(s.linkText),t.code&&e.push(s.code),t.image&&e.push(s.image),t.imageAltText&&e.push(s.imageAltText,"link"),t.imageMarker&&e.push(s.imageMarker)),t.header&&e.push(s.header,s.header+"-"+t.header),t.quote&&(e.push(s.quote),!r.maxBlockquoteDepth||r.maxBlockquoteDepth>=t.quote?e.push(s.quote+"-"+t.quote):e.push(s.quote+"-"+r.maxBlockquoteDepth)),!1!==t.list){var n=(t.listStack.length-1)%3;n?1===n?e.push(s.list2):e.push(s.list3):e.push(s.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function w(t,e){if(t.match(d,!0))return C(e)}function k(e,n){var o=n.text(e,n);if(void 0!==o)return o;if(n.list)return n.list=null,C(n);if(n.taskList)return" "===e.match(c,!0)[1]?n.taskOpen=!0:n.taskClosed=!0,r.highlightFormatting&&(n.formatting="task"),n.taskList=!1,C(n);if(n.taskOpen=!1,n.taskClosed=!1,n.header&&e.match(/^#+$/,!0))return r.highlightFormatting&&(n.formatting="header"),C(n);var a=e.next();if(n.linkTitle){n.linkTitle=!1;var l=a;"("===a&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(e.match(new RegExp(u),!0))return s.linkHref}if("`"===a){var h=n.formatting;r.highlightFormatting&&(n.formatting="code"),e.eatWhile("`");var d=e.current().length;if(0!=n.code||n.quote&&1!=d){if(d==n.code){var f=C(n);return n.code=0,f}return n.formatting=h,C(n)}return n.code=d,C(n)}if(n.code)return C(n);if("\\"===a&&(e.next(),r.highlightFormatting)){var p=C(n),m=s.formatting+"-escape";return p?p+" "+m:m}if("!"===a&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return n.imageMarker=!0,n.image=!0,r.highlightFormatting&&(n.formatting="image"),C(n);if("["===a&&n.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return n.imageMarker=!1,n.imageAltText=!0,r.highlightFormatting&&(n.formatting="image"),C(n);if("]"===a&&n.imageAltText){r.highlightFormatting&&(n.formatting="image");var p=C(n);return n.imageAltText=!1,n.image=!1,n.inline=n.f=T,p}if("["===a&&!n.image)return n.linkText&&e.match(/^.*?\]/)||(n.linkText=!0,r.highlightFormatting&&(n.formatting="link")),C(n);if("]"===a&&n.linkText){r.highlightFormatting&&(n.formatting="link");var p=C(n);return n.linkText=!1,n.inline=n.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?T:k,p}if("<"===a&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=E,r.highlightFormatting&&(n.formatting="link"),(p=C(n))?p+=" ":p="",p+s.linkInline;if("<"===a&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=E,r.highlightFormatting&&(n.formatting="link"),(p=C(n))?p+=" ":p="",p+s.linkEmail;if(r.xml&&"<"===a&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=e.string.indexOf(">",e.pos);if(-1!=y){var b=e.string.substring(e.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(n.md_inside=!0)}return e.backUp(1),n.htmlState=t.startState(i),v(e,n,x)}if(r.xml&&"<"===a&&e.match(/^\/\w*?>/))return n.md_inside=!1,"tag";if("*"===a||"_"===a){for(var S=1,w=1==e.pos?" ":e.string.charAt(e.pos-2);S<3&&e.eat(a);)S++;var L=e.peek()||" ",A=!/\s/.test(L)&&(!g.test(L)||/\s/.test(w)||g.test(w)),D=!/\s/.test(w)&&(!g.test(w)||/\s/.test(L)||g.test(L)),R=null,O=null;if(S%2&&(n.em||!A||"*"!==a&&D&&!g.test(w)?n.em!=a||!D||"*"!==a&&A&&!g.test(L)||(R=!1):R=!0),S>1&&(n.strong||!A||"*"!==a&&D&&!g.test(w)?n.strong!=a||!D||"*"!==a&&A&&!g.test(L)||(O=!1):O=!0),null!=O||null!=R)return r.highlightFormatting&&(n.formatting=null==R?"strong":null==O?"em":"strong em"),!0===R&&(n.em=a),!0===O&&(n.strong=a),f=C(n),!1===R&&(n.em=!1),!1===O&&(n.strong=!1),f}else if(" "===a&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return C(n);e.backUp(1)}if(r.strikethrough)if("~"===a&&e.eatWhile(a)){if(n.strikethrough)return r.highlightFormatting&&(n.formatting="strikethrough"),f=C(n),n.strikethrough=!1,f;if(e.match(/^[^\s]/,!1))return n.strikethrough=!0,r.highlightFormatting&&(n.formatting="strikethrough"),C(n)}else if(" "===a&&e.match(/^~~/,!0)){if(" "===e.peek())return C(n);e.backUp(2)}if(r.emoji&&":"===a&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){n.emoji=!0,r.highlightFormatting&&(n.formatting="emoji");var _=C(n);return n.emoji=!1,_}return" "===a&&(e.match(/^ +$/,!1)?n.trailingSpace++:n.trailingSpace&&(n.trailingSpaceNewLine=!0)),C(n)}function E(t,e){if(">"===t.next()){e.f=e.inline=k,r.highlightFormatting&&(e.formatting="link");var i=C(e);return i?i+=" ":i="",i+s.linkInline}return t.match(/^[^>]+/,!0),s.linkInline}function T(t,e){if(t.eatSpace())return null;var i,n=t.next();return"("===n||"["===n?(e.f=e.inline=(i="("===n?")":"]",function(t,e){if(t.next()===i){e.f=e.inline=k,r.highlightFormatting&&(e.formatting="link-string");var n=C(e);return e.linkHref=!1,n}return t.match(L[i]),e.linkHref=!0,C(e)}),r.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,C(e)):"error"}var L={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function A(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=D,t.next(),r.highlightFormatting&&(e.formatting="link"),e.linkText=!0,C(e)):m(t,e,k)}function D(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=R,r.highlightFormatting&&(e.formatting="link");var i=C(e);return e.linkText=!1,i}return t.match(/^([^\]\\]|\\.)+/,!0),s.linkText}function R(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=k,s.linkHref+" url")}var O={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:k,text:w,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(i,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine.stream){if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0))return y(e),null;if(e.prevLine=e.thisLine,e.thisLine={stream:t},e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,!e.localState&&(e.f=e.block,e.f!=x)){var r=t.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(e.indentation=r,e.indentationDiff=null,r>0)return null}}return e.f(t,e)},innerMode:function(t){return t.block==x?{state:t.htmlState,mode:i}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:O}},indent:function(e,r,n){return e.block==x&&i.indent?i.indent(e.htmlState,r,n):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,r,n):t.Pass},blankLine:y,getType:C,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return O}),"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")}(r(/*! ../../lib/codemirror */"VrN/"),r(/*! ../xml/xml */"1eCo"),r(/*! ../meta */"8EBN"))},osHv: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){!function(t){"use strict";t.defineMode("markdown",(function(e,i){var r=t.getMode(e,"text/html"),n="null"==r.name;void 0===i.highlightFormatting&&(i.highlightFormatting=!1),void 0===i.maxBlockquoteDepth&&(i.maxBlockquoteDepth=0),void 0===i.taskLists&&(i.taskLists=!1),void 0===i.strikethrough&&(i.strikethrough=!1),void 0===i.emoji&&(i.emoji=!1),void 0===i.fencedCodeBlockHighlighting&&(i.fencedCodeBlockHighlighting=!0),void 0===i.fencedCodeBlockDefaultMode&&(i.fencedCodeBlockDefaultMode="text/plain"),void 0===i.xml&&(i.xml=!0),void 0===i.tokenTypeOverrides&&(i.tokenTypeOverrides={});var s={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var o in s)s.hasOwnProperty(o)&&i.tokenTypeOverrides[o]&&(s[o]=i.tokenTypeOverrides[o]);var a=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=i.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,d=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function m(t,e,i){return e.f=e.inline=i,i(t,e)}function v(t,e,i){return e.f=e.block=i,i(t,e)}function y(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==x){var i=n;if(!i){var s=t.innerMode(r,e.htmlState);i="xml"==s.mode.name&&null===s.state.tagStart&&!s.state.context&&s.state.tokenize.isInText}i&&(e.f=k,e.block=b,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function b(r,n){var o,d=r.column()===n.indentation,g=!(o=n.prevLine.stream)||!/\S/.test(o.string),v=n.indentedCode,y=n.prevLine.hr,b=!1!==n.list,x=(n.listStack[n.listStack.length-1]||0)+3;n.indentedCode=!1;var w=n.indentation;if(null===n.indentationDiff&&(n.indentationDiff=n.indentation,b)){for(n.list=null;w=4&&(v||n.prevLine.fencedCodeEnd||n.prevLine.header||g))return r.skipToEnd(),n.indentedCode=!0,s.code;if(r.eatSpace())return null;if(d&&n.indentation<=x&&(T=r.match(u))&&T[1].length<=6)return n.quote=0,n.header=T[1].length,n.thisLine.header=!0,i.highlightFormatting&&(n.formatting="header"),n.f=n.inline,C(n);if(n.indentation<=x&&r.eat(">"))return n.quote=d?1:n.quote+1,i.highlightFormatting&&(n.formatting="quote"),r.eatSpace(),C(n);if(!E&&!n.setext&&d&&n.indentation<=x&&(T=r.match(l))){var L=T[1]?"ol":"ul";return n.indentation=w+r.current().length,n.list=!0,n.quote=0,n.listStack.push(n.indentation),n.em=!1,n.strong=!1,n.code=!1,n.strikethrough=!1,i.taskLists&&r.match(c,!1)&&(n.taskList=!0),n.f=n.inline,i.highlightFormatting&&(n.formatting=["list","list-"+L]),C(n)}return d&&n.indentation<=x&&(T=r.match(f,!0))?(n.quote=0,n.fencedEndRE=new RegExp(T[1]+"+ *$"),n.localMode=i.fencedCodeBlockHighlighting&&function(i){if(t.findModeByName){var r=t.findModeByName(i);r&&(i=r.mime||r.mimes[0])}var n=t.getMode(e,i);return"null"==n.name?null:n}(T[2]||i.fencedCodeBlockDefaultMode),n.localMode&&(n.localState=t.startState(n.localMode)),n.f=n.block=S,i.highlightFormatting&&(n.formatting="code-block"),n.code=-1,C(n)):n.setext||!(k&&b||n.quote||!1!==n.list||n.code||E||p.test(r.string))&&(T=r.lookAhead(1))&&(T=T.match(h))?(n.setext?(n.header=n.setext,n.setext=0,r.skipToEnd(),i.highlightFormatting&&(n.formatting="header")):(n.header="="==T[0].charAt(0)?1:2,n.setext=n.header),n.thisLine.header=!0,n.f=n.inline,C(n)):E?(r.skipToEnd(),n.hr=!0,n.thisLine.hr=!0,s.hr):"["===r.peek()?m(r,n,A):m(r,n,n.inline)}function x(e,i){var s=r.token(e,i.htmlState);if(!n){var o=t.innerMode(r,i.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||i.md_inside&&e.current().indexOf(">")>-1)&&(i.f=k,i.block=b,i.htmlState=null)}return s}function S(t,e){var r,n=e.listStack[e.listStack.length-1]||0,o=e.indentation=t.quote?e.push(s.formatting+"-"+t.formatting[r]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(s.linkHref,"url"):(t.strong&&e.push(s.strong),t.em&&e.push(s.em),t.strikethrough&&e.push(s.strikethrough),t.emoji&&e.push(s.emoji),t.linkText&&e.push(s.linkText),t.code&&e.push(s.code),t.image&&e.push(s.image),t.imageAltText&&e.push(s.imageAltText,"link"),t.imageMarker&&e.push(s.imageMarker)),t.header&&e.push(s.header,s.header+"-"+t.header),t.quote&&(e.push(s.quote),!i.maxBlockquoteDepth||i.maxBlockquoteDepth>=t.quote?e.push(s.quote+"-"+t.quote):e.push(s.quote+"-"+i.maxBlockquoteDepth)),!1!==t.list){var n=(t.listStack.length-1)%3;n?1===n?e.push(s.list2):e.push(s.list3):e.push(s.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function w(t,e){if(t.match(d,!0))return C(e)}function k(e,n){var o=n.text(e,n);if(void 0!==o)return o;if(n.list)return n.list=null,C(n);if(n.taskList)return" "===e.match(c,!0)[1]?n.taskOpen=!0:n.taskClosed=!0,i.highlightFormatting&&(n.formatting="task"),n.taskList=!1,C(n);if(n.taskOpen=!1,n.taskClosed=!1,n.header&&e.match(/^#+$/,!0))return i.highlightFormatting&&(n.formatting="header"),C(n);var a=e.next();if(n.linkTitle){n.linkTitle=!1;var l=a;"("===a&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(e.match(new RegExp(u),!0))return s.linkHref}if("`"===a){var h=n.formatting;i.highlightFormatting&&(n.formatting="code"),e.eatWhile("`");var d=e.current().length;if(0!=n.code||n.quote&&1!=d){if(d==n.code){var f=C(n);return n.code=0,f}return n.formatting=h,C(n)}return n.code=d,C(n)}if(n.code)return C(n);if("\\"===a&&(e.next(),i.highlightFormatting)){var p=C(n),m=s.formatting+"-escape";return p?p+" "+m:m}if("!"===a&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return n.imageMarker=!0,n.image=!0,i.highlightFormatting&&(n.formatting="image"),C(n);if("["===a&&n.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return n.imageMarker=!1,n.imageAltText=!0,i.highlightFormatting&&(n.formatting="image"),C(n);if("]"===a&&n.imageAltText){i.highlightFormatting&&(n.formatting="image");var p=C(n);return n.imageAltText=!1,n.image=!1,n.inline=n.f=T,p}if("["===a&&!n.image)return n.linkText&&e.match(/^.*?\]/)||(n.linkText=!0,i.highlightFormatting&&(n.formatting="link")),C(n);if("]"===a&&n.linkText){i.highlightFormatting&&(n.formatting="link");var p=C(n);return n.linkText=!1,n.inline=n.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?T:k,p}if("<"===a&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=E,i.highlightFormatting&&(n.formatting="link"),(p=C(n))?p+=" ":p="",p+s.linkInline;if("<"===a&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=E,i.highlightFormatting&&(n.formatting="link"),(p=C(n))?p+=" ":p="",p+s.linkEmail;if(i.xml&&"<"===a&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=e.string.indexOf(">",e.pos);if(-1!=y){var b=e.string.substring(e.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(n.md_inside=!0)}return e.backUp(1),n.htmlState=t.startState(r),v(e,n,x)}if(i.xml&&"<"===a&&e.match(/^\/\w*?>/))return n.md_inside=!1,"tag";if("*"===a||"_"===a){for(var S=1,w=1==e.pos?" ":e.string.charAt(e.pos-2);S<3&&e.eat(a);)S++;var L=e.peek()||" ",A=!/\s/.test(L)&&(!g.test(L)||/\s/.test(w)||g.test(w)),D=!/\s/.test(w)&&(!g.test(w)||/\s/.test(L)||g.test(L)),R=null,O=null;if(S%2&&(n.em||!A||"*"!==a&&D&&!g.test(w)?n.em!=a||!D||"*"!==a&&A&&!g.test(L)||(R=!1):R=!0),S>1&&(n.strong||!A||"*"!==a&&D&&!g.test(w)?n.strong!=a||!D||"*"!==a&&A&&!g.test(L)||(O=!1):O=!0),null!=O||null!=R)return i.highlightFormatting&&(n.formatting=null==R?"strong":null==O?"em":"strong em"),!0===R&&(n.em=a),!0===O&&(n.strong=a),f=C(n),!1===R&&(n.em=!1),!1===O&&(n.strong=!1),f}else if(" "===a&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return C(n);e.backUp(1)}if(i.strikethrough)if("~"===a&&e.eatWhile(a)){if(n.strikethrough)return i.highlightFormatting&&(n.formatting="strikethrough"),f=C(n),n.strikethrough=!1,f;if(e.match(/^[^\s]/,!1))return n.strikethrough=!0,i.highlightFormatting&&(n.formatting="strikethrough"),C(n)}else if(" "===a&&e.match(/^~~/,!0)){if(" "===e.peek())return C(n);e.backUp(2)}if(i.emoji&&":"===a&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){n.emoji=!0,i.highlightFormatting&&(n.formatting="emoji");var _=C(n);return n.emoji=!1,_}return" "===a&&(e.match(/^ +$/,!1)?n.trailingSpace++:n.trailingSpace&&(n.trailingSpaceNewLine=!0)),C(n)}function E(t,e){if(">"===t.next()){e.f=e.inline=k,i.highlightFormatting&&(e.formatting="link");var r=C(e);return r?r+=" ":r="",r+s.linkInline}return t.match(/^[^>]+/,!0),s.linkInline}function T(t,e){if(t.eatSpace())return null;var r,n=t.next();return"("===n||"["===n?(e.f=e.inline=(r="("===n?")":"]",function(t,e){if(t.next()===r){e.f=e.inline=k,i.highlightFormatting&&(e.formatting="link-string");var n=C(e);return e.linkHref=!1,n}return t.match(L[r]),e.linkHref=!0,C(e)}),i.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,C(e)):"error"}var L={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function A(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=D,t.next(),i.highlightFormatting&&(e.formatting="link"),e.linkText=!0,C(e)):m(t,e,k)}function D(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=R,i.highlightFormatting&&(e.formatting="link");var r=C(e);return e.linkText=!1,r}return t.match(/^([^\]\\]|\\.)+/,!0),s.linkText}function R(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=k,s.linkHref+" url")}var O={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:k,text:w,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(r,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine.stream){if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0))return y(e),null;if(e.prevLine=e.thisLine,e.thisLine={stream:t},e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,!e.localState&&(e.f=e.block,e.f!=x)){var i=t.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(e.indentation=i,e.indentationDiff=null,i>0)return null}}return e.f(t,e)},innerMode:function(t){return t.block==x?{state:t.htmlState,mode:r}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:O}},indent:function(e,i,n){return e.block==x&&r.indent?r.indent(e.htmlState,i,n):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,i,n):t.Pass},blankLine:y,getType:C,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return O}),"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")}(i(/*! ../../lib/codemirror */"VrN/"),i(/*! ../xml/xml */"1eCo"),i(/*! ../meta */"8EBN"))},osHv: /*!********************************************************!*\ !*** ./node_modules/codemirror/addon/fold/xml-fold.js ***! \********************************************************/ /*! no static exports found */ /*! all exports used */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){"use strict";var e=t.Pos;function r(t,e){return t.line-e.line||t.ch-e.ch}var i="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("<(/?)(["+i+"]["+i+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function s(t,e,r,i){this.line=e,this.ch=r,this.cm=t,this.text=t.getLine(e),this.min=i?Math.max(i.from,t.firstLine()):t.firstLine(),this.max=i?Math.min(i.to-1,t.lastLine()):t.lastLine()}function o(t,r){var i=t.cm.getTokenTypeAt(e(t.line,r));return i&&/\btag\b/.test(i)}function a(t){if(!(t.line>=t.max))return t.ch=0,t.text=t.cm.getLine(++t.line),!0}function l(t){if(!(t.line<=t.min))return t.text=t.cm.getLine(--t.line),t.ch=t.text.length,!0}function c(t){for(;;){var e=t.text.indexOf(">",t.ch);if(-1==e){if(a(t))continue;return}if(o(t,e+1)){var r=t.text.lastIndexOf("/",e),i=r>-1&&!/\S/.test(t.text.slice(r+1,e));return t.ch=e+1,i?"selfClose":"regular"}t.ch=e+1}}function u(t){for(;;){var e=t.ch?t.text.lastIndexOf("<",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(o(t,e+1)){n.lastIndex=e,t.ch=e;var r=n.exec(t.text);if(r&&r.index==e)return r}else t.ch=e}}function h(t){for(;;){n.lastIndex=t.ch;var e=n.exec(t.text);if(!e){if(a(t))continue;return}if(o(t,e.index+1))return t.ch=e.index+e[0].length,e;t.ch=e.index+1}}function d(t){for(;;){var e=t.ch?t.text.lastIndexOf(">",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(o(t,e+1)){var r=t.text.lastIndexOf("/",e),i=r>-1&&!/\S/.test(t.text.slice(r+1,e));return t.ch=e+1,i?"selfClose":"regular"}t.ch=e}}function f(t,r){for(var i=[];;){var n,s=h(t),o=t.line,a=t.ch-(s?s[0].length:0);if(!s||!(n=c(t)))return;if("selfClose"!=n)if(s[1]){for(var l=i.length-1;l>=0;--l)if(i[l]==s[2]){i.length=l;break}if(l<0&&(!r||r==s[2]))return{tag:s[2],from:e(o,a),to:e(t.line,t.ch)}}else i.push(s[2])}}function p(t,r){for(var i=[];;){var n=d(t);if(!n)return;if("selfClose"!=n){var s=t.line,o=t.ch,a=u(t);if(!a)return;if(a[1])i.push(a[2]);else{for(var l=i.length-1;l>=0;--l)if(i[l]==a[2]){i.length=l;break}if(l<0&&(!r||r==a[2]))return{tag:a[2],from:e(t.line,t.ch),to:e(s,o)}}}else u(t)}}t.registerHelper("fold","xml",(function(t,i){for(var n=new s(t,i.line,0);;){var o=h(n);if(!o||n.line!=i.line)return;var a=c(n);if(!a)return;if(!o[1]&&"selfClose"!=a){var l=e(n.line,n.ch),u=f(n,o[2]);return u&&r(u.from,l)>0?{from:l,to:u.from}:null}}})),t.findMatchingTag=function(t,i,n){var o=new s(t,i.line,i.ch,n);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var a=c(o),l=a&&e(o.line,o.ch),h=a&&u(o);if(a&&h&&!(r(o,i)>0)){var d={from:e(o.line,o.ch),to:l,tag:h[2]};return"selfClose"==a?{open:d,close:null,at:"open"}:h[1]?{open:p(o,h[2]),close:d,at:"close"}:{open:d,close:f(o=new s(t,l.line,l.ch,n),h[2]),at:"open"}}}},t.findEnclosingTag=function(t,e,r,i){for(var n=new s(t,e.line,e.ch,r);;){var o=p(n,i);if(!o)break;var a=f(new s(t,e.line,e.ch,r),o.tag);if(a)return{open:o,close:a}}},t.scanForClosingTag=function(t,e,r,i){return f(new s(t,e.line,e.ch,i?{from:0,to:i}:null),r)}}(r(/*! ../../lib/codemirror */"VrN/"))},p5ED: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){!function(t){"use strict";var e=t.Pos;function i(t,e){return t.line-e.line||t.ch-e.ch}var r="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function s(t,e,i,r){this.line=e,this.ch=i,this.cm=t,this.text=t.getLine(e),this.min=r?Math.max(r.from,t.firstLine()):t.firstLine(),this.max=r?Math.min(r.to-1,t.lastLine()):t.lastLine()}function o(t,i){var r=t.cm.getTokenTypeAt(e(t.line,i));return r&&/\btag\b/.test(r)}function a(t){if(!(t.line>=t.max))return t.ch=0,t.text=t.cm.getLine(++t.line),!0}function l(t){if(!(t.line<=t.min))return t.text=t.cm.getLine(--t.line),t.ch=t.text.length,!0}function c(t){for(;;){var e=t.text.indexOf(">",t.ch);if(-1==e){if(a(t))continue;return}if(o(t,e+1)){var i=t.text.lastIndexOf("/",e),r=i>-1&&!/\S/.test(t.text.slice(i+1,e));return t.ch=e+1,r?"selfClose":"regular"}t.ch=e+1}}function u(t){for(;;){var e=t.ch?t.text.lastIndexOf("<",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(o(t,e+1)){n.lastIndex=e,t.ch=e;var i=n.exec(t.text);if(i&&i.index==e)return i}else t.ch=e}}function h(t){for(;;){n.lastIndex=t.ch;var e=n.exec(t.text);if(!e){if(a(t))continue;return}if(o(t,e.index+1))return t.ch=e.index+e[0].length,e;t.ch=e.index+1}}function d(t){for(;;){var e=t.ch?t.text.lastIndexOf(">",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(o(t,e+1)){var i=t.text.lastIndexOf("/",e),r=i>-1&&!/\S/.test(t.text.slice(i+1,e));return t.ch=e+1,r?"selfClose":"regular"}t.ch=e}}function f(t,i){for(var r=[];;){var n,s=h(t),o=t.line,a=t.ch-(s?s[0].length:0);if(!s||!(n=c(t)))return;if("selfClose"!=n)if(s[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!i||i==s[2]))return{tag:s[2],from:e(o,a),to:e(t.line,t.ch)}}else r.push(s[2])}}function p(t,i){for(var r=[];;){var n=d(t);if(!n)return;if("selfClose"!=n){var s=t.line,o=t.ch,a=u(t);if(!a)return;if(a[1])r.push(a[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==a[2]){r.length=l;break}if(l<0&&(!i||i==a[2]))return{tag:a[2],from:e(t.line,t.ch),to:e(s,o)}}}else u(t)}}t.registerHelper("fold","xml",(function(t,r){for(var n=new s(t,r.line,0);;){var o=h(n);if(!o||n.line!=r.line)return;var a=c(n);if(!a)return;if(!o[1]&&"selfClose"!=a){var l=e(n.line,n.ch),u=f(n,o[2]);return u&&i(u.from,l)>0?{from:l,to:u.from}:null}}})),t.findMatchingTag=function(t,r,n){var o=new s(t,r.line,r.ch,n);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var a=c(o),l=a&&e(o.line,o.ch),h=a&&u(o);if(a&&h&&!(i(o,r)>0)){var d={from:e(o.line,o.ch),to:l,tag:h[2]};return"selfClose"==a?{open:d,close:null,at:"open"}:h[1]?{open:p(o,h[2]),close:d,at:"close"}:{open:d,close:f(o=new s(t,l.line,l.ch,n),h[2]),at:"open"}}}},t.findEnclosingTag=function(t,e,i,r){for(var n=new s(t,e.line,e.ch,i);;){var o=p(n,r);if(!o)break;var a=f(new s(t,e.line,e.ch,i),o.tag);if(a)return{open:o,close:a}}},t.scanForClosingTag=function(t,e,i,r){return f(new s(t,e.line,e.ch,r?{from:0,to:r}:null),i)}}(i(/*! ../../lib/codemirror */"VrN/"))},p5ED: /*!*********************************************!*\ !*** ./src/components/PreviewAll/index.tsx ***! \*********************************************/ /*! exports provided: PreviewAll, default */ -/*! exports used: default */function(t,e,r){"use strict";r(/*! antd/es/button/style */"+L6B");var i=r(/*! antd/es/button */"2/Rp"),n=(r(/*! antd/es/tooltip/style */"5Dmo"),r(/*! antd/es/tooltip */"3S7+")),s=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=r.n(l),u=r(/*! react */"q1tI"),h=r.n(u),d=r(/*! ./index.less?modules */"vHTk"),f=r.n(d),p=r(/*! @ant-design/icons */"yEEn"),g=r(/*! @/components/monaco-editor */"ZW9T"),m=r(/*! @/utils/util */"1vsH"),v=r(/*! @/service/exercise */"V0Rq"),y=r(/*! @/utils/env */"m3rI");e.a=function(t){t.name;var e=t.data,r=(t.theme,t.type),l=t.filename,d=t.monacoEditor,b=t.className,x=t.style,S=t.close,C=t.onClose,w=t.hasMask,k=t.otherData,E=void 0===k?{}:k,T=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),L=Object(a.a)(T,2),A=(L[0],L[1],Object(u.useState)("")),D=Object(a.a)(A,2),R=(D[0],D[1]),O=Object(u.useState)(),_=Object(a.a)(O,2),I=_[0],M=_[1],P=Object(u.useRef)();"office"===r&&Object(m.P)(e).filesize>10485760&&(r="other"),l&&(d.filename=l),Object(u.useEffect)((function(){var t,e,r=null===(t=document.cookie)||void 0===t||null===(e=t.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==r||r.map((function(t){var e=t.split("=");"_educoder_session"===e[0]&&R(e[1])}))}),[]),Object(u.useEffect)((function(){"office"===r&&N()}),[r]);var N=function(){var t=Object(o.a)(c.a.mark((function t(){var r,i,n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("data:",e),r=e,e.startsWith("http")||(r=location.origin+r),i=new URL(r).pathname.split("/").pop(),t.next=6,Object(v.U)({attachment_id:i});case 6:n=t.sent,M(n);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),F=function(){e.startsWith("http")||e.startsWith("blob:")?B():Object(m.x)(l||"educoder",e,l)},B=function(){Object(m.v)(l||"educoder",decodeURIComponent(e))};return h.a.createElement("div",{style:Object(s.a)({},x||{}),className:"".concat(w&&f.a.bgBlack," ").concat(r?f.a.wrp:"hide")},S&&h.a.createElement("div",{className:f.a.close,ref:P},h.a.createElement(n.a,{title:"点击下载此文件",getPopupContainer:function(){return P.current}},h.a.createElement("span",{onClick:B},h.a.createElement("i",{className:"icon-quxiaozhiding"}))),h.a.createElement(n.a,{title:"关闭",getPopupContainer:function(){return P.current}},h.a.createElement("span",{className:"",onClick:function(){C(),M(null)}},h.a.createElement("i",{className:"icon-guanbi1"})))),h.a.createElement("div",{className:"".concat(f.a[b]," ").concat(b," ").concat(f.a.monaco," ").concat("txt"===r?"show":"hide")},"txt"===r&&h.a.createElement(g.b,d)),"audio"===r&&h.a.createElement("audio",{src:"".concat((null==e?void 0:e.indexOf("http://"))>-1||(null==e?void 0:e.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(e),autoPlay:!0}),"video"===r&&h.a.createElement(h.a.Fragment,null,(null==e?void 0:e.indexOf("http"))>-1?h.a.createElement("video",{controls:!0,src:"".concat(e),autoPlay:!0}):h.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(e),autoPlay:!0})),"office"===r&&I&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(I.key,"&url=").concat(y.a.API_SERVER+I.url,"&callbackUrl=").concat(y.a.API_SERVER+I.callbackUrl,"&fileType=").concat(I.fileType,"&title=").concat(I.title,"&model=view")}),("xlsx"===r||"doc"===r||"pptx"===r||"docx"===r)&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(E.key,"&url=").concat(y.a.API_SERVER+E.url,"&callbackUrl=").concat(y.a.API_SERVER+E.callbackUrl,"&fileType=").concat(E.fileType,"&title=").concat(E.title,"&model=").concat(E.model)}),"html"===r&&h.a.createElement("iframe",{src:e+"&disposition=inline"}),"pdf"===r&&h.a.createElement("embed",{className:f.a.embed,src:e,type:"application/pdf"}),"image"===r&&h.a.createElement("img",{src:"".concat((null==e?void 0:e.indexOf("http://"))>-1||(null==e?void 0:e.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(e)}),"other"===r&&h.a.createElement("div",null,h.a.createElement(i.a,{type:"primary",size:"large",onClick:F},h.a.createElement(p.a,null),"点击下载")),"download"===r&&h.a.createElement(i.a,{type:"primary",size:"large",onClick:F},h.a.createElement(p.a,null),"点击下载"))}},"p77/": +/*! exports used: default */function(t,e,i){"use strict";i(/*! antd/es/button/style */"+L6B");var r=i(/*! antd/es/button */"2/Rp"),n=(i(/*! antd/es/tooltip/style */"5Dmo"),i(/*! antd/es/tooltip */"3S7+")),s=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),a=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=i.n(l),u=i(/*! react */"q1tI"),h=i.n(u),d=i(/*! ./index.less?modules */"vHTk"),f=i.n(d),p=i(/*! @ant-design/icons */"yEEn"),g=i(/*! @/components/monaco-editor */"ZW9T"),m=i(/*! @/utils/util */"1vsH"),v=i(/*! @/service/exercise */"V0Rq"),y=i(/*! @/utils/env */"m3rI");e.a=function(t){t.name;var e=t.data,i=(t.theme,t.type),l=t.filename,d=t.monacoEditor,b=t.className,x=t.style,S=t.close,C=t.onClose,w=t.hasMask,k=t.otherData,E=void 0===k?{}:k,T=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),L=Object(a.a)(T,2),A=(L[0],L[1],Object(u.useState)("")),D=Object(a.a)(A,2),R=(D[0],D[1]),O=Object(u.useState)(),_=Object(a.a)(O,2),I=_[0],M=_[1],P=Object(u.useRef)();"office"===i&&Object(m.P)(e).filesize>10485760&&(i="other"),l&&(d.filename=l),Object(u.useEffect)((function(){var t,e,i=null===(t=document.cookie)||void 0===t||null===(e=t.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==i||i.map((function(t){var e=t.split("=");"_educoder_session"===e[0]&&R(e[1])}))}),[]),Object(u.useEffect)((function(){"office"===i&&N()}),[i]);var N=function(){var t=Object(o.a)(c.a.mark((function t(){var i,r,n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("data:",e),i=e,e.startsWith("http")||(i=location.origin+i),r=new URL(i).pathname.split("/").pop(),t.next=6,Object(v.U)({attachment_id:r});case 6:n=t.sent,M(n);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),F=function(){e.startsWith("http")||e.startsWith("blob:")?B():Object(m.x)(l||"educoder",e,l)},B=function(){Object(m.v)(l||"educoder",decodeURIComponent(e))};return h.a.createElement("div",{style:Object(s.a)({},x||{}),className:"".concat(w&&f.a.bgBlack," ").concat(i?f.a.wrp:"hide")},S&&h.a.createElement("div",{className:f.a.close,ref:P},h.a.createElement(n.a,{title:"点击下载此文件",getPopupContainer:function(){return P.current}},h.a.createElement("span",{onClick:B},h.a.createElement("i",{className:"icon-quxiaozhiding"}))),h.a.createElement(n.a,{title:"关闭",getPopupContainer:function(){return P.current}},h.a.createElement("span",{className:"",onClick:function(){C(),M(null)}},h.a.createElement("i",{className:"icon-guanbi1"})))),h.a.createElement("div",{className:"".concat(f.a[b]," ").concat(b," ").concat(f.a.monaco," ").concat("txt"===i?"show":"hide")},"txt"===i&&h.a.createElement(g.b,d)),"audio"===i&&h.a.createElement("audio",{src:"".concat((null==e?void 0:e.indexOf("http://"))>-1||(null==e?void 0:e.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(e),autoPlay:!0}),"video"===i&&h.a.createElement(h.a.Fragment,null,(null==e?void 0:e.indexOf("http"))>-1?h.a.createElement("video",{controls:!0,src:"".concat(e),autoPlay:!0}):h.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(e),autoPlay:!0})),"office"===i&&I&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(I.key,"&url=").concat(y.a.API_SERVER+I.url,"&callbackUrl=").concat(y.a.API_SERVER+I.callbackUrl,"&fileType=").concat(I.fileType,"&title=").concat(I.title,"&model=view")}),("xlsx"===i||"doc"===i||"pptx"===i||"docx"===i)&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(E.key,"&url=").concat(y.a.API_SERVER+E.url,"&callbackUrl=").concat(y.a.API_SERVER+E.callbackUrl,"&fileType=").concat(E.fileType,"&title=").concat(E.title,"&model=").concat(E.model)}),"html"===i&&h.a.createElement("iframe",{src:e+"&disposition=inline"}),"pdf"===i&&h.a.createElement("embed",{className:f.a.embed,src:e,type:"application/pdf"}),"image"===i&&h.a.createElement("img",{src:"".concat((null==e?void 0:e.indexOf("http://"))>-1||(null==e?void 0:e.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(e)}),"other"===i&&h.a.createElement("div",null,h.a.createElement(r.a,{type:"primary",size:"large",onClick:F},h.a.createElement(p.a,null),"点击下载")),"download"===i&&h.a.createElement(r.a,{type:"primary",size:"large",onClick:F},h.a.createElement(p.a,null),"点击下载"))}},"p77/": /*!****************************************************!*\ !*** ./node_modules/codemirror/lib/codemirror.css ***! \****************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){},"rAM+": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){},"rAM+": /*!*******************************************************************************************************************!*\ !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***! \*******************************************************************************************************************/ /*! exports provided: default */ -/*! exports used: default */function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var i=r(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function n(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=Object(i.a)(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,s=function(){};return{s:s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw o}}}}},rUJ1: +/*! exports used: default */function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var r=i(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function n(t,e){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=Object(r.a)(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,s=function(){};return{s:s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(l)throw o}}}}},rUJ1: /*!********************************************!*\ !*** ./node_modules/marked/src/helpers.js ***! \********************************************/ /*! no static exports found */ /*! exports used: escape */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){const r=/[&<>"']/,i=/[&<>"']/g,n=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},a=t=>o[t];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(t){return t.replace(l,(t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")}const u=/(^|[^\[])\^/g;const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const f={},p=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(t,e){f[" "+t]||(p.test(t)?f[" "+t]=t+"/":f[" "+t]=y(t,"/",!0));const r=-1===(t=f[" "+t]).indexOf(":");return"//"===e.substring(0,2)?r?e:t.replace(g,"$1")+e:"/"===e.charAt(0)?r?e:t.replace(m,"$1")+e:t+e}function y(t,e,r){const i=t.length;if(0===i)return"";let n=0;for(;n(i=(i=i.source||i).replace(u,"$1"),t=t.replace(e,i),r),getRegex:()=>new RegExp(t,e)};return r},cleanUrl:function(t,e,r){if(t){let t;try{t=decodeURIComponent(c(r)).replace(h,"").toLowerCase()}catch(t){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!d.test(r)&&(r=v(e,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(t){return null}return r},resolveUrl:v,noopTest:{exec:function(){}},merge:function(t){let e,r,i=1;for(;i{let i=!1,n=e;for(;--n>=0&&"\\"===r[n];)i=!i;return i?"|":" |"}).split(/ \|/);let i=0;if(r.length>e)r.splice(e);else for(;r.length"']/,r=/[&<>"']/g,n=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},a=t=>o[t];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(t){return t.replace(l,(t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")}const u=/(^|[^\[])\^/g;const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const f={},p=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(t,e){f[" "+t]||(p.test(t)?f[" "+t]=t+"/":f[" "+t]=y(t,"/",!0));const i=-1===(t=f[" "+t]).indexOf(":");return"//"===e.substring(0,2)?i?e:t.replace(g,"$1")+e:"/"===e.charAt(0)?i?e:t.replace(m,"$1")+e:t+e}function y(t,e,i){const r=t.length;if(0===r)return"";let n=0;for(;n(r=(r=r.source||r).replace(u,"$1"),t=t.replace(e,r),i),getRegex:()=>new RegExp(t,e)};return i},cleanUrl:function(t,e,i){if(t){let t;try{t=decodeURIComponent(c(i)).replace(h,"").toLowerCase()}catch(t){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!d.test(i)&&(i=v(e,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(t){return null}return i},resolveUrl:v,noopTest:{exec:function(){}},merge:function(t){let e,i,r=1;for(;r{let r=!1,n=e;for(;--n>=0&&"\\"===i[n];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(i.length>e)i.splice(e);else for(;i.length0}),!1)}t.exports=function(t,e){e=e||{};var n={main:r.m},a=e.all?{main:Object.keys(n.main)}:function(t,e){for(var r={main:[e]},i={main:[]},n={main:{}};o(r);)for(var a=Object.keys(r),l=0;l0}),!1)}t.exports=function(t,e){e=e||{};var n={main:i.m},a=e.all?{main:Object.keys(n.main)}:function(t,e){for(var i={main:[e]},r={main:[]},n={main:{}};o(i);)for(var a=Object.keys(i),l=0;l=2*h/f||b<=S)){var C,w=Number.POSITIVE_INFINITY;for(C=t.level-1;C>g&&!((w=h*p[C].maxBitrate/(6.4*y))=b)){var k=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+t.sn+(e?" part "+e.index:"")+" of level "+t.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+C+"\n Current BW estimate: "+(Object(i.isFiniteNumber)(k)?(k/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+b.toFixed(3)+" s\n Estimated load time for the next fragment: "+w.toFixed(3)+" s\n Time to underbuffer: "+S.toFixed(3)+" s"),r.nextLoadLevel=C,this.bwEstimator.sample(d,u.loaded),this.clearTimer(),t.loader&&(this.fragCurrent=this.partCurrent=null,t.loader.abort()),r.trigger(s.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:e,stats:u})}}}}}},d.onFragLoaded=function(t,e){var r=e.frag,n=e.part;if(r.type===l.PlaylistLevelType.MAIN&&Object(i.isFiniteNumber)(r.sn)){var o=n?n.stats:r.stats,a=n?n.duration:r.duration;if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[r.level],u=(c.loaded?c.loaded.bytes:0)+o.loaded,h=(c.loaded?c.loaded.duration:0)+a;c.loaded={bytes:u,duration:h},c.realBitrate=Math.round(8*u/h)}if(r.bitrateTest){var d={stats:o,frag:r,part:n,id:r.type};this.onFragBuffered(s.Events.FRAG_BUFFERED,d),r.bitrateTest=!1}}},d.onFragBuffered=function(t,e){var r=e.frag,i=e.part,n=i?i.stats:r.stats;if(!n.aborted&&r.type===l.PlaylistLevelType.MAIN&&"initSegment"!==r.sn){var s=n.parsing.end-n.loading.start;this.bwEstimator.sample(s,n.loaded),n.bwEstimate=this.bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}},d.onError=function(t,e){switch(e.details){case a.ErrorDetails.FRAG_LOAD_ERROR:case a.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},d.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},d.getNextABRAutoLevel=function(){var t=this.fragCurrent,e=this.partCurrent,r=this.hls,i=r.maxAutoLevel,n=r.config,s=r.minAutoLevel,a=r.media,l=e?e.duration:t?t.duration:0,u=a?a.currentTime:0,h=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():n.abrEwmaDefaultEstimate,f=(o.BufferHelper.bufferInfo(a,u,n.maxBufferHole).end-u)/h,p=this.findBestLevel(d,s,i,f,n.abrBandWidthFactor,n.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var g=l?Math.min(l,n.maxStarvationDelay):n.maxStarvationDelay,m=n.abrBandWidthFactor,v=n.abrBandWidthUpFactor;if(!f){var y=this.bitrateTestDelay;y&&(g=(l?Math.min(l,n.maxLoadingDelay):n.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*g)+" ms"),m=v=1)}return p=this.findBestLevel(d,s,i,f+g,m,v),Math.max(p,0)},d.findBestLevel=function(t,e,r,i,n,s){for(var o,a=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,h=this.hls.levels,d=h[u],f=!(null==d||null===(o=d.details)||void 0===o||!o.live),p=null==d?void 0:d.codecSet,g=l?l.duration:a?a.duration:0,m=r;m>=e;m--){var v=h[m];if(v&&(!p||v.codecSet===p)){var y=v.details,b=(l?null==y?void 0:y.partTarget:null==y?void 0:y.averagetargetduration)||g,x=void 0;x=m<=u?n*t:s*t;var S=h[m].maxBitrate,C=S*b/x;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+m+"/"+Math.round(x)+"/"+S+"/"+b+"/"+i+"/"+C),x>S&&(!C||f&&!this.bitrateTestDelay||C=2*h/f||b<=S)){var C,w=Number.POSITIVE_INFINITY;for(C=t.level-1;C>g&&!((w=h*p[C].maxBitrate/(6.4*y))=b)){var k=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+t.sn+(e?" part "+e.index:"")+" of level "+t.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+C+"\n Current BW estimate: "+(Object(r.isFiniteNumber)(k)?(k/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+b.toFixed(3)+" s\n Estimated load time for the next fragment: "+w.toFixed(3)+" s\n Time to underbuffer: "+S.toFixed(3)+" s"),i.nextLoadLevel=C,this.bwEstimator.sample(d,u.loaded),this.clearTimer(),t.loader&&(this.fragCurrent=this.partCurrent=null,t.loader.abort()),i.trigger(s.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:e,stats:u})}}}}}},d.onFragLoaded=function(t,e){var i=e.frag,n=e.part;if(i.type===l.PlaylistLevelType.MAIN&&Object(r.isFiniteNumber)(i.sn)){var o=n?n.stats:i.stats,a=n?n.duration:i.duration;if(this.clearTimer(),this.lastLoadedFragLevel=i.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[i.level],u=(c.loaded?c.loaded.bytes:0)+o.loaded,h=(c.loaded?c.loaded.duration:0)+a;c.loaded={bytes:u,duration:h},c.realBitrate=Math.round(8*u/h)}if(i.bitrateTest){var d={stats:o,frag:i,part:n,id:i.type};this.onFragBuffered(s.Events.FRAG_BUFFERED,d),i.bitrateTest=!1}}},d.onFragBuffered=function(t,e){var i=e.frag,r=e.part,n=r?r.stats:i.stats;if(!n.aborted&&i.type===l.PlaylistLevelType.MAIN&&"initSegment"!==i.sn){var s=n.parsing.end-n.loading.start;this.bwEstimator.sample(s,n.loaded),n.bwEstimate=this.bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}},d.onError=function(t,e){switch(e.details){case a.ErrorDetails.FRAG_LOAD_ERROR:case a.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},d.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},d.getNextABRAutoLevel=function(){var t=this.fragCurrent,e=this.partCurrent,i=this.hls,r=i.maxAutoLevel,n=i.config,s=i.minAutoLevel,a=i.media,l=e?e.duration:t?t.duration:0,u=a?a.currentTime:0,h=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():n.abrEwmaDefaultEstimate,f=(o.BufferHelper.bufferInfo(a,u,n.maxBufferHole).end-u)/h,p=this.findBestLevel(d,s,r,f,n.abrBandWidthFactor,n.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var g=l?Math.min(l,n.maxStarvationDelay):n.maxStarvationDelay,m=n.abrBandWidthFactor,v=n.abrBandWidthUpFactor;if(!f){var y=this.bitrateTestDelay;y&&(g=(l?Math.min(l,n.maxLoadingDelay):n.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*g)+" ms"),m=v=1)}return p=this.findBestLevel(d,s,r,f+g,m,v),Math.max(p,0)},d.findBestLevel=function(t,e,i,r,n,s){for(var o,a=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,h=this.hls.levels,d=h[u],f=!(null==d||null===(o=d.details)||void 0===o||!o.live),p=null==d?void 0:d.codecSet,g=l?l.duration:a?a.duration:0,m=i;m>=e;m--){var v=h[m];if(v&&(!p||v.codecSet===p)){var y=v.details,b=(l?null==y?void 0:y.partTarget:null==y?void 0:y.averagetargetduration)||g,x=void 0;x=m<=u?n*t:s*t;var S=h[m].maxBitrate,C=S*b/x;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+m+"/"+Math.round(x)+"/"+S+"/"+b+"/"+r+"/"+C),x>S&&(!C||f&&!this.bitrateTestDelay||C0&&-1===t?(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=n.State.IDLE):(this.loadedmetadata=!1,this.state=n.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()},S.doTick=function(){switch(this.state){case n.State.IDLE:this.doTickIdle();break;case n.State.WAITING_TRACK:var e,r=this.levels,i=this.trackId,s=null==r||null===(e=r[i])||void 0===e?void 0:e.details;if(s){if(this.waitForCdnTuneIn(s))break;this.state=n.State.WAITING_INIT_PTS}break;case n.State.FRAG_LOADING_WAITING_RETRY:var a,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=n.State.IDLE);break;case n.State.WAITING_INIT_PTS:var u=this.waitingData;if(u){var h=u.frag,d=u.part,f=u.cache,g=u.complete;if(void 0!==this.initPTS[h.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=n.State.FRAG_LOADING;var m={frag:h,part:d,payload:f.flush(),networkDetails:null};this._handleFragmentLoadProgress(m),g&&t.prototype._handleFragmentLoadComplete.call(this,m)}else if(this.videoTrackCC!==this.waitingVideoCC)v.logger.log("Waiting fragment cc ("+h.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var y=this.getLoadPosition(),b=o.BufferHelper.bufferInfo(this.mediaBuffer,y,this.config.maxBufferHole);Object(p.fragmentWithinToleranceTest)(b.end,this.config.maxFragLookUpTolerance,h)<0&&(v.logger.log("Waiting fragment cc ("+h.cc+") @ "+h.start+" cancelled because another fragment at "+b.end+" is needed"),this.clearWaitingFragment())}}else this.state=n.State.IDLE}this.onTickEnd()},S.clearWaitingFragment=function(){var t=this.waitingData;t&&(this.fragmentTracker.removeFragment(t.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=n.State.IDLE)},S.onTickEnd=function(){var t=this.media;if(t&&t.readyState){var e=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&e.length&&(this.loadedmetadata=!0),this.lastCurrentTime=t.currentTime}},S.doTickIdle=function(){var t,e,r=this.hls,i=this.levels,o=this.media,a=this.trackId,l=r.config;if(i&&i[a]&&(o||!this.startFragRequested&&l.startFragPrefetch)){var h=i[a].details;if(!h||h.live&&this.levelLastLoaded!==a||this.waitForCdnTuneIn(h))this.state=n.State.WAITING_TRACK;else{this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,u.ElementaryStreamTypes.AUDIO,c.PlaylistLevelType.AUDIO));var d=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,c.PlaylistLevelType.AUDIO);if(null!==d){var f=d.len,p=this.getMaxBufferLength(),g=this.audioSwitch;if(!(f>=p)||g){if(!g&&this._streamEnded(d,h))return r.trigger(s.Events.BUFFER_EOS,{type:"audio"}),void(this.state=n.State.ENDED);var m=h.fragments[0].start,v=d.end;if(g){var y=this.getLoadPosition();v=y,h.PTSKnown&&ym||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),o.currentTime=m+.05)}var b=this.getNextFragment(v,h);b?"identity"!==(null===(t=b.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=b.decryptdata)&&void 0!==e&&e.key?this.loadFragment(b,h,v):this.loadKey(b,h):this.bufferFlushed=!0}}}}},S.getMaxBufferLength=function(){var e=t.prototype.getMaxBufferLength.call(this),r=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===r?e:Math.max(e,r.len)},S.onMediaDetaching=function(){this.videoBuffer=null,t.prototype.onMediaDetaching.call(this)},S.onAudioTracksUpdated=function(t,e){var r=e.audioTracks;this.resetTransmuxer(),this.levels=r.map((function(t){return new l.Level(t)}))},S.onAudioTrackSwitching=function(t,e){var r=!!e.url;this.trackId=e.id;var i=this.fragCurrent;null!=i&&i.loader&&i.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),r?this.setInterval(100):this.resetTransmuxer(),r?(this.audioSwitch=!0,this.state=n.State.IDLE):this.state=n.State.STOPPED,this.tick()},S.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},S.onLevelLoaded=function(t,e){this.mainDetails=e.details},S.onAudioTrackLoaded=function(t,e){var r,i=this.levels,s=e.details,o=e.id;if(i){this.log("Track "+o+" loaded ["+s.startSN+","+s.endSN+"],duration:"+s.totalduration);var a=i[o],l=0;if(s.live||null!==(r=a.details)&&void 0!==r&&r.live){var c=this.mainDetails;if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed||!c)return;!a.details&&s.hasProgramDateTime&&c.hasProgramDateTime?(Object(g.alignMediaPlaylistByPDT)(s,c),l=s.fragments[0].start):l=this.alignPlaylists(s,a.details)}a.details=s,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&s.live||this.setStartPosition(a.details,l),this.state!==n.State.WAITING_TRACK||this.waitForCdnTuneIn(s)||(this.state=n.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+o)},S._handleFragmentLoadProgress=function(t){var e,r=t.frag,i=t.part,s=t.payload,o=this.config,a=this.trackId,l=this.levels;if(l){var u=l[a];console.assert(u,"Audio track is defined on fragment load progress");var p=u.details;console.assert(p,"Audio track details are defined on fragment load progress");var g=o.defaultAudioCodec||u.audioCodec||"mp4a.40.2",m=this.transmuxer;m||(m=this.transmuxer=new d.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var y=this.initPTS[r.cc],b=null===(e=r.initSegment)||void 0===e?void 0:e.data;if(void 0!==y){var x=i?i.index:-1,S=-1!==x,C=new f.ChunkMetadata(r.level,r.sn,r.stats.chunkCount,s.byteLength,x,S);m.push(s,b,g,"",r,i,p.totalduration,!1,C,y)}else v.logger.log("Unknown video PTS for cc "+r.cc+", waiting for video PTS before demuxing audio frag "+r.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+a),(this.waitingData=this.waitingData||{frag:r,part:i,cache:new h.default,complete:!1}).cache.push(new Uint8Array(s)),this.waitingVideoCC=this.videoTrackCC,this.state=n.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered")},S._handleFragmentLoadComplete=function(e){this.waitingData?this.waitingData.complete=!0:t.prototype._handleFragmentLoadComplete.call(this,e)},S.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},S.onBufferCreated=function(t,e){var r=e.tracks.audio;r&&(this.mediaBuffer=r.buffer),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},S.onFragBuffered=function(t,e){var r=e.frag,i=e.part;r.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(r)?this.warn("Fragment "+r.sn+(i?" p: "+i.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==r.sn&&(this.fragPrevious=r,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(r,i)))},S.onError=function(e,r){switch(r.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,r);break;case m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==n.State.ERROR&&this.state!==n.State.STOPPED&&(this.state=r.fatal?n.State.ERROR:n.State.IDLE,this.warn(r.details+" while loading frag, switching to "+this.state+" state"));break;case m.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===r.parent&&(this.state===n.State.PARSING||this.state===n.State.PARSED)){var i=!0,s=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);s&&s.len>.5&&(i=!this.reduceMaxBufferLength(s.len)),i&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},S.onBufferFlushed=function(t,e){e.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},S._handleTransmuxComplete=function(t){var e,r="audio",i=this.hls,o=t.remuxResult,a=t.chunkMeta,l=this.getCurrentContext(a);if(!l)return this.warn("The loading context changed while buffering fragment "+a.sn+" of level "+a.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(a.level);var c=l.frag,h=l.part,d=o.audio,f=o.text,p=o.id3,g=o.initSegment;if(!this.fragContextChanged(c)){if(this.state=n.State.PARSING,this.audioSwitch&&d&&this.completeAudioSwitch(),null!=g&&g.tracks&&(this._bufferInitSegment(g.tracks,c,a),i.trigger(s.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:r,tracks:g.tracks})),d){var m=d.startPTS,v=d.endPTS,b=d.startDTS,x=d.endDTS;h&&(h.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:m,endPTS:v,startDTS:b,endDTS:x}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,m,v,b,x),this.bufferFragmentData(d,c,h,a)}if(null!=p&&null!==(e=p.samples)&&void 0!==e&&e.length){var S=y({frag:c,id:r},p);i.trigger(s.Events.FRAG_PARSING_METADATA,S)}if(f){var C=y({frag:c,id:r},f);i.trigger(s.Events.FRAG_PARSING_USERDATA,C)}}},S._bufferInitSegment=function(t,e,r){if(this.state===n.State.PARSING){t.video&&delete t.video;var i=t.audio;if(i){i.levelCodec=i.codec,i.id="audio",this.log("Init audio buffer, container:"+i.container+", codecs[parsed]=["+i.codec+"]"),this.hls.trigger(s.Events.BUFFER_CODECS,t);var o=i.initSegment;if(null!=o&&o.byteLength){var a={type:"audio",frag:e,part:null,chunkMeta:r,parent:e.type,data:o};this.hls.trigger(s.Events.BUFFER_APPENDING,a)}this.tick()}}},S.loadFragment=function(e,r,s){var o=this.fragmentTracker.getState(e);this.fragCurrent=e,(this.audioSwitch||o===a.FragmentState.NOT_LOADED||o===a.FragmentState.PARTIAL)&&("initSegment"===e.sn?this._loadInitSegment(e):r.live&&!Object(i.isFiniteNumber)(this.initPTS[e.cc])?(this.log("Waiting for video PTS in continuity counter "+e.cc+" of live stream before loading audio fragment "+e.sn+" of level "+this.trackId),this.state=n.State.WAITING_INIT_PTS):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,r,s)))},S.completeAudioSwitch=function(){var e=this.hls,r=this.media,i=this.trackId;r&&(this.log("Switching audio track : flushing all audio"),t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,e.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:i})},x}(n.default);e.default=x},"./src/controller/audio-track-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),s=i(/*! ../events */"./src/events.ts"),o=i(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),a=i(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),l=i(/*! ../types/level */"./src/types/level.ts"),c=i(/*! ../types/loader */"./src/types/loader.ts"),u=i(/*! ../loader/fragment */"./src/loader/fragment.ts"),h=i(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts"),d=i(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),f=i(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),p=i(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),g=i(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),m=i(/*! ../errors */"./src/errors.ts"),v=i(/*! ../utils/logger */"./src/utils/logger.ts");function y(){return(y=Object.assign||function(t){for(var e=1;e0&&-1===t?(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=n.State.IDLE):(this.loadedmetadata=!1,this.state=n.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()},S.doTick=function(){switch(this.state){case n.State.IDLE:this.doTickIdle();break;case n.State.WAITING_TRACK:var e,i=this.levels,r=this.trackId,s=null==i||null===(e=i[r])||void 0===e?void 0:e.details;if(s){if(this.waitForCdnTuneIn(s))break;this.state=n.State.WAITING_INIT_PTS}break;case n.State.FRAG_LOADING_WAITING_RETRY:var a,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=n.State.IDLE);break;case n.State.WAITING_INIT_PTS:var u=this.waitingData;if(u){var h=u.frag,d=u.part,f=u.cache,g=u.complete;if(void 0!==this.initPTS[h.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=n.State.FRAG_LOADING;var m={frag:h,part:d,payload:f.flush(),networkDetails:null};this._handleFragmentLoadProgress(m),g&&t.prototype._handleFragmentLoadComplete.call(this,m)}else if(this.videoTrackCC!==this.waitingVideoCC)v.logger.log("Waiting fragment cc ("+h.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var y=this.getLoadPosition(),b=o.BufferHelper.bufferInfo(this.mediaBuffer,y,this.config.maxBufferHole);Object(p.fragmentWithinToleranceTest)(b.end,this.config.maxFragLookUpTolerance,h)<0&&(v.logger.log("Waiting fragment cc ("+h.cc+") @ "+h.start+" cancelled because another fragment at "+b.end+" is needed"),this.clearWaitingFragment())}}else this.state=n.State.IDLE}this.onTickEnd()},S.clearWaitingFragment=function(){var t=this.waitingData;t&&(this.fragmentTracker.removeFragment(t.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=n.State.IDLE)},S.onTickEnd=function(){var t=this.media;if(t&&t.readyState){var e=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&e.length&&(this.loadedmetadata=!0),this.lastCurrentTime=t.currentTime}},S.doTickIdle=function(){var t,e,i=this.hls,r=this.levels,o=this.media,a=this.trackId,l=i.config;if(r&&r[a]&&(o||!this.startFragRequested&&l.startFragPrefetch)){var h=r[a].details;if(!h||h.live&&this.levelLastLoaded!==a||this.waitForCdnTuneIn(h))this.state=n.State.WAITING_TRACK;else{this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,u.ElementaryStreamTypes.AUDIO,c.PlaylistLevelType.AUDIO));var d=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,c.PlaylistLevelType.AUDIO);if(null!==d){var f=d.len,p=this.getMaxBufferLength(),g=this.audioSwitch;if(!(f>=p)||g){if(!g&&this._streamEnded(d,h))return i.trigger(s.Events.BUFFER_EOS,{type:"audio"}),void(this.state=n.State.ENDED);var m=h.fragments[0].start,v=d.end;if(g){var y=this.getLoadPosition();v=y,h.PTSKnown&&ym||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),o.currentTime=m+.05)}var b=this.getNextFragment(v,h);b?"identity"!==(null===(t=b.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=b.decryptdata)&&void 0!==e&&e.key?this.loadFragment(b,h,v):this.loadKey(b,h):this.bufferFlushed=!0}}}}},S.getMaxBufferLength=function(){var e=t.prototype.getMaxBufferLength.call(this),i=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===i?e:Math.max(e,i.len)},S.onMediaDetaching=function(){this.videoBuffer=null,t.prototype.onMediaDetaching.call(this)},S.onAudioTracksUpdated=function(t,e){var i=e.audioTracks;this.resetTransmuxer(),this.levels=i.map((function(t){return new l.Level(t)}))},S.onAudioTrackSwitching=function(t,e){var i=!!e.url;this.trackId=e.id;var r=this.fragCurrent;null!=r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),i?this.setInterval(100):this.resetTransmuxer(),i?(this.audioSwitch=!0,this.state=n.State.IDLE):this.state=n.State.STOPPED,this.tick()},S.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},S.onLevelLoaded=function(t,e){this.mainDetails=e.details},S.onAudioTrackLoaded=function(t,e){var i,r=this.levels,s=e.details,o=e.id;if(r){this.log("Track "+o+" loaded ["+s.startSN+","+s.endSN+"],duration:"+s.totalduration);var a=r[o],l=0;if(s.live||null!==(i=a.details)&&void 0!==i&&i.live){var c=this.mainDetails;if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed||!c)return;!a.details&&s.hasProgramDateTime&&c.hasProgramDateTime?(Object(g.alignMediaPlaylistByPDT)(s,c),l=s.fragments[0].start):l=this.alignPlaylists(s,a.details)}a.details=s,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&s.live||this.setStartPosition(a.details,l),this.state!==n.State.WAITING_TRACK||this.waitForCdnTuneIn(s)||(this.state=n.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+o)},S._handleFragmentLoadProgress=function(t){var e,i=t.frag,r=t.part,s=t.payload,o=this.config,a=this.trackId,l=this.levels;if(l){var u=l[a];console.assert(u,"Audio track is defined on fragment load progress");var p=u.details;console.assert(p,"Audio track details are defined on fragment load progress");var g=o.defaultAudioCodec||u.audioCodec||"mp4a.40.2",m=this.transmuxer;m||(m=this.transmuxer=new d.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var y=this.initPTS[i.cc],b=null===(e=i.initSegment)||void 0===e?void 0:e.data;if(void 0!==y){var x=r?r.index:-1,S=-1!==x,C=new f.ChunkMetadata(i.level,i.sn,i.stats.chunkCount,s.byteLength,x,S);m.push(s,b,g,"",i,r,p.totalduration,!1,C,y)}else v.logger.log("Unknown video PTS for cc "+i.cc+", waiting for video PTS before demuxing audio frag "+i.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+a),(this.waitingData=this.waitingData||{frag:i,part:r,cache:new h.default,complete:!1}).cache.push(new Uint8Array(s)),this.waitingVideoCC=this.videoTrackCC,this.state=n.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+i.sn+" of level "+i.level+" will not be buffered")},S._handleFragmentLoadComplete=function(e){this.waitingData?this.waitingData.complete=!0:t.prototype._handleFragmentLoadComplete.call(this,e)},S.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},S.onBufferCreated=function(t,e){var i=e.tracks.audio;i&&(this.mediaBuffer=i.buffer),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},S.onFragBuffered=function(t,e){var i=e.frag,r=e.part;i.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(i)?this.warn("Fragment "+i.sn+(r?" p: "+r.index:"")+" of level "+i.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==i.sn&&(this.fragPrevious=i,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(i,r)))},S.onError=function(e,i){switch(i.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,i);break;case m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==n.State.ERROR&&this.state!==n.State.STOPPED&&(this.state=i.fatal?n.State.ERROR:n.State.IDLE,this.warn(i.details+" while loading frag, switching to "+this.state+" state"));break;case m.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===i.parent&&(this.state===n.State.PARSING||this.state===n.State.PARSED)){var r=!0,s=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);s&&s.len>.5&&(r=!this.reduceMaxBufferLength(s.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},S.onBufferFlushed=function(t,e){e.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},S._handleTransmuxComplete=function(t){var e,i="audio",r=this.hls,o=t.remuxResult,a=t.chunkMeta,l=this.getCurrentContext(a);if(!l)return this.warn("The loading context changed while buffering fragment "+a.sn+" of level "+a.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(a.level);var c=l.frag,h=l.part,d=o.audio,f=o.text,p=o.id3,g=o.initSegment;if(!this.fragContextChanged(c)){if(this.state=n.State.PARSING,this.audioSwitch&&d&&this.completeAudioSwitch(),null!=g&&g.tracks&&(this._bufferInitSegment(g.tracks,c,a),r.trigger(s.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:i,tracks:g.tracks})),d){var m=d.startPTS,v=d.endPTS,b=d.startDTS,x=d.endDTS;h&&(h.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:m,endPTS:v,startDTS:b,endDTS:x}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,m,v,b,x),this.bufferFragmentData(d,c,h,a)}if(null!=p&&null!==(e=p.samples)&&void 0!==e&&e.length){var S=y({frag:c,id:i},p);r.trigger(s.Events.FRAG_PARSING_METADATA,S)}if(f){var C=y({frag:c,id:i},f);r.trigger(s.Events.FRAG_PARSING_USERDATA,C)}}},S._bufferInitSegment=function(t,e,i){if(this.state===n.State.PARSING){t.video&&delete t.video;var r=t.audio;if(r){r.levelCodec=r.codec,r.id="audio",this.log("Init audio buffer, container:"+r.container+", codecs[parsed]=["+r.codec+"]"),this.hls.trigger(s.Events.BUFFER_CODECS,t);var o=r.initSegment;if(null!=o&&o.byteLength){var a={type:"audio",frag:e,part:null,chunkMeta:i,parent:e.type,data:o};this.hls.trigger(s.Events.BUFFER_APPENDING,a)}this.tick()}}},S.loadFragment=function(e,i,s){var o=this.fragmentTracker.getState(e);this.fragCurrent=e,(this.audioSwitch||o===a.FragmentState.NOT_LOADED||o===a.FragmentState.PARTIAL)&&("initSegment"===e.sn?this._loadInitSegment(e):i.live&&!Object(r.isFiniteNumber)(this.initPTS[e.cc])?(this.log("Waiting for video PTS in continuity counter "+e.cc+" of live stream before loading audio fragment "+e.sn+" of level "+this.trackId),this.state=n.State.WAITING_INIT_PTS):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,i,s)))},S.completeAudioSwitch=function(){var e=this.hls,i=this.media,r=this.trackId;i&&(this.log("Switching audio track : flushing all audio"),t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,e.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:r})},x}(n.default);e.default=x},"./src/controller/audio-track-controller.ts": /*!**************************************************!*\ !*** ./src/controller/audio-track-controller.ts ***! \**************************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ../events */"./src/events.ts"),n=r(/*! ../errors */"./src/errors.ts"),s=r(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),o=r(/*! ../types/loader */"./src/types/loader.ts");function a(t,e){for(var r=0;r=e.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var r=e[this.trackId];this.log("Now switching to audio-track index "+t);var n=e[t],s=n.id,o=n.groupId,a=void 0===o?"":o,l=n.name,c=n.type,u=n.url;if(this.trackId=t,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(i.Events.AUDIO_TRACK_SWITCHING,{id:s,groupId:a,name:l,type:c,url:u}),!n.details||n.details.live){var h=this.switchParams(n.url,null==r?void 0:r.details);this.loadPlaylist(h)}}},d.selectInitialTrack=function(){var t=this.tracksInGroup;console.assert(t.length,"Initial audio track should be selected when tracks are known");var e=this.trackName,r=this.findTrackId(e)||this.findTrackId();-1!==r?this.setAudioTrack(r):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(i.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},d.findTrackId=function(t){for(var e=this.tracksInGroup,r=0;r=e.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var i=e[this.trackId];this.log("Now switching to audio-track index "+t);var n=e[t],s=n.id,o=n.groupId,a=void 0===o?"":o,l=n.name,c=n.type,u=n.url;if(this.trackId=t,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(r.Events.AUDIO_TRACK_SWITCHING,{id:s,groupId:a,name:l,type:c,url:u}),!n.details||n.details.live){var h=this.switchParams(n.url,null==i?void 0:i.details);this.loadPlaylist(h)}}},d.selectInitialTrack=function(){var t=this.tracksInGroup;console.assert(t.length,"Initial audio track should be selected when tracks are known");var e=this.trackName,i=this.findTrackId(e)||this.findTrackId();-1!==i?this.setAudioTrack(i):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(r.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},d.findTrackId=function(t){for(var e=this.tracksInGroup,i=0;ie.partTarget&&(c+=1)}if(Object(i.isFiniteNumber)(l))return new n.HlsUrlParameters(l,Object(i.isFiniteNumber)(c)?c:void 0,n.HlsSkip.No)}}},e.loadPlaylist=function(t){},e.shouldLoadTrack=function(t){return this.canLoad&&t&&!!t.url&&(!t.details||t.details.live)},e.playlistLoaded=function(t,e,r){var i=this,n=e.details,o=e.stats,a=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(n.advancedDateTime=Date.now()-a,n.live||null!=r&&r.live){if(n.reloaded(r),r&&this.log("live playlist "+t+" "+(n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:"MISSED")),r&&n.fragments.length>0&&Object(s.mergeDetails)(r,n),!this.canLoad||!n.live)return;var l,c=void 0,u=void 0;if(n.canBlockReload&&n.endSN&&n.advanced){var h=this.hls.config.lowLatencyMode,d=n.lastPartSn,f=n.endSN,p=n.lastPartIndex,g=d===f;-1!==p?(c=g?f+1:d,u=g?h?0:p:p+1):c=f+1;var m=n.age,v=m+n.ageHeader,y=Math.min(v-n.partTarget,1.5*n.targetduration);if(y>0){if(r&&y>r.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+r.tuneInGoal+" to: "+y+" with playlist age: "+n.age),y=0;else{var b=Math.floor(y/n.targetduration);c+=b,void 0!==u&&(u+=Math.round(y%n.targetduration/n.partTarget)),this.log("CDN Tune-in age: "+n.ageHeader+"s last advanced "+m.toFixed(2)+"s goal: "+y+" skip sn "+b+" to part "+u)}n.tuneInGoal=y}if(l=this.getDeliveryDirectives(n,e.deliveryDirectives,c,u),h||!g)return void this.loadPlaylist(l)}else l=this.getDeliveryDirectives(n,e.deliveryDirectives,c,u);var x=Object(s.computeReloadInterval)(n,o);void 0!==c&&n.canBlockReload&&(x-=n.partTarget||1),this.log("reload live playlist "+t+" in "+Math.round(x)+" ms"),this.timer=self.setTimeout((function(){return i.loadPlaylist(l)}),x)}else this.clearTimer()},e.getDeliveryDirectives=function(t,e,r,i){var s=Object(n.getSkipValue)(t,r);return null!=e&&e.skip&&t.deltaUpdateFailed&&(r=e.msn,i=e.part,s=n.HlsSkip.No),new n.HlsUrlParameters(r,i,s)},e.retryLoadingOrFail=function(t){var e,r=this,i=this.hls.config,n=this.retryCount-1&&null!==(e=t.context)&&void 0!==e&&e.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+t.details+'"'),this.loadPlaylist();else{var s=Math.min(Math.pow(2,this.retryCount)*i.levelLoadingRetryDelay,i.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return r.loadPlaylist()}),s),this.warn("retry playlist loading #"+this.retryCount+" in "+s+' ms after "'+t.details+'"')}else this.warn('cannot recover from error "'+t.details+'"'),this.clearTimer(),t.fatal=!0;return n},t}()},"./src/controller/base-stream-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return l}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../types/level */"./src/types/level.ts"),s=i(/*! ./level-helper */"./src/controller/level-helper.ts"),o=i(/*! ../utils/logger */"./src/utils/logger.ts"),a=i(/*! ../errors */"./src/errors.ts"),l=function(){function t(t,e){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=o.logger.log.bind(o.logger,e+":"),this.warn=o.logger.warn.bind(o.logger,e+":"),this.hls=t}var e=t.prototype;return e.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},e.onError=function(t,e){e.fatal&&e.type===a.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},e.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},e.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},e.stopLoad=function(){this.canLoad=!1,this.clearTimer()},e.switchParams=function(t,e){var i=null==e?void 0:e.renditionReports;if(i)for(var s=0;se.partTarget&&(c+=1)}if(Object(r.isFiniteNumber)(l))return new n.HlsUrlParameters(l,Object(r.isFiniteNumber)(c)?c:void 0,n.HlsSkip.No)}}},e.loadPlaylist=function(t){},e.shouldLoadTrack=function(t){return this.canLoad&&t&&!!t.url&&(!t.details||t.details.live)},e.playlistLoaded=function(t,e,i){var r=this,n=e.details,o=e.stats,a=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(n.advancedDateTime=Date.now()-a,n.live||null!=i&&i.live){if(n.reloaded(i),i&&this.log("live playlist "+t+" "+(n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:"MISSED")),i&&n.fragments.length>0&&Object(s.mergeDetails)(i,n),!this.canLoad||!n.live)return;var l,c=void 0,u=void 0;if(n.canBlockReload&&n.endSN&&n.advanced){var h=this.hls.config.lowLatencyMode,d=n.lastPartSn,f=n.endSN,p=n.lastPartIndex,g=d===f;-1!==p?(c=g?f+1:d,u=g?h?0:p:p+1):c=f+1;var m=n.age,v=m+n.ageHeader,y=Math.min(v-n.partTarget,1.5*n.targetduration);if(y>0){if(i&&y>i.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+i.tuneInGoal+" to: "+y+" with playlist age: "+n.age),y=0;else{var b=Math.floor(y/n.targetduration);c+=b,void 0!==u&&(u+=Math.round(y%n.targetduration/n.partTarget)),this.log("CDN Tune-in age: "+n.ageHeader+"s last advanced "+m.toFixed(2)+"s goal: "+y+" skip sn "+b+" to part "+u)}n.tuneInGoal=y}if(l=this.getDeliveryDirectives(n,e.deliveryDirectives,c,u),h||!g)return void this.loadPlaylist(l)}else l=this.getDeliveryDirectives(n,e.deliveryDirectives,c,u);var x=Object(s.computeReloadInterval)(n,o);void 0!==c&&n.canBlockReload&&(x-=n.partTarget||1),this.log("reload live playlist "+t+" in "+Math.round(x)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),x)}else this.clearTimer()},e.getDeliveryDirectives=function(t,e,i,r){var s=Object(n.getSkipValue)(t,i);return null!=e&&e.skip&&t.deltaUpdateFailed&&(i=e.msn,r=e.part,s=n.HlsSkip.No),new n.HlsUrlParameters(i,r,s)},e.retryLoadingOrFail=function(t){var e,i=this,r=this.hls.config,n=this.retryCount-1&&null!==(e=t.context)&&void 0!==e&&e.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+t.details+'"'),this.loadPlaylist();else{var s=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return i.loadPlaylist()}),s),this.warn("retry playlist loading #"+this.retryCount+" in "+s+' ms after "'+t.details+'"')}else this.warn('cannot recover from error "'+t.details+'"'),this.clearTimer(),t.fatal=!0;return n},t}()},"./src/controller/base-stream-controller.ts": /*!**************************************************!*\ !*** ./src/controller/base-stream-controller.ts ***! \**************************************************/ -/*! exports provided: State, default */function(t,e,r){"use strict";r.r(e),r.d(e,"State",(function(){return S})),r.d(e,"default",(function(){return C}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../task-loop */"./src/task-loop.ts"),s=r(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),o=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),a=r(/*! ../utils/logger */"./src/utils/logger.ts"),l=r(/*! ../events */"./src/events.ts"),c=r(/*! ../errors */"./src/errors.ts"),u=r(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),h=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),d=r(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),f=r(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=r(/*! ./level-helper */"./src/controller/level-helper.ts"),g=r(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),m=r(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),v=r(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),y=r(/*! ../types/loader */"./src/types/loader.ts");function b(t,e){for(var r=0;re.start+e.duration+c;(a0&&s&&s.key&&s.iv&&"AES-128"===s.method){var o=self.performance.now();return e.decrypter.webCryptoDecrypt(new Uint8Array(n),s.key.buffer,s.iv.buffer).then((function(e){var n=self.performance.now();return i.trigger(l.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:o,tdecrypt:n}}),r.payload=e,r}))}return r})).then((function(r){var i=e.fragCurrent,n=e.hls,s=e.levels;if(!s)throw new Error("init load aborted, missing levels");var o=s[t.level].details;console.assert(o,"Level details are defined when init segment is loaded");var a=t.stats;e.state=S.IDLE,e.fragLoadError=0,t.data=new Uint8Array(r.payload),a.parsing.start=a.buffering.start=self.performance.now(),a.parsing.end=a.buffering.end=self.performance.now(),r.frag===i&&n.trigger(l.Events.FRAG_BUFFERED,{stats:a,frag:i,part:null,id:t.type}),e.tick()})).catch((function(r){e.warn(r),e.resetFragmentLoading(t)}))},E.fragContextChanged=function(t){var e=this.fragCurrent;return!t||!e||t.level!==e.level||t.sn!==e.sn||t.urlId!==e.urlId},E.fragBufferedComplete=function(t,e){var r=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+t.type+" sn: "+t.sn+(e?" part: "+e.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level+" "+v.default.toString(o.BufferHelper.getBuffered(r))),this.state=S.IDLE,this.tick()},E._handleFragmentLoadComplete=function(t){var e=this.transmuxer;if(e){var r=t.frag,i=t.part,n=t.partsLoaded,s=!n||0===n.length||n.some((function(t){return!t})),o=new u.ChunkMetadata(r.level,r.sn,r.stats.chunkCount+1,0,i?i.index:-1,!s);e.flush(o)}},E._handleFragmentLoadProgress=function(t){},E._doFragLoad=function(t,e,r,n){var s=this;if(void 0===r&&(r=null),!this.levels)throw new Error("frag load aborted, missing levels");if(r=Math.max(t.start,r||0),this.config.lowLatencyMode&&e){var o=e.partList;if(o&&n){r>t.end&&e.fragmentHint&&(t=e.fragmentHint);var a=this.getNextPart(o,t,r);if(a>-1){var c=o[a];return this.log("Loading part sn: "+t.sn+" p: "+c.index+" cc: "+t.cc+" of playlist ["+e.startSN+"-"+e.endSN+"] parts [0-"+a+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(r.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=S.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,part:o[a],targetBufferTime:r}),this.doFragPartsLoad(t,o,a,n).catch((function(t){return s.handleFragLoadError(t)}))}if(!t.url||this.loadedEndOfParts(o,r))return Promise.resolve(null)}}return this.log("Loading fragment "+t.sn+" cc: "+t.cc+" "+(e?"of ["+e.startSN+"-"+e.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(r.toFixed(3))),Object(i.isFiniteNumber)(t.sn)&&!this.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),this.state=S.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,targetBufferTime:r}),this.fragmentLoader.load(t,n).catch((function(t){return s.handleFragLoadError(t)}))},E.doFragPartsLoad=function(t,e,r,i){var n=this;return new Promise((function(s,o){var a=[];!function r(c){var u=e[c];n.fragmentLoader.loadPart(t,u,i).then((function(i){a[u.index]=i;var o=i.part;n.hls.trigger(l.Events.FRAG_LOADED,i);var h=e[c+1];if(!h||h.fragment!==t)return s({frag:t,part:o,partsLoaded:a});r(c+1)})).catch(o)}(r)}))},E.handleFragLoadError=function(t){var e=t.data;return e&&e.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(e.frag,e.part):this.hls.trigger(l.Events.ERROR,e),null},E._handleTransmuxerFlush=function(t){var e=this.getCurrentContext(t);if(e&&this.state===S.PARSING){var r=e.frag,i=e.part,n=e.level,s=self.performance.now();r.stats.parsing.end=s,i&&(i.stats.parsing.end=s),this.updateLevelTiming(r,i,n,t.partial)}else this.fragCurrent||(this.state=S.IDLE)},E.getCurrentContext=function(t){var e=this.levels,r=t.level,i=t.sn,n=t.part;if(!e||!e[r])return this.warn("Levels object was unset while buffering fragment "+i+" of level "+r+". The current chunk will not be buffered."),null;var s=e[r],o=n>-1?Object(p.getPartWith)(s,i,n):null,a=o?o.fragment:Object(p.getFragmentWithSN)(s,i,this.fragCurrent);return a?{frag:a,part:o,level:s}:null},E.bufferFragmentData=function(t,e,r,i){if(t&&this.state===S.PARSING){var n=t.data1,s=t.data2,o=n;if(n&&s&&(o=Object(h.appendUint8Array)(n,s)),o&&o.length){var a={type:t.type,frag:e,part:r,chunkMeta:i,parent:e.type,data:o};this.hls.trigger(l.Events.BUFFER_APPENDING,a),t.dropped&&t.independent&&!r&&this.flushBufferGap(e)}}},E.flushBufferGap=function(t){var e=this.media;if(e)if(o.BufferHelper.isBuffered(e,e.currentTime)){var r=e.currentTime,i=o.BufferHelper.bufferInfo(e,r,0),n=t.duration,s=Math.min(2*this.config.maxFragLookUpTolerance,.25*n),a=Math.max(Math.min(t.start-s,i.end-s),r+s);t.start-a>s&&this.flushMainBuffer(a,t.start)}else this.flushMainBuffer(0,t.start)},E.getFwdBufferInfo=function(t,e){var r=this.config,n=this.getLoadPosition();if(!Object(i.isFiniteNumber)(n))return null;var s=o.BufferHelper.bufferInfo(t,n,r.maxBufferHole);if(0===s.len&&void 0!==s.nextStart){var a=this.fragmentTracker.getBufferedFrag(n,e);if(a&&s.nextStart=r&&(e.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},E.getNextFragment=function(t,e){var r,i,n=e.fragments,s=n.length;if(!s)return null;var o,a=this.config,l=n[0].start;if(e.live){var c=a.initialLiveManifestSize;if(s-1&&rr.start&&r.loaded},E.getInitialLiveFragment=function(t,e){var r=this.fragPrevious,i=null;if(r){if(t.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+r.programDateTime),i=Object(f.findFragmentByPDT)(e,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!i){var n=r.sn+1;if(n>=t.startSN&&n<=t.endSN){var s=e[n-t.startSN];r.cc===s.cc&&(i=s,this.log("Live playlist, switching playlist, load frag with next SN: "+i.sn))}i||(i=Object(f.findFragWithCC)(e,r.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+i.sn)}}else{var o=this.hls.liveSyncPosition;null!==o&&(i=this.getFragmentAtPosition(o,this.bitrateTest?t.fragmentEnd:t.edge,t))}return i},E.getFragmentAtPosition=function(t,e,r){var i,n=this.config,o=this.fragPrevious,a=r.fragments,l=r.endSN,c=r.fragmentHint,u=n.maxFragLookUpTolerance,h=!!(n.lowLatencyMode&&r.partList&&c);if(h&&c&&!this.bitrateTest&&(a=a.concat(c),l=c.sn),te-u?0:u;i=Object(f.findFragmentByPTS)(o,a,t,d)}else i=a[a.length-1];if(i){var p=i.sn-r.startSN,g=o&&i.level===o.level,m=a[p+1];if(this.fragmentTracker.getState(i)===s.FragmentState.BACKTRACKED){i=null;for(var v=p;a[v]&&this.fragmentTracker.getState(a[v])===s.FragmentState.BACKTRACKED;)i=o?a[v--]:a[--v];i||(i=m)}else o&&i.sn===o.sn&&!h&&g&&(i.sn=s-e.maxFragLookUpTolerance&&n<=o;if(null!==i&&r.duration>i&&(n"+t.startSN+" prev-sn: "+(s?s.sn:"na")+" fragments: "+a),h}return l},E.waitForCdnTuneIn=function(t){return t.live&&t.canBlockReload&&t.tuneInGoal>Math.max(t.partHoldBack,3*t.partTarget)},E.setStartPosition=function(t,e){var r=this.startPosition;if(r"+t))}}])&&b(C.prototype,w),k&&b(C,k),n}(n.default)},"./src/controller/buffer-controller.ts": +/*! exports provided: State, default */function(t,e,i){"use strict";i.r(e),i.d(e,"State",(function(){return S})),i.d(e,"default",(function(){return C}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../task-loop */"./src/task-loop.ts"),s=i(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),o=i(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),a=i(/*! ../utils/logger */"./src/utils/logger.ts"),l=i(/*! ../events */"./src/events.ts"),c=i(/*! ../errors */"./src/errors.ts"),u=i(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),h=i(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),d=i(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),f=i(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=i(/*! ./level-helper */"./src/controller/level-helper.ts"),g=i(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),m=i(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),v=i(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),y=i(/*! ../types/loader */"./src/types/loader.ts");function b(t,e){for(var i=0;ie.start+e.duration+c;(a0&&s&&s.key&&s.iv&&"AES-128"===s.method){var o=self.performance.now();return e.decrypter.webCryptoDecrypt(new Uint8Array(n),s.key.buffer,s.iv.buffer).then((function(e){var n=self.performance.now();return r.trigger(l.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:o,tdecrypt:n}}),i.payload=e,i}))}return i})).then((function(i){var r=e.fragCurrent,n=e.hls,s=e.levels;if(!s)throw new Error("init load aborted, missing levels");var o=s[t.level].details;console.assert(o,"Level details are defined when init segment is loaded");var a=t.stats;e.state=S.IDLE,e.fragLoadError=0,t.data=new Uint8Array(i.payload),a.parsing.start=a.buffering.start=self.performance.now(),a.parsing.end=a.buffering.end=self.performance.now(),i.frag===r&&n.trigger(l.Events.FRAG_BUFFERED,{stats:a,frag:r,part:null,id:t.type}),e.tick()})).catch((function(i){e.warn(i),e.resetFragmentLoading(t)}))},E.fragContextChanged=function(t){var e=this.fragCurrent;return!t||!e||t.level!==e.level||t.sn!==e.sn||t.urlId!==e.urlId},E.fragBufferedComplete=function(t,e){var i=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+t.type+" sn: "+t.sn+(e?" part: "+e.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level+" "+v.default.toString(o.BufferHelper.getBuffered(i))),this.state=S.IDLE,this.tick()},E._handleFragmentLoadComplete=function(t){var e=this.transmuxer;if(e){var i=t.frag,r=t.part,n=t.partsLoaded,s=!n||0===n.length||n.some((function(t){return!t})),o=new u.ChunkMetadata(i.level,i.sn,i.stats.chunkCount+1,0,r?r.index:-1,!s);e.flush(o)}},E._handleFragmentLoadProgress=function(t){},E._doFragLoad=function(t,e,i,n){var s=this;if(void 0===i&&(i=null),!this.levels)throw new Error("frag load aborted, missing levels");if(i=Math.max(t.start,i||0),this.config.lowLatencyMode&&e){var o=e.partList;if(o&&n){i>t.end&&e.fragmentHint&&(t=e.fragmentHint);var a=this.getNextPart(o,t,i);if(a>-1){var c=o[a];return this.log("Loading part sn: "+t.sn+" p: "+c.index+" cc: "+t.cc+" of playlist ["+e.startSN+"-"+e.endSN+"] parts [0-"+a+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(i.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=S.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,part:o[a],targetBufferTime:i}),this.doFragPartsLoad(t,o,a,n).catch((function(t){return s.handleFragLoadError(t)}))}if(!t.url||this.loadedEndOfParts(o,i))return Promise.resolve(null)}}return this.log("Loading fragment "+t.sn+" cc: "+t.cc+" "+(e?"of ["+e.startSN+"-"+e.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(i.toFixed(3))),Object(r.isFiniteNumber)(t.sn)&&!this.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),this.state=S.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,targetBufferTime:i}),this.fragmentLoader.load(t,n).catch((function(t){return s.handleFragLoadError(t)}))},E.doFragPartsLoad=function(t,e,i,r){var n=this;return new Promise((function(s,o){var a=[];!function i(c){var u=e[c];n.fragmentLoader.loadPart(t,u,r).then((function(r){a[u.index]=r;var o=r.part;n.hls.trigger(l.Events.FRAG_LOADED,r);var h=e[c+1];if(!h||h.fragment!==t)return s({frag:t,part:o,partsLoaded:a});i(c+1)})).catch(o)}(i)}))},E.handleFragLoadError=function(t){var e=t.data;return e&&e.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(e.frag,e.part):this.hls.trigger(l.Events.ERROR,e),null},E._handleTransmuxerFlush=function(t){var e=this.getCurrentContext(t);if(e&&this.state===S.PARSING){var i=e.frag,r=e.part,n=e.level,s=self.performance.now();i.stats.parsing.end=s,r&&(r.stats.parsing.end=s),this.updateLevelTiming(i,r,n,t.partial)}else this.fragCurrent||(this.state=S.IDLE)},E.getCurrentContext=function(t){var e=this.levels,i=t.level,r=t.sn,n=t.part;if(!e||!e[i])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+i+". The current chunk will not be buffered."),null;var s=e[i],o=n>-1?Object(p.getPartWith)(s,r,n):null,a=o?o.fragment:Object(p.getFragmentWithSN)(s,r,this.fragCurrent);return a?{frag:a,part:o,level:s}:null},E.bufferFragmentData=function(t,e,i,r){if(t&&this.state===S.PARSING){var n=t.data1,s=t.data2,o=n;if(n&&s&&(o=Object(h.appendUint8Array)(n,s)),o&&o.length){var a={type:t.type,frag:e,part:i,chunkMeta:r,parent:e.type,data:o};this.hls.trigger(l.Events.BUFFER_APPENDING,a),t.dropped&&t.independent&&!i&&this.flushBufferGap(e)}}},E.flushBufferGap=function(t){var e=this.media;if(e)if(o.BufferHelper.isBuffered(e,e.currentTime)){var i=e.currentTime,r=o.BufferHelper.bufferInfo(e,i,0),n=t.duration,s=Math.min(2*this.config.maxFragLookUpTolerance,.25*n),a=Math.max(Math.min(t.start-s,r.end-s),i+s);t.start-a>s&&this.flushMainBuffer(a,t.start)}else this.flushMainBuffer(0,t.start)},E.getFwdBufferInfo=function(t,e){var i=this.config,n=this.getLoadPosition();if(!Object(r.isFiniteNumber)(n))return null;var s=o.BufferHelper.bufferInfo(t,n,i.maxBufferHole);if(0===s.len&&void 0!==s.nextStart){var a=this.fragmentTracker.getBufferedFrag(n,e);if(a&&s.nextStart=i&&(e.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},E.getNextFragment=function(t,e){var i,r,n=e.fragments,s=n.length;if(!s)return null;var o,a=this.config,l=n[0].start;if(e.live){var c=a.initialLiveManifestSize;if(s-1&&ii.start&&i.loaded},E.getInitialLiveFragment=function(t,e){var i=this.fragPrevious,r=null;if(i){if(t.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+i.programDateTime),r=Object(f.findFragmentByPDT)(e,i.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var n=i.sn+1;if(n>=t.startSN&&n<=t.endSN){var s=e[n-t.startSN];i.cc===s.cc&&(r=s,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=Object(f.findFragWithCC)(e,i.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+r.sn)}}else{var o=this.hls.liveSyncPosition;null!==o&&(r=this.getFragmentAtPosition(o,this.bitrateTest?t.fragmentEnd:t.edge,t))}return r},E.getFragmentAtPosition=function(t,e,i){var r,n=this.config,o=this.fragPrevious,a=i.fragments,l=i.endSN,c=i.fragmentHint,u=n.maxFragLookUpTolerance,h=!!(n.lowLatencyMode&&i.partList&&c);if(h&&c&&!this.bitrateTest&&(a=a.concat(c),l=c.sn),te-u?0:u;r=Object(f.findFragmentByPTS)(o,a,t,d)}else r=a[a.length-1];if(r){var p=r.sn-i.startSN,g=o&&r.level===o.level,m=a[p+1];if(this.fragmentTracker.getState(r)===s.FragmentState.BACKTRACKED){r=null;for(var v=p;a[v]&&this.fragmentTracker.getState(a[v])===s.FragmentState.BACKTRACKED;)r=o?a[v--]:a[--v];r||(r=m)}else o&&r.sn===o.sn&&!h&&g&&(r.sn=s-e.maxFragLookUpTolerance&&n<=o;if(null!==r&&i.duration>r&&(n"+t.startSN+" prev-sn: "+(s?s.sn:"na")+" fragments: "+a),h}return l},E.waitForCdnTuneIn=function(t){return t.live&&t.canBlockReload&&t.tuneInGoal>Math.max(t.partHoldBack,3*t.partTarget)},E.setStartPosition=function(t,e){var i=this.startPosition;if(i"+t))}}])&&b(C.prototype,w),k&&b(C,k),n}(n.default)},"./src/controller/buffer-controller.ts": /*!*********************************************!*\ !*** ./src/controller/buffer-controller.ts ***! \*********************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return f}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=r(/*! ../errors */"./src/errors.ts"),a=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=r(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=r(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=r(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),h=Object(l.getMediaSource)(),d=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function t(t){var e=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 t=e.hls,r=e.media,i=e.mediaSource;s.logger.log("[buffer-controller]: Media source opened"),r&&(e.updateMediaElementDuration(),t.trigger(n.Events.MEDIA_ATTACHED,{media:r})),i&&i.removeEventListener("sourceopen",e._onMediaSourceOpen),e.checkPendingTracks()},this._onMediaSourceClose=function(){s.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){s.logger.log("[buffer-controller]: Media source ended")},this.hls=t,this._initSourceBuffer(),this.registerListeners()}var e=t.prototype;return e.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},e.destroy=function(){this.unregisterListeners(),this.details=null},e.registerListeners=function(){var t=this.hls;t.on(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.Events.BUFFER_RESET,this.onBufferReset,this),t.on(n.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.on(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(n.Events.BUFFER_EOS,this.onBufferEos,this),t.on(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(n.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(n.Events.FRAG_PARSED,this.onFragParsed,this),t.on(n.Events.FRAG_CHANGED,this.onFragChanged,this)},e.unregisterListeners=function(){var t=this.hls;t.off(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.Events.BUFFER_RESET,this.onBufferReset,this),t.off(n.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.off(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(n.Events.BUFFER_EOS,this.onBufferEos,this),t.off(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(n.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(n.Events.FRAG_PARSED,this.onFragParsed,this),t.off(n.Events.FRAG_CHANGED,this.onFragChanged,this)},e._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},e.onManifestParsed=function(t,e){var r=2;(e.audio&&!e.video||!e.altAudio)&&(r=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=r,this.details=null,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},e.onMediaAttaching=function(t,e){var r=this.media=e.media;if(r&&h){var i=this.mediaSource=new h;i.addEventListener("sourceopen",this._onMediaSourceOpen),i.addEventListener("sourceended",this._onMediaSourceEnded),i.addEventListener("sourceclose",this._onMediaSourceClose),r.src=self.URL.createObjectURL(i),this._objectUrl=r.src}},e.onMediaDetaching=function(){var t=this.media,e=this.mediaSource,r=this._objectUrl;if(e){if(s.logger.log("[buffer-controller]: media source detaching"),"open"===e.readyState)try{e.endOfStream()}catch(t){s.logger.warn("[buffer-controller]: onMediaDetaching: "+t.message+" while calling endOfStream")}this.onBufferReset(),e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(r&&self.URL.revokeObjectURL(r),t.src===r?(t.removeAttribute("src"),t.load()):s.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(n.Events.MEDIA_DETACHED,void 0)},e.onBufferReset=function(){var t=this;this.getSourceBufferTypes().forEach((function(e){var r=t.sourceBuffer[e];try{r&&(t.removeBufferListeners(e),t.mediaSource&&t.mediaSource.removeSourceBuffer(r),t.sourceBuffer[e]=void 0)}catch(t){s.logger.warn("[buffer-controller]: Failed to reset the "+e+" buffer",t)}})),this._initSourceBuffer()},e.onBufferCodecs=function(t,e){var r=this,i=this.getSourceBufferTypes().length;Object.keys(e).forEach((function(t){if(i){var n=r.tracks[t];if(n&&"function"==typeof n.buffer.changeType){var s=e[t],o=s.codec,a=s.levelCodec,l=s.container;if((n.levelCodec||n.codec).replace(d,"$1")!==(a||o).replace(d,"$1")){var c=l+";codecs="+(a||o);r.appendChangeType(t,c)}}}else r.pendingTracks[t]=e[t]})),i||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},e.appendChangeType=function(t,e){var r=this,i=this.operationQueue,n={execute:function(){var n=r.sourceBuffer[t];n&&(s.logger.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+e),n.changeType(e)),i.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(e){s.logger.warn("[buffer-controller]: Failed to change "+t+" SourceBuffer type",e)}};i.append(n,t)},e.onBufferAppending=function(t,e){var r=this,i=this.hls,l=this.operationQueue,c=this.tracks,u=e.data,h=e.type,d=e.frag,f=e.part,p=e.chunkMeta,g=p.buffering[h],m=self.performance.now();g.start=m;var v=d.stats.buffering,y=f?f.stats.buffering:null;0===v.start&&(v.start=m),y&&0===y.start&&(y.start=m);var b=c.audio,x="audio"===h&&1===p.id&&"audio/mpeg"===(null==b?void 0:b.container),S={execute:function(){if(g.executeStart=self.performance.now(),x){var t=r.sourceBuffer[h];if(t){var e=d.start-t.timestampOffset;Math.abs(e)>=.1&&(s.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+e+") sn: "+d.sn+")"),t.timestampOffset=d.start)}}r.appendExecutor(u,h)},onStart:function(){},onComplete:function(){var t=self.performance.now();g.executeEnd=g.end=t,0===v.first&&(v.first=t),y&&0===y.first&&(y.first=t);var e=r.sourceBuffer,i={};for(var s in e)i[s]=a.BufferHelper.getBuffered(e[s]);r.appendError=0,r.hls.trigger(n.Events.BUFFER_APPENDED,{type:h,frag:d,part:f,chunkMeta:p,parent:d.type,timeRanges:i})},onError:function(t){s.logger.error("[buffer-controller]: Error encountered while trying to append to the "+h+" SourceBuffer",t);var e={type:o.ErrorTypes.MEDIA_ERROR,parent:d.type,details:o.ErrorDetails.BUFFER_APPEND_ERROR,err:t,fatal:!1};t.code===DOMException.QUOTA_EXCEEDED_ERR?e.details=o.ErrorDetails.BUFFER_FULL_ERROR:(r.appendError++,e.details=o.ErrorDetails.BUFFER_APPEND_ERROR,r.appendError>i.config.appendErrorMaxRetry&&(s.logger.error("[buffer-controller]: Failed "+i.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),e.fatal=!0)),i.trigger(n.Events.ERROR,e)}};l.append(S,h)},e.onBufferFlushing=function(t,e){var r=this,i=this.operationQueue,o=function(t){return{execute:r.removeExecutor.bind(r,t,e.startOffset,e.endOffset),onStart:function(){},onComplete:function(){r.hls.trigger(n.Events.BUFFER_FLUSHED,{type:t})},onError:function(e){s.logger.warn("[buffer-controller]: Failed to remove from "+t+" SourceBuffer",e)}}};e.type?i.append(o(e.type),e.type):this.getSourceBufferTypes().forEach((function(t){i.append(o(t),t)}))},e.onFragParsed=function(t,e){var r=this,i=e.frag,o=e.part,a=[],l=o?o.elementaryStreams:i.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?a.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&a.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&a.push("video")),0===a.length&&s.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+i.type+" level: "+i.level+" sn: "+i.sn),this.blockBuffers((function(){var t=self.performance.now();i.stats.buffering.end=t,o&&(o.stats.buffering.end=t);var e=o?o.stats:i.stats;r.hls.trigger(n.Events.FRAG_BUFFERED,{frag:i,part:o,stats:e,id:i.type})}),a)},e.onFragChanged=function(t,e){this.flushBackBuffer()},e.onBufferEos=function(t,e){var r=this;this.getSourceBufferTypes().reduce((function(t,i){var n=r.sourceBuffer[i];return e.type&&e.type!==i||n&&!n.ended&&(n.ended=!0,s.logger.log("[buffer-controller]: "+i+" sourceBuffer now EOS")),t&&!(n&&!n.ended)}),!0)&&this.blockBuffers((function(){var t=r.mediaSource;t&&"open"===t.readyState&&t.endOfStream()}))},e.onLevelUpdated=function(t,e){var r=e.details;r.fragments.length&&(this.details=r,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},e.flushBackBuffer=function(){var t=this.hls,e=this.details,r=this.media,s=this.sourceBuffer;if(r&&null!==e){var o=this.getSourceBufferTypes();if(o.length){var l=e.live&&null!==t.config.liveBackBufferLength?t.config.liveBackBufferLength:t.config.backBufferLength;if(Object(i.isFiniteNumber)(l)&&!(l<0)){var c=r.currentTime,u=e.levelTargetDuration,h=Math.max(l,u),d=Math.floor(c/u)*u-h;o.forEach((function(r){var i=s[r];if(i){var o=a.BufferHelper.getBuffered(i);o.length>0&&d>o.start(0)&&(t.trigger(n.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),e.live&&t.trigger(n.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),t.trigger(n.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:r}))}}))}}}},e.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var t=this.details,e=this.hls,r=this.media,n=this.mediaSource,o=t.fragments[0].start+t.totalduration,a=r.duration,l=Object(i.isFiniteNumber)(n.duration)?n.duration:0;t.live&&e.config.liveDurationInfinity?(s.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),n.duration=1/0,this.updateSeekableRange(t)):(o>l&&o>a||!Object(i.isFiniteNumber)(a))&&(s.logger.log("[buffer-controller]: Updating Media Source duration to "+o.toFixed(3)),n.duration=o)}},e.updateSeekableRange=function(t){var e=this.mediaSource,r=t.fragments;if(r.length&&t.live&&null!=e&&e.setLiveSeekableRange){var i=Math.max(0,r[0].start),n=Math.max(i,i+t.totalduration);e.setLiveSeekableRange(i,n)}},e.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,e=this.operationQueue,r=this.pendingTracks,i=Object.keys(r).length;if(i&&!t||2===i){this.createSourceBuffers(r),this.pendingTracks={};var s=this.getSourceBufferTypes();if(0===s.length)return void this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});s.forEach((function(t){e.executeNext(t)}))}},e.createSourceBuffers=function(t){var e=this.sourceBuffer,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");var i=0;for(var a in t)if(!e[a]){var l=t[a];if(!l)throw Error("source buffer exists for track "+a+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;s.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var h=e[a]=r.addSourceBuffer(u),d=a;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[a]={buffer:h,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},i++}catch(t){s.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+t.message),this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:t,mimeType:u})}}i&&this.hls.trigger(n.Events.BUFFER_CREATED,{tracks:this.tracks})},e._onSBUpdateStart=function(t){this.operationQueue.current(t).onStart()},e._onSBUpdateEnd=function(t){var e=this.operationQueue;e.current(t).onComplete(),e.shiftAndExecuteNext(t)},e._onSBUpdateError=function(t,e){s.logger.error("[buffer-controller]: "+t+" SourceBuffer error",e),this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var r=this.operationQueue.current(t);r&&r.onError(e)},e.removeExecutor=function(t,e,r){var n=this.media,o=this.mediaSource,a=this.operationQueue,l=this.sourceBuffer[t];if(!n||!o||!l)return s.logger.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),void a.shiftAndExecuteNext(t);var c=Object(i.isFiniteNumber)(n.duration)?n.duration:1/0,u=Object(i.isFiniteNumber)(o.duration)?o.duration:1/0,h=Math.max(0,e),d=Math.min(r,c,u);d>h?(s.logger.log("[buffer-controller]: Removing ["+h+","+d+"] from the "+t+" SourceBuffer"),console.assert(!l.updating,t+" sourceBuffer must not be updating"),l.remove(h,d)):a.shiftAndExecuteNext(t)},e.appendExecutor=function(t,e){var r=this.operationQueue,i=this.sourceBuffer[e];if(!i)return s.logger.warn("[buffer-controller]: Attempting to append to the "+e+" SourceBuffer, but it does not exist"),void r.shiftAndExecuteNext(e);i.ended=!1,console.assert(!i.updating,e+" sourceBuffer must not be updating"),i.appendBuffer(t)},e.blockBuffers=function(t,e){var r=this;if(void 0===e&&(e=this.getSourceBufferTypes()),!e.length)return s.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(t);var i=this.operationQueue,n=e.map((function(t){return i.appendBlocker(t)}));Promise.all(n).then((function(){t(),e.forEach((function(t){var e=r.sourceBuffer[t];e&&e.updating||i.shiftAndExecuteNext(t)}))}))},e.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},e.addBufferListener=function(t,e,r){var i=this.sourceBuffer[t];if(i){var n=r.bind(this,t);this.listeners[t].push({event:e,listener:n}),i.addEventListener(e,n)}},e.removeBufferListeners=function(t){var e=this.sourceBuffer[t];e&&this.listeners[t].forEach((function(t){e.removeEventListener(t.event,t.listener)}))},t}()},"./src/controller/buffer-operation-queue.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return f}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts"),o=i(/*! ../errors */"./src/errors.ts"),a=i(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=i(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=i(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=i(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),h=Object(l.getMediaSource)(),d=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function t(t){var e=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 t=e.hls,i=e.media,r=e.mediaSource;s.logger.log("[buffer-controller]: Media source opened"),i&&(e.updateMediaElementDuration(),t.trigger(n.Events.MEDIA_ATTACHED,{media:i})),r&&r.removeEventListener("sourceopen",e._onMediaSourceOpen),e.checkPendingTracks()},this._onMediaSourceClose=function(){s.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){s.logger.log("[buffer-controller]: Media source ended")},this.hls=t,this._initSourceBuffer(),this.registerListeners()}var e=t.prototype;return e.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},e.destroy=function(){this.unregisterListeners(),this.details=null},e.registerListeners=function(){var t=this.hls;t.on(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.Events.BUFFER_RESET,this.onBufferReset,this),t.on(n.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.on(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(n.Events.BUFFER_EOS,this.onBufferEos,this),t.on(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(n.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(n.Events.FRAG_PARSED,this.onFragParsed,this),t.on(n.Events.FRAG_CHANGED,this.onFragChanged,this)},e.unregisterListeners=function(){var t=this.hls;t.off(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.Events.BUFFER_RESET,this.onBufferReset,this),t.off(n.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.off(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(n.Events.BUFFER_EOS,this.onBufferEos,this),t.off(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(n.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(n.Events.FRAG_PARSED,this.onFragParsed,this),t.off(n.Events.FRAG_CHANGED,this.onFragChanged,this)},e._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},e.onManifestParsed=function(t,e){var i=2;(e.audio&&!e.video||!e.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,this.details=null,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},e.onMediaAttaching=function(t,e){var i=this.media=e.media;if(i&&h){var r=this.mediaSource=new h;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),i.src=self.URL.createObjectURL(r),this._objectUrl=i.src}},e.onMediaDetaching=function(){var t=this.media,e=this.mediaSource,i=this._objectUrl;if(e){if(s.logger.log("[buffer-controller]: media source detaching"),"open"===e.readyState)try{e.endOfStream()}catch(t){s.logger.warn("[buffer-controller]: onMediaDetaching: "+t.message+" while calling endOfStream")}this.onBufferReset(),e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(i&&self.URL.revokeObjectURL(i),t.src===i?(t.removeAttribute("src"),t.load()):s.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(n.Events.MEDIA_DETACHED,void 0)},e.onBufferReset=function(){var t=this;this.getSourceBufferTypes().forEach((function(e){var i=t.sourceBuffer[e];try{i&&(t.removeBufferListeners(e),t.mediaSource&&t.mediaSource.removeSourceBuffer(i),t.sourceBuffer[e]=void 0)}catch(t){s.logger.warn("[buffer-controller]: Failed to reset the "+e+" buffer",t)}})),this._initSourceBuffer()},e.onBufferCodecs=function(t,e){var i=this,r=this.getSourceBufferTypes().length;Object.keys(e).forEach((function(t){if(r){var n=i.tracks[t];if(n&&"function"==typeof n.buffer.changeType){var s=e[t],o=s.codec,a=s.levelCodec,l=s.container;if((n.levelCodec||n.codec).replace(d,"$1")!==(a||o).replace(d,"$1")){var c=l+";codecs="+(a||o);i.appendChangeType(t,c)}}}else i.pendingTracks[t]=e[t]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},e.appendChangeType=function(t,e){var i=this,r=this.operationQueue,n={execute:function(){var n=i.sourceBuffer[t];n&&(s.logger.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+e),n.changeType(e)),r.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(e){s.logger.warn("[buffer-controller]: Failed to change "+t+" SourceBuffer type",e)}};r.append(n,t)},e.onBufferAppending=function(t,e){var i=this,r=this.hls,l=this.operationQueue,c=this.tracks,u=e.data,h=e.type,d=e.frag,f=e.part,p=e.chunkMeta,g=p.buffering[h],m=self.performance.now();g.start=m;var v=d.stats.buffering,y=f?f.stats.buffering:null;0===v.start&&(v.start=m),y&&0===y.start&&(y.start=m);var b=c.audio,x="audio"===h&&1===p.id&&"audio/mpeg"===(null==b?void 0:b.container),S={execute:function(){if(g.executeStart=self.performance.now(),x){var t=i.sourceBuffer[h];if(t){var e=d.start-t.timestampOffset;Math.abs(e)>=.1&&(s.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+e+") sn: "+d.sn+")"),t.timestampOffset=d.start)}}i.appendExecutor(u,h)},onStart:function(){},onComplete:function(){var t=self.performance.now();g.executeEnd=g.end=t,0===v.first&&(v.first=t),y&&0===y.first&&(y.first=t);var e=i.sourceBuffer,r={};for(var s in e)r[s]=a.BufferHelper.getBuffered(e[s]);i.appendError=0,i.hls.trigger(n.Events.BUFFER_APPENDED,{type:h,frag:d,part:f,chunkMeta:p,parent:d.type,timeRanges:r})},onError:function(t){s.logger.error("[buffer-controller]: Error encountered while trying to append to the "+h+" SourceBuffer",t);var e={type:o.ErrorTypes.MEDIA_ERROR,parent:d.type,details:o.ErrorDetails.BUFFER_APPEND_ERROR,err:t,fatal:!1};t.code===DOMException.QUOTA_EXCEEDED_ERR?e.details=o.ErrorDetails.BUFFER_FULL_ERROR:(i.appendError++,e.details=o.ErrorDetails.BUFFER_APPEND_ERROR,i.appendError>r.config.appendErrorMaxRetry&&(s.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),e.fatal=!0)),r.trigger(n.Events.ERROR,e)}};l.append(S,h)},e.onBufferFlushing=function(t,e){var i=this,r=this.operationQueue,o=function(t){return{execute:i.removeExecutor.bind(i,t,e.startOffset,e.endOffset),onStart:function(){},onComplete:function(){i.hls.trigger(n.Events.BUFFER_FLUSHED,{type:t})},onError:function(e){s.logger.warn("[buffer-controller]: Failed to remove from "+t+" SourceBuffer",e)}}};e.type?r.append(o(e.type),e.type):this.getSourceBufferTypes().forEach((function(t){r.append(o(t),t)}))},e.onFragParsed=function(t,e){var i=this,r=e.frag,o=e.part,a=[],l=o?o.elementaryStreams:r.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?a.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&a.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&a.push("video")),0===a.length&&s.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var t=self.performance.now();r.stats.buffering.end=t,o&&(o.stats.buffering.end=t);var e=o?o.stats:r.stats;i.hls.trigger(n.Events.FRAG_BUFFERED,{frag:r,part:o,stats:e,id:r.type})}),a)},e.onFragChanged=function(t,e){this.flushBackBuffer()},e.onBufferEos=function(t,e){var i=this;this.getSourceBufferTypes().reduce((function(t,r){var n=i.sourceBuffer[r];return e.type&&e.type!==r||n&&!n.ended&&(n.ended=!0,s.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS")),t&&!(n&&!n.ended)}),!0)&&this.blockBuffers((function(){var t=i.mediaSource;t&&"open"===t.readyState&&t.endOfStream()}))},e.onLevelUpdated=function(t,e){var i=e.details;i.fragments.length&&(this.details=i,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},e.flushBackBuffer=function(){var t=this.hls,e=this.details,i=this.media,s=this.sourceBuffer;if(i&&null!==e){var o=this.getSourceBufferTypes();if(o.length){var l=e.live&&null!==t.config.liveBackBufferLength?t.config.liveBackBufferLength:t.config.backBufferLength;if(Object(r.isFiniteNumber)(l)&&!(l<0)){var c=i.currentTime,u=e.levelTargetDuration,h=Math.max(l,u),d=Math.floor(c/u)*u-h;o.forEach((function(i){var r=s[i];if(r){var o=a.BufferHelper.getBuffered(r);o.length>0&&d>o.start(0)&&(t.trigger(n.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),e.live&&t.trigger(n.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),t.trigger(n.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:i}))}}))}}}},e.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var t=this.details,e=this.hls,i=this.media,n=this.mediaSource,o=t.fragments[0].start+t.totalduration,a=i.duration,l=Object(r.isFiniteNumber)(n.duration)?n.duration:0;t.live&&e.config.liveDurationInfinity?(s.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),n.duration=1/0,this.updateSeekableRange(t)):(o>l&&o>a||!Object(r.isFiniteNumber)(a))&&(s.logger.log("[buffer-controller]: Updating Media Source duration to "+o.toFixed(3)),n.duration=o)}},e.updateSeekableRange=function(t){var e=this.mediaSource,i=t.fragments;if(i.length&&t.live&&null!=e&&e.setLiveSeekableRange){var r=Math.max(0,i[0].start),n=Math.max(r,r+t.totalduration);e.setLiveSeekableRange(r,n)}},e.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,e=this.operationQueue,i=this.pendingTracks,r=Object.keys(i).length;if(r&&!t||2===r){this.createSourceBuffers(i),this.pendingTracks={};var s=this.getSourceBufferTypes();if(0===s.length)return void this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});s.forEach((function(t){e.executeNext(t)}))}},e.createSourceBuffers=function(t){var e=this.sourceBuffer,i=this.mediaSource;if(!i)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var a in t)if(!e[a]){var l=t[a];if(!l)throw Error("source buffer exists for track "+a+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;s.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var h=e[a]=i.addSourceBuffer(u),d=a;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[a]={buffer:h,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},r++}catch(t){s.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+t.message),this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:t,mimeType:u})}}r&&this.hls.trigger(n.Events.BUFFER_CREATED,{tracks:this.tracks})},e._onSBUpdateStart=function(t){this.operationQueue.current(t).onStart()},e._onSBUpdateEnd=function(t){var e=this.operationQueue;e.current(t).onComplete(),e.shiftAndExecuteNext(t)},e._onSBUpdateError=function(t,e){s.logger.error("[buffer-controller]: "+t+" SourceBuffer error",e),this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var i=this.operationQueue.current(t);i&&i.onError(e)},e.removeExecutor=function(t,e,i){var n=this.media,o=this.mediaSource,a=this.operationQueue,l=this.sourceBuffer[t];if(!n||!o||!l)return s.logger.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),void a.shiftAndExecuteNext(t);var c=Object(r.isFiniteNumber)(n.duration)?n.duration:1/0,u=Object(r.isFiniteNumber)(o.duration)?o.duration:1/0,h=Math.max(0,e),d=Math.min(i,c,u);d>h?(s.logger.log("[buffer-controller]: Removing ["+h+","+d+"] from the "+t+" SourceBuffer"),console.assert(!l.updating,t+" sourceBuffer must not be updating"),l.remove(h,d)):a.shiftAndExecuteNext(t)},e.appendExecutor=function(t,e){var i=this.operationQueue,r=this.sourceBuffer[e];if(!r)return s.logger.warn("[buffer-controller]: Attempting to append to the "+e+" SourceBuffer, but it does not exist"),void i.shiftAndExecuteNext(e);r.ended=!1,console.assert(!r.updating,e+" sourceBuffer must not be updating"),r.appendBuffer(t)},e.blockBuffers=function(t,e){var i=this;if(void 0===e&&(e=this.getSourceBufferTypes()),!e.length)return s.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(t);var r=this.operationQueue,n=e.map((function(t){return r.appendBlocker(t)}));Promise.all(n).then((function(){t(),e.forEach((function(t){var e=i.sourceBuffer[t];e&&e.updating||r.shiftAndExecuteNext(t)}))}))},e.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},e.addBufferListener=function(t,e,i){var r=this.sourceBuffer[t];if(r){var n=i.bind(this,t);this.listeners[t].push({event:e,listener:n}),r.addEventListener(e,n)}},e.removeBufferListeners=function(t){var e=this.sourceBuffer[t];e&&this.listeners[t].forEach((function(t){e.removeEventListener(t.event,t.listener)}))},t}()},"./src/controller/buffer-operation-queue.ts": /*!**************************************************!*\ !*** ./src/controller/buffer-operation-queue.ts ***! \**************************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var i=r(/*! ../utils/logger */"./src/utils/logger.ts"),n=function(){function t(t){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=t}var e=t.prototype;return e.append=function(t,e){var r=this.queues[e];r.push(t),1===r.length&&this.buffers[e]&&this.executeNext(e)},e.insertAbort=function(t,e){this.queues[e].unshift(t),this.executeNext(e)},e.appendBlocker=function(t){var e,r=new Promise((function(t){e=t})),i={execute:e,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(i,t),r},e.executeNext=function(t){var e=this.buffers,r=this.queues,n=e[t],s=r[t];if(s.length){var o=s[0];try{o.execute()}catch(e){i.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(e),n&&n.updating||(s.shift(),this.executeNext(t))}}},e.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},e.current=function(t){return this.queues[t][0]},t}()},"./src/controller/cap-level-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return n}));var r=i(/*! ../utils/logger */"./src/utils/logger.ts"),n=function(){function t(t){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=t}var e=t.prototype;return e.append=function(t,e){var i=this.queues[e];i.push(t),1===i.length&&this.buffers[e]&&this.executeNext(e)},e.insertAbort=function(t,e){this.queues[e].unshift(t),this.executeNext(e)},e.appendBlocker=function(t){var e,i=new Promise((function(t){e=t})),r={execute:e,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,t),i},e.executeNext=function(t){var e=this.buffers,i=this.queues,n=e[t],s=i[t];if(s.length){var o=s[0];try{o.execute()}catch(e){r.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(e),n&&n.updating||(s.shift(),this.executeNext(t))}}},e.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},e.current=function(t){return this.queues[t][0]},t}()},"./src/controller/cap-level-controller.ts": /*!************************************************!*\ !*** ./src/controller/cap-level-controller.ts ***! \************************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ../events */"./src/events.ts");function n(t,e){for(var r=0;r0&&this.mediaWidth>0){var t=this.hls.levels;if(t.length){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t.length-1),e.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},o.getMaxLevel=function(e){var r=this,i=this.hls.levels;if(!i.length)return-1;var n=i.filter((function(i,n){return t.isLevelAllowed(n,r.restrictedLevels)&&n<=e}));return this.clientRect=null,t.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){this.timer||(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())},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,e={width:0,height:0};if(t){var r=t.getBoundingClientRect();e.width=r.width,e.height=r.height,e.width||e.height||(e.width=r.right-r.left||t.width||0,e.height=r.bottom-r.top||t.height||0)}return this.clientRect=e,e},t.isLevelAllowed=function(t,e){return void 0===e&&(e=[]),-1===e.indexOf(t)},t.getMaxLevelByMediaSize=function(t,e,r){if(!t||!t.length)return-1;for(var i,n,s=t.length-1,o=0;o=e||a.height>=r)&&(i=a,!(n=t[o+1])||i.width!==n.width||i.height!==n.height)){s=o;break}}return s},e=t,s=[{key:"contentScaleFactor",get:function(){var t=1;try{t=self.devicePixelRatio}catch(t){}return t}}],(r=[{key:"mediaWidth",get:function(){return this.getDimensions().width*t.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*t.contentScaleFactor}}])&&n(e.prototype,r),s&&n(e,s),t}();e.default=s},"./src/controller/cmcd-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../events */"./src/events.ts");function n(t,e){for(var i=0;i0&&this.mediaWidth>0){var t=this.hls.levels;if(t.length){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t.length-1),e.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},o.getMaxLevel=function(e){var i=this,r=this.hls.levels;if(!r.length)return-1;var n=r.filter((function(r,n){return t.isLevelAllowed(n,i.restrictedLevels)&&n<=e}));return this.clientRect=null,t.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){this.timer||(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())},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,e={width:0,height:0};if(t){var i=t.getBoundingClientRect();e.width=i.width,e.height=i.height,e.width||e.height||(e.width=i.right-i.left||t.width||0,e.height=i.bottom-i.top||t.height||0)}return this.clientRect=e,e},t.isLevelAllowed=function(t,e){return void 0===e&&(e=[]),-1===e.indexOf(t)},t.getMaxLevelByMediaSize=function(t,e,i){if(!t||!t.length)return-1;for(var r,n,s=t.length-1,o=0;o=e||a.height>=i)&&(r=a,!(n=t[o+1])||r.width!==n.width||r.height!==n.height)){s=o;break}}return s},e=t,s=[{key:"contentScaleFactor",get:function(){var t=1;try{t=self.devicePixelRatio}catch(t){}return t}}],(i=[{key:"mediaWidth",get:function(){return this.getDimensions().width*t.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*t.contentScaleFactor}}])&&n(e.prototype,i),s&&n(e,s),t}();e.default=s},"./src/controller/cmcd-controller.ts": /*!*******************************************!*\ !*** ./src/controller/cmcd-controller.ts ***! \*******************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return d}));var i=r(/*! ../events */"./src/events.ts"),n=r(/*! ../types/cmcd */"./src/types/cmcd.ts"),s=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts");function a(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);rr&&(r=s.bitrate)}return r>0?r:NaN},e.getBufferLength=function(t){var e=this.hls.media,r=t===n.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return r&&e?1e3*s.BufferHelper.bufferInfo(r,e.currentTime,this.config.maxBufferHole).len:NaN},e.createPlaylistLoader=function(){var t=this.config.pLoader,e=this.applyPlaylistData,r=t||this.config.loader;return function(){function t(t){this.loader=void 0,this.loader=new r(t)}var i=t.prototype;return i.destroy=function(){this.loader.destroy()},i.abort=function(){this.loader.abort()},i.load=function(t,r,i){e(t),this.loader.load(t,r,i)},l(t,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),t}()},e.createFragmentLoader=function(){var t=this.config.fLoader,e=this.applyFragmentData,r=t||this.config.loader;return function(){function t(t){this.loader=void 0,this.loader=new r(t)}var i=t.prototype;return i.destroy=function(){this.loader.destroy()},i.abort=function(){this.loader.abort()},i.load=function(t,r,i){e(t),this.loader.load(t,r,i)},l(t,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),t}()},t.uuid=function(){var t=URL.createObjectURL(new Blob),e=t.toString();return URL.revokeObjectURL(t),e.substr(e.lastIndexOf("/")+1)},t.serialize=function(t){for(var e,r=[],i=function(t){return!Number.isNaN(t)&&null!=t&&""!==t&&!1!==t},n=function(t){return Math.round(t)},s=function(t){return 100*n(t/100)},o={br:n,d:n,bl:s,dl:s,mtp:s,nor:function(t){return encodeURIComponent(t)},rtp:s,tb:n},a=c(Object.keys(t||{}).sort());!(e=a()).done;){var l=e.value,u=t[l];if(i(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var h=o[l];h&&(u=h(u));var d=typeof u,f=void 0;f="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===d?l:"number"===d?l+"="+u:l+"="+JSON.stringify(u),r.push(f)}}return r.join(",")},t.toHeaders=function(e){for(var r={},i=["Object","Request","Session","Status"],n=[{},{},{},{}],s={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},o=0,a=Object.keys(e);o=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);ii&&(i=s.bitrate)}return i>0?i:NaN},e.getBufferLength=function(t){var e=this.hls.media,i=t===n.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return i&&e?1e3*s.BufferHelper.bufferInfo(i,e.currentTime,this.config.maxBufferHole).len:NaN},e.createPlaylistLoader=function(){var t=this.config.pLoader,e=this.applyPlaylistData,i=t||this.config.loader;return function(){function t(t){this.loader=void 0,this.loader=new i(t)}var r=t.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(t,i,r){e(t),this.loader.load(t,i,r)},l(t,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),t}()},e.createFragmentLoader=function(){var t=this.config.fLoader,e=this.applyFragmentData,i=t||this.config.loader;return function(){function t(t){this.loader=void 0,this.loader=new i(t)}var r=t.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(t,i,r){e(t),this.loader.load(t,i,r)},l(t,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),t}()},t.uuid=function(){var t=URL.createObjectURL(new Blob),e=t.toString();return URL.revokeObjectURL(t),e.substr(e.lastIndexOf("/")+1)},t.serialize=function(t){for(var e,i=[],r=function(t){return!Number.isNaN(t)&&null!=t&&""!==t&&!1!==t},n=function(t){return Math.round(t)},s=function(t){return 100*n(t/100)},o={br:n,d:n,bl:s,dl:s,mtp:s,nor:function(t){return encodeURIComponent(t)},rtp:s,tb:n},a=c(Object.keys(t||{}).sort());!(e=a()).done;){var l=e.value,u=t[l];if(r(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var h=o[l];h&&(u=h(u));var d=typeof u,f=void 0;f="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===d?l:"number"===d?l+"="+u:l+"="+JSON.stringify(u),i.push(f)}}return i.join(",")},t.toHeaders=function(e){for(var i={},r=["Object","Request","Session","Status"],n=[{},{},{},{}],s={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},o=0,a=Object.keys(e);o3)return void this.hls.trigger(i.Events.ERROR,{type:n.ErrorTypes.KEY_SYSTEM_ERROR,details:n.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(r,o)}}},c._generateLicenseRequestChallenge=function(t,e){switch(t.mediaKeySystemDomain){case o.KeySystems.WIDEVINE:return e}throw new Error("unsupported key-system: "+t.mediaKeySystemDomain)},c._requestLicense=function(t,e){s.logger.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r)return s.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(i.Events.ERROR,{type:n.ErrorTypes.KEY_SYSTEM_ERROR,details:n.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var o=this.getLicenseServerUrl(r.mediaKeySystemDomain),a=this._createLicenseXhr(o,t,e);s.logger.log("Sending license request to URL: "+o);var l=this._generateLicenseRequestChallenge(r,t);a.send(l)}catch(t){s.logger.error("Failure requesting DRM license: "+t),this.hls.trigger(i.Events.ERROR,{type:n.ErrorTypes.KEY_SYSTEM_ERROR,details:n.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(t,e){if(this._emeEnabled){var r=e.media;this._media=r,r.addEventListener("encrypted",this._onMediaEncrypted)}},c.onMediaDetached=function(){var t=this._media,e=this._mediaKeysList;t&&(t.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(e.map((function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch((function(){}))}))).then((function(){return t.setMediaKeys(null)})).catch((function(){})))},c.onManifestParsed=function(t,e){if(this._emeEnabled){var r=e.levels.map((function(t){return t.audioCodec})).filter((function(t){return!!t})),i=e.levels.map((function(t){return t.videoCodec})).filter((function(t){return!!t}));this._attemptKeySystemAccess(o.KeySystems.WIDEVINE,r,i)}},e=t,(r=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&a(e.prototype,r),l&&a(e,l),t}();e.default=l},"./src/controller/fps-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../events */"./src/events.ts"),n=i(/*! ../errors */"./src/errors.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts"),o=i(/*! ../utils/mediakeys-helper */"./src/utils/mediakeys-helper.ts");function a(t,e){for(var i=0;i3)return void this.hls.trigger(r.Events.ERROR,{type:n.ErrorTypes.KEY_SYSTEM_ERROR,details:n.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(i,o)}}},c._generateLicenseRequestChallenge=function(t,e){switch(t.mediaKeySystemDomain){case o.KeySystems.WIDEVINE:return e}throw new Error("unsupported key-system: "+t.mediaKeySystemDomain)},c._requestLicense=function(t,e){s.logger.log("Requesting content license for key-system");var i=this._mediaKeysList[0];if(!i)return s.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:n.ErrorTypes.KEY_SYSTEM_ERROR,details:n.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var o=this.getLicenseServerUrl(i.mediaKeySystemDomain),a=this._createLicenseXhr(o,t,e);s.logger.log("Sending license request to URL: "+o);var l=this._generateLicenseRequestChallenge(i,t);a.send(l)}catch(t){s.logger.error("Failure requesting DRM license: "+t),this.hls.trigger(r.Events.ERROR,{type:n.ErrorTypes.KEY_SYSTEM_ERROR,details:n.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(t,e){if(this._emeEnabled){var i=e.media;this._media=i,i.addEventListener("encrypted",this._onMediaEncrypted)}},c.onMediaDetached=function(){var t=this._media,e=this._mediaKeysList;t&&(t.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(e.map((function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch((function(){}))}))).then((function(){return t.setMediaKeys(null)})).catch((function(){})))},c.onManifestParsed=function(t,e){if(this._emeEnabled){var i=e.levels.map((function(t){return t.audioCodec})).filter((function(t){return!!t})),r=e.levels.map((function(t){return t.videoCodec})).filter((function(t){return!!t}));this._attemptKeySystemAccess(o.KeySystems.WIDEVINE,i,r)}},e=t,(i=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&a(e.prototype,i),l&&a(e,l),t}();e.default=l},"./src/controller/fps-controller.ts": /*!******************************************!*\ !*** ./src/controller/fps-controller.ts ***! \******************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ../events */"./src/events.ts"),n=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=function(){function t(t){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=t,this.registerListeners()}var e=t.prototype;return e.setStreamController=function(t){this.streamController=t},e.registerListeners=function(){this.hls.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},e.unregisterListeners=function(){this.hls.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching)},e.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},e.onMediaAttaching=function(t,e){var r=this.hls.config;if(r.capLevelOnFPSDrop){var i=e.media instanceof self.HTMLVideoElement?e.media:null;this.media=i,i&&"function"==typeof i.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}},e.checkFPS=function(t,e,r){var s=performance.now();if(e){if(this.lastTime){var o=s-this.lastTime,a=r-this.lastDroppedFrames,l=e-this.lastDecodedFrames,c=1e3*a/o,u=this.hls;if(u.trigger(i.Events.FPS_DROP,{currentDropped:a,currentDecoded:l,totalDroppedFrames:r}),c>0&&a>u.config.fpsDroppedMonitoringThreshold*l){var h=u.currentLevel;n.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=h)&&(h-=1,u.trigger(i.Events.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:u.currentLevel}),u.autoLevelCapping=h,this.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=r,this.lastDecodedFrames=e}},e.checkFPSInterval=function(){var t=this.media;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},t}();e.default=s},"./src/controller/fragment-finders.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../events */"./src/events.ts"),n=i(/*! ../utils/logger */"./src/utils/logger.ts"),s=function(){function t(t){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=t,this.registerListeners()}var e=t.prototype;return e.setStreamController=function(t){this.streamController=t},e.registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},e.unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching)},e.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},e.onMediaAttaching=function(t,e){var i=this.hls.config;if(i.capLevelOnFPSDrop){var r=e.media instanceof self.HTMLVideoElement?e.media:null;this.media=r,r&&"function"==typeof r.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod)}},e.checkFPS=function(t,e,i){var s=performance.now();if(e){if(this.lastTime){var o=s-this.lastTime,a=i-this.lastDroppedFrames,l=e-this.lastDecodedFrames,c=1e3*a/o,u=this.hls;if(u.trigger(r.Events.FPS_DROP,{currentDropped:a,currentDecoded:l,totalDroppedFrames:i}),c>0&&a>u.config.fpsDroppedMonitoringThreshold*l){var h=u.currentLevel;n.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=h)&&(h-=1,u.trigger(r.Events.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:u.currentLevel}),u.autoLevelCapping=h,this.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=i,this.lastDecodedFrames=e}},e.checkFPSInterval=function(){var t=this.media;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},t}();e.default=s},"./src/controller/fragment-finders.ts": /*!********************************************!*\ !*** ./src/controller/fragment-finders.ts ***! \********************************************/ -/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(t,e,r){"use strict";r.r(e),r.d(e,"findFragmentByPDT",(function(){return s})),r.d(e,"findFragmentByPTS",(function(){return o})),r.d(e,"fragmentWithinToleranceTest",(function(){return a})),r.d(e,"pdtWithinToleranceTest",(function(){return l})),r.d(e,"findFragWithCC",(function(){return c}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function s(t,e,r){if(null===e||!Array.isArray(t)||!t.length||!Object(i.isFiniteNumber)(e))return null;if(e<(t[0].programDateTime||0))return null;if(e>=(t[t.length-1].endProgramDateTime||0))return null;r=r||0;for(var n=0;nt&&r.start?-1:0}function l(t,e,r){var i=1e3*Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0));return(r.endProgramDateTime||0)-i>t}function c(t,e){return n.default.search(t,(function(t){return t.cce?-1:0}))}},"./src/controller/fragment-tracker.ts": +/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(t,e,i){"use strict";i.r(e),i.d(e,"findFragmentByPDT",(function(){return s})),i.d(e,"findFragmentByPTS",(function(){return o})),i.d(e,"fragmentWithinToleranceTest",(function(){return a})),i.d(e,"pdtWithinToleranceTest",(function(){return l})),i.d(e,"findFragWithCC",(function(){return c}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function s(t,e,i){if(null===e||!Array.isArray(t)||!t.length||!Object(r.isFiniteNumber)(e))return null;if(e<(t[0].programDateTime||0))return null;if(e>=(t[t.length-1].endProgramDateTime||0))return null;i=i||0;for(var n=0;nt&&i.start?-1:0}function l(t,e,i){var r=1e3*Math.min(e,i.duration+(i.deltaPTS?i.deltaPTS:0));return(i.endProgramDateTime||0)-r>t}function c(t,e){return n.default.search(t,(function(t){return t.cce?-1:0}))}},"./src/controller/fragment-tracker.ts": /*!********************************************!*\ !*** ./src/controller/fragment-tracker.ts ***! \********************************************/ -/*! exports provided: FragmentState, FragmentTracker */function(t,e,r){"use strict";r.r(e),r.d(e,"FragmentState",(function(){return i})),r.d(e,"FragmentTracker",(function(){return o}));var i,n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../types/loader */"./src/types/loader.ts");!function(t){t.NOT_LOADED="NOT_LOADED",t.BACKTRACKED="BACKTRACKED",t.APPENDING="APPENDING",t.PARTIAL="PARTIAL",t.OK="OK"}(i||(i={}));var o=function(){function t(t){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=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){var t=this.hls;t.on(n.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.on(n.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.on(n.Events.FRAG_LOADED,this.onFragLoaded,this)},e._unregisterListeners=function(){var t=this.hls;t.off(n.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.off(n.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.off(n.Events.FRAG_LOADED,this.onFragLoaded,this)},e.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},e.getAppendedFrag=function(t,e){if(e===s.PlaylistLevelType.MAIN){var r=this.activeFragment,i=this.activeParts;if(!r)return null;if(i)for(var n=i.length;n--;){var o=i[n],a=o?o.end:r.appendedPTS;if(o.start<=t&&void 0!==a&&t<=a)return n>9&&(this.activeParts=i.slice(n-9)),o}else if(r.start<=t&&void 0!==r.appendedPTS&&t<=r.appendedPTS)return r}return this.getBufferedFrag(t,e)},e.getBufferedFrag=function(t,e){for(var r=this.fragments,i=Object.keys(r),n=i.length;n--;){var s=r[i[n]];if((null==s?void 0:s.body.type)===e&&s.buffered){var o=s.body;if(o.start<=t&&t<=o.end)return o}}return null},e.detectEvictedFragments=function(t,e,r){var i=this;Object.keys(this.fragments).forEach((function(n){var s=i.fragments[n];if(s)if(s.buffered){var o=s.range[t];o&&o.time.some((function(t){var r=!i.isTimeBuffered(t.startPTS,t.endPTS,e);return r&&i.removeFragment(s.body),r}))}else s.body.type===r&&i.removeFragment(s.body)}))},e.detectPartialFragments=function(t){var e=this,r=this.timeRanges,i=t.frag,n=t.part;if(r&&"initSegment"!==i.sn){var s=l(i),o=this.fragments[s];o&&(Object.keys(r).forEach((function(t){var s=i.elementaryStreams[t];if(s){var a=r[t],l=null!==n||!0===s.partial;o.range[t]=e.getBufferedTimes(i,n,l,a)}})),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body))}},e.fragBuffered=function(t){var e=l(t),r=this.fragments[e];r&&(r.backtrack=r.loaded=null,r.buffered=!0)},e.getBufferedTimes=function(t,e,r,i){for(var n={time:[],partial:r},s=e?e.start:t.start,o=e?e.end:t.end,a=t.minEndPTS||o,l=t.maxStartPTS||s,c=0;c=u&&a<=h){n.time.push({startPTS:Math.max(s,i.start(c)),endPTS:Math.min(o,i.end(c))});break}if(su)n.partial=!0,n.time.push({startPTS:Math.max(s,i.start(c)),endPTS:Math.min(o,i.end(c))});else if(o<=u)break}return n},e.getPartialFragment=function(t){var e,r,i,n=null,s=0,o=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&a(u)&&(r=u.body.start-o,i=u.body.end+o,t>=r&&t<=i&&(e=Math.min(t-r,i-t),s<=e&&(n=u.body,s=e)))})),n},e.getState=function(t){var e=l(t),r=this.fragments[e];return r?r.buffered?a(r)?i.PARTIAL:i.OK:r.backtrack?i.BACKTRACKED:i.APPENDING:i.NOT_LOADED},e.backtrack=function(t,e){var r=l(t),i=this.fragments[r];if(!i||i.backtrack)return null;var n=i.backtrack=e||i.loaded;return i.loaded=null,n},e.getBacktrackData=function(t){var e=l(t),r=this.fragments[e];if(r){var i,n=r.backtrack;if(null!=n&&null!==(i=n.payload)&&void 0!==i&&i.byteLength)return n;this.removeFragment(t)}return null},e.isTimeBuffered=function(t,e,r){for(var i,n,s=0;s=i&&e<=n)return!0;if(e<=i)return!1}return!1},e.onFragLoaded=function(t,e){var r=e.frag,i=e.part;if("initSegment"!==r.sn&&!r.bitrateTest&&!i){var n=l(r);this.fragments[n]={body:r,loaded:e,backtrack:null,buffered:!1,range:Object.create(null)}}},e.onBufferAppended=function(t,e){var r=this,i=e.frag,n=e.part,o=e.timeRanges;if(i.type===s.PlaylistLevelType.MAIN)if(this.activeFragment=i,n){var a=this.activeParts;a||(this.activeParts=a=[]),a.push(n)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach((function(t){var e=o[t];if(r.detectEvictedFragments(t,e),!n)for(var s=0;st&&i.removeFragment(o)}}))},e.removeFragment=function(t){var e=l(t);t.stats.loaded=0,t.clearElementaryStreamInfo(),delete this.fragments[e]},e.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},t}();function a(t){var e,r;return t.buffered&&((null===(e=t.range.video)||void 0===e?void 0:e.partial)||(null===(r=t.range.audio)||void 0===r?void 0:r.partial))}function l(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn}},"./src/controller/gap-controller.ts": +/*! exports provided: FragmentState, FragmentTracker */function(t,e,i){"use strict";i.r(e),i.d(e,"FragmentState",(function(){return r})),i.d(e,"FragmentTracker",(function(){return o}));var r,n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../types/loader */"./src/types/loader.ts");!function(t){t.NOT_LOADED="NOT_LOADED",t.BACKTRACKED="BACKTRACKED",t.APPENDING="APPENDING",t.PARTIAL="PARTIAL",t.OK="OK"}(r||(r={}));var o=function(){function t(t){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=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){var t=this.hls;t.on(n.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.on(n.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.on(n.Events.FRAG_LOADED,this.onFragLoaded,this)},e._unregisterListeners=function(){var t=this.hls;t.off(n.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.off(n.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.off(n.Events.FRAG_LOADED,this.onFragLoaded,this)},e.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},e.getAppendedFrag=function(t,e){if(e===s.PlaylistLevelType.MAIN){var i=this.activeFragment,r=this.activeParts;if(!i)return null;if(r)for(var n=r.length;n--;){var o=r[n],a=o?o.end:i.appendedPTS;if(o.start<=t&&void 0!==a&&t<=a)return n>9&&(this.activeParts=r.slice(n-9)),o}else if(i.start<=t&&void 0!==i.appendedPTS&&t<=i.appendedPTS)return i}return this.getBufferedFrag(t,e)},e.getBufferedFrag=function(t,e){for(var i=this.fragments,r=Object.keys(i),n=r.length;n--;){var s=i[r[n]];if((null==s?void 0:s.body.type)===e&&s.buffered){var o=s.body;if(o.start<=t&&t<=o.end)return o}}return null},e.detectEvictedFragments=function(t,e,i){var r=this;Object.keys(this.fragments).forEach((function(n){var s=r.fragments[n];if(s)if(s.buffered){var o=s.range[t];o&&o.time.some((function(t){var i=!r.isTimeBuffered(t.startPTS,t.endPTS,e);return i&&r.removeFragment(s.body),i}))}else s.body.type===i&&r.removeFragment(s.body)}))},e.detectPartialFragments=function(t){var e=this,i=this.timeRanges,r=t.frag,n=t.part;if(i&&"initSegment"!==r.sn){var s=l(r),o=this.fragments[s];o&&(Object.keys(i).forEach((function(t){var s=r.elementaryStreams[t];if(s){var a=i[t],l=null!==n||!0===s.partial;o.range[t]=e.getBufferedTimes(r,n,l,a)}})),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body))}},e.fragBuffered=function(t){var e=l(t),i=this.fragments[e];i&&(i.backtrack=i.loaded=null,i.buffered=!0)},e.getBufferedTimes=function(t,e,i,r){for(var n={time:[],partial:i},s=e?e.start:t.start,o=e?e.end:t.end,a=t.minEndPTS||o,l=t.maxStartPTS||s,c=0;c=u&&a<=h){n.time.push({startPTS:Math.max(s,r.start(c)),endPTS:Math.min(o,r.end(c))});break}if(su)n.partial=!0,n.time.push({startPTS:Math.max(s,r.start(c)),endPTS:Math.min(o,r.end(c))});else if(o<=u)break}return n},e.getPartialFragment=function(t){var e,i,r,n=null,s=0,o=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&a(u)&&(i=u.body.start-o,r=u.body.end+o,t>=i&&t<=r&&(e=Math.min(t-i,r-t),s<=e&&(n=u.body,s=e)))})),n},e.getState=function(t){var e=l(t),i=this.fragments[e];return i?i.buffered?a(i)?r.PARTIAL:r.OK:i.backtrack?r.BACKTRACKED:r.APPENDING:r.NOT_LOADED},e.backtrack=function(t,e){var i=l(t),r=this.fragments[i];if(!r||r.backtrack)return null;var n=r.backtrack=e||r.loaded;return r.loaded=null,n},e.getBacktrackData=function(t){var e=l(t),i=this.fragments[e];if(i){var r,n=i.backtrack;if(null!=n&&null!==(r=n.payload)&&void 0!==r&&r.byteLength)return n;this.removeFragment(t)}return null},e.isTimeBuffered=function(t,e,i){for(var r,n,s=0;s=r&&e<=n)return!0;if(e<=r)return!1}return!1},e.onFragLoaded=function(t,e){var i=e.frag,r=e.part;if("initSegment"!==i.sn&&!i.bitrateTest&&!r){var n=l(i);this.fragments[n]={body:i,loaded:e,backtrack:null,buffered:!1,range:Object.create(null)}}},e.onBufferAppended=function(t,e){var i=this,r=e.frag,n=e.part,o=e.timeRanges;if(r.type===s.PlaylistLevelType.MAIN)if(this.activeFragment=r,n){var a=this.activeParts;a||(this.activeParts=a=[]),a.push(n)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach((function(t){var e=o[t];if(i.detectEvictedFragments(t,e),!n)for(var s=0;st&&r.removeFragment(o)}}))},e.removeFragment=function(t){var e=l(t);t.stats.loaded=0,t.clearElementaryStreamInfo(),delete this.fragments[e]},e.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},t}();function a(t){var e,i;return t.buffered&&((null===(e=t.range.video)||void 0===e?void 0:e.partial)||(null===(i=t.range.audio)||void 0===i?void 0:i.partial))}function l(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn}},"./src/controller/gap-controller.ts": /*!******************************************!*\ !*** ./src/controller/gap-controller.ts ***! \******************************************/ -/*! exports provided: STALL_MINIMUM_DURATION_MS, MAX_START_GAP_JUMP, SKIP_BUFFER_HOLE_STEP_SECONDS, SKIP_BUFFER_RANGE_START, default */function(t,e,r){"use strict";r.r(e),r.d(e,"STALL_MINIMUM_DURATION_MS",(function(){return a})),r.d(e,"MAX_START_GAP_JUMP",(function(){return l})),r.d(e,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),r.d(e,"SKIP_BUFFER_RANGE_START",(function(){return u})),r.d(e,"default",(function(){return h}));var i=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),n=r(/*! ../errors */"./src/errors.ts"),s=r(/*! ../events */"./src/events.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts"),a=250,l=2,c=.1,u=.05,h=function(){function t(t,e,r,i){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=t,this.media=e,this.fragmentTracker=r,this.hls=i}var e=t.prototype;return e.destroy=function(){this.hls=this.fragmentTracker=this.media=null},e.poll=function(t){var e=this.config,r=this.media,n=this.stalled,s=r.currentTime,c=r.seeking,u=this.seeking&&!c,h=!this.seeking&&c;if(this.seeking=c,s===t){if((h||u)&&(this.stalled=null),!r.paused&&!r.ended&&0!==r.playbackRate&&i.BufferHelper.getBuffered(r).length){var d=i.BufferHelper.bufferInfo(r,s,0),f=d.len>0,p=d.nextStart||0;if(f||p){if(c){var g=d.len>l,m=!p||p-s>l&&!this.fragmentTracker.getPartialFragment(s);if(g||m)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,y=Math.max(p,d.start||0)-s,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,x=(null==b||null===(v=b.details)||void 0===v?void 0:v.live)?2*b.details.targetduration:l;if(y>0&&y<=x)return void this._trySkipBufferHole(null)}var S=self.performance.now();if(null!==n){var C=S-n;!c&&C>=a&&this._reportStall(d.len);var w=i.BufferHelper.bufferInfo(r,s,e.maxBufferHole);this._tryFixBufferStall(w,C)}else this.stalled=S}}}else if(this.moved=!0,null!==n){if(this.stallReported){var k=self.performance.now()-n;o.logger.warn("playback not stuck anymore @"+s+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},e._tryFixBufferStall=function(t,e){var r=this.config,i=this.fragmentTracker,n=this.media.currentTime,s=i.getPartialFragment(n);s&&this._trySkipBufferHole(s)||t.len>r.maxBufferHole&&e>1e3*r.highBufferWatchdogPeriod&&(o.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},e._reportStall=function(t){var e=this.hls,r=this.media;this.stallReported||(this.stallReported=!0,o.logger.warn("Playback stalling at @"+r.currentTime+" due to low buffer (buffer="+t+")"),e.trigger(s.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e._trySkipBufferHole=function(t){for(var e=this.config,r=this.hls,a=this.media,l=a.currentTime,h=0,d=i.BufferHelper.getBuffered(a),f=0;f=h&&l0,p=d.nextStart||0;if(f||p){if(c){var g=d.len>l,m=!p||p-s>l&&!this.fragmentTracker.getPartialFragment(s);if(g||m)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,y=Math.max(p,d.start||0)-s,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,x=(null==b||null===(v=b.details)||void 0===v?void 0:v.live)?2*b.details.targetduration:l;if(y>0&&y<=x)return void this._trySkipBufferHole(null)}var S=self.performance.now();if(null!==n){var C=S-n;!c&&C>=a&&this._reportStall(d.len);var w=r.BufferHelper.bufferInfo(i,s,e.maxBufferHole);this._tryFixBufferStall(w,C)}else this.stalled=S}}}else if(this.moved=!0,null!==n){if(this.stallReported){var k=self.performance.now()-n;o.logger.warn("playback not stuck anymore @"+s+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},e._tryFixBufferStall=function(t,e){var i=this.config,r=this.fragmentTracker,n=this.media.currentTime,s=r.getPartialFragment(n);s&&this._trySkipBufferHole(s)||t.len>i.maxBufferHole&&e>1e3*i.highBufferWatchdogPeriod&&(o.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},e._reportStall=function(t){var e=this.hls,i=this.media;this.stallReported||(this.stallReported=!0,o.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer (buffer="+t+")"),e.trigger(s.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e._trySkipBufferHole=function(t){for(var e=this.config,i=this.hls,a=this.media,l=a.currentTime,h=0,d=r.BufferHelper.getBuffered(a),f=0;f=h&&l.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,s)),u=Math.round(2/(1+Math.exp(-.75*a-this.edgeStalled))*20)/20;t.playbackRate=Math.min(c,Math.max(1,u))}else 1!==t.playbackRate&&0!==t.playbackRate&&(t.playbackRate=1)}}}}},l.estimateLiveEdge=function(){var t=this.levelDetails;return null===t?null:t.edge+t.age},l.computeLatency=function(){var t=this.estimateLiveEdge();return null===t?null:t-this.currentTime},e=t,(r=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var t=this.config,e=this.levelDetails;return void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:e?t.liveMaxLatencyDurationCount*e.targetduration:0}},{key:"targetLatency",get:function(){var t=this.levelDetails;if(null===t)return null;var e=t.holdBack,r=t.partHoldBack,i=t.targetduration,n=this.config,s=n.liveSyncDuration,o=n.liveSyncDurationCount,a=n.lowLatencyMode,l=this.hls.userConfig,c=a&&r||e;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==s?s:o*i);var u=i;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var t=this.estimateLiveEdge(),e=this.targetLatency,r=this.levelDetails;if(null===t||null===e||null===r)return null;var i=r.edge,n=t-e-this.edgeStalled,s=i-r.totalduration,o=i-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(s,n),o)}},{key:"drift",get:function(){var t=this.levelDetails;return null===t?1:t.drift}},{key:"edgeStalled",get:function(){var t=this.levelDetails;if(null===t)return 0;var e=3*(this.config.lowLatencyMode&&t.partTarget||t.targetduration);return Math.max(t.age-e,0)}},{key:"forwardBufferLength",get:function(){var t=this.media,e=this.levelDetails;if(!t||!e)return 0;var r=t.buffered.length;return r?t.buffered.end(r-1):e.edge-this.currentTime}}])&&o(e.prototype,r),a&&o(e,a),t}()},"./src/controller/level-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return a}));var r=i(/*! ../errors */"./src/errors.ts"),n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts");function o(t,e){for(var i=0;i.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,s)),u=Math.round(2/(1+Math.exp(-.75*a-this.edgeStalled))*20)/20;t.playbackRate=Math.min(c,Math.max(1,u))}else 1!==t.playbackRate&&0!==t.playbackRate&&(t.playbackRate=1)}}}}},l.estimateLiveEdge=function(){var t=this.levelDetails;return null===t?null:t.edge+t.age},l.computeLatency=function(){var t=this.estimateLiveEdge();return null===t?null:t-this.currentTime},e=t,(i=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var t=this.config,e=this.levelDetails;return void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:e?t.liveMaxLatencyDurationCount*e.targetduration:0}},{key:"targetLatency",get:function(){var t=this.levelDetails;if(null===t)return null;var e=t.holdBack,i=t.partHoldBack,r=t.targetduration,n=this.config,s=n.liveSyncDuration,o=n.liveSyncDurationCount,a=n.lowLatencyMode,l=this.hls.userConfig,c=a&&i||e;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==s?s:o*r);var u=r;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var t=this.estimateLiveEdge(),e=this.targetLatency,i=this.levelDetails;if(null===t||null===e||null===i)return null;var r=i.edge,n=t-e-this.edgeStalled,s=r-i.totalduration,o=r-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(s,n),o)}},{key:"drift",get:function(){var t=this.levelDetails;return null===t?1:t.drift}},{key:"edgeStalled",get:function(){var t=this.levelDetails;if(null===t)return 0;var e=3*(this.config.lowLatencyMode&&t.partTarget||t.targetduration);return Math.max(t.age-e,0)}},{key:"forwardBufferLength",get:function(){var t=this.media,e=this.levelDetails;if(!t||!e)return 0;var i=t.buffered.length;return i?t.buffered.end(i-1):e.edge-this.currentTime}}])&&o(e.prototype,i),a&&o(e,a),t}()},"./src/controller/level-controller.ts": /*!********************************************!*\ !*** ./src/controller/level-controller.ts ***! \********************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return p}));var i=r(/*! ../types/level */"./src/types/level.ts"),n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../errors */"./src/errors.ts"),o=r(/*! ../utils/codecs */"./src/utils/codecs.ts"),a=r(/*! ./level-helper */"./src/controller/level-helper.ts"),l=r(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=r(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(t){for(var e=1;e0){r=c[0].bitrate,c.sort((function(t,e){return t.bitrate-e.bitrate})),this._levels=c;for(var v=0;vthis.hls.config.fragLoadingMaxRetry&&(o=r.frag.level)):o=r.frag.level}break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:i&&(i.deliveryDirectives&&(l=!1),o=i.level),a=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:o=r.level,a=!0}void 0!==o&&this.recoverLevel(r,o,a,l)}}},v.recoverLevel=function(t,e,r,i){var n=t.details,s=this._levels[e];if(s.loadError++,r){if(!this.retryLoadingOrFail(t))return void(this.currentLevelIndex=-1);t.levelRetry=!0}if(i){var o=s.url.length;if(o>1&&s.loadError1){var i=(e.urlId+1)%r;this.warn("Switching to redundant URL-id "+i),this._levels.forEach((function(t){t.urlId=i})),this.level=t}},v.onFragLoaded=function(t,e){var r=e.frag;if(void 0!==r&&r.type===c.PlaylistLevelType.MAIN){var i=this._levels[r.level];void 0!==i&&(i.fragmentError=0,i.loadError=0)}},v.onLevelLoaded=function(t,e){var r,i,n=e.level,s=e.details,o=this._levels[n];if(!o)return this.warn("Invalid level index "+n),void(null!==(i=e.deliveryDirectives)&&void 0!==i&&i.skip&&(s.deltaUpdateFailed=!0));n===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(n,e,o.details)):null!==(r=e.deliveryDirectives)&&void 0!==r&&r.skip&&(s.deltaUpdateFailed=!0)},v.onAudioTrackSwitched=function(t,e){var r=this.hls.levels[this.currentLevelIndex];if(r&&r.audioGroupIds){for(var i=-1,n=this.hls.audioTracks[e.id].groupId,s=0;s0){var i=r.urlId,s=r.url[i];if(t)try{s=t.addDirectives(s)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("Attempt loading level index "+e+(t?" at sn "+t.msn+" part "+t.part:"")+" with URL-id "+i+" "+s),this.clearTimer(),this.hls.trigger(n.Events.LEVEL_LOADING,{url:s,level:e,id:i,deliveryDirectives:t||null})}},v.removeLevel=function(t,e){var r=function(t,r){return r!==e},i=this._levels.filter((function(i,n){return n!==t||i.url.length>1&&void 0!==e&&(i.url=i.url.filter(r),i.audioGroupIds&&(i.audioGroupIds=i.audioGroupIds.filter(r)),i.textGroupIds&&(i.textGroupIds=i.textGroupIds.filter(r)),i.urlId=0,!0)})).map((function(t,e){var r=t.details;return null!=r&&r.fragments&&r.fragments.forEach((function(t){t.level=e})),t}));this._levels=i,this.hls.trigger(n.Events.LEVELS_UPDATED,{levels:i})},p=l,(g=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e,r=this._levels;if(0!==r.length&&(this.currentLevelIndex!==t||null===(e=r[t])||void 0===e||!e.details)){if(t<0||t>=r.length){var i=t<0;if(this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:t,fatal:i,reason:"invalid level idx"}),i)return;t=Math.min(t,r.length-1)}this.clearTimer();var o=this.currentLevelIndex,a=r[o],l=r[t];this.log("switching to level "+t+" from "+o),this.currentLevelIndex=t;var c=u({},l,{level:t,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(n.Events.LEVEL_SWITCHING,c);var h=l.details;if(!h||h.live){var d=this.switchParams(l.uri,null==a?void 0:a.details);this.loadPlaylist(d)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&h(p.prototype,g),m&&h(p,m),l}(l.default)},"./src/controller/level-helper.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return p}));var r=i(/*! ../types/level */"./src/types/level.ts"),n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../errors */"./src/errors.ts"),o=i(/*! ../utils/codecs */"./src/utils/codecs.ts"),a=i(/*! ./level-helper */"./src/controller/level-helper.ts"),l=i(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=i(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(t){for(var e=1;e0){i=c[0].bitrate,c.sort((function(t,e){return t.bitrate-e.bitrate})),this._levels=c;for(var v=0;vthis.hls.config.fragLoadingMaxRetry&&(o=i.frag.level)):o=i.frag.level}break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(l=!1),o=r.level),a=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:o=i.level,a=!0}void 0!==o&&this.recoverLevel(i,o,a,l)}}},v.recoverLevel=function(t,e,i,r){var n=t.details,s=this._levels[e];if(s.loadError++,i){if(!this.retryLoadingOrFail(t))return void(this.currentLevelIndex=-1);t.levelRetry=!0}if(r){var o=s.url.length;if(o>1&&s.loadError1){var r=(e.urlId+1)%i;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(t){t.urlId=r})),this.level=t}},v.onFragLoaded=function(t,e){var i=e.frag;if(void 0!==i&&i.type===c.PlaylistLevelType.MAIN){var r=this._levels[i.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},v.onLevelLoaded=function(t,e){var i,r,n=e.level,s=e.details,o=this._levels[n];if(!o)return this.warn("Invalid level index "+n),void(null!==(r=e.deliveryDirectives)&&void 0!==r&&r.skip&&(s.deltaUpdateFailed=!0));n===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(n,e,o.details)):null!==(i=e.deliveryDirectives)&&void 0!==i&&i.skip&&(s.deltaUpdateFailed=!0)},v.onAudioTrackSwitched=function(t,e){var i=this.hls.levels[this.currentLevelIndex];if(i&&i.audioGroupIds){for(var r=-1,n=this.hls.audioTracks[e.id].groupId,s=0;s0){var r=i.urlId,s=i.url[r];if(t)try{s=t.addDirectives(s)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("Attempt loading level index "+e+(t?" at sn "+t.msn+" part "+t.part:"")+" with URL-id "+r+" "+s),this.clearTimer(),this.hls.trigger(n.Events.LEVEL_LOADING,{url:s,level:e,id:r,deliveryDirectives:t||null})}},v.removeLevel=function(t,e){var i=function(t,i){return i!==e},r=this._levels.filter((function(r,n){return n!==t||r.url.length>1&&void 0!==e&&(r.url=r.url.filter(i),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(i)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(i)),r.urlId=0,!0)})).map((function(t,e){var i=t.details;return null!=i&&i.fragments&&i.fragments.forEach((function(t){t.level=e})),t}));this._levels=r,this.hls.trigger(n.Events.LEVELS_UPDATED,{levels:r})},p=l,(g=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e,i=this._levels;if(0!==i.length&&(this.currentLevelIndex!==t||null===(e=i[t])||void 0===e||!e.details)){if(t<0||t>=i.length){var r=t<0;if(this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:t,fatal:r,reason:"invalid level idx"}),r)return;t=Math.min(t,i.length-1)}this.clearTimer();var o=this.currentLevelIndex,a=i[o],l=i[t];this.log("switching to level "+t+" from "+o),this.currentLevelIndex=t;var c=u({},l,{level:t,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(n.Events.LEVEL_SWITCHING,c);var h=l.details;if(!h||h.live){var d=this.switchParams(l.uri,null==a?void 0:a.details);this.loadPlaylist(d)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&h(p.prototype,g),m&&h(p,m),l}(l.default)},"./src/controller/level-helper.ts": /*!****************************************!*\ !*** ./src/controller/level-helper.ts ***! \****************************************/ -/*! exports provided: addGroupId, assignTrackIdsByGroup, updatePTS, updateFragPTSDTS, mergeDetails, mapPartIntersection, mapFragmentIntersection, adjustSliding, addSliding, computeReloadInterval, getFragmentWithSN, getPartWith */function(t,e,r){"use strict";r.r(e),r.d(e,"addGroupId",(function(){return s})),r.d(e,"assignTrackIdsByGroup",(function(){return o})),r.d(e,"updatePTS",(function(){return a})),r.d(e,"updateFragPTSDTS",(function(){return c})),r.d(e,"mergeDetails",(function(){return u})),r.d(e,"mapPartIntersection",(function(){return h})),r.d(e,"mapFragmentIntersection",(function(){return d})),r.d(e,"adjustSliding",(function(){return f})),r.d(e,"addSliding",(function(){return p})),r.d(e,"computeReloadInterval",(function(){return g})),r.d(e,"getFragmentWithSN",(function(){return m})),r.d(e,"getPartWith",(function(){return v}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../utils/logger */"./src/utils/logger.ts");function s(t,e,r){switch(e){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(r);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(r)}}function o(t){var e={};t.forEach((function(t){var r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++}))}function a(t,e,r){l(t[e],t[r])}function l(t,e){var r=e.startPTS;if(Object(i.isFiniteNumber)(r)){var n,s=0;e.sn>t.sn?(s=r-t.start,n=t):(s=t.start-r,n=e),n.duration!==s&&(n.duration=s)}else e.sn>t.sn?t.cc===e.cc&&t.minEndPTS?e.start=t.start+(t.minEndPTS-t.start):e.start=t.start+t.duration:e.start=Math.max(t.start-e.duration,0)}function c(t,e,r,s,o,a){s-r<=0&&(n.logger.warn("Fragment should have a positive duration",e),s=r+e.duration,a=o+e.duration);var c=r,u=s,h=e.startPTS,d=e.endPTS;if(Object(i.isFiniteNumber)(h)){var f=Math.abs(h-r);Object(i.isFiniteNumber)(e.deltaPTS)?e.deltaPTS=Math.max(f,e.deltaPTS):e.deltaPTS=f,c=Math.max(r,h),r=Math.min(r,h),o=Math.min(o,e.startDTS),u=Math.min(s,d),s=Math.max(s,d),a=Math.max(a,e.endDTS)}e.duration=s-r;var p=r-e.start;e.appendedPTS=s,e.start=e.startPTS=r,e.maxStartPTS=c,e.startDTS=o,e.endPTS=s,e.minEndPTS=u,e.endDTS=a;var g,m=e.sn;if(!t||mt.endSN)return 0;var v=m-t.startSN,y=t.fragments;for(y[v]=e,g=v;g>0;g--)l(y[g],y[g-1]);for(g=v;g=0;o--){var a=s[o].initSegment;if(a){r=a;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var l,u=0;if(d(t,e,(function(t,n){t.relurl&&(u=t.cc-n.cc),Object(i.isFiniteNumber)(t.startPTS)&&Object(i.isFiniteNumber)(t.endPTS)&&(n.start=n.startPTS=t.startPTS,n.startDTS=t.startDTS,n.appendedPTS=t.appendedPTS,n.maxStartPTS=t.maxStartPTS,n.endPTS=t.endPTS,n.endDTS=t.endDTS,n.minEndPTS=t.minEndPTS,n.duration=t.endPTS-t.startPTS,n.duration&&(l=n),e.PTSKnown=e.alignedSliding=!0),n.elementaryStreams=t.elementaryStreams,n.loader=t.loader,n.stats=t.stats,n.urlId=t.urlId,t.initSegment&&(n.initSegment=t.initSegment,r=t.initSegment)})),r&&(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach((function(t){var e;t.initSegment&&t.initSegment.relurl!==(null===(e=r)||void 0===e?void 0:e.relurl)||(t.initSegment=r)})),e.skippedSegments&&(e.deltaUpdateFailed=e.fragments.some((function(t){return!t})),e.deltaUpdateFailed)){n.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=e.skippedSegments;p--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}var g=e.fragments;if(u){n.logger.warn("discontinuity sliding from playlist, take drift into account");for(var m=0;m=i.length||p(e,i[r].start)}function p(t,e){if(e){for(var r=t.fragments,i=t.skippedSegments;i0&&s<3*i,a=e.loading.end-e.loading.start,l=t.availabilityDelay;if(!1===t.updated)if(o){var c=333*t.misses;r=Math.max(Math.min(n,2*a),c),t.availabilityDelay=(t.availabilityDelay||0)+r}else r=n;else o?(l=Math.min(l||i/2,s),t.availabilityDelay=l,r=l+i-s):r=i-a;return Math.round(r)}function m(t,e,r){if(!t||!t.details)return null;var i=t.details,n=i.fragments[e-i.startSN];return n||((n=i.fragmentHint)&&n.sn===e?n:et.sn?(s=i-t.start,n=t):(s=t.start-i,n=e),n.duration!==s&&(n.duration=s)}else e.sn>t.sn?t.cc===e.cc&&t.minEndPTS?e.start=t.start+(t.minEndPTS-t.start):e.start=t.start+t.duration:e.start=Math.max(t.start-e.duration,0)}function c(t,e,i,s,o,a){s-i<=0&&(n.logger.warn("Fragment should have a positive duration",e),s=i+e.duration,a=o+e.duration);var c=i,u=s,h=e.startPTS,d=e.endPTS;if(Object(r.isFiniteNumber)(h)){var f=Math.abs(h-i);Object(r.isFiniteNumber)(e.deltaPTS)?e.deltaPTS=Math.max(f,e.deltaPTS):e.deltaPTS=f,c=Math.max(i,h),i=Math.min(i,h),o=Math.min(o,e.startDTS),u=Math.min(s,d),s=Math.max(s,d),a=Math.max(a,e.endDTS)}e.duration=s-i;var p=i-e.start;e.appendedPTS=s,e.start=e.startPTS=i,e.maxStartPTS=c,e.startDTS=o,e.endPTS=s,e.minEndPTS=u,e.endDTS=a;var g,m=e.sn;if(!t||mt.endSN)return 0;var v=m-t.startSN,y=t.fragments;for(y[v]=e,g=v;g>0;g--)l(y[g],y[g-1]);for(g=v;g=0;o--){var a=s[o].initSegment;if(a){i=a;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var l,u=0;if(d(t,e,(function(t,n){t.relurl&&(u=t.cc-n.cc),Object(r.isFiniteNumber)(t.startPTS)&&Object(r.isFiniteNumber)(t.endPTS)&&(n.start=n.startPTS=t.startPTS,n.startDTS=t.startDTS,n.appendedPTS=t.appendedPTS,n.maxStartPTS=t.maxStartPTS,n.endPTS=t.endPTS,n.endDTS=t.endDTS,n.minEndPTS=t.minEndPTS,n.duration=t.endPTS-t.startPTS,n.duration&&(l=n),e.PTSKnown=e.alignedSliding=!0),n.elementaryStreams=t.elementaryStreams,n.loader=t.loader,n.stats=t.stats,n.urlId=t.urlId,t.initSegment&&(n.initSegment=t.initSegment,i=t.initSegment)})),i&&(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach((function(t){var e;t.initSegment&&t.initSegment.relurl!==(null===(e=i)||void 0===e?void 0:e.relurl)||(t.initSegment=i)})),e.skippedSegments&&(e.deltaUpdateFailed=e.fragments.some((function(t){return!t})),e.deltaUpdateFailed)){n.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=e.skippedSegments;p--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}var g=e.fragments;if(u){n.logger.warn("discontinuity sliding from playlist, take drift into account");for(var m=0;m=r.length||p(e,r[i].start)}function p(t,e){if(e){for(var i=t.fragments,r=t.skippedSegments;r0&&s<3*r,a=e.loading.end-e.loading.start,l=t.availabilityDelay;if(!1===t.updated)if(o){var c=333*t.misses;i=Math.max(Math.min(n,2*a),c),t.availabilityDelay=(t.availabilityDelay||0)+i}else i=n;else o?(l=Math.min(l||r/2,s),t.availabilityDelay=l,i=l+r-s):i=r-a;return Math.round(i)}function m(t,e,i){if(!t||!t.details)return null;var r=t.details,n=r.fragments[e-r.startSN];return n||((n=r.fragmentHint)&&n.sn===e?n:e0&&-1===t&&(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=n.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this._forceStartLoad=!0,this.state=n.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,t.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case n.State.IDLE:this.doTickIdle();break;case n.State.WAITING_LEVEL:var t,e=this.levels,r=this.level,i=null==e||null===(t=e[r])||void 0===t?void 0:t.details;if(i&&(!i.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(i))break;this.state=n.State.IDLE;break}break;case n.State.FRAG_LOADING_WAITING_RETRY:var s,o=self.performance.now(),a=this.retryDate;(!a||o>=a||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=n.State.IDLE)}this.onTickEnd()},C.onTickEnd=function(){t.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var t,e,r=this.hls,i=this.levelLastLoaded,s=this.levels,a=this.media,h=r.config,d=r.nextLoadLevel;if(null!==i&&(a||!this.startFragRequested&&h.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&s&&s[d]){var f=s[d];this.level=r.nextLoadLevel=d;var p=f.details;if(!p||this.state===n.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==d)this.state=n.State.WAITING_LEVEL;else{var g=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:a,c.PlaylistLevelType.MAIN);if(null!==g&&!(g.len>=this.getMaxBufferLength(f.maxBitrate))){if(this._streamEnded(g,p)){var m={};return this.altAudio&&(m.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,m),void(this.state=n.State.ENDED)}var v=g.end,y=this.getNextFragment(v,p);if(this.couldBacktrack&&!this.fragPrevious&&y&&"initSegment"!==y.sn){var b=y.sn-p.startSN;b>1&&(y=p.fragments[b-1],this.fragmentTracker.removeFragment(y))}if(y&&this.fragmentTracker.getState(y)===l.FragmentState.OK&&this.nextLoadPosition>v){var x=this.audioOnly&&!this.altAudio?u.ElementaryStreamTypes.AUDIO:u.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(a,x,c.PlaylistLevelType.MAIN),y=this.getNextFragment(this.nextLoadPosition,p)}y&&(!y.initSegment||y.initSegment.data||this.bitrateTest||(y=y.initSegment),"identity"!==(null===(t=y.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=y.decryptdata)&&void 0!==e&&e.key?this.loadFragment(y,p,v):this.loadKey(y,p))}}}},C.loadFragment=function(e,r,i){var n,s=this.fragmentTracker.getState(e);if(this.fragCurrent=e,s===l.FragmentState.BACKTRACKED){var o=this.fragmentTracker.getBacktrackData(e);if(o)return this._handleFragmentLoadProgress(o),void this._handleFragmentLoadComplete(o);s=l.FragmentState.NOT_LOADED}s===l.FragmentState.NOT_LOADED||s===l.FragmentState.PARTIAL?"initSegment"===e.sn?this._loadInitSegment(e):this.bitrateTest?(e.bitrateTest=!0,this.log("Fragment "+e.sn+" of level "+e.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(e)):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,r,i)):s===l.FragmentState.APPENDING?this.reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e):0===(null===(n=this.media)||void 0===n?void 0:n.buffered.length)&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(t){var e=this.fragmentTracker.getAppendedFrag(t,c.PlaylistLevelType.MAIN);return e&&"fragment"in e?e.fragment:e},C.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,c.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var t=this.levels,e=this.media;if(null!=e&&e.readyState){var r,i=this.getAppendedFrag(e.currentTime);if(i&&i.start>1&&this.flushMainBuffer(0,i.start-1),!e.paused&&t){var n=t[this.hls.nextLoadLevel],s=this.fragLastKbps;r=s&&this.fragCurrent?this.fragCurrent.duration*n.maxBitrate/(1e3*s)+1:0}else r=0;var o=this.getBufferedFrag(e.currentTime+r);if(o){var a=this.followingBufferedFrag(o);if(a){this.abortCurrentFrag();var l=a.maxStartPTS?a.maxStartPTS:a.start,c=a.duration,u=Math.max(o.end,l+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,.5*c),.75*c));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var t=this.fragCurrent;this.fragCurrent=null,null!=t&&t.loader&&t.loader.abort(),this.state===n.State.KEY_LOADING&&(this.state=n.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(e,r){t.prototype.flushMainBuffer.call(this,e,r,this.altAudio?"video":null)},C.onMediaAttached=function(e,r){t.prototype.onMediaAttached.call(this,e,r);var i=r.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),i.addEventListener("playing",this.onvplaying),i.addEventListener("seeked",this.onvseeked),this.gapController=new f.default(this.config,i,this.fragmentTracker,this.hls)},C.onMediaDetaching=function(){var e=this.media;e&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),t.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:null;Object(i.isFiniteNumber)(e)&&this.log("Media seeked to "+e.toFixed(3)),this.tick()},C.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(o.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},C.onManifestParsed=function(t,e){var r,i=!1,n=!1;e.levels.forEach((function(t){(r=t.audioCodec)&&(-1!==r.indexOf("mp4a.40.2")&&(i=!0),-1!==r.indexOf("mp4a.40.5")&&(n=!0))})),this.audioCodecSwitch=i&&n&&!Object(s.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1},C.onLevelLoading=function(t,e){var r=this.levels;if(r&&this.state===n.State.IDLE){var i=r[e.level];(!i.details||i.details.live&&this.levelLastLoaded!==e.level||this.waitForCdnTuneIn(i.details))&&(this.state=n.State.WAITING_LEVEL)}},C.onLevelLoaded=function(t,e){var r,i=this.levels,s=e.level,a=e.details,l=a.totalduration;if(i){this.log("Level "+s+" loaded ["+a.startSN+","+a.endSN+"], cc ["+a.startCC+", "+a.endCC+"] duration:"+l);var c=this.fragCurrent;!c||this.state!==n.State.FRAG_LOADING&&this.state!==n.State.FRAG_LOADING_WAITING_RETRY||c.level!==e.level&&c.loader&&(this.state=n.State.IDLE,c.loader.abort());var u=i[s],h=0;if(a.live||null!==(r=u.details)&&void 0!==r&&r.live){if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed)return;h=this.alignPlaylists(a,u.details)}if(u.details=a,this.levelLastLoaded=s,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:a,level:s}),this.state===n.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(a))return;this.state=n.State.IDLE}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,h),this.tick()}else this.warn("Levels were reset while loading level "+s)},C._handleFragmentLoadProgress=function(t){var e,r=t.frag,i=t.part,n=t.payload,s=this.levels;if(s){var o=s[r.level],a=o.details;if(a){var l=o.videoCodec,u=a.PTSKnown||!a.live,f=null===(e=r.initSegment)||void 0===e?void 0:e.data,p=this._getAudioCodec(o),g=this.transmuxer=this.transmuxer||new h.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),m=i?i.index:-1,v=-1!==m,y=new d.ChunkMetadata(r.level,r.sn,r.stats.chunkCount,n.byteLength,m,v),b=this.initPTS[r.cc];g.push(n,f,p,l,r,i,a.totalduration,u,y,b)}else this.warn("Dropping fragment "+r.sn+" of level "+r.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered")},C.onAudioTrackSwitching=function(t,e){var r=this.altAudio,i=!!e.url,n=e.id;if(!i){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var s=this.fragCurrent;null!=s&&s.loader&&(this.log("Switching to main audio track, cancel main fragment load"),s.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var a=this.hls;r&&a.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),a.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:n})}},C.onAudioTrackSwitched=function(t,e){var r=e.id,i=!!this.hls.audioTracks[r].url;if(i){var n=this.videoBuffer;n&&this.mediaBuffer!==n&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=i,this.tick()},C.onBufferCreated=function(t,e){var r,i,n=e.tracks,s=!1;for(var o in n){var a=n[o];if("main"===a.id){if(i=o,r=a,"video"===o){var l=n[o];l&&(this.videoBuffer=l.buffer)}}else s=!0}s&&r?(this.log("Alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(t,e){var r=e.frag,i=e.part;if(!r||r.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(r))return this.warn("Fragment "+r.sn+(i?" p: "+i.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===n.State.PARSED&&(this.state=n.State.IDLE));var s=i?i.stats:r.stats;this.fragLastKbps=Math.round(8*s.total/(s.buffering.end-s.loading.first)),"initSegment"!==r.sn&&(this.fragPrevious=r),this.fragBufferedComplete(r,i)}},C.onError=function(t,e){switch(e.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.MAIN,e);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==n.State.ERROR&&(e.fatal?(this.warn(""+e.details),this.state=n.State.ERROR):e.levelRetry||this.state!==n.State.WAITING_LEVEL||(this.state=n.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:if("main"===e.parent&&(this.state===n.State.PARSING||this.state===n.State.PARSED)){var r=!0,i=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);i&&i.len>.5&&(r=!this.reduceMaxBufferLength(i.len)),r&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},C.checkBuffer=function(){var t=this.media,e=this.gapController;if(t&&e&&t.readyState){var r=a.BufferHelper.getBuffered(t);!this.loadedmetadata&&r.length?(this.loadedmetadata=!0,this.seekToStartPos()):e.poll(this.lastCurrentTime),this.lastCurrentTime=t.currentTime}},C.onFragLoadEmergencyAborted=function(){this.state=n.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(t,e){var r=e.type;if(r!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var i=(r===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(i,r,c.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(t,e){this.levels=e.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var t=this.media,e=t.currentTime,r=this.startPosition;if(r>=0&&e0&&(n1&&!1===t.seeking){var r=t.currentTime;if(a.BufferHelper.isBuffered(t,r)?e=this.getAppendedFrag(r):a.BufferHelper.isBuffered(t,r+.1)&&(e=this.getAppendedFrag(r+.1)),e){var i=this.fragPlaying,n=e.level;i&&e.sn===i.sn&&i.level===n&&e.urlId===i.urlId||(this.hls.trigger(o.Events.FRAG_CHANGED,{frag:e}),i&&i.level===n||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:n}),this.fragPlaying=e)}}},b=y,(x=[{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);return this.followingBufferedFrag(e)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&m(b.prototype,x),S&&m(b,S),y}(n.default)},"./src/controller/subtitle-stream-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return y}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),s=i(/*! ../is-supported */"./src/is-supported.ts"),o=i(/*! ../events */"./src/events.ts"),a=i(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=i(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),c=i(/*! ../types/loader */"./src/types/loader.ts"),u=i(/*! ../loader/fragment */"./src/loader/fragment.ts"),h=i(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),d=i(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),f=i(/*! ./gap-controller */"./src/controller/gap-controller.ts"),p=i(/*! ../errors */"./src/errors.ts"),g=i(/*! ../utils/logger */"./src/utils/logger.ts");function m(t,e){for(var i=0;i0&&-1===t&&(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=n.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this._forceStartLoad=!0,this.state=n.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,t.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case n.State.IDLE:this.doTickIdle();break;case n.State.WAITING_LEVEL:var t,e=this.levels,i=this.level,r=null==e||null===(t=e[i])||void 0===t?void 0:t.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=n.State.IDLE;break}break;case n.State.FRAG_LOADING_WAITING_RETRY:var s,o=self.performance.now(),a=this.retryDate;(!a||o>=a||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=n.State.IDLE)}this.onTickEnd()},C.onTickEnd=function(){t.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var t,e,i=this.hls,r=this.levelLastLoaded,s=this.levels,a=this.media,h=i.config,d=i.nextLoadLevel;if(null!==r&&(a||!this.startFragRequested&&h.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&s&&s[d]){var f=s[d];this.level=i.nextLoadLevel=d;var p=f.details;if(!p||this.state===n.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==d)this.state=n.State.WAITING_LEVEL;else{var g=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:a,c.PlaylistLevelType.MAIN);if(null!==g&&!(g.len>=this.getMaxBufferLength(f.maxBitrate))){if(this._streamEnded(g,p)){var m={};return this.altAudio&&(m.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,m),void(this.state=n.State.ENDED)}var v=g.end,y=this.getNextFragment(v,p);if(this.couldBacktrack&&!this.fragPrevious&&y&&"initSegment"!==y.sn){var b=y.sn-p.startSN;b>1&&(y=p.fragments[b-1],this.fragmentTracker.removeFragment(y))}if(y&&this.fragmentTracker.getState(y)===l.FragmentState.OK&&this.nextLoadPosition>v){var x=this.audioOnly&&!this.altAudio?u.ElementaryStreamTypes.AUDIO:u.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(a,x,c.PlaylistLevelType.MAIN),y=this.getNextFragment(this.nextLoadPosition,p)}y&&(!y.initSegment||y.initSegment.data||this.bitrateTest||(y=y.initSegment),"identity"!==(null===(t=y.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=y.decryptdata)&&void 0!==e&&e.key?this.loadFragment(y,p,v):this.loadKey(y,p))}}}},C.loadFragment=function(e,i,r){var n,s=this.fragmentTracker.getState(e);if(this.fragCurrent=e,s===l.FragmentState.BACKTRACKED){var o=this.fragmentTracker.getBacktrackData(e);if(o)return this._handleFragmentLoadProgress(o),void this._handleFragmentLoadComplete(o);s=l.FragmentState.NOT_LOADED}s===l.FragmentState.NOT_LOADED||s===l.FragmentState.PARTIAL?"initSegment"===e.sn?this._loadInitSegment(e):this.bitrateTest?(e.bitrateTest=!0,this.log("Fragment "+e.sn+" of level "+e.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(e)):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,i,r)):s===l.FragmentState.APPENDING?this.reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e):0===(null===(n=this.media)||void 0===n?void 0:n.buffered.length)&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(t){var e=this.fragmentTracker.getAppendedFrag(t,c.PlaylistLevelType.MAIN);return e&&"fragment"in e?e.fragment:e},C.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,c.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var t=this.levels,e=this.media;if(null!=e&&e.readyState){var i,r=this.getAppendedFrag(e.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!e.paused&&t){var n=t[this.hls.nextLoadLevel],s=this.fragLastKbps;i=s&&this.fragCurrent?this.fragCurrent.duration*n.maxBitrate/(1e3*s)+1:0}else i=0;var o=this.getBufferedFrag(e.currentTime+i);if(o){var a=this.followingBufferedFrag(o);if(a){this.abortCurrentFrag();var l=a.maxStartPTS?a.maxStartPTS:a.start,c=a.duration,u=Math.max(o.end,l+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,.5*c),.75*c));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var t=this.fragCurrent;this.fragCurrent=null,null!=t&&t.loader&&t.loader.abort(),this.state===n.State.KEY_LOADING&&(this.state=n.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(e,i){t.prototype.flushMainBuffer.call(this,e,i,this.altAudio?"video":null)},C.onMediaAttached=function(e,i){t.prototype.onMediaAttached.call(this,e,i);var r=i.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new f.default(this.config,r,this.fragmentTracker,this.hls)},C.onMediaDetaching=function(){var e=this.media;e&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),t.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:null;Object(r.isFiniteNumber)(e)&&this.log("Media seeked to "+e.toFixed(3)),this.tick()},C.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(o.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},C.onManifestParsed=function(t,e){var i,r=!1,n=!1;e.levels.forEach((function(t){(i=t.audioCodec)&&(-1!==i.indexOf("mp4a.40.2")&&(r=!0),-1!==i.indexOf("mp4a.40.5")&&(n=!0))})),this.audioCodecSwitch=r&&n&&!Object(s.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1},C.onLevelLoading=function(t,e){var i=this.levels;if(i&&this.state===n.State.IDLE){var r=i[e.level];(!r.details||r.details.live&&this.levelLastLoaded!==e.level||this.waitForCdnTuneIn(r.details))&&(this.state=n.State.WAITING_LEVEL)}},C.onLevelLoaded=function(t,e){var i,r=this.levels,s=e.level,a=e.details,l=a.totalduration;if(r){this.log("Level "+s+" loaded ["+a.startSN+","+a.endSN+"], cc ["+a.startCC+", "+a.endCC+"] duration:"+l);var c=this.fragCurrent;!c||this.state!==n.State.FRAG_LOADING&&this.state!==n.State.FRAG_LOADING_WAITING_RETRY||c.level!==e.level&&c.loader&&(this.state=n.State.IDLE,c.loader.abort());var u=r[s],h=0;if(a.live||null!==(i=u.details)&&void 0!==i&&i.live){if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed)return;h=this.alignPlaylists(a,u.details)}if(u.details=a,this.levelLastLoaded=s,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:a,level:s}),this.state===n.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(a))return;this.state=n.State.IDLE}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,h),this.tick()}else this.warn("Levels were reset while loading level "+s)},C._handleFragmentLoadProgress=function(t){var e,i=t.frag,r=t.part,n=t.payload,s=this.levels;if(s){var o=s[i.level],a=o.details;if(a){var l=o.videoCodec,u=a.PTSKnown||!a.live,f=null===(e=i.initSegment)||void 0===e?void 0:e.data,p=this._getAudioCodec(o),g=this.transmuxer=this.transmuxer||new h.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),m=r?r.index:-1,v=-1!==m,y=new d.ChunkMetadata(i.level,i.sn,i.stats.chunkCount,n.byteLength,m,v),b=this.initPTS[i.cc];g.push(n,f,p,l,i,r,a.totalduration,u,y,b)}else this.warn("Dropping fragment "+i.sn+" of level "+i.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+i.sn+" of level "+i.level+" will not be buffered")},C.onAudioTrackSwitching=function(t,e){var i=this.altAudio,r=!!e.url,n=e.id;if(!r){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var s=this.fragCurrent;null!=s&&s.loader&&(this.log("Switching to main audio track, cancel main fragment load"),s.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var a=this.hls;i&&a.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),a.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:n})}},C.onAudioTrackSwitched=function(t,e){var i=e.id,r=!!this.hls.audioTracks[i].url;if(r){var n=this.videoBuffer;n&&this.mediaBuffer!==n&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=r,this.tick()},C.onBufferCreated=function(t,e){var i,r,n=e.tracks,s=!1;for(var o in n){var a=n[o];if("main"===a.id){if(r=o,i=a,"video"===o){var l=n[o];l&&(this.videoBuffer=l.buffer)}}else s=!0}s&&i?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(t,e){var i=e.frag,r=e.part;if(!i||i.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(i))return this.warn("Fragment "+i.sn+(r?" p: "+r.index:"")+" of level "+i.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===n.State.PARSED&&(this.state=n.State.IDLE));var s=r?r.stats:i.stats;this.fragLastKbps=Math.round(8*s.total/(s.buffering.end-s.loading.first)),"initSegment"!==i.sn&&(this.fragPrevious=i),this.fragBufferedComplete(i,r)}},C.onError=function(t,e){switch(e.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.MAIN,e);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==n.State.ERROR&&(e.fatal?(this.warn(""+e.details),this.state=n.State.ERROR):e.levelRetry||this.state!==n.State.WAITING_LEVEL||(this.state=n.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:if("main"===e.parent&&(this.state===n.State.PARSING||this.state===n.State.PARSED)){var i=!0,r=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);r&&r.len>.5&&(i=!this.reduceMaxBufferLength(r.len)),i&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},C.checkBuffer=function(){var t=this.media,e=this.gapController;if(t&&e&&t.readyState){var i=a.BufferHelper.getBuffered(t);!this.loadedmetadata&&i.length?(this.loadedmetadata=!0,this.seekToStartPos()):e.poll(this.lastCurrentTime),this.lastCurrentTime=t.currentTime}},C.onFragLoadEmergencyAborted=function(){this.state=n.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(t,e){var i=e.type;if(i!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(i===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,i,c.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(t,e){this.levels=e.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var t=this.media,e=t.currentTime,i=this.startPosition;if(i>=0&&e0&&(n1&&!1===t.seeking){var i=t.currentTime;if(a.BufferHelper.isBuffered(t,i)?e=this.getAppendedFrag(i):a.BufferHelper.isBuffered(t,i+.1)&&(e=this.getAppendedFrag(i+.1)),e){var r=this.fragPlaying,n=e.level;r&&e.sn===r.sn&&r.level===n&&e.urlId===r.urlId||(this.hls.trigger(o.Events.FRAG_CHANGED,{frag:e}),r&&r.level===n||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:n}),this.fragPlaying=e)}}},b=y,(x=[{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);return this.followingBufferedFrag(e)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&m(b.prototype,x),S&&m(b,S),y}(n.default)},"./src/controller/subtitle-stream-controller.ts": /*!******************************************************!*\ !*** ./src/controller/subtitle-stream-controller.ts ***! \******************************************************/ -/*! exports provided: SubtitleStreamController */function(t,e,r){"use strict";r.r(e),r.d(e,"SubtitleStreamController",(function(){return g}));var i=r(/*! ../events */"./src/events.ts"),n=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=r(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),a=r(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),l=r(/*! ./level-helper */"./src/controller/level-helper.ts"),c=r(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),u=r(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),h=r(/*! ../types/loader */"./src/types/loader.ts"),d=r(/*! ../types/level */"./src/types/level.ts");function f(t,e){for(var r=0;r=n[a].start&&o<=n[a].end){s=n[a];break}var l=r.start+r.duration;s?s.end=l:(s={start:o,end:l},n.push(s)),this.fragmentTracker.fragBuffered(r)}}},b.onBufferFlushing=function(t,e){var r=e.startOffset,i=e.endOffset;if(0===r&&i!==Number.POSITIVE_INFINITY){var n=this.currentTrackId,s=this.levels;if(!s.length||!s[n]||!s[n].details)return;var o=i-s[n].details.targetduration;if(o<=0)return;e.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(t){for(var e=0;e=c.length||n!==s)&&h){if(this.mediaBuffer=this.mediaBufferTimeRanges,i.live||null!==(r=h.details)&&void 0!==r&&r.live){var d=this.mainDetails;if(i.deltaUpdateFailed||!d)return;var f=d.fragments[0];h.details?0===this.alignPlaylists(i,h.details)&&f&&Object(l.addSliding)(i,f.start):i.hasProgramDateTime&&d.hasProgramDateTime?Object(a.alignMediaPlaylistByPDT)(i,d):f&&Object(l.addSliding)(i,f.start)}h.details=i,this.levelLastLoaded=n,this.tick(),i.live&&!this.fragCurrent&&this.media&&this.state===u.State.IDLE&&(Object(o.findFragmentByPTS)(null,i.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),h.details=void 0))}}},b._handleFragmentLoadComplete=function(t){var e=t.frag,r=t.payload,n=e.decryptdata,s=this.hls;if(!this.fragContextChanged(e)&&r&&r.byteLength>0&&n&&n.key&&n.iv&&"AES-128"===n.method){var o=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(r),n.key.buffer,n.iv.buffer).then((function(t){var r=performance.now();s.trigger(i.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:o,tdecrypt:r}})}))}},b.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var t,e=this.currentTrackId,r=this.levels;if(!r.length||!r[e]||!r[e].details)return;var a=r[e].details,l=a.targetduration,h=this.config,d=this.media,f=s.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,d.currentTime-l,h.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(a,"Subtitle track details are defined on idle subtitle stream controller tick");var g,m=a.fragments,v=m.length,y=a.edge,b=this.fragPrevious;if(p=n[a].start&&o<=n[a].end){s=n[a];break}var l=i.start+i.duration;s?s.end=l:(s={start:o,end:l},n.push(s)),this.fragmentTracker.fragBuffered(i)}}},b.onBufferFlushing=function(t,e){var i=e.startOffset,r=e.endOffset;if(0===i&&r!==Number.POSITIVE_INFINITY){var n=this.currentTrackId,s=this.levels;if(!s.length||!s[n]||!s[n].details)return;var o=r-s[n].details.targetduration;if(o<=0)return;e.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(t){for(var e=0;e=c.length||n!==s)&&h){if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||null!==(i=h.details)&&void 0!==i&&i.live){var d=this.mainDetails;if(r.deltaUpdateFailed||!d)return;var f=d.fragments[0];h.details?0===this.alignPlaylists(r,h.details)&&f&&Object(l.addSliding)(r,f.start):r.hasProgramDateTime&&d.hasProgramDateTime?Object(a.alignMediaPlaylistByPDT)(r,d):f&&Object(l.addSliding)(r,f.start)}h.details=r,this.levelLastLoaded=n,this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===u.State.IDLE&&(Object(o.findFragmentByPTS)(null,r.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),h.details=void 0))}}},b._handleFragmentLoadComplete=function(t){var e=t.frag,i=t.payload,n=e.decryptdata,s=this.hls;if(!this.fragContextChanged(e)&&i&&i.byteLength>0&&n&&n.key&&n.iv&&"AES-128"===n.method){var o=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(i),n.key.buffer,n.iv.buffer).then((function(t){var i=performance.now();s.trigger(r.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:o,tdecrypt:i}})}))}},b.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var t,e=this.currentTrackId,i=this.levels;if(!i.length||!i[e]||!i[e].details)return;var a=i[e].details,l=a.targetduration,h=this.config,d=this.media,f=s.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,d.currentTime-l,h.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(a,"Subtitle track details are defined on idle subtitle stream controller tick");var g,m=a.fragments,v=m.length,y=a.edge,b=this.fragPrevious;if(p-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))},f.pollTrackChange=function(t){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,t)},f.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),u(this.media.textTracks).forEach((function(t){Object(n.clearCurrentCues)(t)})),this.subtitleTrack=-1,this.media=null)},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(t,e){this.tracks=e.subtitleTracks},f.onSubtitleTrackLoaded=function(t,e){var r=e.id,i=e.details,n=this.trackId,s=this.tracksInGroup[n];if(s){var o=s.details;s.details=e.details,this.log("subtitle track "+r+" loaded ["+i.startSN+"-"+i.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,e,o))}else this.warn("Invalid subtitle track id "+r)},f.onLevelLoading=function(t,e){this.switchLevel(e.level)},f.onLevelSwitching=function(t,e){this.switchLevel(e.level)},f.switchLevel=function(t){var e=this.hls.levels[t];if(null!=e&&e.textGroupIds){var r=e.textGroupIds[e.urlId];if(this.groupId!==r){var n=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,s=this.tracks.filter((function(t){return!r||t.groupId===r}));this.tracksInGroup=s;var o=this.findTrackId(null==n?void 0:n.name)||this.findTrackId();this.groupId=r;var a={subtitleTracks:s};this.log("Updating subtitle tracks, "+s.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(i.Events.SUBTITLE_TRACKS_UPDATED,a),-1!==o&&this.setSubtitleTrack(o,n)}}},f.findTrackId=function(t){for(var e=this.tracksInGroup,r=0;r=n.length)){this.clearTimer();var s=n[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,s){var o=s.id,a=s.groupId,l=void 0===a?"":a,c=s.name,u=s.type,h=s.url;this.hls.trigger(i.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:l,name:c,type:u,url:h});var d=this.switchParams(s.url,null==e?void 0:e.details);this.loadPlaylist(d)}else this.hls.trigger(i.Events.SUBTITLE_TRACK_SWITCH,{id:t})}}else this.queuedDefaultTrack=t},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var t=-1,e=u(this.media.textTracks),r=0;r-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))},f.pollTrackChange=function(t){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,t)},f.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),u(this.media.textTracks).forEach((function(t){Object(n.clearCurrentCues)(t)})),this.subtitleTrack=-1,this.media=null)},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(t,e){this.tracks=e.subtitleTracks},f.onSubtitleTrackLoaded=function(t,e){var i=e.id,r=e.details,n=this.trackId,s=this.tracksInGroup[n];if(s){var o=s.details;s.details=e.details,this.log("subtitle track "+i+" loaded ["+r.startSN+"-"+r.endSN+"]"),i===this.trackId&&(this.retryCount=0,this.playlistLoaded(i,e,o))}else this.warn("Invalid subtitle track id "+i)},f.onLevelLoading=function(t,e){this.switchLevel(e.level)},f.onLevelSwitching=function(t,e){this.switchLevel(e.level)},f.switchLevel=function(t){var e=this.hls.levels[t];if(null!=e&&e.textGroupIds){var i=e.textGroupIds[e.urlId];if(this.groupId!==i){var n=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,s=this.tracks.filter((function(t){return!i||t.groupId===i}));this.tracksInGroup=s;var o=this.findTrackId(null==n?void 0:n.name)||this.findTrackId();this.groupId=i;var a={subtitleTracks:s};this.log("Updating subtitle tracks, "+s.length+' track(s) found in "'+i+'" group-id'),this.hls.trigger(r.Events.SUBTITLE_TRACKS_UPDATED,a),-1!==o&&this.setSubtitleTrack(o,n)}}},f.findTrackId=function(t){for(var e=this.tracksInGroup,i=0;i=n.length)){this.clearTimer();var s=n[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,s){var o=s.id,a=s.groupId,l=void 0===a?"":a,c=s.name,u=s.type,h=s.url;this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:l,name:c,type:u,url:h});var d=this.switchParams(s.url,null==e?void 0:e.details);this.loadPlaylist(d)}else this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:t})}}else this.queuedDefaultTrack=t},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var t=-1,e=u(this.media.textTracks),i=0;i=0&&(d[0]=Math.min(d[0],e),d[1]=Math.max(d[1],r),u=!0,f/(r-e)>.5))return}if(u||s.push([e,r]),this.config.renderTextTracksNatively){var p=this.captionsTracks[t];this.Cues.newCue(p,e,r,i)}else{var g=this.Cues.newCue(null,e,r,i);this.hls.trigger(n.Events.CUES_PARSED,{type:"captions",cues:g,track:t})}},e.onInitPtsFound=function(t,e){var r=this,i=e.frag,s=e.id,o=e.initPTS,a=e.timescale,l=this.unparsedVttFrags;"main"===s&&(this.initPTS[i.cc]=o,this.timescale[i.cc]=a),l.length&&(this.unparsedVttFrags=[],l.forEach((function(t){r.onFragLoaded(n.Events.FRAG_LOADED,t)})))},e.getExistingTrack=function(t){var e=this.media;if(e)for(var r=0;r=0&&(d[0]=Math.min(d[0],e),d[1]=Math.max(d[1],i),u=!0,f/(i-e)>.5))return}if(u||s.push([e,i]),this.config.renderTextTracksNatively){var p=this.captionsTracks[t];this.Cues.newCue(p,e,i,r)}else{var g=this.Cues.newCue(null,e,i,r);this.hls.trigger(n.Events.CUES_PARSED,{type:"captions",cues:g,track:t})}},e.onInitPtsFound=function(t,e){var i=this,r=e.frag,s=e.id,o=e.initPTS,a=e.timescale,l=this.unparsedVttFrags;"main"===s&&(this.initPTS[r.cc]=o,this.timescale[r.cc]=a),l.length&&(this.unparsedVttFrags=[],l.forEach((function(t){i.onFragLoaded(n.Events.FRAG_LOADED,t)})))},e.getExistingTrack=function(t){var e=this.media;if(e)for(var i=0;i>>8^255&m^99,t[f]=m,e[m]=f;var v=d[f],y=d[v],b=d[y],x=257*d[m]^16843008*m;i[f]=x<<24|x>>>8,n[f]=x<<16|x>>>16,s[f]=x<<8|x>>>24,o[f]=x,x=16843009*b^65537*y^257*v^16843008*f,l[m]=x<<24|x>>>8,c[m]=x<<16|x>>>16,u[m]=x<<8|x>>>24,h[m]=x,f?(f=v^d[d[d[b^v]]],p^=d[d[p]]):f=p=1}},e.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),r=!0,i=0;i>>8^255&m^99,t[f]=m,e[m]=f;var v=d[f],y=d[v],b=d[y],x=257*d[m]^16843008*m;r[f]=x<<24|x>>>8,n[f]=x<<16|x>>>16,s[f]=x<<8|x>>>24,o[f]=x,x=16843009*b^65537*y^257*v^16843008*f,l[m]=x<<24|x>>>8,c[m]=x<<16|x>>>16,u[m]=x<<8|x>>>24,h[m]=x,f?(f=v^d[d[d[b^v]]],p^=d[d[p]]):f=p=1}},e.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),i=!0,r=0;r>>6);var p=(60&e[r+2])>>>2;if(!(p>f.length-1))return c=(1&e[r+2])<<2,c|=(192&e[r+3])>>>6,i.logger.log("manifest codec:"+o+", ADTS type:"+a+", samplingIndex:"+p),/firefox/i.test(h)?p>=6?(a=5,u=new Array(4),l=p-3):(a=2,u=new Array(2),l=p):-1!==h.indexOf("android")?(a=2,u=new Array(2),l=p):(a=5,u=new Array(4),o&&(-1!==o.indexOf("mp4a.40.29")||-1!==o.indexOf("mp4a.40.5"))||!o&&p>=6?l=p-3:((o&&-1!==o.indexOf("mp4a.40.2")&&(p>=6&&1===c||/vivaldi/i.test(h))||!o&&1===c)&&(a=2,u=new Array(2)),l=p)),u[0]=a<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===a&&(u[1]|=(14&l)>>1,u[2]=(1&l)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:f[p],channelCount:c,codec:"mp4a.40."+a,manifestCodec:d};t.trigger(s.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function a(t,e){return 255===t[e]&&240==(246&t[e+1])}function l(t,e){return 1&t[e+1]?7:9}function c(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function u(t,e){return e+5=t.length)return!1;var i=c(t,e);if(i<=r)return!1;var n=e+i;return n===t.length||h(t,n)}return!1}function p(t,e,r,n,s){if(!t.samplerate){var a=o(e,r,n,s);if(!a)return;t.config=a.config,t.samplerate=a.samplerate,t.channelCount=a.channelCount,t.codec=a.codec,t.manifestCodec=a.manifestCodec,i.logger.log("parsed codec:"+t.codec+", rate:"+a.samplerate+", channels:"+a.channelCount)}}function g(t){return 9216e4/t}function m(t,e,r,i,n){var s=l(t,e),o=c(t,e);if((o-=s)>0)return{headerLength:s,frameLength:o,stamp:r+i*n}}function v(t,e,r,i,n){var s=m(e,r,i,n,g(t.samplerate));if(s){var o,a=s.frameLength,l=s.headerLength,c=s.stamp,u=l+a,h=Math.max(0,r+u-e.length);h?(o=new Uint8Array(u-l)).set(e.subarray(r+l,e.length),0):o=e.subarray(r+l,r+u);var d={unit:o,pts:c};return h||t.samples.push(d),{sample:d,length:u,missing:h}}}},"./src/demux/base-audio-demuxer.ts": +/*! exports provided: getAudioConfig, isHeaderPattern, getHeaderLength, getFullFrameLength, canGetFrameLength, isHeader, canParse, probe, initTrackConfig, getFrameDuration, parseFrameHeader, appendFrame */function(t,e,i){"use strict";i.r(e),i.d(e,"getAudioConfig",(function(){return o})),i.d(e,"isHeaderPattern",(function(){return a})),i.d(e,"getHeaderLength",(function(){return l})),i.d(e,"getFullFrameLength",(function(){return c})),i.d(e,"canGetFrameLength",(function(){return u})),i.d(e,"isHeader",(function(){return h})),i.d(e,"canParse",(function(){return d})),i.d(e,"probe",(function(){return f})),i.d(e,"initTrackConfig",(function(){return p})),i.d(e,"getFrameDuration",(function(){return g})),i.d(e,"parseFrameHeader",(function(){return m})),i.d(e,"appendFrame",(function(){return v}));var r=i(/*! ../utils/logger */"./src/utils/logger.ts"),n=i(/*! ../errors */"./src/errors.ts"),s=i(/*! ../events */"./src/events.ts");function o(t,e,i,o){var a,l,c,u,h=navigator.userAgent.toLowerCase(),d=o,f=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];a=1+((192&e[i+2])>>>6);var p=(60&e[i+2])>>>2;if(!(p>f.length-1))return c=(1&e[i+2])<<2,c|=(192&e[i+3])>>>6,r.logger.log("manifest codec:"+o+", ADTS type:"+a+", samplingIndex:"+p),/firefox/i.test(h)?p>=6?(a=5,u=new Array(4),l=p-3):(a=2,u=new Array(2),l=p):-1!==h.indexOf("android")?(a=2,u=new Array(2),l=p):(a=5,u=new Array(4),o&&(-1!==o.indexOf("mp4a.40.29")||-1!==o.indexOf("mp4a.40.5"))||!o&&p>=6?l=p-3:((o&&-1!==o.indexOf("mp4a.40.2")&&(p>=6&&1===c||/vivaldi/i.test(h))||!o&&1===c)&&(a=2,u=new Array(2)),l=p)),u[0]=a<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===a&&(u[1]|=(14&l)>>1,u[2]=(1&l)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:f[p],channelCount:c,codec:"mp4a.40."+a,manifestCodec:d};t.trigger(s.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function a(t,e){return 255===t[e]&&240==(246&t[e+1])}function l(t,e){return 1&t[e+1]?7:9}function c(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function u(t,e){return e+5=t.length)return!1;var r=c(t,e);if(r<=i)return!1;var n=e+r;return n===t.length||h(t,n)}return!1}function p(t,e,i,n,s){if(!t.samplerate){var a=o(e,i,n,s);if(!a)return;t.config=a.config,t.samplerate=a.samplerate,t.channelCount=a.channelCount,t.codec=a.codec,t.manifestCodec=a.manifestCodec,r.logger.log("parsed codec:"+t.codec+", rate:"+a.samplerate+", channels:"+a.channelCount)}}function g(t){return 9216e4/t}function m(t,e,i,r,n){var s=l(t,e),o=c(t,e);if((o-=s)>0)return{headerLength:s,frameLength:o,stamp:i+r*n}}function v(t,e,i,r,n){var s=m(e,i,r,n,g(t.samplerate));if(s){var o,a=s.frameLength,l=s.headerLength,c=s.stamp,u=l+a,h=Math.max(0,i+u-e.length);h?(o=new Uint8Array(u-l)).set(e.subarray(i+l,e.length),0):o=e.subarray(i+l,i+u);var d={unit:o,pts:c};return h||t.samples.push(d),{sample:d,length:u,missing:h}}}},"./src/demux/base-audio-demuxer.ts": /*!*****************************************!*\ !*** ./src/demux/base-audio-demuxer.ts ***! \*****************************************/ -/*! exports provided: initPTSFn, default */function(t,e,r){"use strict";r.r(e),r.d(e,"initPTSFn",(function(){return c}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../demux/id3 */"./src/demux/id3.ts"),s=r(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),o=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),a=r(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),l=function(){function t(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var e=t.prototype;return e.resetInitSegment=function(t,e,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},e.resetTimeStamp=function(){},e.resetContiguity=function(){},e.canParse=function(t,e){return!1},e.appendFrame=function(t,e,r){},e.demux=function(t,e){this.cachedData&&(t=Object(o.appendUint8Array)(this.cachedData,t),this.cachedData=null);var r,i,l=n.getID3Data(t,0),u=l?l.length:0,h=this._audioTrack,d=this._id3Track,f=l?n.getTimeStamp(l):void 0,p=t.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=c(f,e)),l&&l.length>0&&d.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),i=this.initPTS;u0&&d.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),r=this.initPTS;ut?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},e.readBits=function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&i.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?r<>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},e.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.skipEG=function(){this.skipBits(1+this.skipLZ())},e.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},e.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},e.readBoolean=function(){return 1===this.readBits(1)},e.readUByte=function(){return this.readBits(8)},e.readUShort=function(){return this.readBits(16)},e.readUInt=function(){return this.readBits(32)},e.skipScalingList=function(t){for(var e=8,r=8,i=0;it?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},e.readBits=function(t){var e=Math.min(this.bitsAvailable,t),i=this.word>>>32-e;return t>32&&r.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?i<>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},e.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.skipEG=function(){this.skipBits(1+this.skipLZ())},e.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},e.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},e.readBoolean=function(){return 1===this.readBits(1)},e.readUByte=function(){return this.readBits(8)},e.readUShort=function(){return this.readBits(16)},e.readUInt=function(){return this.readBits(32)},e.skipScalingList=function(t){for(var e=8,i=8,r=0;r0)return t.subarray(r,r+i)},a=function(t,e){var r=0;return r=(127&t[e])<<21,r|=(127&t[e+1])<<14,r|=(127&t[e+2])<<7,r|=127&t[e+3]},l=function(t,e){return n(t,e)&&a(t,e+6)+10<=t.length-e},c=function(t){for(var e=d(t),r=0;r>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(s);break;case 12:case 13:o=t[u++],c+=String.fromCharCode((31&s)<<6|63&o);break;case 14:o=t[u++],a=t[u++],c+=String.fromCharCode((15&s)<<12|(63&o)<<6|(63&a)<<0)}}return c},b={decodeTextFrame:g};function x(){return i||void 0===self.TextDecoder||(i=new self.TextDecoder("utf-8")),i}},"./src/demux/mp3demuxer.ts": +/*! exports provided: isHeader, isFooter, getID3Data, canParse, getTimeStamp, isTimeStampFrame, getID3Frames, decodeFrame, utf8ArrayToStr, testables */function(t,e,i){"use strict";i.r(e),i.d(e,"isHeader",(function(){return n})),i.d(e,"isFooter",(function(){return s})),i.d(e,"getID3Data",(function(){return o})),i.d(e,"canParse",(function(){return l})),i.d(e,"getTimeStamp",(function(){return c})),i.d(e,"isTimeStampFrame",(function(){return u})),i.d(e,"getID3Frames",(function(){return d})),i.d(e,"decodeFrame",(function(){return f})),i.d(e,"utf8ArrayToStr",(function(){return y})),i.d(e,"testables",(function(){return b}));var r,n=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},s=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},o=function(t,e){for(var i=e,r=0;n(t,e);)r+=10,r+=a(t,e+6),s(t,e+10)&&(r+=10),e+=r;if(r>0)return t.subarray(i,i+r)},a=function(t,e){var i=0;return i=(127&t[e])<<21,i|=(127&t[e+1])<<14,i|=(127&t[e+2])<<7,i|=127&t[e+3]},l=function(t,e){return n(t,e)&&a(t,e+6)+10<=t.length-e},c=function(t){for(var e=d(t),i=0;i>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(s);break;case 12:case 13:o=t[u++],c+=String.fromCharCode((31&s)<<6|63&o);break;case 14:o=t[u++],a=t[u++],c+=String.fromCharCode((15&s)<<12|(63&o)<<6|(63&a)<<0)}}return c},b={decodeTextFrame:g};function x(){return r||void 0===self.TextDecoder||(r=new self.TextDecoder("utf-8")),r}},"./src/demux/mp3demuxer.ts": /*!*********************************!*\ !*** ./src/demux/mp3demuxer.ts ***! \*********************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),n=r(/*! ../demux/id3 */"./src/demux/id3.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=r(/*! ./mpegaudio */"./src/demux/mpegaudio.ts");function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(t){var e,r;function i(){return t.apply(this,arguments)||this}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,a(e,r);var l=i.prototype;return l.resetInitSegment=function(e,r,i){t.prototype.resetInitSegment.call(this,e,r,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:e,duration:i,inputTimeScale:9e4,dropped:0}},i.probe=function(t){if(!t)return!1;for(var e=(n.getID3Data(t,0)||[]).length,r=t.length;e0},e.demux=function(t){var e=t,r=Object(n.dummyTrack)();if(this.config.progressive){this.remainderData&&(e=Object(i.appendUint8Array)(this.remainderData,t));var s=Object(i.segmentValidRange)(e);this.remainderData=s.remainder,r.samples=s.valid||new Uint8Array}else r.samples=e;return{audioTrack:Object(n.dummyTrack)(),avcTrack:r,id3Track:Object(n.dummyTrack)(),textTrack:Object(n.dummyTrack)()}},e.flush=function(){var t=Object(n.dummyTrack)();return t.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(n.dummyTrack)(),avcTrack:t,id3Track:Object(n.dummyTrack)(),textTrack:Object(n.dummyTrack)()}},e.demuxSampleAes=function(t,e,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},e.destroy=function(){},t}();s.minProbeByteLength=1024,e.default=s},"./src/demux/mpegaudio.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),n=i(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),s=function(){function t(t,e){this.remainderData=null,this.config=void 0,this.config=e}var e=t.prototype;return e.resetTimeStamp=function(){},e.resetInitSegment=function(){},e.resetContiguity=function(){},t.probe=function(t){return Object(r.findBox)({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.demux=function(t){var e=t,i=Object(n.dummyTrack)();if(this.config.progressive){this.remainderData&&(e=Object(r.appendUint8Array)(this.remainderData,t));var s=Object(r.segmentValidRange)(e);this.remainderData=s.remainder,i.samples=s.valid||new Uint8Array}else i.samples=e;return{audioTrack:Object(n.dummyTrack)(),avcTrack:i,id3Track:Object(n.dummyTrack)(),textTrack:Object(n.dummyTrack)()}},e.flush=function(){var t=Object(n.dummyTrack)();return t.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(n.dummyTrack)(),avcTrack:t,id3Track:Object(n.dummyTrack)(),textTrack:Object(n.dummyTrack)()}},e.demuxSampleAes=function(t,e,i){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},e.destroy=function(){},t}();s.minProbeByteLength=1024,e.default=s},"./src/demux/mpegaudio.ts": /*!********************************!*\ !*** ./src/demux/mpegaudio.ts ***! \********************************/ -/*! exports provided: appendFrame, parseHeader, isHeaderPattern, isHeader, canParse, probe */function(t,e,r){"use strict";r.r(e),r.d(e,"appendFrame",(function(){return l})),r.d(e,"parseHeader",(function(){return c})),r.d(e,"isHeaderPattern",(function(){return u})),r.d(e,"isHeader",(function(){return h})),r.d(e,"canParse",(function(){return d})),r.d(e,"probe",(function(){return f}));var i=null,n=[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],s=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],o=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],a=[0,1,1,4];function l(t,e,r,i,n){if(!(r+24>e.length)){var s=c(e,r);if(s&&r+s.frameLength<=e.length){var o=i+n*(9e4*s.samplesPerFrame/s.sampleRate),a={unit:e.subarray(r,r+s.frameLength),pts:o,dts:o};return t.config=[],t.channelCount=s.channelCount,t.samplerate=s.sampleRate,t.samples.push(a),{sample:a,length:s.frameLength,missing:0}}}}function c(t,e){var r=t[e+1]>>3&3,l=t[e+1]>>1&3,c=t[e+2]>>4&15,u=t[e+2]>>2&3;if(1!==r&&0!==c&&15!==c&&3!==u){var h=t[e+2]>>1&1,d=t[e+3]>>6,f=1e3*n[14*(3===r?3-l:3===l?3:4)+c-1],p=s[3*(3===r?0:2===r?1:2)+u],g=3===d?1:2,m=o[r][l],v=a[l],y=8*m*v,b=Math.floor(m*f/p+h)*v;if(null===i){var x=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);i=x?parseInt(x[1]):0}return!!i&&i<=87&&2===l&&f>=224e3&&0===d&&(t[e+3]=128|t[e+3]),{sampleRate:p,channelCount:g,frameLength:b,samplesPerFrame:y}}}function u(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])}function h(t,e){return e+1e.length)){var s=c(e,i);if(s&&i+s.frameLength<=e.length){var o=r+n*(9e4*s.samplesPerFrame/s.sampleRate),a={unit:e.subarray(i,i+s.frameLength),pts:o,dts:o};return t.config=[],t.channelCount=s.channelCount,t.samplerate=s.sampleRate,t.samples.push(a),{sample:a,length:s.frameLength,missing:0}}}}function c(t,e){var i=t[e+1]>>3&3,l=t[e+1]>>1&3,c=t[e+2]>>4&15,u=t[e+2]>>2&3;if(1!==i&&0!==c&&15!==c&&3!==u){var h=t[e+2]>>1&1,d=t[e+3]>>6,f=1e3*n[14*(3===i?3-l:3===l?3:4)+c-1],p=s[3*(3===i?0:2===i?1:2)+u],g=3===d?1:2,m=o[i][l],v=a[l],y=8*m*v,b=Math.floor(m*f/p+h)*v;if(null===r){var x=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);r=x?parseInt(x[1]):0}return!!r&&r<=87&&2===l&&f>=224e3&&0===d&&(t[e+3]=128|t[e+3]),{sampleRate:p,channelCount:g,frameLength:b,samplesPerFrame:y}}}function u(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])}function h(t,e){return e+1=t.length)return void r();if(!(t[e].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(t,e,r,i),!i)return}}},e.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,r=new Int8Array(e),i=0,n=32;n<=t.length-16;n+=160,i+=16)r.set(t.subarray(n,n+16),i);return r},e.getAvcDecryptedUnit=function(t,e){for(var r=new Uint8Array(e),i=0,n=32;n<=t.length-16;n+=160,i+=16)t.set(r.subarray(i,i+16),n);return t},e.decryptAvcSample=function(t,e,r,i,s,o){var a=Object(n.discardEPB)(s.data),l=this.getAvcEncryptedData(a),c=this;this.decryptBuffer(l.buffer,(function(n){s.data=c.getAvcDecryptedUnit(a,n),o||c.decryptAvcSamples(t,e,r+1,i)}))},e.decryptAvcSamples=function(t,e,r,i){if(t instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;e++,r=0){if(e>=t.length)return void i();for(var n=t[e].units;!(r>=n.length);r++){var s=n[r];if(!(s.data.length<=48||1!==s.type&&5!==s.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,r,i,s,o),!o)return}}}},t}();e.default=s},"./src/demux/transmuxer-interface.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),n=i(/*! ./tsdemuxer */"./src/demux/tsdemuxer.ts"),s=function(){function t(t,e,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new r.default(t,e,{removePKCS7Padding:!1})}var e=t.prototype;return e.decryptBuffer=function(t,e){this.decrypter.decrypt(t,this.keyData.key.buffer,this.keyData.iv.buffer,e)},e.decryptAacSample=function(t,e,i,r){var n=t[e].unit,s=n.subarray(16,n.length-n.length%16),o=s.buffer.slice(s.byteOffset,s.byteOffset+s.length),a=this;this.decryptBuffer(o,(function(s){var o=new Uint8Array(s);n.set(o,16),r||a.decryptAacSamples(t,e+1,i)}))},e.decryptAacSamples=function(t,e,i){for(;;e++){if(e>=t.length)return void i();if(!(t[e].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(t,e,i,r),!r)return}}},e.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,i=new Int8Array(e),r=0,n=32;n<=t.length-16;n+=160,r+=16)i.set(t.subarray(n,n+16),r);return i},e.getAvcDecryptedUnit=function(t,e){for(var i=new Uint8Array(e),r=0,n=32;n<=t.length-16;n+=160,r+=16)t.set(i.subarray(r,r+16),n);return t},e.decryptAvcSample=function(t,e,i,r,s,o){var a=Object(n.discardEPB)(s.data),l=this.getAvcEncryptedData(a),c=this;this.decryptBuffer(l.buffer,(function(n){s.data=c.getAvcDecryptedUnit(a,n),o||c.decryptAvcSamples(t,e,i+1,r)}))},e.decryptAvcSamples=function(t,e,i,r){if(t instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;e++,i=0){if(e>=t.length)return void r();for(var n=t[e].units;!(i>=n.length);i++){var s=n[i];if(!(s.data.length<=48||1!==s.type&&5!==s.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,i,r,s,o),!o)return}}}},t}();e.default=s},"./src/demux/transmuxer-interface.ts": /*!*******************************************!*\ !*** ./src/demux/transmuxer-interface.ts ***! \*******************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return h}));var i=r(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts"),a=r(/*! ../errors */"./src/errors.ts"),l=r(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=r(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function t(t,e,r,l){var h=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=t,this.id=e,this.onTransmuxComplete=r,this.onFlush=l;var d=t.config,f=function(e,r){(r=r||{}).frag=h.frag,r.id=h.id,t.trigger(e,r)};this.observer=new c.EventEmitter,this.observer.on(n.Events.FRAG_DECRYPTED,f),this.observer.on(n.Events.ERROR,f);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},g=navigator.vendor;if(d.enableWorker&&"undefined"!=typeof Worker){var m;o.logger.log("demuxing in webworker");try{m=this.worker=i(/*! ../demux/transmuxer-worker.ts */"./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),m.addEventListener("message",this.onwmsg),m.onerror=function(e){t.trigger(n.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(e.message+" ("+e.filename+":"+e.lineno+")")})},m.postMessage({cmd:"init",typeSupported:p,vendor:g,id:e,config:JSON.stringify(d)})}catch(t){o.logger.warn("Error in worker:",t),o.logger.error("Error while initializing DemuxerWorker, fallback to inline"),m&&self.URL.revokeObjectURL(m.objectURL),this.transmuxer=new s.default(this.observer,p,d,g,e),this.worker=null}}else this.transmuxer=new s.default(this.observer,p,d,g,e)}var e=t.prototype;return e.destroy=function(){var t=this.worker;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.worker=null;else{var e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}var r=this.observer;r&&r.removeAllListeners(),this.observer=null},e.push=function(t,e,r,i,n,a,l,c,u,h){var d=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,g=a?a.start:n.start,m=n.decryptdata,v=this.frag,y=!(v&&n.cc===v.cc),b=!(v&&u.level===v.level),x=v?u.sn-v.sn:-1,S=this.part?u.part-this.part.index:1,C=!b&&(1===x||0===x&&1===S),w=self.performance.now();(b||x||0===n.stats.parsing.start)&&(n.stats.parsing.start=w),!a||!S&&C||(a.stats.parsing.start=w);var k=new s.TransmuxState(y,C,c,b,g);if(!C||y){o.logger.log("[transmuxer-interface, "+n.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+y+"\n trackSwitch: "+b+"\n contiguous: "+C+"\n accurateTimeOffset: "+c+"\n timeOffset: "+g);var E=new s.TransmuxConfig(r,i,e,l,h);this.configureTransmuxer(E)}if(this.frag=n,this.part=a,p)p.postMessage({cmd:"demux",data:t,decryptdata:m,chunkMeta:u,state:k},t instanceof ArrayBuffer?[t]:[]);else if(f){var T=f.push(t,m,u,k);Object(s.isPromise)(T)?T.then((function(t){d.handleTransmuxComplete(t)})):this.handleTransmuxComplete(T)}},e.flush=function(t){var e=this;t.transmuxing.start=self.performance.now();var r=this.transmuxer,i=this.worker;if(i)i.postMessage({cmd:"flush",chunkMeta:t});else if(r){var n=r.flush(t);Object(s.isPromise)(n)?n.then((function(r){e.handleFlushResult(r,t)})):this.handleFlushResult(n,t)}},e.handleFlushResult=function(t,e){var r=this;t.forEach((function(t){r.handleTransmuxComplete(t)})),this.onFlush(e)},e.onWorkerMessage=function(t){var e=t.data,r=this.hls;switch(e.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(e.data);break;case"flush":this.onFlush(e.data);break;default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,r.trigger(e.event,e.data)}},e.configureTransmuxer=function(t){var e=this.worker,r=this.transmuxer;e?e.postMessage({cmd:"configure",config:t}):r&&r.configure(t)},e.handleTransmuxComplete=function(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)},t}()},"./src/demux/transmuxer-worker.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return h}));var r=i(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),o=i(/*! ../utils/logger */"./src/utils/logger.ts"),a=i(/*! ../errors */"./src/errors.ts"),l=i(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=i(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function t(t,e,i,l){var h=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=t,this.id=e,this.onTransmuxComplete=i,this.onFlush=l;var d=t.config,f=function(e,i){(i=i||{}).frag=h.frag,i.id=h.id,t.trigger(e,i)};this.observer=new c.EventEmitter,this.observer.on(n.Events.FRAG_DECRYPTED,f),this.observer.on(n.Events.ERROR,f);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},g=navigator.vendor;if(d.enableWorker&&"undefined"!=typeof Worker){var m;o.logger.log("demuxing in webworker");try{m=this.worker=r(/*! ../demux/transmuxer-worker.ts */"./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),m.addEventListener("message",this.onwmsg),m.onerror=function(e){t.trigger(n.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(e.message+" ("+e.filename+":"+e.lineno+")")})},m.postMessage({cmd:"init",typeSupported:p,vendor:g,id:e,config:JSON.stringify(d)})}catch(t){o.logger.warn("Error in worker:",t),o.logger.error("Error while initializing DemuxerWorker, fallback to inline"),m&&self.URL.revokeObjectURL(m.objectURL),this.transmuxer=new s.default(this.observer,p,d,g,e),this.worker=null}}else this.transmuxer=new s.default(this.observer,p,d,g,e)}var e=t.prototype;return e.destroy=function(){var t=this.worker;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.worker=null;else{var e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}var i=this.observer;i&&i.removeAllListeners(),this.observer=null},e.push=function(t,e,i,r,n,a,l,c,u,h){var d=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,g=a?a.start:n.start,m=n.decryptdata,v=this.frag,y=!(v&&n.cc===v.cc),b=!(v&&u.level===v.level),x=v?u.sn-v.sn:-1,S=this.part?u.part-this.part.index:1,C=!b&&(1===x||0===x&&1===S),w=self.performance.now();(b||x||0===n.stats.parsing.start)&&(n.stats.parsing.start=w),!a||!S&&C||(a.stats.parsing.start=w);var k=new s.TransmuxState(y,C,c,b,g);if(!C||y){o.logger.log("[transmuxer-interface, "+n.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+y+"\n trackSwitch: "+b+"\n contiguous: "+C+"\n accurateTimeOffset: "+c+"\n timeOffset: "+g);var E=new s.TransmuxConfig(i,r,e,l,h);this.configureTransmuxer(E)}if(this.frag=n,this.part=a,p)p.postMessage({cmd:"demux",data:t,decryptdata:m,chunkMeta:u,state:k},t instanceof ArrayBuffer?[t]:[]);else if(f){var T=f.push(t,m,u,k);Object(s.isPromise)(T)?T.then((function(t){d.handleTransmuxComplete(t)})):this.handleTransmuxComplete(T)}},e.flush=function(t){var e=this;t.transmuxing.start=self.performance.now();var i=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:t});else if(i){var n=i.flush(t);Object(s.isPromise)(n)?n.then((function(i){e.handleFlushResult(i,t)})):this.handleFlushResult(n,t)}},e.handleFlushResult=function(t,e){var i=this;t.forEach((function(t){i.handleTransmuxComplete(t)})),this.onFlush(e)},e.onWorkerMessage=function(t){var e=t.data,i=this.hls;switch(e.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(e.data);break;case"flush":this.onFlush(e.data);break;default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,i.trigger(e.event,e.data)}},e.configureTransmuxer=function(t){var e=this.worker,i=this.transmuxer;e?e.postMessage({cmd:"configure",config:t}):i&&i.configure(t)},e.handleTransmuxComplete=function(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)},t}()},"./src/demux/transmuxer-worker.ts": /*!****************************************!*\ !*** ./src/demux/transmuxer-worker.ts ***! \****************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var i=r(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=r(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function a(t){var e=new o.EventEmitter,r=function(e,r){t.postMessage({event:e,data:r})};e.on(n.Events.FRAG_DECRYPTED,r),e.on(n.Events.ERROR,r),t.addEventListener("message",(function(n){var o=n.data;switch(o.cmd){case"init":var a=JSON.parse(o.config);t.transmuxer=new i.default(e,o.typeSupported,a,o.vendor,o.id),Object(s.enableLogs)(a.debug),r("init",null);break;case"configure":t.transmuxer.configure(o.config);break;case"demux":var c=t.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(i.isPromise)(c)?c.then((function(e){l(t,e)})):l(t,c);break;case"flush":var h=o.chunkMeta,d=t.transmuxer.flush(h);Object(i.isPromise)(d)?d.then((function(e){u(t,e,h)})):u(t,d,h)}}))}function l(t,e){if((r=e.remuxResult).audio||r.video||r.text||r.id3||r.initSegment){var r,i=[],n=e.remuxResult,s=n.audio,o=n.video;s&&c(i,s),o&&c(i,o),t.postMessage({event:"transmuxComplete",data:e},i)}}function c(t,e){e.data1&&t.push(e.data1.buffer),e.data2&&t.push(e.data2.buffer)}function u(t,e,r){e.forEach((function(e){l(t,e)})),t.postMessage({event:"flush",data:r})}},"./src/demux/transmuxer.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return a}));var r=i(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts"),o=i(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function a(t){var e=new o.EventEmitter,i=function(e,i){t.postMessage({event:e,data:i})};e.on(n.Events.FRAG_DECRYPTED,i),e.on(n.Events.ERROR,i),t.addEventListener("message",(function(n){var o=n.data;switch(o.cmd){case"init":var a=JSON.parse(o.config);t.transmuxer=new r.default(e,o.typeSupported,a,o.vendor,o.id),Object(s.enableLogs)(a.debug),i("init",null);break;case"configure":t.transmuxer.configure(o.config);break;case"demux":var c=t.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(r.isPromise)(c)?c.then((function(e){l(t,e)})):l(t,c);break;case"flush":var h=o.chunkMeta,d=t.transmuxer.flush(h);Object(r.isPromise)(d)?d.then((function(e){u(t,e,h)})):u(t,d,h)}}))}function l(t,e){if((i=e.remuxResult).audio||i.video||i.text||i.id3||i.initSegment){var i,r=[],n=e.remuxResult,s=n.audio,o=n.video;s&&c(r,s),o&&c(r,o),t.postMessage({event:"transmuxComplete",data:e},r)}}function c(t,e){e.data1&&t.push(e.data1.buffer),e.data2&&t.push(e.data2.buffer)}function u(t,e,i){e.forEach((function(e){l(t,e)})),t.postMessage({event:"flush",data:i})}},"./src/demux/transmuxer.ts": /*!*********************************!*\ !*** ./src/demux/transmuxer.ts ***! \*********************************/ -/*! exports provided: default, isPromise, TransmuxConfig, TransmuxState */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return y})),r.d(e,"isPromise",(function(){return x})),r.d(e,"TransmuxConfig",(function(){return S})),r.d(e,"TransmuxState",(function(){return C}));var i,n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../errors */"./src/errors.ts"),o=r(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),a=r(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.ts"),l=r(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.ts"),c=r(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.ts"),u=r(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.ts"),h=r(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),d=r(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.ts"),f=r(/*! ./chunk-cache */"./src/demux/chunk-cache.ts"),p=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),g=r(/*! ../utils/logger */"./src/utils/logger.ts");try{i=self.performance.now.bind(self.performance)}catch(t){g.logger.debug("Unable to use Performance API on this environment"),i=self.Date.now}var m=[{demux:c.default,remux:h.default},{demux:l.default,remux:d.default},{demux:a.default,remux:h.default},{demux:u.default,remux:h.default}],v=1024;m.forEach((function(t){var e=t.demux;v=Math.max(v,e.minProbeByteLength)}));var y=function(){function t(t,e,r,i,n){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 f.default,this.observer=t,this.typeSupported=e,this.config=r,this.vendor=i,this.id=n}var e=t.prototype;return e.configure=function(t){this.transmuxConfig=t,this.decrypter&&this.decrypter.reset()},e.push=function(t,e,r,n){var s=this,o=r.transmuxing;o.executeStart=i();var a=new Uint8Array(t),l=this.cache,c=this.config,u=this.currentTransmuxState,h=this.transmuxConfig;n&&(this.currentTransmuxState=n);var d=function(t,e){var r=null;return t.byteLength>0&&null!=e&&null!=e.key&&null!==e.iv&&null!=e.method&&(r=e),r}(a,e);if(d&&"AES-128"===d.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(a,d.key.buffer,d.iv.buffer).then((function(t){var e=s.push(t,null,r);return s.decryptionPromise=null,e})),this.decryptionPromise;var g=f.softwareDecrypt(a,d.key.buffer,d.iv.buffer);if(!g)return o.executeEnd=i(),b(r);a=new Uint8Array(g)}var m=n||u,v=m.contiguous,y=m.discontinuity,x=m.trackSwitch,S=m.accurateTimeOffset,C=m.timeOffset,w=h.audioCodec,k=h.videoCodec,E=h.defaultInitPts,T=h.duration,L=h.initSegmentData;if((y||x)&&this.resetInitSegment(L,w,k,T),y&&this.resetInitialTimestamp(E),v||this.resetContiguity(),this.needsProbing(a,y,x)){if(l.dataLength){var A=l.flush();a=Object(p.appendUint8Array)(A,a)}this.configureTransmuxer(a,h)}var D=this.transmux(a,d,C,S,r),R=this.currentTransmuxState;return R.contiguous=!0,R.discontinuity=!1,R.trackSwitch=!1,o.executeEnd=i(),D},e.flush=function(t){var e=this,r=t.transmuxing;r.executeStart=i();var o=this.decrypter,a=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return e.flush(t)}));var u=[],h=l.timeOffset;if(o){var d=o.flush();d&&u.push(this.push(d,null,t))}var f=a.dataLength;a.reset();var p=this.demuxer,g=this.remuxer;if(!p||!g)return f>=v&&this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),r.executeEnd=i(),[b(t)];var m=p.flush(h);return x(m)?m.then((function(r){return e.flushRemux(u,r,t),u})):(this.flushRemux(u,m,t),u)},e.flushRemux=function(t,e,r){var n=e.audioTrack,s=e.avcTrack,o=e.id3Track,a=e.textTrack,l=this.currentTransmuxState,c=l.accurateTimeOffset,u=l.timeOffset;g.logger.log("[transmuxer.ts]: Flushed fragment "+r.sn+(r.part>-1?" p: "+r.part:"")+" of level "+r.level);var h=this.remuxer.remux(n,s,o,a,u,c,!0,this.id);t.push({remuxResult:h,chunkMeta:r}),r.transmuxing.executeEnd=i()},e.resetInitialTimestamp=function(t){var e=this.demuxer,r=this.remuxer;e&&r&&(e.resetTimeStamp(t),r.resetTimeStamp(t))},e.resetContiguity=function(){var t=this.demuxer,e=this.remuxer;t&&e&&(t.resetContiguity(),e.resetNextTimestamp())},e.resetInitSegment=function(t,e,r,i){var n=this.demuxer,s=this.remuxer;n&&s&&(n.resetInitSegment(e,r,i),s.resetInitSegment(t,e,r))},e.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},e.transmux=function(t,e,r,i,n){return e&&"SAMPLE-AES"===e.method?this.transmuxSampleAes(t,e,r,i,n):this.transmuxUnencrypted(t,r,i,n)},e.transmuxUnencrypted=function(t,e,r,i){var n=this.demuxer.demux(t,e,!1,!this.config.progressive),s=n.audioTrack,o=n.avcTrack,a=n.id3Track,l=n.textTrack;return{remuxResult:this.remuxer.remux(s,o,a,l,e,r,!1,this.id),chunkMeta:i}},e.transmuxSampleAes=function(t,e,r,i,n){var s=this;return this.demuxer.demuxSampleAes(t,e,r).then((function(t){return{remuxResult:s.remuxer.remux(t.audioTrack,t.avcTrack,t.id3Track,t.textTrack,r,i,!1,s.id),chunkMeta:n}}))},e.configureTransmuxer=function(t,e){for(var r,i=this.config,n=this.observer,s=this.typeSupported,o=this.vendor,a=e.audioCodec,c=e.defaultInitPts,u=e.duration,h=e.initSegmentData,f=e.videoCodec,p=0,v=m.length;p0&&null!=e&&null!=e.key&&null!==e.iv&&null!=e.method&&(i=e),i}(a,e);if(d&&"AES-128"===d.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(a,d.key.buffer,d.iv.buffer).then((function(t){var e=s.push(t,null,i);return s.decryptionPromise=null,e})),this.decryptionPromise;var g=f.softwareDecrypt(a,d.key.buffer,d.iv.buffer);if(!g)return o.executeEnd=r(),b(i);a=new Uint8Array(g)}var m=n||u,v=m.contiguous,y=m.discontinuity,x=m.trackSwitch,S=m.accurateTimeOffset,C=m.timeOffset,w=h.audioCodec,k=h.videoCodec,E=h.defaultInitPts,T=h.duration,L=h.initSegmentData;if((y||x)&&this.resetInitSegment(L,w,k,T),y&&this.resetInitialTimestamp(E),v||this.resetContiguity(),this.needsProbing(a,y,x)){if(l.dataLength){var A=l.flush();a=Object(p.appendUint8Array)(A,a)}this.configureTransmuxer(a,h)}var D=this.transmux(a,d,C,S,i),R=this.currentTransmuxState;return R.contiguous=!0,R.discontinuity=!1,R.trackSwitch=!1,o.executeEnd=r(),D},e.flush=function(t){var e=this,i=t.transmuxing;i.executeStart=r();var o=this.decrypter,a=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return e.flush(t)}));var u=[],h=l.timeOffset;if(o){var d=o.flush();d&&u.push(this.push(d,null,t))}var f=a.dataLength;a.reset();var p=this.demuxer,g=this.remuxer;if(!p||!g)return f>=v&&this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),i.executeEnd=r(),[b(t)];var m=p.flush(h);return x(m)?m.then((function(i){return e.flushRemux(u,i,t),u})):(this.flushRemux(u,m,t),u)},e.flushRemux=function(t,e,i){var n=e.audioTrack,s=e.avcTrack,o=e.id3Track,a=e.textTrack,l=this.currentTransmuxState,c=l.accurateTimeOffset,u=l.timeOffset;g.logger.log("[transmuxer.ts]: Flushed fragment "+i.sn+(i.part>-1?" p: "+i.part:"")+" of level "+i.level);var h=this.remuxer.remux(n,s,o,a,u,c,!0,this.id);t.push({remuxResult:h,chunkMeta:i}),i.transmuxing.executeEnd=r()},e.resetInitialTimestamp=function(t){var e=this.demuxer,i=this.remuxer;e&&i&&(e.resetTimeStamp(t),i.resetTimeStamp(t))},e.resetContiguity=function(){var t=this.demuxer,e=this.remuxer;t&&e&&(t.resetContiguity(),e.resetNextTimestamp())},e.resetInitSegment=function(t,e,i,r){var n=this.demuxer,s=this.remuxer;n&&s&&(n.resetInitSegment(e,i,r),s.resetInitSegment(t,e,i))},e.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},e.transmux=function(t,e,i,r,n){return e&&"SAMPLE-AES"===e.method?this.transmuxSampleAes(t,e,i,r,n):this.transmuxUnencrypted(t,i,r,n)},e.transmuxUnencrypted=function(t,e,i,r){var n=this.demuxer.demux(t,e,!1,!this.config.progressive),s=n.audioTrack,o=n.avcTrack,a=n.id3Track,l=n.textTrack;return{remuxResult:this.remuxer.remux(s,o,a,l,e,i,!1,this.id),chunkMeta:r}},e.transmuxSampleAes=function(t,e,i,r,n){var s=this;return this.demuxer.demuxSampleAes(t,e,i).then((function(t){return{remuxResult:s.remuxer.remux(t.audioTrack,t.avcTrack,t.id3Track,t.textTrack,i,r,!1,s.id),chunkMeta:n}}))},e.configureTransmuxer=function(t,e){for(var i,r=this.config,n=this.observer,s=this.typeSupported,o=this.vendor,a=e.audioCodec,c=e.defaultInitPts,u=e.duration,h=e.initSegmentData,f=e.videoCodec,p=0,v=m.length;p>4>1){if((R=L+5+e[L+4])===L+188)continue}else R=L+4;switch(D){case f:A&&(p&&(s=v(p))&&this.parseAVCPES(s,!1),p={data:[],size:0}),p&&(p.data.push(e.subarray(R,L+188)),p.size+=L+188-R);break;case y:A&&(x&&(s=v(x))&&(a.isAAC?this.parseAACPES(s):this.parseMPEGPES(s)),x={data:[],size:0}),x&&(x.data.push(e.subarray(R,L+188)),x.size+=L+188-R);break;case b:A&&(S&&(s=v(S))&&this.parseID3PES(s),S={data:[],size:0}),S&&(S.data.push(e.subarray(R,L+188)),S.size+=L+188-R);break;case 0:A&&(R+=e[R]+1),k=this._pmtId=g(e,R);break;case k:A&&(R+=e[R]+1);var O=m(e,R,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,i);(f=O.avc)>0&&(o.pid=f),(y=O.audio)>0&&(a.pid=y,a.isAAC=O.isAAC),(b=O.id3)>0&&(d.pid=b),C&&!w&&(u.logger.log("reparse from beginning"),C=!1,L=T-188),w=this.pmtParsed=!0;break;case 17:case 8191:break;default:C=!0}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});o.pesData=p,a.pesData=x,d.pesData=S;var _={audioTrack:a,avcTrack:o,id3Track:d,textTrack:this._txtTrack};return n&&this.extractRemainingSamples(_),_},e.flush=function(){var t,e=this.remainderData;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t},e.extractRemainingSamples=function(t){var e,r=t.audioTrack,i=t.avcTrack,n=t.id3Track,s=i.pesData,o=r.pesData,a=n.pesData;s&&(e=v(s))?(this.parseAVCPES(e,!0),i.pesData=null):i.pesData=s,o&&(e=v(o))?(r.isAAC?this.parseAACPES(e):this.parseMPEGPES(e),r.pesData=null):(null!=o&&o.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),r.pesData=o),a&&(e=v(a))?(this.parseID3PES(e),n.pesData=null):n.pesData=a},e.demuxSampleAes=function(t,e,r){var i=this.demux(t,r,!0,!this.config.progressive),n=this.sampleAes=new a.default(this.observer,this.config,e);return this.decrypt(i,n)},e.decrypt=function(t,e){return new Promise((function(r){var i=t.audioTrack,n=t.avcTrack;i.samples&&i.isAAC?e.decryptAacSamples(i.samples,0,(function(){n.samples?e.decryptAvcSamples(n.samples,0,0,(function(){r(t)})):r(t)})):n.samples&&e.decryptAvcSamples(n.samples,0,0,(function(){r(t)}))}))},e.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},e.parseAVCPES=function(t,e){var r,i=this,n=this._avcTrack,a=this.parseAVCNALu(t.data),l=this.avcSample,c=!1;t.data=null,l&&a.length&&!n.audFound&&(y(l,n),l=this.avcSample=p(!1,t.pts,t.dts,"")),a.forEach((function(e){switch(e.type){case 1:r=!0,l||(l=i.avcSample=p(!0,t.pts,t.dts,"")),l.frame=!0;var a=e.data;if(c&&a.length>4){var u=new s.default(a).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(l.key=!0)}break;case 5:r=!0,l||(l=i.avcSample=p(!0,t.pts,t.dts,"")),l.key=!0,l.frame=!0;break;case 6:r=!0;var h=new s.default(x(e.data));h.readUByte();for(var d=0,f=0,g=!1,m=0;!g&&h.bytesAvailable>1;){d=0;do{d+=m=h.readUByte()}while(255===m);f=0;do{f+=m=h.readUByte()}while(255===m);if(4===d&&0!==h.bytesAvailable){if(g=!0,181===h.readUByte()&&49===h.readUShort()&&1195456820===h.readUInt()&&3===h.readUByte()){for(var v=h.readUByte(),S=31&v,C=[v,h.readUByte()],w=0;w16){for(var k=[],E=0;E<16;E++)k.push(h.readUByte().toString(16)),3!==E&&5!==E&&7!==E&&9!==E||k.push("-");for(var T=f-16,L=new Uint8Array(T),A=0;A=0){var h={data:t.subarray(c,l-s-1),type:u};a.push(h)}else{var d=this.getLastNalUnit();if(d&&(o&&l<=4-o&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-o)),(r=l-s-1)>0)){var f=new Uint8Array(d.data.byteLength+r);f.set(d.data,0),f.set(t.subarray(0,r),d.data.byteLength),d.data=f,d.state=0}}l=0&&s>=0){var p={data:t.subarray(c,i),type:u,state:s};a.push(p)}if(0===a.length){var g=this.getLastNalUnit();if(g){var m=new Uint8Array(g.data.byteLength+t.byteLength);m.set(g.data,0),m.set(t,g.data.byteLength),g.data=m}}return n.naluState=s,a},e.parseAACPES=function(t){var e,r,n,s,o,a=0,c=this._audioTrack,d=this.aacOverFlow,f=t.data;if(d){this.aacOverFlow=null;var p=d.sample.unit.byteLength,g=Math.min(d.missing,p),m=p-g;d.sample.unit.set(f.subarray(0,g),m),c.samples.push(d.sample),a=d.missing}for(e=a,r=f.length;e1;){var l=new Uint8Array(a[0].length+a[1].length);l.set(a[0]),l.set(a[1],a[0].length),a[0]=l,a.splice(1,1)}if(1===((e=a[0])[0]<<16)+(e[1]<<8)+e[2]){if((r=(e[4]<<8)+e[5])&&r>t.size-6)return null;var c=e[7];192&c&&(n=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&c?n-(s=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(u.logger.warn(Math.round((n-s)/9e4)+"s delta between PTS and DTS, align them"),n=s):s=n);var h=(i=e[8])+9;if(t.size<=h)return null;t.size-=h;for(var d=new Uint8Array(t.size),f=0,p=a.length;fg){h-=g;continue}e=e.subarray(h),g-=h,h=0}d.set(e,o),o+=g}return r&&(r-=i+3),{data:d,pts:n,dts:s,len:r}}return null}function y(t,e){if(t.units.length&&t.frame){if(void 0===t.pts){var r=e.samples,i=r.length;if(!i)return void e.dropped++;var n=r[i-1];t.pts=n.pts,t.dts=n.dts}e.samples.push(t)}t.debug.length&&u.logger.log(t.pts+"/"+t.dts+":"+t.debug)}function b(t,e){var r=t.length;if(r>0){if(e.pts>=t[r-1].pts)t.push(e);else for(var i=r-1;i>=0;i--)if(e.pts>4>1){if((R=L+5+e[L+4])===L+188)continue}else R=L+4;switch(D){case f:A&&(p&&(s=v(p))&&this.parseAVCPES(s,!1),p={data:[],size:0}),p&&(p.data.push(e.subarray(R,L+188)),p.size+=L+188-R);break;case y:A&&(x&&(s=v(x))&&(a.isAAC?this.parseAACPES(s):this.parseMPEGPES(s)),x={data:[],size:0}),x&&(x.data.push(e.subarray(R,L+188)),x.size+=L+188-R);break;case b:A&&(S&&(s=v(S))&&this.parseID3PES(s),S={data:[],size:0}),S&&(S.data.push(e.subarray(R,L+188)),S.size+=L+188-R);break;case 0:A&&(R+=e[R]+1),k=this._pmtId=g(e,R);break;case k:A&&(R+=e[R]+1);var O=m(e,R,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,r);(f=O.avc)>0&&(o.pid=f),(y=O.audio)>0&&(a.pid=y,a.isAAC=O.isAAC),(b=O.id3)>0&&(d.pid=b),C&&!w&&(u.logger.log("reparse from beginning"),C=!1,L=T-188),w=this.pmtParsed=!0;break;case 17:case 8191:break;default:C=!0}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});o.pesData=p,a.pesData=x,d.pesData=S;var _={audioTrack:a,avcTrack:o,id3Track:d,textTrack:this._txtTrack};return n&&this.extractRemainingSamples(_),_},e.flush=function(){var t,e=this.remainderData;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t},e.extractRemainingSamples=function(t){var e,i=t.audioTrack,r=t.avcTrack,n=t.id3Track,s=r.pesData,o=i.pesData,a=n.pesData;s&&(e=v(s))?(this.parseAVCPES(e,!0),r.pesData=null):r.pesData=s,o&&(e=v(o))?(i.isAAC?this.parseAACPES(e):this.parseMPEGPES(e),i.pesData=null):(null!=o&&o.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),i.pesData=o),a&&(e=v(a))?(this.parseID3PES(e),n.pesData=null):n.pesData=a},e.demuxSampleAes=function(t,e,i){var r=this.demux(t,i,!0,!this.config.progressive),n=this.sampleAes=new a.default(this.observer,this.config,e);return this.decrypt(r,n)},e.decrypt=function(t,e){return new Promise((function(i){var r=t.audioTrack,n=t.avcTrack;r.samples&&r.isAAC?e.decryptAacSamples(r.samples,0,(function(){n.samples?e.decryptAvcSamples(n.samples,0,0,(function(){i(t)})):i(t)})):n.samples&&e.decryptAvcSamples(n.samples,0,0,(function(){i(t)}))}))},e.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},e.parseAVCPES=function(t,e){var i,r=this,n=this._avcTrack,a=this.parseAVCNALu(t.data),l=this.avcSample,c=!1;t.data=null,l&&a.length&&!n.audFound&&(y(l,n),l=this.avcSample=p(!1,t.pts,t.dts,"")),a.forEach((function(e){switch(e.type){case 1:i=!0,l||(l=r.avcSample=p(!0,t.pts,t.dts,"")),l.frame=!0;var a=e.data;if(c&&a.length>4){var u=new s.default(a).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(l.key=!0)}break;case 5:i=!0,l||(l=r.avcSample=p(!0,t.pts,t.dts,"")),l.key=!0,l.frame=!0;break;case 6:i=!0;var h=new s.default(x(e.data));h.readUByte();for(var d=0,f=0,g=!1,m=0;!g&&h.bytesAvailable>1;){d=0;do{d+=m=h.readUByte()}while(255===m);f=0;do{f+=m=h.readUByte()}while(255===m);if(4===d&&0!==h.bytesAvailable){if(g=!0,181===h.readUByte()&&49===h.readUShort()&&1195456820===h.readUInt()&&3===h.readUByte()){for(var v=h.readUByte(),S=31&v,C=[v,h.readUByte()],w=0;w16){for(var k=[],E=0;E<16;E++)k.push(h.readUByte().toString(16)),3!==E&&5!==E&&7!==E&&9!==E||k.push("-");for(var T=f-16,L=new Uint8Array(T),A=0;A=0){var h={data:t.subarray(c,l-s-1),type:u};a.push(h)}else{var d=this.getLastNalUnit();if(d&&(o&&l<=4-o&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-o)),(i=l-s-1)>0)){var f=new Uint8Array(d.data.byteLength+i);f.set(d.data,0),f.set(t.subarray(0,i),d.data.byteLength),d.data=f,d.state=0}}l=0&&s>=0){var p={data:t.subarray(c,r),type:u,state:s};a.push(p)}if(0===a.length){var g=this.getLastNalUnit();if(g){var m=new Uint8Array(g.data.byteLength+t.byteLength);m.set(g.data,0),m.set(t,g.data.byteLength),g.data=m}}return n.naluState=s,a},e.parseAACPES=function(t){var e,i,n,s,o,a=0,c=this._audioTrack,d=this.aacOverFlow,f=t.data;if(d){this.aacOverFlow=null;var p=d.sample.unit.byteLength,g=Math.min(d.missing,p),m=p-g;d.sample.unit.set(f.subarray(0,g),m),c.samples.push(d.sample),a=d.missing}for(e=a,i=f.length;e1;){var l=new Uint8Array(a[0].length+a[1].length);l.set(a[0]),l.set(a[1],a[0].length),a[0]=l,a.splice(1,1)}if(1===((e=a[0])[0]<<16)+(e[1]<<8)+e[2]){if((i=(e[4]<<8)+e[5])&&i>t.size-6)return null;var c=e[7];192&c&&(n=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&c?n-(s=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(u.logger.warn(Math.round((n-s)/9e4)+"s delta between PTS and DTS, align them"),n=s):s=n);var h=(r=e[8])+9;if(t.size<=h)return null;t.size-=h;for(var d=new Uint8Array(t.size),f=0,p=a.length;fg){h-=g;continue}e=e.subarray(h),g-=h,h=0}d.set(e,o),o+=g}return i&&(i-=r+3),{data:d,pts:n,dts:s,len:i}}return null}function y(t,e){if(t.units.length&&t.frame){if(void 0===t.pts){var i=e.samples,r=i.length;if(!r)return void e.dropped++;var n=i[r-1];t.pts=n.pts,t.dts=n.dts}e.samples.push(t)}t.debug.length&&u.logger.log(t.pts+"/"+t.dts+":"+t.debug)}function b(t,e){var i=t.length;if(i>0){if(e.pts>=t[i-1].pts)t.push(e);else for(var r=i-1;r>=0;r--)if(e.ptse)return i;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,e=this.autoLevelCapping;return-1===e&&t&&t.length?t.length-1:e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(t){this.config.lowLatencyMode=t}},{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}}])&&v(e.prototype,r),y&&v(e,y),t}();y.defaultConfig=void 0},"./src/is-supported.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return y}));var r=i(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),n=i(/*! ./loader/playlist-loader */"./src/loader/playlist-loader.ts"),s=i(/*! ./loader/key-loader */"./src/loader/key-loader.ts"),o=i(/*! ./controller/id3-track-controller */"./src/controller/id3-track-controller.ts"),a=i(/*! ./controller/latency-controller */"./src/controller/latency-controller.ts"),l=i(/*! ./controller/level-controller */"./src/controller/level-controller.ts"),c=i(/*! ./controller/fragment-tracker */"./src/controller/fragment-tracker.ts"),u=i(/*! ./controller/stream-controller */"./src/controller/stream-controller.ts"),h=i(/*! ./is-supported */"./src/is-supported.ts"),d=i(/*! ./utils/logger */"./src/utils/logger.ts"),f=i(/*! ./config */"./src/config.ts"),p=i(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),g=i(/*! ./events */"./src/events.ts"),m=i(/*! ./errors */"./src/errors.ts");function v(t,e){for(var i=0;ie)return r;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,e=this.autoLevelCapping;return-1===e&&t&&t.length?t.length-1:e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(t){this.config.lowLatencyMode=t}},{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}}])&&v(e.prototype,i),y&&v(e,y),t}();y.defaultConfig=void 0},"./src/is-supported.ts": /*!*****************************!*\ !*** ./src/is-supported.ts ***! \*****************************/ -/*! exports provided: isSupported, changeTypeSupported */function(t,e,r){"use strict";r.r(e),r.d(e,"isSupported",(function(){return s})),r.d(e,"changeTypeSupported",(function(){return o}));var i=r(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function n(){return self.SourceBuffer||self.WebKitSourceBuffer}function s(){var t=Object(i.getMediaSource)();if(!t)return!1;var e=n(),r=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),s=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!r&&!!s}function o(){var t,e=n();return"function"==typeof(null==e||null===(t=e.prototype)||void 0===t?void 0:t.changeType)}},"./src/loader/fragment-loader.ts": +/*! exports provided: isSupported, changeTypeSupported */function(t,e,i){"use strict";i.r(e),i.d(e,"isSupported",(function(){return s})),i.d(e,"changeTypeSupported",(function(){return o}));var r=i(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function n(){return self.SourceBuffer||self.WebKitSourceBuffer}function s(){var t=Object(r.getMediaSource)();if(!t)return!1;var e=n(),i=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),s=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!i&&!!s}function o(){var t,e=n();return"function"==typeof(null==e||null===(t=e.prototype)||void 0===t?void 0:t.changeType)}},"./src/loader/fragment-loader.ts": /*!***************************************!*\ !*** ./src/loader/fragment-loader.ts ***! \***************************************/ -/*! exports provided: default, LoadError */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return h})),r.d(e,"LoadError",(function(){return f}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../errors */"./src/errors.ts");function s(t){var e="function"==typeof Map?new Map:void 0;return(s=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return o(t,arguments,c(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),l(i,t)})(t)}function o(t,e,r){return(o=a()?Reflect.construct:function(t,e,r){var i=[null];i.push.apply(i,e);var n=new(Function.bind.apply(t,i));return r&&l(n,r.prototype),n}).apply(null,arguments)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var u=Math.pow(2,17),h=function(){function t(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}var e=t.prototype;return e.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},e.abort=function(){this.loader&&this.loader.abort()},e.load=function(t,e){var r=this,i=t.url;if(!i)return Promise.reject(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(i?"part list":"url")));this.abort();var s=this.config,o=s.fLoader,a=s.loader;return new Promise((function(i,l){r.loader&&r.loader.destroy();var c=r.loader=t.loader=o?new o(s):new a(s),h=d(t),p={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=c.stats,c.load(h,p,{onSuccess:function(e,n,s,o){r.resetLoader(t,c),i({frag:t,part:null,payload:e.data,networkDetails:o})},onError:function(e,i,s){r.resetLoader(t,c),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:e,networkDetails:s}))},onAbort:function(e,i,s){r.resetLoader(t,c),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:s}))},onTimeout:function(e,i,s){r.resetLoader(t,c),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:s}))},onProgress:function(r,i,n,s){e&&e({frag:t,part:null,payload:n,networkDetails:s})}})}))},e.loadPart=function(t,e,r){var i=this;this.abort();var s=this.config,o=s.fLoader,a=s.loader;return new Promise((function(l,c){i.loader&&i.loader.destroy();var h=i.loader=t.loader=o?new o(s):new a(s),p=d(t,e),g={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=h.stats,h.load(p,g,{onSuccess:function(n,s,o,a){i.resetLoader(t,h),i.updateStatsFromPart(t,e);var c={frag:t,part:e,payload:n.data,networkDetails:a};r(c),l(c)},onError:function(r,s,o){i.resetLoader(t,h),c(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:e,response:r,networkDetails:o}))},onAbort:function(r,s,o){t.stats.aborted=e.stats.aborted,i.resetLoader(t,h),c(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:e,networkDetails:o}))},onTimeout:function(r,s,o){i.resetLoader(t,h),c(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:e,networkDetails:o}))}})}))},e.updateStatsFromPart=function(t,e){var r=t.stats,i=e.stats,n=i.total;if(r.loaded+=i.loaded,n){var s=Math.round(t.duration/e.duration),o=Math.min(Math.round(r.loaded/n),s),a=(s-o)*Math.round(r.loaded/o);r.total=r.loaded+a}else r.total=Math.max(r.loaded,r.total);var l=r.loading,c=i.loading;l.start?l.first+=c.first-c.start:(l.start=c.start,l.first=c.first),l.end=c.end},e.resetLoader=function(t,e){t.loader=null,this.loader===e&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),e.destroy()},t}();function d(t,e){void 0===e&&(e=null);var r=e||t,n={frag:t,part:e,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},s=r.byteRangeStartOffset,o=r.byteRangeEndOffset;return Object(i.isFiniteNumber)(s)&&Object(i.isFiniteNumber)(o)&&(n.rangeStart=s,n.rangeEnd=o),n}var f=function(t){var e,r;function i(e){for(var r,i=arguments.length,n=new Array(i>1?i-1:0),s=1;s1?r-1:0),s=1;s>8*(15-r)&255;return e},r.setDecryptDataFromLevelKey=function(t,e){var r=t;return"AES-128"===(null==t?void 0:t.method)&&t.uri&&!t.iv&&((r=a.LevelKey.fromURI(t.uri)).method=t.method,r.iv=this.createInitializationVector(e),r.keyFormat="identity"),r},r.setElementaryStreamInfo=function(t,e,r,i,n,s){void 0===s&&(s=!1);var o=this.elementaryStreams,a=o[t];a?(a.startPTS=Math.min(a.startPTS,e),a.endPTS=Math.max(a.endPTS,r),a.startDTS=Math.min(a.startDTS,i),a.endDTS=Math.max(a.endDTS,n)):o[t]={startPTS:e,endPTS:r,startDTS:i,endDTS:n,partial:s}},r.clearElementaryStreamInfo=function(){var t=this.elementaryStreams;t[i.AUDIO]=null,t[i.VIDEO]=null,t[i.AUDIOVIDEO]=null},d(e,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var t=this.sn;"number"!=typeof t&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&o.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),t=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,t)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(n.isFiniteNumber)(this.programDateTime))return null;var t=Object(n.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){var t;return!(null===(t=this.decryptdata)||void 0===t||!t.keyFormat||!this.decryptdata.uri)}}]),e}(f),g=function(t){function e(e,r,i,n,s){var o;(o=t.call(this,i)||this).fragOffset=0,o.duration=0,o.gap=!1,o.independent=!1,o.relurl=void 0,o.fragment=void 0,o.index=void 0,o.stats=new l.LoadStats,o.duration=e.decimalFloatingPoint("DURATION"),o.gap=e.bool("GAP"),o.independent=e.bool("INDEPENDENT"),o.relurl=e.enumeratedString("URI"),o.fragment=r,o.index=n;var a=e.enumeratedString("BYTERANGE");return a&&o.setByteRange(a,s),s&&(o.fragOffset=s.fragOffset+s.duration),o}return c(e,t),d(e,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var t=this.elementaryStreams;return!!(t.audio||t.video||t.audiovideo)}}]),e}(f)},"./src/loader/key-loader.ts": +/*! exports provided: ElementaryStreamTypes, BaseSegment, Fragment, Part */function(t,e,i){"use strict";i.r(e),i.d(e,"ElementaryStreamTypes",(function(){return r})),i.d(e,"BaseSegment",(function(){return f})),i.d(e,"Fragment",(function(){return p})),i.d(e,"Part",(function(){return g}));var r,n=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),s=i(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),o=i(/*! ../utils/logger */"./src/utils/logger.ts"),a=i(/*! ./level-key */"./src/loader/level-key.ts"),l=i(/*! ./load-stats */"./src/loader/load-stats.ts");function c(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t,e){for(var i=0;i>8*(15-i)&255;return e},i.setDecryptDataFromLevelKey=function(t,e){var i=t;return"AES-128"===(null==t?void 0:t.method)&&t.uri&&!t.iv&&((i=a.LevelKey.fromURI(t.uri)).method=t.method,i.iv=this.createInitializationVector(e),i.keyFormat="identity"),i},i.setElementaryStreamInfo=function(t,e,i,r,n,s){void 0===s&&(s=!1);var o=this.elementaryStreams,a=o[t];a?(a.startPTS=Math.min(a.startPTS,e),a.endPTS=Math.max(a.endPTS,i),a.startDTS=Math.min(a.startDTS,r),a.endDTS=Math.max(a.endDTS,n)):o[t]={startPTS:e,endPTS:i,startDTS:r,endDTS:n,partial:s}},i.clearElementaryStreamInfo=function(){var t=this.elementaryStreams;t[r.AUDIO]=null,t[r.VIDEO]=null,t[r.AUDIOVIDEO]=null},d(e,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var t=this.sn;"number"!=typeof t&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&o.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),t=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,t)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(n.isFiniteNumber)(this.programDateTime))return null;var t=Object(n.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){var t;return!(null===(t=this.decryptdata)||void 0===t||!t.keyFormat||!this.decryptdata.uri)}}]),e}(f),g=function(t){function e(e,i,r,n,s){var o;(o=t.call(this,r)||this).fragOffset=0,o.duration=0,o.gap=!1,o.independent=!1,o.relurl=void 0,o.fragment=void 0,o.index=void 0,o.stats=new l.LoadStats,o.duration=e.decimalFloatingPoint("DURATION"),o.gap=e.bool("GAP"),o.independent=e.bool("INDEPENDENT"),o.relurl=e.enumeratedString("URI"),o.fragment=i,o.index=n;var a=e.enumeratedString("BYTERANGE");return a&&o.setByteRange(a,s),s&&(o.fragOffset=s.fragOffset+s.duration),o}return c(e,t),d(e,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var t=this.elementaryStreams;return!!(t.audio||t.video||t.audiovideo)}}]),e}(f)},"./src/loader/key-loader.ts": /*!**********************************!*\ !*** ./src/loader/key-loader.ts ***! \**********************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return o}));var i=r(/*! ../events */"./src/events.ts"),n=r(/*! ../errors */"./src/errors.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=function(){function t(t){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){this.hls.on(i.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(i.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){for(var t in this._unregisterListeners(),this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={}},e.onKeyLoading=function(t,e){var r=e.frag,n=r.type,o=this.loaders[n];if(r.decryptdata){var a=r.decryptdata.uri;if(a!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(o&&(s.logger.warn("abort previous key loader for type:"+n),o.abort()),!a)return void s.logger.warn("key uri is falsy");var c=l.loader,u=r.loader=this.loaders[n]=new c(l);this.decrypturl=a,this.decryptkey=null;var h={url:a,frag:r,responseType:"arraybuffer"},d={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(h,d,f)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(i.Events.KEY_LOADED,{frag:r}))}else s.logger.warn("Missing decryption data on fragment in onKeyLoading")},e.loadsuccess=function(t,e,r){var n=r.frag;n.decryptdata?(this.decryptkey=n.decryptdata.key=new Uint8Array(t.data),n.loader=null,delete this.loaders[n.type],this.hls.trigger(i.Events.KEY_LOADED,{frag:n})):s.logger.error("after key load, decryptdata unset")},e.loaderror=function(t,e){var r=e.frag,s=r.loader;s&&s.abort(),delete this.loaders[r.type],this.hls.trigger(i.Events.ERROR,{type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},e.loadtimeout=function(t,e){var r=e.frag,s=r.loader;s&&s.abort(),delete this.loaders[r.type],this.hls.trigger(i.Events.ERROR,{type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},t}()},"./src/loader/level-details.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return o}));var r=i(/*! ../events */"./src/events.ts"),n=i(/*! ../errors */"./src/errors.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts"),o=function(){function t(t){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){this.hls.on(r.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(r.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){for(var t in this._unregisterListeners(),this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={}},e.onKeyLoading=function(t,e){var i=e.frag,n=i.type,o=this.loaders[n];if(i.decryptdata){var a=i.decryptdata.uri;if(a!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(o&&(s.logger.warn("abort previous key loader for type:"+n),o.abort()),!a)return void s.logger.warn("key uri is falsy");var c=l.loader,u=i.loader=this.loaders[n]=new c(l);this.decrypturl=a,this.decryptkey=null;var h={url:a,frag:i,responseType:"arraybuffer"},d={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(h,d,f)}else this.decryptkey&&(i.decryptdata.key=this.decryptkey,this.hls.trigger(r.Events.KEY_LOADED,{frag:i}))}else s.logger.warn("Missing decryption data on fragment in onKeyLoading")},e.loadsuccess=function(t,e,i){var n=i.frag;n.decryptdata?(this.decryptkey=n.decryptdata.key=new Uint8Array(t.data),n.loader=null,delete this.loaders[n.type],this.hls.trigger(r.Events.KEY_LOADED,{frag:n})):s.logger.error("after key load, decryptdata unset")},e.loaderror=function(t,e){var i=e.frag,s=i.loader;s&&s.abort(),delete this.loaders[i.type],this.hls.trigger(r.Events.ERROR,{type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:i,response:t})},e.loadtimeout=function(t,e){var i=e.frag,s=i.loader;s&&s.abort(),delete this.loaders[i.type],this.hls.trigger(r.Events.ERROR,{type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:i})},t}()},"./src/loader/level-details.ts": /*!*************************************!*\ !*** ./src/loader/level-details.ts ***! \*************************************/ -/*! exports provided: LevelDetails */function(t,e,r){"use strict";r.r(e),r.d(e,"LevelDetails",(function(){return s}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function n(t,e){for(var r=0;rt.endSN||e>0||0===e&&r>0,this.updated||this.advanced?this.misses=Math.floor(.6*t.misses):this.misses=t.misses+1,this.availabilityDelay=t.availabilityDelay},e=t,(r=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(i.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var t=this.driftEndTime-this.driftStartTime;return t>0?1e3*(this.driftEnd-this.driftStart)/t:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var t;return null!==(t=this.fragments)&&void 0!==t&&t.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 t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&n(e.prototype,r),s&&n(e,s),t}()},"./src/loader/level-key.ts": +/*! exports provided: LevelDetails */function(t,e,i){"use strict";i.r(e),i.d(e,"LevelDetails",(function(){return s}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function n(t,e){for(var i=0;it.endSN||e>0||0===e&&i>0,this.updated||this.advanced?this.misses=Math.floor(.6*t.misses):this.misses=t.misses+1,this.availabilityDelay=t.availabilityDelay},e=t,(i=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(r.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var t=this.driftEndTime-this.driftStartTime;return t>0?1e3*(this.driftEnd-this.driftStart)/t:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var t;return null!==(t=this.fragments)&&void 0!==t&&t.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 t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&n(e.prototype,i),s&&n(e,s),t}()},"./src/loader/level-key.ts": /*!*********************************!*\ !*** ./src/loader/level-key.ts ***! \*********************************/ -/*! exports provided: LevelKey */function(t,e,r){"use strict";r.r(e),r.d(e,"LevelKey",(function(){return s}));var i=r(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js");function n(t,e){for(var r=0;r2){var r=e.shift()+".";return r+=parseInt(e.shift()).toString(16),r+=("000"+parseInt(e.shift()).toString(16)).substr(-4)}return t},t.resolve=function(t,e){return n.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,r){var i,n=[],s={},o=!1;for(h.lastIndex=0;null!=(i=h.exec(e));)if(i[1]){var a=new l.AttrList(i[1]),c={attrs:a,bitrate:a.decimalInteger("AVERAGE-BANDWIDTH")||a.decimalInteger("BANDWIDTH"),name:a.NAME,url:t.resolve(i[2],r)},u=a.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((a.CODECS||"").split(/[ ,]+/).filter((function(t){return t})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=t.convertAVC1ToAVCOTI(c.videoCodec)),n.push(c)}else if(i[3]){var d=new l.AttrList(i[3]);d["DATA-ID"]&&(o=!0,s[d["DATA-ID"]]=d)}return{levels:n,sessionData:o?s:null}},t.parseMasterPlaylistMedia=function(e,r,i,n){var s;void 0===n&&(n=[]);var o=[],a=0;for(d.lastIndex=0;null!==(s=d.exec(e));){var c=new l.AttrList(s[1]);if(c.TYPE===i){var u={attrs:c,bitrate:0,id:a++,groupId:c["GROUP-ID"],instreamId:c["INSTREAM-ID"],name:c.NAME||c.LANGUAGE||"",type:i,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:c.LANGUAGE,url:c.URI?t.resolve(c.URI,r):""};if(n.length){var h=t.findGroup(n,u.groupId)||n[0];y(u,h,"audioCodec"),y(u,h,"textCodec")}o.push(u)}}return o},t.parseLevelPlaylist=function(t,e,r,u,h){var d,m,v,y=new o.LevelDetails(e),x=y.fragments,S=null,C=0,w=0,k=0,E=0,T=null,L=new s.Fragment(u,e),A=-1,D=!1;for(f.lastIndex=0,y.m3u8=t;null!==(d=f.exec(t));){D&&(D=!1,(L=new s.Fragment(u,e)).start=k,L.sn=C,L.cc=E,L.level=r,S&&(L.initSegment=S,L.rawProgramDateTime=S.rawProgramDateTime));var R=d[1];if(R){L.duration=parseFloat(R);var O=(" "+d[2]).slice(1);L.title=O||null,L.tagList.push(O?["INF",R,O]:["INF",R])}else if(d[3])Object(i.isFiniteNumber)(L.duration)&&(L.start=k,v&&(L.levelkey=v),L.sn=C,L.level=r,L.cc=E,L.urlId=h,x.push(L),L.relurl=(" "+d[3]).slice(1),b(L,T),T=L,k+=L.duration,C++,w=0,D=!0);else if(d[4]){var _=(" "+d[4]).slice(1);T?L.setByteRange(_,T):L.setByteRange(_)}else if(d[5])L.rawProgramDateTime=(" "+d[5]).slice(1),L.tagList.push(["PROGRAM-DATE-TIME",L.rawProgramDateTime]),-1===A&&(A=x.length);else{if(!(d=d[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(m=1;m-1){c.logger.warn("Keyformat "+q+" is not supported from the manifest");continue}if("identity"!==q)continue;G&&(v=a.LevelKey.fromURL(e,z),z&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(G)>=0&&(v.method=G,v.keyFormat=q,K&&(v.keyID=K),V&&(v.keyFormatVersions=V),v.iv=W));break;case"START":var Y=new l.AttrList(M).decimalFloatingPoint("TIME-OFFSET");Object(i.isFiniteNumber)(Y)&&(y.startTimeOffset=Y);break;case"MAP":var X=new l.AttrList(M);L.relurl=X.URI,X.BYTERANGE&&L.setByteRange(X.BYTERANGE),L.level=r,L.sn="initSegment",v&&(L.levelkey=v),L.initSegment=null,S=L,D=!0;break;case"SERVER-CONTROL":var $=new l.AttrList(M);y.canBlockReload=$.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=$.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&$.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=$.optionalFloat("PART-HOLD-BACK",0),y.holdBack=$.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var Z=new l.AttrList(M);y.partTarget=Z.decimalFloatingPoint("PART-TARGET");break;case"PART":var Q=y.partList;Q||(Q=y.partList=[]);var J=w>0?Q[Q.length-1]:void 0,tt=w++,et=new s.Part(new l.AttrList(M),L,e,tt,J);Q.push(et),L.duration+=et.duration;break;case"PRELOAD-HINT":var rt=new l.AttrList(M);y.preloadHint=rt;break;case"RENDITION-REPORT":var it=new l.AttrList(M);y.renditionReports=y.renditionReports||[],y.renditionReports.push(it);break;default:c.logger.warn("line parsed but not handled: "+d)}}}T&&!T.relurl?(x.pop(),k-=T.duration,y.partList&&(y.fragmentHint=T)):y.partList&&(b(L,T),L.cc=E,y.fragmentHint=L);var nt=x.length,st=x[0],ot=x[nt-1];if((k+=y.skippedSegments*y.targetduration)>0&&nt&&ot){y.averagetargetduration=k/nt;var at=ot.sn;y.endSN="initSegment"!==at?at:0,st&&(y.startCC=st.cc,st.initSegment||y.fragments.every((function(t){return t.relurl&&(e=t.relurl,g.test(null!=(r=null===(i=n.parseURL(e))||void 0===i?void 0:i.path)?r:""));var e,r,i}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(L=new s.Fragment(u,e)).relurl=ot.relurl,L.level=r,L.sn="initSegment",st.initSegment=L,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(k+=y.fragmentHint.duration),y.totalduration=k,y.endCC=E,A>0&&function(t,e){for(var r=t[e],i=e;i--;){var n=t[i];if(!n)return;n.programDateTime=r.programDateTime-1e3*n.duration,r=n}}(x,A),y},t}();function v(t,e){["video","audio","text"].forEach((function(r){var i=t.filter((function(t){return Object(u.isCodecType)(t,r)}));if(i.length){var n=i.filter((function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)}));e[r+"Codec"]=n.length>0?n[0]:i[0],t=t.filter((function(t){return-1===i.indexOf(t)}))}})),e.unknownCodecs=t}function y(t,e,r){var i=e[r];i&&(t[r]=i)}function b(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):null!=e&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime),Object(i.isFiniteNumber)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return m}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),s=i(/*! ./fragment */"./src/loader/fragment.ts"),o=i(/*! ./level-details */"./src/loader/level-details.ts"),a=i(/*! ./level-key */"./src/loader/level-key.ts"),l=i(/*! ../utils/attr-list */"./src/utils/attr-list.ts"),c=i(/*! ../utils/logger */"./src/utils/logger.ts"),u=i(/*! ../utils/codecs */"./src/utils/codecs.ts"),h=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,d=/#EXT-X-MEDIA:(.*)/g,f=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),p=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("|")),g=/\.(mp4|m4s|m4v|m4a)$/i,m=function(){function t(){}return t.findGroup=function(t,e){for(var i=0;i2){var i=e.shift()+".";return i+=parseInt(e.shift()).toString(16),i+=("000"+parseInt(e.shift()).toString(16)).substr(-4)}return t},t.resolve=function(t,e){return n.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,i){var r,n=[],s={},o=!1;for(h.lastIndex=0;null!=(r=h.exec(e));)if(r[1]){var a=new l.AttrList(r[1]),c={attrs:a,bitrate:a.decimalInteger("AVERAGE-BANDWIDTH")||a.decimalInteger("BANDWIDTH"),name:a.NAME,url:t.resolve(r[2],i)},u=a.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((a.CODECS||"").split(/[ ,]+/).filter((function(t){return t})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=t.convertAVC1ToAVCOTI(c.videoCodec)),n.push(c)}else if(r[3]){var d=new l.AttrList(r[3]);d["DATA-ID"]&&(o=!0,s[d["DATA-ID"]]=d)}return{levels:n,sessionData:o?s:null}},t.parseMasterPlaylistMedia=function(e,i,r,n){var s;void 0===n&&(n=[]);var o=[],a=0;for(d.lastIndex=0;null!==(s=d.exec(e));){var c=new l.AttrList(s[1]);if(c.TYPE===r){var u={attrs:c,bitrate:0,id:a++,groupId:c["GROUP-ID"],instreamId:c["INSTREAM-ID"],name:c.NAME||c.LANGUAGE||"",type:r,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:c.LANGUAGE,url:c.URI?t.resolve(c.URI,i):""};if(n.length){var h=t.findGroup(n,u.groupId)||n[0];y(u,h,"audioCodec"),y(u,h,"textCodec")}o.push(u)}}return o},t.parseLevelPlaylist=function(t,e,i,u,h){var d,m,v,y=new o.LevelDetails(e),x=y.fragments,S=null,C=0,w=0,k=0,E=0,T=null,L=new s.Fragment(u,e),A=-1,D=!1;for(f.lastIndex=0,y.m3u8=t;null!==(d=f.exec(t));){D&&(D=!1,(L=new s.Fragment(u,e)).start=k,L.sn=C,L.cc=E,L.level=i,S&&(L.initSegment=S,L.rawProgramDateTime=S.rawProgramDateTime));var R=d[1];if(R){L.duration=parseFloat(R);var O=(" "+d[2]).slice(1);L.title=O||null,L.tagList.push(O?["INF",R,O]:["INF",R])}else if(d[3])Object(r.isFiniteNumber)(L.duration)&&(L.start=k,v&&(L.levelkey=v),L.sn=C,L.level=i,L.cc=E,L.urlId=h,x.push(L),L.relurl=(" "+d[3]).slice(1),b(L,T),T=L,k+=L.duration,C++,w=0,D=!0);else if(d[4]){var _=(" "+d[4]).slice(1);T?L.setByteRange(_,T):L.setByteRange(_)}else if(d[5])L.rawProgramDateTime=(" "+d[5]).slice(1),L.tagList.push(["PROGRAM-DATE-TIME",L.rawProgramDateTime]),-1===A&&(A=x.length);else{if(!(d=d[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(m=1;m-1){c.logger.warn("Keyformat "+q+" is not supported from the manifest");continue}if("identity"!==q)continue;G&&(v=a.LevelKey.fromURL(e,z),z&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(G)>=0&&(v.method=G,v.keyFormat=q,K&&(v.keyID=K),V&&(v.keyFormatVersions=V),v.iv=W));break;case"START":var Y=new l.AttrList(M).decimalFloatingPoint("TIME-OFFSET");Object(r.isFiniteNumber)(Y)&&(y.startTimeOffset=Y);break;case"MAP":var X=new l.AttrList(M);L.relurl=X.URI,X.BYTERANGE&&L.setByteRange(X.BYTERANGE),L.level=i,L.sn="initSegment",v&&(L.levelkey=v),L.initSegment=null,S=L,D=!0;break;case"SERVER-CONTROL":var $=new l.AttrList(M);y.canBlockReload=$.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=$.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&$.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=$.optionalFloat("PART-HOLD-BACK",0),y.holdBack=$.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var Z=new l.AttrList(M);y.partTarget=Z.decimalFloatingPoint("PART-TARGET");break;case"PART":var Q=y.partList;Q||(Q=y.partList=[]);var J=w>0?Q[Q.length-1]:void 0,tt=w++,et=new s.Part(new l.AttrList(M),L,e,tt,J);Q.push(et),L.duration+=et.duration;break;case"PRELOAD-HINT":var it=new l.AttrList(M);y.preloadHint=it;break;case"RENDITION-REPORT":var rt=new l.AttrList(M);y.renditionReports=y.renditionReports||[],y.renditionReports.push(rt);break;default:c.logger.warn("line parsed but not handled: "+d)}}}T&&!T.relurl?(x.pop(),k-=T.duration,y.partList&&(y.fragmentHint=T)):y.partList&&(b(L,T),L.cc=E,y.fragmentHint=L);var nt=x.length,st=x[0],ot=x[nt-1];if((k+=y.skippedSegments*y.targetduration)>0&&nt&&ot){y.averagetargetduration=k/nt;var at=ot.sn;y.endSN="initSegment"!==at?at:0,st&&(y.startCC=st.cc,st.initSegment||y.fragments.every((function(t){return t.relurl&&(e=t.relurl,g.test(null!=(i=null===(r=n.parseURL(e))||void 0===r?void 0:r.path)?i:""));var e,i,r}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(L=new s.Fragment(u,e)).relurl=ot.relurl,L.level=i,L.sn="initSegment",st.initSegment=L,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(k+=y.fragmentHint.duration),y.totalduration=k,y.endCC=E,A>0&&function(t,e){for(var i=t[e],r=e;r--;){var n=t[r];if(!n)return;n.programDateTime=i.programDateTime-1e3*n.duration,i=n}}(x,A),y},t}();function v(t,e){["video","audio","text"].forEach((function(i){var r=t.filter((function(t){return Object(u.isCodecType)(t,i)}));if(r.length){var n=r.filter((function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)}));e[i+"Codec"]=n.length>0?n[0]:r[0],t=t.filter((function(t){return-1===r.indexOf(t)}))}})),e.unknownCodecs=t}function y(t,e,i){var r=e[i];r&&(t[i]=r)}function b(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):null!=e&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime),Object(r.isFiniteNumber)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts": /*!***************************************!*\ !*** ./src/loader/playlist-loader.ts ***! \***************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../errors */"./src/errors.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts"),a=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=r(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=r(/*! ../types/loader */"./src/types/loader.ts"),u=r(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function h(t,e){var r=t.url;return void 0!==r&&0!==r.indexOf("data:")||(r=e.url),r}var d=function(){function t(t){this.hls=void 0,this.loaders=Object.create(null),this.hls=t,this.registerListeners()}var e=t.prototype;return e.registerListeners=function(){var t=this.hls;t.on(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(n.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(n.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.unregisterListeners=function(){var t=this.hls;t.off(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(n.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(n.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.createInternalLoader=function(t){var e=this.hls.config,r=e.pLoader,i=e.loader,n=new(r||i)(e);return t.loader=n,this.loaders[t.type]=n,n},e.getInternalLoader=function(t){return this.loaders[t.type]},e.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},e.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},e.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},e.onManifestLoading=function(t,e){var r=e.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:r,deliveryDirectives:null})},e.onLevelLoading=function(t,e){var r=e.id,i=e.level,n=e.url,s=e.deliveryDirectives;this.load({id:r,groupId:null,level:i,responseType:"text",type:c.PlaylistContextType.LEVEL,url:n,deliveryDirectives:s})},e.onAudioTrackLoading=function(t,e){var r=e.id,i=e.groupId,n=e.url,s=e.deliveryDirectives;this.load({id:r,groupId:i,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:n,deliveryDirectives:s})},e.onSubtitleTrackLoading=function(t,e){var r=e.id,i=e.groupId,n=e.url,s=e.deliveryDirectives;this.load({id:r,groupId:i,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:n,deliveryDirectives:s})},e.load=function(t){var e,r,i,n,s,a,l=this.hls.config,u=this.getInternalLoader(t);if(u){var h=u.context;if(h&&h.url===t.url)return void o.logger.trace("[playlist-loader]: playlist request ongoing");o.logger.log("[playlist-loader]: aborting previous loader for type: "+t.type),u.abort()}switch(t.type){case c.PlaylistContextType.MANIFEST:r=l.manifestLoadingMaxRetry,i=l.manifestLoadingTimeOut,n=l.manifestLoadingRetryDelay,s=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:r=0,i=l.levelLoadingTimeOut;break;default:r=l.levelLoadingMaxRetry,i=l.levelLoadingTimeOut,n=l.levelLoadingRetryDelay,s=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(t),null!==(e=t.deliveryDirectives)&&void 0!==e&&e.part&&(t.type===c.PlaylistContextType.LEVEL&&null!==t.level?a=this.hls.levels[t.level].details:t.type===c.PlaylistContextType.AUDIO_TRACK&&null!==t.id?a=this.hls.audioTracks[t.id].details:t.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==t.id&&(a=this.hls.subtitleTracks[t.id].details),a)){var d=a.partTarget,f=a.targetduration;d&&f&&(i=Math.min(1e3*Math.max(3*d,.8*f),i))}var p={timeout:i,maxRetry:r,retryDelay:n,maxRetryDelay:s,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(t,p,g)},e.loadsuccess=function(t,e,r,i){if(void 0===i&&(i=null),r.isSidxRequest)return this.handleSidxRequest(t,r),void this.handlePlaylistLoaded(t,e,r,i);this.resetInternalLoader(r.type);var n=t.data;0===n.indexOf("#EXTM3U")?(e.parsing.start=performance.now(),n.indexOf("#EXTINF:")>0||n.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(t,e,r,i):this.handleMasterPlaylist(t,e,r,i)):this.handleManifestParsingError(t,r,"no EXTM3U delimiter",i)},e.loaderror=function(t,e,r){void 0===r&&(r=null),this.handleNetworkError(e,r,!1,t)},e.loadtimeout=function(t,e,r){void 0===r&&(r=null),this.handleNetworkError(e,r,!0)},e.handleMasterPlaylist=function(t,e,r,i){var s=this.hls,a=t.data,c=h(t,r),d=l.default.parseMasterPlaylist(a,c),f=d.levels,p=d.sessionData;if(f.length){var g=f.map((function(t){return{id:t.attrs.AUDIO,audioCodec:t.audioCodec}})),m=f.map((function(t){return{id:t.attrs.SUBTITLES,textCodec:t.textCodec}})),v=l.default.parseMasterPlaylistMedia(a,c,"AUDIO",g),y=l.default.parseMasterPlaylistMedia(a,c,"SUBTITLES",m),b=l.default.parseMasterPlaylistMedia(a,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(t){return!t.url}))||!f[0].audioCodec||f[0].attrs.AUDIO||(o.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),v.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new u.AttrList({}),bitrate:0,url:""}))),s.trigger(n.Events.MANIFEST_LOADED,{levels:f,audioTracks:v,subtitles:y,captions:b,url:c,stats:e,networkDetails:i,sessionData:p})}else this.handleManifestParsingError(t,r,"no level found in manifest",i)},e.handleTrackOrLevelPlaylist=function(t,e,r,o){var a=this.hls,d=r.id,f=r.level,p=r.type,g=h(t,r),m=Object(i.isFiniteNumber)(d)?d:0,v=Object(i.isFiniteNumber)(f)?f:m,y=function(t){switch(t.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(r),b=l.default.parseLevelPlaylist(t.data,g,v,y,m);if(b.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var x={attrs:new u.AttrList({}),bitrate:0,details:b,name:"",url:g};a.trigger(n.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:g,stats:e,networkDetails:o,sessionData:null})}if(e.parsing.end=performance.now(),b.needSidxRanges){var S,C=null===(S=b.fragments[0].initSegment)||void 0===S?void 0:S.url;this.load({url:C,isSidxRequest:!0,type:p,level:f,levelDetails:b,id:d,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else r.levelDetails=b,this.handlePlaylistLoaded(t,e,r,o)}else a.trigger(n.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:"number"==typeof r.level?r.level:void 0})},e.handleSidxRequest=function(t,e){var r=Object(a.parseSegmentIndex)(new Uint8Array(t.data));if(r){var i=r.references,n=e.levelDetails;i.forEach((function(t,e){var i=t.info,s=n.fragments[e];0===s.byteRange.length&&s.setByteRange(String(1+i.end-i.start)+"@"+String(i.start)),s.initSegment&&s.initSegment.setByteRange(String(r.moovEndOffset)+"@0")}))}},e.handleManifestParsingError=function(t,e,r,i){this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:e.type===c.PlaylistContextType.MANIFEST,url:t.url,reason:r,response:t,context:e,networkDetails:i})},e.handleNetworkError=function(t,e,r,i){void 0===r&&(r=!1),o.logger.warn("[playlist-loader]: A network "+(r?"timeout":"error")+" occurred while loading "+t.type+" level: "+t.level+" id: "+t.id+' group-id: "'+t.groupId+'"');var a=s.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(t);switch(t.type){case c.PlaylistContextType.MANIFEST:a=r?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:a=r?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:a=r?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:a=r?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(t.type);var h={type:s.ErrorTypes.NETWORK_ERROR,details:a,fatal:l,url:t.url,loader:u,context:t,networkDetails:e};i&&(h.response=i),this.hls.trigger(n.Events.ERROR,h)},e.handlePlaylistLoaded=function(t,e,r,i){var s=r.type,o=r.level,a=r.id,l=r.groupId,u=r.loader,h=r.levelDetails,d=r.deliveryDirectives;if(null!=h&&h.targetduration){if(u)switch(h.live&&(u.getCacheAge&&(h.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(h.ageHeader)||(h.ageHeader=0)),s){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(n.Events.LEVEL_LOADED,{details:h,level:o||0,id:a||0,stats:e,networkDetails:i,deliveryDirectives:d});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(n.Events.AUDIO_TRACK_LOADED,{details:h,id:a||0,groupId:l||"",stats:e,networkDetails:i,deliveryDirectives:d});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(n.Events.SUBTITLE_TRACK_LOADED,{details:h,id:a||0,groupId:l||"",stats:e,networkDetails:i,deliveryDirectives:d})}}else this.handleManifestParsingError(t,r,"invalid target duration",i)},t}();e.default=d},"./src/polyfills/number.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../errors */"./src/errors.ts"),o=i(/*! ../utils/logger */"./src/utils/logger.ts"),a=i(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=i(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=i(/*! ../types/loader */"./src/types/loader.ts"),u=i(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function h(t,e){var i=t.url;return void 0!==i&&0!==i.indexOf("data:")||(i=e.url),i}var d=function(){function t(t){this.hls=void 0,this.loaders=Object.create(null),this.hls=t,this.registerListeners()}var e=t.prototype;return e.registerListeners=function(){var t=this.hls;t.on(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(n.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(n.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.unregisterListeners=function(){var t=this.hls;t.off(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(n.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(n.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.createInternalLoader=function(t){var e=this.hls.config,i=e.pLoader,r=e.loader,n=new(i||r)(e);return t.loader=n,this.loaders[t.type]=n,n},e.getInternalLoader=function(t){return this.loaders[t.type]},e.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},e.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},e.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},e.onManifestLoading=function(t,e){var i=e.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:i,deliveryDirectives:null})},e.onLevelLoading=function(t,e){var i=e.id,r=e.level,n=e.url,s=e.deliveryDirectives;this.load({id:i,groupId:null,level:r,responseType:"text",type:c.PlaylistContextType.LEVEL,url:n,deliveryDirectives:s})},e.onAudioTrackLoading=function(t,e){var i=e.id,r=e.groupId,n=e.url,s=e.deliveryDirectives;this.load({id:i,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:n,deliveryDirectives:s})},e.onSubtitleTrackLoading=function(t,e){var i=e.id,r=e.groupId,n=e.url,s=e.deliveryDirectives;this.load({id:i,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:n,deliveryDirectives:s})},e.load=function(t){var e,i,r,n,s,a,l=this.hls.config,u=this.getInternalLoader(t);if(u){var h=u.context;if(h&&h.url===t.url)return void o.logger.trace("[playlist-loader]: playlist request ongoing");o.logger.log("[playlist-loader]: aborting previous loader for type: "+t.type),u.abort()}switch(t.type){case c.PlaylistContextType.MANIFEST:i=l.manifestLoadingMaxRetry,r=l.manifestLoadingTimeOut,n=l.manifestLoadingRetryDelay,s=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:i=0,r=l.levelLoadingTimeOut;break;default:i=l.levelLoadingMaxRetry,r=l.levelLoadingTimeOut,n=l.levelLoadingRetryDelay,s=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(t),null!==(e=t.deliveryDirectives)&&void 0!==e&&e.part&&(t.type===c.PlaylistContextType.LEVEL&&null!==t.level?a=this.hls.levels[t.level].details:t.type===c.PlaylistContextType.AUDIO_TRACK&&null!==t.id?a=this.hls.audioTracks[t.id].details:t.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==t.id&&(a=this.hls.subtitleTracks[t.id].details),a)){var d=a.partTarget,f=a.targetduration;d&&f&&(r=Math.min(1e3*Math.max(3*d,.8*f),r))}var p={timeout:r,maxRetry:i,retryDelay:n,maxRetryDelay:s,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(t,p,g)},e.loadsuccess=function(t,e,i,r){if(void 0===r&&(r=null),i.isSidxRequest)return this.handleSidxRequest(t,i),void this.handlePlaylistLoaded(t,e,i,r);this.resetInternalLoader(i.type);var n=t.data;0===n.indexOf("#EXTM3U")?(e.parsing.start=performance.now(),n.indexOf("#EXTINF:")>0||n.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(t,e,i,r):this.handleMasterPlaylist(t,e,i,r)):this.handleManifestParsingError(t,i,"no EXTM3U delimiter",r)},e.loaderror=function(t,e,i){void 0===i&&(i=null),this.handleNetworkError(e,i,!1,t)},e.loadtimeout=function(t,e,i){void 0===i&&(i=null),this.handleNetworkError(e,i,!0)},e.handleMasterPlaylist=function(t,e,i,r){var s=this.hls,a=t.data,c=h(t,i),d=l.default.parseMasterPlaylist(a,c),f=d.levels,p=d.sessionData;if(f.length){var g=f.map((function(t){return{id:t.attrs.AUDIO,audioCodec:t.audioCodec}})),m=f.map((function(t){return{id:t.attrs.SUBTITLES,textCodec:t.textCodec}})),v=l.default.parseMasterPlaylistMedia(a,c,"AUDIO",g),y=l.default.parseMasterPlaylistMedia(a,c,"SUBTITLES",m),b=l.default.parseMasterPlaylistMedia(a,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(t){return!t.url}))||!f[0].audioCodec||f[0].attrs.AUDIO||(o.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),v.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new u.AttrList({}),bitrate:0,url:""}))),s.trigger(n.Events.MANIFEST_LOADED,{levels:f,audioTracks:v,subtitles:y,captions:b,url:c,stats:e,networkDetails:r,sessionData:p})}else this.handleManifestParsingError(t,i,"no level found in manifest",r)},e.handleTrackOrLevelPlaylist=function(t,e,i,o){var a=this.hls,d=i.id,f=i.level,p=i.type,g=h(t,i),m=Object(r.isFiniteNumber)(d)?d:0,v=Object(r.isFiniteNumber)(f)?f:m,y=function(t){switch(t.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(i),b=l.default.parseLevelPlaylist(t.data,g,v,y,m);if(b.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var x={attrs:new u.AttrList({}),bitrate:0,details:b,name:"",url:g};a.trigger(n.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:g,stats:e,networkDetails:o,sessionData:null})}if(e.parsing.end=performance.now(),b.needSidxRanges){var S,C=null===(S=b.fragments[0].initSegment)||void 0===S?void 0:S.url;this.load({url:C,isSidxRequest:!0,type:p,level:f,levelDetails:b,id:d,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else i.levelDetails=b,this.handlePlaylistLoaded(t,e,i,o)}else a.trigger(n.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:"number"==typeof i.level?i.level:void 0})},e.handleSidxRequest=function(t,e){var i=Object(a.parseSegmentIndex)(new Uint8Array(t.data));if(i){var r=i.references,n=e.levelDetails;r.forEach((function(t,e){var r=t.info,s=n.fragments[e];0===s.byteRange.length&&s.setByteRange(String(1+r.end-r.start)+"@"+String(r.start)),s.initSegment&&s.initSegment.setByteRange(String(i.moovEndOffset)+"@0")}))}},e.handleManifestParsingError=function(t,e,i,r){this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:e.type===c.PlaylistContextType.MANIFEST,url:t.url,reason:i,response:t,context:e,networkDetails:r})},e.handleNetworkError=function(t,e,i,r){void 0===i&&(i=!1),o.logger.warn("[playlist-loader]: A network "+(i?"timeout":"error")+" occurred while loading "+t.type+" level: "+t.level+" id: "+t.id+' group-id: "'+t.groupId+'"');var a=s.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(t);switch(t.type){case c.PlaylistContextType.MANIFEST:a=i?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:a=i?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:a=i?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:a=i?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(t.type);var h={type:s.ErrorTypes.NETWORK_ERROR,details:a,fatal:l,url:t.url,loader:u,context:t,networkDetails:e};r&&(h.response=r),this.hls.trigger(n.Events.ERROR,h)},e.handlePlaylistLoaded=function(t,e,i,r){var s=i.type,o=i.level,a=i.id,l=i.groupId,u=i.loader,h=i.levelDetails,d=i.deliveryDirectives;if(null!=h&&h.targetduration){if(u)switch(h.live&&(u.getCacheAge&&(h.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(h.ageHeader)||(h.ageHeader=0)),s){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(n.Events.LEVEL_LOADED,{details:h,level:o||0,id:a||0,stats:e,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(n.Events.AUDIO_TRACK_LOADED,{details:h,id:a||0,groupId:l||"",stats:e,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(n.Events.SUBTITLE_TRACK_LOADED,{details:h,id:a||0,groupId:l||"",stats:e,networkDetails:r,deliveryDirectives:d})}}else this.handleManifestParsingError(t,i,"invalid target duration",r)},t}();e.default=d},"./src/polyfills/number.ts": /*!*********************************!*\ !*** ./src/polyfills/number.ts ***! \*********************************/ -/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(t,e,r){"use strict";r.r(e),r.d(e,"isFiniteNumber",(function(){return i})),r.d(e,"MAX_SAFE_INTEGER",(function(){return n}));var i=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},n=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts": +/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(t,e,i){"use strict";i.r(e),i.d(e,"isFiniteNumber",(function(){return r})),i.d(e,"MAX_SAFE_INTEGER",(function(){return n}));var r=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},n=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts": /*!*********************************!*\ !*** ./src/remux/aac-helper.ts ***! \*********************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=function(){function t(){}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)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(6===e)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(1===e)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(2===e)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(3===e)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])}},t}();e.default=i},"./src/remux/mp4-generator.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=function(){function t(){}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)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(6===e)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(1===e)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(2===e)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(3===e)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])}},t}();e.default=r},"./src/remux/mp4-generator.ts": /*!************************************!*\ !*** ./src/remux/mp4-generator.ts ***! \************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=Math.pow(2,32)-1,n=function(){function t(){}return t.init=function(){var e;for(e in t.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:[]},t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var r=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]),i=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]);t.HDLR_TYPES={video:r,audio:i};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),s=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=s,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,o,l,o,a),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,n))},t.box=function(t){for(var e=8,r=arguments.length,i=new Array(r>1?r-1:0),n=1;n>24&255,a[1]=e>>16&255,a[2]=e>>8&255,a[3]=255&e,a.set(t,4),s=0,e=8;s>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,s>>24,s>>16&255,s>>8&255,255&s,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,r,i){return t.box(t.types.moof,t.mfhd(e),t.traf(i,r))},t.moov=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trak(e[r]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(t.mvex(e)))},t.mvex=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trex(e[r]);return t.box.apply(null,[t.types.mvex].concat(i))},t.mvhd=function(e,r){r*=e;var n=Math.floor(r/(i+1)),s=Math.floor(r%(i+1)),o=new Uint8Array([1,0,0,0,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,255&e,n>>24,n>>16&255,n>>8&255,255&n,s>>24,s>>16&255,s>>8&255,255&s,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 t.box(t.types.mvhd,o)},t.sdtp=function(e){var r,i,n=e.samples||[],s=new Uint8Array(4+n.length);for(r=0;r>>8&255),s.push(255&n),s=s.concat(Array.prototype.slice.call(i));for(r=0;r>>8&255),o.push(255&n),o=o.concat(Array.prototype.slice.call(i));var a=t.box(t.types.avcC,new Uint8Array([1,s[3],s[4],s[5],255,224|e.sps.length].concat(s).concat([e.pps.length]).concat(o))),l=e.width,c=e.height,u=e.pixelRatio[0],h=e.pixelRatio[1];return t.box(t.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,l>>8&255,255&l,c>>8&255,255&c,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]),a,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,h>>24,h>>16&255,h>>8&255,255&h])))},t.esds=function(t){var e=t.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(t.config).concat([6,1,2]))},t.mp4a=function(e){var r=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var r=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var r=e.id,n=e.duration*e.timescale,s=e.width,o=e.height,a=Math.floor(n/(i+1)),l=Math.floor(n%(i+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,l>>24,l>>16&255,l>>8&255,255&l,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,s>>8&255,255&s,0,0,o>>8&255,255&o,0,0]))},t.traf=function(e,r){var n=t.sdtp(e),s=e.id,o=Math.floor(r/(i+1)),a=Math.floor(r%(i+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,a>>24,a>>16&255,a>>8&255,255&a])),t.trun(e,n.length+16+20+8+16+8+8),n)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var r=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,r){var i,n,s,o,a,l,c=e.samples||[],u=c.length,h=12+16*u,d=new Uint8Array(h);for(r+=8+h,d.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),i=0;i>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,61440&a.degradPrio,15&a.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return t.box(t.types.trun,d)},t.initSegment=function(e){t.types||t.init();var r=t.moov(e),i=new Uint8Array(t.FTYP.byteLength+r.byteLength);return i.set(t.FTYP),i.set(r,t.FTYP.byteLength),i},t}();n.types=void 0,n.HDLR_TYPES=void 0,n.STTS=void 0,n.STSC=void 0,n.STCO=void 0,n.STSZ=void 0,n.VMHD=void 0,n.SMHD=void 0,n.STSD=void 0,n.FTYP=void 0,n.DINF=void 0,e.default=n},"./src/remux/mp4-remuxer.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=Math.pow(2,32)-1,n=function(){function t(){}return t.init=function(){var e;for(e in t.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:[]},t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var i=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:i,audio:r};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),s=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=s,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,o,l,o,a),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,n))},t.box=function(t){for(var e=8,i=arguments.length,r=new Array(i>1?i-1:0),n=1;n>24&255,a[1]=e>>16&255,a[2]=e>>8&255,a[3]=255&e,a.set(t,4),s=0,e=8;s>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,s>>24,s>>16&255,s>>8&255,255&s,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,i,r){return t.box(t.types.moof,t.mfhd(e),t.traf(r,i))},t.moov=function(e){for(var i=e.length,r=[];i--;)r[i]=t.trak(e[i]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(r).concat(t.mvex(e)))},t.mvex=function(e){for(var i=e.length,r=[];i--;)r[i]=t.trex(e[i]);return t.box.apply(null,[t.types.mvex].concat(r))},t.mvhd=function(e,i){i*=e;var n=Math.floor(i/(r+1)),s=Math.floor(i%(r+1)),o=new Uint8Array([1,0,0,0,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,255&e,n>>24,n>>16&255,n>>8&255,255&n,s>>24,s>>16&255,s>>8&255,255&s,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 t.box(t.types.mvhd,o)},t.sdtp=function(e){var i,r,n=e.samples||[],s=new Uint8Array(4+n.length);for(i=0;i>>8&255),s.push(255&n),s=s.concat(Array.prototype.slice.call(r));for(i=0;i>>8&255),o.push(255&n),o=o.concat(Array.prototype.slice.call(r));var a=t.box(t.types.avcC,new Uint8Array([1,s[3],s[4],s[5],255,224|e.sps.length].concat(s).concat([e.pps.length]).concat(o))),l=e.width,c=e.height,u=e.pixelRatio[0],h=e.pixelRatio[1];return t.box(t.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,l>>8&255,255&l,c>>8&255,255&c,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]),a,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,h>>24,h>>16&255,h>>8&255,255&h])))},t.esds=function(t){var e=t.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(t.config).concat([6,1,2]))},t.mp4a=function(e){var i=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,i>>8&255,255&i,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var i=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,i>>8&255,255&i,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var i=e.id,n=e.duration*e.timescale,s=e.width,o=e.height,a=Math.floor(n/(r+1)),l=Math.floor(n%(r+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,i>>24&255,i>>16&255,i>>8&255,255&i,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,l>>24,l>>16&255,l>>8&255,255&l,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,s>>8&255,255&s,0,0,o>>8&255,255&o,0,0]))},t.traf=function(e,i){var n=t.sdtp(e),s=e.id,o=Math.floor(i/(r+1)),a=Math.floor(i%(r+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,a>>24,a>>16&255,a>>8&255,255&a])),t.trun(e,n.length+16+20+8+16+8+8),n)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var i=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,i){var r,n,s,o,a,l,c=e.samples||[],u=c.length,h=12+16*u,d=new Uint8Array(h);for(i+=8+h,d.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,i>>>24&255,i>>>16&255,i>>>8&255,255&i],0),r=0;r>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,61440&a.degradPrio,15&a.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return t.box(t.types.trun,d)},t.initSegment=function(e){t.types||t.init();var i=t.moov(e),r=new Uint8Array(t.FTYP.byteLength+i.byteLength);return r.set(t.FTYP),r.set(i,t.FTYP.byteLength),r},t}();n.types=void 0,n.HDLR_TYPES=void 0,n.STTS=void 0,n.STSC=void 0,n.STCO=void 0,n.STSZ=void 0,n.VMHD=void 0,n.SMHD=void 0,n.STSD=void 0,n.FTYP=void 0,n.DINF=void 0,e.default=n},"./src/remux/mp4-remuxer.ts": /*!**********************************!*\ !*** ./src/remux/mp4-remuxer.ts ***! \**********************************/ -/*! exports provided: default, normalizePts */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return g})),r.d(e,"normalizePts",(function(){return m}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ./aac-helper */"./src/remux/aac-helper.ts"),s=r(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),o=r(/*! ../events */"./src/events.ts"),a=r(/*! ../errors */"./src/errors.ts"),l=r(/*! ../utils/logger */"./src/utils/logger.ts"),c=r(/*! ../types/loader */"./src/types/loader.ts"),u=r(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function h(){return(h=Object.assign||function(t){for(var e=1;e0?t:r.pts}),t[0].pts);return e&&l.logger.debug("PTS rollover detected"),r},e.remux=function(t,e,r,i,n,s,o,a){var u,h,d,f,p,g,v=n,y=n,b=t.pid>-1,x=e.pid>-1,S=e.samples.length,C=t.samples.length>0,w=S>1;if((!b||C)&&(!x||w)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(t,e,n));var k=this.isVideoContiguous,E=-1;if(w&&(E=function(t){for(var e=0;e0){l.logger.warn("[mp4-remuxer]: Dropped "+E+" out of "+S+" video samples due to a missing keyframe");var T=this.getVideoStartPts(e.samples);e.samples=e.samples.slice(E),e.dropped+=E,y+=(e.samples[0].pts-T)/(e.timescale||9e4)}else-1===E&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+S+" video samples"),g=!1);if(this.ISGenerated){if(C&&w){var L=this.getVideoStartPts(e.samples),A=(m(t.samples[0].pts,L)-L)/e.inputTimeScale;v+=Math.max(0,A),y+=Math.max(0,-A)}if(C){if(t.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(t,e,n)),h=this.remuxAudio(t,v,this.isAudioContiguous,s,x||w||a===c.PlaylistLevelType.AUDIO?y:void 0),w){var D=h?h.endPTS-h.startPTS:0;e.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(t,e,n)),u=this.remuxVideo(e,y,k,D)}}else w&&(u=this.remuxVideo(e,y,k,0));u&&(u.firstKeyFrame=E,u.independent=-1!==E)}}return this.ISGenerated&&(r.samples.length&&(p=this.remuxID3(r,n)),i.samples.length&&(f=this.remuxText(i,n))),{audio:h,video:u,initSegment:d,independent:g,text:f,id3:p}},e.generateIS=function(t,e,r){var n,o,a,l=t.samples,c=e.samples,u=this.typeSupported,h={},d=!Object(i.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(n=o=1/0),t.config&&l.length&&(t.timescale=t.samplerate,t.isAAC||(u.mpeg?(f="audio/mpeg",t.codec=""):u.mp3&&(t.codec="mp3")),h.audio={id:"audio",container:f,codec:t.codec,initSegment:!t.isAAC&&u.mpeg?new Uint8Array(0):s.default.initSegment([t]),metadata:{channelCount:t.channelCount}},d&&(a=t.inputTimeScale,n=o=l[0].pts-Math.round(a*r))),e.sps&&e.pps&&c.length&&(e.timescale=e.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:e.codec,initSegment:s.default.initSegment([e]),metadata:{width:e.width,height:e.height}},d)){a=e.inputTimeScale;var p=this.getVideoStartPts(c),g=Math.round(a*r);o=Math.min(o,m(c[0].dts,p)-g),n=Math.min(n,p-g)}if(Object.keys(h).length)return this.ISGenerated=!0,d&&(this._initPTS=n,this._initDTS=o),{tracks:h,initPTS:n,timescale:a}},e.remuxVideo=function(t,e,r,i){var n,c,f,g=t.inputTimeScale,y=t.samples,b=[],x=y.length,S=this._initPTS,C=this.nextAvcDts,w=8,k=Number.POSITIVE_INFINITY,E=Number.NEGATIVE_INFINITY,T=0,L=!1;r&&null!==C||(C=e*g-(y[0].pts-m(y[0].dts,y[0].pts)));for(var A=0;AD.pts&&(T=Math.max(Math.min(T,D.pts-D.dts),-18e3)),D.dts0?A-1:A].dts&&(L=!0)}L&&y.sort((function(t,e){var r=t.dts-e.dts,i=t.pts-e.pts;return r||i})),c=y[0].dts,f=y[y.length-1].dts;var R=Math.round((f-c)/(x-1));if(T<0){if(T<-2*R){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-R,!0)+" ms");for(var O=T,_=0;_R;if(P||M<-1){P?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(M,!0)+" ms ("+M+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-M,!0)+" ms ("+M+"dts) overlapping between fragments detected"),c=C;var N=y[0].pts-M;y[0].dts=c,y[0].pts=N,l.logger.log("Video: First PTS/DTS adjusted: "+Object(u.toMsFromMpegTsClock)(N,!0)+"/"+Object(u.toMsFromMpegTsClock)(c,!0)+", delta: "+Object(u.toMsFromMpegTsClock)(M,!0)+" ms")}}p&&(c=Math.max(0,c));for(var F=0,B=0,j=0;j0?Y-1:Y].dts;if(it.stretchShortVideoTrack&&null!==this.nextAudioPts){var st=Math.floor(it.maxBufferHole*g),ot=(i?k+i*g:this.nextAudioPts)-X.pts;ot>st?((n=ot-nt)<0&&(n=nt),l.logger.log("[mp4-remuxer]: It is approximately "+ot/90+" ms to the next segment; using duration "+n/90+" ms for the last video frame.")):n=nt}else n=nt}var at=Math.round(X.pts-X.dts);b.push(new v(X.key,n,Z,at))}if(b.length&&d&&d<70){var lt=b[0].flags;lt.dependsOn=2,lt.isNonSync=0}console.assert(void 0!==n,"mp4SampleDuration must be computed"),this.nextAvcDts=C=f+n,this.isVideoContiguous=!0;var ct={data1:s.default.moof(t.sequenceNumber++,c,h({},t,{samples:b})),data2:V,startPTS:k/g,endPTS:(E+n)/g,startDTS:c/g,endDTS:C/g,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:t.dropped};return t.samples=[],t.dropped=0,console.assert(V.length,"MDAT length must not be zero"),ct},e.remuxAudio=function(t,e,r,i,c){var u=t.inputTimeScale,d=u/(t.samplerate?t.samplerate:u),f=t.isAAC?1024:1152,p=f*d,g=this._initPTS,y=!t.isAAC&&this.typeSupported.mpeg,b=[],x=t.samples,S=y?0:8,C=this.nextAudioPts||-1,w=e*u;if(this.isAudioContiguous=r=r||x.length&&C>0&&(i&&Math.abs(w-C)<9e3||Math.abs(m(x[0].pts-g,w)-C)<20*p),x.forEach((function(t){t.pts=m(t.pts-g,w)})),!r||C<0){if(!(x=x.filter((function(t){return t.pts>=0}))).length)return;C=0===c?0:i?Math.max(0,w):x[0].pts}if(t.isAAC)for(var k=void 0!==c,E=this.config.maxAudioFramesDrift,T=0,L=C;T=E*p&&O<1e4&&k){var _=Math.round(R/p);(L=D-_*p)<0&&(_--,L+=p),0===T&&(this.nextAudioPts=C=L),l.logger.warn("[mp4-remuxer]: Injecting "+_+" audio frame @ "+(L/u).toFixed(3)+"s due to "+Math.round(1e3*R/u)+" ms gap.");for(var I=0;I<_;I++){var M=Math.max(L,0),P=n.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);P||(l.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),P=A.unit.subarray()),x.splice(T,0,{unit:P,pts:M}),L+=p,T++}}A.pts=L,L+=p}for(var N,F=null,B=null,j=0,U=x.length;U--;)j+=x[U].unit.byteLength;for(var H=0,G=x.length;H0))return;j+=S;try{N=new Uint8Array(j)}catch(t){return void this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:a.ErrorTypes.MUX_ERROR,details:a.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:j,reason:"fail allocating audio mdat "+j})}y||(new DataView(N.buffer).setUint32(0,j),N.set(s.default.types.mdat,4))}N.set(W,S);var K=W.byteLength;S+=K,b.push(new v(!0,f,K,0)),B=V}var q=b.length;if(q){var Y=b[b.length-1];this.nextAudioPts=C=B+d*Y.duration;var X=y?new Uint8Array(0):s.default.moof(t.sequenceNumber++,F/d,h({},t,{samples:b}));t.samples=[];var $=F/u,Z=C/u,Q={data1:X,data2:N,startPTS:$,endPTS:Z,startDTS:$,endDTS:Z,type:"audio",hasAudio:!0,hasVideo:!1,nb:q};return this.isAudioContiguous=!0,console.assert(N.length,"MDAT length must not be zero"),Q}},e.remuxEmptyAudio=function(t,e,r,i){var s=t.inputTimeScale,o=s/(t.samplerate?t.samplerate:s),a=this.nextAudioPts,c=(null!==a?a:i.startDTS*s)+this._initDTS,u=i.endDTS*s+this._initDTS,h=1024*o,d=Math.ceil((u-c)/h),f=n.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var p=[],g=0;g4294967296;)t+=r;return t}var v=function(t,e,r,i){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=e,this.size=r,this.cts=i,this.flags=new y(t)},y=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": +/*! exports provided: default, normalizePts */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return g})),i.d(e,"normalizePts",(function(){return m}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ./aac-helper */"./src/remux/aac-helper.ts"),s=i(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),o=i(/*! ../events */"./src/events.ts"),a=i(/*! ../errors */"./src/errors.ts"),l=i(/*! ../utils/logger */"./src/utils/logger.ts"),c=i(/*! ../types/loader */"./src/types/loader.ts"),u=i(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function h(){return(h=Object.assign||function(t){for(var e=1;e0?t:i.pts}),t[0].pts);return e&&l.logger.debug("PTS rollover detected"),i},e.remux=function(t,e,i,r,n,s,o,a){var u,h,d,f,p,g,v=n,y=n,b=t.pid>-1,x=e.pid>-1,S=e.samples.length,C=t.samples.length>0,w=S>1;if((!b||C)&&(!x||w)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(t,e,n));var k=this.isVideoContiguous,E=-1;if(w&&(E=function(t){for(var e=0;e0){l.logger.warn("[mp4-remuxer]: Dropped "+E+" out of "+S+" video samples due to a missing keyframe");var T=this.getVideoStartPts(e.samples);e.samples=e.samples.slice(E),e.dropped+=E,y+=(e.samples[0].pts-T)/(e.timescale||9e4)}else-1===E&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+S+" video samples"),g=!1);if(this.ISGenerated){if(C&&w){var L=this.getVideoStartPts(e.samples),A=(m(t.samples[0].pts,L)-L)/e.inputTimeScale;v+=Math.max(0,A),y+=Math.max(0,-A)}if(C){if(t.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(t,e,n)),h=this.remuxAudio(t,v,this.isAudioContiguous,s,x||w||a===c.PlaylistLevelType.AUDIO?y:void 0),w){var D=h?h.endPTS-h.startPTS:0;e.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(t,e,n)),u=this.remuxVideo(e,y,k,D)}}else w&&(u=this.remuxVideo(e,y,k,0));u&&(u.firstKeyFrame=E,u.independent=-1!==E)}}return this.ISGenerated&&(i.samples.length&&(p=this.remuxID3(i,n)),r.samples.length&&(f=this.remuxText(r,n))),{audio:h,video:u,initSegment:d,independent:g,text:f,id3:p}},e.generateIS=function(t,e,i){var n,o,a,l=t.samples,c=e.samples,u=this.typeSupported,h={},d=!Object(r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(n=o=1/0),t.config&&l.length&&(t.timescale=t.samplerate,t.isAAC||(u.mpeg?(f="audio/mpeg",t.codec=""):u.mp3&&(t.codec="mp3")),h.audio={id:"audio",container:f,codec:t.codec,initSegment:!t.isAAC&&u.mpeg?new Uint8Array(0):s.default.initSegment([t]),metadata:{channelCount:t.channelCount}},d&&(a=t.inputTimeScale,n=o=l[0].pts-Math.round(a*i))),e.sps&&e.pps&&c.length&&(e.timescale=e.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:e.codec,initSegment:s.default.initSegment([e]),metadata:{width:e.width,height:e.height}},d)){a=e.inputTimeScale;var p=this.getVideoStartPts(c),g=Math.round(a*i);o=Math.min(o,m(c[0].dts,p)-g),n=Math.min(n,p-g)}if(Object.keys(h).length)return this.ISGenerated=!0,d&&(this._initPTS=n,this._initDTS=o),{tracks:h,initPTS:n,timescale:a}},e.remuxVideo=function(t,e,i,r){var n,c,f,g=t.inputTimeScale,y=t.samples,b=[],x=y.length,S=this._initPTS,C=this.nextAvcDts,w=8,k=Number.POSITIVE_INFINITY,E=Number.NEGATIVE_INFINITY,T=0,L=!1;i&&null!==C||(C=e*g-(y[0].pts-m(y[0].dts,y[0].pts)));for(var A=0;AD.pts&&(T=Math.max(Math.min(T,D.pts-D.dts),-18e3)),D.dts0?A-1:A].dts&&(L=!0)}L&&y.sort((function(t,e){var i=t.dts-e.dts,r=t.pts-e.pts;return i||r})),c=y[0].dts,f=y[y.length-1].dts;var R=Math.round((f-c)/(x-1));if(T<0){if(T<-2*R){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-R,!0)+" ms");for(var O=T,_=0;_R;if(P||M<-1){P?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(M,!0)+" ms ("+M+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-M,!0)+" ms ("+M+"dts) overlapping between fragments detected"),c=C;var N=y[0].pts-M;y[0].dts=c,y[0].pts=N,l.logger.log("Video: First PTS/DTS adjusted: "+Object(u.toMsFromMpegTsClock)(N,!0)+"/"+Object(u.toMsFromMpegTsClock)(c,!0)+", delta: "+Object(u.toMsFromMpegTsClock)(M,!0)+" ms")}}p&&(c=Math.max(0,c));for(var F=0,B=0,j=0;j0?Y-1:Y].dts;if(rt.stretchShortVideoTrack&&null!==this.nextAudioPts){var st=Math.floor(rt.maxBufferHole*g),ot=(r?k+r*g:this.nextAudioPts)-X.pts;ot>st?((n=ot-nt)<0&&(n=nt),l.logger.log("[mp4-remuxer]: It is approximately "+ot/90+" ms to the next segment; using duration "+n/90+" ms for the last video frame.")):n=nt}else n=nt}var at=Math.round(X.pts-X.dts);b.push(new v(X.key,n,Z,at))}if(b.length&&d&&d<70){var lt=b[0].flags;lt.dependsOn=2,lt.isNonSync=0}console.assert(void 0!==n,"mp4SampleDuration must be computed"),this.nextAvcDts=C=f+n,this.isVideoContiguous=!0;var ct={data1:s.default.moof(t.sequenceNumber++,c,h({},t,{samples:b})),data2:V,startPTS:k/g,endPTS:(E+n)/g,startDTS:c/g,endDTS:C/g,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:t.dropped};return t.samples=[],t.dropped=0,console.assert(V.length,"MDAT length must not be zero"),ct},e.remuxAudio=function(t,e,i,r,c){var u=t.inputTimeScale,d=u/(t.samplerate?t.samplerate:u),f=t.isAAC?1024:1152,p=f*d,g=this._initPTS,y=!t.isAAC&&this.typeSupported.mpeg,b=[],x=t.samples,S=y?0:8,C=this.nextAudioPts||-1,w=e*u;if(this.isAudioContiguous=i=i||x.length&&C>0&&(r&&Math.abs(w-C)<9e3||Math.abs(m(x[0].pts-g,w)-C)<20*p),x.forEach((function(t){t.pts=m(t.pts-g,w)})),!i||C<0){if(!(x=x.filter((function(t){return t.pts>=0}))).length)return;C=0===c?0:r?Math.max(0,w):x[0].pts}if(t.isAAC)for(var k=void 0!==c,E=this.config.maxAudioFramesDrift,T=0,L=C;T=E*p&&O<1e4&&k){var _=Math.round(R/p);(L=D-_*p)<0&&(_--,L+=p),0===T&&(this.nextAudioPts=C=L),l.logger.warn("[mp4-remuxer]: Injecting "+_+" audio frame @ "+(L/u).toFixed(3)+"s due to "+Math.round(1e3*R/u)+" ms gap.");for(var I=0;I<_;I++){var M=Math.max(L,0),P=n.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);P||(l.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),P=A.unit.subarray()),x.splice(T,0,{unit:P,pts:M}),L+=p,T++}}A.pts=L,L+=p}for(var N,F=null,B=null,j=0,U=x.length;U--;)j+=x[U].unit.byteLength;for(var H=0,G=x.length;H0))return;j+=S;try{N=new Uint8Array(j)}catch(t){return void this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:a.ErrorTypes.MUX_ERROR,details:a.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:j,reason:"fail allocating audio mdat "+j})}y||(new DataView(N.buffer).setUint32(0,j),N.set(s.default.types.mdat,4))}N.set(W,S);var K=W.byteLength;S+=K,b.push(new v(!0,f,K,0)),B=V}var q=b.length;if(q){var Y=b[b.length-1];this.nextAudioPts=C=B+d*Y.duration;var X=y?new Uint8Array(0):s.default.moof(t.sequenceNumber++,F/d,h({},t,{samples:b}));t.samples=[];var $=F/u,Z=C/u,Q={data1:X,data2:N,startPTS:$,endPTS:Z,startDTS:$,endDTS:Z,type:"audio",hasAudio:!0,hasVideo:!1,nb:q};return this.isAudioContiguous=!0,console.assert(N.length,"MDAT length must not be zero"),Q}},e.remuxEmptyAudio=function(t,e,i,r){var s=t.inputTimeScale,o=s/(t.samplerate?t.samplerate:s),a=this.nextAudioPts,c=(null!==a?a:r.startDTS*s)+this._initDTS,u=r.endDTS*s+this._initDTS,h=1024*o,d=Math.ceil((u-c)/h),f=n.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var p=[],g=0;g4294967296;)t+=i;return t}var v=function(t,e,i,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=e,this.size=i,this.cts=r,this.flags=new y(t)},y=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": /*!******************************************!*\ !*** ./src/remux/passthrough-remuxer.ts ***! \******************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=r(/*! ../loader/fragment */"./src/loader/fragment.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts"),a=function(){function t(){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 e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){this.initPTS=t,this.lastEndDTS=null},e.resetNextTimestamp=function(){this.lastEndDTS=null},e.resetInitSegment=function(t,e,r){this.audioCodec=e,this.videoCodec=r,this.generateInitSegment(t),this.emitInitSegment=!0},e.generateInitSegment=function(t){var e=this.audioCodec,r=this.videoCodec;if(!t||!t.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var i=this.initData=Object(n.parseInitSegment)(t);e||(e=c(i.audio,s.ElementaryStreamTypes.AUDIO)),r||(r=c(i.video,s.ElementaryStreamTypes.VIDEO));var a={};i.audio&&i.video?a.audiovideo={container:"video/mp4",codec:e+","+r,initSegment:t,id:"main"}:i.audio?a.audio={container:"audio/mp4",codec:e,initSegment:t,id:"audio"}:i.video?a.video={container:"video/mp4",codec:r,initSegment:t,id:"main"}:o.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},e.remux=function(t,e,r,s,a){var c=this.initPTS,u=this.lastEndDTS,h={audio:void 0,video:void 0,text:s,id3:r,initSegment:void 0};Object(i.isFiniteNumber)(u)||(u=this.lastEndDTS=a||0);var d=e.samples;if(!d||!d.length)return h;var f={initPTS:void 0,timescale:1},p=this.initData;if(p&&p.length||(this.generateInitSegment(d),p=this.initData),!p||!p.length)return o.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),h;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1),Object(i.isFiniteNumber)(c)||(this.initPTS=f.initPTS=c=l(p,d,u));var g=Object(n.getDuration)(d,p),m=u,v=g+m;Object(n.offsetStartDTS)(p,d,c),g>0?this.lastEndDTS=v:(o.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!p.audio,b=!!p.video,x="";y&&(x+="audio"),b&&(x+="video");var S={data1:d,startPTS:m,startDTS:m,endPTS:v,endDTS:v,type:x,hasAudio:y,hasVideo:b,nb:1,dropped:0};return h.audio="audio"===S.type?S:void 0,h.video="audio"!==S.type?S:void 0,h.text=s,h.id3=r,h.initSegment=f,h},t}(),l=function(t,e,r){return Object(n.getStartDTS)(t,e)-r};function c(t,e){var r=null==t?void 0:t.codec;return r&&r.length>4?r:"hvc1"===r?"hvc1.1.c.L120.90":"av01"===r?"av01.0.04M.08":"avc1"===r||e===s.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}e.default=a},"./src/task-loop.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=i(/*! ../loader/fragment */"./src/loader/fragment.ts"),o=i(/*! ../utils/logger */"./src/utils/logger.ts"),a=function(){function t(){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 e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){this.initPTS=t,this.lastEndDTS=null},e.resetNextTimestamp=function(){this.lastEndDTS=null},e.resetInitSegment=function(t,e,i){this.audioCodec=e,this.videoCodec=i,this.generateInitSegment(t),this.emitInitSegment=!0},e.generateInitSegment=function(t){var e=this.audioCodec,i=this.videoCodec;if(!t||!t.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=Object(n.parseInitSegment)(t);e||(e=c(r.audio,s.ElementaryStreamTypes.AUDIO)),i||(i=c(r.video,s.ElementaryStreamTypes.VIDEO));var a={};r.audio&&r.video?a.audiovideo={container:"video/mp4",codec:e+","+i,initSegment:t,id:"main"}:r.audio?a.audio={container:"audio/mp4",codec:e,initSegment:t,id:"audio"}:r.video?a.video={container:"video/mp4",codec:i,initSegment:t,id:"main"}:o.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},e.remux=function(t,e,i,s,a){var c=this.initPTS,u=this.lastEndDTS,h={audio:void 0,video:void 0,text:s,id3:i,initSegment:void 0};Object(r.isFiniteNumber)(u)||(u=this.lastEndDTS=a||0);var d=e.samples;if(!d||!d.length)return h;var f={initPTS:void 0,timescale:1},p=this.initData;if(p&&p.length||(this.generateInitSegment(d),p=this.initData),!p||!p.length)return o.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),h;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1),Object(r.isFiniteNumber)(c)||(this.initPTS=f.initPTS=c=l(p,d,u));var g=Object(n.getDuration)(d,p),m=u,v=g+m;Object(n.offsetStartDTS)(p,d,c),g>0?this.lastEndDTS=v:(o.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!p.audio,b=!!p.video,x="";y&&(x+="audio"),b&&(x+="video");var S={data1:d,startPTS:m,startDTS:m,endPTS:v,endDTS:v,type:x,hasAudio:y,hasVideo:b,nb:1,dropped:0};return h.audio="audio"===S.type?S:void 0,h.video="audio"!==S.type?S:void 0,h.text=s,h.id3=i,h.initSegment=f,h},t}(),l=function(t,e,i){return Object(n.getStartDTS)(t,e)-i};function c(t,e){var i=null==t?void 0:t.codec;return i&&i.length>4?i:"hvc1"===i?"hvc1.1.c.L120.90":"av01"===i?"av01.0.04M.08":"avc1"===i||e===s.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}e.default=a},"./src/task-loop.ts": /*!**************************!*\ !*** ./src/task-loop.ts ***! \**************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return i}));var i=function(){function t(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var e=t.prototype;return e.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},e.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},e.onHandlerDestroyed=function(){},e.hasInterval=function(){return!!this._tickInterval},e.hasNextTick=function(){return!!this._tickTimer},e.setInterval=function(t){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,t),!0)},e.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},e.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},e.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},e.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},e.doTick=function(){},t}()},"./src/types/cmcd.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return r}));var r=function(){function t(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var e=t.prototype;return e.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},e.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},e.onHandlerDestroyed=function(){},e.hasInterval=function(){return!!this._tickInterval},e.hasNextTick=function(){return!!this._tickTimer},e.setInterval=function(t){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,t),!0)},e.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},e.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},e.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},e.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},e.doTick=function(){},t}()},"./src/types/cmcd.ts": /*!***************************!*\ !*** ./src/types/cmcd.ts ***! \***************************/ -/*! exports provided: CMCDVersion, CMCDObjectType, CMCDStreamingFormat, CMCDStreamType */function(t,e,r){"use strict";r.r(e),r.d(e,"CMCDVersion",(function(){return o})),r.d(e,"CMCDObjectType",(function(){return i})),r.d(e,"CMCDStreamingFormat",(function(){return n})),r.d(e,"CMCDStreamType",(function(){return s}));var i,n,s,o=1;!function(t){t.MANIFEST="m",t.AUDIO="a",t.VIDEO="v",t.MUXED="av",t.INIT="i",t.CAPTION="c",t.TIMED_TEXT="tt",t.KEY="k",t.OTHER="o"}(i||(i={})),function(t){t.DASH="d",t.HLS="h",t.SMOOTH="s",t.OTHER="o"}(n||(n={})),function(t){t.VOD="v",t.LIVE="l"}(s||(s={}))},"./src/types/level.ts": +/*! exports provided: CMCDVersion, CMCDObjectType, CMCDStreamingFormat, CMCDStreamType */function(t,e,i){"use strict";i.r(e),i.d(e,"CMCDVersion",(function(){return o})),i.d(e,"CMCDObjectType",(function(){return r})),i.d(e,"CMCDStreamingFormat",(function(){return n})),i.d(e,"CMCDStreamType",(function(){return s}));var r,n,s,o=1;!function(t){t.MANIFEST="m",t.AUDIO="a",t.VIDEO="v",t.MUXED="av",t.INIT="i",t.CAPTION="c",t.TIMED_TEXT="tt",t.KEY="k",t.OTHER="o"}(r||(r={})),function(t){t.DASH="d",t.HLS="h",t.SMOOTH="s",t.OTHER="o"}(n||(n={})),function(t){t.VOD="v",t.LIVE="l"}(s||(s={}))},"./src/types/level.ts": /*!****************************!*\ !*** ./src/types/level.ts ***! \****************************/ -/*! exports provided: HlsSkip, getSkipValue, HlsUrlParameters, Level */function(t,e,r){"use strict";function i(t,e){for(var r=0;rNumber.MAX_SAFE_INTEGER?1/0:e},e.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var r=new Uint8Array(e.length/2),i=0;iNumber.MAX_SAFE_INTEGER?1/0:e},e.decimalFloatingPoint=function(t){return parseFloat(this[t])},e.optionalFloat=function(t,e){var r=this[t];return r?parseFloat(r):e},e.enumeratedString=function(t){return this[t]},e.bool=function(t){return"YES"===this[t]},e.decimalResolution=function(t){var e=i.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,r={};for(n.lastIndex=0;null!==(e=n.exec(t));){var i=e[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),r[e[1]]=i}return r},t}()},"./src/utils/binary-search.ts": +/*! exports provided: AttrList */function(t,e,i){"use strict";i.r(e),i.d(e,"AttrList",(function(){return s}));var r=/^(\d+)x(\d+)$/,n=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,s=function(){function t(e){for(var i in"string"==typeof e&&(e=t.parseAttrList(e)),e)e.hasOwnProperty(i)&&(this[i]=e[i])}var e=t.prototype;return e.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},e.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var i=new Uint8Array(e.length/2),r=0;rNumber.MAX_SAFE_INTEGER?1/0:e},e.decimalFloatingPoint=function(t){return parseFloat(this[t])},e.optionalFloat=function(t,e){var i=this[t];return i?parseFloat(i):e},e.enumeratedString=function(t){return this[t]},e.bool=function(t){return"YES"===this[t]},e.decimalResolution=function(t){var e=r.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,i={};for(n.lastIndex=0;null!==(e=n.exec(t));){var r=e[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),i[e[1]]=r}return i},t}()},"./src/utils/binary-search.ts": /*!************************************!*\ !*** ./src/utils/binary-search.ts ***! \************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),e.default={search:function(t,e){for(var r=0,i=t.length-1,n=null,s=null;r<=i;){var o=e(s=t[n=(r+i)/2|0]);if(o>0)r=n+1;else{if(!(o<0))return s;i=n-1}}return null}}},"./src/utils/buffer-helper.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),e.default={search:function(t,e){for(var i=0,r=t.length-1,n=null,s=null;i<=r;){var o=e(s=t[n=(i+r)/2|0]);if(o>0)i=n+1;else{if(!(o<0))return s;r=n-1}}return null}}},"./src/utils/buffer-helper.ts": /*!************************************!*\ !*** ./src/utils/buffer-helper.ts ***! \************************************/ -/*! exports provided: BufferHelper */function(t,e,r){"use strict";r.r(e),r.d(e,"BufferHelper",(function(){return s}));var i=r(/*! ./logger */"./src/utils/logger.ts"),n={length:0,start:function(){return 0},end:function(){return 0}},s=function(){function t(){}return t.isBuffered=function(e,r){try{if(e)for(var i=t.getBuffered(e),n=0;n=i.start(n)&&r<=i.end(n))return!0}catch(t){}return!1},t.bufferInfo=function(e,r,i){try{if(e){var n,s=t.getBuffered(e),o=[];for(n=0;no&&(i[s-1].end=t[n].end):i.push(t[n])}else i.push(t[n])}else i=t;for(var a,l=0,c=e,u=e,h=0;h=d&&e=r.start(n)&&i<=r.end(n))return!0}catch(t){}return!1},t.bufferInfo=function(e,i,r){try{if(e){var n,s=t.getBuffered(e),o=[];for(n=0;no&&(r[s-1].end=t[n].end):r.push(t[n])}else r.push(t[n])}else r=t;for(var a,l=0,c=e,u=e,h=0;h=d&&e=t&&n.logger.log(this.time+" ["+t+"] "+e)},t}(),f=function(t){for(var e=[],r=0;r100&&(this.logger.log(i.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},e.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var r=this.pos+1;r=144&&this.backSpace();var e=o(t);this.pos>=100?this.logger.log(i.ERROR,"Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))},e.clearFromPos=function(t){var e;for(e=t;e<100;e++)this.chars[e].reset()},e.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.getTextString=function(){for(var t=[],e=!0,r=0;r<100;r++){var i=this.chars[r].uchar;" "!==i&&(e=!1),t.push(i)}return e?"":t.join("")},e.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),v=function(){function t(t){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var e=0;e<15;e++)this.rows.push(new m(t));this.logger=t,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var e=t.prototype;return e.reset=function(){for(var t=0;t<15;t++)this.rows[t].clear();this.currRow=14},e.equals=function(t){for(var e=!0,r=0;r<15;r++)if(!this.rows[r].equals(t.rows[r])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<15;e++)this.rows[e].copy(t.rows[e])},e.isEmpty=function(){for(var t=!0,e=0;e<15;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},e.backSpace=function(){this.rows[this.currRow].backSpace()},e.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},e.insertChar=function(t){this.rows[this.currRow].insertChar(t)},e.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},e.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},e.setCursor=function(t){this.logger.log(i.INFO,"setCursor: "+t),this.rows[this.currRow].setCursor(t)},e.setPAC=function(t){this.logger.log(i.INFO,"pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e0&&(r=t?"["+e.join(" | ")+"]":e.join("\n")),r},e.getTextAndFormat=function(){return this.rows},t}(),y=function(){function t(t,e,r){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=t,this.outputFilter=e,this.mode=null,this.verbose=0,this.displayedMemory=new v(r),this.nonDisplayedMemory=new v(r),this.lastOutputScreen=new v(r),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}var e=t.prototype;return e.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},e.getHandler=function(){return this.outputFilter},e.setHandler=function(t){this.outputFilter=t},e.setPAC=function(t){this.writeScreen.setPAC(t)},e.setBkgData=function(t){this.writeScreen.setBkgData(t)},e.setMode=function(t){t!==this.mode&&(this.mode=t,this.logger.log(i.INFO,"MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},e.insertChars=function(t){for(var e=0;e=46,e.italics)e.foreground="white";else{var r=Math.floor(t/2)-16;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}this.logger.log(i.INFO,"MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},e.outputDataUpdate=function(t){void 0===t&&(t=!1);var e=this.logger.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},e.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),b=function(){function t(t,e,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var i=new d;this.channels=[null,new y(t,e,i),new y(t+1,r,i)],this.cmdHistory={a:null,b:null},this.logger=i}var e=t.prototype;return e.getHandler=function(t){return this.channels[t].getHandler()},e.setHandler=function(t,e){this.channels[t].setHandler(e)},e.addData=function(t,e){var r,n,s,o=!1;this.logger.time=t;for(var a=0;a ("+f([n,s])+")"),(r=this.parseCmd(n,s))||(r=this.parseMidrow(n,s)),r||(r=this.parsePAC(n,s)),r||(r=this.parseBackgroundAttributes(n,s)),!r&&(o=this.parseChars(n,s))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(o):this.logger.log(i.WARNING,"No channel found yet. TEXT-MODE?")}r||o||this.logger.log(i.WARNING,"Couldn't parse cleaned data "+f([n,s])+" orig: "+f([e[a],e[a+1]]))}},e.parseCmd=function(t,e){var r=this.cmdHistory;if(!((20===t||28===t||21===t||29===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=33&&e<=35))return!1;if(S(t,e,r))return x(null,null,r),this.logger.log(i.DEBUG,"Repeated command ("+f([t,e])+") is dropped"),!0;var n=20===t||21===t||23===t?1:2,s=this.channels[n];return 20===t||21===t||28===t||29===t?32===e?s.ccRCL():33===e?s.ccBS():34===e?s.ccAOF():35===e?s.ccAON():36===e?s.ccDER():37===e?s.ccRU(2):38===e?s.ccRU(3):39===e?s.ccRU(4):40===e?s.ccFON():41===e?s.ccRDC():42===e?s.ccTR():43===e?s.ccRTD():44===e?s.ccEDM():45===e?s.ccCR():46===e?s.ccENM():47===e&&s.ccEOC():s.ccTO(e-32),x(t,e,r),this.currentChannel=n,!0},e.parseMidrow=function(t,e){var r=0;if((17===t||25===t)&&e>=32&&e<=47){if((r=17===t?1:2)!==this.currentChannel)return this.logger.log(i.ERROR,"Mismatch channel in midrow parsing"),!1;var n=this.channels[r];return!!n&&(n.ccMIDROW(e),this.logger.log(i.DEBUG,"MIDROW ("+f([t,e])+")"),!0)}return!1},e.parsePAC=function(t,e){var r,i=this.cmdHistory;if(!((t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127||(16===t||24===t)&&e>=64&&e<=95))return!1;if(S(t,e,i))return x(null,null,i),!0;var n=t<=23?1:2;r=e>=64&&e<=95?1===n?a[t]:c[t]:1===n?l[t]:u[t];var s=this.channels[n];return!!s&&(s.setPAC(this.interpretPAC(r,e)),x(t,e,i),this.currentChannel=n,!0)},e.interpretPAC=function(t,e){var r,i={color:null,italics:!1,indent:null,underline:!1,row:t};return r=e>95?e-96:e-64,i.underline=1==(1&r),r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i},e.parseChars=function(t,e){var r,n,s=null,a=null;if(t>=25?(r=2,a=t-8):(r=1,a=t),a>=17&&a<=19?(n=17===a?e+80:18===a?e+112:e+144,this.logger.log(i.INFO,"Special char '"+o(n)+"' in channel "+r),s=[n]):t>=32&&t<=127&&(s=0===e?[t]:[t,e]),s){var l=f(s);this.logger.log(i.DEBUG,"Char codes = "+l.join(",")),x(t,e,this.cmdHistory)}return s},e.parseBackgroundAttributes=function(t,e){var r;if(!((16===t||24===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=45&&e<=47))return!1;var i={};16===t||24===t?(r=Math.floor((e-32)/2),i.background=h[r],e%2==1&&(i.background=i.background+"_semi")):45===e?i.background="transparent":(i.foreground="black",47===e&&(i.underline=!0));var n=t<=23?1:2;return this.channels[n].setBkgData(i),x(t,e,this.cmdHistory),!0},e.reset=function(){for(var t=0;t=t&&n.logger.log(this.time+" ["+t+"] "+e)},t}(),f=function(t){for(var e=[],i=0;i100&&(this.logger.log(r.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},e.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var i=this.pos+1;i=144&&this.backSpace();var e=o(t);this.pos>=100?this.logger.log(r.ERROR,"Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))},e.clearFromPos=function(t){var e;for(e=t;e<100;e++)this.chars[e].reset()},e.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.getTextString=function(){for(var t=[],e=!0,i=0;i<100;i++){var r=this.chars[i].uchar;" "!==r&&(e=!1),t.push(r)}return e?"":t.join("")},e.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),v=function(){function t(t){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var e=0;e<15;e++)this.rows.push(new m(t));this.logger=t,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var e=t.prototype;return e.reset=function(){for(var t=0;t<15;t++)this.rows[t].clear();this.currRow=14},e.equals=function(t){for(var e=!0,i=0;i<15;i++)if(!this.rows[i].equals(t.rows[i])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<15;e++)this.rows[e].copy(t.rows[e])},e.isEmpty=function(){for(var t=!0,e=0;e<15;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},e.backSpace=function(){this.rows[this.currRow].backSpace()},e.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},e.insertChar=function(t){this.rows[this.currRow].insertChar(t)},e.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},e.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},e.setCursor=function(t){this.logger.log(r.INFO,"setCursor: "+t),this.rows[this.currRow].setCursor(t)},e.setPAC=function(t){this.logger.log(r.INFO,"pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e0&&(i=t?"["+e.join(" | ")+"]":e.join("\n")),i},e.getTextAndFormat=function(){return this.rows},t}(),y=function(){function t(t,e,i){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=t,this.outputFilter=e,this.mode=null,this.verbose=0,this.displayedMemory=new v(i),this.nonDisplayedMemory=new v(i),this.lastOutputScreen=new v(i),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}var e=t.prototype;return e.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},e.getHandler=function(){return this.outputFilter},e.setHandler=function(t){this.outputFilter=t},e.setPAC=function(t){this.writeScreen.setPAC(t)},e.setBkgData=function(t){this.writeScreen.setBkgData(t)},e.setMode=function(t){t!==this.mode&&(this.mode=t,this.logger.log(r.INFO,"MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},e.insertChars=function(t){for(var e=0;e=46,e.italics)e.foreground="white";else{var i=Math.floor(t/2)-16;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][i]}this.logger.log(r.INFO,"MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},e.outputDataUpdate=function(t){void 0===t&&(t=!1);var e=this.logger.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},e.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),b=function(){function t(t,e,i){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new d;this.channels=[null,new y(t,e,r),new y(t+1,i,r)],this.cmdHistory={a:null,b:null},this.logger=r}var e=t.prototype;return e.getHandler=function(t){return this.channels[t].getHandler()},e.setHandler=function(t,e){this.channels[t].setHandler(e)},e.addData=function(t,e){var i,n,s,o=!1;this.logger.time=t;for(var a=0;a ("+f([n,s])+")"),(i=this.parseCmd(n,s))||(i=this.parseMidrow(n,s)),i||(i=this.parsePAC(n,s)),i||(i=this.parseBackgroundAttributes(n,s)),!i&&(o=this.parseChars(n,s))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(o):this.logger.log(r.WARNING,"No channel found yet. TEXT-MODE?")}i||o||this.logger.log(r.WARNING,"Couldn't parse cleaned data "+f([n,s])+" orig: "+f([e[a],e[a+1]]))}},e.parseCmd=function(t,e){var i=this.cmdHistory;if(!((20===t||28===t||21===t||29===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=33&&e<=35))return!1;if(S(t,e,i))return x(null,null,i),this.logger.log(r.DEBUG,"Repeated command ("+f([t,e])+") is dropped"),!0;var n=20===t||21===t||23===t?1:2,s=this.channels[n];return 20===t||21===t||28===t||29===t?32===e?s.ccRCL():33===e?s.ccBS():34===e?s.ccAOF():35===e?s.ccAON():36===e?s.ccDER():37===e?s.ccRU(2):38===e?s.ccRU(3):39===e?s.ccRU(4):40===e?s.ccFON():41===e?s.ccRDC():42===e?s.ccTR():43===e?s.ccRTD():44===e?s.ccEDM():45===e?s.ccCR():46===e?s.ccENM():47===e&&s.ccEOC():s.ccTO(e-32),x(t,e,i),this.currentChannel=n,!0},e.parseMidrow=function(t,e){var i=0;if((17===t||25===t)&&e>=32&&e<=47){if((i=17===t?1:2)!==this.currentChannel)return this.logger.log(r.ERROR,"Mismatch channel in midrow parsing"),!1;var n=this.channels[i];return!!n&&(n.ccMIDROW(e),this.logger.log(r.DEBUG,"MIDROW ("+f([t,e])+")"),!0)}return!1},e.parsePAC=function(t,e){var i,r=this.cmdHistory;if(!((t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127||(16===t||24===t)&&e>=64&&e<=95))return!1;if(S(t,e,r))return x(null,null,r),!0;var n=t<=23?1:2;i=e>=64&&e<=95?1===n?a[t]:c[t]:1===n?l[t]:u[t];var s=this.channels[n];return!!s&&(s.setPAC(this.interpretPAC(i,e)),x(t,e,r),this.currentChannel=n,!0)},e.interpretPAC=function(t,e){var i,r={color:null,italics:!1,indent:null,underline:!1,row:t};return i=e>95?e-96:e-64,r.underline=1==(1&i),i<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(i/2)]:i<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((i-16)/2),r},e.parseChars=function(t,e){var i,n,s=null,a=null;if(t>=25?(i=2,a=t-8):(i=1,a=t),a>=17&&a<=19?(n=17===a?e+80:18===a?e+112:e+144,this.logger.log(r.INFO,"Special char '"+o(n)+"' in channel "+i),s=[n]):t>=32&&t<=127&&(s=0===e?[t]:[t,e]),s){var l=f(s);this.logger.log(r.DEBUG,"Char codes = "+l.join(",")),x(t,e,this.cmdHistory)}return s},e.parseBackgroundAttributes=function(t,e){var i;if(!((16===t||24===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=45&&e<=47))return!1;var r={};16===t||24===t?(i=Math.floor((e-32)/2),r.background=h[i],e%2==1&&(r.background=r.background+"_semi")):45===e?r.background="transparent":(r.foreground="black",47===e&&(r.underline=!0));var n=t<=23?1:2;return this.channels[n].setBkgData(r),x(t,e,this.cmdHistory),!0},e.reset=function(){for(var t=0;t=16?h--:h++;var v=Object(i.fixLineBreaks)(d.trim()),y=Object(n.generateCueId)(e,r,v);t&&t.cues&&t.cues.getCueById(y)||((c=new p(e,r,v)).id=y,c.line=g+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*h/32)),f.push(c))}return t&&f.length&&(f.sort((function(t,e){return"auto"===t.line||"auto"===e.line?0:t.line>8&&e.line>8?e.line-t.line:t.line-e.line})),f.forEach((function(e){return Object(s.addCueToTrack)(t,e)}))),f}};e.default=a},"./src/utils/discontinuities.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ./vttparser */"./src/utils/vttparser.ts"),n=i(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts"),s=i(/*! ./texttrack-utils */"./src/utils/texttrack-utils.ts"),o=/\s/,a={newCue:function(t,e,i,a){for(var l,c,u,h,d,f=[],p=self.VTTCue||self.TextTrackCue,g=0;g=16?h--:h++;var v=Object(r.fixLineBreaks)(d.trim()),y=Object(n.generateCueId)(e,i,v);t&&t.cues&&t.cues.getCueById(y)||((c=new p(e,i,v)).id=y,c.line=g+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*h/32)),f.push(c))}return t&&f.length&&(f.sort((function(t,e){return"auto"===t.line||"auto"===e.line?0:t.line>8&&e.line>8?e.line-t.line:t.line-e.line})),f.forEach((function(e){return Object(s.addCueToTrack)(t,e)}))),f}};e.default=a},"./src/utils/discontinuities.ts": /*!**************************************!*\ !*** ./src/utils/discontinuities.ts ***! \**************************************/ -/*! exports provided: findFirstFragWithCC, shouldAlignOnDiscontinuities, findDiscontinuousReferenceFrag, adjustSlidingStart, alignStream, alignPDT, alignFragmentByPDTDelta, alignMediaPlaylistByPDT */function(t,e,r){"use strict";r.r(e),r.d(e,"findFirstFragWithCC",(function(){return o})),r.d(e,"shouldAlignOnDiscontinuities",(function(){return a})),r.d(e,"findDiscontinuousReferenceFrag",(function(){return l})),r.d(e,"adjustSlidingStart",(function(){return u})),r.d(e,"alignStream",(function(){return h})),r.d(e,"alignPDT",(function(){return d})),r.d(e,"alignFragmentByPDTDelta",(function(){return f})),r.d(e,"alignMediaPlaylistByPDT",(function(){return p}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ./logger */"./src/utils/logger.ts"),s=r(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function o(t,e){for(var r=null,i=0,n=t.length;ir.startCC||t&&t.cci.startCC||t&&t.cc=this.minWeight_},e.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.destroy=function(){},t}();e.default=n},"./src/utils/ewma.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../utils/ewma */"./src/utils/ewma.ts"),n=function(){function t(t,e,i){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new r.default(t),this.fast_=new r.default(e)}var e=t.prototype;return e.update=function(t,e){var i=this.slow_,n=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new r.default(t,i.getEstimate(),i.getTotalWeight())),this.fast_.halfLife!==e&&(this.fast_=new r.default(e,n.getEstimate(),n.getTotalWeight()))},e.sample=function(t,e){var i=(t=Math.max(t,this.minDelayMs_))/1e3,r=8*e/i;this.fast_.sample(i,r),this.slow_.sample(i,r)},e.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},e.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.destroy=function(){},t}();e.default=n},"./src/utils/ewma.ts": /*!***************************!*\ !*** ./src/utils/ewma.ts ***! \***************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=t,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=e,this.totalWeight_=r}var e=t.prototype;return e.sample=function(t,e){var r=Math.pow(this.alpha_,t);this.estimate_=e*(1-r)+r*this.estimate_,this.totalWeight_+=t},e.getTotalWeight=function(){return this.totalWeight_},e.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);if(t)return this.estimate_/t}return this.estimate_},t}();e.default=i},"./src/utils/fetch-loader.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=function(){function t(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=t,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=e,this.totalWeight_=i}var e=t.prototype;return e.sample=function(t,e){var i=Math.pow(this.alpha_,t);this.estimate_=e*(1-i)+i*this.estimate_,this.totalWeight_+=t},e.getTotalWeight=function(){return this.totalWeight_},e.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);if(t)return this.estimate_/t}return this.estimate_},t}();e.default=r},"./src/utils/fetch-loader.ts": /*!***********************************!*\ !*** ./src/utils/fetch-loader.ts ***! \***********************************/ -/*! exports provided: fetchSupported, default */function(t,e,r){"use strict";r.r(e),r.d(e,"fetchSupported",(function(){return d}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),s=r(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function o(t){var e="function"==typeof Map?new Map:void 0;return(o=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return a(t,arguments,u(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),c(i,t)})(t)}function a(t,e,r){return(a=l()?Reflect.construct:function(t,e,r){var i=[null];i.push.apply(i,e);var n=new(Function.bind.apply(t,i));return r&&c(n,r.prototype),n}).apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(){return(h=Object.assign||function(t){for(var e=1;e=i&&n(e,r,o.flush(),t)):n(e,r,l,t),s()})).catch((function(){return Promise.reject()}))}()},t}();function p(t,e){return new self.Request(t.url,e)}var g=function(t){var e,r;function i(e,r,i){var n;return(n=t.call(this,e)||this).code=void 0,n.details=void 0,n.code=r,n.details=i,n}return r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,c(e,r),i}(o(Error));e.default=f},"./src/utils/imsc1-ttml-parser.ts": +/*! exports provided: fetchSupported, default */function(t,e,i){"use strict";i.r(e),i.d(e,"fetchSupported",(function(){return d}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),s=i(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function o(t){var e="function"==typeof Map?new Map:void 0;return(o=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return a(t,arguments,u(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,t)})(t)}function a(t,e,i){return(a=l()?Reflect.construct:function(t,e,i){var r=[null];r.push.apply(r,e);var n=new(Function.bind.apply(t,r));return i&&c(n,i.prototype),n}).apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(){return(h=Object.assign||function(t){for(var e=1;e=r&&n(e,i,o.flush(),t)):n(e,i,l,t),s()})).catch((function(){return Promise.reject()}))}()},t}();function p(t,e){return new self.Request(t.url,e)}var g=function(t){var e,i;function r(e,i,r){var n;return(n=t.call(this,e)||this).code=void 0,n.details=void 0,n.code=i,n.details=r,n}return i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,c(e,i),r}(o(Error));e.default=f},"./src/utils/imsc1-ttml-parser.ts": /*!****************************************!*\ !*** ./src/utils/imsc1-ttml-parser.ts ***! \****************************************/ -/*! exports provided: IMSC1_CODEC, parseIMSC1 */function(t,e,r){"use strict";r.r(e),r.d(e,"IMSC1_CODEC",(function(){return u})),r.d(e,"parseIMSC1",(function(){return p}));var i=r(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),n=r(/*! ./vttparser */"./src/utils/vttparser.ts"),s=r(/*! ./vttcue */"./src/utils/vttcue.ts"),o=r(/*! ../demux/id3 */"./src/demux/id3.ts"),a=r(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=r(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function c(){return(c=Object.assign||function(t){for(var e=1;e"):i}function a(t){if(self.console&&!0===t||"object"==typeof t){!function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i"):r}function a(t){if(self.console&&!0===t||"object"==typeof t){!function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r}function h(t,e){var r,i,n,s=[];if(!e.length)return s;"data"in t?(r=t.data,i=t.start,n=t.end):(i=0,n=(r=t).byteLength);for(var l=i;l1?l+u:n;if(a(r.subarray(l+4,l+8))===e[0])if(1===e.length)s.push({data:r,start:l+8,end:d});else{var f=h({data:r,start:l+8,end:d},e.slice(1));f.length&&o.apply(s,f)}l=d}return s}function d(t){var e=h(t,["moov"])[0],r=e?e.end:null,i=h(t,["sidx"]);if(!i||!i[0])return null;var n=[],s=i[0],o=s.data[0],a=0===o?8:16,u=c(s,a);a+=4,a+=0===o?8:16,a+=2;var d=s.end+0,f=l(s,a);a+=2;for(var p=0;p>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(s,g);g+=4,n.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/u,start:d,end:d+v-1}}),d+=v,a=g+=4}return{earliestPresentationTime:0,timescale:u,version:o,referencesCount:f,references:n,moovEndOffset:r}}function f(t){for(var e=[],r=h(t,["moov","trak"]),i=0;i>24,t[e+1]=i>>16&255,t[e+2]=i>>8&255,t[e+3]=255&i}function h(t,e){var i,r,n,s=[];if(!e.length)return s;"data"in t?(i=t.data,r=t.start,n=t.end):(r=0,n=(i=t).byteLength);for(var l=r;l1?l+u:n;if(a(i.subarray(l+4,l+8))===e[0])if(1===e.length)s.push({data:i,start:l+8,end:d});else{var f=h({data:i,start:l+8,end:d},e.slice(1));f.length&&o.apply(s,f)}l=d}return s}function d(t){var e=h(t,["moov"])[0],i=e?e.end:null,r=h(t,["sidx"]);if(!r||!r[0])return null;var n=[],s=r[0],o=s.data[0],a=0===o?8:16,u=c(s,a);a+=4,a+=0===o?8:16,a+=2;var d=s.end+0,f=l(s,a);a+=2;for(var p=0;p>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(s,g);g+=4,n.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/u,start:d,end:d+v-1}}),d+=v,a=g+=4}return{earliestPresentationTime:0,timescale:u,version:o,referencesCount:f,references:n,moovEndOffset:i}}function f(t){for(var e=[],i=h(t,["moov","trak"]),r=0;rt)&&(this.startTime=t),this.endTime=e,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},e.reset=function(){this.cueRanges=[]},t}()},"./src/utils/texttrack-utils.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return r}));var r=function(){function t(t,e){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=t,this.trackName=e}var e=t.prototype;return e.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},e.newCue=function(t,e,i){(null===this.startTime||this.startTime>t)&&(this.startTime=t),this.endTime=e,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)},e.reset=function(){this.cueRanges=[]},t}()},"./src/utils/texttrack-utils.ts": /*!**************************************!*\ !*** ./src/utils/texttrack-utils.ts ***! \**************************************/ -/*! exports provided: sendAddTrackEvent, addCueToTrack, clearCurrentCues, removeCuesInRange, getCuesInRange */function(t,e,r){"use strict";r.r(e),r.d(e,"sendAddTrackEvent",(function(){return n})),r.d(e,"addCueToTrack",(function(){return s})),r.d(e,"clearCurrentCues",(function(){return o})),r.d(e,"removeCuesInRange",(function(){return a})),r.d(e,"getCuesInRange",(function(){return l}));var i=r(/*! ./logger */"./src/utils/logger.ts");function n(t,e){var r;try{r=new Event("addtrack")}catch(t){(r=document.createEvent("Event")).initEvent("addtrack",!1,!1)}r.track=t,e.dispatchEvent(r)}function s(t,e){var r=t.mode;if("disabled"===r&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(e.id))try{if(t.addCue(e),!t.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(r){i.logger.debug("[texttrack-utils]: "+r);var n=new self.TextTrackCue(e.startTime,e.endTime,e.text);n.id=e.id,t.addCue(n)}"disabled"===r&&(t.mode=r)}function o(t){var e=t.mode;if("disabled"===e&&(t.mode="hidden"),t.cues)for(var r=t.cues.length;r--;)t.removeCue(t.cues[r]);"disabled"===e&&(t.mode=e)}function a(t,e,r){var i=t.mode;if("disabled"===i&&(t.mode="hidden"),t.cues&&t.cues.length>0)for(var n=l(t.cues,e,r),s=0;st[r].endTime)return-1;for(var i=0,n=r;i<=n;){var s=Math.floor((n+i)/2);if(et[s].startTime&&i-1)for(var s=n,o=t.length;s=e&&a.endTime<=r)i.push(a);else if(a.startTime>r)return i}return i}},"./src/utils/time-ranges.ts": +/*! exports provided: sendAddTrackEvent, addCueToTrack, clearCurrentCues, removeCuesInRange, getCuesInRange */function(t,e,i){"use strict";i.r(e),i.d(e,"sendAddTrackEvent",(function(){return n})),i.d(e,"addCueToTrack",(function(){return s})),i.d(e,"clearCurrentCues",(function(){return o})),i.d(e,"removeCuesInRange",(function(){return a})),i.d(e,"getCuesInRange",(function(){return l}));var r=i(/*! ./logger */"./src/utils/logger.ts");function n(t,e){var i;try{i=new Event("addtrack")}catch(t){(i=document.createEvent("Event")).initEvent("addtrack",!1,!1)}i.track=t,e.dispatchEvent(i)}function s(t,e){var i=t.mode;if("disabled"===i&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(e.id))try{if(t.addCue(e),!t.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(i){r.logger.debug("[texttrack-utils]: "+i);var n=new self.TextTrackCue(e.startTime,e.endTime,e.text);n.id=e.id,t.addCue(n)}"disabled"===i&&(t.mode=i)}function o(t){var e=t.mode;if("disabled"===e&&(t.mode="hidden"),t.cues)for(var i=t.cues.length;i--;)t.removeCue(t.cues[i]);"disabled"===e&&(t.mode=e)}function a(t,e,i){var r=t.mode;if("disabled"===r&&(t.mode="hidden"),t.cues&&t.cues.length>0)for(var n=l(t.cues,e,i),s=0;st[i].endTime)return-1;for(var r=0,n=i;r<=n;){var s=Math.floor((n+r)/2);if(et[s].startTime&&r-1)for(var s=n,o=t.length;s=e&&a.endTime<=i)r.push(a);else if(a.startTime>i)return r}return r}},"./src/utils/time-ranges.ts": /*!**********************************!*\ !*** ./src/utils/time-ranges.ts ***! \**********************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),e.default={toString:function(t){for(var e="",r=t.length,i=0;i1?e-1:0),i=1;i100)throw new Error("Position must be between 0 and 100.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",n({},l,{get:function(){return x},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");x=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",n({},l,{get:function(){return S},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");S=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",n({},l,{get:function(){return C},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");C=e,this.hasBeenReset=!0}})),a.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}()},"./src/utils/vttparser.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),e.default=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;var t=["","lr","rl"],e=["start","middle","end","left","right"];function i(t,e){if("string"!=typeof e)return!1;if(!Array.isArray(t))return!1;var i=e.toLowerCase();return!!~t.indexOf(i)&&i}function r(t){return i(e,t)}function n(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r100)throw new Error("Position must be between 0 and 100.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",n({},l,{get:function(){return x},set:function(t){var e=r(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");x=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",n({},l,{get:function(){return S},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");S=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",n({},l,{get:function(){return C},set:function(t){var e=r(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");C=e,this.hasBeenReset=!0}})),a.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}()},"./src/utils/vttparser.ts": /*!********************************!*\ !*** ./src/utils/vttparser.ts ***! \********************************/ -/*! exports provided: parseTimeStamp, fixLineBreaks, VTTParser */function(t,e,r){"use strict";r.r(e),r.d(e,"parseTimeStamp",(function(){return s})),r.d(e,"fixLineBreaks",(function(){return h})),r.d(e,"VTTParser",(function(){return d}));var i=r(/*! ./vttcue */"./src/utils/vttcue.ts"),n=function(){function t(){}return t.prototype.decode=function(t,e){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))},t}();function s(t){function e(t,e,r,i){return 3600*(0|t)+60*(0|e)+(0|r)+parseFloat(i||0)}var r=t.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return r?parseFloat(r[2])>59?e(r[2],r[3],0,r[4]):e(r[1],r[2],r[3],r[4]):null}var o=function(){function t(){this.values=Object.create(null)}var e=t.prototype;return e.set=function(t,e){this.get(t)||""===e||(this.values[t]=e)},e.get=function(t,e,r){return r?this.has(t)?this.values[t]:e[r]:this.has(t)?this.values[t]:e},e.has=function(t){return t in this.values},e.alt=function(t,e,r){for(var i=0;i=0&&r<=100)return this.set(t,r),!0}return!1},t}();function a(t,e,r,i){var n=i?t.split(i):[t];for(var s in n)if("string"==typeof n[s]){var o=n[s].split(r);2===o.length&&e(o[0],o[1])}}var l=new i.default(0,0,""),c="middle"===l.align?"middle":"center";function u(t,e,r){var i=t;function n(){var e=s(t);if(null===e)throw new Error("Malformed timestamp: "+i);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function u(){t=t.replace(/^\s+/,"")}if(u(),e.startTime=n(),u(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);t=t.substr(3),u(),e.endTime=n(),u(),function(t,e){var i=new o;a(t,(function(t,e){var n;switch(t){case"region":for(var s=r.length-1;s>=0;s--)if(r[s].id===e){i.set(t,r[s].region);break}break;case"vertical":i.alt(t,e,["rl","lr"]);break;case"line":n=e.split(","),i.integer(t,n[0]),i.percent(t,n[0])&&i.set("snapToLines",!1),i.alt(t,n[0],["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",c,"end"]);break;case"position":n=e.split(","),i.percent(t,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":i.percent(t,e);break;case"align":i.alt(t,e,["start",c,"end","left","right"])}}),/:/,/\s/),e.region=i.get("region",null),e.vertical=i.get("vertical","");var n=i.get("line","auto");"auto"===n&&-1===l.line&&(n=-1),e.line=n,e.lineAlign=i.get("lineAlign","start"),e.snapToLines=i.get("snapToLines",!0),e.size=i.get("size",100),e.align=i.get("align",c);var s=i.get("position","auto");"auto"===s&&50===l.position&&(s="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=s}(t,e)}function h(t){return t.replace(//gi,"\n")}var d=function(){function t(){this.state="INITIAL",this.buffer="",this.decoder=new n,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var e=t.prototype;return e.parse=function(t){var e=this;function r(){var t=e.buffer,r=0;for(t=h(t);r59?e(i[2],i[3],0,i[4]):e(i[1],i[2],i[3],i[4]):null}var o=function(){function t(){this.values=Object.create(null)}var e=t.prototype;return e.set=function(t,e){this.get(t)||""===e||(this.values[t]=e)},e.get=function(t,e,i){return i?this.has(t)?this.values[t]:e[i]:this.has(t)?this.values[t]:e},e.has=function(t){return t in this.values},e.alt=function(t,e,i){for(var r=0;r=0&&i<=100)return this.set(t,i),!0}return!1},t}();function a(t,e,i,r){var n=r?t.split(r):[t];for(var s in n)if("string"==typeof n[s]){var o=n[s].split(i);2===o.length&&e(o[0],o[1])}}var l=new r.default(0,0,""),c="middle"===l.align?"middle":"center";function u(t,e,i){var r=t;function n(){var e=s(t);if(null===e)throw new Error("Malformed timestamp: "+r);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function u(){t=t.replace(/^\s+/,"")}if(u(),e.startTime=n(),u(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);t=t.substr(3),u(),e.endTime=n(),u(),function(t,e){var r=new o;a(t,(function(t,e){var n;switch(t){case"region":for(var s=i.length-1;s>=0;s--)if(i[s].id===e){r.set(t,i[s].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":n=e.split(","),r.integer(t,n[0]),r.percent(t,n[0])&&r.set("snapToLines",!1),r.alt(t,n[0],["auto"]),2===n.length&&r.alt("lineAlign",n[1],["start",c,"end"]);break;case"position":n=e.split(","),r.percent(t,n[0]),2===n.length&&r.alt("positionAlign",n[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start",c,"end","left","right"])}}),/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical","");var n=r.get("line","auto");"auto"===n&&-1===l.line&&(n=-1),e.line=n,e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align",c);var s=r.get("position","auto");"auto"===s&&50===l.position&&(s="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=s}(t,e)}function h(t){return t.replace(//gi,"\n")}var d=function(){function t(){this.state="INITIAL",this.buffer="",this.decoder=new n,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var e=t.prototype;return e.parse=function(t){var e=this;function i(){var t=e.buffer,i=0;for(t=h(t);i>>0).toString()};function h(t,e,r){return u(t.toString())+u(e.toString())+u(r)}function d(t,e,r,u,d,f,p,g){var m,v=new n.VTTParser,y=Object(s.utf8ArrayToStr)(new Uint8Array(t)).trim().replace(l,"\n").split("\n"),b=[],x=Object(o.toMpegTsClockFromTimescale)(e,r),S="00:00.000",C=0,w=0,k=!0,E=!1;v.oncue=function(t){var e=u[d],r=u.ccOffset,i=(C-x)/9e4;if(null!=e&&e.new&&(void 0!==w?r=u.ccOffset=e.start:function(t,e,r){var i=t[e],n=t[i.prevCC];if(!n||!n.new&&i.new)return t.ccOffset=t.presentationOffset=i.start,void(i.new=!1);for(;null!==(s=n)&&void 0!==s&&s.new;){var s;t.ccOffset+=i.start-n.start,i.new=!1,n=t[(i=n).prevCC]}t.presentationOffset=r}(u,d,i)),i&&(r=i-u.presentationOffset),E){var n=t.endTime-t.startTime,s=Object(a.normalizePts)(9e4*(t.startTime+r-w),9e4*f)/9e4;t.startTime=s,t.endTime=s+n}var o=t.text.trim();t.text=decodeURIComponent(encodeURIComponent(o)),t.id||(t.id=h(t.startTime,t.endTime,o)),t.endTime>0&&b.push(t)},v.onparsingerror=function(t){m=t},v.onflush=function(){m?g(m):p(b)},y.forEach((function(t){if(k){if(c(t,"X-TIMESTAMP-MAP=")){k=!1,E=!0,t.substr(16).split(",").forEach((function(t){c(t,"LOCAL:")?S=t.substr(6):c(t,"MPEGTS:")&&(C=parseInt(t.substr(7)))}));try{w=function(t){var e=parseInt(t.substr(-3)),r=parseInt(t.substr(-6,2)),n=parseInt(t.substr(-9,2)),s=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;if(!(Object(i.isFiniteNumber)(e)&&Object(i.isFiniteNumber)(r)&&Object(i.isFiniteNumber)(n)&&Object(i.isFiniteNumber)(s)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+t);return e+=1e3*r,e+=6e4*n,e+=36e5*s}(S)/1e3}catch(t){E=!1,m=t}return}""===t&&(k=!1)}v.parse(t+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts": +/*! exports provided: generateCueId, parseWebVTT */function(t,e,i){"use strict";i.r(e),i.d(e,"generateCueId",(function(){return h})),i.d(e,"parseWebVTT",(function(){return d}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ./vttparser */"./src/utils/vttparser.ts"),s=i(/*! ../demux/id3 */"./src/demux/id3.ts"),o=i(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),a=i(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,c=function(t,e,i){return void 0===i&&(i=0),t.substr(i,e.length)===e},u=function(t){for(var e=5381,i=t.length;i;)e=33*e^t.charCodeAt(--i);return(e>>>0).toString()};function h(t,e,i){return u(t.toString())+u(e.toString())+u(i)}function d(t,e,i,u,d,f,p,g){var m,v=new n.VTTParser,y=Object(s.utf8ArrayToStr)(new Uint8Array(t)).trim().replace(l,"\n").split("\n"),b=[],x=Object(o.toMpegTsClockFromTimescale)(e,i),S="00:00.000",C=0,w=0,k=!0,E=!1;v.oncue=function(t){var e=u[d],i=u.ccOffset,r=(C-x)/9e4;if(null!=e&&e.new&&(void 0!==w?i=u.ccOffset=e.start:function(t,e,i){var r=t[e],n=t[r.prevCC];if(!n||!n.new&&r.new)return t.ccOffset=t.presentationOffset=r.start,void(r.new=!1);for(;null!==(s=n)&&void 0!==s&&s.new;){var s;t.ccOffset+=r.start-n.start,r.new=!1,n=t[(r=n).prevCC]}t.presentationOffset=i}(u,d,r)),r&&(i=r-u.presentationOffset),E){var n=t.endTime-t.startTime,s=Object(a.normalizePts)(9e4*(t.startTime+i-w),9e4*f)/9e4;t.startTime=s,t.endTime=s+n}var o=t.text.trim();t.text=decodeURIComponent(encodeURIComponent(o)),t.id||(t.id=h(t.startTime,t.endTime,o)),t.endTime>0&&b.push(t)},v.onparsingerror=function(t){m=t},v.onflush=function(){m?g(m):p(b)},y.forEach((function(t){if(k){if(c(t,"X-TIMESTAMP-MAP=")){k=!1,E=!0,t.substr(16).split(",").forEach((function(t){c(t,"LOCAL:")?S=t.substr(6):c(t,"MPEGTS:")&&(C=parseInt(t.substr(7)))}));try{w=function(t){var e=parseInt(t.substr(-3)),i=parseInt(t.substr(-6,2)),n=parseInt(t.substr(-9,2)),s=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;if(!(Object(r.isFiniteNumber)(e)&&Object(r.isFiniteNumber)(i)&&Object(r.isFiniteNumber)(n)&&Object(r.isFiniteNumber)(s)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+t);return e+=1e3*i,e+=6e4*n,e+=36e5*s}(S)/1e3}catch(t){E=!1,m=t}return}""===t&&(k=!1)}v.parse(t+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts": /*!*********************************!*\ !*** ./src/utils/xhr-loader.ts ***! \*********************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ../utils/logger */"./src/utils/logger.ts"),n=r(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),s=/^age:\s*[\d.]+\s*$/m,o=function(){function t(t){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=t?t.xhrSetup:null,this.stats=new n.LoadStats,this.retryDelay=0}var e=t.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,4!==t.readyState&&(this.stats.aborted=!0,t.abort()))},e.abort=function(){var t;this.abortInternal(),null!==(t=this.callbacks)&&void 0!==t&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(t,e,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=e,this.callbacks=r,this.retryDelay=e.retryDelay,this.loadInternal()},e.loadInternal=function(){var t=this.config,e=this.context;if(t){var r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0;var n=this.xhrSetup;try{if(n)try{n(r,e.url)}catch(t){r.open("GET",e.url,!0),n(r,e.url)}r.readyState||r.open("GET",e.url,!0);var s=this.context.headers;if(s)for(var o in s)r.setRequestHeader(o,s[o])}catch(t){return void this.callbacks.onError({code:r.status,text:t.message},e,r)}e.rangeEnd&&r.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=e.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout),r.send()}},e.readystatechange=function(){var t=this.context,e=this.loader,r=this.stats;if(t&&e){var n=e.readyState,s=this.config;if(!r.aborted&&n>=2)if(self.clearTimeout(this.requestTimeout),0===r.loading.first&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),4===n){e.onreadystatechange=null,e.onprogress=null;var o=e.status;if(o>=200&&o<300){var a,l;if(r.loading.end=Math.max(self.performance.now(),r.loading.first),l="arraybuffer"===t.responseType?(a=e.response).byteLength:(a=e.responseText).length,r.loaded=r.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(r,t,a,e),!this.callbacks)return;var u={url:e.responseURL,data:a};this.callbacks.onSuccess(u,r,t,e)}else r.retry>=s.maxRetry||o>=400&&o<499?(i.logger.error(o+" while loading "+t.url),this.callbacks.onError({code:o,text:e.statusText},t,e)):(i.logger.warn(o+" while loading "+t.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),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)}},e.loadtimeout=function(){i.logger.warn("timeout while loading "+this.context.url);var t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(t){var e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total)},e.getCacheAge=function(){var t=null;if(this.loader&&s.test(this.loader.getAllResponseHeaders())){var e=this.loader.getResponseHeader("age");t=e?parseFloat(e):null}return t},t}();e.default=o}}).default},t.exports=i())},vHTk: +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../utils/logger */"./src/utils/logger.ts"),n=i(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),s=/^age:\s*[\d.]+\s*$/m,o=function(){function t(t){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=t?t.xhrSetup:null,this.stats=new n.LoadStats,this.retryDelay=0}var e=t.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,4!==t.readyState&&(this.stats.aborted=!0,t.abort()))},e.abort=function(){var t;this.abortInternal(),null!==(t=this.callbacks)&&void 0!==t&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(t,e,i){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=e,this.callbacks=i,this.retryDelay=e.retryDelay,this.loadInternal()},e.loadInternal=function(){var t=this.config,e=this.context;if(t){var i=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var n=this.xhrSetup;try{if(n)try{n(i,e.url)}catch(t){i.open("GET",e.url,!0),n(i,e.url)}i.readyState||i.open("GET",e.url,!0);var s=this.context.headers;if(s)for(var o in s)i.setRequestHeader(o,s[o])}catch(t){return void this.callbacks.onError({code:i.status,text:t.message},e,i)}e.rangeEnd&&i.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),i.onreadystatechange=this.readystatechange.bind(this),i.onprogress=this.loadprogress.bind(this),i.responseType=e.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout),i.send()}},e.readystatechange=function(){var t=this.context,e=this.loader,i=this.stats;if(t&&e){var n=e.readyState,s=this.config;if(!i.aborted&&n>=2)if(self.clearTimeout(this.requestTimeout),0===i.loading.first&&(i.loading.first=Math.max(self.performance.now(),i.loading.start)),4===n){e.onreadystatechange=null,e.onprogress=null;var o=e.status;if(o>=200&&o<300){var a,l;if(i.loading.end=Math.max(self.performance.now(),i.loading.first),l="arraybuffer"===t.responseType?(a=e.response).byteLength:(a=e.responseText).length,i.loaded=i.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(i,t,a,e),!this.callbacks)return;var u={url:e.responseURL,data:a};this.callbacks.onSuccess(u,i,t,e)}else i.retry>=s.maxRetry||o>=400&&o<499?(r.logger.error(o+" while loading "+t.url),this.callbacks.onError({code:o,text:e.statusText},t,e)):(r.logger.warn(o+" while loading "+t.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),i.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)}},e.loadtimeout=function(){r.logger.warn("timeout while loading "+this.context.url);var t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(t){var e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total)},e.getCacheAge=function(){var t=null;if(this.loader&&s.test(this.loader.getAllResponseHeaders())){var e=this.loader.getResponseHeader("age");t=e?parseFloat(e):null}return t},t}();e.default=o}}).default},t.exports=r())},vHTk: /*!******************************************************!*\ !*** ./src/components/PreviewAll/index.less?modules ***! \******************************************************/ /*! no static exports found */ /*! exports used: default */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){t.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wzkS: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wzkS: /*!**************************************************!*\ !*** ./src/pages/MoopCases/FormPanel/service.ts ***! \**************************************************/ /*! exports provided: getMoopCase, getLibraryTags, removeAttachment, addMoopCase, updateMoopCase */ -/*! exports used: addMoopCase, getLibraryTags, getMoopCase, removeAttachment, updateMoopCase */function(t,e,r){"use strict";r.d(e,"c",(function(){return a})),r.d(e,"b",(function(){return l})),r.d(e,"d",(function(){return c})),r.d(e,"a",(function(){return h})),r.d(e,"e",(function(){return d}));var i=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),n=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),s=r.n(n),o=r(/*! @/utils/fetch */"ErOA");function a(t){return Object(o.c)("libraries/".concat(t,".json"))}function l(){return Object(o.c)("library_tags.json")}function c(t){return u.apply(this,arguments)}function u(){return(u=Object(i.a)(s.a.mark((function t(e){var r;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(o.b)("attachments/".concat(e,".json"));case 2:return r=t.sent,t.abrupt("return",0===r.status);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function h(t){return Object(o.f)("libraries.json",t)}function d(t,e){return Object(o.g)("libraries/".concat(t,".json"),e)}},y5JW: +/*! exports used: addMoopCase, getLibraryTags, getMoopCase, removeAttachment, updateMoopCase */function(t,e,i){"use strict";i.d(e,"c",(function(){return a})),i.d(e,"b",(function(){return l})),i.d(e,"d",(function(){return c})),i.d(e,"a",(function(){return h})),i.d(e,"e",(function(){return d}));var r=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),n=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),s=i.n(n),o=i(/*! @/utils/fetch */"ErOA");function a(t){return Object(o.c)("libraries/".concat(t,".json"))}function l(){return Object(o.c)("library_tags.json")}function c(t){return u.apply(this,arguments)}function u(){return(u=Object(r.a)(s.a.mark((function t(e){var i;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(o.b)("attachments/".concat(e,".json"));case 2:return i=t.sent,t.abrupt("return",0===i.status);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function h(t){return Object(o.f)("libraries.json",t)}function d(t,e){return Object(o.g)("libraries/".concat(t,".json"),e)}},y5JW: /*!***********************************************!*\ !*** ./src/components/SingleUpload/index.tsx ***! \***********************************************/ /*! exports provided: uploadNameSizeSeperator, bytesToSize, default */ -/*! exports used: bytesToSize, default, uploadNameSizeSeperator */function(t,e,r){"use strict";r.d(e,"c",(function(){return g})),r.d(e,"a",(function(){return m}));r(/*! antd/es/upload/style */"DZo9");var i=r(/*! antd/es/upload */"8z0m"),n=(r(/*! antd/es/button/style */"+L6B"),r(/*! antd/es/button */"2/Rp")),s=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),l=(r(/*! antd/es/message/style */"miYZ"),r(/*! antd/es/message */"tsqr")),c=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),u=r.n(c),h=r(/*! react */"q1tI"),d=r.n(h),f=r(/*! @/utils/env */"m3rI"),p=r(/*! @/pages/MoopCases/FormPanel/service */"wzkS"),g="  ";function m(t){if(0==t)return"0 Byte";var e=parseInt(""+Math.floor(Math.log(t)/Math.log(1024)),10);return(t/Math.pow(1024,e)).toFixed(1)+" "+["Bytes","KB","MB","GB","TB"][e]}e.b=function(t){var e,r=t.value,c=void 0===r?[]:r,h=(t.action,t.onChange),v=t.className,y=t.maxSize,b=void 0===y?150:y,x=t.title,S=void 0===x?"文件上传":x,C=t.accept,w={multiple:!1,fileList:c,accept:void 0===C?null:C,withCredentials:!0,beforeUpload:function(t){return t.size/1024/10240?"每次只能上传一个资源, 删除下面资源可重新上传 ":"",disabled:c.length>0,ghost:!0},S),d.a.createElement("span",{onClick:function(t){t.preventDefault(),t.stopPropagation()},style:{marginLeft:10}},"(单个文件最大",b,"M) ")))}},yBfY: +/*! exports used: bytesToSize, default, uploadNameSizeSeperator */function(t,e,i){"use strict";i.d(e,"c",(function(){return g})),i.d(e,"a",(function(){return m}));i(/*! antd/es/upload/style */"DZo9");var r=i(/*! antd/es/upload */"8z0m"),n=(i(/*! antd/es/button/style */"+L6B"),i(/*! antd/es/button */"2/Rp")),s=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),l=(i(/*! antd/es/message/style */"miYZ"),i(/*! antd/es/message */"tsqr")),c=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),u=i.n(c),h=i(/*! react */"q1tI"),d=i.n(h),f=i(/*! @/utils/env */"m3rI"),p=i(/*! @/pages/MoopCases/FormPanel/service */"wzkS"),g="  ";function m(t){if(0==t)return"0 Byte";var e=parseInt(""+Math.floor(Math.log(t)/Math.log(1024)),10);return(t/Math.pow(1024,e)).toFixed(1)+" "+["Bytes","KB","MB","GB","TB"][e]}e.b=function(t){var e,i=t.value,c=void 0===i?[]:i,h=(t.action,t.onChange),v=t.className,y=t.maxSize,b=void 0===y?150:y,x=t.title,S=void 0===x?"文件上传":x,C=t.accept,w={multiple:!1,fileList:c,accept:void 0===C?null:C,withCredentials:!0,beforeUpload:function(t){return t.size/1024/10240?"每次只能上传一个资源, 删除下面资源可重新上传 ":"",disabled:c.length>0,ghost:!0},S),d.a.createElement("span",{onClick:function(t){t.preventDefault(),t.stopPropagation()},style:{marginLeft:10}},"(单个文件最大",b,"M) ")))}},yBfY: /*!**********************************************************************!*\ !*** ./src/pages/Classrooms/Lists/CommonHomework/EditWork/index.tsx ***! \**********************************************************************/ /*! exports provided: default */ /*! all exports used */ -/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/.umi-production/core/routes.ts (referenced with import()) */function(t,e,r){"use strict";r.r(e);r(/*! antd/es/button/style */"+L6B");var i=r(/*! antd/es/button */"2/Rp"),n=(r(/*! antd/es/breadcrumb/style */"sPJy"),r(/*! antd/es/breadcrumb */"bE4q")),s=(r(/*! antd/es/modal/style */"2qtc"),r(/*! antd/es/modal */"kLXV")),o=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),l=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),c=(r(/*! antd/es/form/style */"y8nQ"),r(/*! antd/es/form */"Vl3Y")),u=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),h=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),d=r.n(h),f=r(/*! react */"q1tI"),p=r.n(f),g=r(/*! umi */"Ty5D"),m=r(/*! umi */"9kvl"),v=r(/*! umi */"55Ip"),y=r(/*! @/components/markdown-editor */"Ot1p"),b=r(/*! @/service/shixunHomeworks */"XYT7"),x=r(/*! ./index.less?modules */"kIve"),S=r.n(x),C=r(/*! @/components/MultiUpload */"500L");e.default=Object(m.a)((function(t){var e=t.shixunHomeworks,r=t.newCourse,i=t.loading;return{shixunHomeworks:e,newCourse:r,globalSetting:t.globalSetting,loading:i.effects}}))((function(t){var e=t.shixunHomeworks,r=t.loading,h=t.dispatch,x=t.match,w=Object(g.i)(),k=c.a.useForm(),E=Object(u.a)(k,1)[0],T=Object(f.useState)({}),L=Object(u.a)(T,2),A=L[0],D=L[1],R=Object(f.useState)(!0),O=Object(u.a)(R,2),_=(O[0],O[1]),I=Object(f.useState)(!1),M=Object(u.a)(I,2),P=(M[0],M[1]),N=Object(f.useState)(),F=Object(u.a)(N,2),B=(F[0],F[1],Object(f.useRef)(),e.studentWorkEditDefaultData),j=Object(f.useState)([]),U=Object(u.a)(j,2),H=U[0],G=U[1],z=Object(f.useState)([]),W=Object(u.a)(z,2),V=(W[0],W[1]),K=Object(f.useState)({page:1,limit:20,search:""}),q=Object(u.a)(K,2),Y=q[0],X=(q[1],function(){var t=Object(l.a)(d.a.mark((function t(){var e,r;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return P(!0),t.next=3,h({type:"shixunHomeworks/getSearchMemberList",payload:Object(a.a)(Object(a.a)({},x.params),Y)});case 3:r=t.sent,P(!1),r.members&&G([].concat(Object(o.a)(H),Object(o.a)(r.members))),(null===(e=r.members)||void 0===e?void 0:e.length)<20&&_(!1);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}());Object(f.useEffect)((function(){new Promise(Object(l.a)(d.a.mark((function t(){var e;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,X();case 2:return t.next=4,h({type:"shixunHomeworks/editStudentWorkDefaultData",payload:Object(a.a)(Object(a.a)({},x.params),{},{type:3})});case 4:e=t.sent,V(null==e?void 0:e.members),E.setFieldsValue({attachment_ids:Object(C.a)(e.attachments),description:e.description});case 7:case"end":return t.stop()}}),t)}))))}),[]);var $=function(){var t=Object(l.a)(d.a.mark((function t(e){return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(b.r)(Object(a.a)(Object(a.a)(Object(a.a)({},x.params),e),{},{type:3}));case 2:0===t.sent.status&&m.d.push("/classrooms/".concat(w.coursesId,"/common_homework/").concat(w.commonHomeworkId,"/review/").concat(w.homeworkId));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Z=function(){var t=Object(l.a)(d.a.mark((function t(e){var r,i,n;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(i=Object(a.a)({},A)).attachment_ids&&(i.attachment_ids=null==i||null===(n=i.attachment_ids)||void 0===n?void 0:n.map((function(t){return t.response.id}))),i.attachment_ids&&null!==(r=i.attachment_ids)&&void 0!==r&&r.length?$(i):s.a.confirm({title:p.a.createElement("div",null,"还未上传附件",p.a.createElement("br",null),"是否确认提交作品?"),onOk:function(){$(i)}});case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return p.a.createElement("section",{className:S.a.bg},B.course_name&&p.a.createElement("section",{className:"animated fadeIn"},p.a.createElement("aside",{className:"mt10"},B.category&&p.a.createElement(n.a,{separator:">"},p.a.createElement(n.a.Item,null,p.a.createElement(v.a,{to:"/classrooms/".concat(B.course_id,"/group_homework")},B.course_name)),p.a.createElement(n.a.Item,null,p.a.createElement(v.a,{to:"/classrooms/".concat(B.course_id,"/group_homework")},B.category.category_name)),p.a.createElement(n.a.Item,null,null==B?void 0:B.user_name," 提交作品")))),p.a.createElement("aside",{className:"font24 bold mt20 mb20"},B.homework_name),p.a.createElement(c.a,{form:E,className:S.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){D(Object(a.a)({},E.getFieldsValue())),console.log("formValue:",A)},initialValues:[{base_on_project:1}],onFinish:Z},p.a.createElement("div",{className:S.a.mdWrap},p.a.createElement(c.a.Item,{name:"description",label:"内容:",rules:[{required:!0,message:"请输入作业的简介"},{max:65535,message:"作业简介最大限制65535个字符"}]},p.a.createElement(y.a,{watch:!0,defaultValue:B.description})),p.a.createElement("div",null,B.course_name&&p.a.createElement(c.a.Item,{name:"attachment_ids"},p.a.createElement(C.b,null)))),p.a.createElement("div",{className:S.a.backgroundFa},p.a.createElement("div",{className:"pt40 mb30"},p.a.createElement(c.a.Item,null,p.a.createElement(i.a,{size:"large",type:"primary",className:"".concat(S.a.button," mr20"),htmlType:"submit",loading:r["newCourse/editCourse"]||r["newCourse/submitCourse"]},"提交"),p.a.createElement(i.a,{size:"large",type:"primary",ghost:!0,className:S.a.button,onClick:function(){return m.d.push("/classrooms/".concat(x.params.coursesId,"/common_homework/").concat(x.params.commonHomeworkId,"/detail"))}},"取消"))))))}))}}]); \ No newline at end of file +/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/.umi-production/core/routes.ts (referenced with import()) */function(t,e,i){"use strict";i.r(e);i(/*! antd/es/button/style */"+L6B");var r=i(/*! antd/es/button */"2/Rp"),n=(i(/*! antd/es/breadcrumb/style */"sPJy"),i(/*! antd/es/breadcrumb */"bE4q")),s=(i(/*! antd/es/message/style */"miYZ"),i(/*! antd/es/message */"tsqr")),o=(i(/*! antd/es/modal/style */"2qtc"),i(/*! antd/es/modal */"kLXV")),a=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),l=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),c=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),u=(i(/*! antd/es/form/style */"y8nQ"),i(/*! antd/es/form */"Vl3Y")),h=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),d=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),f=i.n(d),p=i(/*! react */"q1tI"),g=i.n(p),m=i(/*! umi */"Ty5D"),v=i(/*! umi */"9kvl"),y=i(/*! umi */"55Ip"),b=i(/*! @/components/markdown-editor */"Ot1p"),x=i(/*! @/service/shixunHomeworks */"XYT7"),S=i(/*! ./index.less?modules */"kIve"),C=i.n(S),w=i(/*! @/components/MultiUpload */"500L"),k=i(/*! @/service/shixuns */"HBuW");e.default=Object(v.a)((function(t){var e=t.shixunHomeworks,i=t.newCourse,r=t.loading;return{shixunHomeworks:e,newCourse:i,globalSetting:t.globalSetting,loading:r.effects}}))((function(t){var e,i,d,S=t.shixunHomeworks,E=t.loading,T=t.dispatch,L=t.match,A=Object(m.i)(),D=u.a.useForm(),R=Object(h.a)(D,1)[0],O=Object(p.useState)({}),_=Object(h.a)(O,2),I=(_[0],_[1],Object(p.useState)(!0)),M=Object(h.a)(I,2),P=(M[0],M[1]),N=Object(p.useState)(!1),F=Object(h.a)(N,2),B=(F[0],F[1]),j=Object(p.useState)(),U=Object(h.a)(j,2),H=(U[0],U[1],Object(p.useRef)(),S.studentWorkEditDefaultData),G=Object(p.useState)([]),z=Object(h.a)(G,2),W=z[0],V=z[1],K=Object(p.useState)([]),q=Object(h.a)(K,2),Y=(q[0],q[1]),X=(S.replyList,S.workDetail),$=Object(p.useState)({page:1,limit:20,search:""}),Z=Object(h.a)($,2),Q=Z[0],J=(Z[1],function(){var t=Object(c.a)(f.a.mark((function t(){var e,i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return B(!0),t.next=3,T({type:"shixunHomeworks/getSearchMemberList",payload:Object(l.a)(Object(l.a)({},L.params),Q)});case 3:i=t.sent,""!==A.commonHomeworkId&&(A.categoryId=A.commonHomeworkId,T({type:"shixunHomeworks/getWorkDetail",payload:Object(l.a)({},A)})),B(!1),i.members&&V([].concat(Object(a.a)(W),Object(a.a)(i.members))),(null===(e=i.members)||void 0===e?void 0:e.length)<20&&P(!1);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}());Object(p.useEffect)((function(){new Promise(Object(c.a)(f.a.mark((function t(){var e;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,J();case 2:return t.next=4,T({type:"shixunHomeworks/editStudentWorkDefaultData",payload:Object(l.a)(Object(l.a)({},L.params),{},{type:3})});case 4:e=t.sent,Y(null==e?void 0:e.members),R.setFieldsValue({attachment_ids:Object(w.a)(e.attachments),description:e.description});case 7:case"end":return t.stop()}}),t)}))))}),[]);var tt=function(t){o.a.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:g.a.createElement("div",{className:"tc font16"},"目前该实践项目尚在内测中,将于",t,"之后开放,谢谢!")})},et=function(){var t,e;null!=X&&null!==(t=X.shixun_info)&&void 0!==t&&t.is_jupyter||null!=X&&null!==(e=X.shixun_info)&&void 0!==e&&e.is_jupyter_lab?T({type:"shixunsDetail/execJupyter",payload:{id:null==X?void 0:X.shixun_info.identifier}}).then((function(t){null!=t&&t.identifier&&(null===v.d||void 0===v.d||v.d.push("/tasks/".concat(t.identifier,"/jupyter")))})):T({type:"shixunsDetail/execShixun",payload:{id:null==X?void 0:X.shixun_info.identifier}}).then((function(t){null!=t&&t.game_identifier?null===v.d||void 0===v.d||v.d.push("/tasks/".concat(t.game_identifier)):2===(null==t?void 0:t.status)?function t(e){var i,r;e=null!==(i=e)&&void 0!==i&&i.includes(".json")?e:"".concat(e,".json"),o.a.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:g.a.createElement("div",{className:"tc font16"},"实训已经更新了,正在为您重置!"),onOk:(r=Object(c.a)(f.a.mark((function i(){var r,n;return f.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Object(k.Ab)({url:e});case 2:if(r=i.sent){i.next=5;break}return i.abrupt("return");case 5:return s.b.success("重置成功,正在进入实训!"),i.next=8,Object(k.D)({id:r.shixun_identifier});case 8:if(null==(n=i.sent)||!n.game_identifier){i.next=12;break}return null===v.d||void 0===v.d||v.d.push("/tasks/".concat(n.game_identifier)),i.abrupt("return");case 12:2===(null==n?void 0:n.status)?t(null==n?void 0:n.message):3===(null==n?void 0:n.status)&&tt(null==n?void 0:n.message);case 13:case"end":return i.stop()}}),i)}))),function(){return r.apply(this,arguments)})})}(null==t?void 0:t.message):3===(null==t?void 0:t.status)&&tt(null==t?void 0:t.message)}))},it=function(){var t=Object(c.a)(f.a.mark((function t(e){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(x.r)(Object(l.a)(Object(l.a)(Object(l.a)({},L.params),e),{},{type:3}));case 2:0===t.sent.status&&v.d.push("/classrooms/".concat(A.coursesId,"/common_homework/").concat(A.commonHomeworkId,"/review/").concat(A.homeworkId));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),rt=function(){var t=Object(c.a)(f.a.mark((function t(e){var i,r,n;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=Object(l.a)({},R.getFieldsValue())).attachment_ids&&(r.attachment_ids=null==r||null===(n=r.attachment_ids)||void 0===n?void 0:n.map((function(t){return t.response.id}))),r.attachment_ids&&null!==(i=r.attachment_ids)&&void 0!==i&&i.length?it(r):o.a.confirm({title:g.a.createElement("div",null,"还未上传附件",g.a.createElement("br",null),"是否确认提交作品?"),onOk:function(){it(r)}});case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return g.a.createElement("section",{className:C.a.bg},g.a.createElement("div",null,H.course_name&&g.a.createElement("section",{className:"animated fadeIn"},g.a.createElement("aside",null,H.category&&g.a.createElement(n.a,{separator:">"},g.a.createElement(n.a.Item,null,g.a.createElement(y.a,{to:"/classrooms/".concat(H.course_id,"/group_homework")},H.course_name)),g.a.createElement(n.a.Item,null,g.a.createElement(y.a,{to:"/classrooms/".concat(H.course_id,"/group_homework")},H.category.category_name)),g.a.createElement(n.a.Item,null,null==H?void 0:H.user_name," 提交作品")))),g.a.createElement(u.a,{form:R,className:C.a.formWrap,scrollToFirstError:!0,layout:"vertical",initialValues:[{base_on_project:1}],onFinish:rt},g.a.createElement("div",{className:C.a.mdWrap},g.a.createElement("div",{className:C.a.titleWrapper},g.a.createElement("div",{className:"zuoyeTitle"},null==H?void 0:H.homework_name),g.a.createElement("div",null,g.a.createElement("div",{className:"zuoyemiaosu"},g.a.createElement("span",{className:"icon"}),g.a.createElement("h4",{className:"direction"},"作业描述")),g.a.createElement("div",{style:{height:"690px",overflowY:"auto"},dangerouslySetInnerHTML:{__html:null==H?void 0:H.homework_description}}),-1!=(null==X||null===(e=X.shixun_info)||void 0===e?void 0:e.shixun_status)&&(null==X?void 0:X.is_shixun)&&g.a.createElement(r.a,{onClick:function(){et()},style:{position:"absolute",bottom:"30px",left:"30px"},className:"btnWrapper",type:"primary"},g.a.createElement("i",{className:"iconfont icon-jixutiaozhan mr10 font14"}),null==X||null===(i=X.shixun_info)||void 0===i||null===(d=i.task_operation)||void 0===d?void 0:d[0]))),g.a.createElement("div",{style:{background:"#fff",width:"954px",paddingTop:"30px",paddingLeft:"37px",paddingRight:"26px",position:"relative"}},g.a.createElement(u.a.Item,{name:"description",label:"内容:",rules:[{required:!0,message:"请输入作业的简介"},{max:65535,message:"作业简介最大限制65535个字符"}]},g.a.createElement(b.a,{watch:!0,defaultValue:H.description,height:665})),g.a.createElement("div",null,g.a.createElement(u.a.Item,{name:"attachment_ids"},g.a.createElement(w.b,null))))))),g.a.createElement("div",{className:C.a.backgroundFa},g.a.createElement("div",{style:{width:1378,display:"flex",justifyContent:"end"}},g.a.createElement(u.a.Item,null,g.a.createElement(r.a,{size:"large",type:"primary",ghost:!0,className:C.a.button,style:{width:"60px",height:"32px",background:"#F8F9FC",borderRadius:"2px",border:"1px solid #C3CFE0",marginRight:"20px"},onClick:function(){return v.d.push("/classrooms/".concat(L.params.coursesId,"/common_homework/").concat(L.params.commonHomeworkId,"/detail"))}},"取消"),g.a.createElement(r.a,{size:"large",type:"primary",className:"".concat(C.a.button," "),style:{height:"32px"},htmlType:"submit",onClick:function(){R.submit()},loading:E["newCourse/editCourse"]||E["newCourse/submitCourse"]},"提交")))))}))}}]); \ No newline at end of file diff --git a/p__Classrooms__Lists__CommonHomework__EditWork__index.ee9d97c7.chunk.css b/p__Classrooms__Lists__CommonHomework__EditWork__index.722b059e.chunk.css similarity index 95% rename from p__Classrooms__Lists__CommonHomework__EditWork__index.ee9d97c7.chunk.css rename to p__Classrooms__Lists__CommonHomework__EditWork__index.722b059e.chunk.css index c536abcf5d..9b1250bbe1 100644 --- a/p__Classrooms__Lists__CommonHomework__EditWork__index.ee9d97c7.chunk.css +++ b/p__Classrooms__Lists__CommonHomework__EditWork__index.722b059e.chunk.css @@ -1217,10 +1217,16 @@ span.CodeMirror-selectedtext { box-orient: block-axis; } .bg___2KgPr { - margin: 0 auto; - width: 1200px; - margin-top: 20px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + width: 100vw; + position: relative; margin-bottom: 60px; + padding-bottom: 140px; + background: #f5f5f5; + padding-top: 20px; } .flexRow___20msk { display: flex; @@ -1269,15 +1275,60 @@ span.CodeMirror-selectedtext { font-size: 14px; } .mdWrap___1BgRF { + display: flex; background-color: #fff; - padding: 10px 20px 10px; margin-top: 10px; } +.mdWrap___1BgRF .titleWrapper___3xrLI { + width: 424px; + position: relative; + background: #fafafa; + padding-left: 30px; + max-height: 800px; + overflow: auto; +} +.mdWrap___1BgRF .titleWrapper___3xrLI div[class~='zuoyeTitle'] { + margin-top: 30px; + font-size: 16px; + margin-bottom: 30px; +} +.mdWrap___1BgRF .titleWrapper___3xrLI div[class~='zuoyemiaosu'] { + display: flex; + align-items: center; + margin-bottom: 16px; +} +.mdWrap___1BgRF .titleWrapper___3xrLI div[class~='zuoyemiaosu'] span[class~='icon'] { + width: 4px; + height: 14px; + background: #3a3a3a; + margin-right: 8px; +} +.mdWrap___1BgRF .titleWrapper___3xrLI div[class~='zuoyemiaosu'] h4[class~='direction'] { + width: 56px; + height: 14px; +} +.mdWrap___1BgRF .titleWrapper___3xrLI div[class~='zuoyemiaosu'] button[class~='btnWrapper'] { + position: absolute; + bottom: 30px; + left: 30px; +} .mdWrap___1BgRF div[class~='ant-form-item-label'] label { font-size: 14px; } .backgroundFa___1Q2SP { - background: #fafafa; + display: flex; + width: 100vw; + position: absolute; + bottom: 0; + justify-content: center; + align-items: center; + height: 64px; + margin-top: 30px; + background: #ffffff linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%); + box-shadow: 0px -2px 4px 0px #e0dfe1, inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5); +} +.backgroundFa___1Q2SP [class~='ant-form-item'] { + margin-bottom: 0 !important; } .button___17k3W { width: 130px; diff --git a/p__Classrooms__Lists__CommonHomework__SubmitWork__index.776aae51.async.js b/p__Classrooms__Lists__CommonHomework__SubmitWork__index.192033da.async.js similarity index 60% rename from p__Classrooms__Lists__CommonHomework__SubmitWork__index.776aae51.async.js rename to p__Classrooms__Lists__CommonHomework__SubmitWork__index.192033da.async.js index bbef54935c..9cde1a8fea 100644 --- a/p__Classrooms__Lists__CommonHomework__SubmitWork__index.776aae51.async.js +++ b/p__Classrooms__Lists__CommonHomework__SubmitWork__index.192033da.async.js @@ -3,50 +3,50 @@ !*** ./node_modules/codemirror/mode/stex/stex.js ***! \***************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){"use strict";t.defineMode("stex",(function(t,e){function r(t,e){t.cmdState.push(e)}function i(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function n(t,e,r){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=r,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var s={};function o(t,e){t.f=e}function a(t,e){var n;if(t.match(/^\\[a-zA-Z@]+/)){var a=t.current().slice(1);return r(e,n=new(n=s.hasOwnProperty(a)?s[a]:s.DEFAULT)),o(e,c),n.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return o(e,(function(t,e){return l(t,e,"\\]")})),"keyword";if(t.match("\\("))return o(e,(function(t,e){return l(t,e,"\\)")})),"keyword";if(t.match("$$"))return o(e,(function(t,e){return l(t,e,"$$")})),"keyword";if(t.match("$"))return o(e,(function(t,e){return l(t,e,"$")})),"keyword";var u=t.next();return"%"==u?(t.skipToEnd(),"comment"):"}"==u||"]"==u?(n=i(e))?(n.closeBracket(u),o(e,c),"bracket"):"error":"{"==u||"["==u?(r(e,n=new(n=s.DEFAULT)),"bracket"):/\d/.test(u)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),"begin"==(n=function(t){for(var e=t.cmdState,r=e.length-1;r>=0;r--){var i=e[r];if("DEFAULT"!=i.name)return i}return{styleIdentifier:function(){return null}}}(e)).name&&(n.argument=t.current()),n.styleIdentifier())}function l(t,e,r){if(t.eatSpace())return null;if(r&&t.match(r))return o(e,a),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/]/))return"tag";if(t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=t.next();return"{"==i||"}"==i||"["==i||"]"==i||"("==i||")"==i?"bracket":"%"==i?(t.skipToEnd(),"comment"):"error"}function c(t,e){var r=t.peek();return"{"==r||"["==r?(i(e).openBracket(r),t.eat(r),o(e,a),"bracket"):/[ \t\r]/.test(r)?(t.eat(r),null):(o(e,a),function(t){var e=t.cmdState.pop();e&&e.closeBracket()}(e),a(t,e))}return s.importmodule=n("importmodule","tag",["string","builtin"]),s.documentclass=n("documentclass","tag",["","atom"]),s.usepackage=n("usepackage","tag",["atom"]),s.begin=n("begin","tag",["atom"]),s.end=n("end","tag",["atom"]),s.label=n("label","tag",["atom"]),s.ref=n("ref","tag",["atom"]),s.eqref=n("eqref","tag",["atom"]),s.cite=n("cite","tag",["atom"]),s.bibitem=n("bibitem","tag",["atom"]),s.Bibitem=n("Bibitem","tag",["atom"]),s.RBibitem=n("RBibitem","tag",["atom"]),s.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:e.inMathMode?function(t,e){return l(t,e)}:a}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=a,t.cmdState.length=0},lineComment:"%"}})),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")}(r(/*! ../../lib/codemirror */"VrN/"))},"19Vz": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){!function(t){"use strict";t.defineMode("stex",(function(t,e){function i(t,e){t.cmdState.push(e)}function r(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function n(t,e,i){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=i,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var s={};function o(t,e){t.f=e}function a(t,e){var n;if(t.match(/^\\[a-zA-Z@]+/)){var a=t.current().slice(1);return i(e,n=new(n=s.hasOwnProperty(a)?s[a]:s.DEFAULT)),o(e,c),n.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return o(e,(function(t,e){return l(t,e,"\\]")})),"keyword";if(t.match("\\("))return o(e,(function(t,e){return l(t,e,"\\)")})),"keyword";if(t.match("$$"))return o(e,(function(t,e){return l(t,e,"$$")})),"keyword";if(t.match("$"))return o(e,(function(t,e){return l(t,e,"$")})),"keyword";var u=t.next();return"%"==u?(t.skipToEnd(),"comment"):"}"==u||"]"==u?(n=r(e))?(n.closeBracket(u),o(e,c),"bracket"):"error":"{"==u||"["==u?(i(e,n=new(n=s.DEFAULT)),"bracket"):/\d/.test(u)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),"begin"==(n=function(t){for(var e=t.cmdState,i=e.length-1;i>=0;i--){var r=e[i];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(e)).name&&(n.argument=t.current()),n.styleIdentifier())}function l(t,e,i){if(t.eatSpace())return null;if(i&&t.match(i))return o(e,a),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/]/))return"tag";if(t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=t.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(t.skipToEnd(),"comment"):"error"}function c(t,e){var i=t.peek();return"{"==i||"["==i?(r(e).openBracket(i),t.eat(i),o(e,a),"bracket"):/[ \t\r]/.test(i)?(t.eat(i),null):(o(e,a),function(t){var e=t.cmdState.pop();e&&e.closeBracket()}(e),a(t,e))}return s.importmodule=n("importmodule","tag",["string","builtin"]),s.documentclass=n("documentclass","tag",["","atom"]),s.usepackage=n("usepackage","tag",["atom"]),s.begin=n("begin","tag",["atom"]),s.end=n("end","tag",["atom"]),s.label=n("label","tag",["atom"]),s.ref=n("ref","tag",["atom"]),s.eqref=n("eqref","tag",["atom"]),s.cite=n("cite","tag",["atom"]),s.bibitem=n("bibitem","tag",["atom"]),s.Bibitem=n("Bibitem","tag",["atom"]),s.RBibitem=n("RBibitem","tag",["atom"]),s.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:e.inMathMode?function(t,e){return l(t,e)}:a}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=a,t.cmdState.length=0},lineComment:"%"}})),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")}(i(/*! ../../lib/codemirror */"VrN/"))},"19Vz": /*!**************************************************************!*\ !*** ./node_modules/codemirror/addon/display/placeholder.js ***! \**************************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){function e(t){t.state.placeholder&&(t.state.placeholder.parentNode.removeChild(t.state.placeholder),t.state.placeholder=null)}function r(t){e(t);var r=t.state.placeholder=document.createElement("pre");r.style.cssText="height: 0; overflow: visible",r.style.direction=t.getOption("direction"),r.className="CodeMirror-placeholder CodeMirror-line-like";var i=t.getOption("placeholder");"string"==typeof i&&(i=document.createTextNode(i)),r.appendChild(i),t.display.lineSpace.insertBefore(r,t.display.lineSpace.firstChild)}function i(t){s(t)&&r(t)}function n(t){var i=t.getWrapperElement(),n=s(t);i.className=i.className.replace(" CodeMirror-empty","")+(n?" CodeMirror-empty":""),n?r(t):e(t)}function s(t){return 1===t.lineCount()&&""===t.getLine(0)}t.defineOption("placeholder","",(function(s,o,a){var l=a&&a!=t.Init;if(o&&!l)s.on("blur",i),s.on("change",n),s.on("swapDoc",n),t.on(s.getInputField(),"compositionupdate",s.state.placeholderCompose=function(){!function(t){setTimeout((function(){var i=!1,n=t.getInputField();"TEXTAREA"==n.nodeName?i=!n.value:1==t.lineCount()&&(i=!/[^\u200b]/.test(n.querySelector(".CodeMirror-line").textContent)),i?r(t):e(t)}),20)}(s)}),n(s);else if(!o&&l){s.off("blur",i),s.off("change",n),s.off("swapDoc",n),t.off(s.getInputField(),"compositionupdate",s.state.placeholderCompose),e(s);var c=s.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}o&&!s.hasFocus()&&i(s)}))}(r(/*! ../../lib/codemirror */"VrN/"))},"1eCo": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){!function(t){function e(t){t.state.placeholder&&(t.state.placeholder.parentNode.removeChild(t.state.placeholder),t.state.placeholder=null)}function i(t){e(t);var i=t.state.placeholder=document.createElement("pre");i.style.cssText="height: 0; overflow: visible",i.style.direction=t.getOption("direction"),i.className="CodeMirror-placeholder CodeMirror-line-like";var r=t.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),i.appendChild(r),t.display.lineSpace.insertBefore(i,t.display.lineSpace.firstChild)}function r(t){s(t)&&i(t)}function n(t){var r=t.getWrapperElement(),n=s(t);r.className=r.className.replace(" CodeMirror-empty","")+(n?" CodeMirror-empty":""),n?i(t):e(t)}function s(t){return 1===t.lineCount()&&""===t.getLine(0)}t.defineOption("placeholder","",(function(s,o,a){var l=a&&a!=t.Init;if(o&&!l)s.on("blur",r),s.on("change",n),s.on("swapDoc",n),t.on(s.getInputField(),"compositionupdate",s.state.placeholderCompose=function(){!function(t){setTimeout((function(){var r=!1,n=t.getInputField();"TEXTAREA"==n.nodeName?r=!n.value:1==t.lineCount()&&(r=!/[^\u200b]/.test(n.querySelector(".CodeMirror-line").textContent)),r?i(t):e(t)}),20)}(s)}),n(s);else if(!o&&l){s.off("blur",r),s.off("change",n),s.off("swapDoc",n),t.off(s.getInputField(),"compositionupdate",s.state.placeholderCompose),e(s);var c=s.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}o&&!s.hasFocus()&&r(s)}))}(i(/*! ../../lib/codemirror */"VrN/"))},"1eCo": /*!*************************************************!*\ !*** ./node_modules/codemirror/mode/xml/xml.js ***! \*************************************************/ /*! no static exports found */ /*! all exports used */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(i,n){var s,o,a=i.indentUnit,l={},c=n.htmlMode?e:r;for(var u in c)l[u]=c[u];for(var u in n)l[u]=n[u];function h(t,e){function r(r){return e.tokenize=r,r(t,e)}var i=t.next();return"<"==i?t.eat("!")?t.eat("[")?t.match("CDATA[")?r(f("atom","]]>")):null:t.match("--")?r(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),r(function t(e){return function(r,i){for(var n;null!=(n=r.next());){if("<"==n)return i.tokenize=t(e+1),i.tokenize(r,i);if(">"==n){if(1==e){i.tokenize=h;break}return i.tokenize=t(e-1),i.tokenize(r,i)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(s=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==i?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var r,i,n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=h,s=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return s="equals",null;if("<"==n){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var o=e.tokenize(t,e);return o?o+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=(r=n,(i=function(t,e){for(;!t.eol();)if(t.next()==r){e.tokenize=d;break}return"string"}).isInAttribute=!0,i),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(r,i){for(;!r.eol();){if(r.match(e)){i.tokenize=h;break}r.next()}return t}}function p(t,e,r){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=r,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function g(t){t.context&&(t.context=t.context.prev)}function m(t,e){for(var r;;){if(!t.context)return;if(r=t.context.tagName,!l.contextGrabbers.hasOwnProperty(r)||!l.contextGrabbers[r].hasOwnProperty(e))return;g(t)}}function v(t,e,r){return"openTag"==t?(r.tagStart=e.column(),y):"closeTag"==t?b:v}function y(t,e,r){return"word"==t?(r.tagName=e.current(),o="tag",C):l.allowMissingTagName&&"endTag"==t?(o="tag bracket",C(t,0,r)):(o="error",y)}function b(t,e,r){if("word"==t){var i=e.current();return r.context&&r.context.tagName!=i&&l.implicitlyClosed.hasOwnProperty(r.context.tagName)&&g(r),r.context&&r.context.tagName==i||!1===l.matchClosing?(o="tag",x):(o="tag error",S)}return l.allowMissingTagName&&"endTag"==t?(o="tag bracket",x(t,0,r)):(o="error",S)}function x(t,e,r){return"endTag"!=t?(o="error",x):(g(r),v)}function S(t,e,r){return o="error",x(t,0,r)}function C(t,e,r){if("word"==t)return o="attribute",w;if("endTag"==t||"selfcloseTag"==t){var i=r.tagName,n=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(i)?m(r,i):(m(r,i),r.context=new p(r,i,n==r.indented)),v}return o="error",C}function w(t,e,r){return"equals"==t?k:(l.allowMissing||(o="error"),C(t,0,r))}function k(t,e,r){return"string"==t?E:"word"==t&&l.allowUnquoted?(o="string",C):(o="error",C(t,0,r))}function E(t,e,r){return"string"==t?E:C(t,0,r)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:v,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;s=null;var r=e.tokenize(t,e);return(r||s)&&"comment"!=r&&(o=null,e.state=e.state(s||r,t,e),o&&(r="error"==o?r+" error":o)),r},indent:function(e,r,i){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(n&&n.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=h)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==k&&(t.state=C)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],r=t.context;r;r=r.prev)r.tagName&&e.push(r.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(r(/*! ../../lib/codemirror */"VrN/"))},"500L": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},i={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(r,n){var s,o,a=r.indentUnit,l={},c=n.htmlMode?e:i;for(var u in c)l[u]=c[u];for(var u in n)l[u]=n[u];function h(t,e){function i(i){return e.tokenize=i,i(t,e)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?i(f("atom","]]>")):null:t.match("--")?i(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),i(function t(e){return function(i,r){for(var n;null!=(n=i.next());){if("<"==n)return r.tokenize=t(e+1),r.tokenize(i,r);if(">"==n){if(1==e){r.tokenize=h;break}return r.tokenize=t(e-1),r.tokenize(i,r)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(s=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var i,r,n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=h,s=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return s="equals",null;if("<"==n){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var o=e.tokenize(t,e);return o?o+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=(i=n,(r=function(t,e){for(;!t.eol();)if(t.next()==i){e.tokenize=d;break}return"string"}).isInAttribute=!0,r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(i,r){for(;!i.eol();){if(i.match(e)){r.tokenize=h;break}i.next()}return t}}function p(t,e,i){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=i,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function g(t){t.context&&(t.context=t.context.prev)}function m(t,e){for(var i;;){if(!t.context)return;if(i=t.context.tagName,!l.contextGrabbers.hasOwnProperty(i)||!l.contextGrabbers[i].hasOwnProperty(e))return;g(t)}}function v(t,e,i){return"openTag"==t?(i.tagStart=e.column(),y):"closeTag"==t?b:v}function y(t,e,i){return"word"==t?(i.tagName=e.current(),o="tag",C):l.allowMissingTagName&&"endTag"==t?(o="tag bracket",C(t,0,i)):(o="error",y)}function b(t,e,i){if("word"==t){var r=e.current();return i.context&&i.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(i.context.tagName)&&g(i),i.context&&i.context.tagName==r||!1===l.matchClosing?(o="tag",x):(o="tag error",S)}return l.allowMissingTagName&&"endTag"==t?(o="tag bracket",x(t,0,i)):(o="error",S)}function x(t,e,i){return"endTag"!=t?(o="error",x):(g(i),v)}function S(t,e,i){return o="error",x(t,0,i)}function C(t,e,i){if("word"==t)return o="attribute",w;if("endTag"==t||"selfcloseTag"==t){var r=i.tagName,n=i.tagStart;return i.tagName=i.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(r)?m(i,r):(m(i,r),i.context=new p(i,r,n==i.indented)),v}return o="error",C}function w(t,e,i){return"equals"==t?k:(l.allowMissing||(o="error"),C(t,0,i))}function k(t,e,i){return"string"==t?E:"word"==t&&l.allowUnquoted?(o="string",C):(o="error",C(t,0,i))}function E(t,e,i){return"string"==t?E:C(t,0,i)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:v,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;s=null;var i=e.tokenize(t,e);return(i||s)&&"comment"!=i&&(o=null,e.state=e.state(s||i,t,e),o&&(i="error"==o?i+" error":o)),i},indent:function(e,i,r){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(n&&n.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==k&&(t.state=C)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],i=t.context;i;i=i.prev)i.tagName&&e.push(i.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(i(/*! ../../lib/codemirror */"VrN/"))},"500L": /*!**********************************************!*\ !*** ./src/components/MultiUpload/index.tsx ***! \**********************************************/ /*! exports provided: coverToFileList, default */ -/*! exports used: coverToFileList, default */function(t,e,r){"use strict";r.d(e,"a",(function(){return x}));r(/*! antd/es/button/style */"+L6B");var i=r(/*! antd/es/button */"2/Rp"),n=(r(/*! antd/es/modal/style */"2qtc"),r(/*! antd/es/modal */"kLXV")),s=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=(r(/*! antd/es/message/style */"miYZ"),r(/*! antd/es/message */"tsqr")),l=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),c=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),u=(r(/*! antd/es/upload/style */"DZo9"),r(/*! antd/es/upload */"8z0m")),h=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),d=r.n(h),f=r(/*! react */"q1tI"),p=r.n(f),g=r(/*! @/utils/env */"m3rI"),m=r(/*! @/pages/MoopCases/FormPanel/service */"wzkS"),v=r(/*! ../SingleUpload */"y5JW"),y=r(/*! @ant-design/icons */"LtfV"),b=u.a.Dragger;function x(t){var e=[];return t&&t.length>0&&(e=t.map((function(t){return{uid:t.id,id:t.id,name:t.title+v.c+t.filesize,url:t.url,filesize:t.filesize,status:"done",response:{id:t.id}}}))),e}e.b=function(t){var e=t.value,r=t.onChange,h=t.action,x=t.className,S=t.maxSize,C=void 0===S?150:S,w=t.title,k=void 0===w?"上传附件":w,E=t.showRemoveModal,T=void 0!==E&&E,L=t.accept,A=void 0===L?"":L,D=t.additionalText,R=t.isDragger,O=t.number,_=void 0===O?1e3:O,I=t.aloneClear,M=void 0!==I&&I,P=t.restrict,N=void 0===P||P,F=Object(f.useState)(!1),B=Object(c.a)(F,2),j=B[0],U=B[1],H=Object(f.useState)(e||[]),G=Object(c.a)(H,2),z=G[0],W=G[1];Object(f.useEffect)((function(){e&&(W(Object(l.a)(e)),_===(null==e?void 0:e.length)&&U(!0))}),[e]);var V,K=function(){setTimeout((function(){z.pop(),W(Object(l.a)(z))}),500)},q={multiple:!0,disabled:j,accept:A,withCredentials:!0,fileList:z,beforeUpload:function(t,e){var r=t.size/1024/1024;return z.concat(e).length>_?(z.pop(),W(Object(l.a)(z)),a.b.error("最多只能上传".concat(_,"个文件")),M?Promise.reject():(K(),!1)):r=_?U(!0):U(!1),W(Object(l.a)(e)),e=e.map((function(t){var e,r;null!=t&&null!==(e=t.response)&&void 0!==e&&e.id&&(t.url="/api/attachments/".concat(null==t||null===(r=t.response)||void 0===r?void 0:r.id));return-1===t.name.indexOf(v.c)&&(t.name="".concat(t.name).concat(v.c).concat(Object(v.a)(t.size))),Object(o.a)({},t)})),console.log("info:",t),r(e)},onRemove:(V=Object(s.a)(d.a.mark((function t(e){var r;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=function(){var t=Object(s.a)(d.a.mark((function t(){var r;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.response?e.response.id:e.id)){t.next=8;break}return t.next=4,Object(m.d)(e.response?e.response.id:e.uid);case 4:return r=t.sent,t.abrupt("return",r);case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),!T){t.next=5;break}return t.abrupt("return",new Promise((function(t,e){var i;n.a.confirm({centered:!0,width:530,okText:"确定",cancelText:"取消",title:"提示",content:p.a.createElement("div",{className:"tc font16"},"是否确认删除?"),onOk:(i=Object(s.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:e.sent,a.b.success("删除成功"),t(!0);case 5:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)}),onCancel:function(){return t(!1)}})})));case 5:return t.next=7,r();case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t)}))),function(t){return V.apply(this,arguments)})};return p.a.createElement("div",{className:"multi-upload ".concat(x||"")},R&&p.a.createElement(b,q,p.a.createElement("p",{className:"ant-upload-drag-icon"},p.a.createElement(y.a,null)),p.a.createElement("p",{className:"ant-upload-text"},"点击上传图标,选择要上传的文件或将文件拖拽到此",p.a.createElement("br",null),p.a.createElement("span",{style:{display:N?"block":"none"}},"(单个文件最大限制为",C,"MB) ")),D),!R&&p.a.createElement(u.a,q,p.a.createElement(i.a,{disabled:j},k),p.a.createElement("span",{onClick:function(t){t.preventDefault(),t.stopPropagation()},style:{marginLeft:10,color:"#FA6400",display:N?"block":"none"}},"(单个文件最大",C,"MB) ")))}},"55Ip": +/*! exports used: coverToFileList, default */function(t,e,i){"use strict";i.d(e,"a",(function(){return x}));i(/*! antd/es/button/style */"+L6B");var r=i(/*! antd/es/button */"2/Rp"),n=(i(/*! antd/es/modal/style */"2qtc"),i(/*! antd/es/modal */"kLXV")),s=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=(i(/*! antd/es/message/style */"miYZ"),i(/*! antd/es/message */"tsqr")),l=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),c=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),u=(i(/*! antd/es/upload/style */"DZo9"),i(/*! antd/es/upload */"8z0m")),h=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),d=i.n(h),f=i(/*! react */"q1tI"),p=i.n(f),g=i(/*! @/utils/env */"m3rI"),m=i(/*! @/pages/MoopCases/FormPanel/service */"wzkS"),v=i(/*! ../SingleUpload */"y5JW"),y=i(/*! @ant-design/icons */"LtfV"),b=u.a.Dragger;function x(t){var e=[];return t&&t.length>0&&(e=t.map((function(t){return{uid:t.id,id:t.id,name:t.title+v.c+t.filesize,url:t.url,filesize:t.filesize,status:"done",response:{id:t.id}}}))),e}e.b=function(t){var e=t.value,i=t.onChange,h=t.action,x=t.className,S=t.maxSize,C=void 0===S?150:S,w=t.title,k=void 0===w?"上传附件":w,E=t.showRemoveModal,T=void 0!==E&&E,L=t.accept,A=void 0===L?"":L,D=t.additionalText,R=t.isDragger,O=t.number,_=void 0===O?1e3:O,I=t.aloneClear,M=void 0!==I&&I,P=t.restrict,N=void 0===P||P,F=Object(f.useState)(!1),B=Object(c.a)(F,2),j=B[0],U=B[1],H=Object(f.useState)(e||[]),G=Object(c.a)(H,2),z=G[0],W=G[1];Object(f.useEffect)((function(){e&&(W(Object(l.a)(e)),_===(null==e?void 0:e.length)&&U(!0))}),[e]);var V,K=function(){setTimeout((function(){z.pop(),W(Object(l.a)(z))}),500)},q={multiple:!0,disabled:j,accept:A,withCredentials:!0,fileList:z,beforeUpload:function(t,e){var i=t.size/1024/1024;return z.concat(e).length>_?(z.pop(),W(Object(l.a)(z)),a.b.error("最多只能上传".concat(_,"个文件")),M?Promise.reject():(K(),!1)):i=_?U(!0):U(!1),W(Object(l.a)(e)),e=e.map((function(t){var e,i;null!=t&&null!==(e=t.response)&&void 0!==e&&e.id&&(t.url="/api/attachments/".concat(null==t||null===(i=t.response)||void 0===i?void 0:i.id));return-1===t.name.indexOf(v.c)&&(t.name="".concat(t.name).concat(v.c).concat(Object(v.a)(t.size))),Object(o.a)({},t)})),console.log("info:",t),i(e)},onRemove:(V=Object(s.a)(d.a.mark((function t(e){var i;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=function(){var t=Object(s.a)(d.a.mark((function t(){var i;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.response?e.response.id:e.id)){t.next=8;break}return t.next=4,Object(m.d)(e.response?e.response.id:e.uid);case 4:return i=t.sent,t.abrupt("return",i);case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),!T){t.next=5;break}return t.abrupt("return",new Promise((function(t,e){var r;n.a.confirm({centered:!0,width:530,okText:"确定",cancelText:"取消",title:"提示",content:p.a.createElement("div",{className:"tc font16"},"是否确认删除?"),onOk:(r=Object(s.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i();case 2:e.sent,a.b.success("删除成功"),t(!0);case 5:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)}),onCancel:function(){return t(!1)}})})));case 5:return t.next=7,i();case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t)}))),function(t){return V.apply(this,arguments)})};return p.a.createElement("div",{className:"multi-upload ".concat(x||"")},R&&p.a.createElement(b,q,p.a.createElement("p",{className:"ant-upload-drag-icon"},p.a.createElement(y.a,null)),p.a.createElement("p",{className:"ant-upload-text"},"点击上传图标,选择要上传的文件或将文件拖拽到此",p.a.createElement("br",null),p.a.createElement("span",{style:{display:N?"block":"none"}},"(单个文件最大限制为",C,"MB) ")),D),!R&&p.a.createElement(u.a,q,p.a.createElement(r.a,{disabled:j},k),p.a.createElement("span",{onClick:function(t){t.preventDefault(),t.stopPropagation()},style:{marginLeft:10,color:"#FA6400",display:N?"block":"none"}},"(单个文件最大",C,"MB) ")))}},"55Ip": /*!***************************************************************!*\ !*** ./node_modules/react-router-dom/esm/react-router-dom.js ***! \***************************************************************/ /*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */ -/*! exports used: Link, NavLink */function(t,e,r){"use strict";r.d(e,"a",(function(){return m})),r.d(e,"b",(function(){return b}));var i=r(/*! react-router */"Ty5D"),n=r(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),s=r(/*! react */"q1tI"),o=r.n(s),a=r(/*! history */"YS25"),l=(r(/*! prop-types */"17x9"),r(/*! @babel/runtime/helpers/esm/extends */"wx14")),c=r(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),u=r(/*! tiny-invariant */"9R94");o.a.Component;o.a.Component;var h=function(t,e){return"function"==typeof t?t(e):t},d=function(t,e){return"string"==typeof t?Object(a.c)(t,null,null,e):t},f=function(t){return t},p=o.a.forwardRef;void 0===p&&(p=f);var g=p((function(t,e){var r=t.innerRef,i=t.navigate,n=t.onClick,s=Object(c.a)(t,["innerRef","navigate","onClick"]),a=s.target,u=Object(l.a)({},s,{onClick:function(t){try{n&&n(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||a&&"_self"!==a||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),i())}});return u.ref=f!==p&&e||r,o.a.createElement("a",u)}));var m=p((function(t,e){var r=t.component,n=void 0===r?g:r,s=t.replace,a=t.to,m=t.innerRef,v=Object(c.a)(t,["component","replace","to","innerRef"]);return o.a.createElement(i.e.Consumer,null,(function(t){t||Object(u.a)(!1);var r=t.history,i=d(h(a,t.location),t.location),c=i?r.createHref(i):"",g=Object(l.a)({},v,{href:c,navigate:function(){var e=h(a,t.location);(s?r.replace:r.push)(e)}});return f!==p?g.ref=e||m:g.innerRef=m,o.a.createElement(n,g)}))})),v=function(t){return t},y=o.a.forwardRef;void 0===y&&(y=v);var b=y((function(t,e){var r=t["aria-current"],n=void 0===r?"page":r,s=t.activeClassName,a=void 0===s?"active":s,f=t.activeStyle,p=t.className,g=t.exact,b=t.isActive,x=t.location,S=t.sensitive,C=t.strict,w=t.style,k=t.to,E=t.innerRef,T=Object(c.a)(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.a.createElement(i.e.Consumer,null,(function(t){t||Object(u.a)(!1);var r=x||t.location,s=d(h(k,r),r),c=s.pathname,L=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),A=L?Object(i.f)(r.pathname,{path:L,exact:g,sensitive:S,strict:C}):null,D=!!(b?b(A,r):A),R=D?function(){for(var t=arguments.length,e=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:0,r=(l[t[e+0]]+l[t[e+1]]+l[t[e+2]]+l[t[e+3]]+"-"+l[t[e+4]]+l[t[e+5]]+"-"+l[t[e+6]]+l[t[e+7]]+"-"+l[t[e+8]]+l[t[e+9]]+"-"+l[t[e+10]]+l[t[e+11]]+l[t[e+12]]+l[t[e+13]]+l[t[e+14]]+l[t[e+15]]).toLowerCase();if(!a(r))throw TypeError("Stringified UUID is invalid");return r};e.a=function(t,e,r){var i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(var n=0;n<16;++n)e[r+n]=i[n];return e}return u(i)}},"7ahc": +/*! exports used: default */function(t,e,i){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),n=new Uint8Array(16);function s(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var a=function(t){return"string"==typeof t&&o.test(t)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(l[t[e+0]]+l[t[e+1]]+l[t[e+2]]+l[t[e+3]]+"-"+l[t[e+4]]+l[t[e+5]]+"-"+l[t[e+6]]+l[t[e+7]]+"-"+l[t[e+8]]+l[t[e+9]]+"-"+l[t[e+10]]+l[t[e+11]]+l[t[e+12]]+l[t[e+13]]+l[t[e+14]]+l[t[e+15]]).toLowerCase();if(!a(i))throw TypeError("Stringified UUID is invalid");return i};e.a=function(t,e,i){var r=(t=t||{}).random||(t.rng||s)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){i=i||0;for(var n=0;n<16;++n)e[i+n]=r[n];return e}return u(r)}},"7ahc": /*!*************************************************************!*\ !*** ./src/components/markdown-editor/code-block/index.tsx ***! \*************************************************************/ /*! exports provided: default, MyCodeMirror */ -/*! exports used: MyCodeMirror, default */function(t,e,r){"use strict";r.d(e,"a",(function(){return m}));var i=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),n=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),s=(r(/*! antd/es/button/style */"+L6B"),r(/*! antd/es/button */"2/Rp")),o=(r(/*! antd/es/form/style */"y8nQ"),r(/*! antd/es/form */"Vl3Y")),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(r(/*! antd/es/select/style */"OaEy"),r(/*! antd/es/select */"2fM7")),c=r(/*! react */"q1tI"),u=r.n(c),h=r(/*! codemirror */"VrN/"),d=r.n(h),f=(r(/*! codemirror/lib/codemirror.css */"p77/"),r(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},g={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function m(t){var e=t.value,r=t.onChange,n=t.mode,s=t.options,o=void 0===s?{}:s,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(a.a)(h,2),p=f[0],g=f[1];return Object(c.useEffect)((function(){if(p){function t(t){var e=t.getValue();r&&r(e)}return p.on("change",t),function(){p.off("change",t)}}}),[p,r]),Object(c.useEffect)((function(){p&&p.setOption("mode",n)}),[p,n]),Object(c.useEffect)((function(){p&&(e===p.getValue()&&""!==e||setTimeout((function(){p.setValue(e||" ")}),300))}),[p,e]),Object(c.useEffect)((function(){if(l.current&&!p){var t=d.a.fromTextArea(l.current,Object(i.a)({mode:n,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},o));g(t)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}e.b=function(t){var e=t.callback,r=t.onCancel,i=Object(c.useState)("python"),h=Object(a.a)(i,2),d=h[0],v=h[1];return u.a.createElement(o.a,Object(n.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(t){e(t)}}),u.a.createElement(o.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(t){v(g[t][1])}},Object.keys(g).map((function(t){return u.a.createElement(f,{key:t,value:t},g[t][0])})))),u.a.createElement(o.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(m,{mode:d})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(s.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(s.a,{type:"ghost",onClick:r},"取消")))}},"8EBN": +/*! exports used: MyCodeMirror, default */function(t,e,i){"use strict";i.d(e,"a",(function(){return m}));var r=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),n=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),s=(i(/*! antd/es/button/style */"+L6B"),i(/*! antd/es/button */"2/Rp")),o=(i(/*! antd/es/form/style */"y8nQ"),i(/*! antd/es/form */"Vl3Y")),a=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(i(/*! antd/es/select/style */"OaEy"),i(/*! antd/es/select */"2fM7")),c=i(/*! react */"q1tI"),u=i.n(c),h=i(/*! codemirror */"VrN/"),d=i.n(h),f=(i(/*! codemirror/lib/codemirror.css */"p77/"),i(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},g={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function m(t){var e=t.value,i=t.onChange,n=t.mode,s=t.options,o=void 0===s?{}:s,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(a.a)(h,2),p=f[0],g=f[1];return Object(c.useEffect)((function(){if(p){function t(t){var e=t.getValue();i&&i(e)}return p.on("change",t),function(){p.off("change",t)}}}),[p,i]),Object(c.useEffect)((function(){p&&p.setOption("mode",n)}),[p,n]),Object(c.useEffect)((function(){p&&(e===p.getValue()&&""!==e||setTimeout((function(){p.setValue(e||" ")}),300))}),[p,e]),Object(c.useEffect)((function(){if(l.current&&!p){var t=d.a.fromTextArea(l.current,Object(r.a)({mode:n,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},o));g(t)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}e.b=function(t){var e=t.callback,i=t.onCancel,r=Object(c.useState)("python"),h=Object(a.a)(r,2),d=h[0],v=h[1];return u.a.createElement(o.a,Object(n.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(t){e(t)}}),u.a.createElement(o.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(t){v(g[t][1])}},Object.keys(g).map((function(t){return u.a.createElement(f,{key:t,value:t},g[t][0])})))),u.a.createElement(o.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(m,{mode:d})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(s.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(s.a,{type:"ghost",onClick:i},"取消")))}},"8EBN": /*!**********************************************!*\ !*** ./node_modules/codemirror/mode/meta.js ***! \**********************************************/ /*! no static exports found */ /*! all exports used */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){"use strict";t.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var e=0;e-1&&e.substring(n+1,e.length);if(s)return t.findModeByExtension(s)},t.findModeByName=function(e){e=e.toLowerCase();for(var r=0;r-1&&e.substring(n+1,e.length);if(s)return t.findModeByExtension(s)},t.findModeByName=function(e){e=e.toLowerCase();for(var i=0;i"],v=new f.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){g.length=0,m=["
        "]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function S(){return function t(e,r,i,n){if(r>=e.length||e[r].level<=i)return r;var s=e[r];n.push("
      • "+s.text+"");var o=[];return r=t(e,++r,s.level,o),o.length>0&&(n.push("
          "),o.forEach((function(t){n.push(t)})),n.push("
        ")),n.push("
      • "),r=t(e,r,i,n)}(g,0,0,m),m.push("
      "),m.join("")}var C={heading:function(t){var e=y.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},fences:function(t){var e=this.rules.block.fences.exec(t);if(e){var r=e[0],i=function(t,e){var r=t.match(/^(\s+)(?:```)/);if(null===r)return e;var i=r[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:Object(a.a)(e,1)[0].length>=i.length?t.slice(i.length):t})).join("\n")}(r,e[3]||""),n=e[2]?e[2].trim():e[2];if(["latex","katex","math"].indexOf(n)>=0){var s=E(),o=i;i=s,T[s]={type:"block",expression:o}}return{type:"code",raw:r,lang:n,text:i}}}},w=/(?:\${2})([^\n`]+?)(?:\${2})/gi,k=0,E=function(){return"__special_katext_id_".concat(k++,"__")},T={};function L(){k=0,T={}}function A(t){return t=t.replace(w,(function(t,e){var r=E();return T[r]={type:"inline",expression:e},r}))}var D=v.listitem;v.listitem=function(t){return D(A(t))};var R=v.paragraph;v.paragraph=function(t){return R(A(t))};var O=v.tablecell;v.tablecell=function(t,e){return O(A(t),e)},v.code=function(t,e,r){var i=(e||"").match(/\S*/)[0];return i?["latex","katex","math"].indexOf(i)>=0?"

      ".concat(t,"

      "):'
      ').concat(r?t:Object(p.escape)(t,!0),"
      \n"):'
      '+(r?t:Object(p.escape)(t,!0))+"
      "},v.heading=function(t,e,r){var i=this.options.headerPrefix+r.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return g.push({anchor:i,level:e,text:t}),"'+t+""},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:C,renderer:v});var _=f.a,I=(r("SJMd"),r("ulZh")),M=r.n(I),P=r("m3rI"),N=r("Oy/b"),F=r("p5ED"),B=r("ErOA"),j=function(t,e){return(j=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function U(t,e){function r(){this.constructor=t}j(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function H(t,e,r,i){return new(r||(r=Promise))((function(n,s){function o(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))}function G(t,e){var r,i,n,s,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,i&&(n=2&s[0]?i.return:s[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;switch(i=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]',"select"),this.addActionButton(r,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(r,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(r,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(r,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(r,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(r,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(r,'',"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(t){var r=document.createElement("div");r.className=""+e.toolbarButtonStyleClass.name,r.setAttribute("data-type-name",t.typeName),r.innerHTML=t.icon,r.addEventListener("click",(function(){e.markerToolbarButtonClicked(r,t)})),e.buttons.push(r),e.markerButtons.push(r)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var i=document.createElement("div");i.className=this.toolbarBlockStyleClass.name,i.style.whiteSpace="nowrap",i.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(i),this.addActionButton(i,'',"render"),this.addActionButton(i,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},t.prototype.addButtonClickListener=function(t){this.buttonClickListeners.push(t)},t.prototype.removeButtonClickListener=function(t){this.buttonClickListeners.indexOf(t)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(t),1)},t.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},t.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var t=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var e=0;e0&&this.buttonClickListeners.forEach((function(t){return t("marker",e)})),this.markerButtonOverflowBlock.style.display="none"},t.prototype.actionToolbarButtonClicked=function(t,e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("action",e)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},t.prototype.setActiveButton=function(t){this.resetButtonStyles(),t.className=t.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),t.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},t.prototype.setActiveMarkerButton=function(t){var e=this.markerButtons.find((function(e){return e.getAttribute("data-type-name")===t}));e&&this.setActiveButton(e)},t.prototype.setCurrentMarker=function(t){var e=this;this.currentMarker=t,this.buttons.filter((function(t){return/delete|notes/.test(t.getAttribute("data-action"))})).forEach((function(t){void 0===e.currentMarker?(t.style.fillOpacity="0.4",t.style.pointerEvents="none"):(t.style.fillOpacity="1",t.style.pointerEvents="all")}))},t}(),Q=function(){function t(t,e,r,i){this.panels=[],this.panelButtons=[],this.markerjsContainer=t,this.displayMode=e,this.uiStyleSettings=r,this.styles=i,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return t.prototype.addStyles=function(){var t;this.toolboxStyleClass=this.styles.addClass(new $("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new $("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new $("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new $("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new $("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new $("toolbox-panel-row_colors","\n background-color: "+(null!==(t=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==t?t:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new $("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new $("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new X("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new X("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},t.prototype.show=function(t){var e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==e?e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},t.prototype.setPanelButtons=function(t){var e,r,i=this;this.panels=t,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==e?e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(r=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==r?r:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(t){var e;t.uiStyleSettings=i.uiStyleSettings;var r=document.createElement("div");r.className=i.toolboxButtonStyleClass.name+" "+(null!==(e=i.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==e?e:i.toolboxButtonStyleColorsClass.name),r.innerHTML=t.icon,r.title=t.title,r.addEventListener("click",(function(){i.panelButtonClick(t)})),i.panelButtons.push(r),i.buttonRow.appendChild(r)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},t.prototype.panelButtonClick=function(t){var e=this,r=-1;if(t!==this.activePanel){r=this.panels.indexOf(t),this.panelRow.innerHTML="";var i=t.getUi();i.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(i),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=t}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===e.displayMode?e.panelRow.style.display="none":e.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(t,i){var n,s;t.className=e.toolboxButtonStyleClass.name+" "+(i===r?""+(null!==(n=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==n?n:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(s=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==s?s:e.toolboxButtonStyleColorsClass.name))}))},t}(),J=function(t,e){this.title=t,this.icon=e},tt=function(t){function e(e,r,i,n){var s=t.call(this,e,n||'')||this;return s.colors=[],s.addTransparent=!1,s.colorBoxes=[],s.colors=r,s.currentColor=i,s.setCurrentColor=s.setCurrentColor.bind(s),s.getColorBox=s.getColorBox.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.whiteSpace="nowrap",this.colors.forEach((function(r){var i=t.getColorBox(r);e.appendChild(i),t.colorBoxes.push(i)})),e},e.prototype.getColorBox=function(t){var e=this,r=this.uiStyleSettings.toolbarHeight/4,i=this.uiStyleSettings.toolbarHeight-r,n=document.createElement("div");n.style.display="inline-block",n.style.boxSizing="content-box",n.style.width=i-2+"px",n.style.height=i-2+"px",n.style.padding="1px",n.style.marginRight="2px",n.style.marginBottom="2px",n.style.borderWidth="2px",n.style.borderStyle="solid",n.style.borderRadius=(i+2)/2+"px",n.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",n.addEventListener("click",(function(){e.setCurrentColor(t,n)}));var s=document.createElement("div");return s.style.display="inline-block",s.style.width=i-2+"px",s.style.height=i-2+"px",s.style.backgroundColor=t,s.style.borderRadius=i/2+"px","transparent"===t&&(s.style.fill=this.uiStyleSettings.toolboxAccentColor,s.innerHTML='\n \n '),n.appendChild(s),n},e.prototype.setCurrentColor=function(t,e){var r=this;this.currentColor=t,this.colorBoxes.forEach((function(t){t.style.borderColor=t===e?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},e}(J),et=function(){function t(t,e,r){this._state="new",this._isSelected=!1,this._container=t,this._overlayContainer=e,this.globalSettings=r,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(t.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!1},Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},t.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},t.prototype.pointerDown=function(t,e){},t.prototype.dblClick=function(t,e){},t.prototype.manipulate=function(t){},t.prototype.pointerUp=function(t){this.stateChanged()},t.prototype.dispose=function(){},t.prototype.addMarkerVisualToContainer=function(t){this.container.childNodes.length>0?this.container.insertBefore(t,this.container.childNodes[0]):this.container.appendChild(t)},t.prototype.getState=function(){return{typeName:t.typeName,state:this.state,notes:this.notes}},t.prototype.restoreState=function(t){this._state=t.state,this.notes=t.notes},t.prototype.scale=function(t,e){},t.prototype.colorChanged=function(t){this.onColorChanged&&this.onColorChanged(t),this.stateChanged()},t.prototype.fillColorChanged=function(t){this.onFillColorChanged&&this.onFillColorChanged(t),this.stateChanged()},t.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var t=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),t.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(t)&&this.onStateChanged(this)}},t.typeName="MarkerBase",t}(),rt=function(){function t(){this.findGripByVisual=this.findGripByVisual.bind(this)}return t.prototype.findGripByVisual=function(t){return this.topLeft.ownsTarget(t)?this.topLeft:this.topCenter.ownsTarget(t)?this.topCenter:this.topRight.ownsTarget(t)?this.topRight:this.centerLeft.ownsTarget(t)?this.centerLeft:this.centerRight.ownsTarget(t)?this.centerRight:this.bottomLeft.ownsTarget(t)?this.bottomLeft:this.bottomCenter.ownsTarget(t)?this.bottomCenter:this.bottomRight.ownsTarget(t)?this.bottomRight:void 0},t}(),it=function(){function t(){this.GRIP_SIZE=10,this.visual=W.createGroup(),this.visual.appendChild(W.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(W.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t}(),nt=function(){function t(){}return t.toITransformMatrix=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},t.toSVGMatrix=function(t,e){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},t}(),st=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.left=0,n.top=0,n.width=0,n.height=0,n.defaultSize={x:50,y:20},n.offsetX=0,n.offsetY=0,n.rotationAngle=0,n.CB_DISTANCE=10,n._suppressMarkerCreateEvent=!1,n.container.transform.baseVal.appendItem(W.createTransform()),n.setupControlBox(),n}return U(e,t),Object.defineProperty(e.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var e=W.createTransform();this._visual.transform.baseVal.appendItem(e)},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!!(void 0!==this.controlGrips.findGripByVisual(e)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(e))},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),"new"===this.state&&(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 i=this.unrotatePoint(e);if(this.manipulationStartX=i.x,this.manipulationStartY=i.y,this.offsetX=i.x-this.left,this.offsetY=i.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(r),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(r)){this.activeGrip=this.rotatorGrip;var n=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=n.x-this.width/2,this.top=n.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var s=this.container.transform.baseVal.getItem(0);s.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(s,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},e.prototype.pointerUp=function(e){var r=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(e),this._state="select","creating"===r&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},e.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},e.prototype.manipulate=function(t){var e=this.unrotatePoint(t);"creating"===this.state?this.resize(t):"move"===this.state?(this.left=this.manipulationStartLeft+(e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(e):"rotate"===this.state&&this.rotate(t)},e.prototype.resize=function(t){var e=this.manipulationStartLeft,r=this.manipulationStartWidth,i=this.manipulationStartTop,n=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:e=this.manipulationStartLeft+t.x-this.manipulationStartX,r=this.manipulationStartWidth+this.manipulationStartLeft-e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:r=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:i=this.manipulationStartTop+t.y-this.manipulationStartY,n=this.manipulationStartHeight+this.manipulationStartTop-i;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:n=this.manipulationStartHeight+t.y-this.manipulationStartY}r>=0?(this.left=e,this.width=r):(this.left=e+r,this.width=-r),n>=0?(this.top=i,this.height=n):(this.top=i+n,this.height=-n),this.setSize()},e.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},e.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var e=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*e,this.applyRotation()}},e.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},e.prototype.rotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM(),r=W.createPoint(t.x,t.y);return{x:(r=r.matrixTransform(e)).x,y:r.y}},e.prototype.unrotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM();e=e.inverse();var r=W.createPoint(t.x,t.y);return{x:(r=r.matrixTransform(e)).x,y:r.y}},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=W.createGroup();var t=W.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=W.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),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=W.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 rt,this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(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()},e.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(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},e.prototype.createGrip=function(){var t=new it;return t.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,e=-t/2,r=e,i=(this.width+this.CB_DISTANCE)/2-t/2,n=(this.height+this.CB_DISTANCE)/2-t/2,s=this.height+this.CB_DISTANCE-t/2,o=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,e,r),this.positionGrip(this.controlGrips.topCenter.visual,i,r),this.positionGrip(this.controlGrips.topRight.visual,o,r),this.positionGrip(this.controlGrips.centerLeft.visual,e,n),this.positionGrip(this.controlGrips.centerRight.visual,o,n),this.positionGrip(this.controlGrips.bottomLeft.visual,e,s),this.positionGrip(this.controlGrips.bottomCenter.visual,i,s),this.positionGrip(this.controlGrips.bottomRight.visual,o,s),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,i,r-3*this.CB_DISTANCE)},e.prototype.positionGrip=function(t,e,r){var i=t.transform.baseVal.getItem(0);i.setTranslate(e,r),t.transform.baseVal.replaceItem(i,0)},e.prototype.hideControlBox=function(){this.controlBox.style.display="none"},e.prototype.showControlBox=function(){this.controlBox.style.display=""},e.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:nt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:nt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var r=e;this.left=r.left,this.top=r.top,this.width=r.width,this.height=r.height,this.rotationAngle=r.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(nt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,r.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(nt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,r.containerTransformMatrix))},e.prototype.scale=function(e,r){t.prototype.scale.call(this,e,r);var i=this.rotatePoint({x:this.left,y:this.top}),n=this.unrotatePoint({x:i.x*e,y:i.y*r});this.left=n.x,this.top=n.y,this.width=this.width*e,this.height=this.height*r,this.adjustControlBox()},e}(et),ot=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.fillColor="transparent",n.strokeColor="transparent",n.strokeWidth=0,n.strokeDasharray="",n.opacity=1,n.setStrokeColor=n.setStrokeColor.bind(n),n.setFillColor=n.setFillColor.bind(n),n.setStrokeWidth=n.setStrokeWidth.bind(n),n.setStrokeDasharray=n.setStrokeDasharray.bind(n),n.createVisual=n.createVisual.bind(n),n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},e.prototype.createVisual=function(){this.visual=W.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)},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},e.prototype.setSize=function(){t.prototype.setSize.call(this),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&W.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&W.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&W.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&W.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){var r=e;this.fillColor=r.fillColor,this.strokeColor=r.strokeColor,this.strokeWidth=r.strokeWidth,this.strokeDasharray=r.strokeDasharray,this.opacity=r.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,r){t.prototype.scale.call(this,e,r),this.setSize()},e.title="Rectangle marker",e}(st),at=function(t){function e(e,r,i,n){var s=t.call(this,e,n||'')||this;return s.widths=[],s.widthBoxes=[],s.widths=r,s.currentWidth=i,s.setCurrentWidth=s.setCurrentWidth.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.widths.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.flexGrow="2",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=r===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentWidth(r,i)})),e.appendChild(i);var n=document.createElement("div");n.innerText=r.toString(),n.style.marginRight="5px",i.appendChild(n);var s=document.createElement("div");s.style.minHeight="20px",s.style.flexGrow="2",s.style.display="flex",s.style.alignItems="center";var o=document.createElement("hr");o.style.minWidth="20px",o.style.border="0px",o.style.borderTop=r+"px solid "+t.uiStyleSettings.toolboxColor,o.style.flexGrow="2",s.appendChild(o),i.appendChild(s),t.widthBoxes.push(i)})),e},e.prototype.setCurrentWidth=function(t,e){var r=this;this.currentWidth=t,this.widthBoxes.forEach((function(t){t.style.borderColor=t===e?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},e}(J),lt=function(t){function e(e,r,i,n){var s=t.call(this,e,n||'')||this;return s.styles=[],s.styleBoxes=[],s.styles=r,s.currentStyle=i,s.setCurrentStyle=s.setCurrentStyle.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.styles.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.styles.length-5+"%",i.style.borderColor=r===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentStyle(r,i)})),e.appendChild(i);var n=document.createElement("div");n.style.minHeight="20px",n.style.flexGrow="2",n.style.overflow="hidden";var s='\n \n ";n.innerHTML=s,i.appendChild(n),t.styleBoxes.push(i)})),e},e.prototype.setCurrentStyle=function(t,e){var r=this;this.currentStyle=t,this.styleBoxes.forEach((function(t){t.style.borderColor=t===e?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},e}(J),ct=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.strokeColor=i.defaultColor,n.strokeWidth=i.defaultStrokeWidth,n.strokeDasharray=i.defaultStrokeDasharray,n.strokePanel=new tt("Line color",i.defaultColorSet,i.defaultColor),n.strokePanel.onColorChanged=n.setStrokeColor,n.strokeWidthPanel=new at("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),n.strokeWidthPanel.onWidthChanged=n.setStrokeWidth,n.strokeStylePanel=new lt("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),n.strokeStylePanel.onStyleChanged=n.setStrokeDasharray,n}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=t.prototype.getState.call(this);return r.typeName=e.typeName,r},e.typeName="FrameMarker",e.title="Frame marker",e.icon='',e}(ot),ut=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},ht=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.x1=0,n.y1=0,n.x2=0,n.y2=0,n.defaultLength=50,n.manipulationStartX=0,n.manipulationStartY=0,n.manipulationStartX1=0,n.manipulationStartY1=0,n.manipulationStartX2=0,n.manipulationStartY2=0,n.setupControlBox(),n}return U(e,t),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!(!this.grip1.ownsTarget(e)&&!this.grip2.ownsTarget(e))},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),this.manipulationStartX=e.x,this.manipulationStartY=e.y,"new"===this.state&&(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,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(r)?this.activeGrip=this.grip1:this.grip2.ownsTarget(r)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},e.prototype.pointerUp=function(e){var r=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&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","creating"===r&&this.onMarkerCreated&&this.onMarkerCreated(this)},e.prototype.adjustVisual=function(){},e.prototype.manipulate=function(t){"creating"===this.state?this.resize(t):"move"===this.state?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(t)},e.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=W.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){this.positionGrips()},e.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},e.prototype.createGrip=function(){var t=new it;return t.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},e.prototype.positionGrip=function(t,e,r){var i=t.transform.baseVal.getItem(0);i.setTranslate(e,r),t.transform.baseVal.replaceItem(i,0)},e.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var r=e;this.x1=r.x1,this.y1=r.y1,this.x2=r.x2,this.y2=r.y2},e.prototype.scale=function(e,r){t.prototype.scale.call(this,e,r),this.x1=this.x1*e,this.y1=this.y1*r,this.x2=this.x2*e,this.y2=this.y2*r,this.adjustVisual(),this.adjustControlBox()},e}(et),dt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.strokeColor="transparent",n.strokeWidth=0,n.strokeDasharray="",n.setStrokeColor=n.setStrokeColor.bind(n),n.setStrokeWidth=n.setStrokeWidth.bind(n),n.setStrokeDasharray=n.setStrokeDasharray.bind(n),n.strokeColor=i.defaultColor,n.strokeWidth=i.defaultStrokeWidth,n.strokeDasharray=i.defaultStrokeDasharray,n.strokePanel=new tt("Line color",i.defaultColorSet,i.defaultColor),n.strokePanel.onColorChanged=n.setStrokeColor,n.strokeWidthPanel=new at("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),n.strokeWidthPanel.onWidthChanged=n.setStrokeWidth,n.strokeStylePanel=new lt("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),n.strokeStylePanel.onStyleChanged=n.setStrokeDasharray,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorLine&&e!==this.visibleLine)},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.selectorLine=W.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=W.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)},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},e.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()),W.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),W.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),W.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},t.prototype.getState.call(this));return r.typeName=e.typeName,r},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var r=e;this.strokeColor=r.strokeColor,this.strokeWidth=r.strokeWidth,this.strokeDasharray=r.strokeDasharray,this.createVisual(),this.adjustVisual()},e.typeName="LineMarker",e.title="Line marker",e.icon='',e}(ht),ft=function(t){function e(e,r,i,n){var s=t.call(this,e,n||'')||this;return s.fonts=[],s.fontBoxes=[],s.fonts=r,s.currentFont=i,s.setCurrentFont=s.setCurrentFont.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.flexGrow="2",this.fonts.forEach((function(r){var i=document.createElement("div");i.style.display="inline-block",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.fonts.length-5+"%",i.style.borderColor=r===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentFont(r,i)})),e.appendChild(i);var n=document.createElement("div");n.style.display="flex",n.style.minHeight="20px",n.style.flexGrow="2",n.style.fontFamily=r,n.style.overflow="hidden";var s=document.createElement("div");s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",s.innerHTML="The quick brown fox jumps over the lazy dog",n.appendChild(s),i.appendChild(n),t.fontBoxes.push(i)})),e},e.prototype.setCurrentFont=function(t,e){var r=this;this.currentFont=t,this.fontBoxes.forEach((function(t){t.style.borderColor=t===e?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},e}(J),pt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.color="transparent",n.padding=5,n.DEFAULT_TEXT="your text here",n.text=n.DEFAULT_TEXT,n.isMoved=!1,n.color=i.defaultColor,n.fontFamily=i.defaultFontFamily,n.defaultSize={x:100,y:30},n.setColor=n.setColor.bind(n),n.setFont=n.setFont.bind(n),n.renderText=n.renderText.bind(n),n.sizeText=n.sizeText.bind(n),n.textEditDivClicked=n.textEditDivClicked.bind(n),n.showTextEditor=n.showTextEditor.bind(n),n.setSize=n.setSize.bind(n),n.positionTextEditor=n.positionTextEditor.bind(n),n.colorPanel=new tt("Color",i.defaultColorSet,i.defaultColor),n.colorPanel.onColorChanged=n.setColor,n.fontFamilyPanel=new ft("Font",i.defaultFontFamilies,i.defaultFontFamily),n.fontFamilyPanel.onFontChanged=n.setFont,n}return U(e,t),e.prototype.ownsTarget=function(e){if(t.prototype.ownsTarget.call(this,e)||e===this.visual||e===this.textElement||e===this.bgRectangle)return!0;var r=!1;return this.textElement.childNodes.forEach((function(t){t===e&&(r=!0)})),r},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.bgRectangle=W.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=W.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(W.createTransform()),this.textElement.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.renderText=function(){var t=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(e){t.textElement.appendChild(W.createTSpan(""===e.trim()?" ":e.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},e.prototype.getTextScale=function(){var t=this.textElement.getBBox(),e=1;if(t.width>0&&t.height>0){var r=(1*this.width-this.width*this.padding*2/100)/t.width,i=(1*this.height-this.height*this.padding*2/100)/t.height;e=Math.min(r,i)}return e},e.prototype.getTextPosition=function(t){var e=this.textElement.getBBox(),r=0,i=0;return e.width>0&&e.height>0&&(r=(this.width-e.width*t)/2,i=this.height/2-e.height*t/2),{x:r,y:i}},e.prototype.sizeText=function(){var t=this.textElement.getBBox(),e=this.getTextScale(),r=this.getTextPosition(e);r.y-=t.y*e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+r.x+"px, "+r.y+"px) scale("+e+", "+e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(r.x,r.y),this.textElement.transform.baseVal.getItem(1).setScale(e,e))},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.isMoved=!0,this.setSize(),this.sizeText()},e.prototype.setSize=function(){t.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},e.prototype.pointerUp=function(e){var r=this.state;"creating"===r&&(this._suppressMarkerCreateEvent=!0),t.prototype.pointerUp.call(this,e),this.setSize(),("creating"===r||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.showTextEditor=function(){var t=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(t){t.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var e=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&e>.9;)e-=.1,t.textEditor.style.fontSize=Math.max(e,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(t){if(t.clipboardData){var e=t.clipboardData.getData("text"),r=window.getSelection();if(!r.rangeCount)return!1;r.deleteFromDocument(),r.getRangeAt(0).insertNode(document.createTextNode(e)),t.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},e.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var t=this.getTextScale(),e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),r=this.textElement.getBBox(),i={x:r.width*t,y:r.height*t};e.x-=i.x/2,e.y-=i.y/2,this.textEditor.style.top=e.y+"px",this.textEditor.style.left=e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-e.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},e.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},e.prototype.select=function(){t.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},e.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),t.prototype.deselect.call(this)},e.prototype.dblClick=function(e,r){t.prototype.dblClick.call(this,e,r),this.showTextEditor()},e.prototype.setColor=function(t){this.textElement&&W.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},e.prototype.setFont=function(t){this.textElement&&W.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},e.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},e.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},t.prototype.getState.call(this));return r.typeName=e.typeName,r},e.prototype.restoreState=function(e){var r=e;this.color=r.color,this.fontFamily=r.fontFamily,this.padding=r.padding,this.text=r.text,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,r){t.prototype.scale.call(this,e,r),this.setSize(),this.sizeText(),this.positionTextEditor()},e.typeName="TextMarker",e.title="Text marker",e.icon='',e}(st),gt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.color="transparent",n.lineWidth=3,n.drawing=!1,n.pixelRatio=1,n.color=i.defaultColor,n.lineWidth=i.defaultStrokeWidth,n.pixelRatio=i.freehandPixelRatio,n.setColor=n.setColor.bind(n),n.addCanvas=n.addCanvas.bind(n),n.finishCreation=n.finishCreation.bind(n),n.setLineWidth=n.setLineWidth.bind(n),n.colorPanel=new tt("Color",i.defaultColorSet,i.defaultColor),n.colorPanel.onColorChanged=n.setColor,n.lineWidthPanel=new at("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),n.lineWidthPanel.onWidthChanged=n.setLineWidth,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.drawingImage)},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.drawingImage=W.createImage(),this.visual.appendChild(this.drawingImage);var t=W.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,r){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(e.x,e.y),this.drawing=!0):t.prototype.pointerDown.call(this,e,r)},e.prototype.manipulate=function(e){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(e.x,e.y),this.canvasContext.stroke()):t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):t.prototype.pointerUp.call(this,e)},e.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)},e.prototype.select=function(){"creating"===this.state&&this.finishCreation(),t.prototype.select.call(this)},e.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),t.prototype.deselect.call(this)},e.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],r=e[0],i=e[1],n=e[2],s=e[3],o=!1,a=0;a0&&(o=!0,as&&(s=a),l>n&&(n=l));if(o){this.left=r/this.pixelRatio,this.top=i/this.pixelRatio,this.width=(n-r)/this.pixelRatio,this.height=(s-i)/this.pixelRatio;var c=document.createElement("canvas");c.width=n-r,c.height=s-i,c.getContext("2d").putImageData(this.canvasContext.getImageData(r,i,n-r,s-i),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},e.prototype.setDrawingImage=function(){W.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},e.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},e.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=Object.assign({drawingImgUrl:this.drawingImgUrl},t.prototype.getState.call(this));return r.typeName=e.typeName,r},e.prototype.restoreState=function(e){this.createVisual(),t.prototype.restoreState.call(this,e),this.drawingImgUrl=e.drawingImgUrl,this.setDrawingImage()},e.prototype.scale=function(e,r){t.prototype.scale.call(this,e,r),this.setDrawingImage()},e.typeName="FreehandMarker",e.title="Freehand marker",e.icon='',e}(st),mt=function(t){function e(e,r,i){var n=t.call(this,e,i||'')||this;return n.typeBoxes=[],n.currentType=r,n.setCurrentType=n.setCurrentType.bind(n),n}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2";for(var r=function(r){var n="both";switch(r){case 0:n="both";break;case 1:n="start";break;case 2:n="end";break;case 3:n="none"}var s=document.createElement("div");if(s.style.display="flex",s.style.flexGrow="2",s.style.alignItems="center",s.style.justifyContent="space-between",s.style.padding="5px",s.style.borderWidth="2px",s.style.borderStyle="solid",s.style.borderColor=n===i.currentType?i.uiStyleSettings.toolboxAccentColor:"transparent",s.addEventListener("click",(function(){t.setCurrentType(n,s)})),e.appendChild(s),"both"===n||"start"===n){var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.minHeight="20px",o.innerHTML='\n \n ',o.style.marginLeft="5px",s.appendChild(o)}var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",a.appendChild(l),s.appendChild(a),"both"===n||"end"===n){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='\n \n ',c.style.marginRight="5px",s.appendChild(c)}i.typeBoxes.push(s)},i=this,n=0;n<4;n++)r(n);return e},e.prototype.setCurrentType=function(t,e){var r=this;this.currentType=t,this.typeBoxes.forEach((function(t){t.style.borderColor=t===e?void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},e}(J),vt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.arrowType="end",n.arrowBaseHeight=10,n.arrowBaseWidth=10,n.getArrowPoints=n.getArrowPoints.bind(n),n.setArrowType=n.setArrowType.bind(n),n.arrowTypePanel=new mt("Arrow type","end"),n.arrowTypePanel.onArrowTypeChanged=n.setArrowType,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.arrow1&&e!==this.arrow2)},e.prototype.getArrowPoints=function(t,e){var r=this.arrowBaseWidth+2*this.strokeWidth,i=this.arrowBaseHeight+2*this.strokeWidth;return t-r/2+","+(e+i/2)+" "+t+","+(e-i/2)+" "+(t+r/2)+","+(e+i/2)},e.prototype.createTips=function(){this.arrow1=W.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=W.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.arrow2)},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),"creating"===this.state&&this.createTips()},e.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",W.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),W.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),r=this.arrow1.transform.baseVal.getItem(0);r.setRotate(e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(r,0);var i=this.arrow2.transform.baseVal.getItem(0);i.setRotate(e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(i,0)}},e.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=Object.assign({arrowType:this.arrowType},t.prototype.getState.call(this));return r.typeName=e.typeName,r},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var r=e;this.arrowType=r.arrowType,this.createTips(),this.adjustVisual()},e.typeName="ArrowMarker",e.title="Arrow marker",e.icon='',e}(dt),yt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.fillColor=i.defaultFillColor,n.strokeWidth=0,n.fillPanel=new tt("Color",i.defaultColorSet,i.defaultFillColor),n.fillPanel.onColorChanged=n.setFillColor,n}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=t.prototype.getState.call(this);return r.typeName=e.typeName,r},e.typeName="CoverMarker",e.title="Cover marker",e.icon='',e}(ot),bt=function(t){function e(e,r,i,n){var s=t.call(this,e,n||'')||this;return s.opacities=[],s.opacityBoxes=[],s.opacities=r,s.currentOpacity=i,s.setCurrentOpacity=s.setCurrentOpacity.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",e.style.justifyContent="space-between",this.opacities.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=r===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentOpacity(r,i)})),e.appendChild(i);var n=document.createElement("div");n.innerText=100*r+"%",i.appendChild(n),t.opacityBoxes.push(i)})),e},e.prototype.setCurrentOpacity=function(t,e){var r=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(t){t.style.borderColor=t===e?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},e}(J),xt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.setOpacity=n.setOpacity.bind(n),n.fillColor=i.defaultHighlightColor,n.strokeWidth=0,n.opacity=i.defaultHighlightOpacity,n.fillPanel=new tt("Color",i.defaultColorSet,n.fillColor),n.fillPanel.onColorChanged=n.setFillColor,n.opacityPanel=new bt("Opacity",i.defaultOpacitySteps,n.opacity),n.opacityPanel.onOpacityChanged=n.setOpacity,n}return U(e,t),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&W.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=t.prototype.getState.call(this);return r.typeName=e.typeName,r},e.typeName="HighlightMarker",e.title="Highlight marker",e.icon='',e}(yt),St='',Ct=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.bgColor="transparent",n.tipPosition={x:0,y:0},n.tipBase1Position={x:0,y:0},n.tipBase2Position={x:0,y:0},n.tipMoving=!1,n.color=i.defaultStrokeColor,n.bgColor=i.defaultFillColor,n.fontFamily=i.defaultFontFamily,n.defaultSize={x:100,y:30},n.setBgColor=n.setBgColor.bind(n),n.getTipPoints=n.getTipPoints.bind(n),n.positionTip=n.positionTip.bind(n),n.setTipPoints=n.setTipPoints.bind(n),n.colorPanel=new tt("Text color",i.defaultColorSet,n.color,''),n.colorPanel.onColorChanged=n.setColor,n.bgColorPanel=new tt("Fill color",i.defaultColorSet,n.bgColor,St),n.bgColorPanel.onColorChanged=n.setBgColor,n.fontFamilyPanel=new ft("Font",i.defaultFontFamilies,i.defaultFontFamily),n.fontFamilyPanel.onFontChanged=n.setFont,n.tipGrip=new it,n.tipGrip.visual.transform.baseVal.appendItem(W.createTransform()),n.controlBox.appendChild(n.tipGrip.visual),n}return U(e,t),e.prototype.ownsTarget=function(e){return t.prototype.ownsTarget.call(this,e)||this.tipGrip.ownsTarget(e)||this.tip===e},e.prototype.createTip=function(){W.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=W.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},e.prototype.pointerDown=function(e,r){"new"===this.state&&t.prototype.pointerDown.call(this,e,r),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(r)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):t.prototype.pointerDown.call(this,e,r)},e.prototype.pointerUp=function(e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,t.prototype.pointerUp.call(this,e);else{var r="creating"===this.state;t.prototype.pointerUp.call(this,e),this.setTipPoints(r),this.positionTip()}},e.prototype.manipulate=function(e){if(this.tipMoving){var r=this.unrotatePoint(e);this.tipPosition={x:r.x-this.manipulationStartLeft,y:r.y-this.manipulationStartTop},this.positionTip()}else t.prototype.manipulate.call(this,e)},e.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(W.setAttributes(this.bgRectangle,[["fill",t]]),W.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},e.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},e.prototype.setTipPoints=function(t){void 0===t&&(t=!1);var e=Math.min(this.height/2,15),r=this.height/5;t&&(this.tipPosition={x:e+r/2,y:this.height+20});var i=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?i.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),r=this.tip1.transform.baseVal.getItem(0);r.setRotate(e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(r,0);var i=this.tip2.transform.baseVal.getItem(0);i.setRotate(e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(i,0)}},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=t.prototype.getState.call(this);return r.typeName=e.typeName,r},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e),this.createTips(),this.adjustVisual()},e.typeName="MeasurementMarker",e.title="Measurement marker",e.icon='',e}(dt),Et=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.strokePanel.colors=i.defaultColorSet,n.fillColor="transparent",n}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=t.prototype.getState.call(this);return r.typeName=e.typeName,r},e.typeName="EllipseFrameMarker",e.title="Ellipse frame marker",e.icon='',e}(wt),Tt=function(){function t(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),t.prototype.addUndoStep=function(t){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(t)||(this.undoStack.push(t),JSON.stringify(this.lastRedoStep)!==JSON.stringify(t)&&this.redoStack.splice(0,this.redoStack.length))},t.prototype.replaceLastUndoStep=function(t){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=t)},t.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},t.prototype.undo=function(){if(this.undoStack.length>1){var t=this.undoStack.pop();return void 0!==t&&this.redoStack.push(t),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},t.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},t}(),Lt=function(t){function e(e,r,i){var n=t.call(this,e,r,i)||this;return n.strokeColor="transparent",n.strokeWidth=0,n.strokeDasharray="",n.curveX=0,n.curveY=0,n.manipulationStartCurveX=0,n.manipulationStartCurveY=0,n.setStrokeColor=n.setStrokeColor.bind(n),n.setStrokeWidth=n.setStrokeWidth.bind(n),n.setStrokeDasharray=n.setStrokeDasharray.bind(n),n.positionGrips=n.positionGrips.bind(n),n.addControlGrips=n.addControlGrips.bind(n),n.adjustVisual=n.adjustVisual.bind(n),n.setupControlBox=n.setupControlBox.bind(n),n.resize=n.resize.bind(n),n.strokeColor=i.defaultColor,n.strokeWidth=i.defaultStrokeWidth,n.strokeDasharray=i.defaultStrokeDasharray,n.strokePanel=new tt("Line color",i.defaultColorSet,i.defaultColor),n.strokePanel.onColorChanged=n.setStrokeColor,n.strokeWidthPanel=new at("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),n.strokeWidthPanel.onWidthChanged=n.setStrokeWidth,n.strokeStylePanel=new lt("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),n.strokeStylePanel.onStyleChanged=n.setStrokeDasharray,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorCurve&&e!==this.visibleCurve&&!this.curveGrip.ownsTarget(e))},e.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.selectorCurve=W.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=W.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)},e.prototype.pointerDown=function(e,r){t.prototype.pointerDown.call(this,e,r),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=e.x,this.curveY=e.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(r)&&(this.activeGrip=this.curveGrip,this._state="resize")},e.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),W.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),W.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),W.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=W.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=W.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)},e.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,t.prototype.addControlGrips.call(this)},e.prototype.positionGrips=function(){t.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()))},e.prototype.manipulate=function(e){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+e.y-this.manipulationStartY),t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){this.activeGrip===this.curveGrip&&(this.curveX=e.x,this.curveY=e.y),t.prototype.resize.call(this,e),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},e.prototype.scale=function(e,r){this.curveX=this.curveX*e,this.curveY=this.curveY*r,t.prototype.scale.call(this,e,r)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var r=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},t.prototype.getState.call(this));return r.typeName=e.typeName,r},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var r=e;this.strokeColor=r.strokeColor,this.strokeWidth=r.strokeWidth,this.strokeDasharray=r.strokeDasharray,this.curveX=r.curveX,this.curveY=r.curveY,this.createVisual(),this.adjustVisual()},e.typeName="CurveMarker",e.title="Curve marker",e.icon='',e}(ht),At=function(){function t(t,e){void 0===e&&(e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=t,this.cancelable=e}return Object.defineProperty(t.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this._defaultPrevented=!0},t}(),Dt=function(t){function e(e,r,i){var n=t.call(this,e,!1)||this;return n.dataUrl=r,n.state=i,n}return U(e,t),e}(At),Rt=function(t){function e(e,r,i){void 0===i&&(i=!1);var n=t.call(this,e,i)||this;return n.marker=r,n}return U(e,t),e}(At),Ot=function(){function t(){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 t.prototype.addEventListener=function(t,e){this[t].push(e)},t.prototype.removeEventListener=function(t,e){var r=this[t].indexOf(e);r>-1&&this[t].splice(r,1)},t}(),_t=function(){function t(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ut,this._isOpen=!1,this.undoRedoManager=new Tt,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 Ot,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=t.instanceCounter++,this.styles=new Y(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.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(t.prototype,"ALL_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,Et,wt,xt,Ct,kt,yt,dt,Lt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,wt,xt,Ct]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,xt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(t){var e=this;this._availableMarkerTypes.splice(0),t.forEach((function(t){if("string"==typeof t){var r=e.ALL_MARKER_TYPES.find((function(e){return e.typeName===t}));void 0!==r&&e._availableMarkerTypes.push(r)}else e._availableMarkerTypes.push(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(t){this._zoomLevel=t,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(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),V.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},t.prototype.show=function(){var t=this;void 0===this.styles.styleSheetRoot&&void 0!==q.styleSheetRoot&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(e){return e(new At(t))}))},t.prototype.render=function(){return H(this,void 0,void 0,(function(){var t;return G(this,(function(e){switch(e.label){case 0:return this.setCurrentMarker(),(t=new K).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.markersOnly=this.renderMarkersOnly,t.width=this.renderWidth,t.height=this.renderHeight,[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return e.sent(),[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,e.sent()]}}))}))},t.prototype.close=function(t){var e=this;if(void 0===t&&(t=!1),this.isOpen){var r=!1;t||this.eventListeners.beforeclose.forEach((function(t){var i=new At(e,!0);t(i),i.defaultPrevented&&(r=!0)})),r||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(t){return t(new At(e))})),this.detachEvents(),this._isOpen=!1)}},t.prototype.addMarkersToToolbar=function(){for(var t,e=[],r=0;rthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*t:this.editorCanvas.clientWidth,r=e',t.title="Powered by marker.js",t.style.display="grid",t.style.alignItems="center",t.style.justifyItems="center",t.style.padding="3px",t.style.width="20px",t.style.height="20px",this.logoUI.appendChild(t),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},t.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?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")},t.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"},t.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},t.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&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 t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?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=void 0!==this.uiStyleSettings.zIndex?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="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Z(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","popup"===this.settings.displayMode&&(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","popup"===this.settings.displayMode&&(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-1&&this.markers.splice(this.markers.indexOf(t),1),t.dispose()},t.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},t.prototype.toolbarButtonClicked=function(t,e){if("marker"===t&&void 0!==e)this.createNewMarker(e);else if("action"===t)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":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},t.prototype.deleteSelectedMarker=function(){var t=this;if(void 0!==this._currentMarker){var e=!1;if(this.eventListeners.markerbeforedelete.forEach((function(r){var i=new Rt(t,t._currentMarker,!0);r(i),i.defaultPrevented&&(e=!0)})),!e){var r=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(e){return e(new Rt(t,r))}))}}},t.prototype.clear=function(){var t=this,e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(r){var i=new Rt(t,void 0,!0);r(i),i.defaultPrevented&&(e=!0)})),!e)){this.setCurrentMarker();for(var r=function(e){var r=i.markers[e];i.setCurrentMarker(i.markers[e]),i._currentMarker.dispose(),i.markerImage.removeChild(i._currentMarker.container),i.markers.splice(i.markers.indexOf(i._currentMarker),1),i.eventListeners.markerdelete.forEach((function(e){return e(new Rt(t,r))}))},i=this,n=this.markers.length-1;n>=0;n--)r(n);this.addUndoStep()}},Object.defineProperty(t.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),t.prototype.showNotesEditor=function(){var t;void 0!==this._currentMarker&&(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=null!==(t=this._currentMarker.notes)&&void 0!==t?t:"",this.overlayContainer.appendChild(this.notesArea))},t.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},t.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},t.prototype.addUndoStep=function(){var t=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var e=this.getState(),r=this.undoRedoManager.getLastUndoStep();if(!r||r.width===e.width&&r.height===e.height){var i=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(e),i1&&this.panTo({x:t.clientX,y:t.clientY}))},t.prototype.onPointerUp=function(t){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(t.clientX,t.clientY)),this.isDragging=!1,this.addUndoStep()},t.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},t.prototype.onKeyUp=function(t){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==t.key&&"Backspace"!==t.key||this.deleteSelectedMarker()},t.prototype.clientToLocalCoordinates=function(t,e){var r=this.markerImage.getBoundingClientRect();return{x:(t-r.left)/this.zoomLevel,y:(e-r.top)/this.zoomLevel}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"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()},t.prototype.addLicenseKey=function(t){V.addKey(t)},t.prototype.addEventListener=function(t,e){this.eventListeners.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.eventListeners.removeEventListener(t,e)},t.prototype.renderState=function(t){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(t),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),t.prototype.focus=function(){var t=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(e){return e(new At(t))})))},t.prototype.blur=function(){var t=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(e){return e(new At(t))})))},t.instanceCounter=0,t}(),It=function(t,e){return(It=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)}; +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,i){"use strict";i("DYRE");var r=i("zeV3"),n=(i("+L6B"),i("2/Rp")),s=i("k1fw"),o=i("9og8"),a=i("tJVT"),l=i("WmNS"),c=i.n(l),u=i("q1tI"),h=i.n(u),d=(i("vg9a"),i("DlQD")),f=i.n(d),p=i("rUJ1");var g=[],m=["
        "],v=new f.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){g.length=0,m=["
          "]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function S(){return function t(e,i,r,n){if(i>=e.length||e[i].level<=r)return i;var s=e[i];n.push("
        • "+s.text+"");var o=[];return i=t(e,++i,s.level,o),o.length>0&&(n.push("
            "),o.forEach((function(t){n.push(t)})),n.push("
          ")),n.push("
        • "),i=t(e,i,r,n)}(g,0,0,m),m.push("
        "),m.join("")}var C={heading:function(t){var e=y.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},fences:function(t){var e=this.rules.block.fences.exec(t);if(e){var i=e[0],r=function(t,e){var i=t.match(/^(\s+)(?:```)/);if(null===i)return e;var r=i[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:Object(a.a)(e,1)[0].length>=r.length?t.slice(r.length):t})).join("\n")}(i,e[3]||""),n=e[2]?e[2].trim():e[2];if(["latex","katex","math"].indexOf(n)>=0){var s=E(),o=r;r=s,T[s]={type:"block",expression:o}}return{type:"code",raw:i,lang:n,text:r}}}},w=/(?:\${2})([^\n`]+?)(?:\${2})/gi,k=0,E=function(){return"__special_katext_id_".concat(k++,"__")},T={};function L(){k=0,T={}}function A(t){return t=t.replace(w,(function(t,e){var i=E();return T[i]={type:"inline",expression:e},i}))}var D=v.listitem;v.listitem=function(t){return D(A(t))};var R=v.paragraph;v.paragraph=function(t){return R(A(t))};var O=v.tablecell;v.tablecell=function(t,e){return O(A(t),e)},v.code=function(t,e,i){var r=(e||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"

        ".concat(t,"

        "):'
        ').concat(i?t:Object(p.escape)(t,!0),"
        \n"):'
        '+(i?t:Object(p.escape)(t,!0))+"
        "},v.heading=function(t,e,i){var r=this.options.headerPrefix+i.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return g.push({anchor:r,level:e,text:t}),"'+t+""},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:C,renderer:v});var _=f.a,I=(i("SJMd"),i("ulZh")),M=i.n(I),P=i("m3rI"),N=i("Oy/b"),F=i("p5ED"),B=i("ErOA"),j=function(t,e){return(j=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function U(t,e){function i(){this.constructor=t}j(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function H(t,e,i,r){return new(i||(i=Promise))((function(n,s){function o(t){try{l(r.next(t))}catch(t){s(t)}}function a(t){try{l(r.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))}function G(t,e){var i,r,n,s,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(n=2&s[0]?r.return:s[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;switch(r=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]',"select"),this.addActionButton(i,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(i,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(i,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(i,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(i,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(i,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(i,'',"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(t){var i=document.createElement("div");i.className=""+e.toolbarButtonStyleClass.name,i.setAttribute("data-type-name",t.typeName),i.innerHTML=t.icon,i.addEventListener("click",(function(){e.markerToolbarButtonClicked(i,t)})),e.buttons.push(i),e.markerButtons.push(i)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var r=document.createElement("div");r.className=this.toolbarBlockStyleClass.name,r.style.whiteSpace="nowrap",r.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(r),this.addActionButton(r,'',"render"),this.addActionButton(r,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},t.prototype.addButtonClickListener=function(t){this.buttonClickListeners.push(t)},t.prototype.removeButtonClickListener=function(t){this.buttonClickListeners.indexOf(t)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(t),1)},t.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},t.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var t=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var e=0;e0&&this.buttonClickListeners.forEach((function(t){return t("marker",e)})),this.markerButtonOverflowBlock.style.display="none"},t.prototype.actionToolbarButtonClicked=function(t,e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("action",e)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},t.prototype.setActiveButton=function(t){this.resetButtonStyles(),t.className=t.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),t.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},t.prototype.setActiveMarkerButton=function(t){var e=this.markerButtons.find((function(e){return e.getAttribute("data-type-name")===t}));e&&this.setActiveButton(e)},t.prototype.setCurrentMarker=function(t){var e=this;this.currentMarker=t,this.buttons.filter((function(t){return/delete|notes/.test(t.getAttribute("data-action"))})).forEach((function(t){void 0===e.currentMarker?(t.style.fillOpacity="0.4",t.style.pointerEvents="none"):(t.style.fillOpacity="1",t.style.pointerEvents="all")}))},t}(),Q=function(){function t(t,e,i,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=t,this.displayMode=e,this.uiStyleSettings=i,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return t.prototype.addStyles=function(){var t;this.toolboxStyleClass=this.styles.addClass(new $("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new $("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new $("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new $("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new $("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new $("toolbox-panel-row_colors","\n background-color: "+(null!==(t=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==t?t:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new $("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new $("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new X("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new X("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},t.prototype.show=function(t){var e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==e?e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},t.prototype.setPanelButtons=function(t){var e,i,r=this;this.panels=t,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==e?e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(i=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==i?i:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(t){var e;t.uiStyleSettings=r.uiStyleSettings;var i=document.createElement("div");i.className=r.toolboxButtonStyleClass.name+" "+(null!==(e=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==e?e:r.toolboxButtonStyleColorsClass.name),i.innerHTML=t.icon,i.title=t.title,i.addEventListener("click",(function(){r.panelButtonClick(t)})),r.panelButtons.push(i),r.buttonRow.appendChild(i)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},t.prototype.panelButtonClick=function(t){var e=this,i=-1;if(t!==this.activePanel){i=this.panels.indexOf(t),this.panelRow.innerHTML="";var r=t.getUi();r.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(r),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=t}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===e.displayMode?e.panelRow.style.display="none":e.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(t,r){var n,s;t.className=e.toolboxButtonStyleClass.name+" "+(r===i?""+(null!==(n=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==n?n:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(s=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==s?s:e.toolboxButtonStyleColorsClass.name))}))},t}(),J=function(t,e){this.title=t,this.icon=e},tt=function(t){function e(e,i,r,n){var s=t.call(this,e,n||'')||this;return s.colors=[],s.addTransparent=!1,s.colorBoxes=[],s.colors=i,s.currentColor=r,s.setCurrentColor=s.setCurrentColor.bind(s),s.getColorBox=s.getColorBox.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.whiteSpace="nowrap",this.colors.forEach((function(i){var r=t.getColorBox(i);e.appendChild(r),t.colorBoxes.push(r)})),e},e.prototype.getColorBox=function(t){var e=this,i=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-i,n=document.createElement("div");n.style.display="inline-block",n.style.boxSizing="content-box",n.style.width=r-2+"px",n.style.height=r-2+"px",n.style.padding="1px",n.style.marginRight="2px",n.style.marginBottom="2px",n.style.borderWidth="2px",n.style.borderStyle="solid",n.style.borderRadius=(r+2)/2+"px",n.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",n.addEventListener("click",(function(){e.setCurrentColor(t,n)}));var s=document.createElement("div");return s.style.display="inline-block",s.style.width=r-2+"px",s.style.height=r-2+"px",s.style.backgroundColor=t,s.style.borderRadius=r/2+"px","transparent"===t&&(s.style.fill=this.uiStyleSettings.toolboxAccentColor,s.innerHTML='\n \n '),n.appendChild(s),n},e.prototype.setCurrentColor=function(t,e){var i=this;this.currentColor=t,this.colorBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},e}(J),et=function(){function t(t,e,i){this._state="new",this._isSelected=!1,this._container=t,this._overlayContainer=e,this.globalSettings=i,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(t.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!1},Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},t.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},t.prototype.pointerDown=function(t,e){},t.prototype.dblClick=function(t,e){},t.prototype.manipulate=function(t){},t.prototype.pointerUp=function(t){this.stateChanged()},t.prototype.dispose=function(){},t.prototype.addMarkerVisualToContainer=function(t){this.container.childNodes.length>0?this.container.insertBefore(t,this.container.childNodes[0]):this.container.appendChild(t)},t.prototype.getState=function(){return{typeName:t.typeName,state:this.state,notes:this.notes}},t.prototype.restoreState=function(t){this._state=t.state,this.notes=t.notes},t.prototype.scale=function(t,e){},t.prototype.colorChanged=function(t){this.onColorChanged&&this.onColorChanged(t),this.stateChanged()},t.prototype.fillColorChanged=function(t){this.onFillColorChanged&&this.onFillColorChanged(t),this.stateChanged()},t.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var t=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),t.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(t)&&this.onStateChanged(this)}},t.typeName="MarkerBase",t}(),it=function(){function t(){this.findGripByVisual=this.findGripByVisual.bind(this)}return t.prototype.findGripByVisual=function(t){return this.topLeft.ownsTarget(t)?this.topLeft:this.topCenter.ownsTarget(t)?this.topCenter:this.topRight.ownsTarget(t)?this.topRight:this.centerLeft.ownsTarget(t)?this.centerLeft:this.centerRight.ownsTarget(t)?this.centerRight:this.bottomLeft.ownsTarget(t)?this.bottomLeft:this.bottomCenter.ownsTarget(t)?this.bottomCenter:this.bottomRight.ownsTarget(t)?this.bottomRight:void 0},t}(),rt=function(){function t(){this.GRIP_SIZE=10,this.visual=W.createGroup(),this.visual.appendChild(W.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(W.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t}(),nt=function(){function t(){}return t.toITransformMatrix=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},t.toSVGMatrix=function(t,e){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},t}(),st=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.left=0,n.top=0,n.width=0,n.height=0,n.defaultSize={x:50,y:20},n.offsetX=0,n.offsetY=0,n.rotationAngle=0,n.CB_DISTANCE=10,n._suppressMarkerCreateEvent=!1,n.container.transform.baseVal.appendItem(W.createTransform()),n.setupControlBox(),n}return U(e,t),Object.defineProperty(e.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var e=W.createTransform();this._visual.transform.baseVal.appendItem(e)},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!!(void 0!==this.controlGrips.findGripByVisual(e)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(e))},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(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 r=this.unrotatePoint(e);if(this.manipulationStartX=r.x,this.manipulationStartY=r.y,this.offsetX=r.x-this.left,this.offsetY=r.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(i),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(i)){this.activeGrip=this.rotatorGrip;var n=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=n.x-this.width/2,this.top=n.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var s=this.container.transform.baseVal.getItem(0);s.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(s,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},e.prototype.pointerUp=function(e){var i=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(e),this._state="select","creating"===i&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},e.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},e.prototype.manipulate=function(t){var e=this.unrotatePoint(t);"creating"===this.state?this.resize(t):"move"===this.state?(this.left=this.manipulationStartLeft+(e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(e):"rotate"===this.state&&this.rotate(t)},e.prototype.resize=function(t){var e=this.manipulationStartLeft,i=this.manipulationStartWidth,r=this.manipulationStartTop,n=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:e=this.manipulationStartLeft+t.x-this.manipulationStartX,i=this.manipulationStartWidth+this.manipulationStartLeft-e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:i=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+t.y-this.manipulationStartY,n=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:n=this.manipulationStartHeight+t.y-this.manipulationStartY}i>=0?(this.left=e,this.width=i):(this.left=e+i,this.width=-i),n>=0?(this.top=r,this.height=n):(this.top=r+n,this.height=-n),this.setSize()},e.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},e.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var e=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*e,this.applyRotation()}},e.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},e.prototype.rotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM(),i=W.createPoint(t.x,t.y);return{x:(i=i.matrixTransform(e)).x,y:i.y}},e.prototype.unrotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM();e=e.inverse();var i=W.createPoint(t.x,t.y);return{x:(i=i.matrixTransform(e)).x,y:i.y}},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=W.createGroup();var t=W.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=W.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),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=W.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 it,this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(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()},e.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(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},e.prototype.createGrip=function(){var t=new rt;return t.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,e=-t/2,i=e,r=(this.width+this.CB_DISTANCE)/2-t/2,n=(this.height+this.CB_DISTANCE)/2-t/2,s=this.height+this.CB_DISTANCE-t/2,o=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,e,i),this.positionGrip(this.controlGrips.topCenter.visual,r,i),this.positionGrip(this.controlGrips.topRight.visual,o,i),this.positionGrip(this.controlGrips.centerLeft.visual,e,n),this.positionGrip(this.controlGrips.centerRight.visual,o,n),this.positionGrip(this.controlGrips.bottomLeft.visual,e,s),this.positionGrip(this.controlGrips.bottomCenter.visual,r,s),this.positionGrip(this.controlGrips.bottomRight.visual,o,s),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,i-3*this.CB_DISTANCE)},e.prototype.positionGrip=function(t,e,i){var r=t.transform.baseVal.getItem(0);r.setTranslate(e,i),t.transform.baseVal.replaceItem(r,0)},e.prototype.hideControlBox=function(){this.controlBox.style.display="none"},e.prototype.showControlBox=function(){this.controlBox.style.display=""},e.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:nt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:nt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.left=i.left,this.top=i.top,this.width=i.width,this.height=i.height,this.rotationAngle=i.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(nt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,i.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(nt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,i.containerTransformMatrix))},e.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i);var r=this.rotatePoint({x:this.left,y:this.top}),n=this.unrotatePoint({x:r.x*e,y:r.y*i});this.left=n.x,this.top=n.y,this.width=this.width*e,this.height=this.height*i,this.adjustControlBox()},e}(et),ot=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.fillColor="transparent",n.strokeColor="transparent",n.strokeWidth=0,n.strokeDasharray="",n.opacity=1,n.setStrokeColor=n.setStrokeColor.bind(n),n.setFillColor=n.setFillColor.bind(n),n.setStrokeWidth=n.setStrokeWidth.bind(n),n.setStrokeDasharray=n.setStrokeDasharray.bind(n),n.createVisual=n.createVisual.bind(n),n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},e.prototype.createVisual=function(){this.visual=W.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)},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},e.prototype.setSize=function(){t.prototype.setSize.call(this),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&W.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&W.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&W.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&W.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){var i=e;this.fillColor=i.fillColor,this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.opacity=i.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize()},e.title="Rectangle marker",e}(st),at=function(t){function e(e,i,r,n){var s=t.call(this,e,n||'')||this;return s.widths=[],s.widthBoxes=[],s.widths=i,s.currentWidth=r,s.setCurrentWidth=s.setCurrentWidth.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.widths.forEach((function(i){var r=document.createElement("div");r.style.display="flex",r.style.flexGrow="2",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=i===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentWidth(i,r)})),e.appendChild(r);var n=document.createElement("div");n.innerText=i.toString(),n.style.marginRight="5px",r.appendChild(n);var s=document.createElement("div");s.style.minHeight="20px",s.style.flexGrow="2",s.style.display="flex",s.style.alignItems="center";var o=document.createElement("hr");o.style.minWidth="20px",o.style.border="0px",o.style.borderTop=i+"px solid "+t.uiStyleSettings.toolboxColor,o.style.flexGrow="2",s.appendChild(o),r.appendChild(s),t.widthBoxes.push(r)})),e},e.prototype.setCurrentWidth=function(t,e){var i=this;this.currentWidth=t,this.widthBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},e}(J),lt=function(t){function e(e,i,r,n){var s=t.call(this,e,n||'')||this;return s.styles=[],s.styleBoxes=[],s.styles=i,s.currentStyle=r,s.setCurrentStyle=s.setCurrentStyle.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.styles.forEach((function(i){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/t.styles.length-5+"%",r.style.borderColor=i===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentStyle(i,r)})),e.appendChild(r);var n=document.createElement("div");n.style.minHeight="20px",n.style.flexGrow="2",n.style.overflow="hidden";var s='\n \n ";n.innerHTML=s,r.appendChild(n),t.styleBoxes.push(r)})),e},e.prototype.setCurrentStyle=function(t,e){var i=this;this.currentStyle=t,this.styleBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},e}(J),ct=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.strokeColor=r.defaultColor,n.strokeWidth=r.defaultStrokeWidth,n.strokeDasharray=r.defaultStrokeDasharray,n.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),n.strokePanel.onColorChanged=n.setStrokeColor,n.strokeWidthPanel=new at("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),n.strokeWidthPanel.onWidthChanged=n.setStrokeWidth,n.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),n.strokeStylePanel.onStyleChanged=n.setStrokeDasharray,n}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=t.prototype.getState.call(this);return i.typeName=e.typeName,i},e.typeName="FrameMarker",e.title="Frame marker",e.icon='',e}(ot),ut=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},ht=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.x1=0,n.y1=0,n.x2=0,n.y2=0,n.defaultLength=50,n.manipulationStartX=0,n.manipulationStartY=0,n.manipulationStartX1=0,n.manipulationStartY1=0,n.manipulationStartX2=0,n.manipulationStartY2=0,n.setupControlBox(),n}return U(e,t),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!(!this.grip1.ownsTarget(e)&&!this.grip2.ownsTarget(e))},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.manipulationStartX=e.x,this.manipulationStartY=e.y,"new"===this.state&&(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,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(i)?this.activeGrip=this.grip1:this.grip2.ownsTarget(i)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},e.prototype.pointerUp=function(e){var i=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&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","creating"===i&&this.onMarkerCreated&&this.onMarkerCreated(this)},e.prototype.adjustVisual=function(){},e.prototype.manipulate=function(t){"creating"===this.state?this.resize(t):"move"===this.state?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(t)},e.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=W.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){this.positionGrips()},e.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},e.prototype.createGrip=function(){var t=new rt;return t.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},e.prototype.positionGrip=function(t,e,i){var r=t.transform.baseVal.getItem(0);r.setTranslate(e,i),t.transform.baseVal.replaceItem(r,0)},e.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.x1=i.x1,this.y1=i.y1,this.x2=i.x2,this.y2=i.y2},e.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.x1=this.x1*e,this.y1=this.y1*i,this.x2=this.x2*e,this.y2=this.y2*i,this.adjustVisual(),this.adjustControlBox()},e}(et),dt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.strokeColor="transparent",n.strokeWidth=0,n.strokeDasharray="",n.setStrokeColor=n.setStrokeColor.bind(n),n.setStrokeWidth=n.setStrokeWidth.bind(n),n.setStrokeDasharray=n.setStrokeDasharray.bind(n),n.strokeColor=r.defaultColor,n.strokeWidth=r.defaultStrokeWidth,n.strokeDasharray=r.defaultStrokeDasharray,n.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),n.strokePanel.onColorChanged=n.setStrokeColor,n.strokeWidthPanel=new at("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),n.strokeWidthPanel.onWidthChanged=n.setStrokeWidth,n.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),n.strokeStylePanel.onStyleChanged=n.setStrokeDasharray,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorLine&&e!==this.visibleLine)},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.selectorLine=W.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=W.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)},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},e.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()),W.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),W.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),W.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},t.prototype.getState.call(this));return i.typeName=e.typeName,i},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.createVisual(),this.adjustVisual()},e.typeName="LineMarker",e.title="Line marker",e.icon='',e}(ht),ft=function(t){function e(e,i,r,n){var s=t.call(this,e,n||'')||this;return s.fonts=[],s.fontBoxes=[],s.fonts=i,s.currentFont=r,s.setCurrentFont=s.setCurrentFont.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.flexGrow="2",this.fonts.forEach((function(i){var r=document.createElement("div");r.style.display="inline-block",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/t.fonts.length-5+"%",r.style.borderColor=i===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentFont(i,r)})),e.appendChild(r);var n=document.createElement("div");n.style.display="flex",n.style.minHeight="20px",n.style.flexGrow="2",n.style.fontFamily=i,n.style.overflow="hidden";var s=document.createElement("div");s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",s.innerHTML="The quick brown fox jumps over the lazy dog",n.appendChild(s),r.appendChild(n),t.fontBoxes.push(r)})),e},e.prototype.setCurrentFont=function(t,e){var i=this;this.currentFont=t,this.fontBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},e}(J),pt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.color="transparent",n.padding=5,n.DEFAULT_TEXT="your text here",n.text=n.DEFAULT_TEXT,n.isMoved=!1,n.color=r.defaultColor,n.fontFamily=r.defaultFontFamily,n.defaultSize={x:100,y:30},n.setColor=n.setColor.bind(n),n.setFont=n.setFont.bind(n),n.renderText=n.renderText.bind(n),n.sizeText=n.sizeText.bind(n),n.textEditDivClicked=n.textEditDivClicked.bind(n),n.showTextEditor=n.showTextEditor.bind(n),n.setSize=n.setSize.bind(n),n.positionTextEditor=n.positionTextEditor.bind(n),n.colorPanel=new tt("Color",r.defaultColorSet,r.defaultColor),n.colorPanel.onColorChanged=n.setColor,n.fontFamilyPanel=new ft("Font",r.defaultFontFamilies,r.defaultFontFamily),n.fontFamilyPanel.onFontChanged=n.setFont,n}return U(e,t),e.prototype.ownsTarget=function(e){if(t.prototype.ownsTarget.call(this,e)||e===this.visual||e===this.textElement||e===this.bgRectangle)return!0;var i=!1;return this.textElement.childNodes.forEach((function(t){t===e&&(i=!0)})),i},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.bgRectangle=W.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=W.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(W.createTransform()),this.textElement.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.renderText=function(){var t=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(e){t.textElement.appendChild(W.createTSpan(""===e.trim()?" ":e.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},e.prototype.getTextScale=function(){var t=this.textElement.getBBox(),e=1;if(t.width>0&&t.height>0){var i=(1*this.width-this.width*this.padding*2/100)/t.width,r=(1*this.height-this.height*this.padding*2/100)/t.height;e=Math.min(i,r)}return e},e.prototype.getTextPosition=function(t){var e=this.textElement.getBBox(),i=0,r=0;return e.width>0&&e.height>0&&(i=(this.width-e.width*t)/2,r=this.height/2-e.height*t/2),{x:i,y:r}},e.prototype.sizeText=function(){var t=this.textElement.getBBox(),e=this.getTextScale(),i=this.getTextPosition(e);i.y-=t.y*e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+i.x+"px, "+i.y+"px) scale("+e+", "+e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(i.x,i.y),this.textElement.transform.baseVal.getItem(1).setScale(e,e))},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.isMoved=!0,this.setSize(),this.sizeText()},e.prototype.setSize=function(){t.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},e.prototype.pointerUp=function(e){var i=this.state;"creating"===i&&(this._suppressMarkerCreateEvent=!0),t.prototype.pointerUp.call(this,e),this.setSize(),("creating"===i||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.showTextEditor=function(){var t=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(t){t.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var e=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&e>.9;)e-=.1,t.textEditor.style.fontSize=Math.max(e,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(t){if(t.clipboardData){var e=t.clipboardData.getData("text"),i=window.getSelection();if(!i.rangeCount)return!1;i.deleteFromDocument(),i.getRangeAt(0).insertNode(document.createTextNode(e)),t.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},e.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var t=this.getTextScale(),e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),i=this.textElement.getBBox(),r={x:i.width*t,y:i.height*t};e.x-=r.x/2,e.y-=r.y/2,this.textEditor.style.top=e.y+"px",this.textEditor.style.left=e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-e.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},e.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},e.prototype.select=function(){t.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},e.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),t.prototype.deselect.call(this)},e.prototype.dblClick=function(e,i){t.prototype.dblClick.call(this,e,i),this.showTextEditor()},e.prototype.setColor=function(t){this.textElement&&W.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},e.prototype.setFont=function(t){this.textElement&&W.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},e.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},e.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},t.prototype.getState.call(this));return i.typeName=e.typeName,i},e.prototype.restoreState=function(e){var i=e;this.color=i.color,this.fontFamily=i.fontFamily,this.padding=i.padding,this.text=i.text,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize(),this.sizeText(),this.positionTextEditor()},e.typeName="TextMarker",e.title="Text marker",e.icon='',e}(st),gt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.color="transparent",n.lineWidth=3,n.drawing=!1,n.pixelRatio=1,n.color=r.defaultColor,n.lineWidth=r.defaultStrokeWidth,n.pixelRatio=r.freehandPixelRatio,n.setColor=n.setColor.bind(n),n.addCanvas=n.addCanvas.bind(n),n.finishCreation=n.finishCreation.bind(n),n.setLineWidth=n.setLineWidth.bind(n),n.colorPanel=new tt("Color",r.defaultColorSet,r.defaultColor),n.colorPanel.onColorChanged=n.setColor,n.lineWidthPanel=new at("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),n.lineWidthPanel.onWidthChanged=n.setLineWidth,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.drawingImage)},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.drawingImage=W.createImage(),this.visual.appendChild(this.drawingImage);var t=W.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,i){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(e.x,e.y),this.drawing=!0):t.prototype.pointerDown.call(this,e,i)},e.prototype.manipulate=function(e){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(e.x,e.y),this.canvasContext.stroke()):t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):t.prototype.pointerUp.call(this,e)},e.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)},e.prototype.select=function(){"creating"===this.state&&this.finishCreation(),t.prototype.select.call(this)},e.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),t.prototype.deselect.call(this)},e.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],i=e[0],r=e[1],n=e[2],s=e[3],o=!1,a=0;a0&&(o=!0,as&&(s=a),l>n&&(n=l));if(o){this.left=i/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(n-i)/this.pixelRatio,this.height=(s-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=n-i,c.height=s-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(i,r,n-i,s-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},e.prototype.setDrawingImage=function(){W.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},e.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},e.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=Object.assign({drawingImgUrl:this.drawingImgUrl},t.prototype.getState.call(this));return i.typeName=e.typeName,i},e.prototype.restoreState=function(e){this.createVisual(),t.prototype.restoreState.call(this,e),this.drawingImgUrl=e.drawingImgUrl,this.setDrawingImage()},e.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setDrawingImage()},e.typeName="FreehandMarker",e.title="Freehand marker",e.icon='',e}(st),mt=function(t){function e(e,i,r){var n=t.call(this,e,r||'')||this;return n.typeBoxes=[],n.currentType=i,n.setCurrentType=n.setCurrentType.bind(n),n}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2";for(var i=function(i){var n="both";switch(i){case 0:n="both";break;case 1:n="start";break;case 2:n="end";break;case 3:n="none"}var s=document.createElement("div");if(s.style.display="flex",s.style.flexGrow="2",s.style.alignItems="center",s.style.justifyContent="space-between",s.style.padding="5px",s.style.borderWidth="2px",s.style.borderStyle="solid",s.style.borderColor=n===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",s.addEventListener("click",(function(){t.setCurrentType(n,s)})),e.appendChild(s),"both"===n||"start"===n){var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.minHeight="20px",o.innerHTML='\n \n ',o.style.marginLeft="5px",s.appendChild(o)}var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",a.appendChild(l),s.appendChild(a),"both"===n||"end"===n){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='\n \n ',c.style.marginRight="5px",s.appendChild(c)}r.typeBoxes.push(s)},r=this,n=0;n<4;n++)i(n);return e},e.prototype.setCurrentType=function(t,e){var i=this;this.currentType=t,this.typeBoxes.forEach((function(t){t.style.borderColor=t===e?void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},e}(J),vt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.arrowType="end",n.arrowBaseHeight=10,n.arrowBaseWidth=10,n.getArrowPoints=n.getArrowPoints.bind(n),n.setArrowType=n.setArrowType.bind(n),n.arrowTypePanel=new mt("Arrow type","end"),n.arrowTypePanel.onArrowTypeChanged=n.setArrowType,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.arrow1&&e!==this.arrow2)},e.prototype.getArrowPoints=function(t,e){var i=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return t-i/2+","+(e+r/2)+" "+t+","+(e-r/2)+" "+(t+i/2)+","+(e+r/2)},e.prototype.createTips=function(){this.arrow1=W.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=W.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(W.createTransform()),this.visual.appendChild(this.arrow2)},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"creating"===this.state&&this.createTips()},e.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",W.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),W.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),i=this.arrow1.transform.baseVal.getItem(0);i.setRotate(e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(i,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},e.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=Object.assign({arrowType:this.arrowType},t.prototype.getState.call(this));return i.typeName=e.typeName,i},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.arrowType=i.arrowType,this.createTips(),this.adjustVisual()},e.typeName="ArrowMarker",e.title="Arrow marker",e.icon='',e}(dt),yt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.fillColor=r.defaultFillColor,n.strokeWidth=0,n.fillPanel=new tt("Color",r.defaultColorSet,r.defaultFillColor),n.fillPanel.onColorChanged=n.setFillColor,n}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=t.prototype.getState.call(this);return i.typeName=e.typeName,i},e.typeName="CoverMarker",e.title="Cover marker",e.icon='',e}(ot),bt=function(t){function e(e,i,r,n){var s=t.call(this,e,n||'')||this;return s.opacities=[],s.opacityBoxes=[],s.opacities=i,s.currentOpacity=r,s.setCurrentOpacity=s.setCurrentOpacity.bind(s),s}return U(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",e.style.justifyContent="space-between",this.opacities.forEach((function(i){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=i===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentOpacity(i,r)})),e.appendChild(r);var n=document.createElement("div");n.innerText=100*i+"%",r.appendChild(n),t.opacityBoxes.push(r)})),e},e.prototype.setCurrentOpacity=function(t,e){var i=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},e}(J),xt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.setOpacity=n.setOpacity.bind(n),n.fillColor=r.defaultHighlightColor,n.strokeWidth=0,n.opacity=r.defaultHighlightOpacity,n.fillPanel=new tt("Color",r.defaultColorSet,n.fillColor),n.fillPanel.onColorChanged=n.setFillColor,n.opacityPanel=new bt("Opacity",r.defaultOpacitySteps,n.opacity),n.opacityPanel.onOpacityChanged=n.setOpacity,n}return U(e,t),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&W.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=t.prototype.getState.call(this);return i.typeName=e.typeName,i},e.typeName="HighlightMarker",e.title="Highlight marker",e.icon='',e}(yt),St='',Ct=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.bgColor="transparent",n.tipPosition={x:0,y:0},n.tipBase1Position={x:0,y:0},n.tipBase2Position={x:0,y:0},n.tipMoving=!1,n.color=r.defaultStrokeColor,n.bgColor=r.defaultFillColor,n.fontFamily=r.defaultFontFamily,n.defaultSize={x:100,y:30},n.setBgColor=n.setBgColor.bind(n),n.getTipPoints=n.getTipPoints.bind(n),n.positionTip=n.positionTip.bind(n),n.setTipPoints=n.setTipPoints.bind(n),n.colorPanel=new tt("Text color",r.defaultColorSet,n.color,''),n.colorPanel.onColorChanged=n.setColor,n.bgColorPanel=new tt("Fill color",r.defaultColorSet,n.bgColor,St),n.bgColorPanel.onColorChanged=n.setBgColor,n.fontFamilyPanel=new ft("Font",r.defaultFontFamilies,r.defaultFontFamily),n.fontFamilyPanel.onFontChanged=n.setFont,n.tipGrip=new rt,n.tipGrip.visual.transform.baseVal.appendItem(W.createTransform()),n.controlBox.appendChild(n.tipGrip.visual),n}return U(e,t),e.prototype.ownsTarget=function(e){return t.prototype.ownsTarget.call(this,e)||this.tipGrip.ownsTarget(e)||this.tip===e},e.prototype.createTip=function(){W.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=W.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},e.prototype.pointerDown=function(e,i){"new"===this.state&&t.prototype.pointerDown.call(this,e,i),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(i)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):t.prototype.pointerDown.call(this,e,i)},e.prototype.pointerUp=function(e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,t.prototype.pointerUp.call(this,e);else{var i="creating"===this.state;t.prototype.pointerUp.call(this,e),this.setTipPoints(i),this.positionTip()}},e.prototype.manipulate=function(e){if(this.tipMoving){var i=this.unrotatePoint(e);this.tipPosition={x:i.x-this.manipulationStartLeft,y:i.y-this.manipulationStartTop},this.positionTip()}else t.prototype.manipulate.call(this,e)},e.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(W.setAttributes(this.bgRectangle,[["fill",t]]),W.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},e.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},e.prototype.setTipPoints=function(t){void 0===t&&(t=!1);var e=Math.min(this.height/2,15),i=this.height/5;t&&(this.tipPosition={x:e+i/2,y:this.height+20});var r=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?r.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),i=this.tip1.transform.baseVal.getItem(0);i.setRotate(e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(i,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=t.prototype.getState.call(this);return i.typeName=e.typeName,i},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e),this.createTips(),this.adjustVisual()},e.typeName="MeasurementMarker",e.title="Measurement marker",e.icon='',e}(dt),Et=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.strokePanel.colors=r.defaultColorSet,n.fillColor="transparent",n}return U(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=t.prototype.getState.call(this);return i.typeName=e.typeName,i},e.typeName="EllipseFrameMarker",e.title="Ellipse frame marker",e.icon='',e}(wt),Tt=function(){function t(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),t.prototype.addUndoStep=function(t){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(t)||(this.undoStack.push(t),JSON.stringify(this.lastRedoStep)!==JSON.stringify(t)&&this.redoStack.splice(0,this.redoStack.length))},t.prototype.replaceLastUndoStep=function(t){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=t)},t.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},t.prototype.undo=function(){if(this.undoStack.length>1){var t=this.undoStack.pop();return void 0!==t&&this.redoStack.push(t),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},t.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},t}(),Lt=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.strokeColor="transparent",n.strokeWidth=0,n.strokeDasharray="",n.curveX=0,n.curveY=0,n.manipulationStartCurveX=0,n.manipulationStartCurveY=0,n.setStrokeColor=n.setStrokeColor.bind(n),n.setStrokeWidth=n.setStrokeWidth.bind(n),n.setStrokeDasharray=n.setStrokeDasharray.bind(n),n.positionGrips=n.positionGrips.bind(n),n.addControlGrips=n.addControlGrips.bind(n),n.adjustVisual=n.adjustVisual.bind(n),n.setupControlBox=n.setupControlBox.bind(n),n.resize=n.resize.bind(n),n.strokeColor=r.defaultColor,n.strokeWidth=r.defaultStrokeWidth,n.strokeDasharray=r.defaultStrokeDasharray,n.strokePanel=new tt("Line color",r.defaultColorSet,r.defaultColor),n.strokePanel.onColorChanged=n.setStrokeColor,n.strokeWidthPanel=new at("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),n.strokeWidthPanel.onWidthChanged=n.setStrokeWidth,n.strokeStylePanel=new lt("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),n.strokeStylePanel.onStyleChanged=n.setStrokeDasharray,n}return U(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorCurve&&e!==this.visibleCurve&&!this.curveGrip.ownsTarget(e))},e.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},e.prototype.createVisual=function(){this.visual=W.createGroup(),this.selectorCurve=W.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=W.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)},e.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=e.x,this.curveY=e.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(i)&&(this.activeGrip=this.curveGrip,this._state="resize")},e.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),W.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),W.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),W.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=W.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=W.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)},e.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,t.prototype.addControlGrips.call(this)},e.prototype.positionGrips=function(){t.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()))},e.prototype.manipulate=function(e){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+e.y-this.manipulationStartY),t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){this.activeGrip===this.curveGrip&&(this.curveX=e.x,this.curveY=e.y),t.prototype.resize.call(this,e),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},e.prototype.scale=function(e,i){this.curveX=this.curveX*e,this.curveY=this.curveY*i,t.prototype.scale.call(this,e,i)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var i=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},t.prototype.getState.call(this));return i.typeName=e.typeName,i},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.curveX=i.curveX,this.curveY=i.curveY,this.createVisual(),this.adjustVisual()},e.typeName="CurveMarker",e.title="Curve marker",e.icon='',e}(ht),At=function(){function t(t,e){void 0===e&&(e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=t,this.cancelable=e}return Object.defineProperty(t.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this._defaultPrevented=!0},t}(),Dt=function(t){function e(e,i,r){var n=t.call(this,e,!1)||this;return n.dataUrl=i,n.state=r,n}return U(e,t),e}(At),Rt=function(t){function e(e,i,r){void 0===r&&(r=!1);var n=t.call(this,e,r)||this;return n.marker=i,n}return U(e,t),e}(At),Ot=function(){function t(){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 t.prototype.addEventListener=function(t,e){this[t].push(e)},t.prototype.removeEventListener=function(t,e){var i=this[t].indexOf(e);i>-1&&this[t].splice(i,1)},t}(),_t=function(){function t(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ut,this._isOpen=!1,this.undoRedoManager=new Tt,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 Ot,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=t.instanceCounter++,this.styles=new Y(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.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(t.prototype,"ALL_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,Et,wt,xt,Ct,kt,yt,dt,Lt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,wt,xt,Ct]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,xt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(t){var e=this;this._availableMarkerTypes.splice(0),t.forEach((function(t){if("string"==typeof t){var i=e.ALL_MARKER_TYPES.find((function(e){return e.typeName===t}));void 0!==i&&e._availableMarkerTypes.push(i)}else e._availableMarkerTypes.push(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(t){this._zoomLevel=t,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(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),V.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},t.prototype.show=function(){var t=this;void 0===this.styles.styleSheetRoot&&void 0!==q.styleSheetRoot&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(e){return e(new At(t))}))},t.prototype.render=function(){return H(this,void 0,void 0,(function(){var t;return G(this,(function(e){switch(e.label){case 0:return this.setCurrentMarker(),(t=new K).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.markersOnly=this.renderMarkersOnly,t.width=this.renderWidth,t.height=this.renderHeight,[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return e.sent(),[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,e.sent()]}}))}))},t.prototype.close=function(t){var e=this;if(void 0===t&&(t=!1),this.isOpen){var i=!1;t||this.eventListeners.beforeclose.forEach((function(t){var r=new At(e,!0);t(r),r.defaultPrevented&&(i=!0)})),i||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(t){return t(new At(e))})),this.detachEvents(),this._isOpen=!1)}},t.prototype.addMarkersToToolbar=function(){for(var t,e=[],i=0;ithis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*t:this.editorCanvas.clientWidth,i=e',t.title="Powered by marker.js",t.style.display="grid",t.style.alignItems="center",t.style.justifyItems="center",t.style.padding="3px",t.style.width="20px",t.style.height="20px",this.logoUI.appendChild(t),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},t.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?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")},t.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"},t.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},t.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&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 t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?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=void 0!==this.uiStyleSettings.zIndex?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="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Z(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","popup"===this.settings.displayMode&&(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","popup"===this.settings.displayMode&&(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-1&&this.markers.splice(this.markers.indexOf(t),1),t.dispose()},t.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},t.prototype.toolbarButtonClicked=function(t,e){if("marker"===t&&void 0!==e)this.createNewMarker(e);else if("action"===t)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":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},t.prototype.deleteSelectedMarker=function(){var t=this;if(void 0!==this._currentMarker){var e=!1;if(this.eventListeners.markerbeforedelete.forEach((function(i){var r=new Rt(t,t._currentMarker,!0);i(r),r.defaultPrevented&&(e=!0)})),!e){var i=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(e){return e(new Rt(t,i))}))}}},t.prototype.clear=function(){var t=this,e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(i){var r=new Rt(t,void 0,!0);i(r),r.defaultPrevented&&(e=!0)})),!e)){this.setCurrentMarker();for(var i=function(e){var i=r.markers[e];r.setCurrentMarker(r.markers[e]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(e){return e(new Rt(t,i))}))},r=this,n=this.markers.length-1;n>=0;n--)i(n);this.addUndoStep()}},Object.defineProperty(t.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),t.prototype.showNotesEditor=function(){var t;void 0!==this._currentMarker&&(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=null!==(t=this._currentMarker.notes)&&void 0!==t?t:"",this.overlayContainer.appendChild(this.notesArea))},t.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},t.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},t.prototype.addUndoStep=function(){var t=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var e=this.getState(),i=this.undoRedoManager.getLastUndoStep();if(!i||i.width===e.width&&i.height===e.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(e),r1&&this.panTo({x:t.clientX,y:t.clientY}))},t.prototype.onPointerUp=function(t){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(t.clientX,t.clientY)),this.isDragging=!1,this.addUndoStep()},t.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},t.prototype.onKeyUp=function(t){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==t.key&&"Backspace"!==t.key||this.deleteSelectedMarker()},t.prototype.clientToLocalCoordinates=function(t,e){var i=this.markerImage.getBoundingClientRect();return{x:(t-i.left)/this.zoomLevel,y:(e-i.top)/this.zoomLevel}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"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()},t.prototype.addLicenseKey=function(t){V.addKey(t)},t.prototype.addEventListener=function(t,e){this.eventListeners.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.eventListeners.removeEventListener(t,e)},t.prototype.renderState=function(t){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(t),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),t.prototype.focus=function(){var t=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(e){return e(new At(t))})))},t.prototype.blur=function(){var t=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(e){return e(new At(t))})))},t.instanceCounter=0,t}(),It=function(t,e){return(It=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)}; /* ********************************** cropro version 1.2.0 @license SEE LICENSE IN LICENSE @@ -89,55 +89,55 @@ 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. -***************************************************************************** */function Mt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}It(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Pt(t,e,r,i){return new(r||(r=Promise))((function(n,s){function o(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))}function Nt(t,e){var r,i,n,s,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,i&&(n=2&s[0]?i.return:s[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;switch(i=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]0&&e>0){var r=new qt(t,e),i=r.ratio>=1?20:r.getHorizontalLength(20),n=r.ratio<1?20:r.getVerticalLength(20),s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(s);var o=Bt.createDefs();s.appendChild(o);var a=Bt.createElement("clipPath",[["id","text-bg-clip"]]);o.appendChild(a);var l=Bt.createPath(Bt.getHollowRectanglePath((24-i)/2,(24-n)/2,i,n,(24-i)/2+2,(24-n)/2+2,i-4,n-4));s.appendChild(l);var c=Bt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Bt.createTSpan(t+":"+e)),s.appendChild(c);var u=c.getBBox();Bt.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=Bt.createPath(Bt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(u.width))/2,(24-Math.ceil(u.height))/2,Math.ceil(u.width),Math.ceil(u.height)));return a.appendChild(h),Bt.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(s),s.outerHTML}return''},t}(),Xt=function(t){function e(e,r,i){var n=t.call(this,e,r)||this;return n.isDropdownOpen=!1,n.onClick=n.dropdownButtonClicked,n.dropdownButtons=i,n}return Mt(e,t),e.prototype.setupDropdown=function(){var t=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(e){e.className=t.className,e.colorsClassName=t.colorsClassName,t.dropdownBlock.appendChild(e.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},e.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},e.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},e.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},e.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},e.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},e}(Vt),$t=function(){function t(t,e){this.GRIP_SIZE=10,this.color=t,this.fillColor=e,this.visual=Bt.createGroup(),this.visual.appendChild(Bt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Bt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t.prototype.setCenter=function(t,e){this.visual.childNodes.forEach((function(r){return Bt.setAttributes(r,[["cx",t.toString()],["cy",e.toString()]])}))},t}(),Zt=function(){function t(t,e,r,i){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=t,this.canvasHeight=e,this.margin=r,this.container=i,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(t.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(t){this._aspectRatio=t,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.gridContainer&&Bt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(t){this._zoomFactor=t,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),t.prototype.open=function(){var t=this;this.cropShadeElement=Bt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Bt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var e=0;ethis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-e.height/2),Bt.setAttributes(this.cropRectElement,[["x",e.x.toString()],["y",e.y.toString()],["width",e.width.toString()],["height",e.height.toString()]]);var r=e.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(t,i){var n=e.y+r*(i+1);Bt.setAttributes(t,[["x1",""+e.x],["y1",""+n],["x2",""+(e.x+e.width)],["y2",""+n]])}));var i=e.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(t,r){var n=e.x+i*(r+1);Bt.setAttributes(t,[["x1",""+n],["y1",""+e.y],["x2",""+n],["y2",""+(e.y+e.height)]])})),Bt.setAttributes(this.cropShadeElement,[["d",Bt.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},t.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)},t.prototype.clientToLocalCoordinates=function(t,e){var r=this.container.getBoundingClientRect();return{x:t-r.left+this.margin,y:e-r.top+this.margin}},t.prototype.onPointerDown=function(t){this.container.setPointerCapture(t.pointerId),this.previousPoint=this.clientToLocalCoordinates(t.clientX,t.clientY),this.cropRectElement===t.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(t.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(t.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(t.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(t.target)&&(this.activeGrip=this.bottomRightGrip)},t.prototype.onPointerMove=function(t){if(this.isMoving)this.move(this.clientToLocalCoordinates(t.clientX,t.clientY));else if(this.activeGrip){var e=this.clientToLocalCoordinates(t.clientX,t.clientY);this.resize(e)}t.preventDefault()},t.prototype.onPointerUp=function(t){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(t.pointerId)},t.prototype.move=function(t){var e=t.x-this.previousPoint.x,r=t.y-this.previousPoint.y;1!==this.zoomFactor&&(e=-e/this.zoomFactor,r=-r/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+r),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=t},t.prototype.resize=function(t){var e=Object.assign({},this.cropRect),r=t.x-this.previousPoint.x,i=t.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:e.x+rthis.canvasWidth*this.zoomFactor&&(r=this.canvasWidth*this.zoomFactor-e.width),e.width+=r}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(r),e.height=this.aspectRatio.getVerticalLength(e.width)):(e.y+=i,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+=i}e.width<10&&(e.x=this.cropRect.x,e.width=10),e.height<10&&(e.y=this.cropRect.y,e.height=10),this.previousPoint=t,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))},t.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var t=this.cropRect.x+this.cropRect.width/2,e=this.cropRect.y+this.cropRect.height/2,r=this.aspectRatio.getHorizontalLength(this.cropRect.height),i=this.aspectRatio.getVerticalLength(this.cropRect.width);r/this.canvasWidththis.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=t-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)}},t.prototype.getRescaledRect=function(t,e,r,i,n,s){var o=r/t,a=i/e;return{x:(n.x-s)*o+s,y:(n.y-s)*a+s,width:n.width*o,height:n.height*a}},t.prototype.scaleCanvas=function(t,e){var r=this.getRescaledRect(this.canvasWidth,this.canvasHeight,t,e,this.cropRect,this.margin);this.canvasWidth=t,this.canvasHeight=e,this.onCropChange&&this.onCropChange(r),this.setCropRectangle(r)},t}(),Qt=function(){function t(t){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=t,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(t.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),t.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},t.prototype.onPointerDown=function(t){this.controlContainer.setPointerCapture(t.pointerId),this.isDragging=!0,this.previousPoint={x:t.clientX,y:t.clientY}},t.prototype.onPointerMove=function(t){this.isDragging&&(this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.previousPoint.x=t.clientX)},t.prototype.onPointerUp=function(t){this.isDragging&&this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(t.pointerId)},t.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var t=this.angleLabelText.getBBox();Bt.setAttributes(this.angleLabelElement,[["x",((this.width-t.width)/2).toString()],["y",(this.height/2).toString()]])}},t.prototype.positionScaleShape=function(){if(this.scaleShape){var t=this.scaleShape.transform.baseVal.getItem(0);t.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(t,0)}},t.prototype.getVisual=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("width",this.width+"px"),t.setAttribute("height",this.height+"px"),t.setAttribute("viewBox","0 0 "+this.width+" "+this.height),t.style.flexShrink="0",document.body.appendChild(t);for(var e="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,r=1;r<=this.width/5+10;r++){var i=r%5==0?this.height/3:this.height/6;e+="h4v"+-i+"h1v"+i}e+="v1H0Z",this.scaleShape=Bt.createPath(e);var n=Bt.createTransform();this.scaleShape.transform.baseVal.appendItem(n),t.appendChild(this.scaleShape),this.angleLabelElement=Bt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Bt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var s=Bt.createTSpan("");return s.innerHTML="°",this.angleLabelElement.appendChild(s),t.appendChild(this.angleLabelElement),document.body.removeChild(t),t},t}(),Jt=function(){function t(){this.naturalSize=!1,this.imageType="image/png"}return t.prototype.rasterize=function(t,e,r,i,n,s,o){var a=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=t.width.baseVal.value-2*i,c.height=t.height.baseVal.value-2*i;var u=1,h=1;!0===a.naturalSize?(u=e.naturalWidth/(t.width.baseVal.value-2*i)/s,h=e.naturalHeight/(t.height.baseVal.value-2*i)/o,c.width=e.naturalWidth/s,c.height=e.naturalHeight/o):void 0!==a.width&&void 0!==a.height&&(u=a.width/r.width,h=a.height/r.height,c.width*=u,c.height*=h);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(n*Math.PI/180),d.scale(s,o),d.translate(-c.width/2,-c.height/2),d.drawImage(e,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=r.width*u,f.height=r.height*h,f.getContext("2d").putImageData(d.getImageData((r.x-i)*u,(r.y-i)*h,r.width*u,r.height*h),0,0),l(f.toDataURL(a.imageType,a.imageQuality))}))},t}(),te=function(){function t(e){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=t.instanceCounter++,this.styles=new jt(this.instanceNo),this.target=e,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(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(t){this._zoomToCropEnabled=t,t?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gridLines",{get:function(){return this._gridLines},set:function(t){this._gridLines=t,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(t){this._rotationAngle=t,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"aspectRatio",{get:function(){var t;return null!==(t=this._aspectRatio)&&void 0!==t?t:this.aspectRatios[0]},set:function(t){this._aspectRatio=t},enumerable:!1,configurable:!0}),t.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(),"popup"===this.displayMode&&this.onPopupResize(),this._isOpen=!0},t.prototype.show=function(){this.showUI(),this.open()},t.prototype.close=function(t){void 0===t&&(t=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),t||this.closeEventListeners.forEach((function(t){return t()})),this._isOpen=!1)},t.prototype.addRenderEventListener=function(t){this.renderEventListeners.push(t)},t.prototype.removeRenderEventListener=function(t){this.renderEventListeners.indexOf(t)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(t),1)},t.prototype.addCloseEventListener=function(t){this.closeEventListeners.push(t)},t.prototype.removeCloseEventListener=function(t){this.closeEventListeners.indexOf(t)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(t),1)},t.prototype.setupResizeObserver=function(){var t=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){t.resize(t.target.clientWidth,t.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},t.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var t=1*this.target.clientWidth/this.target.clientHeight,e=this.contentDiv.clientWidth/t>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*t:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,r=e+2*this.CANVAS_MARGINt+this.CANVAS_MARGIN?this.target.offsetTop-(t+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=void 0!==this.styles.settings.zIndex?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=void 0!==this.styles.settings.zIndex?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="popup"===this.displayMode?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,"popup"===this.displayMode&&(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","popup"===this.displayMode&&(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},t.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},t.prototype.addTopToolbar=function(){var t=this;this.topToolbar=new Gt,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 Wt;e.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(e);var r=[];this.aspectRatios.forEach((function(e){var i=new Vt(Yt.getIcon(e.horizontal,e.vertical),0===e.horizontal&&0===e.vertical?"FREE":e.horizontal+":"+e.vertical);i.onClick=function(){return t.ratioButtonClicked(e)},r.push(i)})),this.aspectRatioButton=new Xt(Yt.getIcon(0,0),"Aspect ratio",r),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 i=new Vt('',"Toggle grid");i.isActive=this.isGridVisible,i.onClick=function(){t.isGridVisible=!t.isGridVisible,i.isActive=t.isGridVisible},e.addButton(i);var n=new Vt('',"Zoom to selection");if(n.isActive=this.zoomToCropEnabled,n.onClick=function(){t.zoomToCropEnabled=!t.zoomToCropEnabled,n.isActive=t.zoomToCropEnabled},e.addButton(n),!Ft.isLicensed){var s=new Kt;this.topToolbar.addElementBlock(s);var o=document.createElement("div");o.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var a=document.createElement("a");a.style.color="currentColor",a.href="https://markerjs.com/products/cropro",a.target="_blank",a.innerHTML='',o.appendChild(a),s.addElement(o)}var l=new Wt;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new Vt('',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new Vt('',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},t.prototype.addBottomToolbar=function(){var t=this;this.bottomToolbar=new Gt,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 Wt;e.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(e);var r=new Vt('',"Rotate left");r.onClick=this.rotateLeftButtonClicked,e.addButton(r);var i=new Vt('',"Rotate right");i.onClick=this.rotateRightButtonClicked,e.addButton(i);var n=new Kt;n.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(n),this.straightener=new Qt("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(e){t.rotateBy(e),t.straightener.angle=t.rotationAngle},n.addElement(this.straightener.getUI());var s=new Wt;s.minWidth=2*this.toolbarHeight+"px",s.contentAlign="end",this.bottomToolbar.addButtonBlock(s);var o=new Vt('',"Flip horizontal");o.onClick=this.flipHorizontallyButtonClicked,s.addButton(o);var a=new Vt('',"Flip vertical");a.onClick=this.flipVerticallyButtonClicked,s.addButton(a)},t.prototype.ratioButtonClicked=function(t){this.aspectRatio=t,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},t.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Yt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},t.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new qt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},t.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},t.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},t.prototype.restoreState=function(t){if(t){var e=this.cropLayer.getRescaledRect(t.width,t.height,this.imageWidth,this.imageHeight,t.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(e),this.cropRectChanged(e),this.flippedHorizontally=t.flippedHorizontally,this.flippedVertically=t.flippedVertically,this.applyFlip(),this.rotationAngle=t.rotationAngle,this.applyRotation()}},t.prototype.clientToLocalCoordinates=function(t,e){var r=this.cropImage.getBoundingClientRect();return{x:t-r.left,y:e-r.top}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var t=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=t+"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()},t.prototype.rotateLeftButtonClicked=function(){var t=this.rotationAngle-90;this.rotationAngle%90!=0&&(t+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateRightButtonClicked=function(){var t=this.rotationAngle+90;this.rotationAngle%90!=0&&(t-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateTo=function(t){t=(t=t>180?t-360:t)<=-180?t+360:t,this.rotationAngle=t,this.applyRotation()},t.prototype.rotateBy=function(t){this.rotateTo((this.rotationAngle+t)%360)},t.prototype.applyRotation=function(){var t=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 r=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/r.width,this.imageHeight/r.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=t},t.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},t.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},t.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},t.prototype.startRenderAndClose=function(){return Pt(this,void 0,void 0,(function(){var t,e;return Nt(this,(function(r){switch(r.label){case 0:return[4,this.render()];case 1:return t=r.sent(),e=this.getState(),this.renderEventListeners.forEach((function(r){return r(t,e)})),this.close(!0),[2]}}))}))},t.prototype.render=function(){return Pt(this,void 0,void 0,(function(){var t;return Nt(this,(function(e){switch(e.label){case 0:return(t=new Jt).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.width=this.renderWidth,t.height=this.renderHeight,this.unzoomFromCrop(),Bt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,t.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,t.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()]}}))}))},t.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ht("toolbar","\n width: "+("inline"===this.displayMode?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+";\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.toolbarHeight+"px;\n box-sizing: content-box;\n overflow: hidden;\n line-height: 0px;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new Ht("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new Ht("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var t=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ht("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*t)+"px;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new Ht("toolbar_dropdown","\n position: absolute;\n max-width: "+4*this.toolbarHeight+"px;\n z-index: 20;\n white-space: normal;\n box-sizing: content-box;\n box-shadow: 3px 3px rgba(33, 33, 33, 0.1);\n margin: "+("inline"===this.displayMode?"0":this.popupMargin)+"px;\n line-height: 0px;\n ")),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Ht("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ht("toolbar_straightener_block","\n display: flex;\n overflow: hidden;\n justify-content: center;\n -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%);\n ")),this.toolbarStraightenerStyleClass=this.styles.addClass(new Ht("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ht("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},t.instanceCounter=0,t}(),ee=r("8hTe"),re=r.n(ee),ie=/]*>/g;e.a=function(t){var e=t.value,r=void 0===e?"":e,l=t.edit,d=void 0!==l&&l,f=t.className,p=t.showTextOnly,g=t.showLines,m=t.replaces,v=t.zoomImg,y=t.hasMask,C=t.style,w=void 0===C?{}:C,k=t.stylesPrev,E=void 0===k?{}:k,A=String(r),D=Object(u.useRef)(),R=Object(u.useRef)(),O=Object(u.useState)(""),I=Object(a.a)(O,2),j=I[0],U=I[1],H=Object(u.useState)("office"),G=Object(a.a)(H,2),z=G[0],W=G[1],V=Object(u.useMemo)((function(){try{A=(A=A.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+P.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+P.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+P.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")).replace(new RegExp("(?[TOC]

        ",S()),b()),t=(t=t.replace(/(__special_katext_id_\d+__)/g,(function(t,r){var i=e[r],n=i.type,s=i.expression;return Object(N.renderToString)(function(t){var e=document.createElement("div");return e.innerHTML=t,0===e.childNodes.length?"":e.childNodes[0].nodeValue}(s)||"",{displayMode:"block"===n,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),L(),p){var r=document.createElement("div");return r.innerHTML=t,r.innerText}return setTimeout((function(){return Y()}),500),t}),[A]),K=Object(u.useRef)();function q(t){var e=t.target;if("IMG"===e.tagName.toUpperCase()){if(v){var r=e.getAttribute("src");U(r),W("image")}}else if("A"===e.tagName.toUpperCase()){var i=e.getAttribute("href");if(i.indexOf("office")>-1)t.preventDefault(),U(i),W("office");else if(i.indexOf("application/pdf")>-1)t.preventDefault(),U(i),W("pdf");else if(i.indexOf("type=text")>-1)t.preventDefault(),U(i),W("html");else if(i.startsWith("#")){t.preventDefault();var n=document.getElementById(i.replace("#",""));n&&n.scrollIntoView(!0)}}}x.WebkitLineClamp=g,g&&(w=Object(s.a)(Object(s.a)({},w),x));var Y=function(){var t,e=null===(t=K.current)||void 0===t?void 0:t.querySelectorAll("video");null==e||e.forEach((function(t){if(t.oncontextmenu=function(){return!1},t.src.indexOf(".m3u8")>-1)if(t.canPlayType("application/vnd.apple.mpegurl"));else if(M.a.isSupported()){var e=new M.a;e.loadSource(t.src),e.attachMedia(t)}}))};Object(u.useEffect)((function(){if(K.current&&V&&V.match(ie)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",q),function(){K.current.removeEventListener("click",q),L(),b()}}),[V,K.current,q]);return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:K,style:Object(s.a)({},w),className:"".concat(f||""," markdown-body ").concat(re.a.mdBody),onMouseOver:function(t){d&&("IMG"===t.target.nodeName?(D.current.style.display="flex",D.current.style.width=t.target.clientWidth+"px",D.current.style.height=t.target.clientHeight+"px",D.current.style.top=t.target.offsetTop+"px",D.current.style.left=t.target.offsetLeft+"px",R.current.src=t.target.getAttribute("src")):D.current.style.display="none")},dangerouslySetInnerHTML:{__html:V}}),h.a.createElement("div",{ref:D,className:re.a.button},h.a.createElement(i.a,null,h.a.createElement(n.a,{onClick:function(){return(t=new te(R.current)).displayMode="popup",t.addRenderEventListener(function(){var t=Object(o.a)(c.a.mark((function t(e){var r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return D.current.style.display="none",t.next=3,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e}});case 3:null!=(r=t.sent)&&r.id&&m(R.current.getAttribute("src").replace(P.a.API_SERVER,""),"/api/attachments/".concat(null==r?void 0:r.id,"?type=").concat(r.content_type));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),void t.show();var t}},"裁剪"),h.a.createElement(n.a,{onClick:function(){return(t=new _t(R.current)).settings.displayMode="popup",t.addEventListener("render",function(){var t=Object(o.a)(c.a.mark((function t(e){var r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(D.current.style.display="none",!R.current){t.next=6;break}return t.next=4,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e.dataUrl}});case 4:null!=(r=t.sent)&&r.id&&m(R.current.getAttribute("src").replace(P.a.API_SERVER,""),"/api/attachments/".concat(null==r?void 0:r.id,"?type=").concat(r.content_type));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.show(),void(window.markerArea=t);var t}},"编辑"))),h.a.createElement("img",{ref:R,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),h.a.createElement(F.a,{close:!0,data:j,hasMask:y,type:null!=j&&j.length?z:"",style:Object(s.a)({},E),onClose:function(){return U("")}}))}},"9VGf": +***************************************************************************** */function Mt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}It(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function Pt(t,e,i,r){return new(i||(i=Promise))((function(n,s){function o(t){try{l(r.next(t))}catch(t){s(t)}}function a(t){try{l(r.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((r=r.apply(t,e||[])).next())}))}function Nt(t,e){var i,r,n,s,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(n=2&s[0]?r.return:s[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;switch(r=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]0&&e>0){var i=new qt(t,e),r=i.ratio>=1?20:i.getHorizontalLength(20),n=i.ratio<1?20:i.getVerticalLength(20),s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(s);var o=Bt.createDefs();s.appendChild(o);var a=Bt.createElement("clipPath",[["id","text-bg-clip"]]);o.appendChild(a);var l=Bt.createPath(Bt.getHollowRectanglePath((24-r)/2,(24-n)/2,r,n,(24-r)/2+2,(24-n)/2+2,r-4,n-4));s.appendChild(l);var c=Bt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Bt.createTSpan(t+":"+e)),s.appendChild(c);var u=c.getBBox();Bt.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=Bt.createPath(Bt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(u.width))/2,(24-Math.ceil(u.height))/2,Math.ceil(u.width),Math.ceil(u.height)));return a.appendChild(h),Bt.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(s),s.outerHTML}return''},t}(),Xt=function(t){function e(e,i,r){var n=t.call(this,e,i)||this;return n.isDropdownOpen=!1,n.onClick=n.dropdownButtonClicked,n.dropdownButtons=r,n}return Mt(e,t),e.prototype.setupDropdown=function(){var t=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(e){e.className=t.className,e.colorsClassName=t.colorsClassName,t.dropdownBlock.appendChild(e.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},e.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},e.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},e.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},e.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},e.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},e}(Vt),$t=function(){function t(t,e){this.GRIP_SIZE=10,this.color=t,this.fillColor=e,this.visual=Bt.createGroup(),this.visual.appendChild(Bt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Bt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t.prototype.setCenter=function(t,e){this.visual.childNodes.forEach((function(i){return Bt.setAttributes(i,[["cx",t.toString()],["cy",e.toString()]])}))},t}(),Zt=function(){function t(t,e,i,r){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=t,this.canvasHeight=e,this.margin=i,this.container=r,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(t.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(t){this._aspectRatio=t,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.gridContainer&&Bt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(t){this._zoomFactor=t,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),t.prototype.open=function(){var t=this;this.cropShadeElement=Bt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Bt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var e=0;ethis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-e.height/2),Bt.setAttributes(this.cropRectElement,[["x",e.x.toString()],["y",e.y.toString()],["width",e.width.toString()],["height",e.height.toString()]]);var i=e.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(t,r){var n=e.y+i*(r+1);Bt.setAttributes(t,[["x1",""+e.x],["y1",""+n],["x2",""+(e.x+e.width)],["y2",""+n]])}));var r=e.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(t,i){var n=e.x+r*(i+1);Bt.setAttributes(t,[["x1",""+n],["y1",""+e.y],["x2",""+n],["y2",""+(e.y+e.height)]])})),Bt.setAttributes(this.cropShadeElement,[["d",Bt.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},t.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)},t.prototype.clientToLocalCoordinates=function(t,e){var i=this.container.getBoundingClientRect();return{x:t-i.left+this.margin,y:e-i.top+this.margin}},t.prototype.onPointerDown=function(t){this.container.setPointerCapture(t.pointerId),this.previousPoint=this.clientToLocalCoordinates(t.clientX,t.clientY),this.cropRectElement===t.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(t.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(t.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(t.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(t.target)&&(this.activeGrip=this.bottomRightGrip)},t.prototype.onPointerMove=function(t){if(this.isMoving)this.move(this.clientToLocalCoordinates(t.clientX,t.clientY));else if(this.activeGrip){var e=this.clientToLocalCoordinates(t.clientX,t.clientY);this.resize(e)}t.preventDefault()},t.prototype.onPointerUp=function(t){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(t.pointerId)},t.prototype.move=function(t){var e=t.x-this.previousPoint.x,i=t.y-this.previousPoint.y;1!==this.zoomFactor&&(e=-e/this.zoomFactor,i=-i/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+i),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=t},t.prototype.resize=function(t){var e=Object.assign({},this.cropRect),i=t.x-this.previousPoint.x,r=t.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:e.x+ithis.canvasWidth*this.zoomFactor&&(i=this.canvasWidth*this.zoomFactor-e.width),e.width+=i}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(i),e.height=this.aspectRatio.getVerticalLength(e.width)):(e.y+=r,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+=r}e.width<10&&(e.x=this.cropRect.x,e.width=10),e.height<10&&(e.y=this.cropRect.y,e.height=10),this.previousPoint=t,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))},t.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var t=this.cropRect.x+this.cropRect.width/2,e=this.cropRect.y+this.cropRect.height/2,i=this.aspectRatio.getHorizontalLength(this.cropRect.height),r=this.aspectRatio.getVerticalLength(this.cropRect.width);i/this.canvasWidththis.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=t-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)}},t.prototype.getRescaledRect=function(t,e,i,r,n,s){var o=i/t,a=r/e;return{x:(n.x-s)*o+s,y:(n.y-s)*a+s,width:n.width*o,height:n.height*a}},t.prototype.scaleCanvas=function(t,e){var i=this.getRescaledRect(this.canvasWidth,this.canvasHeight,t,e,this.cropRect,this.margin);this.canvasWidth=t,this.canvasHeight=e,this.onCropChange&&this.onCropChange(i),this.setCropRectangle(i)},t}(),Qt=function(){function t(t){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=t,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(t.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),t.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},t.prototype.onPointerDown=function(t){this.controlContainer.setPointerCapture(t.pointerId),this.isDragging=!0,this.previousPoint={x:t.clientX,y:t.clientY}},t.prototype.onPointerMove=function(t){this.isDragging&&(this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.previousPoint.x=t.clientX)},t.prototype.onPointerUp=function(t){this.isDragging&&this.onAngleChange&&this.onAngleChange((t.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(t.pointerId)},t.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var t=this.angleLabelText.getBBox();Bt.setAttributes(this.angleLabelElement,[["x",((this.width-t.width)/2).toString()],["y",(this.height/2).toString()]])}},t.prototype.positionScaleShape=function(){if(this.scaleShape){var t=this.scaleShape.transform.baseVal.getItem(0);t.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(t,0)}},t.prototype.getVisual=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("width",this.width+"px"),t.setAttribute("height",this.height+"px"),t.setAttribute("viewBox","0 0 "+this.width+" "+this.height),t.style.flexShrink="0",document.body.appendChild(t);for(var e="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,i=1;i<=this.width/5+10;i++){var r=i%5==0?this.height/3:this.height/6;e+="h4v"+-r+"h1v"+r}e+="v1H0Z",this.scaleShape=Bt.createPath(e);var n=Bt.createTransform();this.scaleShape.transform.baseVal.appendItem(n),t.appendChild(this.scaleShape),this.angleLabelElement=Bt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Bt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var s=Bt.createTSpan("");return s.innerHTML="°",this.angleLabelElement.appendChild(s),t.appendChild(this.angleLabelElement),document.body.removeChild(t),t},t}(),Jt=function(){function t(){this.naturalSize=!1,this.imageType="image/png"}return t.prototype.rasterize=function(t,e,i,r,n,s,o){var a=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=t.width.baseVal.value-2*r,c.height=t.height.baseVal.value-2*r;var u=1,h=1;!0===a.naturalSize?(u=e.naturalWidth/(t.width.baseVal.value-2*r)/s,h=e.naturalHeight/(t.height.baseVal.value-2*r)/o,c.width=e.naturalWidth/s,c.height=e.naturalHeight/o):void 0!==a.width&&void 0!==a.height&&(u=a.width/i.width,h=a.height/i.height,c.width*=u,c.height*=h);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(n*Math.PI/180),d.scale(s,o),d.translate(-c.width/2,-c.height/2),d.drawImage(e,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=i.width*u,f.height=i.height*h,f.getContext("2d").putImageData(d.getImageData((i.x-r)*u,(i.y-r)*h,i.width*u,i.height*h),0,0),l(f.toDataURL(a.imageType,a.imageQuality))}))},t}(),te=function(){function t(e){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=t.instanceCounter++,this.styles=new jt(this.instanceNo),this.target=e,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(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(t){this._zoomToCropEnabled=t,t?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(t){this._isGridVisible=t,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gridLines",{get:function(){return this._gridLines},set:function(t){this._gridLines=t,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(t){this._rotationAngle=t,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"aspectRatio",{get:function(){var t;return null!==(t=this._aspectRatio)&&void 0!==t?t:this.aspectRatios[0]},set:function(t){this._aspectRatio=t},enumerable:!1,configurable:!0}),t.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(),"popup"===this.displayMode&&this.onPopupResize(),this._isOpen=!0},t.prototype.show=function(){this.showUI(),this.open()},t.prototype.close=function(t){void 0===t&&(t=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),t||this.closeEventListeners.forEach((function(t){return t()})),this._isOpen=!1)},t.prototype.addRenderEventListener=function(t){this.renderEventListeners.push(t)},t.prototype.removeRenderEventListener=function(t){this.renderEventListeners.indexOf(t)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(t),1)},t.prototype.addCloseEventListener=function(t){this.closeEventListeners.push(t)},t.prototype.removeCloseEventListener=function(t){this.closeEventListeners.indexOf(t)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(t),1)},t.prototype.setupResizeObserver=function(){var t=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){t.resize(t.target.clientWidth,t.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},t.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var t=1*this.target.clientWidth/this.target.clientHeight,e=this.contentDiv.clientWidth/t>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*t:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,i=e+2*this.CANVAS_MARGINt+this.CANVAS_MARGIN?this.target.offsetTop-(t+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=void 0!==this.styles.settings.zIndex?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=void 0!==this.styles.settings.zIndex?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="popup"===this.displayMode?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,"popup"===this.displayMode&&(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","popup"===this.displayMode&&(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},t.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},t.prototype.addTopToolbar=function(){var t=this;this.topToolbar=new Gt,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 Wt;e.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(e);var i=[];this.aspectRatios.forEach((function(e){var r=new Vt(Yt.getIcon(e.horizontal,e.vertical),0===e.horizontal&&0===e.vertical?"FREE":e.horizontal+":"+e.vertical);r.onClick=function(){return t.ratioButtonClicked(e)},i.push(r)})),this.aspectRatioButton=new Xt(Yt.getIcon(0,0),"Aspect ratio",i),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 r=new Vt('',"Toggle grid");r.isActive=this.isGridVisible,r.onClick=function(){t.isGridVisible=!t.isGridVisible,r.isActive=t.isGridVisible},e.addButton(r);var n=new Vt('',"Zoom to selection");if(n.isActive=this.zoomToCropEnabled,n.onClick=function(){t.zoomToCropEnabled=!t.zoomToCropEnabled,n.isActive=t.zoomToCropEnabled},e.addButton(n),!Ft.isLicensed){var s=new Kt;this.topToolbar.addElementBlock(s);var o=document.createElement("div");o.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var a=document.createElement("a");a.style.color="currentColor",a.href="https://markerjs.com/products/cropro",a.target="_blank",a.innerHTML='',o.appendChild(a),s.addElement(o)}var l=new Wt;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new Vt('',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new Vt('',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},t.prototype.addBottomToolbar=function(){var t=this;this.bottomToolbar=new Gt,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 Wt;e.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(e);var i=new Vt('',"Rotate left");i.onClick=this.rotateLeftButtonClicked,e.addButton(i);var r=new Vt('',"Rotate right");r.onClick=this.rotateRightButtonClicked,e.addButton(r);var n=new Kt;n.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(n),this.straightener=new Qt("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(e){t.rotateBy(e),t.straightener.angle=t.rotationAngle},n.addElement(this.straightener.getUI());var s=new Wt;s.minWidth=2*this.toolbarHeight+"px",s.contentAlign="end",this.bottomToolbar.addButtonBlock(s);var o=new Vt('',"Flip horizontal");o.onClick=this.flipHorizontallyButtonClicked,s.addButton(o);var a=new Vt('',"Flip vertical");a.onClick=this.flipVerticallyButtonClicked,s.addButton(a)},t.prototype.ratioButtonClicked=function(t){this.aspectRatio=t,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},t.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Yt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},t.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new qt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},t.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},t.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},t.prototype.restoreState=function(t){if(t){var e=this.cropLayer.getRescaledRect(t.width,t.height,this.imageWidth,this.imageHeight,t.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(e),this.cropRectChanged(e),this.flippedHorizontally=t.flippedHorizontally,this.flippedVertically=t.flippedVertically,this.applyFlip(),this.rotationAngle=t.rotationAngle,this.applyRotation()}},t.prototype.clientToLocalCoordinates=function(t,e){var i=this.cropImage.getBoundingClientRect();return{x:t-i.left,y:e-i.top}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var t=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=t+"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()},t.prototype.rotateLeftButtonClicked=function(){var t=this.rotationAngle-90;this.rotationAngle%90!=0&&(t+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateRightButtonClicked=function(){var t=this.rotationAngle+90;this.rotationAngle%90!=0&&(t-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(t)},t.prototype.rotateTo=function(t){t=(t=t>180?t-360:t)<=-180?t+360:t,this.rotationAngle=t,this.applyRotation()},t.prototype.rotateBy=function(t){this.rotateTo((this.rotationAngle+t)%360)},t.prototype.applyRotation=function(){var t=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 i=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/i.width,this.imageHeight/i.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=t},t.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},t.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},t.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},t.prototype.startRenderAndClose=function(){return Pt(this,void 0,void 0,(function(){var t,e;return Nt(this,(function(i){switch(i.label){case 0:return[4,this.render()];case 1:return t=i.sent(),e=this.getState(),this.renderEventListeners.forEach((function(i){return i(t,e)})),this.close(!0),[2]}}))}))},t.prototype.render=function(){return Pt(this,void 0,void 0,(function(){var t;return Nt(this,(function(e){switch(e.label){case 0:return(t=new Jt).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.width=this.renderWidth,t.height=this.renderHeight,this.unzoomFromCrop(),Bt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,t.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,t.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()]}}))}))},t.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ht("toolbar","\n width: "+("inline"===this.displayMode?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+";\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.toolbarHeight+"px;\n box-sizing: content-box;\n overflow: hidden;\n line-height: 0px;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new Ht("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new Ht("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var t=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ht("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*t)+"px;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Ut("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new Ht("toolbar_dropdown","\n position: absolute;\n max-width: "+4*this.toolbarHeight+"px;\n z-index: 20;\n white-space: normal;\n box-sizing: content-box;\n box-shadow: 3px 3px rgba(33, 33, 33, 0.1);\n margin: "+("inline"===this.displayMode?"0":this.popupMargin)+"px;\n line-height: 0px;\n ")),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Ht("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ht("toolbar_straightener_block","\n display: flex;\n overflow: hidden;\n justify-content: center;\n -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%);\n ")),this.toolbarStraightenerStyleClass=this.styles.addClass(new Ht("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ht("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},t.instanceCounter=0,t}(),ee=i("8hTe"),ie=i.n(ee),re=/]*>/g;e.a=function(t){var e=t.value,i=void 0===e?"":e,l=t.edit,d=void 0!==l&&l,f=t.className,p=t.showTextOnly,g=t.showLines,m=t.replaces,v=t.zoomImg,y=t.hasMask,C=t.style,w=void 0===C?{}:C,k=t.stylesPrev,E=void 0===k?{}:k,A=String(i),D=Object(u.useRef)(),R=Object(u.useRef)(),O=Object(u.useState)(""),I=Object(a.a)(O,2),j=I[0],U=I[1],H=Object(u.useState)("office"),G=Object(a.a)(H,2),z=G[0],W=G[1],V=Object(u.useMemo)((function(){try{A=(A=A.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+P.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+P.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+P.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")).replace(new RegExp("(?[TOC]

        ",S()),b()),t=(t=t.replace(/(__special_katext_id_\d+__)/g,(function(t,i){var r=e[i],n=r.type,s=r.expression;return Object(N.renderToString)(function(t){var e=document.createElement("div");return e.innerHTML=t,0===e.childNodes.length?"":e.childNodes[0].nodeValue}(s)||"",{displayMode:"block"===n,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),L(),p){var i=document.createElement("div");return i.innerHTML=t,i.innerText}return setTimeout((function(){return Y()}),500),t}),[A]),K=Object(u.useRef)();function q(t){var e=t.target;if("IMG"===e.tagName.toUpperCase()){if(v){var i=e.getAttribute("src");U(i),W("image")}}else if("A"===e.tagName.toUpperCase()){var r=e.getAttribute("href");if(r.indexOf("office")>-1)t.preventDefault(),U(r),W("office");else if(r.indexOf("application/pdf")>-1)t.preventDefault(),U(r),W("pdf");else if(r.indexOf("type=text")>-1)t.preventDefault(),U(r),W("html");else if(r.startsWith("#")){t.preventDefault();var n=document.getElementById(r.replace("#",""));n&&n.scrollIntoView(!0)}}}x.WebkitLineClamp=g,g&&(w=Object(s.a)(Object(s.a)({},w),x));var Y=function(){var t,e=null===(t=K.current)||void 0===t?void 0:t.querySelectorAll("video");null==e||e.forEach((function(t){if(t.oncontextmenu=function(){return!1},t.src.indexOf(".m3u8")>-1)if(t.canPlayType("application/vnd.apple.mpegurl"));else if(M.a.isSupported()){var e=new M.a;e.loadSource(t.src),e.attachMedia(t)}}))};Object(u.useEffect)((function(){if(K.current&&V&&V.match(re)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",q),function(){K.current.removeEventListener("click",q),L(),b()}}),[V,K.current,q]);return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:K,style:Object(s.a)({},w),className:"".concat(f||""," markdown-body ").concat(ie.a.mdBody),onMouseOver:function(t){d&&("IMG"===t.target.nodeName?(D.current.style.display="flex",D.current.style.width=t.target.clientWidth+"px",D.current.style.height=t.target.clientHeight+"px",D.current.style.top=t.target.offsetTop+"px",D.current.style.left=t.target.offsetLeft+"px",R.current.src=t.target.getAttribute("src")):D.current.style.display="none")},dangerouslySetInnerHTML:{__html:V}}),h.a.createElement("div",{ref:D,className:ie.a.button},h.a.createElement(r.a,null,h.a.createElement(n.a,{onClick:function(){return(t=new te(R.current)).displayMode="popup",t.addRenderEventListener(function(){var t=Object(o.a)(c.a.mark((function t(e){var i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return D.current.style.display="none",t.next=3,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e}});case 3:null!=(i=t.sent)&&i.id&&m(R.current.getAttribute("src").replace(P.a.API_SERVER,""),"/api/attachments/".concat(null==i?void 0:i.id,"?type=").concat(i.content_type));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),void t.show();var t}},"裁剪"),h.a.createElement(n.a,{onClick:function(){return(t=new _t(R.current)).settings.displayMode="popup",t.addEventListener("render",function(){var t=Object(o.a)(c.a.mark((function t(e){var i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(D.current.style.display="none",!R.current){t.next=6;break}return t.next=4,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:e.dataUrl}});case 4:null!=(i=t.sent)&&i.id&&m(R.current.getAttribute("src").replace(P.a.API_SERVER,""),"/api/attachments/".concat(null==i?void 0:i.id,"?type=").concat(i.content_type));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.show(),void(window.markerArea=t);var t}},"编辑"))),h.a.createElement("img",{ref:R,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),h.a.createElement(F.a,{close:!0,data:j,hasMask:y,type:null!=j&&j.length?z:"",style:Object(s.a)({},E),onClose:function(){return U("")}}))}},"9VGf": /*!****************************************!*\ !*** ./src/components/useInterval.tsx ***! \****************************************/ /*! exports provided: default */ -/*! exports used: default */function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var i=r(/*! react */"q1tI");function n(t,e){var r=Object(i.useRef)();Object(i.useEffect)((function(){r.current=t})),Object(i.useEffect)((function(){if(null!==e){var t=setInterval((function(){r.current()}),e);return function(){return clearInterval(t)}}}),[e])}},BU3w: +/*! exports used: default */function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var r=i(/*! react */"q1tI");function n(t,e){var i=Object(r.useRef)();Object(r.useEffect)((function(){i.current=t})),Object(r.useEffect)((function(){if(null!==e){var t=setInterval((function(){i.current()}),e);return function(){return clearInterval(t)}}}),[e])}},BU3w: /*!***************************************************!*\ !*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***! \***************************************************/ /*! exports provided: injectCSS, updateCSS */ -/*! exports used: updateCSS */function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var i=r(/*! ./canUseDom */"MNnm");function n(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function s(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(i.a)())return null;var s,o=document.createElement("style");(null===(e=r.csp)||void 0===e?void 0:e.nonce)&&(o.nonce=null===(s=r.csp)||void 0===s?void 0:s.nonce);o.innerHTML=t;var a=n(r),l=a.firstChild;return r.prepend&&a.prepend?a.prepend(o):r.prepend&&l?a.insertBefore(o,l):a.appendChild(o),o}var o=new Map;function a(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n(r);if(!o.has(i)){var a=s("",r),l=a.parentNode;o.set(i,l),l.removeChild(a)}var c=Array.from(o.get(i).children).find((function(t){return"STYLE"===t.tagName&&t["rc-util-key"]===e}));if(c){var u,h,d;if((null===(u=r.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(h=r.csp)||void 0===h?void 0:h.nonce))c.nonce=null===(d=r.csp)||void 0===d?void 0:d.nonce;return c.innerHTML!==t&&(c.innerHTML=t),c}var f=s(t,r);return f["rc-util-key"]=e,f}},Bd2K: +/*! exports used: updateCSS */function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var r=i(/*! ./canUseDom */"MNnm");function n(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function s(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(r.a)())return null;var s,o=document.createElement("style");(null===(e=i.csp)||void 0===e?void 0:e.nonce)&&(o.nonce=null===(s=i.csp)||void 0===s?void 0:s.nonce);o.innerHTML=t;var a=n(i),l=a.firstChild;return i.prepend&&a.prepend?a.prepend(o):i.prepend&&l?a.insertBefore(o,l):a.appendChild(o),o}var o=new Map;function a(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n(i);if(!o.has(r)){var a=s("",i),l=a.parentNode;o.set(r,l),l.removeChild(a)}var c=Array.from(o.get(r).children).find((function(t){return"STYLE"===t.tagName&&t["rc-util-key"]===e}));if(c){var u,h,d;if((null===(u=i.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(h=i.csp)||void 0===h?void 0:h.nonce))c.nonce=null===(d=i.csp)||void 0===d?void 0:d.nonce;return c.innerHTML!==t&&(c.innerHTML=t),c}var f=s(t,i);return f["rc-util-key"]=e,f}},Bd2K: /*!********************************************************!*\ !*** ./node_modules/codemirror/addon/edit/closetag.js ***! \********************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){t.defineOption("autoCloseTags",!1,(function(o,a,l){if(l!=t.Init&&l&&o.removeKeyMap("autoCloseTags"),a){var c={name:"autoCloseTags"};"object"==typeof a&&!1===a.whenClosing||(c["'/'"]=function(e){return function(e){return e.getOption("disableInput")?t.Pass:i(e,!0)}(e)}),"object"==typeof a&&!1===a.whenOpening||(c["'>'"]=function(i){return function(i){if(i.getOption("disableInput"))return t.Pass;for(var o=i.listSelections(),a=[],l=i.getOption("autoCloseTags"),c=0;cu.ch&&(g=g.slice(0,g.length-h.end+u.ch));var b=g.toLowerCase();if(!g||"string"==h.type&&(h.end!=u.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||1==h.string.length)||"tag"==h.type&&p.close||h.string.indexOf("/")==u.ch-h.start-1||v&&n(v,b)>-1||s(i,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],g,u,!0))return t.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&n(x,g)>-1)a[c]={text:"/>",newPos:t.Pos(u.line,u.ch+2)};else{var S=y&&n(y,b)>-1;a[c]={indent:S,text:">"+(S?"\n\n":"")+"",newPos:S?t.Pos(u.line+1,0):t.Pos(u.line,u.ch+1)}}}var C="object"==typeof l&&l.dontIndentOnAutoClose;for(c=o.length-1;c>=0;c--){var w=a[c];i.replaceRange(w.text,o[c].head,o[c].anchor,"+insert");var k=i.listSelections().slice(0);k[c]={head:w.newPos,anchor:w.newPos},i.setSelections(k),!C&&w.indent&&(i.indentLine(w.newPos.line,null,!0),i.indentLine(w.newPos.line+1,null,!0))}}(i)}),o.addKeyMap(c)}}));var e=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],r=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function i(e,r){for(var i=e.listSelections(),n=[],o=r?"/":""!=e.getLine(u.line).charAt(h.end)&&(p+=">"),n[c]=p}if(e.replaceSelections(n),i=e.listSelections(),!l)for(c=0;c=0&&r[c]==i;c--)++l;for(n=a.to,c=1;c'"]=function(r){return function(r){if(r.getOption("disableInput"))return t.Pass;for(var o=r.listSelections(),a=[],l=r.getOption("autoCloseTags"),c=0;cu.ch&&(g=g.slice(0,g.length-h.end+u.ch));var b=g.toLowerCase();if(!g||"string"==h.type&&(h.end!=u.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||1==h.string.length)||"tag"==h.type&&p.close||h.string.indexOf("/")==u.ch-h.start-1||v&&n(v,b)>-1||s(r,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],g,u,!0))return t.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&n(x,g)>-1)a[c]={text:"/>",newPos:t.Pos(u.line,u.ch+2)};else{var S=y&&n(y,b)>-1;a[c]={indent:S,text:">"+(S?"\n\n":"")+"",newPos:S?t.Pos(u.line+1,0):t.Pos(u.line,u.ch+1)}}}var C="object"==typeof l&&l.dontIndentOnAutoClose;for(c=o.length-1;c>=0;c--){var w=a[c];r.replaceRange(w.text,o[c].head,o[c].anchor,"+insert");var k=r.listSelections().slice(0);k[c]={head:w.newPos,anchor:w.newPos},r.setSelections(k),!C&&w.indent&&(r.indentLine(w.newPos.line,null,!0),r.indentLine(w.newPos.line+1,null,!0))}}(r)}),o.addKeyMap(c)}}));var e=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],i=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(e,i){for(var r=e.listSelections(),n=[],o=i?"/":""!=e.getLine(u.line).charAt(h.end)&&(p+=">"),n[c]=p}if(e.replaceSelections(n),r=e.listSelections(),!l)for(c=0;c=0&&i[c]==r;c--)++l;for(n=a.to,c=1;c0){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"",r=[],i=0;i0){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"",i=[],r=0;rt.length)&&(e=t.length);for(var r=0,i=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(i=t[Symbol.iterator]()).next.bind(i)}var i=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){function e(){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}}t.exports={defaults:{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},getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}})),n=(i.defaults,i.getDefaults,i.changeDefaults,/[&<>"']/),s=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(t){return l[t]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(t){return t.replace(u,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}var d=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,g={},m=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(t,e){g[" "+t]||(m.test(t)?g[" "+t]=t+"/":g[" "+t]=x(t,"/",!0));var r=-1===(t=g[" "+t]).indexOf(":");return"//"===e.substring(0,2)?r?e:t.replace(v,"$1")+e:"/"===e.charAt(0)?r?e:t.replace(y,"$1")+e:t+e}function x(t,e,r){var i=t.length;if(0===i)return"";for(var n=0;n=0&&"\\"===r[n];)i=!i;return i?"|":" |"})).split(/ \|/),i=0;if(r.length>e)r.splice(e);else for(;r.length1?{type:"space",raw:e[0]}:{raw:"\n"}},e.code=function(t,e){var r=this.rules.block.code.exec(t);if(r){var i=e[e.length-1];if(i&&"paragraph"===i.type)return{raw:r[0],text:r[0].trimRight()};var n=r[0].replace(/^ {4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:_(n,"\n")}}},e.fences=function(t){var e=this.rules.block.fences.exec(t);if(e){var r=e[0],i=function(t,e){var r=t.match(/^(\s+)(?:```)/);if(null===r)return e;var i=r[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:e[0].length>=i.length?t.slice(i.length):t})).join("\n")}(r,e[3]||"");return{type:"code",raw:r,lang:e[2]?e[2].trim():e[2],text:i}}},e.heading=function(t){var e=this.rules.block.heading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},e.nptable=function(t){var e=this.rules.block.nptable.exec(t);if(e){var r={type:"table",header:I(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(r.header.length===r.align.length){var i,n=r.align.length;for(i=0;i ?/gm,"");return{type:"blockquote",raw:e[0],text:r}}},e.list=function(t){var e=this.rules.block.list.exec(t);if(e){for(var r,i,n,s,o,a,l,c=e[0],u=e[2],h=u.length>1,d=")"===u[u.length-1],f={type:"list",raw:c,ordered:h,start:h?+u.slice(0,-1):"",loose:!1,items:[]},p=e[0].match(this.rules.block.item),g=!1,m=p.length,v=0;v1||this.options.smartLists&&n!==u)&&(s=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-s.length),v=m-1)),o=g||/\n\n(?!\s*$)/.test(r),v!==m-1&&(g="\n"===r.charAt(r.length-1),o||(o=g)),o&&(f.loose=!0),l=void 0,(a=/^\[[ xX]\] /.test(r))&&(l=" "!==r[1],r=r.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:a,checked:l,loose:o,text:r});return f}},e.html=function(t){var e=this.rules.block.html.exec(t);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):M(e[0]):e[0]}},e.def=function(t){var e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}},e.table=function(t){var e=this.rules.block.table.exec(t);if(e){var r={type:"table",header:I(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(r.header.length===r.align.length){r.raw=e[0];var i,n=r.align.length;for(i=0;i/i.test(i[0])&&(e=!1),!r&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?r=!0:r&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(r=!1),{type:this.options.sanitize?"text":"html",raw:i[0],inLink:e,inRawBlock:r,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):M(i[0]):i[0]}},e.link=function(t){var e=this.rules.inline.link.exec(t);if(e){var r=P(e[2],"()");if(r>-1){var i=(0===e[0].indexOf("!")?5:4)+e[1].length+r;e[2]=e[2].substring(0,r),e[0]=e[0].substring(0,i).trim(),e[3]=""}var n=e[2],s="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);o?(n=o[1],s=o[3]):s=""}else s=e[3]?e[3].slice(1,-1):"";return N(e,{href:(n=n.trim().replace(/^<([\s\S]*)>$/,"$1"))?n.replace(this.rules.inline._escapes,"$1"):n,title:s?s.replace(this.rules.inline._escapes,"$1"):s},e[0])}},e.reflink=function(t,e){var r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){var i=(r[2]||r[1]).replace(/\s+/g," ");if(!(i=e[i.toLowerCase()])||!i.href){var n=r[0].charAt(0);return{type:"text",raw:n,text:n}}return N(r,i,r[0])}},e.strong=function(t,e,r){void 0===r&&(r="");var i=this.rules.inline.strong.start.exec(t);if(i&&(!i[1]||i[1]&&(""===r||this.rules.inline.punctuation.exec(r)))){e=e.slice(-1*t.length);var n,s="**"===i[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(s.lastIndex=0;null!=(i=s.exec(e));)if(n=this.rules.inline.strong.middle.exec(e.slice(0,i.index+3)))return{type:"strong",raw:t.slice(0,n[0].length),text:t.slice(2,n[0].length-2)}}},e.em=function(t,e,r){void 0===r&&(r="");var i=this.rules.inline.em.start.exec(t);if(i&&(!i[1]||i[1]&&(""===r||this.rules.inline.punctuation.exec(r)))){e=e.slice(-1*t.length);var n,s="*"===i[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(s.lastIndex=0;null!=(i=s.exec(e));)if(n=this.rules.inline.em.middle.exec(e.slice(0,i.index+2)))return{type:"em",raw:t.slice(0,n[0].length),text:t.slice(1,n[0].length-1)}}},e.codespan=function(t){var e=this.rules.inline.code.exec(t);if(e){var r=e[2].replace(/\n/g," "),i=/[^ ]/.test(r),n=r.startsWith(" ")&&r.endsWith(" ");return i&&n&&(r=r.substring(1,r.length-1)),r=M(r,!0),{type:"codespan",raw:e[0],text:r}}},e.br=function(t){var e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}},e.del=function(t){var e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[1]}},e.autolink=function(t,e){var r,i,n=this.rules.inline.autolink.exec(t);if(n)return i="@"===n[2]?"mailto:"+(r=M(this.options.mangle?e(n[1]):n[1])):r=M(n[1]),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}},e.url=function(t,e){var r;if(r=this.rules.inline.url.exec(t)){var i,n;if("@"===r[2])n="mailto:"+(i=M(this.options.mangle?e(r[0]):r[0]));else{var s;do{s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(s!==r[0]);i=M(r[0]),n="www."===r[1]?"http://"+i:i}return{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}},e.inlineText=function(t,e,r){var i,n=this.rules.inline.text.exec(t);if(n)return i=e?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):M(n[0]):n[0]:M(this.options.smartypants?r(n[0]):n[0]),{type:"text",raw:n[0],text:i}},t}(),B=E,j=w,U=T,H={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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:B,table:B,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=j(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=j(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=j(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._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",H._comment=//,H.html=j(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=j(H._paragraph).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=j(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=U({},H),H.gfm=U({},H.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*|$)"}),H.gfm.nptable=j(H.gfm.nptable).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=j(H.gfm.table).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=U({},H.normal,{html:j("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:B,paragraph:j(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:B,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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:B,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};G.punctuation=j(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",G._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",G.em.start=j(G.em.start).replace(/punctuation/g,G._punctuation).getRegex(),G.em.middle=j(G.em.middle).replace(/punctuation/g,G._punctuation).replace(/overlapSkip/g,G._overlapSkip).getRegex(),G.em.endAst=j(G.em.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.em.endUnd=j(G.em.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.start=j(G.strong.start).replace(/punctuation/g,G._punctuation).getRegex(),G.strong.middle=j(G.strong.middle).replace(/punctuation/g,G._punctuation).replace(/blockSkip/g,G._blockSkip).getRegex(),G.strong.endAst=j(G.strong.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.endUnd=j(G.strong.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=j(G._blockSkip,"g").getRegex(),G.overlapSkip=j(G._overlapSkip,"g").getRegex(),G._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,G._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])?)+(?![-_])/,G.autolink=j(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex(),G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,G.tag=j(G.tag).replace("comment",H._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=j(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=j(G.reflink).replace("label",G._label).getRegex(),G.reflinkSearch=j(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex(),G.normal=U({},G),G.pedantic=U({},G.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:j(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:j(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=U({},G.normal,{escape:j(G.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]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),i+="&#"+r+";";return i}var X=function(){function e(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||W,this.options.tokenizer=this.options.tokenizer||new F,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var e={block:V.normal,inline:K.normal};this.options.pedantic?(e.block=V.pedantic,e.inline=K.pedantic):this.options.gfm&&(e.block=V.gfm,this.options.breaks?e.inline=K.breaks:e.inline=K.gfm),this.tokenizer.rules=e}e.lex=function(t,r){return new e(r).lex(t)};var r,i,n,s=e.prototype;return s.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens,!0),this.inline(this.tokens),this.tokens},s.blockTokens=function(t,e,r){var i,n,s,o;for(void 0===e&&(e=[]),void 0===r&&(r=!0),t=t.replace(/^ +$/gm,"");t;)if(i=this.tokenizer.space(t))t=t.substring(i.raw.length),i.type&&e.push(i);else if(i=this.tokenizer.code(t,e))t=t.substring(i.raw.length),i.type?e.push(i):((o=e[e.length-1]).raw+="\n"+i.raw,o.text+="\n"+i.text);else if(i=this.tokenizer.fences(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.heading(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.nptable(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.hr(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.blockquote(t))t=t.substring(i.raw.length),i.tokens=this.blockTokens(i.text,[],r),e.push(i);else if(i=this.tokenizer.list(t)){for(t=t.substring(i.raw.length),s=i.items.length,n=0;n0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(a));)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(s=this.tokenizer.escape(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.tag(t,r,i))t=t.substring(s.raw.length),r=s.inLink,i=s.inRawBlock,e.push(s);else if(s=this.tokenizer.link(t))t=t.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,i)),e.push(s);else if(s=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,i)),e.push(s);else if(s=this.tokenizer.strong(t,a,n))t=t.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],r,i),e.push(s);else if(s=this.tokenizer.em(t,a,n))t=t.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],r,i),e.push(s);else if(s=this.tokenizer.codespan(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.br(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.del(t))t=t.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],r,i),e.push(s);else if(s=this.tokenizer.autolink(t,Y))t=t.substring(s.raw.length),e.push(s);else if(r||!(s=this.tokenizer.url(t,Y))){if(s=this.tokenizer.inlineText(t,i,q))t=t.substring(s.raw.length),n=s.raw.slice(-1),e.push(s);else if(t){var c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else t=t.substring(s.raw.length),e.push(s);return e},r=e,n=[{key:"rules",get:function(){return{block:V,inline:K}}}],(i=null)&&t(r.prototype,i),n&&t(r,n),e}(),$=i.defaults,Z=k,Q=S,J=function(){function t(t){this.options=t||$}var e=t.prototype;return e.code=function(t,e,r){var i=(e||"").match(/\S*/)[0];if(this.options.highlight){var n=this.options.highlight(t,i);null!=n&&n!==t&&(r=!0,t=n)}return i?'
        '+(r?t:Q(t,!0))+"
        \n":"
        "+(r?t:Q(t,!0))+"
        \n"},e.blockquote=function(t){return"
        \n"+t+"
        \n"},e.html=function(t){return t},e.heading=function(t,e,r,i){return this.options.headerIds?"'+t+"\n":""+t+"\n"},e.hr=function(){return this.options.xhtml?"
        \n":"
        \n"},e.list=function(t,e,r){var i=e?"ol":"ul";return"<"+i+(e&&1!==r?' start="'+r+'"':"")+">\n"+t+"\n"},e.listitem=function(t){return"
      • "+t+"
      • \n"},e.checkbox=function(t){return" "},e.paragraph=function(t){return"

        "+t+"

        \n"},e.table=function(t,e){return e&&(e=""+e+""),"\n\n"+t+"\n"+e+"
        \n"},e.tablerow=function(t){return"\n"+t+"\n"},e.tablecell=function(t,e){var r=e.header?"th":"td";return(e.align?"<"+r+' align="'+e.align+'">':"<"+r+">")+t+"\n"},e.strong=function(t){return""+t+""},e.em=function(t){return""+t+""},e.codespan=function(t){return""+t+""},e.br=function(){return this.options.xhtml?"
        ":"
        "},e.del=function(t){return""+t+""},e.link=function(t,e,r){if(null===(t=Z(this.options.sanitize,this.options.baseUrl,t)))return r;var i='"},e.image=function(t,e,r){if(null===(t=Z(this.options.sanitize,this.options.baseUrl,t)))return r;var i=''+r+'":">"},e.text=function(t){return t},t}(),tt=function(){function t(){}var e=t.prototype;return e.strong=function(t){return t},e.em=function(t){return t},e.codespan=function(t){return t},e.del=function(t){return t},e.html=function(t){return t},e.text=function(t){return t},e.link=function(t,e,r){return""+r},e.image=function(t,e,r){return""+r},e.br=function(){return""},t}(),et=function(){function t(){this.seen={}}return t.prototype.slug=function(t){var e=t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(e)){var r=e;do{this.seen[r]++,e=r+"-"+this.seen[r]}while(this.seen.hasOwnProperty(e))}return this.seen[e]=0,e},t}(),rt=i.defaults,it=C,nt=function(){function t(t){this.options=t||rt,this.options.renderer=this.options.renderer||new J,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new tt,this.slugger=new et}t.parse=function(e,r){return new t(r).parse(e)};var e=t.prototype;return e.parse=function(t,e){void 0===e&&(e=!0);var r,i,n,s,o,a,l,c,u,h,d,f,p,g,m,v,y,b,x="",S=t.length;for(r=0;r0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,p),u+=this.renderer.listitem(g,y,v);x+=this.renderer.list(u,d,f);continue;case"html":x+=this.renderer.html(h.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;r+1An error occurred:

        "+at(t.message+"",!0)+"
        ";throw t}}return ht.options=ht.setOptions=function(t){return st(ht.defaults,t),ct(ht.defaults),ht},ht.getDefaults=lt,ht.defaults=ut,ht.use=function(t){var e=st({},t);if(t.renderer&&function(){var r=ht.defaults.renderer||new J,i=function(e){var i=r[e];r[e]=function(){for(var n=arguments.length,s=new Array(n),o=0;ot.length)&&(e=t.length);for(var i=0,r=new Array(e);i=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}var r=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){function e(){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}}t.exports={defaults:{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},getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}})),n=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),s=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(t){return l[t]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(t){return t.replace(u,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}var d=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,g={},m=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(t,e){g[" "+t]||(m.test(t)?g[" "+t]=t+"/":g[" "+t]=x(t,"/",!0));var i=-1===(t=g[" "+t]).indexOf(":");return"//"===e.substring(0,2)?i?e:t.replace(v,"$1")+e:"/"===e.charAt(0)?i?e:t.replace(y,"$1")+e:t+e}function x(t,e,i){var r=t.length;if(0===r)return"";for(var n=0;n=0&&"\\"===i[n];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(i.length>e)i.splice(e);else for(;i.length1?{type:"space",raw:e[0]}:{raw:"\n"}},e.code=function(t,e){var i=this.rules.block.code.exec(t);if(i){var r=e[e.length-1];if(r&&"paragraph"===r.type)return{raw:i[0],text:i[0].trimRight()};var n=i[0].replace(/^ {4}/gm,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?n:_(n,"\n")}}},e.fences=function(t){var e=this.rules.block.fences.exec(t);if(e){var i=e[0],r=function(t,e){var i=t.match(/^(\s+)(?:```)/);if(null===i)return e;var r=i[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:e[0].length>=r.length?t.slice(r.length):t})).join("\n")}(i,e[3]||"");return{type:"code",raw:i,lang:e[2]?e[2].trim():e[2],text:r}}},e.heading=function(t){var e=this.rules.block.heading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},e.nptable=function(t){var e=this.rules.block.nptable.exec(t);if(e){var i={type:"table",header:I(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(i.header.length===i.align.length){var r,n=i.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:e[0],text:i}}},e.list=function(t){var e=this.rules.block.list.exec(t);if(e){for(var i,r,n,s,o,a,l,c=e[0],u=e[2],h=u.length>1,d=")"===u[u.length-1],f={type:"list",raw:c,ordered:h,start:h?+u.slice(0,-1):"",loose:!1,items:[]},p=e[0].match(this.rules.block.item),g=!1,m=p.length,v=0;v1||this.options.smartLists&&n!==u)&&(s=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-s.length),v=m-1)),o=g||/\n\n(?!\s*$)/.test(i),v!==m-1&&(g="\n"===i.charAt(i.length-1),o||(o=g)),o&&(f.loose=!0),l=void 0,(a=/^\[[ xX]\] /.test(i))&&(l=" "!==i[1],i=i.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:a,checked:l,loose:o,text:i});return f}},e.html=function(t){var e=this.rules.block.html.exec(t);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):M(e[0]):e[0]}},e.def=function(t){var e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}},e.table=function(t){var e=this.rules.block.table.exec(t);if(e){var i={type:"table",header:I(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=e[0];var r,n=i.align.length;for(r=0;r/i.test(r[0])&&(e=!1),!i&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?i=!0:i&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(i=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:e,inRawBlock:i,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):M(r[0]):r[0]}},e.link=function(t){var e=this.rules.inline.link.exec(t);if(e){var i=P(e[2],"()");if(i>-1){var r=(0===e[0].indexOf("!")?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,r).trim(),e[3]=""}var n=e[2],s="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);o?(n=o[1],s=o[3]):s=""}else s=e[3]?e[3].slice(1,-1):"";return N(e,{href:(n=n.trim().replace(/^<([\s\S]*)>$/,"$1"))?n.replace(this.rules.inline._escapes,"$1"):n,title:s?s.replace(this.rules.inline._escapes,"$1"):s},e[0])}},e.reflink=function(t,e){var i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){var r=(i[2]||i[1]).replace(/\s+/g," ");if(!(r=e[r.toLowerCase()])||!r.href){var n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return N(i,r,i[0])}},e.strong=function(t,e,i){void 0===i&&(i="");var r=this.rules.inline.strong.start.exec(t);if(r&&(!r[1]||r[1]&&(""===i||this.rules.inline.punctuation.exec(i)))){e=e.slice(-1*t.length);var n,s="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(s.lastIndex=0;null!=(r=s.exec(e));)if(n=this.rules.inline.strong.middle.exec(e.slice(0,r.index+3)))return{type:"strong",raw:t.slice(0,n[0].length),text:t.slice(2,n[0].length-2)}}},e.em=function(t,e,i){void 0===i&&(i="");var r=this.rules.inline.em.start.exec(t);if(r&&(!r[1]||r[1]&&(""===i||this.rules.inline.punctuation.exec(i)))){e=e.slice(-1*t.length);var n,s="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(s.lastIndex=0;null!=(r=s.exec(e));)if(n=this.rules.inline.em.middle.exec(e.slice(0,r.index+2)))return{type:"em",raw:t.slice(0,n[0].length),text:t.slice(1,n[0].length-1)}}},e.codespan=function(t){var e=this.rules.inline.code.exec(t);if(e){var i=e[2].replace(/\n/g," "),r=/[^ ]/.test(i),n=i.startsWith(" ")&&i.endsWith(" ");return r&&n&&(i=i.substring(1,i.length-1)),i=M(i,!0),{type:"codespan",raw:e[0],text:i}}},e.br=function(t){var e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}},e.del=function(t){var e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[1]}},e.autolink=function(t,e){var i,r,n=this.rules.inline.autolink.exec(t);if(n)return r="@"===n[2]?"mailto:"+(i=M(this.options.mangle?e(n[1]):n[1])):i=M(n[1]),{type:"link",raw:n[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}},e.url=function(t,e){var i;if(i=this.rules.inline.url.exec(t)){var r,n;if("@"===i[2])n="mailto:"+(r=M(this.options.mangle?e(i[0]):i[0]));else{var s;do{s=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(s!==i[0]);r=M(i[0]),n="www."===i[1]?"http://"+r:r}return{type:"link",raw:i[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}},e.inlineText=function(t,e,i){var r,n=this.rules.inline.text.exec(t);if(n)return r=e?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):M(n[0]):n[0]:M(this.options.smartypants?i(n[0]):n[0]),{type:"text",raw:n[0],text:r}},t}(),B=E,j=w,U=T,H={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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:B,table:B,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=j(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=j(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=j(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._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",H._comment=//,H.html=j(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=j(H._paragraph).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=j(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=U({},H),H.gfm=U({},H.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*|$)"}),H.gfm.nptable=j(H.gfm.nptable).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=j(H.gfm.table).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=U({},H.normal,{html:j("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:B,paragraph:j(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:B,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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:B,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};G.punctuation=j(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",G._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",G.em.start=j(G.em.start).replace(/punctuation/g,G._punctuation).getRegex(),G.em.middle=j(G.em.middle).replace(/punctuation/g,G._punctuation).replace(/overlapSkip/g,G._overlapSkip).getRegex(),G.em.endAst=j(G.em.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.em.endUnd=j(G.em.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.start=j(G.strong.start).replace(/punctuation/g,G._punctuation).getRegex(),G.strong.middle=j(G.strong.middle).replace(/punctuation/g,G._punctuation).replace(/blockSkip/g,G._blockSkip).getRegex(),G.strong.endAst=j(G.strong.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.endUnd=j(G.strong.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=j(G._blockSkip,"g").getRegex(),G.overlapSkip=j(G._overlapSkip,"g").getRegex(),G._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,G._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])?)+(?![-_])/,G.autolink=j(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex(),G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,G.tag=j(G.tag).replace("comment",H._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=j(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=j(G.reflink).replace("label",G._label).getRegex(),G.reflinkSearch=j(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex(),G.normal=U({},G),G.pedantic=U({},G.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:j(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:j(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=U({},G.normal,{escape:j(G.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]*?(?:(?=[\\.5&&(i="x"+i.toString(16)),r+="&#"+i+";";return r}var X=function(){function e(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||W,this.options.tokenizer=this.options.tokenizer||new F,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var e={block:V.normal,inline:K.normal};this.options.pedantic?(e.block=V.pedantic,e.inline=K.pedantic):this.options.gfm&&(e.block=V.gfm,this.options.breaks?e.inline=K.breaks:e.inline=K.gfm),this.tokenizer.rules=e}e.lex=function(t,i){return new e(i).lex(t)};var i,r,n,s=e.prototype;return s.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens,!0),this.inline(this.tokens),this.tokens},s.blockTokens=function(t,e,i){var r,n,s,o;for(void 0===e&&(e=[]),void 0===i&&(i=!0),t=t.replace(/^ +$/gm,"");t;)if(r=this.tokenizer.space(t))t=t.substring(r.raw.length),r.type&&e.push(r);else if(r=this.tokenizer.code(t,e))t=t.substring(r.raw.length),r.type?e.push(r):((o=e[e.length-1]).raw+="\n"+r.raw,o.text+="\n"+r.text);else if(r=this.tokenizer.fences(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.heading(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.nptable(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.hr(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.blockquote(t))t=t.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],i),e.push(r);else if(r=this.tokenizer.list(t)){for(t=t.substring(r.raw.length),s=r.items.length,n=0;n0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(a));)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(s=this.tokenizer.escape(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.tag(t,i,r))t=t.substring(s.raw.length),i=s.inLink,r=s.inRawBlock,e.push(s);else if(s=this.tokenizer.link(t))t=t.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,r)),e.push(s);else if(s=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,r)),e.push(s);else if(s=this.tokenizer.strong(t,a,n))t=t.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],i,r),e.push(s);else if(s=this.tokenizer.em(t,a,n))t=t.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],i,r),e.push(s);else if(s=this.tokenizer.codespan(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.br(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.del(t))t=t.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],i,r),e.push(s);else if(s=this.tokenizer.autolink(t,Y))t=t.substring(s.raw.length),e.push(s);else if(i||!(s=this.tokenizer.url(t,Y))){if(s=this.tokenizer.inlineText(t,r,q))t=t.substring(s.raw.length),n=s.raw.slice(-1),e.push(s);else if(t){var c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else t=t.substring(s.raw.length),e.push(s);return e},i=e,n=[{key:"rules",get:function(){return{block:V,inline:K}}}],(r=null)&&t(i.prototype,r),n&&t(i,n),e}(),$=r.defaults,Z=k,Q=S,J=function(){function t(t){this.options=t||$}var e=t.prototype;return e.code=function(t,e,i){var r=(e||"").match(/\S*/)[0];if(this.options.highlight){var n=this.options.highlight(t,r);null!=n&&n!==t&&(i=!0,t=n)}return r?'
        '+(i?t:Q(t,!0))+"
        \n":"
        "+(i?t:Q(t,!0))+"
        \n"},e.blockquote=function(t){return"
        \n"+t+"
        \n"},e.html=function(t){return t},e.heading=function(t,e,i,r){return this.options.headerIds?"'+t+"\n":""+t+"\n"},e.hr=function(){return this.options.xhtml?"
        \n":"
        \n"},e.list=function(t,e,i){var r=e?"ol":"ul";return"<"+r+(e&&1!==i?' start="'+i+'"':"")+">\n"+t+"\n"},e.listitem=function(t){return"
      • "+t+"
      • \n"},e.checkbox=function(t){return" "},e.paragraph=function(t){return"

        "+t+"

        \n"},e.table=function(t,e){return e&&(e=""+e+""),"\n\n"+t+"\n"+e+"
        \n"},e.tablerow=function(t){return"\n"+t+"\n"},e.tablecell=function(t,e){var i=e.header?"th":"td";return(e.align?"<"+i+' align="'+e.align+'">':"<"+i+">")+t+"\n"},e.strong=function(t){return""+t+""},e.em=function(t){return""+t+""},e.codespan=function(t){return""+t+""},e.br=function(){return this.options.xhtml?"
        ":"
        "},e.del=function(t){return""+t+""},e.link=function(t,e,i){if(null===(t=Z(this.options.sanitize,this.options.baseUrl,t)))return i;var r='
        "},e.image=function(t,e,i){if(null===(t=Z(this.options.sanitize,this.options.baseUrl,t)))return i;var r=''+i+'":">"},e.text=function(t){return t},t}(),tt=function(){function t(){}var e=t.prototype;return e.strong=function(t){return t},e.em=function(t){return t},e.codespan=function(t){return t},e.del=function(t){return t},e.html=function(t){return t},e.text=function(t){return t},e.link=function(t,e,i){return""+i},e.image=function(t,e,i){return""+i},e.br=function(){return""},t}(),et=function(){function t(){this.seen={}}return t.prototype.slug=function(t){var e=t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(e)){var i=e;do{this.seen[i]++,e=i+"-"+this.seen[i]}while(this.seen.hasOwnProperty(e))}return this.seen[e]=0,e},t}(),it=r.defaults,rt=C,nt=function(){function t(t){this.options=t||it,this.options.renderer=this.options.renderer||new J,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new tt,this.slugger=new et}t.parse=function(e,i){return new t(i).parse(e)};var e=t.prototype;return e.parse=function(t,e){void 0===e&&(e=!0);var i,r,n,s,o,a,l,c,u,h,d,f,p,g,m,v,y,b,x="",S=t.length;for(i=0;i0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,p),u+=this.renderer.listitem(g,y,v);x+=this.renderer.list(u,d,f);continue;case"html":x+=this.renderer.html(h.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;i+1An error occurred:

        "+at(t.message+"",!0)+"
        ";throw t}}return ht.options=ht.setOptions=function(t){return st(ht.defaults,t),ct(ht.defaults),ht},ht.getDefaults=lt,ht.defaults=ut,ht.use=function(t){var e=st({},t);if(t.renderer&&function(){var i=ht.defaults.renderer||new J,r=function(e){var r=i[e];i[e]=function(){for(var n=arguments.length,s=new Array(n),o=0;o",triples:"",explode:"[]{}"},r=t.Pos;function i(t,r){return"pairs"==r&&"string"==typeof t?t:"object"==typeof t&&null!=t[r]?t[r]:e[r]}t.defineOption("autoCloseBrackets",!1,(function(e,r,o){o&&o!=t.Init&&(e.removeKeyMap(n),e.state.closeBrackets=null),r&&(s(i(r,"pairs")),e.state.closeBrackets=r,e.addKeyMap(n))}));var n={Backspace:function(e){var n=a(e);if(!n||e.getOption("disableInput"))return t.Pass;for(var s=i(n,"pairs"),o=e.listSelections(),c=0;c=0;c--){var h=o[c].head;e.replaceRange("",r(h.line,h.ch-1),r(h.line,h.ch+1),"+delete")}},Enter:function(e){var r=a(e),n=r&&i(r,"explode");if(!n||e.getOption("disableInput"))return t.Pass;for(var s=e.listSelections(),o=0;o1&&d.indexOf(n)>=0&&e.getRange(r(b.line,b.ch-2),b)==n+n){if(b.ch>2&&/\bstring/.test(e.getTokenTypeAt(r(b.line,b.ch-2))))return t.Pass;v="addFour"}else if(f){var S=0==b.ch?" ":e.getRange(r(b.line,b.ch-1),b);if(t.isWordChar(x)||S==n||t.isWordChar(S))return t.Pass;v="both"}else{if(!g||!(0===x.length||/\s/.test(x)||h.indexOf(x)>-1))return t.Pass;v="both"}else v=f&&c(e,b)?"both":d.indexOf(n)>=0&&e.getRange(b,r(b.line,b.ch+3))==n+n+n?"skipThree":"skip";if(u){if(u!=v)return t.Pass}else u=v}var C=l%2?o.charAt(l-1):n,w=l%2?n:o.charAt(l+1);e.operation((function(){if("skip"==u)e.execCommand("goCharRight");else if("skipThree"==u)for(var i=0;i<3;i++)e.execCommand("goCharRight");else if("surround"==u){var n=e.getSelections();for(i=0;i0,{anchor:new r(s.anchor.line,s.anchor.ch+(o?-1:1)),head:new r(s.head.line,s.head.ch+(o?1:-1))});e.setSelections(n)}else"both"==u?(e.replaceSelection(C+w,null),e.triggerElectric(C+w),e.execCommand("goCharLeft")):"addFour"==u&&(e.replaceSelection(C+C+C+C,"before"),e.execCommand("goCharRight"));var s,o}))}(n,e)}}function a(t){var e=t.state.closeBrackets;return!e||e.override?e:t.getModeAt(t.getCursor()).closeBrackets||e}function l(t,e){var i=t.getRange(r(e.line,e.ch-1),r(e.line,e.ch+1));return 2==i.length?i:null}function c(t,e){var i=t.getTokenAt(r(e.line,e.ch+1));return/\bstring/.test(i.type)&&i.start==e.ch&&(0==e.ch||!/\bstring/.test(t.getTokenTypeAt(e)))}s(e.pairs+"`")}(r(/*! ../../lib/codemirror */"VrN/"))},GfqC: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){!function(t){var e={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},i=t.Pos;function r(t,i){return"pairs"==i&&"string"==typeof t?t:"object"==typeof t&&null!=t[i]?t[i]:e[i]}t.defineOption("autoCloseBrackets",!1,(function(e,i,o){o&&o!=t.Init&&(e.removeKeyMap(n),e.state.closeBrackets=null),i&&(s(r(i,"pairs")),e.state.closeBrackets=i,e.addKeyMap(n))}));var n={Backspace:function(e){var n=a(e);if(!n||e.getOption("disableInput"))return t.Pass;for(var s=r(n,"pairs"),o=e.listSelections(),c=0;c=0;c--){var h=o[c].head;e.replaceRange("",i(h.line,h.ch-1),i(h.line,h.ch+1),"+delete")}},Enter:function(e){var i=a(e),n=i&&r(i,"explode");if(!n||e.getOption("disableInput"))return t.Pass;for(var s=e.listSelections(),o=0;o1&&d.indexOf(n)>=0&&e.getRange(i(b.line,b.ch-2),b)==n+n){if(b.ch>2&&/\bstring/.test(e.getTokenTypeAt(i(b.line,b.ch-2))))return t.Pass;v="addFour"}else if(f){var S=0==b.ch?" ":e.getRange(i(b.line,b.ch-1),b);if(t.isWordChar(x)||S==n||t.isWordChar(S))return t.Pass;v="both"}else{if(!g||!(0===x.length||/\s/.test(x)||h.indexOf(x)>-1))return t.Pass;v="both"}else v=f&&c(e,b)?"both":d.indexOf(n)>=0&&e.getRange(b,i(b.line,b.ch+3))==n+n+n?"skipThree":"skip";if(u){if(u!=v)return t.Pass}else u=v}var C=l%2?o.charAt(l-1):n,w=l%2?n:o.charAt(l+1);e.operation((function(){if("skip"==u)e.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)e.execCommand("goCharRight");else if("surround"==u){var n=e.getSelections();for(r=0;r0,{anchor:new i(s.anchor.line,s.anchor.ch+(o?-1:1)),head:new i(s.head.line,s.head.ch+(o?1:-1))});e.setSelections(n)}else"both"==u?(e.replaceSelection(C+w,null),e.triggerElectric(C+w),e.execCommand("goCharLeft")):"addFour"==u&&(e.replaceSelection(C+C+C+C,"before"),e.execCommand("goCharRight"));var s,o}))}(n,e)}}function a(t){var e=t.state.closeBrackets;return!e||e.override?e:t.getModeAt(t.getCursor()).closeBrackets||e}function l(t,e){var r=t.getRange(i(e.line,e.ch-1),i(e.line,e.ch+1));return 2==r.length?r:null}function c(t,e){var r=t.getTokenAt(i(e.line,e.ch+1));return/\bstring/.test(r.type)&&r.start==e.ch&&(0==e.ch||!/\bstring/.test(t.getTokenTypeAt(e)))}s(e.pairs+"`")}(i(/*! ../../lib/codemirror */"VrN/"))},GfqC: /*!********************************************************!*\ !*** ./node_modules/rc-upload/es/index.js + 6 modules ***! \********************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,r){"use strict";var i=r("q1tI"),n=r.n(i),s=r("TSYQ"),o=r.n(s);function a(t){var e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch(t){return e}}function l(t){var e=new XMLHttpRequest;t.onProgress&&e.upload&&(e.upload.onprogress=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),t.onProgress(e)});var r=new FormData;t.data&&Object.keys(t.data).forEach((function(e){var i=t.data[e];Array.isArray(i)?i.forEach((function(t){r.append(e+"[]",t)})):r.append(e,t.data[e])})),t.file instanceof Blob?r.append(t.filename,t.file,t.file.name):r.append(t.filename,t.file),e.onerror=function(e){t.onError(e)},e.onload=function(){return e.status<200||e.status>=300?t.onError(function(t,e){var r="cannot "+t.method+" "+t.action+" "+e.status+"'",i=new Error(r);return i.status=e.status,i.method=t.method,i.url=t.action,i}(t,e),a(e)):t.onSuccess(a(e),e)},e.open(t.method,t.action,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var i=t.headers||{};return null!==i["X-Requested-With"]&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(i).forEach((function(t){null!==i[t]&&e.setRequestHeader(t,i[t])})),e.send(r),{abort:function(){e.abort()}}}var c=+new Date,u=0;function h(){return"rc-upload-"+c+"-"+ ++u}var d=function(t,e){if(t&&e){var r=Array.isArray(e)?e:e.split(","),i=t.name||"",n=t.type||"",s=n.replace(/\/.*$/,"");return r.some((function(t){var e,r,o=t.trim();return"."===o.charAt(0)?(e=i.toLowerCase(),r=o.toLowerCase(),-1!==e.indexOf(r,e.length-r.length)):/\/\*$/.test(o)?s===o.replace(/\/.*$/,""):n===o}))}return!0};var f=function(t,e,r){var i=function t(i,n){n=n||"",i.isFile?i.file((function(t){r(t)&&(i.fullPath&&!t.webkitRelativePath&&(Object.defineProperties(t,{webkitRelativePath:{writable:!0}}),t.webkitRelativePath=i.fullPath.replace(/^\//,""),Object.defineProperties(t,{webkitRelativePath:{writable:!1}})),e([t]))})):i.isDirectory&&function(t,e){var r=t.createReader(),i=[];!function t(){r.readEntries((function(r){var n=Array.prototype.slice.apply(r);i=i.concat(n),!n.length?e(i):t()}))}()}(i,(function(e){e.forEach((function(e){t(e,""+n+i.name+"/")}))}))};t.forEach((function(t){i(t.webkitGetAsEntry())}))},p=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i]);return r}(r,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),S=o()((v(t={},s,!0),v(t,s+"-disabled",l),v(t,a,a),t)),C=l?{}:{onClick:m?this.onClick:function(){},onKeyDown:m?this.onKeyDown:function(){},onMouseEnter:y,onMouseLeave:b,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return n.a.createElement(i,p({},C,{className:S,role:"button",style:u}),n.a.createElement("input",p({},(e=x,Object.keys(e).reduce((function(t,r){return"data-"!==r.substr(0,5)&&"aria-"!==r.substr(0,5)&&"role"!==r||(t[r]=e[r]),t}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(t){return t.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:d,directory:g?"directory":null,webkitdirectory:g?"webkitdirectory":null,multiple:h,onChange:this.onChange})),f)}}]),e}(i.Component),S=Object.assign||function(t){for(var e=1;e0&&(e.percent=e.loaded/e.total*100),t.onProgress(e)});var i=new FormData;t.data&&Object.keys(t.data).forEach((function(e){var r=t.data[e];Array.isArray(r)?r.forEach((function(t){i.append(e+"[]",t)})):i.append(e,t.data[e])})),t.file instanceof Blob?i.append(t.filename,t.file,t.file.name):i.append(t.filename,t.file),e.onerror=function(e){t.onError(e)},e.onload=function(){return e.status<200||e.status>=300?t.onError(function(t,e){var i="cannot "+t.method+" "+t.action+" "+e.status+"'",r=new Error(i);return r.status=e.status,r.method=t.method,r.url=t.action,r}(t,e),a(e)):t.onSuccess(a(e),e)},e.open(t.method,t.action,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var r=t.headers||{};return null!==r["X-Requested-With"]&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(t){null!==r[t]&&e.setRequestHeader(t,r[t])})),e.send(i),{abort:function(){e.abort()}}}var c=+new Date,u=0;function h(){return"rc-upload-"+c+"-"+ ++u}var d=function(t,e){if(t&&e){var i=Array.isArray(e)?e:e.split(","),r=t.name||"",n=t.type||"",s=n.replace(/\/.*$/,"");return i.some((function(t){var e,i,o=t.trim();return"."===o.charAt(0)?(e=r.toLowerCase(),i=o.toLowerCase(),-1!==e.indexOf(i,e.length-i.length)):/\/\*$/.test(o)?s===o.replace(/\/.*$/,""):n===o}))}return!0};var f=function(t,e,i){var r=function t(r,n){n=n||"",r.isFile?r.file((function(t){i(t)&&(r.fullPath&&!t.webkitRelativePath&&(Object.defineProperties(t,{webkitRelativePath:{writable:!0}}),t.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(t,{webkitRelativePath:{writable:!1}})),e([t]))})):r.isDirectory&&function(t,e){var i=t.createReader(),r=[];!function t(){i.readEntries((function(i){var n=Array.prototype.slice.apply(i);r=r.concat(n),!n.length?e(r):t()}))}()}(r,(function(e){e.forEach((function(e){t(e,""+n+r.name+"/")}))}))};t.forEach((function(t){r(t.webkitGetAsEntry())}))},p=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r]);return i}(i,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),S=o()((v(t={},s,!0),v(t,s+"-disabled",l),v(t,a,a),t)),C=l?{}:{onClick:m?this.onClick:function(){},onKeyDown:m?this.onKeyDown:function(){},onMouseEnter:y,onMouseLeave:b,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return n.a.createElement(r,p({},C,{className:S,role:"button",style:u}),n.a.createElement("input",p({},(e=x,Object.keys(e).reduce((function(t,i){return"data-"!==i.substr(0,5)&&"aria-"!==i.substr(0,5)&&"role"!==i||(t[i]=e[i]),t}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(t){return t.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:d,directory:g?"directory":null,webkitdirectory:g?"webkitdirectory":null,multiple:h,onChange:this.onChange})),f)}}]),e}(r.Component),S=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:1,r=_.length,i=0;i1&&void 0!==arguments[1]&&arguments[1];return Object(E.a)(t).map((function(t,r){if(!a.isValidElement(t)||!t.type)return null;var i=t.type.isSelectOptGroup,n=t.key,s=t.props,o=s.children,l=Object(c.a)(s,["children"]);return e||!i?T(t):Object(k.a)(Object(k.a)({key:"__RC_SELECT_GRP__".concat(null===n?r:n,"__"),label:n},l),{},{options:L(o)})})).filter((function(t){return t}))}var A=r("2Qr1"),D=r("qNPg"),R=r("U8pU"),O=r("Kwbf"),_=r("WKfj");var I=function(t){var e=t.mode,r=t.options,i=t.children,n=t.backfill,s=t.allowClear,o=t.placeholder,l=t.getInputElement,c=t.showSearch,u=t.onSearch,h=t.defaultOpen,d=t.autoFocus,f=t.labelInValue,p=t.value,g=t.inputValue,m=t.optionLabelProp,v="multiple"===e||"tags"===e,y=void 0!==c?c:v||"combobox"===e,b=r||L(i);if(Object(O.a)("tags"!==e||b.every((function(t){return!t.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===e||"combobox"===e){var x=b.some((function(t){return t.options?t.options.some((function(t){return"number"==typeof("value"in t?t.value:t.key)})):"number"==typeof("value"in t?t.value:t.key)}));Object(O.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(O.a)("combobox"!==e||!m,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(O.a)("combobox"===e||!n,"`backfill` only works with `combobox` mode."),Object(O.a)("combobox"===e||!l,"`getInputElement` only work with `combobox` mode."),Object(O.b)("combobox"!==e||!l||!s||!o,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==e&&"tags"!==e&&Object(O.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(O.b)(!h||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=p){var S=Object(_.d)(p);Object(O.a)(!f||S.every((function(t){return"object"===Object(R.a)(t)&&("key"in t||"value"in t)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(O.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(i){var C=null;Object(E.a)(i).some((function(t){if(!a.isValidElement(t)||!t.type)return!1;var e=t.type;return!e.isSelectOption&&(e.isSelectOptGroup?!Object(E.a)(t.props.children).every((function(e){return!(a.isValidElement(e)&&t.type&&!e.type.isSelectOption)||(C=e.type,!1)})):(C=e,!0))})),C&&Object(O.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(C.displayName||C.name||C,"`.")),Object(O.a)(void 0===g,"`inputValue` is deprecated, please use `searchValue` instead.")}},M=Object(D.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:L,flattenOptions:A.d,getLabeledValue:A.e,filterOptions:A.b,isValueDisabled:A.g,findValueOption:A.c,warningProps:I,fillOptionsWithMissingValue:A.a}),P=function(t){Object(s.a)(r,t);var e=Object(o.a)(r);function r(){var t;return Object(i.a)(this,r),(t=e.apply(this,arguments)).selectRef=a.createRef(),t.focus=function(){t.selectRef.current.focus()},t.blur=function(){t.selectRef.current.blur()},t}return Object(n.a)(r,[{key:"render",value:function(){return a.createElement(M,Object.assign({ref:this.selectRef},this.props))}}]),r}(a.Component);P.Option=S,P.OptGroup=w;var N=P;e.c=N},M8RZ: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,i){"use strict";i.d(e,"b",(function(){return S})),i.d(e,"a",(function(){return w}));var r=i("1OyB"),n=i("vuIU"),s=i("Ji7U"),o=i("LK+K"),a=i("q1tI"),l=i("rePB"),c=i("Ff2n"),u=i("ODXe"),h=i("4IlW"),d=i("bX4T"),f=i("YrtM"),p=i("TSYQ"),g=i.n(p),m=i("+nKL"),v=i("8OUc"),y=a.forwardRef((function(t,e){var i=t.prefixCls,r=t.id,n=t.flattenOptions,s=t.childrenAsData,o=t.values,p=t.searchValue,y=t.multiple,b=t.defaultActiveFirstOption,x=t.height,S=t.itemHeight,C=t.notFoundContent,w=t.open,k=t.menuItemSelectedIcon,E=t.virtual,T=t.onSelect,L=t.onToggleOpen,A=t.onActiveValue,D=t.onScroll,R=t.onMouseEnter,O="".concat(i,"-item"),_=Object(f.a)((function(){return n}),[w,n],(function(t,e){return e[0]&&t[1]!==e[1]})),I=a.useRef(null),M=function(t){t.preventDefault()},P=function(t){I.current&&I.current.scrollTo({index:t})},N=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=_.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];return Object(E.a)(t).map((function(t,i){if(!a.isValidElement(t)||!t.type)return null;var r=t.type.isSelectOptGroup,n=t.key,s=t.props,o=s.children,l=Object(c.a)(s,["children"]);return e||!r?T(t):Object(k.a)(Object(k.a)({key:"__RC_SELECT_GRP__".concat(null===n?i:n,"__"),label:n},l),{},{options:L(o)})})).filter((function(t){return t}))}var A=i("2Qr1"),D=i("qNPg"),R=i("U8pU"),O=i("Kwbf"),_=i("WKfj");var I=function(t){var e=t.mode,i=t.options,r=t.children,n=t.backfill,s=t.allowClear,o=t.placeholder,l=t.getInputElement,c=t.showSearch,u=t.onSearch,h=t.defaultOpen,d=t.autoFocus,f=t.labelInValue,p=t.value,g=t.inputValue,m=t.optionLabelProp,v="multiple"===e||"tags"===e,y=void 0!==c?c:v||"combobox"===e,b=i||L(r);if(Object(O.a)("tags"!==e||b.every((function(t){return!t.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===e||"combobox"===e){var x=b.some((function(t){return t.options?t.options.some((function(t){return"number"==typeof("value"in t?t.value:t.key)})):"number"==typeof("value"in t?t.value:t.key)}));Object(O.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(O.a)("combobox"!==e||!m,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(O.a)("combobox"===e||!n,"`backfill` only works with `combobox` mode."),Object(O.a)("combobox"===e||!l,"`getInputElement` only work with `combobox` mode."),Object(O.b)("combobox"!==e||!l||!s||!o,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==e&&"tags"!==e&&Object(O.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(O.b)(!h||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=p){var S=Object(_.d)(p);Object(O.a)(!f||S.every((function(t){return"object"===Object(R.a)(t)&&("key"in t||"value"in t)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(O.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var C=null;Object(E.a)(r).some((function(t){if(!a.isValidElement(t)||!t.type)return!1;var e=t.type;return!e.isSelectOption&&(e.isSelectOptGroup?!Object(E.a)(t.props.children).every((function(e){return!(a.isValidElement(e)&&t.type&&!e.type.isSelectOption)||(C=e.type,!1)})):(C=e,!0))})),C&&Object(O.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(C.displayName||C.name||C,"`.")),Object(O.a)(void 0===g,"`inputValue` is deprecated, please use `searchValue` instead.")}},M=Object(D.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:L,flattenOptions:A.d,getLabeledValue:A.e,filterOptions:A.b,isValueDisabled:A.g,findValueOption:A.c,warningProps:I,fillOptionsWithMissingValue:A.a}),P=function(t){Object(s.a)(i,t);var e=Object(o.a)(i);function i(){var t;return Object(r.a)(this,i),(t=e.apply(this,arguments)).selectRef=a.createRef(),t.focus=function(){t.selectRef.current.focus()},t.blur=function(){t.selectRef.current.blur()},t}return Object(n.a)(i,[{key:"render",value:function(){return a.createElement(M,Object.assign({ref:this.selectRef},this.props))}}]),i}(a.Component);P.Option=S,P.OptGroup=w;var N=P;e.c=N},M8RZ: /*!**********************************!*\ !*** ./src/components/modal.tsx ***! \**********************************/ /*! exports provided: default */ -/*! exports used: default */function(t,e,r){"use strict";r.d(e,"a",(function(){return u}));var i=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),n=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),s=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),o=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),a=r(/*! react */"q1tI"),l=r.n(a),c=r(/*! react-dom */"i8i4"),u=function(t){Object(s.a)(r,t);var e=Object(o.a)(r);function r(t){var n;Object(i.a)(this,r),n=e.call(this,t);var s=window.document;return n.node=s.createElement("div"),s.body.appendChild(n.node),n}return Object(n.a)(r,[{key:"render",value:function(){var t=this.props.children;return Object(c.createPortal)(t,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),r}(l.a.Component)},Ot1p: +/*! exports used: default */function(t,e,i){"use strict";i.d(e,"a",(function(){return u}));var r=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),n=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),s=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),o=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),a=i(/*! react */"q1tI"),l=i.n(a),c=i(/*! react-dom */"i8i4"),u=function(t){Object(s.a)(i,t);var e=Object(o.a)(i);function i(t){var n;Object(r.a)(this,i),n=e.call(this,t);var s=window.document;return n.node=s.createElement("div"),s.body.appendChild(n.node),n}return Object(n.a)(i,[{key:"render",value:function(){var t=this.props.children;return Object(c.createPortal)(t,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),i}(l.a.Component)},Ot1p: /*!**************************************************************!*\ !*** ./src/components/markdown-editor/index.tsx + 6 modules ***! \**************************************************************/ @@ -206,18 +206,18 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/codemirror/lib/codemirror.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/uuid/dist/esm-browser/v4.js */function(t,e,r){"use strict";r("2qtc");var i=r("kLXV"),n=r("rAM+"),s=(r("miYZ"),r("tsqr")),o=r("9og8"),a=r("tJVT"),l=r("jrin"),c=r("WmNS"),u=r.n(c),h=r("q1tI"),d=r.n(h),f=r("VrN/"),p=r.n(f),g=r("bdgK"),m=(r("p77/"),r("Bd2K"),r("ELLl"),r("19Vz"),r("lZu9"),r("+NIl"),r("kSUc"),r("9Bee")),v=function(t){var e=t.value,r=void 0===e?"":e,i=(t.className,t.showTextOnly,t.showLines,t.style,Object(h.useMemo)((function(){return""}),[r]));return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:i}}))},y=r("0Owb"),b=(r("dejd"),r("C+DQ"),r("1vsH")),x=r("m3rI"),S=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function C(t){var e=t.onActionCallback,r=t.title,i=t.icon,n=t.actionName,s=t.className,o=void 0===s?"":s,a=t.children;return d.a.createElement("a",{title:r,className:o,onClick:function(){e(n)}},d.a.createElement("i",{className:"md-iconfont ".concat(i)}),a)}var w=function(t){var e=t.watch,r=t.showNullButton,i=t.onActionCallback,n=t.fullScreen,s=t.insertTemp,o=t.hidetoolBar,a=t.uuid;t.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(b.D)("_educoder_session_login"),"&_educoder_session=").concat(Object(b.D)("_educoder_session"),"&key=").concat(a,"&api=").concat(encodeURIComponent(x.a.PROXY_SERVER)));var l=[].concat(S,[{title:"".concat(e?"关闭实时预览":"开启实时预览"),icon:"".concat(e?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!o&&l.map((function(t,e){return d.a.createElement("li",{key:e},t.actionName?d.a.createElement(C,Object(y.a)({},t,{onActionCallback:i})):d.a.createElement("span",{className:"v-line"}))})),r?d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:i},d.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,s&&d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(s),onActionCallback:i},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(C,{icon:"".concat(n?"icon-shrink":"icon-enlarge"),title:n?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:i})))},k=r("M8RZ"),E=(r("+L6B"),r("2/Rp")),T=(r("y8nQ"),r("Vl3Y")),L=(r("5NDa"),r("5rEg")),A={labelCol:{span:4},wrapperCol:{span:20}},D=function(t){var e=t.callback,r=t.onCancel;return d.a.createElement(T.a,Object(y.a)({},A,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(t){e(t)}}),d.a.createElement(T.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(L.a,null)),d.a.createElement(T.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(L.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:r},"取消")))},R=r("7ahc"),O=r("k1fw"),_=(r("HmJG"),r("BjJ7")),I=T.a.useForm,M={width:280,marginRight:10},P={labelCol:{span:5},wrapperCol:{span:19}},N=function(t){var e=t.callback,r=t.onCancel,i=I(),n=Object(a.a)(i,1)[0],s=Object(h.useRef)();function o(t,e){n.setFieldsValue({src:"/api/attachments/".concat(t.id,"?type=").concat(t.content_type),type:e.type})}return d.a.createElement(T.a,Object(y.a)({form:n},P,{className:"upload-image-panel",onFinish:function(t){e(Object(O.a)(Object(O.a)({},t),{},{name:s.current}))}}),d.a.createElement(T.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(T.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(L.a,{style:M})),d.a.createElement(F,{onFileChange:function(t){var e=t.target.files[0];s.current=e.name,B(e,o)}}))),d.a.createElement(T.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(L.a,{style:{width:264}})),d.a.createElement(T.a.Item,{style:{textAlign:"right"}},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:r},"取消")))};function F(t){var e=t.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:e}))}function B(t,e){if(!t)throw new String("没有文件");var r=new FormData;r.append("editormd-image-file",t),r.append("file_param_name","editormd-image-file"),r.append("byxhr","true");var i=new window.XMLHttpRequest;i.withCredentials=!0,i.addEventListener("load",(function(r){e(JSON.parse(r.target.responseText),t)}),!1),i.addEventListener("error",(function(t){console.error(t)}),!1),i.open("POST","".concat(_.a,"/api/attachments.json")),i.send(r)}r("giR+");var j,U,H=r("fyUT"),G=(r("7Kak"),r("9yH6")),z=G.a.Group,W={margin:"0 8px"},V=function(t){var e=t.callback,r=t.onCancel;return d.a.createElement(T.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(t){e(t)}},d.a.createElement("div",{className:"flex-container"},d.a.createElement("span",{style:W},"单元格数:"),d.a.createElement("span",{style:W},"行数"),d.a.createElement(T.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(H.a,null)),d.a.createElement("span",{style:W},"列数"),d.a.createElement(T.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(H.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:W},"对齐方式:"),d.a.createElement(T.a.Item,{name:"align"},d.a.createElement(z,null,d.a.createElement(G.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(G.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(G.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(G.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:r},"取消")))},K=r("ErOA"),q=r("7Cbv"),Y="------------",X={default:Y,left:":".concat(Y),center:":".concat(Y,":"),right:"".concat(Y,":")},$=r("9VGf");function Z(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}var Q=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",J=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],tt=(j={},Object(l.a)(j,Q+"-B","bold"),Object(l.a)(j,Q+"-I","italic"),j),et=(U={},Object(l.a)(U,"link","添加链接"),Object(l.a)(U,"code-block","添加代码块"),Object(l.a)(U,"upload-image","添加文件"),Object(l.a)(U,"add-table","添加表格"),U);e.a=function(t){var e=t.defaultValue,r=void 0===e?"":e,c=t.onChange,f=t.width,y=void 0===f?"100%":f,b=t.height,S=void 0===b?400:b,C=t.miniToolbar,E=void 0!==C&&C,T=t.isFocus,L=void 0!==T&&T,A=t.watch,O=t.insertTemp,_=t.mode,I=void 0===_?"markdown":_,M=t.id,P=void 0===M?"markdown-editor-id":M,F=t.showResizeBar,j=void 0!==F&&F,U=t.noStorage,H=void 0!==U&&U,G=t.showNullButton,z=void 0!==G&&G,W=t.hidetoolBar,Y=void 0!==W&&W,Q=t.fullScreen,rt=void 0!==Q&&Q,it=t.onBlur,nt=t.onCMBeforeChange,st=t.onFullScreen,ot=t.className,at=void 0===ot?"":ot,lt=t.disablePaste,ct=void 0!==lt&<,ut=t.placeholder,ht=void 0===ut?"":ut,dt=t.values,ft=void 0===dt?"":dt,pt=Object(h.useState)(null),gt=Object(a.a)(pt,2),mt=gt[0],vt=gt[1],yt=Object(h.useState)(r),bt=Object(a.a)(yt,2),xt=bt[0],St=bt[1],Ct=Object(h.useState)(A),wt=Object(a.a)(Ct,2),kt=wt[0],Et=wt[1],Tt=Object(h.useState)(rt),Lt=Object(a.a)(Tt,2),At=Lt[0],Dt=Lt[1],Rt=Object(h.useState)(""),Ot=Object(a.a)(Rt,2),_t=Ot[0],It=Ot[1],Mt=Object(h.useState)(0),Pt=Object(a.a)(Mt,2),Nt=Pt[0],Ft=Pt[1],Bt=Object(h.useState)(S),jt=Object(a.a)(Bt,2),Ut=jt[0],Ht=jt[1],Gt=Object(h.useState)(!1),zt=Object(a.a)(Gt,2),Wt=(zt[0],zt[1]),Vt=Object(h.useRef)(Object(q.a)()),Kt=Object(h.useRef)(!1),qt=Object(h.useRef)(),Yt=Object(h.useRef)(),Xt=Object(h.useRef)(),$t=Object(h.useRef)(),Zt=Object(h.useRef)(),Qt=function(){var t=Object(o.a)(u.a.mark((function t(){var e,r;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(K.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Vt.current}});case 2:null!=(r=t.sent)&&null!==(e=r.attachments)&&void 0!==e&&e.length&&(console.log("cm:",mt,Yt),r.attachments.map((function(t){t.content_type.indexOf("image")>-1?mt.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):t.content_type.indexOf("video")>-1?mt.replaceSelection('')):t.content_type.indexOf("pdf")>-1?mt.replaceSelection('
        ').concat(t.name,"")):mt.replaceSelection("[".concat(t.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")"))})));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();Object(h.useEffect)((function(){St(ft),null==mt||mt.setValue(ft)}),[ft]),Object(h.useEffect)((function(){null==st||st(At)}),[At]),Object(h.useEffect)((function(){if(Yt.current){var t=p.a.fromTextArea(Yt.current,{mode:I,lineNumbers:!E,lineWrapping:!0,value:r,autoCloseTags:!0,autoCloseBrackets:!0});function e(e,r){if(!ct){var i=r.clipboardData;if(i){var n=i.types.toString(),o=i.items;if("Files"===n||i.types.indexOf("Files")>-1){if(r.preventDefault(),"stex"==I)return;try{var a,l=o[1];"file"===(null===(a=o[0])||void 0===a?void 0:a.kind)&&(l=o[0]);var c=l.getAsFile(),u=c.name.split(".").pop();B(c,(function(e){var r,i,n;e.id?(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("video"))>-1?t.replaceSelection('')):(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("pdf"))>-1?t.replaceSelection('').concat(c.name,"")):J.includes(u)?t.replaceSelection('').concat(c.name,"")):t.replaceSelection("[".concat(c.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(r){s.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}r.preventDefault()}return L&&t.focus(),t.on("paste",e),t.on("dragleave",(function(t,e){Xt.current.classList.remove("mouse-hover-md")})),t.on("dragover",(function(t,e){Xt.current.classList.add("mouse-hover-md")})),t.on("drop",(function(e,r){var i;if(Xt.current.classList.add("mouse-hover-md"),(i=r.dataTransfer.files).length>0){r.preventDefault(),r.stopPropagation();for(var n=function(e){var r=i[e],n=r.name.split(".").pop();B(r,(function(e){var i,s,o;e.id?(null==r||null===(i=r.type)||void 0===i?void 0:i.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==r||null===(s=r.type)||void 0===s?void 0:s.indexOf("video"))>-1?t.replaceSelection('')):(null==r||null===(o=r.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?t.replaceSelection('').concat(r.name,"")):J.includes(n)?t.replaceSelection('').concat(r.name,"")):t.replaceSelection("[".concat(r.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))},s=0;s0||i.target.offsetWidth>0)&&(Jt(),mt.setSize("100%","100%"),mt.refresh())}}catch(t){r.e(t)}finally{r.f()}}));return t.observe(Yt.current.parentElement),t}();return function(){t.unobserve(Yt.current.parentElement)}}}),[mt,Jt]),Object(h.useEffect)((function(){if(mt){for(var t=[],e=function(){var e=i[r],n=(s=Object(a.a)(e,2))[0],o=s[1],c=Object(l.a)({},n,(function(){te(o)}));t.push(c),mt.addKeyMap(c)},r=0,i=Object.entries(tt);r0){var t=(new Date).getTime(),e=window.sessionStorage.getItem(P);t>=Nt+1e4&&(!e||e!==xt)&&(window.sessionStorage.setItem(P,xt),Wt(!0))}}),1e4),Object(h.useEffect)((function(){Et(A)}),[mt,A]),Object(h.useEffect)((function(){mt&&L&&mt.focus()}),[mt,L]),Object(h.useEffect)((function(){if(kt&&mt){var t=mt.getScrollerElement();function e(t){var e=t.target;if(Zt.current){var r=e.scrollTop/e.scrollHeight;Zt.current.scrollTop=Zt.current.scrollHeight*r}}return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[mt,kt]),Object(h.useEffect)((function(){if(mt&&nt){function t(t,e){nt(t,e)}return mt.on("beforeChange",t),function(){mt.off("beforeChange",t)}}}),[mt,nt]),Object(h.useEffect)((function(){if(mt&&it){function t(){it(mt.getValue())}return mt.on("blur",t),function(){mt.off("blur",t)}}}),[mt,it]),Object(h.useEffect)((function(){if(mt){function t(t){var e=t.getValue();St(e),Ft((new Date).getTime()),t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(e)}return mt.on("change",t),function(){mt.off("change",t)}}}),[mt,c]),Object(h.useEffect)((function(){mt&&(null==r?(mt.setValue(""),St("")):r!==mt.getValue()&&(mt.setValue(r),St(r),mt.setCursor(mt.lineCount(),0)))}),[mt,r]);var te=Object(h.useCallback)((function(t){var e=mt.getCursor(),r=mt.getSelection(),i=r.split("\n");switch(t){case"bold":return mt.replaceSelection("**"+r+"**"),""===r&&mt.setCursor(e.line,e.ch+2),mt.focus();case"italic":return mt.replaceSelection("*"+r+"*"),""===r&&mt.setCursor(e.line,e.ch+1),mt.focus();case"code":return mt.replaceSelection("`"+r+"`"),""===r&&mt.setCursor(e.line,e.ch+1),mt.focus();case"inline-latex":return mt.replaceSelection("`$$"+r+"$$`"),""===r&&mt.setCursor(e.line,e.ch+3),mt.focus();case"latex":return mt.replaceSelection("```latex\n"+r+"\n```"),mt.setCursor(e.line+1,r.length+1),mt.focus();case"line-break":return mt.replaceSelection("
        \n"),mt.focus();case"list-ul":return""===r?mt.replaceSelection("- "+r):mt.replaceSelection(i.map((function(t){return""===t?"":"- ".concat(t)})).join("\n")),mt.focus();case"list-ol":return""===r?mt.replaceSelection("1. "+r):mt.replaceSelection(i.map((function(t,e){return""===t?"":"".concat(e+1,". ").concat(t)})).join("\n")),mt.focus();case"add-null-ch":return""===r&&mt.setCursor(e.line,e.ch+1),mt.replaceSelection("▁"),mt.focus();case"inster-template-1":return""===r&&mt.setCursor(e.line,e.ch),mt.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),mt.focus();case"eraser":return mt.setValue(""),mt.focus();case"trigger-watch":return Et(!kt),mt.focus();case"trigger-full-screen":return Dt(!At),mt.focus();case"link":return void It("link");case"code-block":return void It("code-block");case"upload-image":return void It("upload-image");case"add-table":return void It("add-table");default:throw new Error}}),[mt,kt,At]),ee=Object(h.useCallback)((function(t){switch(It(""),_t){case"link":var e=t.title,r=t.link;return mt.replaceSelection("[".concat(e,"](").concat(r,")")),mt.focus();case"code-block":var i=t.language,n=t.content;return mt.replaceSelection(["```"+i,n,"```"].join("\n")),mt.focus();case"upload-image":var s=t.src,o=t.alt,a=t.name;return s.indexOf("type=image")>-1?mt.replaceSelection("![ ".concat(o||""," ]( ").concat(s,' "').concat(o||"",'" )')):s.indexOf("type=application/pdf")>-1?mt.replaceSelection('').concat(a,"")):mt.replaceSelection('').concat(a,"")),mt.focus();case"add-table":for(var l=t.row,c=t.col,u=t.align,h="\n",d=0;d300&&(i=300),Ht(S+i+"px")}}return t.addEventListener("mousedown",i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",n),function(){t.removeEventListener("mousedown",i),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",n)}}}),[mt,$t]),Object(h.useEffect)((function(){Ht(S)}),[S]);var ne={width:Z(y),height:Z(Ut)};Object(h.useMemo)((function(){if(Nt){var t=new Date(Nt),e=t.getHours(),r=t.getMinutes(),i=t.getSeconds();return r=r<10?"0"+r:r,i=i<10?"0"+i:i,"".concat(e=e<10?"0"+e:e,":").concat(r,":").concat(i)}return 0}),[Nt]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Xt},d.a.createElement("div",{className:"markdown-editor-container ".concat(at," ").concat(kt?"on-preview":""," ").concat(E?"mini":""," ").concat(At?"full-screen":""),style:ne},d.a.createElement(w,{insertTemp:O,watch:kt,fullScreen:At,showNullButton:z,onActionCallback:te,hidetoolBar:Y,uuid:Vt.current,setOpenPhones:function(){Kt.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:Yt,placeholder:ht})),kt?d.a.createElement("div",{ref:Zt,className:"preview-container"},"stex"===I&&d.a.createElement(v,{value:xt}),"stex"!==I&&d.a.createElement(m.a,{edit:!0,value:xt,replaces:function(t,e){var r=mt.getValue();r=r.replace(t,e),St(r),null==mt||mt.setValue(r)}})):null))),j?d.a.createElement("a",{ref:$t,className:"editor-resize"}):null,d.a.createElement(k.a,null,et[_t]?d.a.createElement(i.a,{centered:!0,title:et[_t],visible:!0,onCancel:ie,footer:null},re):null))}},SJMd: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/uuid/dist/esm-browser/v4.js */function(t,e,i){"use strict";i("2qtc");var r=i("kLXV"),n=i("rAM+"),s=(i("miYZ"),i("tsqr")),o=i("9og8"),a=i("tJVT"),l=i("jrin"),c=i("WmNS"),u=i.n(c),h=i("q1tI"),d=i.n(h),f=i("VrN/"),p=i.n(f),g=i("bdgK"),m=(i("p77/"),i("Bd2K"),i("ELLl"),i("19Vz"),i("lZu9"),i("+NIl"),i("kSUc"),i("9Bee")),v=function(t){var e=t.value,i=void 0===e?"":e,r=(t.className,t.showTextOnly,t.showLines,t.style,Object(h.useMemo)((function(){return""}),[i]));return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},y=i("0Owb"),b=(i("dejd"),i("C+DQ"),i("1vsH")),x=i("m3rI"),S=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function C(t){var e=t.onActionCallback,i=t.title,r=t.icon,n=t.actionName,s=t.className,o=void 0===s?"":s,a=t.children;return d.a.createElement("a",{title:i,className:o,onClick:function(){e(n)}},d.a.createElement("i",{className:"md-iconfont ".concat(r)}),a)}var w=function(t){var e=t.watch,i=t.showNullButton,r=t.onActionCallback,n=t.fullScreen,s=t.insertTemp,o=t.hidetoolBar,a=t.uuid;t.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(b.D)("_educoder_session_login"),"&_educoder_session=").concat(Object(b.D)("_educoder_session"),"&key=").concat(a,"&api=").concat(encodeURIComponent(x.a.PROXY_SERVER)));var l=[].concat(S,[{title:"".concat(e?"关闭实时预览":"开启实时预览"),icon:"".concat(e?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!o&&l.map((function(t,e){return d.a.createElement("li",{key:e},t.actionName?d.a.createElement(C,Object(y.a)({},t,{onActionCallback:r})):d.a.createElement("span",{className:"v-line"}))})),i?d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,s&&d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(s),onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(C,{icon:"".concat(n?"icon-shrink":"icon-enlarge"),title:n?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},k=i("M8RZ"),E=(i("+L6B"),i("2/Rp")),T=(i("y8nQ"),i("Vl3Y")),L=(i("5NDa"),i("5rEg")),A={labelCol:{span:4},wrapperCol:{span:20}},D=function(t){var e=t.callback,i=t.onCancel;return d.a.createElement(T.a,Object(y.a)({},A,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(t){e(t)}}),d.a.createElement(T.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(L.a,null)),d.a.createElement(T.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(L.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:i},"取消")))},R=i("7ahc"),O=i("k1fw"),_=(i("HmJG"),i("BjJ7")),I=T.a.useForm,M={width:280,marginRight:10},P={labelCol:{span:5},wrapperCol:{span:19}},N=function(t){var e=t.callback,i=t.onCancel,r=I(),n=Object(a.a)(r,1)[0],s=Object(h.useRef)();function o(t,e){n.setFieldsValue({src:"/api/attachments/".concat(t.id,"?type=").concat(t.content_type),type:e.type})}return d.a.createElement(T.a,Object(y.a)({form:n},P,{className:"upload-image-panel",onFinish:function(t){e(Object(O.a)(Object(O.a)({},t),{},{name:s.current}))}}),d.a.createElement(T.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(T.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(L.a,{style:M})),d.a.createElement(F,{onFileChange:function(t){var e=t.target.files[0];s.current=e.name,B(e,o)}}))),d.a.createElement(T.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(L.a,{style:{width:264}})),d.a.createElement(T.a.Item,{style:{textAlign:"right"}},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:i},"取消")))};function F(t){var e=t.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:e}))}function B(t,e){if(!t)throw new String("没有文件");var i=new FormData;i.append("editormd-image-file",t),i.append("file_param_name","editormd-image-file"),i.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(i){e(JSON.parse(i.target.responseText),t)}),!1),r.addEventListener("error",(function(t){console.error(t)}),!1),r.open("POST","".concat(_.a,"/api/attachments.json")),r.send(i)}i("giR+");var j,U,H=i("fyUT"),G=(i("7Kak"),i("9yH6")),z=G.a.Group,W={margin:"0 8px"},V=function(t){var e=t.callback,i=t.onCancel;return d.a.createElement(T.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(t){e(t)}},d.a.createElement("div",{className:"flex-container"},d.a.createElement("span",{style:W},"单元格数:"),d.a.createElement("span",{style:W},"行数"),d.a.createElement(T.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(H.a,null)),d.a.createElement("span",{style:W},"列数"),d.a.createElement(T.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(H.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:W},"对齐方式:"),d.a.createElement(T.a.Item,{name:"align"},d.a.createElement(z,null,d.a.createElement(G.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(G.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(G.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(G.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(E.a,{type:"ghost",onClick:i},"取消")))},K=i("ErOA"),q=i("7Cbv"),Y="------------",X={default:Y,left:":".concat(Y),center:":".concat(Y,":"),right:"".concat(Y,":")},$=i("9VGf");function Z(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}var Q=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",J=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],tt=(j={},Object(l.a)(j,Q+"-B","bold"),Object(l.a)(j,Q+"-I","italic"),j),et=(U={},Object(l.a)(U,"link","添加链接"),Object(l.a)(U,"code-block","添加代码块"),Object(l.a)(U,"upload-image","添加文件"),Object(l.a)(U,"add-table","添加表格"),U);e.a=function(t){var e=t.defaultValue,i=void 0===e?"":e,c=t.onChange,f=t.width,y=void 0===f?"100%":f,b=t.height,S=void 0===b?400:b,C=t.miniToolbar,E=void 0!==C&&C,T=t.isFocus,L=void 0!==T&&T,A=t.watch,O=t.insertTemp,_=t.mode,I=void 0===_?"markdown":_,M=t.id,P=void 0===M?"markdown-editor-id":M,F=t.showResizeBar,j=void 0!==F&&F,U=t.noStorage,H=void 0!==U&&U,G=t.showNullButton,z=void 0!==G&&G,W=t.hidetoolBar,Y=void 0!==W&&W,Q=t.fullScreen,it=void 0!==Q&&Q,rt=t.onBlur,nt=t.onCMBeforeChange,st=t.onFullScreen,ot=t.className,at=void 0===ot?"":ot,lt=t.disablePaste,ct=void 0!==lt&<,ut=t.placeholder,ht=void 0===ut?"":ut,dt=t.values,ft=void 0===dt?"":dt,pt=Object(h.useState)(null),gt=Object(a.a)(pt,2),mt=gt[0],vt=gt[1],yt=Object(h.useState)(i),bt=Object(a.a)(yt,2),xt=bt[0],St=bt[1],Ct=Object(h.useState)(A),wt=Object(a.a)(Ct,2),kt=wt[0],Et=wt[1],Tt=Object(h.useState)(it),Lt=Object(a.a)(Tt,2),At=Lt[0],Dt=Lt[1],Rt=Object(h.useState)(""),Ot=Object(a.a)(Rt,2),_t=Ot[0],It=Ot[1],Mt=Object(h.useState)(0),Pt=Object(a.a)(Mt,2),Nt=Pt[0],Ft=Pt[1],Bt=Object(h.useState)(S),jt=Object(a.a)(Bt,2),Ut=jt[0],Ht=jt[1],Gt=Object(h.useState)(!1),zt=Object(a.a)(Gt,2),Wt=(zt[0],zt[1]),Vt=Object(h.useRef)(Object(q.a)()),Kt=Object(h.useRef)(!1),qt=Object(h.useRef)(),Yt=Object(h.useRef)(),Xt=Object(h.useRef)(),$t=Object(h.useRef)(),Zt=Object(h.useRef)(),Qt=function(){var t=Object(o.a)(u.a.mark((function t(){var e,i;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(K.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Vt.current}});case 2:null!=(i=t.sent)&&null!==(e=i.attachments)&&void 0!==e&&e.length&&(console.log("cm:",mt,Yt),i.attachments.map((function(t){t.content_type.indexOf("image")>-1?mt.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):t.content_type.indexOf("video")>-1?mt.replaceSelection('')):t.content_type.indexOf("pdf")>-1?mt.replaceSelection('').concat(t.name,"")):mt.replaceSelection("[".concat(t.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")"))})));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();Object(h.useEffect)((function(){St(ft),null==mt||mt.setValue(ft)}),[ft]),Object(h.useEffect)((function(){null==st||st(At)}),[At]),Object(h.useEffect)((function(){if(Yt.current){var t=p.a.fromTextArea(Yt.current,{mode:I,lineNumbers:!E,lineWrapping:!0,value:i,autoCloseTags:!0,autoCloseBrackets:!0});function e(e,i){if(!ct){var r=i.clipboardData;if(r){var n=r.types.toString(),o=r.items;if("Files"===n||r.types.indexOf("Files")>-1){if(i.preventDefault(),"stex"==I)return;try{var a,l=o[1];"file"===(null===(a=o[0])||void 0===a?void 0:a.kind)&&(l=o[0]);var c=l.getAsFile(),u=c.name.split(".").pop();B(c,(function(e){var i,r,n;e.id?(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?t.replaceSelection('')):(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("pdf"))>-1?t.replaceSelection('').concat(c.name,"")):J.includes(u)?t.replaceSelection('').concat(c.name,"")):t.replaceSelection("[".concat(c.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(i){s.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}i.preventDefault()}return L&&t.focus(),t.on("paste",e),t.on("dragleave",(function(t,e){Xt.current.classList.remove("mouse-hover-md")})),t.on("dragover",(function(t,e){Xt.current.classList.add("mouse-hover-md")})),t.on("drop",(function(e,i){var r;if(Xt.current.classList.add("mouse-hover-md"),(r=i.dataTransfer.files).length>0){i.preventDefault(),i.stopPropagation();for(var n=function(e){var i=r[e],n=i.name.split(".").pop();B(i,(function(e){var r,s,o;e.id?(null==i||null===(r=i.type)||void 0===r?void 0:r.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==i||null===(s=i.type)||void 0===s?void 0:s.indexOf("video"))>-1?t.replaceSelection('')):(null==i||null===(o=i.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?t.replaceSelection('').concat(i.name,"")):J.includes(n)?t.replaceSelection('').concat(i.name,"")):t.replaceSelection("[".concat(i.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))},s=0;s0||r.target.offsetWidth>0)&&(Jt(),mt.setSize("100%","100%"),mt.refresh())}}catch(t){i.e(t)}finally{i.f()}}));return t.observe(Yt.current.parentElement),t}();return function(){t.unobserve(Yt.current.parentElement)}}}),[mt,Jt]),Object(h.useEffect)((function(){if(mt){for(var t=[],e=function(){var e=r[i],n=(s=Object(a.a)(e,2))[0],o=s[1],c=Object(l.a)({},n,(function(){te(o)}));t.push(c),mt.addKeyMap(c)},i=0,r=Object.entries(tt);i0){var t=(new Date).getTime(),e=window.sessionStorage.getItem(P);t>=Nt+1e4&&(!e||e!==xt)&&(window.sessionStorage.setItem(P,xt),Wt(!0))}}),1e4),Object(h.useEffect)((function(){Et(A)}),[mt,A]),Object(h.useEffect)((function(){mt&&L&&mt.focus()}),[mt,L]),Object(h.useEffect)((function(){if(kt&&mt){var t=mt.getScrollerElement();function e(t){var e=t.target;if(Zt.current){var i=e.scrollTop/e.scrollHeight;Zt.current.scrollTop=Zt.current.scrollHeight*i}}return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[mt,kt]),Object(h.useEffect)((function(){if(mt&&nt){function t(t,e){nt(t,e)}return mt.on("beforeChange",t),function(){mt.off("beforeChange",t)}}}),[mt,nt]),Object(h.useEffect)((function(){if(mt&&rt){function t(){rt(mt.getValue())}return mt.on("blur",t),function(){mt.off("blur",t)}}}),[mt,rt]),Object(h.useEffect)((function(){if(mt){function t(t){var e=t.getValue();St(e),Ft((new Date).getTime()),t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(e)}return mt.on("change",t),function(){mt.off("change",t)}}}),[mt,c]),Object(h.useEffect)((function(){mt&&(null==i?(mt.setValue(""),St("")):i!==mt.getValue()&&(mt.setValue(i),St(i),mt.setCursor(mt.lineCount(),0)))}),[mt,i]);var te=Object(h.useCallback)((function(t){var e=mt.getCursor(),i=mt.getSelection(),r=i.split("\n");switch(t){case"bold":return mt.replaceSelection("**"+i+"**"),""===i&&mt.setCursor(e.line,e.ch+2),mt.focus();case"italic":return mt.replaceSelection("*"+i+"*"),""===i&&mt.setCursor(e.line,e.ch+1),mt.focus();case"code":return mt.replaceSelection("`"+i+"`"),""===i&&mt.setCursor(e.line,e.ch+1),mt.focus();case"inline-latex":return mt.replaceSelection("`$$"+i+"$$`"),""===i&&mt.setCursor(e.line,e.ch+3),mt.focus();case"latex":return mt.replaceSelection("```latex\n"+i+"\n```"),mt.setCursor(e.line+1,i.length+1),mt.focus();case"line-break":return mt.replaceSelection("
        \n"),mt.focus();case"list-ul":return""===i?mt.replaceSelection("- "+i):mt.replaceSelection(r.map((function(t){return""===t?"":"- ".concat(t)})).join("\n")),mt.focus();case"list-ol":return""===i?mt.replaceSelection("1. "+i):mt.replaceSelection(r.map((function(t,e){return""===t?"":"".concat(e+1,". ").concat(t)})).join("\n")),mt.focus();case"add-null-ch":return""===i&&mt.setCursor(e.line,e.ch+1),mt.replaceSelection("▁"),mt.focus();case"inster-template-1":return""===i&&mt.setCursor(e.line,e.ch),mt.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),mt.focus();case"eraser":return mt.setValue(""),mt.focus();case"trigger-watch":return Et(!kt),mt.focus();case"trigger-full-screen":return Dt(!At),mt.focus();case"link":return void It("link");case"code-block":return void It("code-block");case"upload-image":return void It("upload-image");case"add-table":return void It("add-table");default:throw new Error}}),[mt,kt,At]),ee=Object(h.useCallback)((function(t){switch(It(""),_t){case"link":var e=t.title,i=t.link;return mt.replaceSelection("[".concat(e,"](").concat(i,")")),mt.focus();case"code-block":var r=t.language,n=t.content;return mt.replaceSelection(["```"+r,n,"```"].join("\n")),mt.focus();case"upload-image":var s=t.src,o=t.alt,a=t.name;return s.indexOf("type=image")>-1?mt.replaceSelection("![ ".concat(o||""," ]( ").concat(s,' "').concat(o||"",'" )')):s.indexOf("type=application/pdf")>-1?mt.replaceSelection('').concat(a,"")):mt.replaceSelection('').concat(a,"")),mt.focus();case"add-table":for(var l=t.row,c=t.col,u=t.align,h="\n",d=0;d300&&(r=300),Ht(S+r+"px")}}return t.addEventListener("mousedown",r),document.addEventListener("mousemove",s),document.addEventListener("mouseup",n),function(){t.removeEventListener("mousedown",r),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",n)}}}),[mt,$t]),Object(h.useEffect)((function(){Ht(S)}),[S]);var ne={width:Z(y),height:Z(Ut)};Object(h.useMemo)((function(){if(Nt){var t=new Date(Nt),e=t.getHours(),i=t.getMinutes(),r=t.getSeconds();return i=i<10?"0"+i:i,r=r<10?"0"+r:r,"".concat(e=e<10?"0"+e:e,":").concat(i,":").concat(r)}return 0}),[Nt]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Xt},d.a.createElement("div",{className:"markdown-editor-container ".concat(at," ").concat(kt?"on-preview":""," ").concat(E?"mini":""," ").concat(At?"full-screen":""),style:ne},d.a.createElement(w,{insertTemp:O,watch:kt,fullScreen:At,showNullButton:z,onActionCallback:te,hidetoolBar:Y,uuid:Vt.current,setOpenPhones:function(){Kt.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:Yt,placeholder:ht})),kt?d.a.createElement("div",{ref:Zt,className:"preview-container"},"stex"===I&&d.a.createElement(v,{value:xt}),"stex"!==I&&d.a.createElement(m.a,{edit:!0,value:xt,replaces:function(t,e){var i=mt.getValue();i=i.replace(t,e),St(i),null==mt||mt.setValue(i)}})):null))),j?d.a.createElement("a",{ref:$t,className:"editor-resize"}):null,d.a.createElement(k.a,null,et[_t]?d.a.createElement(r.a,{centered:!0,title:et[_t],visible:!0,onCancel:re,footer:null},ie):null))}},SJMd: /*!****************************************************!*\ !*** ./node_modules/code-prettify/src/prettify.js ***! \****************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var t=window,e=["break,continue,do,else,for,if,return,while"],r=[[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],i=[r,"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"],n=[r,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[r,"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"],o=[r,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],a="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",l=[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"],c=[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"],u=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],h=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;function d(t,e,r,i,n){if(r){var s={sourceNode:t,pre:1,langExtension:null,numberLines:null,sourceCode:r,spans:null,basePos:e,decorations:null};i(s),n.push.apply(n,s.decorations)}}var f=/\S/;function p(t){for(var e=void 0,r=t.firstChild;r;r=r.nextSibling){var i=r.nodeType;e=1===i?e?t:r:3===i&&f.test(r.nodeValue)?t:e}return e===t?void 0:e}function g(t,e){var r,i={};!function(){for(var n=t.concat(e),s=[],o={},a=0,l=n.length;a=0;)i[u.charAt(h)]=c;var d=c[1],f=""+d;o.hasOwnProperty(f)||(s.push(d),o[f]=null)}s.push(/[\0-\uffff]/),r=function(t){for(var e=0,r=!1,i=!1,n=0,s=t.length;n122||(u<65||h>90||r.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||r.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}r.sort((function(t,e){return t[0]-e[0]||e[1]-t[1]}));var d=[],f=[];for(s=0;sp[0]&&(p[1]+1>p[0]&&n.push("-"),n.push(l(p[1])))}return n.push("]"),n.join("")}function u(t){for(var i=t.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")),n=i.length,s=[],o=0,a=0;o=2&&"["===d?i[o]=c(h):"\\"!==d&&(i[o]=h.replace(/[a-zA-Z]/g,(function(t){var e=t.charCodeAt(0);return"["+String.fromCharCode(-33&e,32|e)+"]"})))}return i.join("")}var h=[];for(n=0,s=t.length;n=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(m=!1,y="src"),m||(f[v]=y)}var w=u;if(u+=v.length,m){var k=b[1],E=v.indexOf(k),T=E+k.length;b[2]&&(E=(T=v.length-b[2].length)-k.length);var L=y.substring(5);d(l,a+w,v.substring(0,E),s,c),d(l,a+w+E,k,S(L,k),c),d(l,a+w+T,v.substring(T),s,c)}else c.push(a+w,y)}t.decorations=c};return s}function m(t){var e=[],r=[];t.tripleQuotedStrings?e.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):t.multiLineStrings?e.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):e.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),t.verbatimStrings&&r.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var i=t.hashComments;i&&(t.cStyleComments?(i>1?e.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):e.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),r.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):e.push(["com",/^#[^\r\n]*/,null,"#"])),t.cStyleComments&&(r.push(["com",/^\/\/[^\r\n]*/,null]),r.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var n=t.regexLiterals;if(n){var s=n>1?"":"\n\r",o=s?".":"[\\S\\s]",a="/(?=[^/*"+s+"])(?:[^/\\x5B\\x5C"+s+"]|\\x5C"+o+"|\\x5B(?:[^\\x5C\\x5D"+s+"]|\\x5C"+o+")*(?:\\x5D|$))+/";r.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+a+")")])}var l=t.types;l&&r.push(["typ",l]);var c=(""+t.keywords).replace(/^ | $/g,"");c.length&&r.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),e.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return t.regexLiterals&&(u+="(?!s*/)"),r.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i,null],["lit",new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(u),null]),g(e,r)}var v=m({keywords:[i,s,n,o,a,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(t,e,r){for(var i=/(?:^|\s)nocode(?:\s|$)/,n=/\r\n?|\n/,s=t.ownerDocument,o=s.createElement("li");t.firstChild;)o.appendChild(t.firstChild);var a=[o];function l(t){var e=t.nodeType;if(1!=e||i.test(t.className)){if((3==e||4==e)&&r){var o=t.nodeValue,a=o.match(n);if(a){var u=o.substring(0,a.index);t.nodeValue=u;var h=o.substring(a.index+a[0].length);if(h)t.parentNode.insertBefore(s.createTextNode(h),t.nextSibling);c(t),u||t.parentNode.removeChild(t)}}}else if("br"===t.nodeName)c(t),t.parentNode&&t.parentNode.removeChild(t);else for(var d=t.firstChild;d;d=d.nextSibling)l(d)}function c(t){for(;!t.nextSibling;)if(!(t=t.parentNode))return;for(var e,r=function t(e,r){var i=r?e.cloneNode(!1):e,n=e.parentNode;if(n){var s=t(n,1),o=e.nextSibling;s.appendChild(i);for(var a=o;a;a=o)o=a.nextSibling,s.appendChild(a)}return i}(t.nextSibling,0);(e=r.parentNode)&&1===e.nodeType;)r=e;a.push(r)}for(var u=0;u=0;){var n=r[i];b.hasOwnProperty(n)?t.console&&console.warn("cannot override language handler %s",n):b[n]=e}}function S(t,e){return t&&b.hasOwnProperty(t)||(t=/^\s*=x&&(u+=2),a>=S&&(f+=2)}}finally{v&&(v.style.display=y)}}(e)}catch(e){t.console&&console.log(e&&e.stack||e)}}function w(t,e,r){var i=r||!1,n=e||null,s=document.createElement("div");return s.innerHTML="
        "+t+"
        ",s=s.firstChild,i&&y(s,i,!0),C({langExtension:n,numberLines:i,sourceNode:s,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),s.innerHTML}function k(e,r){var i=r||document.body,n=i.ownerDocument||document;function s(t){return i.getElementsByTagName(t)}for(var o=[s("pre"),s("code"),s("xmp")],a=[],l=0;l]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),x(g([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["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"]),x(g([],[["atv",/^[\s\S]+/]]),["uq.val"]),x(m({keywords:i,hashComments:!0,cStyleComments:!0,types:h}),["c","cc","cpp","cxx","cyc","m"]),x(m({keywords:"null,true,false"}),["json"]),x(m({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:h}),["cs"]),x(m({keywords:n,cStyleComments:!0}),["java"]),x(m({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(m({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(m({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(m({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(m({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),x(m({keywords:"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",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),x(g([],[["str",/^[\s\S]+/]]),["regex"]);var E=t.PR={createSimpleLexer:g,registerLangHandler:x,sourceDecorator:m,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:w,prettyPrint:k},T=t.define;"function"==typeof T&&T.amd&&T("google-code-prettify",[],(function(){return E}))}()},"VrN/": +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var t=window,e=["break,continue,do,else,for,if,return,while"],i=[[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"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],r=[i,"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"],n=[i,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[i,"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"],o=[i,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],a="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",l=[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"],c=[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"],u=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],h=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;function d(t,e,i,r,n){if(i){var s={sourceNode:t,pre:1,langExtension:null,numberLines:null,sourceCode:i,spans:null,basePos:e,decorations:null};r(s),n.push.apply(n,s.decorations)}}var f=/\S/;function p(t){for(var e=void 0,i=t.firstChild;i;i=i.nextSibling){var r=i.nodeType;e=1===r?e?t:i:3===r&&f.test(i.nodeValue)?t:e}return e===t?void 0:e}function g(t,e){var i,r={};!function(){for(var n=t.concat(e),s=[],o={},a=0,l=n.length;a=0;)r[u.charAt(h)]=c;var d=c[1],f=""+d;o.hasOwnProperty(f)||(s.push(d),o[f]=null)}s.push(/[\0-\uffff]/),i=function(t){for(var e=0,i=!1,r=!1,n=0,s=t.length;n122||(u<65||h>90||i.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||i.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}i.sort((function(t,e){return t[0]-e[0]||e[1]-t[1]}));var d=[],f=[];for(s=0;sp[0]&&(p[1]+1>p[0]&&n.push("-"),n.push(l(p[1])))}return n.push("]"),n.join("")}function u(t){for(var r=t.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")),n=r.length,s=[],o=0,a=0;o=2&&"["===d?r[o]=c(h):"\\"!==d&&(r[o]=h.replace(/[a-zA-Z]/g,(function(t){var e=t.charCodeAt(0);return"["+String.fromCharCode(-33&e,32|e)+"]"})))}return r.join("")}var h=[];for(n=0,s=t.length;n=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(m=!1,y="src"),m||(f[v]=y)}var w=u;if(u+=v.length,m){var k=b[1],E=v.indexOf(k),T=E+k.length;b[2]&&(E=(T=v.length-b[2].length)-k.length);var L=y.substring(5);d(l,a+w,v.substring(0,E),s,c),d(l,a+w+E,k,S(L,k),c),d(l,a+w+T,v.substring(T),s,c)}else c.push(a+w,y)}t.decorations=c};return s}function m(t){var e=[],i=[];t.tripleQuotedStrings?e.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):t.multiLineStrings?e.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):e.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),t.verbatimStrings&&i.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=t.hashComments;r&&(t.cStyleComments?(r>1?e.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):e.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),i.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):e.push(["com",/^#[^\r\n]*/,null,"#"])),t.cStyleComments&&(i.push(["com",/^\/\/[^\r\n]*/,null]),i.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var n=t.regexLiterals;if(n){var s=n>1?"":"\n\r",o=s?".":"[\\S\\s]",a="/(?=[^/*"+s+"])(?:[^/\\x5B\\x5C"+s+"]|\\x5C"+o+"|\\x5B(?:[^\\x5C\\x5D"+s+"]|\\x5C"+o+")*(?:\\x5D|$))+/";i.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+a+")")])}var l=t.types;l&&i.push(["typ",l]);var c=(""+t.keywords).replace(/^ | $/g,"");c.length&&i.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),e.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return t.regexLiterals&&(u+="(?!s*/)"),i.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i,null],["lit",new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(u),null]),g(e,i)}var v=m({keywords:[r,s,n,o,a,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(t,e,i){for(var r=/(?:^|\s)nocode(?:\s|$)/,n=/\r\n?|\n/,s=t.ownerDocument,o=s.createElement("li");t.firstChild;)o.appendChild(t.firstChild);var a=[o];function l(t){var e=t.nodeType;if(1!=e||r.test(t.className)){if((3==e||4==e)&&i){var o=t.nodeValue,a=o.match(n);if(a){var u=o.substring(0,a.index);t.nodeValue=u;var h=o.substring(a.index+a[0].length);if(h)t.parentNode.insertBefore(s.createTextNode(h),t.nextSibling);c(t),u||t.parentNode.removeChild(t)}}}else if("br"===t.nodeName)c(t),t.parentNode&&t.parentNode.removeChild(t);else for(var d=t.firstChild;d;d=d.nextSibling)l(d)}function c(t){for(;!t.nextSibling;)if(!(t=t.parentNode))return;for(var e,i=function t(e,i){var r=i?e.cloneNode(!1):e,n=e.parentNode;if(n){var s=t(n,1),o=e.nextSibling;s.appendChild(r);for(var a=o;a;a=o)o=a.nextSibling,s.appendChild(a)}return r}(t.nextSibling,0);(e=i.parentNode)&&1===e.nodeType;)i=e;a.push(i)}for(var u=0;u=0;){var n=i[r];b.hasOwnProperty(n)?t.console&&console.warn("cannot override language handler %s",n):b[n]=e}}function S(t,e){return t&&b.hasOwnProperty(t)||(t=/^\s*=x&&(u+=2),a>=S&&(f+=2)}}finally{v&&(v.style.display=y)}}(e)}catch(e){t.console&&console.log(e&&e.stack||e)}}function w(t,e,i){var r=i||!1,n=e||null,s=document.createElement("div");return s.innerHTML="
        "+t+"
        ",s=s.firstChild,r&&y(s,r,!0),C({langExtension:n,numberLines:r,sourceNode:s,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),s.innerHTML}function k(e,i){var r=i||document.body,n=r.ownerDocument||document;function s(t){return r.getElementsByTagName(t)}for(var o=[s("pre"),s("code"),s("xmp")],a=[],l=0;l]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),x(g([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["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"]),x(g([],[["atv",/^[\s\S]+/]]),["uq.val"]),x(m({keywords:r,hashComments:!0,cStyleComments:!0,types:h}),["c","cc","cpp","cxx","cyc","m"]),x(m({keywords:"null,true,false"}),["json"]),x(m({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:h}),["cs"]),x(m({keywords:n,cStyleComments:!0}),["java"]),x(m({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(m({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(m({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(m({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(m({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),x(m({keywords:"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",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),x(g([],[["str",/^[\s\S]+/]]),["regex"]);var E=t.PR={createSimpleLexer:g,registerLangHandler:x,sourceDecorator:m,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:w,prettyPrint:k},T=t.define;"function"==typeof T&&T.amd&&T("google-code-prettify",[],(function(){return E}))}()},"VrN/": /*!***************************************************!*\ !*** ./node_modules/codemirror/lib/codemirror.js ***! \***************************************************/ /*! no static exports found */ /*! all exports used */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,r=/gecko\/\d/i.test(t),i=/MSIE \d/.test(t),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),s=/Edge\/(\d+)/.exec(t),o=i||n||s,a=o&&(i?document.documentMode||6:+(s||n)[1]),l=!s&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!s&&/Chrome\//.test(t),h=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),g=!s&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),m=/Android/.test(t),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=g||/Mac/.test(e),b=/\bCrOS\b/.test(t),x=/win/i.test(e),S=h&&t.match(/Version\/(\d*\.\d*)/);S&&(S=Number(S[1])),S&&S>=15&&(h=!1,l=!0);var C=y&&(c||h&&(null==S||S<12.11)),w=r||o&&a>=9;function k(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var E,T=function(t,e){var r=t.className,i=k(e).exec(r);if(i){var n=r.slice(i.index+i[0].length);t.className=r.slice(0,i.index)+(n?i[1]+n:"")}};function L(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function A(t,e){return L(t).appendChild(e)}function D(t,e,r,i){var n=document.createElement(t);if(r&&(n.className=r),i&&(n.style.cssText=i),"string"==typeof e)n.appendChild(document.createTextNode(e));else if(e)for(var s=0;s=e)return o+(e-s);o+=a-s,o+=r-o%r,s=a+1}}g?P=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(P=function(t){try{t.select()}catch(t){}});var j=function(){this.id=null,this.f=null,this.time=0,this.handler=N(this.onTimeout,this)};function U(t,e){for(var r=0;r=e)return i+Math.min(o,e-n);if(n+=s-i,i=s+1,(n+=r-n%r)>=e)return i}}var K=[""];function q(t){for(;K.length<=t;)K.push(Y(K)+" ");return K[t]}function Y(t){return t[t.length-1]}function X(t,e){for(var r=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Q.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&J(t))||e.test(t):J(t)}function et(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var rt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function it(t){return t.charCodeAt(0)>=768&&rt.test(t)}function nt(t,e,r){for(;(r<0?e>0:er?-1:1;;){if(e==r)return e;var n=(e+r)/2,s=i<0?Math.ceil(n):Math.floor(n);if(s==e)return t(s)?e:r;t(s)?r=s:e=s+i}}var ot=null;function at(t,e,r){var i;ot=null;for(var n=0;ne)return n;s.to==e&&(s.from!=s.to&&"before"==r?i=n:ot=n),s.from==e&&(s.from!=s.to&&"before"!=r?i=n:ot=n)}return null!=i?i:ot}var lt=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,r=/[LRr]/,i=/[Lb1n]/,n=/[1n]/;function s(t,e,r){this.level=t,this.from=e,this.to=r}return function(o,a){var l="ltr"==a?"L":"R";if(0==o.length||"ltr"==a&&!t.test(o))return!1;for(var c,u=o.length,h=[],d=0;d-1&&(i[e]=n.slice(0,s).concat(n.slice(s+1)))}}}function pt(t,e){var r=dt(t,e);if(r.length)for(var i=Array.prototype.slice.call(arguments,2),n=0;n0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){ft(this,t,e)}}function bt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function xt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function St(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ct(t){bt(t),xt(t)}function wt(t){return t.target||t.srcElement}function kt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var Et,Tt,Lt=function(){if(o&&a<9)return!1;var t=D("div");return"draggable"in t||"dragDrop"in t}();function At(t){if(null==Et){var e=D("span","​");A(t,D("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Et=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&a<8))}var r=Et?D("span","​"):D("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Dt(t){if(null!=Tt)return Tt;var e=A(t,document.createTextNode("AخA")),r=E(e,0,1).getBoundingClientRect(),i=E(e,1,2).getBoundingClientRect();return L(t),!(!r||r.left==r.right)&&(Tt=i.right-r.right<3)}var Rt,Ot=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,r=[],i=t.length;e<=i;){var n=t.indexOf("\n",e);-1==n&&(n=t.length);var s=t.slice(e,"\r"==t.charAt(n-1)?n-1:n),o=s.indexOf("\r");-1!=o?(r.push(s.slice(0,o)),e+=o+1):(r.push(s),e=n+1)}return r}:function(t){return t.split(/\r\n?|\n/)},_t=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},It="oncopy"in(Rt=D("div"))||(Rt.setAttribute("oncopy","return;"),"function"==typeof Rt.oncopy),Mt=null,Pt={},Nt={};function Ft(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Pt[t]=e}function Bt(t){if("string"==typeof t&&Nt.hasOwnProperty(t))t=Nt[t];else if(t&&"string"==typeof t.name&&Nt.hasOwnProperty(t.name)){var e=Nt[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Bt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Bt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function jt(t,e){e=Bt(e);var r=Pt[e.name];if(!r)return jt(t,"text/plain");var i=r(t,e);if(Ut.hasOwnProperty(e.name)){var n=Ut[e.name];for(var s in n)n.hasOwnProperty(s)&&(i.hasOwnProperty(s)&&(i["_"+s]=i[s]),i[s]=n[s])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)i[o]=e.modeProps[o];return i}var Ut={};function Ht(t,e){F(e,Ut.hasOwnProperty(t)?Ut[t]:Ut[t]={})}function Gt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var r={};for(var i in e){var n=e[i];n instanceof Array&&(n=n.concat([])),r[i]=n}return r}function zt(t,e){for(var r;t.innerMode&&(r=t.innerMode(e))&&r.mode!=t;)e=r.state,t=r.mode;return r||{mode:t,state:e}}function Wt(t,e,r){return!t.startState||t.startState(e,r)}var Vt=function(t,e,r){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Kt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var r=t;!r.lines;)for(var i=0;;++i){var n=r.children[i],s=n.chunkSize();if(e=t.first&&er?te(r,Kt(t,r).text.length):function(t,e){var r=t.ch;return null==r||r>e?te(t.line,e):r<0?te(t.line,0):t}(e,Kt(t,e.line).text.length)}function le(t,e){for(var r=[],i=0;i=this.string.length},Vt.prototype.sol=function(){return this.pos==this.lineStart},Vt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vt.prototype.next=function(){if(this.pose},Vt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Vt.prototype.skipToEnd=function(){this.pos=this.string.length},Vt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Vt.prototype.backUp=function(t){this.pos-=t},Vt.prototype.column=function(){return this.lastColumnPos0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var n=function(t){return r?t.toLowerCase():t};if(n(this.string.substr(this.pos,t.length))==n(t))return!1!==e&&(this.pos+=t.length),!0},Vt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Vt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Vt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ce=function(t,e){this.state=t,this.lookAhead=e},ue=function(t,e,r,i){this.state=e,this.doc=t,this.line=r,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function he(t,e,r,i){var n=[t.state.modeGen],s={};xe(t,e.text,t.doc.mode,r,(function(t,e){return n.push(t,e)}),s,i);for(var o=r.state,a=function(i){r.baseTokens=n;var a=t.state.overlays[i],l=1,c=0;r.state=!0,xe(t,e.text,a.mode,r,(function(t,e){for(var r=l;ct&&n.splice(l,1,t,n[l+1],i),l+=2,c=Math.min(t,i)}if(e)if(a.opaque)n.splice(r,l-r,t,"overlay "+e),l=r+2;else for(;rt.options.maxHighlightLength&&Gt(t.doc.mode,i.state),s=he(t,e,i);n&&(i.state=n),e.stateAfter=i.save(!n),e.styles=s.styles,s.classes?e.styleClasses=s.classes:e.styleClasses&&(e.styleClasses=null),r===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function fe(t,e,r){var i=t.doc,n=t.display;if(!i.mode.startState)return new ue(i,!0,e);var s=function(t,e,r){for(var i,n,s=t.doc,o=r?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>o;--a){if(a<=s.first)return s.first;var l=Kt(s,a-1),c=l.stateAfter;if(c&&(!r||a+(c instanceof ce?c.lookAhead:0)<=s.modeFrontier))return a;var u=B(l.text,null,t.options.tabSize);(null==n||i>u)&&(n=a-1,i=u)}return n}(t,e,r),o=s>i.first&&Kt(i,s-1).stateAfter,a=o?ue.fromSaved(i,o,s):new ue(i,Wt(i.mode),s);return i.iter(s,e,(function(r){pe(t,r.text,a);var i=a.line;r.stateAfter=i==e-1||i%5==0||i>=n.viewFrom&&ie.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}ue.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ue.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(t,e,r){return e instanceof ce?new ue(t,Gt(t.mode,e.state),r,e.lookAhead):new ue(t,Gt(t.mode,e),r)},ue.prototype.save=function(t){var e=!1!==t?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(e,this.maxLookAhead):e};var ve=function(t,e,r){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=r};function ye(t,e,r,i){var n,s,o=t.doc,a=o.mode,l=Kt(o,(e=ae(o,e)).line),c=fe(t,e.line,r),u=new Vt(l.text,t.options.tabSize,c);for(i&&(s=[]);(i||u.post.options.maxHighlightLength?(a=!1,o&&pe(t,e,i,h.pos),h.pos=e.length,l=null):l=be(me(r,h,i.state,d),s),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;c=e:s.to>e);(i||(i=[])).push(new we(o,s.from,a?null:s.to))}}return i}(r,n,o),l=function(t,e,r){var i;if(t)for(var n=0;n=e:s.to>e)||s.from==e&&"bookmark"==o.type&&(!r||s.marker.insertLeft)){var a=null==s.from||(o.inclusiveLeft?s.from<=e:s.from0&&a)for(var b=0;be)&&(!r||_e(r,s.marker)<0)&&(r=s.marker)}return r}function Fe(t,e,r,i,n){var s=Kt(t,e),o=Ce&&s.markedSpans;if(o)for(var a=0;a=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&n.inclusiveLeft?ee(c.to,r)>=0:ee(c.to,r)>0)||u>=0&&(l.marker.inclusiveRight&&n.inclusiveLeft?ee(c.from,i)<=0:ee(c.from,i)<0)))return!0}}}function Be(t){for(var e;e=Me(t);)t=e.find(-1,!0).line;return t}function je(t,e){var r=Kt(t,e),i=Be(r);return r==i?e:$t(i)}function Ue(t,e){if(e>t.lastLine())return e;var r,i=Kt(t,e);if(!He(t,i))return e;for(;r=Pe(i);)i=r.find(1,!0).line;return $t(i)+1}function He(t,e){var r=Ce&&e.markedSpans;if(r)for(var i=void 0,n=0;ne.maxLineLength&&(e.maxLineLength=r,e.maxLine=t)}))}var Ke=function(t,e,r){this.text=t,De(this,e),this.height=r?r(this):1};function qe(t){t.parent=null,Ae(t)}Ke.prototype.lineNo=function(){return $t(this)},yt(Ke);var Ye={},Xe={};function $e(t,e){if(!t||/^\s*$/.test(t))return null;var r=e.addModeClass?Xe:Ye;return r[t]||(r[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var r=R("span",null,null,l?"padding-right: .1px":null),i={pre:R("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var n=0;n<=(e.rest?e.rest.length:0);n++){var s=n?e.rest[n-1]:e.line,o=void 0;i.pos=0,i.addToken=Je,Dt(t.display.measure)&&(o=ct(s,t.doc.direction))&&(i.addToken=tr(i.addToken,o)),i.map=[],rr(s,i,de(t,s,e!=t.display.externalMeasured&&$t(s))),s.styleClasses&&(s.styleClasses.bgClass&&(i.bgClass=M(s.styleClasses.bgClass,i.bgClass||"")),s.styleClasses.textClass&&(i.textClass=M(s.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(At(t.display.measure))),0==n?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var a=i.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return pt(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=M(i.pre.className,i.textClass||"")),i}function Qe(t){var e=D("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Je(t,e,r,i,n,s,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var r=e,i="",n=0;nc&&h.from<=c);d++);if(h.to>=u)return t(r,i,n,s,o,a,l);t(r,i.slice(0,h.to-c),n,s,null,a,l),s=null,i=i.slice(h.to-c),c=h.to}}}function er(t,e,r,i){var n=!i&&r.widgetNode;n&&t.map.push(t.pos,t.pos+e,n),!i&&t.cm.display.input.needsContentAttribute&&(n||(n=t.content.appendChild(document.createElement("span"))),n.setAttribute("cm-marker",r.id)),n&&(t.cm.display.input.setUneditable(n),t.content.appendChild(n)),t.pos+=e,t.trailingSpace=!1}function rr(t,e,r){var i=t.markedSpans,n=t.text,s=0;if(i)for(var o,a,l,c,u,h,d,f=n.length,p=0,g=1,m="",v=0;;){if(v==p){l=c=u=a="",d=null,h=null,v=1/0;for(var y=[],b=void 0,x=0;xp||C.collapsed&&S.to==p&&S.from==p)){if(null!=S.to&&S.to!=p&&v>S.to&&(v=S.to,c=""),C.className&&(l+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&S.from==p&&(u+=" "+C.startStyle),C.endStyle&&S.to==v&&(b||(b=[])).push(C.endStyle,S.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var w in C.attributes)(d||(d={}))[w]=C.attributes[w];C.collapsed&&(!h||_e(h.marker,C)<0)&&(h=S)}else S.from>p&&v>S.from&&(v=S.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var L=p+m.length;if(!h){var A=L>T?m.slice(0,T-p):m;e.addToken(e,A,o?o+l:l,u,p+A.length==v?c:"",a,d)}if(L>=T){m=m.slice(T-p),p=T;break}p=L,u=""}m=n.slice(s,s=r[g++]),o=$e(r[g++],e.cm.options)}}else for(var D=1;Dr)return{map:t.measure.maps[n],cache:t.measure.caches[n],before:!0}}function Dr(t,e,r,i){return _r(t,Or(t,e),r,i)}function Rr(t,e){if(e>=t.display.viewFrom&&e=r.lineN&&e2&&s.push((l.bottom+c.top)/2-r.top)}}s.push(r.bottom-r.top)}}(t,e.view,e.rect),e.hasHeights=!0),(s=function(t,e,r,i){var n,s=Pr(e.map,r,i),l=s.node,c=s.start,u=s.end,h=s.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&it(e.line.text.charAt(s.coverStart+c));)--c;for(;s.coverStart+u1}(t))return e;var r=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*r,right:e.right*r,top:e.top*i,bottom:e.bottom*i}}(t.display.measure,n))}else{var f;c>0&&(h=i="right"),n=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==i?f.length-1:0]:l.getBoundingClientRect()}if(o&&a<9&&!c&&(!n||!n.left&&!n.right)){var p=l.parentNode.getClientRects()[0];n=p?{left:p.left,right:p.left+ii(t.display),top:p.top,bottom:p.bottom}:Mr}for(var g=n.top-e.rect.top,m=n.bottom-e.rect.top,v=(g+m)/2,y=e.view.measure.heights,b=0;be)&&(n=(s=l-a)-1,e>=l&&(o="right")),null!=n){if(i=t[c+2],a==l&&r==(i.insertLeft?"left":"right")&&(o=r),"left"==r&&0==n)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)i=t[2+(c-=3)],o="left";if("right"==r&&n==l-a)for(;c=0&&(r=t[n]).left==r.right;n--);return r}function Fr(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=i.text.length?(l=i.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return o("before"==c?l-1:l,"before"==c);function u(t,e,r){return o(r?t-1:t,1==a[e].level!=r)}var h=at(a,l,c),d=ot,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function qr(t,e){var r=0;e=ae(t.doc,e),t.options.lineWrapping||(r=ii(t.display)*e.ch);var i=Kt(t.doc,e.line),n=ze(i)+Cr(t.display);return{left:r,right:r,top:n,bottom:n+i.height}}function Yr(t,e,r,i,n){var s=te(t,e,r);return s.xRel=n,i&&(s.outside=i),s}function Xr(t,e,r){var i=t.doc;if((r+=t.display.viewOffset)<0)return Yr(i.first,0,null,-1,-1);var n=Zt(i,r),s=i.first+i.size-1;if(n>s)return Yr(i.first+i.size-1,Kt(i,s).text.length,null,1,1);e<0&&(e=0);for(var o=Kt(i,n);;){var a=Jr(t,o,n,e,r),l=Ne(o,a.ch+(a.xRel>0||a.outside>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==n)return c;o=Kt(i,n=c.line)}}function $r(t,e,r,i){i-=Gr(e);var n=e.text.length,s=st((function(e){return _r(t,r,e-1).bottom<=i}),n,0);return{begin:s,end:n=st((function(e){return _r(t,r,e).top>i}),s,n)}}function Zr(t,e,r,i){return r||(r=Or(t,e)),$r(t,e,r,zr(t,e,_r(t,r,i),"line").top)}function Qr(t,e,r,i){return!(t.bottom<=r)&&(t.top>r||(i?t.left:t.right)>e)}function Jr(t,e,r,i,n){n-=ze(e);var s=Or(t,e),o=Gr(e),a=0,l=e.text.length,c=!0,u=ct(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?ei:ti)(t,e,r,s,u,i,n);a=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,g=null,m=st((function(e){var r=_r(t,s,e);return r.top+=o,r.bottom+=o,!!Qr(r,i,n,!1)&&(r.top<=n&&r.left<=i&&(p=e,g=r),!0)}),a,l),v=!1;if(g){var y=i-g.left=x.bottom?1:0}return Yr(r,m=nt(e.text,m,1),f,v,i-d)}function ti(t,e,r,i,n,s,o){var a=st((function(a){var l=n[a],c=1!=l.level;return Qr(Kr(t,te(r,c?l.to:l.from,c?"before":"after"),"line",e,i),s,o,!0)}),0,n.length-1),l=n[a];if(a>0){var c=1!=l.level,u=Kr(t,te(r,c?l.from:l.to,c?"after":"before"),"line",e,i);Qr(u,s,o,!0)&&u.top>o&&(l=n[a-1])}return l}function ei(t,e,r,i,n,s,o){var a=$r(t,e,i,o),l=a.begin,c=a.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=_r(t,i,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=pg)&&(u=f,h=g)}}return u||(u=n[n.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function ri(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Ir){Ir=D("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Ir.appendChild(document.createTextNode("x")),Ir.appendChild(D("br"));Ir.appendChild(document.createTextNode("x"))}A(t.measure,Ir);var r=Ir.offsetHeight/50;return r>3&&(t.cachedTextHeight=r),L(t.measure),r||1}function ii(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=D("span","xxxxxxxxxx"),r=D("pre",[e],"CodeMirror-line-like");A(t.measure,r);var i=e.getBoundingClientRect(),n=(i.right-i.left)/10;return n>2&&(t.cachedCharWidth=n),n||10}function ni(t){for(var e=t.display,r={},i={},n=e.gutters.clientLeft,s=e.gutters.firstChild,o=0;s;s=s.nextSibling,++o){var a=t.display.gutterSpecs[o].className;r[a]=s.offsetLeft+s.clientLeft+n,i[a]=s.clientWidth}return{fixedPos:si(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:r,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function si(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function oi(t){var e=ri(t.display),r=t.options.lineWrapping,i=r&&Math.max(5,t.display.scroller.clientWidth/ii(t.display)-3);return function(n){if(He(t.doc,n))return 0;var s=0;if(n.widgets)for(var o=0;o0&&(l=Kt(t.doc,c.line).text).length==c.ch){var u=B(l,l.length,t.options.tabSize)-l.length;c=te(c.line,Math.max(0,Math.round((s-kr(t.display).left)/ii(t.display))-u))}return c}function ci(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var r=t.display.view,i=0;ie)&&(n.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=n.viewTo)Ce&&je(t.doc,e)n.viewFrom?di(t):(n.viewFrom+=i,n.viewTo+=i);else if(e<=n.viewFrom&&r>=n.viewTo)di(t);else if(e<=n.viewFrom){var s=fi(t,r,r+i,1);s?(n.view=n.view.slice(s.index),n.viewFrom=s.lineN,n.viewTo+=i):di(t)}else if(r>=n.viewTo){var o=fi(t,e,e,-1);o?(n.view=n.view.slice(0,o.index),n.viewTo=o.lineN):di(t)}else{var a=fi(t,e,e,-1),l=fi(t,r,r+i,1);a&&l?(n.view=n.view.slice(0,a.index).concat(nr(t,a.lineN,l.lineN)).concat(n.view.slice(l.index)),n.viewTo+=i):di(t)}var c=n.externalMeasured;c&&(r=n.lineN&&e=i.viewTo)){var s=i.view[ci(t,e)];if(null!=s.node){var o=s.changes||(s.changes=[]);-1==U(o,r)&&o.push(r)}}}function di(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function fi(t,e,r,i){var n,s=ci(t,e),o=t.display.view;if(!Ce||r==t.doc.first+t.doc.size)return{index:s,lineN:r};for(var a=t.display.viewFrom,l=0;l0){if(s==o.length-1)return null;n=a+o[s].size-e,s++}else n=a-e;e+=n,r+=n}for(;je(t.doc,r)!=r;){if(s==(i<0?0:o.length-1))return null;r+=i*o[s-(i<0?1:0)].size,s+=i}return{index:s,lineN:r}}function pi(t){for(var e=t.display.view,r=0,i=0;i=t.display.viewTo||a.to().linee||e==r&&o.to==e)&&(i(Math.max(o.from,e),Math.min(o.to,r),1==o.level?"rtl":"ltr",s),n=!0)}n||i(e,r,"ltr")}(g,r||0,null==i?d:i,(function(t,e,n,h){var m="ltr"==n,v=f(t,m?"left":"right"),y=f(e-1,m?"right":"left"),b=null==r&&0==t,x=null==i&&e==d,S=0==h,C=!g||h==g.length-1;if(y.top-v.top<=3){var w=(c?x:b)&&C,k=(c?b:x)&&S?a:(m?v:y).left,E=w?l:(m?y:v).right;u(k,v.top,E-k,v.bottom)}else{var T,L,A,D;m?(T=c&&b&&S?a:v.left,L=c?l:p(t,n,"before"),A=c?a:p(e,n,"after"),D=c&&x&&C?l:y.right):(T=c?p(t,n,"before"):a,L=!c&&b&&S?l:v.right,A=!c&&x&&C?a:y.left,D=c?p(e,n,"after"):l),u(T,v.top,L-T,v.bottom),v.bottom0?e.blinker=setInterval((function(){t.hasFocus()||ki(t),e.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Si(t){t.state.focused||(t.display.input.focus(),wi(t))}function Ci(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,ki(t))}),100)}function wi(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(pt(t,"focus",t,e),t.state.focused=!0,I(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),xi(t))}function ki(t,e){t.state.delayingBlurEvent||(t.state.focused&&(pt(t,"blur",t,e),t.state.focused=!1,T(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function Ei(t){for(var e=t.display,r=e.lineDiv.offsetTop,i=0;i.005||d<-.005)&&(Xt(n.line,l),Ti(n.line),n.rest))for(var f=0;ft.display.sizerWidth){var p=Math.ceil(c/ii(t.display));p>t.display.maxLineLength&&(t.display.maxLineLength=p,t.display.maxLine=n.line,t.display.maxLineChanged=!0)}}}}function Ti(t){if(t.widgets)for(var e=0;e=o&&(s=Zt(e,ze(Kt(e,l))-t.wrapper.clientHeight),o=l)}return{from:s,to:Math.max(o,s+1)}}function Ai(t,e){var r=t.display,i=ri(t.display);e.top<0&&(e.top=0);var n=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:r.scroller.scrollTop,s=Lr(t),o={};e.bottom-e.top>s&&(e.bottom=e.top+s);var a=t.doc.height+wr(r),l=e.topa-i;if(e.topn+s){var u=Math.min(e.top,(c?a:e.bottom)-s);u!=n&&(o.scrollTop=u)}var h=t.options.fixedGutter?0:r.gutters.offsetWidth,d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:r.scroller.scrollLeft-h,f=Tr(t)-r.gutters.offsetWidth,p=e.right-e.left>f;return p&&(e.right=e.left+f),e.left<10?o.scrollLeft=0:e.leftf+d-3&&(o.scrollLeft=e.right+(p?0:10)-f),o}function Di(t,e){null!=e&&(_i(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Ri(t){_i(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Oi(t,e,r){null==e&&null==r||_i(t),null!=e&&(t.curOp.scrollLeft=e),null!=r&&(t.curOp.scrollTop=r)}function _i(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Ii(t,qr(t,e.from),qr(t,e.to),e.margin))}function Ii(t,e,r,i){var n=Ai(t,{left:Math.min(e.left,r.left),top:Math.min(e.top,r.top)-i,right:Math.max(e.right,r.right),bottom:Math.max(e.bottom,r.bottom)+i});Oi(t,n.scrollLeft,n.scrollTop)}function Mi(t,e){Math.abs(t.doc.scrollTop-e)<2||(r||ln(t,{top:e}),Pi(t,e,!0),r&&ln(t),rn(t,100))}function Pi(t,e,r){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||r)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Ni(t,e,r,i){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(r?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!i||(t.doc.scrollLeft=e,hn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Fi(t){var e=t.display,r=e.gutters.offsetWidth,i=Math.round(t.doc.height+wr(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?r:0,docHeight:i,scrollHeight:i+Er(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:r}}var Bi=function(t,e,r){this.cm=r;var i=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=n.tabIndex=-1,t(i),t(n),ht(i,"scroll",(function(){i.clientHeight&&e(i.scrollTop,"vertical")})),ht(n,"scroll",(function(){n.clientWidth&&e(n.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Bi.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,r=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var n=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+n)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=r?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var s=t.viewWidth-t.barLeft-(r?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+s)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?i:0,bottom:e?i:0}},Bi.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Bi.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Bi.prototype.zeroWidthHack=function(){var t=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new j,this.disableVert=new j},Bi.prototype.enableZeroWidthBar=function(t,e,r){t.style.pointerEvents="auto",e.set(1e3,(function i(){var n=t.getBoundingClientRect();("vert"==r?document.elementFromPoint(n.right-1,(n.top+n.bottom)/2):document.elementFromPoint((n.right+n.left)/2,n.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}))},Bi.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ji=function(){};function Ui(t,e){e||(e=Fi(t));var r=t.display.barWidth,i=t.display.barHeight;Hi(t,e);for(var n=0;n<4&&r!=t.display.barWidth||i!=t.display.barHeight;n++)r!=t.display.barWidth&&t.options.lineWrapping&&Ei(t),Hi(t,Fi(t)),r=t.display.barWidth,i=t.display.barHeight}function Hi(t,e){var r=t.display,i=r.scrollbars.update(e);r.sizer.style.paddingRight=(r.barWidth=i.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=i.bottom)+"px",r.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=i.bottom+"px",r.scrollbarFiller.style.width=i.right+"px"):r.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=i.bottom+"px",r.gutterFiller.style.width=e.gutterWidth+"px"):r.gutterFiller.style.display=""}ji.prototype.update=function(){return{bottom:0,right:0}},ji.prototype.setScrollLeft=function(){},ji.prototype.setScrollTop=function(){},ji.prototype.clear=function(){};var Gi={native:Bi,null:ji};function zi(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&T(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Gi[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,r){"horizontal"==r?Ni(t,e):Mi(t,e)}),t),t.display.scrollbars.addClass&&I(t.display.wrapper,t.display.scrollbars.addClass)}var Wi=0;function Vi(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wi},e=t.curOp,sr?sr.ops.push(e):e.ownsGroup=sr={ops:[e],delayedCallbacks:[]}}function Ki(t){var e=t.curOp;e&&function(t,e){var r=t.ownsGroup;if(r)try{!function(t){var e=t.delayedCallbacks,r=0;do{for(;r=r.viewTo)||r.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new sn(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Yi(t){t.updatedDisplay=t.mustUpdate&&on(t.cm,t.update)}function Xi(t){var e=t.cm,r=e.display;t.updatedDisplay&&Ei(e),t.barMeasure=Fi(e),r.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Dr(e,r.maxLine,r.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+t.adjustWidthTo+Er(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+t.adjustWidthTo-Tr(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=r.input.prepareSelection())}function $i(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(n=!1),null!=n&&!p){var s=D("div","​",null,"position: absolute;\n top: "+(e.top-r.viewOffset-Cr(t.display))+"px;\n height: "+(e.bottom-e.top+Er(t)+r.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(n),t.display.lineSpace.removeChild(s)}}}(e,function(t,e,r,i){var n;null==i&&(i=0),t.options.lineWrapping||e!=r||(r="before"==(e=e.ch?te(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?te(e.line,e.ch+1,"before"):e);for(var s=0;s<5;s++){var o=!1,a=Kr(t,e),l=r&&r!=e?Kr(t,r):a,c=Ai(t,n={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Mi(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(Ni(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(o=!0)),!o)break}return n}(e,ae(i,t.scrollToPos.from),ae(i,t.scrollToPos.to),t.scrollToPos.margin));var n=t.maybeHiddenMarkers,s=t.maybeUnhiddenMarkers;if(n)for(var o=0;o=t.display.viewTo)){var r=+new Date+t.options.workTime,i=fe(t,e.highlightFrontier),n=[];e.iter(i.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(s){if(i.line>=t.display.viewFrom){var o=s.styles,a=s.text.length>t.options.maxHighlightLength?Gt(e.mode,i.state):null,l=he(t,s,i,!0);a&&(i.state=a),s.styles=l.styles;var c=s.styleClasses,u=l.classes;u?s.styleClasses=u:c&&(s.styleClasses=null);for(var h=!o||o.length!=s.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&dr)return rn(t,t.options.workDelay),!0})),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),n.length&&Qi(t,(function(){for(var e=0;e=r.viewFrom&&e.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==pi(t))return!1;dn(t)&&(di(t),e.dims=ni(t));var n=i.first+i.size,s=Math.max(e.visible.from-t.options.viewportMargin,i.first),o=Math.min(n,e.visible.to+t.options.viewportMargin);r.viewFromo&&r.viewTo-o<20&&(o=Math.min(n,r.viewTo)),Ce&&(s=je(t.doc,s),o=Ue(t.doc,o));var a=s!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=e.wrapperHeight||r.lastWrapWidth!=e.wrapperWidth;!function(t,e,r){var i=t.display;0==i.view.length||e>=i.viewTo||r<=i.viewFrom?(i.view=nr(t,e,r),i.viewFrom=e):(i.viewFrom>e?i.view=nr(t,e,i.viewFrom).concat(i.view):i.viewFromr&&(i.view=i.view.slice(0,ci(t,r)))),i.viewTo=r}(t,s,o),r.viewOffset=ze(Kt(t.doc,r.viewFrom)),t.display.mover.style.top=r.viewOffset+"px";var c=pi(t);if(!a&&0==c&&!e.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=_();if(!e||!O(t.display.lineDiv,e))return null;var r={activeElt:e};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&O(t.display.lineDiv,i.anchorNode)&&(r.anchorNode=i.anchorNode,r.anchorOffset=i.anchorOffset,r.focusNode=i.focusNode,r.focusOffset=i.focusOffset)}return r}(t);return c>4&&(r.lineDiv.style.display="none"),function(t,e,r){var i=t.display,n=t.options.lineNumbers,s=i.lineDiv,o=s.firstChild;function a(e){var r=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),r}for(var c=i.view,u=i.viewFrom,h=0;h-1&&(f=!1),cr(t,d,u,r)),f&&(L(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Jt(t.options,u)))),o=d.node.nextSibling}else{var p=mr(t,d,u,r);s.insertBefore(p,o)}u+=d.size}for(;o;)o=a(o)}(t,r.updateLineNumbers,e.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(t){if(t&&t.activeElt&&t.activeElt!=_()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&O(document.body,t.anchorNode)&&O(document.body,t.focusNode))){var e=window.getSelection(),r=document.createRange();r.setEnd(t.anchorNode,t.anchorOffset),r.collapse(!1),e.removeAllRanges(),e.addRange(r),e.extend(t.focusNode,t.focusOffset)}}(u),L(r.cursorDiv),L(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,a&&(r.lastWrapHeight=e.wrapperHeight,r.lastWrapWidth=e.wrapperWidth,rn(t,400)),r.updateLineNumbers=null,!0}function an(t,e){for(var r=e.viewport,i=!0;;i=!1){if(i&&t.options.lineWrapping&&e.oldDisplayWidth!=Tr(t))i&&(e.visible=Li(t.display,t.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(t.doc.height+wr(t.display)-Lr(t),r.top)}),e.visible=Li(t.display,t.doc,r),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!on(t,e))break;Ei(t);var n=Fi(t);gi(t),Ui(t,n),un(t,n),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function ln(t,e){var r=new sn(t,e);if(on(t,r)){Ei(t),an(t,r);var i=Fi(t);gi(t),Ui(t,i),un(t,i),r.finish()}}function cn(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function un(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Er(t)+"px"}function hn(t){var e=t.display,r=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=si(e)-e.scroller.scrollLeft+t.doc.scrollLeft,n=e.gutters.offsetWidth,s=i+"px",o=0;oa.clientWidth,u=a.scrollHeight>a.clientHeight;if(n&&c||s&&u){if(s&&y&&l)t:for(var d=e.target,f=o.view;d!=a;d=d.parentNode)for(var p=0;p=0&&ee(t,i.to())<=0)return r}return-1};var wn=function(t,e){this.anchor=t,this.head=e};function kn(t,e,r){var i=t&&t.options.selectionsMayTouch,n=e[r];e.sort((function(t,e){return ee(t.from(),e.from())})),r=U(e,n);for(var s=1;s0:l>=0){var c=se(a.from(),o.from()),u=ne(a.to(),o.to()),h=a.empty()?o.from()==o.head:a.from()==a.head;s<=r&&--r,e.splice(--s,2,new wn(h?u:c,h?c:u))}}return new Cn(e,r)}function En(t,e){return new Cn([new wn(t,e||t)],0)}function Tn(t){return t.text?te(t.from.line+t.text.length-1,Y(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Ln(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return Tn(e);var r=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=Tn(e).ch-e.to.ch),te(r,i)}function An(t,e){for(var r=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,v)}ar(t,"change",t,e)}function Mn(t,e,r){!function t(i,n,s){if(i.linked)for(var o=0;oa-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(s=function(t,e){return e?(jn(t.done),Y(t.done)):t.done.length&&!Y(t.done).ranges?Y(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Y(t.done)):void 0}(n,n.lastOp==i)))o=Y(s.changes),0==ee(e.from,e.to)&&0==ee(e.from,o.to)?o.to=Tn(e):s.changes.push(Bn(t,e));else{var l=Y(n.done);for(l&&l.ranges||Gn(t.sel,n.done),s={changes:[Bn(t,e)],generation:n.generation},n.done.push(s);n.done.length>n.undoDepth;)n.done.shift(),n.done[0].ranges||n.done.shift()}n.done.push(r),n.generation=++n.maxGeneration,n.lastModTime=n.lastSelTime=a,n.lastOp=n.lastSelOp=i,n.lastOrigin=n.lastSelOrigin=e.origin,o||pt(t,"historyAdded")}function Hn(t,e,r,i){var n=t.history,s=i&&i.origin;r==n.lastSelOp||s&&n.lastSelOrigin==s&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==s||function(t,e,r,i){var n=e.charAt(0);return"*"==n||"+"==n&&r.ranges.length==i.ranges.length&&r.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,s,Y(n.done),e))?n.done[n.done.length-1]=e:Gn(e,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=s,n.lastSelOp=r,i&&!1!==i.clearRedo&&jn(n.undone)}function Gn(t,e){var r=Y(e);r&&r.ranges&&r.equals(t)||e.push(t)}function zn(t,e,r,i){var n=e["spans_"+t.id],s=0;t.iter(Math.max(t.first,r),Math.min(t.first+t.size,i),(function(r){r.markedSpans&&((n||(n=e["spans_"+t.id]={}))[s]=r.markedSpans),++s}))}function Wn(t){if(!t)return null;for(var e,r=0;r-1&&(Y(a)[h]=c[h],delete c[h])}}}return i}function qn(t,e,r,i){if(i){var n=t.anchor;if(r){var s=ee(e,n)<0;s!=ee(r,n)<0?(n=e,e=r):s!=ee(e,r)<0&&(e=r)}return new wn(n,e)}return new wn(r||e,e)}function Yn(t,e,r,i,n){null==n&&(n=t.cm&&(t.cm.display.shift||t.extend)),Jn(t,new Cn([qn(t.sel.primary(),e,r,n)],0),i)}function Xn(t,e,r){for(var i=[],n=t.cm&&(t.cm.display.shift||t.extend),s=0;s=e.ch:a.to>e.ch))){if(n&&(pt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(s.markedSpans){--o;continue}break}if(!l.atomic)continue;if(r){var h=l.find(i<0?1:-1),d=void 0;if((i<0?u:c)&&(h=os(t,h,-i,h&&h.line==e.line?s:null)),h&&h.line==e.line&&(d=ee(h,r))&&(i<0?d<0:d>0))return ns(t,h,e,i,n)}var f=l.find(i<0?-1:1);return(i<0?c:u)&&(f=os(t,f,i,f.line==e.line?s:null)),f?ns(t,f,e,i,n):null}}return e}function ss(t,e,r,i,n){var s=i||1,o=ns(t,e,r,s,n)||!n&&ns(t,e,r,s,!0)||ns(t,e,r,-s,n)||!n&&ns(t,e,r,-s,!0);return o||(t.cantEdit=!0,te(t.first,0))}function os(t,e,r,i){return r<0&&0==e.ch?e.line>t.first?ae(t,te(e.line-1)):null:r>0&&e.ch==(i||Kt(t,e.line)).text.length?e.line0)){var u=[l,1],h=ee(c.from,a.from),d=ee(c.to,a.to);(h<0||!o.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(d>0||!o.inclusiveRight&&!d)&&u.push({from:a.to,to:c.to}),n.splice.apply(n,u),l+=u.length-3}}return n}(t,e.from,e.to);if(i)for(var n=i.length-1;n>=0;--n)us(t,{from:i[n].from,to:i[n].to,text:n?[""]:e.text,origin:e.origin});else us(t,e)}}function us(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var r=An(t,e);Un(t,e,r,t.cm?t.cm.curOp.id:NaN),fs(t,e,r,Te(t,e));var i=[];Mn(t,(function(t,r){r||-1!=U(i,t.history)||(vs(t.history,e),i.push(t.history)),fs(t,e,null,Te(t,e))}))}}function hs(t,e,r){var i=t.cm&&t.cm.state.suppressEdits;if(!i||r){for(var n,s=t.history,o=t.sel,a="undo"==e?s.done:s.undone,l="undo"==e?s.undone:s.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function ds(t,e){if(0!=e&&(t.first+=e,t.sel=new Cn(X(t.sel.ranges,(function(t){return new wn(te(t.anchor.line+e,t.anchor.ch),te(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){ui(t.cm,t.first,t.first-e,e);for(var r=t.cm.display,i=r.viewFrom;it.lastLine())){if(e.from.lines&&(e={from:e.from,to:te(s,Kt(t,s).text.length),text:[e.text[0]],origin:e.origin}),e.removed=qt(t,e.from,e.to),r||(r=An(t,e)),t.cm?function(t,e,r){var i=t.doc,n=t.display,s=e.from,o=e.to,a=!1,l=s.line;t.options.lineWrapping||(l=$t(Be(Kt(i,s.line))),i.iter(l,o.line+1,(function(t){if(t==n.maxLine)return a=!0,!0}))),i.sel.contains(e.from,e.to)>-1&&mt(t),In(i,e,r,oi(t)),t.options.lineWrapping||(i.iter(l,s.line+e.text.length,(function(t){var e=We(t);e>n.maxLineLength&&(n.maxLine=t,n.maxLineLength=e,n.maxLineChanged=!0,a=!1)})),a&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontierr;i--){var n=Kt(t,i).stateAfter;if(n&&(!(n instanceof ce)||i+n.lookAhead1||!(this.children[0]instanceof bs))){var a=[];this.collapse(a),this.children=[new bs(a)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var o=n.lines.length%25+25,a=o;a10);t.parent.maybeSpill()}},iterN:function(t,e,r){for(var i=0;i0||0==o&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=R("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(Fe(t,e.line,e,r,s)||e.line!=r.line&&Fe(t,r.line,e,r,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ce=!0}s.addToHistory&&Un(t,{from:e,to:r,origin:"markText"},t.sel,NaN);var a,l=e.line,c=t.cm;if(t.iter(l,r.line+1,(function(t){c&&s.collapsed&&!c.options.lineWrapping&&Be(t)==c.display.maxLine&&(a=!0),s.collapsed&&l!=e.line&&Xt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new we(s,l==e.line?e.ch:null,l==r.line?r.ch:null)),++l})),s.collapsed&&t.iter(e.line,r.line+1,(function(e){He(t,e)&&Xt(e,0)})),s.clearOnEnter&&ht(s,"beforeCursorEnter",(function(){return s.clear()})),s.readOnly&&(Se=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++ws,s.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),s.collapsed)ui(c,e.line,r.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var u=e.line;u<=r.line;u++)hi(c,u,"text");s.atomic&&rs(c.doc),ar(c,"markerAdded",c,s)}return s}ks.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Vi(t),vt(this,"clear")){var r=this.find();r&&ar(this,"clear",r.from,r.to)}for(var i=null,n=null,s=0;st.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&ui(t,i,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&rs(t.doc)),t&&ar(t,"markerCleared",t,this,i,n),e&&Ki(t),this.parent&&this.parent.clear()}},ks.prototype.find=function(t,e){var r,i;null==t&&"bookmark"==this.type&&(t=1);for(var n=0;n=0;l--)cs(this,i[l]);a?Qn(this,a):this.cm&&Ri(this.cm)})),undo:en((function(){hs(this,"undo")})),redo:en((function(){hs(this,"redo")})),undoSelection:en((function(){hs(this,"undo",!0)})),redoSelection:en((function(){hs(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,r=0,i=0;i=t.ch)&&e.push(n.marker.parent||n.marker)}return e},findMarks:function(t,e,r){t=ae(this,t),e=ae(this,e);var i=[],n=t.line;return this.iter(t.line,e.line+1,(function(s){var o=s.markedSpans;if(o)for(var a=0;a=l.to||null==l.from&&n!=t.line||null!=l.from&&n==e.line&&l.from>=e.ch||r&&!r(l.marker)||i.push(l.marker.parent||l.marker)}++n})),i},getAllMarks:function(){var t=[];return this.iter((function(e){var r=e.markedSpans;if(r)for(var i=0;it)return e=t,!0;t-=s,++r})),ae(this,te(r,e))},indexFromPos:function(t){var e=(t=ae(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),ts(e.doc,En(r,r)),d)for(var f=0;f=0;e--)ps(t.doc,"",i[e].from,i[e].to,"+delete");Ri(t)}))}function Zs(t,e,r){var i=nt(t.text,e+r,r);return i<0||i>t.text.length?null:i}function Qs(t,e,r){var i=Zs(t,e.ch,r);return null==i?null:new te(e.line,i,r<0?"after":"before")}function Js(t,e,r,i,n){if(t){"rtl"==e.doc.direction&&(n=-n);var s=ct(r,e.doc.direction);if(s){var o,a=n<0?Y(s):s[0],l=n<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var c=Or(e,r);o=n<0?r.text.length-1:0;var u=_r(e,c,o).top;o=st((function(t){return _r(e,c,t).top==u}),n<0==(1==a.level)?a.from:a.to-1,o),"before"==l&&(o=Zs(r,o,1))}else o=n<0?a.to:a.from;return new te(i,o,l)}}return new te(i,n<0?r.text.length:0,n<0?"before":"after")}Gs.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Gs.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Gs.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Gs.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Gs.default=y?Gs.macDefault:Gs.pcDefault;var to={selectAll:as,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),G)},killLine:function(t){return $s(t,(function(e){if(e.empty()){var r=Kt(t.doc,e.head.line).text.length;return e.head.ch==r&&e.head.line0)n=new te(n.line,n.ch+1),t.replaceRange(s.charAt(n.ch-1)+s.charAt(n.ch-2),te(n.line,n.ch-2),n,"+transpose");else if(n.line>t.doc.first){var o=Kt(t.doc,n.line-1).text;o&&(n=new te(n.line,1),t.replaceRange(s.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),te(n.line-1,o.length-1),n,"+transpose"))}r.push(new wn(n,n))}t.setSelections(r)}))},newlineAndIndent:function(t){return Qi(t,(function(){for(var e=t.listSelections(),r=e.length-1;r>=0;r--)t.replaceRange(t.doc.lineSeparator(),e[r].anchor,e[r].head,"+input");e=t.listSelections();for(var i=0;i-1&&(ee((n=c.ranges[n]).from(),e)<0||e.xRel>0)&&(ee(n.to(),e)>0||e.xRel<0)?function(t,e,r,i){var n=t.display,s=!1,c=Ji(t,(function(e){l&&(n.scroller.draggable=!1),t.state.draggingText=!1,ft(n.wrapper.ownerDocument,"mouseup",c),ft(n.wrapper.ownerDocument,"mousemove",u),ft(n.scroller,"dragstart",h),ft(n.scroller,"drop",c),s||(bt(e),i.addNew||Yn(t.doc,r,null,null,i.extend),l&&!d||o&&9==a?setTimeout((function(){n.wrapper.ownerDocument.body.focus({preventScroll:!0}),n.input.focus()}),20):n.input.focus())})),u=function(t){s=s||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return s=!0};l&&(n.scroller.draggable=!0),t.state.draggingText=c,c.copy=!i.moveOnDrag,n.scroller.dragDrop&&n.scroller.dragDrop(),ht(n.wrapper.ownerDocument,"mouseup",c),ht(n.wrapper.ownerDocument,"mousemove",u),ht(n.scroller,"dragstart",h),ht(n.scroller,"drop",c),Ci(t),setTimeout((function(){return n.input.focus()}),20)}(t,i,e,s):function(t,e,r,i){var n=t.display,s=t.doc;bt(e);var o,a,l=s.sel,c=l.ranges;if(i.addNew&&!i.extend?(a=s.sel.contains(r),o=a>-1?c[a]:new wn(r,r)):(o=s.sel.primary(),a=s.sel.primIndex),"rectangle"==i.unit)i.addNew||(o=new wn(r,r)),r=li(t,e,!0,!0),a=-1;else{var u=vo(t,r,i.unit);o=i.extend?qn(o,u.anchor,u.head,i.extend):u}i.addNew?-1==a?(a=c.length,Jn(s,kn(t,c.concat([o]),a),{scroll:!1,origin:"*mouse"})):c.length>1&&c[a].empty()&&"char"==i.unit&&!i.extend?(Jn(s,kn(t,c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),l=s.sel):$n(s,a,o,z):(a=0,Jn(s,new Cn([o],0),z),l=s.sel);var h=r;function d(e){if(0!=ee(h,e))if(h=e,"rectangle"==i.unit){for(var n=[],c=t.options.tabSize,u=B(Kt(s,r.line).text,r.ch,c),d=B(Kt(s,e.line).text,e.ch,c),f=Math.min(u,d),p=Math.max(u,d),g=Math.min(r.line,e.line),m=Math.min(t.lastLine(),Math.max(r.line,e.line));g<=m;g++){var v=Kt(s,g).text,y=V(v,f,c);f==p?n.push(new wn(te(g,y),te(g,y))):v.length>y&&n.push(new wn(te(g,y),te(g,V(v,p,c))))}n.length||n.push(new wn(r,r)),Jn(s,kn(t,l.ranges.slice(0,a).concat(n),a),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=o,S=vo(t,e,i.unit),C=x.anchor;ee(S.anchor,C)>0?(b=S.head,C=se(x.from(),S.anchor)):(b=S.anchor,C=ne(x.to(),S.head));var w=l.ranges.slice(0);w[a]=function(t,e){var r=e.anchor,i=e.head,n=Kt(t.doc,r.line);if(0==ee(r,i)&&r.sticky==i.sticky)return e;var s=ct(n);if(!s)return e;var o=at(s,r.ch,r.sticky),a=s[o];if(a.from!=r.ch&&a.to!=r.ch)return e;var l,c=o+(a.from==r.ch==(1!=a.level)?0:1);if(0==c||c==s.length)return e;if(i.line!=r.line)l=(i.line-r.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=at(s,i.ch,i.sticky),h=u-o||(i.ch-r.ch)*(1==a.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=s[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,g=f?"after":"before";return r.ch==p&&r.sticky==g?e:new wn(new te(r.line,p,g),i)}(t,new wn(ae(s,C),b)),Jn(s,kn(t,w,a),z)}}var f=n.wrapper.getBoundingClientRect(),p=0;function g(e){t.state.selectingText=!1,p=1/0,e&&(bt(e),n.input.focus()),ft(n.wrapper.ownerDocument,"mousemove",m),ft(n.wrapper.ownerDocument,"mouseup",v),s.history.lastSelOrigin=null}var m=Ji(t,(function(e){0!==e.buttons&&kt(e)?function e(r){var o=++p,a=li(t,r,!0,"rectangle"==i.unit);if(a)if(0!=ee(a,h)){t.curOp.focus=_(),d(a);var l=Li(n,s);(a.line>=l.to||a.linef.bottom?20:0;c&&setTimeout(Ji(t,(function(){p==o&&(n.scroller.scrollTop+=c,e(r))})),50)}}(e):g(e)})),v=Ji(t,g);t.state.selectingText=v,ht(n.wrapper.ownerDocument,"mousemove",m),ht(n.wrapper.ownerDocument,"mouseup",v)}(t,i,e,s)}(e,i,s,t):wt(t)==r.scroller&&bt(t):2==n?(i&&Yn(e.doc,i),setTimeout((function(){return r.input.focus()}),20)):3==n&&(w?e.display.input.onContextMenu(t):Ci(e)))}}function vo(t,e,r){if("char"==r)return new wn(e,e);if("word"==r)return t.findWordAt(e);if("line"==r)return new wn(te(e.line,0),ae(t.doc,te(e.line+1,0)));var i=r(t,e);return new wn(i.from,i.to)}function yo(t,e,r,i){var n,s;if(e.touches)n=e.touches[0].clientX,s=e.touches[0].clientY;else try{n=e.clientX,s=e.clientY}catch(t){return!1}if(n>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&bt(e);var o=t.display,a=o.lineDiv.getBoundingClientRect();if(s>a.bottom||!vt(t,r))return St(e);s-=a.top-o.viewOffset;for(var l=0;l=n)return pt(t,r,t,Zt(t.doc,s),t.display.gutterSpecs[l].className,e),St(e)}}function bo(t,e){return yo(t,e,"gutterClick",!0)}function xo(t,e){Sr(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&yo(t,e,"gutterContextMenu",!1)}(t,e)||gt(t,e,"contextmenu")||w||t.display.input.onContextMenu(e)}function So(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),jr(t)}go.prototype.compare=function(t,e,r){return this.time+400>t&&0==ee(e,this.pos)&&r==this.button};var Co={toString:function(){return"CodeMirror.Init"}},wo={},ko={};function Eo(t,e,r){if(!e!=!(r&&r!=Co)){var i=t.display.dragFunctions,n=e?ht:ft;n(t.display.scroller,"dragstart",i.start),n(t.display.scroller,"dragenter",i.enter),n(t.display.scroller,"dragover",i.over),n(t.display.scroller,"dragleave",i.leave),n(t.display.scroller,"drop",i.drop)}}function To(t){t.options.lineWrapping?(I(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(T(t.display.wrapper,"CodeMirror-wrap"),Ve(t)),ai(t),ui(t),jr(t),setTimeout((function(){return Ui(t)}),100)}function Lo(t,e){var r=this;if(!(this instanceof Lo))return new Lo(t,e);this.options=e=e?F(e):{},F(wo,e,!1);var i=e.value;"string"==typeof i?i=new Rs(i,e.mode,null,e.lineSeparator,e.direction):e.mode&&(i.modeOption=e.mode),this.doc=i;var n=new Lo.inputStyles[e.inputStyle](this),s=this.display=new mn(t,i,n,e);for(var c in s.wrapper.CodeMirror=this,So(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),zi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new j,keySeq:null,specialChars:null},e.autofocus&&!v&&s.input.focus(),o&&a<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",Ji(t,mo)),ht(e.scroller,"dblclick",o&&a<11?Ji(t,(function(e){if(!gt(t,e)){var r=li(t,e);if(r&&!bo(t,e)&&!Sr(t.display,e)){bt(e);var i=t.findWordAt(r);Yn(t.doc,i.anchor,i.head)}}})):function(e){return gt(t,e)||bt(e)}),ht(e.scroller,"contextmenu",(function(e){return xo(t,e)})),ht(e.input.getField(),"contextmenu",(function(r){e.scroller.contains(r.target)||xo(t,r)}));var r,i={end:0};function n(){e.activeTouch&&(r=setTimeout((function(){return e.activeTouch=null}),1e3),(i=e.activeTouch).end=+new Date)}function s(t,e){if(null==e.left)return!0;var r=e.left-t.left,i=e.top-t.top;return r*r+i*i>400}ht(e.scroller,"touchstart",(function(n){if(!gt(t,n)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(n)&&!bo(t,n)){e.input.ensurePolled(),clearTimeout(r);var s=+new Date;e.activeTouch={start:s,moved:!1,prev:s-i.end<=300?i:null},1==n.touches.length&&(e.activeTouch.left=n.touches[0].pageX,e.activeTouch.top=n.touches[0].pageY)}})),ht(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ht(e.scroller,"touchend",(function(r){var i=e.activeTouch;if(i&&!Sr(e,r)&&null!=i.left&&!i.moved&&new Date-i.start<300){var o,a=t.coordsChar(e.activeTouch,"page");o=!i.prev||s(i,i.prev)?new wn(a,a):!i.prev.prev||s(i,i.prev.prev)?t.findWordAt(a):new wn(te(a.line,0),ae(t.doc,te(a.line+1,0))),t.setSelection(o.anchor,o.head),t.focus(),bt(r)}n()})),ht(e.scroller,"touchcancel",n),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Mi(t,e.scroller.scrollTop),Ni(t,e.scroller.scrollLeft,!0),pt(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return Sn(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return Sn(t,e)})),ht(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){gt(t,e)||Ct(e)},over:function(e){gt(t,e)||(function(t,e){var r=li(t,e);if(r){var i=document.createDocumentFragment();vi(t,r,i),t.display.dragCursor||(t.display.dragCursor=D("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),A(t.display.dragCursor,i)}}(t,e),Ct(e))},start:function(e){return function(t,e){if(o&&(!t.state.draggingText||+new Date-Os<100))Ct(e);else if(!gt(t,e)&&!Sr(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var r=D("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(r.width=r.height=1,t.display.wrapper.appendChild(r),r._top=r.offsetTop),e.dataTransfer.setDragImage(r,0,0),h&&r.parentNode.removeChild(r)}}(t,e)},drop:Ji(t,_s),leave:function(e){gt(t,e)||Is(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return uo.call(t,e)})),ht(l,"keydown",Ji(t,co)),ht(l,"keypress",Ji(t,ho)),ht(l,"focus",(function(e){return wi(t,e)})),ht(l,"blur",(function(e){return ki(t,e)}))}(this),Ns(),Vi(this),this.curOp.forceUpdate=!0,Pn(this,i),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&wi(r)}),20):ki(this),ko)ko.hasOwnProperty(c)&&ko[c](this,e[c],Co);dn(this),e.finishInit&&e.finishInit(this);for(var u=0;u150)){if(!i)return;r="prev"}}else c=0,r="not";"prev"==r?c=e>s.first?B(Kt(s,e-1).text,null,o):0:"add"==r?c=l+t.options.indentUnit:"subtract"==r?c=l-t.options.indentUnit:"number"==typeof r&&(c=l+r),c=Math.max(0,c);var h="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/o);f;--f)d+=o,h+="\t";if(do,l=Ot(e),c=null;if(a&&i.ranges.length>1)if(Ro&&Ro.text.join("\n")==e){if(i.ranges.length%Ro.text.length==0){c=[];for(var u=0;u=0;d--){var f=i.ranges[d],p=f.from(),g=f.to();f.empty()&&(r&&r>0?p=te(p.line,p.ch-r):t.state.overwrite&&!a?g=te(g.line,Math.min(Kt(s,g.line).text.length,g.ch+Y(l).length)):a&&Ro&&Ro.lineWise&&Ro.text.join("\n")==l.join("\n")&&(p=g=te(p.line,0)));var m={from:p,to:g,text:c?c[d%c.length]:l,origin:n||(a?"paste":t.state.cutIncoming>o?"cut":"+input")};cs(t.doc,m),ar(t,"inputRead",t,m)}e&&!a&&Mo(t,e),Ri(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Io(t,e){var r=t.clipboardData&&t.clipboardData.getData("Text");if(r)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Qi(e,(function(){return _o(e,r,0,null,"paste")})),!0}function Mo(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var r=t.doc.sel,i=r.ranges.length-1;i>=0;i--){var n=r.ranges[i];if(!(n.head.ch>100||i&&r.ranges[i-1].head.line==n.head.line)){var s=t.getModeAt(n.head),o=!1;if(s.electricChars){for(var a=0;a-1){o=Do(t,n.head.line,"smart");break}}else s.electricInput&&s.electricInput.test(Kt(t.doc,n.head.line).text.slice(0,n.head.ch))&&(o=Do(t,n.head.line,"smart"));o&&ar(t,"electricInput",t,n.head.line)}}}function Po(t){for(var e=[],r=[],i=0;i0?0:-1));o=isNaN(u)?null:new te(e.line,Math.max(0,Math.min(a.text.length,e.ch+r*(u>=55296&&u<56320?2:1))),-r)}else o=n?function(t,e,r,i){var n=ct(e,t.doc.direction);if(!n)return Qs(e,r,i);r.ch>=e.text.length?(r.ch=e.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var s=at(n,r.ch,r.sticky),o=n[s];if("ltr"==t.doc.direction&&o.level%2==0&&(i>0?o.to>r.ch:o.from=o.from&&d>=u.begin)){var f=h?"before":"after";return new te(r.line,d,f)}}var p=function(t,e,i){for(var s=function(t,e){return e?new te(r.line,l(t,1),"before"):new te(r.line,t,"after")};t>=0&&t0==(1!=o.level),c=a?i.begin:l(i.end,-1);if(o.from<=c&&c0?u.end:l(u.begin,-1);return null==m||i>0&&m==e.text.length||!(g=p(i>0?0:n.length-1,i,c(m)))?null:g}(t.cm,a,e,r):Qs(a,e,r);if(null==o){if(s||(c=e.line+l)=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(a=Kt(t,c))))return!1;e=Js(n,t.cm,a,e.line,l)}else e=o;return!0}if("char"==i||"codepoint"==i)c();else if("column"==i)c(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(r<0)||c(!f);f=!1){var p=a.text.charAt(e.ch)||"\n",g=tt(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){r<0&&(r=1,c(),e.sticky="after");break}if(g&&(u=g),r>0&&!c(!f))break}var m=ss(t,e,s,o,!0);return re(s,m)&&(m.hitSide=!0),m}function jo(t,e,r,i){var n,s,o=t.doc,a=e.left;if("page"==i){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ri(t.display),3);n=(r>0?e.bottom:e.top)+r*c}else"line"==i&&(n=r>0?e.bottom+3:e.top-3);for(;(s=Xr(t,a,n)).outside;){if(r<0?n<=0:n>=o.height){s.hitSide=!0;break}n+=5*r}return s}var Uo=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new j,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ho(t,e){var r=Rr(t,e.line);if(!r||r.hidden)return null;var i=Kt(t.doc,e.line),n=Ar(r,i,e.line),s=ct(i,t.doc.direction),o="left";s&&(o=at(s,e.ch)%2?"right":"left");var a=Pr(n.map,e.ch,o);return a.offset="right"==a.collapse?a.end:a.start,a}function Go(t,e){return e&&(t.bad=!0),t}function zo(t,e,r){var i;if(e==t.display.lineDiv){if(!(i=t.display.lineDiv.childNodes[r]))return Go(t.clipPos(te(t.display.viewTo-1)),!0);e=null,r=0}else for(i=e;;i=i.parentNode){if(!i||i==t.display.lineDiv)return null;if(i.parentNode&&i.parentNode==t.display.lineDiv)break}for(var n=0;n=e.display.viewTo||s.line=e.display.viewFrom&&Ho(e,n)||{node:l[0].measure.map[2],offset:0},u=s.linei.firstLine()&&(o=te(o.line-1,Kt(i.doc,o.line-1).length)),a.ch==Kt(i.doc,a.line).text.length&&a.linen.viewTo-1)return!1;o.line==n.viewFrom||0==(t=ci(i,o.line))?(e=$t(n.view[0].line),r=n.view[0].node):(e=$t(n.view[t].line),r=n.view[t-1].node.nextSibling);var l,c,u=ci(i,a.line);if(u==n.view.length-1?(l=n.viewTo-1,c=n.lineDiv.lastChild):(l=$t(n.view[u+1].line)-1,c=n.view[u+1].node.previousSibling),!r)return!1;for(var h=i.doc.splitLines(function(t,e,r,i,n){var s="",o=!1,a=t.doc.lineSeparator(),l=!1;function c(){o&&(s+=a,l&&(s+=a),o=l=!1)}function u(t){t&&(c(),s+=t)}function h(e){if(1==e.nodeType){var r=e.getAttribute("cm-text");if(r)return void u(r);var s,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(te(i,0),te(n+1,0),(m=+d,function(t){return t.id==m}));return void(f.length&&(s=f[0].find(0))&&u(qt(t.doc,s.from,s.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&c();for(var g=0;g1&&d.length>1;)if(Y(h)==Y(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),e++}for(var f=0,p=0,g=h[0],m=d[0],v=Math.min(g.length,m.length);fo.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var S=te(e,f),C=te(l,d.length?Y(d).length-p:0);return h.length>1||h[0]||ee(S,C)?(ps(i.doc,h,S,C,"+input"),!0):void 0},Uo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Uo.prototype.reset=function(){this.forceCompositionEnd()},Uo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Uo.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Uo.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Qi(this.cm,(function(){return ui(t.cm)}))},Uo.prototype.setUneditable=function(t){t.contentEditable="false"},Uo.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Ji(this.cm,_o)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Uo.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Uo.prototype.onContextMenu=function(){},Uo.prototype.resetPosition=function(){},Uo.prototype.needsContentAttribute=!0;var Vo=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new j,this.hasSelection=!1,this.composing=null};Vo.prototype.init=function(t){var e=this,r=this,i=this.cm;this.createField(t);var n=this.textarea;function s(t){if(!gt(i,t)){if(i.somethingSelected())Oo({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=Po(i);Oo({lineWise:!0,text:e.text}),"cut"==t.type?i.setSelections(e.ranges,null,G):(r.prevInput="",n.value=e.text.join("\n"),P(n))}"cut"==t.type&&(i.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(n.style.width="0px"),ht(n,"input",(function(){o&&a>=9&&e.hasSelection&&(e.hasSelection=null),r.poll()})),ht(n,"paste",(function(t){gt(i,t)||Io(t,i)||(i.state.pasteIncoming=+new Date,r.fastPoll())})),ht(n,"cut",s),ht(n,"copy",s),ht(t.scroller,"paste",(function(e){if(!Sr(t,e)&&!gt(i,e)){if(!n.dispatchEvent)return i.state.pasteIncoming=+new Date,void r.focus();var s=new Event("paste");s.clipboardData=e.clipboardData,n.dispatchEvent(s)}})),ht(t.lineSpace,"selectstart",(function(e){Sr(t,e)||bt(e)})),ht(n,"compositionstart",(function(){var t=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}})),ht(n,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},Vo.prototype.createField=function(t){this.wrapper=Fo(),this.textarea=this.wrapper.firstChild},Vo.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Vo.prototype.prepareSelection=function(){var t=this.cm,e=t.display,r=t.doc,i=mi(t);if(t.options.moveInputWithCursor){var n=Kr(t,r.sel.primary().head,"div"),s=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,n.top+o.top-s.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,n.left+o.left-s.left))}return i},Vo.prototype.showSelection=function(t){var e=this.cm.display;A(e.cursorDiv,t.cursors),A(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Vo.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var r=e.getSelection();this.textarea.value=r,e.state.focused&&P(this.textarea),o&&a>=9&&(this.hasSelection=r)}else t||(this.prevInput=this.textarea.value="",o&&a>=9&&(this.hasSelection=null))}},Vo.prototype.getField=function(){return this.textarea},Vo.prototype.supportsTouch=function(){return!1},Vo.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||_()!=this.textarea))try{this.textarea.focus()}catch(t){}},Vo.prototype.blur=function(){this.textarea.blur()},Vo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Vo.prototype.receivedFocus=function(){this.slowPoll()},Vo.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Vo.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function r(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,r))}))},Vo.prototype.poll=function(){var t=this,e=this.cm,r=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||_t(r)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var n=r.value;if(n==i&&!e.somethingSelected())return!1;if(o&&a>=9&&this.hasSelection===n||y&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var s=n.charCodeAt(0);if(8203!=s||i||(i="​"),8666==s)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(i.length,n.length);l1e3||n.indexOf("\n")>-1?r.value=t.prevInput="":t.prevInput=n,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Vo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Vo.prototype.onKeyPress=function(){o&&a>=9&&(this.hasSelection=null),this.fastPoll()},Vo.prototype.onContextMenu=function(t){var e=this,r=e.cm,i=r.display,n=e.textarea;e.contextMenuPending&&e.contextMenuPending();var s=li(r,t),c=i.scroller.scrollTop;if(s&&!h){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(s)&&Ji(r,Jn)(r.doc,En(s),G);var u,d=n.style.cssText,f=e.wrapper.style.cssText,p=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",n.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-p.top-5)+"px; left: "+(t.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),i.input.focus(),l&&window.scrollTo(null,u),i.input.reset(),r.somethingSelected()||(n.value=e.prevInput=" "),e.contextMenuPending=v,i.selForContextMenu=r.doc.sel,clearTimeout(i.detectingSelectAll),o&&a>=9&&m(),w){Ct(t);var g=function(){ft(window,"mouseup",g),setTimeout(v,20)};ht(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=n.selectionStart){var t=r.somethingSelected(),s="​"+(t?n.value:"");n.value="⇚",n.value=s,e.prevInput=t?"":"​",n.selectionStart=1,n.selectionEnd=s.length,i.selForContextMenu=r.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,n.style.cssText=d,o&&a<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=n.selectionStart)){(!o||o&&a<9)&&m();var t=0,s=function(){i.selForContextMenu==r.doc.sel&&0==n.selectionStart&&n.selectionEnd>0&&"​"==e.prevInput?Ji(r,as)(r):t++<10?i.detectingSelectAll=setTimeout(s,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(s,200)}}},Vo.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Vo.prototype.setUneditable=function(){},Vo.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function r(r,i,n,s){t.defaults[r]=i,n&&(e[r]=s?function(t,e,r){r!=Co&&n(t,e,r)}:n)}t.defineOption=r,t.Init=Co,r("value","",(function(t,e){return t.setValue(e)}),!0),r("mode",null,(function(t,e){t.doc.modeOption=e,Rn(t)}),!0),r("indentUnit",2,Rn,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(t){On(t),jr(t),ui(t)}),!0),r("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var r=[],i=t.doc.first;t.doc.iter((function(t){for(var n=0;;){var s=t.text.indexOf(e,n);if(-1==s)break;n=s+e.length,r.push(te(i,s))}i++}));for(var n=r.length-1;n>=0;n--)ps(t.doc,e,r[n],te(r[n].line,r[n].ch+e.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,r){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),r!=Co&&t.refresh()})),r("specialCharPlaceholder",Qe,(function(t){return t.refresh()}),!0),r("electricChars",!0),r("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),r("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),r("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),r("rtlMoveVisually",!x),r("wholeLineUpdateBefore",!0),r("theme","default",(function(t){So(t),gn(t)}),!0),r("keyMap","default",(function(t,e,r){var i=Xs(e),n=r!=Co&&Xs(r);n&&n.detach&&n.detach(t,i),i.attach&&i.attach(t,n||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,To,!0),r("gutters",[],(function(t,e){t.display.gutterSpecs=fn(e,t.options.lineNumbers),gn(t)}),!0),r("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?si(t.display)+"px":"0",t.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(t){return Ui(t)}),!0),r("scrollbarStyle","native",(function(t){zi(t),Ui(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=fn(t.options.gutters,e),gn(t)}),!0),r("firstLineNumber",1,gn,!0),r("lineNumberFormatter",(function(t){return t}),gn,!0),r("showCursorWhenSelecting",!1,gi,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(t,e){"nocursor"==e&&(ki(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),r("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),r("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),r("dragDrop",!0,Eo),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,gi,!0),r("singleCursorHeightPerLine",!0,gi,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,On,!0),r("addModeClass",!1,On,!0),r("pollInterval",100),r("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),r("historyEventDelay",1250),r("viewportMargin",10,(function(t){return t.refresh()}),!0),r("maxHighlightLength",1e4,On,!0),r("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),r("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),r("autofocus",null),r("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),r("phrases",null)}(Lo),function(t){var e=t.optionHandlers,r=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,r){var i=this.options,n=i[t];i[t]==r&&"mode"!=t||(i[t]=r,e.hasOwnProperty(t)&&Ji(this,e[t])(this,r,n),pt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Xs(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,r=0;rr&&(Do(this,n.head.line,t,!0),r=n.head.line,i==this.doc.sel.primIndex&&Ri(this));else{var s=n.from(),o=n.to(),a=Math.max(r,s.line);r=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=a;l0&&$n(this.doc,i,new wn(s,c[i].to()),G)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,te(t),e,!0)},getTokenTypeAt:function(t){t=ae(this.doc,t);var e,r=de(this,Kt(this.doc,t.line)),i=0,n=(r.length-1)/2,s=t.ch;if(0==s)e=r[2];else for(;;){var o=i+n>>1;if((o?r[2*o-1]:0)>=s)n=o;else{if(!(r[2*o+1]s&&(t=s,n=!0),i=Kt(this.doc,t)}else i=t;return zr(this,i,{top:0,left:0},e||"page",r||n).top+(n?this.doc.height-ze(i):0)},defaultTextHeight:function(){return ri(this.display)},defaultCharWidth:function(){return ii(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,r,i,n){var s,o,a,l=this.display,c=(t=Kr(this,ae(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==i)c=t.top;else if("above"==i||"near"==i){var h=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>h)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=h&&(c=t.bottom),u+e.offsetWidth>d&&(u=d-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==n?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==n?u=0:"middle"==n&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),r&&(s=this,o={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(a=Ai(s,o)).scrollTop&&Mi(s,a.scrollTop),null!=a.scrollLeft&&Ni(s,a.scrollLeft))},triggerOnKeyDown:tn(co),triggerOnKeyPress:tn(ho),triggerOnKeyUp:uo,triggerOnMouseDown:tn(mo),execCommand:function(t){if(to.hasOwnProperty(t))return to[t].call(null,this)},triggerElectric:tn((function(t){Mo(this,t)})),findPosH:function(t,e,r,i){var n=1;e<0&&(n=-1,e=-e);for(var s=ae(this.doc,t),o=0;o0&&o(e.charAt(r-1));)--r;for(;i.5||this.options.lineWrapping)&&ai(this),pt(this,"refresh",this)})),swapDoc:tn((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Pn(this,t),jr(this),this.display.input.reset(),Oi(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ar(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(t),t.registerHelper=function(e,i,n){r.hasOwnProperty(e)||(r[e]=t[e]={_global:[]}),r[e][i]=n},t.registerGlobalHelper=function(e,i,n,s){t.registerHelper(e,i,s),r[e]._global.push({pred:n,val:s})}}(Lo);var Ko="iter insert remove copy getEditor constructor".split(" ");for(var qo in Rs.prototype)Rs.prototype.hasOwnProperty(qo)&&U(Ko,qo)<0&&(Lo.prototype[qo]=function(t){return function(){return t.apply(this.doc,arguments)}}(Rs.prototype[qo]));return yt(Rs),Lo.inputStyles={textarea:Vo,contenteditable:Uo},Lo.defineMode=function(t){Lo.defaults.mode||"null"==t||(Lo.defaults.mode=t),Ft.apply(this,arguments)},Lo.defineMIME=function(t,e){Nt[t]=e},Lo.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Lo.defineMIME("text/plain","null"),Lo.defineExtension=function(t,e){Lo.prototype[t]=e},Lo.defineDocExtension=function(t,e){Rs.prototype[t]=e},Lo.fromTextArea=function(t,e){if((e=e?F(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var r=_();e.autofocus=r==t||null!=t.getAttribute("autofocus")&&r==document.body}function i(){t.value=a.getValue()}var n;if(t.form&&(ht(t.form,"submit",i),!e.leaveSubmitMethodAlone)){var s=t.form;n=s.submit;try{var o=s.submit=function(){i(),s.submit=n,s.submit(),s.submit=o}}catch(t){}}e.finishInit=function(r){r.save=i,r.getTextArea=function(){return t},r.toTextArea=function(){r.toTextArea=isNaN,i(),t.parentNode.removeChild(r.getWrapperElement()),t.style.display="",t.form&&(ft(t.form,"submit",i),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=n))}},t.style.display="none";var a=Lo((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return a},function(t){t.off=ft,t.on=ht,t.wheelEventPixels=xn,t.Doc=Rs,t.splitLines=Ot,t.countColumn=B,t.findColumn=V,t.isWordChar=J,t.Pass=H,t.signal=pt,t.Line=Ke,t.changeEnd=Tn,t.scrollbarModel=Gi,t.Pos=te,t.cmpPos=ee,t.modes=Pt,t.mimeModes=Nt,t.resolveMode=Bt,t.getMode=jt,t.modeExtensions=Ut,t.extendMode=Ht,t.copyState=Gt,t.startState=Wt,t.innerMode=zt,t.commands=to,t.keyMap=Gs,t.keyName=Ys,t.isModifierKey=Ks,t.lookupKey=Vs,t.normalizeKeyMap=Ws,t.StringStream=Vt,t.SharedTextMarker=Ts,t.TextMarker=ks,t.LineWidget=Ss,t.e_preventDefault=bt,t.e_stopPropagation=xt,t.e_stop=Ct,t.addClass=I,t.contains=O,t.rmClass=T,t.keyNames=Bs}(Lo),Lo.version="5.58.2",Lo}()},Y1PL: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,i=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),s=/Edge\/(\d+)/.exec(t),o=r||n||s,a=o&&(r?document.documentMode||6:+(s||n)[1]),l=!s&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!s&&/Chrome\//.test(t),h=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),p=/PhantomJS/.test(t),g=!s&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),m=/Android/.test(t),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=g||/Mac/.test(e),b=/\bCrOS\b/.test(t),x=/win/i.test(e),S=h&&t.match(/Version\/(\d*\.\d*)/);S&&(S=Number(S[1])),S&&S>=15&&(h=!1,l=!0);var C=y&&(c||h&&(null==S||S<12.11)),w=i||o&&a>=9;function k(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var E,T=function(t,e){var i=t.className,r=k(e).exec(i);if(r){var n=i.slice(r.index+r[0].length);t.className=i.slice(0,r.index)+(n?r[1]+n:"")}};function L(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function A(t,e){return L(t).appendChild(e)}function D(t,e,i,r){var n=document.createElement(t);if(i&&(n.className=i),r&&(n.style.cssText=r),"string"==typeof e)n.appendChild(document.createTextNode(e));else if(e)for(var s=0;s=e)return o+(e-s);o+=a-s,o+=i-o%i,s=a+1}}g?P=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(P=function(t){try{t.select()}catch(t){}});var j=function(){this.id=null,this.f=null,this.time=0,this.handler=N(this.onTimeout,this)};function U(t,e){for(var i=0;i=e)return r+Math.min(o,e-n);if(n+=s-r,r=s+1,(n+=i-n%i)>=e)return r}}var K=[""];function q(t){for(;K.length<=t;)K.push(Y(K)+" ");return K[t]}function Y(t){return t[t.length-1]}function X(t,e){for(var i=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||Q.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&J(t))||e.test(t):J(t)}function et(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var it=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function rt(t){return t.charCodeAt(0)>=768&&it.test(t)}function nt(t,e,i){for(;(i<0?e>0:ei?-1:1;;){if(e==i)return e;var n=(e+i)/2,s=r<0?Math.ceil(n):Math.floor(n);if(s==e)return t(s)?e:i;t(s)?i=s:e=s+r}}var ot=null;function at(t,e,i){var r;ot=null;for(var n=0;ne)return n;s.to==e&&(s.from!=s.to&&"before"==i?r=n:ot=n),s.from==e&&(s.from!=s.to&&"before"!=i?r=n:ot=n)}return null!=r?r:ot}var lt=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,i=/[LRr]/,r=/[Lb1n]/,n=/[1n]/;function s(t,e,i){this.level=t,this.from=e,this.to=i}return function(o,a){var l="ltr"==a?"L":"R";if(0==o.length||"ltr"==a&&!t.test(o))return!1;for(var c,u=o.length,h=[],d=0;d-1&&(r[e]=n.slice(0,s).concat(n.slice(s+1)))}}}function pt(t,e){var i=dt(t,e);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n0}function yt(t){t.prototype.on=function(t,e){ht(this,t,e)},t.prototype.off=function(t,e){ft(this,t,e)}}function bt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function xt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function St(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ct(t){bt(t),xt(t)}function wt(t){return t.target||t.srcElement}function kt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var Et,Tt,Lt=function(){if(o&&a<9)return!1;var t=D("div");return"draggable"in t||"dragDrop"in t}();function At(t){if(null==Et){var e=D("span","​");A(t,D("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Et=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&a<8))}var i=Et?D("span","​"):D("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Dt(t){if(null!=Tt)return Tt;var e=A(t,document.createTextNode("AخA")),i=E(e,0,1).getBoundingClientRect(),r=E(e,1,2).getBoundingClientRect();return L(t),!(!i||i.left==i.right)&&(Tt=r.right-i.right<3)}var Rt,Ot=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,i=[],r=t.length;e<=r;){var n=t.indexOf("\n",e);-1==n&&(n=t.length);var s=t.slice(e,"\r"==t.charAt(n-1)?n-1:n),o=s.indexOf("\r");-1!=o?(i.push(s.slice(0,o)),e+=o+1):(i.push(s),e=n+1)}return i}:function(t){return t.split(/\r\n?|\n/)},_t=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},It="oncopy"in(Rt=D("div"))||(Rt.setAttribute("oncopy","return;"),"function"==typeof Rt.oncopy),Mt=null,Pt={},Nt={};function Ft(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Pt[t]=e}function Bt(t){if("string"==typeof t&&Nt.hasOwnProperty(t))t=Nt[t];else if(t&&"string"==typeof t.name&&Nt.hasOwnProperty(t.name)){var e=Nt[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Bt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Bt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function jt(t,e){e=Bt(e);var i=Pt[e.name];if(!i)return jt(t,"text/plain");var r=i(t,e);if(Ut.hasOwnProperty(e.name)){var n=Ut[e.name];for(var s in n)n.hasOwnProperty(s)&&(r.hasOwnProperty(s)&&(r["_"+s]=r[s]),r[s]=n[s])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)r[o]=e.modeProps[o];return r}var Ut={};function Ht(t,e){F(e,Ut.hasOwnProperty(t)?Ut[t]:Ut[t]={})}function Gt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var i={};for(var r in e){var n=e[r];n instanceof Array&&(n=n.concat([])),i[r]=n}return i}function zt(t,e){for(var i;t.innerMode&&(i=t.innerMode(e))&&i.mode!=t;)e=i.state,t=i.mode;return i||{mode:t,state:e}}function Wt(t,e,i){return!t.startState||t.startState(e,i)}var Vt=function(t,e,i){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};function Kt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var i=t;!i.lines;)for(var r=0;;++r){var n=i.children[r],s=n.chunkSize();if(e=t.first&&ei?te(i,Kt(t,i).text.length):function(t,e){var i=t.ch;return null==i||i>e?te(t.line,e):i<0?te(t.line,0):t}(e,Kt(t,e.line).text.length)}function le(t,e){for(var i=[],r=0;r=this.string.length},Vt.prototype.sol=function(){return this.pos==this.lineStart},Vt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vt.prototype.next=function(){if(this.pose},Vt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Vt.prototype.skipToEnd=function(){this.pos=this.string.length},Vt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Vt.prototype.backUp=function(t){this.pos-=t},Vt.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var n=function(t){return i?t.toLowerCase():t};if(n(this.string.substr(this.pos,t.length))==n(t))return!1!==e&&(this.pos+=t.length),!0},Vt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Vt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Vt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ce=function(t,e){this.state=t,this.lookAhead=e},ue=function(t,e,i,r){this.state=e,this.doc=t,this.line=i,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function he(t,e,i,r){var n=[t.state.modeGen],s={};xe(t,e.text,t.doc.mode,i,(function(t,e){return n.push(t,e)}),s,r);for(var o=i.state,a=function(r){i.baseTokens=n;var a=t.state.overlays[r],l=1,c=0;i.state=!0,xe(t,e.text,a.mode,i,(function(t,e){for(var i=l;ct&&n.splice(l,1,t,n[l+1],r),l+=2,c=Math.min(t,r)}if(e)if(a.opaque)n.splice(i,l-i,t,"overlay "+e),l=i+2;else for(;it.options.maxHighlightLength&&Gt(t.doc.mode,r.state),s=he(t,e,r);n&&(r.state=n),e.stateAfter=r.save(!n),e.styles=s.styles,s.classes?e.styleClasses=s.classes:e.styleClasses&&(e.styleClasses=null),i===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function fe(t,e,i){var r=t.doc,n=t.display;if(!r.mode.startState)return new ue(r,!0,e);var s=function(t,e,i){for(var r,n,s=t.doc,o=i?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>o;--a){if(a<=s.first)return s.first;var l=Kt(s,a-1),c=l.stateAfter;if(c&&(!i||a+(c instanceof ce?c.lookAhead:0)<=s.modeFrontier))return a;var u=B(l.text,null,t.options.tabSize);(null==n||r>u)&&(n=a-1,r=u)}return n}(t,e,i),o=s>r.first&&Kt(r,s-1).stateAfter,a=o?ue.fromSaved(r,o,s):new ue(r,Wt(r.mode),s);return r.iter(s,e,(function(i){pe(t,i.text,a);var r=a.line;i.stateAfter=r==e-1||r%5==0||r>=n.viewFrom&&re.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}ue.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ue.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ue.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ue.fromSaved=function(t,e,i){return e instanceof ce?new ue(t,Gt(t.mode,e.state),i,e.lookAhead):new ue(t,Gt(t.mode,e),i)},ue.prototype.save=function(t){var e=!1!==t?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ce(e,this.maxLookAhead):e};var ve=function(t,e,i){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=i};function ye(t,e,i,r){var n,s,o=t.doc,a=o.mode,l=Kt(o,(e=ae(o,e)).line),c=fe(t,e.line,i),u=new Vt(l.text,t.options.tabSize,c);for(r&&(s=[]);(r||u.post.options.maxHighlightLength?(a=!1,o&&pe(t,e,r,h.pos),h.pos=e.length,l=null):l=be(me(i,h,r.state,d),s),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;c=e:s.to>e);(r||(r=[])).push(new we(o,s.from,a?null:s.to))}}return r}(i,n,o),l=function(t,e,i){var r;if(t)for(var n=0;n=e:s.to>e)||s.from==e&&"bookmark"==o.type&&(!i||s.marker.insertLeft)){var a=null==s.from||(o.inclusiveLeft?s.from<=e:s.from0&&a)for(var b=0;be)&&(!i||_e(i,s.marker)<0)&&(i=s.marker)}return i}function Fe(t,e,i,r,n){var s=Kt(t,e),o=Ce&&s.markedSpans;if(o)for(var a=0;a=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&n.inclusiveLeft?ee(c.to,i)>=0:ee(c.to,i)>0)||u>=0&&(l.marker.inclusiveRight&&n.inclusiveLeft?ee(c.from,r)<=0:ee(c.from,r)<0)))return!0}}}function Be(t){for(var e;e=Me(t);)t=e.find(-1,!0).line;return t}function je(t,e){var i=Kt(t,e),r=Be(i);return i==r?e:$t(r)}function Ue(t,e){if(e>t.lastLine())return e;var i,r=Kt(t,e);if(!He(t,r))return e;for(;i=Pe(r);)r=i.find(1,!0).line;return $t(r)+1}function He(t,e){var i=Ce&&e.markedSpans;if(i)for(var r=void 0,n=0;ne.maxLineLength&&(e.maxLineLength=i,e.maxLine=t)}))}var Ke=function(t,e,i){this.text=t,De(this,e),this.height=i?i(this):1};function qe(t){t.parent=null,Ae(t)}Ke.prototype.lineNo=function(){return $t(this)},yt(Ke);var Ye={},Xe={};function $e(t,e){if(!t||/^\s*$/.test(t))return null;var i=e.addModeClass?Xe:Ye;return i[t]||(i[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var i=R("span",null,null,l?"padding-right: .1px":null),r={pre:R("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var n=0;n<=(e.rest?e.rest.length:0);n++){var s=n?e.rest[n-1]:e.line,o=void 0;r.pos=0,r.addToken=Je,Dt(t.display.measure)&&(o=ct(s,t.doc.direction))&&(r.addToken=ti(r.addToken,o)),r.map=[],ii(s,r,de(t,s,e!=t.display.externalMeasured&&$t(s))),s.styleClasses&&(s.styleClasses.bgClass&&(r.bgClass=M(s.styleClasses.bgClass,r.bgClass||"")),s.styleClasses.textClass&&(r.textClass=M(s.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(At(t.display.measure))),0==n?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var a=r.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=M(r.pre.className,r.textClass||"")),r}function Qe(t){var e=D("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Je(t,e,i,r,n,s,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var i=e,r="",n=0;nc&&h.from<=c);d++);if(h.to>=u)return t(i,r,n,s,o,a,l);t(i,r.slice(0,h.to-c),n,s,null,a,l),s=null,r=r.slice(h.to-c),c=h.to}}}function ei(t,e,i,r){var n=!r&&i.widgetNode;n&&t.map.push(t.pos,t.pos+e,n),!r&&t.cm.display.input.needsContentAttribute&&(n||(n=t.content.appendChild(document.createElement("span"))),n.setAttribute("cm-marker",i.id)),n&&(t.cm.display.input.setUneditable(n),t.content.appendChild(n)),t.pos+=e,t.trailingSpace=!1}function ii(t,e,i){var r=t.markedSpans,n=t.text,s=0;if(r)for(var o,a,l,c,u,h,d,f=n.length,p=0,g=1,m="",v=0;;){if(v==p){l=c=u=a="",d=null,h=null,v=1/0;for(var y=[],b=void 0,x=0;xp||C.collapsed&&S.to==p&&S.from==p)){if(null!=S.to&&S.to!=p&&v>S.to&&(v=S.to,c=""),C.className&&(l+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&S.from==p&&(u+=" "+C.startStyle),C.endStyle&&S.to==v&&(b||(b=[])).push(C.endStyle,S.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var w in C.attributes)(d||(d={}))[w]=C.attributes[w];C.collapsed&&(!h||_e(h.marker,C)<0)&&(h=S)}else S.from>p&&v>S.from&&(v=S.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var L=p+m.length;if(!h){var A=L>T?m.slice(0,T-p):m;e.addToken(e,A,o?o+l:l,u,p+A.length==v?c:"",a,d)}if(L>=T){m=m.slice(T-p),p=T;break}p=L,u=""}m=n.slice(s,s=i[g++]),o=$e(i[g++],e.cm.options)}}else for(var D=1;Di)return{map:t.measure.maps[n],cache:t.measure.caches[n],before:!0}}function Di(t,e,i,r){return _i(t,Oi(t,e),i,r)}function Ri(t,e){if(e>=t.display.viewFrom&&e=i.lineN&&e2&&s.push((l.bottom+c.top)/2-i.top)}}s.push(i.bottom-i.top)}}(t,e.view,e.rect),e.hasHeights=!0),(s=function(t,e,i,r){var n,s=Pi(e.map,i,r),l=s.node,c=s.start,u=s.end,h=s.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&rt(e.line.text.charAt(s.coverStart+c));)--c;for(;s.coverStart+u1}(t))return e;var i=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*i,right:e.right*i,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,n))}else{var f;c>0&&(h=r="right"),n=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(o&&a<9&&!c&&(!n||!n.left&&!n.right)){var p=l.parentNode.getClientRects()[0];n=p?{left:p.left,right:p.left+rr(t.display),top:p.top,bottom:p.bottom}:Mi}for(var g=n.top-e.rect.top,m=n.bottom-e.rect.top,v=(g+m)/2,y=e.view.measure.heights,b=0;be)&&(n=(s=l-a)-1,e>=l&&(o="right")),null!=n){if(r=t[c+2],a==l&&i==(r.insertLeft?"left":"right")&&(o=i),"left"==i&&0==n)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],o="left";if("right"==i&&n==l-a)for(;c=0&&(i=t[n]).left==i.right;n--);return i}function Fi(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return o("before"==c?l-1:l,"before"==c);function u(t,e,i){return o(i?t-1:t,1==a[e].level!=i)}var h=at(a,l,c),d=ot,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function qi(t,e){var i=0;e=ae(t.doc,e),t.options.lineWrapping||(i=rr(t.display)*e.ch);var r=Kt(t.doc,e.line),n=ze(r)+Ci(t.display);return{left:i,right:i,top:n,bottom:n+r.height}}function Yi(t,e,i,r,n){var s=te(t,e,i);return s.xRel=n,r&&(s.outside=r),s}function Xi(t,e,i){var r=t.doc;if((i+=t.display.viewOffset)<0)return Yi(r.first,0,null,-1,-1);var n=Zt(r,i),s=r.first+r.size-1;if(n>s)return Yi(r.first+r.size-1,Kt(r,s).text.length,null,1,1);e<0&&(e=0);for(var o=Kt(r,n);;){var a=Ji(t,o,n,e,i),l=Ne(o,a.ch+(a.xRel>0||a.outside>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==n)return c;o=Kt(r,n=c.line)}}function $i(t,e,i,r){r-=Gi(e);var n=e.text.length,s=st((function(e){return _i(t,i,e-1).bottom<=r}),n,0);return{begin:s,end:n=st((function(e){return _i(t,i,e).top>r}),s,n)}}function Zi(t,e,i,r){return i||(i=Oi(t,e)),$i(t,e,i,zi(t,e,_i(t,i,r),"line").top)}function Qi(t,e,i,r){return!(t.bottom<=i)&&(t.top>i||(r?t.left:t.right)>e)}function Ji(t,e,i,r,n){n-=ze(e);var s=Oi(t,e),o=Gi(e),a=0,l=e.text.length,c=!0,u=ct(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?er:tr)(t,e,i,s,u,r,n);a=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,g=null,m=st((function(e){var i=_i(t,s,e);return i.top+=o,i.bottom+=o,!!Qi(i,r,n,!1)&&(i.top<=n&&i.left<=r&&(p=e,g=i),!0)}),a,l),v=!1;if(g){var y=r-g.left=x.bottom?1:0}return Yi(i,m=nt(e.text,m,1),f,v,r-d)}function tr(t,e,i,r,n,s,o){var a=st((function(a){var l=n[a],c=1!=l.level;return Qi(Ki(t,te(i,c?l.to:l.from,c?"before":"after"),"line",e,r),s,o,!0)}),0,n.length-1),l=n[a];if(a>0){var c=1!=l.level,u=Ki(t,te(i,c?l.from:l.to,c?"after":"before"),"line",e,r);Qi(u,s,o,!0)&&u.top>o&&(l=n[a-1])}return l}function er(t,e,i,r,n,s,o){var a=$i(t,e,r,o),l=a.begin,c=a.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=_i(t,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=pg)&&(u=f,h=g)}}return u||(u=n[n.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function ir(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Ii){Ii=D("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Ii.appendChild(document.createTextNode("x")),Ii.appendChild(D("br"));Ii.appendChild(document.createTextNode("x"))}A(t.measure,Ii);var i=Ii.offsetHeight/50;return i>3&&(t.cachedTextHeight=i),L(t.measure),i||1}function rr(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=D("span","xxxxxxxxxx"),i=D("pre",[e],"CodeMirror-line-like");A(t.measure,i);var r=e.getBoundingClientRect(),n=(r.right-r.left)/10;return n>2&&(t.cachedCharWidth=n),n||10}function nr(t){for(var e=t.display,i={},r={},n=e.gutters.clientLeft,s=e.gutters.firstChild,o=0;s;s=s.nextSibling,++o){var a=t.display.gutterSpecs[o].className;i[a]=s.offsetLeft+s.clientLeft+n,r[a]=s.clientWidth}return{fixedPos:sr(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:i,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function sr(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function or(t){var e=ir(t.display),i=t.options.lineWrapping,r=i&&Math.max(5,t.display.scroller.clientWidth/rr(t.display)-3);return function(n){if(He(t.doc,n))return 0;var s=0;if(n.widgets)for(var o=0;o0&&(l=Kt(t.doc,c.line).text).length==c.ch){var u=B(l,l.length,t.options.tabSize)-l.length;c=te(c.line,Math.max(0,Math.round((s-ki(t.display).left)/rr(t.display))-u))}return c}function cr(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var i=t.display.view,r=0;re)&&(n.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=n.viewTo)Ce&&je(t.doc,e)n.viewFrom?dr(t):(n.viewFrom+=r,n.viewTo+=r);else if(e<=n.viewFrom&&i>=n.viewTo)dr(t);else if(e<=n.viewFrom){var s=fr(t,i,i+r,1);s?(n.view=n.view.slice(s.index),n.viewFrom=s.lineN,n.viewTo+=r):dr(t)}else if(i>=n.viewTo){var o=fr(t,e,e,-1);o?(n.view=n.view.slice(0,o.index),n.viewTo=o.lineN):dr(t)}else{var a=fr(t,e,e,-1),l=fr(t,i,i+r,1);a&&l?(n.view=n.view.slice(0,a.index).concat(ni(t,a.lineN,l.lineN)).concat(n.view.slice(l.index)),n.viewTo+=r):dr(t)}var c=n.externalMeasured;c&&(i=n.lineN&&e=r.viewTo)){var s=r.view[cr(t,e)];if(null!=s.node){var o=s.changes||(s.changes=[]);-1==U(o,i)&&o.push(i)}}}function dr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function fr(t,e,i,r){var n,s=cr(t,e),o=t.display.view;if(!Ce||i==t.doc.first+t.doc.size)return{index:s,lineN:i};for(var a=t.display.viewFrom,l=0;l0){if(s==o.length-1)return null;n=a+o[s].size-e,s++}else n=a-e;e+=n,i+=n}for(;je(t.doc,i)!=i;){if(s==(r<0?0:o.length-1))return null;i+=r*o[s-(r<0?1:0)].size,s+=r}return{index:s,lineN:i}}function pr(t){for(var e=t.display.view,i=0,r=0;r=t.display.viewTo||a.to().linee||e==i&&o.to==e)&&(r(Math.max(o.from,e),Math.min(o.to,i),1==o.level?"rtl":"ltr",s),n=!0)}n||r(e,i,"ltr")}(g,i||0,null==r?d:r,(function(t,e,n,h){var m="ltr"==n,v=f(t,m?"left":"right"),y=f(e-1,m?"right":"left"),b=null==i&&0==t,x=null==r&&e==d,S=0==h,C=!g||h==g.length-1;if(y.top-v.top<=3){var w=(c?x:b)&&C,k=(c?b:x)&&S?a:(m?v:y).left,E=w?l:(m?y:v).right;u(k,v.top,E-k,v.bottom)}else{var T,L,A,D;m?(T=c&&b&&S?a:v.left,L=c?l:p(t,n,"before"),A=c?a:p(e,n,"after"),D=c&&x&&C?l:y.right):(T=c?p(t,n,"before"):a,L=!c&&b&&S?l:v.right,A=!c&&x&&C?a:y.left,D=c?p(e,n,"after"):l),u(T,v.top,L-T,v.bottom),v.bottom0?e.blinker=setInterval((function(){t.hasFocus()||kr(t),e.cursorDiv.style.visibility=(i=!i)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Sr(t){t.state.focused||(t.display.input.focus(),wr(t))}function Cr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,kr(t))}),100)}function wr(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(pt(t,"focus",t,e),t.state.focused=!0,I(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),xr(t))}function kr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(pt(t,"blur",t,e),t.state.focused=!1,T(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function Er(t){for(var e=t.display,i=e.lineDiv.offsetTop,r=0;r.005||d<-.005)&&(Xt(n.line,l),Tr(n.line),n.rest))for(var f=0;ft.display.sizerWidth){var p=Math.ceil(c/rr(t.display));p>t.display.maxLineLength&&(t.display.maxLineLength=p,t.display.maxLine=n.line,t.display.maxLineChanged=!0)}}}}function Tr(t){if(t.widgets)for(var e=0;e=o&&(s=Zt(e,ze(Kt(e,l))-t.wrapper.clientHeight),o=l)}return{from:s,to:Math.max(o,s+1)}}function Ar(t,e){var i=t.display,r=ir(t.display);e.top<0&&(e.top=0);var n=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:i.scroller.scrollTop,s=Li(t),o={};e.bottom-e.top>s&&(e.bottom=e.top+s);var a=t.doc.height+wi(i),l=e.topa-r;if(e.topn+s){var u=Math.min(e.top,(c?a:e.bottom)-s);u!=n&&(o.scrollTop=u)}var h=t.options.fixedGutter?0:i.gutters.offsetWidth,d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:i.scroller.scrollLeft-h,f=Ti(t)-i.gutters.offsetWidth,p=e.right-e.left>f;return p&&(e.right=e.left+f),e.left<10?o.scrollLeft=0:e.leftf+d-3&&(o.scrollLeft=e.right+(p?0:10)-f),o}function Dr(t,e){null!=e&&(_r(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Rr(t){_r(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Or(t,e,i){null==e&&null==i||_r(t),null!=e&&(t.curOp.scrollLeft=e),null!=i&&(t.curOp.scrollTop=i)}function _r(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Ir(t,qi(t,e.from),qi(t,e.to),e.margin))}function Ir(t,e,i,r){var n=Ar(t,{left:Math.min(e.left,i.left),top:Math.min(e.top,i.top)-r,right:Math.max(e.right,i.right),bottom:Math.max(e.bottom,i.bottom)+r});Or(t,n.scrollLeft,n.scrollTop)}function Mr(t,e){Math.abs(t.doc.scrollTop-e)<2||(i||ln(t,{top:e}),Pr(t,e,!0),i&&ln(t),rn(t,100))}function Pr(t,e,i){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||i)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Nr(t,e,i,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(i?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,hn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Fr(t){var e=t.display,i=e.gutters.offsetWidth,r=Math.round(t.doc.height+wi(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?i:0,docHeight:r,scrollHeight:r+Ei(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:i}}var Br=function(t,e,i){this.cm=i;var r=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=n.tabIndex=-1,t(r),t(n),ht(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),ht(n,"scroll",(function(){n.clientWidth&&e(n.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,i=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var n=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+n)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=i?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var s=t.viewWidth-t.barLeft-(i?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+s)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?r:0,bottom:e?r:0}},Br.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var t=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new j,this.disableVert=new j},Br.prototype.enableZeroWidthBar=function(t,e,i){t.style.pointerEvents="auto",e.set(1e3,(function r(){var n=t.getBoundingClientRect();("vert"==i?document.elementFromPoint(n.right-1,(n.top+n.bottom)/2):document.elementFromPoint((n.right+n.left)/2,n.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)}))},Br.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var jr=function(){};function Ur(t,e){e||(e=Fr(t));var i=t.display.barWidth,r=t.display.barHeight;Hr(t,e);for(var n=0;n<4&&i!=t.display.barWidth||r!=t.display.barHeight;n++)i!=t.display.barWidth&&t.options.lineWrapping&&Er(t),Hr(t,Fr(t)),i=t.display.barWidth,r=t.display.barHeight}function Hr(t,e){var i=t.display,r=i.scrollbars.update(e);i.sizer.style.paddingRight=(i.barWidth=r.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=r.bottom)+"px",i.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=r.bottom+"px",i.scrollbarFiller.style.width=r.right+"px"):i.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=r.bottom+"px",i.gutterFiller.style.width=e.gutterWidth+"px"):i.gutterFiller.style.display=""}jr.prototype.update=function(){return{bottom:0,right:0}},jr.prototype.setScrollLeft=function(){},jr.prototype.setScrollTop=function(){},jr.prototype.clear=function(){};var Gr={native:Br,null:jr};function zr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&T(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Gr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ht(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,i){"horizontal"==i?Nr(t,e):Mr(t,e)}),t),t.display.scrollbars.addClass&&I(t.display.wrapper,t.display.scrollbars.addClass)}var Wr=0;function Vr(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wr},e=t.curOp,si?si.ops.push(e):e.ownsGroup=si={ops:[e],delayedCallbacks:[]}}function Kr(t){var e=t.curOp;e&&function(t,e){var i=t.ownsGroup;if(i)try{!function(t){var e=t.delayedCallbacks,i=0;do{for(;i=i.viewTo)||i.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new sn(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Yr(t){t.updatedDisplay=t.mustUpdate&&on(t.cm,t.update)}function Xr(t){var e=t.cm,i=e.display;t.updatedDisplay&&Er(e),t.barMeasure=Fr(e),i.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Di(e,i.maxLine,i.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+t.adjustWidthTo+Ei(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+t.adjustWidthTo-Ti(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=i.input.prepareSelection())}function $r(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(n=!1),null!=n&&!p){var s=D("div","​",null,"position: absolute;\n top: "+(e.top-i.viewOffset-Ci(t.display))+"px;\n height: "+(e.bottom-e.top+Ei(t)+i.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(n),t.display.lineSpace.removeChild(s)}}}(e,function(t,e,i,r){var n;null==r&&(r=0),t.options.lineWrapping||e!=i||(i="before"==(e=e.ch?te(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?te(e.line,e.ch+1,"before"):e);for(var s=0;s<5;s++){var o=!1,a=Ki(t,e),l=i&&i!=e?Ki(t,i):a,c=Ar(t,n={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-r,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+r}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Mr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(Nr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(o=!0)),!o)break}return n}(e,ae(r,t.scrollToPos.from),ae(r,t.scrollToPos.to),t.scrollToPos.margin));var n=t.maybeHiddenMarkers,s=t.maybeUnhiddenMarkers;if(n)for(var o=0;o=t.display.viewTo)){var i=+new Date+t.options.workTime,r=fe(t,e.highlightFrontier),n=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(s){if(r.line>=t.display.viewFrom){var o=s.styles,a=s.text.length>t.options.maxHighlightLength?Gt(e.mode,r.state):null,l=he(t,s,r,!0);a&&(r.state=a),s.styles=l.styles;var c=s.styleClasses,u=l.classes;u?s.styleClasses=u:c&&(s.styleClasses=null);for(var h=!o||o.length!=s.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&di)return rn(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),n.length&&Qr(t,(function(){for(var e=0;e=i.viewFrom&&e.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==pr(t))return!1;dn(t)&&(dr(t),e.dims=nr(t));var n=r.first+r.size,s=Math.max(e.visible.from-t.options.viewportMargin,r.first),o=Math.min(n,e.visible.to+t.options.viewportMargin);i.viewFromo&&i.viewTo-o<20&&(o=Math.min(n,i.viewTo)),Ce&&(s=je(t.doc,s),o=Ue(t.doc,o));var a=s!=i.viewFrom||o!=i.viewTo||i.lastWrapHeight!=e.wrapperHeight||i.lastWrapWidth!=e.wrapperWidth;!function(t,e,i){var r=t.display;0==r.view.length||e>=r.viewTo||i<=r.viewFrom?(r.view=ni(t,e,i),r.viewFrom=e):(r.viewFrom>e?r.view=ni(t,e,r.viewFrom).concat(r.view):r.viewFromi&&(r.view=r.view.slice(0,cr(t,i)))),r.viewTo=i}(t,s,o),i.viewOffset=ze(Kt(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=pr(t);if(!a&&0==c&&!e.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=function(t){if(t.hasFocus())return null;var e=_();if(!e||!O(t.display.lineDiv,e))return null;var i={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&O(t.display.lineDiv,r.anchorNode)&&(i.anchorNode=r.anchorNode,i.anchorOffset=r.anchorOffset,i.focusNode=r.focusNode,i.focusOffset=r.focusOffset)}return i}(t);return c>4&&(i.lineDiv.style.display="none"),function(t,e,i){var r=t.display,n=t.options.lineNumbers,s=r.lineDiv,o=s.firstChild;function a(e){var i=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),i}for(var c=r.view,u=r.viewFrom,h=0;h-1&&(f=!1),ci(t,d,u,i)),f&&(L(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Jt(t.options,u)))),o=d.node.nextSibling}else{var p=mi(t,d,u,i);s.insertBefore(p,o)}u+=d.size}for(;o;)o=a(o)}(t,i.updateLineNumbers,e.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,function(t){if(t&&t.activeElt&&t.activeElt!=_()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&O(document.body,t.anchorNode)&&O(document.body,t.focusNode))){var e=window.getSelection(),i=document.createRange();i.setEnd(t.anchorNode,t.anchorOffset),i.collapse(!1),e.removeAllRanges(),e.addRange(i),e.extend(t.focusNode,t.focusOffset)}}(u),L(i.cursorDiv),L(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,a&&(i.lastWrapHeight=e.wrapperHeight,i.lastWrapWidth=e.wrapperWidth,rn(t,400)),i.updateLineNumbers=null,!0}function an(t,e){for(var i=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Ti(t))r&&(e.visible=Lr(t.display,t.doc,i));else if(i&&null!=i.top&&(i={top:Math.min(t.doc.height+wi(t.display)-Li(t),i.top)}),e.visible=Lr(t.display,t.doc,i),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!on(t,e))break;Er(t);var n=Fr(t);gr(t),Ur(t,n),un(t,n),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function ln(t,e){var i=new sn(t,e);if(on(t,i)){Er(t),an(t,i);var r=Fr(t);gr(t),Ur(t,r),un(t,r),i.finish()}}function cn(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function un(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Ei(t)+"px"}function hn(t){var e=t.display,i=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=sr(e)-e.scroller.scrollLeft+t.doc.scrollLeft,n=e.gutters.offsetWidth,s=r+"px",o=0;oa.clientWidth,u=a.scrollHeight>a.clientHeight;if(n&&c||s&&u){if(s&&y&&l)t:for(var d=e.target,f=o.view;d!=a;d=d.parentNode)for(var p=0;p=0&&ee(t,r.to())<=0)return i}return-1};var wn=function(t,e){this.anchor=t,this.head=e};function kn(t,e,i){var r=t&&t.options.selectionsMayTouch,n=e[i];e.sort((function(t,e){return ee(t.from(),e.from())})),i=U(e,n);for(var s=1;s0:l>=0){var c=se(a.from(),o.from()),u=ne(a.to(),o.to()),h=a.empty()?o.from()==o.head:a.from()==a.head;s<=i&&--i,e.splice(--s,2,new wn(h?u:c,h?c:u))}}return new Cn(e,i)}function En(t,e){return new Cn([new wn(t,e||t)],0)}function Tn(t){return t.text?te(t.from.line+t.text.length-1,Y(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Ln(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return Tn(e);var i=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=Tn(e).ch-e.to.ch),te(i,r)}function An(t,e){for(var i=[],r=0;r1&&t.remove(a.line+1,p-1),t.insert(a.line+1,v)}ai(t,"change",t,e)}function Mn(t,e,i){!function t(r,n,s){if(r.linked)for(var o=0;oa-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(s=function(t,e){return e?(jn(t.done),Y(t.done)):t.done.length&&!Y(t.done).ranges?Y(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Y(t.done)):void 0}(n,n.lastOp==r)))o=Y(s.changes),0==ee(e.from,e.to)&&0==ee(e.from,o.to)?o.to=Tn(e):s.changes.push(Bn(t,e));else{var l=Y(n.done);for(l&&l.ranges||Gn(t.sel,n.done),s={changes:[Bn(t,e)],generation:n.generation},n.done.push(s);n.done.length>n.undoDepth;)n.done.shift(),n.done[0].ranges||n.done.shift()}n.done.push(i),n.generation=++n.maxGeneration,n.lastModTime=n.lastSelTime=a,n.lastOp=n.lastSelOp=r,n.lastOrigin=n.lastSelOrigin=e.origin,o||pt(t,"historyAdded")}function Hn(t,e,i,r){var n=t.history,s=r&&r.origin;i==n.lastSelOp||s&&n.lastSelOrigin==s&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==s||function(t,e,i,r){var n=e.charAt(0);return"*"==n||"+"==n&&i.ranges.length==r.ranges.length&&i.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,s,Y(n.done),e))?n.done[n.done.length-1]=e:Gn(e,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=s,n.lastSelOp=i,r&&!1!==r.clearRedo&&jn(n.undone)}function Gn(t,e){var i=Y(e);i&&i.ranges&&i.equals(t)||e.push(t)}function zn(t,e,i,r){var n=e["spans_"+t.id],s=0;t.iter(Math.max(t.first,i),Math.min(t.first+t.size,r),(function(i){i.markedSpans&&((n||(n=e["spans_"+t.id]={}))[s]=i.markedSpans),++s}))}function Wn(t){if(!t)return null;for(var e,i=0;i-1&&(Y(a)[h]=c[h],delete c[h])}}}return r}function qn(t,e,i,r){if(r){var n=t.anchor;if(i){var s=ee(e,n)<0;s!=ee(i,n)<0?(n=e,e=i):s!=ee(e,i)<0&&(e=i)}return new wn(n,e)}return new wn(i||e,e)}function Yn(t,e,i,r,n){null==n&&(n=t.cm&&(t.cm.display.shift||t.extend)),Jn(t,new Cn([qn(t.sel.primary(),e,i,n)],0),r)}function Xn(t,e,i){for(var r=[],n=t.cm&&(t.cm.display.shift||t.extend),s=0;s=e.ch:a.to>e.ch))){if(n&&(pt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(s.markedSpans){--o;continue}break}if(!l.atomic)continue;if(i){var h=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(h=os(t,h,-r,h&&h.line==e.line?s:null)),h&&h.line==e.line&&(d=ee(h,i))&&(r<0?d<0:d>0))return ns(t,h,e,r,n)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=os(t,f,r,f.line==e.line?s:null)),f?ns(t,f,e,r,n):null}}return e}function ss(t,e,i,r,n){var s=r||1,o=ns(t,e,i,s,n)||!n&&ns(t,e,i,s,!0)||ns(t,e,i,-s,n)||!n&&ns(t,e,i,-s,!0);return o||(t.cantEdit=!0,te(t.first,0))}function os(t,e,i,r){return i<0&&0==e.ch?e.line>t.first?ae(t,te(e.line-1)):null:i>0&&e.ch==(r||Kt(t,e.line)).text.length?e.line0)){var u=[l,1],h=ee(c.from,a.from),d=ee(c.to,a.to);(h<0||!o.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(d>0||!o.inclusiveRight&&!d)&&u.push({from:a.to,to:c.to}),n.splice.apply(n,u),l+=u.length-3}}return n}(t,e.from,e.to);if(r)for(var n=r.length-1;n>=0;--n)us(t,{from:r[n].from,to:r[n].to,text:n?[""]:e.text,origin:e.origin});else us(t,e)}}function us(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var i=An(t,e);Un(t,e,i,t.cm?t.cm.curOp.id:NaN),fs(t,e,i,Te(t,e));var r=[];Mn(t,(function(t,i){i||-1!=U(r,t.history)||(vs(t.history,e),r.push(t.history)),fs(t,e,null,Te(t,e))}))}}function hs(t,e,i){var r=t.cm&&t.cm.state.suppressEdits;if(!r||i){for(var n,s=t.history,o=t.sel,a="undo"==e?s.done:s.undone,l="undo"==e?s.undone:s.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function ds(t,e){if(0!=e&&(t.first+=e,t.sel=new Cn(X(t.sel.ranges,(function(t){return new wn(te(t.anchor.line+e,t.anchor.ch),te(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){ur(t.cm,t.first,t.first-e,e);for(var i=t.cm.display,r=i.viewFrom;rt.lastLine())){if(e.from.lines&&(e={from:e.from,to:te(s,Kt(t,s).text.length),text:[e.text[0]],origin:e.origin}),e.removed=qt(t,e.from,e.to),i||(i=An(t,e)),t.cm?function(t,e,i){var r=t.doc,n=t.display,s=e.from,o=e.to,a=!1,l=s.line;t.options.lineWrapping||(l=$t(Be(Kt(r,s.line))),r.iter(l,o.line+1,(function(t){if(t==n.maxLine)return a=!0,!0}))),r.sel.contains(e.from,e.to)>-1&&mt(t),In(r,e,i,or(t)),t.options.lineWrapping||(r.iter(l,s.line+e.text.length,(function(t){var e=We(t);e>n.maxLineLength&&(n.maxLine=t,n.maxLineLength=e,n.maxLineChanged=!0,a=!1)})),a&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontieri;r--){var n=Kt(t,r).stateAfter;if(n&&(!(n instanceof ce)||r+n.lookAhead1||!(this.children[0]instanceof bs))){var a=[];this.collapse(a),this.children=[new bs(a)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var o=n.lines.length%25+25,a=o;a10);t.parent.maybeSpill()}},iterN:function(t,e,i){for(var r=0;r0||0==o&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=R("span",[s.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(Fe(t,e.line,e,i,s)||e.line!=i.line&&Fe(t,i.line,e,i,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ce=!0}s.addToHistory&&Un(t,{from:e,to:i,origin:"markText"},t.sel,NaN);var a,l=e.line,c=t.cm;if(t.iter(l,i.line+1,(function(t){c&&s.collapsed&&!c.options.lineWrapping&&Be(t)==c.display.maxLine&&(a=!0),s.collapsed&&l!=e.line&&Xt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new we(s,l==e.line?e.ch:null,l==i.line?i.ch:null)),++l})),s.collapsed&&t.iter(e.line,i.line+1,(function(e){He(t,e)&&Xt(e,0)})),s.clearOnEnter&&ht(s,"beforeCursorEnter",(function(){return s.clear()})),s.readOnly&&(Se=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++ws,s.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),s.collapsed)ur(c,e.line,i.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var u=e.line;u<=i.line;u++)hr(c,u,"text");s.atomic&&is(c.doc),ai(c,"markerAdded",c,s)}return s}ks.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Vr(t),vt(this,"clear")){var i=this.find();i&&ai(this,"clear",i.from,i.to)}for(var r=null,n=null,s=0;st.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&ur(t,r,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&is(t.doc)),t&&ai(t,"markerCleared",t,this,r,n),e&&Kr(t),this.parent&&this.parent.clear()}},ks.prototype.find=function(t,e){var i,r;null==t&&"bookmark"==this.type&&(t=1);for(var n=0;n=0;l--)cs(this,r[l]);a?Qn(this,a):this.cm&&Rr(this.cm)})),undo:en((function(){hs(this,"undo")})),redo:en((function(){hs(this,"redo")})),undoSelection:en((function(){hs(this,"undo",!0)})),redoSelection:en((function(){hs(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,i=0,r=0;r=t.ch)&&e.push(n.marker.parent||n.marker)}return e},findMarks:function(t,e,i){t=ae(this,t),e=ae(this,e);var r=[],n=t.line;return this.iter(t.line,e.line+1,(function(s){var o=s.markedSpans;if(o)for(var a=0;a=l.to||null==l.from&&n!=t.line||null!=l.from&&n==e.line&&l.from>=e.ch||i&&!i(l.marker)||r.push(l.marker.parent||l.marker)}++n})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var i=e.markedSpans;if(i)for(var r=0;rt)return e=t,!0;t-=s,++i})),ae(this,te(i,e))},indexFromPos:function(t){var e=(t=ae(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),ts(e.doc,En(i,i)),d)for(var f=0;f=0;e--)ps(t.doc,"",r[e].from,r[e].to,"+delete");Rr(t)}))}function Zs(t,e,i){var r=nt(t.text,e+i,i);return r<0||r>t.text.length?null:r}function Qs(t,e,i){var r=Zs(t,e.ch,i);return null==r?null:new te(e.line,r,i<0?"after":"before")}function Js(t,e,i,r,n){if(t){"rtl"==e.doc.direction&&(n=-n);var s=ct(i,e.doc.direction);if(s){var o,a=n<0?Y(s):s[0],l=n<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var c=Oi(e,i);o=n<0?i.text.length-1:0;var u=_i(e,c,o).top;o=st((function(t){return _i(e,c,t).top==u}),n<0==(1==a.level)?a.from:a.to-1,o),"before"==l&&(o=Zs(i,o,1))}else o=n<0?a.to:a.from;return new te(r,o,l)}}return new te(r,n<0?i.text.length:0,n<0?"before":"after")}Gs.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Gs.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Gs.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Gs.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Gs.default=y?Gs.macDefault:Gs.pcDefault;var to={selectAll:as,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),G)},killLine:function(t){return $s(t,(function(e){if(e.empty()){var i=Kt(t.doc,e.head.line).text.length;return e.head.ch==i&&e.head.line0)n=new te(n.line,n.ch+1),t.replaceRange(s.charAt(n.ch-1)+s.charAt(n.ch-2),te(n.line,n.ch-2),n,"+transpose");else if(n.line>t.doc.first){var o=Kt(t.doc,n.line-1).text;o&&(n=new te(n.line,1),t.replaceRange(s.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),te(n.line-1,o.length-1),n,"+transpose"))}i.push(new wn(n,n))}t.setSelections(i)}))},newlineAndIndent:function(t){return Qr(t,(function(){for(var e=t.listSelections(),i=e.length-1;i>=0;i--)t.replaceRange(t.doc.lineSeparator(),e[i].anchor,e[i].head,"+input");e=t.listSelections();for(var r=0;r-1&&(ee((n=c.ranges[n]).from(),e)<0||e.xRel>0)&&(ee(n.to(),e)>0||e.xRel<0)?function(t,e,i,r){var n=t.display,s=!1,c=Jr(t,(function(e){l&&(n.scroller.draggable=!1),t.state.draggingText=!1,ft(n.wrapper.ownerDocument,"mouseup",c),ft(n.wrapper.ownerDocument,"mousemove",u),ft(n.scroller,"dragstart",h),ft(n.scroller,"drop",c),s||(bt(e),r.addNew||Yn(t.doc,i,null,null,r.extend),l&&!d||o&&9==a?setTimeout((function(){n.wrapper.ownerDocument.body.focus({preventScroll:!0}),n.input.focus()}),20):n.input.focus())})),u=function(t){s=s||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return s=!0};l&&(n.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,n.scroller.dragDrop&&n.scroller.dragDrop(),ht(n.wrapper.ownerDocument,"mouseup",c),ht(n.wrapper.ownerDocument,"mousemove",u),ht(n.scroller,"dragstart",h),ht(n.scroller,"drop",c),Cr(t),setTimeout((function(){return n.input.focus()}),20)}(t,r,e,s):function(t,e,i,r){var n=t.display,s=t.doc;bt(e);var o,a,l=s.sel,c=l.ranges;if(r.addNew&&!r.extend?(a=s.sel.contains(i),o=a>-1?c[a]:new wn(i,i)):(o=s.sel.primary(),a=s.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new wn(i,i)),i=lr(t,e,!0,!0),a=-1;else{var u=vo(t,i,r.unit);o=r.extend?qn(o,u.anchor,u.head,r.extend):u}r.addNew?-1==a?(a=c.length,Jn(s,kn(t,c.concat([o]),a),{scroll:!1,origin:"*mouse"})):c.length>1&&c[a].empty()&&"char"==r.unit&&!r.extend?(Jn(s,kn(t,c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),l=s.sel):$n(s,a,o,z):(a=0,Jn(s,new Cn([o],0),z),l=s.sel);var h=i;function d(e){if(0!=ee(h,e))if(h=e,"rectangle"==r.unit){for(var n=[],c=t.options.tabSize,u=B(Kt(s,i.line).text,i.ch,c),d=B(Kt(s,e.line).text,e.ch,c),f=Math.min(u,d),p=Math.max(u,d),g=Math.min(i.line,e.line),m=Math.min(t.lastLine(),Math.max(i.line,e.line));g<=m;g++){var v=Kt(s,g).text,y=V(v,f,c);f==p?n.push(new wn(te(g,y),te(g,y))):v.length>y&&n.push(new wn(te(g,y),te(g,V(v,p,c))))}n.length||n.push(new wn(i,i)),Jn(s,kn(t,l.ranges.slice(0,a).concat(n),a),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=o,S=vo(t,e,r.unit),C=x.anchor;ee(S.anchor,C)>0?(b=S.head,C=se(x.from(),S.anchor)):(b=S.anchor,C=ne(x.to(),S.head));var w=l.ranges.slice(0);w[a]=function(t,e){var i=e.anchor,r=e.head,n=Kt(t.doc,i.line);if(0==ee(i,r)&&i.sticky==r.sticky)return e;var s=ct(n);if(!s)return e;var o=at(s,i.ch,i.sticky),a=s[o];if(a.from!=i.ch&&a.to!=i.ch)return e;var l,c=o+(a.from==i.ch==(1!=a.level)?0:1);if(0==c||c==s.length)return e;if(r.line!=i.line)l=(r.line-i.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=at(s,r.ch,r.sticky),h=u-o||(r.ch-i.ch)*(1==a.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=s[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,g=f?"after":"before";return i.ch==p&&i.sticky==g?e:new wn(new te(i.line,p,g),r)}(t,new wn(ae(s,C),b)),Jn(s,kn(t,w,a),z)}}var f=n.wrapper.getBoundingClientRect(),p=0;function g(e){t.state.selectingText=!1,p=1/0,e&&(bt(e),n.input.focus()),ft(n.wrapper.ownerDocument,"mousemove",m),ft(n.wrapper.ownerDocument,"mouseup",v),s.history.lastSelOrigin=null}var m=Jr(t,(function(e){0!==e.buttons&&kt(e)?function e(i){var o=++p,a=lr(t,i,!0,"rectangle"==r.unit);if(a)if(0!=ee(a,h)){t.curOp.focus=_(),d(a);var l=Lr(n,s);(a.line>=l.to||a.linef.bottom?20:0;c&&setTimeout(Jr(t,(function(){p==o&&(n.scroller.scrollTop+=c,e(i))})),50)}}(e):g(e)})),v=Jr(t,g);t.state.selectingText=v,ht(n.wrapper.ownerDocument,"mousemove",m),ht(n.wrapper.ownerDocument,"mouseup",v)}(t,r,e,s)}(e,r,s,t):wt(t)==i.scroller&&bt(t):2==n?(r&&Yn(e.doc,r),setTimeout((function(){return i.input.focus()}),20)):3==n&&(w?e.display.input.onContextMenu(t):Cr(e)))}}function vo(t,e,i){if("char"==i)return new wn(e,e);if("word"==i)return t.findWordAt(e);if("line"==i)return new wn(te(e.line,0),ae(t.doc,te(e.line+1,0)));var r=i(t,e);return new wn(r.from,r.to)}function yo(t,e,i,r){var n,s;if(e.touches)n=e.touches[0].clientX,s=e.touches[0].clientY;else try{n=e.clientX,s=e.clientY}catch(t){return!1}if(n>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&bt(e);var o=t.display,a=o.lineDiv.getBoundingClientRect();if(s>a.bottom||!vt(t,i))return St(e);s-=a.top-o.viewOffset;for(var l=0;l=n)return pt(t,i,t,Zt(t.doc,s),t.display.gutterSpecs[l].className,e),St(e)}}function bo(t,e){return yo(t,e,"gutterClick",!0)}function xo(t,e){Si(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&yo(t,e,"gutterContextMenu",!1)}(t,e)||gt(t,e,"contextmenu")||w||t.display.input.onContextMenu(e)}function So(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ji(t)}go.prototype.compare=function(t,e,i){return this.time+400>t&&0==ee(e,this.pos)&&i==this.button};var Co={toString:function(){return"CodeMirror.Init"}},wo={},ko={};function Eo(t,e,i){if(!e!=!(i&&i!=Co)){var r=t.display.dragFunctions,n=e?ht:ft;n(t.display.scroller,"dragstart",r.start),n(t.display.scroller,"dragenter",r.enter),n(t.display.scroller,"dragover",r.over),n(t.display.scroller,"dragleave",r.leave),n(t.display.scroller,"drop",r.drop)}}function To(t){t.options.lineWrapping?(I(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(T(t.display.wrapper,"CodeMirror-wrap"),Ve(t)),ar(t),ur(t),ji(t),setTimeout((function(){return Ur(t)}),100)}function Lo(t,e){var i=this;if(!(this instanceof Lo))return new Lo(t,e);this.options=e=e?F(e):{},F(wo,e,!1);var r=e.value;"string"==typeof r?r=new Rs(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var n=new Lo.inputStyles[e.inputStyle](this),s=this.display=new mn(t,r,n,e);for(var c in s.wrapper.CodeMirror=this,So(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),zr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new j,keySeq:null,specialChars:null},e.autofocus&&!v&&s.input.focus(),o&&a<11&&setTimeout((function(){return i.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",Jr(t,mo)),ht(e.scroller,"dblclick",o&&a<11?Jr(t,(function(e){if(!gt(t,e)){var i=lr(t,e);if(i&&!bo(t,e)&&!Si(t.display,e)){bt(e);var r=t.findWordAt(i);Yn(t.doc,r.anchor,r.head)}}})):function(e){return gt(t,e)||bt(e)}),ht(e.scroller,"contextmenu",(function(e){return xo(t,e)})),ht(e.input.getField(),"contextmenu",(function(i){e.scroller.contains(i.target)||xo(t,i)}));var i,r={end:0};function n(){e.activeTouch&&(i=setTimeout((function(){return e.activeTouch=null}),1e3),(r=e.activeTouch).end=+new Date)}function s(t,e){if(null==e.left)return!0;var i=e.left-t.left,r=e.top-t.top;return i*i+r*r>400}ht(e.scroller,"touchstart",(function(n){if(!gt(t,n)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(n)&&!bo(t,n)){e.input.ensurePolled(),clearTimeout(i);var s=+new Date;e.activeTouch={start:s,moved:!1,prev:s-r.end<=300?r:null},1==n.touches.length&&(e.activeTouch.left=n.touches[0].pageX,e.activeTouch.top=n.touches[0].pageY)}})),ht(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ht(e.scroller,"touchend",(function(i){var r=e.activeTouch;if(r&&!Si(e,i)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,a=t.coordsChar(e.activeTouch,"page");o=!r.prev||s(r,r.prev)?new wn(a,a):!r.prev.prev||s(r,r.prev.prev)?t.findWordAt(a):new wn(te(a.line,0),ae(t.doc,te(a.line+1,0))),t.setSelection(o.anchor,o.head),t.focus(),bt(i)}n()})),ht(e.scroller,"touchcancel",n),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Mr(t,e.scroller.scrollTop),Nr(t,e.scroller.scrollLeft,!0),pt(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return Sn(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return Sn(t,e)})),ht(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){gt(t,e)||Ct(e)},over:function(e){gt(t,e)||(function(t,e){var i=lr(t,e);if(i){var r=document.createDocumentFragment();vr(t,i,r),t.display.dragCursor||(t.display.dragCursor=D("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),A(t.display.dragCursor,r)}}(t,e),Ct(e))},start:function(e){return function(t,e){if(o&&(!t.state.draggingText||+new Date-Os<100))Ct(e);else if(!gt(t,e)&&!Si(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var i=D("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(i.width=i.height=1,t.display.wrapper.appendChild(i),i._top=i.offsetTop),e.dataTransfer.setDragImage(i,0,0),h&&i.parentNode.removeChild(i)}}(t,e)},drop:Jr(t,_s),leave:function(e){gt(t,e)||Is(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return uo.call(t,e)})),ht(l,"keydown",Jr(t,co)),ht(l,"keypress",Jr(t,ho)),ht(l,"focus",(function(e){return wr(t,e)})),ht(l,"blur",(function(e){return kr(t,e)}))}(this),Ns(),Vr(this),this.curOp.forceUpdate=!0,Pn(this,r),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){i.hasFocus()&&!i.state.focused&&wr(i)}),20):kr(this),ko)ko.hasOwnProperty(c)&&ko[c](this,e[c],Co);dn(this),e.finishInit&&e.finishInit(this);for(var u=0;u150)){if(!r)return;i="prev"}}else c=0,i="not";"prev"==i?c=e>s.first?B(Kt(s,e-1).text,null,o):0:"add"==i?c=l+t.options.indentUnit:"subtract"==i?c=l-t.options.indentUnit:"number"==typeof i&&(c=l+i),c=Math.max(0,c);var h="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/o);f;--f)d+=o,h+="\t";if(do,l=Ot(e),c=null;if(a&&r.ranges.length>1)if(Ro&&Ro.text.join("\n")==e){if(r.ranges.length%Ro.text.length==0){c=[];for(var u=0;u=0;d--){var f=r.ranges[d],p=f.from(),g=f.to();f.empty()&&(i&&i>0?p=te(p.line,p.ch-i):t.state.overwrite&&!a?g=te(g.line,Math.min(Kt(s,g.line).text.length,g.ch+Y(l).length)):a&&Ro&&Ro.lineWise&&Ro.text.join("\n")==l.join("\n")&&(p=g=te(p.line,0)));var m={from:p,to:g,text:c?c[d%c.length]:l,origin:n||(a?"paste":t.state.cutIncoming>o?"cut":"+input")};cs(t.doc,m),ai(t,"inputRead",t,m)}e&&!a&&Mo(t,e),Rr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Io(t,e){var i=t.clipboardData&&t.clipboardData.getData("Text");if(i)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Qr(e,(function(){return _o(e,i,0,null,"paste")})),!0}function Mo(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var i=t.doc.sel,r=i.ranges.length-1;r>=0;r--){var n=i.ranges[r];if(!(n.head.ch>100||r&&i.ranges[r-1].head.line==n.head.line)){var s=t.getModeAt(n.head),o=!1;if(s.electricChars){for(var a=0;a-1){o=Do(t,n.head.line,"smart");break}}else s.electricInput&&s.electricInput.test(Kt(t.doc,n.head.line).text.slice(0,n.head.ch))&&(o=Do(t,n.head.line,"smart"));o&&ai(t,"electricInput",t,n.head.line)}}}function Po(t){for(var e=[],i=[],r=0;r0?0:-1));o=isNaN(u)?null:new te(e.line,Math.max(0,Math.min(a.text.length,e.ch+i*(u>=55296&&u<56320?2:1))),-i)}else o=n?function(t,e,i,r){var n=ct(e,t.doc.direction);if(!n)return Qs(e,i,r);i.ch>=e.text.length?(i.ch=e.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var s=at(n,i.ch,i.sticky),o=n[s];if("ltr"==t.doc.direction&&o.level%2==0&&(r>0?o.to>i.ch:o.from=o.from&&d>=u.begin)){var f=h?"before":"after";return new te(i.line,d,f)}}var p=function(t,e,r){for(var s=function(t,e){return e?new te(i.line,l(t,1),"before"):new te(i.line,t,"after")};t>=0&&t0==(1!=o.level),c=a?r.begin:l(r.end,-1);if(o.from<=c&&c0?u.end:l(u.begin,-1);return null==m||r>0&&m==e.text.length||!(g=p(r>0?0:n.length-1,r,c(m)))?null:g}(t.cm,a,e,i):Qs(a,e,i);if(null==o){if(s||(c=e.line+l)=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(a=Kt(t,c))))return!1;e=Js(n,t.cm,a,e.line,l)}else e=o;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,h="group"==r,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(i<0)||c(!f);f=!1){var p=a.text.charAt(e.ch)||"\n",g=tt(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){i<0&&(i=1,c(),e.sticky="after");break}if(g&&(u=g),i>0&&!c(!f))break}var m=ss(t,e,s,o,!0);return ie(s,m)&&(m.hitSide=!0),m}function jo(t,e,i,r){var n,s,o=t.doc,a=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ir(t.display),3);n=(i>0?e.bottom:e.top)+i*c}else"line"==r&&(n=i>0?e.bottom+3:e.top-3);for(;(s=Xi(t,a,n)).outside;){if(i<0?n<=0:n>=o.height){s.hitSide=!0;break}n+=5*i}return s}var Uo=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new j,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ho(t,e){var i=Ri(t,e.line);if(!i||i.hidden)return null;var r=Kt(t.doc,e.line),n=Ai(i,r,e.line),s=ct(r,t.doc.direction),o="left";s&&(o=at(s,e.ch)%2?"right":"left");var a=Pi(n.map,e.ch,o);return a.offset="right"==a.collapse?a.end:a.start,a}function Go(t,e){return e&&(t.bad=!0),t}function zo(t,e,i){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[i]))return Go(t.clipPos(te(t.display.viewTo-1)),!0);e=null,i=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var n=0;n=e.display.viewTo||s.line=e.display.viewFrom&&Ho(e,n)||{node:l[0].measure.map[2],offset:0},u=s.liner.firstLine()&&(o=te(o.line-1,Kt(r.doc,o.line-1).length)),a.ch==Kt(r.doc,a.line).text.length&&a.linen.viewTo-1)return!1;o.line==n.viewFrom||0==(t=cr(r,o.line))?(e=$t(n.view[0].line),i=n.view[0].node):(e=$t(n.view[t].line),i=n.view[t-1].node.nextSibling);var l,c,u=cr(r,a.line);if(u==n.view.length-1?(l=n.viewTo-1,c=n.lineDiv.lastChild):(l=$t(n.view[u+1].line)-1,c=n.view[u+1].node.previousSibling),!i)return!1;for(var h=r.doc.splitLines(function(t,e,i,r,n){var s="",o=!1,a=t.doc.lineSeparator(),l=!1;function c(){o&&(s+=a,l&&(s+=a),o=l=!1)}function u(t){t&&(c(),s+=t)}function h(e){if(1==e.nodeType){var i=e.getAttribute("cm-text");if(i)return void u(i);var s,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(te(r,0),te(n+1,0),(m=+d,function(t){return t.id==m}));return void(f.length&&(s=f[0].find(0))&&u(qt(t.doc,s.from,s.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&c();for(var g=0;g1&&d.length>1;)if(Y(h)==Y(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),e++}for(var f=0,p=0,g=h[0],m=d[0],v=Math.min(g.length,m.length);fo.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var S=te(e,f),C=te(l,d.length?Y(d).length-p:0);return h.length>1||h[0]||ee(S,C)?(ps(r.doc,h,S,C,"+input"),!0):void 0},Uo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Uo.prototype.reset=function(){this.forceCompositionEnd()},Uo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Uo.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Uo.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return ur(t.cm)}))},Uo.prototype.setUneditable=function(t){t.contentEditable="false"},Uo.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Jr(this.cm,_o)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Uo.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Uo.prototype.onContextMenu=function(){},Uo.prototype.resetPosition=function(){},Uo.prototype.needsContentAttribute=!0;var Vo=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new j,this.hasSelection=!1,this.composing=null};Vo.prototype.init=function(t){var e=this,i=this,r=this.cm;this.createField(t);var n=this.textarea;function s(t){if(!gt(r,t)){if(r.somethingSelected())Oo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Po(r);Oo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,G):(i.prevInput="",n.value=e.text.join("\n"),P(n))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(n.style.width="0px"),ht(n,"input",(function(){o&&a>=9&&e.hasSelection&&(e.hasSelection=null),i.poll()})),ht(n,"paste",(function(t){gt(r,t)||Io(t,r)||(r.state.pasteIncoming=+new Date,i.fastPoll())})),ht(n,"cut",s),ht(n,"copy",s),ht(t.scroller,"paste",(function(e){if(!Si(t,e)&&!gt(r,e)){if(!n.dispatchEvent)return r.state.pasteIncoming=+new Date,void i.focus();var s=new Event("paste");s.clipboardData=e.clipboardData,n.dispatchEvent(s)}})),ht(t.lineSpace,"selectstart",(function(e){Si(t,e)||bt(e)})),ht(n,"compositionstart",(function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ht(n,"compositionend",(function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)}))},Vo.prototype.createField=function(t){this.wrapper=Fo(),this.textarea=this.wrapper.firstChild},Vo.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Vo.prototype.prepareSelection=function(){var t=this.cm,e=t.display,i=t.doc,r=mr(t);if(t.options.moveInputWithCursor){var n=Ki(t,i.sel.primary().head,"div"),s=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,n.top+o.top-s.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,n.left+o.left-s.left))}return r},Vo.prototype.showSelection=function(t){var e=this.cm.display;A(e.cursorDiv,t.cursors),A(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Vo.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var i=e.getSelection();this.textarea.value=i,e.state.focused&&P(this.textarea),o&&a>=9&&(this.hasSelection=i)}else t||(this.prevInput=this.textarea.value="",o&&a>=9&&(this.hasSelection=null))}},Vo.prototype.getField=function(){return this.textarea},Vo.prototype.supportsTouch=function(){return!1},Vo.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||_()!=this.textarea))try{this.textarea.focus()}catch(t){}},Vo.prototype.blur=function(){this.textarea.blur()},Vo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Vo.prototype.receivedFocus=function(){this.slowPoll()},Vo.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Vo.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function i(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,i))}))},Vo.prototype.poll=function(){var t=this,e=this.cm,i=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||_t(i)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var n=i.value;if(n==r&&!e.somethingSelected())return!1;if(o&&a>=9&&this.hasSelection===n||y&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var s=n.charCodeAt(0);if(8203!=s||r||(r="​"),8666==s)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,n.length);l1e3||n.indexOf("\n")>-1?i.value=t.prevInput="":t.prevInput=n,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Vo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Vo.prototype.onKeyPress=function(){o&&a>=9&&(this.hasSelection=null),this.fastPoll()},Vo.prototype.onContextMenu=function(t){var e=this,i=e.cm,r=i.display,n=e.textarea;e.contextMenuPending&&e.contextMenuPending();var s=lr(i,t),c=r.scroller.scrollTop;if(s&&!h){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(s)&&Jr(i,Jn)(i.doc,En(s),G);var u,d=n.style.cssText,f=e.wrapper.style.cssText,p=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",n.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-p.top-5)+"px; left: "+(t.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),i.somethingSelected()||(n.value=e.prevInput=" "),e.contextMenuPending=v,r.selForContextMenu=i.doc.sel,clearTimeout(r.detectingSelectAll),o&&a>=9&&m(),w){Ct(t);var g=function(){ft(window,"mouseup",g),setTimeout(v,20)};ht(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=n.selectionStart){var t=i.somethingSelected(),s="​"+(t?n.value:"");n.value="⇚",n.value=s,e.prevInput=t?"":"​",n.selectionStart=1,n.selectionEnd=s.length,r.selForContextMenu=i.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,n.style.cssText=d,o&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=n.selectionStart)){(!o||o&&a<9)&&m();var t=0,s=function(){r.selForContextMenu==i.doc.sel&&0==n.selectionStart&&n.selectionEnd>0&&"​"==e.prevInput?Jr(i,as)(i):t++<10?r.detectingSelectAll=setTimeout(s,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(s,200)}}},Vo.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Vo.prototype.setUneditable=function(){},Vo.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function i(i,r,n,s){t.defaults[i]=r,n&&(e[i]=s?function(t,e,i){i!=Co&&n(t,e,i)}:n)}t.defineOption=i,t.Init=Co,i("value","",(function(t,e){return t.setValue(e)}),!0),i("mode",null,(function(t,e){t.doc.modeOption=e,Rn(t)}),!0),i("indentUnit",2,Rn,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,(function(t){On(t),ji(t),ur(t)}),!0),i("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var i=[],r=t.doc.first;t.doc.iter((function(t){for(var n=0;;){var s=t.text.indexOf(e,n);if(-1==s)break;n=s+e.length,i.push(te(r,s))}r++}));for(var n=i.length-1;n>=0;n--)ps(t.doc,e,i[n],te(i[n].line,i[n].ch+e.length))}})),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,i){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),i!=Co&&t.refresh()})),i("specialCharPlaceholder",Qe,(function(t){return t.refresh()}),!0),i("electricChars",!0),i("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),i("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),i("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),i("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),i("rtlMoveVisually",!x),i("wholeLineUpdateBefore",!0),i("theme","default",(function(t){So(t),gn(t)}),!0),i("keyMap","default",(function(t,e,i){var r=Xs(e),n=i!=Co&&Xs(i);n&&n.detach&&n.detach(t,r),r.attach&&r.attach(t,n||null)})),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,To,!0),i("gutters",[],(function(t,e){t.display.gutterSpecs=fn(e,t.options.lineNumbers),gn(t)}),!0),i("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?sr(t.display)+"px":"0",t.refresh()}),!0),i("coverGutterNextToScrollbar",!1,(function(t){return Ur(t)}),!0),i("scrollbarStyle","native",(function(t){zr(t),Ur(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),i("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=fn(t.options.gutters,e),gn(t)}),!0),i("firstLineNumber",1,gn,!0),i("lineNumberFormatter",(function(t){return t}),gn,!0),i("showCursorWhenSelecting",!1,gr,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,(function(t,e){"nocursor"==e&&(kr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),i("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),i("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),i("dragDrop",!0,Eo),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,gr,!0),i("singleCursorHeightPerLine",!0,gr,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,On,!0),i("addModeClass",!1,On,!0),i("pollInterval",100),i("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),i("historyEventDelay",1250),i("viewportMargin",10,(function(t){return t.refresh()}),!0),i("maxHighlightLength",1e4,On,!0),i("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),i("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),i("autofocus",null),i("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),i("phrases",null)}(Lo),function(t){var e=t.optionHandlers,i=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,i){var r=this.options,n=r[t];r[t]==i&&"mode"!=t||(r[t]=i,e.hasOwnProperty(t)&&Jr(this,e[t])(this,i,n),pt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Xs(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,i=0;ii&&(Do(this,n.head.line,t,!0),i=n.head.line,r==this.doc.sel.primIndex&&Rr(this));else{var s=n.from(),o=n.to(),a=Math.max(i,s.line);i=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=a;l0&&$n(this.doc,r,new wn(s,c[r].to()),G)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,te(t),e,!0)},getTokenTypeAt:function(t){t=ae(this.doc,t);var e,i=de(this,Kt(this.doc,t.line)),r=0,n=(i.length-1)/2,s=t.ch;if(0==s)e=i[2];else for(;;){var o=r+n>>1;if((o?i[2*o-1]:0)>=s)n=o;else{if(!(i[2*o+1]s&&(t=s,n=!0),r=Kt(this.doc,t)}else r=t;return zi(this,r,{top:0,left:0},e||"page",i||n).top+(n?this.doc.height-ze(r):0)},defaultTextHeight:function(){return ir(this.display)},defaultCharWidth:function(){return rr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,i,r,n){var s,o,a,l=this.display,c=(t=Ki(this,ae(this.doc,t))).bottom,u=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==r)c=t.top;else if("above"==r||"near"==r){var h=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>h)&&t.top>e.offsetHeight?c=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=h&&(c=t.bottom),u+e.offsetWidth>d&&(u=d-e.offsetWidth)}e.style.top=c+"px",e.style.left=e.style.right="","right"==n?(u=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==n?u=0:"middle"==n&&(u=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=u+"px"),i&&(s=this,o={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(a=Ar(s,o)).scrollTop&&Mr(s,a.scrollTop),null!=a.scrollLeft&&Nr(s,a.scrollLeft))},triggerOnKeyDown:tn(co),triggerOnKeyPress:tn(ho),triggerOnKeyUp:uo,triggerOnMouseDown:tn(mo),execCommand:function(t){if(to.hasOwnProperty(t))return to[t].call(null,this)},triggerElectric:tn((function(t){Mo(this,t)})),findPosH:function(t,e,i,r){var n=1;e<0&&(n=-1,e=-e);for(var s=ae(this.doc,t),o=0;o0&&o(e.charAt(i-1));)--i;for(;r.5||this.options.lineWrapping)&&ar(this),pt(this,"refresh",this)})),swapDoc:tn((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Pn(this,t),ji(this),this.display.input.reset(),Or(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ai(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(t),t.registerHelper=function(e,r,n){i.hasOwnProperty(e)||(i[e]=t[e]={_global:[]}),i[e][r]=n},t.registerGlobalHelper=function(e,r,n,s){t.registerHelper(e,r,s),i[e]._global.push({pred:n,val:s})}}(Lo);var Ko="iter insert remove copy getEditor constructor".split(" ");for(var qo in Rs.prototype)Rs.prototype.hasOwnProperty(qo)&&U(Ko,qo)<0&&(Lo.prototype[qo]=function(t){return function(){return t.apply(this.doc,arguments)}}(Rs.prototype[qo]));return yt(Rs),Lo.inputStyles={textarea:Vo,contenteditable:Uo},Lo.defineMode=function(t){Lo.defaults.mode||"null"==t||(Lo.defaults.mode=t),Ft.apply(this,arguments)},Lo.defineMIME=function(t,e){Nt[t]=e},Lo.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Lo.defineMIME("text/plain","null"),Lo.defineExtension=function(t,e){Lo.prototype[t]=e},Lo.defineDocExtension=function(t,e){Rs.prototype[t]=e},Lo.fromTextArea=function(t,e){if((e=e?F(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var i=_();e.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}function r(){t.value=a.getValue()}var n;if(t.form&&(ht(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var s=t.form;n=s.submit;try{var o=s.submit=function(){r(),s.submit=n,s.submit(),s.submit=o}}catch(t){}}e.finishInit=function(i){i.save=r,i.getTextArea=function(){return t},i.toTextArea=function(){i.toTextArea=isNaN,r(),t.parentNode.removeChild(i.getWrapperElement()),t.style.display="",t.form&&(ft(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=n))}},t.style.display="none";var a=Lo((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return a},function(t){t.off=ft,t.on=ht,t.wheelEventPixels=xn,t.Doc=Rs,t.splitLines=Ot,t.countColumn=B,t.findColumn=V,t.isWordChar=J,t.Pass=H,t.signal=pt,t.Line=Ke,t.changeEnd=Tn,t.scrollbarModel=Gr,t.Pos=te,t.cmpPos=ee,t.modes=Pt,t.mimeModes=Nt,t.resolveMode=Bt,t.getMode=jt,t.modeExtensions=Ut,t.extendMode=Ht,t.copyState=Gt,t.startState=Wt,t.innerMode=zt,t.commands=to,t.keyMap=Gs,t.keyName=Ys,t.isModifierKey=Ks,t.lookupKey=Vs,t.normalizeKeyMap=Ws,t.StringStream=Vt,t.SharedTextMarker=Ts,t.TextMarker=ks,t.LineWidget=Ss,t.e_preventDefault=bt,t.e_stopPropagation=xt,t.e_stop=Ct,t.addClass=I,t.contains=O,t.rmClass=T,t.keyNames=Bs}(Lo),Lo.version="5.58.2",Lo}()},Y1PL: /*!**********************************************************!*\ !*** ./node_modules/rc-textarea/es/index.js + 7 modules ***! \**********************************************************/ @@ -238,7 +238,7 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(t,e,r){"use strict";r.r(e),r.d(e,"ResizableTextArea",(function(){return I}));var i=r("wx14"),n=r("1OyB"),s=r("vuIU"),o=r("Ji7U"),a=r("LK+K"),l=r("q1tI"),c=r("VTBJ"),u=r("rePB"),h=r("Zm9Q"),d=(r("Kwbf"),r("c+Xe")),f=r("m+aA"),p=r("bdgK"),g=new Map;var m=new p.default((function(t){t.forEach((function(t){var e,r=t.target;null===(e=g.get(r))||void 0===e||e.forEach((function(t){return t(r)}))}))}));var v=function(t){Object(o.a)(r,t);var e=Object(a.a)(r);function r(){return Object(n.a)(this,r),e.apply(this,arguments)}return Object(s.a)(r,[{key:"render",value:function(){return this.props.children}}]),r}(l.Component),y=l.createContext(null);function b(t){var e=t.children,r=t.disabled,i=l.useRef(null),n=l.useRef(null),s=l.useContext(y),o=l.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),a=l.isValidElement(e)&&Object(d.c)(e),u=a?e.ref:null,h=l.useMemo((function(){return Object(d.a)(u,i)}),[u,i]),p=l.useRef(t);p.current=t;var b=l.useCallback((function(t){var e=p.current,r=e.onResize,i=e.data,n=t.getBoundingClientRect(),a=n.width,l=n.height,u=t.offsetWidth,h=t.offsetHeight,d=Math.floor(a),f=Math.floor(l);if(o.current.width!==d||o.current.height!==f||o.current.offsetWidth!==u||o.current.offsetHeight!==h){var g={width:d,height:f,offsetWidth:u,offsetHeight:h};o.current=g;var m=u===Math.round(a)?a:u,v=h===Math.round(l)?l:h,y=Object(c.a)(Object(c.a)({},g),{},{offsetWidth:m,offsetHeight:v});null==s||s(y,t,i),r&&Promise.resolve().then((function(){r(y,t)}))}}),[]);return l.useEffect((function(){var t,e,s=Object(f.a)(i.current)||Object(f.a)(n.current);return s&&!r&&(t=s,e=b,g.has(t)||(g.set(t,new Set),m.observe(t)),g.get(t).add(e)),function(){return function(t,e){g.has(t)&&(g.get(t).delete(e),g.get(t).size||(m.unobserve(t),g.delete(t)))}(s,b)}}),[i.current,r]),l.createElement(v,{ref:n},a?l.cloneElement(e,{ref:h}):e)}function x(t){var e=t.children;return Object(h.a)(e).map((function(e,r){var n=(null==e?void 0:e.key)||"".concat("rc-observer-key","-").concat(r);return l.createElement(b,Object(i.a)({},t,{key:n}),e)}))}x.Collection=function(t){var e=t.children,r=t.onBatchResize,i=l.useRef(0),n=l.useRef([]),s=l.useContext(y),o=l.useCallback((function(t,e,o){i.current+=1;var a=i.current;n.current.push({size:t,element:e,data:o}),Promise.resolve().then((function(){a===i.current&&(null==r||r(n.current),n.current=[])})),null==s||s(t,e,o)}),[r,s]);return l.createElement(y.Provider,{value:o},e)};var S,C=x,w=r("bT9E"),k=r("TSYQ"),E=r.n(k),T="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",L=["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"],A={};function D(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&A[r])return A[r];var i=window.getComputedStyle(t),n=i.getPropertyValue("box-sizing")||i.getPropertyValue("-moz-box-sizing")||i.getPropertyValue("-webkit-box-sizing"),s=parseFloat(i.getPropertyValue("padding-bottom"))+parseFloat(i.getPropertyValue("padding-top")),o=parseFloat(i.getPropertyValue("border-bottom-width"))+parseFloat(i.getPropertyValue("border-top-width")),a=L.map((function(t){return"".concat(t,":").concat(i.getPropertyValue(t))})).join(";"),l={sizingStyle:a,paddingSize:s,borderSize:o,boxSizing:n};return e&&r&&(A[r]=l),l}var R,O=r("Gytx"),_=r.n(O);!function(t){t[t.NONE=0]="NONE",t[t.RESIZING=1]="RESIZING",t[t.RESIZED=2]="RESIZED"}(R||(R={}));var I=function(t){Object(o.a)(r,t);var e=Object(a.a)(r);function r(t){var s;return Object(n.a)(this,r),(s=e.call(this,t)).nextFrameActionId=void 0,s.resizeFrameId=void 0,s.textArea=void 0,s.saveTextArea=function(t){s.textArea=t},s.handleResize=function(t){var e=s.state.resizeStatus,r=s.props,i=r.autoSize,n=r.onResize;e===R.NONE&&("function"==typeof n&&n(t),i&&s.resizeOnNextFrame())},s.resizeOnNextFrame=function(){cancelAnimationFrame(s.nextFrameActionId),s.nextFrameActionId=requestAnimationFrame(s.resizeTextarea)},s.resizeTextarea=function(){var t=s.props.autoSize;if(t&&s.textArea){var e=t.minRows,r=t.maxRows,i=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;S||((S=document.createElement("textarea")).setAttribute("tab-index","-1"),S.setAttribute("aria-hidden","true"),document.body.appendChild(S)),t.getAttribute("wrap")?S.setAttribute("wrap",t.getAttribute("wrap")):S.removeAttribute("wrap");var n=D(t,e),s=n.paddingSize,o=n.borderSize,a=n.boxSizing,l=n.sizingStyle;S.setAttribute("style","".concat(l,";").concat(T)),S.value=t.value||t.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,d=S.scrollHeight;if("border-box"===a?d+=o:"content-box"===a&&(d-=s),null!==r||null!==i){S.value=" ";var f=S.scrollHeight-s;null!==r&&(u=f*r,"border-box"===a&&(u=u+s+o),d=Math.max(u,d)),null!==i&&(h=f*i,"border-box"===a&&(h=h+s+o),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(s.textArea,!1,e,r);s.setState({textareaStyles:i,resizeStatus:R.RESIZING},(function(){cancelAnimationFrame(s.resizeFrameId),s.resizeFrameId=requestAnimationFrame((function(){s.setState({resizeStatus:R.RESIZED},(function(){s.resizeFrameId=requestAnimationFrame((function(){s.setState({resizeStatus:R.NONE}),s.fixFirefoxAutoScroll()}))}))}))}))}},s.renderTextArea=function(){var t=s.props,e=t.prefixCls,r=void 0===e?"rc-textarea":e,n=t.autoSize,o=t.onResize,a=t.className,h=t.disabled,d=s.state,f=d.textareaStyles,p=d.resizeStatus,g=Object(w.a)(s.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),m=E()(r,a,Object(u.a)({},"".concat(r,"-disabled"),h));"value"in g&&(g.value=g.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},s.props.style),f),p===R.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(C,{onResize:s.handleResize,disabled:!(n||o)},l.createElement("textarea",Object(i.a)({},g,{className:m,style:v,ref:s.saveTextArea})))},s.state={textareaStyles:{},resizeStatus:R.NONE},s}return Object(s.a)(r,[{key:"componentDidUpdate",value:function(t){t.value===this.props.value&&_()(t.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 t=this.textArea.selectionStart,e=this.textArea.selectionEnd;this.textArea.setSelectionRange(t,e)}}catch(t){}}},{key:"render",value:function(){return this.renderTextArea()}}]),r}(l.Component),M=function(t){Object(o.a)(r,t);var e=Object(a.a)(r);function r(t){var i;Object(n.a)(this,r),(i=e.call(this,t)).resizableTextArea=void 0,i.focus=function(){i.resizableTextArea.textArea.focus()},i.saveTextArea=function(t){i.resizableTextArea=t},i.handleChange=function(t){var e=i.props.onChange;i.setValue(t.target.value,(function(){i.resizableTextArea.resizeTextarea()})),e&&e(t)},i.handleKeyDown=function(t){var e=i.props,r=e.onPressEnter,n=e.onKeyDown;13===t.keyCode&&r&&r(t),n&&n(t)};var s=void 0===t.value||null===t.value?t.defaultValue:t.value;return i.state={value:s},i}return Object(s.a)(r,[{key:"setValue",value:function(t,e){"value"in this.props||this.setState({value:t},e)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(I,Object(i.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(t){return"value"in t?{value:t.value}:null}}]),r}(l.Component);e.default=M},ZW9T: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(t,e,i){"use strict";i.r(e),i.d(e,"ResizableTextArea",(function(){return I}));var r=i("wx14"),n=i("1OyB"),s=i("vuIU"),o=i("Ji7U"),a=i("LK+K"),l=i("q1tI"),c=i("VTBJ"),u=i("rePB"),h=i("Zm9Q"),d=(i("Kwbf"),i("c+Xe")),f=i("m+aA"),p=i("bdgK"),g=new Map;var m=new p.default((function(t){t.forEach((function(t){var e,i=t.target;null===(e=g.get(i))||void 0===e||e.forEach((function(t){return t(i)}))}))}));var v=function(t){Object(o.a)(i,t);var e=Object(a.a)(i);function i(){return Object(n.a)(this,i),e.apply(this,arguments)}return Object(s.a)(i,[{key:"render",value:function(){return this.props.children}}]),i}(l.Component),y=l.createContext(null);function b(t){var e=t.children,i=t.disabled,r=l.useRef(null),n=l.useRef(null),s=l.useContext(y),o=l.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),a=l.isValidElement(e)&&Object(d.c)(e),u=a?e.ref:null,h=l.useMemo((function(){return Object(d.a)(u,r)}),[u,r]),p=l.useRef(t);p.current=t;var b=l.useCallback((function(t){var e=p.current,i=e.onResize,r=e.data,n=t.getBoundingClientRect(),a=n.width,l=n.height,u=t.offsetWidth,h=t.offsetHeight,d=Math.floor(a),f=Math.floor(l);if(o.current.width!==d||o.current.height!==f||o.current.offsetWidth!==u||o.current.offsetHeight!==h){var g={width:d,height:f,offsetWidth:u,offsetHeight:h};o.current=g;var m=u===Math.round(a)?a:u,v=h===Math.round(l)?l:h,y=Object(c.a)(Object(c.a)({},g),{},{offsetWidth:m,offsetHeight:v});null==s||s(y,t,r),i&&Promise.resolve().then((function(){i(y,t)}))}}),[]);return l.useEffect((function(){var t,e,s=Object(f.a)(r.current)||Object(f.a)(n.current);return s&&!i&&(t=s,e=b,g.has(t)||(g.set(t,new Set),m.observe(t)),g.get(t).add(e)),function(){return function(t,e){g.has(t)&&(g.get(t).delete(e),g.get(t).size||(m.unobserve(t),g.delete(t)))}(s,b)}}),[r.current,i]),l.createElement(v,{ref:n},a?l.cloneElement(e,{ref:h}):e)}function x(t){var e=t.children;return Object(h.a)(e).map((function(e,i){var n=(null==e?void 0:e.key)||"".concat("rc-observer-key","-").concat(i);return l.createElement(b,Object(r.a)({},t,{key:n}),e)}))}x.Collection=function(t){var e=t.children,i=t.onBatchResize,r=l.useRef(0),n=l.useRef([]),s=l.useContext(y),o=l.useCallback((function(t,e,o){r.current+=1;var a=r.current;n.current.push({size:t,element:e,data:o}),Promise.resolve().then((function(){a===r.current&&(null==i||i(n.current),n.current=[])})),null==s||s(t,e,o)}),[i,s]);return l.createElement(y.Provider,{value:o},e)};var S,C=x,w=i("bT9E"),k=i("TSYQ"),E=i.n(k),T="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",L=["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"],A={};function D(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&A[i])return A[i];var r=window.getComputedStyle(t),n=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),s=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),a=L.map((function(t){return"".concat(t,":").concat(r.getPropertyValue(t))})).join(";"),l={sizingStyle:a,paddingSize:s,borderSize:o,boxSizing:n};return e&&i&&(A[i]=l),l}var R,O=i("Gytx"),_=i.n(O);!function(t){t[t.NONE=0]="NONE",t[t.RESIZING=1]="RESIZING",t[t.RESIZED=2]="RESIZED"}(R||(R={}));var I=function(t){Object(o.a)(i,t);var e=Object(a.a)(i);function i(t){var s;return Object(n.a)(this,i),(s=e.call(this,t)).nextFrameActionId=void 0,s.resizeFrameId=void 0,s.textArea=void 0,s.saveTextArea=function(t){s.textArea=t},s.handleResize=function(t){var e=s.state.resizeStatus,i=s.props,r=i.autoSize,n=i.onResize;e===R.NONE&&("function"==typeof n&&n(t),r&&s.resizeOnNextFrame())},s.resizeOnNextFrame=function(){cancelAnimationFrame(s.nextFrameActionId),s.nextFrameActionId=requestAnimationFrame(s.resizeTextarea)},s.resizeTextarea=function(){var t=s.props.autoSize;if(t&&s.textArea){var e=t.minRows,i=t.maxRows,r=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;S||((S=document.createElement("textarea")).setAttribute("tab-index","-1"),S.setAttribute("aria-hidden","true"),document.body.appendChild(S)),t.getAttribute("wrap")?S.setAttribute("wrap",t.getAttribute("wrap")):S.removeAttribute("wrap");var n=D(t,e),s=n.paddingSize,o=n.borderSize,a=n.boxSizing,l=n.sizingStyle;S.setAttribute("style","".concat(l,";").concat(T)),S.value=t.value||t.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,d=S.scrollHeight;if("border-box"===a?d+=o:"content-box"===a&&(d-=s),null!==i||null!==r){S.value=" ";var f=S.scrollHeight-s;null!==i&&(u=f*i,"border-box"===a&&(u=u+s+o),d=Math.max(u,d)),null!==r&&(h=f*r,"border-box"===a&&(h=h+s+o),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(s.textArea,!1,e,i);s.setState({textareaStyles:r,resizeStatus:R.RESIZING},(function(){cancelAnimationFrame(s.resizeFrameId),s.resizeFrameId=requestAnimationFrame((function(){s.setState({resizeStatus:R.RESIZED},(function(){s.resizeFrameId=requestAnimationFrame((function(){s.setState({resizeStatus:R.NONE}),s.fixFirefoxAutoScroll()}))}))}))}))}},s.renderTextArea=function(){var t=s.props,e=t.prefixCls,i=void 0===e?"rc-textarea":e,n=t.autoSize,o=t.onResize,a=t.className,h=t.disabled,d=s.state,f=d.textareaStyles,p=d.resizeStatus,g=Object(w.a)(s.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),m=E()(i,a,Object(u.a)({},"".concat(i,"-disabled"),h));"value"in g&&(g.value=g.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},s.props.style),f),p===R.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(C,{onResize:s.handleResize,disabled:!(n||o)},l.createElement("textarea",Object(r.a)({},g,{className:m,style:v,ref:s.saveTextArea})))},s.state={textareaStyles:{},resizeStatus:R.NONE},s}return Object(s.a)(i,[{key:"componentDidUpdate",value:function(t){t.value===this.props.value&&_()(t.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 t=this.textArea.selectionStart,e=this.textArea.selectionEnd;this.textArea.setSelectionRange(t,e)}}catch(t){}}},{key:"render",value:function(){return this.renderTextArea()}}]),i}(l.Component),M=function(t){Object(o.a)(i,t);var e=Object(a.a)(i);function i(t){var r;Object(n.a)(this,i),(r=e.call(this,t)).resizableTextArea=void 0,r.focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(t){r.resizableTextArea=t},r.handleChange=function(t){var e=r.props.onChange;r.setValue(t.target.value,(function(){r.resizableTextArea.resizeTextarea()})),e&&e(t)},r.handleKeyDown=function(t){var e=r.props,i=e.onPressEnter,n=e.onKeyDown;13===t.keyCode&&i&&i(t),n&&n(t)};var s=void 0===t.value||null===t.value?t.defaultValue:t.value;return r.state={value:s},r}return Object(s.a)(i,[{key:"setValue",value:function(t,e){"value"in this.props||this.setState({value:t},e)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(I,Object(r.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(t){return"value"in t?{value:t.value}:null}}]),i}(l.Component);e.default=M},ZW9T: /*!************************************************************!*\ !*** ./src/components/monaco-editor/index.jsx + 1 modules ***! \************************************************************/ @@ -251,33 +251,33 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */function(t,e,r){"use strict";r.d(e,"a",(function(){return v}));var i=r("k1fw"),n=(r("miYZ"),r("tsqr")),s=r("rAM+"),o=r("tJVT"),a=r("PpiC"),l=r("q1tI"),c=r.n(l),u=r("bdgK");function h(t,e,r,n,s){var o=e.getWordUntilPosition(r),a={startLineNumber:r.lineNumber,endLineNumber:r.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=n.map((function(e){return{label:e,kind:t.languages.CompletionItemKind.Keyword,insertText:e,insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:a}}));return s.map((function(t){l.push(Object(i.a)(Object(i.a)({},t),{},{range:a}))})),l}r("LvDl");function d(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}function f(){}var p={"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 g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t;if(Array.isArray(t)){for(var r=0;r0||i.target.offsetWidth>0)&&V.current.instance.layout()}}catch(t){r.e(t)}finally{r.f()}}))).observe(W.current),t}();return Q(!0),function(){var t=V.current.instance;t.dispose();var e=t.getModel();e&&e.dispose(),V.current.subscription&&V.current.subscription.dispose(),P&&window.removeEventListener("paste",tt),r.unobserve(W.current)}}catch(t){}}))}),[]),Object(l.useEffect)((function(){if(V.current.instance&&Z)return document.addEventListener("keydown",et,!1),function(){document.removeEventListener("keydown",et)}}),[O,Z]),Object(l.useEffect)((function(){var t=V.current.instance;if(t&&Z){var e=g(S);m.editor.setModelLanguage(t.getModel(),e),console.log("language:",S,t.getModel(),e)}}),[S,Z]),Object(l.useEffect)((function(){V.current.instance&&Z&&m.editor.setTheme(D)}),[D,Z]),Object(l.useEffect)((function(){var t=V.current.instance;t&&Z&&(t.updateOptions(Object(i.a)({},E)),setTimeout((function(){t.getModel().updateOptions(Object(i.a)({},E))}),200))}),[JSON.stringify(E),Z]),Object(l.useEffect)((function(){var t=V.current.instance;t&&Z&&t.layout()}),[p,y,Z]);var nt=Object(l.useState)(d(p)),st=Object(o.a)(nt,2),ot=st[0],at=(st[1],Object(l.useState)(d(y))),lt=Object(o.a)(at,2),ct=lt[0],ut=lt[1],ht=Object(i.a)(Object(i.a)({},w),{},{width:ot,height:ct});return c.a.createElement("div",{className:"my-monaco-editor",ref:W,style:ht})};function v(t){var e=t.width,n=void 0===e?"100%":e,a=t.height,h=void 0===a?"100%":a,f=t.original,p=t.modified,g=t.language,v=t.options,y=void 0===v?{}:v,b=Object(l.useRef)(),x=Object(l.useState)(null),S=Object(o.a)(x,2),C=S[0],w=S[1];Object(l.useEffect)((function(){b.current&&r.e(/*! import() | monaco-editor */27).then(r.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(t){var e=(m=t).editor.createDiffEditor(b.current,Object(i.a)(Object(i.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},y),{},{wordWrap:!0}));w(e);var r=function(t){var e;return b.current&&(e=new u.default((function(e){var r,i=Object(s.a)(e);try{for(i.s();!(r=i.n()).done;){var n=r.value;(n.target.offsetHeight>0||n.target.offsetWidth>0)&&t.layout()}}catch(t){i.e(t)}finally{i.f()}}))).observe(b.current),e}(e);return function(){e.dispose();var t=e.getModel();t&&t.dispose(),r.unobserve(b.current)}}))}),[]),Object(l.useEffect)((function(){C&&C.setModel({original:m.editor.createModel(f,g),modified:m.editor.createModel(p,g)})}),[f,p,g,C]);var k={width:d(n),height:d(h)};return c.a.createElement("div",{className:"my-diff-editor",ref:b,style:k})}},ZpRC: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */function(t,e,i){"use strict";i.d(e,"a",(function(){return v}));var r=i("k1fw"),n=(i("miYZ"),i("tsqr")),s=i("rAM+"),o=i("tJVT"),a=i("PpiC"),l=i("q1tI"),c=i.n(l),u=i("bdgK");function h(t,e,i,n,s){var o=e.getWordUntilPosition(i),a={startLineNumber:i.lineNumber,endLineNumber:i.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=n.map((function(e){return{label:e,kind:t.languages.CompletionItemKind.Keyword,insertText:e,insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:a}}));return s.map((function(t){l.push(Object(r.a)(Object(r.a)({},t),{},{range:a}))})),l}i("LvDl");function d(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}function f(){}var p={"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 g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t;if(Array.isArray(t)){for(var i=0;i0||r.target.offsetWidth>0)&&V.current.instance.layout()}}catch(t){i.e(t)}finally{i.f()}}))).observe(W.current),t}();return Q(!0),function(){var t=V.current.instance;t.dispose();var e=t.getModel();e&&e.dispose(),V.current.subscription&&V.current.subscription.dispose(),P&&window.removeEventListener("paste",tt),i.unobserve(W.current)}}catch(t){}}))}),[]),Object(l.useEffect)((function(){if(V.current.instance&&Z)return document.addEventListener("keydown",et,!1),function(){document.removeEventListener("keydown",et)}}),[O,Z]),Object(l.useEffect)((function(){var t=V.current.instance;if(t&&Z){var e=g(S);m.editor.setModelLanguage(t.getModel(),e),console.log("language:",S,t.getModel(),e)}}),[S,Z]),Object(l.useEffect)((function(){V.current.instance&&Z&&m.editor.setTheme(D)}),[D,Z]),Object(l.useEffect)((function(){var t=V.current.instance;t&&Z&&(t.updateOptions(Object(r.a)({},E)),setTimeout((function(){t.getModel().updateOptions(Object(r.a)({},E))}),200))}),[JSON.stringify(E),Z]),Object(l.useEffect)((function(){var t=V.current.instance;t&&Z&&t.layout()}),[p,y,Z]);var nt=Object(l.useState)(d(p)),st=Object(o.a)(nt,2),ot=st[0],at=(st[1],Object(l.useState)(d(y))),lt=Object(o.a)(at,2),ct=lt[0],ut=lt[1],ht=Object(r.a)(Object(r.a)({},w),{},{width:ot,height:ct});return c.a.createElement("div",{className:"my-monaco-editor",ref:W,style:ht})};function v(t){var e=t.width,n=void 0===e?"100%":e,a=t.height,h=void 0===a?"100%":a,f=t.original,p=t.modified,g=t.language,v=t.options,y=void 0===v?{}:v,b=Object(l.useRef)(),x=Object(l.useState)(null),S=Object(o.a)(x,2),C=S[0],w=S[1];Object(l.useEffect)((function(){b.current&&i.e(/*! import() | monaco-editor */27).then(i.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(t){var e=(m=t).editor.createDiffEditor(b.current,Object(r.a)(Object(r.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},y),{},{wordWrap:!0}));w(e);var i=function(t){var e;return b.current&&(e=new u.default((function(e){var i,r=Object(s.a)(e);try{for(r.s();!(i=r.n()).done;){var n=i.value;(n.target.offsetHeight>0||n.target.offsetWidth>0)&&t.layout()}}catch(t){r.e(t)}finally{r.f()}}))).observe(b.current),e}(e);return function(){e.dispose();var t=e.getModel();t&&t.dispose(),i.unobserve(b.current)}}))}),[]),Object(l.useEffect)((function(){C&&C.setModel({original:m.editor.createModel(f,g),modified:m.editor.createModel(p,g)})}),[f,p,g,C]);var k={width:d(n),height:d(h)};return c.a.createElement("div",{className:"my-diff-editor",ref:b,style:k})}},ZpRC: /*!*************************************************************************!*\ !*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***! \*************************************************************************/ /*! exports provided: default */ -/*! exports used: default */function(t,e,r){"use strict";function i(t){return"object"==typeof t&&null!=t&&1===t.nodeType}function n(t,e){return(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function s(t,e){if(t.clientHeighte||s>t&&o=e&&a>=r?s-t-i:o>e&&ar?o-e+n:0}var a=function(t,e){var r=window,n=e.scrollMode,a=e.block,l=e.inline,c=e.boundary,u=e.skipOverflowHiddenElements,h="function"==typeof c?c:function(t){return t!==c};if(!i(t))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],p=t;i(p)&&h(p);){if((p=p.parentElement)===d){f.push(p);break}null!=p&&p===document.body&&s(p)&&!s(document.documentElement)||null!=p&&s(p,u)&&f.push(p)}for(var g=r.visualViewport?r.visualViewport.width:innerWidth,m=r.visualViewport?r.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=t.getBoundingClientRect(),x=b.height,S=b.width,C=b.top,w=b.right,k=b.bottom,E=b.left,T="start"===a||"nearest"===a?C:"end"===a?k:C+x/2,L="center"===l?E+S/2:"end"===l?w:E,A=[],D=0;D=0&&E>=0&&k<=m&&w<=g&&C>=M&&k<=N&&E>=F&&w<=P)return A;var B=getComputedStyle(R),j=parseInt(B.borderLeftWidth,10),U=parseInt(B.borderTopWidth,10),H=parseInt(B.borderRightWidth,10),G=parseInt(B.borderBottomWidth,10),z=0,W=0,V="offsetWidth"in R?R.offsetWidth-R.clientWidth-j-H:0,K="offsetHeight"in R?R.offsetHeight-R.clientHeight-U-G:0;if(d===R)z="start"===a?T:"end"===a?T-m:"nearest"===a?o(y,y+m,m,U,G,y+T,y+T+x,x):T-m/2,W="start"===l?L:"center"===l?L-g/2:"end"===l?L-g:o(v,v+g,g,j,H,v+L,v+L+S,S),z=Math.max(0,z+y),W=Math.max(0,W+v);else{z="start"===a?T-M-U:"end"===a?T-N+G+K:"nearest"===a?o(M,N,_,U,G+K,T,T+x,x):T-(M+_/2)+K/2,W="start"===l?L-F-j:"center"===l?L-(F+I/2)+V/2:"end"===l?L-P+H+V:o(F,P,I,j,H+V,L,L+S,S);var q=R.scrollLeft,Y=R.scrollTop;T+=Y-(z=Math.max(0,Math.min(Y+z,R.scrollHeight-_+K))),L+=q-(W=Math.max(0,Math.min(q+W,R.scrollWidth-I+V)))}A.push({el:R,top:z,left:W})}return A};function l(t){return t===Object(t)&&0!==Object.keys(t).length}e.a=function(t,e){var r=!t.ownerDocument.documentElement.contains(t);if(l(e)&&"function"==typeof e.behavior)return e.behavior(r?[]:a(t,e));if(!r){var i=function(t){return!1===t?{block:"end",inline:"nearest"}:l(t)?t:{block:"start",inline:"nearest"}}(e);return function(t,e){void 0===e&&(e="auto");var r="scrollBehavior"in document.body.style;t.forEach((function(t){var i=t.el,n=t.top,s=t.left;i.scroll&&r?i.scroll({top:n,left:s,behavior:e}):(i.scrollTop=n,i.scrollLeft=s)}))}(a(t,i),i.behavior)}}},Zss7: +/*! exports used: default */function(t,e,i){"use strict";function r(t){return"object"==typeof t&&null!=t&&1===t.nodeType}function n(t,e){return(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function s(t,e){if(t.clientHeighte||s>t&&o=e&&a>=i?s-t-r:o>e&&ai?o-e+n:0}var a=function(t,e){var i=window,n=e.scrollMode,a=e.block,l=e.inline,c=e.boundary,u=e.skipOverflowHiddenElements,h="function"==typeof c?c:function(t){return t!==c};if(!r(t))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],p=t;r(p)&&h(p);){if((p=p.parentElement)===d){f.push(p);break}null!=p&&p===document.body&&s(p)&&!s(document.documentElement)||null!=p&&s(p,u)&&f.push(p)}for(var g=i.visualViewport?i.visualViewport.width:innerWidth,m=i.visualViewport?i.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=t.getBoundingClientRect(),x=b.height,S=b.width,C=b.top,w=b.right,k=b.bottom,E=b.left,T="start"===a||"nearest"===a?C:"end"===a?k:C+x/2,L="center"===l?E+S/2:"end"===l?w:E,A=[],D=0;D=0&&E>=0&&k<=m&&w<=g&&C>=M&&k<=N&&E>=F&&w<=P)return A;var B=getComputedStyle(R),j=parseInt(B.borderLeftWidth,10),U=parseInt(B.borderTopWidth,10),H=parseInt(B.borderRightWidth,10),G=parseInt(B.borderBottomWidth,10),z=0,W=0,V="offsetWidth"in R?R.offsetWidth-R.clientWidth-j-H:0,K="offsetHeight"in R?R.offsetHeight-R.clientHeight-U-G:0;if(d===R)z="start"===a?T:"end"===a?T-m:"nearest"===a?o(y,y+m,m,U,G,y+T,y+T+x,x):T-m/2,W="start"===l?L:"center"===l?L-g/2:"end"===l?L-g:o(v,v+g,g,j,H,v+L,v+L+S,S),z=Math.max(0,z+y),W=Math.max(0,W+v);else{z="start"===a?T-M-U:"end"===a?T-N+G+K:"nearest"===a?o(M,N,_,U,G+K,T,T+x,x):T-(M+_/2)+K/2,W="start"===l?L-F-j:"center"===l?L-(F+I/2)+V/2:"end"===l?L-P+H+V:o(F,P,I,j,H+V,L,L+S,S);var q=R.scrollLeft,Y=R.scrollTop;T+=Y-(z=Math.max(0,Math.min(Y+z,R.scrollHeight-_+K))),L+=q-(W=Math.max(0,Math.min(q+W,R.scrollWidth-I+V)))}A.push({el:R,top:z,left:W})}return A};function l(t){return t===Object(t)&&0!==Object.keys(t).length}e.a=function(t,e){var i=!t.ownerDocument.documentElement.contains(t);if(l(e)&&"function"==typeof e.behavior)return e.behavior(i?[]:a(t,e));if(!i){var r=function(t){return!1===t?{block:"end",inline:"nearest"}:l(t)?t:{block:"start",inline:"nearest"}}(e);return function(t,e){void 0===e&&(e="auto");var i="scrollBehavior"in document.body.style;t.forEach((function(t){var r=t.el,n=t.top,s=t.left;r.scroll&&i?r.scroll({top:n,left:s,behavior:e}):(r.scrollTop=n,r.scrollLeft=s)}))}(a(t,r),r.behavior)}}},Zss7: /*!**********************************************!*\ !*** ./node_modules/tinycolor2/tinycolor.js ***! \**********************************************/ /*! no static exports found */ /*! exports used: default */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){var i;!function(n){var s=/^\s+/,o=/\s+$/,a=0,l=n.round,c=n.min,u=n.max,h=n.random;function d(t,e){if(e=e||{},(t=t||"")instanceof d)return t;if(!(this instanceof d))return new d(t,e);var r=function(t){var e={r:0,g:0,b:0},r=1,i=null,a=null,l=null,h=!1,d=!1;"string"==typeof t&&(t=function(t){t=t.replace(s,"").replace(o,"").toLowerCase();var e,r=!1;if(R[t])t=R[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=z.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=z.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=z.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=z.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=z.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=z.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=z.hex8.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),a:j(e[4]),format:r?"name":"hex8"};if(e=z.hex6.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),format:r?"name":"hex"};if(e=z.hex4.exec(t))return{r:P(e[1]+""+e[1]),g:P(e[2]+""+e[2]),b:P(e[3]+""+e[3]),a:j(e[4]+""+e[4]),format:r?"name":"hex8"};if(e=z.hex3.exec(t))return{r:P(e[1]+""+e[1]),g:P(e[2]+""+e[2]),b:P(e[3]+""+e[3]),format:r?"name":"hex"};return!1}(t));"object"==typeof t&&(W(t.r)&&W(t.g)&&W(t.b)?(f=t.r,p=t.g,g=t.b,e={r:255*I(f,255),g:255*I(p,255),b:255*I(g,255)},h=!0,d="%"===String(t.r).substr(-1)?"prgb":"rgb"):W(t.h)&&W(t.s)&&W(t.v)?(i=F(t.s),a=F(t.v),e=function(t,e,r){t=6*I(t,360),e=I(e,100),r=I(r,100);var i=n.floor(t),s=t-i,o=r*(1-e),a=r*(1-s*e),l=r*(1-(1-s)*e),c=i%6;return{r:255*[r,a,o,o,l,r][c],g:255*[l,r,r,a,o,o][c],b:255*[o,o,l,r,r,a][c]}}(t.h,i,a),h=!0,d="hsv"):W(t.h)&&W(t.s)&&W(t.l)&&(i=F(t.s),l=F(t.l),e=function(t,e,r){var i,n,s;function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=I(t,360),e=I(e,100),r=I(r,100),0===e)i=n=s=r;else{var a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;i=o(l,a,t+1/3),n=o(l,a,t),s=o(l,a,t-1/3)}return{r:255*i,g:255*n,b:255*s}}(t.h,i,l),h=!0,d="hsl"),t.hasOwnProperty("a")&&(r=t.a));var f,p,g;return r=_(r),{ok:h,format:t.format||d,r:c(255,u(e.r,0)),g:c(255,u(e.g,0)),b:c(255,u(e.b,0)),a:r}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=l(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=r.ok,this._tc_id=a++}function f(t,e,r){t=I(t,255),e=I(e,255),r=I(r,255);var i,n,s=u(t,e,r),o=c(t,e,r),a=(s+o)/2;if(s==o)i=n=0;else{var l=s-o;switch(n=a>.5?l/(2-s-o):l/(s+o),s){case t:i=(e-r)/l+(e>1)+720)%360;--e;)i.h=(i.h+n)%360,s.push(d(i));return s}function D(t,e){e=e||6;for(var r=d(t).toHsv(),i=r.h,n=r.s,s=r.v,o=[],a=1/e;e--;)o.push(d({h:i,s:n,v:s})),s=(s+a)%1;return o}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,i=this.toRgb();return t=i.r/255,e=i.g/255,r=i.b/255,.2126*(t<=.03928?t/12.92:n.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:n.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:n.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=_(t),this._roundA=l(100*this._a)/100,this},toHsv:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=p(this._r,this._g,this._b),e=l(360*t.h),r=l(100*t.s),i=l(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+i+"%)":"hsva("+e+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=f(this._r,this._g,this._b),e=l(360*t.h),r=l(100*t.s),i=l(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+i+"%)":"hsla("+e+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return g(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,i,n){var s=[N(l(t).toString(16)),N(l(e).toString(16)),N(l(r).toString(16)),N(B(i))];if(n&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1))return s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0);return s.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*I(this._r,255))+"%",g:l(100*I(this._g,255))+"%",b:l(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%)":"rgba("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(O[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+m(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var n=d(t);r="#"+m(n._r,n._g,n._b,n._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0;return e||!i||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(S,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(k,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(L,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},d.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]="a"===i?t[i]:F(t[i]));t=r}return d(t,e)},d.equals=function(t,e){return!(!t||!e)&&d(t).toRgbString()==d(e).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(t,e,r){r=0===r?0:r||50;var i=d(t).toRgb(),n=d(e).toRgb(),s=r/100;return d({r:(n.r-i.r)*s+i.r,g:(n.g-i.g)*s+i.g,b:(n.b-i.b)*s+i.b,a:(n.a-i.a)*s+i.a})},d.readability=function(t,e){var r=d(t),i=d(e);return(n.max(r.getLuminance(),i.getLuminance())+.05)/(n.min(r.getLuminance(),i.getLuminance())+.05)},d.isReadable=function(t,e,r){var i,n,s=d.readability(t,e);switch(n=!1,(i=function(t){var e,r;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==r&&"large"!==r&&(r="small");return{level:e,size:r}}(r)).level+i.size){case"AAsmall":case"AAAlarge":n=s>=4.5;break;case"AAlarge":n=s>=3;break;case"AAAsmall":n=s>=7}return n},d.mostReadable=function(t,e,r){var i,n,s,o,a=null,l=0;n=(r=r||{}).includeFallbackColors,s=r.level,o=r.size;for(var c=0;cl&&(l=i,a=d(e[c]));return d.isReadable(t,a,{level:s,size:o})||!n?a:(r.includeFallbackColors=!1,d.mostReadable(t,["#fff","#000"],r))};var R=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},O=d.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(R);function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function I(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=c(e,u(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),n.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function M(t){return c(1,u(0,t))}function P(t){return parseInt(t,16)}function N(t){return 1==t.length?"0"+t:""+t}function F(t){return t<=1&&(t=100*t+"%"),t}function B(t){return n.round(255*parseFloat(t)).toString(16)}function j(t){return P(t)/255}var U,H,G,z=(H="[\\s|\\(]+("+(U="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",G="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+G),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+G),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+G),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(t){return!!z.CSS_UNIT.exec(t)}t.exports?t.exports=d:void 0===(i=function(){return d}.call(e,r,e,t))||(t.exports=i)}(Math)},bT9E: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){var r;!function(n){var s=/^\s+/,o=/\s+$/,a=0,l=n.round,c=n.min,u=n.max,h=n.random;function d(t,e){if(e=e||{},(t=t||"")instanceof d)return t;if(!(this instanceof d))return new d(t,e);var i=function(t){var e={r:0,g:0,b:0},i=1,r=null,a=null,l=null,h=!1,d=!1;"string"==typeof t&&(t=function(t){t=t.replace(s,"").replace(o,"").toLowerCase();var e,i=!1;if(R[t])t=R[t],i=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=z.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=z.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=z.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=z.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=z.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=z.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=z.hex8.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),a:j(e[4]),format:i?"name":"hex8"};if(e=z.hex6.exec(t))return{r:P(e[1]),g:P(e[2]),b:P(e[3]),format:i?"name":"hex"};if(e=z.hex4.exec(t))return{r:P(e[1]+""+e[1]),g:P(e[2]+""+e[2]),b:P(e[3]+""+e[3]),a:j(e[4]+""+e[4]),format:i?"name":"hex8"};if(e=z.hex3.exec(t))return{r:P(e[1]+""+e[1]),g:P(e[2]+""+e[2]),b:P(e[3]+""+e[3]),format:i?"name":"hex"};return!1}(t));"object"==typeof t&&(W(t.r)&&W(t.g)&&W(t.b)?(f=t.r,p=t.g,g=t.b,e={r:255*I(f,255),g:255*I(p,255),b:255*I(g,255)},h=!0,d="%"===String(t.r).substr(-1)?"prgb":"rgb"):W(t.h)&&W(t.s)&&W(t.v)?(r=F(t.s),a=F(t.v),e=function(t,e,i){t=6*I(t,360),e=I(e,100),i=I(i,100);var r=n.floor(t),s=t-r,o=i*(1-e),a=i*(1-s*e),l=i*(1-(1-s)*e),c=r%6;return{r:255*[i,a,o,o,l,i][c],g:255*[l,i,i,a,o,o][c],b:255*[o,o,l,i,i,a][c]}}(t.h,r,a),h=!0,d="hsv"):W(t.h)&&W(t.s)&&W(t.l)&&(r=F(t.s),l=F(t.l),e=function(t,e,i){var r,n,s;function o(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}if(t=I(t,360),e=I(e,100),i=I(i,100),0===e)r=n=s=i;else{var a=i<.5?i*(1+e):i+e-i*e,l=2*i-a;r=o(l,a,t+1/3),n=o(l,a,t),s=o(l,a,t-1/3)}return{r:255*r,g:255*n,b:255*s}}(t.h,r,l),h=!0,d="hsl"),t.hasOwnProperty("a")&&(i=t.a));var f,p,g;return i=_(i),{ok:h,format:t.format||d,r:c(255,u(e.r,0)),g:c(255,u(e.g,0)),b:c(255,u(e.b,0)),a:i}}(t);this._originalInput=t,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=l(100*this._a)/100,this._format=e.format||i.format,this._gradientType=e.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=i.ok,this._tc_id=a++}function f(t,e,i){t=I(t,255),e=I(e,255),i=I(i,255);var r,n,s=u(t,e,i),o=c(t,e,i),a=(s+o)/2;if(s==o)r=n=0;else{var l=s-o;switch(n=a>.5?l/(2-s-o):l/(s+o),s){case t:r=(e-i)/l+(e>1)+720)%360;--e;)r.h=(r.h+n)%360,s.push(d(r));return s}function D(t,e){e=e||6;for(var i=d(t).toHsv(),r=i.h,n=i.s,s=i.v,o=[],a=1/e;e--;)o.push(d({h:r,s:n,v:s})),s=(s+a)%1;return o}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,i,r=this.toRgb();return t=r.r/255,e=r.g/255,i=r.b/255,.2126*(t<=.03928?t/12.92:n.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:n.pow((e+.055)/1.055,2.4))+.0722*(i<=.03928?i/12.92:n.pow((i+.055)/1.055,2.4))},setAlpha:function(t){return this._a=_(t),this._roundA=l(100*this._a)/100,this},toHsv:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=p(this._r,this._g,this._b),e=l(360*t.h),i=l(100*t.s),r=l(100*t.v);return 1==this._a?"hsv("+e+", "+i+"%, "+r+"%)":"hsva("+e+", "+i+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=f(this._r,this._g,this._b),e=l(360*t.h),i=l(100*t.s),r=l(100*t.l);return 1==this._a?"hsl("+e+", "+i+"%, "+r+"%)":"hsla("+e+", "+i+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return g(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,i,r,n){var s=[N(l(t).toString(16)),N(l(e).toString(16)),N(l(i).toString(16)),N(B(r))];if(n&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1))return s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0);return s.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*I(this._r,255))+"%",g:l(100*I(this._g,255))+"%",b:l(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%)":"rgba("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(O[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+m(this._r,this._g,this._b,this._a),i=e,r=this._gradientType?"GradientType = 1, ":"";if(t){var n=d(t);i="#"+m(n._r,n._g,n._b,n._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+i+")"},toString:function(t){var e=!!t;t=t||this._format;var i=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(i=this.toRgbString()),"prgb"===t&&(i=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(i=this.toHexString()),"hex3"===t&&(i=this.toHexString(!0)),"hex4"===t&&(i=this.toHex8String(!0)),"hex8"===t&&(i=this.toHex8String()),"name"===t&&(i=this.toName()),"hsl"===t&&(i=this.toHslString()),"hsv"===t&&(i=this.toHsvString()),i||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(t,e){var i=t.apply(null,[this].concat([].slice.call(e)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(S,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(k,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(L,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},d.fromRatio=function(t,e){if("object"==typeof t){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]="a"===r?t[r]:F(t[r]));t=i}return d(t,e)},d.equals=function(t,e){return!(!t||!e)&&d(t).toRgbString()==d(e).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(t,e,i){i=0===i?0:i||50;var r=d(t).toRgb(),n=d(e).toRgb(),s=i/100;return d({r:(n.r-r.r)*s+r.r,g:(n.g-r.g)*s+r.g,b:(n.b-r.b)*s+r.b,a:(n.a-r.a)*s+r.a})},d.readability=function(t,e){var i=d(t),r=d(e);return(n.max(i.getLuminance(),r.getLuminance())+.05)/(n.min(i.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(t,e,i){var r,n,s=d.readability(t,e);switch(n=!1,(r=function(t){var e,i;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),i=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==i&&"large"!==i&&(i="small");return{level:e,size:i}}(i)).level+r.size){case"AAsmall":case"AAAlarge":n=s>=4.5;break;case"AAlarge":n=s>=3;break;case"AAAsmall":n=s>=7}return n},d.mostReadable=function(t,e,i){var r,n,s,o,a=null,l=0;n=(i=i||{}).includeFallbackColors,s=i.level,o=i.size;for(var c=0;cl&&(l=r,a=d(e[c]));return d.isReadable(t,a,{level:s,size:o})||!n?a:(i.includeFallbackColors=!1,d.mostReadable(t,["#fff","#000"],i))};var R=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},O=d.hexNames=function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}(R);function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function I(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var i=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=c(e,u(0,parseFloat(t))),i&&(t=parseInt(t*e,10)/100),n.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function M(t){return c(1,u(0,t))}function P(t){return parseInt(t,16)}function N(t){return 1==t.length?"0"+t:""+t}function F(t){return t<=1&&(t=100*t+"%"),t}function B(t){return n.round(255*parseFloat(t)).toString(16)}function j(t){return P(t)/255}var U,H,G,z=(H="[\\s|\\(]+("+(U="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",G="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+G),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+G),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+G),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(t){return!!z.CSS_UNIT.exec(t)}t.exports?t.exports=d:void 0===(r=function(){return d}.call(e,i,e,t))||(t.exports=r)}(Math)},bT9E: /*!*****************************************!*\ !*** ./node_modules/rc-util/es/omit.js ***! \*****************************************/ /*! exports provided: default */ -/*! exports used: default */function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var i=r(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function n(t,e){var r=Object(i.a)({},t);return Array.isArray(e)&&e.forEach((function(t){delete r[t]})),r}},c5Ni: +/*! exports used: default */function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var r=i(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function n(t,e){var i=Object(r.a)({},t);return Array.isArray(e)&&e.forEach((function(t){delete i[t]})),i}},c5Ni: /*!******************************************************!*\ !*** ./node_modules/codemirror/theme/blackboard.css ***! \******************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){},dejd: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){},dejd: /*!***********************************************************!*\ !*** ./src/components/markdown-editor/toolbar/index.less ***! \***********************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){},dmUQ: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){},dmUQ: /*!**************************************************************!*\ !*** ./node_modules/rc-input-number/es/index.js + 1 modules ***! \**************************************************************/ @@ -292,446 +292,446 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,r){"use strict";var i=r("Ff2n"),n=r("rePB"),s=r("1OyB"),o=r("vuIU"),a=r("Ji7U"),l=r("md7G"),c=r("foSv"),u=r("q1tI"),h=r.n(u),d=r("TSYQ"),f=r.n(d),p=r("4IlW");function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function m(t){for(var e=1;e1?a-1:0),c=1;c1?r-1:0),s=1;s=0)return parseInt(e.slice(e.indexOf("e-")+2),10);var r=0;return e.indexOf(".")>=0&&(r=e.length-e.indexOf(".")-1),r},i.getInputDisplayValue=function(t){var e,r=t||i.state,n=r.focused,s=r.inputValue,o=r.value;null==(e=n?s:i.toPrecisionAsStep(o))&&(e="");var a=i.formatWrapper(e);return S(i.props.decimalSeparator)&&(a=a.toString().replace(".",i.props.decimalSeparator)),a},i.recordCursorPosition=function(){try{i.cursorStart=i.input.selectionStart,i.cursorEnd=i.input.selectionEnd,i.currentValue=i.input.value,i.cursorBefore=i.input.value.substring(0,i.cursorStart),i.cursorAfter=i.input.value.substring(i.cursorEnd)}catch(t){}},i.restoreByAfter=function(t){if(void 0===t)return!1;var e=i.input.value,r=e.lastIndexOf(t);if(-1===r)return!1;var n=i.cursorBefore.length;return i.lastKeyCode===p.a.DELETE&&i.cursorBefore.charAt(n-1)===t[0]?(i.fixCaret(n,n),!0):r+t.length===e.length&&(i.fixCaret(r,r),!0)},i.partRestoreByAfter=function(t){return void 0!==t&&Array.prototype.some.call(t,(function(e,r){var n=t.substring(r);return i.restoreByAfter(n)}))},i.isNotCompleteNumber=function(t){return isNaN(t)||""===t||null===t||t&&t.toString().indexOf(".")===t.toString().length-1},i.stop=function(){i.autoStepTimer&&clearTimeout(i.autoStepTimer)},i.down=function(t,e,r){i.pressingUpOrDown=!0,i.step("down",t,e,r)},i.up=function(t,e,r){i.pressingUpOrDown=!0,i.step("up",t,e,r)},i.saveInput=function(t){i.input=t};var n=t.value;void 0===n&&(n=t.defaultValue),i.state={focused:t.autoFocus};var o=i.getValidValue(i.toNumber(n));return i.state=m(m({},i.state),{},{inputValue:i.toPrecisionAsStep(o),value:o}),i}return Object(o.a)(r,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(t){var e=this.props,r=e.value,i=e.onChange,n=e.max,s=e.min,o=this.state.focused;if(t){if(!C(t.value,r)||!C(t.max,n)||!C(t.min,s)){var a,l=o?r:this.getValidValue(r);a=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:a})}var c="value"in this.props?r:this.state.value;"max"in this.props&&t.max!==n&&"number"==typeof c&&c>n&&i&&i(n),"min"in this.props&&t.min!==s&&"number"==typeof c&&c1&&void 0!==arguments[1]?arguments[1]:this.props.min,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,i=parseFloat(t);return isNaN(i)?t:(ir&&(i=r),i)}},{key:"setValue",value:function(t,e){var r=this.props.precision,i=this.isNotCompleteNumber(parseFloat(t))?null:parseFloat(t),n=this.state.value,s=void 0===n?null:n,o=this.state.inputValue,a=void 0===o?null:o,l="number"==typeof i?i.toFixed(r):"".concat(i),c=i!==s||l!=="".concat(a);return"value"in this.props?(a=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:a},e)):this.setState({value:i,inputValue:this.toPrecisionAsStep(t)},e),c&&this.props.onChange(i),i}},{key:"getMaxPrecision",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.props,i=r.precision,n=r.step;if(S(i))return i;var s=this.getPrecision(e),o=this.getPrecision(n),a=this.getPrecision(t);return t?Math.max(a,s+o):s+o}},{key:"getPrecisionFactor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.getMaxPrecision(t,e);return Math.pow(10,r)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(t){return this.props.formatter?this.props.formatter(t):t}},{key:"toPrecisionAsStep",value:function(t){if(this.isNotCompleteNumber(t)||""===t)return t;var e=Math.abs(this.getMaxPrecision(t));return isNaN(e)?t.toString():Number(t).toFixed(e)}},{key:"toNumber",value:function(t){var e=this.props.precision,r=this.state.focused,i=t&&t.length>16&&r;return this.isNotCompleteNumber(t)||i?t:S(e)?Math.round(t*Math.pow(10,e))/Math.pow(10,e):Number(t)}},{key:"upStep",value:function(t,e){var r=this.props.step,i=this.getPrecisionFactor(t,e),n=Math.abs(this.getMaxPrecision(t,e)),s=((i*t+i*r*e)/i).toFixed(n);return this.toNumber(s)}},{key:"downStep",value:function(t,e){var r=this.props.step,i=this.getPrecisionFactor(t,e),n=Math.abs(this.getMaxPrecision(t,e)),s=((i*t-i*r*e)/i).toFixed(n);return this.toNumber(s)}},{key:"step",value:function(t,e){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0;this.stop(),e&&(e.persist(),e.preventDefault());var s=this.props;if(!s.disabled){var o=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(o)){var a=this["".concat(t,"Step")](o,i),l=a>s.max||as.max?a=s.max:a=p)||s||o,q=(U||0===U)&&(isNaN(U)||Number(U)<=g)||s||o,Y=f()("".concat(r,"-handler"),"".concat(r,"-handler-up"),Object(n.a)({},"".concat(r,"-handler-up-disabled"),K)),X=f()("".concat(r,"-handler"),"".concat(r,"-handler-down"),Object(n.a)({},"".concat(r,"-handler-down-disabled"),q)),$=a?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Z=a?{onTouchStart:q?y:this.down,onTouchEnd:this.stop}:{onMouseDown:q?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:G,style:m,title:v,onMouseEnter:x,onMouseLeave:S,onMouseOver:C,onMouseOut:w,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(r,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:Y}),c||h.a.createElement("span",{unselectable:"on",className:"".concat(r,"-handler-up-inner"),onClick:b})),h.a.createElement("span",Object.assign({unselectable:"on"},Z,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:X}),u||h.a.createElement("span",{unselectable:"on",className:"".concat(r,"-handler-down-inner"),onClick:b}))),h.a.createElement("div",{className:"".concat(r,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":g,"aria-valuemax":p,"aria-valuenow":U,required:k,type:L,placeholder:A,onPaste:N,onClick:E,onMouseUp:this.onMouseUp,className:"".concat(r,"-input"),tabIndex:T,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:W?this.onKeyDown:y,onKeyUp:W?this.onKeyUp:y,autoFocus:M,maxLength:I,readOnly:o,disabled:s,max:p,min:g,step:_,name:P,title:v,id:D,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(V),pattern:O,inputMode:R,onInput:F},z))))}}]),r}(h.a.Component);w.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:y,onKeyDown:y,onPressEnter:y,onFocus:y,onBlur:y,parser:function(t){return t.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var k=w;e.a=k},h78n: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,i){"use strict";var r=i("Ff2n"),n=i("rePB"),s=i("1OyB"),o=i("vuIU"),a=i("Ji7U"),l=i("md7G"),c=i("foSv"),u=i("q1tI"),h=i.n(u),d=i("TSYQ"),f=i.n(d),p=i("4IlW");function g(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function m(t){for(var e=1;e1?a-1:0),c=1;c1?i-1:0),s=1;s=0)return parseInt(e.slice(e.indexOf("e-")+2),10);var i=0;return e.indexOf(".")>=0&&(i=e.length-e.indexOf(".")-1),i},r.getInputDisplayValue=function(t){var e,i=t||r.state,n=i.focused,s=i.inputValue,o=i.value;null==(e=n?s:r.toPrecisionAsStep(o))&&(e="");var a=r.formatWrapper(e);return S(r.props.decimalSeparator)&&(a=a.toString().replace(".",r.props.decimalSeparator)),a},r.recordCursorPosition=function(){try{r.cursorStart=r.input.selectionStart,r.cursorEnd=r.input.selectionEnd,r.currentValue=r.input.value,r.cursorBefore=r.input.value.substring(0,r.cursorStart),r.cursorAfter=r.input.value.substring(r.cursorEnd)}catch(t){}},r.restoreByAfter=function(t){if(void 0===t)return!1;var e=r.input.value,i=e.lastIndexOf(t);if(-1===i)return!1;var n=r.cursorBefore.length;return r.lastKeyCode===p.a.DELETE&&r.cursorBefore.charAt(n-1)===t[0]?(r.fixCaret(n,n),!0):i+t.length===e.length&&(r.fixCaret(i,i),!0)},r.partRestoreByAfter=function(t){return void 0!==t&&Array.prototype.some.call(t,(function(e,i){var n=t.substring(i);return r.restoreByAfter(n)}))},r.isNotCompleteNumber=function(t){return isNaN(t)||""===t||null===t||t&&t.toString().indexOf(".")===t.toString().length-1},r.stop=function(){r.autoStepTimer&&clearTimeout(r.autoStepTimer)},r.down=function(t,e,i){r.pressingUpOrDown=!0,r.step("down",t,e,i)},r.up=function(t,e,i){r.pressingUpOrDown=!0,r.step("up",t,e,i)},r.saveInput=function(t){r.input=t};var n=t.value;void 0===n&&(n=t.defaultValue),r.state={focused:t.autoFocus};var o=r.getValidValue(r.toNumber(n));return r.state=m(m({},r.state),{},{inputValue:r.toPrecisionAsStep(o),value:o}),r}return Object(o.a)(i,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(t){var e=this.props,i=e.value,r=e.onChange,n=e.max,s=e.min,o=this.state.focused;if(t){if(!C(t.value,i)||!C(t.max,n)||!C(t.min,s)){var a,l=o?i:this.getValidValue(i);a=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:a})}var c="value"in this.props?i:this.state.value;"max"in this.props&&t.max!==n&&"number"==typeof c&&c>n&&r&&r(n),"min"in this.props&&t.min!==s&&"number"==typeof c&&c1&&void 0!==arguments[1]?arguments[1]:this.props.min,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,r=parseFloat(t);return isNaN(r)?t:(ri&&(r=i),r)}},{key:"setValue",value:function(t,e){var i=this.props.precision,r=this.isNotCompleteNumber(parseFloat(t))?null:parseFloat(t),n=this.state.value,s=void 0===n?null:n,o=this.state.inputValue,a=void 0===o?null:o,l="number"==typeof r?r.toFixed(i):"".concat(r),c=r!==s||l!=="".concat(a);return"value"in this.props?(a=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:a},e)):this.setState({value:r,inputValue:this.toPrecisionAsStep(t)},e),c&&this.props.onChange(r),r}},{key:"getMaxPrecision",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.props,r=i.precision,n=i.step;if(S(r))return r;var s=this.getPrecision(e),o=this.getPrecision(n),a=this.getPrecision(t);return t?Math.max(a,s+o):s+o}},{key:"getPrecisionFactor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.getMaxPrecision(t,e);return Math.pow(10,i)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(t){return this.props.formatter?this.props.formatter(t):t}},{key:"toPrecisionAsStep",value:function(t){if(this.isNotCompleteNumber(t)||""===t)return t;var e=Math.abs(this.getMaxPrecision(t));return isNaN(e)?t.toString():Number(t).toFixed(e)}},{key:"toNumber",value:function(t){var e=this.props.precision,i=this.state.focused,r=t&&t.length>16&&i;return this.isNotCompleteNumber(t)||r?t:S(e)?Math.round(t*Math.pow(10,e))/Math.pow(10,e):Number(t)}},{key:"upStep",value:function(t,e){var i=this.props.step,r=this.getPrecisionFactor(t,e),n=Math.abs(this.getMaxPrecision(t,e)),s=((r*t+r*i*e)/r).toFixed(n);return this.toNumber(s)}},{key:"downStep",value:function(t,e){var i=this.props.step,r=this.getPrecisionFactor(t,e),n=Math.abs(this.getMaxPrecision(t,e)),s=((r*t-r*i*e)/r).toFixed(n);return this.toNumber(s)}},{key:"step",value:function(t,e){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0;this.stop(),e&&(e.persist(),e.preventDefault());var s=this.props;if(!s.disabled){var o=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(o)){var a=this["".concat(t,"Step")](o,r),l=a>s.max||as.max?a=s.max:a=p)||s||o,q=(U||0===U)&&(isNaN(U)||Number(U)<=g)||s||o,Y=f()("".concat(i,"-handler"),"".concat(i,"-handler-up"),Object(n.a)({},"".concat(i,"-handler-up-disabled"),K)),X=f()("".concat(i,"-handler"),"".concat(i,"-handler-down"),Object(n.a)({},"".concat(i,"-handler-down-disabled"),q)),$=a?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Z=a?{onTouchStart:q?y:this.down,onTouchEnd:this.stop}:{onMouseDown:q?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:G,style:m,title:v,onMouseEnter:x,onMouseLeave:S,onMouseOver:C,onMouseOut:w,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(i,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:Y}),c||h.a.createElement("span",{unselectable:"on",className:"".concat(i,"-handler-up-inner"),onClick:b})),h.a.createElement("span",Object.assign({unselectable:"on"},Z,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:X}),u||h.a.createElement("span",{unselectable:"on",className:"".concat(i,"-handler-down-inner"),onClick:b}))),h.a.createElement("div",{className:"".concat(i,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":g,"aria-valuemax":p,"aria-valuenow":U,required:k,type:L,placeholder:A,onPaste:N,onClick:E,onMouseUp:this.onMouseUp,className:"".concat(i,"-input"),tabIndex:T,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:W?this.onKeyDown:y,onKeyUp:W?this.onKeyUp:y,autoFocus:M,maxLength:I,readOnly:o,disabled:s,max:p,min:g,step:_,name:P,title:v,id:D,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(V),pattern:O,inputMode:R,onInput:F},z))))}}]),i}(h.a.Component);w.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:y,onKeyDown:y,onPressEnter:y,onFocus:y,onBlur:y,parser:function(t){return t.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var k=w;e.a=k},h78n: /*!**********************************************************!*\ !*** ./node_modules/rc-progress/es/index.js + 3 modules ***! \**********************************************************/ /*! exports provided: Line, Circle, default */ /*! exports used: Circle */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,r){"use strict";r.d(e,"a",(function(){return w}));var i=r("q1tI"),n=r.n(i),s=r("TSYQ"),o=r.n(s),a={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},l=function(t){var e=t.map((function(){return Object(i.useRef)()})),r=Object(i.useRef)();return Object(i.useEffect)((function(){var t=Date.now(),i=!1;Object.keys(e).forEach((function(n){var s=e[n].current;if(s){i=!0;var o=s.style;o.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(o.transitionDuration="0s, 0s")}})),i&&(r.current=Date.now())})),[e]};function c(){return(c=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,i=new Array(e);r=0||(n[r]=t[r]);return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var f=function(t){var e=t.className,r=t.percent,i=t.prefixCls,s=t.strokeColor,a=t.strokeLinecap,h=t.strokeWidth,f=t.style,p=t.trailColor,g=t.trailWidth,m=t.transition,v=d(t,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete v.gapPosition;var y=Array.isArray(r)?r:[r],b=Array.isArray(s)?s:[s],x=u(l(y),1)[0],S=h/2,C=100-h/2,w="M ".concat("round"===a?S:0,",").concat(S,"\n L ").concat("round"===a?C:100,",").concat(S),k="0 0 100 ".concat(h),E=0;return n.a.createElement("svg",c({className:o()("".concat(i,"-line"),e),viewBox:k,preserveAspectRatio:"none",style:f},v),n.a.createElement("path",{className:"".concat(i,"-line-trail"),d:w,strokeLinecap:a,stroke:p,strokeWidth:g||h,fillOpacity:"0"}),y.map((function(t,e){var r={strokeDasharray:"".concat(t,"px, 100px"),strokeDashoffset:"-".concat(E,"px"),transition:m||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},s=b[e]||b[b.length-1];return E+=t,n.a.createElement("path",{key:e,className:"".concat(i,"-line-path"),d:w,strokeLinecap:a,stroke:s,strokeWidth:h,fillOpacity:"0",ref:x[e],style:r})})))};f.defaultProps=a;function p(){return(p=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,i=new Array(e);r=0||(n[r]=t[r]);return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var y=0;function b(t){return+t.replace("%","")}function x(t){return Array.isArray(t)?t:[t]}function S(t,e,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5?arguments[5]:void 0,o=50-i/2,a=0,l=-o,c=0,u=-2*o;switch(s){case"left":a=-o,l=0,c=2*o,u=0;break;case"right":a=o,l=0,c=-2*o,u=0;break;case"bottom":l=o,u=2*o}var h="M 50,50 m ".concat(a,",").concat(l,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(c,",").concat(-u,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(-c,",").concat(u),d=2*Math.PI*o,f={stroke:r,strokeDasharray:"".concat(e/100*(d-n),"px ").concat(d,"px"),strokeDashoffset:"-".concat(n/2+t/100*(d-n),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:h,pathStyle:f}}var C=function(t){var e,r=t.prefixCls,s=t.strokeWidth,a=t.trailWidth,c=t.gapDegree,u=t.gapPosition,h=t.trailColor,d=t.strokeLinecap,f=t.style,m=t.className,C=t.strokeColor,w=t.percent,k=v(t,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),E=Object(i.useMemo)((function(){return y+=1}),[]),T=S(0,100,h,s,c,u),L=T.pathString,A=T.pathStyle,D=x(w),R=x(C),O=R.find((function(t){return"[object Object]"===Object.prototype.toString.call(t)})),_=g(l(D),1)[0];return n.a.createElement("svg",p({className:o()("".concat(r,"-circle"),m),viewBox:"0 0 100 100",style:f},k),O&&n.a.createElement("defs",null,n.a.createElement("linearGradient",{id:"".concat(r,"-gradient-").concat(E),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(O).sort((function(t,e){return b(t)-b(e)})).map((function(t,e){return n.a.createElement("stop",{key:e,offset:t,stopColor:O[t]})})))),n.a.createElement("path",{className:"".concat(r,"-circle-trail"),d:L,stroke:h,strokeLinecap:d,strokeWidth:a||s,fillOpacity:"0",style:A}),(e=0,D.map((function(t,i){var o=R[i]||R[R.length-1],a="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(r,"-gradient-").concat(E,")"):"",l=S(e,t,o,s,c,u);return e+=t,n.a.createElement("path",{key:i,className:"".concat(r,"-circle-path"),d:l.pathString,stroke:a,strokeLinecap:d,strokeWidth:s,opacity:0===t?0:1,fillOpacity:"0",style:l.pathStyle,ref:_[i]})}))).reverse())};C.defaultProps=a;var w=C},kSUc: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(t,e,i){"use strict";i.d(e,"a",(function(){return w}));var r=i("q1tI"),n=i.n(r),s=i("TSYQ"),o=i.n(s),a={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},l=function(t){var e=t.map((function(){return Object(r.useRef)()})),i=Object(r.useRef)();return Object(r.useEffect)((function(){var t=Date.now(),r=!1;Object.keys(e).forEach((function(n){var s=e[n].current;if(s){r=!0;var o=s.style;o.transitionDuration=".3s, .3s, .3s, .06s",i.current&&t-i.current<100&&(o.transitionDuration="0s, 0s")}})),r&&(i.current=Date.now())})),[e]};function c(){return(c=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var i=0,r=new Array(e);i=0||(n[i]=t[i]);return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}var f=function(t){var e=t.className,i=t.percent,r=t.prefixCls,s=t.strokeColor,a=t.strokeLinecap,h=t.strokeWidth,f=t.style,p=t.trailColor,g=t.trailWidth,m=t.transition,v=d(t,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete v.gapPosition;var y=Array.isArray(i)?i:[i],b=Array.isArray(s)?s:[s],x=u(l(y),1)[0],S=h/2,C=100-h/2,w="M ".concat("round"===a?S:0,",").concat(S,"\n L ").concat("round"===a?C:100,",").concat(S),k="0 0 100 ".concat(h),E=0;return n.a.createElement("svg",c({className:o()("".concat(r,"-line"),e),viewBox:k,preserveAspectRatio:"none",style:f},v),n.a.createElement("path",{className:"".concat(r,"-line-trail"),d:w,strokeLinecap:a,stroke:p,strokeWidth:g||h,fillOpacity:"0"}),y.map((function(t,e){var i={strokeDasharray:"".concat(t,"px, 100px"),strokeDashoffset:"-".concat(E,"px"),transition:m||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},s=b[e]||b[b.length-1];return E+=t,n.a.createElement("path",{key:e,className:"".concat(r,"-line-path"),d:w,strokeLinecap:a,stroke:s,strokeWidth:h,fillOpacity:"0",ref:x[e],style:i})})))};f.defaultProps=a;function p(){return(p=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var i=0,r=new Array(e);i=0||(n[i]=t[i]);return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}var y=0;function b(t){return+t.replace("%","")}function x(t){return Array.isArray(t)?t:[t]}function S(t,e,i,r){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5?arguments[5]:void 0,o=50-r/2,a=0,l=-o,c=0,u=-2*o;switch(s){case"left":a=-o,l=0,c=2*o,u=0;break;case"right":a=o,l=0,c=-2*o,u=0;break;case"bottom":l=o,u=2*o}var h="M 50,50 m ".concat(a,",").concat(l,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(c,",").concat(-u,"\n a ").concat(o,",").concat(o," 0 1 1 ").concat(-c,",").concat(u),d=2*Math.PI*o,f={stroke:i,strokeDasharray:"".concat(e/100*(d-n),"px ").concat(d,"px"),strokeDashoffset:"-".concat(n/2+t/100*(d-n),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:h,pathStyle:f}}var C=function(t){var e,i=t.prefixCls,s=t.strokeWidth,a=t.trailWidth,c=t.gapDegree,u=t.gapPosition,h=t.trailColor,d=t.strokeLinecap,f=t.style,m=t.className,C=t.strokeColor,w=t.percent,k=v(t,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),E=Object(r.useMemo)((function(){return y+=1}),[]),T=S(0,100,h,s,c,u),L=T.pathString,A=T.pathStyle,D=x(w),R=x(C),O=R.find((function(t){return"[object Object]"===Object.prototype.toString.call(t)})),_=g(l(D),1)[0];return n.a.createElement("svg",p({className:o()("".concat(i,"-circle"),m),viewBox:"0 0 100 100",style:f},k),O&&n.a.createElement("defs",null,n.a.createElement("linearGradient",{id:"".concat(i,"-gradient-").concat(E),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(O).sort((function(t,e){return b(t)-b(e)})).map((function(t,e){return n.a.createElement("stop",{key:e,offset:t,stopColor:O[t]})})))),n.a.createElement("path",{className:"".concat(i,"-circle-trail"),d:L,stroke:h,strokeLinecap:d,strokeWidth:a||s,fillOpacity:"0",style:A}),(e=0,D.map((function(t,r){var o=R[r]||R[R.length-1],a="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(i,"-gradient-").concat(E,")"):"",l=S(e,t,o,s,c,u);return e+=t,n.a.createElement("path",{key:r,className:"".concat(i,"-circle-path"),d:l.pathString,stroke:a,strokeLinecap:d,strokeWidth:s,opacity:0===t?0:1,fillOpacity:"0",style:l.pathStyle,ref:_[r]})}))).reverse())};C.defaultProps=a;var w=C},kSUc: /*!***************************************************!*\ !*** ./src/components/markdown-editor/index.less ***! \***************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){},lZu9: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){},lZu9: /*!***********************************************************!*\ !*** ./node_modules/codemirror/mode/markdown/markdown.js ***! \***********************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){"use strict";t.defineMode("markdown",(function(e,r){var i=t.getMode(e,"text/html"),n="null"==i.name;void 0===r.highlightFormatting&&(r.highlightFormatting=!1),void 0===r.maxBlockquoteDepth&&(r.maxBlockquoteDepth=0),void 0===r.taskLists&&(r.taskLists=!1),void 0===r.strikethrough&&(r.strikethrough=!1),void 0===r.emoji&&(r.emoji=!1),void 0===r.fencedCodeBlockHighlighting&&(r.fencedCodeBlockHighlighting=!0),void 0===r.fencedCodeBlockDefaultMode&&(r.fencedCodeBlockDefaultMode="text/plain"),void 0===r.xml&&(r.xml=!0),void 0===r.tokenTypeOverrides&&(r.tokenTypeOverrides={});var s={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var o in s)s.hasOwnProperty(o)&&r.tokenTypeOverrides[o]&&(s[o]=r.tokenTypeOverrides[o]);var a=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=r.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,d=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function m(t,e,r){return e.f=e.inline=r,r(t,e)}function v(t,e,r){return e.f=e.block=r,r(t,e)}function y(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==x){var r=n;if(!r){var s=t.innerMode(i,e.htmlState);r="xml"==s.mode.name&&null===s.state.tagStart&&!s.state.context&&s.state.tokenize.isInText}r&&(e.f=k,e.block=b,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function b(i,n){var o,d=i.column()===n.indentation,g=!(o=n.prevLine.stream)||!/\S/.test(o.string),v=n.indentedCode,y=n.prevLine.hr,b=!1!==n.list,x=(n.listStack[n.listStack.length-1]||0)+3;n.indentedCode=!1;var w=n.indentation;if(null===n.indentationDiff&&(n.indentationDiff=n.indentation,b)){for(n.list=null;w=4&&(v||n.prevLine.fencedCodeEnd||n.prevLine.header||g))return i.skipToEnd(),n.indentedCode=!0,s.code;if(i.eatSpace())return null;if(d&&n.indentation<=x&&(T=i.match(u))&&T[1].length<=6)return n.quote=0,n.header=T[1].length,n.thisLine.header=!0,r.highlightFormatting&&(n.formatting="header"),n.f=n.inline,C(n);if(n.indentation<=x&&i.eat(">"))return n.quote=d?1:n.quote+1,r.highlightFormatting&&(n.formatting="quote"),i.eatSpace(),C(n);if(!E&&!n.setext&&d&&n.indentation<=x&&(T=i.match(l))){var L=T[1]?"ol":"ul";return n.indentation=w+i.current().length,n.list=!0,n.quote=0,n.listStack.push(n.indentation),n.em=!1,n.strong=!1,n.code=!1,n.strikethrough=!1,r.taskLists&&i.match(c,!1)&&(n.taskList=!0),n.f=n.inline,r.highlightFormatting&&(n.formatting=["list","list-"+L]),C(n)}return d&&n.indentation<=x&&(T=i.match(f,!0))?(n.quote=0,n.fencedEndRE=new RegExp(T[1]+"+ *$"),n.localMode=r.fencedCodeBlockHighlighting&&function(r){if(t.findModeByName){var i=t.findModeByName(r);i&&(r=i.mime||i.mimes[0])}var n=t.getMode(e,r);return"null"==n.name?null:n}(T[2]||r.fencedCodeBlockDefaultMode),n.localMode&&(n.localState=t.startState(n.localMode)),n.f=n.block=S,r.highlightFormatting&&(n.formatting="code-block"),n.code=-1,C(n)):n.setext||!(k&&b||n.quote||!1!==n.list||n.code||E||p.test(i.string))&&(T=i.lookAhead(1))&&(T=T.match(h))?(n.setext?(n.header=n.setext,n.setext=0,i.skipToEnd(),r.highlightFormatting&&(n.formatting="header")):(n.header="="==T[0].charAt(0)?1:2,n.setext=n.header),n.thisLine.header=!0,n.f=n.inline,C(n)):E?(i.skipToEnd(),n.hr=!0,n.thisLine.hr=!0,s.hr):"["===i.peek()?m(i,n,A):m(i,n,n.inline)}function x(e,r){var s=i.token(e,r.htmlState);if(!n){var o=t.innerMode(i,r.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||r.md_inside&&e.current().indexOf(">")>-1)&&(r.f=k,r.block=b,r.htmlState=null)}return s}function S(t,e){var i,n=e.listStack[e.listStack.length-1]||0,o=e.indentation=t.quote?e.push(s.formatting+"-"+t.formatting[i]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(s.linkHref,"url"):(t.strong&&e.push(s.strong),t.em&&e.push(s.em),t.strikethrough&&e.push(s.strikethrough),t.emoji&&e.push(s.emoji),t.linkText&&e.push(s.linkText),t.code&&e.push(s.code),t.image&&e.push(s.image),t.imageAltText&&e.push(s.imageAltText,"link"),t.imageMarker&&e.push(s.imageMarker)),t.header&&e.push(s.header,s.header+"-"+t.header),t.quote&&(e.push(s.quote),!r.maxBlockquoteDepth||r.maxBlockquoteDepth>=t.quote?e.push(s.quote+"-"+t.quote):e.push(s.quote+"-"+r.maxBlockquoteDepth)),!1!==t.list){var n=(t.listStack.length-1)%3;n?1===n?e.push(s.list2):e.push(s.list3):e.push(s.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function w(t,e){if(t.match(d,!0))return C(e)}function k(e,n){var o=n.text(e,n);if(void 0!==o)return o;if(n.list)return n.list=null,C(n);if(n.taskList)return" "===e.match(c,!0)[1]?n.taskOpen=!0:n.taskClosed=!0,r.highlightFormatting&&(n.formatting="task"),n.taskList=!1,C(n);if(n.taskOpen=!1,n.taskClosed=!1,n.header&&e.match(/^#+$/,!0))return r.highlightFormatting&&(n.formatting="header"),C(n);var a=e.next();if(n.linkTitle){n.linkTitle=!1;var l=a;"("===a&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(e.match(new RegExp(u),!0))return s.linkHref}if("`"===a){var h=n.formatting;r.highlightFormatting&&(n.formatting="code"),e.eatWhile("`");var d=e.current().length;if(0!=n.code||n.quote&&1!=d){if(d==n.code){var f=C(n);return n.code=0,f}return n.formatting=h,C(n)}return n.code=d,C(n)}if(n.code)return C(n);if("\\"===a&&(e.next(),r.highlightFormatting)){var p=C(n),m=s.formatting+"-escape";return p?p+" "+m:m}if("!"===a&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return n.imageMarker=!0,n.image=!0,r.highlightFormatting&&(n.formatting="image"),C(n);if("["===a&&n.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return n.imageMarker=!1,n.imageAltText=!0,r.highlightFormatting&&(n.formatting="image"),C(n);if("]"===a&&n.imageAltText){r.highlightFormatting&&(n.formatting="image");var p=C(n);return n.imageAltText=!1,n.image=!1,n.inline=n.f=T,p}if("["===a&&!n.image)return n.linkText&&e.match(/^.*?\]/)||(n.linkText=!0,r.highlightFormatting&&(n.formatting="link")),C(n);if("]"===a&&n.linkText){r.highlightFormatting&&(n.formatting="link");var p=C(n);return n.linkText=!1,n.inline=n.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?T:k,p}if("<"===a&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=E,r.highlightFormatting&&(n.formatting="link"),(p=C(n))?p+=" ":p="",p+s.linkInline;if("<"===a&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=E,r.highlightFormatting&&(n.formatting="link"),(p=C(n))?p+=" ":p="",p+s.linkEmail;if(r.xml&&"<"===a&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=e.string.indexOf(">",e.pos);if(-1!=y){var b=e.string.substring(e.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(n.md_inside=!0)}return e.backUp(1),n.htmlState=t.startState(i),v(e,n,x)}if(r.xml&&"<"===a&&e.match(/^\/\w*?>/))return n.md_inside=!1,"tag";if("*"===a||"_"===a){for(var S=1,w=1==e.pos?" ":e.string.charAt(e.pos-2);S<3&&e.eat(a);)S++;var L=e.peek()||" ",A=!/\s/.test(L)&&(!g.test(L)||/\s/.test(w)||g.test(w)),D=!/\s/.test(w)&&(!g.test(w)||/\s/.test(L)||g.test(L)),R=null,O=null;if(S%2&&(n.em||!A||"*"!==a&&D&&!g.test(w)?n.em!=a||!D||"*"!==a&&A&&!g.test(L)||(R=!1):R=!0),S>1&&(n.strong||!A||"*"!==a&&D&&!g.test(w)?n.strong!=a||!D||"*"!==a&&A&&!g.test(L)||(O=!1):O=!0),null!=O||null!=R)return r.highlightFormatting&&(n.formatting=null==R?"strong":null==O?"em":"strong em"),!0===R&&(n.em=a),!0===O&&(n.strong=a),f=C(n),!1===R&&(n.em=!1),!1===O&&(n.strong=!1),f}else if(" "===a&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return C(n);e.backUp(1)}if(r.strikethrough)if("~"===a&&e.eatWhile(a)){if(n.strikethrough)return r.highlightFormatting&&(n.formatting="strikethrough"),f=C(n),n.strikethrough=!1,f;if(e.match(/^[^\s]/,!1))return n.strikethrough=!0,r.highlightFormatting&&(n.formatting="strikethrough"),C(n)}else if(" "===a&&e.match(/^~~/,!0)){if(" "===e.peek())return C(n);e.backUp(2)}if(r.emoji&&":"===a&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){n.emoji=!0,r.highlightFormatting&&(n.formatting="emoji");var _=C(n);return n.emoji=!1,_}return" "===a&&(e.match(/^ +$/,!1)?n.trailingSpace++:n.trailingSpace&&(n.trailingSpaceNewLine=!0)),C(n)}function E(t,e){if(">"===t.next()){e.f=e.inline=k,r.highlightFormatting&&(e.formatting="link");var i=C(e);return i?i+=" ":i="",i+s.linkInline}return t.match(/^[^>]+/,!0),s.linkInline}function T(t,e){if(t.eatSpace())return null;var i,n=t.next();return"("===n||"["===n?(e.f=e.inline=(i="("===n?")":"]",function(t,e){if(t.next()===i){e.f=e.inline=k,r.highlightFormatting&&(e.formatting="link-string");var n=C(e);return e.linkHref=!1,n}return t.match(L[i]),e.linkHref=!0,C(e)}),r.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,C(e)):"error"}var L={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function A(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=D,t.next(),r.highlightFormatting&&(e.formatting="link"),e.linkText=!0,C(e)):m(t,e,k)}function D(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=R,r.highlightFormatting&&(e.formatting="link");var i=C(e);return e.linkText=!1,i}return t.match(/^([^\]\\]|\\.)+/,!0),s.linkText}function R(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=k,s.linkHref+" url")}var O={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:k,text:w,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(i,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine.stream){if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0))return y(e),null;if(e.prevLine=e.thisLine,e.thisLine={stream:t},e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,!e.localState&&(e.f=e.block,e.f!=x)){var r=t.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(e.indentation=r,e.indentationDiff=null,r>0)return null}}return e.f(t,e)},innerMode:function(t){return t.block==x?{state:t.htmlState,mode:i}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:O}},indent:function(e,r,n){return e.block==x&&i.indent?i.indent(e.htmlState,r,n):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,r,n):t.Pass},blankLine:y,getType:C,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return O}),"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")}(r(/*! ../../lib/codemirror */"VrN/"),r(/*! ../xml/xml */"1eCo"),r(/*! ../meta */"8EBN"))},osHv: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){!function(t){"use strict";t.defineMode("markdown",(function(e,i){var r=t.getMode(e,"text/html"),n="null"==r.name;void 0===i.highlightFormatting&&(i.highlightFormatting=!1),void 0===i.maxBlockquoteDepth&&(i.maxBlockquoteDepth=0),void 0===i.taskLists&&(i.taskLists=!1),void 0===i.strikethrough&&(i.strikethrough=!1),void 0===i.emoji&&(i.emoji=!1),void 0===i.fencedCodeBlockHighlighting&&(i.fencedCodeBlockHighlighting=!0),void 0===i.fencedCodeBlockDefaultMode&&(i.fencedCodeBlockDefaultMode="text/plain"),void 0===i.xml&&(i.xml=!0),void 0===i.tokenTypeOverrides&&(i.tokenTypeOverrides={});var s={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var o in s)s.hasOwnProperty(o)&&i.tokenTypeOverrides[o]&&(s[o]=i.tokenTypeOverrides[o]);var a=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=i.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,d=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function m(t,e,i){return e.f=e.inline=i,i(t,e)}function v(t,e,i){return e.f=e.block=i,i(t,e)}function y(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==x){var i=n;if(!i){var s=t.innerMode(r,e.htmlState);i="xml"==s.mode.name&&null===s.state.tagStart&&!s.state.context&&s.state.tokenize.isInText}i&&(e.f=k,e.block=b,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function b(r,n){var o,d=r.column()===n.indentation,g=!(o=n.prevLine.stream)||!/\S/.test(o.string),v=n.indentedCode,y=n.prevLine.hr,b=!1!==n.list,x=(n.listStack[n.listStack.length-1]||0)+3;n.indentedCode=!1;var w=n.indentation;if(null===n.indentationDiff&&(n.indentationDiff=n.indentation,b)){for(n.list=null;w=4&&(v||n.prevLine.fencedCodeEnd||n.prevLine.header||g))return r.skipToEnd(),n.indentedCode=!0,s.code;if(r.eatSpace())return null;if(d&&n.indentation<=x&&(T=r.match(u))&&T[1].length<=6)return n.quote=0,n.header=T[1].length,n.thisLine.header=!0,i.highlightFormatting&&(n.formatting="header"),n.f=n.inline,C(n);if(n.indentation<=x&&r.eat(">"))return n.quote=d?1:n.quote+1,i.highlightFormatting&&(n.formatting="quote"),r.eatSpace(),C(n);if(!E&&!n.setext&&d&&n.indentation<=x&&(T=r.match(l))){var L=T[1]?"ol":"ul";return n.indentation=w+r.current().length,n.list=!0,n.quote=0,n.listStack.push(n.indentation),n.em=!1,n.strong=!1,n.code=!1,n.strikethrough=!1,i.taskLists&&r.match(c,!1)&&(n.taskList=!0),n.f=n.inline,i.highlightFormatting&&(n.formatting=["list","list-"+L]),C(n)}return d&&n.indentation<=x&&(T=r.match(f,!0))?(n.quote=0,n.fencedEndRE=new RegExp(T[1]+"+ *$"),n.localMode=i.fencedCodeBlockHighlighting&&function(i){if(t.findModeByName){var r=t.findModeByName(i);r&&(i=r.mime||r.mimes[0])}var n=t.getMode(e,i);return"null"==n.name?null:n}(T[2]||i.fencedCodeBlockDefaultMode),n.localMode&&(n.localState=t.startState(n.localMode)),n.f=n.block=S,i.highlightFormatting&&(n.formatting="code-block"),n.code=-1,C(n)):n.setext||!(k&&b||n.quote||!1!==n.list||n.code||E||p.test(r.string))&&(T=r.lookAhead(1))&&(T=T.match(h))?(n.setext?(n.header=n.setext,n.setext=0,r.skipToEnd(),i.highlightFormatting&&(n.formatting="header")):(n.header="="==T[0].charAt(0)?1:2,n.setext=n.header),n.thisLine.header=!0,n.f=n.inline,C(n)):E?(r.skipToEnd(),n.hr=!0,n.thisLine.hr=!0,s.hr):"["===r.peek()?m(r,n,A):m(r,n,n.inline)}function x(e,i){var s=r.token(e,i.htmlState);if(!n){var o=t.innerMode(r,i.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||i.md_inside&&e.current().indexOf(">")>-1)&&(i.f=k,i.block=b,i.htmlState=null)}return s}function S(t,e){var r,n=e.listStack[e.listStack.length-1]||0,o=e.indentation=t.quote?e.push(s.formatting+"-"+t.formatting[r]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(s.linkHref,"url"):(t.strong&&e.push(s.strong),t.em&&e.push(s.em),t.strikethrough&&e.push(s.strikethrough),t.emoji&&e.push(s.emoji),t.linkText&&e.push(s.linkText),t.code&&e.push(s.code),t.image&&e.push(s.image),t.imageAltText&&e.push(s.imageAltText,"link"),t.imageMarker&&e.push(s.imageMarker)),t.header&&e.push(s.header,s.header+"-"+t.header),t.quote&&(e.push(s.quote),!i.maxBlockquoteDepth||i.maxBlockquoteDepth>=t.quote?e.push(s.quote+"-"+t.quote):e.push(s.quote+"-"+i.maxBlockquoteDepth)),!1!==t.list){var n=(t.listStack.length-1)%3;n?1===n?e.push(s.list2):e.push(s.list3):e.push(s.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function w(t,e){if(t.match(d,!0))return C(e)}function k(e,n){var o=n.text(e,n);if(void 0!==o)return o;if(n.list)return n.list=null,C(n);if(n.taskList)return" "===e.match(c,!0)[1]?n.taskOpen=!0:n.taskClosed=!0,i.highlightFormatting&&(n.formatting="task"),n.taskList=!1,C(n);if(n.taskOpen=!1,n.taskClosed=!1,n.header&&e.match(/^#+$/,!0))return i.highlightFormatting&&(n.formatting="header"),C(n);var a=e.next();if(n.linkTitle){n.linkTitle=!1;var l=a;"("===a&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(e.match(new RegExp(u),!0))return s.linkHref}if("`"===a){var h=n.formatting;i.highlightFormatting&&(n.formatting="code"),e.eatWhile("`");var d=e.current().length;if(0!=n.code||n.quote&&1!=d){if(d==n.code){var f=C(n);return n.code=0,f}return n.formatting=h,C(n)}return n.code=d,C(n)}if(n.code)return C(n);if("\\"===a&&(e.next(),i.highlightFormatting)){var p=C(n),m=s.formatting+"-escape";return p?p+" "+m:m}if("!"===a&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return n.imageMarker=!0,n.image=!0,i.highlightFormatting&&(n.formatting="image"),C(n);if("["===a&&n.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return n.imageMarker=!1,n.imageAltText=!0,i.highlightFormatting&&(n.formatting="image"),C(n);if("]"===a&&n.imageAltText){i.highlightFormatting&&(n.formatting="image");var p=C(n);return n.imageAltText=!1,n.image=!1,n.inline=n.f=T,p}if("["===a&&!n.image)return n.linkText&&e.match(/^.*?\]/)||(n.linkText=!0,i.highlightFormatting&&(n.formatting="link")),C(n);if("]"===a&&n.linkText){i.highlightFormatting&&(n.formatting="link");var p=C(n);return n.linkText=!1,n.inline=n.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?T:k,p}if("<"===a&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=E,i.highlightFormatting&&(n.formatting="link"),(p=C(n))?p+=" ":p="",p+s.linkInline;if("<"===a&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=E,i.highlightFormatting&&(n.formatting="link"),(p=C(n))?p+=" ":p="",p+s.linkEmail;if(i.xml&&"<"===a&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=e.string.indexOf(">",e.pos);if(-1!=y){var b=e.string.substring(e.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(n.md_inside=!0)}return e.backUp(1),n.htmlState=t.startState(r),v(e,n,x)}if(i.xml&&"<"===a&&e.match(/^\/\w*?>/))return n.md_inside=!1,"tag";if("*"===a||"_"===a){for(var S=1,w=1==e.pos?" ":e.string.charAt(e.pos-2);S<3&&e.eat(a);)S++;var L=e.peek()||" ",A=!/\s/.test(L)&&(!g.test(L)||/\s/.test(w)||g.test(w)),D=!/\s/.test(w)&&(!g.test(w)||/\s/.test(L)||g.test(L)),R=null,O=null;if(S%2&&(n.em||!A||"*"!==a&&D&&!g.test(w)?n.em!=a||!D||"*"!==a&&A&&!g.test(L)||(R=!1):R=!0),S>1&&(n.strong||!A||"*"!==a&&D&&!g.test(w)?n.strong!=a||!D||"*"!==a&&A&&!g.test(L)||(O=!1):O=!0),null!=O||null!=R)return i.highlightFormatting&&(n.formatting=null==R?"strong":null==O?"em":"strong em"),!0===R&&(n.em=a),!0===O&&(n.strong=a),f=C(n),!1===R&&(n.em=!1),!1===O&&(n.strong=!1),f}else if(" "===a&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return C(n);e.backUp(1)}if(i.strikethrough)if("~"===a&&e.eatWhile(a)){if(n.strikethrough)return i.highlightFormatting&&(n.formatting="strikethrough"),f=C(n),n.strikethrough=!1,f;if(e.match(/^[^\s]/,!1))return n.strikethrough=!0,i.highlightFormatting&&(n.formatting="strikethrough"),C(n)}else if(" "===a&&e.match(/^~~/,!0)){if(" "===e.peek())return C(n);e.backUp(2)}if(i.emoji&&":"===a&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){n.emoji=!0,i.highlightFormatting&&(n.formatting="emoji");var _=C(n);return n.emoji=!1,_}return" "===a&&(e.match(/^ +$/,!1)?n.trailingSpace++:n.trailingSpace&&(n.trailingSpaceNewLine=!0)),C(n)}function E(t,e){if(">"===t.next()){e.f=e.inline=k,i.highlightFormatting&&(e.formatting="link");var r=C(e);return r?r+=" ":r="",r+s.linkInline}return t.match(/^[^>]+/,!0),s.linkInline}function T(t,e){if(t.eatSpace())return null;var r,n=t.next();return"("===n||"["===n?(e.f=e.inline=(r="("===n?")":"]",function(t,e){if(t.next()===r){e.f=e.inline=k,i.highlightFormatting&&(e.formatting="link-string");var n=C(e);return e.linkHref=!1,n}return t.match(L[r]),e.linkHref=!0,C(e)}),i.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,C(e)):"error"}var L={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function A(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=D,t.next(),i.highlightFormatting&&(e.formatting="link"),e.linkText=!0,C(e)):m(t,e,k)}function D(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=R,i.highlightFormatting&&(e.formatting="link");var r=C(e);return e.linkText=!1,r}return t.match(/^([^\]\\]|\\.)+/,!0),s.linkText}function R(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=k,s.linkHref+" url")}var O={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:k,text:w,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(r,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine.stream){if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0))return y(e),null;if(e.prevLine=e.thisLine,e.thisLine={stream:t},e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,!e.localState&&(e.f=e.block,e.f!=x)){var i=t.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(e.indentation=i,e.indentationDiff=null,i>0)return null}}return e.f(t,e)},innerMode:function(t){return t.block==x?{state:t.htmlState,mode:r}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:O}},indent:function(e,i,n){return e.block==x&&r.indent?r.indent(e.htmlState,i,n):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,i,n):t.Pass},blankLine:y,getType:C,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return O}),"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")}(i(/*! ../../lib/codemirror */"VrN/"),i(/*! ../xml/xml */"1eCo"),i(/*! ../meta */"8EBN"))},osHv: /*!********************************************************!*\ !*** ./node_modules/codemirror/addon/fold/xml-fold.js ***! \********************************************************/ /*! no static exports found */ /*! all exports used */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){!function(t){"use strict";var e=t.Pos;function r(t,e){return t.line-e.line||t.ch-e.ch}var i="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("<(/?)(["+i+"]["+i+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function s(t,e,r,i){this.line=e,this.ch=r,this.cm=t,this.text=t.getLine(e),this.min=i?Math.max(i.from,t.firstLine()):t.firstLine(),this.max=i?Math.min(i.to-1,t.lastLine()):t.lastLine()}function o(t,r){var i=t.cm.getTokenTypeAt(e(t.line,r));return i&&/\btag\b/.test(i)}function a(t){if(!(t.line>=t.max))return t.ch=0,t.text=t.cm.getLine(++t.line),!0}function l(t){if(!(t.line<=t.min))return t.text=t.cm.getLine(--t.line),t.ch=t.text.length,!0}function c(t){for(;;){var e=t.text.indexOf(">",t.ch);if(-1==e){if(a(t))continue;return}if(o(t,e+1)){var r=t.text.lastIndexOf("/",e),i=r>-1&&!/\S/.test(t.text.slice(r+1,e));return t.ch=e+1,i?"selfClose":"regular"}t.ch=e+1}}function u(t){for(;;){var e=t.ch?t.text.lastIndexOf("<",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(o(t,e+1)){n.lastIndex=e,t.ch=e;var r=n.exec(t.text);if(r&&r.index==e)return r}else t.ch=e}}function h(t){for(;;){n.lastIndex=t.ch;var e=n.exec(t.text);if(!e){if(a(t))continue;return}if(o(t,e.index+1))return t.ch=e.index+e[0].length,e;t.ch=e.index+1}}function d(t){for(;;){var e=t.ch?t.text.lastIndexOf(">",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(o(t,e+1)){var r=t.text.lastIndexOf("/",e),i=r>-1&&!/\S/.test(t.text.slice(r+1,e));return t.ch=e+1,i?"selfClose":"regular"}t.ch=e}}function f(t,r){for(var i=[];;){var n,s=h(t),o=t.line,a=t.ch-(s?s[0].length:0);if(!s||!(n=c(t)))return;if("selfClose"!=n)if(s[1]){for(var l=i.length-1;l>=0;--l)if(i[l]==s[2]){i.length=l;break}if(l<0&&(!r||r==s[2]))return{tag:s[2],from:e(o,a),to:e(t.line,t.ch)}}else i.push(s[2])}}function p(t,r){for(var i=[];;){var n=d(t);if(!n)return;if("selfClose"!=n){var s=t.line,o=t.ch,a=u(t);if(!a)return;if(a[1])i.push(a[2]);else{for(var l=i.length-1;l>=0;--l)if(i[l]==a[2]){i.length=l;break}if(l<0&&(!r||r==a[2]))return{tag:a[2],from:e(t.line,t.ch),to:e(s,o)}}}else u(t)}}t.registerHelper("fold","xml",(function(t,i){for(var n=new s(t,i.line,0);;){var o=h(n);if(!o||n.line!=i.line)return;var a=c(n);if(!a)return;if(!o[1]&&"selfClose"!=a){var l=e(n.line,n.ch),u=f(n,o[2]);return u&&r(u.from,l)>0?{from:l,to:u.from}:null}}})),t.findMatchingTag=function(t,i,n){var o=new s(t,i.line,i.ch,n);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var a=c(o),l=a&&e(o.line,o.ch),h=a&&u(o);if(a&&h&&!(r(o,i)>0)){var d={from:e(o.line,o.ch),to:l,tag:h[2]};return"selfClose"==a?{open:d,close:null,at:"open"}:h[1]?{open:p(o,h[2]),close:d,at:"close"}:{open:d,close:f(o=new s(t,l.line,l.ch,n),h[2]),at:"open"}}}},t.findEnclosingTag=function(t,e,r,i){for(var n=new s(t,e.line,e.ch,r);;){var o=p(n,i);if(!o)break;var a=f(new s(t,e.line,e.ch,r),o.tag);if(a)return{open:o,close:a}}},t.scanForClosingTag=function(t,e,r,i){return f(new s(t,e.line,e.ch,i?{from:0,to:i}:null),r)}}(r(/*! ../../lib/codemirror */"VrN/"))},p5ED: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){!function(t){"use strict";var e=t.Pos;function i(t,e){return t.line-e.line||t.ch-e.ch}var r="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function s(t,e,i,r){this.line=e,this.ch=i,this.cm=t,this.text=t.getLine(e),this.min=r?Math.max(r.from,t.firstLine()):t.firstLine(),this.max=r?Math.min(r.to-1,t.lastLine()):t.lastLine()}function o(t,i){var r=t.cm.getTokenTypeAt(e(t.line,i));return r&&/\btag\b/.test(r)}function a(t){if(!(t.line>=t.max))return t.ch=0,t.text=t.cm.getLine(++t.line),!0}function l(t){if(!(t.line<=t.min))return t.text=t.cm.getLine(--t.line),t.ch=t.text.length,!0}function c(t){for(;;){var e=t.text.indexOf(">",t.ch);if(-1==e){if(a(t))continue;return}if(o(t,e+1)){var i=t.text.lastIndexOf("/",e),r=i>-1&&!/\S/.test(t.text.slice(i+1,e));return t.ch=e+1,r?"selfClose":"regular"}t.ch=e+1}}function u(t){for(;;){var e=t.ch?t.text.lastIndexOf("<",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(o(t,e+1)){n.lastIndex=e,t.ch=e;var i=n.exec(t.text);if(i&&i.index==e)return i}else t.ch=e}}function h(t){for(;;){n.lastIndex=t.ch;var e=n.exec(t.text);if(!e){if(a(t))continue;return}if(o(t,e.index+1))return t.ch=e.index+e[0].length,e;t.ch=e.index+1}}function d(t){for(;;){var e=t.ch?t.text.lastIndexOf(">",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(o(t,e+1)){var i=t.text.lastIndexOf("/",e),r=i>-1&&!/\S/.test(t.text.slice(i+1,e));return t.ch=e+1,r?"selfClose":"regular"}t.ch=e}}function f(t,i){for(var r=[];;){var n,s=h(t),o=t.line,a=t.ch-(s?s[0].length:0);if(!s||!(n=c(t)))return;if("selfClose"!=n)if(s[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!i||i==s[2]))return{tag:s[2],from:e(o,a),to:e(t.line,t.ch)}}else r.push(s[2])}}function p(t,i){for(var r=[];;){var n=d(t);if(!n)return;if("selfClose"!=n){var s=t.line,o=t.ch,a=u(t);if(!a)return;if(a[1])r.push(a[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==a[2]){r.length=l;break}if(l<0&&(!i||i==a[2]))return{tag:a[2],from:e(t.line,t.ch),to:e(s,o)}}}else u(t)}}t.registerHelper("fold","xml",(function(t,r){for(var n=new s(t,r.line,0);;){var o=h(n);if(!o||n.line!=r.line)return;var a=c(n);if(!a)return;if(!o[1]&&"selfClose"!=a){var l=e(n.line,n.ch),u=f(n,o[2]);return u&&i(u.from,l)>0?{from:l,to:u.from}:null}}})),t.findMatchingTag=function(t,r,n){var o=new s(t,r.line,r.ch,n);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var a=c(o),l=a&&e(o.line,o.ch),h=a&&u(o);if(a&&h&&!(i(o,r)>0)){var d={from:e(o.line,o.ch),to:l,tag:h[2]};return"selfClose"==a?{open:d,close:null,at:"open"}:h[1]?{open:p(o,h[2]),close:d,at:"close"}:{open:d,close:f(o=new s(t,l.line,l.ch,n),h[2]),at:"open"}}}},t.findEnclosingTag=function(t,e,i,r){for(var n=new s(t,e.line,e.ch,i);;){var o=p(n,r);if(!o)break;var a=f(new s(t,e.line,e.ch,i),o.tag);if(a)return{open:o,close:a}}},t.scanForClosingTag=function(t,e,i,r){return f(new s(t,e.line,e.ch,r?{from:0,to:r}:null),i)}}(i(/*! ../../lib/codemirror */"VrN/"))},p5ED: /*!*********************************************!*\ !*** ./src/components/PreviewAll/index.tsx ***! \*********************************************/ /*! exports provided: PreviewAll, default */ -/*! exports used: default */function(t,e,r){"use strict";r(/*! antd/es/button/style */"+L6B");var i=r(/*! antd/es/button */"2/Rp"),n=(r(/*! antd/es/tooltip/style */"5Dmo"),r(/*! antd/es/tooltip */"3S7+")),s=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=r.n(l),u=r(/*! react */"q1tI"),h=r.n(u),d=r(/*! ./index.less?modules */"vHTk"),f=r.n(d),p=r(/*! @ant-design/icons */"yEEn"),g=r(/*! @/components/monaco-editor */"ZW9T"),m=r(/*! @/utils/util */"1vsH"),v=r(/*! @/service/exercise */"V0Rq"),y=r(/*! @/utils/env */"m3rI");e.a=function(t){t.name;var e=t.data,r=(t.theme,t.type),l=t.filename,d=t.monacoEditor,b=t.className,x=t.style,S=t.close,C=t.onClose,w=t.hasMask,k=t.otherData,E=void 0===k?{}:k,T=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),L=Object(a.a)(T,2),A=(L[0],L[1],Object(u.useState)("")),D=Object(a.a)(A,2),R=(D[0],D[1]),O=Object(u.useState)(),_=Object(a.a)(O,2),I=_[0],M=_[1],P=Object(u.useRef)();"office"===r&&Object(m.P)(e).filesize>10485760&&(r="other"),l&&(d.filename=l),Object(u.useEffect)((function(){var t,e,r=null===(t=document.cookie)||void 0===t||null===(e=t.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==r||r.map((function(t){var e=t.split("=");"_educoder_session"===e[0]&&R(e[1])}))}),[]),Object(u.useEffect)((function(){"office"===r&&N()}),[r]);var N=function(){var t=Object(o.a)(c.a.mark((function t(){var r,i,n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("data:",e),r=e,e.startsWith("http")||(r=location.origin+r),i=new URL(r).pathname.split("/").pop(),t.next=6,Object(v.U)({attachment_id:i});case 6:n=t.sent,M(n);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),F=function(){e.startsWith("http")||e.startsWith("blob:")?B():Object(m.x)(l||"educoder",e,l)},B=function(){Object(m.v)(l||"educoder",decodeURIComponent(e))};return h.a.createElement("div",{style:Object(s.a)({},x||{}),className:"".concat(w&&f.a.bgBlack," ").concat(r?f.a.wrp:"hide")},S&&h.a.createElement("div",{className:f.a.close,ref:P},h.a.createElement(n.a,{title:"点击下载此文件",getPopupContainer:function(){return P.current}},h.a.createElement("span",{onClick:B},h.a.createElement("i",{className:"icon-quxiaozhiding"}))),h.a.createElement(n.a,{title:"关闭",getPopupContainer:function(){return P.current}},h.a.createElement("span",{className:"",onClick:function(){C(),M(null)}},h.a.createElement("i",{className:"icon-guanbi1"})))),h.a.createElement("div",{className:"".concat(f.a[b]," ").concat(b," ").concat(f.a.monaco," ").concat("txt"===r?"show":"hide")},"txt"===r&&h.a.createElement(g.b,d)),"audio"===r&&h.a.createElement("audio",{src:"".concat((null==e?void 0:e.indexOf("http://"))>-1||(null==e?void 0:e.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(e),autoPlay:!0}),"video"===r&&h.a.createElement(h.a.Fragment,null,(null==e?void 0:e.indexOf("http"))>-1?h.a.createElement("video",{controls:!0,src:"".concat(e),autoPlay:!0}):h.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(e),autoPlay:!0})),"office"===r&&I&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(I.key,"&url=").concat(y.a.API_SERVER+I.url,"&callbackUrl=").concat(y.a.API_SERVER+I.callbackUrl,"&fileType=").concat(I.fileType,"&title=").concat(I.title,"&model=view")}),("xlsx"===r||"doc"===r||"pptx"===r||"docx"===r)&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(E.key,"&url=").concat(y.a.API_SERVER+E.url,"&callbackUrl=").concat(y.a.API_SERVER+E.callbackUrl,"&fileType=").concat(E.fileType,"&title=").concat(E.title,"&model=").concat(E.model)}),"html"===r&&h.a.createElement("iframe",{src:e+"&disposition=inline"}),"pdf"===r&&h.a.createElement("embed",{className:f.a.embed,src:e,type:"application/pdf"}),"image"===r&&h.a.createElement("img",{src:"".concat((null==e?void 0:e.indexOf("http://"))>-1||(null==e?void 0:e.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(e)}),"other"===r&&h.a.createElement("div",null,h.a.createElement(i.a,{type:"primary",size:"large",onClick:F},h.a.createElement(p.a,null),"点击下载")),"download"===r&&h.a.createElement(i.a,{type:"primary",size:"large",onClick:F},h.a.createElement(p.a,null),"点击下载"))}},"p77/": +/*! exports used: default */function(t,e,i){"use strict";i(/*! antd/es/button/style */"+L6B");var r=i(/*! antd/es/button */"2/Rp"),n=(i(/*! antd/es/tooltip/style */"5Dmo"),i(/*! antd/es/tooltip */"3S7+")),s=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),a=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=i.n(l),u=i(/*! react */"q1tI"),h=i.n(u),d=i(/*! ./index.less?modules */"vHTk"),f=i.n(d),p=i(/*! @ant-design/icons */"yEEn"),g=i(/*! @/components/monaco-editor */"ZW9T"),m=i(/*! @/utils/util */"1vsH"),v=i(/*! @/service/exercise */"V0Rq"),y=i(/*! @/utils/env */"m3rI");e.a=function(t){t.name;var e=t.data,i=(t.theme,t.type),l=t.filename,d=t.monacoEditor,b=t.className,x=t.style,S=t.close,C=t.onClose,w=t.hasMask,k=t.otherData,E=void 0===k?{}:k,T=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),L=Object(a.a)(T,2),A=(L[0],L[1],Object(u.useState)("")),D=Object(a.a)(A,2),R=(D[0],D[1]),O=Object(u.useState)(),_=Object(a.a)(O,2),I=_[0],M=_[1],P=Object(u.useRef)();"office"===i&&Object(m.P)(e).filesize>10485760&&(i="other"),l&&(d.filename=l),Object(u.useEffect)((function(){var t,e,i=null===(t=document.cookie)||void 0===t||null===(e=t.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==i||i.map((function(t){var e=t.split("=");"_educoder_session"===e[0]&&R(e[1])}))}),[]),Object(u.useEffect)((function(){"office"===i&&N()}),[i]);var N=function(){var t=Object(o.a)(c.a.mark((function t(){var i,r,n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("data:",e),i=e,e.startsWith("http")||(i=location.origin+i),r=new URL(i).pathname.split("/").pop(),t.next=6,Object(v.U)({attachment_id:r});case 6:n=t.sent,M(n);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),F=function(){e.startsWith("http")||e.startsWith("blob:")?B():Object(m.x)(l||"educoder",e,l)},B=function(){Object(m.v)(l||"educoder",decodeURIComponent(e))};return h.a.createElement("div",{style:Object(s.a)({},x||{}),className:"".concat(w&&f.a.bgBlack," ").concat(i?f.a.wrp:"hide")},S&&h.a.createElement("div",{className:f.a.close,ref:P},h.a.createElement(n.a,{title:"点击下载此文件",getPopupContainer:function(){return P.current}},h.a.createElement("span",{onClick:B},h.a.createElement("i",{className:"icon-quxiaozhiding"}))),h.a.createElement(n.a,{title:"关闭",getPopupContainer:function(){return P.current}},h.a.createElement("span",{className:"",onClick:function(){C(),M(null)}},h.a.createElement("i",{className:"icon-guanbi1"})))),h.a.createElement("div",{className:"".concat(f.a[b]," ").concat(b," ").concat(f.a.monaco," ").concat("txt"===i?"show":"hide")},"txt"===i&&h.a.createElement(g.b,d)),"audio"===i&&h.a.createElement("audio",{src:"".concat((null==e?void 0:e.indexOf("http://"))>-1||(null==e?void 0:e.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(e),autoPlay:!0}),"video"===i&&h.a.createElement(h.a.Fragment,null,(null==e?void 0:e.indexOf("http"))>-1?h.a.createElement("video",{controls:!0,src:"".concat(e),autoPlay:!0}):h.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(e),autoPlay:!0})),"office"===i&&I&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(I.key,"&url=").concat(y.a.API_SERVER+I.url,"&callbackUrl=").concat(y.a.API_SERVER+I.callbackUrl,"&fileType=").concat(I.fileType,"&title=").concat(I.title,"&model=view")}),("xlsx"===i||"doc"===i||"pptx"===i||"docx"===i)&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(E.key,"&url=").concat(y.a.API_SERVER+E.url,"&callbackUrl=").concat(y.a.API_SERVER+E.callbackUrl,"&fileType=").concat(E.fileType,"&title=").concat(E.title,"&model=").concat(E.model)}),"html"===i&&h.a.createElement("iframe",{src:e+"&disposition=inline"}),"pdf"===i&&h.a.createElement("embed",{className:f.a.embed,src:e,type:"application/pdf"}),"image"===i&&h.a.createElement("img",{src:"".concat((null==e?void 0:e.indexOf("http://"))>-1||(null==e?void 0:e.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(e)}),"other"===i&&h.a.createElement("div",null,h.a.createElement(r.a,{type:"primary",size:"large",onClick:F},h.a.createElement(p.a,null),"点击下载")),"download"===i&&h.a.createElement(r.a,{type:"primary",size:"large",onClick:F},h.a.createElement(p.a,null),"点击下载"))}},"p77/": /*!****************************************************!*\ !*** ./node_modules/codemirror/lib/codemirror.css ***! \****************************************************/ /*! no static exports found */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){},qduV: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){},qduV: /*!************************************************************************!*\ !*** ./src/pages/Classrooms/Lists/CommonHomework/SubmitWork/index.tsx ***! \************************************************************************/ /*! exports provided: default */ /*! all exports used */ -/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/.umi-production/core/routes.ts (referenced with import()) */function(t,e,r){"use strict";r.r(e);r(/*! antd/es/button/style */"+L6B");var i=r(/*! antd/es/button */"2/Rp"),n=(r(/*! antd/es/breadcrumb/style */"sPJy"),r(/*! antd/es/breadcrumb */"bE4q")),s=(r(/*! antd/es/modal/style */"2qtc"),r(/*! antd/es/modal */"kLXV")),o=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),l=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),c=(r(/*! antd/es/form/style */"y8nQ"),r(/*! antd/es/form */"Vl3Y")),u=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),h=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),d=r.n(h),f=r(/*! react */"q1tI"),p=r.n(f),g=r(/*! umi */"Ty5D"),m=r(/*! umi */"9kvl"),v=r(/*! umi */"55Ip"),y=r(/*! @/components/markdown-editor */"Ot1p"),b=r(/*! @/service/shixunHomeworks */"XYT7"),x=r(/*! ./index.less?modules */"zgC5"),S=r.n(x),C=r(/*! @/components/MultiUpload */"500L");e.default=Object(m.a)((function(t){var e=t.shixunHomeworks,r=t.newCourse,i=t.loading;return{shixunHomeworks:e,newCourse:r,globalSetting:t.globalSetting,loading:i.effects}}))((function(t){var e=t.shixunHomeworks,r=(t.newCourse,t.globalSetting,t.loading),h=t.dispatch,x=t.match,w=Object(g.i)(),k=c.a.useForm(),E=Object(u.a)(k,1)[0],T=Object(f.useState)({}),L=Object(u.a)(T,2),A=L[0],D=L[1],R=Object(f.useState)(!0),O=Object(u.a)(R,2),_=(O[0],O[1]),I=Object(f.useState)(!1),M=Object(u.a)(I,2),P=(M[0],M[1]),N=Object(f.useState)(),F=Object(u.a)(N,2),B=(F[0],F[1],Object(f.useRef)(),e.studentWorkAddDefaultData),j=Object(f.useState)([]),U=Object(u.a)(j,2),H=U[0],G=U[1],z=Object(f.useState)({page:1,limit:20,search:""}),W=Object(u.a)(z,2),V=W[0],K=(W[1],function(){var t=Object(l.a)(d.a.mark((function t(){var e,r;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return P(!0),t.next=3,h({type:"shixunHomeworks/getSearchMemberList",payload:Object(a.a)(Object(a.a)({},x.params),V)});case 3:r=t.sent,P(!1),r.members&&G([].concat(Object(o.a)(H),Object(o.a)(r.members))),(null===(e=r.members)||void 0===e?void 0:e.length)<20&&_(!1);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}());Object(f.useEffect)((function(){new Promise(Object(l.a)(d.a.mark((function t(){return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h({type:"shixunHomeworks/addStudentWorkDefaultData",payload:Object(a.a)(Object(a.a)({},x.params),{},{type:3})});case 2:t.sent;case 3:case"end":return t.stop()}}),t)})))),K()}),[]);var q=function(){var t=Object(l.a)(d.a.mark((function t(e){var r;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(b.c)(Object(a.a)(Object(a.a)(Object(a.a)({},x.params),e),{},{type:3}));case 2:0===(r=t.sent).status&&m.d.push("/classrooms/".concat(w.coursesId,"/common_homework/").concat(w.commonHomeworkId,"/review/").concat(r.work_id));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Y=function(){var t=Object(l.a)(d.a.mark((function t(e){var r,i;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=Object(a.a)({},A)).attachment_ids&&(r.attachment_ids=null==r||null===(i=r.attachment_ids)||void 0===i?void 0:i.map((function(t){return t.response.id}))),r.attachment_ids&&""!=r.attachment_ids?q(r):s.a.confirm({title:p.a.createElement("div",null,"还未上传附件",p.a.createElement("br",null),"是否确认提交作品?"),onOk:function(){q(r)}});case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return p.a.createElement("section",{className:S.a.bg},B.course_name&&p.a.createElement("section",{className:"animated fadeIn"},p.a.createElement("aside",{className:"mt10"},B.category&&p.a.createElement(n.a,{separator:">"},p.a.createElement(n.a.Item,null,p.a.createElement(v.a,{to:"/classrooms/".concat(B.course_id,"/common_homework")},B.course_name)),p.a.createElement(n.a.Item,null,p.a.createElement(v.a,{to:"/classrooms/".concat(B.course_id,"/common_homework")},B.category.category_name)),p.a.createElement(n.a.Item,null,null==B?void 0:B.user_name," 提交作品")))),p.a.createElement("aside",{className:"font24 bold mt20 mb20"},B.homework_name),p.a.createElement(c.a,{form:E,className:S.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){D(Object(a.a)({},E.getFieldsValue())),console.log("formValue:",A)},initialValues:[{base_on_project:1}],onFinish:Y},p.a.createElement("div",{className:S.a.mdWrap},p.a.createElement(c.a.Item,{name:"description",label:"内容:",rules:[{required:!0,message:"请输入作业的简介"},{max:65535,message:"作业简介最大限制65535个字符"}]},p.a.createElement(y.a,{placeholder:"请在此输入作业内容或作业附件的简要描述,最大限制为65535个字符",watch:!0,defaultValue:A.intro})),p.a.createElement("div",null,p.a.createElement(c.a.Item,{name:"attachment_ids"},p.a.createElement(C.b,null)))),p.a.createElement("div",{className:S.a.backgroundFa},p.a.createElement("div",{className:"pt40 mb30"},p.a.createElement(c.a.Item,null,p.a.createElement(i.a,{size:"large",type:"primary",className:"".concat(S.a.button," mr20"),htmlType:"submit",loading:r["newCourse/editCourse"]||r["newCourse/submitCourse"]},"提交"),p.a.createElement(i.a,{size:"large",type:"primary",ghost:!0,className:S.a.button,onClick:function(){return m.d.push("/classrooms/".concat(x.params.coursesId,"/common_homework/").concat(w.commonHomeworkId,"/detail"))}},"取消"))))))}))},"rAM+": +/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/.umi-production/core/routes.ts (referenced with import()) */function(t,e,i){"use strict";i.r(e);i(/*! antd/es/button/style */"+L6B");var r=i(/*! antd/es/button */"2/Rp"),n=(i(/*! antd/es/breadcrumb/style */"sPJy"),i(/*! antd/es/breadcrumb */"bE4q")),s=(i(/*! antd/es/message/style */"miYZ"),i(/*! antd/es/message */"tsqr")),o=(i(/*! antd/es/modal/style */"2qtc"),i(/*! antd/es/modal */"kLXV")),a=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),l=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),c=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),u=(i(/*! antd/es/form/style */"y8nQ"),i(/*! antd/es/form */"Vl3Y")),h=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),d=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),f=i.n(d),p=i(/*! react */"q1tI"),g=i.n(p),m=i(/*! umi */"Ty5D"),v=i(/*! umi */"9kvl"),y=i(/*! umi */"55Ip"),b=i(/*! @/components/markdown-editor */"Ot1p"),x=i(/*! @/service/shixunHomeworks */"XYT7"),S=i(/*! ./index.less?modules */"zgC5"),C=i.n(S),w=i(/*! @/components/MultiUpload */"500L"),k=i(/*! @/service/shixuns */"HBuW");e.default=Object(v.a)((function(t){var e=t.shixunHomeworks,i=t.newCourse,r=t.loading;return{shixunHomeworks:e,newCourse:i,globalSetting:t.globalSetting,loading:r.effects}}))((function(t){var e,i,d,S,E,T=t.shixunHomeworks,L=(t.newCourse,t.globalSetting,t.loading),A=t.dispatch,D=t.match,R=Object(m.i)(),O=u.a.useForm(),_=Object(h.a)(O,1)[0],I=Object(p.useState)({}),M=Object(h.a)(I,2),P=M[0],N=M[1],F=Object(p.useState)(!0),B=Object(h.a)(F,2),j=(B[0],B[1]),U=Object(p.useState)(!1),H=Object(h.a)(U,2),G=(H[0],H[1]),z=Object(p.useState)(),W=Object(h.a)(z,2),V=(W[0],W[1],Object(p.useRef)(),T.studentWorkAddDefaultData),K=Object(p.useState)([]),q=Object(h.a)(K,2),Y=q[0],X=q[1],$=(T.replyList,T.workDetail),Z=Object(p.useRef)(null),Q=Object(p.useState)({page:1,limit:20,search:""}),J=Object(h.a)(Q,2),tt=J[0];J[1];Object(p.useEffect)((function(){""!==R.commonHomeworkId&&(R.categoryId=R.commonHomeworkId,A({type:"shixunHomeworks/getWorkDetail",payload:Object(c.a)({},R)}))}),[R.commonHomeworkId]);var et=function(){var t=Object(l.a)(f.a.mark((function t(){var e,i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return G(!0),t.next=3,A({type:"shixunHomeworks/getSearchMemberList",payload:Object(c.a)(Object(c.a)({},D.params),tt)});case 3:i=t.sent,G(!1),i.members&&X([].concat(Object(a.a)(Y),Object(a.a)(i.members))),(null===(e=i.members)||void 0===e?void 0:e.length)<20&&j(!1);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),it=function(t){o.a.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:g.a.createElement("div",{className:"tc font16"},"目前该实践项目尚在内测中,将于",t,"之后开放,谢谢!")})},rt=function(){var t,e;null!=$&&null!==(t=$.shixun_info)&&void 0!==t&&t.is_jupyter||null!=$&&null!==(e=$.shixun_info)&&void 0!==e&&e.is_jupyter_lab?A({type:"shixunsDetail/execJupyter",payload:{id:null==$?void 0:$.shixun_info.identifier}}).then((function(t){null!=t&&t.identifier&&(null===v.d||void 0===v.d||v.d.push("/tasks/".concat(t.identifier,"/jupyter")))})):A({type:"shixunsDetail/execShixun",payload:{id:null==$?void 0:$.shixun_info.identifier}}).then((function(t){null!=t&&t.game_identifier?null===v.d||void 0===v.d||v.d.push("/tasks/".concat(t.game_identifier)):2===(null==t?void 0:t.status)?function t(e){var i,r;e=null!==(i=e)&&void 0!==i&&i.includes(".json")?e:"".concat(e,".json"),o.a.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:g.a.createElement("div",{className:"tc font16"},"实训已经更新了,正在为您重置!"),onOk:(r=Object(l.a)(f.a.mark((function i(){var r,n;return f.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Object(k.Ab)({url:e});case 2:if(r=i.sent){i.next=5;break}return i.abrupt("return");case 5:return s.b.success("重置成功,正在进入实训!"),i.next=8,Object(k.D)({id:r.shixun_identifier});case 8:if(null==(n=i.sent)||!n.game_identifier){i.next=12;break}return null===v.d||void 0===v.d||v.d.push("/tasks/".concat(n.game_identifier)),i.abrupt("return");case 12:2===(null==n?void 0:n.status)?t(null==n?void 0:n.message):3===(null==n?void 0:n.status)&&it(null==n?void 0:n.message);case 13:case"end":return i.stop()}}),i)}))),function(){return r.apply(this,arguments)})})}(null==t?void 0:t.message):3===(null==t?void 0:t.status)&&it(null==t?void 0:t.message)}))};Object(p.useEffect)((function(){new Promise(Object(l.a)(f.a.mark((function t(){return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A({type:"shixunHomeworks/addStudentWorkDefaultData",payload:Object(c.a)(Object(c.a)({},D.params),{},{type:3})});case 2:t.sent;case 3:case"end":return t.stop()}}),t)})))),et()}),[]);var nt=function(){var t=Object(l.a)(f.a.mark((function t(e){var i;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(x.c)(Object(c.a)(Object(c.a)(Object(c.a)({},D.params),e),{},{type:3}));case 2:0===(i=t.sent).status&&v.d.push("/classrooms/".concat(R.coursesId,"/common_homework/").concat(R.commonHomeworkId,"/review/").concat(i.work_id));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),st=function(){var t=Object(l.a)(f.a.mark((function t(e){var i,r;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(i=Object(c.a)({},P)).attachment_ids&&(i.attachment_ids=null==i||null===(r=i.attachment_ids)||void 0===r?void 0:r.map((function(t){return t.response.id}))),i.attachment_ids&&""!=i.attachment_ids?nt(i):o.a.confirm({title:g.a.createElement("div",null,"还未上传附件",g.a.createElement("br",null),"是否确认提交作品?"),onOk:function(){nt(i)}});case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return g.a.createElement("section",{className:C.a.bg},g.a.createElement("div",{ref:Z},V.course_name&&g.a.createElement("section",{className:"animated fadeIn"},g.a.createElement("aside",null,V.category&&g.a.createElement(n.a,{separator:">"},g.a.createElement(n.a.Item,null,g.a.createElement(y.a,{to:"/classrooms/".concat(V.course_id,"/common_homework")},V.course_name)),g.a.createElement(n.a.Item,null,g.a.createElement(y.a,{to:"/classrooms/".concat(V.course_id,"/common_homework")},V.category.category_name)),g.a.createElement(n.a.Item,null,null==V?void 0:V.user_name," 提交作品")))),g.a.createElement(u.a,{form:_,className:C.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){N(Object(c.a)({},_.getFieldsValue())),console.log("formValue:",P)},initialValues:[{base_on_project:1}],onFinish:st},g.a.createElement("div",{className:C.a.mdWrap},g.a.createElement("div",{className:C.a.titleWrapper},g.a.createElement("div",{className:"zuoyeTitle"},null==T||null===(e=T.studentWorkAddDefaultData)||void 0===e?void 0:e.homework_name),g.a.createElement("div",null,g.a.createElement("div",{className:"zuoyemiaosu"},g.a.createElement("span",{className:"icon"}),g.a.createElement("h4",{className:"direction"},"作业描述")),g.a.createElement("div",{dangerouslySetInnerHTML:{__html:null==T||null===(i=T.studentWorkAddDefaultData)||void 0===i?void 0:i.homework_description}}),-1!=(null==$||null===(d=$.shixun_info)||void 0===d?void 0:d.shixun_status)&&(null==$?void 0:$.is_shixun)&&g.a.createElement(r.a,{onClick:function(){rt()},style:{position:"absolute",bottom:"30px",left:"30px"},className:"btnWrapper",type:"primary"},g.a.createElement("i",{className:"iconfont icon-jixutiaozhan mr10 font14"}),null==$||null===(S=$.shixun_info)||void 0===S||null===(E=S.task_operation)||void 0===E?void 0:E[0]))),g.a.createElement("div",{style:{background:"#fff",width:"954px",paddingTop:"30px",paddingLeft:"37px",paddingRight:"26px",position:"relative"}},g.a.createElement(u.a.Item,{name:"description",label:"内容:",rules:[{required:!0,message:"请输入作业的简介"},{max:65535,message:"作业简介最大限制65535个字符"}]},g.a.createElement(b.a,{placeholder:"请在此输入作业内容或作业附件的简要描述,最大限制为65535个字符",watch:!0,defaultValue:P.intro,height:665})),g.a.createElement("div",null,g.a.createElement(u.a.Item,{name:"attachment_ids"},g.a.createElement(w.b,null))))))),g.a.createElement("div",{className:C.a.backgroundFa},g.a.createElement("div",{style:{width:1378,display:"flex",justifyContent:"end"}},g.a.createElement(u.a.Item,null,g.a.createElement(r.a,{size:"large",type:"primary",ghost:!0,className:C.a.button,style:{width:"60px",height:"32px",background:"#F8F9FC",borderRadius:"2px",border:"1px solid #C3CFE0",marginRight:"20px"},onClick:function(){return v.d.push("/classrooms/".concat(D.params.coursesId,"/common_homework/").concat(R.commonHomeworkId,"/detail"))}},"取消"),g.a.createElement(r.a,{size:"large",type:"primary",className:"".concat(C.a.button),htmlType:"submit",style:{height:"32px"},loading:L["newCourse/editCourse"]||L["newCourse/submitCourse"],onClick:function(){_.submit()}},"提交")))))}))},"rAM+": /*!*******************************************************************************************************************!*\ !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***! \*******************************************************************************************************************/ /*! exports provided: default */ -/*! exports used: default */function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var i=r(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function n(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=Object(i.a)(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,s=function(){};return{s:s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw o}}}}},rUJ1: +/*! exports used: default */function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var r=i(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function n(t,e){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=Object(r.a)(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,s=function(){};return{s:s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(l)throw o}}}}},rUJ1: /*!********************************************!*\ !*** ./node_modules/marked/src/helpers.js ***! \********************************************/ /*! no static exports found */ /*! exports used: escape */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){const r=/[&<>"']/,i=/[&<>"']/g,n=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},a=t=>o[t];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(t){return t.replace(l,(t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")}const u=/(^|[^\[])\^/g;const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const f={},p=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(t,e){f[" "+t]||(p.test(t)?f[" "+t]=t+"/":f[" "+t]=y(t,"/",!0));const r=-1===(t=f[" "+t]).indexOf(":");return"//"===e.substring(0,2)?r?e:t.replace(g,"$1")+e:"/"===e.charAt(0)?r?e:t.replace(m,"$1")+e:t+e}function y(t,e,r){const i=t.length;if(0===i)return"";let n=0;for(;n(i=(i=i.source||i).replace(u,"$1"),t=t.replace(e,i),r),getRegex:()=>new RegExp(t,e)};return r},cleanUrl:function(t,e,r){if(t){let t;try{t=decodeURIComponent(c(r)).replace(h,"").toLowerCase()}catch(t){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!d.test(r)&&(r=v(e,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(t){return null}return r},resolveUrl:v,noopTest:{exec:function(){}},merge:function(t){let e,r,i=1;for(;i{let i=!1,n=e;for(;--n>=0&&"\\"===r[n];)i=!i;return i?"|":" |"}).split(/ \|/);let i=0;if(r.length>e)r.splice(e);else for(;r.length"']/,r=/[&<>"']/g,n=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},a=t=>o[t];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(t){return t.replace(l,(t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")}const u=/(^|[^\[])\^/g;const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const f={},p=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(t,e){f[" "+t]||(p.test(t)?f[" "+t]=t+"/":f[" "+t]=y(t,"/",!0));const i=-1===(t=f[" "+t]).indexOf(":");return"//"===e.substring(0,2)?i?e:t.replace(g,"$1")+e:"/"===e.charAt(0)?i?e:t.replace(m,"$1")+e:t+e}function y(t,e,i){const r=t.length;if(0===r)return"";let n=0;for(;n(r=(r=r.source||r).replace(u,"$1"),t=t.replace(e,r),i),getRegex:()=>new RegExp(t,e)};return i},cleanUrl:function(t,e,i){if(t){let t;try{t=decodeURIComponent(c(i)).replace(h,"").toLowerCase()}catch(t){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!d.test(i)&&(i=v(e,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(t){return null}return i},resolveUrl:v,noopTest:{exec:function(){}},merge:function(t){let e,i,r=1;for(;r{let r=!1,n=e;for(;--n>=0&&"\\"===i[n];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(i.length>e)i.splice(e);else for(;i.length0}),!1)}t.exports=function(t,e){e=e||{};var n={main:r.m},a=e.all?{main:Object.keys(n.main)}:function(t,e){for(var r={main:[e]},i={main:[]},n={main:{}};o(r);)for(var a=Object.keys(r),l=0;l0}),!1)}t.exports=function(t,e){e=e||{};var n={main:i.m},a=e.all?{main:Object.keys(n.main)}:function(t,e){for(var i={main:[e]},r={main:[]},n={main:{}};o(i);)for(var a=Object.keys(i),l=0;l=2*h/f||b<=S)){var C,w=Number.POSITIVE_INFINITY;for(C=t.level-1;C>g&&!((w=h*p[C].maxBitrate/(6.4*y))=b)){var k=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+t.sn+(e?" part "+e.index:"")+" of level "+t.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+C+"\n Current BW estimate: "+(Object(i.isFiniteNumber)(k)?(k/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+b.toFixed(3)+" s\n Estimated load time for the next fragment: "+w.toFixed(3)+" s\n Time to underbuffer: "+S.toFixed(3)+" s"),r.nextLoadLevel=C,this.bwEstimator.sample(d,u.loaded),this.clearTimer(),t.loader&&(this.fragCurrent=this.partCurrent=null,t.loader.abort()),r.trigger(s.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:e,stats:u})}}}}}},d.onFragLoaded=function(t,e){var r=e.frag,n=e.part;if(r.type===l.PlaylistLevelType.MAIN&&Object(i.isFiniteNumber)(r.sn)){var o=n?n.stats:r.stats,a=n?n.duration:r.duration;if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[r.level],u=(c.loaded?c.loaded.bytes:0)+o.loaded,h=(c.loaded?c.loaded.duration:0)+a;c.loaded={bytes:u,duration:h},c.realBitrate=Math.round(8*u/h)}if(r.bitrateTest){var d={stats:o,frag:r,part:n,id:r.type};this.onFragBuffered(s.Events.FRAG_BUFFERED,d),r.bitrateTest=!1}}},d.onFragBuffered=function(t,e){var r=e.frag,i=e.part,n=i?i.stats:r.stats;if(!n.aborted&&r.type===l.PlaylistLevelType.MAIN&&"initSegment"!==r.sn){var s=n.parsing.end-n.loading.start;this.bwEstimator.sample(s,n.loaded),n.bwEstimate=this.bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}},d.onError=function(t,e){switch(e.details){case a.ErrorDetails.FRAG_LOAD_ERROR:case a.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},d.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},d.getNextABRAutoLevel=function(){var t=this.fragCurrent,e=this.partCurrent,r=this.hls,i=r.maxAutoLevel,n=r.config,s=r.minAutoLevel,a=r.media,l=e?e.duration:t?t.duration:0,u=a?a.currentTime:0,h=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():n.abrEwmaDefaultEstimate,f=(o.BufferHelper.bufferInfo(a,u,n.maxBufferHole).end-u)/h,p=this.findBestLevel(d,s,i,f,n.abrBandWidthFactor,n.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var g=l?Math.min(l,n.maxStarvationDelay):n.maxStarvationDelay,m=n.abrBandWidthFactor,v=n.abrBandWidthUpFactor;if(!f){var y=this.bitrateTestDelay;y&&(g=(l?Math.min(l,n.maxLoadingDelay):n.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*g)+" ms"),m=v=1)}return p=this.findBestLevel(d,s,i,f+g,m,v),Math.max(p,0)},d.findBestLevel=function(t,e,r,i,n,s){for(var o,a=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,h=this.hls.levels,d=h[u],f=!(null==d||null===(o=d.details)||void 0===o||!o.live),p=null==d?void 0:d.codecSet,g=l?l.duration:a?a.duration:0,m=r;m>=e;m--){var v=h[m];if(v&&(!p||v.codecSet===p)){var y=v.details,b=(l?null==y?void 0:y.partTarget:null==y?void 0:y.averagetargetduration)||g,x=void 0;x=m<=u?n*t:s*t;var S=h[m].maxBitrate,C=S*b/x;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+m+"/"+Math.round(x)+"/"+S+"/"+b+"/"+i+"/"+C),x>S&&(!C||f&&!this.bitrateTestDelay||C=2*h/f||b<=S)){var C,w=Number.POSITIVE_INFINITY;for(C=t.level-1;C>g&&!((w=h*p[C].maxBitrate/(6.4*y))=b)){var k=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+t.sn+(e?" part "+e.index:"")+" of level "+t.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+C+"\n Current BW estimate: "+(Object(r.isFiniteNumber)(k)?(k/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+b.toFixed(3)+" s\n Estimated load time for the next fragment: "+w.toFixed(3)+" s\n Time to underbuffer: "+S.toFixed(3)+" s"),i.nextLoadLevel=C,this.bwEstimator.sample(d,u.loaded),this.clearTimer(),t.loader&&(this.fragCurrent=this.partCurrent=null,t.loader.abort()),i.trigger(s.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:e,stats:u})}}}}}},d.onFragLoaded=function(t,e){var i=e.frag,n=e.part;if(i.type===l.PlaylistLevelType.MAIN&&Object(r.isFiniteNumber)(i.sn)){var o=n?n.stats:i.stats,a=n?n.duration:i.duration;if(this.clearTimer(),this.lastLoadedFragLevel=i.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[i.level],u=(c.loaded?c.loaded.bytes:0)+o.loaded,h=(c.loaded?c.loaded.duration:0)+a;c.loaded={bytes:u,duration:h},c.realBitrate=Math.round(8*u/h)}if(i.bitrateTest){var d={stats:o,frag:i,part:n,id:i.type};this.onFragBuffered(s.Events.FRAG_BUFFERED,d),i.bitrateTest=!1}}},d.onFragBuffered=function(t,e){var i=e.frag,r=e.part,n=r?r.stats:i.stats;if(!n.aborted&&i.type===l.PlaylistLevelType.MAIN&&"initSegment"!==i.sn){var s=n.parsing.end-n.loading.start;this.bwEstimator.sample(s,n.loaded),n.bwEstimate=this.bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}},d.onError=function(t,e){switch(e.details){case a.ErrorDetails.FRAG_LOAD_ERROR:case a.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},d.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},d.getNextABRAutoLevel=function(){var t=this.fragCurrent,e=this.partCurrent,i=this.hls,r=i.maxAutoLevel,n=i.config,s=i.minAutoLevel,a=i.media,l=e?e.duration:t?t.duration:0,u=a?a.currentTime:0,h=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():n.abrEwmaDefaultEstimate,f=(o.BufferHelper.bufferInfo(a,u,n.maxBufferHole).end-u)/h,p=this.findBestLevel(d,s,r,f,n.abrBandWidthFactor,n.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var g=l?Math.min(l,n.maxStarvationDelay):n.maxStarvationDelay,m=n.abrBandWidthFactor,v=n.abrBandWidthUpFactor;if(!f){var y=this.bitrateTestDelay;y&&(g=(l?Math.min(l,n.maxLoadingDelay):n.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*g)+" ms"),m=v=1)}return p=this.findBestLevel(d,s,r,f+g,m,v),Math.max(p,0)},d.findBestLevel=function(t,e,i,r,n,s){for(var o,a=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,h=this.hls.levels,d=h[u],f=!(null==d||null===(o=d.details)||void 0===o||!o.live),p=null==d?void 0:d.codecSet,g=l?l.duration:a?a.duration:0,m=i;m>=e;m--){var v=h[m];if(v&&(!p||v.codecSet===p)){var y=v.details,b=(l?null==y?void 0:y.partTarget:null==y?void 0:y.averagetargetduration)||g,x=void 0;x=m<=u?n*t:s*t;var S=h[m].maxBitrate,C=S*b/x;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+m+"/"+Math.round(x)+"/"+S+"/"+b+"/"+r+"/"+C),x>S&&(!C||f&&!this.bitrateTestDelay||C0&&-1===t?(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=n.State.IDLE):(this.loadedmetadata=!1,this.state=n.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()},S.doTick=function(){switch(this.state){case n.State.IDLE:this.doTickIdle();break;case n.State.WAITING_TRACK:var e,r=this.levels,i=this.trackId,s=null==r||null===(e=r[i])||void 0===e?void 0:e.details;if(s){if(this.waitForCdnTuneIn(s))break;this.state=n.State.WAITING_INIT_PTS}break;case n.State.FRAG_LOADING_WAITING_RETRY:var a,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=n.State.IDLE);break;case n.State.WAITING_INIT_PTS:var u=this.waitingData;if(u){var h=u.frag,d=u.part,f=u.cache,g=u.complete;if(void 0!==this.initPTS[h.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=n.State.FRAG_LOADING;var m={frag:h,part:d,payload:f.flush(),networkDetails:null};this._handleFragmentLoadProgress(m),g&&t.prototype._handleFragmentLoadComplete.call(this,m)}else if(this.videoTrackCC!==this.waitingVideoCC)v.logger.log("Waiting fragment cc ("+h.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var y=this.getLoadPosition(),b=o.BufferHelper.bufferInfo(this.mediaBuffer,y,this.config.maxBufferHole);Object(p.fragmentWithinToleranceTest)(b.end,this.config.maxFragLookUpTolerance,h)<0&&(v.logger.log("Waiting fragment cc ("+h.cc+") @ "+h.start+" cancelled because another fragment at "+b.end+" is needed"),this.clearWaitingFragment())}}else this.state=n.State.IDLE}this.onTickEnd()},S.clearWaitingFragment=function(){var t=this.waitingData;t&&(this.fragmentTracker.removeFragment(t.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=n.State.IDLE)},S.onTickEnd=function(){var t=this.media;if(t&&t.readyState){var e=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&e.length&&(this.loadedmetadata=!0),this.lastCurrentTime=t.currentTime}},S.doTickIdle=function(){var t,e,r=this.hls,i=this.levels,o=this.media,a=this.trackId,l=r.config;if(i&&i[a]&&(o||!this.startFragRequested&&l.startFragPrefetch)){var h=i[a].details;if(!h||h.live&&this.levelLastLoaded!==a||this.waitForCdnTuneIn(h))this.state=n.State.WAITING_TRACK;else{this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,u.ElementaryStreamTypes.AUDIO,c.PlaylistLevelType.AUDIO));var d=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,c.PlaylistLevelType.AUDIO);if(null!==d){var f=d.len,p=this.getMaxBufferLength(),g=this.audioSwitch;if(!(f>=p)||g){if(!g&&this._streamEnded(d,h))return r.trigger(s.Events.BUFFER_EOS,{type:"audio"}),void(this.state=n.State.ENDED);var m=h.fragments[0].start,v=d.end;if(g){var y=this.getLoadPosition();v=y,h.PTSKnown&&ym||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),o.currentTime=m+.05)}var b=this.getNextFragment(v,h);b?"identity"!==(null===(t=b.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=b.decryptdata)&&void 0!==e&&e.key?this.loadFragment(b,h,v):this.loadKey(b,h):this.bufferFlushed=!0}}}}},S.getMaxBufferLength=function(){var e=t.prototype.getMaxBufferLength.call(this),r=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===r?e:Math.max(e,r.len)},S.onMediaDetaching=function(){this.videoBuffer=null,t.prototype.onMediaDetaching.call(this)},S.onAudioTracksUpdated=function(t,e){var r=e.audioTracks;this.resetTransmuxer(),this.levels=r.map((function(t){return new l.Level(t)}))},S.onAudioTrackSwitching=function(t,e){var r=!!e.url;this.trackId=e.id;var i=this.fragCurrent;null!=i&&i.loader&&i.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),r?this.setInterval(100):this.resetTransmuxer(),r?(this.audioSwitch=!0,this.state=n.State.IDLE):this.state=n.State.STOPPED,this.tick()},S.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},S.onLevelLoaded=function(t,e){this.mainDetails=e.details},S.onAudioTrackLoaded=function(t,e){var r,i=this.levels,s=e.details,o=e.id;if(i){this.log("Track "+o+" loaded ["+s.startSN+","+s.endSN+"],duration:"+s.totalduration);var a=i[o],l=0;if(s.live||null!==(r=a.details)&&void 0!==r&&r.live){var c=this.mainDetails;if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed||!c)return;!a.details&&s.hasProgramDateTime&&c.hasProgramDateTime?(Object(g.alignMediaPlaylistByPDT)(s,c),l=s.fragments[0].start):l=this.alignPlaylists(s,a.details)}a.details=s,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&s.live||this.setStartPosition(a.details,l),this.state!==n.State.WAITING_TRACK||this.waitForCdnTuneIn(s)||(this.state=n.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+o)},S._handleFragmentLoadProgress=function(t){var e,r=t.frag,i=t.part,s=t.payload,o=this.config,a=this.trackId,l=this.levels;if(l){var u=l[a];console.assert(u,"Audio track is defined on fragment load progress");var p=u.details;console.assert(p,"Audio track details are defined on fragment load progress");var g=o.defaultAudioCodec||u.audioCodec||"mp4a.40.2",m=this.transmuxer;m||(m=this.transmuxer=new d.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var y=this.initPTS[r.cc],b=null===(e=r.initSegment)||void 0===e?void 0:e.data;if(void 0!==y){var x=i?i.index:-1,S=-1!==x,C=new f.ChunkMetadata(r.level,r.sn,r.stats.chunkCount,s.byteLength,x,S);m.push(s,b,g,"",r,i,p.totalduration,!1,C,y)}else v.logger.log("Unknown video PTS for cc "+r.cc+", waiting for video PTS before demuxing audio frag "+r.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+a),(this.waitingData=this.waitingData||{frag:r,part:i,cache:new h.default,complete:!1}).cache.push(new Uint8Array(s)),this.waitingVideoCC=this.videoTrackCC,this.state=n.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered")},S._handleFragmentLoadComplete=function(e){this.waitingData?this.waitingData.complete=!0:t.prototype._handleFragmentLoadComplete.call(this,e)},S.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},S.onBufferCreated=function(t,e){var r=e.tracks.audio;r&&(this.mediaBuffer=r.buffer),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},S.onFragBuffered=function(t,e){var r=e.frag,i=e.part;r.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(r)?this.warn("Fragment "+r.sn+(i?" p: "+i.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==r.sn&&(this.fragPrevious=r,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(r,i)))},S.onError=function(e,r){switch(r.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,r);break;case m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==n.State.ERROR&&this.state!==n.State.STOPPED&&(this.state=r.fatal?n.State.ERROR:n.State.IDLE,this.warn(r.details+" while loading frag, switching to "+this.state+" state"));break;case m.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===r.parent&&(this.state===n.State.PARSING||this.state===n.State.PARSED)){var i=!0,s=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);s&&s.len>.5&&(i=!this.reduceMaxBufferLength(s.len)),i&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},S.onBufferFlushed=function(t,e){e.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},S._handleTransmuxComplete=function(t){var e,r="audio",i=this.hls,o=t.remuxResult,a=t.chunkMeta,l=this.getCurrentContext(a);if(!l)return this.warn("The loading context changed while buffering fragment "+a.sn+" of level "+a.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(a.level);var c=l.frag,h=l.part,d=o.audio,f=o.text,p=o.id3,g=o.initSegment;if(!this.fragContextChanged(c)){if(this.state=n.State.PARSING,this.audioSwitch&&d&&this.completeAudioSwitch(),null!=g&&g.tracks&&(this._bufferInitSegment(g.tracks,c,a),i.trigger(s.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:r,tracks:g.tracks})),d){var m=d.startPTS,v=d.endPTS,b=d.startDTS,x=d.endDTS;h&&(h.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:m,endPTS:v,startDTS:b,endDTS:x}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,m,v,b,x),this.bufferFragmentData(d,c,h,a)}if(null!=p&&null!==(e=p.samples)&&void 0!==e&&e.length){var S=y({frag:c,id:r},p);i.trigger(s.Events.FRAG_PARSING_METADATA,S)}if(f){var C=y({frag:c,id:r},f);i.trigger(s.Events.FRAG_PARSING_USERDATA,C)}}},S._bufferInitSegment=function(t,e,r){if(this.state===n.State.PARSING){t.video&&delete t.video;var i=t.audio;if(i){i.levelCodec=i.codec,i.id="audio",this.log("Init audio buffer, container:"+i.container+", codecs[parsed]=["+i.codec+"]"),this.hls.trigger(s.Events.BUFFER_CODECS,t);var o=i.initSegment;if(null!=o&&o.byteLength){var a={type:"audio",frag:e,part:null,chunkMeta:r,parent:e.type,data:o};this.hls.trigger(s.Events.BUFFER_APPENDING,a)}this.tick()}}},S.loadFragment=function(e,r,s){var o=this.fragmentTracker.getState(e);this.fragCurrent=e,(this.audioSwitch||o===a.FragmentState.NOT_LOADED||o===a.FragmentState.PARTIAL)&&("initSegment"===e.sn?this._loadInitSegment(e):r.live&&!Object(i.isFiniteNumber)(this.initPTS[e.cc])?(this.log("Waiting for video PTS in continuity counter "+e.cc+" of live stream before loading audio fragment "+e.sn+" of level "+this.trackId),this.state=n.State.WAITING_INIT_PTS):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,r,s)))},S.completeAudioSwitch=function(){var e=this.hls,r=this.media,i=this.trackId;r&&(this.log("Switching audio track : flushing all audio"),t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,e.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:i})},x}(n.default);e.default=x},"./src/controller/audio-track-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),s=i(/*! ../events */"./src/events.ts"),o=i(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),a=i(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),l=i(/*! ../types/level */"./src/types/level.ts"),c=i(/*! ../types/loader */"./src/types/loader.ts"),u=i(/*! ../loader/fragment */"./src/loader/fragment.ts"),h=i(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts"),d=i(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),f=i(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),p=i(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),g=i(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),m=i(/*! ../errors */"./src/errors.ts"),v=i(/*! ../utils/logger */"./src/utils/logger.ts");function y(){return(y=Object.assign||function(t){for(var e=1;e0&&-1===t?(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=n.State.IDLE):(this.loadedmetadata=!1,this.state=n.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()},S.doTick=function(){switch(this.state){case n.State.IDLE:this.doTickIdle();break;case n.State.WAITING_TRACK:var e,i=this.levels,r=this.trackId,s=null==i||null===(e=i[r])||void 0===e?void 0:e.details;if(s){if(this.waitForCdnTuneIn(s))break;this.state=n.State.WAITING_INIT_PTS}break;case n.State.FRAG_LOADING_WAITING_RETRY:var a,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=n.State.IDLE);break;case n.State.WAITING_INIT_PTS:var u=this.waitingData;if(u){var h=u.frag,d=u.part,f=u.cache,g=u.complete;if(void 0!==this.initPTS[h.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=n.State.FRAG_LOADING;var m={frag:h,part:d,payload:f.flush(),networkDetails:null};this._handleFragmentLoadProgress(m),g&&t.prototype._handleFragmentLoadComplete.call(this,m)}else if(this.videoTrackCC!==this.waitingVideoCC)v.logger.log("Waiting fragment cc ("+h.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var y=this.getLoadPosition(),b=o.BufferHelper.bufferInfo(this.mediaBuffer,y,this.config.maxBufferHole);Object(p.fragmentWithinToleranceTest)(b.end,this.config.maxFragLookUpTolerance,h)<0&&(v.logger.log("Waiting fragment cc ("+h.cc+") @ "+h.start+" cancelled because another fragment at "+b.end+" is needed"),this.clearWaitingFragment())}}else this.state=n.State.IDLE}this.onTickEnd()},S.clearWaitingFragment=function(){var t=this.waitingData;t&&(this.fragmentTracker.removeFragment(t.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=n.State.IDLE)},S.onTickEnd=function(){var t=this.media;if(t&&t.readyState){var e=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&e.length&&(this.loadedmetadata=!0),this.lastCurrentTime=t.currentTime}},S.doTickIdle=function(){var t,e,i=this.hls,r=this.levels,o=this.media,a=this.trackId,l=i.config;if(r&&r[a]&&(o||!this.startFragRequested&&l.startFragPrefetch)){var h=r[a].details;if(!h||h.live&&this.levelLastLoaded!==a||this.waitForCdnTuneIn(h))this.state=n.State.WAITING_TRACK;else{this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,u.ElementaryStreamTypes.AUDIO,c.PlaylistLevelType.AUDIO));var d=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,c.PlaylistLevelType.AUDIO);if(null!==d){var f=d.len,p=this.getMaxBufferLength(),g=this.audioSwitch;if(!(f>=p)||g){if(!g&&this._streamEnded(d,h))return i.trigger(s.Events.BUFFER_EOS,{type:"audio"}),void(this.state=n.State.ENDED);var m=h.fragments[0].start,v=d.end;if(g){var y=this.getLoadPosition();v=y,h.PTSKnown&&ym||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),o.currentTime=m+.05)}var b=this.getNextFragment(v,h);b?"identity"!==(null===(t=b.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=b.decryptdata)&&void 0!==e&&e.key?this.loadFragment(b,h,v):this.loadKey(b,h):this.bufferFlushed=!0}}}}},S.getMaxBufferLength=function(){var e=t.prototype.getMaxBufferLength.call(this),i=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===i?e:Math.max(e,i.len)},S.onMediaDetaching=function(){this.videoBuffer=null,t.prototype.onMediaDetaching.call(this)},S.onAudioTracksUpdated=function(t,e){var i=e.audioTracks;this.resetTransmuxer(),this.levels=i.map((function(t){return new l.Level(t)}))},S.onAudioTrackSwitching=function(t,e){var i=!!e.url;this.trackId=e.id;var r=this.fragCurrent;null!=r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),i?this.setInterval(100):this.resetTransmuxer(),i?(this.audioSwitch=!0,this.state=n.State.IDLE):this.state=n.State.STOPPED,this.tick()},S.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},S.onLevelLoaded=function(t,e){this.mainDetails=e.details},S.onAudioTrackLoaded=function(t,e){var i,r=this.levels,s=e.details,o=e.id;if(r){this.log("Track "+o+" loaded ["+s.startSN+","+s.endSN+"],duration:"+s.totalduration);var a=r[o],l=0;if(s.live||null!==(i=a.details)&&void 0!==i&&i.live){var c=this.mainDetails;if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed||!c)return;!a.details&&s.hasProgramDateTime&&c.hasProgramDateTime?(Object(g.alignMediaPlaylistByPDT)(s,c),l=s.fragments[0].start):l=this.alignPlaylists(s,a.details)}a.details=s,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&s.live||this.setStartPosition(a.details,l),this.state!==n.State.WAITING_TRACK||this.waitForCdnTuneIn(s)||(this.state=n.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+o)},S._handleFragmentLoadProgress=function(t){var e,i=t.frag,r=t.part,s=t.payload,o=this.config,a=this.trackId,l=this.levels;if(l){var u=l[a];console.assert(u,"Audio track is defined on fragment load progress");var p=u.details;console.assert(p,"Audio track details are defined on fragment load progress");var g=o.defaultAudioCodec||u.audioCodec||"mp4a.40.2",m=this.transmuxer;m||(m=this.transmuxer=new d.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var y=this.initPTS[i.cc],b=null===(e=i.initSegment)||void 0===e?void 0:e.data;if(void 0!==y){var x=r?r.index:-1,S=-1!==x,C=new f.ChunkMetadata(i.level,i.sn,i.stats.chunkCount,s.byteLength,x,S);m.push(s,b,g,"",i,r,p.totalduration,!1,C,y)}else v.logger.log("Unknown video PTS for cc "+i.cc+", waiting for video PTS before demuxing audio frag "+i.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+a),(this.waitingData=this.waitingData||{frag:i,part:r,cache:new h.default,complete:!1}).cache.push(new Uint8Array(s)),this.waitingVideoCC=this.videoTrackCC,this.state=n.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+i.sn+" of level "+i.level+" will not be buffered")},S._handleFragmentLoadComplete=function(e){this.waitingData?this.waitingData.complete=!0:t.prototype._handleFragmentLoadComplete.call(this,e)},S.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},S.onBufferCreated=function(t,e){var i=e.tracks.audio;i&&(this.mediaBuffer=i.buffer),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},S.onFragBuffered=function(t,e){var i=e.frag,r=e.part;i.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(i)?this.warn("Fragment "+i.sn+(r?" p: "+r.index:"")+" of level "+i.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==i.sn&&(this.fragPrevious=i,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(i,r)))},S.onError=function(e,i){switch(i.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,i);break;case m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==n.State.ERROR&&this.state!==n.State.STOPPED&&(this.state=i.fatal?n.State.ERROR:n.State.IDLE,this.warn(i.details+" while loading frag, switching to "+this.state+" state"));break;case m.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===i.parent&&(this.state===n.State.PARSING||this.state===n.State.PARSED)){var r=!0,s=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);s&&s.len>.5&&(r=!this.reduceMaxBufferLength(s.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},S.onBufferFlushed=function(t,e){e.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},S._handleTransmuxComplete=function(t){var e,i="audio",r=this.hls,o=t.remuxResult,a=t.chunkMeta,l=this.getCurrentContext(a);if(!l)return this.warn("The loading context changed while buffering fragment "+a.sn+" of level "+a.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(a.level);var c=l.frag,h=l.part,d=o.audio,f=o.text,p=o.id3,g=o.initSegment;if(!this.fragContextChanged(c)){if(this.state=n.State.PARSING,this.audioSwitch&&d&&this.completeAudioSwitch(),null!=g&&g.tracks&&(this._bufferInitSegment(g.tracks,c,a),r.trigger(s.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:i,tracks:g.tracks})),d){var m=d.startPTS,v=d.endPTS,b=d.startDTS,x=d.endDTS;h&&(h.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:m,endPTS:v,startDTS:b,endDTS:x}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,m,v,b,x),this.bufferFragmentData(d,c,h,a)}if(null!=p&&null!==(e=p.samples)&&void 0!==e&&e.length){var S=y({frag:c,id:i},p);r.trigger(s.Events.FRAG_PARSING_METADATA,S)}if(f){var C=y({frag:c,id:i},f);r.trigger(s.Events.FRAG_PARSING_USERDATA,C)}}},S._bufferInitSegment=function(t,e,i){if(this.state===n.State.PARSING){t.video&&delete t.video;var r=t.audio;if(r){r.levelCodec=r.codec,r.id="audio",this.log("Init audio buffer, container:"+r.container+", codecs[parsed]=["+r.codec+"]"),this.hls.trigger(s.Events.BUFFER_CODECS,t);var o=r.initSegment;if(null!=o&&o.byteLength){var a={type:"audio",frag:e,part:null,chunkMeta:i,parent:e.type,data:o};this.hls.trigger(s.Events.BUFFER_APPENDING,a)}this.tick()}}},S.loadFragment=function(e,i,s){var o=this.fragmentTracker.getState(e);this.fragCurrent=e,(this.audioSwitch||o===a.FragmentState.NOT_LOADED||o===a.FragmentState.PARTIAL)&&("initSegment"===e.sn?this._loadInitSegment(e):i.live&&!Object(r.isFiniteNumber)(this.initPTS[e.cc])?(this.log("Waiting for video PTS in continuity counter "+e.cc+" of live stream before loading audio fragment "+e.sn+" of level "+this.trackId),this.state=n.State.WAITING_INIT_PTS):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,i,s)))},S.completeAudioSwitch=function(){var e=this.hls,i=this.media,r=this.trackId;i&&(this.log("Switching audio track : flushing all audio"),t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,e.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:r})},x}(n.default);e.default=x},"./src/controller/audio-track-controller.ts": /*!**************************************************!*\ !*** ./src/controller/audio-track-controller.ts ***! \**************************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ../events */"./src/events.ts"),n=r(/*! ../errors */"./src/errors.ts"),s=r(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),o=r(/*! ../types/loader */"./src/types/loader.ts");function a(t,e){for(var r=0;r=e.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var r=e[this.trackId];this.log("Now switching to audio-track index "+t);var n=e[t],s=n.id,o=n.groupId,a=void 0===o?"":o,l=n.name,c=n.type,u=n.url;if(this.trackId=t,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(i.Events.AUDIO_TRACK_SWITCHING,{id:s,groupId:a,name:l,type:c,url:u}),!n.details||n.details.live){var h=this.switchParams(n.url,null==r?void 0:r.details);this.loadPlaylist(h)}}},d.selectInitialTrack=function(){var t=this.tracksInGroup;console.assert(t.length,"Initial audio track should be selected when tracks are known");var e=this.trackName,r=this.findTrackId(e)||this.findTrackId();-1!==r?this.setAudioTrack(r):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(i.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},d.findTrackId=function(t){for(var e=this.tracksInGroup,r=0;r=e.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var i=e[this.trackId];this.log("Now switching to audio-track index "+t);var n=e[t],s=n.id,o=n.groupId,a=void 0===o?"":o,l=n.name,c=n.type,u=n.url;if(this.trackId=t,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(r.Events.AUDIO_TRACK_SWITCHING,{id:s,groupId:a,name:l,type:c,url:u}),!n.details||n.details.live){var h=this.switchParams(n.url,null==i?void 0:i.details);this.loadPlaylist(h)}}},d.selectInitialTrack=function(){var t=this.tracksInGroup;console.assert(t.length,"Initial audio track should be selected when tracks are known");var e=this.trackName,i=this.findTrackId(e)||this.findTrackId();-1!==i?this.setAudioTrack(i):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(r.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},d.findTrackId=function(t){for(var e=this.tracksInGroup,i=0;ie.partTarget&&(c+=1)}if(Object(i.isFiniteNumber)(l))return new n.HlsUrlParameters(l,Object(i.isFiniteNumber)(c)?c:void 0,n.HlsSkip.No)}}},e.loadPlaylist=function(t){},e.shouldLoadTrack=function(t){return this.canLoad&&t&&!!t.url&&(!t.details||t.details.live)},e.playlistLoaded=function(t,e,r){var i=this,n=e.details,o=e.stats,a=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(n.advancedDateTime=Date.now()-a,n.live||null!=r&&r.live){if(n.reloaded(r),r&&this.log("live playlist "+t+" "+(n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:"MISSED")),r&&n.fragments.length>0&&Object(s.mergeDetails)(r,n),!this.canLoad||!n.live)return;var l,c=void 0,u=void 0;if(n.canBlockReload&&n.endSN&&n.advanced){var h=this.hls.config.lowLatencyMode,d=n.lastPartSn,f=n.endSN,p=n.lastPartIndex,g=d===f;-1!==p?(c=g?f+1:d,u=g?h?0:p:p+1):c=f+1;var m=n.age,v=m+n.ageHeader,y=Math.min(v-n.partTarget,1.5*n.targetduration);if(y>0){if(r&&y>r.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+r.tuneInGoal+" to: "+y+" with playlist age: "+n.age),y=0;else{var b=Math.floor(y/n.targetduration);c+=b,void 0!==u&&(u+=Math.round(y%n.targetduration/n.partTarget)),this.log("CDN Tune-in age: "+n.ageHeader+"s last advanced "+m.toFixed(2)+"s goal: "+y+" skip sn "+b+" to part "+u)}n.tuneInGoal=y}if(l=this.getDeliveryDirectives(n,e.deliveryDirectives,c,u),h||!g)return void this.loadPlaylist(l)}else l=this.getDeliveryDirectives(n,e.deliveryDirectives,c,u);var x=Object(s.computeReloadInterval)(n,o);void 0!==c&&n.canBlockReload&&(x-=n.partTarget||1),this.log("reload live playlist "+t+" in "+Math.round(x)+" ms"),this.timer=self.setTimeout((function(){return i.loadPlaylist(l)}),x)}else this.clearTimer()},e.getDeliveryDirectives=function(t,e,r,i){var s=Object(n.getSkipValue)(t,r);return null!=e&&e.skip&&t.deltaUpdateFailed&&(r=e.msn,i=e.part,s=n.HlsSkip.No),new n.HlsUrlParameters(r,i,s)},e.retryLoadingOrFail=function(t){var e,r=this,i=this.hls.config,n=this.retryCount-1&&null!==(e=t.context)&&void 0!==e&&e.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+t.details+'"'),this.loadPlaylist();else{var s=Math.min(Math.pow(2,this.retryCount)*i.levelLoadingRetryDelay,i.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return r.loadPlaylist()}),s),this.warn("retry playlist loading #"+this.retryCount+" in "+s+' ms after "'+t.details+'"')}else this.warn('cannot recover from error "'+t.details+'"'),this.clearTimer(),t.fatal=!0;return n},t}()},"./src/controller/base-stream-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return l}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../types/level */"./src/types/level.ts"),s=i(/*! ./level-helper */"./src/controller/level-helper.ts"),o=i(/*! ../utils/logger */"./src/utils/logger.ts"),a=i(/*! ../errors */"./src/errors.ts"),l=function(){function t(t,e){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=o.logger.log.bind(o.logger,e+":"),this.warn=o.logger.warn.bind(o.logger,e+":"),this.hls=t}var e=t.prototype;return e.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},e.onError=function(t,e){e.fatal&&e.type===a.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},e.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},e.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},e.stopLoad=function(){this.canLoad=!1,this.clearTimer()},e.switchParams=function(t,e){var i=null==e?void 0:e.renditionReports;if(i)for(var s=0;se.partTarget&&(c+=1)}if(Object(r.isFiniteNumber)(l))return new n.HlsUrlParameters(l,Object(r.isFiniteNumber)(c)?c:void 0,n.HlsSkip.No)}}},e.loadPlaylist=function(t){},e.shouldLoadTrack=function(t){return this.canLoad&&t&&!!t.url&&(!t.details||t.details.live)},e.playlistLoaded=function(t,e,i){var r=this,n=e.details,o=e.stats,a=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(n.advancedDateTime=Date.now()-a,n.live||null!=i&&i.live){if(n.reloaded(i),i&&this.log("live playlist "+t+" "+(n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:"MISSED")),i&&n.fragments.length>0&&Object(s.mergeDetails)(i,n),!this.canLoad||!n.live)return;var l,c=void 0,u=void 0;if(n.canBlockReload&&n.endSN&&n.advanced){var h=this.hls.config.lowLatencyMode,d=n.lastPartSn,f=n.endSN,p=n.lastPartIndex,g=d===f;-1!==p?(c=g?f+1:d,u=g?h?0:p:p+1):c=f+1;var m=n.age,v=m+n.ageHeader,y=Math.min(v-n.partTarget,1.5*n.targetduration);if(y>0){if(i&&y>i.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+i.tuneInGoal+" to: "+y+" with playlist age: "+n.age),y=0;else{var b=Math.floor(y/n.targetduration);c+=b,void 0!==u&&(u+=Math.round(y%n.targetduration/n.partTarget)),this.log("CDN Tune-in age: "+n.ageHeader+"s last advanced "+m.toFixed(2)+"s goal: "+y+" skip sn "+b+" to part "+u)}n.tuneInGoal=y}if(l=this.getDeliveryDirectives(n,e.deliveryDirectives,c,u),h||!g)return void this.loadPlaylist(l)}else l=this.getDeliveryDirectives(n,e.deliveryDirectives,c,u);var x=Object(s.computeReloadInterval)(n,o);void 0!==c&&n.canBlockReload&&(x-=n.partTarget||1),this.log("reload live playlist "+t+" in "+Math.round(x)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),x)}else this.clearTimer()},e.getDeliveryDirectives=function(t,e,i,r){var s=Object(n.getSkipValue)(t,i);return null!=e&&e.skip&&t.deltaUpdateFailed&&(i=e.msn,r=e.part,s=n.HlsSkip.No),new n.HlsUrlParameters(i,r,s)},e.retryLoadingOrFail=function(t){var e,i=this,r=this.hls.config,n=this.retryCount-1&&null!==(e=t.context)&&void 0!==e&&e.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+t.details+'"'),this.loadPlaylist();else{var s=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return i.loadPlaylist()}),s),this.warn("retry playlist loading #"+this.retryCount+" in "+s+' ms after "'+t.details+'"')}else this.warn('cannot recover from error "'+t.details+'"'),this.clearTimer(),t.fatal=!0;return n},t}()},"./src/controller/base-stream-controller.ts": /*!**************************************************!*\ !*** ./src/controller/base-stream-controller.ts ***! \**************************************************/ -/*! exports provided: State, default */function(t,e,r){"use strict";r.r(e),r.d(e,"State",(function(){return S})),r.d(e,"default",(function(){return C}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../task-loop */"./src/task-loop.ts"),s=r(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),o=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),a=r(/*! ../utils/logger */"./src/utils/logger.ts"),l=r(/*! ../events */"./src/events.ts"),c=r(/*! ../errors */"./src/errors.ts"),u=r(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),h=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),d=r(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),f=r(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=r(/*! ./level-helper */"./src/controller/level-helper.ts"),g=r(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),m=r(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),v=r(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),y=r(/*! ../types/loader */"./src/types/loader.ts");function b(t,e){for(var r=0;re.start+e.duration+c;(a0&&s&&s.key&&s.iv&&"AES-128"===s.method){var o=self.performance.now();return e.decrypter.webCryptoDecrypt(new Uint8Array(n),s.key.buffer,s.iv.buffer).then((function(e){var n=self.performance.now();return i.trigger(l.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:o,tdecrypt:n}}),r.payload=e,r}))}return r})).then((function(r){var i=e.fragCurrent,n=e.hls,s=e.levels;if(!s)throw new Error("init load aborted, missing levels");var o=s[t.level].details;console.assert(o,"Level details are defined when init segment is loaded");var a=t.stats;e.state=S.IDLE,e.fragLoadError=0,t.data=new Uint8Array(r.payload),a.parsing.start=a.buffering.start=self.performance.now(),a.parsing.end=a.buffering.end=self.performance.now(),r.frag===i&&n.trigger(l.Events.FRAG_BUFFERED,{stats:a,frag:i,part:null,id:t.type}),e.tick()})).catch((function(r){e.warn(r),e.resetFragmentLoading(t)}))},E.fragContextChanged=function(t){var e=this.fragCurrent;return!t||!e||t.level!==e.level||t.sn!==e.sn||t.urlId!==e.urlId},E.fragBufferedComplete=function(t,e){var r=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+t.type+" sn: "+t.sn+(e?" part: "+e.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level+" "+v.default.toString(o.BufferHelper.getBuffered(r))),this.state=S.IDLE,this.tick()},E._handleFragmentLoadComplete=function(t){var e=this.transmuxer;if(e){var r=t.frag,i=t.part,n=t.partsLoaded,s=!n||0===n.length||n.some((function(t){return!t})),o=new u.ChunkMetadata(r.level,r.sn,r.stats.chunkCount+1,0,i?i.index:-1,!s);e.flush(o)}},E._handleFragmentLoadProgress=function(t){},E._doFragLoad=function(t,e,r,n){var s=this;if(void 0===r&&(r=null),!this.levels)throw new Error("frag load aborted, missing levels");if(r=Math.max(t.start,r||0),this.config.lowLatencyMode&&e){var o=e.partList;if(o&&n){r>t.end&&e.fragmentHint&&(t=e.fragmentHint);var a=this.getNextPart(o,t,r);if(a>-1){var c=o[a];return this.log("Loading part sn: "+t.sn+" p: "+c.index+" cc: "+t.cc+" of playlist ["+e.startSN+"-"+e.endSN+"] parts [0-"+a+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(r.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=S.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,part:o[a],targetBufferTime:r}),this.doFragPartsLoad(t,o,a,n).catch((function(t){return s.handleFragLoadError(t)}))}if(!t.url||this.loadedEndOfParts(o,r))return Promise.resolve(null)}}return this.log("Loading fragment "+t.sn+" cc: "+t.cc+" "+(e?"of ["+e.startSN+"-"+e.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(r.toFixed(3))),Object(i.isFiniteNumber)(t.sn)&&!this.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),this.state=S.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,targetBufferTime:r}),this.fragmentLoader.load(t,n).catch((function(t){return s.handleFragLoadError(t)}))},E.doFragPartsLoad=function(t,e,r,i){var n=this;return new Promise((function(s,o){var a=[];!function r(c){var u=e[c];n.fragmentLoader.loadPart(t,u,i).then((function(i){a[u.index]=i;var o=i.part;n.hls.trigger(l.Events.FRAG_LOADED,i);var h=e[c+1];if(!h||h.fragment!==t)return s({frag:t,part:o,partsLoaded:a});r(c+1)})).catch(o)}(r)}))},E.handleFragLoadError=function(t){var e=t.data;return e&&e.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(e.frag,e.part):this.hls.trigger(l.Events.ERROR,e),null},E._handleTransmuxerFlush=function(t){var e=this.getCurrentContext(t);if(e&&this.state===S.PARSING){var r=e.frag,i=e.part,n=e.level,s=self.performance.now();r.stats.parsing.end=s,i&&(i.stats.parsing.end=s),this.updateLevelTiming(r,i,n,t.partial)}else this.fragCurrent||(this.state=S.IDLE)},E.getCurrentContext=function(t){var e=this.levels,r=t.level,i=t.sn,n=t.part;if(!e||!e[r])return this.warn("Levels object was unset while buffering fragment "+i+" of level "+r+". The current chunk will not be buffered."),null;var s=e[r],o=n>-1?Object(p.getPartWith)(s,i,n):null,a=o?o.fragment:Object(p.getFragmentWithSN)(s,i,this.fragCurrent);return a?{frag:a,part:o,level:s}:null},E.bufferFragmentData=function(t,e,r,i){if(t&&this.state===S.PARSING){var n=t.data1,s=t.data2,o=n;if(n&&s&&(o=Object(h.appendUint8Array)(n,s)),o&&o.length){var a={type:t.type,frag:e,part:r,chunkMeta:i,parent:e.type,data:o};this.hls.trigger(l.Events.BUFFER_APPENDING,a),t.dropped&&t.independent&&!r&&this.flushBufferGap(e)}}},E.flushBufferGap=function(t){var e=this.media;if(e)if(o.BufferHelper.isBuffered(e,e.currentTime)){var r=e.currentTime,i=o.BufferHelper.bufferInfo(e,r,0),n=t.duration,s=Math.min(2*this.config.maxFragLookUpTolerance,.25*n),a=Math.max(Math.min(t.start-s,i.end-s),r+s);t.start-a>s&&this.flushMainBuffer(a,t.start)}else this.flushMainBuffer(0,t.start)},E.getFwdBufferInfo=function(t,e){var r=this.config,n=this.getLoadPosition();if(!Object(i.isFiniteNumber)(n))return null;var s=o.BufferHelper.bufferInfo(t,n,r.maxBufferHole);if(0===s.len&&void 0!==s.nextStart){var a=this.fragmentTracker.getBufferedFrag(n,e);if(a&&s.nextStart=r&&(e.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},E.getNextFragment=function(t,e){var r,i,n=e.fragments,s=n.length;if(!s)return null;var o,a=this.config,l=n[0].start;if(e.live){var c=a.initialLiveManifestSize;if(s-1&&rr.start&&r.loaded},E.getInitialLiveFragment=function(t,e){var r=this.fragPrevious,i=null;if(r){if(t.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+r.programDateTime),i=Object(f.findFragmentByPDT)(e,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!i){var n=r.sn+1;if(n>=t.startSN&&n<=t.endSN){var s=e[n-t.startSN];r.cc===s.cc&&(i=s,this.log("Live playlist, switching playlist, load frag with next SN: "+i.sn))}i||(i=Object(f.findFragWithCC)(e,r.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+i.sn)}}else{var o=this.hls.liveSyncPosition;null!==o&&(i=this.getFragmentAtPosition(o,this.bitrateTest?t.fragmentEnd:t.edge,t))}return i},E.getFragmentAtPosition=function(t,e,r){var i,n=this.config,o=this.fragPrevious,a=r.fragments,l=r.endSN,c=r.fragmentHint,u=n.maxFragLookUpTolerance,h=!!(n.lowLatencyMode&&r.partList&&c);if(h&&c&&!this.bitrateTest&&(a=a.concat(c),l=c.sn),te-u?0:u;i=Object(f.findFragmentByPTS)(o,a,t,d)}else i=a[a.length-1];if(i){var p=i.sn-r.startSN,g=o&&i.level===o.level,m=a[p+1];if(this.fragmentTracker.getState(i)===s.FragmentState.BACKTRACKED){i=null;for(var v=p;a[v]&&this.fragmentTracker.getState(a[v])===s.FragmentState.BACKTRACKED;)i=o?a[v--]:a[--v];i||(i=m)}else o&&i.sn===o.sn&&!h&&g&&(i.sn=s-e.maxFragLookUpTolerance&&n<=o;if(null!==i&&r.duration>i&&(n"+t.startSN+" prev-sn: "+(s?s.sn:"na")+" fragments: "+a),h}return l},E.waitForCdnTuneIn=function(t){return t.live&&t.canBlockReload&&t.tuneInGoal>Math.max(t.partHoldBack,3*t.partTarget)},E.setStartPosition=function(t,e){var r=this.startPosition;if(r"+t))}}])&&b(C.prototype,w),k&&b(C,k),n}(n.default)},"./src/controller/buffer-controller.ts": +/*! exports provided: State, default */function(t,e,i){"use strict";i.r(e),i.d(e,"State",(function(){return S})),i.d(e,"default",(function(){return C}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../task-loop */"./src/task-loop.ts"),s=i(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),o=i(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),a=i(/*! ../utils/logger */"./src/utils/logger.ts"),l=i(/*! ../events */"./src/events.ts"),c=i(/*! ../errors */"./src/errors.ts"),u=i(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),h=i(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),d=i(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),f=i(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=i(/*! ./level-helper */"./src/controller/level-helper.ts"),g=i(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),m=i(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),v=i(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),y=i(/*! ../types/loader */"./src/types/loader.ts");function b(t,e){for(var i=0;ie.start+e.duration+c;(a0&&s&&s.key&&s.iv&&"AES-128"===s.method){var o=self.performance.now();return e.decrypter.webCryptoDecrypt(new Uint8Array(n),s.key.buffer,s.iv.buffer).then((function(e){var n=self.performance.now();return r.trigger(l.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:o,tdecrypt:n}}),i.payload=e,i}))}return i})).then((function(i){var r=e.fragCurrent,n=e.hls,s=e.levels;if(!s)throw new Error("init load aborted, missing levels");var o=s[t.level].details;console.assert(o,"Level details are defined when init segment is loaded");var a=t.stats;e.state=S.IDLE,e.fragLoadError=0,t.data=new Uint8Array(i.payload),a.parsing.start=a.buffering.start=self.performance.now(),a.parsing.end=a.buffering.end=self.performance.now(),i.frag===r&&n.trigger(l.Events.FRAG_BUFFERED,{stats:a,frag:r,part:null,id:t.type}),e.tick()})).catch((function(i){e.warn(i),e.resetFragmentLoading(t)}))},E.fragContextChanged=function(t){var e=this.fragCurrent;return!t||!e||t.level!==e.level||t.sn!==e.sn||t.urlId!==e.urlId},E.fragBufferedComplete=function(t,e){var i=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+t.type+" sn: "+t.sn+(e?" part: "+e.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level+" "+v.default.toString(o.BufferHelper.getBuffered(i))),this.state=S.IDLE,this.tick()},E._handleFragmentLoadComplete=function(t){var e=this.transmuxer;if(e){var i=t.frag,r=t.part,n=t.partsLoaded,s=!n||0===n.length||n.some((function(t){return!t})),o=new u.ChunkMetadata(i.level,i.sn,i.stats.chunkCount+1,0,r?r.index:-1,!s);e.flush(o)}},E._handleFragmentLoadProgress=function(t){},E._doFragLoad=function(t,e,i,n){var s=this;if(void 0===i&&(i=null),!this.levels)throw new Error("frag load aborted, missing levels");if(i=Math.max(t.start,i||0),this.config.lowLatencyMode&&e){var o=e.partList;if(o&&n){i>t.end&&e.fragmentHint&&(t=e.fragmentHint);var a=this.getNextPart(o,t,i);if(a>-1){var c=o[a];return this.log("Loading part sn: "+t.sn+" p: "+c.index+" cc: "+t.cc+" of playlist ["+e.startSN+"-"+e.endSN+"] parts [0-"+a+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(i.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=S.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,part:o[a],targetBufferTime:i}),this.doFragPartsLoad(t,o,a,n).catch((function(t){return s.handleFragLoadError(t)}))}if(!t.url||this.loadedEndOfParts(o,i))return Promise.resolve(null)}}return this.log("Loading fragment "+t.sn+" cc: "+t.cc+" "+(e?"of ["+e.startSN+"-"+e.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(i.toFixed(3))),Object(r.isFiniteNumber)(t.sn)&&!this.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),this.state=S.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,targetBufferTime:i}),this.fragmentLoader.load(t,n).catch((function(t){return s.handleFragLoadError(t)}))},E.doFragPartsLoad=function(t,e,i,r){var n=this;return new Promise((function(s,o){var a=[];!function i(c){var u=e[c];n.fragmentLoader.loadPart(t,u,r).then((function(r){a[u.index]=r;var o=r.part;n.hls.trigger(l.Events.FRAG_LOADED,r);var h=e[c+1];if(!h||h.fragment!==t)return s({frag:t,part:o,partsLoaded:a});i(c+1)})).catch(o)}(i)}))},E.handleFragLoadError=function(t){var e=t.data;return e&&e.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(e.frag,e.part):this.hls.trigger(l.Events.ERROR,e),null},E._handleTransmuxerFlush=function(t){var e=this.getCurrentContext(t);if(e&&this.state===S.PARSING){var i=e.frag,r=e.part,n=e.level,s=self.performance.now();i.stats.parsing.end=s,r&&(r.stats.parsing.end=s),this.updateLevelTiming(i,r,n,t.partial)}else this.fragCurrent||(this.state=S.IDLE)},E.getCurrentContext=function(t){var e=this.levels,i=t.level,r=t.sn,n=t.part;if(!e||!e[i])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+i+". The current chunk will not be buffered."),null;var s=e[i],o=n>-1?Object(p.getPartWith)(s,r,n):null,a=o?o.fragment:Object(p.getFragmentWithSN)(s,r,this.fragCurrent);return a?{frag:a,part:o,level:s}:null},E.bufferFragmentData=function(t,e,i,r){if(t&&this.state===S.PARSING){var n=t.data1,s=t.data2,o=n;if(n&&s&&(o=Object(h.appendUint8Array)(n,s)),o&&o.length){var a={type:t.type,frag:e,part:i,chunkMeta:r,parent:e.type,data:o};this.hls.trigger(l.Events.BUFFER_APPENDING,a),t.dropped&&t.independent&&!i&&this.flushBufferGap(e)}}},E.flushBufferGap=function(t){var e=this.media;if(e)if(o.BufferHelper.isBuffered(e,e.currentTime)){var i=e.currentTime,r=o.BufferHelper.bufferInfo(e,i,0),n=t.duration,s=Math.min(2*this.config.maxFragLookUpTolerance,.25*n),a=Math.max(Math.min(t.start-s,r.end-s),i+s);t.start-a>s&&this.flushMainBuffer(a,t.start)}else this.flushMainBuffer(0,t.start)},E.getFwdBufferInfo=function(t,e){var i=this.config,n=this.getLoadPosition();if(!Object(r.isFiniteNumber)(n))return null;var s=o.BufferHelper.bufferInfo(t,n,i.maxBufferHole);if(0===s.len&&void 0!==s.nextStart){var a=this.fragmentTracker.getBufferedFrag(n,e);if(a&&s.nextStart=i&&(e.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},E.getNextFragment=function(t,e){var i,r,n=e.fragments,s=n.length;if(!s)return null;var o,a=this.config,l=n[0].start;if(e.live){var c=a.initialLiveManifestSize;if(s-1&&ii.start&&i.loaded},E.getInitialLiveFragment=function(t,e){var i=this.fragPrevious,r=null;if(i){if(t.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+i.programDateTime),r=Object(f.findFragmentByPDT)(e,i.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var n=i.sn+1;if(n>=t.startSN&&n<=t.endSN){var s=e[n-t.startSN];i.cc===s.cc&&(r=s,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=Object(f.findFragWithCC)(e,i.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+r.sn)}}else{var o=this.hls.liveSyncPosition;null!==o&&(r=this.getFragmentAtPosition(o,this.bitrateTest?t.fragmentEnd:t.edge,t))}return r},E.getFragmentAtPosition=function(t,e,i){var r,n=this.config,o=this.fragPrevious,a=i.fragments,l=i.endSN,c=i.fragmentHint,u=n.maxFragLookUpTolerance,h=!!(n.lowLatencyMode&&i.partList&&c);if(h&&c&&!this.bitrateTest&&(a=a.concat(c),l=c.sn),te-u?0:u;r=Object(f.findFragmentByPTS)(o,a,t,d)}else r=a[a.length-1];if(r){var p=r.sn-i.startSN,g=o&&r.level===o.level,m=a[p+1];if(this.fragmentTracker.getState(r)===s.FragmentState.BACKTRACKED){r=null;for(var v=p;a[v]&&this.fragmentTracker.getState(a[v])===s.FragmentState.BACKTRACKED;)r=o?a[v--]:a[--v];r||(r=m)}else o&&r.sn===o.sn&&!h&&g&&(r.sn=s-e.maxFragLookUpTolerance&&n<=o;if(null!==r&&i.duration>r&&(n"+t.startSN+" prev-sn: "+(s?s.sn:"na")+" fragments: "+a),h}return l},E.waitForCdnTuneIn=function(t){return t.live&&t.canBlockReload&&t.tuneInGoal>Math.max(t.partHoldBack,3*t.partTarget)},E.setStartPosition=function(t,e){var i=this.startPosition;if(i"+t))}}])&&b(C.prototype,w),k&&b(C,k),n}(n.default)},"./src/controller/buffer-controller.ts": /*!*********************************************!*\ !*** ./src/controller/buffer-controller.ts ***! \*********************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return f}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=r(/*! ../errors */"./src/errors.ts"),a=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=r(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=r(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=r(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),h=Object(l.getMediaSource)(),d=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function t(t){var e=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 t=e.hls,r=e.media,i=e.mediaSource;s.logger.log("[buffer-controller]: Media source opened"),r&&(e.updateMediaElementDuration(),t.trigger(n.Events.MEDIA_ATTACHED,{media:r})),i&&i.removeEventListener("sourceopen",e._onMediaSourceOpen),e.checkPendingTracks()},this._onMediaSourceClose=function(){s.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){s.logger.log("[buffer-controller]: Media source ended")},this.hls=t,this._initSourceBuffer(),this.registerListeners()}var e=t.prototype;return e.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},e.destroy=function(){this.unregisterListeners(),this.details=null},e.registerListeners=function(){var t=this.hls;t.on(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.Events.BUFFER_RESET,this.onBufferReset,this),t.on(n.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.on(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(n.Events.BUFFER_EOS,this.onBufferEos,this),t.on(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(n.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(n.Events.FRAG_PARSED,this.onFragParsed,this),t.on(n.Events.FRAG_CHANGED,this.onFragChanged,this)},e.unregisterListeners=function(){var t=this.hls;t.off(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.Events.BUFFER_RESET,this.onBufferReset,this),t.off(n.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.off(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(n.Events.BUFFER_EOS,this.onBufferEos,this),t.off(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(n.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(n.Events.FRAG_PARSED,this.onFragParsed,this),t.off(n.Events.FRAG_CHANGED,this.onFragChanged,this)},e._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},e.onManifestParsed=function(t,e){var r=2;(e.audio&&!e.video||!e.altAudio)&&(r=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=r,this.details=null,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},e.onMediaAttaching=function(t,e){var r=this.media=e.media;if(r&&h){var i=this.mediaSource=new h;i.addEventListener("sourceopen",this._onMediaSourceOpen),i.addEventListener("sourceended",this._onMediaSourceEnded),i.addEventListener("sourceclose",this._onMediaSourceClose),r.src=self.URL.createObjectURL(i),this._objectUrl=r.src}},e.onMediaDetaching=function(){var t=this.media,e=this.mediaSource,r=this._objectUrl;if(e){if(s.logger.log("[buffer-controller]: media source detaching"),"open"===e.readyState)try{e.endOfStream()}catch(t){s.logger.warn("[buffer-controller]: onMediaDetaching: "+t.message+" while calling endOfStream")}this.onBufferReset(),e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(r&&self.URL.revokeObjectURL(r),t.src===r?(t.removeAttribute("src"),t.load()):s.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(n.Events.MEDIA_DETACHED,void 0)},e.onBufferReset=function(){var t=this;this.getSourceBufferTypes().forEach((function(e){var r=t.sourceBuffer[e];try{r&&(t.removeBufferListeners(e),t.mediaSource&&t.mediaSource.removeSourceBuffer(r),t.sourceBuffer[e]=void 0)}catch(t){s.logger.warn("[buffer-controller]: Failed to reset the "+e+" buffer",t)}})),this._initSourceBuffer()},e.onBufferCodecs=function(t,e){var r=this,i=this.getSourceBufferTypes().length;Object.keys(e).forEach((function(t){if(i){var n=r.tracks[t];if(n&&"function"==typeof n.buffer.changeType){var s=e[t],o=s.codec,a=s.levelCodec,l=s.container;if((n.levelCodec||n.codec).replace(d,"$1")!==(a||o).replace(d,"$1")){var c=l+";codecs="+(a||o);r.appendChangeType(t,c)}}}else r.pendingTracks[t]=e[t]})),i||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},e.appendChangeType=function(t,e){var r=this,i=this.operationQueue,n={execute:function(){var n=r.sourceBuffer[t];n&&(s.logger.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+e),n.changeType(e)),i.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(e){s.logger.warn("[buffer-controller]: Failed to change "+t+" SourceBuffer type",e)}};i.append(n,t)},e.onBufferAppending=function(t,e){var r=this,i=this.hls,l=this.operationQueue,c=this.tracks,u=e.data,h=e.type,d=e.frag,f=e.part,p=e.chunkMeta,g=p.buffering[h],m=self.performance.now();g.start=m;var v=d.stats.buffering,y=f?f.stats.buffering:null;0===v.start&&(v.start=m),y&&0===y.start&&(y.start=m);var b=c.audio,x="audio"===h&&1===p.id&&"audio/mpeg"===(null==b?void 0:b.container),S={execute:function(){if(g.executeStart=self.performance.now(),x){var t=r.sourceBuffer[h];if(t){var e=d.start-t.timestampOffset;Math.abs(e)>=.1&&(s.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+e+") sn: "+d.sn+")"),t.timestampOffset=d.start)}}r.appendExecutor(u,h)},onStart:function(){},onComplete:function(){var t=self.performance.now();g.executeEnd=g.end=t,0===v.first&&(v.first=t),y&&0===y.first&&(y.first=t);var e=r.sourceBuffer,i={};for(var s in e)i[s]=a.BufferHelper.getBuffered(e[s]);r.appendError=0,r.hls.trigger(n.Events.BUFFER_APPENDED,{type:h,frag:d,part:f,chunkMeta:p,parent:d.type,timeRanges:i})},onError:function(t){s.logger.error("[buffer-controller]: Error encountered while trying to append to the "+h+" SourceBuffer",t);var e={type:o.ErrorTypes.MEDIA_ERROR,parent:d.type,details:o.ErrorDetails.BUFFER_APPEND_ERROR,err:t,fatal:!1};t.code===DOMException.QUOTA_EXCEEDED_ERR?e.details=o.ErrorDetails.BUFFER_FULL_ERROR:(r.appendError++,e.details=o.ErrorDetails.BUFFER_APPEND_ERROR,r.appendError>i.config.appendErrorMaxRetry&&(s.logger.error("[buffer-controller]: Failed "+i.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),e.fatal=!0)),i.trigger(n.Events.ERROR,e)}};l.append(S,h)},e.onBufferFlushing=function(t,e){var r=this,i=this.operationQueue,o=function(t){return{execute:r.removeExecutor.bind(r,t,e.startOffset,e.endOffset),onStart:function(){},onComplete:function(){r.hls.trigger(n.Events.BUFFER_FLUSHED,{type:t})},onError:function(e){s.logger.warn("[buffer-controller]: Failed to remove from "+t+" SourceBuffer",e)}}};e.type?i.append(o(e.type),e.type):this.getSourceBufferTypes().forEach((function(t){i.append(o(t),t)}))},e.onFragParsed=function(t,e){var r=this,i=e.frag,o=e.part,a=[],l=o?o.elementaryStreams:i.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?a.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&a.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&a.push("video")),0===a.length&&s.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+i.type+" level: "+i.level+" sn: "+i.sn),this.blockBuffers((function(){var t=self.performance.now();i.stats.buffering.end=t,o&&(o.stats.buffering.end=t);var e=o?o.stats:i.stats;r.hls.trigger(n.Events.FRAG_BUFFERED,{frag:i,part:o,stats:e,id:i.type})}),a)},e.onFragChanged=function(t,e){this.flushBackBuffer()},e.onBufferEos=function(t,e){var r=this;this.getSourceBufferTypes().reduce((function(t,i){var n=r.sourceBuffer[i];return e.type&&e.type!==i||n&&!n.ended&&(n.ended=!0,s.logger.log("[buffer-controller]: "+i+" sourceBuffer now EOS")),t&&!(n&&!n.ended)}),!0)&&this.blockBuffers((function(){var t=r.mediaSource;t&&"open"===t.readyState&&t.endOfStream()}))},e.onLevelUpdated=function(t,e){var r=e.details;r.fragments.length&&(this.details=r,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},e.flushBackBuffer=function(){var t=this.hls,e=this.details,r=this.media,s=this.sourceBuffer;if(r&&null!==e){var o=this.getSourceBufferTypes();if(o.length){var l=e.live&&null!==t.config.liveBackBufferLength?t.config.liveBackBufferLength:t.config.backBufferLength;if(Object(i.isFiniteNumber)(l)&&!(l<0)){var c=r.currentTime,u=e.levelTargetDuration,h=Math.max(l,u),d=Math.floor(c/u)*u-h;o.forEach((function(r){var i=s[r];if(i){var o=a.BufferHelper.getBuffered(i);o.length>0&&d>o.start(0)&&(t.trigger(n.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),e.live&&t.trigger(n.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),t.trigger(n.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:r}))}}))}}}},e.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var t=this.details,e=this.hls,r=this.media,n=this.mediaSource,o=t.fragments[0].start+t.totalduration,a=r.duration,l=Object(i.isFiniteNumber)(n.duration)?n.duration:0;t.live&&e.config.liveDurationInfinity?(s.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),n.duration=1/0,this.updateSeekableRange(t)):(o>l&&o>a||!Object(i.isFiniteNumber)(a))&&(s.logger.log("[buffer-controller]: Updating Media Source duration to "+o.toFixed(3)),n.duration=o)}},e.updateSeekableRange=function(t){var e=this.mediaSource,r=t.fragments;if(r.length&&t.live&&null!=e&&e.setLiveSeekableRange){var i=Math.max(0,r[0].start),n=Math.max(i,i+t.totalduration);e.setLiveSeekableRange(i,n)}},e.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,e=this.operationQueue,r=this.pendingTracks,i=Object.keys(r).length;if(i&&!t||2===i){this.createSourceBuffers(r),this.pendingTracks={};var s=this.getSourceBufferTypes();if(0===s.length)return void this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});s.forEach((function(t){e.executeNext(t)}))}},e.createSourceBuffers=function(t){var e=this.sourceBuffer,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");var i=0;for(var a in t)if(!e[a]){var l=t[a];if(!l)throw Error("source buffer exists for track "+a+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;s.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var h=e[a]=r.addSourceBuffer(u),d=a;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[a]={buffer:h,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},i++}catch(t){s.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+t.message),this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:t,mimeType:u})}}i&&this.hls.trigger(n.Events.BUFFER_CREATED,{tracks:this.tracks})},e._onSBUpdateStart=function(t){this.operationQueue.current(t).onStart()},e._onSBUpdateEnd=function(t){var e=this.operationQueue;e.current(t).onComplete(),e.shiftAndExecuteNext(t)},e._onSBUpdateError=function(t,e){s.logger.error("[buffer-controller]: "+t+" SourceBuffer error",e),this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var r=this.operationQueue.current(t);r&&r.onError(e)},e.removeExecutor=function(t,e,r){var n=this.media,o=this.mediaSource,a=this.operationQueue,l=this.sourceBuffer[t];if(!n||!o||!l)return s.logger.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),void a.shiftAndExecuteNext(t);var c=Object(i.isFiniteNumber)(n.duration)?n.duration:1/0,u=Object(i.isFiniteNumber)(o.duration)?o.duration:1/0,h=Math.max(0,e),d=Math.min(r,c,u);d>h?(s.logger.log("[buffer-controller]: Removing ["+h+","+d+"] from the "+t+" SourceBuffer"),console.assert(!l.updating,t+" sourceBuffer must not be updating"),l.remove(h,d)):a.shiftAndExecuteNext(t)},e.appendExecutor=function(t,e){var r=this.operationQueue,i=this.sourceBuffer[e];if(!i)return s.logger.warn("[buffer-controller]: Attempting to append to the "+e+" SourceBuffer, but it does not exist"),void r.shiftAndExecuteNext(e);i.ended=!1,console.assert(!i.updating,e+" sourceBuffer must not be updating"),i.appendBuffer(t)},e.blockBuffers=function(t,e){var r=this;if(void 0===e&&(e=this.getSourceBufferTypes()),!e.length)return s.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(t);var i=this.operationQueue,n=e.map((function(t){return i.appendBlocker(t)}));Promise.all(n).then((function(){t(),e.forEach((function(t){var e=r.sourceBuffer[t];e&&e.updating||i.shiftAndExecuteNext(t)}))}))},e.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},e.addBufferListener=function(t,e,r){var i=this.sourceBuffer[t];if(i){var n=r.bind(this,t);this.listeners[t].push({event:e,listener:n}),i.addEventListener(e,n)}},e.removeBufferListeners=function(t){var e=this.sourceBuffer[t];e&&this.listeners[t].forEach((function(t){e.removeEventListener(t.event,t.listener)}))},t}()},"./src/controller/buffer-operation-queue.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return f}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts"),o=i(/*! ../errors */"./src/errors.ts"),a=i(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=i(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=i(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=i(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),h=Object(l.getMediaSource)(),d=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function t(t){var e=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 t=e.hls,i=e.media,r=e.mediaSource;s.logger.log("[buffer-controller]: Media source opened"),i&&(e.updateMediaElementDuration(),t.trigger(n.Events.MEDIA_ATTACHED,{media:i})),r&&r.removeEventListener("sourceopen",e._onMediaSourceOpen),e.checkPendingTracks()},this._onMediaSourceClose=function(){s.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){s.logger.log("[buffer-controller]: Media source ended")},this.hls=t,this._initSourceBuffer(),this.registerListeners()}var e=t.prototype;return e.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},e.destroy=function(){this.unregisterListeners(),this.details=null},e.registerListeners=function(){var t=this.hls;t.on(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.Events.BUFFER_RESET,this.onBufferReset,this),t.on(n.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.on(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(n.Events.BUFFER_EOS,this.onBufferEos,this),t.on(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(n.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(n.Events.FRAG_PARSED,this.onFragParsed,this),t.on(n.Events.FRAG_CHANGED,this.onFragChanged,this)},e.unregisterListeners=function(){var t=this.hls;t.off(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.Events.BUFFER_RESET,this.onBufferReset,this),t.off(n.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.off(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(n.Events.BUFFER_EOS,this.onBufferEos,this),t.off(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(n.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(n.Events.FRAG_PARSED,this.onFragParsed,this),t.off(n.Events.FRAG_CHANGED,this.onFragChanged,this)},e._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},e.onManifestParsed=function(t,e){var i=2;(e.audio&&!e.video||!e.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,this.details=null,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},e.onMediaAttaching=function(t,e){var i=this.media=e.media;if(i&&h){var r=this.mediaSource=new h;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),i.src=self.URL.createObjectURL(r),this._objectUrl=i.src}},e.onMediaDetaching=function(){var t=this.media,e=this.mediaSource,i=this._objectUrl;if(e){if(s.logger.log("[buffer-controller]: media source detaching"),"open"===e.readyState)try{e.endOfStream()}catch(t){s.logger.warn("[buffer-controller]: onMediaDetaching: "+t.message+" while calling endOfStream")}this.onBufferReset(),e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(i&&self.URL.revokeObjectURL(i),t.src===i?(t.removeAttribute("src"),t.load()):s.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(n.Events.MEDIA_DETACHED,void 0)},e.onBufferReset=function(){var t=this;this.getSourceBufferTypes().forEach((function(e){var i=t.sourceBuffer[e];try{i&&(t.removeBufferListeners(e),t.mediaSource&&t.mediaSource.removeSourceBuffer(i),t.sourceBuffer[e]=void 0)}catch(t){s.logger.warn("[buffer-controller]: Failed to reset the "+e+" buffer",t)}})),this._initSourceBuffer()},e.onBufferCodecs=function(t,e){var i=this,r=this.getSourceBufferTypes().length;Object.keys(e).forEach((function(t){if(r){var n=i.tracks[t];if(n&&"function"==typeof n.buffer.changeType){var s=e[t],o=s.codec,a=s.levelCodec,l=s.container;if((n.levelCodec||n.codec).replace(d,"$1")!==(a||o).replace(d,"$1")){var c=l+";codecs="+(a||o);i.appendChangeType(t,c)}}}else i.pendingTracks[t]=e[t]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},e.appendChangeType=function(t,e){var i=this,r=this.operationQueue,n={execute:function(){var n=i.sourceBuffer[t];n&&(s.logger.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+e),n.changeType(e)),r.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(e){s.logger.warn("[buffer-controller]: Failed to change "+t+" SourceBuffer type",e)}};r.append(n,t)},e.onBufferAppending=function(t,e){var i=this,r=this.hls,l=this.operationQueue,c=this.tracks,u=e.data,h=e.type,d=e.frag,f=e.part,p=e.chunkMeta,g=p.buffering[h],m=self.performance.now();g.start=m;var v=d.stats.buffering,y=f?f.stats.buffering:null;0===v.start&&(v.start=m),y&&0===y.start&&(y.start=m);var b=c.audio,x="audio"===h&&1===p.id&&"audio/mpeg"===(null==b?void 0:b.container),S={execute:function(){if(g.executeStart=self.performance.now(),x){var t=i.sourceBuffer[h];if(t){var e=d.start-t.timestampOffset;Math.abs(e)>=.1&&(s.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+e+") sn: "+d.sn+")"),t.timestampOffset=d.start)}}i.appendExecutor(u,h)},onStart:function(){},onComplete:function(){var t=self.performance.now();g.executeEnd=g.end=t,0===v.first&&(v.first=t),y&&0===y.first&&(y.first=t);var e=i.sourceBuffer,r={};for(var s in e)r[s]=a.BufferHelper.getBuffered(e[s]);i.appendError=0,i.hls.trigger(n.Events.BUFFER_APPENDED,{type:h,frag:d,part:f,chunkMeta:p,parent:d.type,timeRanges:r})},onError:function(t){s.logger.error("[buffer-controller]: Error encountered while trying to append to the "+h+" SourceBuffer",t);var e={type:o.ErrorTypes.MEDIA_ERROR,parent:d.type,details:o.ErrorDetails.BUFFER_APPEND_ERROR,err:t,fatal:!1};t.code===DOMException.QUOTA_EXCEEDED_ERR?e.details=o.ErrorDetails.BUFFER_FULL_ERROR:(i.appendError++,e.details=o.ErrorDetails.BUFFER_APPEND_ERROR,i.appendError>r.config.appendErrorMaxRetry&&(s.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),e.fatal=!0)),r.trigger(n.Events.ERROR,e)}};l.append(S,h)},e.onBufferFlushing=function(t,e){var i=this,r=this.operationQueue,o=function(t){return{execute:i.removeExecutor.bind(i,t,e.startOffset,e.endOffset),onStart:function(){},onComplete:function(){i.hls.trigger(n.Events.BUFFER_FLUSHED,{type:t})},onError:function(e){s.logger.warn("[buffer-controller]: Failed to remove from "+t+" SourceBuffer",e)}}};e.type?r.append(o(e.type),e.type):this.getSourceBufferTypes().forEach((function(t){r.append(o(t),t)}))},e.onFragParsed=function(t,e){var i=this,r=e.frag,o=e.part,a=[],l=o?o.elementaryStreams:r.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?a.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&a.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&a.push("video")),0===a.length&&s.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var t=self.performance.now();r.stats.buffering.end=t,o&&(o.stats.buffering.end=t);var e=o?o.stats:r.stats;i.hls.trigger(n.Events.FRAG_BUFFERED,{frag:r,part:o,stats:e,id:r.type})}),a)},e.onFragChanged=function(t,e){this.flushBackBuffer()},e.onBufferEos=function(t,e){var i=this;this.getSourceBufferTypes().reduce((function(t,r){var n=i.sourceBuffer[r];return e.type&&e.type!==r||n&&!n.ended&&(n.ended=!0,s.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS")),t&&!(n&&!n.ended)}),!0)&&this.blockBuffers((function(){var t=i.mediaSource;t&&"open"===t.readyState&&t.endOfStream()}))},e.onLevelUpdated=function(t,e){var i=e.details;i.fragments.length&&(this.details=i,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},e.flushBackBuffer=function(){var t=this.hls,e=this.details,i=this.media,s=this.sourceBuffer;if(i&&null!==e){var o=this.getSourceBufferTypes();if(o.length){var l=e.live&&null!==t.config.liveBackBufferLength?t.config.liveBackBufferLength:t.config.backBufferLength;if(Object(r.isFiniteNumber)(l)&&!(l<0)){var c=i.currentTime,u=e.levelTargetDuration,h=Math.max(l,u),d=Math.floor(c/u)*u-h;o.forEach((function(i){var r=s[i];if(r){var o=a.BufferHelper.getBuffered(r);o.length>0&&d>o.start(0)&&(t.trigger(n.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),e.live&&t.trigger(n.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),t.trigger(n.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:i}))}}))}}}},e.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var t=this.details,e=this.hls,i=this.media,n=this.mediaSource,o=t.fragments[0].start+t.totalduration,a=i.duration,l=Object(r.isFiniteNumber)(n.duration)?n.duration:0;t.live&&e.config.liveDurationInfinity?(s.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),n.duration=1/0,this.updateSeekableRange(t)):(o>l&&o>a||!Object(r.isFiniteNumber)(a))&&(s.logger.log("[buffer-controller]: Updating Media Source duration to "+o.toFixed(3)),n.duration=o)}},e.updateSeekableRange=function(t){var e=this.mediaSource,i=t.fragments;if(i.length&&t.live&&null!=e&&e.setLiveSeekableRange){var r=Math.max(0,i[0].start),n=Math.max(r,r+t.totalduration);e.setLiveSeekableRange(r,n)}},e.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,e=this.operationQueue,i=this.pendingTracks,r=Object.keys(i).length;if(r&&!t||2===r){this.createSourceBuffers(i),this.pendingTracks={};var s=this.getSourceBufferTypes();if(0===s.length)return void this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});s.forEach((function(t){e.executeNext(t)}))}},e.createSourceBuffers=function(t){var e=this.sourceBuffer,i=this.mediaSource;if(!i)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var a in t)if(!e[a]){var l=t[a];if(!l)throw Error("source buffer exists for track "+a+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;s.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var h=e[a]=i.addSourceBuffer(u),d=a;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[a]={buffer:h,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},r++}catch(t){s.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+t.message),this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:t,mimeType:u})}}r&&this.hls.trigger(n.Events.BUFFER_CREATED,{tracks:this.tracks})},e._onSBUpdateStart=function(t){this.operationQueue.current(t).onStart()},e._onSBUpdateEnd=function(t){var e=this.operationQueue;e.current(t).onComplete(),e.shiftAndExecuteNext(t)},e._onSBUpdateError=function(t,e){s.logger.error("[buffer-controller]: "+t+" SourceBuffer error",e),this.hls.trigger(n.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var i=this.operationQueue.current(t);i&&i.onError(e)},e.removeExecutor=function(t,e,i){var n=this.media,o=this.mediaSource,a=this.operationQueue,l=this.sourceBuffer[t];if(!n||!o||!l)return s.logger.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),void a.shiftAndExecuteNext(t);var c=Object(r.isFiniteNumber)(n.duration)?n.duration:1/0,u=Object(r.isFiniteNumber)(o.duration)?o.duration:1/0,h=Math.max(0,e),d=Math.min(i,c,u);d>h?(s.logger.log("[buffer-controller]: Removing ["+h+","+d+"] from the "+t+" SourceBuffer"),console.assert(!l.updating,t+" sourceBuffer must not be updating"),l.remove(h,d)):a.shiftAndExecuteNext(t)},e.appendExecutor=function(t,e){var i=this.operationQueue,r=this.sourceBuffer[e];if(!r)return s.logger.warn("[buffer-controller]: Attempting to append to the "+e+" SourceBuffer, but it does not exist"),void i.shiftAndExecuteNext(e);r.ended=!1,console.assert(!r.updating,e+" sourceBuffer must not be updating"),r.appendBuffer(t)},e.blockBuffers=function(t,e){var i=this;if(void 0===e&&(e=this.getSourceBufferTypes()),!e.length)return s.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(t);var r=this.operationQueue,n=e.map((function(t){return r.appendBlocker(t)}));Promise.all(n).then((function(){t(),e.forEach((function(t){var e=i.sourceBuffer[t];e&&e.updating||r.shiftAndExecuteNext(t)}))}))},e.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},e.addBufferListener=function(t,e,i){var r=this.sourceBuffer[t];if(r){var n=i.bind(this,t);this.listeners[t].push({event:e,listener:n}),r.addEventListener(e,n)}},e.removeBufferListeners=function(t){var e=this.sourceBuffer[t];e&&this.listeners[t].forEach((function(t){e.removeEventListener(t.event,t.listener)}))},t}()},"./src/controller/buffer-operation-queue.ts": /*!**************************************************!*\ !*** ./src/controller/buffer-operation-queue.ts ***! \**************************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var i=r(/*! ../utils/logger */"./src/utils/logger.ts"),n=function(){function t(t){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=t}var e=t.prototype;return e.append=function(t,e){var r=this.queues[e];r.push(t),1===r.length&&this.buffers[e]&&this.executeNext(e)},e.insertAbort=function(t,e){this.queues[e].unshift(t),this.executeNext(e)},e.appendBlocker=function(t){var e,r=new Promise((function(t){e=t})),i={execute:e,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(i,t),r},e.executeNext=function(t){var e=this.buffers,r=this.queues,n=e[t],s=r[t];if(s.length){var o=s[0];try{o.execute()}catch(e){i.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(e),n&&n.updating||(s.shift(),this.executeNext(t))}}},e.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},e.current=function(t){return this.queues[t][0]},t}()},"./src/controller/cap-level-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return n}));var r=i(/*! ../utils/logger */"./src/utils/logger.ts"),n=function(){function t(t){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=t}var e=t.prototype;return e.append=function(t,e){var i=this.queues[e];i.push(t),1===i.length&&this.buffers[e]&&this.executeNext(e)},e.insertAbort=function(t,e){this.queues[e].unshift(t),this.executeNext(e)},e.appendBlocker=function(t){var e,i=new Promise((function(t){e=t})),r={execute:e,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,t),i},e.executeNext=function(t){var e=this.buffers,i=this.queues,n=e[t],s=i[t];if(s.length){var o=s[0];try{o.execute()}catch(e){r.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(e),n&&n.updating||(s.shift(),this.executeNext(t))}}},e.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},e.current=function(t){return this.queues[t][0]},t}()},"./src/controller/cap-level-controller.ts": /*!************************************************!*\ !*** ./src/controller/cap-level-controller.ts ***! \************************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ../events */"./src/events.ts");function n(t,e){for(var r=0;r0&&this.mediaWidth>0){var t=this.hls.levels;if(t.length){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t.length-1),e.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},o.getMaxLevel=function(e){var r=this,i=this.hls.levels;if(!i.length)return-1;var n=i.filter((function(i,n){return t.isLevelAllowed(n,r.restrictedLevels)&&n<=e}));return this.clientRect=null,t.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){this.timer||(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())},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,e={width:0,height:0};if(t){var r=t.getBoundingClientRect();e.width=r.width,e.height=r.height,e.width||e.height||(e.width=r.right-r.left||t.width||0,e.height=r.bottom-r.top||t.height||0)}return this.clientRect=e,e},t.isLevelAllowed=function(t,e){return void 0===e&&(e=[]),-1===e.indexOf(t)},t.getMaxLevelByMediaSize=function(t,e,r){if(!t||!t.length)return-1;for(var i,n,s=t.length-1,o=0;o=e||a.height>=r)&&(i=a,!(n=t[o+1])||i.width!==n.width||i.height!==n.height)){s=o;break}}return s},e=t,s=[{key:"contentScaleFactor",get:function(){var t=1;try{t=self.devicePixelRatio}catch(t){}return t}}],(r=[{key:"mediaWidth",get:function(){return this.getDimensions().width*t.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*t.contentScaleFactor}}])&&n(e.prototype,r),s&&n(e,s),t}();e.default=s},"./src/controller/cmcd-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../events */"./src/events.ts");function n(t,e){for(var i=0;i0&&this.mediaWidth>0){var t=this.hls.levels;if(t.length){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t.length-1),e.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},o.getMaxLevel=function(e){var i=this,r=this.hls.levels;if(!r.length)return-1;var n=r.filter((function(r,n){return t.isLevelAllowed(n,i.restrictedLevels)&&n<=e}));return this.clientRect=null,t.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){this.timer||(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())},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,e={width:0,height:0};if(t){var i=t.getBoundingClientRect();e.width=i.width,e.height=i.height,e.width||e.height||(e.width=i.right-i.left||t.width||0,e.height=i.bottom-i.top||t.height||0)}return this.clientRect=e,e},t.isLevelAllowed=function(t,e){return void 0===e&&(e=[]),-1===e.indexOf(t)},t.getMaxLevelByMediaSize=function(t,e,i){if(!t||!t.length)return-1;for(var r,n,s=t.length-1,o=0;o=e||a.height>=i)&&(r=a,!(n=t[o+1])||r.width!==n.width||r.height!==n.height)){s=o;break}}return s},e=t,s=[{key:"contentScaleFactor",get:function(){var t=1;try{t=self.devicePixelRatio}catch(t){}return t}}],(i=[{key:"mediaWidth",get:function(){return this.getDimensions().width*t.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*t.contentScaleFactor}}])&&n(e.prototype,i),s&&n(e,s),t}();e.default=s},"./src/controller/cmcd-controller.ts": /*!*******************************************!*\ !*** ./src/controller/cmcd-controller.ts ***! \*******************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return d}));var i=r(/*! ../events */"./src/events.ts"),n=r(/*! ../types/cmcd */"./src/types/cmcd.ts"),s=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts");function a(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);rr&&(r=s.bitrate)}return r>0?r:NaN},e.getBufferLength=function(t){var e=this.hls.media,r=t===n.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return r&&e?1e3*s.BufferHelper.bufferInfo(r,e.currentTime,this.config.maxBufferHole).len:NaN},e.createPlaylistLoader=function(){var t=this.config.pLoader,e=this.applyPlaylistData,r=t||this.config.loader;return function(){function t(t){this.loader=void 0,this.loader=new r(t)}var i=t.prototype;return i.destroy=function(){this.loader.destroy()},i.abort=function(){this.loader.abort()},i.load=function(t,r,i){e(t),this.loader.load(t,r,i)},l(t,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),t}()},e.createFragmentLoader=function(){var t=this.config.fLoader,e=this.applyFragmentData,r=t||this.config.loader;return function(){function t(t){this.loader=void 0,this.loader=new r(t)}var i=t.prototype;return i.destroy=function(){this.loader.destroy()},i.abort=function(){this.loader.abort()},i.load=function(t,r,i){e(t),this.loader.load(t,r,i)},l(t,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),t}()},t.uuid=function(){var t=URL.createObjectURL(new Blob),e=t.toString();return URL.revokeObjectURL(t),e.substr(e.lastIndexOf("/")+1)},t.serialize=function(t){for(var e,r=[],i=function(t){return!Number.isNaN(t)&&null!=t&&""!==t&&!1!==t},n=function(t){return Math.round(t)},s=function(t){return 100*n(t/100)},o={br:n,d:n,bl:s,dl:s,mtp:s,nor:function(t){return encodeURIComponent(t)},rtp:s,tb:n},a=c(Object.keys(t||{}).sort());!(e=a()).done;){var l=e.value,u=t[l];if(i(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var h=o[l];h&&(u=h(u));var d=typeof u,f=void 0;f="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===d?l:"number"===d?l+"="+u:l+"="+JSON.stringify(u),r.push(f)}}return r.join(",")},t.toHeaders=function(e){for(var r={},i=["Object","Request","Session","Status"],n=[{},{},{},{}],s={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},o=0,a=Object.keys(e);o=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);ii&&(i=s.bitrate)}return i>0?i:NaN},e.getBufferLength=function(t){var e=this.hls.media,i=t===n.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return i&&e?1e3*s.BufferHelper.bufferInfo(i,e.currentTime,this.config.maxBufferHole).len:NaN},e.createPlaylistLoader=function(){var t=this.config.pLoader,e=this.applyPlaylistData,i=t||this.config.loader;return function(){function t(t){this.loader=void 0,this.loader=new i(t)}var r=t.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(t,i,r){e(t),this.loader.load(t,i,r)},l(t,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),t}()},e.createFragmentLoader=function(){var t=this.config.fLoader,e=this.applyFragmentData,i=t||this.config.loader;return function(){function t(t){this.loader=void 0,this.loader=new i(t)}var r=t.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(t,i,r){e(t),this.loader.load(t,i,r)},l(t,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),t}()},t.uuid=function(){var t=URL.createObjectURL(new Blob),e=t.toString();return URL.revokeObjectURL(t),e.substr(e.lastIndexOf("/")+1)},t.serialize=function(t){for(var e,i=[],r=function(t){return!Number.isNaN(t)&&null!=t&&""!==t&&!1!==t},n=function(t){return Math.round(t)},s=function(t){return 100*n(t/100)},o={br:n,d:n,bl:s,dl:s,mtp:s,nor:function(t){return encodeURIComponent(t)},rtp:s,tb:n},a=c(Object.keys(t||{}).sort());!(e=a()).done;){var l=e.value,u=t[l];if(r(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var h=o[l];h&&(u=h(u));var d=typeof u,f=void 0;f="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===d?l:"number"===d?l+"="+u:l+"="+JSON.stringify(u),i.push(f)}}return i.join(",")},t.toHeaders=function(e){for(var i={},r=["Object","Request","Session","Status"],n=[{},{},{},{}],s={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},o=0,a=Object.keys(e);o3)return void this.hls.trigger(i.Events.ERROR,{type:n.ErrorTypes.KEY_SYSTEM_ERROR,details:n.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(r,o)}}},c._generateLicenseRequestChallenge=function(t,e){switch(t.mediaKeySystemDomain){case o.KeySystems.WIDEVINE:return e}throw new Error("unsupported key-system: "+t.mediaKeySystemDomain)},c._requestLicense=function(t,e){s.logger.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r)return s.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(i.Events.ERROR,{type:n.ErrorTypes.KEY_SYSTEM_ERROR,details:n.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var o=this.getLicenseServerUrl(r.mediaKeySystemDomain),a=this._createLicenseXhr(o,t,e);s.logger.log("Sending license request to URL: "+o);var l=this._generateLicenseRequestChallenge(r,t);a.send(l)}catch(t){s.logger.error("Failure requesting DRM license: "+t),this.hls.trigger(i.Events.ERROR,{type:n.ErrorTypes.KEY_SYSTEM_ERROR,details:n.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(t,e){if(this._emeEnabled){var r=e.media;this._media=r,r.addEventListener("encrypted",this._onMediaEncrypted)}},c.onMediaDetached=function(){var t=this._media,e=this._mediaKeysList;t&&(t.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(e.map((function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch((function(){}))}))).then((function(){return t.setMediaKeys(null)})).catch((function(){})))},c.onManifestParsed=function(t,e){if(this._emeEnabled){var r=e.levels.map((function(t){return t.audioCodec})).filter((function(t){return!!t})),i=e.levels.map((function(t){return t.videoCodec})).filter((function(t){return!!t}));this._attemptKeySystemAccess(o.KeySystems.WIDEVINE,r,i)}},e=t,(r=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&a(e.prototype,r),l&&a(e,l),t}();e.default=l},"./src/controller/fps-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../events */"./src/events.ts"),n=i(/*! ../errors */"./src/errors.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts"),o=i(/*! ../utils/mediakeys-helper */"./src/utils/mediakeys-helper.ts");function a(t,e){for(var i=0;i3)return void this.hls.trigger(r.Events.ERROR,{type:n.ErrorTypes.KEY_SYSTEM_ERROR,details:n.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(i,o)}}},c._generateLicenseRequestChallenge=function(t,e){switch(t.mediaKeySystemDomain){case o.KeySystems.WIDEVINE:return e}throw new Error("unsupported key-system: "+t.mediaKeySystemDomain)},c._requestLicense=function(t,e){s.logger.log("Requesting content license for key-system");var i=this._mediaKeysList[0];if(!i)return s.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:n.ErrorTypes.KEY_SYSTEM_ERROR,details:n.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var o=this.getLicenseServerUrl(i.mediaKeySystemDomain),a=this._createLicenseXhr(o,t,e);s.logger.log("Sending license request to URL: "+o);var l=this._generateLicenseRequestChallenge(i,t);a.send(l)}catch(t){s.logger.error("Failure requesting DRM license: "+t),this.hls.trigger(r.Events.ERROR,{type:n.ErrorTypes.KEY_SYSTEM_ERROR,details:n.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(t,e){if(this._emeEnabled){var i=e.media;this._media=i,i.addEventListener("encrypted",this._onMediaEncrypted)}},c.onMediaDetached=function(){var t=this._media,e=this._mediaKeysList;t&&(t.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(e.map((function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch((function(){}))}))).then((function(){return t.setMediaKeys(null)})).catch((function(){})))},c.onManifestParsed=function(t,e){if(this._emeEnabled){var i=e.levels.map((function(t){return t.audioCodec})).filter((function(t){return!!t})),r=e.levels.map((function(t){return t.videoCodec})).filter((function(t){return!!t}));this._attemptKeySystemAccess(o.KeySystems.WIDEVINE,i,r)}},e=t,(i=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&a(e.prototype,i),l&&a(e,l),t}();e.default=l},"./src/controller/fps-controller.ts": /*!******************************************!*\ !*** ./src/controller/fps-controller.ts ***! \******************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ../events */"./src/events.ts"),n=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=function(){function t(t){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=t,this.registerListeners()}var e=t.prototype;return e.setStreamController=function(t){this.streamController=t},e.registerListeners=function(){this.hls.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},e.unregisterListeners=function(){this.hls.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching)},e.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},e.onMediaAttaching=function(t,e){var r=this.hls.config;if(r.capLevelOnFPSDrop){var i=e.media instanceof self.HTMLVideoElement?e.media:null;this.media=i,i&&"function"==typeof i.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}},e.checkFPS=function(t,e,r){var s=performance.now();if(e){if(this.lastTime){var o=s-this.lastTime,a=r-this.lastDroppedFrames,l=e-this.lastDecodedFrames,c=1e3*a/o,u=this.hls;if(u.trigger(i.Events.FPS_DROP,{currentDropped:a,currentDecoded:l,totalDroppedFrames:r}),c>0&&a>u.config.fpsDroppedMonitoringThreshold*l){var h=u.currentLevel;n.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=h)&&(h-=1,u.trigger(i.Events.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:u.currentLevel}),u.autoLevelCapping=h,this.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=r,this.lastDecodedFrames=e}},e.checkFPSInterval=function(){var t=this.media;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},t}();e.default=s},"./src/controller/fragment-finders.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../events */"./src/events.ts"),n=i(/*! ../utils/logger */"./src/utils/logger.ts"),s=function(){function t(t){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=t,this.registerListeners()}var e=t.prototype;return e.setStreamController=function(t){this.streamController=t},e.registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},e.unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching)},e.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},e.onMediaAttaching=function(t,e){var i=this.hls.config;if(i.capLevelOnFPSDrop){var r=e.media instanceof self.HTMLVideoElement?e.media:null;this.media=r,r&&"function"==typeof r.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod)}},e.checkFPS=function(t,e,i){var s=performance.now();if(e){if(this.lastTime){var o=s-this.lastTime,a=i-this.lastDroppedFrames,l=e-this.lastDecodedFrames,c=1e3*a/o,u=this.hls;if(u.trigger(r.Events.FPS_DROP,{currentDropped:a,currentDecoded:l,totalDroppedFrames:i}),c>0&&a>u.config.fpsDroppedMonitoringThreshold*l){var h=u.currentLevel;n.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=h)&&(h-=1,u.trigger(r.Events.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:u.currentLevel}),u.autoLevelCapping=h,this.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=i,this.lastDecodedFrames=e}},e.checkFPSInterval=function(){var t=this.media;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},t}();e.default=s},"./src/controller/fragment-finders.ts": /*!********************************************!*\ !*** ./src/controller/fragment-finders.ts ***! \********************************************/ -/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(t,e,r){"use strict";r.r(e),r.d(e,"findFragmentByPDT",(function(){return s})),r.d(e,"findFragmentByPTS",(function(){return o})),r.d(e,"fragmentWithinToleranceTest",(function(){return a})),r.d(e,"pdtWithinToleranceTest",(function(){return l})),r.d(e,"findFragWithCC",(function(){return c}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function s(t,e,r){if(null===e||!Array.isArray(t)||!t.length||!Object(i.isFiniteNumber)(e))return null;if(e<(t[0].programDateTime||0))return null;if(e>=(t[t.length-1].endProgramDateTime||0))return null;r=r||0;for(var n=0;nt&&r.start?-1:0}function l(t,e,r){var i=1e3*Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0));return(r.endProgramDateTime||0)-i>t}function c(t,e){return n.default.search(t,(function(t){return t.cce?-1:0}))}},"./src/controller/fragment-tracker.ts": +/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(t,e,i){"use strict";i.r(e),i.d(e,"findFragmentByPDT",(function(){return s})),i.d(e,"findFragmentByPTS",(function(){return o})),i.d(e,"fragmentWithinToleranceTest",(function(){return a})),i.d(e,"pdtWithinToleranceTest",(function(){return l})),i.d(e,"findFragWithCC",(function(){return c}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function s(t,e,i){if(null===e||!Array.isArray(t)||!t.length||!Object(r.isFiniteNumber)(e))return null;if(e<(t[0].programDateTime||0))return null;if(e>=(t[t.length-1].endProgramDateTime||0))return null;i=i||0;for(var n=0;nt&&i.start?-1:0}function l(t,e,i){var r=1e3*Math.min(e,i.duration+(i.deltaPTS?i.deltaPTS:0));return(i.endProgramDateTime||0)-r>t}function c(t,e){return n.default.search(t,(function(t){return t.cce?-1:0}))}},"./src/controller/fragment-tracker.ts": /*!********************************************!*\ !*** ./src/controller/fragment-tracker.ts ***! \********************************************/ -/*! exports provided: FragmentState, FragmentTracker */function(t,e,r){"use strict";r.r(e),r.d(e,"FragmentState",(function(){return i})),r.d(e,"FragmentTracker",(function(){return o}));var i,n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../types/loader */"./src/types/loader.ts");!function(t){t.NOT_LOADED="NOT_LOADED",t.BACKTRACKED="BACKTRACKED",t.APPENDING="APPENDING",t.PARTIAL="PARTIAL",t.OK="OK"}(i||(i={}));var o=function(){function t(t){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=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){var t=this.hls;t.on(n.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.on(n.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.on(n.Events.FRAG_LOADED,this.onFragLoaded,this)},e._unregisterListeners=function(){var t=this.hls;t.off(n.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.off(n.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.off(n.Events.FRAG_LOADED,this.onFragLoaded,this)},e.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},e.getAppendedFrag=function(t,e){if(e===s.PlaylistLevelType.MAIN){var r=this.activeFragment,i=this.activeParts;if(!r)return null;if(i)for(var n=i.length;n--;){var o=i[n],a=o?o.end:r.appendedPTS;if(o.start<=t&&void 0!==a&&t<=a)return n>9&&(this.activeParts=i.slice(n-9)),o}else if(r.start<=t&&void 0!==r.appendedPTS&&t<=r.appendedPTS)return r}return this.getBufferedFrag(t,e)},e.getBufferedFrag=function(t,e){for(var r=this.fragments,i=Object.keys(r),n=i.length;n--;){var s=r[i[n]];if((null==s?void 0:s.body.type)===e&&s.buffered){var o=s.body;if(o.start<=t&&t<=o.end)return o}}return null},e.detectEvictedFragments=function(t,e,r){var i=this;Object.keys(this.fragments).forEach((function(n){var s=i.fragments[n];if(s)if(s.buffered){var o=s.range[t];o&&o.time.some((function(t){var r=!i.isTimeBuffered(t.startPTS,t.endPTS,e);return r&&i.removeFragment(s.body),r}))}else s.body.type===r&&i.removeFragment(s.body)}))},e.detectPartialFragments=function(t){var e=this,r=this.timeRanges,i=t.frag,n=t.part;if(r&&"initSegment"!==i.sn){var s=l(i),o=this.fragments[s];o&&(Object.keys(r).forEach((function(t){var s=i.elementaryStreams[t];if(s){var a=r[t],l=null!==n||!0===s.partial;o.range[t]=e.getBufferedTimes(i,n,l,a)}})),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body))}},e.fragBuffered=function(t){var e=l(t),r=this.fragments[e];r&&(r.backtrack=r.loaded=null,r.buffered=!0)},e.getBufferedTimes=function(t,e,r,i){for(var n={time:[],partial:r},s=e?e.start:t.start,o=e?e.end:t.end,a=t.minEndPTS||o,l=t.maxStartPTS||s,c=0;c=u&&a<=h){n.time.push({startPTS:Math.max(s,i.start(c)),endPTS:Math.min(o,i.end(c))});break}if(su)n.partial=!0,n.time.push({startPTS:Math.max(s,i.start(c)),endPTS:Math.min(o,i.end(c))});else if(o<=u)break}return n},e.getPartialFragment=function(t){var e,r,i,n=null,s=0,o=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&a(u)&&(r=u.body.start-o,i=u.body.end+o,t>=r&&t<=i&&(e=Math.min(t-r,i-t),s<=e&&(n=u.body,s=e)))})),n},e.getState=function(t){var e=l(t),r=this.fragments[e];return r?r.buffered?a(r)?i.PARTIAL:i.OK:r.backtrack?i.BACKTRACKED:i.APPENDING:i.NOT_LOADED},e.backtrack=function(t,e){var r=l(t),i=this.fragments[r];if(!i||i.backtrack)return null;var n=i.backtrack=e||i.loaded;return i.loaded=null,n},e.getBacktrackData=function(t){var e=l(t),r=this.fragments[e];if(r){var i,n=r.backtrack;if(null!=n&&null!==(i=n.payload)&&void 0!==i&&i.byteLength)return n;this.removeFragment(t)}return null},e.isTimeBuffered=function(t,e,r){for(var i,n,s=0;s=i&&e<=n)return!0;if(e<=i)return!1}return!1},e.onFragLoaded=function(t,e){var r=e.frag,i=e.part;if("initSegment"!==r.sn&&!r.bitrateTest&&!i){var n=l(r);this.fragments[n]={body:r,loaded:e,backtrack:null,buffered:!1,range:Object.create(null)}}},e.onBufferAppended=function(t,e){var r=this,i=e.frag,n=e.part,o=e.timeRanges;if(i.type===s.PlaylistLevelType.MAIN)if(this.activeFragment=i,n){var a=this.activeParts;a||(this.activeParts=a=[]),a.push(n)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach((function(t){var e=o[t];if(r.detectEvictedFragments(t,e),!n)for(var s=0;st&&i.removeFragment(o)}}))},e.removeFragment=function(t){var e=l(t);t.stats.loaded=0,t.clearElementaryStreamInfo(),delete this.fragments[e]},e.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},t}();function a(t){var e,r;return t.buffered&&((null===(e=t.range.video)||void 0===e?void 0:e.partial)||(null===(r=t.range.audio)||void 0===r?void 0:r.partial))}function l(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn}},"./src/controller/gap-controller.ts": +/*! exports provided: FragmentState, FragmentTracker */function(t,e,i){"use strict";i.r(e),i.d(e,"FragmentState",(function(){return r})),i.d(e,"FragmentTracker",(function(){return o}));var r,n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../types/loader */"./src/types/loader.ts");!function(t){t.NOT_LOADED="NOT_LOADED",t.BACKTRACKED="BACKTRACKED",t.APPENDING="APPENDING",t.PARTIAL="PARTIAL",t.OK="OK"}(r||(r={}));var o=function(){function t(t){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=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){var t=this.hls;t.on(n.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.on(n.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.on(n.Events.FRAG_LOADED,this.onFragLoaded,this)},e._unregisterListeners=function(){var t=this.hls;t.off(n.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.off(n.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.off(n.Events.FRAG_LOADED,this.onFragLoaded,this)},e.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},e.getAppendedFrag=function(t,e){if(e===s.PlaylistLevelType.MAIN){var i=this.activeFragment,r=this.activeParts;if(!i)return null;if(r)for(var n=r.length;n--;){var o=r[n],a=o?o.end:i.appendedPTS;if(o.start<=t&&void 0!==a&&t<=a)return n>9&&(this.activeParts=r.slice(n-9)),o}else if(i.start<=t&&void 0!==i.appendedPTS&&t<=i.appendedPTS)return i}return this.getBufferedFrag(t,e)},e.getBufferedFrag=function(t,e){for(var i=this.fragments,r=Object.keys(i),n=r.length;n--;){var s=i[r[n]];if((null==s?void 0:s.body.type)===e&&s.buffered){var o=s.body;if(o.start<=t&&t<=o.end)return o}}return null},e.detectEvictedFragments=function(t,e,i){var r=this;Object.keys(this.fragments).forEach((function(n){var s=r.fragments[n];if(s)if(s.buffered){var o=s.range[t];o&&o.time.some((function(t){var i=!r.isTimeBuffered(t.startPTS,t.endPTS,e);return i&&r.removeFragment(s.body),i}))}else s.body.type===i&&r.removeFragment(s.body)}))},e.detectPartialFragments=function(t){var e=this,i=this.timeRanges,r=t.frag,n=t.part;if(i&&"initSegment"!==r.sn){var s=l(r),o=this.fragments[s];o&&(Object.keys(i).forEach((function(t){var s=r.elementaryStreams[t];if(s){var a=i[t],l=null!==n||!0===s.partial;o.range[t]=e.getBufferedTimes(r,n,l,a)}})),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body))}},e.fragBuffered=function(t){var e=l(t),i=this.fragments[e];i&&(i.backtrack=i.loaded=null,i.buffered=!0)},e.getBufferedTimes=function(t,e,i,r){for(var n={time:[],partial:i},s=e?e.start:t.start,o=e?e.end:t.end,a=t.minEndPTS||o,l=t.maxStartPTS||s,c=0;c=u&&a<=h){n.time.push({startPTS:Math.max(s,r.start(c)),endPTS:Math.min(o,r.end(c))});break}if(su)n.partial=!0,n.time.push({startPTS:Math.max(s,r.start(c)),endPTS:Math.min(o,r.end(c))});else if(o<=u)break}return n},e.getPartialFragment=function(t){var e,i,r,n=null,s=0,o=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&a(u)&&(i=u.body.start-o,r=u.body.end+o,t>=i&&t<=r&&(e=Math.min(t-i,r-t),s<=e&&(n=u.body,s=e)))})),n},e.getState=function(t){var e=l(t),i=this.fragments[e];return i?i.buffered?a(i)?r.PARTIAL:r.OK:i.backtrack?r.BACKTRACKED:r.APPENDING:r.NOT_LOADED},e.backtrack=function(t,e){var i=l(t),r=this.fragments[i];if(!r||r.backtrack)return null;var n=r.backtrack=e||r.loaded;return r.loaded=null,n},e.getBacktrackData=function(t){var e=l(t),i=this.fragments[e];if(i){var r,n=i.backtrack;if(null!=n&&null!==(r=n.payload)&&void 0!==r&&r.byteLength)return n;this.removeFragment(t)}return null},e.isTimeBuffered=function(t,e,i){for(var r,n,s=0;s=r&&e<=n)return!0;if(e<=r)return!1}return!1},e.onFragLoaded=function(t,e){var i=e.frag,r=e.part;if("initSegment"!==i.sn&&!i.bitrateTest&&!r){var n=l(i);this.fragments[n]={body:i,loaded:e,backtrack:null,buffered:!1,range:Object.create(null)}}},e.onBufferAppended=function(t,e){var i=this,r=e.frag,n=e.part,o=e.timeRanges;if(r.type===s.PlaylistLevelType.MAIN)if(this.activeFragment=r,n){var a=this.activeParts;a||(this.activeParts=a=[]),a.push(n)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach((function(t){var e=o[t];if(i.detectEvictedFragments(t,e),!n)for(var s=0;st&&r.removeFragment(o)}}))},e.removeFragment=function(t){var e=l(t);t.stats.loaded=0,t.clearElementaryStreamInfo(),delete this.fragments[e]},e.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},t}();function a(t){var e,i;return t.buffered&&((null===(e=t.range.video)||void 0===e?void 0:e.partial)||(null===(i=t.range.audio)||void 0===i?void 0:i.partial))}function l(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn}},"./src/controller/gap-controller.ts": /*!******************************************!*\ !*** ./src/controller/gap-controller.ts ***! \******************************************/ -/*! exports provided: STALL_MINIMUM_DURATION_MS, MAX_START_GAP_JUMP, SKIP_BUFFER_HOLE_STEP_SECONDS, SKIP_BUFFER_RANGE_START, default */function(t,e,r){"use strict";r.r(e),r.d(e,"STALL_MINIMUM_DURATION_MS",(function(){return a})),r.d(e,"MAX_START_GAP_JUMP",(function(){return l})),r.d(e,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),r.d(e,"SKIP_BUFFER_RANGE_START",(function(){return u})),r.d(e,"default",(function(){return h}));var i=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),n=r(/*! ../errors */"./src/errors.ts"),s=r(/*! ../events */"./src/events.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts"),a=250,l=2,c=.1,u=.05,h=function(){function t(t,e,r,i){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=t,this.media=e,this.fragmentTracker=r,this.hls=i}var e=t.prototype;return e.destroy=function(){this.hls=this.fragmentTracker=this.media=null},e.poll=function(t){var e=this.config,r=this.media,n=this.stalled,s=r.currentTime,c=r.seeking,u=this.seeking&&!c,h=!this.seeking&&c;if(this.seeking=c,s===t){if((h||u)&&(this.stalled=null),!r.paused&&!r.ended&&0!==r.playbackRate&&i.BufferHelper.getBuffered(r).length){var d=i.BufferHelper.bufferInfo(r,s,0),f=d.len>0,p=d.nextStart||0;if(f||p){if(c){var g=d.len>l,m=!p||p-s>l&&!this.fragmentTracker.getPartialFragment(s);if(g||m)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,y=Math.max(p,d.start||0)-s,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,x=(null==b||null===(v=b.details)||void 0===v?void 0:v.live)?2*b.details.targetduration:l;if(y>0&&y<=x)return void this._trySkipBufferHole(null)}var S=self.performance.now();if(null!==n){var C=S-n;!c&&C>=a&&this._reportStall(d.len);var w=i.BufferHelper.bufferInfo(r,s,e.maxBufferHole);this._tryFixBufferStall(w,C)}else this.stalled=S}}}else if(this.moved=!0,null!==n){if(this.stallReported){var k=self.performance.now()-n;o.logger.warn("playback not stuck anymore @"+s+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},e._tryFixBufferStall=function(t,e){var r=this.config,i=this.fragmentTracker,n=this.media.currentTime,s=i.getPartialFragment(n);s&&this._trySkipBufferHole(s)||t.len>r.maxBufferHole&&e>1e3*r.highBufferWatchdogPeriod&&(o.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},e._reportStall=function(t){var e=this.hls,r=this.media;this.stallReported||(this.stallReported=!0,o.logger.warn("Playback stalling at @"+r.currentTime+" due to low buffer (buffer="+t+")"),e.trigger(s.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e._trySkipBufferHole=function(t){for(var e=this.config,r=this.hls,a=this.media,l=a.currentTime,h=0,d=i.BufferHelper.getBuffered(a),f=0;f=h&&l0,p=d.nextStart||0;if(f||p){if(c){var g=d.len>l,m=!p||p-s>l&&!this.fragmentTracker.getPartialFragment(s);if(g||m)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,y=Math.max(p,d.start||0)-s,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,x=(null==b||null===(v=b.details)||void 0===v?void 0:v.live)?2*b.details.targetduration:l;if(y>0&&y<=x)return void this._trySkipBufferHole(null)}var S=self.performance.now();if(null!==n){var C=S-n;!c&&C>=a&&this._reportStall(d.len);var w=r.BufferHelper.bufferInfo(i,s,e.maxBufferHole);this._tryFixBufferStall(w,C)}else this.stalled=S}}}else if(this.moved=!0,null!==n){if(this.stallReported){var k=self.performance.now()-n;o.logger.warn("playback not stuck anymore @"+s+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},e._tryFixBufferStall=function(t,e){var i=this.config,r=this.fragmentTracker,n=this.media.currentTime,s=r.getPartialFragment(n);s&&this._trySkipBufferHole(s)||t.len>i.maxBufferHole&&e>1e3*i.highBufferWatchdogPeriod&&(o.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},e._reportStall=function(t){var e=this.hls,i=this.media;this.stallReported||(this.stallReported=!0,o.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer (buffer="+t+")"),e.trigger(s.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e._trySkipBufferHole=function(t){for(var e=this.config,i=this.hls,a=this.media,l=a.currentTime,h=0,d=r.BufferHelper.getBuffered(a),f=0;f=h&&l.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,s)),u=Math.round(2/(1+Math.exp(-.75*a-this.edgeStalled))*20)/20;t.playbackRate=Math.min(c,Math.max(1,u))}else 1!==t.playbackRate&&0!==t.playbackRate&&(t.playbackRate=1)}}}}},l.estimateLiveEdge=function(){var t=this.levelDetails;return null===t?null:t.edge+t.age},l.computeLatency=function(){var t=this.estimateLiveEdge();return null===t?null:t-this.currentTime},e=t,(r=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var t=this.config,e=this.levelDetails;return void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:e?t.liveMaxLatencyDurationCount*e.targetduration:0}},{key:"targetLatency",get:function(){var t=this.levelDetails;if(null===t)return null;var e=t.holdBack,r=t.partHoldBack,i=t.targetduration,n=this.config,s=n.liveSyncDuration,o=n.liveSyncDurationCount,a=n.lowLatencyMode,l=this.hls.userConfig,c=a&&r||e;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==s?s:o*i);var u=i;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var t=this.estimateLiveEdge(),e=this.targetLatency,r=this.levelDetails;if(null===t||null===e||null===r)return null;var i=r.edge,n=t-e-this.edgeStalled,s=i-r.totalduration,o=i-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(s,n),o)}},{key:"drift",get:function(){var t=this.levelDetails;return null===t?1:t.drift}},{key:"edgeStalled",get:function(){var t=this.levelDetails;if(null===t)return 0;var e=3*(this.config.lowLatencyMode&&t.partTarget||t.targetduration);return Math.max(t.age-e,0)}},{key:"forwardBufferLength",get:function(){var t=this.media,e=this.levelDetails;if(!t||!e)return 0;var r=t.buffered.length;return r?t.buffered.end(r-1):e.edge-this.currentTime}}])&&o(e.prototype,r),a&&o(e,a),t}()},"./src/controller/level-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return a}));var r=i(/*! ../errors */"./src/errors.ts"),n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts");function o(t,e){for(var i=0;i.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,s)),u=Math.round(2/(1+Math.exp(-.75*a-this.edgeStalled))*20)/20;t.playbackRate=Math.min(c,Math.max(1,u))}else 1!==t.playbackRate&&0!==t.playbackRate&&(t.playbackRate=1)}}}}},l.estimateLiveEdge=function(){var t=this.levelDetails;return null===t?null:t.edge+t.age},l.computeLatency=function(){var t=this.estimateLiveEdge();return null===t?null:t-this.currentTime},e=t,(i=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var t=this.config,e=this.levelDetails;return void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:e?t.liveMaxLatencyDurationCount*e.targetduration:0}},{key:"targetLatency",get:function(){var t=this.levelDetails;if(null===t)return null;var e=t.holdBack,i=t.partHoldBack,r=t.targetduration,n=this.config,s=n.liveSyncDuration,o=n.liveSyncDurationCount,a=n.lowLatencyMode,l=this.hls.userConfig,c=a&&i||e;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==s?s:o*r);var u=r;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var t=this.estimateLiveEdge(),e=this.targetLatency,i=this.levelDetails;if(null===t||null===e||null===i)return null;var r=i.edge,n=t-e-this.edgeStalled,s=r-i.totalduration,o=r-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(s,n),o)}},{key:"drift",get:function(){var t=this.levelDetails;return null===t?1:t.drift}},{key:"edgeStalled",get:function(){var t=this.levelDetails;if(null===t)return 0;var e=3*(this.config.lowLatencyMode&&t.partTarget||t.targetduration);return Math.max(t.age-e,0)}},{key:"forwardBufferLength",get:function(){var t=this.media,e=this.levelDetails;if(!t||!e)return 0;var i=t.buffered.length;return i?t.buffered.end(i-1):e.edge-this.currentTime}}])&&o(e.prototype,i),a&&o(e,a),t}()},"./src/controller/level-controller.ts": /*!********************************************!*\ !*** ./src/controller/level-controller.ts ***! \********************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return p}));var i=r(/*! ../types/level */"./src/types/level.ts"),n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../errors */"./src/errors.ts"),o=r(/*! ../utils/codecs */"./src/utils/codecs.ts"),a=r(/*! ./level-helper */"./src/controller/level-helper.ts"),l=r(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=r(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(t){for(var e=1;e0){r=c[0].bitrate,c.sort((function(t,e){return t.bitrate-e.bitrate})),this._levels=c;for(var v=0;vthis.hls.config.fragLoadingMaxRetry&&(o=r.frag.level)):o=r.frag.level}break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:i&&(i.deliveryDirectives&&(l=!1),o=i.level),a=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:o=r.level,a=!0}void 0!==o&&this.recoverLevel(r,o,a,l)}}},v.recoverLevel=function(t,e,r,i){var n=t.details,s=this._levels[e];if(s.loadError++,r){if(!this.retryLoadingOrFail(t))return void(this.currentLevelIndex=-1);t.levelRetry=!0}if(i){var o=s.url.length;if(o>1&&s.loadError1){var i=(e.urlId+1)%r;this.warn("Switching to redundant URL-id "+i),this._levels.forEach((function(t){t.urlId=i})),this.level=t}},v.onFragLoaded=function(t,e){var r=e.frag;if(void 0!==r&&r.type===c.PlaylistLevelType.MAIN){var i=this._levels[r.level];void 0!==i&&(i.fragmentError=0,i.loadError=0)}},v.onLevelLoaded=function(t,e){var r,i,n=e.level,s=e.details,o=this._levels[n];if(!o)return this.warn("Invalid level index "+n),void(null!==(i=e.deliveryDirectives)&&void 0!==i&&i.skip&&(s.deltaUpdateFailed=!0));n===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(n,e,o.details)):null!==(r=e.deliveryDirectives)&&void 0!==r&&r.skip&&(s.deltaUpdateFailed=!0)},v.onAudioTrackSwitched=function(t,e){var r=this.hls.levels[this.currentLevelIndex];if(r&&r.audioGroupIds){for(var i=-1,n=this.hls.audioTracks[e.id].groupId,s=0;s0){var i=r.urlId,s=r.url[i];if(t)try{s=t.addDirectives(s)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("Attempt loading level index "+e+(t?" at sn "+t.msn+" part "+t.part:"")+" with URL-id "+i+" "+s),this.clearTimer(),this.hls.trigger(n.Events.LEVEL_LOADING,{url:s,level:e,id:i,deliveryDirectives:t||null})}},v.removeLevel=function(t,e){var r=function(t,r){return r!==e},i=this._levels.filter((function(i,n){return n!==t||i.url.length>1&&void 0!==e&&(i.url=i.url.filter(r),i.audioGroupIds&&(i.audioGroupIds=i.audioGroupIds.filter(r)),i.textGroupIds&&(i.textGroupIds=i.textGroupIds.filter(r)),i.urlId=0,!0)})).map((function(t,e){var r=t.details;return null!=r&&r.fragments&&r.fragments.forEach((function(t){t.level=e})),t}));this._levels=i,this.hls.trigger(n.Events.LEVELS_UPDATED,{levels:i})},p=l,(g=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e,r=this._levels;if(0!==r.length&&(this.currentLevelIndex!==t||null===(e=r[t])||void 0===e||!e.details)){if(t<0||t>=r.length){var i=t<0;if(this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:t,fatal:i,reason:"invalid level idx"}),i)return;t=Math.min(t,r.length-1)}this.clearTimer();var o=this.currentLevelIndex,a=r[o],l=r[t];this.log("switching to level "+t+" from "+o),this.currentLevelIndex=t;var c=u({},l,{level:t,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(n.Events.LEVEL_SWITCHING,c);var h=l.details;if(!h||h.live){var d=this.switchParams(l.uri,null==a?void 0:a.details);this.loadPlaylist(d)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&h(p.prototype,g),m&&h(p,m),l}(l.default)},"./src/controller/level-helper.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return p}));var r=i(/*! ../types/level */"./src/types/level.ts"),n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../errors */"./src/errors.ts"),o=i(/*! ../utils/codecs */"./src/utils/codecs.ts"),a=i(/*! ./level-helper */"./src/controller/level-helper.ts"),l=i(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=i(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(t){for(var e=1;e0){i=c[0].bitrate,c.sort((function(t,e){return t.bitrate-e.bitrate})),this._levels=c;for(var v=0;vthis.hls.config.fragLoadingMaxRetry&&(o=i.frag.level)):o=i.frag.level}break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(l=!1),o=r.level),a=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:o=i.level,a=!0}void 0!==o&&this.recoverLevel(i,o,a,l)}}},v.recoverLevel=function(t,e,i,r){var n=t.details,s=this._levels[e];if(s.loadError++,i){if(!this.retryLoadingOrFail(t))return void(this.currentLevelIndex=-1);t.levelRetry=!0}if(r){var o=s.url.length;if(o>1&&s.loadError1){var r=(e.urlId+1)%i;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(t){t.urlId=r})),this.level=t}},v.onFragLoaded=function(t,e){var i=e.frag;if(void 0!==i&&i.type===c.PlaylistLevelType.MAIN){var r=this._levels[i.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},v.onLevelLoaded=function(t,e){var i,r,n=e.level,s=e.details,o=this._levels[n];if(!o)return this.warn("Invalid level index "+n),void(null!==(r=e.deliveryDirectives)&&void 0!==r&&r.skip&&(s.deltaUpdateFailed=!0));n===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(n,e,o.details)):null!==(i=e.deliveryDirectives)&&void 0!==i&&i.skip&&(s.deltaUpdateFailed=!0)},v.onAudioTrackSwitched=function(t,e){var i=this.hls.levels[this.currentLevelIndex];if(i&&i.audioGroupIds){for(var r=-1,n=this.hls.audioTracks[e.id].groupId,s=0;s0){var r=i.urlId,s=i.url[r];if(t)try{s=t.addDirectives(s)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("Attempt loading level index "+e+(t?" at sn "+t.msn+" part "+t.part:"")+" with URL-id "+r+" "+s),this.clearTimer(),this.hls.trigger(n.Events.LEVEL_LOADING,{url:s,level:e,id:r,deliveryDirectives:t||null})}},v.removeLevel=function(t,e){var i=function(t,i){return i!==e},r=this._levels.filter((function(r,n){return n!==t||r.url.length>1&&void 0!==e&&(r.url=r.url.filter(i),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(i)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(i)),r.urlId=0,!0)})).map((function(t,e){var i=t.details;return null!=i&&i.fragments&&i.fragments.forEach((function(t){t.level=e})),t}));this._levels=r,this.hls.trigger(n.Events.LEVELS_UPDATED,{levels:r})},p=l,(g=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e,i=this._levels;if(0!==i.length&&(this.currentLevelIndex!==t||null===(e=i[t])||void 0===e||!e.details)){if(t<0||t>=i.length){var r=t<0;if(this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:t,fatal:r,reason:"invalid level idx"}),r)return;t=Math.min(t,i.length-1)}this.clearTimer();var o=this.currentLevelIndex,a=i[o],l=i[t];this.log("switching to level "+t+" from "+o),this.currentLevelIndex=t;var c=u({},l,{level:t,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(n.Events.LEVEL_SWITCHING,c);var h=l.details;if(!h||h.live){var d=this.switchParams(l.uri,null==a?void 0:a.details);this.loadPlaylist(d)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&h(p.prototype,g),m&&h(p,m),l}(l.default)},"./src/controller/level-helper.ts": /*!****************************************!*\ !*** ./src/controller/level-helper.ts ***! \****************************************/ -/*! exports provided: addGroupId, assignTrackIdsByGroup, updatePTS, updateFragPTSDTS, mergeDetails, mapPartIntersection, mapFragmentIntersection, adjustSliding, addSliding, computeReloadInterval, getFragmentWithSN, getPartWith */function(t,e,r){"use strict";r.r(e),r.d(e,"addGroupId",(function(){return s})),r.d(e,"assignTrackIdsByGroup",(function(){return o})),r.d(e,"updatePTS",(function(){return a})),r.d(e,"updateFragPTSDTS",(function(){return c})),r.d(e,"mergeDetails",(function(){return u})),r.d(e,"mapPartIntersection",(function(){return h})),r.d(e,"mapFragmentIntersection",(function(){return d})),r.d(e,"adjustSliding",(function(){return f})),r.d(e,"addSliding",(function(){return p})),r.d(e,"computeReloadInterval",(function(){return g})),r.d(e,"getFragmentWithSN",(function(){return m})),r.d(e,"getPartWith",(function(){return v}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../utils/logger */"./src/utils/logger.ts");function s(t,e,r){switch(e){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(r);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(r)}}function o(t){var e={};t.forEach((function(t){var r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++}))}function a(t,e,r){l(t[e],t[r])}function l(t,e){var r=e.startPTS;if(Object(i.isFiniteNumber)(r)){var n,s=0;e.sn>t.sn?(s=r-t.start,n=t):(s=t.start-r,n=e),n.duration!==s&&(n.duration=s)}else e.sn>t.sn?t.cc===e.cc&&t.minEndPTS?e.start=t.start+(t.minEndPTS-t.start):e.start=t.start+t.duration:e.start=Math.max(t.start-e.duration,0)}function c(t,e,r,s,o,a){s-r<=0&&(n.logger.warn("Fragment should have a positive duration",e),s=r+e.duration,a=o+e.duration);var c=r,u=s,h=e.startPTS,d=e.endPTS;if(Object(i.isFiniteNumber)(h)){var f=Math.abs(h-r);Object(i.isFiniteNumber)(e.deltaPTS)?e.deltaPTS=Math.max(f,e.deltaPTS):e.deltaPTS=f,c=Math.max(r,h),r=Math.min(r,h),o=Math.min(o,e.startDTS),u=Math.min(s,d),s=Math.max(s,d),a=Math.max(a,e.endDTS)}e.duration=s-r;var p=r-e.start;e.appendedPTS=s,e.start=e.startPTS=r,e.maxStartPTS=c,e.startDTS=o,e.endPTS=s,e.minEndPTS=u,e.endDTS=a;var g,m=e.sn;if(!t||mt.endSN)return 0;var v=m-t.startSN,y=t.fragments;for(y[v]=e,g=v;g>0;g--)l(y[g],y[g-1]);for(g=v;g=0;o--){var a=s[o].initSegment;if(a){r=a;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var l,u=0;if(d(t,e,(function(t,n){t.relurl&&(u=t.cc-n.cc),Object(i.isFiniteNumber)(t.startPTS)&&Object(i.isFiniteNumber)(t.endPTS)&&(n.start=n.startPTS=t.startPTS,n.startDTS=t.startDTS,n.appendedPTS=t.appendedPTS,n.maxStartPTS=t.maxStartPTS,n.endPTS=t.endPTS,n.endDTS=t.endDTS,n.minEndPTS=t.minEndPTS,n.duration=t.endPTS-t.startPTS,n.duration&&(l=n),e.PTSKnown=e.alignedSliding=!0),n.elementaryStreams=t.elementaryStreams,n.loader=t.loader,n.stats=t.stats,n.urlId=t.urlId,t.initSegment&&(n.initSegment=t.initSegment,r=t.initSegment)})),r&&(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach((function(t){var e;t.initSegment&&t.initSegment.relurl!==(null===(e=r)||void 0===e?void 0:e.relurl)||(t.initSegment=r)})),e.skippedSegments&&(e.deltaUpdateFailed=e.fragments.some((function(t){return!t})),e.deltaUpdateFailed)){n.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=e.skippedSegments;p--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}var g=e.fragments;if(u){n.logger.warn("discontinuity sliding from playlist, take drift into account");for(var m=0;m=i.length||p(e,i[r].start)}function p(t,e){if(e){for(var r=t.fragments,i=t.skippedSegments;i0&&s<3*i,a=e.loading.end-e.loading.start,l=t.availabilityDelay;if(!1===t.updated)if(o){var c=333*t.misses;r=Math.max(Math.min(n,2*a),c),t.availabilityDelay=(t.availabilityDelay||0)+r}else r=n;else o?(l=Math.min(l||i/2,s),t.availabilityDelay=l,r=l+i-s):r=i-a;return Math.round(r)}function m(t,e,r){if(!t||!t.details)return null;var i=t.details,n=i.fragments[e-i.startSN];return n||((n=i.fragmentHint)&&n.sn===e?n:et.sn?(s=i-t.start,n=t):(s=t.start-i,n=e),n.duration!==s&&(n.duration=s)}else e.sn>t.sn?t.cc===e.cc&&t.minEndPTS?e.start=t.start+(t.minEndPTS-t.start):e.start=t.start+t.duration:e.start=Math.max(t.start-e.duration,0)}function c(t,e,i,s,o,a){s-i<=0&&(n.logger.warn("Fragment should have a positive duration",e),s=i+e.duration,a=o+e.duration);var c=i,u=s,h=e.startPTS,d=e.endPTS;if(Object(r.isFiniteNumber)(h)){var f=Math.abs(h-i);Object(r.isFiniteNumber)(e.deltaPTS)?e.deltaPTS=Math.max(f,e.deltaPTS):e.deltaPTS=f,c=Math.max(i,h),i=Math.min(i,h),o=Math.min(o,e.startDTS),u=Math.min(s,d),s=Math.max(s,d),a=Math.max(a,e.endDTS)}e.duration=s-i;var p=i-e.start;e.appendedPTS=s,e.start=e.startPTS=i,e.maxStartPTS=c,e.startDTS=o,e.endPTS=s,e.minEndPTS=u,e.endDTS=a;var g,m=e.sn;if(!t||mt.endSN)return 0;var v=m-t.startSN,y=t.fragments;for(y[v]=e,g=v;g>0;g--)l(y[g],y[g-1]);for(g=v;g=0;o--){var a=s[o].initSegment;if(a){i=a;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var l,u=0;if(d(t,e,(function(t,n){t.relurl&&(u=t.cc-n.cc),Object(r.isFiniteNumber)(t.startPTS)&&Object(r.isFiniteNumber)(t.endPTS)&&(n.start=n.startPTS=t.startPTS,n.startDTS=t.startDTS,n.appendedPTS=t.appendedPTS,n.maxStartPTS=t.maxStartPTS,n.endPTS=t.endPTS,n.endDTS=t.endDTS,n.minEndPTS=t.minEndPTS,n.duration=t.endPTS-t.startPTS,n.duration&&(l=n),e.PTSKnown=e.alignedSliding=!0),n.elementaryStreams=t.elementaryStreams,n.loader=t.loader,n.stats=t.stats,n.urlId=t.urlId,t.initSegment&&(n.initSegment=t.initSegment,i=t.initSegment)})),i&&(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach((function(t){var e;t.initSegment&&t.initSegment.relurl!==(null===(e=i)||void 0===e?void 0:e.relurl)||(t.initSegment=i)})),e.skippedSegments&&(e.deltaUpdateFailed=e.fragments.some((function(t){return!t})),e.deltaUpdateFailed)){n.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=e.skippedSegments;p--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}var g=e.fragments;if(u){n.logger.warn("discontinuity sliding from playlist, take drift into account");for(var m=0;m=r.length||p(e,r[i].start)}function p(t,e){if(e){for(var i=t.fragments,r=t.skippedSegments;r0&&s<3*r,a=e.loading.end-e.loading.start,l=t.availabilityDelay;if(!1===t.updated)if(o){var c=333*t.misses;i=Math.max(Math.min(n,2*a),c),t.availabilityDelay=(t.availabilityDelay||0)+i}else i=n;else o?(l=Math.min(l||r/2,s),t.availabilityDelay=l,i=l+r-s):i=r-a;return Math.round(i)}function m(t,e,i){if(!t||!t.details)return null;var r=t.details,n=r.fragments[e-r.startSN];return n||((n=r.fragmentHint)&&n.sn===e?n:e0&&-1===t&&(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=n.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this._forceStartLoad=!0,this.state=n.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,t.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case n.State.IDLE:this.doTickIdle();break;case n.State.WAITING_LEVEL:var t,e=this.levels,r=this.level,i=null==e||null===(t=e[r])||void 0===t?void 0:t.details;if(i&&(!i.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(i))break;this.state=n.State.IDLE;break}break;case n.State.FRAG_LOADING_WAITING_RETRY:var s,o=self.performance.now(),a=this.retryDate;(!a||o>=a||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=n.State.IDLE)}this.onTickEnd()},C.onTickEnd=function(){t.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var t,e,r=this.hls,i=this.levelLastLoaded,s=this.levels,a=this.media,h=r.config,d=r.nextLoadLevel;if(null!==i&&(a||!this.startFragRequested&&h.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&s&&s[d]){var f=s[d];this.level=r.nextLoadLevel=d;var p=f.details;if(!p||this.state===n.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==d)this.state=n.State.WAITING_LEVEL;else{var g=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:a,c.PlaylistLevelType.MAIN);if(null!==g&&!(g.len>=this.getMaxBufferLength(f.maxBitrate))){if(this._streamEnded(g,p)){var m={};return this.altAudio&&(m.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,m),void(this.state=n.State.ENDED)}var v=g.end,y=this.getNextFragment(v,p);if(this.couldBacktrack&&!this.fragPrevious&&y&&"initSegment"!==y.sn){var b=y.sn-p.startSN;b>1&&(y=p.fragments[b-1],this.fragmentTracker.removeFragment(y))}if(y&&this.fragmentTracker.getState(y)===l.FragmentState.OK&&this.nextLoadPosition>v){var x=this.audioOnly&&!this.altAudio?u.ElementaryStreamTypes.AUDIO:u.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(a,x,c.PlaylistLevelType.MAIN),y=this.getNextFragment(this.nextLoadPosition,p)}y&&(!y.initSegment||y.initSegment.data||this.bitrateTest||(y=y.initSegment),"identity"!==(null===(t=y.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=y.decryptdata)&&void 0!==e&&e.key?this.loadFragment(y,p,v):this.loadKey(y,p))}}}},C.loadFragment=function(e,r,i){var n,s=this.fragmentTracker.getState(e);if(this.fragCurrent=e,s===l.FragmentState.BACKTRACKED){var o=this.fragmentTracker.getBacktrackData(e);if(o)return this._handleFragmentLoadProgress(o),void this._handleFragmentLoadComplete(o);s=l.FragmentState.NOT_LOADED}s===l.FragmentState.NOT_LOADED||s===l.FragmentState.PARTIAL?"initSegment"===e.sn?this._loadInitSegment(e):this.bitrateTest?(e.bitrateTest=!0,this.log("Fragment "+e.sn+" of level "+e.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(e)):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,r,i)):s===l.FragmentState.APPENDING?this.reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e):0===(null===(n=this.media)||void 0===n?void 0:n.buffered.length)&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(t){var e=this.fragmentTracker.getAppendedFrag(t,c.PlaylistLevelType.MAIN);return e&&"fragment"in e?e.fragment:e},C.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,c.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var t=this.levels,e=this.media;if(null!=e&&e.readyState){var r,i=this.getAppendedFrag(e.currentTime);if(i&&i.start>1&&this.flushMainBuffer(0,i.start-1),!e.paused&&t){var n=t[this.hls.nextLoadLevel],s=this.fragLastKbps;r=s&&this.fragCurrent?this.fragCurrent.duration*n.maxBitrate/(1e3*s)+1:0}else r=0;var o=this.getBufferedFrag(e.currentTime+r);if(o){var a=this.followingBufferedFrag(o);if(a){this.abortCurrentFrag();var l=a.maxStartPTS?a.maxStartPTS:a.start,c=a.duration,u=Math.max(o.end,l+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,.5*c),.75*c));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var t=this.fragCurrent;this.fragCurrent=null,null!=t&&t.loader&&t.loader.abort(),this.state===n.State.KEY_LOADING&&(this.state=n.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(e,r){t.prototype.flushMainBuffer.call(this,e,r,this.altAudio?"video":null)},C.onMediaAttached=function(e,r){t.prototype.onMediaAttached.call(this,e,r);var i=r.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),i.addEventListener("playing",this.onvplaying),i.addEventListener("seeked",this.onvseeked),this.gapController=new f.default(this.config,i,this.fragmentTracker,this.hls)},C.onMediaDetaching=function(){var e=this.media;e&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),t.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:null;Object(i.isFiniteNumber)(e)&&this.log("Media seeked to "+e.toFixed(3)),this.tick()},C.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(o.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},C.onManifestParsed=function(t,e){var r,i=!1,n=!1;e.levels.forEach((function(t){(r=t.audioCodec)&&(-1!==r.indexOf("mp4a.40.2")&&(i=!0),-1!==r.indexOf("mp4a.40.5")&&(n=!0))})),this.audioCodecSwitch=i&&n&&!Object(s.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1},C.onLevelLoading=function(t,e){var r=this.levels;if(r&&this.state===n.State.IDLE){var i=r[e.level];(!i.details||i.details.live&&this.levelLastLoaded!==e.level||this.waitForCdnTuneIn(i.details))&&(this.state=n.State.WAITING_LEVEL)}},C.onLevelLoaded=function(t,e){var r,i=this.levels,s=e.level,a=e.details,l=a.totalduration;if(i){this.log("Level "+s+" loaded ["+a.startSN+","+a.endSN+"], cc ["+a.startCC+", "+a.endCC+"] duration:"+l);var c=this.fragCurrent;!c||this.state!==n.State.FRAG_LOADING&&this.state!==n.State.FRAG_LOADING_WAITING_RETRY||c.level!==e.level&&c.loader&&(this.state=n.State.IDLE,c.loader.abort());var u=i[s],h=0;if(a.live||null!==(r=u.details)&&void 0!==r&&r.live){if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed)return;h=this.alignPlaylists(a,u.details)}if(u.details=a,this.levelLastLoaded=s,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:a,level:s}),this.state===n.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(a))return;this.state=n.State.IDLE}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,h),this.tick()}else this.warn("Levels were reset while loading level "+s)},C._handleFragmentLoadProgress=function(t){var e,r=t.frag,i=t.part,n=t.payload,s=this.levels;if(s){var o=s[r.level],a=o.details;if(a){var l=o.videoCodec,u=a.PTSKnown||!a.live,f=null===(e=r.initSegment)||void 0===e?void 0:e.data,p=this._getAudioCodec(o),g=this.transmuxer=this.transmuxer||new h.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),m=i?i.index:-1,v=-1!==m,y=new d.ChunkMetadata(r.level,r.sn,r.stats.chunkCount,n.byteLength,m,v),b=this.initPTS[r.cc];g.push(n,f,p,l,r,i,a.totalduration,u,y,b)}else this.warn("Dropping fragment "+r.sn+" of level "+r.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered")},C.onAudioTrackSwitching=function(t,e){var r=this.altAudio,i=!!e.url,n=e.id;if(!i){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var s=this.fragCurrent;null!=s&&s.loader&&(this.log("Switching to main audio track, cancel main fragment load"),s.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var a=this.hls;r&&a.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),a.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:n})}},C.onAudioTrackSwitched=function(t,e){var r=e.id,i=!!this.hls.audioTracks[r].url;if(i){var n=this.videoBuffer;n&&this.mediaBuffer!==n&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=i,this.tick()},C.onBufferCreated=function(t,e){var r,i,n=e.tracks,s=!1;for(var o in n){var a=n[o];if("main"===a.id){if(i=o,r=a,"video"===o){var l=n[o];l&&(this.videoBuffer=l.buffer)}}else s=!0}s&&r?(this.log("Alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(t,e){var r=e.frag,i=e.part;if(!r||r.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(r))return this.warn("Fragment "+r.sn+(i?" p: "+i.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===n.State.PARSED&&(this.state=n.State.IDLE));var s=i?i.stats:r.stats;this.fragLastKbps=Math.round(8*s.total/(s.buffering.end-s.loading.first)),"initSegment"!==r.sn&&(this.fragPrevious=r),this.fragBufferedComplete(r,i)}},C.onError=function(t,e){switch(e.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.MAIN,e);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==n.State.ERROR&&(e.fatal?(this.warn(""+e.details),this.state=n.State.ERROR):e.levelRetry||this.state!==n.State.WAITING_LEVEL||(this.state=n.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:if("main"===e.parent&&(this.state===n.State.PARSING||this.state===n.State.PARSED)){var r=!0,i=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);i&&i.len>.5&&(r=!this.reduceMaxBufferLength(i.len)),r&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},C.checkBuffer=function(){var t=this.media,e=this.gapController;if(t&&e&&t.readyState){var r=a.BufferHelper.getBuffered(t);!this.loadedmetadata&&r.length?(this.loadedmetadata=!0,this.seekToStartPos()):e.poll(this.lastCurrentTime),this.lastCurrentTime=t.currentTime}},C.onFragLoadEmergencyAborted=function(){this.state=n.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(t,e){var r=e.type;if(r!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var i=(r===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(i,r,c.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(t,e){this.levels=e.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var t=this.media,e=t.currentTime,r=this.startPosition;if(r>=0&&e0&&(n1&&!1===t.seeking){var r=t.currentTime;if(a.BufferHelper.isBuffered(t,r)?e=this.getAppendedFrag(r):a.BufferHelper.isBuffered(t,r+.1)&&(e=this.getAppendedFrag(r+.1)),e){var i=this.fragPlaying,n=e.level;i&&e.sn===i.sn&&i.level===n&&e.urlId===i.urlId||(this.hls.trigger(o.Events.FRAG_CHANGED,{frag:e}),i&&i.level===n||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:n}),this.fragPlaying=e)}}},b=y,(x=[{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);return this.followingBufferedFrag(e)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&m(b.prototype,x),S&&m(b,S),y}(n.default)},"./src/controller/subtitle-stream-controller.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return y}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),s=i(/*! ../is-supported */"./src/is-supported.ts"),o=i(/*! ../events */"./src/events.ts"),a=i(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=i(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),c=i(/*! ../types/loader */"./src/types/loader.ts"),u=i(/*! ../loader/fragment */"./src/loader/fragment.ts"),h=i(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),d=i(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),f=i(/*! ./gap-controller */"./src/controller/gap-controller.ts"),p=i(/*! ../errors */"./src/errors.ts"),g=i(/*! ../utils/logger */"./src/utils/logger.ts");function m(t,e){for(var i=0;i0&&-1===t&&(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=n.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this._forceStartLoad=!0,this.state=n.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,t.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case n.State.IDLE:this.doTickIdle();break;case n.State.WAITING_LEVEL:var t,e=this.levels,i=this.level,r=null==e||null===(t=e[i])||void 0===t?void 0:t.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=n.State.IDLE;break}break;case n.State.FRAG_LOADING_WAITING_RETRY:var s,o=self.performance.now(),a=this.retryDate;(!a||o>=a||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=n.State.IDLE)}this.onTickEnd()},C.onTickEnd=function(){t.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var t,e,i=this.hls,r=this.levelLastLoaded,s=this.levels,a=this.media,h=i.config,d=i.nextLoadLevel;if(null!==r&&(a||!this.startFragRequested&&h.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&s&&s[d]){var f=s[d];this.level=i.nextLoadLevel=d;var p=f.details;if(!p||this.state===n.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==d)this.state=n.State.WAITING_LEVEL;else{var g=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:a,c.PlaylistLevelType.MAIN);if(null!==g&&!(g.len>=this.getMaxBufferLength(f.maxBitrate))){if(this._streamEnded(g,p)){var m={};return this.altAudio&&(m.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,m),void(this.state=n.State.ENDED)}var v=g.end,y=this.getNextFragment(v,p);if(this.couldBacktrack&&!this.fragPrevious&&y&&"initSegment"!==y.sn){var b=y.sn-p.startSN;b>1&&(y=p.fragments[b-1],this.fragmentTracker.removeFragment(y))}if(y&&this.fragmentTracker.getState(y)===l.FragmentState.OK&&this.nextLoadPosition>v){var x=this.audioOnly&&!this.altAudio?u.ElementaryStreamTypes.AUDIO:u.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(a,x,c.PlaylistLevelType.MAIN),y=this.getNextFragment(this.nextLoadPosition,p)}y&&(!y.initSegment||y.initSegment.data||this.bitrateTest||(y=y.initSegment),"identity"!==(null===(t=y.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=y.decryptdata)&&void 0!==e&&e.key?this.loadFragment(y,p,v):this.loadKey(y,p))}}}},C.loadFragment=function(e,i,r){var n,s=this.fragmentTracker.getState(e);if(this.fragCurrent=e,s===l.FragmentState.BACKTRACKED){var o=this.fragmentTracker.getBacktrackData(e);if(o)return this._handleFragmentLoadProgress(o),void this._handleFragmentLoadComplete(o);s=l.FragmentState.NOT_LOADED}s===l.FragmentState.NOT_LOADED||s===l.FragmentState.PARTIAL?"initSegment"===e.sn?this._loadInitSegment(e):this.bitrateTest?(e.bitrateTest=!0,this.log("Fragment "+e.sn+" of level "+e.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(e)):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,i,r)):s===l.FragmentState.APPENDING?this.reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e):0===(null===(n=this.media)||void 0===n?void 0:n.buffered.length)&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(t){var e=this.fragmentTracker.getAppendedFrag(t,c.PlaylistLevelType.MAIN);return e&&"fragment"in e?e.fragment:e},C.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,c.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var t=this.levels,e=this.media;if(null!=e&&e.readyState){var i,r=this.getAppendedFrag(e.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!e.paused&&t){var n=t[this.hls.nextLoadLevel],s=this.fragLastKbps;i=s&&this.fragCurrent?this.fragCurrent.duration*n.maxBitrate/(1e3*s)+1:0}else i=0;var o=this.getBufferedFrag(e.currentTime+i);if(o){var a=this.followingBufferedFrag(o);if(a){this.abortCurrentFrag();var l=a.maxStartPTS?a.maxStartPTS:a.start,c=a.duration,u=Math.max(o.end,l+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,.5*c),.75*c));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var t=this.fragCurrent;this.fragCurrent=null,null!=t&&t.loader&&t.loader.abort(),this.state===n.State.KEY_LOADING&&(this.state=n.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(e,i){t.prototype.flushMainBuffer.call(this,e,i,this.altAudio?"video":null)},C.onMediaAttached=function(e,i){t.prototype.onMediaAttached.call(this,e,i);var r=i.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new f.default(this.config,r,this.fragmentTracker,this.hls)},C.onMediaDetaching=function(){var e=this.media;e&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),t.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:null;Object(r.isFiniteNumber)(e)&&this.log("Media seeked to "+e.toFixed(3)),this.tick()},C.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(o.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},C.onManifestParsed=function(t,e){var i,r=!1,n=!1;e.levels.forEach((function(t){(i=t.audioCodec)&&(-1!==i.indexOf("mp4a.40.2")&&(r=!0),-1!==i.indexOf("mp4a.40.5")&&(n=!0))})),this.audioCodecSwitch=r&&n&&!Object(s.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1},C.onLevelLoading=function(t,e){var i=this.levels;if(i&&this.state===n.State.IDLE){var r=i[e.level];(!r.details||r.details.live&&this.levelLastLoaded!==e.level||this.waitForCdnTuneIn(r.details))&&(this.state=n.State.WAITING_LEVEL)}},C.onLevelLoaded=function(t,e){var i,r=this.levels,s=e.level,a=e.details,l=a.totalduration;if(r){this.log("Level "+s+" loaded ["+a.startSN+","+a.endSN+"], cc ["+a.startCC+", "+a.endCC+"] duration:"+l);var c=this.fragCurrent;!c||this.state!==n.State.FRAG_LOADING&&this.state!==n.State.FRAG_LOADING_WAITING_RETRY||c.level!==e.level&&c.loader&&(this.state=n.State.IDLE,c.loader.abort());var u=r[s],h=0;if(a.live||null!==(i=u.details)&&void 0!==i&&i.live){if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed)return;h=this.alignPlaylists(a,u.details)}if(u.details=a,this.levelLastLoaded=s,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:a,level:s}),this.state===n.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(a))return;this.state=n.State.IDLE}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,h),this.tick()}else this.warn("Levels were reset while loading level "+s)},C._handleFragmentLoadProgress=function(t){var e,i=t.frag,r=t.part,n=t.payload,s=this.levels;if(s){var o=s[i.level],a=o.details;if(a){var l=o.videoCodec,u=a.PTSKnown||!a.live,f=null===(e=i.initSegment)||void 0===e?void 0:e.data,p=this._getAudioCodec(o),g=this.transmuxer=this.transmuxer||new h.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),m=r?r.index:-1,v=-1!==m,y=new d.ChunkMetadata(i.level,i.sn,i.stats.chunkCount,n.byteLength,m,v),b=this.initPTS[i.cc];g.push(n,f,p,l,i,r,a.totalduration,u,y,b)}else this.warn("Dropping fragment "+i.sn+" of level "+i.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+i.sn+" of level "+i.level+" will not be buffered")},C.onAudioTrackSwitching=function(t,e){var i=this.altAudio,r=!!e.url,n=e.id;if(!r){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var s=this.fragCurrent;null!=s&&s.loader&&(this.log("Switching to main audio track, cancel main fragment load"),s.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var a=this.hls;i&&a.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),a.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:n})}},C.onAudioTrackSwitched=function(t,e){var i=e.id,r=!!this.hls.audioTracks[i].url;if(r){var n=this.videoBuffer;n&&this.mediaBuffer!==n&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=r,this.tick()},C.onBufferCreated=function(t,e){var i,r,n=e.tracks,s=!1;for(var o in n){var a=n[o];if("main"===a.id){if(r=o,i=a,"video"===o){var l=n[o];l&&(this.videoBuffer=l.buffer)}}else s=!0}s&&i?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(t,e){var i=e.frag,r=e.part;if(!i||i.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(i))return this.warn("Fragment "+i.sn+(r?" p: "+r.index:"")+" of level "+i.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===n.State.PARSED&&(this.state=n.State.IDLE));var s=r?r.stats:i.stats;this.fragLastKbps=Math.round(8*s.total/(s.buffering.end-s.loading.first)),"initSegment"!==i.sn&&(this.fragPrevious=i),this.fragBufferedComplete(i,r)}},C.onError=function(t,e){switch(e.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.MAIN,e);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==n.State.ERROR&&(e.fatal?(this.warn(""+e.details),this.state=n.State.ERROR):e.levelRetry||this.state!==n.State.WAITING_LEVEL||(this.state=n.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:if("main"===e.parent&&(this.state===n.State.PARSING||this.state===n.State.PARSED)){var i=!0,r=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);r&&r.len>.5&&(i=!this.reduceMaxBufferLength(r.len)),i&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},C.checkBuffer=function(){var t=this.media,e=this.gapController;if(t&&e&&t.readyState){var i=a.BufferHelper.getBuffered(t);!this.loadedmetadata&&i.length?(this.loadedmetadata=!0,this.seekToStartPos()):e.poll(this.lastCurrentTime),this.lastCurrentTime=t.currentTime}},C.onFragLoadEmergencyAborted=function(){this.state=n.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(t,e){var i=e.type;if(i!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(i===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,i,c.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(t,e){this.levels=e.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var t=this.media,e=t.currentTime,i=this.startPosition;if(i>=0&&e0&&(n1&&!1===t.seeking){var i=t.currentTime;if(a.BufferHelper.isBuffered(t,i)?e=this.getAppendedFrag(i):a.BufferHelper.isBuffered(t,i+.1)&&(e=this.getAppendedFrag(i+.1)),e){var r=this.fragPlaying,n=e.level;r&&e.sn===r.sn&&r.level===n&&e.urlId===r.urlId||(this.hls.trigger(o.Events.FRAG_CHANGED,{frag:e}),r&&r.level===n||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:n}),this.fragPlaying=e)}}},b=y,(x=[{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);return this.followingBufferedFrag(e)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&m(b.prototype,x),S&&m(b,S),y}(n.default)},"./src/controller/subtitle-stream-controller.ts": /*!******************************************************!*\ !*** ./src/controller/subtitle-stream-controller.ts ***! \******************************************************/ -/*! exports provided: SubtitleStreamController */function(t,e,r){"use strict";r.r(e),r.d(e,"SubtitleStreamController",(function(){return g}));var i=r(/*! ../events */"./src/events.ts"),n=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=r(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),a=r(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),l=r(/*! ./level-helper */"./src/controller/level-helper.ts"),c=r(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),u=r(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),h=r(/*! ../types/loader */"./src/types/loader.ts"),d=r(/*! ../types/level */"./src/types/level.ts");function f(t,e){for(var r=0;r=n[a].start&&o<=n[a].end){s=n[a];break}var l=r.start+r.duration;s?s.end=l:(s={start:o,end:l},n.push(s)),this.fragmentTracker.fragBuffered(r)}}},b.onBufferFlushing=function(t,e){var r=e.startOffset,i=e.endOffset;if(0===r&&i!==Number.POSITIVE_INFINITY){var n=this.currentTrackId,s=this.levels;if(!s.length||!s[n]||!s[n].details)return;var o=i-s[n].details.targetduration;if(o<=0)return;e.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(t){for(var e=0;e=c.length||n!==s)&&h){if(this.mediaBuffer=this.mediaBufferTimeRanges,i.live||null!==(r=h.details)&&void 0!==r&&r.live){var d=this.mainDetails;if(i.deltaUpdateFailed||!d)return;var f=d.fragments[0];h.details?0===this.alignPlaylists(i,h.details)&&f&&Object(l.addSliding)(i,f.start):i.hasProgramDateTime&&d.hasProgramDateTime?Object(a.alignMediaPlaylistByPDT)(i,d):f&&Object(l.addSliding)(i,f.start)}h.details=i,this.levelLastLoaded=n,this.tick(),i.live&&!this.fragCurrent&&this.media&&this.state===u.State.IDLE&&(Object(o.findFragmentByPTS)(null,i.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),h.details=void 0))}}},b._handleFragmentLoadComplete=function(t){var e=t.frag,r=t.payload,n=e.decryptdata,s=this.hls;if(!this.fragContextChanged(e)&&r&&r.byteLength>0&&n&&n.key&&n.iv&&"AES-128"===n.method){var o=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(r),n.key.buffer,n.iv.buffer).then((function(t){var r=performance.now();s.trigger(i.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:o,tdecrypt:r}})}))}},b.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var t,e=this.currentTrackId,r=this.levels;if(!r.length||!r[e]||!r[e].details)return;var a=r[e].details,l=a.targetduration,h=this.config,d=this.media,f=s.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,d.currentTime-l,h.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(a,"Subtitle track details are defined on idle subtitle stream controller tick");var g,m=a.fragments,v=m.length,y=a.edge,b=this.fragPrevious;if(p=n[a].start&&o<=n[a].end){s=n[a];break}var l=i.start+i.duration;s?s.end=l:(s={start:o,end:l},n.push(s)),this.fragmentTracker.fragBuffered(i)}}},b.onBufferFlushing=function(t,e){var i=e.startOffset,r=e.endOffset;if(0===i&&r!==Number.POSITIVE_INFINITY){var n=this.currentTrackId,s=this.levels;if(!s.length||!s[n]||!s[n].details)return;var o=r-s[n].details.targetduration;if(o<=0)return;e.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(t){for(var e=0;e=c.length||n!==s)&&h){if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||null!==(i=h.details)&&void 0!==i&&i.live){var d=this.mainDetails;if(r.deltaUpdateFailed||!d)return;var f=d.fragments[0];h.details?0===this.alignPlaylists(r,h.details)&&f&&Object(l.addSliding)(r,f.start):r.hasProgramDateTime&&d.hasProgramDateTime?Object(a.alignMediaPlaylistByPDT)(r,d):f&&Object(l.addSliding)(r,f.start)}h.details=r,this.levelLastLoaded=n,this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===u.State.IDLE&&(Object(o.findFragmentByPTS)(null,r.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),h.details=void 0))}}},b._handleFragmentLoadComplete=function(t){var e=t.frag,i=t.payload,n=e.decryptdata,s=this.hls;if(!this.fragContextChanged(e)&&i&&i.byteLength>0&&n&&n.key&&n.iv&&"AES-128"===n.method){var o=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(i),n.key.buffer,n.iv.buffer).then((function(t){var i=performance.now();s.trigger(r.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:o,tdecrypt:i}})}))}},b.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var t,e=this.currentTrackId,i=this.levels;if(!i.length||!i[e]||!i[e].details)return;var a=i[e].details,l=a.targetduration,h=this.config,d=this.media,f=s.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,d.currentTime-l,h.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(a,"Subtitle track details are defined on idle subtitle stream controller tick");var g,m=a.fragments,v=m.length,y=a.edge,b=this.fragPrevious;if(p-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))},f.pollTrackChange=function(t){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,t)},f.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),u(this.media.textTracks).forEach((function(t){Object(n.clearCurrentCues)(t)})),this.subtitleTrack=-1,this.media=null)},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(t,e){this.tracks=e.subtitleTracks},f.onSubtitleTrackLoaded=function(t,e){var r=e.id,i=e.details,n=this.trackId,s=this.tracksInGroup[n];if(s){var o=s.details;s.details=e.details,this.log("subtitle track "+r+" loaded ["+i.startSN+"-"+i.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,e,o))}else this.warn("Invalid subtitle track id "+r)},f.onLevelLoading=function(t,e){this.switchLevel(e.level)},f.onLevelSwitching=function(t,e){this.switchLevel(e.level)},f.switchLevel=function(t){var e=this.hls.levels[t];if(null!=e&&e.textGroupIds){var r=e.textGroupIds[e.urlId];if(this.groupId!==r){var n=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,s=this.tracks.filter((function(t){return!r||t.groupId===r}));this.tracksInGroup=s;var o=this.findTrackId(null==n?void 0:n.name)||this.findTrackId();this.groupId=r;var a={subtitleTracks:s};this.log("Updating subtitle tracks, "+s.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(i.Events.SUBTITLE_TRACKS_UPDATED,a),-1!==o&&this.setSubtitleTrack(o,n)}}},f.findTrackId=function(t){for(var e=this.tracksInGroup,r=0;r=n.length)){this.clearTimer();var s=n[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,s){var o=s.id,a=s.groupId,l=void 0===a?"":a,c=s.name,u=s.type,h=s.url;this.hls.trigger(i.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:l,name:c,type:u,url:h});var d=this.switchParams(s.url,null==e?void 0:e.details);this.loadPlaylist(d)}else this.hls.trigger(i.Events.SUBTITLE_TRACK_SWITCH,{id:t})}}else this.queuedDefaultTrack=t},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var t=-1,e=u(this.media.textTracks),r=0;r-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))},f.pollTrackChange=function(t){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,t)},f.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),u(this.media.textTracks).forEach((function(t){Object(n.clearCurrentCues)(t)})),this.subtitleTrack=-1,this.media=null)},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(t,e){this.tracks=e.subtitleTracks},f.onSubtitleTrackLoaded=function(t,e){var i=e.id,r=e.details,n=this.trackId,s=this.tracksInGroup[n];if(s){var o=s.details;s.details=e.details,this.log("subtitle track "+i+" loaded ["+r.startSN+"-"+r.endSN+"]"),i===this.trackId&&(this.retryCount=0,this.playlistLoaded(i,e,o))}else this.warn("Invalid subtitle track id "+i)},f.onLevelLoading=function(t,e){this.switchLevel(e.level)},f.onLevelSwitching=function(t,e){this.switchLevel(e.level)},f.switchLevel=function(t){var e=this.hls.levels[t];if(null!=e&&e.textGroupIds){var i=e.textGroupIds[e.urlId];if(this.groupId!==i){var n=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,s=this.tracks.filter((function(t){return!i||t.groupId===i}));this.tracksInGroup=s;var o=this.findTrackId(null==n?void 0:n.name)||this.findTrackId();this.groupId=i;var a={subtitleTracks:s};this.log("Updating subtitle tracks, "+s.length+' track(s) found in "'+i+'" group-id'),this.hls.trigger(r.Events.SUBTITLE_TRACKS_UPDATED,a),-1!==o&&this.setSubtitleTrack(o,n)}}},f.findTrackId=function(t){for(var e=this.tracksInGroup,i=0;i=n.length)){this.clearTimer();var s=n[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,s){var o=s.id,a=s.groupId,l=void 0===a?"":a,c=s.name,u=s.type,h=s.url;this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:l,name:c,type:u,url:h});var d=this.switchParams(s.url,null==e?void 0:e.details);this.loadPlaylist(d)}else this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:t})}}else this.queuedDefaultTrack=t},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var t=-1,e=u(this.media.textTracks),i=0;i=0&&(d[0]=Math.min(d[0],e),d[1]=Math.max(d[1],r),u=!0,f/(r-e)>.5))return}if(u||s.push([e,r]),this.config.renderTextTracksNatively){var p=this.captionsTracks[t];this.Cues.newCue(p,e,r,i)}else{var g=this.Cues.newCue(null,e,r,i);this.hls.trigger(n.Events.CUES_PARSED,{type:"captions",cues:g,track:t})}},e.onInitPtsFound=function(t,e){var r=this,i=e.frag,s=e.id,o=e.initPTS,a=e.timescale,l=this.unparsedVttFrags;"main"===s&&(this.initPTS[i.cc]=o,this.timescale[i.cc]=a),l.length&&(this.unparsedVttFrags=[],l.forEach((function(t){r.onFragLoaded(n.Events.FRAG_LOADED,t)})))},e.getExistingTrack=function(t){var e=this.media;if(e)for(var r=0;r=0&&(d[0]=Math.min(d[0],e),d[1]=Math.max(d[1],i),u=!0,f/(i-e)>.5))return}if(u||s.push([e,i]),this.config.renderTextTracksNatively){var p=this.captionsTracks[t];this.Cues.newCue(p,e,i,r)}else{var g=this.Cues.newCue(null,e,i,r);this.hls.trigger(n.Events.CUES_PARSED,{type:"captions",cues:g,track:t})}},e.onInitPtsFound=function(t,e){var i=this,r=e.frag,s=e.id,o=e.initPTS,a=e.timescale,l=this.unparsedVttFrags;"main"===s&&(this.initPTS[r.cc]=o,this.timescale[r.cc]=a),l.length&&(this.unparsedVttFrags=[],l.forEach((function(t){i.onFragLoaded(n.Events.FRAG_LOADED,t)})))},e.getExistingTrack=function(t){var e=this.media;if(e)for(var i=0;i>>8^255&m^99,t[f]=m,e[m]=f;var v=d[f],y=d[v],b=d[y],x=257*d[m]^16843008*m;i[f]=x<<24|x>>>8,n[f]=x<<16|x>>>16,s[f]=x<<8|x>>>24,o[f]=x,x=16843009*b^65537*y^257*v^16843008*f,l[m]=x<<24|x>>>8,c[m]=x<<16|x>>>16,u[m]=x<<8|x>>>24,h[m]=x,f?(f=v^d[d[d[b^v]]],p^=d[d[p]]):f=p=1}},e.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),r=!0,i=0;i>>8^255&m^99,t[f]=m,e[m]=f;var v=d[f],y=d[v],b=d[y],x=257*d[m]^16843008*m;r[f]=x<<24|x>>>8,n[f]=x<<16|x>>>16,s[f]=x<<8|x>>>24,o[f]=x,x=16843009*b^65537*y^257*v^16843008*f,l[m]=x<<24|x>>>8,c[m]=x<<16|x>>>16,u[m]=x<<8|x>>>24,h[m]=x,f?(f=v^d[d[d[b^v]]],p^=d[d[p]]):f=p=1}},e.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),i=!0,r=0;r>>6);var p=(60&e[r+2])>>>2;if(!(p>f.length-1))return c=(1&e[r+2])<<2,c|=(192&e[r+3])>>>6,i.logger.log("manifest codec:"+o+", ADTS type:"+a+", samplingIndex:"+p),/firefox/i.test(h)?p>=6?(a=5,u=new Array(4),l=p-3):(a=2,u=new Array(2),l=p):-1!==h.indexOf("android")?(a=2,u=new Array(2),l=p):(a=5,u=new Array(4),o&&(-1!==o.indexOf("mp4a.40.29")||-1!==o.indexOf("mp4a.40.5"))||!o&&p>=6?l=p-3:((o&&-1!==o.indexOf("mp4a.40.2")&&(p>=6&&1===c||/vivaldi/i.test(h))||!o&&1===c)&&(a=2,u=new Array(2)),l=p)),u[0]=a<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===a&&(u[1]|=(14&l)>>1,u[2]=(1&l)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:f[p],channelCount:c,codec:"mp4a.40."+a,manifestCodec:d};t.trigger(s.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function a(t,e){return 255===t[e]&&240==(246&t[e+1])}function l(t,e){return 1&t[e+1]?7:9}function c(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function u(t,e){return e+5=t.length)return!1;var i=c(t,e);if(i<=r)return!1;var n=e+i;return n===t.length||h(t,n)}return!1}function p(t,e,r,n,s){if(!t.samplerate){var a=o(e,r,n,s);if(!a)return;t.config=a.config,t.samplerate=a.samplerate,t.channelCount=a.channelCount,t.codec=a.codec,t.manifestCodec=a.manifestCodec,i.logger.log("parsed codec:"+t.codec+", rate:"+a.samplerate+", channels:"+a.channelCount)}}function g(t){return 9216e4/t}function m(t,e,r,i,n){var s=l(t,e),o=c(t,e);if((o-=s)>0)return{headerLength:s,frameLength:o,stamp:r+i*n}}function v(t,e,r,i,n){var s=m(e,r,i,n,g(t.samplerate));if(s){var o,a=s.frameLength,l=s.headerLength,c=s.stamp,u=l+a,h=Math.max(0,r+u-e.length);h?(o=new Uint8Array(u-l)).set(e.subarray(r+l,e.length),0):o=e.subarray(r+l,r+u);var d={unit:o,pts:c};return h||t.samples.push(d),{sample:d,length:u,missing:h}}}},"./src/demux/base-audio-demuxer.ts": +/*! exports provided: getAudioConfig, isHeaderPattern, getHeaderLength, getFullFrameLength, canGetFrameLength, isHeader, canParse, probe, initTrackConfig, getFrameDuration, parseFrameHeader, appendFrame */function(t,e,i){"use strict";i.r(e),i.d(e,"getAudioConfig",(function(){return o})),i.d(e,"isHeaderPattern",(function(){return a})),i.d(e,"getHeaderLength",(function(){return l})),i.d(e,"getFullFrameLength",(function(){return c})),i.d(e,"canGetFrameLength",(function(){return u})),i.d(e,"isHeader",(function(){return h})),i.d(e,"canParse",(function(){return d})),i.d(e,"probe",(function(){return f})),i.d(e,"initTrackConfig",(function(){return p})),i.d(e,"getFrameDuration",(function(){return g})),i.d(e,"parseFrameHeader",(function(){return m})),i.d(e,"appendFrame",(function(){return v}));var r=i(/*! ../utils/logger */"./src/utils/logger.ts"),n=i(/*! ../errors */"./src/errors.ts"),s=i(/*! ../events */"./src/events.ts");function o(t,e,i,o){var a,l,c,u,h=navigator.userAgent.toLowerCase(),d=o,f=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];a=1+((192&e[i+2])>>>6);var p=(60&e[i+2])>>>2;if(!(p>f.length-1))return c=(1&e[i+2])<<2,c|=(192&e[i+3])>>>6,r.logger.log("manifest codec:"+o+", ADTS type:"+a+", samplingIndex:"+p),/firefox/i.test(h)?p>=6?(a=5,u=new Array(4),l=p-3):(a=2,u=new Array(2),l=p):-1!==h.indexOf("android")?(a=2,u=new Array(2),l=p):(a=5,u=new Array(4),o&&(-1!==o.indexOf("mp4a.40.29")||-1!==o.indexOf("mp4a.40.5"))||!o&&p>=6?l=p-3:((o&&-1!==o.indexOf("mp4a.40.2")&&(p>=6&&1===c||/vivaldi/i.test(h))||!o&&1===c)&&(a=2,u=new Array(2)),l=p)),u[0]=a<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===a&&(u[1]|=(14&l)>>1,u[2]=(1&l)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:f[p],channelCount:c,codec:"mp4a.40."+a,manifestCodec:d};t.trigger(s.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function a(t,e){return 255===t[e]&&240==(246&t[e+1])}function l(t,e){return 1&t[e+1]?7:9}function c(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function u(t,e){return e+5=t.length)return!1;var r=c(t,e);if(r<=i)return!1;var n=e+r;return n===t.length||h(t,n)}return!1}function p(t,e,i,n,s){if(!t.samplerate){var a=o(e,i,n,s);if(!a)return;t.config=a.config,t.samplerate=a.samplerate,t.channelCount=a.channelCount,t.codec=a.codec,t.manifestCodec=a.manifestCodec,r.logger.log("parsed codec:"+t.codec+", rate:"+a.samplerate+", channels:"+a.channelCount)}}function g(t){return 9216e4/t}function m(t,e,i,r,n){var s=l(t,e),o=c(t,e);if((o-=s)>0)return{headerLength:s,frameLength:o,stamp:i+r*n}}function v(t,e,i,r,n){var s=m(e,i,r,n,g(t.samplerate));if(s){var o,a=s.frameLength,l=s.headerLength,c=s.stamp,u=l+a,h=Math.max(0,i+u-e.length);h?(o=new Uint8Array(u-l)).set(e.subarray(i+l,e.length),0):o=e.subarray(i+l,i+u);var d={unit:o,pts:c};return h||t.samples.push(d),{sample:d,length:u,missing:h}}}},"./src/demux/base-audio-demuxer.ts": /*!*****************************************!*\ !*** ./src/demux/base-audio-demuxer.ts ***! \*****************************************/ -/*! exports provided: initPTSFn, default */function(t,e,r){"use strict";r.r(e),r.d(e,"initPTSFn",(function(){return c}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../demux/id3 */"./src/demux/id3.ts"),s=r(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),o=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),a=r(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),l=function(){function t(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var e=t.prototype;return e.resetInitSegment=function(t,e,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},e.resetTimeStamp=function(){},e.resetContiguity=function(){},e.canParse=function(t,e){return!1},e.appendFrame=function(t,e,r){},e.demux=function(t,e){this.cachedData&&(t=Object(o.appendUint8Array)(this.cachedData,t),this.cachedData=null);var r,i,l=n.getID3Data(t,0),u=l?l.length:0,h=this._audioTrack,d=this._id3Track,f=l?n.getTimeStamp(l):void 0,p=t.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=c(f,e)),l&&l.length>0&&d.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),i=this.initPTS;u0&&d.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),r=this.initPTS;ut?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},e.readBits=function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&i.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?r<>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},e.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.skipEG=function(){this.skipBits(1+this.skipLZ())},e.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},e.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},e.readBoolean=function(){return 1===this.readBits(1)},e.readUByte=function(){return this.readBits(8)},e.readUShort=function(){return this.readBits(16)},e.readUInt=function(){return this.readBits(32)},e.skipScalingList=function(t){for(var e=8,r=8,i=0;it?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},e.readBits=function(t){var e=Math.min(this.bitsAvailable,t),i=this.word>>>32-e;return t>32&&r.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?i<>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},e.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.skipEG=function(){this.skipBits(1+this.skipLZ())},e.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},e.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},e.readBoolean=function(){return 1===this.readBits(1)},e.readUByte=function(){return this.readBits(8)},e.readUShort=function(){return this.readBits(16)},e.readUInt=function(){return this.readBits(32)},e.skipScalingList=function(t){for(var e=8,i=8,r=0;r0)return t.subarray(r,r+i)},a=function(t,e){var r=0;return r=(127&t[e])<<21,r|=(127&t[e+1])<<14,r|=(127&t[e+2])<<7,r|=127&t[e+3]},l=function(t,e){return n(t,e)&&a(t,e+6)+10<=t.length-e},c=function(t){for(var e=d(t),r=0;r>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(s);break;case 12:case 13:o=t[u++],c+=String.fromCharCode((31&s)<<6|63&o);break;case 14:o=t[u++],a=t[u++],c+=String.fromCharCode((15&s)<<12|(63&o)<<6|(63&a)<<0)}}return c},b={decodeTextFrame:g};function x(){return i||void 0===self.TextDecoder||(i=new self.TextDecoder("utf-8")),i}},"./src/demux/mp3demuxer.ts": +/*! exports provided: isHeader, isFooter, getID3Data, canParse, getTimeStamp, isTimeStampFrame, getID3Frames, decodeFrame, utf8ArrayToStr, testables */function(t,e,i){"use strict";i.r(e),i.d(e,"isHeader",(function(){return n})),i.d(e,"isFooter",(function(){return s})),i.d(e,"getID3Data",(function(){return o})),i.d(e,"canParse",(function(){return l})),i.d(e,"getTimeStamp",(function(){return c})),i.d(e,"isTimeStampFrame",(function(){return u})),i.d(e,"getID3Frames",(function(){return d})),i.d(e,"decodeFrame",(function(){return f})),i.d(e,"utf8ArrayToStr",(function(){return y})),i.d(e,"testables",(function(){return b}));var r,n=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},s=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},o=function(t,e){for(var i=e,r=0;n(t,e);)r+=10,r+=a(t,e+6),s(t,e+10)&&(r+=10),e+=r;if(r>0)return t.subarray(i,i+r)},a=function(t,e){var i=0;return i=(127&t[e])<<21,i|=(127&t[e+1])<<14,i|=(127&t[e+2])<<7,i|=127&t[e+3]},l=function(t,e){return n(t,e)&&a(t,e+6)+10<=t.length-e},c=function(t){for(var e=d(t),i=0;i>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(s);break;case 12:case 13:o=t[u++],c+=String.fromCharCode((31&s)<<6|63&o);break;case 14:o=t[u++],a=t[u++],c+=String.fromCharCode((15&s)<<12|(63&o)<<6|(63&a)<<0)}}return c},b={decodeTextFrame:g};function x(){return r||void 0===self.TextDecoder||(r=new self.TextDecoder("utf-8")),r}},"./src/demux/mp3demuxer.ts": /*!*********************************!*\ !*** ./src/demux/mp3demuxer.ts ***! \*********************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),n=r(/*! ../demux/id3 */"./src/demux/id3.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=r(/*! ./mpegaudio */"./src/demux/mpegaudio.ts");function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(t){var e,r;function i(){return t.apply(this,arguments)||this}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,a(e,r);var l=i.prototype;return l.resetInitSegment=function(e,r,i){t.prototype.resetInitSegment.call(this,e,r,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:e,duration:i,inputTimeScale:9e4,dropped:0}},i.probe=function(t){if(!t)return!1;for(var e=(n.getID3Data(t,0)||[]).length,r=t.length;e0},e.demux=function(t){var e=t,r=Object(n.dummyTrack)();if(this.config.progressive){this.remainderData&&(e=Object(i.appendUint8Array)(this.remainderData,t));var s=Object(i.segmentValidRange)(e);this.remainderData=s.remainder,r.samples=s.valid||new Uint8Array}else r.samples=e;return{audioTrack:Object(n.dummyTrack)(),avcTrack:r,id3Track:Object(n.dummyTrack)(),textTrack:Object(n.dummyTrack)()}},e.flush=function(){var t=Object(n.dummyTrack)();return t.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(n.dummyTrack)(),avcTrack:t,id3Track:Object(n.dummyTrack)(),textTrack:Object(n.dummyTrack)()}},e.demuxSampleAes=function(t,e,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},e.destroy=function(){},t}();s.minProbeByteLength=1024,e.default=s},"./src/demux/mpegaudio.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),n=i(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),s=function(){function t(t,e){this.remainderData=null,this.config=void 0,this.config=e}var e=t.prototype;return e.resetTimeStamp=function(){},e.resetInitSegment=function(){},e.resetContiguity=function(){},t.probe=function(t){return Object(r.findBox)({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.demux=function(t){var e=t,i=Object(n.dummyTrack)();if(this.config.progressive){this.remainderData&&(e=Object(r.appendUint8Array)(this.remainderData,t));var s=Object(r.segmentValidRange)(e);this.remainderData=s.remainder,i.samples=s.valid||new Uint8Array}else i.samples=e;return{audioTrack:Object(n.dummyTrack)(),avcTrack:i,id3Track:Object(n.dummyTrack)(),textTrack:Object(n.dummyTrack)()}},e.flush=function(){var t=Object(n.dummyTrack)();return t.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(n.dummyTrack)(),avcTrack:t,id3Track:Object(n.dummyTrack)(),textTrack:Object(n.dummyTrack)()}},e.demuxSampleAes=function(t,e,i){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},e.destroy=function(){},t}();s.minProbeByteLength=1024,e.default=s},"./src/demux/mpegaudio.ts": /*!********************************!*\ !*** ./src/demux/mpegaudio.ts ***! \********************************/ -/*! exports provided: appendFrame, parseHeader, isHeaderPattern, isHeader, canParse, probe */function(t,e,r){"use strict";r.r(e),r.d(e,"appendFrame",(function(){return l})),r.d(e,"parseHeader",(function(){return c})),r.d(e,"isHeaderPattern",(function(){return u})),r.d(e,"isHeader",(function(){return h})),r.d(e,"canParse",(function(){return d})),r.d(e,"probe",(function(){return f}));var i=null,n=[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],s=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],o=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],a=[0,1,1,4];function l(t,e,r,i,n){if(!(r+24>e.length)){var s=c(e,r);if(s&&r+s.frameLength<=e.length){var o=i+n*(9e4*s.samplesPerFrame/s.sampleRate),a={unit:e.subarray(r,r+s.frameLength),pts:o,dts:o};return t.config=[],t.channelCount=s.channelCount,t.samplerate=s.sampleRate,t.samples.push(a),{sample:a,length:s.frameLength,missing:0}}}}function c(t,e){var r=t[e+1]>>3&3,l=t[e+1]>>1&3,c=t[e+2]>>4&15,u=t[e+2]>>2&3;if(1!==r&&0!==c&&15!==c&&3!==u){var h=t[e+2]>>1&1,d=t[e+3]>>6,f=1e3*n[14*(3===r?3-l:3===l?3:4)+c-1],p=s[3*(3===r?0:2===r?1:2)+u],g=3===d?1:2,m=o[r][l],v=a[l],y=8*m*v,b=Math.floor(m*f/p+h)*v;if(null===i){var x=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);i=x?parseInt(x[1]):0}return!!i&&i<=87&&2===l&&f>=224e3&&0===d&&(t[e+3]=128|t[e+3]),{sampleRate:p,channelCount:g,frameLength:b,samplesPerFrame:y}}}function u(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])}function h(t,e){return e+1e.length)){var s=c(e,i);if(s&&i+s.frameLength<=e.length){var o=r+n*(9e4*s.samplesPerFrame/s.sampleRate),a={unit:e.subarray(i,i+s.frameLength),pts:o,dts:o};return t.config=[],t.channelCount=s.channelCount,t.samplerate=s.sampleRate,t.samples.push(a),{sample:a,length:s.frameLength,missing:0}}}}function c(t,e){var i=t[e+1]>>3&3,l=t[e+1]>>1&3,c=t[e+2]>>4&15,u=t[e+2]>>2&3;if(1!==i&&0!==c&&15!==c&&3!==u){var h=t[e+2]>>1&1,d=t[e+3]>>6,f=1e3*n[14*(3===i?3-l:3===l?3:4)+c-1],p=s[3*(3===i?0:2===i?1:2)+u],g=3===d?1:2,m=o[i][l],v=a[l],y=8*m*v,b=Math.floor(m*f/p+h)*v;if(null===r){var x=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);r=x?parseInt(x[1]):0}return!!r&&r<=87&&2===l&&f>=224e3&&0===d&&(t[e+3]=128|t[e+3]),{sampleRate:p,channelCount:g,frameLength:b,samplesPerFrame:y}}}function u(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])}function h(t,e){return e+1=t.length)return void r();if(!(t[e].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(t,e,r,i),!i)return}}},e.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,r=new Int8Array(e),i=0,n=32;n<=t.length-16;n+=160,i+=16)r.set(t.subarray(n,n+16),i);return r},e.getAvcDecryptedUnit=function(t,e){for(var r=new Uint8Array(e),i=0,n=32;n<=t.length-16;n+=160,i+=16)t.set(r.subarray(i,i+16),n);return t},e.decryptAvcSample=function(t,e,r,i,s,o){var a=Object(n.discardEPB)(s.data),l=this.getAvcEncryptedData(a),c=this;this.decryptBuffer(l.buffer,(function(n){s.data=c.getAvcDecryptedUnit(a,n),o||c.decryptAvcSamples(t,e,r+1,i)}))},e.decryptAvcSamples=function(t,e,r,i){if(t instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;e++,r=0){if(e>=t.length)return void i();for(var n=t[e].units;!(r>=n.length);r++){var s=n[r];if(!(s.data.length<=48||1!==s.type&&5!==s.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,r,i,s,o),!o)return}}}},t}();e.default=s},"./src/demux/transmuxer-interface.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),n=i(/*! ./tsdemuxer */"./src/demux/tsdemuxer.ts"),s=function(){function t(t,e,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new r.default(t,e,{removePKCS7Padding:!1})}var e=t.prototype;return e.decryptBuffer=function(t,e){this.decrypter.decrypt(t,this.keyData.key.buffer,this.keyData.iv.buffer,e)},e.decryptAacSample=function(t,e,i,r){var n=t[e].unit,s=n.subarray(16,n.length-n.length%16),o=s.buffer.slice(s.byteOffset,s.byteOffset+s.length),a=this;this.decryptBuffer(o,(function(s){var o=new Uint8Array(s);n.set(o,16),r||a.decryptAacSamples(t,e+1,i)}))},e.decryptAacSamples=function(t,e,i){for(;;e++){if(e>=t.length)return void i();if(!(t[e].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(t,e,i,r),!r)return}}},e.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,i=new Int8Array(e),r=0,n=32;n<=t.length-16;n+=160,r+=16)i.set(t.subarray(n,n+16),r);return i},e.getAvcDecryptedUnit=function(t,e){for(var i=new Uint8Array(e),r=0,n=32;n<=t.length-16;n+=160,r+=16)t.set(i.subarray(r,r+16),n);return t},e.decryptAvcSample=function(t,e,i,r,s,o){var a=Object(n.discardEPB)(s.data),l=this.getAvcEncryptedData(a),c=this;this.decryptBuffer(l.buffer,(function(n){s.data=c.getAvcDecryptedUnit(a,n),o||c.decryptAvcSamples(t,e,i+1,r)}))},e.decryptAvcSamples=function(t,e,i,r){if(t instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;e++,i=0){if(e>=t.length)return void r();for(var n=t[e].units;!(i>=n.length);i++){var s=n[i];if(!(s.data.length<=48||1!==s.type&&5!==s.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,i,r,s,o),!o)return}}}},t}();e.default=s},"./src/demux/transmuxer-interface.ts": /*!*******************************************!*\ !*** ./src/demux/transmuxer-interface.ts ***! \*******************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return h}));var i=r(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts"),a=r(/*! ../errors */"./src/errors.ts"),l=r(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=r(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function t(t,e,r,l){var h=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=t,this.id=e,this.onTransmuxComplete=r,this.onFlush=l;var d=t.config,f=function(e,r){(r=r||{}).frag=h.frag,r.id=h.id,t.trigger(e,r)};this.observer=new c.EventEmitter,this.observer.on(n.Events.FRAG_DECRYPTED,f),this.observer.on(n.Events.ERROR,f);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},g=navigator.vendor;if(d.enableWorker&&"undefined"!=typeof Worker){var m;o.logger.log("demuxing in webworker");try{m=this.worker=i(/*! ../demux/transmuxer-worker.ts */"./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),m.addEventListener("message",this.onwmsg),m.onerror=function(e){t.trigger(n.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(e.message+" ("+e.filename+":"+e.lineno+")")})},m.postMessage({cmd:"init",typeSupported:p,vendor:g,id:e,config:JSON.stringify(d)})}catch(t){o.logger.warn("Error in worker:",t),o.logger.error("Error while initializing DemuxerWorker, fallback to inline"),m&&self.URL.revokeObjectURL(m.objectURL),this.transmuxer=new s.default(this.observer,p,d,g,e),this.worker=null}}else this.transmuxer=new s.default(this.observer,p,d,g,e)}var e=t.prototype;return e.destroy=function(){var t=this.worker;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.worker=null;else{var e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}var r=this.observer;r&&r.removeAllListeners(),this.observer=null},e.push=function(t,e,r,i,n,a,l,c,u,h){var d=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,g=a?a.start:n.start,m=n.decryptdata,v=this.frag,y=!(v&&n.cc===v.cc),b=!(v&&u.level===v.level),x=v?u.sn-v.sn:-1,S=this.part?u.part-this.part.index:1,C=!b&&(1===x||0===x&&1===S),w=self.performance.now();(b||x||0===n.stats.parsing.start)&&(n.stats.parsing.start=w),!a||!S&&C||(a.stats.parsing.start=w);var k=new s.TransmuxState(y,C,c,b,g);if(!C||y){o.logger.log("[transmuxer-interface, "+n.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+y+"\n trackSwitch: "+b+"\n contiguous: "+C+"\n accurateTimeOffset: "+c+"\n timeOffset: "+g);var E=new s.TransmuxConfig(r,i,e,l,h);this.configureTransmuxer(E)}if(this.frag=n,this.part=a,p)p.postMessage({cmd:"demux",data:t,decryptdata:m,chunkMeta:u,state:k},t instanceof ArrayBuffer?[t]:[]);else if(f){var T=f.push(t,m,u,k);Object(s.isPromise)(T)?T.then((function(t){d.handleTransmuxComplete(t)})):this.handleTransmuxComplete(T)}},e.flush=function(t){var e=this;t.transmuxing.start=self.performance.now();var r=this.transmuxer,i=this.worker;if(i)i.postMessage({cmd:"flush",chunkMeta:t});else if(r){var n=r.flush(t);Object(s.isPromise)(n)?n.then((function(r){e.handleFlushResult(r,t)})):this.handleFlushResult(n,t)}},e.handleFlushResult=function(t,e){var r=this;t.forEach((function(t){r.handleTransmuxComplete(t)})),this.onFlush(e)},e.onWorkerMessage=function(t){var e=t.data,r=this.hls;switch(e.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(e.data);break;case"flush":this.onFlush(e.data);break;default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,r.trigger(e.event,e.data)}},e.configureTransmuxer=function(t){var e=this.worker,r=this.transmuxer;e?e.postMessage({cmd:"configure",config:t}):r&&r.configure(t)},e.handleTransmuxComplete=function(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)},t}()},"./src/demux/transmuxer-worker.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return h}));var r=i(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),o=i(/*! ../utils/logger */"./src/utils/logger.ts"),a=i(/*! ../errors */"./src/errors.ts"),l=i(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=i(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function t(t,e,i,l){var h=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=t,this.id=e,this.onTransmuxComplete=i,this.onFlush=l;var d=t.config,f=function(e,i){(i=i||{}).frag=h.frag,i.id=h.id,t.trigger(e,i)};this.observer=new c.EventEmitter,this.observer.on(n.Events.FRAG_DECRYPTED,f),this.observer.on(n.Events.ERROR,f);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},g=navigator.vendor;if(d.enableWorker&&"undefined"!=typeof Worker){var m;o.logger.log("demuxing in webworker");try{m=this.worker=r(/*! ../demux/transmuxer-worker.ts */"./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),m.addEventListener("message",this.onwmsg),m.onerror=function(e){t.trigger(n.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(e.message+" ("+e.filename+":"+e.lineno+")")})},m.postMessage({cmd:"init",typeSupported:p,vendor:g,id:e,config:JSON.stringify(d)})}catch(t){o.logger.warn("Error in worker:",t),o.logger.error("Error while initializing DemuxerWorker, fallback to inline"),m&&self.URL.revokeObjectURL(m.objectURL),this.transmuxer=new s.default(this.observer,p,d,g,e),this.worker=null}}else this.transmuxer=new s.default(this.observer,p,d,g,e)}var e=t.prototype;return e.destroy=function(){var t=this.worker;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.worker=null;else{var e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}var i=this.observer;i&&i.removeAllListeners(),this.observer=null},e.push=function(t,e,i,r,n,a,l,c,u,h){var d=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,g=a?a.start:n.start,m=n.decryptdata,v=this.frag,y=!(v&&n.cc===v.cc),b=!(v&&u.level===v.level),x=v?u.sn-v.sn:-1,S=this.part?u.part-this.part.index:1,C=!b&&(1===x||0===x&&1===S),w=self.performance.now();(b||x||0===n.stats.parsing.start)&&(n.stats.parsing.start=w),!a||!S&&C||(a.stats.parsing.start=w);var k=new s.TransmuxState(y,C,c,b,g);if(!C||y){o.logger.log("[transmuxer-interface, "+n.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+y+"\n trackSwitch: "+b+"\n contiguous: "+C+"\n accurateTimeOffset: "+c+"\n timeOffset: "+g);var E=new s.TransmuxConfig(i,r,e,l,h);this.configureTransmuxer(E)}if(this.frag=n,this.part=a,p)p.postMessage({cmd:"demux",data:t,decryptdata:m,chunkMeta:u,state:k},t instanceof ArrayBuffer?[t]:[]);else if(f){var T=f.push(t,m,u,k);Object(s.isPromise)(T)?T.then((function(t){d.handleTransmuxComplete(t)})):this.handleTransmuxComplete(T)}},e.flush=function(t){var e=this;t.transmuxing.start=self.performance.now();var i=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:t});else if(i){var n=i.flush(t);Object(s.isPromise)(n)?n.then((function(i){e.handleFlushResult(i,t)})):this.handleFlushResult(n,t)}},e.handleFlushResult=function(t,e){var i=this;t.forEach((function(t){i.handleTransmuxComplete(t)})),this.onFlush(e)},e.onWorkerMessage=function(t){var e=t.data,i=this.hls;switch(e.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(e.data);break;case"flush":this.onFlush(e.data);break;default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,i.trigger(e.event,e.data)}},e.configureTransmuxer=function(t){var e=this.worker,i=this.transmuxer;e?e.postMessage({cmd:"configure",config:t}):i&&i.configure(t)},e.handleTransmuxComplete=function(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)},t}()},"./src/demux/transmuxer-worker.ts": /*!****************************************!*\ !*** ./src/demux/transmuxer-worker.ts ***! \****************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var i=r(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=r(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function a(t){var e=new o.EventEmitter,r=function(e,r){t.postMessage({event:e,data:r})};e.on(n.Events.FRAG_DECRYPTED,r),e.on(n.Events.ERROR,r),t.addEventListener("message",(function(n){var o=n.data;switch(o.cmd){case"init":var a=JSON.parse(o.config);t.transmuxer=new i.default(e,o.typeSupported,a,o.vendor,o.id),Object(s.enableLogs)(a.debug),r("init",null);break;case"configure":t.transmuxer.configure(o.config);break;case"demux":var c=t.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(i.isPromise)(c)?c.then((function(e){l(t,e)})):l(t,c);break;case"flush":var h=o.chunkMeta,d=t.transmuxer.flush(h);Object(i.isPromise)(d)?d.then((function(e){u(t,e,h)})):u(t,d,h)}}))}function l(t,e){if((r=e.remuxResult).audio||r.video||r.text||r.id3||r.initSegment){var r,i=[],n=e.remuxResult,s=n.audio,o=n.video;s&&c(i,s),o&&c(i,o),t.postMessage({event:"transmuxComplete",data:e},i)}}function c(t,e){e.data1&&t.push(e.data1.buffer),e.data2&&t.push(e.data2.buffer)}function u(t,e,r){e.forEach((function(e){l(t,e)})),t.postMessage({event:"flush",data:r})}},"./src/demux/transmuxer.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return a}));var r=i(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts"),o=i(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function a(t){var e=new o.EventEmitter,i=function(e,i){t.postMessage({event:e,data:i})};e.on(n.Events.FRAG_DECRYPTED,i),e.on(n.Events.ERROR,i),t.addEventListener("message",(function(n){var o=n.data;switch(o.cmd){case"init":var a=JSON.parse(o.config);t.transmuxer=new r.default(e,o.typeSupported,a,o.vendor,o.id),Object(s.enableLogs)(a.debug),i("init",null);break;case"configure":t.transmuxer.configure(o.config);break;case"demux":var c=t.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(r.isPromise)(c)?c.then((function(e){l(t,e)})):l(t,c);break;case"flush":var h=o.chunkMeta,d=t.transmuxer.flush(h);Object(r.isPromise)(d)?d.then((function(e){u(t,e,h)})):u(t,d,h)}}))}function l(t,e){if((i=e.remuxResult).audio||i.video||i.text||i.id3||i.initSegment){var i,r=[],n=e.remuxResult,s=n.audio,o=n.video;s&&c(r,s),o&&c(r,o),t.postMessage({event:"transmuxComplete",data:e},r)}}function c(t,e){e.data1&&t.push(e.data1.buffer),e.data2&&t.push(e.data2.buffer)}function u(t,e,i){e.forEach((function(e){l(t,e)})),t.postMessage({event:"flush",data:i})}},"./src/demux/transmuxer.ts": /*!*********************************!*\ !*** ./src/demux/transmuxer.ts ***! \*********************************/ -/*! exports provided: default, isPromise, TransmuxConfig, TransmuxState */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return y})),r.d(e,"isPromise",(function(){return x})),r.d(e,"TransmuxConfig",(function(){return S})),r.d(e,"TransmuxState",(function(){return C}));var i,n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../errors */"./src/errors.ts"),o=r(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),a=r(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.ts"),l=r(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.ts"),c=r(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.ts"),u=r(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.ts"),h=r(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),d=r(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.ts"),f=r(/*! ./chunk-cache */"./src/demux/chunk-cache.ts"),p=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),g=r(/*! ../utils/logger */"./src/utils/logger.ts");try{i=self.performance.now.bind(self.performance)}catch(t){g.logger.debug("Unable to use Performance API on this environment"),i=self.Date.now}var m=[{demux:c.default,remux:h.default},{demux:l.default,remux:d.default},{demux:a.default,remux:h.default},{demux:u.default,remux:h.default}],v=1024;m.forEach((function(t){var e=t.demux;v=Math.max(v,e.minProbeByteLength)}));var y=function(){function t(t,e,r,i,n){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 f.default,this.observer=t,this.typeSupported=e,this.config=r,this.vendor=i,this.id=n}var e=t.prototype;return e.configure=function(t){this.transmuxConfig=t,this.decrypter&&this.decrypter.reset()},e.push=function(t,e,r,n){var s=this,o=r.transmuxing;o.executeStart=i();var a=new Uint8Array(t),l=this.cache,c=this.config,u=this.currentTransmuxState,h=this.transmuxConfig;n&&(this.currentTransmuxState=n);var d=function(t,e){var r=null;return t.byteLength>0&&null!=e&&null!=e.key&&null!==e.iv&&null!=e.method&&(r=e),r}(a,e);if(d&&"AES-128"===d.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(a,d.key.buffer,d.iv.buffer).then((function(t){var e=s.push(t,null,r);return s.decryptionPromise=null,e})),this.decryptionPromise;var g=f.softwareDecrypt(a,d.key.buffer,d.iv.buffer);if(!g)return o.executeEnd=i(),b(r);a=new Uint8Array(g)}var m=n||u,v=m.contiguous,y=m.discontinuity,x=m.trackSwitch,S=m.accurateTimeOffset,C=m.timeOffset,w=h.audioCodec,k=h.videoCodec,E=h.defaultInitPts,T=h.duration,L=h.initSegmentData;if((y||x)&&this.resetInitSegment(L,w,k,T),y&&this.resetInitialTimestamp(E),v||this.resetContiguity(),this.needsProbing(a,y,x)){if(l.dataLength){var A=l.flush();a=Object(p.appendUint8Array)(A,a)}this.configureTransmuxer(a,h)}var D=this.transmux(a,d,C,S,r),R=this.currentTransmuxState;return R.contiguous=!0,R.discontinuity=!1,R.trackSwitch=!1,o.executeEnd=i(),D},e.flush=function(t){var e=this,r=t.transmuxing;r.executeStart=i();var o=this.decrypter,a=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return e.flush(t)}));var u=[],h=l.timeOffset;if(o){var d=o.flush();d&&u.push(this.push(d,null,t))}var f=a.dataLength;a.reset();var p=this.demuxer,g=this.remuxer;if(!p||!g)return f>=v&&this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),r.executeEnd=i(),[b(t)];var m=p.flush(h);return x(m)?m.then((function(r){return e.flushRemux(u,r,t),u})):(this.flushRemux(u,m,t),u)},e.flushRemux=function(t,e,r){var n=e.audioTrack,s=e.avcTrack,o=e.id3Track,a=e.textTrack,l=this.currentTransmuxState,c=l.accurateTimeOffset,u=l.timeOffset;g.logger.log("[transmuxer.ts]: Flushed fragment "+r.sn+(r.part>-1?" p: "+r.part:"")+" of level "+r.level);var h=this.remuxer.remux(n,s,o,a,u,c,!0,this.id);t.push({remuxResult:h,chunkMeta:r}),r.transmuxing.executeEnd=i()},e.resetInitialTimestamp=function(t){var e=this.demuxer,r=this.remuxer;e&&r&&(e.resetTimeStamp(t),r.resetTimeStamp(t))},e.resetContiguity=function(){var t=this.demuxer,e=this.remuxer;t&&e&&(t.resetContiguity(),e.resetNextTimestamp())},e.resetInitSegment=function(t,e,r,i){var n=this.demuxer,s=this.remuxer;n&&s&&(n.resetInitSegment(e,r,i),s.resetInitSegment(t,e,r))},e.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},e.transmux=function(t,e,r,i,n){return e&&"SAMPLE-AES"===e.method?this.transmuxSampleAes(t,e,r,i,n):this.transmuxUnencrypted(t,r,i,n)},e.transmuxUnencrypted=function(t,e,r,i){var n=this.demuxer.demux(t,e,!1,!this.config.progressive),s=n.audioTrack,o=n.avcTrack,a=n.id3Track,l=n.textTrack;return{remuxResult:this.remuxer.remux(s,o,a,l,e,r,!1,this.id),chunkMeta:i}},e.transmuxSampleAes=function(t,e,r,i,n){var s=this;return this.demuxer.demuxSampleAes(t,e,r).then((function(t){return{remuxResult:s.remuxer.remux(t.audioTrack,t.avcTrack,t.id3Track,t.textTrack,r,i,!1,s.id),chunkMeta:n}}))},e.configureTransmuxer=function(t,e){for(var r,i=this.config,n=this.observer,s=this.typeSupported,o=this.vendor,a=e.audioCodec,c=e.defaultInitPts,u=e.duration,h=e.initSegmentData,f=e.videoCodec,p=0,v=m.length;p0&&null!=e&&null!=e.key&&null!==e.iv&&null!=e.method&&(i=e),i}(a,e);if(d&&"AES-128"===d.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(a,d.key.buffer,d.iv.buffer).then((function(t){var e=s.push(t,null,i);return s.decryptionPromise=null,e})),this.decryptionPromise;var g=f.softwareDecrypt(a,d.key.buffer,d.iv.buffer);if(!g)return o.executeEnd=r(),b(i);a=new Uint8Array(g)}var m=n||u,v=m.contiguous,y=m.discontinuity,x=m.trackSwitch,S=m.accurateTimeOffset,C=m.timeOffset,w=h.audioCodec,k=h.videoCodec,E=h.defaultInitPts,T=h.duration,L=h.initSegmentData;if((y||x)&&this.resetInitSegment(L,w,k,T),y&&this.resetInitialTimestamp(E),v||this.resetContiguity(),this.needsProbing(a,y,x)){if(l.dataLength){var A=l.flush();a=Object(p.appendUint8Array)(A,a)}this.configureTransmuxer(a,h)}var D=this.transmux(a,d,C,S,i),R=this.currentTransmuxState;return R.contiguous=!0,R.discontinuity=!1,R.trackSwitch=!1,o.executeEnd=r(),D},e.flush=function(t){var e=this,i=t.transmuxing;i.executeStart=r();var o=this.decrypter,a=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return e.flush(t)}));var u=[],h=l.timeOffset;if(o){var d=o.flush();d&&u.push(this.push(d,null,t))}var f=a.dataLength;a.reset();var p=this.demuxer,g=this.remuxer;if(!p||!g)return f>=v&&this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),i.executeEnd=r(),[b(t)];var m=p.flush(h);return x(m)?m.then((function(i){return e.flushRemux(u,i,t),u})):(this.flushRemux(u,m,t),u)},e.flushRemux=function(t,e,i){var n=e.audioTrack,s=e.avcTrack,o=e.id3Track,a=e.textTrack,l=this.currentTransmuxState,c=l.accurateTimeOffset,u=l.timeOffset;g.logger.log("[transmuxer.ts]: Flushed fragment "+i.sn+(i.part>-1?" p: "+i.part:"")+" of level "+i.level);var h=this.remuxer.remux(n,s,o,a,u,c,!0,this.id);t.push({remuxResult:h,chunkMeta:i}),i.transmuxing.executeEnd=r()},e.resetInitialTimestamp=function(t){var e=this.demuxer,i=this.remuxer;e&&i&&(e.resetTimeStamp(t),i.resetTimeStamp(t))},e.resetContiguity=function(){var t=this.demuxer,e=this.remuxer;t&&e&&(t.resetContiguity(),e.resetNextTimestamp())},e.resetInitSegment=function(t,e,i,r){var n=this.demuxer,s=this.remuxer;n&&s&&(n.resetInitSegment(e,i,r),s.resetInitSegment(t,e,i))},e.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},e.transmux=function(t,e,i,r,n){return e&&"SAMPLE-AES"===e.method?this.transmuxSampleAes(t,e,i,r,n):this.transmuxUnencrypted(t,i,r,n)},e.transmuxUnencrypted=function(t,e,i,r){var n=this.demuxer.demux(t,e,!1,!this.config.progressive),s=n.audioTrack,o=n.avcTrack,a=n.id3Track,l=n.textTrack;return{remuxResult:this.remuxer.remux(s,o,a,l,e,i,!1,this.id),chunkMeta:r}},e.transmuxSampleAes=function(t,e,i,r,n){var s=this;return this.demuxer.demuxSampleAes(t,e,i).then((function(t){return{remuxResult:s.remuxer.remux(t.audioTrack,t.avcTrack,t.id3Track,t.textTrack,i,r,!1,s.id),chunkMeta:n}}))},e.configureTransmuxer=function(t,e){for(var i,r=this.config,n=this.observer,s=this.typeSupported,o=this.vendor,a=e.audioCodec,c=e.defaultInitPts,u=e.duration,h=e.initSegmentData,f=e.videoCodec,p=0,v=m.length;p>4>1){if((R=L+5+e[L+4])===L+188)continue}else R=L+4;switch(D){case f:A&&(p&&(s=v(p))&&this.parseAVCPES(s,!1),p={data:[],size:0}),p&&(p.data.push(e.subarray(R,L+188)),p.size+=L+188-R);break;case y:A&&(x&&(s=v(x))&&(a.isAAC?this.parseAACPES(s):this.parseMPEGPES(s)),x={data:[],size:0}),x&&(x.data.push(e.subarray(R,L+188)),x.size+=L+188-R);break;case b:A&&(S&&(s=v(S))&&this.parseID3PES(s),S={data:[],size:0}),S&&(S.data.push(e.subarray(R,L+188)),S.size+=L+188-R);break;case 0:A&&(R+=e[R]+1),k=this._pmtId=g(e,R);break;case k:A&&(R+=e[R]+1);var O=m(e,R,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,i);(f=O.avc)>0&&(o.pid=f),(y=O.audio)>0&&(a.pid=y,a.isAAC=O.isAAC),(b=O.id3)>0&&(d.pid=b),C&&!w&&(u.logger.log("reparse from beginning"),C=!1,L=T-188),w=this.pmtParsed=!0;break;case 17:case 8191:break;default:C=!0}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});o.pesData=p,a.pesData=x,d.pesData=S;var _={audioTrack:a,avcTrack:o,id3Track:d,textTrack:this._txtTrack};return n&&this.extractRemainingSamples(_),_},e.flush=function(){var t,e=this.remainderData;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t},e.extractRemainingSamples=function(t){var e,r=t.audioTrack,i=t.avcTrack,n=t.id3Track,s=i.pesData,o=r.pesData,a=n.pesData;s&&(e=v(s))?(this.parseAVCPES(e,!0),i.pesData=null):i.pesData=s,o&&(e=v(o))?(r.isAAC?this.parseAACPES(e):this.parseMPEGPES(e),r.pesData=null):(null!=o&&o.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),r.pesData=o),a&&(e=v(a))?(this.parseID3PES(e),n.pesData=null):n.pesData=a},e.demuxSampleAes=function(t,e,r){var i=this.demux(t,r,!0,!this.config.progressive),n=this.sampleAes=new a.default(this.observer,this.config,e);return this.decrypt(i,n)},e.decrypt=function(t,e){return new Promise((function(r){var i=t.audioTrack,n=t.avcTrack;i.samples&&i.isAAC?e.decryptAacSamples(i.samples,0,(function(){n.samples?e.decryptAvcSamples(n.samples,0,0,(function(){r(t)})):r(t)})):n.samples&&e.decryptAvcSamples(n.samples,0,0,(function(){r(t)}))}))},e.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},e.parseAVCPES=function(t,e){var r,i=this,n=this._avcTrack,a=this.parseAVCNALu(t.data),l=this.avcSample,c=!1;t.data=null,l&&a.length&&!n.audFound&&(y(l,n),l=this.avcSample=p(!1,t.pts,t.dts,"")),a.forEach((function(e){switch(e.type){case 1:r=!0,l||(l=i.avcSample=p(!0,t.pts,t.dts,"")),l.frame=!0;var a=e.data;if(c&&a.length>4){var u=new s.default(a).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(l.key=!0)}break;case 5:r=!0,l||(l=i.avcSample=p(!0,t.pts,t.dts,"")),l.key=!0,l.frame=!0;break;case 6:r=!0;var h=new s.default(x(e.data));h.readUByte();for(var d=0,f=0,g=!1,m=0;!g&&h.bytesAvailable>1;){d=0;do{d+=m=h.readUByte()}while(255===m);f=0;do{f+=m=h.readUByte()}while(255===m);if(4===d&&0!==h.bytesAvailable){if(g=!0,181===h.readUByte()&&49===h.readUShort()&&1195456820===h.readUInt()&&3===h.readUByte()){for(var v=h.readUByte(),S=31&v,C=[v,h.readUByte()],w=0;w16){for(var k=[],E=0;E<16;E++)k.push(h.readUByte().toString(16)),3!==E&&5!==E&&7!==E&&9!==E||k.push("-");for(var T=f-16,L=new Uint8Array(T),A=0;A=0){var h={data:t.subarray(c,l-s-1),type:u};a.push(h)}else{var d=this.getLastNalUnit();if(d&&(o&&l<=4-o&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-o)),(r=l-s-1)>0)){var f=new Uint8Array(d.data.byteLength+r);f.set(d.data,0),f.set(t.subarray(0,r),d.data.byteLength),d.data=f,d.state=0}}l=0&&s>=0){var p={data:t.subarray(c,i),type:u,state:s};a.push(p)}if(0===a.length){var g=this.getLastNalUnit();if(g){var m=new Uint8Array(g.data.byteLength+t.byteLength);m.set(g.data,0),m.set(t,g.data.byteLength),g.data=m}}return n.naluState=s,a},e.parseAACPES=function(t){var e,r,n,s,o,a=0,c=this._audioTrack,d=this.aacOverFlow,f=t.data;if(d){this.aacOverFlow=null;var p=d.sample.unit.byteLength,g=Math.min(d.missing,p),m=p-g;d.sample.unit.set(f.subarray(0,g),m),c.samples.push(d.sample),a=d.missing}for(e=a,r=f.length;e1;){var l=new Uint8Array(a[0].length+a[1].length);l.set(a[0]),l.set(a[1],a[0].length),a[0]=l,a.splice(1,1)}if(1===((e=a[0])[0]<<16)+(e[1]<<8)+e[2]){if((r=(e[4]<<8)+e[5])&&r>t.size-6)return null;var c=e[7];192&c&&(n=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&c?n-(s=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(u.logger.warn(Math.round((n-s)/9e4)+"s delta between PTS and DTS, align them"),n=s):s=n);var h=(i=e[8])+9;if(t.size<=h)return null;t.size-=h;for(var d=new Uint8Array(t.size),f=0,p=a.length;fg){h-=g;continue}e=e.subarray(h),g-=h,h=0}d.set(e,o),o+=g}return r&&(r-=i+3),{data:d,pts:n,dts:s,len:r}}return null}function y(t,e){if(t.units.length&&t.frame){if(void 0===t.pts){var r=e.samples,i=r.length;if(!i)return void e.dropped++;var n=r[i-1];t.pts=n.pts,t.dts=n.dts}e.samples.push(t)}t.debug.length&&u.logger.log(t.pts+"/"+t.dts+":"+t.debug)}function b(t,e){var r=t.length;if(r>0){if(e.pts>=t[r-1].pts)t.push(e);else for(var i=r-1;i>=0;i--)if(e.pts>4>1){if((R=L+5+e[L+4])===L+188)continue}else R=L+4;switch(D){case f:A&&(p&&(s=v(p))&&this.parseAVCPES(s,!1),p={data:[],size:0}),p&&(p.data.push(e.subarray(R,L+188)),p.size+=L+188-R);break;case y:A&&(x&&(s=v(x))&&(a.isAAC?this.parseAACPES(s):this.parseMPEGPES(s)),x={data:[],size:0}),x&&(x.data.push(e.subarray(R,L+188)),x.size+=L+188-R);break;case b:A&&(S&&(s=v(S))&&this.parseID3PES(s),S={data:[],size:0}),S&&(S.data.push(e.subarray(R,L+188)),S.size+=L+188-R);break;case 0:A&&(R+=e[R]+1),k=this._pmtId=g(e,R);break;case k:A&&(R+=e[R]+1);var O=m(e,R,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,r);(f=O.avc)>0&&(o.pid=f),(y=O.audio)>0&&(a.pid=y,a.isAAC=O.isAAC),(b=O.id3)>0&&(d.pid=b),C&&!w&&(u.logger.log("reparse from beginning"),C=!1,L=T-188),w=this.pmtParsed=!0;break;case 17:case 8191:break;default:C=!0}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});o.pesData=p,a.pesData=x,d.pesData=S;var _={audioTrack:a,avcTrack:o,id3Track:d,textTrack:this._txtTrack};return n&&this.extractRemainingSamples(_),_},e.flush=function(){var t,e=this.remainderData;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t},e.extractRemainingSamples=function(t){var e,i=t.audioTrack,r=t.avcTrack,n=t.id3Track,s=r.pesData,o=i.pesData,a=n.pesData;s&&(e=v(s))?(this.parseAVCPES(e,!0),r.pesData=null):r.pesData=s,o&&(e=v(o))?(i.isAAC?this.parseAACPES(e):this.parseMPEGPES(e),i.pesData=null):(null!=o&&o.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),i.pesData=o),a&&(e=v(a))?(this.parseID3PES(e),n.pesData=null):n.pesData=a},e.demuxSampleAes=function(t,e,i){var r=this.demux(t,i,!0,!this.config.progressive),n=this.sampleAes=new a.default(this.observer,this.config,e);return this.decrypt(r,n)},e.decrypt=function(t,e){return new Promise((function(i){var r=t.audioTrack,n=t.avcTrack;r.samples&&r.isAAC?e.decryptAacSamples(r.samples,0,(function(){n.samples?e.decryptAvcSamples(n.samples,0,0,(function(){i(t)})):i(t)})):n.samples&&e.decryptAvcSamples(n.samples,0,0,(function(){i(t)}))}))},e.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},e.parseAVCPES=function(t,e){var i,r=this,n=this._avcTrack,a=this.parseAVCNALu(t.data),l=this.avcSample,c=!1;t.data=null,l&&a.length&&!n.audFound&&(y(l,n),l=this.avcSample=p(!1,t.pts,t.dts,"")),a.forEach((function(e){switch(e.type){case 1:i=!0,l||(l=r.avcSample=p(!0,t.pts,t.dts,"")),l.frame=!0;var a=e.data;if(c&&a.length>4){var u=new s.default(a).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(l.key=!0)}break;case 5:i=!0,l||(l=r.avcSample=p(!0,t.pts,t.dts,"")),l.key=!0,l.frame=!0;break;case 6:i=!0;var h=new s.default(x(e.data));h.readUByte();for(var d=0,f=0,g=!1,m=0;!g&&h.bytesAvailable>1;){d=0;do{d+=m=h.readUByte()}while(255===m);f=0;do{f+=m=h.readUByte()}while(255===m);if(4===d&&0!==h.bytesAvailable){if(g=!0,181===h.readUByte()&&49===h.readUShort()&&1195456820===h.readUInt()&&3===h.readUByte()){for(var v=h.readUByte(),S=31&v,C=[v,h.readUByte()],w=0;w16){for(var k=[],E=0;E<16;E++)k.push(h.readUByte().toString(16)),3!==E&&5!==E&&7!==E&&9!==E||k.push("-");for(var T=f-16,L=new Uint8Array(T),A=0;A=0){var h={data:t.subarray(c,l-s-1),type:u};a.push(h)}else{var d=this.getLastNalUnit();if(d&&(o&&l<=4-o&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-o)),(i=l-s-1)>0)){var f=new Uint8Array(d.data.byteLength+i);f.set(d.data,0),f.set(t.subarray(0,i),d.data.byteLength),d.data=f,d.state=0}}l=0&&s>=0){var p={data:t.subarray(c,r),type:u,state:s};a.push(p)}if(0===a.length){var g=this.getLastNalUnit();if(g){var m=new Uint8Array(g.data.byteLength+t.byteLength);m.set(g.data,0),m.set(t,g.data.byteLength),g.data=m}}return n.naluState=s,a},e.parseAACPES=function(t){var e,i,n,s,o,a=0,c=this._audioTrack,d=this.aacOverFlow,f=t.data;if(d){this.aacOverFlow=null;var p=d.sample.unit.byteLength,g=Math.min(d.missing,p),m=p-g;d.sample.unit.set(f.subarray(0,g),m),c.samples.push(d.sample),a=d.missing}for(e=a,i=f.length;e1;){var l=new Uint8Array(a[0].length+a[1].length);l.set(a[0]),l.set(a[1],a[0].length),a[0]=l,a.splice(1,1)}if(1===((e=a[0])[0]<<16)+(e[1]<<8)+e[2]){if((i=(e[4]<<8)+e[5])&&i>t.size-6)return null;var c=e[7];192&c&&(n=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&c?n-(s=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(u.logger.warn(Math.round((n-s)/9e4)+"s delta between PTS and DTS, align them"),n=s):s=n);var h=(r=e[8])+9;if(t.size<=h)return null;t.size-=h;for(var d=new Uint8Array(t.size),f=0,p=a.length;fg){h-=g;continue}e=e.subarray(h),g-=h,h=0}d.set(e,o),o+=g}return i&&(i-=r+3),{data:d,pts:n,dts:s,len:i}}return null}function y(t,e){if(t.units.length&&t.frame){if(void 0===t.pts){var i=e.samples,r=i.length;if(!r)return void e.dropped++;var n=i[r-1];t.pts=n.pts,t.dts=n.dts}e.samples.push(t)}t.debug.length&&u.logger.log(t.pts+"/"+t.dts+":"+t.debug)}function b(t,e){var i=t.length;if(i>0){if(e.pts>=t[i-1].pts)t.push(e);else for(var r=i-1;r>=0;r--)if(e.ptse)return i;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,e=this.autoLevelCapping;return-1===e&&t&&t.length?t.length-1:e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(t){this.config.lowLatencyMode=t}},{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}}])&&v(e.prototype,r),y&&v(e,y),t}();y.defaultConfig=void 0},"./src/is-supported.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return y}));var r=i(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),n=i(/*! ./loader/playlist-loader */"./src/loader/playlist-loader.ts"),s=i(/*! ./loader/key-loader */"./src/loader/key-loader.ts"),o=i(/*! ./controller/id3-track-controller */"./src/controller/id3-track-controller.ts"),a=i(/*! ./controller/latency-controller */"./src/controller/latency-controller.ts"),l=i(/*! ./controller/level-controller */"./src/controller/level-controller.ts"),c=i(/*! ./controller/fragment-tracker */"./src/controller/fragment-tracker.ts"),u=i(/*! ./controller/stream-controller */"./src/controller/stream-controller.ts"),h=i(/*! ./is-supported */"./src/is-supported.ts"),d=i(/*! ./utils/logger */"./src/utils/logger.ts"),f=i(/*! ./config */"./src/config.ts"),p=i(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),g=i(/*! ./events */"./src/events.ts"),m=i(/*! ./errors */"./src/errors.ts");function v(t,e){for(var i=0;ie)return r;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,e=this.autoLevelCapping;return-1===e&&t&&t.length?t.length-1:e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(t){this.config.lowLatencyMode=t}},{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}}])&&v(e.prototype,i),y&&v(e,y),t}();y.defaultConfig=void 0},"./src/is-supported.ts": /*!*****************************!*\ !*** ./src/is-supported.ts ***! \*****************************/ -/*! exports provided: isSupported, changeTypeSupported */function(t,e,r){"use strict";r.r(e),r.d(e,"isSupported",(function(){return s})),r.d(e,"changeTypeSupported",(function(){return o}));var i=r(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function n(){return self.SourceBuffer||self.WebKitSourceBuffer}function s(){var t=Object(i.getMediaSource)();if(!t)return!1;var e=n(),r=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),s=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!r&&!!s}function o(){var t,e=n();return"function"==typeof(null==e||null===(t=e.prototype)||void 0===t?void 0:t.changeType)}},"./src/loader/fragment-loader.ts": +/*! exports provided: isSupported, changeTypeSupported */function(t,e,i){"use strict";i.r(e),i.d(e,"isSupported",(function(){return s})),i.d(e,"changeTypeSupported",(function(){return o}));var r=i(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function n(){return self.SourceBuffer||self.WebKitSourceBuffer}function s(){var t=Object(r.getMediaSource)();if(!t)return!1;var e=n(),i=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),s=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!i&&!!s}function o(){var t,e=n();return"function"==typeof(null==e||null===(t=e.prototype)||void 0===t?void 0:t.changeType)}},"./src/loader/fragment-loader.ts": /*!***************************************!*\ !*** ./src/loader/fragment-loader.ts ***! \***************************************/ -/*! exports provided: default, LoadError */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return h})),r.d(e,"LoadError",(function(){return f}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../errors */"./src/errors.ts");function s(t){var e="function"==typeof Map?new Map:void 0;return(s=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return o(t,arguments,c(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),l(i,t)})(t)}function o(t,e,r){return(o=a()?Reflect.construct:function(t,e,r){var i=[null];i.push.apply(i,e);var n=new(Function.bind.apply(t,i));return r&&l(n,r.prototype),n}).apply(null,arguments)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var u=Math.pow(2,17),h=function(){function t(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}var e=t.prototype;return e.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},e.abort=function(){this.loader&&this.loader.abort()},e.load=function(t,e){var r=this,i=t.url;if(!i)return Promise.reject(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(i?"part list":"url")));this.abort();var s=this.config,o=s.fLoader,a=s.loader;return new Promise((function(i,l){r.loader&&r.loader.destroy();var c=r.loader=t.loader=o?new o(s):new a(s),h=d(t),p={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=c.stats,c.load(h,p,{onSuccess:function(e,n,s,o){r.resetLoader(t,c),i({frag:t,part:null,payload:e.data,networkDetails:o})},onError:function(e,i,s){r.resetLoader(t,c),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:e,networkDetails:s}))},onAbort:function(e,i,s){r.resetLoader(t,c),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:s}))},onTimeout:function(e,i,s){r.resetLoader(t,c),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:s}))},onProgress:function(r,i,n,s){e&&e({frag:t,part:null,payload:n,networkDetails:s})}})}))},e.loadPart=function(t,e,r){var i=this;this.abort();var s=this.config,o=s.fLoader,a=s.loader;return new Promise((function(l,c){i.loader&&i.loader.destroy();var h=i.loader=t.loader=o?new o(s):new a(s),p=d(t,e),g={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=h.stats,h.load(p,g,{onSuccess:function(n,s,o,a){i.resetLoader(t,h),i.updateStatsFromPart(t,e);var c={frag:t,part:e,payload:n.data,networkDetails:a};r(c),l(c)},onError:function(r,s,o){i.resetLoader(t,h),c(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:e,response:r,networkDetails:o}))},onAbort:function(r,s,o){t.stats.aborted=e.stats.aborted,i.resetLoader(t,h),c(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:e,networkDetails:o}))},onTimeout:function(r,s,o){i.resetLoader(t,h),c(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:e,networkDetails:o}))}})}))},e.updateStatsFromPart=function(t,e){var r=t.stats,i=e.stats,n=i.total;if(r.loaded+=i.loaded,n){var s=Math.round(t.duration/e.duration),o=Math.min(Math.round(r.loaded/n),s),a=(s-o)*Math.round(r.loaded/o);r.total=r.loaded+a}else r.total=Math.max(r.loaded,r.total);var l=r.loading,c=i.loading;l.start?l.first+=c.first-c.start:(l.start=c.start,l.first=c.first),l.end=c.end},e.resetLoader=function(t,e){t.loader=null,this.loader===e&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),e.destroy()},t}();function d(t,e){void 0===e&&(e=null);var r=e||t,n={frag:t,part:e,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},s=r.byteRangeStartOffset,o=r.byteRangeEndOffset;return Object(i.isFiniteNumber)(s)&&Object(i.isFiniteNumber)(o)&&(n.rangeStart=s,n.rangeEnd=o),n}var f=function(t){var e,r;function i(e){for(var r,i=arguments.length,n=new Array(i>1?i-1:0),s=1;s1?r-1:0),s=1;s>8*(15-r)&255;return e},r.setDecryptDataFromLevelKey=function(t,e){var r=t;return"AES-128"===(null==t?void 0:t.method)&&t.uri&&!t.iv&&((r=a.LevelKey.fromURI(t.uri)).method=t.method,r.iv=this.createInitializationVector(e),r.keyFormat="identity"),r},r.setElementaryStreamInfo=function(t,e,r,i,n,s){void 0===s&&(s=!1);var o=this.elementaryStreams,a=o[t];a?(a.startPTS=Math.min(a.startPTS,e),a.endPTS=Math.max(a.endPTS,r),a.startDTS=Math.min(a.startDTS,i),a.endDTS=Math.max(a.endDTS,n)):o[t]={startPTS:e,endPTS:r,startDTS:i,endDTS:n,partial:s}},r.clearElementaryStreamInfo=function(){var t=this.elementaryStreams;t[i.AUDIO]=null,t[i.VIDEO]=null,t[i.AUDIOVIDEO]=null},d(e,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var t=this.sn;"number"!=typeof t&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&o.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),t=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,t)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(n.isFiniteNumber)(this.programDateTime))return null;var t=Object(n.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){var t;return!(null===(t=this.decryptdata)||void 0===t||!t.keyFormat||!this.decryptdata.uri)}}]),e}(f),g=function(t){function e(e,r,i,n,s){var o;(o=t.call(this,i)||this).fragOffset=0,o.duration=0,o.gap=!1,o.independent=!1,o.relurl=void 0,o.fragment=void 0,o.index=void 0,o.stats=new l.LoadStats,o.duration=e.decimalFloatingPoint("DURATION"),o.gap=e.bool("GAP"),o.independent=e.bool("INDEPENDENT"),o.relurl=e.enumeratedString("URI"),o.fragment=r,o.index=n;var a=e.enumeratedString("BYTERANGE");return a&&o.setByteRange(a,s),s&&(o.fragOffset=s.fragOffset+s.duration),o}return c(e,t),d(e,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var t=this.elementaryStreams;return!!(t.audio||t.video||t.audiovideo)}}]),e}(f)},"./src/loader/key-loader.ts": +/*! exports provided: ElementaryStreamTypes, BaseSegment, Fragment, Part */function(t,e,i){"use strict";i.r(e),i.d(e,"ElementaryStreamTypes",(function(){return r})),i.d(e,"BaseSegment",(function(){return f})),i.d(e,"Fragment",(function(){return p})),i.d(e,"Part",(function(){return g}));var r,n=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),s=i(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),o=i(/*! ../utils/logger */"./src/utils/logger.ts"),a=i(/*! ./level-key */"./src/loader/level-key.ts"),l=i(/*! ./load-stats */"./src/loader/load-stats.ts");function c(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t,e){for(var i=0;i>8*(15-i)&255;return e},i.setDecryptDataFromLevelKey=function(t,e){var i=t;return"AES-128"===(null==t?void 0:t.method)&&t.uri&&!t.iv&&((i=a.LevelKey.fromURI(t.uri)).method=t.method,i.iv=this.createInitializationVector(e),i.keyFormat="identity"),i},i.setElementaryStreamInfo=function(t,e,i,r,n,s){void 0===s&&(s=!1);var o=this.elementaryStreams,a=o[t];a?(a.startPTS=Math.min(a.startPTS,e),a.endPTS=Math.max(a.endPTS,i),a.startDTS=Math.min(a.startDTS,r),a.endDTS=Math.max(a.endDTS,n)):o[t]={startPTS:e,endPTS:i,startDTS:r,endDTS:n,partial:s}},i.clearElementaryStreamInfo=function(){var t=this.elementaryStreams;t[r.AUDIO]=null,t[r.VIDEO]=null,t[r.AUDIOVIDEO]=null},d(e,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var t=this.sn;"number"!=typeof t&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&o.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),t=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,t)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(n.isFiniteNumber)(this.programDateTime))return null;var t=Object(n.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){var t;return!(null===(t=this.decryptdata)||void 0===t||!t.keyFormat||!this.decryptdata.uri)}}]),e}(f),g=function(t){function e(e,i,r,n,s){var o;(o=t.call(this,r)||this).fragOffset=0,o.duration=0,o.gap=!1,o.independent=!1,o.relurl=void 0,o.fragment=void 0,o.index=void 0,o.stats=new l.LoadStats,o.duration=e.decimalFloatingPoint("DURATION"),o.gap=e.bool("GAP"),o.independent=e.bool("INDEPENDENT"),o.relurl=e.enumeratedString("URI"),o.fragment=i,o.index=n;var a=e.enumeratedString("BYTERANGE");return a&&o.setByteRange(a,s),s&&(o.fragOffset=s.fragOffset+s.duration),o}return c(e,t),d(e,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var t=this.elementaryStreams;return!!(t.audio||t.video||t.audiovideo)}}]),e}(f)},"./src/loader/key-loader.ts": /*!**********************************!*\ !*** ./src/loader/key-loader.ts ***! \**********************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return o}));var i=r(/*! ../events */"./src/events.ts"),n=r(/*! ../errors */"./src/errors.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=function(){function t(t){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){this.hls.on(i.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(i.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){for(var t in this._unregisterListeners(),this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={}},e.onKeyLoading=function(t,e){var r=e.frag,n=r.type,o=this.loaders[n];if(r.decryptdata){var a=r.decryptdata.uri;if(a!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(o&&(s.logger.warn("abort previous key loader for type:"+n),o.abort()),!a)return void s.logger.warn("key uri is falsy");var c=l.loader,u=r.loader=this.loaders[n]=new c(l);this.decrypturl=a,this.decryptkey=null;var h={url:a,frag:r,responseType:"arraybuffer"},d={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(h,d,f)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(i.Events.KEY_LOADED,{frag:r}))}else s.logger.warn("Missing decryption data on fragment in onKeyLoading")},e.loadsuccess=function(t,e,r){var n=r.frag;n.decryptdata?(this.decryptkey=n.decryptdata.key=new Uint8Array(t.data),n.loader=null,delete this.loaders[n.type],this.hls.trigger(i.Events.KEY_LOADED,{frag:n})):s.logger.error("after key load, decryptdata unset")},e.loaderror=function(t,e){var r=e.frag,s=r.loader;s&&s.abort(),delete this.loaders[r.type],this.hls.trigger(i.Events.ERROR,{type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},e.loadtimeout=function(t,e){var r=e.frag,s=r.loader;s&&s.abort(),delete this.loaders[r.type],this.hls.trigger(i.Events.ERROR,{type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},t}()},"./src/loader/level-details.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return o}));var r=i(/*! ../events */"./src/events.ts"),n=i(/*! ../errors */"./src/errors.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts"),o=function(){function t(t){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){this.hls.on(r.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(r.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){for(var t in this._unregisterListeners(),this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={}},e.onKeyLoading=function(t,e){var i=e.frag,n=i.type,o=this.loaders[n];if(i.decryptdata){var a=i.decryptdata.uri;if(a!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(o&&(s.logger.warn("abort previous key loader for type:"+n),o.abort()),!a)return void s.logger.warn("key uri is falsy");var c=l.loader,u=i.loader=this.loaders[n]=new c(l);this.decrypturl=a,this.decryptkey=null;var h={url:a,frag:i,responseType:"arraybuffer"},d={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(h,d,f)}else this.decryptkey&&(i.decryptdata.key=this.decryptkey,this.hls.trigger(r.Events.KEY_LOADED,{frag:i}))}else s.logger.warn("Missing decryption data on fragment in onKeyLoading")},e.loadsuccess=function(t,e,i){var n=i.frag;n.decryptdata?(this.decryptkey=n.decryptdata.key=new Uint8Array(t.data),n.loader=null,delete this.loaders[n.type],this.hls.trigger(r.Events.KEY_LOADED,{frag:n})):s.logger.error("after key load, decryptdata unset")},e.loaderror=function(t,e){var i=e.frag,s=i.loader;s&&s.abort(),delete this.loaders[i.type],this.hls.trigger(r.Events.ERROR,{type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:i,response:t})},e.loadtimeout=function(t,e){var i=e.frag,s=i.loader;s&&s.abort(),delete this.loaders[i.type],this.hls.trigger(r.Events.ERROR,{type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:i})},t}()},"./src/loader/level-details.ts": /*!*************************************!*\ !*** ./src/loader/level-details.ts ***! \*************************************/ -/*! exports provided: LevelDetails */function(t,e,r){"use strict";r.r(e),r.d(e,"LevelDetails",(function(){return s}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function n(t,e){for(var r=0;rt.endSN||e>0||0===e&&r>0,this.updated||this.advanced?this.misses=Math.floor(.6*t.misses):this.misses=t.misses+1,this.availabilityDelay=t.availabilityDelay},e=t,(r=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(i.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var t=this.driftEndTime-this.driftStartTime;return t>0?1e3*(this.driftEnd-this.driftStart)/t:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var t;return null!==(t=this.fragments)&&void 0!==t&&t.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 t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&n(e.prototype,r),s&&n(e,s),t}()},"./src/loader/level-key.ts": +/*! exports provided: LevelDetails */function(t,e,i){"use strict";i.r(e),i.d(e,"LevelDetails",(function(){return s}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function n(t,e){for(var i=0;it.endSN||e>0||0===e&&i>0,this.updated||this.advanced?this.misses=Math.floor(.6*t.misses):this.misses=t.misses+1,this.availabilityDelay=t.availabilityDelay},e=t,(i=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(r.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var t=this.driftEndTime-this.driftStartTime;return t>0?1e3*(this.driftEnd-this.driftStart)/t:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var t;return null!==(t=this.fragments)&&void 0!==t&&t.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 t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&n(e.prototype,i),s&&n(e,s),t}()},"./src/loader/level-key.ts": /*!*********************************!*\ !*** ./src/loader/level-key.ts ***! \*********************************/ -/*! exports provided: LevelKey */function(t,e,r){"use strict";r.r(e),r.d(e,"LevelKey",(function(){return s}));var i=r(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js");function n(t,e){for(var r=0;r2){var r=e.shift()+".";return r+=parseInt(e.shift()).toString(16),r+=("000"+parseInt(e.shift()).toString(16)).substr(-4)}return t},t.resolve=function(t,e){return n.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,r){var i,n=[],s={},o=!1;for(h.lastIndex=0;null!=(i=h.exec(e));)if(i[1]){var a=new l.AttrList(i[1]),c={attrs:a,bitrate:a.decimalInteger("AVERAGE-BANDWIDTH")||a.decimalInteger("BANDWIDTH"),name:a.NAME,url:t.resolve(i[2],r)},u=a.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((a.CODECS||"").split(/[ ,]+/).filter((function(t){return t})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=t.convertAVC1ToAVCOTI(c.videoCodec)),n.push(c)}else if(i[3]){var d=new l.AttrList(i[3]);d["DATA-ID"]&&(o=!0,s[d["DATA-ID"]]=d)}return{levels:n,sessionData:o?s:null}},t.parseMasterPlaylistMedia=function(e,r,i,n){var s;void 0===n&&(n=[]);var o=[],a=0;for(d.lastIndex=0;null!==(s=d.exec(e));){var c=new l.AttrList(s[1]);if(c.TYPE===i){var u={attrs:c,bitrate:0,id:a++,groupId:c["GROUP-ID"],instreamId:c["INSTREAM-ID"],name:c.NAME||c.LANGUAGE||"",type:i,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:c.LANGUAGE,url:c.URI?t.resolve(c.URI,r):""};if(n.length){var h=t.findGroup(n,u.groupId)||n[0];y(u,h,"audioCodec"),y(u,h,"textCodec")}o.push(u)}}return o},t.parseLevelPlaylist=function(t,e,r,u,h){var d,m,v,y=new o.LevelDetails(e),x=y.fragments,S=null,C=0,w=0,k=0,E=0,T=null,L=new s.Fragment(u,e),A=-1,D=!1;for(f.lastIndex=0,y.m3u8=t;null!==(d=f.exec(t));){D&&(D=!1,(L=new s.Fragment(u,e)).start=k,L.sn=C,L.cc=E,L.level=r,S&&(L.initSegment=S,L.rawProgramDateTime=S.rawProgramDateTime));var R=d[1];if(R){L.duration=parseFloat(R);var O=(" "+d[2]).slice(1);L.title=O||null,L.tagList.push(O?["INF",R,O]:["INF",R])}else if(d[3])Object(i.isFiniteNumber)(L.duration)&&(L.start=k,v&&(L.levelkey=v),L.sn=C,L.level=r,L.cc=E,L.urlId=h,x.push(L),L.relurl=(" "+d[3]).slice(1),b(L,T),T=L,k+=L.duration,C++,w=0,D=!0);else if(d[4]){var _=(" "+d[4]).slice(1);T?L.setByteRange(_,T):L.setByteRange(_)}else if(d[5])L.rawProgramDateTime=(" "+d[5]).slice(1),L.tagList.push(["PROGRAM-DATE-TIME",L.rawProgramDateTime]),-1===A&&(A=x.length);else{if(!(d=d[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(m=1;m-1){c.logger.warn("Keyformat "+q+" is not supported from the manifest");continue}if("identity"!==q)continue;G&&(v=a.LevelKey.fromURL(e,z),z&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(G)>=0&&(v.method=G,v.keyFormat=q,K&&(v.keyID=K),V&&(v.keyFormatVersions=V),v.iv=W));break;case"START":var Y=new l.AttrList(M).decimalFloatingPoint("TIME-OFFSET");Object(i.isFiniteNumber)(Y)&&(y.startTimeOffset=Y);break;case"MAP":var X=new l.AttrList(M);L.relurl=X.URI,X.BYTERANGE&&L.setByteRange(X.BYTERANGE),L.level=r,L.sn="initSegment",v&&(L.levelkey=v),L.initSegment=null,S=L,D=!0;break;case"SERVER-CONTROL":var $=new l.AttrList(M);y.canBlockReload=$.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=$.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&$.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=$.optionalFloat("PART-HOLD-BACK",0),y.holdBack=$.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var Z=new l.AttrList(M);y.partTarget=Z.decimalFloatingPoint("PART-TARGET");break;case"PART":var Q=y.partList;Q||(Q=y.partList=[]);var J=w>0?Q[Q.length-1]:void 0,tt=w++,et=new s.Part(new l.AttrList(M),L,e,tt,J);Q.push(et),L.duration+=et.duration;break;case"PRELOAD-HINT":var rt=new l.AttrList(M);y.preloadHint=rt;break;case"RENDITION-REPORT":var it=new l.AttrList(M);y.renditionReports=y.renditionReports||[],y.renditionReports.push(it);break;default:c.logger.warn("line parsed but not handled: "+d)}}}T&&!T.relurl?(x.pop(),k-=T.duration,y.partList&&(y.fragmentHint=T)):y.partList&&(b(L,T),L.cc=E,y.fragmentHint=L);var nt=x.length,st=x[0],ot=x[nt-1];if((k+=y.skippedSegments*y.targetduration)>0&&nt&&ot){y.averagetargetduration=k/nt;var at=ot.sn;y.endSN="initSegment"!==at?at:0,st&&(y.startCC=st.cc,st.initSegment||y.fragments.every((function(t){return t.relurl&&(e=t.relurl,g.test(null!=(r=null===(i=n.parseURL(e))||void 0===i?void 0:i.path)?r:""));var e,r,i}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(L=new s.Fragment(u,e)).relurl=ot.relurl,L.level=r,L.sn="initSegment",st.initSegment=L,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(k+=y.fragmentHint.duration),y.totalduration=k,y.endCC=E,A>0&&function(t,e){for(var r=t[e],i=e;i--;){var n=t[i];if(!n)return;n.programDateTime=r.programDateTime-1e3*n.duration,r=n}}(x,A),y},t}();function v(t,e){["video","audio","text"].forEach((function(r){var i=t.filter((function(t){return Object(u.isCodecType)(t,r)}));if(i.length){var n=i.filter((function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)}));e[r+"Codec"]=n.length>0?n[0]:i[0],t=t.filter((function(t){return-1===i.indexOf(t)}))}})),e.unknownCodecs=t}function y(t,e,r){var i=e[r];i&&(t[r]=i)}function b(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):null!=e&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime),Object(i.isFiniteNumber)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return m}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),s=i(/*! ./fragment */"./src/loader/fragment.ts"),o=i(/*! ./level-details */"./src/loader/level-details.ts"),a=i(/*! ./level-key */"./src/loader/level-key.ts"),l=i(/*! ../utils/attr-list */"./src/utils/attr-list.ts"),c=i(/*! ../utils/logger */"./src/utils/logger.ts"),u=i(/*! ../utils/codecs */"./src/utils/codecs.ts"),h=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,d=/#EXT-X-MEDIA:(.*)/g,f=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),p=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("|")),g=/\.(mp4|m4s|m4v|m4a)$/i,m=function(){function t(){}return t.findGroup=function(t,e){for(var i=0;i2){var i=e.shift()+".";return i+=parseInt(e.shift()).toString(16),i+=("000"+parseInt(e.shift()).toString(16)).substr(-4)}return t},t.resolve=function(t,e){return n.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,i){var r,n=[],s={},o=!1;for(h.lastIndex=0;null!=(r=h.exec(e));)if(r[1]){var a=new l.AttrList(r[1]),c={attrs:a,bitrate:a.decimalInteger("AVERAGE-BANDWIDTH")||a.decimalInteger("BANDWIDTH"),name:a.NAME,url:t.resolve(r[2],i)},u=a.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((a.CODECS||"").split(/[ ,]+/).filter((function(t){return t})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=t.convertAVC1ToAVCOTI(c.videoCodec)),n.push(c)}else if(r[3]){var d=new l.AttrList(r[3]);d["DATA-ID"]&&(o=!0,s[d["DATA-ID"]]=d)}return{levels:n,sessionData:o?s:null}},t.parseMasterPlaylistMedia=function(e,i,r,n){var s;void 0===n&&(n=[]);var o=[],a=0;for(d.lastIndex=0;null!==(s=d.exec(e));){var c=new l.AttrList(s[1]);if(c.TYPE===r){var u={attrs:c,bitrate:0,id:a++,groupId:c["GROUP-ID"],instreamId:c["INSTREAM-ID"],name:c.NAME||c.LANGUAGE||"",type:r,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:c.LANGUAGE,url:c.URI?t.resolve(c.URI,i):""};if(n.length){var h=t.findGroup(n,u.groupId)||n[0];y(u,h,"audioCodec"),y(u,h,"textCodec")}o.push(u)}}return o},t.parseLevelPlaylist=function(t,e,i,u,h){var d,m,v,y=new o.LevelDetails(e),x=y.fragments,S=null,C=0,w=0,k=0,E=0,T=null,L=new s.Fragment(u,e),A=-1,D=!1;for(f.lastIndex=0,y.m3u8=t;null!==(d=f.exec(t));){D&&(D=!1,(L=new s.Fragment(u,e)).start=k,L.sn=C,L.cc=E,L.level=i,S&&(L.initSegment=S,L.rawProgramDateTime=S.rawProgramDateTime));var R=d[1];if(R){L.duration=parseFloat(R);var O=(" "+d[2]).slice(1);L.title=O||null,L.tagList.push(O?["INF",R,O]:["INF",R])}else if(d[3])Object(r.isFiniteNumber)(L.duration)&&(L.start=k,v&&(L.levelkey=v),L.sn=C,L.level=i,L.cc=E,L.urlId=h,x.push(L),L.relurl=(" "+d[3]).slice(1),b(L,T),T=L,k+=L.duration,C++,w=0,D=!0);else if(d[4]){var _=(" "+d[4]).slice(1);T?L.setByteRange(_,T):L.setByteRange(_)}else if(d[5])L.rawProgramDateTime=(" "+d[5]).slice(1),L.tagList.push(["PROGRAM-DATE-TIME",L.rawProgramDateTime]),-1===A&&(A=x.length);else{if(!(d=d[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(m=1;m-1){c.logger.warn("Keyformat "+q+" is not supported from the manifest");continue}if("identity"!==q)continue;G&&(v=a.LevelKey.fromURL(e,z),z&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(G)>=0&&(v.method=G,v.keyFormat=q,K&&(v.keyID=K),V&&(v.keyFormatVersions=V),v.iv=W));break;case"START":var Y=new l.AttrList(M).decimalFloatingPoint("TIME-OFFSET");Object(r.isFiniteNumber)(Y)&&(y.startTimeOffset=Y);break;case"MAP":var X=new l.AttrList(M);L.relurl=X.URI,X.BYTERANGE&&L.setByteRange(X.BYTERANGE),L.level=i,L.sn="initSegment",v&&(L.levelkey=v),L.initSegment=null,S=L,D=!0;break;case"SERVER-CONTROL":var $=new l.AttrList(M);y.canBlockReload=$.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=$.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&$.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=$.optionalFloat("PART-HOLD-BACK",0),y.holdBack=$.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var Z=new l.AttrList(M);y.partTarget=Z.decimalFloatingPoint("PART-TARGET");break;case"PART":var Q=y.partList;Q||(Q=y.partList=[]);var J=w>0?Q[Q.length-1]:void 0,tt=w++,et=new s.Part(new l.AttrList(M),L,e,tt,J);Q.push(et),L.duration+=et.duration;break;case"PRELOAD-HINT":var it=new l.AttrList(M);y.preloadHint=it;break;case"RENDITION-REPORT":var rt=new l.AttrList(M);y.renditionReports=y.renditionReports||[],y.renditionReports.push(rt);break;default:c.logger.warn("line parsed but not handled: "+d)}}}T&&!T.relurl?(x.pop(),k-=T.duration,y.partList&&(y.fragmentHint=T)):y.partList&&(b(L,T),L.cc=E,y.fragmentHint=L);var nt=x.length,st=x[0],ot=x[nt-1];if((k+=y.skippedSegments*y.targetduration)>0&&nt&&ot){y.averagetargetduration=k/nt;var at=ot.sn;y.endSN="initSegment"!==at?at:0,st&&(y.startCC=st.cc,st.initSegment||y.fragments.every((function(t){return t.relurl&&(e=t.relurl,g.test(null!=(i=null===(r=n.parseURL(e))||void 0===r?void 0:r.path)?i:""));var e,i,r}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(L=new s.Fragment(u,e)).relurl=ot.relurl,L.level=i,L.sn="initSegment",st.initSegment=L,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(k+=y.fragmentHint.duration),y.totalduration=k,y.endCC=E,A>0&&function(t,e){for(var i=t[e],r=e;r--;){var n=t[r];if(!n)return;n.programDateTime=i.programDateTime-1e3*n.duration,i=n}}(x,A),y},t}();function v(t,e){["video","audio","text"].forEach((function(i){var r=t.filter((function(t){return Object(u.isCodecType)(t,i)}));if(r.length){var n=r.filter((function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)}));e[i+"Codec"]=n.length>0?n[0]:r[0],t=t.filter((function(t){return-1===r.indexOf(t)}))}})),e.unknownCodecs=t}function y(t,e,i){var r=e[i];r&&(t[i]=r)}function b(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):null!=e&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime),Object(r.isFiniteNumber)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts": /*!***************************************!*\ !*** ./src/loader/playlist-loader.ts ***! \***************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../events */"./src/events.ts"),s=r(/*! ../errors */"./src/errors.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts"),a=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=r(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=r(/*! ../types/loader */"./src/types/loader.ts"),u=r(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function h(t,e){var r=t.url;return void 0!==r&&0!==r.indexOf("data:")||(r=e.url),r}var d=function(){function t(t){this.hls=void 0,this.loaders=Object.create(null),this.hls=t,this.registerListeners()}var e=t.prototype;return e.registerListeners=function(){var t=this.hls;t.on(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(n.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(n.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.unregisterListeners=function(){var t=this.hls;t.off(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(n.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(n.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.createInternalLoader=function(t){var e=this.hls.config,r=e.pLoader,i=e.loader,n=new(r||i)(e);return t.loader=n,this.loaders[t.type]=n,n},e.getInternalLoader=function(t){return this.loaders[t.type]},e.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},e.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},e.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},e.onManifestLoading=function(t,e){var r=e.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:r,deliveryDirectives:null})},e.onLevelLoading=function(t,e){var r=e.id,i=e.level,n=e.url,s=e.deliveryDirectives;this.load({id:r,groupId:null,level:i,responseType:"text",type:c.PlaylistContextType.LEVEL,url:n,deliveryDirectives:s})},e.onAudioTrackLoading=function(t,e){var r=e.id,i=e.groupId,n=e.url,s=e.deliveryDirectives;this.load({id:r,groupId:i,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:n,deliveryDirectives:s})},e.onSubtitleTrackLoading=function(t,e){var r=e.id,i=e.groupId,n=e.url,s=e.deliveryDirectives;this.load({id:r,groupId:i,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:n,deliveryDirectives:s})},e.load=function(t){var e,r,i,n,s,a,l=this.hls.config,u=this.getInternalLoader(t);if(u){var h=u.context;if(h&&h.url===t.url)return void o.logger.trace("[playlist-loader]: playlist request ongoing");o.logger.log("[playlist-loader]: aborting previous loader for type: "+t.type),u.abort()}switch(t.type){case c.PlaylistContextType.MANIFEST:r=l.manifestLoadingMaxRetry,i=l.manifestLoadingTimeOut,n=l.manifestLoadingRetryDelay,s=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:r=0,i=l.levelLoadingTimeOut;break;default:r=l.levelLoadingMaxRetry,i=l.levelLoadingTimeOut,n=l.levelLoadingRetryDelay,s=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(t),null!==(e=t.deliveryDirectives)&&void 0!==e&&e.part&&(t.type===c.PlaylistContextType.LEVEL&&null!==t.level?a=this.hls.levels[t.level].details:t.type===c.PlaylistContextType.AUDIO_TRACK&&null!==t.id?a=this.hls.audioTracks[t.id].details:t.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==t.id&&(a=this.hls.subtitleTracks[t.id].details),a)){var d=a.partTarget,f=a.targetduration;d&&f&&(i=Math.min(1e3*Math.max(3*d,.8*f),i))}var p={timeout:i,maxRetry:r,retryDelay:n,maxRetryDelay:s,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(t,p,g)},e.loadsuccess=function(t,e,r,i){if(void 0===i&&(i=null),r.isSidxRequest)return this.handleSidxRequest(t,r),void this.handlePlaylistLoaded(t,e,r,i);this.resetInternalLoader(r.type);var n=t.data;0===n.indexOf("#EXTM3U")?(e.parsing.start=performance.now(),n.indexOf("#EXTINF:")>0||n.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(t,e,r,i):this.handleMasterPlaylist(t,e,r,i)):this.handleManifestParsingError(t,r,"no EXTM3U delimiter",i)},e.loaderror=function(t,e,r){void 0===r&&(r=null),this.handleNetworkError(e,r,!1,t)},e.loadtimeout=function(t,e,r){void 0===r&&(r=null),this.handleNetworkError(e,r,!0)},e.handleMasterPlaylist=function(t,e,r,i){var s=this.hls,a=t.data,c=h(t,r),d=l.default.parseMasterPlaylist(a,c),f=d.levels,p=d.sessionData;if(f.length){var g=f.map((function(t){return{id:t.attrs.AUDIO,audioCodec:t.audioCodec}})),m=f.map((function(t){return{id:t.attrs.SUBTITLES,textCodec:t.textCodec}})),v=l.default.parseMasterPlaylistMedia(a,c,"AUDIO",g),y=l.default.parseMasterPlaylistMedia(a,c,"SUBTITLES",m),b=l.default.parseMasterPlaylistMedia(a,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(t){return!t.url}))||!f[0].audioCodec||f[0].attrs.AUDIO||(o.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),v.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new u.AttrList({}),bitrate:0,url:""}))),s.trigger(n.Events.MANIFEST_LOADED,{levels:f,audioTracks:v,subtitles:y,captions:b,url:c,stats:e,networkDetails:i,sessionData:p})}else this.handleManifestParsingError(t,r,"no level found in manifest",i)},e.handleTrackOrLevelPlaylist=function(t,e,r,o){var a=this.hls,d=r.id,f=r.level,p=r.type,g=h(t,r),m=Object(i.isFiniteNumber)(d)?d:0,v=Object(i.isFiniteNumber)(f)?f:m,y=function(t){switch(t.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(r),b=l.default.parseLevelPlaylist(t.data,g,v,y,m);if(b.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var x={attrs:new u.AttrList({}),bitrate:0,details:b,name:"",url:g};a.trigger(n.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:g,stats:e,networkDetails:o,sessionData:null})}if(e.parsing.end=performance.now(),b.needSidxRanges){var S,C=null===(S=b.fragments[0].initSegment)||void 0===S?void 0:S.url;this.load({url:C,isSidxRequest:!0,type:p,level:f,levelDetails:b,id:d,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else r.levelDetails=b,this.handlePlaylistLoaded(t,e,r,o)}else a.trigger(n.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:"number"==typeof r.level?r.level:void 0})},e.handleSidxRequest=function(t,e){var r=Object(a.parseSegmentIndex)(new Uint8Array(t.data));if(r){var i=r.references,n=e.levelDetails;i.forEach((function(t,e){var i=t.info,s=n.fragments[e];0===s.byteRange.length&&s.setByteRange(String(1+i.end-i.start)+"@"+String(i.start)),s.initSegment&&s.initSegment.setByteRange(String(r.moovEndOffset)+"@0")}))}},e.handleManifestParsingError=function(t,e,r,i){this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:e.type===c.PlaylistContextType.MANIFEST,url:t.url,reason:r,response:t,context:e,networkDetails:i})},e.handleNetworkError=function(t,e,r,i){void 0===r&&(r=!1),o.logger.warn("[playlist-loader]: A network "+(r?"timeout":"error")+" occurred while loading "+t.type+" level: "+t.level+" id: "+t.id+' group-id: "'+t.groupId+'"');var a=s.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(t);switch(t.type){case c.PlaylistContextType.MANIFEST:a=r?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:a=r?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:a=r?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:a=r?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(t.type);var h={type:s.ErrorTypes.NETWORK_ERROR,details:a,fatal:l,url:t.url,loader:u,context:t,networkDetails:e};i&&(h.response=i),this.hls.trigger(n.Events.ERROR,h)},e.handlePlaylistLoaded=function(t,e,r,i){var s=r.type,o=r.level,a=r.id,l=r.groupId,u=r.loader,h=r.levelDetails,d=r.deliveryDirectives;if(null!=h&&h.targetduration){if(u)switch(h.live&&(u.getCacheAge&&(h.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(h.ageHeader)||(h.ageHeader=0)),s){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(n.Events.LEVEL_LOADED,{details:h,level:o||0,id:a||0,stats:e,networkDetails:i,deliveryDirectives:d});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(n.Events.AUDIO_TRACK_LOADED,{details:h,id:a||0,groupId:l||"",stats:e,networkDetails:i,deliveryDirectives:d});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(n.Events.SUBTITLE_TRACK_LOADED,{details:h,id:a||0,groupId:l||"",stats:e,networkDetails:i,deliveryDirectives:d})}}else this.handleManifestParsingError(t,r,"invalid target duration",i)},t}();e.default=d},"./src/polyfills/number.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../events */"./src/events.ts"),s=i(/*! ../errors */"./src/errors.ts"),o=i(/*! ../utils/logger */"./src/utils/logger.ts"),a=i(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=i(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=i(/*! ../types/loader */"./src/types/loader.ts"),u=i(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function h(t,e){var i=t.url;return void 0!==i&&0!==i.indexOf("data:")||(i=e.url),i}var d=function(){function t(t){this.hls=void 0,this.loaders=Object.create(null),this.hls=t,this.registerListeners()}var e=t.prototype;return e.registerListeners=function(){var t=this.hls;t.on(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(n.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(n.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.unregisterListeners=function(){var t=this.hls;t.off(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(n.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(n.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.createInternalLoader=function(t){var e=this.hls.config,i=e.pLoader,r=e.loader,n=new(i||r)(e);return t.loader=n,this.loaders[t.type]=n,n},e.getInternalLoader=function(t){return this.loaders[t.type]},e.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},e.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},e.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},e.onManifestLoading=function(t,e){var i=e.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:i,deliveryDirectives:null})},e.onLevelLoading=function(t,e){var i=e.id,r=e.level,n=e.url,s=e.deliveryDirectives;this.load({id:i,groupId:null,level:r,responseType:"text",type:c.PlaylistContextType.LEVEL,url:n,deliveryDirectives:s})},e.onAudioTrackLoading=function(t,e){var i=e.id,r=e.groupId,n=e.url,s=e.deliveryDirectives;this.load({id:i,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:n,deliveryDirectives:s})},e.onSubtitleTrackLoading=function(t,e){var i=e.id,r=e.groupId,n=e.url,s=e.deliveryDirectives;this.load({id:i,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:n,deliveryDirectives:s})},e.load=function(t){var e,i,r,n,s,a,l=this.hls.config,u=this.getInternalLoader(t);if(u){var h=u.context;if(h&&h.url===t.url)return void o.logger.trace("[playlist-loader]: playlist request ongoing");o.logger.log("[playlist-loader]: aborting previous loader for type: "+t.type),u.abort()}switch(t.type){case c.PlaylistContextType.MANIFEST:i=l.manifestLoadingMaxRetry,r=l.manifestLoadingTimeOut,n=l.manifestLoadingRetryDelay,s=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:i=0,r=l.levelLoadingTimeOut;break;default:i=l.levelLoadingMaxRetry,r=l.levelLoadingTimeOut,n=l.levelLoadingRetryDelay,s=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(t),null!==(e=t.deliveryDirectives)&&void 0!==e&&e.part&&(t.type===c.PlaylistContextType.LEVEL&&null!==t.level?a=this.hls.levels[t.level].details:t.type===c.PlaylistContextType.AUDIO_TRACK&&null!==t.id?a=this.hls.audioTracks[t.id].details:t.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==t.id&&(a=this.hls.subtitleTracks[t.id].details),a)){var d=a.partTarget,f=a.targetduration;d&&f&&(r=Math.min(1e3*Math.max(3*d,.8*f),r))}var p={timeout:r,maxRetry:i,retryDelay:n,maxRetryDelay:s,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(t,p,g)},e.loadsuccess=function(t,e,i,r){if(void 0===r&&(r=null),i.isSidxRequest)return this.handleSidxRequest(t,i),void this.handlePlaylistLoaded(t,e,i,r);this.resetInternalLoader(i.type);var n=t.data;0===n.indexOf("#EXTM3U")?(e.parsing.start=performance.now(),n.indexOf("#EXTINF:")>0||n.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(t,e,i,r):this.handleMasterPlaylist(t,e,i,r)):this.handleManifestParsingError(t,i,"no EXTM3U delimiter",r)},e.loaderror=function(t,e,i){void 0===i&&(i=null),this.handleNetworkError(e,i,!1,t)},e.loadtimeout=function(t,e,i){void 0===i&&(i=null),this.handleNetworkError(e,i,!0)},e.handleMasterPlaylist=function(t,e,i,r){var s=this.hls,a=t.data,c=h(t,i),d=l.default.parseMasterPlaylist(a,c),f=d.levels,p=d.sessionData;if(f.length){var g=f.map((function(t){return{id:t.attrs.AUDIO,audioCodec:t.audioCodec}})),m=f.map((function(t){return{id:t.attrs.SUBTITLES,textCodec:t.textCodec}})),v=l.default.parseMasterPlaylistMedia(a,c,"AUDIO",g),y=l.default.parseMasterPlaylistMedia(a,c,"SUBTITLES",m),b=l.default.parseMasterPlaylistMedia(a,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(t){return!t.url}))||!f[0].audioCodec||f[0].attrs.AUDIO||(o.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),v.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new u.AttrList({}),bitrate:0,url:""}))),s.trigger(n.Events.MANIFEST_LOADED,{levels:f,audioTracks:v,subtitles:y,captions:b,url:c,stats:e,networkDetails:r,sessionData:p})}else this.handleManifestParsingError(t,i,"no level found in manifest",r)},e.handleTrackOrLevelPlaylist=function(t,e,i,o){var a=this.hls,d=i.id,f=i.level,p=i.type,g=h(t,i),m=Object(r.isFiniteNumber)(d)?d:0,v=Object(r.isFiniteNumber)(f)?f:m,y=function(t){switch(t.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(i),b=l.default.parseLevelPlaylist(t.data,g,v,y,m);if(b.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var x={attrs:new u.AttrList({}),bitrate:0,details:b,name:"",url:g};a.trigger(n.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:g,stats:e,networkDetails:o,sessionData:null})}if(e.parsing.end=performance.now(),b.needSidxRanges){var S,C=null===(S=b.fragments[0].initSegment)||void 0===S?void 0:S.url;this.load({url:C,isSidxRequest:!0,type:p,level:f,levelDetails:b,id:d,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else i.levelDetails=b,this.handlePlaylistLoaded(t,e,i,o)}else a.trigger(n.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:"number"==typeof i.level?i.level:void 0})},e.handleSidxRequest=function(t,e){var i=Object(a.parseSegmentIndex)(new Uint8Array(t.data));if(i){var r=i.references,n=e.levelDetails;r.forEach((function(t,e){var r=t.info,s=n.fragments[e];0===s.byteRange.length&&s.setByteRange(String(1+r.end-r.start)+"@"+String(r.start)),s.initSegment&&s.initSegment.setByteRange(String(i.moovEndOffset)+"@0")}))}},e.handleManifestParsingError=function(t,e,i,r){this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:e.type===c.PlaylistContextType.MANIFEST,url:t.url,reason:i,response:t,context:e,networkDetails:r})},e.handleNetworkError=function(t,e,i,r){void 0===i&&(i=!1),o.logger.warn("[playlist-loader]: A network "+(i?"timeout":"error")+" occurred while loading "+t.type+" level: "+t.level+" id: "+t.id+' group-id: "'+t.groupId+'"');var a=s.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(t);switch(t.type){case c.PlaylistContextType.MANIFEST:a=i?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:a=i?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:a=i?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:a=i?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(t.type);var h={type:s.ErrorTypes.NETWORK_ERROR,details:a,fatal:l,url:t.url,loader:u,context:t,networkDetails:e};r&&(h.response=r),this.hls.trigger(n.Events.ERROR,h)},e.handlePlaylistLoaded=function(t,e,i,r){var s=i.type,o=i.level,a=i.id,l=i.groupId,u=i.loader,h=i.levelDetails,d=i.deliveryDirectives;if(null!=h&&h.targetduration){if(u)switch(h.live&&(u.getCacheAge&&(h.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(h.ageHeader)||(h.ageHeader=0)),s){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(n.Events.LEVEL_LOADED,{details:h,level:o||0,id:a||0,stats:e,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(n.Events.AUDIO_TRACK_LOADED,{details:h,id:a||0,groupId:l||"",stats:e,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(n.Events.SUBTITLE_TRACK_LOADED,{details:h,id:a||0,groupId:l||"",stats:e,networkDetails:r,deliveryDirectives:d})}}else this.handleManifestParsingError(t,i,"invalid target duration",r)},t}();e.default=d},"./src/polyfills/number.ts": /*!*********************************!*\ !*** ./src/polyfills/number.ts ***! \*********************************/ -/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(t,e,r){"use strict";r.r(e),r.d(e,"isFiniteNumber",(function(){return i})),r.d(e,"MAX_SAFE_INTEGER",(function(){return n}));var i=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},n=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts": +/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(t,e,i){"use strict";i.r(e),i.d(e,"isFiniteNumber",(function(){return r})),i.d(e,"MAX_SAFE_INTEGER",(function(){return n}));var r=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},n=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts": /*!*********************************!*\ !*** ./src/remux/aac-helper.ts ***! \*********************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=function(){function t(){}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)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(6===e)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(1===e)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(2===e)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(3===e)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])}},t}();e.default=i},"./src/remux/mp4-generator.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=function(){function t(){}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)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(6===e)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(1===e)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(2===e)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(3===e)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])}},t}();e.default=r},"./src/remux/mp4-generator.ts": /*!************************************!*\ !*** ./src/remux/mp4-generator.ts ***! \************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=Math.pow(2,32)-1,n=function(){function t(){}return t.init=function(){var e;for(e in t.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:[]},t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var r=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]),i=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]);t.HDLR_TYPES={video:r,audio:i};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),s=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=s,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,o,l,o,a),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,n))},t.box=function(t){for(var e=8,r=arguments.length,i=new Array(r>1?r-1:0),n=1;n>24&255,a[1]=e>>16&255,a[2]=e>>8&255,a[3]=255&e,a.set(t,4),s=0,e=8;s>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,s>>24,s>>16&255,s>>8&255,255&s,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,r,i){return t.box(t.types.moof,t.mfhd(e),t.traf(i,r))},t.moov=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trak(e[r]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(t.mvex(e)))},t.mvex=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trex(e[r]);return t.box.apply(null,[t.types.mvex].concat(i))},t.mvhd=function(e,r){r*=e;var n=Math.floor(r/(i+1)),s=Math.floor(r%(i+1)),o=new Uint8Array([1,0,0,0,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,255&e,n>>24,n>>16&255,n>>8&255,255&n,s>>24,s>>16&255,s>>8&255,255&s,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 t.box(t.types.mvhd,o)},t.sdtp=function(e){var r,i,n=e.samples||[],s=new Uint8Array(4+n.length);for(r=0;r>>8&255),s.push(255&n),s=s.concat(Array.prototype.slice.call(i));for(r=0;r>>8&255),o.push(255&n),o=o.concat(Array.prototype.slice.call(i));var a=t.box(t.types.avcC,new Uint8Array([1,s[3],s[4],s[5],255,224|e.sps.length].concat(s).concat([e.pps.length]).concat(o))),l=e.width,c=e.height,u=e.pixelRatio[0],h=e.pixelRatio[1];return t.box(t.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,l>>8&255,255&l,c>>8&255,255&c,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]),a,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,h>>24,h>>16&255,h>>8&255,255&h])))},t.esds=function(t){var e=t.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(t.config).concat([6,1,2]))},t.mp4a=function(e){var r=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var r=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var r=e.id,n=e.duration*e.timescale,s=e.width,o=e.height,a=Math.floor(n/(i+1)),l=Math.floor(n%(i+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,l>>24,l>>16&255,l>>8&255,255&l,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,s>>8&255,255&s,0,0,o>>8&255,255&o,0,0]))},t.traf=function(e,r){var n=t.sdtp(e),s=e.id,o=Math.floor(r/(i+1)),a=Math.floor(r%(i+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,a>>24,a>>16&255,a>>8&255,255&a])),t.trun(e,n.length+16+20+8+16+8+8),n)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var r=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,r){var i,n,s,o,a,l,c=e.samples||[],u=c.length,h=12+16*u,d=new Uint8Array(h);for(r+=8+h,d.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),i=0;i>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,61440&a.degradPrio,15&a.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return t.box(t.types.trun,d)},t.initSegment=function(e){t.types||t.init();var r=t.moov(e),i=new Uint8Array(t.FTYP.byteLength+r.byteLength);return i.set(t.FTYP),i.set(r,t.FTYP.byteLength),i},t}();n.types=void 0,n.HDLR_TYPES=void 0,n.STTS=void 0,n.STSC=void 0,n.STCO=void 0,n.STSZ=void 0,n.VMHD=void 0,n.SMHD=void 0,n.STSD=void 0,n.FTYP=void 0,n.DINF=void 0,e.default=n},"./src/remux/mp4-remuxer.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=Math.pow(2,32)-1,n=function(){function t(){}return t.init=function(){var e;for(e in t.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:[]},t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var i=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:i,audio:r};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),s=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=s,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,o,l,o,a),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,n))},t.box=function(t){for(var e=8,i=arguments.length,r=new Array(i>1?i-1:0),n=1;n>24&255,a[1]=e>>16&255,a[2]=e>>8&255,a[3]=255&e,a.set(t,4),s=0,e=8;s>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,s>>24,s>>16&255,s>>8&255,255&s,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,i,r){return t.box(t.types.moof,t.mfhd(e),t.traf(r,i))},t.moov=function(e){for(var i=e.length,r=[];i--;)r[i]=t.trak(e[i]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(r).concat(t.mvex(e)))},t.mvex=function(e){for(var i=e.length,r=[];i--;)r[i]=t.trex(e[i]);return t.box.apply(null,[t.types.mvex].concat(r))},t.mvhd=function(e,i){i*=e;var n=Math.floor(i/(r+1)),s=Math.floor(i%(r+1)),o=new Uint8Array([1,0,0,0,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,255&e,n>>24,n>>16&255,n>>8&255,255&n,s>>24,s>>16&255,s>>8&255,255&s,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 t.box(t.types.mvhd,o)},t.sdtp=function(e){var i,r,n=e.samples||[],s=new Uint8Array(4+n.length);for(i=0;i>>8&255),s.push(255&n),s=s.concat(Array.prototype.slice.call(r));for(i=0;i>>8&255),o.push(255&n),o=o.concat(Array.prototype.slice.call(r));var a=t.box(t.types.avcC,new Uint8Array([1,s[3],s[4],s[5],255,224|e.sps.length].concat(s).concat([e.pps.length]).concat(o))),l=e.width,c=e.height,u=e.pixelRatio[0],h=e.pixelRatio[1];return t.box(t.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,l>>8&255,255&l,c>>8&255,255&c,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]),a,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,h>>24,h>>16&255,h>>8&255,255&h])))},t.esds=function(t){var e=t.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(t.config).concat([6,1,2]))},t.mp4a=function(e){var i=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,i>>8&255,255&i,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var i=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,i>>8&255,255&i,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var i=e.id,n=e.duration*e.timescale,s=e.width,o=e.height,a=Math.floor(n/(r+1)),l=Math.floor(n%(r+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,i>>24&255,i>>16&255,i>>8&255,255&i,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,l>>24,l>>16&255,l>>8&255,255&l,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,s>>8&255,255&s,0,0,o>>8&255,255&o,0,0]))},t.traf=function(e,i){var n=t.sdtp(e),s=e.id,o=Math.floor(i/(r+1)),a=Math.floor(i%(r+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,a>>24,a>>16&255,a>>8&255,255&a])),t.trun(e,n.length+16+20+8+16+8+8),n)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var i=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,i){var r,n,s,o,a,l,c=e.samples||[],u=c.length,h=12+16*u,d=new Uint8Array(h);for(i+=8+h,d.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,i>>>24&255,i>>>16&255,i>>>8&255,255&i],0),r=0;r>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,61440&a.degradPrio,15&a.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return t.box(t.types.trun,d)},t.initSegment=function(e){t.types||t.init();var i=t.moov(e),r=new Uint8Array(t.FTYP.byteLength+i.byteLength);return r.set(t.FTYP),r.set(i,t.FTYP.byteLength),r},t}();n.types=void 0,n.HDLR_TYPES=void 0,n.STTS=void 0,n.STSC=void 0,n.STCO=void 0,n.STSZ=void 0,n.VMHD=void 0,n.SMHD=void 0,n.STSD=void 0,n.FTYP=void 0,n.DINF=void 0,e.default=n},"./src/remux/mp4-remuxer.ts": /*!**********************************!*\ !*** ./src/remux/mp4-remuxer.ts ***! \**********************************/ -/*! exports provided: default, normalizePts */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return g})),r.d(e,"normalizePts",(function(){return m}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ./aac-helper */"./src/remux/aac-helper.ts"),s=r(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),o=r(/*! ../events */"./src/events.ts"),a=r(/*! ../errors */"./src/errors.ts"),l=r(/*! ../utils/logger */"./src/utils/logger.ts"),c=r(/*! ../types/loader */"./src/types/loader.ts"),u=r(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function h(){return(h=Object.assign||function(t){for(var e=1;e0?t:r.pts}),t[0].pts);return e&&l.logger.debug("PTS rollover detected"),r},e.remux=function(t,e,r,i,n,s,o,a){var u,h,d,f,p,g,v=n,y=n,b=t.pid>-1,x=e.pid>-1,S=e.samples.length,C=t.samples.length>0,w=S>1;if((!b||C)&&(!x||w)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(t,e,n));var k=this.isVideoContiguous,E=-1;if(w&&(E=function(t){for(var e=0;e0){l.logger.warn("[mp4-remuxer]: Dropped "+E+" out of "+S+" video samples due to a missing keyframe");var T=this.getVideoStartPts(e.samples);e.samples=e.samples.slice(E),e.dropped+=E,y+=(e.samples[0].pts-T)/(e.timescale||9e4)}else-1===E&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+S+" video samples"),g=!1);if(this.ISGenerated){if(C&&w){var L=this.getVideoStartPts(e.samples),A=(m(t.samples[0].pts,L)-L)/e.inputTimeScale;v+=Math.max(0,A),y+=Math.max(0,-A)}if(C){if(t.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(t,e,n)),h=this.remuxAudio(t,v,this.isAudioContiguous,s,x||w||a===c.PlaylistLevelType.AUDIO?y:void 0),w){var D=h?h.endPTS-h.startPTS:0;e.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(t,e,n)),u=this.remuxVideo(e,y,k,D)}}else w&&(u=this.remuxVideo(e,y,k,0));u&&(u.firstKeyFrame=E,u.independent=-1!==E)}}return this.ISGenerated&&(r.samples.length&&(p=this.remuxID3(r,n)),i.samples.length&&(f=this.remuxText(i,n))),{audio:h,video:u,initSegment:d,independent:g,text:f,id3:p}},e.generateIS=function(t,e,r){var n,o,a,l=t.samples,c=e.samples,u=this.typeSupported,h={},d=!Object(i.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(n=o=1/0),t.config&&l.length&&(t.timescale=t.samplerate,t.isAAC||(u.mpeg?(f="audio/mpeg",t.codec=""):u.mp3&&(t.codec="mp3")),h.audio={id:"audio",container:f,codec:t.codec,initSegment:!t.isAAC&&u.mpeg?new Uint8Array(0):s.default.initSegment([t]),metadata:{channelCount:t.channelCount}},d&&(a=t.inputTimeScale,n=o=l[0].pts-Math.round(a*r))),e.sps&&e.pps&&c.length&&(e.timescale=e.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:e.codec,initSegment:s.default.initSegment([e]),metadata:{width:e.width,height:e.height}},d)){a=e.inputTimeScale;var p=this.getVideoStartPts(c),g=Math.round(a*r);o=Math.min(o,m(c[0].dts,p)-g),n=Math.min(n,p-g)}if(Object.keys(h).length)return this.ISGenerated=!0,d&&(this._initPTS=n,this._initDTS=o),{tracks:h,initPTS:n,timescale:a}},e.remuxVideo=function(t,e,r,i){var n,c,f,g=t.inputTimeScale,y=t.samples,b=[],x=y.length,S=this._initPTS,C=this.nextAvcDts,w=8,k=Number.POSITIVE_INFINITY,E=Number.NEGATIVE_INFINITY,T=0,L=!1;r&&null!==C||(C=e*g-(y[0].pts-m(y[0].dts,y[0].pts)));for(var A=0;AD.pts&&(T=Math.max(Math.min(T,D.pts-D.dts),-18e3)),D.dts0?A-1:A].dts&&(L=!0)}L&&y.sort((function(t,e){var r=t.dts-e.dts,i=t.pts-e.pts;return r||i})),c=y[0].dts,f=y[y.length-1].dts;var R=Math.round((f-c)/(x-1));if(T<0){if(T<-2*R){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-R,!0)+" ms");for(var O=T,_=0;_R;if(P||M<-1){P?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(M,!0)+" ms ("+M+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-M,!0)+" ms ("+M+"dts) overlapping between fragments detected"),c=C;var N=y[0].pts-M;y[0].dts=c,y[0].pts=N,l.logger.log("Video: First PTS/DTS adjusted: "+Object(u.toMsFromMpegTsClock)(N,!0)+"/"+Object(u.toMsFromMpegTsClock)(c,!0)+", delta: "+Object(u.toMsFromMpegTsClock)(M,!0)+" ms")}}p&&(c=Math.max(0,c));for(var F=0,B=0,j=0;j0?Y-1:Y].dts;if(it.stretchShortVideoTrack&&null!==this.nextAudioPts){var st=Math.floor(it.maxBufferHole*g),ot=(i?k+i*g:this.nextAudioPts)-X.pts;ot>st?((n=ot-nt)<0&&(n=nt),l.logger.log("[mp4-remuxer]: It is approximately "+ot/90+" ms to the next segment; using duration "+n/90+" ms for the last video frame.")):n=nt}else n=nt}var at=Math.round(X.pts-X.dts);b.push(new v(X.key,n,Z,at))}if(b.length&&d&&d<70){var lt=b[0].flags;lt.dependsOn=2,lt.isNonSync=0}console.assert(void 0!==n,"mp4SampleDuration must be computed"),this.nextAvcDts=C=f+n,this.isVideoContiguous=!0;var ct={data1:s.default.moof(t.sequenceNumber++,c,h({},t,{samples:b})),data2:V,startPTS:k/g,endPTS:(E+n)/g,startDTS:c/g,endDTS:C/g,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:t.dropped};return t.samples=[],t.dropped=0,console.assert(V.length,"MDAT length must not be zero"),ct},e.remuxAudio=function(t,e,r,i,c){var u=t.inputTimeScale,d=u/(t.samplerate?t.samplerate:u),f=t.isAAC?1024:1152,p=f*d,g=this._initPTS,y=!t.isAAC&&this.typeSupported.mpeg,b=[],x=t.samples,S=y?0:8,C=this.nextAudioPts||-1,w=e*u;if(this.isAudioContiguous=r=r||x.length&&C>0&&(i&&Math.abs(w-C)<9e3||Math.abs(m(x[0].pts-g,w)-C)<20*p),x.forEach((function(t){t.pts=m(t.pts-g,w)})),!r||C<0){if(!(x=x.filter((function(t){return t.pts>=0}))).length)return;C=0===c?0:i?Math.max(0,w):x[0].pts}if(t.isAAC)for(var k=void 0!==c,E=this.config.maxAudioFramesDrift,T=0,L=C;T=E*p&&O<1e4&&k){var _=Math.round(R/p);(L=D-_*p)<0&&(_--,L+=p),0===T&&(this.nextAudioPts=C=L),l.logger.warn("[mp4-remuxer]: Injecting "+_+" audio frame @ "+(L/u).toFixed(3)+"s due to "+Math.round(1e3*R/u)+" ms gap.");for(var I=0;I<_;I++){var M=Math.max(L,0),P=n.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);P||(l.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),P=A.unit.subarray()),x.splice(T,0,{unit:P,pts:M}),L+=p,T++}}A.pts=L,L+=p}for(var N,F=null,B=null,j=0,U=x.length;U--;)j+=x[U].unit.byteLength;for(var H=0,G=x.length;H0))return;j+=S;try{N=new Uint8Array(j)}catch(t){return void this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:a.ErrorTypes.MUX_ERROR,details:a.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:j,reason:"fail allocating audio mdat "+j})}y||(new DataView(N.buffer).setUint32(0,j),N.set(s.default.types.mdat,4))}N.set(W,S);var K=W.byteLength;S+=K,b.push(new v(!0,f,K,0)),B=V}var q=b.length;if(q){var Y=b[b.length-1];this.nextAudioPts=C=B+d*Y.duration;var X=y?new Uint8Array(0):s.default.moof(t.sequenceNumber++,F/d,h({},t,{samples:b}));t.samples=[];var $=F/u,Z=C/u,Q={data1:X,data2:N,startPTS:$,endPTS:Z,startDTS:$,endDTS:Z,type:"audio",hasAudio:!0,hasVideo:!1,nb:q};return this.isAudioContiguous=!0,console.assert(N.length,"MDAT length must not be zero"),Q}},e.remuxEmptyAudio=function(t,e,r,i){var s=t.inputTimeScale,o=s/(t.samplerate?t.samplerate:s),a=this.nextAudioPts,c=(null!==a?a:i.startDTS*s)+this._initDTS,u=i.endDTS*s+this._initDTS,h=1024*o,d=Math.ceil((u-c)/h),f=n.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var p=[],g=0;g4294967296;)t+=r;return t}var v=function(t,e,r,i){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=e,this.size=r,this.cts=i,this.flags=new y(t)},y=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": +/*! exports provided: default, normalizePts */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return g})),i.d(e,"normalizePts",(function(){return m}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ./aac-helper */"./src/remux/aac-helper.ts"),s=i(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),o=i(/*! ../events */"./src/events.ts"),a=i(/*! ../errors */"./src/errors.ts"),l=i(/*! ../utils/logger */"./src/utils/logger.ts"),c=i(/*! ../types/loader */"./src/types/loader.ts"),u=i(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function h(){return(h=Object.assign||function(t){for(var e=1;e0?t:i.pts}),t[0].pts);return e&&l.logger.debug("PTS rollover detected"),i},e.remux=function(t,e,i,r,n,s,o,a){var u,h,d,f,p,g,v=n,y=n,b=t.pid>-1,x=e.pid>-1,S=e.samples.length,C=t.samples.length>0,w=S>1;if((!b||C)&&(!x||w)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(t,e,n));var k=this.isVideoContiguous,E=-1;if(w&&(E=function(t){for(var e=0;e0){l.logger.warn("[mp4-remuxer]: Dropped "+E+" out of "+S+" video samples due to a missing keyframe");var T=this.getVideoStartPts(e.samples);e.samples=e.samples.slice(E),e.dropped+=E,y+=(e.samples[0].pts-T)/(e.timescale||9e4)}else-1===E&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+S+" video samples"),g=!1);if(this.ISGenerated){if(C&&w){var L=this.getVideoStartPts(e.samples),A=(m(t.samples[0].pts,L)-L)/e.inputTimeScale;v+=Math.max(0,A),y+=Math.max(0,-A)}if(C){if(t.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(t,e,n)),h=this.remuxAudio(t,v,this.isAudioContiguous,s,x||w||a===c.PlaylistLevelType.AUDIO?y:void 0),w){var D=h?h.endPTS-h.startPTS:0;e.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(t,e,n)),u=this.remuxVideo(e,y,k,D)}}else w&&(u=this.remuxVideo(e,y,k,0));u&&(u.firstKeyFrame=E,u.independent=-1!==E)}}return this.ISGenerated&&(i.samples.length&&(p=this.remuxID3(i,n)),r.samples.length&&(f=this.remuxText(r,n))),{audio:h,video:u,initSegment:d,independent:g,text:f,id3:p}},e.generateIS=function(t,e,i){var n,o,a,l=t.samples,c=e.samples,u=this.typeSupported,h={},d=!Object(r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(n=o=1/0),t.config&&l.length&&(t.timescale=t.samplerate,t.isAAC||(u.mpeg?(f="audio/mpeg",t.codec=""):u.mp3&&(t.codec="mp3")),h.audio={id:"audio",container:f,codec:t.codec,initSegment:!t.isAAC&&u.mpeg?new Uint8Array(0):s.default.initSegment([t]),metadata:{channelCount:t.channelCount}},d&&(a=t.inputTimeScale,n=o=l[0].pts-Math.round(a*i))),e.sps&&e.pps&&c.length&&(e.timescale=e.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:e.codec,initSegment:s.default.initSegment([e]),metadata:{width:e.width,height:e.height}},d)){a=e.inputTimeScale;var p=this.getVideoStartPts(c),g=Math.round(a*i);o=Math.min(o,m(c[0].dts,p)-g),n=Math.min(n,p-g)}if(Object.keys(h).length)return this.ISGenerated=!0,d&&(this._initPTS=n,this._initDTS=o),{tracks:h,initPTS:n,timescale:a}},e.remuxVideo=function(t,e,i,r){var n,c,f,g=t.inputTimeScale,y=t.samples,b=[],x=y.length,S=this._initPTS,C=this.nextAvcDts,w=8,k=Number.POSITIVE_INFINITY,E=Number.NEGATIVE_INFINITY,T=0,L=!1;i&&null!==C||(C=e*g-(y[0].pts-m(y[0].dts,y[0].pts)));for(var A=0;AD.pts&&(T=Math.max(Math.min(T,D.pts-D.dts),-18e3)),D.dts0?A-1:A].dts&&(L=!0)}L&&y.sort((function(t,e){var i=t.dts-e.dts,r=t.pts-e.pts;return i||r})),c=y[0].dts,f=y[y.length-1].dts;var R=Math.round((f-c)/(x-1));if(T<0){if(T<-2*R){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-R,!0)+" ms");for(var O=T,_=0;_R;if(P||M<-1){P?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(M,!0)+" ms ("+M+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-M,!0)+" ms ("+M+"dts) overlapping between fragments detected"),c=C;var N=y[0].pts-M;y[0].dts=c,y[0].pts=N,l.logger.log("Video: First PTS/DTS adjusted: "+Object(u.toMsFromMpegTsClock)(N,!0)+"/"+Object(u.toMsFromMpegTsClock)(c,!0)+", delta: "+Object(u.toMsFromMpegTsClock)(M,!0)+" ms")}}p&&(c=Math.max(0,c));for(var F=0,B=0,j=0;j0?Y-1:Y].dts;if(rt.stretchShortVideoTrack&&null!==this.nextAudioPts){var st=Math.floor(rt.maxBufferHole*g),ot=(r?k+r*g:this.nextAudioPts)-X.pts;ot>st?((n=ot-nt)<0&&(n=nt),l.logger.log("[mp4-remuxer]: It is approximately "+ot/90+" ms to the next segment; using duration "+n/90+" ms for the last video frame.")):n=nt}else n=nt}var at=Math.round(X.pts-X.dts);b.push(new v(X.key,n,Z,at))}if(b.length&&d&&d<70){var lt=b[0].flags;lt.dependsOn=2,lt.isNonSync=0}console.assert(void 0!==n,"mp4SampleDuration must be computed"),this.nextAvcDts=C=f+n,this.isVideoContiguous=!0;var ct={data1:s.default.moof(t.sequenceNumber++,c,h({},t,{samples:b})),data2:V,startPTS:k/g,endPTS:(E+n)/g,startDTS:c/g,endDTS:C/g,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:t.dropped};return t.samples=[],t.dropped=0,console.assert(V.length,"MDAT length must not be zero"),ct},e.remuxAudio=function(t,e,i,r,c){var u=t.inputTimeScale,d=u/(t.samplerate?t.samplerate:u),f=t.isAAC?1024:1152,p=f*d,g=this._initPTS,y=!t.isAAC&&this.typeSupported.mpeg,b=[],x=t.samples,S=y?0:8,C=this.nextAudioPts||-1,w=e*u;if(this.isAudioContiguous=i=i||x.length&&C>0&&(r&&Math.abs(w-C)<9e3||Math.abs(m(x[0].pts-g,w)-C)<20*p),x.forEach((function(t){t.pts=m(t.pts-g,w)})),!i||C<0){if(!(x=x.filter((function(t){return t.pts>=0}))).length)return;C=0===c?0:r?Math.max(0,w):x[0].pts}if(t.isAAC)for(var k=void 0!==c,E=this.config.maxAudioFramesDrift,T=0,L=C;T=E*p&&O<1e4&&k){var _=Math.round(R/p);(L=D-_*p)<0&&(_--,L+=p),0===T&&(this.nextAudioPts=C=L),l.logger.warn("[mp4-remuxer]: Injecting "+_+" audio frame @ "+(L/u).toFixed(3)+"s due to "+Math.round(1e3*R/u)+" ms gap.");for(var I=0;I<_;I++){var M=Math.max(L,0),P=n.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);P||(l.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),P=A.unit.subarray()),x.splice(T,0,{unit:P,pts:M}),L+=p,T++}}A.pts=L,L+=p}for(var N,F=null,B=null,j=0,U=x.length;U--;)j+=x[U].unit.byteLength;for(var H=0,G=x.length;H0))return;j+=S;try{N=new Uint8Array(j)}catch(t){return void this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:a.ErrorTypes.MUX_ERROR,details:a.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:j,reason:"fail allocating audio mdat "+j})}y||(new DataView(N.buffer).setUint32(0,j),N.set(s.default.types.mdat,4))}N.set(W,S);var K=W.byteLength;S+=K,b.push(new v(!0,f,K,0)),B=V}var q=b.length;if(q){var Y=b[b.length-1];this.nextAudioPts=C=B+d*Y.duration;var X=y?new Uint8Array(0):s.default.moof(t.sequenceNumber++,F/d,h({},t,{samples:b}));t.samples=[];var $=F/u,Z=C/u,Q={data1:X,data2:N,startPTS:$,endPTS:Z,startDTS:$,endDTS:Z,type:"audio",hasAudio:!0,hasVideo:!1,nb:q};return this.isAudioContiguous=!0,console.assert(N.length,"MDAT length must not be zero"),Q}},e.remuxEmptyAudio=function(t,e,i,r){var s=t.inputTimeScale,o=s/(t.samplerate?t.samplerate:s),a=this.nextAudioPts,c=(null!==a?a:r.startDTS*s)+this._initDTS,u=r.endDTS*s+this._initDTS,h=1024*o,d=Math.ceil((u-c)/h),f=n.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var p=[],g=0;g4294967296;)t+=i;return t}var v=function(t,e,i,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=e,this.size=i,this.cts=r,this.flags=new y(t)},y=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": /*!******************************************!*\ !*** ./src/remux/passthrough-remuxer.ts ***! \******************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=r(/*! ../loader/fragment */"./src/loader/fragment.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts"),a=function(){function t(){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 e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){this.initPTS=t,this.lastEndDTS=null},e.resetNextTimestamp=function(){this.lastEndDTS=null},e.resetInitSegment=function(t,e,r){this.audioCodec=e,this.videoCodec=r,this.generateInitSegment(t),this.emitInitSegment=!0},e.generateInitSegment=function(t){var e=this.audioCodec,r=this.videoCodec;if(!t||!t.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var i=this.initData=Object(n.parseInitSegment)(t);e||(e=c(i.audio,s.ElementaryStreamTypes.AUDIO)),r||(r=c(i.video,s.ElementaryStreamTypes.VIDEO));var a={};i.audio&&i.video?a.audiovideo={container:"video/mp4",codec:e+","+r,initSegment:t,id:"main"}:i.audio?a.audio={container:"audio/mp4",codec:e,initSegment:t,id:"audio"}:i.video?a.video={container:"video/mp4",codec:r,initSegment:t,id:"main"}:o.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},e.remux=function(t,e,r,s,a){var c=this.initPTS,u=this.lastEndDTS,h={audio:void 0,video:void 0,text:s,id3:r,initSegment:void 0};Object(i.isFiniteNumber)(u)||(u=this.lastEndDTS=a||0);var d=e.samples;if(!d||!d.length)return h;var f={initPTS:void 0,timescale:1},p=this.initData;if(p&&p.length||(this.generateInitSegment(d),p=this.initData),!p||!p.length)return o.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),h;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1),Object(i.isFiniteNumber)(c)||(this.initPTS=f.initPTS=c=l(p,d,u));var g=Object(n.getDuration)(d,p),m=u,v=g+m;Object(n.offsetStartDTS)(p,d,c),g>0?this.lastEndDTS=v:(o.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!p.audio,b=!!p.video,x="";y&&(x+="audio"),b&&(x+="video");var S={data1:d,startPTS:m,startDTS:m,endPTS:v,endDTS:v,type:x,hasAudio:y,hasVideo:b,nb:1,dropped:0};return h.audio="audio"===S.type?S:void 0,h.video="audio"!==S.type?S:void 0,h.text=s,h.id3=r,h.initSegment=f,h},t}(),l=function(t,e,r){return Object(n.getStartDTS)(t,e)-r};function c(t,e){var r=null==t?void 0:t.codec;return r&&r.length>4?r:"hvc1"===r?"hvc1.1.c.L120.90":"av01"===r?"av01.0.04M.08":"avc1"===r||e===s.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}e.default=a},"./src/task-loop.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=i(/*! ../loader/fragment */"./src/loader/fragment.ts"),o=i(/*! ../utils/logger */"./src/utils/logger.ts"),a=function(){function t(){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 e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){this.initPTS=t,this.lastEndDTS=null},e.resetNextTimestamp=function(){this.lastEndDTS=null},e.resetInitSegment=function(t,e,i){this.audioCodec=e,this.videoCodec=i,this.generateInitSegment(t),this.emitInitSegment=!0},e.generateInitSegment=function(t){var e=this.audioCodec,i=this.videoCodec;if(!t||!t.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=Object(n.parseInitSegment)(t);e||(e=c(r.audio,s.ElementaryStreamTypes.AUDIO)),i||(i=c(r.video,s.ElementaryStreamTypes.VIDEO));var a={};r.audio&&r.video?a.audiovideo={container:"video/mp4",codec:e+","+i,initSegment:t,id:"main"}:r.audio?a.audio={container:"audio/mp4",codec:e,initSegment:t,id:"audio"}:r.video?a.video={container:"video/mp4",codec:i,initSegment:t,id:"main"}:o.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},e.remux=function(t,e,i,s,a){var c=this.initPTS,u=this.lastEndDTS,h={audio:void 0,video:void 0,text:s,id3:i,initSegment:void 0};Object(r.isFiniteNumber)(u)||(u=this.lastEndDTS=a||0);var d=e.samples;if(!d||!d.length)return h;var f={initPTS:void 0,timescale:1},p=this.initData;if(p&&p.length||(this.generateInitSegment(d),p=this.initData),!p||!p.length)return o.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),h;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1),Object(r.isFiniteNumber)(c)||(this.initPTS=f.initPTS=c=l(p,d,u));var g=Object(n.getDuration)(d,p),m=u,v=g+m;Object(n.offsetStartDTS)(p,d,c),g>0?this.lastEndDTS=v:(o.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!p.audio,b=!!p.video,x="";y&&(x+="audio"),b&&(x+="video");var S={data1:d,startPTS:m,startDTS:m,endPTS:v,endDTS:v,type:x,hasAudio:y,hasVideo:b,nb:1,dropped:0};return h.audio="audio"===S.type?S:void 0,h.video="audio"!==S.type?S:void 0,h.text=s,h.id3=i,h.initSegment=f,h},t}(),l=function(t,e,i){return Object(n.getStartDTS)(t,e)-i};function c(t,e){var i=null==t?void 0:t.codec;return i&&i.length>4?i:"hvc1"===i?"hvc1.1.c.L120.90":"av01"===i?"av01.0.04M.08":"avc1"===i||e===s.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}e.default=a},"./src/task-loop.ts": /*!**************************!*\ !*** ./src/task-loop.ts ***! \**************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return i}));var i=function(){function t(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var e=t.prototype;return e.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},e.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},e.onHandlerDestroyed=function(){},e.hasInterval=function(){return!!this._tickInterval},e.hasNextTick=function(){return!!this._tickTimer},e.setInterval=function(t){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,t),!0)},e.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},e.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},e.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},e.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},e.doTick=function(){},t}()},"./src/types/cmcd.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return r}));var r=function(){function t(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var e=t.prototype;return e.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},e.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},e.onHandlerDestroyed=function(){},e.hasInterval=function(){return!!this._tickInterval},e.hasNextTick=function(){return!!this._tickTimer},e.setInterval=function(t){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,t),!0)},e.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},e.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},e.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},e.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},e.doTick=function(){},t}()},"./src/types/cmcd.ts": /*!***************************!*\ !*** ./src/types/cmcd.ts ***! \***************************/ -/*! exports provided: CMCDVersion, CMCDObjectType, CMCDStreamingFormat, CMCDStreamType */function(t,e,r){"use strict";r.r(e),r.d(e,"CMCDVersion",(function(){return o})),r.d(e,"CMCDObjectType",(function(){return i})),r.d(e,"CMCDStreamingFormat",(function(){return n})),r.d(e,"CMCDStreamType",(function(){return s}));var i,n,s,o=1;!function(t){t.MANIFEST="m",t.AUDIO="a",t.VIDEO="v",t.MUXED="av",t.INIT="i",t.CAPTION="c",t.TIMED_TEXT="tt",t.KEY="k",t.OTHER="o"}(i||(i={})),function(t){t.DASH="d",t.HLS="h",t.SMOOTH="s",t.OTHER="o"}(n||(n={})),function(t){t.VOD="v",t.LIVE="l"}(s||(s={}))},"./src/types/level.ts": +/*! exports provided: CMCDVersion, CMCDObjectType, CMCDStreamingFormat, CMCDStreamType */function(t,e,i){"use strict";i.r(e),i.d(e,"CMCDVersion",(function(){return o})),i.d(e,"CMCDObjectType",(function(){return r})),i.d(e,"CMCDStreamingFormat",(function(){return n})),i.d(e,"CMCDStreamType",(function(){return s}));var r,n,s,o=1;!function(t){t.MANIFEST="m",t.AUDIO="a",t.VIDEO="v",t.MUXED="av",t.INIT="i",t.CAPTION="c",t.TIMED_TEXT="tt",t.KEY="k",t.OTHER="o"}(r||(r={})),function(t){t.DASH="d",t.HLS="h",t.SMOOTH="s",t.OTHER="o"}(n||(n={})),function(t){t.VOD="v",t.LIVE="l"}(s||(s={}))},"./src/types/level.ts": /*!****************************!*\ !*** ./src/types/level.ts ***! \****************************/ -/*! exports provided: HlsSkip, getSkipValue, HlsUrlParameters, Level */function(t,e,r){"use strict";function i(t,e){for(var r=0;rNumber.MAX_SAFE_INTEGER?1/0:e},e.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var r=new Uint8Array(e.length/2),i=0;iNumber.MAX_SAFE_INTEGER?1/0:e},e.decimalFloatingPoint=function(t){return parseFloat(this[t])},e.optionalFloat=function(t,e){var r=this[t];return r?parseFloat(r):e},e.enumeratedString=function(t){return this[t]},e.bool=function(t){return"YES"===this[t]},e.decimalResolution=function(t){var e=i.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,r={};for(n.lastIndex=0;null!==(e=n.exec(t));){var i=e[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),r[e[1]]=i}return r},t}()},"./src/utils/binary-search.ts": +/*! exports provided: AttrList */function(t,e,i){"use strict";i.r(e),i.d(e,"AttrList",(function(){return s}));var r=/^(\d+)x(\d+)$/,n=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,s=function(){function t(e){for(var i in"string"==typeof e&&(e=t.parseAttrList(e)),e)e.hasOwnProperty(i)&&(this[i]=e[i])}var e=t.prototype;return e.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},e.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var i=new Uint8Array(e.length/2),r=0;rNumber.MAX_SAFE_INTEGER?1/0:e},e.decimalFloatingPoint=function(t){return parseFloat(this[t])},e.optionalFloat=function(t,e){var i=this[t];return i?parseFloat(i):e},e.enumeratedString=function(t){return this[t]},e.bool=function(t){return"YES"===this[t]},e.decimalResolution=function(t){var e=r.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,i={};for(n.lastIndex=0;null!==(e=n.exec(t));){var r=e[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),i[e[1]]=r}return i},t}()},"./src/utils/binary-search.ts": /*!************************************!*\ !*** ./src/utils/binary-search.ts ***! \************************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),e.default={search:function(t,e){for(var r=0,i=t.length-1,n=null,s=null;r<=i;){var o=e(s=t[n=(r+i)/2|0]);if(o>0)r=n+1;else{if(!(o<0))return s;i=n-1}}return null}}},"./src/utils/buffer-helper.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),e.default={search:function(t,e){for(var i=0,r=t.length-1,n=null,s=null;i<=r;){var o=e(s=t[n=(i+r)/2|0]);if(o>0)i=n+1;else{if(!(o<0))return s;r=n-1}}return null}}},"./src/utils/buffer-helper.ts": /*!************************************!*\ !*** ./src/utils/buffer-helper.ts ***! \************************************/ -/*! exports provided: BufferHelper */function(t,e,r){"use strict";r.r(e),r.d(e,"BufferHelper",(function(){return s}));var i=r(/*! ./logger */"./src/utils/logger.ts"),n={length:0,start:function(){return 0},end:function(){return 0}},s=function(){function t(){}return t.isBuffered=function(e,r){try{if(e)for(var i=t.getBuffered(e),n=0;n=i.start(n)&&r<=i.end(n))return!0}catch(t){}return!1},t.bufferInfo=function(e,r,i){try{if(e){var n,s=t.getBuffered(e),o=[];for(n=0;no&&(i[s-1].end=t[n].end):i.push(t[n])}else i.push(t[n])}else i=t;for(var a,l=0,c=e,u=e,h=0;h=d&&e=r.start(n)&&i<=r.end(n))return!0}catch(t){}return!1},t.bufferInfo=function(e,i,r){try{if(e){var n,s=t.getBuffered(e),o=[];for(n=0;no&&(r[s-1].end=t[n].end):r.push(t[n])}else r.push(t[n])}else r=t;for(var a,l=0,c=e,u=e,h=0;h=d&&e=t&&n.logger.log(this.time+" ["+t+"] "+e)},t}(),f=function(t){for(var e=[],r=0;r100&&(this.logger.log(i.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},e.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var r=this.pos+1;r=144&&this.backSpace();var e=o(t);this.pos>=100?this.logger.log(i.ERROR,"Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))},e.clearFromPos=function(t){var e;for(e=t;e<100;e++)this.chars[e].reset()},e.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.getTextString=function(){for(var t=[],e=!0,r=0;r<100;r++){var i=this.chars[r].uchar;" "!==i&&(e=!1),t.push(i)}return e?"":t.join("")},e.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),v=function(){function t(t){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var e=0;e<15;e++)this.rows.push(new m(t));this.logger=t,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var e=t.prototype;return e.reset=function(){for(var t=0;t<15;t++)this.rows[t].clear();this.currRow=14},e.equals=function(t){for(var e=!0,r=0;r<15;r++)if(!this.rows[r].equals(t.rows[r])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<15;e++)this.rows[e].copy(t.rows[e])},e.isEmpty=function(){for(var t=!0,e=0;e<15;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},e.backSpace=function(){this.rows[this.currRow].backSpace()},e.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},e.insertChar=function(t){this.rows[this.currRow].insertChar(t)},e.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},e.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},e.setCursor=function(t){this.logger.log(i.INFO,"setCursor: "+t),this.rows[this.currRow].setCursor(t)},e.setPAC=function(t){this.logger.log(i.INFO,"pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e0&&(r=t?"["+e.join(" | ")+"]":e.join("\n")),r},e.getTextAndFormat=function(){return this.rows},t}(),y=function(){function t(t,e,r){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=t,this.outputFilter=e,this.mode=null,this.verbose=0,this.displayedMemory=new v(r),this.nonDisplayedMemory=new v(r),this.lastOutputScreen=new v(r),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}var e=t.prototype;return e.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},e.getHandler=function(){return this.outputFilter},e.setHandler=function(t){this.outputFilter=t},e.setPAC=function(t){this.writeScreen.setPAC(t)},e.setBkgData=function(t){this.writeScreen.setBkgData(t)},e.setMode=function(t){t!==this.mode&&(this.mode=t,this.logger.log(i.INFO,"MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},e.insertChars=function(t){for(var e=0;e=46,e.italics)e.foreground="white";else{var r=Math.floor(t/2)-16;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}this.logger.log(i.INFO,"MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},e.outputDataUpdate=function(t){void 0===t&&(t=!1);var e=this.logger.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},e.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),b=function(){function t(t,e,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var i=new d;this.channels=[null,new y(t,e,i),new y(t+1,r,i)],this.cmdHistory={a:null,b:null},this.logger=i}var e=t.prototype;return e.getHandler=function(t){return this.channels[t].getHandler()},e.setHandler=function(t,e){this.channels[t].setHandler(e)},e.addData=function(t,e){var r,n,s,o=!1;this.logger.time=t;for(var a=0;a ("+f([n,s])+")"),(r=this.parseCmd(n,s))||(r=this.parseMidrow(n,s)),r||(r=this.parsePAC(n,s)),r||(r=this.parseBackgroundAttributes(n,s)),!r&&(o=this.parseChars(n,s))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(o):this.logger.log(i.WARNING,"No channel found yet. TEXT-MODE?")}r||o||this.logger.log(i.WARNING,"Couldn't parse cleaned data "+f([n,s])+" orig: "+f([e[a],e[a+1]]))}},e.parseCmd=function(t,e){var r=this.cmdHistory;if(!((20===t||28===t||21===t||29===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=33&&e<=35))return!1;if(S(t,e,r))return x(null,null,r),this.logger.log(i.DEBUG,"Repeated command ("+f([t,e])+") is dropped"),!0;var n=20===t||21===t||23===t?1:2,s=this.channels[n];return 20===t||21===t||28===t||29===t?32===e?s.ccRCL():33===e?s.ccBS():34===e?s.ccAOF():35===e?s.ccAON():36===e?s.ccDER():37===e?s.ccRU(2):38===e?s.ccRU(3):39===e?s.ccRU(4):40===e?s.ccFON():41===e?s.ccRDC():42===e?s.ccTR():43===e?s.ccRTD():44===e?s.ccEDM():45===e?s.ccCR():46===e?s.ccENM():47===e&&s.ccEOC():s.ccTO(e-32),x(t,e,r),this.currentChannel=n,!0},e.parseMidrow=function(t,e){var r=0;if((17===t||25===t)&&e>=32&&e<=47){if((r=17===t?1:2)!==this.currentChannel)return this.logger.log(i.ERROR,"Mismatch channel in midrow parsing"),!1;var n=this.channels[r];return!!n&&(n.ccMIDROW(e),this.logger.log(i.DEBUG,"MIDROW ("+f([t,e])+")"),!0)}return!1},e.parsePAC=function(t,e){var r,i=this.cmdHistory;if(!((t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127||(16===t||24===t)&&e>=64&&e<=95))return!1;if(S(t,e,i))return x(null,null,i),!0;var n=t<=23?1:2;r=e>=64&&e<=95?1===n?a[t]:c[t]:1===n?l[t]:u[t];var s=this.channels[n];return!!s&&(s.setPAC(this.interpretPAC(r,e)),x(t,e,i),this.currentChannel=n,!0)},e.interpretPAC=function(t,e){var r,i={color:null,italics:!1,indent:null,underline:!1,row:t};return r=e>95?e-96:e-64,i.underline=1==(1&r),r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i},e.parseChars=function(t,e){var r,n,s=null,a=null;if(t>=25?(r=2,a=t-8):(r=1,a=t),a>=17&&a<=19?(n=17===a?e+80:18===a?e+112:e+144,this.logger.log(i.INFO,"Special char '"+o(n)+"' in channel "+r),s=[n]):t>=32&&t<=127&&(s=0===e?[t]:[t,e]),s){var l=f(s);this.logger.log(i.DEBUG,"Char codes = "+l.join(",")),x(t,e,this.cmdHistory)}return s},e.parseBackgroundAttributes=function(t,e){var r;if(!((16===t||24===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=45&&e<=47))return!1;var i={};16===t||24===t?(r=Math.floor((e-32)/2),i.background=h[r],e%2==1&&(i.background=i.background+"_semi")):45===e?i.background="transparent":(i.foreground="black",47===e&&(i.underline=!0));var n=t<=23?1:2;return this.channels[n].setBkgData(i),x(t,e,this.cmdHistory),!0},e.reset=function(){for(var t=0;t=t&&n.logger.log(this.time+" ["+t+"] "+e)},t}(),f=function(t){for(var e=[],i=0;i100&&(this.logger.log(r.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},e.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var i=this.pos+1;i=144&&this.backSpace();var e=o(t);this.pos>=100?this.logger.log(r.ERROR,"Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))},e.clearFromPos=function(t){var e;for(e=t;e<100;e++)this.chars[e].reset()},e.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.getTextString=function(){for(var t=[],e=!0,i=0;i<100;i++){var r=this.chars[i].uchar;" "!==r&&(e=!1),t.push(r)}return e?"":t.join("")},e.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),v=function(){function t(t){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var e=0;e<15;e++)this.rows.push(new m(t));this.logger=t,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var e=t.prototype;return e.reset=function(){for(var t=0;t<15;t++)this.rows[t].clear();this.currRow=14},e.equals=function(t){for(var e=!0,i=0;i<15;i++)if(!this.rows[i].equals(t.rows[i])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<15;e++)this.rows[e].copy(t.rows[e])},e.isEmpty=function(){for(var t=!0,e=0;e<15;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},e.backSpace=function(){this.rows[this.currRow].backSpace()},e.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},e.insertChar=function(t){this.rows[this.currRow].insertChar(t)},e.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},e.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},e.setCursor=function(t){this.logger.log(r.INFO,"setCursor: "+t),this.rows[this.currRow].setCursor(t)},e.setPAC=function(t){this.logger.log(r.INFO,"pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e0&&(i=t?"["+e.join(" | ")+"]":e.join("\n")),i},e.getTextAndFormat=function(){return this.rows},t}(),y=function(){function t(t,e,i){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=t,this.outputFilter=e,this.mode=null,this.verbose=0,this.displayedMemory=new v(i),this.nonDisplayedMemory=new v(i),this.lastOutputScreen=new v(i),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}var e=t.prototype;return e.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},e.getHandler=function(){return this.outputFilter},e.setHandler=function(t){this.outputFilter=t},e.setPAC=function(t){this.writeScreen.setPAC(t)},e.setBkgData=function(t){this.writeScreen.setBkgData(t)},e.setMode=function(t){t!==this.mode&&(this.mode=t,this.logger.log(r.INFO,"MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},e.insertChars=function(t){for(var e=0;e=46,e.italics)e.foreground="white";else{var i=Math.floor(t/2)-16;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][i]}this.logger.log(r.INFO,"MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},e.outputDataUpdate=function(t){void 0===t&&(t=!1);var e=this.logger.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},e.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),b=function(){function t(t,e,i){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new d;this.channels=[null,new y(t,e,r),new y(t+1,i,r)],this.cmdHistory={a:null,b:null},this.logger=r}var e=t.prototype;return e.getHandler=function(t){return this.channels[t].getHandler()},e.setHandler=function(t,e){this.channels[t].setHandler(e)},e.addData=function(t,e){var i,n,s,o=!1;this.logger.time=t;for(var a=0;a ("+f([n,s])+")"),(i=this.parseCmd(n,s))||(i=this.parseMidrow(n,s)),i||(i=this.parsePAC(n,s)),i||(i=this.parseBackgroundAttributes(n,s)),!i&&(o=this.parseChars(n,s))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(o):this.logger.log(r.WARNING,"No channel found yet. TEXT-MODE?")}i||o||this.logger.log(r.WARNING,"Couldn't parse cleaned data "+f([n,s])+" orig: "+f([e[a],e[a+1]]))}},e.parseCmd=function(t,e){var i=this.cmdHistory;if(!((20===t||28===t||21===t||29===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=33&&e<=35))return!1;if(S(t,e,i))return x(null,null,i),this.logger.log(r.DEBUG,"Repeated command ("+f([t,e])+") is dropped"),!0;var n=20===t||21===t||23===t?1:2,s=this.channels[n];return 20===t||21===t||28===t||29===t?32===e?s.ccRCL():33===e?s.ccBS():34===e?s.ccAOF():35===e?s.ccAON():36===e?s.ccDER():37===e?s.ccRU(2):38===e?s.ccRU(3):39===e?s.ccRU(4):40===e?s.ccFON():41===e?s.ccRDC():42===e?s.ccTR():43===e?s.ccRTD():44===e?s.ccEDM():45===e?s.ccCR():46===e?s.ccENM():47===e&&s.ccEOC():s.ccTO(e-32),x(t,e,i),this.currentChannel=n,!0},e.parseMidrow=function(t,e){var i=0;if((17===t||25===t)&&e>=32&&e<=47){if((i=17===t?1:2)!==this.currentChannel)return this.logger.log(r.ERROR,"Mismatch channel in midrow parsing"),!1;var n=this.channels[i];return!!n&&(n.ccMIDROW(e),this.logger.log(r.DEBUG,"MIDROW ("+f([t,e])+")"),!0)}return!1},e.parsePAC=function(t,e){var i,r=this.cmdHistory;if(!((t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127||(16===t||24===t)&&e>=64&&e<=95))return!1;if(S(t,e,r))return x(null,null,r),!0;var n=t<=23?1:2;i=e>=64&&e<=95?1===n?a[t]:c[t]:1===n?l[t]:u[t];var s=this.channels[n];return!!s&&(s.setPAC(this.interpretPAC(i,e)),x(t,e,r),this.currentChannel=n,!0)},e.interpretPAC=function(t,e){var i,r={color:null,italics:!1,indent:null,underline:!1,row:t};return i=e>95?e-96:e-64,r.underline=1==(1&i),i<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(i/2)]:i<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((i-16)/2),r},e.parseChars=function(t,e){var i,n,s=null,a=null;if(t>=25?(i=2,a=t-8):(i=1,a=t),a>=17&&a<=19?(n=17===a?e+80:18===a?e+112:e+144,this.logger.log(r.INFO,"Special char '"+o(n)+"' in channel "+i),s=[n]):t>=32&&t<=127&&(s=0===e?[t]:[t,e]),s){var l=f(s);this.logger.log(r.DEBUG,"Char codes = "+l.join(",")),x(t,e,this.cmdHistory)}return s},e.parseBackgroundAttributes=function(t,e){var i;if(!((16===t||24===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=45&&e<=47))return!1;var r={};16===t||24===t?(i=Math.floor((e-32)/2),r.background=h[i],e%2==1&&(r.background=r.background+"_semi")):45===e?r.background="transparent":(r.foreground="black",47===e&&(r.underline=!0));var n=t<=23?1:2;return this.channels[n].setBkgData(r),x(t,e,this.cmdHistory),!0},e.reset=function(){for(var t=0;t=16?h--:h++;var v=Object(i.fixLineBreaks)(d.trim()),y=Object(n.generateCueId)(e,r,v);t&&t.cues&&t.cues.getCueById(y)||((c=new p(e,r,v)).id=y,c.line=g+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*h/32)),f.push(c))}return t&&f.length&&(f.sort((function(t,e){return"auto"===t.line||"auto"===e.line?0:t.line>8&&e.line>8?e.line-t.line:t.line-e.line})),f.forEach((function(e){return Object(s.addCueToTrack)(t,e)}))),f}};e.default=a},"./src/utils/discontinuities.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ./vttparser */"./src/utils/vttparser.ts"),n=i(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts"),s=i(/*! ./texttrack-utils */"./src/utils/texttrack-utils.ts"),o=/\s/,a={newCue:function(t,e,i,a){for(var l,c,u,h,d,f=[],p=self.VTTCue||self.TextTrackCue,g=0;g=16?h--:h++;var v=Object(r.fixLineBreaks)(d.trim()),y=Object(n.generateCueId)(e,i,v);t&&t.cues&&t.cues.getCueById(y)||((c=new p(e,i,v)).id=y,c.line=g+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*h/32)),f.push(c))}return t&&f.length&&(f.sort((function(t,e){return"auto"===t.line||"auto"===e.line?0:t.line>8&&e.line>8?e.line-t.line:t.line-e.line})),f.forEach((function(e){return Object(s.addCueToTrack)(t,e)}))),f}};e.default=a},"./src/utils/discontinuities.ts": /*!**************************************!*\ !*** ./src/utils/discontinuities.ts ***! \**************************************/ -/*! exports provided: findFirstFragWithCC, shouldAlignOnDiscontinuities, findDiscontinuousReferenceFrag, adjustSlidingStart, alignStream, alignPDT, alignFragmentByPDTDelta, alignMediaPlaylistByPDT */function(t,e,r){"use strict";r.r(e),r.d(e,"findFirstFragWithCC",(function(){return o})),r.d(e,"shouldAlignOnDiscontinuities",(function(){return a})),r.d(e,"findDiscontinuousReferenceFrag",(function(){return l})),r.d(e,"adjustSlidingStart",(function(){return u})),r.d(e,"alignStream",(function(){return h})),r.d(e,"alignPDT",(function(){return d})),r.d(e,"alignFragmentByPDTDelta",(function(){return f})),r.d(e,"alignMediaPlaylistByPDT",(function(){return p}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ./logger */"./src/utils/logger.ts"),s=r(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function o(t,e){for(var r=null,i=0,n=t.length;ir.startCC||t&&t.cci.startCC||t&&t.cc=this.minWeight_},e.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.destroy=function(){},t}();e.default=n},"./src/utils/ewma.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../utils/ewma */"./src/utils/ewma.ts"),n=function(){function t(t,e,i){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new r.default(t),this.fast_=new r.default(e)}var e=t.prototype;return e.update=function(t,e){var i=this.slow_,n=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new r.default(t,i.getEstimate(),i.getTotalWeight())),this.fast_.halfLife!==e&&(this.fast_=new r.default(e,n.getEstimate(),n.getTotalWeight()))},e.sample=function(t,e){var i=(t=Math.max(t,this.minDelayMs_))/1e3,r=8*e/i;this.fast_.sample(i,r),this.slow_.sample(i,r)},e.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},e.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.destroy=function(){},t}();e.default=n},"./src/utils/ewma.ts": /*!***************************!*\ !*** ./src/utils/ewma.ts ***! \***************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=t,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=e,this.totalWeight_=r}var e=t.prototype;return e.sample=function(t,e){var r=Math.pow(this.alpha_,t);this.estimate_=e*(1-r)+r*this.estimate_,this.totalWeight_+=t},e.getTotalWeight=function(){return this.totalWeight_},e.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);if(t)return this.estimate_/t}return this.estimate_},t}();e.default=i},"./src/utils/fetch-loader.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=function(){function t(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=t,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=e,this.totalWeight_=i}var e=t.prototype;return e.sample=function(t,e){var i=Math.pow(this.alpha_,t);this.estimate_=e*(1-i)+i*this.estimate_,this.totalWeight_+=t},e.getTotalWeight=function(){return this.totalWeight_},e.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);if(t)return this.estimate_/t}return this.estimate_},t}();e.default=r},"./src/utils/fetch-loader.ts": /*!***********************************!*\ !*** ./src/utils/fetch-loader.ts ***! \***********************************/ -/*! exports provided: fetchSupported, default */function(t,e,r){"use strict";r.r(e),r.d(e,"fetchSupported",(function(){return d}));var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),s=r(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function o(t){var e="function"==typeof Map?new Map:void 0;return(o=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return a(t,arguments,u(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),c(i,t)})(t)}function a(t,e,r){return(a=l()?Reflect.construct:function(t,e,r){var i=[null];i.push.apply(i,e);var n=new(Function.bind.apply(t,i));return r&&c(n,r.prototype),n}).apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(){return(h=Object.assign||function(t){for(var e=1;e=i&&n(e,r,o.flush(),t)):n(e,r,l,t),s()})).catch((function(){return Promise.reject()}))}()},t}();function p(t,e){return new self.Request(t.url,e)}var g=function(t){var e,r;function i(e,r,i){var n;return(n=t.call(this,e)||this).code=void 0,n.details=void 0,n.code=r,n.details=i,n}return r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,c(e,r),i}(o(Error));e.default=f},"./src/utils/imsc1-ttml-parser.ts": +/*! exports provided: fetchSupported, default */function(t,e,i){"use strict";i.r(e),i.d(e,"fetchSupported",(function(){return d}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),s=i(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function o(t){var e="function"==typeof Map?new Map:void 0;return(o=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return a(t,arguments,u(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,t)})(t)}function a(t,e,i){return(a=l()?Reflect.construct:function(t,e,i){var r=[null];r.push.apply(r,e);var n=new(Function.bind.apply(t,r));return i&&c(n,i.prototype),n}).apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(){return(h=Object.assign||function(t){for(var e=1;e=r&&n(e,i,o.flush(),t)):n(e,i,l,t),s()})).catch((function(){return Promise.reject()}))}()},t}();function p(t,e){return new self.Request(t.url,e)}var g=function(t){var e,i;function r(e,i,r){var n;return(n=t.call(this,e)||this).code=void 0,n.details=void 0,n.code=i,n.details=r,n}return i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,c(e,i),r}(o(Error));e.default=f},"./src/utils/imsc1-ttml-parser.ts": /*!****************************************!*\ !*** ./src/utils/imsc1-ttml-parser.ts ***! \****************************************/ -/*! exports provided: IMSC1_CODEC, parseIMSC1 */function(t,e,r){"use strict";r.r(e),r.d(e,"IMSC1_CODEC",(function(){return u})),r.d(e,"parseIMSC1",(function(){return p}));var i=r(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),n=r(/*! ./vttparser */"./src/utils/vttparser.ts"),s=r(/*! ./vttcue */"./src/utils/vttcue.ts"),o=r(/*! ../demux/id3 */"./src/demux/id3.ts"),a=r(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=r(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function c(){return(c=Object.assign||function(t){for(var e=1;e"):i}function a(t){if(self.console&&!0===t||"object"==typeof t){!function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i"):r}function a(t){if(self.console&&!0===t||"object"==typeof t){!function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r}function h(t,e){var r,i,n,s=[];if(!e.length)return s;"data"in t?(r=t.data,i=t.start,n=t.end):(i=0,n=(r=t).byteLength);for(var l=i;l1?l+u:n;if(a(r.subarray(l+4,l+8))===e[0])if(1===e.length)s.push({data:r,start:l+8,end:d});else{var f=h({data:r,start:l+8,end:d},e.slice(1));f.length&&o.apply(s,f)}l=d}return s}function d(t){var e=h(t,["moov"])[0],r=e?e.end:null,i=h(t,["sidx"]);if(!i||!i[0])return null;var n=[],s=i[0],o=s.data[0],a=0===o?8:16,u=c(s,a);a+=4,a+=0===o?8:16,a+=2;var d=s.end+0,f=l(s,a);a+=2;for(var p=0;p>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(s,g);g+=4,n.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/u,start:d,end:d+v-1}}),d+=v,a=g+=4}return{earliestPresentationTime:0,timescale:u,version:o,referencesCount:f,references:n,moovEndOffset:r}}function f(t){for(var e=[],r=h(t,["moov","trak"]),i=0;i>24,t[e+1]=i>>16&255,t[e+2]=i>>8&255,t[e+3]=255&i}function h(t,e){var i,r,n,s=[];if(!e.length)return s;"data"in t?(i=t.data,r=t.start,n=t.end):(r=0,n=(i=t).byteLength);for(var l=r;l1?l+u:n;if(a(i.subarray(l+4,l+8))===e[0])if(1===e.length)s.push({data:i,start:l+8,end:d});else{var f=h({data:i,start:l+8,end:d},e.slice(1));f.length&&o.apply(s,f)}l=d}return s}function d(t){var e=h(t,["moov"])[0],i=e?e.end:null,r=h(t,["sidx"]);if(!r||!r[0])return null;var n=[],s=r[0],o=s.data[0],a=0===o?8:16,u=c(s,a);a+=4,a+=0===o?8:16,a+=2;var d=s.end+0,f=l(s,a);a+=2;for(var p=0;p>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(s,g);g+=4,n.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/u,start:d,end:d+v-1}}),d+=v,a=g+=4}return{earliestPresentationTime:0,timescale:u,version:o,referencesCount:f,references:n,moovEndOffset:i}}function f(t){for(var e=[],i=h(t,["moov","trak"]),r=0;rt)&&(this.startTime=t),this.endTime=e,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},e.reset=function(){this.cueRanges=[]},t}()},"./src/utils/texttrack-utils.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return r}));var r=function(){function t(t,e){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=t,this.trackName=e}var e=t.prototype;return e.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},e.newCue=function(t,e,i){(null===this.startTime||this.startTime>t)&&(this.startTime=t),this.endTime=e,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)},e.reset=function(){this.cueRanges=[]},t}()},"./src/utils/texttrack-utils.ts": /*!**************************************!*\ !*** ./src/utils/texttrack-utils.ts ***! \**************************************/ -/*! exports provided: sendAddTrackEvent, addCueToTrack, clearCurrentCues, removeCuesInRange, getCuesInRange */function(t,e,r){"use strict";r.r(e),r.d(e,"sendAddTrackEvent",(function(){return n})),r.d(e,"addCueToTrack",(function(){return s})),r.d(e,"clearCurrentCues",(function(){return o})),r.d(e,"removeCuesInRange",(function(){return a})),r.d(e,"getCuesInRange",(function(){return l}));var i=r(/*! ./logger */"./src/utils/logger.ts");function n(t,e){var r;try{r=new Event("addtrack")}catch(t){(r=document.createEvent("Event")).initEvent("addtrack",!1,!1)}r.track=t,e.dispatchEvent(r)}function s(t,e){var r=t.mode;if("disabled"===r&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(e.id))try{if(t.addCue(e),!t.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(r){i.logger.debug("[texttrack-utils]: "+r);var n=new self.TextTrackCue(e.startTime,e.endTime,e.text);n.id=e.id,t.addCue(n)}"disabled"===r&&(t.mode=r)}function o(t){var e=t.mode;if("disabled"===e&&(t.mode="hidden"),t.cues)for(var r=t.cues.length;r--;)t.removeCue(t.cues[r]);"disabled"===e&&(t.mode=e)}function a(t,e,r){var i=t.mode;if("disabled"===i&&(t.mode="hidden"),t.cues&&t.cues.length>0)for(var n=l(t.cues,e,r),s=0;st[r].endTime)return-1;for(var i=0,n=r;i<=n;){var s=Math.floor((n+i)/2);if(et[s].startTime&&i-1)for(var s=n,o=t.length;s=e&&a.endTime<=r)i.push(a);else if(a.startTime>r)return i}return i}},"./src/utils/time-ranges.ts": +/*! exports provided: sendAddTrackEvent, addCueToTrack, clearCurrentCues, removeCuesInRange, getCuesInRange */function(t,e,i){"use strict";i.r(e),i.d(e,"sendAddTrackEvent",(function(){return n})),i.d(e,"addCueToTrack",(function(){return s})),i.d(e,"clearCurrentCues",(function(){return o})),i.d(e,"removeCuesInRange",(function(){return a})),i.d(e,"getCuesInRange",(function(){return l}));var r=i(/*! ./logger */"./src/utils/logger.ts");function n(t,e){var i;try{i=new Event("addtrack")}catch(t){(i=document.createEvent("Event")).initEvent("addtrack",!1,!1)}i.track=t,e.dispatchEvent(i)}function s(t,e){var i=t.mode;if("disabled"===i&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(e.id))try{if(t.addCue(e),!t.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(i){r.logger.debug("[texttrack-utils]: "+i);var n=new self.TextTrackCue(e.startTime,e.endTime,e.text);n.id=e.id,t.addCue(n)}"disabled"===i&&(t.mode=i)}function o(t){var e=t.mode;if("disabled"===e&&(t.mode="hidden"),t.cues)for(var i=t.cues.length;i--;)t.removeCue(t.cues[i]);"disabled"===e&&(t.mode=e)}function a(t,e,i){var r=t.mode;if("disabled"===r&&(t.mode="hidden"),t.cues&&t.cues.length>0)for(var n=l(t.cues,e,i),s=0;st[i].endTime)return-1;for(var r=0,n=i;r<=n;){var s=Math.floor((n+r)/2);if(et[s].startTime&&r-1)for(var s=n,o=t.length;s=e&&a.endTime<=i)r.push(a);else if(a.startTime>i)return r}return r}},"./src/utils/time-ranges.ts": /*!**********************************!*\ !*** ./src/utils/time-ranges.ts ***! \**********************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e),e.default={toString:function(t){for(var e="",r=t.length,i=0;i1?e-1:0),i=1;i100)throw new Error("Position must be between 0 and 100.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",n({},l,{get:function(){return x},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");x=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",n({},l,{get:function(){return S},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");S=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",n({},l,{get:function(){return C},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");C=e,this.hasBeenReset=!0}})),a.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}()},"./src/utils/vttparser.ts": +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),e.default=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;var t=["","lr","rl"],e=["start","middle","end","left","right"];function i(t,e){if("string"!=typeof e)return!1;if(!Array.isArray(t))return!1;var i=e.toLowerCase();return!!~t.indexOf(i)&&i}function r(t){return i(e,t)}function n(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r100)throw new Error("Position must be between 0 and 100.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",n({},l,{get:function(){return x},set:function(t){var e=r(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");x=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",n({},l,{get:function(){return S},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");S=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",n({},l,{get:function(){return C},set:function(t){var e=r(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");C=e,this.hasBeenReset=!0}})),a.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}()},"./src/utils/vttparser.ts": /*!********************************!*\ !*** ./src/utils/vttparser.ts ***! \********************************/ -/*! exports provided: parseTimeStamp, fixLineBreaks, VTTParser */function(t,e,r){"use strict";r.r(e),r.d(e,"parseTimeStamp",(function(){return s})),r.d(e,"fixLineBreaks",(function(){return h})),r.d(e,"VTTParser",(function(){return d}));var i=r(/*! ./vttcue */"./src/utils/vttcue.ts"),n=function(){function t(){}return t.prototype.decode=function(t,e){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))},t}();function s(t){function e(t,e,r,i){return 3600*(0|t)+60*(0|e)+(0|r)+parseFloat(i||0)}var r=t.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return r?parseFloat(r[2])>59?e(r[2],r[3],0,r[4]):e(r[1],r[2],r[3],r[4]):null}var o=function(){function t(){this.values=Object.create(null)}var e=t.prototype;return e.set=function(t,e){this.get(t)||""===e||(this.values[t]=e)},e.get=function(t,e,r){return r?this.has(t)?this.values[t]:e[r]:this.has(t)?this.values[t]:e},e.has=function(t){return t in this.values},e.alt=function(t,e,r){for(var i=0;i=0&&r<=100)return this.set(t,r),!0}return!1},t}();function a(t,e,r,i){var n=i?t.split(i):[t];for(var s in n)if("string"==typeof n[s]){var o=n[s].split(r);2===o.length&&e(o[0],o[1])}}var l=new i.default(0,0,""),c="middle"===l.align?"middle":"center";function u(t,e,r){var i=t;function n(){var e=s(t);if(null===e)throw new Error("Malformed timestamp: "+i);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function u(){t=t.replace(/^\s+/,"")}if(u(),e.startTime=n(),u(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);t=t.substr(3),u(),e.endTime=n(),u(),function(t,e){var i=new o;a(t,(function(t,e){var n;switch(t){case"region":for(var s=r.length-1;s>=0;s--)if(r[s].id===e){i.set(t,r[s].region);break}break;case"vertical":i.alt(t,e,["rl","lr"]);break;case"line":n=e.split(","),i.integer(t,n[0]),i.percent(t,n[0])&&i.set("snapToLines",!1),i.alt(t,n[0],["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",c,"end"]);break;case"position":n=e.split(","),i.percent(t,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":i.percent(t,e);break;case"align":i.alt(t,e,["start",c,"end","left","right"])}}),/:/,/\s/),e.region=i.get("region",null),e.vertical=i.get("vertical","");var n=i.get("line","auto");"auto"===n&&-1===l.line&&(n=-1),e.line=n,e.lineAlign=i.get("lineAlign","start"),e.snapToLines=i.get("snapToLines",!0),e.size=i.get("size",100),e.align=i.get("align",c);var s=i.get("position","auto");"auto"===s&&50===l.position&&(s="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=s}(t,e)}function h(t){return t.replace(//gi,"\n")}var d=function(){function t(){this.state="INITIAL",this.buffer="",this.decoder=new n,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var e=t.prototype;return e.parse=function(t){var e=this;function r(){var t=e.buffer,r=0;for(t=h(t);r59?e(i[2],i[3],0,i[4]):e(i[1],i[2],i[3],i[4]):null}var o=function(){function t(){this.values=Object.create(null)}var e=t.prototype;return e.set=function(t,e){this.get(t)||""===e||(this.values[t]=e)},e.get=function(t,e,i){return i?this.has(t)?this.values[t]:e[i]:this.has(t)?this.values[t]:e},e.has=function(t){return t in this.values},e.alt=function(t,e,i){for(var r=0;r=0&&i<=100)return this.set(t,i),!0}return!1},t}();function a(t,e,i,r){var n=r?t.split(r):[t];for(var s in n)if("string"==typeof n[s]){var o=n[s].split(i);2===o.length&&e(o[0],o[1])}}var l=new r.default(0,0,""),c="middle"===l.align?"middle":"center";function u(t,e,i){var r=t;function n(){var e=s(t);if(null===e)throw new Error("Malformed timestamp: "+r);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function u(){t=t.replace(/^\s+/,"")}if(u(),e.startTime=n(),u(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);t=t.substr(3),u(),e.endTime=n(),u(),function(t,e){var r=new o;a(t,(function(t,e){var n;switch(t){case"region":for(var s=i.length-1;s>=0;s--)if(i[s].id===e){r.set(t,i[s].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":n=e.split(","),r.integer(t,n[0]),r.percent(t,n[0])&&r.set("snapToLines",!1),r.alt(t,n[0],["auto"]),2===n.length&&r.alt("lineAlign",n[1],["start",c,"end"]);break;case"position":n=e.split(","),r.percent(t,n[0]),2===n.length&&r.alt("positionAlign",n[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start",c,"end","left","right"])}}),/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical","");var n=r.get("line","auto");"auto"===n&&-1===l.line&&(n=-1),e.line=n,e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align",c);var s=r.get("position","auto");"auto"===s&&50===l.position&&(s="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=s}(t,e)}function h(t){return t.replace(//gi,"\n")}var d=function(){function t(){this.state="INITIAL",this.buffer="",this.decoder=new n,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var e=t.prototype;return e.parse=function(t){var e=this;function i(){var t=e.buffer,i=0;for(t=h(t);i>>0).toString()};function h(t,e,r){return u(t.toString())+u(e.toString())+u(r)}function d(t,e,r,u,d,f,p,g){var m,v=new n.VTTParser,y=Object(s.utf8ArrayToStr)(new Uint8Array(t)).trim().replace(l,"\n").split("\n"),b=[],x=Object(o.toMpegTsClockFromTimescale)(e,r),S="00:00.000",C=0,w=0,k=!0,E=!1;v.oncue=function(t){var e=u[d],r=u.ccOffset,i=(C-x)/9e4;if(null!=e&&e.new&&(void 0!==w?r=u.ccOffset=e.start:function(t,e,r){var i=t[e],n=t[i.prevCC];if(!n||!n.new&&i.new)return t.ccOffset=t.presentationOffset=i.start,void(i.new=!1);for(;null!==(s=n)&&void 0!==s&&s.new;){var s;t.ccOffset+=i.start-n.start,i.new=!1,n=t[(i=n).prevCC]}t.presentationOffset=r}(u,d,i)),i&&(r=i-u.presentationOffset),E){var n=t.endTime-t.startTime,s=Object(a.normalizePts)(9e4*(t.startTime+r-w),9e4*f)/9e4;t.startTime=s,t.endTime=s+n}var o=t.text.trim();t.text=decodeURIComponent(encodeURIComponent(o)),t.id||(t.id=h(t.startTime,t.endTime,o)),t.endTime>0&&b.push(t)},v.onparsingerror=function(t){m=t},v.onflush=function(){m?g(m):p(b)},y.forEach((function(t){if(k){if(c(t,"X-TIMESTAMP-MAP=")){k=!1,E=!0,t.substr(16).split(",").forEach((function(t){c(t,"LOCAL:")?S=t.substr(6):c(t,"MPEGTS:")&&(C=parseInt(t.substr(7)))}));try{w=function(t){var e=parseInt(t.substr(-3)),r=parseInt(t.substr(-6,2)),n=parseInt(t.substr(-9,2)),s=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;if(!(Object(i.isFiniteNumber)(e)&&Object(i.isFiniteNumber)(r)&&Object(i.isFiniteNumber)(n)&&Object(i.isFiniteNumber)(s)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+t);return e+=1e3*r,e+=6e4*n,e+=36e5*s}(S)/1e3}catch(t){E=!1,m=t}return}""===t&&(k=!1)}v.parse(t+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts": +/*! exports provided: generateCueId, parseWebVTT */function(t,e,i){"use strict";i.r(e),i.d(e,"generateCueId",(function(){return h})),i.d(e,"parseWebVTT",(function(){return d}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ./vttparser */"./src/utils/vttparser.ts"),s=i(/*! ../demux/id3 */"./src/demux/id3.ts"),o=i(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),a=i(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,c=function(t,e,i){return void 0===i&&(i=0),t.substr(i,e.length)===e},u=function(t){for(var e=5381,i=t.length;i;)e=33*e^t.charCodeAt(--i);return(e>>>0).toString()};function h(t,e,i){return u(t.toString())+u(e.toString())+u(i)}function d(t,e,i,u,d,f,p,g){var m,v=new n.VTTParser,y=Object(s.utf8ArrayToStr)(new Uint8Array(t)).trim().replace(l,"\n").split("\n"),b=[],x=Object(o.toMpegTsClockFromTimescale)(e,i),S="00:00.000",C=0,w=0,k=!0,E=!1;v.oncue=function(t){var e=u[d],i=u.ccOffset,r=(C-x)/9e4;if(null!=e&&e.new&&(void 0!==w?i=u.ccOffset=e.start:function(t,e,i){var r=t[e],n=t[r.prevCC];if(!n||!n.new&&r.new)return t.ccOffset=t.presentationOffset=r.start,void(r.new=!1);for(;null!==(s=n)&&void 0!==s&&s.new;){var s;t.ccOffset+=r.start-n.start,r.new=!1,n=t[(r=n).prevCC]}t.presentationOffset=i}(u,d,r)),r&&(i=r-u.presentationOffset),E){var n=t.endTime-t.startTime,s=Object(a.normalizePts)(9e4*(t.startTime+i-w),9e4*f)/9e4;t.startTime=s,t.endTime=s+n}var o=t.text.trim();t.text=decodeURIComponent(encodeURIComponent(o)),t.id||(t.id=h(t.startTime,t.endTime,o)),t.endTime>0&&b.push(t)},v.onparsingerror=function(t){m=t},v.onflush=function(){m?g(m):p(b)},y.forEach((function(t){if(k){if(c(t,"X-TIMESTAMP-MAP=")){k=!1,E=!0,t.substr(16).split(",").forEach((function(t){c(t,"LOCAL:")?S=t.substr(6):c(t,"MPEGTS:")&&(C=parseInt(t.substr(7)))}));try{w=function(t){var e=parseInt(t.substr(-3)),i=parseInt(t.substr(-6,2)),n=parseInt(t.substr(-9,2)),s=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;if(!(Object(r.isFiniteNumber)(e)&&Object(r.isFiniteNumber)(i)&&Object(r.isFiniteNumber)(n)&&Object(r.isFiniteNumber)(s)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+t);return e+=1e3*i,e+=6e4*n,e+=36e5*s}(S)/1e3}catch(t){E=!1,m=t}return}""===t&&(k=!1)}v.parse(t+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts": /*!*********************************!*\ !*** ./src/utils/xhr-loader.ts ***! \*********************************/ -/*! exports provided: default */function(t,e,r){"use strict";r.r(e);var i=r(/*! ../utils/logger */"./src/utils/logger.ts"),n=r(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),s=/^age:\s*[\d.]+\s*$/m,o=function(){function t(t){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=t?t.xhrSetup:null,this.stats=new n.LoadStats,this.retryDelay=0}var e=t.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,4!==t.readyState&&(this.stats.aborted=!0,t.abort()))},e.abort=function(){var t;this.abortInternal(),null!==(t=this.callbacks)&&void 0!==t&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(t,e,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=e,this.callbacks=r,this.retryDelay=e.retryDelay,this.loadInternal()},e.loadInternal=function(){var t=this.config,e=this.context;if(t){var r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0;var n=this.xhrSetup;try{if(n)try{n(r,e.url)}catch(t){r.open("GET",e.url,!0),n(r,e.url)}r.readyState||r.open("GET",e.url,!0);var s=this.context.headers;if(s)for(var o in s)r.setRequestHeader(o,s[o])}catch(t){return void this.callbacks.onError({code:r.status,text:t.message},e,r)}e.rangeEnd&&r.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=e.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout),r.send()}},e.readystatechange=function(){var t=this.context,e=this.loader,r=this.stats;if(t&&e){var n=e.readyState,s=this.config;if(!r.aborted&&n>=2)if(self.clearTimeout(this.requestTimeout),0===r.loading.first&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),4===n){e.onreadystatechange=null,e.onprogress=null;var o=e.status;if(o>=200&&o<300){var a,l;if(r.loading.end=Math.max(self.performance.now(),r.loading.first),l="arraybuffer"===t.responseType?(a=e.response).byteLength:(a=e.responseText).length,r.loaded=r.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(r,t,a,e),!this.callbacks)return;var u={url:e.responseURL,data:a};this.callbacks.onSuccess(u,r,t,e)}else r.retry>=s.maxRetry||o>=400&&o<499?(i.logger.error(o+" while loading "+t.url),this.callbacks.onError({code:o,text:e.statusText},t,e)):(i.logger.warn(o+" while loading "+t.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),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)}},e.loadtimeout=function(){i.logger.warn("timeout while loading "+this.context.url);var t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(t){var e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total)},e.getCacheAge=function(){var t=null;if(this.loader&&s.test(this.loader.getAllResponseHeaders())){var e=this.loader.getResponseHeader("age");t=e?parseFloat(e):null}return t},t}();e.default=o}}).default},t.exports=i())},vHTk: +/*! exports provided: default */function(t,e,i){"use strict";i.r(e);var r=i(/*! ../utils/logger */"./src/utils/logger.ts"),n=i(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),s=/^age:\s*[\d.]+\s*$/m,o=function(){function t(t){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=t?t.xhrSetup:null,this.stats=new n.LoadStats,this.retryDelay=0}var e=t.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,4!==t.readyState&&(this.stats.aborted=!0,t.abort()))},e.abort=function(){var t;this.abortInternal(),null!==(t=this.callbacks)&&void 0!==t&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(t,e,i){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=e,this.callbacks=i,this.retryDelay=e.retryDelay,this.loadInternal()},e.loadInternal=function(){var t=this.config,e=this.context;if(t){var i=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var n=this.xhrSetup;try{if(n)try{n(i,e.url)}catch(t){i.open("GET",e.url,!0),n(i,e.url)}i.readyState||i.open("GET",e.url,!0);var s=this.context.headers;if(s)for(var o in s)i.setRequestHeader(o,s[o])}catch(t){return void this.callbacks.onError({code:i.status,text:t.message},e,i)}e.rangeEnd&&i.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),i.onreadystatechange=this.readystatechange.bind(this),i.onprogress=this.loadprogress.bind(this),i.responseType=e.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout),i.send()}},e.readystatechange=function(){var t=this.context,e=this.loader,i=this.stats;if(t&&e){var n=e.readyState,s=this.config;if(!i.aborted&&n>=2)if(self.clearTimeout(this.requestTimeout),0===i.loading.first&&(i.loading.first=Math.max(self.performance.now(),i.loading.start)),4===n){e.onreadystatechange=null,e.onprogress=null;var o=e.status;if(o>=200&&o<300){var a,l;if(i.loading.end=Math.max(self.performance.now(),i.loading.first),l="arraybuffer"===t.responseType?(a=e.response).byteLength:(a=e.responseText).length,i.loaded=i.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(i,t,a,e),!this.callbacks)return;var u={url:e.responseURL,data:a};this.callbacks.onSuccess(u,i,t,e)}else i.retry>=s.maxRetry||o>=400&&o<499?(r.logger.error(o+" while loading "+t.url),this.callbacks.onError({code:o,text:e.statusText},t,e)):(r.logger.warn(o+" while loading "+t.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),i.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)}},e.loadtimeout=function(){r.logger.warn("timeout while loading "+this.context.url);var t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(t){var e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total)},e.getCacheAge=function(){var t=null;if(this.loader&&s.test(this.loader.getAllResponseHeaders())){var e=this.loader.getResponseHeader("age");t=e?parseFloat(e):null}return t},t}();e.default=o}}).default},t.exports=r())},vHTk: /*!******************************************************!*\ !*** ./src/components/PreviewAll/index.less?modules ***! \******************************************************/ /*! no static exports found */ /*! exports used: default */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){t.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wzkS: +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wzkS: /*!**************************************************!*\ !*** ./src/pages/MoopCases/FormPanel/service.ts ***! \**************************************************/ /*! exports provided: getMoopCase, getLibraryTags, removeAttachment, addMoopCase, updateMoopCase */ -/*! exports used: addMoopCase, getLibraryTags, getMoopCase, removeAttachment, updateMoopCase */function(t,e,r){"use strict";r.d(e,"c",(function(){return a})),r.d(e,"b",(function(){return l})),r.d(e,"d",(function(){return c})),r.d(e,"a",(function(){return h})),r.d(e,"e",(function(){return d}));var i=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),n=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),s=r.n(n),o=r(/*! @/utils/fetch */"ErOA");function a(t){return Object(o.c)("libraries/".concat(t,".json"))}function l(){return Object(o.c)("library_tags.json")}function c(t){return u.apply(this,arguments)}function u(){return(u=Object(i.a)(s.a.mark((function t(e){var r;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(o.b)("attachments/".concat(e,".json"));case 2:return r=t.sent,t.abrupt("return",0===r.status);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function h(t){return Object(o.f)("libraries.json",t)}function d(t,e){return Object(o.g)("libraries/".concat(t,".json"),e)}},y5JW: +/*! exports used: addMoopCase, getLibraryTags, getMoopCase, removeAttachment, updateMoopCase */function(t,e,i){"use strict";i.d(e,"c",(function(){return a})),i.d(e,"b",(function(){return l})),i.d(e,"d",(function(){return c})),i.d(e,"a",(function(){return h})),i.d(e,"e",(function(){return d}));var r=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),n=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),s=i.n(n),o=i(/*! @/utils/fetch */"ErOA");function a(t){return Object(o.c)("libraries/".concat(t,".json"))}function l(){return Object(o.c)("library_tags.json")}function c(t){return u.apply(this,arguments)}function u(){return(u=Object(r.a)(s.a.mark((function t(e){var i;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(o.b)("attachments/".concat(e,".json"));case 2:return i=t.sent,t.abrupt("return",0===i.status);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function h(t){return Object(o.f)("libraries.json",t)}function d(t,e){return Object(o.g)("libraries/".concat(t,".json"),e)}},y5JW: /*!***********************************************!*\ !*** ./src/components/SingleUpload/index.tsx ***! \***********************************************/ /*! exports provided: uploadNameSizeSeperator, bytesToSize, default */ -/*! exports used: bytesToSize, default, uploadNameSizeSeperator */function(t,e,r){"use strict";r.d(e,"c",(function(){return g})),r.d(e,"a",(function(){return m}));r(/*! antd/es/upload/style */"DZo9");var i=r(/*! antd/es/upload */"8z0m"),n=(r(/*! antd/es/button/style */"+L6B"),r(/*! antd/es/button */"2/Rp")),s=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),l=(r(/*! antd/es/message/style */"miYZ"),r(/*! antd/es/message */"tsqr")),c=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),u=r.n(c),h=r(/*! react */"q1tI"),d=r.n(h),f=r(/*! @/utils/env */"m3rI"),p=r(/*! @/pages/MoopCases/FormPanel/service */"wzkS"),g="  ";function m(t){if(0==t)return"0 Byte";var e=parseInt(""+Math.floor(Math.log(t)/Math.log(1024)),10);return(t/Math.pow(1024,e)).toFixed(1)+" "+["Bytes","KB","MB","GB","TB"][e]}e.b=function(t){var e,r=t.value,c=void 0===r?[]:r,h=(t.action,t.onChange),v=t.className,y=t.maxSize,b=void 0===y?150:y,x=t.title,S=void 0===x?"文件上传":x,C=t.accept,w={multiple:!1,fileList:c,accept:void 0===C?null:C,withCredentials:!0,beforeUpload:function(t){return t.size/1024/10240?"每次只能上传一个资源, 删除下面资源可重新上传 ":"",disabled:c.length>0,ghost:!0},S),d.a.createElement("span",{onClick:function(t){t.preventDefault(),t.stopPropagation()},style:{marginLeft:10}},"(单个文件最大",b,"M) ")))}},zgC5: +/*! exports used: bytesToSize, default, uploadNameSizeSeperator */function(t,e,i){"use strict";i.d(e,"c",(function(){return g})),i.d(e,"a",(function(){return m}));i(/*! antd/es/upload/style */"DZo9");var r=i(/*! antd/es/upload */"8z0m"),n=(i(/*! antd/es/button/style */"+L6B"),i(/*! antd/es/button */"2/Rp")),s=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),l=(i(/*! antd/es/message/style */"miYZ"),i(/*! antd/es/message */"tsqr")),c=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),u=i.n(c),h=i(/*! react */"q1tI"),d=i.n(h),f=i(/*! @/utils/env */"m3rI"),p=i(/*! @/pages/MoopCases/FormPanel/service */"wzkS"),g="  ";function m(t){if(0==t)return"0 Byte";var e=parseInt(""+Math.floor(Math.log(t)/Math.log(1024)),10);return(t/Math.pow(1024,e)).toFixed(1)+" "+["Bytes","KB","MB","GB","TB"][e]}e.b=function(t){var e,i=t.value,c=void 0===i?[]:i,h=(t.action,t.onChange),v=t.className,y=t.maxSize,b=void 0===y?150:y,x=t.title,S=void 0===x?"文件上传":x,C=t.accept,w={multiple:!1,fileList:c,accept:void 0===C?null:C,withCredentials:!0,beforeUpload:function(t){return t.size/1024/10240?"每次只能上传一个资源, 删除下面资源可重新上传 ":"",disabled:c.length>0,ghost:!0},S),d.a.createElement("span",{onClick:function(t){t.preventDefault(),t.stopPropagation()},style:{marginLeft:10}},"(单个文件最大",b,"M) ")))}},zgC5: /*!*********************************************************************************!*\ !*** ./src/pages/Classrooms/Lists/CommonHomework/SubmitWork/index.less?modules ***! \*********************************************************************************/ /*! no static exports found */ /*! exports used: default */ -/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){t.exports={flex_box_center:"flex_box_center___BgH5i",flex_space_between:"flex_space_between___wIrN2",flex_box_vertical_center:"flex_box_vertical_center___3s8_f",flex_box_center_end:"flex_box_center_end___25L_b",flex_box_column:"flex_box_column___3Ya3F",bg:"bg___OpMlc",flexRow:"flexRow___3MRDT",flexJustifyCenter:"flexJustifyCenter___2VqIU",flexAlignEnd:"flexAlignEnd___1zWKJ",flexAlignCenter:"flexAlignCenter___46F8K",flexColumn:"flexColumn___2WIH4",formWrap:"formWrap___1eB5i",titleWrap:"titleWrap___1Db7T",fieldWrap:"fieldWrap___2HdAq",mdWrap:"mdWrap___27bNI",backgroundFa:"backgroundFa___2EWsW",button:"button___1PabV",searchMember:"searchMember___2aVSB"}}}]); \ No newline at end of file +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports={flex_box_center:"flex_box_center___BgH5i",flex_space_between:"flex_space_between___wIrN2",flex_box_vertical_center:"flex_box_vertical_center___3s8_f",flex_box_center_end:"flex_box_center_end___25L_b",flex_box_column:"flex_box_column___3Ya3F",bg:"bg___OpMlc",flexRow:"flexRow___3MRDT",flexJustifyCenter:"flexJustifyCenter___2VqIU",flexAlignEnd:"flexAlignEnd___1zWKJ",flexAlignCenter:"flexAlignCenter___46F8K",flexColumn:"flexColumn___2WIH4",formWrap:"formWrap___1eB5i",titleWrap:"titleWrap___1Db7T",fieldWrap:"fieldWrap___2HdAq",mdWrap:"mdWrap___27bNI",titleWrapper:"titleWrapper___2YeUd",backgroundFa:"backgroundFa___2EWsW",button:"button___1PabV",searchMember:"searchMember___2aVSB"}}}]); \ No newline at end of file diff --git a/p__Classrooms__Lists__CommonHomework__SubmitWork__index.3c0dcba8.chunk.css b/p__Classrooms__Lists__CommonHomework__SubmitWork__index.27c5ea4f.chunk.css similarity index 95% rename from p__Classrooms__Lists__CommonHomework__SubmitWork__index.3c0dcba8.chunk.css rename to p__Classrooms__Lists__CommonHomework__SubmitWork__index.27c5ea4f.chunk.css index 9ea172bac1..d52d94fe0f 100644 --- a/p__Classrooms__Lists__CommonHomework__SubmitWork__index.3c0dcba8.chunk.css +++ b/p__Classrooms__Lists__CommonHomework__SubmitWork__index.27c5ea4f.chunk.css @@ -1217,11 +1217,16 @@ span.CodeMirror-selectedtext { box-orient: block-axis; } .bg___OpMlc { - margin: 0 auto; - width: 1200px; - margin-top: 20px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + width: 100vw; + position: relative; margin-bottom: 60px; padding-bottom: 140px; + background: #f5f5f5; + padding-top: 20px; } .flexRow___3MRDT { display: flex; @@ -1270,15 +1275,60 @@ span.CodeMirror-selectedtext { font-size: 14px; } .mdWrap___27bNI { + display: flex; background-color: #fff; - padding: 10px 20px 10px; margin-top: 10px; } +.mdWrap___27bNI .titleWrapper___2YeUd { + width: 424px; + max-height: 800px; + overflow: auto; + position: relative; + background: #fafafa; + padding-left: 30px; +} +.mdWrap___27bNI .titleWrapper___2YeUd div[class~='zuoyeTitle'] { + margin-top: 30px; + font-size: 16px; + margin-bottom: 30px; +} +.mdWrap___27bNI .titleWrapper___2YeUd div[class~='zuoyemiaosu'] { + display: flex; + align-items: center; + margin-bottom: 16px; +} +.mdWrap___27bNI .titleWrapper___2YeUd div[class~='zuoyemiaosu'] span[class~='icon'] { + width: 4px; + height: 14px; + background: #3a3a3a; + margin-right: 8px; +} +.mdWrap___27bNI .titleWrapper___2YeUd div[class~='zuoyemiaosu'] h4[class~='direction'] { + width: 56px; + height: 14px; +} +.mdWrap___27bNI .titleWrapper___2YeUd div[class~='zuoyemiaosu'] button[class~='btnWrapper'] { + position: absolute; + bottom: 30px; + left: 30px; +} .mdWrap___27bNI div[class~='ant-form-item-label'] label { font-size: 14px; } .backgroundFa___2EWsW { - background: #fafafa; + position: absolute; + width: 100vw; + bottom: 0; + display: flex; + justify-content: center; + align-items: center; + height: 64px; + margin-top: 30px; + background: #ffffff linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%); + box-shadow: 0px -2px 4px 0px #e0dfe1, inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5); +} +.backgroundFa___2EWsW [class~='ant-form-item'] { + margin-bottom: 0 !important; } .button___1PabV { width: 130px; diff --git a/p__Classrooms__Lists__CommonHomework__index.2f04e044.async.js b/p__Classrooms__Lists__CommonHomework__index.2f04e044.async.js index b3a40f159e..50254ec561 100644 --- a/p__Classrooms__Lists__CommonHomework__index.2f04e044.async.js +++ b/p__Classrooms__Lists__CommonHomework__index.2f04e044.async.js @@ -735,14 +735,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__CourseGroup__Detail__index.65985715.async.js b/p__Classrooms__Lists__CourseGroup__Detail__index.65985715.async.js index 5e8f8e939d..83ec5635e2 100644 --- a/p__Classrooms__Lists__CourseGroup__Detail__index.65985715.async.js +++ b/p__Classrooms__Lists__CourseGroup__Detail__index.65985715.async.js @@ -218,14 +218,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__CourseGroup__List__index.6cbdf689.async.js b/p__Classrooms__Lists__CourseGroup__List__index.6cbdf689.async.js index db80b11704..ba68d29805 100644 --- a/p__Classrooms__Lists__CourseGroup__List__index.6cbdf689.async.js +++ b/p__Classrooms__Lists__CourseGroup__List__index.6cbdf689.async.js @@ -431,14 +431,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__CourseGroup__NotList__index.8592d714.async.js b/p__Classrooms__Lists__CourseGroup__NotList__index.8592d714.async.js index f932de2f7f..fc44b3c659 100644 --- a/p__Classrooms__Lists__CourseGroup__NotList__index.8592d714.async.js +++ b/p__Classrooms__Lists__CourseGroup__NotList__index.8592d714.async.js @@ -332,14 +332,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Exercise__Answer__index.fd7c57b2.async.js b/p__Classrooms__Lists__Exercise__Answer__index.fd7c57b2.async.js index c288623cf6..a9aa7ff193 100644 --- a/p__Classrooms__Lists__Exercise__Answer__index.fd7c57b2.async.js +++ b/p__Classrooms__Lists__Exercise__Answer__index.fd7c57b2.async.js @@ -1254,14 +1254,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Exercise__Detail__components__DuplicateChecking__CheckDetail.42829a26.async.js b/p__Classrooms__Lists__Exercise__Detail__components__DuplicateChecking__CheckDetail.42829a26.async.js index 3099ca59a2..26f7877ac1 100644 --- a/p__Classrooms__Lists__Exercise__Detail__components__DuplicateChecking__CheckDetail.42829a26.async.js +++ b/p__Classrooms__Lists__Exercise__Detail__components__DuplicateChecking__CheckDetail.42829a26.async.js @@ -224,14 +224,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Exercise__Detail__index.617732cc.async.js b/p__Classrooms__Lists__Exercise__Detail__index.617732cc.async.js index 207b700f42..e25452a28f 100644 --- a/p__Classrooms__Lists__Exercise__Detail__index.617732cc.async.js +++ b/p__Classrooms__Lists__Exercise__Detail__index.617732cc.async.js @@ -2216,14 +2216,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Exercise__Edit__index.57ad17c6.async.js b/p__Classrooms__Lists__Exercise__Edit__index.57ad17c6.async.js index fe624ce432..125a8c9423 100644 --- a/p__Classrooms__Lists__Exercise__Edit__index.57ad17c6.async.js +++ b/p__Classrooms__Lists__Exercise__Edit__index.57ad17c6.async.js @@ -1092,14 +1092,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Exercise__Export__index.67a710d8.async.js b/p__Classrooms__Lists__Exercise__Export__index.67a710d8.async.js index 33e6c6ea85..fa21bf5178 100644 --- a/p__Classrooms__Lists__Exercise__Export__index.67a710d8.async.js +++ b/p__Classrooms__Lists__Exercise__Export__index.67a710d8.async.js @@ -805,14 +805,14 @@ e.read=function(t,e,A,r,n){var i,s,o=8*n-r-1,a=(1<>1,c=-7,u=A?n-1:0,h= /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Exercise__ImitateAnswer__index.83e3cb68.async.js b/p__Classrooms__Lists__Exercise__ImitateAnswer__index.83e3cb68.async.js index d3165b05cb..3a9e9cd9e8 100644 --- a/p__Classrooms__Lists__Exercise__ImitateAnswer__index.83e3cb68.async.js +++ b/p__Classrooms__Lists__Exercise__ImitateAnswer__index.83e3cb68.async.js @@ -1193,14 +1193,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Exercise__Review__index.605d78c8.async.js b/p__Classrooms__Lists__Exercise__Review__index.605d78c8.async.js index a5821d721d..1d5ea6190d 100644 --- a/p__Classrooms__Lists__Exercise__Review__index.605d78c8.async.js +++ b/p__Classrooms__Lists__Exercise__Review__index.605d78c8.async.js @@ -858,14 +858,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Exercise__index.569f73fa.async.js b/p__Classrooms__Lists__Exercise__index.569f73fa.async.js index 23714257d9..abe95f65b5 100644 --- a/p__Classrooms__Lists__Exercise__index.569f73fa.async.js +++ b/p__Classrooms__Lists__Exercise__index.569f73fa.async.js @@ -600,14 +600,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__ExportList__index.331fabe3.async.js b/p__Classrooms__Lists__ExportList__index.331fabe3.async.js index 93034036e2..6a969ad71c 100644 --- a/p__Classrooms__Lists__ExportList__index.331fabe3.async.js +++ b/p__Classrooms__Lists__ExportList__index.331fabe3.async.js @@ -162,14 +162,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Graduation__Tasks__Detail__index.29fd2f1c.async.js b/p__Classrooms__Lists__Graduation__Tasks__Detail__index.29fd2f1c.async.js index 77df4a5581..8cb2d0423a 100644 --- a/p__Classrooms__Lists__Graduation__Tasks__Detail__index.29fd2f1c.async.js +++ b/p__Classrooms__Lists__Graduation__Tasks__Detail__index.29fd2f1c.async.js @@ -913,14 +913,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Graduation__Topics__Detail__index.a60338fd.async.js b/p__Classrooms__Lists__Graduation__Topics__Detail__index.a60338fd.async.js index 9063a0b3d5..ecbe470941 100644 --- a/p__Classrooms__Lists__Graduation__Topics__Detail__index.a60338fd.async.js +++ b/p__Classrooms__Lists__Graduation__Topics__Detail__index.a60338fd.async.js @@ -913,14 +913,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__GroupHomework__Detail__index.451c0363.async.js b/p__Classrooms__Lists__GroupHomework__Detail__index.451c0363.async.js index f1a74175cb..02e2b48560 100644 --- a/p__Classrooms__Lists__GroupHomework__Detail__index.451c0363.async.js +++ b/p__Classrooms__Lists__GroupHomework__Detail__index.451c0363.async.js @@ -1179,14 +1179,14 @@ t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<>1,u=-7,h=n?i-1:0,d= /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__GroupHomework__index.99f79f68.async.js b/p__Classrooms__Lists__GroupHomework__index.99f79f68.async.js index d25976d915..b60552aa23 100644 --- a/p__Classrooms__Lists__GroupHomework__index.99f79f68.async.js +++ b/p__Classrooms__Lists__GroupHomework__index.99f79f68.async.js @@ -728,14 +728,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Polls__Detail__index.514f1c6b.async.js b/p__Classrooms__Lists__Polls__Detail__index.514f1c6b.async.js index 0b876375ec..4bf1e78c2a 100644 --- a/p__Classrooms__Lists__Polls__Detail__index.514f1c6b.async.js +++ b/p__Classrooms__Lists__Polls__Detail__index.514f1c6b.async.js @@ -928,14 +928,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Polls__index.291adc09.async.js b/p__Classrooms__Lists__Polls__index.291adc09.async.js index 0e42b081e8..3acecdcecc 100644 --- a/p__Classrooms__Lists__Polls__index.291adc09.async.js +++ b/p__Classrooms__Lists__Polls__index.291adc09.async.js @@ -399,14 +399,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__ShixunHomeworks__Comment__index.a86aef84.async.js b/p__Classrooms__Lists__ShixunHomeworks__Comment__index.a86aef84.async.js index a6de9aa09d..685ebc5903 100644 --- a/p__Classrooms__Lists__ShixunHomeworks__Comment__index.a86aef84.async.js +++ b/p__Classrooms__Lists__ShixunHomeworks__Comment__index.a86aef84.async.js @@ -1547,14 +1547,14 @@ e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,A=(1<>1,c=-7,u=r?i-1:0,h= /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__ShixunHomeworks__Detail__components__CodeReview__Detail__index.b676f047.async.js b/p__Classrooms__Lists__ShixunHomeworks__Detail__components__CodeReview__Detail__index.b676f047.async.js index 7d5fa3175e..15416dd46c 100644 --- a/p__Classrooms__Lists__ShixunHomeworks__Detail__components__CodeReview__Detail__index.b676f047.async.js +++ b/p__Classrooms__Lists__ShixunHomeworks__Detail__components__CodeReview__Detail__index.b676f047.async.js @@ -231,14 +231,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__ShixunHomeworks__Detail__index.85b8a19c.async.js b/p__Classrooms__Lists__ShixunHomeworks__Detail__index.85b8a19c.async.js index 39b694c3b6..9806272892 100644 --- a/p__Classrooms__Lists__ShixunHomeworks__Detail__index.85b8a19c.async.js +++ b/p__Classrooms__Lists__ShixunHomeworks__Detail__index.85b8a19c.async.js @@ -1694,14 +1694,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__ShixunHomeworks__index.63160dcb.async.js b/p__Classrooms__Lists__ShixunHomeworks__index.63160dcb.async.js index b6b054e404..a4125a38d2 100644 --- a/p__Classrooms__Lists__ShixunHomeworks__index.63160dcb.async.js +++ b/p__Classrooms__Lists__ShixunHomeworks__index.63160dcb.async.js @@ -631,14 +631,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Statistics__StudentDetail.a83290d8.async.js b/p__Classrooms__Lists__Statistics__StudentDetail.a83290d8.async.js index 39555b10ab..50722c9d6e 100644 --- a/p__Classrooms__Lists__Statistics__StudentDetail.a83290d8.async.js +++ b/p__Classrooms__Lists__Statistics__StudentDetail.a83290d8.async.js @@ -242,14 +242,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Statistics__StudentStatistics__Detail__index.ffb2f105.async.js b/p__Classrooms__Lists__Statistics__StudentStatistics__Detail__index.ffb2f105.async.js index 9678e04073..56ced66e52 100644 --- a/p__Classrooms__Lists__Statistics__StudentStatistics__Detail__index.ffb2f105.async.js +++ b/p__Classrooms__Lists__Statistics__StudentStatistics__Detail__index.ffb2f105.async.js @@ -173,14 +173,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Statistics__StudentStatistics__index.33f3ee32.async.js b/p__Classrooms__Lists__Statistics__StudentStatistics__index.33f3ee32.async.js index 69ebae6a85..1fd71778f2 100644 --- a/p__Classrooms__Lists__Statistics__StudentStatistics__index.33f3ee32.async.js +++ b/p__Classrooms__Lists__Statistics__StudentStatistics__index.33f3ee32.async.js @@ -187,14 +187,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Statistics__StudentVideo__index.140b4956.async.js b/p__Classrooms__Lists__Statistics__StudentVideo__index.140b4956.async.js index 5fdadee157..ea1ccc14b3 100644 --- a/p__Classrooms__Lists__Statistics__StudentVideo__index.140b4956.async.js +++ b/p__Classrooms__Lists__Statistics__StudentVideo__index.140b4956.async.js @@ -174,14 +174,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Statistics__VideoStatistics__index.a00be8b8.async.js b/p__Classrooms__Lists__Statistics__VideoStatistics__index.a00be8b8.async.js index c11c4527b5..9110851109 100644 --- a/p__Classrooms__Lists__Statistics__VideoStatistics__index.a00be8b8.async.js +++ b/p__Classrooms__Lists__Statistics__VideoStatistics__index.a00be8b8.async.js @@ -887,14 +887,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Statistics__index.e47f1d45.async.js b/p__Classrooms__Lists__Statistics__index.e47f1d45.async.js index 7a27819d34..587e5ed688 100644 --- a/p__Classrooms__Lists__Statistics__index.e47f1d45.async.js +++ b/p__Classrooms__Lists__Statistics__index.e47f1d45.async.js @@ -921,14 +921,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Students.392f9698.async.js b/p__Classrooms__Lists__Students.392f9698.async.js index 2328aa1a23..3a59d530c5 100644 --- a/p__Classrooms__Lists__Students.392f9698.async.js +++ b/p__Classrooms__Lists__Students.392f9698.async.js @@ -324,14 +324,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Teachers.3cc078a1.async.js b/p__Classrooms__Lists__Teachers.3cc078a1.async.js index bde201c004..a8767521df 100644 --- a/p__Classrooms__Lists__Teachers.3cc078a1.async.js +++ b/p__Classrooms__Lists__Teachers.3cc078a1.async.js @@ -318,14 +318,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Video__Statistics__Detail__index.a1499569.async.js b/p__Classrooms__Lists__Video__Statistics__Detail__index.a1499569.async.js index 0c5d616856..4bbdee4119 100644 --- a/p__Classrooms__Lists__Video__Statistics__Detail__index.a1499569.async.js +++ b/p__Classrooms__Lists__Video__Statistics__Detail__index.a1499569.async.js @@ -163,14 +163,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Video__Statistics__StudentDetail__index.64bd87f2.async.js b/p__Classrooms__Lists__Video__Statistics__StudentDetail__index.64bd87f2.async.js index 4c72c73ad0..48942dd924 100644 --- a/p__Classrooms__Lists__Video__Statistics__StudentDetail__index.64bd87f2.async.js +++ b/p__Classrooms__Lists__Video__Statistics__StudentDetail__index.64bd87f2.async.js @@ -163,14 +163,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Classrooms__Lists__Video__Statistics__index.aeca7f05.async.js b/p__Classrooms__Lists__Video__Statistics__index.aeca7f05.async.js index 6ba3f33e15..8bc61fc7e9 100644 --- a/p__Classrooms__Lists__Video__Statistics__index.aeca7f05.async.js +++ b/p__Classrooms__Lists__Video__Statistics__index.aeca7f05.async.js @@ -168,14 +168,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Colleges__index.c582ef7d.async.js b/p__Colleges__index.c582ef7d.async.js index 56d71e6e2b..97dfccb46c 100644 --- a/p__Colleges__index.c582ef7d.async.js +++ b/p__Colleges__index.c582ef7d.async.js @@ -821,14 +821,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Competitions__Detail.106758b4.async.js b/p__Competitions__Detail.106758b4.async.js index 0bd1485068..4c1654893d 100644 --- a/p__Competitions__Detail.106758b4.async.js +++ b/p__Competitions__Detail.106758b4.async.js @@ -1332,14 +1332,14 @@ r.mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Competitions__Entered__Assembly__TeamDateil.e254d3c6.async.js b/p__Competitions__Entered__Assembly__TeamDateil.e254d3c6.async.js index 802965bc6b..966d5d4981 100644 --- a/p__Competitions__Entered__Assembly__TeamDateil.e254d3c6.async.js +++ b/p__Competitions__Entered__Assembly__TeamDateil.e254d3c6.async.js @@ -157,14 +157,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Engineering__Evaluate__Detail.3408a6f0.async.js b/p__Engineering__Evaluate__Detail.3408a6f0.async.js index d6be98179f..c34e7f5a17 100644 --- a/p__Engineering__Evaluate__Detail.3408a6f0.async.js +++ b/p__Engineering__Evaluate__Detail.3408a6f0.async.js @@ -848,14 +848,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Engineering__Evaluate__List.b7501678.async.js b/p__Engineering__Evaluate__List.b7501678.async.js index 7fb1f9dd96..ef4ce7f818 100644 --- a/p__Engineering__Evaluate__List.b7501678.async.js +++ b/p__Engineering__Evaluate__List.b7501678.async.js @@ -243,14 +243,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Engineering__Lists__CourseList.5618439e.async.js b/p__Engineering__Lists__CourseList.5618439e.async.js index c0fe2d325a..95422990ab 100644 --- a/p__Engineering__Lists__CourseList.5618439e.async.js +++ b/p__Engineering__Lists__CourseList.5618439e.async.js @@ -243,14 +243,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Engineering__Lists__CourseMatrix.020270e9.async.js b/p__Engineering__Lists__CourseMatrix.020270e9.async.js index c1004ae79d..c530dc175d 100644 --- a/p__Engineering__Lists__CourseMatrix.020270e9.async.js +++ b/p__Engineering__Lists__CourseMatrix.020270e9.async.js @@ -219,14 +219,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Engineering__Lists__CurseSetting.ab25d53c.async.js b/p__Engineering__Lists__CurseSetting.ab25d53c.async.js index f1de7330e2..8bc442ef03 100644 --- a/p__Engineering__Lists__CurseSetting.ab25d53c.async.js +++ b/p__Engineering__Lists__CurseSetting.ab25d53c.async.js @@ -370,14 +370,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Engineering__Lists__StudentList.8ed4140a.async.js b/p__Engineering__Lists__StudentList.8ed4140a.async.js index fc9917f32a..2f2df26f84 100644 --- a/p__Engineering__Lists__StudentList.8ed4140a.async.js +++ b/p__Engineering__Lists__StudentList.8ed4140a.async.js @@ -287,14 +287,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Engineering__Lists__TeacherList.15b05c5b.async.js b/p__Engineering__Lists__TeacherList.15b05c5b.async.js index a5e076c721..80589df75a 100644 --- a/p__Engineering__Lists__TeacherList.15b05c5b.async.js +++ b/p__Engineering__Lists__TeacherList.15b05c5b.async.js @@ -329,14 +329,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Engineering__Lists__TrainingProgram.87ac2393.async.js b/p__Engineering__Lists__TrainingProgram.87ac2393.async.js index 9cfa71c89a..85f8b2f16f 100644 --- a/p__Engineering__Lists__TrainingProgram.87ac2393.async.js +++ b/p__Engineering__Lists__TrainingProgram.87ac2393.async.js @@ -193,14 +193,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Engineering__Lists__TrainingProgram__Add.b683ce9c.async.js b/p__Engineering__Lists__TrainingProgram__Add.b683ce9c.async.js index b403c18022..75cae92086 100644 --- a/p__Engineering__Lists__TrainingProgram__Add.b683ce9c.async.js +++ b/p__Engineering__Lists__TrainingProgram__Add.b683ce9c.async.js @@ -214,14 +214,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Engineering__Lists__TrainingProgram__Edit.0c709959.async.js b/p__Engineering__Lists__TrainingProgram__Edit.0c709959.async.js index e33c302c39..b92e5ae9d9 100644 --- a/p__Engineering__Lists__TrainingProgram__Edit.0c709959.async.js +++ b/p__Engineering__Lists__TrainingProgram__Edit.0c709959.async.js @@ -214,14 +214,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Engineering__Norm__List.ca3b38b4.async.js b/p__Engineering__Norm__List.ca3b38b4.async.js index 98d04174a3..737d821ee9 100644 --- a/p__Engineering__Norm__List.ca3b38b4.async.js +++ b/p__Engineering__Norm__List.ca3b38b4.async.js @@ -330,14 +330,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Innovation__Detail.2d0ee525.async.js b/p__Innovation__Detail.2d0ee525.async.js index 6ac14e6a09..b10989c29f 100644 --- a/p__Innovation__Detail.2d0ee525.async.js +++ b/p__Innovation__Detail.2d0ee525.async.js @@ -816,14 +816,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Innovation__Edit.b1586d3f.async.js b/p__Innovation__Edit.b1586d3f.async.js index d25b60ea85..fd57ea0209 100644 --- a/p__Innovation__Edit.b1586d3f.async.js +++ b/p__Innovation__Edit.b1586d3f.async.js @@ -291,14 +291,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Innovation__MyDataSet.7d50353f.async.js b/p__Innovation__MyDataSet.7d50353f.async.js index 729de2de99..966644aaff 100644 --- a/p__Innovation__MyDataSet.7d50353f.async.js +++ b/p__Innovation__MyDataSet.7d50353f.async.js @@ -275,14 +275,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Innovation__MyMirror.f4812e8a.async.js b/p__Innovation__MyMirror.f4812e8a.async.js index 2a7ae06d9a..871cf5279e 100644 --- a/p__Innovation__MyMirror.f4812e8a.async.js +++ b/p__Innovation__MyMirror.f4812e8a.async.js @@ -275,14 +275,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Innovation__PublicDataSet.a7a9d7e0.async.js b/p__Innovation__PublicDataSet.a7a9d7e0.async.js index 771c1f5be0..ded0eb7046 100644 --- a/p__Innovation__PublicDataSet.a7a9d7e0.async.js +++ b/p__Innovation__PublicDataSet.a7a9d7e0.async.js @@ -280,14 +280,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Innovation__PublicMirror.20e66910.async.js b/p__Innovation__PublicMirror.20e66910.async.js index d625cc94c8..8c416b312b 100644 --- a/p__Innovation__PublicMirror.20e66910.async.js +++ b/p__Innovation__PublicMirror.20e66910.async.js @@ -238,14 +238,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Innovation__Tasks.e96877d5.async.js b/p__Innovation__Tasks.e96877d5.async.js index 568fe808e3..668a1ee555 100644 --- a/p__Innovation__Tasks.e96877d5.async.js +++ b/p__Innovation__Tasks.e96877d5.async.js @@ -1248,14 +1248,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__MyProblem__index.c067f4b0.async.js b/p__MyProblem__index.c067f4b0.async.js index 675bd6c713..38837b44ea 100644 --- a/p__MyProblem__index.c067f4b0.async.js +++ b/p__MyProblem__index.c067f4b0.async.js @@ -1179,14 +1179,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Paperlibrary__Random__Detail__index.a57f002c.async.js b/p__Paperlibrary__Random__Detail__index.a57f002c.async.js index 5f487831f6..612f1780dc 100644 --- a/p__Paperlibrary__Random__Detail__index.a57f002c.async.js +++ b/p__Paperlibrary__Random__Detail__index.a57f002c.async.js @@ -313,14 +313,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Paperlibrary__See__index.38143141.async.js b/p__Paperlibrary__See__index.38143141.async.js index 6401442333..7167b704b3 100644 --- a/p__Paperlibrary__See__index.38143141.async.js +++ b/p__Paperlibrary__See__index.38143141.async.js @@ -770,14 +770,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Paperlibrary__index.aec72d4d.async.js b/p__Paperlibrary__index.aec72d4d.async.js index 3f5f045460..d82df3f171 100644 --- a/p__Paperlibrary__index.aec72d4d.async.js +++ b/p__Paperlibrary__index.aec72d4d.async.js @@ -463,14 +463,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Paths__Detail__Statistics.960ab9dc.async.js b/p__Paths__Detail__Statistics.960ab9dc.async.js index d476e1fb0e..6b5eb3a166 100644 --- a/p__Paths__Detail__Statistics.960ab9dc.async.js +++ b/p__Paths__Detail__Statistics.960ab9dc.async.js @@ -936,14 +936,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Paths__Detail__id.b6d294da.async.js b/p__Paths__Detail__id.b6d294da.async.js index a2a8ec2f3e..7efbc763e5 100644 --- a/p__Paths__Detail__id.b6d294da.async.js +++ b/p__Paths__Detail__id.b6d294da.async.js @@ -2176,14 +2176,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Problemset__NewItem__index.561771fb.async.js b/p__Problemset__NewItem__index.561771fb.async.js index bbecd98152..abc20d1666 100644 --- a/p__Problemset__NewItem__index.561771fb.async.js +++ b/p__Problemset__NewItem__index.561771fb.async.js @@ -972,14 +972,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Question__AddOrEdit.726fe22c.async.js b/p__Question__AddOrEdit.726fe22c.async.js index c7cf6f352a..2219dd0611 100644 --- a/p__Question__AddOrEdit.726fe22c.async.js +++ b/p__Question__AddOrEdit.726fe22c.async.js @@ -1367,14 +1367,14 @@ n.mode.CTRGladman=function(){var e=n.lib.BlockCipherMode.extend();function t(e){ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Question__Index.beffb04b.async.js b/p__Question__Index.beffb04b.async.js index 98db6eab08..b1ab2158e4 100644 --- a/p__Question__Index.beffb04b.async.js +++ b/p__Question__Index.beffb04b.async.js @@ -738,14 +738,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Question__OjProblem.76e8bab1.async.js b/p__Question__OjProblem.76e8bab1.async.js index 22a91a3108..2e206a14ed 100644 --- a/p__Question__OjProblem.76e8bab1.async.js +++ b/p__Question__OjProblem.76e8bab1.async.js @@ -1423,14 +1423,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Shixuns__Detail__Collaborators__index.50f4e3f7.async.js b/p__Shixuns__Detail__Collaborators__index.50f4e3f7.async.js index c2e3d93cae..1d0f5294af 100644 --- a/p__Shixuns__Detail__Collaborators__index.50f4e3f7.async.js +++ b/p__Shixuns__Detail__Collaborators__index.50f4e3f7.async.js @@ -1350,14 +1350,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Shixuns__Detail__Dataset__index.257e264e.async.js b/p__Shixuns__Detail__Dataset__index.257e264e.async.js index 16b77875e9..8187f01306 100644 --- a/p__Shixuns__Detail__Dataset__index.257e264e.async.js +++ b/p__Shixuns__Detail__Dataset__index.257e264e.async.js @@ -1387,14 +1387,14 @@ n.mode.CTRGladman=function(){var e=n.lib.BlockCipherMode.extend();function t(e){ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Shixuns__Detail__Discuss__index.8192d2a3.async.js b/p__Shixuns__Detail__Discuss__index.8192d2a3.async.js index 98ddd281cd..8543ff3a40 100644 --- a/p__Shixuns__Detail__Discuss__index.8192d2a3.async.js +++ b/p__Shixuns__Detail__Discuss__index.8192d2a3.async.js @@ -1835,14 +1835,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Shixuns__Detail__ForkList__index.ba955cf5.async.js b/p__Shixuns__Detail__ForkList__index.ba955cf5.async.js index cbb0b15a96..1ebfc30f65 100644 --- a/p__Shixuns__Detail__ForkList__index.ba955cf5.async.js +++ b/p__Shixuns__Detail__ForkList__index.ba955cf5.async.js @@ -158,14 +158,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__Shixuns__Edit.ae96ed29.async.js b/p__Shixuns__Edit.ae96ed29.async.js index 37e6ed0ea4..339283fe2f 100644 --- a/p__Shixuns__Edit.ae96ed29.async.js +++ b/p__Shixuns__Edit.ae96ed29.async.js @@ -2136,14 +2136,14 @@ r.mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__User__Detail__Certificate__index.54daa7a3.async.js b/p__User__Detail__Certificate__index.54daa7a3.async.js index 07fb174f9a..6dd2a6c3d3 100644 --- a/p__User__Detail__Certificate__index.54daa7a3.async.js +++ b/p__User__Detail__Certificate__index.54daa7a3.async.js @@ -238,14 +238,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__User__Detail__Classrooms__index.7e00f196.async.js b/p__User__Detail__Classrooms__index.c4e169cb.async.js similarity index 96% rename from p__User__Detail__Classrooms__index.7e00f196.async.js rename to p__User__Detail__Classrooms__index.c4e169cb.async.js index 0d27f5e381..37153ddb72 100644 --- a/p__User__Detail__Classrooms__index.7e00f196.async.js +++ b/p__User__Detail__Classrooms__index.c4e169cb.async.js @@ -277,7 +277,7 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/moment/moment.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router-dom/esm/react-router-dom.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t);n("cWXX");var a=n("/ezw"),o=(n("DjyN"),n("NUBc")),r=(n("qVdP"),n("jsC+")),i=(n("lUTK"),n("BvKs")),c=(n("+L6B"),n("2/Rp")),s=(n("7Kak"),n("9yH6")),l=(n("miYZ"),n("tsqr")),u=n("k1fw"),d=n("9og8"),p=n("tJVT"),f=n("PpiC"),m=n("WmNS"),v=n.n(m),b=n("q1tI"),h=n.n(b),g=n("Ty5D"),A=n("55Ip"),E=n("9kvl"),y=n("lhx+"),C=n.n(y),O=n("BdwD"),k=(n("IzEo"),n("bx4M")),x=(n("14J3"),n("BMrR")),j=(n("jCWc"),n("kPKH")),S=(n("DYRE"),n("zeV3")),I=(n("5Dmo"),n("3S7+")),N=n("2m4C"),w=n.n(N),R=n("m3rI"),M=n("xKgJ"),B=function(e){var t=e.data,n=e.isStudent,a=e.openMoveClassroomModal;return h.a.createElement(h.a.Fragment,null,t&&t.map((function(e,t){var o,r;return h.a.createElement("div",{className:w.a.wrap},h.a.createElement(k.a,{className:"animated fadeIn ".concat(w.a.cardWrap)},h.a.createElement("a",{key:e.id,href:e.first_category_url,onClick:function(t){e.can_visited||t.preventDefault()}},1===e.is_public&&h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{className:0==t?"".concat(w.a.public," ").concat(w.a.borderFF6800):w.a.public}),h.a.createElement("span",{className:w.a.publicIcon}),h.a.createElement("span",{className:w.a.publicText},"公开")),!e.can_visited&&h.a.createElement("div",{className:w.a.lockWrap},h.a.createElement("div",{className:"mt80 mb25"},h.a.createElement("i",{className:"iconfont icon-guansuo ".concat(w.a.lockIcon)})),h.a.createElement("p",{className:w.a.lockText},Object(M.p)()?"非成员不能访问":"私有课堂,请登录再操作")),h.a.createElement("div",{className:w.a.topWrap},h.a.createElement("p",{className:w.a.title},e.name),h.a.createElement("span",null,h.a.createElement("img",{className:w.a.img,alt:"用户",height:"50",width:"50",src:"".concat(R.a.API_SERVER).concat(e.avatar_url)})),h.a.createElement("p",{className:w.a.teacherName},n?h.a.createElement("span",{title:e.teacher_names,className:w.a.teacherNames},e.teacher_names):h.a.createElement("span",null,null===(o=e.teacher)||void 0===o?void 0:o.real_name)),!n&&h.a.createElement("div",{className:w.a.teacherUsers},!(null===(r=e.teacher_users)||void 0===r||!r.length)&&h.a.createElement("span",{className:w.a.color989898},"教学团队:",e.teacher_users.map((function(e,t){return h.a.createElement("span",{className:"ml5",key:t},e)})))))),h.a.createElement("div",{className:w.a.bottomWrap},n?h.a.createElement("div",{className:w.a.bottom},e.visits>0&&h.a.createElement(I.a,{placement:"bottom",title:"访问量"},h.a.createElement("span",{className:w.a.bottomIconSpan},h.a.createElement("i",{className:"iconfont icon-liulanyan mr3"}),e.visits)),e.members_count>0&&h.a.createElement(I.a,{placement:"bottom",title:"成员"},h.a.createElement("span",{className:w.a.bottomIconSpan},h.a.createElement("i",{className:"iconfont icon-chengyuan mr3"}),e.members_count)),e.homework_commons_count>0&&h.a.createElement(I.a,{placement:"bottom",title:"作业"},h.a.createElement("span",{className:w.a.bottomIconSpan},h.a.createElement("i",{className:"iconfont icon-zuoye mr3"}),e.homework_commons_count))):h.a.createElement(x.a,{align:"middle",justify:"space-between",className:w.a.teacherBottomWrapper},h.a.createElement(j.a,null,h.a.createElement(S.a,{size:12},e.visits>0&&h.a.createElement(I.a,{placement:"bottom",title:"访问量"},h.a.createElement("span",{className:w.a.bottomIconSpan},h.a.createElement("i",{className:"iconfont icon-liulanyan mr3"}),e.visits)),e.members_count>0&&h.a.createElement(I.a,{placement:"bottom",title:"成员"},h.a.createElement("span",{className:w.a.bottomIconSpan},h.a.createElement("i",{className:"iconfont icon-chengyuan mr3"}),e.members_count)),e.homework_commons_count>0&&h.a.createElement(I.a,{placement:"bottom",title:"作业"},h.a.createElement("span",{className:w.a.bottomIconSpan},h.a.createElement("i",{className:"iconfont icon-zuoye mr3"}),e.homework_commons_count)))),h.a.createElement(j.a,{className:w.a.linkBtn,onClick:function(t){a(e.id)}},h.a.createElement("span",null,"移动到"))))))})))},D=(n("g9YV"),n("wCAj")),T=n("wd/R"),Q=n.n(T),K=n("1vsH"),J=function(e){var t=e.data,n=e.number,a=[{title:h.a.createElement("span",{className:"pl20"},"序号"),dataIndex:"index",key:"index",width:82,className:"pl20",render:function(e,t,a){return h.a.createElement("span",{className:"pl20"},n+a+1)}},{title:"课堂名称",dataIndex:"name",width:324,key:"name",render:function(e){return h.a.createElement(I.a,{title:e,placement:"bottomLeft"},h.a.createElement("span",null,e))}},{title:"管理员",dataIndex:"teacher",key:"teacher",width:64,ellipsis:!0,render:function(e){return h.a.createElement(I.a,{title:(null==e?void 0:e.real_name)||"--",placement:"bottomLeft"},h.a.createElement("span",null,(null==e?void 0:e.real_name)||"--"))}},{title:"教学团队",dataIndex:"teacher_users",key:"teacher_users",width:138,ellipsis:!0,render:function(e){return h.a.createElement(I.a,{title:e.join("、"),placement:"bottomLeft"},h.a.createElement("span",null,e.join("、")))}},{title:"访问次数",dataIndex:"visits",width:94,key:"visits"},{title:"课堂成员",dataIndex:"members_count",width:94,key:"members_count"},{title:"作业数量",dataIndex:"homework_commons_count",width:94,key:"homework_commons_count"},{title:"创建时间",dataIndex:"created_at",key:"created_at",width:148,render:function(e){return Q()(e).format("YYYY-MM-DD HH:mm")}},{title:"状态",dataIndex:"is_end",key:"is_end",width:80,render:function(e){return e?"已结束":"正在进行"}},{title:"操作",dataIndex:"name",key:"name",width:62,render:function(e,t){return t.can_visited?h.a.createElement("span",{className:"c-blue current",onClick:function(e){e.stopPropagation(),Object(K.O)(t.first_category_url)}},"详情"):h.a.createElement(I.a,{title:Object(M.p)()?"非成员不能访问":"私有课堂,请登录再操作"},h.a.createElement("span",{className:"c-grey-999"},"详情"))}}];return h.a.createElement(h.a.Fragment,null,h.a.createElement(D.a,{style:{cursor:"pointer"},onRow:function(e){return{onClick:function(t){e.can_visited&&window.open("".concat(null==e?void 0:e.first_category_url),"_blank")}}},className:"table-layout bg-white",pagination:!1,dataSource:t,columns:a}))},P=n("xtZ4"),z=n.n(P),L=function(e){var t=e.params,n=void 0===t?{}:t,a=e.isCurrent,o=e.handleChangeCategory,r=void 0===o?function(){}:o,i=e.handleChangeStatus,c=void 0===i?function(){}:i;return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{className:z.a.searchBar},h.a.createElement("li",{className:"".concat(z.a.firstLi," ").concat(!n.category&&z.a.active)},h.a.createElement("a",{onClick:function(){return r("")}},"全部")),h.a.createElement("li",{className:"".concat(z.a.otherLi," ").concat("manage"===n.category&&z.a.active)},h.a.createElement("a",{onClick:function(){return r("manage")}},a?"我":"TA","管理的")),h.a.createElement("li",{className:"".concat(z.a.otherLi," ").concat("study"===n.category&&z.a.active)},h.a.createElement("a",{onClick:function(){return r("study")}},a?"我":"TA","学习的"))),a&&h.a.createElement("div",{className:"".concat(z.a.searchBar," ").concat(z.a.searchBarBorder)},h.a.createElement("li",{className:"font14 ".concat(z.a.firstLi," ").concat(!n.status&&z.a.active)},h.a.createElement("a",{onClick:function(){return c("")}},"全部")),h.a.createElement("li",{className:"font14 ".concat(z.a.otherLi," ").concat("processing"===n.status&&z.a.active)},h.a.createElement("a",{onClick:function(){return c("processing")}},"正在进行")),h.a.createElement("li",{className:"font14 ".concat(z.a.otherLi," ").concat("end"===n.status&&z.a.active)},h.a.createElement("a",{onClick:function(){return c("end")}},"已结束"))))},U=n("dhSg"),V=n("lzim"),Z=n("Jky8"),W=(n("5NDa"),n("5rEg")),F=(n("2qtc"),n("kLXV")),G=n("TD4W"),Y=n.n(G),H=n("jb+D"),q=function(e){var t=e.data,n=e.onOpen,a=void 0===n?function(){}:n,o=e.onMove,r=void 0===o?function(){}:o,i=e.onRenameOk,s=void 0===i?function(){}:i,u=e.onDeleteOk,f=void 0===u?function(){}:u,m=Object(b.useState)(!1),g=Object(p.a)(m,2),A=g[0],E=g[1],y=Object(b.useState)(""),C=Object(p.a)(y,2),O=C[0],k=C[1];Object(b.useEffect)((function(){t.name&&k(null==t?void 0:t.name)}),[null==t?void 0:t.name]);var x=function(){var e=Object(d.a)(v.a.mark((function e(t){var n,a;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=["?","、","/","╲","*","<",">","|"],O.trim()){e.next=4;break}return l.b.warn("请输入文件夹名称"),e.abrupt("return");case 4:if(" "!==O.charAt(0)){e.next=7;break}return l.b.warn("首字符不能为空格"),e.abrupt("return");case 7:a=0;case 8:if(!(a0,o=null==t?void 0:t.id;return{title:h.a.createElement("div",{title:null==t?void 0:t.name,className:$.a.name},null==t?void 0:t.name),key:o,icon:h.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:a?null==n?void 0:n.map((function(t){return e(t)})):[]}}(e)}))},d=a?{defaultExpandedKeys:[0]}:{selectedKeys:t,defaultExpandedKeys:t};return h.a.createElement("div",{className:$.a.customTree},s.length>0&&h.a.createElement(ee.a,Object(te.a)({},d,{showIcon:!0,treeData:s,onSelect:n,disabled:o})))},ae=function(e){var t=e.onOk,n=e.visible,a=e.onCancel,o=e.data,r=e.currentFolderId,i=Object(b.useState)(""),c=Object(p.a)(i,2),s=c[0],u=c[1],f=Object(b.useState)([0]),m=Object(p.a)(f,2),g=m[0],A=m[1];Object(b.useEffect)((function(){A([r]),u("")}),[r]);var E=function(){var e=Object(d.a)(v.a.mark((function e(){var n,o,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=["?","、","/","╲","*","<",">","|"],s.trim()){e.next=4;break}return l.b.warn("请输入文件夹名称"),e.abrupt("return");case 4:if(" "!==s.charAt(0)){e.next=7;break}return l.b.warn("首字符不能为空格"),e.abrupt("return");case 7:o=0;case 8:if(!(o0?g[0]:0,name:s});case 17:0===(r=e.sent).status&&(a(),t(null==r?void 0:r.course_folder_id));case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return h.a.createElement(F.a,{centered:!0,title:"新建文件夹",visible:n,width:500,onCancel:a,onOk:E,destroyOnClose:!0},h.a.createElement("div",{className:$.a.addModal},h.a.createElement("div",{className:$.a.row},h.a.createElement("span",{className:$.a.label},"文件夹名称: "),h.a.createElement(W.a,{placeholder:"请输入文件夹名称",value:s,onChange:function(e){return u(e.target.value)}})),h.a.createElement("div",{className:$.a.row,style:{alignItems:"start",maxHeight:500,overflow:"auto"}},h.a.createElement("span",{className:$.a.label},"文件夹位置: "),h.a.createElement(ne,{value:g,onChange:function(e){return A(e)},data:o}))))},oe=function(e){e.onOk;var t=e.visible,n=e.onCancel,a=e.data,o=e.currentFolderId,r=e.moveClassId,i=Object(b.useState)([0]),c=Object(p.a)(i,2),s=c[0],l=c[1];Object(b.useEffect)((function(){l([o])}),[o]);var u=function(){var e=Object(d.a)(v.a.mark((function e(){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(H.h)(s.length>0?s[0]:0,{course_id:r});case 2:0===e.sent.status&&n();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return h.a.createElement(F.a,{centered:!0,title:"移动到",visible:t,width:500,onCancel:n,onOk:u,destroyOnClose:!0},h.a.createElement("div",{className:$.a.addModal},h.a.createElement("div",null,"请选择需要移动到的文件夹"),h.a.createElement("div",{style:{alignItems:"start",maxHeight:500,overflow:"auto"}},h.a.createElement(ne,{value:s,onChange:function(e){return l(e)},data:a}))))},re=n("NLgs");t.default=Object(E.a)((function(e){var t=e.user,n=e.userDetail,a=e.loading;return{user:t,userDetail:n,globalSetting:e.globalSetting,loading:a.effects}}))((function(e){var t,n,m,E,y=e.user,k=(e.userDetail,e.globalSetting,e.loading),x=e.dispatch,j=(Object(f.a)(e,["user","userDetail","globalSetting","loading","dispatch"]),Object(g.h)()),S=Object(b.useState)({}),I=Object(p.a)(S,2),N=I[0],w=I[1],R=Object(b.useRef)(),D=Object(b.useState)(0),T=Object(p.a)(D,2),Q=T[0],K=T[1],P=Object(b.useState)([]),z=Object(p.a)(P,2),W=z[0],F=z[1],G=Object(b.useState)(),Y=Object(p.a)(G,2),_=Y[0],$=Y[1],ee=Object(b.useState)(),te=Object(p.a)(ee,2),ne=te[0],ie=te[1],ce=Object(b.useState)(),se=Object(p.a)(ce,2),le=se[0],ue=se[1],de=Object(b.useState)(),pe=Object(p.a)(de,2),fe=pe[0],me=pe[1],ve=Object(b.useState)(!1),be=Object(p.a)(ve,2),he=be[0],ge=be[1],Ae=Object(b.useState)(!1),Ee=Object(p.a)(Ae,2),ye=Ee[0],Ce=Ee[1],Oe=Object(b.useState)(!1),ke=Object(p.a)(Oe,2),xe=ke[0],je=ke[1],Se=Object(b.useState)(!1),Ie=Object(p.a)(Se,2),Ne=Ie[0],we=Ie[1],Re=Object(b.useState)([{label:h.a.createElement("span",{className:"icon-juxingfenbu font14"}),value:1},{label:h.a.createElement("span",{className:"icon-liebiaofenbu font14"}),value:2}]),Me=Object(p.a)(Re,2),Be=Me[0],De=(Me[1],Object(b.useState)(parseInt(localStorage.getItem("ClassShowType"))||1)),Te=Object(p.a)(De,2),Qe=Te[0],Ke=Te[1],Je=Object(b.useState)(!0),Pe=Object(p.a)(Je,2),ze=Pe[0],Le=Pe[1];Object(b.useEffect)((function(){var e;R.current=null===(e=j.pathname.split("/"))||void 0===e?void 0:e[2];var t={category:void 0,status:void 0,page:1,per_page:16,sort_by:"updated_at",sort_direction:"desc",username:R.current,course_folder_id:void 0};w(t),Ze(t).then((function(e){ie(null==e?void 0:e.course_folders)}))}),[j.pathname]),Object(b.useEffect)((function(){var e;me((null===(e=y.userInfo)||void 0===e?void 0:e.login)===R.current)}),[null===(t=y.userInfo)||void 0===t?void 0:t.login,R.current]);var Ue=(null===(n=j.pathname.split("/"))||void 0===n?void 0:n[3])||"classrooms";Object(b.useEffect)((function(){return U.a.subscribe("user-detail-search",function(){var e=Object(d.a)(v.a.mark((function e(t){var n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ue!==t.currentTabName){e.next=7;break}return n={category:void 0,status:void 0,page:1,per_page:16,sort_by:"updated_at",sort_direction:"desc",username:R.current,search:t.value},w(n),ge(!1),e.next=6,Ze(n);case 6:ge(!0);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}),[fe]);var Ve,Ze=function(){var e=Object(d.a)(v.a.mark((function e(t){var n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x({type:"userDetail/getCourses",payload:t});case 2:return(n=e.sent)&&(K(n.count||0),F(n.courses||[]),$(n.course_folders||[]),ue(n.navigation||[])),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),We=function(){N.sort_direction="desc"===N.sort_direction?"asc":"desc",w(N),Ze(N)},Fe=function(e){N.sort_by=e,N.sort_direction="desc",w(N),Ze(N)},Ge=function(e){var t=Object(u.a)(Object(u.a)({},N),{},{page:1,course_folder_id:e});w(t),Ze(t)};!function(e){e.Projects="projects",e.Shixuns="shixuns",e.Classrooms="classrooms"}(Ve||(Ve={}));var Ye=Object(b.useState)(!1),He=Object(p.a)(Ye,2),qe=He[0],Xe=He[1],_e=Object(b.useState)(0),$e=Object(p.a)(_e,2),et=$e[0],tt=$e[1],nt=function(){var e=Object(d.a)(v.a.mark((function e(t){var n,a;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={page:1,per_page:16,sort_by:"updated_at",sort_direction:"desc",username:R.current},e.next=3,x({type:"userDetail/getCourses",payload:n});case 3:a=e.sent,tt(t),ie(null==a?void 0:a.course_folders),Xe(!0);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{className:C.a.wrap},N.search?h.a.createElement(h.a.Fragment,null,he&&h.a.createElement("div",{className:"font17 mt5 mb5"},h.a.createElement("span",{className:"c-grey-999"},"关键词:"),h.a.createElement("span",{className:"c-grey-333"},N.search," "),h.a.createElement("span",{className:"c-grey-999"},"共找到"),h.a.createElement("span",{className:"c-grey-333"}," ",Q," "),h.a.createElement("span",{className:"c-grey-999"},"门相关教学课堂"))):h.a.createElement(h.a.Fragment,null,h.a.createElement(L,{params:N,isCurrent:fe,handleChangeCategory:function(e){N.category=e,N.page=1,w(N),Ze(N)},handleChangeStatus:function(e){N.status=e,N.page=1,w(N),Ze(N)}}),h.a.createElement("div",{className:C.a.midWrap},h.a.createElement("div",null,h.a.createElement("span",{className:C.a.color999},"共参与",Q,"个",N.category?"manage"===N.category?"发布":"学习":"课堂"),h.a.createElement(s.a.Group,{className:"ml20 mr20 radio-group-sort-order",options:Be,onChange:function(e){Ke(e.target.value),localStorage.setItem("ClassShowType",e.target.value)},value:Qe,optionType:"button",buttonStyle:"solid"}),"student"!==(null===(m=y.userInfo)||void 0===m?void 0:m.identity)||Object(M.v)()?h.a.createElement(h.a.Fragment,null,h.a.createElement(A.a,{style:{margin:"0px 20px"},to:"/classrooms/new"},h.a.createElement(c.a,{type:"primary"},"新建教学课堂")),h.a.createElement(c.a,{type:"primary",loading:xe,onClick:Object(d.a)(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={page:1,per_page:16,sort_by:"updated_at",sort_direction:"desc",username:R.current},je(!0),e.next=4,Ze(t);case 4:n=e.sent,ie(null==n?void 0:n.course_folders),je(!1),we(!0);case 8:case"end":return e.stop()}}),e)})))},"新建文件夹")):h.a.createElement(c.a,{onClick:function(){return e=Ve.Classrooms,void(Object(re.e)(x)&&(e!==Ve.Projects||null!==(t=y.userInfo)&&void 0!==t&&t.email?e===Ve.Classrooms&&Ce(!0):l.b.info("请先绑定邮箱,谢谢")));var e,t},type:"primary"},"加入教学课堂")),h.a.createElement("div",{className:C.a.orderWrap},h.a.createElement(r.a,{overlay:h.a.createElement(i.a,null,h.a.createElement(i.a.Item,{onClick:function(){return Fe("updated_at")}},"最新动态"),h.a.createElement(i.a.Item,{onClick:function(){return Fe("created_at")}},"最新创建"),h.a.createElement(i.a.Item,{onClick:function(){return Fe("name")}},"名称排序"))},h.a.createElement("span",{className:C.a.orderTextWrap},"updated_at"===N.sort_by?"最新动态":"created_at"===N.sort_by?"最新创建":"name"===N.sort_by?"名称排序":"")),h.a.createElement("span",{className:C.a.orderIconWrap},h.a.createElement("span",{className:C.a.orderAsc},h.a.createElement("i",{className:"asc"===N.sort_direction?"iconfont icon-sanjiaoxing-up font12 ".concat(C.a.color0152d9," ").concat(C.a.h10," ").concat(C.a.cursorPointer):"iconfont icon-sanjiaoxing-up font12 ".concat(C.a.h10," ").concat(C.a.cursorPointer),onClick:function(){return We()}})),h.a.createElement("span",{className:C.a.orderDesc},h.a.createElement("i",{className:"desc"===N.sort_direction?"iconfont icon-sanjiaoxing-down font12 ".concat(C.a.color0152d9," ").concat(C.a.h10," ").concat(C.a.cursorPointer):"iconfont icon-sanjiaoxing-down font12 ".concat(C.a.h10," ").concat(C.a.cursorPointer),onClick:function(){return We()}})))))),"student"!==(null===(E=y.userInfo)||void 0===E?void 0:E.identity)&&h.a.createElement("div",{className:C.a.folderWrapper},h.a.createElement(X.a,{data:le,onClick:Ge}),null==_?void 0:_.map((function(e){return h.a.createElement(q,{data:e,key:e.id,onMove:function(){var e=Object(d.a)(v.a.mark((function e(t,n){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(H.D)(t,{type:n});case 2:0===e.sent.status&&Ze(N);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),onOpen:Ge,onRenameOk:function(){return Ze(N)},onDeleteOk:function(){return Ze(N)}})}))),h.a.createElement(a.a,{loading:k["userDetail/getCourses"],active:!0,paragraph:{rows:5}},1==Qe&&h.a.createElement("div",{className:C.a.cardWrap},!W.length&&(N.category||N.search||!N.category&&"学生"===y.userInfo.user_identity)&&h.a.createElement(O.a,null),h.a.createElement(B,{data:W,isStudent:"学生"===y.userInfo.user_identity,openMoveClassroomModal:function(e){return nt(e)}})),1!=Qe&&h.a.createElement("div",{className:"mt10",style:{minHeight:400}},h.a.createElement(J,{number:(N.page-1)*N.per_page,data:W})),Q>0&&h.a.createElement("div",{className:C.a.countWrap},h.a.createElement(o.a,{showQuickJumper:!0,showSizeChanger:!0,pageSizeOptions:["10","20","50","100","200"],total:Q,onChange:function(e,t){!function(e,t){N.page=e,N.per_page=t,w(N),Ze(N)}(e,t)},pageSize:N.per_page,hideOnSinglePage:!0,current:N.page})))),y&&y.userInfo&&"student"===y.userInfo.identity&&h.a.createElement("div",{className:"".concat(C.a.affixContainer," ").concat(ze?C.a.qrcode:C.a.text)},ze&&h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{className:C.a.img},h.a.createElement("img",{src:V.a})),h.a.createElement("div",{className:C.a.tips},"【扫码加入大学圈】"),h.a.createElement("div",{className:C.a.close,onClick:function(){return Le(!ze)}},h.a.createElement("i",{className:"iconfont icon-guanbidanchuang"}))),!ze&&h.a.createElement("div",{onClick:function(){return Le(!ze)}},"加入大学圈")),h.a.createElement(Z.a,{visible:ye,onCancel:function(){return Ce(!1)}}),h.a.createElement(ae,{visible:Ne,onCancel:function(){return we(!1)},data:ne,currentFolderId:N.course_folder_id,onOk:function(e){Ze(Object(u.a)(Object(u.a)({},N),{},{page:1,course_folder_id:e}))}}),h.a.createElement(oe,{visible:qe,onCancel:function(){return Xe(!1)},data:ne,moveClassId:et,currentFolderId:N.course_folder_id,onOk:function(e){Ze(Object(u.a)(Object(u.a)({},N),{},{page:1,course_folder_id:e}))}}))}))},Nmxd: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t);n("cWXX");var a=n("/ezw"),o=(n("DjyN"),n("NUBc")),r=(n("qVdP"),n("jsC+")),i=(n("lUTK"),n("BvKs")),c=(n("+L6B"),n("2/Rp")),s=(n("7Kak"),n("9yH6")),l=(n("miYZ"),n("tsqr")),u=n("k1fw"),d=n("9og8"),p=n("tJVT"),f=n("PpiC"),m=n("WmNS"),v=n.n(m),b=n("q1tI"),h=n.n(b),g=n("Ty5D"),A=n("55Ip"),E=n("9kvl"),y=n("lhx+"),C=n.n(y),O=n("BdwD"),k=(n("IzEo"),n("bx4M")),x=(n("14J3"),n("BMrR")),j=(n("jCWc"),n("kPKH")),S=(n("DYRE"),n("zeV3")),I=(n("5Dmo"),n("3S7+")),N=n("2m4C"),w=n.n(N),R=n("m3rI"),M=n("xKgJ"),B=function(e){var t=e.data,n=e.isStudent,a=e.openMoveClassroomModal;return h.a.createElement(h.a.Fragment,null,t&&t.map((function(e,t){var o,r;return h.a.createElement("div",{className:w.a.wrap},h.a.createElement(k.a,{className:"animated fadeIn ".concat(w.a.cardWrap)},h.a.createElement("a",{key:e.id,href:e.first_category_url,onClick:function(t){e.can_visited||t.preventDefault()}},1===e.is_public&&h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{className:0==t?"".concat(w.a.public," ").concat(w.a.borderFF6800):w.a.public}),h.a.createElement("span",{className:w.a.publicIcon}),h.a.createElement("span",{className:w.a.publicText},"公开")),!e.can_visited&&h.a.createElement("div",{className:w.a.lockWrap},h.a.createElement("div",{className:"mt80 mb25"},h.a.createElement("i",{className:"iconfont icon-guansuo ".concat(w.a.lockIcon)})),h.a.createElement("p",{className:w.a.lockText},Object(M.p)()?"非成员不能访问":"私有课堂,请登录再操作")),h.a.createElement("div",{className:w.a.topWrap},h.a.createElement("p",{className:w.a.title},e.name),h.a.createElement("span",null,h.a.createElement("img",{className:w.a.img,alt:"用户",height:"50",width:"50",src:"".concat(R.a.API_SERVER).concat(e.avatar_url)})),h.a.createElement("p",{className:w.a.teacherName},n?h.a.createElement("span",{title:e.teacher_names,className:w.a.teacherNames},e.teacher_names):h.a.createElement("span",null,null===(o=e.teacher)||void 0===o?void 0:o.real_name)),!n&&h.a.createElement("div",{className:w.a.teacherUsers},!(null===(r=e.teacher_users)||void 0===r||!r.length)&&h.a.createElement("span",{className:w.a.color989898},"教学团队:",e.teacher_users.map((function(e,t){return h.a.createElement("span",{className:"ml5",key:t},e)})))))),h.a.createElement("div",{className:w.a.bottomWrap},n?h.a.createElement("div",{className:w.a.bottom},e.visits>0&&h.a.createElement(I.a,{placement:"bottom",title:"访问量"},h.a.createElement("span",{className:w.a.bottomIconSpan},h.a.createElement("i",{className:"iconfont icon-liulanyan mr3"}),e.visits)),e.members_count>0&&h.a.createElement(I.a,{placement:"bottom",title:"成员"},h.a.createElement("span",{className:w.a.bottomIconSpan},h.a.createElement("i",{className:"iconfont icon-chengyuan mr3"}),e.members_count)),e.homework_commons_count>0&&h.a.createElement(I.a,{placement:"bottom",title:"作业"},h.a.createElement("span",{className:w.a.bottomIconSpan},h.a.createElement("i",{className:"iconfont icon-zuoye mr3"}),e.homework_commons_count))):h.a.createElement(x.a,{align:"middle",justify:"space-between",className:w.a.teacherBottomWrapper},h.a.createElement(j.a,null,h.a.createElement(S.a,{size:12},e.visits>0&&h.a.createElement(I.a,{placement:"bottom",title:"访问量"},h.a.createElement("span",{className:w.a.bottomIconSpan},h.a.createElement("i",{className:"iconfont icon-liulanyan mr3"}),e.visits)),e.members_count>0&&h.a.createElement(I.a,{placement:"bottom",title:"成员"},h.a.createElement("span",{className:w.a.bottomIconSpan},h.a.createElement("i",{className:"iconfont icon-chengyuan mr3"}),e.members_count)),e.homework_commons_count>0&&h.a.createElement(I.a,{placement:"bottom",title:"作业"},h.a.createElement("span",{className:w.a.bottomIconSpan},h.a.createElement("i",{className:"iconfont icon-zuoye mr3"}),e.homework_commons_count)))),h.a.createElement(j.a,{className:w.a.linkBtn,onClick:function(t){a(e.id)}},h.a.createElement("span",null,"移动到"))))))})))},D=(n("g9YV"),n("wCAj")),T=n("wd/R"),Q=n.n(T),K=n("1vsH"),J=function(e){var t=e.data,n=e.number,a=[{title:h.a.createElement("span",{className:"pl20"},"序号"),dataIndex:"index",key:"index",width:82,className:"pl20",render:function(e,t,a){return h.a.createElement("span",{className:"pl20"},n+a+1)}},{title:"课堂名称",dataIndex:"name",width:324,key:"name",render:function(e){return h.a.createElement(I.a,{title:e,placement:"bottomLeft"},h.a.createElement("span",null,e))}},{title:"管理员",dataIndex:"teacher",key:"teacher",width:64,ellipsis:!0,render:function(e){return h.a.createElement(I.a,{title:(null==e?void 0:e.real_name)||"--",placement:"bottomLeft"},h.a.createElement("span",null,(null==e?void 0:e.real_name)||"--"))}},{title:"教学团队",dataIndex:"teacher_users",key:"teacher_users",width:138,ellipsis:!0,render:function(e){return h.a.createElement(I.a,{title:e.join("、"),placement:"bottomLeft"},h.a.createElement("span",null,e.join("、")))}},{title:"访问次数",dataIndex:"visits",width:94,key:"visits"},{title:"课堂成员",dataIndex:"members_count",width:94,key:"members_count"},{title:"作业数量",dataIndex:"homework_commons_count",width:94,key:"homework_commons_count"},{title:"创建时间",dataIndex:"created_at",key:"created_at",width:148,render:function(e){return Q()(e).format("YYYY-MM-DD HH:mm")}},{title:"状态",dataIndex:"is_end",key:"is_end",width:80,render:function(e){return e?"已结束":"正在进行"}},{title:"操作",dataIndex:"name",key:"name",width:62,render:function(e,t){return t.can_visited?h.a.createElement("span",{className:"c-blue current",onClick:function(e){e.stopPropagation(),Object(K.O)(t.first_category_url)}},"详情"):h.a.createElement(I.a,{title:Object(M.p)()?"非成员不能访问":"私有课堂,请登录再操作"},h.a.createElement("span",{className:"c-grey-999"},"详情"))}}];return h.a.createElement(h.a.Fragment,null,h.a.createElement(D.a,{style:{cursor:"pointer"},onRow:function(e){return{onClick:function(t){e.can_visited&&window.open("".concat(null==e?void 0:e.first_category_url),"_blank")}}},className:"table-layout bg-white",pagination:!1,dataSource:t,columns:a}))},P=n("xtZ4"),z=n.n(P),L=function(e){var t=e.params,n=void 0===t?{}:t,a=e.isCurrent,o=e.handleChangeCategory,r=void 0===o?function(){}:o,i=e.handleChangeStatus,c=void 0===i?function(){}:i;return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{className:z.a.searchBar},h.a.createElement("li",{className:"".concat(z.a.firstLi," ").concat(!n.category&&z.a.active)},h.a.createElement("a",{onClick:function(){return r("")}},"全部")),h.a.createElement("li",{className:"".concat(z.a.otherLi," ").concat("manage"===n.category&&z.a.active)},h.a.createElement("a",{onClick:function(){return r("manage")}},a?"我":"TA","管理的")),h.a.createElement("li",{className:"".concat(z.a.otherLi," ").concat("study"===n.category&&z.a.active)},h.a.createElement("a",{onClick:function(){return r("study")}},a?"我":"TA","学习的"))),a&&h.a.createElement("div",{className:"".concat(z.a.searchBar," ").concat(z.a.searchBarBorder)},h.a.createElement("li",{className:"font14 ".concat(z.a.firstLi," ").concat(!n.status&&z.a.active)},h.a.createElement("a",{onClick:function(){return c("")}},"全部")),h.a.createElement("li",{className:"font14 ".concat(z.a.otherLi," ").concat("processing"===n.status&&z.a.active)},h.a.createElement("a",{onClick:function(){return c("processing")}},"正在进行")),h.a.createElement("li",{className:"font14 ".concat(z.a.otherLi," ").concat("end"===n.status&&z.a.active)},h.a.createElement("a",{onClick:function(){return c("end")}},"已结束"))))},U=n("dhSg"),V=n("lzim"),Z=n("Jky8"),W=(n("5NDa"),n("5rEg")),F=(n("2qtc"),n("kLXV")),G=n("TD4W"),Y=n.n(G),H=n("jb+D"),q=function(e){var t=e.data,n=e.onOpen,a=void 0===n?function(){}:n,o=e.onMove,r=void 0===o?function(){}:o,i=e.onRenameOk,s=void 0===i?function(){}:i,u=e.onDeleteOk,f=void 0===u?function(){}:u,m=Object(b.useState)(!1),g=Object(p.a)(m,2),A=g[0],E=g[1],y=Object(b.useState)(""),C=Object(p.a)(y,2),O=C[0],k=C[1];Object(b.useEffect)((function(){t.name&&k(null==t?void 0:t.name)}),[null==t?void 0:t.name]);var x=function(){var e=Object(d.a)(v.a.mark((function e(t){var n,a;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=["?","、","/","╲","*","<",">","|"],O.trim()){e.next=4;break}return l.b.warn("请输入文件夹名称"),e.abrupt("return");case 4:if(" "!==O.charAt(0)){e.next=7;break}return l.b.warn("首字符不能为空格"),e.abrupt("return");case 7:a=0;case 8:if(!(a0,o=null==t?void 0:t.id;return{title:h.a.createElement("div",{title:null==t?void 0:t.name,className:$.a.name},null==t?void 0:t.name),key:o,icon:h.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:a?null==n?void 0:n.map((function(t){return e(t)})):[]}}(e)}))},d=a?{defaultExpandedKeys:[0]}:{selectedKeys:t,defaultExpandedKeys:t};return h.a.createElement("div",{className:$.a.customTree},s.length>0&&h.a.createElement(ee.a,Object(te.a)({},d,{showIcon:!0,treeData:s,onSelect:n,disabled:o})))},ae=function(e){var t=e.onOk,n=e.visible,a=e.onCancel,o=e.data,r=e.currentFolderId,i=Object(b.useState)(""),c=Object(p.a)(i,2),s=c[0],u=c[1],f=Object(b.useState)([0]),m=Object(p.a)(f,2),g=m[0],A=m[1];Object(b.useEffect)((function(){A([r]),u("")}),[r]);var E=function(){var e=Object(d.a)(v.a.mark((function e(){var n,o,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=["?","、","/","╲","*","<",">","|"],s.trim()){e.next=4;break}return l.b.warn("请输入文件夹名称"),e.abrupt("return");case 4:if(" "!==s.charAt(0)){e.next=7;break}return l.b.warn("首字符不能为空格"),e.abrupt("return");case 7:o=0;case 8:if(!(o0?g[0]:0,name:s});case 17:0===(r=e.sent).status&&(a(),t(null==r?void 0:r.course_folder_id));case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return h.a.createElement(F.a,{centered:!0,title:"新建文件夹",visible:n,width:500,onCancel:a,onOk:E,destroyOnClose:!0},h.a.createElement("div",{className:$.a.addModal},h.a.createElement("div",{className:$.a.row},h.a.createElement("span",{className:$.a.label},"文件夹名称: "),h.a.createElement(W.a,{placeholder:"请输入文件夹名称",value:s,onChange:function(e){return u(e.target.value)}})),h.a.createElement("div",{className:$.a.row,style:{alignItems:"start",maxHeight:500,overflow:"auto"}},h.a.createElement("span",{className:$.a.label},"文件夹位置: "),h.a.createElement(ne,{value:g,onChange:function(e){return A(e)},data:o}))))},oe=function(e){var t=e.onOk,n=e.visible,a=e.onCancel,o=e.data,r=e.currentFolderId,i=e.moveClassId,c=Object(b.useState)([0]),s=Object(p.a)(c,2),l=s[0],u=s[1];Object(b.useEffect)((function(){u([r])}),[r]);var f=function(){var e=Object(d.a)(v.a.mark((function e(){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(H.h)(l.length>0?l[0]:0,{course_id:i});case 2:0===e.sent.status&&(a(),t());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return h.a.createElement(F.a,{centered:!0,title:"移动到",visible:n,width:500,onCancel:a,onOk:f,destroyOnClose:!0},h.a.createElement("div",{className:$.a.addModal},h.a.createElement("div",null,"请选择需要移动到的文件夹"),h.a.createElement("div",{style:{alignItems:"start",maxHeight:500,overflow:"auto"}},h.a.createElement(ne,{value:l,onChange:function(e){return u(e)},data:o}))))},re=n("NLgs");t.default=Object(E.a)((function(e){var t=e.user,n=e.userDetail,a=e.loading;return{user:t,userDetail:n,globalSetting:e.globalSetting,loading:a.effects}}))((function(e){var t,n,m,E,y=e.user,k=(e.userDetail,e.globalSetting,e.loading),x=e.dispatch,j=(Object(f.a)(e,["user","userDetail","globalSetting","loading","dispatch"]),Object(g.h)()),S=Object(b.useState)({}),I=Object(p.a)(S,2),N=I[0],w=I[1],R=Object(b.useRef)(),D=Object(b.useState)(0),T=Object(p.a)(D,2),Q=T[0],K=T[1],P=Object(b.useState)([]),z=Object(p.a)(P,2),W=z[0],F=z[1],G=Object(b.useState)(),Y=Object(p.a)(G,2),_=Y[0],$=Y[1],ee=Object(b.useState)(),te=Object(p.a)(ee,2),ne=te[0],ie=te[1],ce=Object(b.useState)(),se=Object(p.a)(ce,2),le=se[0],ue=se[1],de=Object(b.useState)(),pe=Object(p.a)(de,2),fe=pe[0],me=pe[1],ve=Object(b.useState)(!1),be=Object(p.a)(ve,2),he=be[0],ge=be[1],Ae=Object(b.useState)(!1),Ee=Object(p.a)(Ae,2),ye=Ee[0],Ce=Ee[1],Oe=Object(b.useState)(!1),ke=Object(p.a)(Oe,2),xe=ke[0],je=ke[1],Se=Object(b.useState)(!1),Ie=Object(p.a)(Se,2),Ne=Ie[0],we=Ie[1],Re=Object(b.useState)([{label:h.a.createElement("span",{className:"icon-juxingfenbu font14"}),value:1},{label:h.a.createElement("span",{className:"icon-liebiaofenbu font14"}),value:2}]),Me=Object(p.a)(Re,2),Be=Me[0],De=(Me[1],Object(b.useState)(parseInt(localStorage.getItem("ClassShowType"))||1)),Te=Object(p.a)(De,2),Qe=Te[0],Ke=Te[1],Je=Object(b.useState)(!0),Pe=Object(p.a)(Je,2),ze=Pe[0],Le=Pe[1];Object(b.useEffect)((function(){var e;R.current=null===(e=j.pathname.split("/"))||void 0===e?void 0:e[2];var t={category:void 0,status:void 0,page:1,per_page:16,sort_by:"updated_at",sort_direction:"desc",username:R.current,course_folder_id:void 0};w(t),Ze(t).then((function(e){ie(null==e?void 0:e.course_folders)}))}),[j.pathname]),Object(b.useEffect)((function(){var e;me((null===(e=y.userInfo)||void 0===e?void 0:e.login)===R.current)}),[null===(t=y.userInfo)||void 0===t?void 0:t.login,R.current]);var Ue=(null===(n=j.pathname.split("/"))||void 0===n?void 0:n[3])||"classrooms";Object(b.useEffect)((function(){return U.a.subscribe("user-detail-search",function(){var e=Object(d.a)(v.a.mark((function e(t){var n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ue!==t.currentTabName){e.next=7;break}return n={category:void 0,status:void 0,page:1,per_page:16,sort_by:"updated_at",sort_direction:"desc",username:R.current,search:t.value},w(n),ge(!1),e.next=6,Ze(n);case 6:ge(!0);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}),[fe]);var Ve,Ze=function(){var e=Object(d.a)(v.a.mark((function e(t){var n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x({type:"userDetail/getCourses",payload:t});case 2:return(n=e.sent)&&(K(n.count||0),F(n.courses||[]),$(n.course_folders||[]),ue(n.navigation||[])),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),We=function(){N.sort_direction="desc"===N.sort_direction?"asc":"desc",w(N),Ze(N)},Fe=function(e){N.sort_by=e,N.sort_direction="desc",w(N),Ze(N)},Ge=function(e){var t=Object(u.a)(Object(u.a)({},N),{},{page:1,course_folder_id:e});w(t),Ze(t)};!function(e){e.Projects="projects",e.Shixuns="shixuns",e.Classrooms="classrooms"}(Ve||(Ve={}));var Ye=Object(b.useState)(!1),He=Object(p.a)(Ye,2),qe=He[0],Xe=He[1],_e=Object(b.useState)(0),$e=Object(p.a)(_e,2),et=$e[0],tt=$e[1],nt=function(){var e=Object(d.a)(v.a.mark((function e(t){var n,a;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={page:1,per_page:16,sort_by:"updated_at",sort_direction:"desc",username:R.current},e.next=3,x({type:"userDetail/getCourses",payload:n});case 3:a=e.sent,tt(t),ie(null==a?void 0:a.course_folders),Xe(!0);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{className:C.a.wrap},N.search?h.a.createElement(h.a.Fragment,null,he&&h.a.createElement("div",{className:"font17 mt5 mb5"},h.a.createElement("span",{className:"c-grey-999"},"关键词:"),h.a.createElement("span",{className:"c-grey-333"},N.search," "),h.a.createElement("span",{className:"c-grey-999"},"共找到"),h.a.createElement("span",{className:"c-grey-333"}," ",Q," "),h.a.createElement("span",{className:"c-grey-999"},"门相关教学课堂"))):h.a.createElement(h.a.Fragment,null,h.a.createElement(L,{params:N,isCurrent:fe,handleChangeCategory:function(e){N.category=e,N.page=1,w(N),Ze(N)},handleChangeStatus:function(e){N.status=e,N.page=1,w(N),Ze(N)}}),h.a.createElement("div",{className:C.a.midWrap},h.a.createElement("div",null,h.a.createElement("span",{className:C.a.color999},"共参与",Q,"个",N.category?"manage"===N.category?"发布":"学习":"课堂"),h.a.createElement(s.a.Group,{className:"ml20 mr20 radio-group-sort-order",options:Be,onChange:function(e){Ke(e.target.value),localStorage.setItem("ClassShowType",e.target.value)},value:Qe,optionType:"button",buttonStyle:"solid"}),"student"!==(null===(m=y.userInfo)||void 0===m?void 0:m.identity)||Object(M.v)()?h.a.createElement(h.a.Fragment,null,h.a.createElement(A.a,{style:{margin:"0px 20px"},to:"/classrooms/new"},h.a.createElement(c.a,{type:"primary"},"新建教学课堂")),h.a.createElement(c.a,{type:"primary",loading:xe,onClick:Object(d.a)(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={page:1,per_page:16,sort_by:"updated_at",sort_direction:"desc",username:R.current},je(!0),e.next=4,Ze(t);case 4:n=e.sent,ie(null==n?void 0:n.course_folders),je(!1),we(!0);case 8:case"end":return e.stop()}}),e)})))},"新建文件夹")):h.a.createElement(c.a,{onClick:function(){return e=Ve.Classrooms,void(Object(re.e)(x)&&(e!==Ve.Projects||null!==(t=y.userInfo)&&void 0!==t&&t.email?e===Ve.Classrooms&&Ce(!0):l.b.info("请先绑定邮箱,谢谢")));var e,t},type:"primary"},"加入教学课堂")),h.a.createElement("div",{className:C.a.orderWrap},h.a.createElement(r.a,{overlay:h.a.createElement(i.a,null,h.a.createElement(i.a.Item,{onClick:function(){return Fe("updated_at")}},"最新动态"),h.a.createElement(i.a.Item,{onClick:function(){return Fe("created_at")}},"最新创建"),h.a.createElement(i.a.Item,{onClick:function(){return Fe("name")}},"名称排序"))},h.a.createElement("span",{className:C.a.orderTextWrap},"updated_at"===N.sort_by?"最新动态":"created_at"===N.sort_by?"最新创建":"name"===N.sort_by?"名称排序":"")),h.a.createElement("span",{className:C.a.orderIconWrap},h.a.createElement("span",{className:C.a.orderAsc},h.a.createElement("i",{className:"asc"===N.sort_direction?"iconfont icon-sanjiaoxing-up font12 ".concat(C.a.color0152d9," ").concat(C.a.h10," ").concat(C.a.cursorPointer):"iconfont icon-sanjiaoxing-up font12 ".concat(C.a.h10," ").concat(C.a.cursorPointer),onClick:function(){return We()}})),h.a.createElement("span",{className:C.a.orderDesc},h.a.createElement("i",{className:"desc"===N.sort_direction?"iconfont icon-sanjiaoxing-down font12 ".concat(C.a.color0152d9," ").concat(C.a.h10," ").concat(C.a.cursorPointer):"iconfont icon-sanjiaoxing-down font12 ".concat(C.a.h10," ").concat(C.a.cursorPointer),onClick:function(){return We()}})))))),"student"!==(null===(E=y.userInfo)||void 0===E?void 0:E.identity)&&h.a.createElement("div",{className:C.a.folderWrapper},h.a.createElement(X.a,{data:le,onClick:Ge}),null==_?void 0:_.map((function(e){return h.a.createElement(q,{data:e,key:e.id,onMove:function(){var e=Object(d.a)(v.a.mark((function e(t,n){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(H.D)(t,{type:n});case 2:0===e.sent.status&&Ze(N);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),onOpen:Ge,onRenameOk:function(){return Ze(N)},onDeleteOk:function(){return Ze(N)}})}))),h.a.createElement(a.a,{loading:k["userDetail/getCourses"],active:!0,paragraph:{rows:5}},1==Qe&&h.a.createElement("div",{className:C.a.cardWrap},!W.length&&(N.category||N.search||!N.category&&"学生"===y.userInfo.user_identity)&&h.a.createElement(O.a,null),h.a.createElement(B,{data:W,isStudent:"学生"===y.userInfo.user_identity,openMoveClassroomModal:function(e){return nt(e)}})),1!=Qe&&h.a.createElement("div",{className:"mt10",style:{minHeight:400}},h.a.createElement(J,{number:(N.page-1)*N.per_page,data:W})),Q>0&&h.a.createElement("div",{className:C.a.countWrap},h.a.createElement(o.a,{showQuickJumper:!0,showSizeChanger:!0,pageSizeOptions:["10","20","50","100","200"],total:Q,onChange:function(e,t){!function(e,t){N.page=e,N.per_page=t,w(N),Ze(N)}(e,t)},pageSize:N.per_page,hideOnSinglePage:!0,current:N.page})))),y&&y.userInfo&&"student"===y.userInfo.identity&&h.a.createElement("div",{className:"".concat(C.a.affixContainer," ").concat(ze?C.a.qrcode:C.a.text)},ze&&h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{className:C.a.img},h.a.createElement("img",{src:V.a})),h.a.createElement("div",{className:C.a.tips},"【扫码加入大学圈】"),h.a.createElement("div",{className:C.a.close,onClick:function(){return Le(!ze)}},h.a.createElement("i",{className:"iconfont icon-guanbidanchuang"}))),!ze&&h.a.createElement("div",{onClick:function(){return Le(!ze)}},"加入大学圈")),h.a.createElement(Z.a,{visible:ye,onCancel:function(){return Ce(!1)}}),h.a.createElement(ae,{visible:Ne,onCancel:function(){return we(!1)},data:ne,currentFolderId:N.course_folder_id,onOk:function(e){Ze(Object(u.a)(Object(u.a)({},N),{},{page:1,course_folder_id:e}))}}),h.a.createElement(oe,{visible:qe,onCancel:function(){return Xe(!1)},data:ne,moveClassId:et,currentFolderId:N.course_folder_id,onOk:function(){Ze(Object(u.a)(Object(u.a)({},N),{},{page:1}))}}))}))},Nmxd: /*!*******************************************!*\ !*** ./src/assets/images/icons/done2.png ***! \*******************************************/ @@ -615,14 +615,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__User__Detail__ExperImentImg__index.3ebca0a5.async.js b/p__User__Detail__ExperImentImg__index.3ebca0a5.async.js index 98eb7cf74a..bfaed65386 100644 --- a/p__User__Detail__ExperImentImg__index.3ebca0a5.async.js +++ b/p__User__Detail__ExperImentImg__index.3ebca0a5.async.js @@ -724,14 +724,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__User__Detail__LearningPath__index.19784108.async.js b/p__User__Detail__LearningPath__index.19784108.async.js index c0c9c878e8..9b696335c3 100644 --- a/p__User__Detail__LearningPath__index.19784108.async.js +++ b/p__User__Detail__LearningPath__index.19784108.async.js @@ -191,14 +191,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__User__Detail__OtherResources__index.3a3f8543.async.js b/p__User__Detail__OtherResources__index.3a3f8543.async.js index a9532e4600..41662acde1 100644 --- a/p__User__Detail__OtherResources__index.3a3f8543.async.js +++ b/p__User__Detail__OtherResources__index.3a3f8543.async.js @@ -183,14 +183,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__User__Detail__Paths__index.fefa264c.async.js b/p__User__Detail__Paths__index.fefa264c.async.js index a391893508..4a873e88a7 100644 --- a/p__User__Detail__Paths__index.fefa264c.async.js +++ b/p__User__Detail__Paths__index.fefa264c.async.js @@ -276,14 +276,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__User__Detail__Shixuns__index.3c46dfb9.async.js b/p__User__Detail__Shixuns__index.3c46dfb9.async.js index a99042c75b..c8dc665188 100644 --- a/p__User__Detail__Shixuns__index.3c46dfb9.async.js +++ b/p__User__Detail__Shixuns__index.3c46dfb9.async.js @@ -317,14 +317,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__User__Detail__TeachGroup__index.3ede873c.async.js b/p__User__Detail__TeachGroup__index.3ede873c.async.js index c1365695e9..3f03b18190 100644 --- a/p__User__Detail__TeachGroup__index.3ede873c.async.js +++ b/p__User__Detail__TeachGroup__index.3ede873c.async.js @@ -274,14 +274,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__tasks__index.4f9c2e86.async.js b/p__tasks__index.4f9c2e86.async.js index a2b7f6b559..6b232e4bca 100644 --- a/p__tasks__index.4f9c2e86.async.js +++ b/p__tasks__index.4f9c2e86.async.js @@ -2193,14 +2193,14 @@ PERFORMANCE OF THIS SOFTWARE. /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/p__virtualSpaces__Lists__Member__index.409ba5f4.async.js b/p__virtualSpaces__Lists__Member__index.409ba5f4.async.js index b1fb96eaeb..b233add308 100644 --- a/p__virtualSpaces__Lists__Member__index.409ba5f4.async.js +++ b/p__virtualSpaces__Lists__Member__index.409ba5f4.async.js @@ -508,14 +508,14 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ diff --git a/umi.ae9d5b11.js b/umi.f0fe5ce8.js similarity index 98% rename from umi.ae9d5b11.js rename to umi.f0fe5ce8.js index d3e8a24ae1..cb877d7734 100644 --- a/umi.ae9d5b11.js +++ b/umi.f0fe5ce8.js @@ -1,4 +1,4 @@ -!function(e){function t(t){for(var r,a,c=t[0],u=t[1],s=t[2],l=0,f=[];l1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return{};var n=t.element,r=void 0===n?document.body:n,a={},o=Object.keys(e);return o.forEach((function(e){a[e]=r.style[e]})),o.forEach((function(t){r.style[t]=e[t]})),a};var h={},m=function(e){if(document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth||e){var t=new RegExp("".concat("ant-scrolling-effect"),"g"),n=document.body.className;if(e){if(!t.test(n))return;return d(h),h={},void(document.body.className=n.replace(t,"").trim())}var r=Object(f.a)();if(r&&(h=d({position:"relative",width:"calc(100% - ".concat(r,"px)")}),!t.test(n))){var a="".concat(n," ").concat("ant-scrolling-effect");document.body.className=a.trim()}}},b=n("KQm4"),y=[],v=new RegExp("".concat("ant-scrolling-effect"),"g"),g=0,_=new Map,x=function e(t){var n=this;Object(r.a)(this,e),this.lockTarget=void 0,this.options=void 0,this.getContainer=function(){var e;return null===(e=n.options)||void 0===e?void 0:e.container},this.reLock=function(e){var t=y.find((function(e){return e.target===n.lockTarget}));t&&n.unLock(),n.options=e,t&&(t.options=e,n.lock())},this.lock=function(){var e;if(!y.some((function(e){return e.target===n.lockTarget})))if(y.some((function(e){var t,r=e.options;return(null==r?void 0:r.container)===(null===(t=n.options)||void 0===t?void 0:t.container)})))y=[].concat(Object(b.a)(y),[{target:n.lockTarget,options:n.options}]);else{var t=0,r=(null===(e=n.options)||void 0===e?void 0:e.container)||document.body;(r===document.body&&window.innerWidth-document.documentElement.clientWidth>0||r.scrollHeight>r.clientHeight)&&(t=Object(f.a)());var a=r.className;if(0===y.filter((function(e){var t,r=e.options;return(null==r?void 0:r.container)===(null===(t=n.options)||void 0===t?void 0:t.container)})).length&&_.set(r,d({width:0!==t?"calc(100% - ".concat(t,"px)"):void 0,overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},{element:r})),!v.test(a)){var o="".concat(a," ").concat("ant-scrolling-effect");r.className=o.trim()}y=[].concat(Object(b.a)(y),[{target:n.lockTarget,options:n.options}])}},this.unLock=function(){var e,t=y.find((function(e){return e.target===n.lockTarget}));if(y=y.filter((function(e){return e.target!==n.lockTarget})),t&&!y.some((function(e){var n,r=e.options;return(null==r?void 0:r.container)===(null===(n=t.options)||void 0===n?void 0:n.container)}))){var r=(null===(e=n.options)||void 0===e?void 0:e.container)||document.body,a=r.className;v.test(a)&&(d(_.get(r),{element:r}),_.delete(r),r.className=r.className.replace(v,"").trim())}},this.lockTarget=g++,this.options=t},w=0,j=Object(p.a)();var O={},k=function(e){if(!j)return null;if(e){if("string"==typeof e)return document.querySelectorAll(e)[0];if("function"==typeof e)return e();if("object"===Object(c.a)(e)&&e instanceof window.HTMLElement)return e}return document.body},E=function(e){Object(o.a)(n,e);var t=Object(i.a)(n);function n(e){var a;return Object(r.a)(this,n),(a=t.call(this,e)).container=void 0,a.componentRef=u.createRef(),a.rafId=void 0,a.scrollLocker=void 0,a.renderComponent=void 0,a.updateScrollLocker=function(e){var t=(e||{}).visible,n=a.props,r=n.getContainer,o=n.visible;o&&o!==t&&j&&k(r)!==a.scrollLocker.getContainer()&&a.scrollLocker.reLock({container:k(r)})},a.updateOpenCount=function(e){var t=e||{},n=t.visible,r=t.getContainer,o=a.props,i=o.visible,c=o.getContainer;i!==n&&j&&k(c)===document.body&&(i&&!n?w+=1:e&&(w-=1)),("function"==typeof c&&"function"==typeof r?c.toString()!==r.toString():c!==r)&&a.removeCurrentContainer()},a.attachToParent=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||a.container&&!a.container.parentNode){var t=k(a.props.getContainer);return!!t&&(t.appendChild(a.container),!0)}return!0},a.getContainer=function(){return j?(a.container||(a.container=document.createElement("div"),a.attachToParent(!0)),a.setWrapperClassName(),a.container):null},a.setWrapperClassName=function(){var e=a.props.wrapperClassName;a.container&&e&&e!==a.container.className&&(a.container.className=e)},a.removeCurrentContainer=function(){var e,t;null===(e=a.container)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(a.container)},a.switchScrollingEffect=function(){1!==w||Object.keys(O).length?w||(d(O),O={},m(!0)):(m(),O=d({overflow:"hidden",overflowX:"hidden",overflowY:"hidden"}))},a.scrollLocker=new x({container:k(e.getContainer)}),a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var e=this;this.updateOpenCount(),this.attachToParent()||(this.rafId=Object(s.a)((function(){e.forceUpdate()})))}},{key:"componentDidUpdate",value:function(e){this.updateOpenCount(e),this.updateScrollLocker(e),this.setWrapperClassName(),this.attachToParent()}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.visible,n=e.getContainer;j&&k(n)===document.body&&(w=t&&w?w-1:w),this.removeCurrentContainer(),s.a.cancel(this.rafId)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.forceRender,r=e.visible,a=null,o={getOpenCount:function(){return w},getContainer:this.getContainer,switchScrollingEffect:this.switchScrollingEffect,scrollLocker:this.scrollLocker};return(n||r||this.componentRef.current)&&(a=u.createElement(l.a,{getContainer:this.getContainer,ref:this.componentRef},t(o))),a}}]),n}(u.Component);t.a=E},"1WJl": @@ -311,11 +311,11 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/pages/tasks/index.jsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/Exercise/ip.tsx because of ./src/pages/Classrooms/Lists/Exercise/ImitateAnswer/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./src/components/mediator.js because of ./src/pages/Editor/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/mediator.js because of ./src/pages/MyProblem/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/service/exercise.ts because of ./src/components/PreviewAll/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts because of ./src/pages/virtualSpaces/Lists/Syllabuses/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts because of ./src/pages/Innovation/MyProject/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts because of ./src/pages/Account/Binding/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fullscreen.ts because of ./src/pages/Demo/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fullscreen.ts because of ./src/pages/tasks/vnc-view/vnc-panel/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js */ @@ -648,21 +648,21 @@ /*! exports provided: Field, List, useForm, FormProvider, default */ /*! all exports used */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./node_modules/rc-tabs/node_modules/rc-trigger/es/Popup/useVisibleStatus.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./node_modules/antd/es/modal/Modal.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./node_modules/antd/es/modal/Modal.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./node_modules/antd/es/modal/Modal.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/@ant-design/icons/es/utils.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./node_modules/antd/es/modal/Modal.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./node_modules/@ant-design/icons/es/utils.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./node_modules/dva/dist/index.esm.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./node_modules/dva/dist/index.esm.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./node_modules/antd/node_modules/rc-checkbox/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/dva/dist/index.esm.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./node_modules/dva/dist/index.esm.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./node_modules/rc-tree/es/util.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./node_modules/rc-util/es/hooks/useMergedState.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toArray.js because of ./node_modules/rc-select/es/utils/valueUtil.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./node_modules/rc-tree/es/utils/treeUtil.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./node_modules/rc-tree/es/util.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/dva/dist/index.esm.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/async-validator/dist-web/index.js (<- Module uses injected variables (process)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-field-form/es/FieldContext.js because of ./node_modules/antd/es/form/FormItem.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js because of ./node_modules/rc-tree/es/utils/treeUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js because of ./node_modules/antd/es/auto-complete/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js because of ./node_modules/antd/es/_util/devWarning.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t),n.d(t,"Field",(function(){return G})),n.d(t,"List",(function(){return Q})),n.d(t,"useForm",(function(){return J})),n.d(t,"FormProvider",(function(){return $}));var r=n("q1tI"),a=n("Ff2n"),o=n("rePB"),i=n("VTBJ"),c=n("KQm4"),u=n("1OyB"),s=n("vuIU"),l=n("Ji7U"),p=n("LK+K"),f=n("Zm9Q"),d=n("Kwbf"),h=n("KW7l");function m(e){return null==e?[]:Array.isArray(e)?e:[e]}var b=n("o0o1"),y=n.n(b),v=n("HaE+"),g=n("U8pU"),_=n("KpVd");function x(e,t){for(var n=e,r=0;r3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!x(e,t.slice(0,-1))?e:j(e,t,n,r)}(e,t,n)}function S(e,t){var n={};return t.forEach((function(t){var r=k(e,t);n=E(n,t,r)})),n}function P(e,t){return e&&e.some((function(e){return I(e,t)}))}function C(e){return"object"===Object(g.a)(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}function T(e,t){var n=Array.isArray(e)?Object(c.a)(e):Object(i.a)({},e);return t?(Object.keys(t).forEach((function(e){var r=n[e],a=t[e],o=C(r)&&C(a);n[e]=o?T(r,a||{}):a})),n):n}function A(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=r||n<0||n>=r)return e;var a=e[t],o=t-n;return o>0?[].concat(Object(c.a)(e.slice(0,n)),[a],Object(c.a)(e.slice(n,t)),Object(c.a)(e.slice(t+1,r))):o<0?[].concat(Object(c.a)(e.slice(0,t)),Object(c.a)(e.slice(t+1,n+1)),[a],Object(c.a)(e.slice(n+1,r))):e}var D="'${name}' is not a valid ${type}",R={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:D,method:D,array:D,object:D,number:D,date:D,boolean:D,integer:D,float:D,regexp:D,email:D,url:D,hex:D},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},N=_.a;function F(e,t,n,r){var a=Object(i.a)(Object(i.a)({},n),{},{name:t,enum:(n.enum||[]).join(", ")}),o=function(e,t){return function(){return function(e,t){return e.replace(/\$\{\w+\}/g,(function(e){var n=e.slice(2,-1);return t[n]}))}(e,Object(i.a)(Object(i.a)({},a),t))}};return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).forEach((function(a){var i=t[a];"string"==typeof i?n[a]=o(i,r):i&&"object"===Object(g.a)(i)?(n[a]={},e(i,n[a])):n[a]=i})),n}(A({},R,e))}function U(e,t,n,r,a){return z.apply(this,arguments)}function z(){return(z=Object(v.a)(y.a.mark((function e(t,n,a,u,s){var l,p,f,d,h,m;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=Object(i.a)({},a),p=null,l&&"array"===l.type&&l.defaultField&&(p=l.defaultField,delete l.defaultField),f=new N(Object(o.a)({},t,[l])),d=F(u.validateMessages,t,l,s),f.messages(d),h=[],e.prev=7,e.next=10,Promise.resolve(f.validate(Object(o.a)({},t,n),Object(i.a)({},u)));case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),e.t0.errors?h=e.t0.errors.map((function(e,t){var n=e.message;return r.isValidElement(n)?r.cloneElement(n,{key:"error_".concat(t)}):n})):(console.error(e.t0),h=[d.default()]);case 15:if(h.length||!p){e.next=20;break}return e.next=18,Promise.all(n.map((function(e,n){return U("".concat(t,".").concat(n),e,p,u,s)})));case 18:return m=e.sent,e.abrupt("return",m.reduce((function(e,t){return[].concat(Object(c.a)(e),Object(c.a)(t))}),[]));case 20:return e.abrupt("return",h);case 21:case"end":return e.stop()}}),e,null,[[7,12]])})))).apply(this,arguments)}function V(e,t,n,r,a,o){var c,u=e.join("."),s=n.map((function(e){var t=e.validator;return t?Object(i.a)(Object(i.a)({},e),{},{validator:function(e,n,r){var a=!1,o=t(e,n,(function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:[];e.validatePromise===s&&(e.validatePromise=null,e.errors=t,e.reRender())})),s},e.isFieldValidating=function(){return!!e.validatePromise},e.isFieldTouched=function(){return e.touched},e.isFieldDirty=function(){return e.dirty},e.getErrors=function(){return e.errors},e.getMeta=function(){return e.prevValidating=e.isFieldValidating(),{touched:e.isFieldTouched(),validating:e.prevValidating,errors:e.errors,name:e.getNamePath()}},e.getOnlyChild=function(t){if("function"==typeof t){var n=e.getMeta();return Object(i.a)(Object(i.a)({},e.getOnlyChild(t(e.getControlled(),n,e.context))),{},{isFunction:!0})}var a=Object(f.a)(t);return 1===a.length&&r.isValidElement(a[0])?{child:a[0],isFunction:!1}:{child:a,isFunction:!1}},e.getValue=function(t){var n=e.context.getFieldsValue,r=e.getNamePath();return k(t||n(!0),r)},e.getControlled=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.props,r=n.trigger,a=n.validateTrigger,c=n.getValueFromEvent,u=n.normalize,s=n.valuePropName,l=n.getValueProps,p=void 0!==a?a:e.context.validateTrigger,f=e.getNamePath(),d=e.context,b=d.getInternalHooks,y=d.getFieldsValue,v=b(h.a),g=v.dispatch,_=e.getValue(),x=l||function(e){return Object(o.a)({},s,e)},w=t[r],j=Object(i.a)(Object(i.a)({},t),x(_));j[r]=function(){var t;e.touched=!0,e.dirty=!0;for(var n=arguments.length,r=new Array(n),a=0;a=0&&t<=n.length?(o.keys=[].concat(Object(c.a)(o.keys.slice(0,t)),[o.id],Object(c.a)(o.keys.slice(t))),i([].concat(Object(c.a)(n.slice(0,t)),[e],Object(c.a)(n.slice(t))))):(o.keys=[].concat(Object(c.a)(o.keys),[o.id]),i([].concat(Object(c.a)(n),[e]))),o.id+=1},remove:function(e){var t=l(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(o.keys=o.keys.filter((function(e,t){return!n.has(t)})),i(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=l();e<0||e>=n.length||t<0||t>=n.length||(o.keys=L(o.keys,e,t),i(L(n,e,t)))}}},f=r||[];return Array.isArray(f)||(f=[]),n(f.map((function(e,t){var n=o.keys[t];return void 0===n&&(o.keys[t]=o.id,n=o.keys[t],o.id+=1),{name:t,key:n,isListField:!0}})),p)})))},Y=n("ODXe");var K=function(){function e(){Object(u.a)(this,e),this.list=[]}return Object(s.a)(e,[{key:"set",value:function(e,t){var n=this.list.findIndex((function(t){return I(t.key,e)}));-1!==n?this.list[n].value=t:this.list.push({key:e,value:t})}},{key:"get",value:function(e){var t=this.list.find((function(t){return I(t.key,e)}));return t&&t.value}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.list=this.list.filter((function(t){return!I(t.key,e)}))}},{key:"map",value:function(e){return this.list.map(e)}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null})),e}}]),e}(),X=function e(t){var n=this;Object(u.a)(this,e),this.formHooked=!1,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,getInternalHooks:n.getInternalHooks}},this.getInternalHooks=function(e){return e===h.a?(n.formHooked=!0,{dispatch:n.dispatch,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve}):(Object(d.a)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(e){n.subscribable=e},this.setInitialValues=function(e,t){n.initialValues=e||{},t&&(n.store=A({},e,n.store))},this.getInitialValue=function(e){return k(n.initialValues,e)},this.setCallbacks=function(e){n.callbacks=e},this.setValidateMessages=function(e){n.validateMessages=e},this.setPreserve=function(e){n.preserve=e},this.timeoutId=null,this.warningUnhooked=function(){0},this.getFieldEntities=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities},this.getFieldsMap=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new K;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t},this.getFieldEntitiesForNamePathList=function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=O(e);return t.get(n)||{INVALIDATE_NAME_PATH:O(e)}}))},this.getFieldsValue=function(e,t){if(n.warningUnhooked(),!0===e&&!t)return n.store;var r=n.getFieldEntitiesForNamePathList(Array.isArray(e)?e:null),a=[];return r.forEach((function(e){var n="INVALIDATE_NAME_PATH"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();if(t){var r="getMeta"in e?e.getMeta():null;t(r)&&a.push(n)}else a.push(n)})),S(n.store,a.map(O))},this.getFieldValue=function(e){n.warningUnhooked();var t=O(e);return k(n.store,t)},this.getFieldsError=function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors()}:{name:O(e[n]),errors:[]}}))},this.getFieldError=function(e){n.warningUnhooked();var t=O(e);return n.getFieldsError([t])[0].errors},this.isFieldsTouched=function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=new K,r=n.getFieldEntities(!0);r.forEach((function(e){var n=e.props.initialValue,r=e.getNamePath();if(void 0!==n){var a=t.get(r)||new Set;a.add({entity:e,value:n}),t.set(r,a)}}));var a,o=function(r){r.forEach((function(r){if(void 0!==r.props.initialValue){var a=r.getNamePath();if(void 0!==n.getInitialValue(a))Object(d.a)(!1,"Form already set 'initialValues' with path '".concat(a.join("."),"'. Field can not overwrite it."));else{var o=t.get(a);if(o&&o.size>1)Object(d.a)(!1,"Multiple Field with path '".concat(a.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(o){var i=n.getFieldValue(a);e.skipExist&&void 0!==i||(n.store=E(n.store,a,Object(c.a)(o)[0].value))}}}}))};e.entities?a=e.entities:e.namePathList?(a=[],e.namePathList.forEach((function(e){var n,r=t.get(e);r&&(n=a).push.apply(n,Object(c.a)(Object(c.a)(r).map((function(e){return e.entity}))))}))):a=r,o(a)},this.resetFields=function(e){n.warningUnhooked();var t=n.store;if(!e)return n.store=A({},n.initialValues),n.resetWithFieldInitialValue(),void n.notifyObservers(t,null,{type:"reset"});var r=e.map(O);r.forEach((function(e){var t=n.getInitialValue(e);n.store=E(n.store,e,t)})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"})},this.setFields=function(e){n.warningUnhooked();var t=n.store;e.forEach((function(e){var r=e.name,o=(e.errors,Object(a.a)(e,["name","errors"])),i=O(r);"value"in o&&(n.store=E(n.store,i,o.value)),n.notifyObservers(t,[i],{type:"setField",data:e})}))},this.getFields=function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=e.getMeta(),a=Object(i.a)(Object(i.a)({},r),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(a,"originRCField",{value:!0}),a}))},this.registerField=function(e){if(n.fieldEntities.push(e),void 0!==e.props.initialValue){var t=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(t,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(t,r){if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!1===(void 0!==r?r:n.preserve)&&!t){var a=e.getNamePath();void 0!==n.getFieldValue(a)&&(n.store=E(n.store,a,void 0))}}},this.dispatch=function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var a=e.namePath,o=e.triggerName;n.validateFields([a],{triggerName:o})}},this.notifyObservers=function(e,t,r){if(n.subscribable){var a=Object(i.a)(Object(i.a)({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,a)}))}else n.forceRootUpdate()},this.updateValue=function(e,t){var r=O(e),a=n.store;n.store=E(n.store,r,t),n.notifyObservers(a,[r],{type:"valueUpdate",source:"internal"});var o=n.getDependencyChildrenFields(r);n.validateFields(o),n.notifyObservers(a,o,{type:"dependenciesUpdate",relatedFields:[r].concat(Object(c.a)(o))});var i=n.callbacks.onValuesChange;i&&i(S(n.store,[r]),n.store);n.triggerOnFieldsChange([r].concat(Object(c.a)(o)))},this.setFieldsValue=function(e){n.warningUnhooked();var t=n.store;e&&(n.store=A(n.store,e)),n.notifyObservers(t,null,{type:"valueUpdate",source:"external"})},this.getDependencyChildrenFields=function(e){var t=new Set,r=[],a=new K;n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=O(t);a.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))}));return function e(n){(a.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var a=n.getNamePath();n.isFieldDirty()&&a.length&&(r.push(a),e(a))}}))}(e),r},this.triggerOnFieldsChange=function(e,t){var r=n.callbacks.onFieldsChange;if(r){var a=n.getFields();if(t){var o=new K;t.forEach((function(e){var t=e.name,n=e.errors;o.set(t,n)})),a.forEach((function(e){e.errors=o.get(e.name)||e.errors}))}r(a.filter((function(t){var n=t.name;return P(e,n)})),a)}},this.validateFields=function(e,t){n.warningUnhooked();var r=!!e,a=r?e.map(O):[],o=[];n.getFieldEntities(!0).forEach((function(e){if(r||a.push(e.getNamePath()),e.props.rules&&e.props.rules.length){var c=e.getNamePath();if(!r||P(a,c)){var u=e.validateRules(Object(i.a)({validateMessages:Object(i.a)(Object(i.a)({},R),n.validateMessages)},t));o.push(u.then((function(){return{name:c,errors:[]}})).catch((function(e){return Promise.reject({name:c,errors:e})})))}}}));var c=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(a,o){e.forEach((function(e,i){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[i]=e,n>0||(t&&o(r),a(r))}))}))})):Promise.resolve([])}(o);n.lastValidatePromise=c,c.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var u=c.then((function(){return n.lastValidatePromise===c?Promise.resolve(n.getFieldsValue(a)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(a),errorFields:t,outOfDate:n.lastValidatePromise!==c})}));return u.catch((function(e){return e})),u},this.submit=function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(e){console.error(e)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))},this.forceRootUpdate=t};var J=function(e){var t=r.useRef(),n=r.useState(),a=Object(Y.a)(n,2)[1];if(!t.current)if(e)t.current=e;else{var o=new X((function(){a({})}));t.current=o.getForm()}return[t.current]},Z=r.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),$=function(e){var t=e.validateMessages,n=e.onFormChange,a=e.onFormFinish,c=e.children,u=r.useContext(Z),s=r.useRef({});return r.createElement(Z.Provider,{value:Object(i.a)(Object(i.a)({},u),{},{validateMessages:Object(i.a)(Object(i.a)({},u.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:s.current}),u.triggerFormChange(e,t)},triggerFormFinish:function(e,t){a&&a(e,{values:t,forms:s.current}),u.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(s.current=Object(i.a)(Object(i.a)({},s.current),{},Object(o.a)({},e,t))),u.registerForm(e,t)},unregisterForm:function(e){var t=Object(i.a)({},s.current);delete t[e],s.current=t,u.unregisterForm(e)}})},c)},ee=Z,te=function(e,t){var n=e.name,o=e.initialValues,u=e.fields,s=e.form,l=e.preserve,p=e.children,f=e.component,d=void 0===f?"form":f,m=e.validateMessages,b=e.validateTrigger,y=void 0===b?"onChange":b,v=e.onValuesChange,_=e.onFieldsChange,x=e.onFinish,w=e.onFinishFailed,j=Object(a.a)(e,["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"]),O=r.useContext(ee),k=J(s),E=Object(Y.a)(k,1)[0],S=E.getInternalHooks(h.a),P=S.useSubscribe,C=S.setInitialValues,T=S.setCallbacks,A=S.setValidateMessages,I=S.setPreserve;r.useImperativeHandle(t,(function(){return E})),r.useEffect((function(){return O.registerForm(n,E),function(){O.unregisterForm(n)}}),[O,E,n]),A(Object(i.a)(Object(i.a)({},O.validateMessages),m)),T({onValuesChange:v,onFieldsChange:function(e){if(O.triggerFormChange(n,e),_){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a0&&(e.deadlineId=setTimeout((function(){e.onMotionEnd({deadline:!0})}),r))}}))},e.nextFrame=function(t){e.cancelNextFrame(),e.raf=y()(t)},e.cancelNextFrame=function(){e.raf&&(y.a.cancel(e.raf),e.raf=null)},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){this.onDomUpdate()}},{key:"componentDidUpdate",value:function(){this.onDomUpdate()}},{key:"componentWillUnmount",value:function(){this.destroyed=!0,this.removeEventListener(this.$cacheEle),this.cancelNextFrame(),clearTimeout(this.deadlineId)}},{key:"render",value:function(){var e,t=this.state,n=t.status,o=t.statusActive,i=t.statusStyle,c=this.props,u=c.children,s=c.motionName,l=c.visible,p=c.removeOnLeave,f=c.leavedClassName,d=c.eventProps;return u?"none"!==n&&h(this.props)?u(Object(a.a)(Object(a.a)({},d),{},{className:m()(A(s,n),(e={},Object(r.a)(e,A(s,"".concat(n,"-active")),o),Object(r.a)(e,s,"string"==typeof s),e)),style:i}),this.setNodeRef):l?u(Object(a.a)({},d),this.setNodeRef):p?null:u(Object(a.a)(Object(a.a)({},d),{},{className:f}),this.setNodeRef):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.status;if(!h(e))return{};var a=e.visible,o=e.motionAppear,i=e.motionEnter,c=e.motionLeave,u=e.motionLeaveImmediately,s={prevProps:e};return("appear"===r&&!o||"enter"===r&&!i||"leave"===r&&!c)&&(s.status="none",s.statusActive=!1,s.newStatus=!1),!n&&a&&o&&(s.status="appear",s.statusActive=!1,s.newStatus=!0),n&&!n.visible&&a&&i&&(s.status="enter",s.statusActive=!1,s.newStatus=!0),(n&&n.visible&&!a&&c||!n&&u&&!a&&c)&&(s.status="leave",s.statusActive=!1,s.newStatus=!0),s}}]),n}(p.Component);return b.defaultProps={visible:!0,motionEnter:!0,motionAppear:!0,motionLeave:!0,removeOnLeave:!0},n?p.forwardRef((function(e,t){return p.createElement(b,Object.assign({internalRef:t},e))})):b}(T),M=n("Ff2n");function L(e){var t;return t=e&&"object"===Object(l.a)(e)&&"key"in e?e:{key:e},Object(a.a)(Object(a.a)({},t),{},{key:String(t.key)})}function D(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(L)}function R(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=t.length,i=D(e),c=D(t);i.forEach((function(e){for(var t=!1,i=r;i1}));return s.forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||"remove"!==r}))).forEach((function(t){t.key===e&&(t.status="keep")}))})),n}var N=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];var F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I,n=function(n){Object(u.a)(c,n);var r=Object(s.a)(c);function c(){var e;return Object(o.a)(this,c),(e=r.apply(this,arguments)).state={keyEntities:[]},e.removeKey=function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:Object(a.a)(Object(a.a)({},e),{},{status:"removed"})}))}}))},e}return Object(i.a)(c,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,r=this.props,a=r.component,o=r.children,i=Object(M.a)(r,["component","children"]),c=a||p.Fragment,u={};return N.forEach((function(e){u[e]=i[e],delete i[e]})),delete i.keys,p.createElement(c,Object.assign({},i),n.map((function(n){var r=n.status,a=Object(M.a)(n,["status"]),i="add"===r||"keep"===r;return p.createElement(t,Object.assign({},u,{key:a.key,visible:i,eventProps:a,onLeaveEnd:function(){u.onLeaveEnd&&u.onLeaveEnd.apply(u,arguments),e.removeKey(a.key)}}),o)})))}}],[{key:"getDerivedStateFromProps",value:function(t,n){var r=t.keys,o=n.keyEntities,i=D(r);if(!e)return{keyEntities:i.map((function(e){return Object(a.a)(Object(a.a)({},e),{},{status:"keep"})}))};var c=R(o,i),u=o.length;return{keyEntities:c.filter((function(e){for(var t=null,n=0;n=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function Z(e){var t,n,r;if(Q.isWindow(e)||9===e.nodeType){var a=Q.getWindow(e);t={left:Q.getWindowScrollLeft(a),top:Q.getWindowScrollTop(a)},n=Q.viewportWidth(a),r=Q.viewportHeight(a)}else t=Q.offset(e),n=Q.outerWidth(e),r=Q.outerHeight(e);return t.width=n,t.height=r,t}function $(e,t){var n=t.charAt(0),r=t.charAt(1),a=e.width,o=e.height,i=e.left,c=e.top;return"c"===n?c+=o/2:"b"===n&&(c+=o),"c"===r?i+=a/2:"r"===r&&(i+=a),{left:i,top:c}}function ee(e,t,n,r,a){var o=$(t,n[1]),i=$(e,n[0]),c=[i.left-o.left,i.top-o.top];return{left:Math.round(e.left-c[0]+r[0]-a[0]),top:Math.round(e.top-c[1]+r[1]-a[1])}}function te(e,t,n){return e.leftn.right}function ne(e,t,n){return e.topn.bottom}function re(e,t,n){var r=[];return Q.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function ae(e,t){return e[t]=-e[t],e}function oe(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function ie(e,t){e[0]=oe(e[0],t.width),e[1]=oe(e[1],t.height)}function ce(e,t,n,r){var a=n.points,o=n.offset||[0,0],i=n.targetOffset||[0,0],c=n.overflow,u=n.source||e;o=[].concat(o),i=[].concat(i);var s={},l=0,p=J(u,!(!(c=c||{})||!c.alwaysByViewport)),f=Z(u);ie(o,f),ie(i,t);var d=ee(f,t,a,o,i),h=Q.merge(f,d);if(p&&(c.adjustX||c.adjustY)&&r){if(c.adjustX&&te(d,f,p)){var m=re(a,/[lr]/gi,{l:"r",r:"l"}),b=ae(o,0),y=ae(i,0);(function(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.left&&a.left+o.width>n.right&&(o.width-=a.left+o.width-n.right),r.adjustX&&a.left+o.width>n.right&&(a.left=Math.max(n.right-o.width,n.left)),r.adjustY&&a.top=n.top&&a.top+o.height>n.bottom&&(o.height-=a.top+o.height-n.bottom),r.adjustY&&a.top+o.height>n.bottom&&(a.top=Math.max(n.bottom-o.height,n.top)),Q.mix(a,o)}(d,f,p,s))}return h.width!==f.width&&Q.css(u,"width",Q.width(u)+h.width-f.width),h.height!==f.height&&Q.css(u,"height",Q.height(u)+h.height-f.height),Q.offset(u,{left:h.left,top:h.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:a,offset:o,targetOffset:i,overflow:s}}function ue(e,t,n){var r=n.target||t;return ce(e,Z(r),n,!function(e,t){var n=J(e,t),r=Z(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport))}ue.__getOffsetParent=K,ue.__getVisibleRectForElement=J;var se=n("zT1h"),le=n("Y+p1"),pe=n.n(le),fe=n("bdgK"),de=n("l4aY");function he(e,t){var n=null,r=null;var o=new fe.default((function(e){var o=Object(a.a)(e,1)[0].target;if(document.documentElement.contains(o)){var i=o.getBoundingClientRect(),c=i.width,u=i.height,s=Math.floor(c),l=Math.floor(u);n===s&&r===l||Promise.resolve().then((function(){t({width:s,height:l})})),n=s,r=l}}));return e&&o.observe(e),function(){o.disconnect()}}function me(e){return"function"!=typeof e?null:e()}function be(e){return"object"===Object(o.a)(e)&&e?e:null}var ye=function(e,t){var n=e.children,r=e.disabled,o=e.target,i=e.align,s=e.onAlign,p=e.monitorWindowResize,f=e.monitorBufferTime,d=void 0===f?0:f,h=c.a.useRef({}),m=c.a.useRef(),b=c.a.Children.only(n),y=c.a.useRef({});y.current.disabled=r,y.current.target=o,y.current.align=i,y.current.onAlign=s;var v=function(e,t){var n=c.a.useRef(!1),r=c.a.useRef(null);function a(){window.clearTimeout(r.current)}return[function o(i){if(n.current&&!0!==i)a(),r.current=window.setTimeout((function(){n.current=!1,o()}),t);else{if(!1===e())return;n.current=!0,a(),r.current=window.setTimeout((function(){n.current=!1}),t)}},function(){n.current=!1,a()}]}((function(){var e=y.current,t=e.disabled,n=e.target,r=e.align,a=e.onAlign;if(!t&&n){var o,i=m.current,c=me(n),u=be(n);h.current.element=c,h.current.point=u,h.current.align=r;var s=document.activeElement;return c&&function(e){if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){var n=e.getBoundingClientRect();if(n.width||n.height)return!0}return!1}(c)?o=ue(i,c,r):u&&(o=function(e,t,n){var r,a,o=Q.getDocument(e),i=o.defaultView||o.parentWindow,c=Q.getWindowScrollLeft(i),u=Q.getWindowScrollTop(i),s=Q.viewportWidth(i),p=Q.viewportHeight(i),f={left:r="pageX"in t?t.pageX:c+t.clientX,top:a="pageY"in t?t.pageY:u+t.clientY,width:0,height:0},d=r>=0&&r<=c+s&&a>=0&&a<=u+p,h=[n.points[0],"cc"];return ce(e,f,l(l({},n),{},{points:h}),d)}(i,u,r)),function(e,t){e!==document.activeElement&&Object(de.a)(t,e)&&"function"==typeof e.focus&&e.focus()}(s,i),a&&o&&a(i,o),!0}return!1}),d),g=Object(a.a)(v,2),_=g[0],x=g[1],w=c.a.useRef({cancel:function(){}}),j=c.a.useRef({cancel:function(){}});c.a.useEffect((function(){var e,t,n=me(o),r=be(o);m.current!==j.current.element&&(j.current.cancel(),j.current.element=m.current,j.current.cancel=he(m.current,_)),h.current.element===n&&((e=h.current.point)===(t=r)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))&&pe()(h.current.align,i)||(_(),w.current.element!==n&&(w.current.cancel(),w.current.element=n,w.current.cancel=he(n,_)))})),c.a.useEffect((function(){r?x():_()}),[r]);var O=c.a.useRef(null);return c.a.useEffect((function(){p?O.current||(O.current=Object(se.a)(window,"resize",_)):O.current&&(O.current.remove(),O.current=null)}),[p]),c.a.useEffect((function(){return function(){w.current.cancel(),j.current.cancel(),O.current&&O.current.remove(),x()}}),[]),c.a.useImperativeHandle(t,(function(){return{forceAlign:function(){return _(!0)}}})),c.a.isValidElement(b)&&(b=c.a.cloneElement(b,{ref:Object(u.a)(b.ref,m)})),b},ve=c.a.forwardRef(ye);ve.displayName="Align";var ge=ve;t.a=ge},"9og8": /*!**********************************************************************************************************!*\ @@ -1596,9 +1596,9 @@ e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeo \**********************************************************************************/ /*! exports provided: default */ /*! exports used: default */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js because of ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js because of ./node_modules/rc-field-form/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js because of ./node_modules/rc-field-form/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js because of ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("a3WO");var a=n("25BE"),o=n("BsWD");function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(a.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},KUpu: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js because of ./node_modules/rc-field-form/es/index.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("a3WO");var a=n("25BE"),o=n("BsWD");function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(a.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},KUpu: /*!****************************************************************************************************************!*\ !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.symbol.has-instance.js ***! \****************************************************************************************************************/ @@ -1642,8 +1642,8 @@ e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeo \****************************************************************************/ /*! exports provided: default */ /*! exports used: default */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js because of ./node_modules/antd/es/notification/hooks/useNotification.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js because of ./node_modules/antd/es/notification/hooks/useNotification.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("foSv");var a=n("md7G");function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(r.a)(e);if(t){var i=Object(r.a)(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Object(a.a)(this,n)}}},LQ03: +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js because of ./node_modules/dva/dist/index.esm.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js because of ./node_modules/dva/dist/index.esm.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("foSv");var a=n("md7G");function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(r.a)(e);if(t){var i=Object(r.a)(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Object(a.a)(this,n)}}},LQ03: /*!************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/createSuper.js ***! \************************************************************/ @@ -2549,7 +2549,7 @@ object-assign \********************************************************************/ /*! exports provided: createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath */ /*! exports used: createBrowserHistory, createHashHistory, createLocation, createMemoryHistory, createPath, locationsAreEqual */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js because of ./node_modules/antd/node_modules/rc-checkbox/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js because of ./node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/history-with-query/node_modules/query-string/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js because of ./node_modules/react-router-dom/esm/react-router-dom.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return P})),n.d(t,"d",(function(){return T})),n.d(t,"c",(function(){return y})),n.d(t,"f",(function(){return v})),n.d(t,"e",(function(){return b}));var r=n("wx14");function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;f--){var d=i[f];"."===d?o(i,f):".."===d?(o(i,f),p++):p&&(o(i,f),p--)}if(!s)for(;p--;p)i.unshift("..");!s||""===i[0]||i[0]&&a(i[0])||i.unshift("");var h=i.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function c(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=c(t),a=c(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},s=n("YJ9l"),l=n.n(s),p=n("9R94");function f(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function h(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function m(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function b(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function y(e,t,n,a){var o;"string"==typeof e?((o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).query=o.search?l.a.parse(o.search):{},o.state=t):(void 0===(o=Object(r.a)({},e)).pathname&&(o.pathname=""),o.search?("?"!==o.search.charAt(0)&&(o.search="?"+o.search),o.query=l.a.parse(o.search)):(o.search=o.query?l.a.stringify(o.query):"",o.query=o.query||{}),o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function v(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function g(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),p({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=y(e,t,f(),_.location);l.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(_.entries[_.index]=r,p({action:"REPLACE",location:r}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),l.setPrompt(e)},listen:function(e){return l.appendListener(e)}};return _}},Yanh: /*!**********************************************************************************************************!*\ @@ -2963,11 +2963,11 @@ object-assign \**********************************************************/ /*! exports provided: default */ /*! exports used: default */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/@ant-design/icons/es/utils.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/dva/dist/index.esm.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./node_modules/rc-field-form/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./node_modules/rc-field-form/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js because of ./node_modules/rc-menu/es/SubMenu.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("rePB"),a=n("ODXe"),o=n("Ff2n"),i=n("q1tI"),c=n("uciX"),u=n("TSYQ"),s=n.n(u),l={adjustX:1,adjustY:1},p=[0,0],f={topLeft:{points:["bl","tl"],overflow:l,offset:[0,-4],targetOffset:p},topCenter:{points:["bc","tc"],overflow:l,offset:[0,-4],targetOffset:p},topRight:{points:["br","tr"],overflow:l,offset:[0,-4],targetOffset:p},bottomLeft:{points:["tl","bl"],overflow:l,offset:[0,4],targetOffset:p},bottomCenter:{points:["tc","bc"],overflow:l,offset:[0,4],targetOffset:p},bottomRight:{points:["tr","br"],overflow:l,offset:[0,4],targetOffset:p}};var d=i.forwardRef((function(e,t){var n=e.arrow,u=void 0!==n&&n,l=e.prefixCls,p=void 0===l?"rc-dropdown":l,d=e.transitionName,h=e.animation,m=e.align,b=e.placement,y=void 0===b?"bottomLeft":b,v=e.placements,g=void 0===v?f:v,_=e.getPopupContainer,x=e.showAction,w=e.hideAction,j=e.overlayClassName,O=e.overlayStyle,k=e.visible,E=e.trigger,S=void 0===E?["hover"]:E,P=Object(o.a)(e,["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger"]),C=i.useState(),T=Object(a.a)(C,2),A=T[0],I=T[1],M="visible"in e?k:A,L=i.useRef(null);i.useImperativeHandle(t,(function(){return L.current}));var D,R,N,F,U,z,V=function(){var t=e.overlay;return"function"==typeof t?t():t},q=function(t){var n=e.onOverlayClick,r=V().props;I(!1),n&&n(t),r.onClick&&r.onClick(t)},B=function(){var e=V(),t={prefixCls:"".concat(p,"-menu"),onClick:q};return"string"==typeof e.type&&delete t.prefixCls,i.createElement(i.Fragment,null,u&&i.createElement("div",{className:"".concat(p,"-arrow")}),i.cloneElement(e,t))},W=w;return W||-1===S.indexOf("contextMenu")||(W=["click"]),i.createElement(c.a,Object.assign({},P,{prefixCls:p,ref:L,popupClassName:s()(j,Object(r.a)({},"".concat(p,"-show-arrow"),u)),popupStyle:O,builtinPlacements:g,action:S,showAction:x,hideAction:W||[],popupPlacement:y,popupAlign:m,popupTransitionName:d,popupAnimation:h,popupVisible:M,stretch:(U=e.minOverlayWidthMatchTrigger,z=e.alignPoint,("minOverlayWidthMatchTrigger"in e?U:!z)?"minWidth":""),popup:"function"==typeof e.overlay?B:B(),onPopupVisibleChange:function(t){var n=e.onVisibleChange;I(t),"function"==typeof n&&n(t)},getPopupContainer:_}),(R=e.children,N=R.props?R.props:{},F=s()(N.className,void 0!==(D=e.openClassName)?D:"".concat(p,"-open")),A&&R?i.cloneElement(R,{className:F}):R))}));t.a=d},"eDW+": /*!****************************************************************************************************************!*\ !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.reverse.js ***! @@ -2980,7 +2980,7 @@ object-assign /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/css-animation/es/index.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js because of ./node_modules/rc-tooltip/es/Tooltip.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js because of ./node_modules/rc-menu/es/SubMenu.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js because of ./node_modules/antd/es/typography/Editable.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/PortalWrapper.js because of ./node_modules/rc-drawer/es/DrawerWrapper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */ @@ -3580,7 +3580,7 @@ object-assign /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js because of ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/iterableToArray.js because of ./src/pages/tasks/index.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/iterableToArray.js because of ./src/pages/Innovation/Tasks/index.jsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js because of ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("leS6");var a=n("Y9hK"),o=n("Qw5x");function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(a.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},oJGl: /*!**************************************************************************************************************!*\ !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.weak-map.from.js ***! @@ -3695,7 +3695,7 @@ object-assign /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/pages/HttpStatus/403.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/service/shixuns.ts because of ./src/.umi-production/plugin-dva/connect.ts */ -/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx because of ./src/pages/tasks/index.jsx */function(e,t,n){"use strict";var r=n("k1fw"),a=n("WmNS"),o=n.n(a),i=n("HBuW"),c=function(){var e,t,n,r,a,o,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[{name:"内容审核情况",id:"Content",status:null==i||null===(e=i.content_info)||void 0===e?void 0:e.status,username:null==i||null===(t=i.content_info)||void 0===t?void 0:t.username,time:null==i||null===(n=i.content_info)||void 0===n?void 0:n.time},{name:"性能审核情况",id:"Performance",status:null==i||null===(r=i.perference_info)||void 0===r?void 0:r.status,username:null==i||null===(a=i.perference_info)||void 0===a?void 0:a.username,time:null==i||null===(o=i.perference_info)||void 0===o?void 0:o.time}]},u=n("1vsH"),s={namespace:"shixunsDetail",state:{detail:void 0,rightData:void 0,challenges:void 0,auditSituationData:void 0,setting:void 0,challengesNew:{},challengesEdit:{},editChallengesQuestion:{},fileContent:{},repository:{},mirrorApplies:{},infoWithJupyterLab:{},actionTabs:{key:"",params:{}}},effects:{getShixunsDetail:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.lb,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detail:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getMirrorApplies:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.X,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{mirrorApplies:Object(r.a)({},(null==s?void 0:s.data)||{})}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getRightData:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.fb,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{rightData:Object(r.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getChallengesData:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.I,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{challenges:Object(r.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),execJupyter:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.C,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),execShixun:o.a.mark((function e(t,n){var r,a,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.D,r);case 4:return-3===(null==(c=e.sent)?void 0:c.status)&&Object(u.o)(),e.abrupt("return",c);case 7:case"end":return e.stop()}}),e)})),openChallenge:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.xb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),challengeMoveUp:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.n,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),challengeMoveDown:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.m,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),cancelCollect:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.j,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),collect:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.p,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),searchUserCourses:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Db,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),sendToCourse:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Eb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),cancelRelease:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.l,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),cancelPublic:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.k,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),applyPublic:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.h,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),release:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.zb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updateAuditSituation:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Ib,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getCollaboratorsData:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.M,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),addCollaborator:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.d,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),addTeachGroupMember:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.g,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getChangeManager:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.L,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),changeManager:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.o,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),deleteCollaborators:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.w,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getRankingList:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.bb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getMirrorScript:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Y,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getScriptContent:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.gb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getCustomScript:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.N,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updateSettingBasicInfo:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Ub,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getShixunQuote:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.kb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),deleteShixun:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.A,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),permanentClose:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.yb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getDepartments:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.O,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updatePermissionSetting:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Qb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updateLearnSetting:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Pb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updateSetting:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Tb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getSetData:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.ib,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),deleteDataSet:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.x,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),deleteGitFile:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.y,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),deleteGitFiles:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.z,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),moveGitFile:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.vb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),moveGitFiles:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.wb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getRepository:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.cb,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{repository:Object(r.a)({},s)}});case 7:return e.abrupt("return",Object(r.a)({},s));case 8:case"end":return e.stop()}}),e)})),getRepositorys:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.eb,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{repository:Object(r.a)({},s)}});case 7:return e.abrupt("return",Object(r.a)({},s));case 8:case"end":return e.stop()}}),e)})),getSecretRepository:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.hb,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{secretRepository:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),addRepositoryFile:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.e,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),addRepositoryFiles:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.f,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getRepositoryCommit:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.db,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getFileContent:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.S,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{fileContent:Object(r.a)(Object(r.a)({},s),{},{params:a})}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getFileContents:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.T,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{fileContent:Object(r.a)(Object(r.a)({},s),{},{params:a})}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),updateRepositoryFile:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Rb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updateRepositoryFiles:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Sb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),uploadGitFolder:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Vb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updateCollaboratorEditable:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Nb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getSettingsData:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.jb,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{setting:Object(r.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getChallengesNew:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.K,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{challengesNew:Object(r.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getChallengesEdit:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.J,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{challengesEdit:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getAuditSituationData:o.a.mark((function e(t,n){var r,a,u,s,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,u=n.put,e.next=4,a(i.F,r);case 4:return s=e.sent,l=c(s),e.next=8,u({type:"save",payload:{auditSituationData:l}});case 8:case"end":return e.stop()}}),e)})),getEditChallengesQuestion:o.a.mark((function e(t,n){var r,a,c,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,c=n.put,e.next=4,a(i.P,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{editChallengesQuestion:u}});case 7:return e.abrupt("return",u);case 8:case"end":return e.stop()}}),e)})),getInfoWithJupyterLab:o.a.mark((function e(t,n){var r,a,c,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,c=n.put,e.next=4,a(i.V,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{infoWithJupyterLab:u}});case 7:return e.abrupt("return",u);case 8:case"end":return e.stop()}}),e)})),setActionTabs:o.a.mark((function e(t,n){var a,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,n.call,i=n.put,e.next=4,i({type:"save",payload:{actionTabs:Object(r.a)({},a)}});case 4:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return console.log("reducers:",e,t),Object(r.a)(Object(r.a)({},e),t.payload)}},subscriptions:{setup:function(e){var t=e.dispatch;return e.history.listen((function(e){"/"===e.pathname&&t({type:"query"})}))}}};t.a=s},q1tI: +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx because of ./src/pages/Innovation/Tasks/index.jsx */function(e,t,n){"use strict";var r=n("k1fw"),a=n("WmNS"),o=n.n(a),i=n("HBuW"),c=function(){var e,t,n,r,a,o,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[{name:"内容审核情况",id:"Content",status:null==i||null===(e=i.content_info)||void 0===e?void 0:e.status,username:null==i||null===(t=i.content_info)||void 0===t?void 0:t.username,time:null==i||null===(n=i.content_info)||void 0===n?void 0:n.time},{name:"性能审核情况",id:"Performance",status:null==i||null===(r=i.perference_info)||void 0===r?void 0:r.status,username:null==i||null===(a=i.perference_info)||void 0===a?void 0:a.username,time:null==i||null===(o=i.perference_info)||void 0===o?void 0:o.time}]},u=n("1vsH"),s={namespace:"shixunsDetail",state:{detail:void 0,rightData:void 0,challenges:void 0,auditSituationData:void 0,setting:void 0,challengesNew:{},challengesEdit:{},editChallengesQuestion:{},fileContent:{},repository:{},mirrorApplies:{},infoWithJupyterLab:{},actionTabs:{key:"",params:{}}},effects:{getShixunsDetail:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.lb,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detail:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getMirrorApplies:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.X,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{mirrorApplies:Object(r.a)({},(null==s?void 0:s.data)||{})}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getRightData:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.fb,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{rightData:Object(r.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getChallengesData:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.I,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{challenges:Object(r.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),execJupyter:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.C,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),execShixun:o.a.mark((function e(t,n){var r,a,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.D,r);case 4:return-3===(null==(c=e.sent)?void 0:c.status)&&Object(u.o)(),e.abrupt("return",c);case 7:case"end":return e.stop()}}),e)})),openChallenge:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.xb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),challengeMoveUp:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.n,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),challengeMoveDown:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.m,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),cancelCollect:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.j,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),collect:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.p,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),searchUserCourses:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Db,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),sendToCourse:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Eb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),cancelRelease:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.l,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),cancelPublic:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.k,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),applyPublic:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.h,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),release:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.zb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updateAuditSituation:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Ib,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getCollaboratorsData:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.M,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),addCollaborator:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.d,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),addTeachGroupMember:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.g,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getChangeManager:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.L,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),changeManager:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.o,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),deleteCollaborators:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.w,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getRankingList:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.bb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getMirrorScript:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Y,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getScriptContent:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.gb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getCustomScript:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.N,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updateSettingBasicInfo:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Ub,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getShixunQuote:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.kb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),deleteShixun:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.A,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),permanentClose:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.yb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getDepartments:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.O,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updatePermissionSetting:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Qb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updateLearnSetting:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Pb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updateSetting:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Tb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getSetData:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.ib,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),deleteDataSet:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.x,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),deleteGitFile:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.y,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),deleteGitFiles:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.z,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),moveGitFile:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.vb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),moveGitFiles:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.wb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getRepository:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.cb,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{repository:Object(r.a)({},s)}});case 7:return e.abrupt("return",Object(r.a)({},s));case 8:case"end":return e.stop()}}),e)})),getRepositorys:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.eb,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{repository:Object(r.a)({},s)}});case 7:return e.abrupt("return",Object(r.a)({},s));case 8:case"end":return e.stop()}}),e)})),getSecretRepository:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.hb,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{secretRepository:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),addRepositoryFile:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.e,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),addRepositoryFiles:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.f,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getRepositoryCommit:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.db,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getFileContent:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.S,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{fileContent:Object(r.a)(Object(r.a)({},s),{},{params:a})}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getFileContents:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.T,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{fileContent:Object(r.a)(Object(r.a)({},s),{},{params:a})}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),updateRepositoryFile:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Rb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updateRepositoryFiles:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Sb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),uploadGitFolder:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Vb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updateCollaboratorEditable:o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,n.put,e.next=4,a(i.Nb,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getSettingsData:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.jb,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{setting:Object(r.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getChallengesNew:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.K,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{challengesNew:Object(r.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getChallengesEdit:o.a.mark((function e(t,n){var a,c,u,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,e.next=4,c(i.J,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{challengesEdit:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getAuditSituationData:o.a.mark((function e(t,n){var r,a,u,s,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,u=n.put,e.next=4,a(i.F,r);case 4:return s=e.sent,l=c(s),e.next=8,u({type:"save",payload:{auditSituationData:l}});case 8:case"end":return e.stop()}}),e)})),getEditChallengesQuestion:o.a.mark((function e(t,n){var r,a,c,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,c=n.put,e.next=4,a(i.P,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{editChallengesQuestion:u}});case 7:return e.abrupt("return",u);case 8:case"end":return e.stop()}}),e)})),getInfoWithJupyterLab:o.a.mark((function e(t,n){var r,a,c,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,c=n.put,e.next=4,a(i.V,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{infoWithJupyterLab:u}});case 7:return e.abrupt("return",u);case 8:case"end":return e.stop()}}),e)})),setActionTabs:o.a.mark((function e(t,n){var a,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,n.call,i=n.put,e.next=4,i({type:"save",payload:{actionTabs:Object(r.a)({},a)}});case 4:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return console.log("reducers:",e,t),Object(r.a)(Object(r.a)({},e),t.payload)}},subscriptions:{setup:function(e){var t=e.dispatch;return e.history.listen((function(e){"/"===e.pathname&&t({type:"query"})}))}}};t.a=s},q1tI: /*!*************************************!*\ !*** ./node_modules/react/index.js ***! \*************************************/ @@ -3825,7 +3825,7 @@ object-assign /*! exports used: exportCourseService, exportGraduationService, getCourseResultDetailClass, getCourseResultDetailService, getCourseResultsService, getFormulasService, getGraduationResultDetailService, getGraduationResultsService, getMajorListService, getTopPageService, getYearListService, postComputeAllGraduationService, postComputeAllService, postComputeCourseSingleService, postComputeGraduationSingleService, putFormulasService, putGoalValueService, putTopPageService */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Account/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/pages/HttpStatus/403.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./src/pages/virtualSpaces/Index/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/pages/Account/Results/index.tsx */function(e,t,n){"use strict";n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return f})),n.d(t,"m",(function(){return d})),n.d(t,"n",(function(){return h})),n.d(t,"b",(function(){return m})),n.d(t,"l",(function(){return b})),n.d(t,"o",(function(){return y})),n.d(t,"h",(function(){return v})),n.d(t,"f",(function(){return g})),n.d(t,"p",(function(){return _})),n.d(t,"g",(function(){return x})),n.d(t,"q",(function(){return w})),n.d(t,"i",(function(){return j})),n.d(t,"k",(function(){return O})),n.d(t,"j",(function(){return k})),n.d(t,"r",(function(){return E}));var r=n("9og8"),a=n("WmNS"),o=n.n(a),i=n("ErOA"),c=n("k1fw"),u=n("PpiC"),s=function(){var e=Object(r.a)(o.a.mark((function e(t){var n,r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,r=Object(u.a)(t,["id"]),e.abrupt("return",Object(i.a)("/api/ec_years/".concat(n,"/course_results.json"),{method:"get",params:r}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),l=function(e){var t=document.createElement("iframe");t.src="/api/ec_years/".concat(e,"/course_results.xlsx"),t.style.display="none",document.body.appendChild(t)},p=function(e){var t=e.ec_year_id;return Object(i.a)("/api/ec_years/".concat(t,"/course_results/get_class.json"),{method:"get"})},f=function(e){var t=e.ec_year_id,n=e.id,r=e.class_name,a=void 0===r?null:r;return Object(i.a)("/api/ec_years/".concat(t,"/course_results/").concat(n,".json"),{method:"get",params:{class_name:a}})},d=function(e){var t=e.ec_year_id;return Object(i.a)("/api/ec_courses/1/evaluations/compute_all_courses_data?ec_year_id=".concat(t),{method:"post"})},h=function(e){var t=e.ec_course_id;return Object(i.a)("/api/ec_courses/".concat(t,"/evaluations/evaluation_data"),{method:"POST"})},m=function(e){var t=document.createElement("iframe");t.src="/api/ec_years/".concat(e,"/ec_graduation_results.xlsx"),t.style.display="none",document.body.appendChild(t)},b=function(e){var t=e.ec_year_id;return Object(i.a)("/api/ec_years/".concat(t,"/ec_graduation_results/compute_all"),{method:"post"})},y=function(e){var t=e.ec_year_id,n=e.id;return Object(i.a)("/api/ec_years/".concat(t,"/ec_graduation_results/compute_single?id=").concat(n),{method:"POST"})},v=function(e){return Object(i.a)("/api/ec_years/".concat(e,"/ec_graduation_results.json"),{method:"get"})},g=function(e){return Object(i.a)("/api/ec_years/".concat(e,"/ec_graduation_results/get_formulas.json"),{method:"get"})},_=function(e){var t=e.ec_year_id,n=e.formula_one,r=e.formula_two,a=e.formula_three;return Object(i.a)("/api/ec_years/".concat(t,"/ec_graduation_results/set_formulas.json?formula_one_id=").concat(n,"&formula_two_id=").concat(r,"&formula_three_id=").concat(a),{method:"PUT"})},x=function(e){var t=e.ec_year_id,n=e.id;return Object(i.a)("/api/ec_years/".concat(t,"/ec_graduation_results/").concat(n,".json"),{method:"get"})},w=function(e){var t=e.ec_year_id,n=e.type,r=e.goal_value,a=Object(u.a)(e,["ec_year_id","type","goal_value"]),o="?type=".concat(n),s={method:"PUT"};return"all"===n&&(o+="&goal_value=".concat(r)),"each"===n&&(s=Object(c.a)(Object(c.a)({},s),{},{body:a})),Object(i.a)("/api/ec_years/".concat(t,"/ec_graduation_results/set_goal_value").concat(o),s)},j=function(){var e=Object(r.a)(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(i.a)("/api/schools/".concat(t,"/ec_majors/get_major_list.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=Object(r.a)(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(i.a)("/api/ec_major_schools/".concat(t,"/ec_years/get_year_list.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(e){var t=e.ec_year_id,n=e.school_id;return Object(i.a)("/api/ec_years/".concat(t,"/top_pages.json"),{method:"get",params:{school_id:n}})},E=function(e){var t=e.id,n=e.name;return Object(i.a)("/api/ec_years/1/top_pages/".concat(t,"?name=").concat(n),{method:"PUT"})}},rePB: /*!*******************************************************************!*\ @@ -3924,7 +3924,7 @@ object-assign \*************************************************/ /*! exports provided: default */ /*! all exports used */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js because of ./node_modules/dva/dist/index.esm.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js because of ./node_modules/react-router-dom/esm/react-router-dom.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./src/pages/HttpStatus/404.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/history.ts because of ./src/.umi-production/plugin-dva/dva.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/plugin.ts because of ./src/.umi-production/plugin-dva/dva.ts */ @@ -3953,8 +3953,8 @@ object-assign \*******************************************************************************************************************/ /*! exports provided: default */ /*! exports used: default */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js because of ./src/pages/tasks/index.jsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js because of ./src/pages/tasks/index.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js because of ./src/pages/Innovation/Tasks/index.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js because of ./src/pages/Innovation/Tasks/index.jsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js because of ./src/pages/tasks/index.jsx */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("+kx5");var a=n("Qw5x"),o=n("u6e6");function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n}}(e,t)||Object(a.a)(e,t)||Object(o.a)()}},tRgb: /*!***************************************************************!*\ !*** ./node_modules/connected-react-router/esm/middleware.js ***! @@ -4013,7 +4013,7 @@ object-assign /*! exports used: connectRouter */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/connected-react-router/esm/actions.js because of ./node_modules/dva/dist/index.esm.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/prop-types/index.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/es/index.js because of ./node_modules/dva/dist/index.esm.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/es/index.js because of ./node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js because of ./node_modules/react-router-dom/esm/react-router-dom.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n("q1tI"),n("17x9"),n("/MKj");var r=n("Ty5D"),a=n("AU/w");function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(e){var t=e.getIn,n=e.toJS,a=function(e){var r,a=n(t(e,["router"]));if(null==(r=a)||"object"!==o(r)||!t(r,["location"])||!t(r,["action"]))throw'Could not find router reducer in state tree, it must be mounted under "router"';return a},i=function(e){return n(t(a(e),["location"]))};return{getLocation:i,getAction:function(e){return n(t(a(e),["action"]))},getRouter:a,getSearch:function(e){return n(t(a(e),["location","search"]))},getHash:function(e){return n(t(a(e),["location","hash"]))},createMatchSelector:function(e){var t=null,n=null;return function(a){var o=(i(a)||{}).pathname;if(o===t)return n;t=o;var c=Object(r.f)(o,e);return c&&n&&c.url===n.url||(n=c),n}}}};var c=function(e){var t=e.fromJS,n=e.merge;return function(e){var r=t({location:e.location,action:e.action});return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.type,c=o.payload;if(i===a.b){var u=c.location,s=c.action,l=c.isFirstRendering;return l?e:n(e,{location:t(u),action:s})}return e}}};function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s={fromJS:function(e){return e},getIn:function(e,t){if(!e)return e;var n=t.length;if(n){for(var r=e,a=0;a1&&(p=s.createElement("div",{className:"".concat(n,"-content")},o)),s.createElement("div",{ref:t,className:r,onMouseEnter:i,onMouseLeave:c,onMouseDown:u,onTouchStart:l,style:a},p)}));E.displayName="PopupInner";var S=E;function P(e){var t=e.prefixCls,n=e.motion,r=e.animation,a=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:a?{motionName:a}:null)}function C(e){return e&&e.motionName}var T=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(){var e;return Object(a.a)(this,n),(e=t.apply(this,arguments)).state={targetWidth:void 0,targetHeight:void 0,status:null,prevVisible:null,alignClassName:null,inMotion:!1},e.popupRef=l.a.createRef(),e.alignRef=l.a.createRef(),e.nextFrameState=null,e.nextFrameId=null,e.onAlign=function(t,n){var r=e.state.status,a=e.props,o=a.getClassNameFromAlign,i=a.onAlign,c=o(n);"align"===r?e.setState({alignClassName:c,status:"aligned"},(function(){e.alignRef.current.forceAlign()})):"aligned"===r?(e.setState({alignClassName:c,status:"afterAlign"}),i(t,n)):e.setState({alignClassName:c})},e.onMotionEnd=function(){var t=e.props.visible;e.setState({status:t?"AfterMotion":"stable",inMotion:!1})},e.setStateOnNextFrame=function(t){e.cancelFrameState(),e.nextFrameState=Object(r.a)(Object(r.a)({},e.nextFrameState),t),e.nextFrameId=j()((function(){var t=Object(r.a)({},e.nextFrameState);e.nextFrameState=null,e.setState(t)}))},e.getMotion=function(){return Object(r.a)({},P(e.props))},e.getAlignTarget=function(){var t=e.props,n=t.point,r=t.getRootDomNode;return n||r},e.cancelFrameState=function(){j.a.cancel(e.nextFrameId)},e.renderPopupElement=function(){var t=e.state,n=t.status,a=t.targetHeight,o=t.targetWidth,i=t.alignClassName,c=e.props,u=c.prefixCls,s=c.className,p=c.style,f=c.stretch,d=c.visible,h=c.align,b=c.destroyPopupOnHide,y=c.onMouseEnter,v=c.onMouseLeave,_=c.onMouseDown,x=c.onTouchStart,w=c.children,j=g()(u,s,i),E="".concat(u,"-hidden"),P={};f&&(-1!==f.indexOf("height")?P.height=a:-1!==f.indexOf("minHeight")&&(P.minHeight=a),-1!==f.indexOf("width")?P.width=o:-1!==f.indexOf("minWidth")&&(P.minWidth=o));var C=Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},P),e.getZIndexStyle()),p),{},{opacity:"stable"!==n&&d?0:void 0,pointerEvents:"stable"!==n&&d?"none":void 0}),T=e.getMotion(),A=d;d&&"beforeMotion"!==n&&"motion"!==n&&"stable"!==n&&(T.motionAppear=!1,T.motionEnter=!1,T.motionLeave=!1),"afterAlign"!==n&&"beforeMotion"!==n||(A=!1),["onEnterStart","onAppearStart","onLeaveStart"].forEach((function(t){var n=null==T?void 0:T[t];T[t]=function(){for(var t=arguments.length,r=new Array(t),a=0;a