From 0b5e0cbb24279cd905ef23f28ab8e28dcf3f6da8 Mon Sep 17 00:00:00 2001 From: helinfeng <1592544548@qq.com> Date: Wed, 14 Jun 2023 18:44:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E9=A2=84=E8=A7=88=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=92=8C=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- antdesign.327d013c.async.js | 298 +- color.less | 30 +- index.html | 2 +- monaco-editor.38977551.async.js | 186 +- office.html | 65 +- ...nHomework__Detail__index.4259a733.async.js | 1190 +++++ ...nHomework__Review__index.3e968cde.async.js | 1011 ++++ ..._Exercise__Detail__index.a6d2e13f.async.js | 2284 +++++++++ ...pHomework__Detail__index.2f276ddc.async.js | 1223 +++++ ...pHomework__Review__index.77f5589c.async.js | 796 +++ ...Homeworks__Detail__index.f56bc3e5.async.js | 1763 +++++++ umi.0f1049fb.js | 4379 +++++++++++++++++ vendors.93ba173a.async.js | 2 +- 13 files changed, 12940 insertions(+), 289 deletions(-) create mode 100644 p__Classrooms__Lists__CommonHomework__Detail__index.4259a733.async.js create mode 100644 p__Classrooms__Lists__CommonHomework__Review__index.3e968cde.async.js create mode 100644 p__Classrooms__Lists__Exercise__Detail__index.a6d2e13f.async.js create mode 100644 p__Classrooms__Lists__GroupHomework__Detail__index.2f276ddc.async.js create mode 100644 p__Classrooms__Lists__GroupHomework__Review__index.77f5589c.async.js create mode 100644 p__Classrooms__Lists__ShixunHomeworks__Detail__index.f56bc3e5.async.js create mode 100644 umi.0f1049fb.js diff --git a/antdesign.327d013c.async.js b/antdesign.327d013c.async.js index 0d0e56aab1..4ec8cd4fa5 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/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Innovation/PublicDataSet/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/app.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);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: /*!************************************************************************!*\ @@ -1619,9 +1619,9 @@ 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/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/motion.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tree/utils/iconUtil.js because of ./src/pages/RestFul/components/LeftBar/Rename.tsx */ +/*! 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/app.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) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/index.js */ @@ -1696,10 +1696,10 @@ 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/Innovation/PublicDataSet/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/grid/hooks/useBreakpoint.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/pages/Three/Model/UpdateNameModel.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/antd/es/config-provider/context.js because of ./src/app.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/app.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js because of ./src/pages/Engineering/Evaluate/List/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-pagination/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/en_US.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/Innovation/PublicDataSet/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/app.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 */ @@ -1964,7 +1964,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/css-animation/es/index.js because of ./node_modules/rc-notification/node_modules/rc-animate/es/AnimateChild.js */ +/*! 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/react-dom/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";var r=n("q1tI"),a=n.n(r),i=function(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");return"function"!=typeof t.componentWillReceiveProps?e:a.a.Profiler?(t.UNSAFE_componentWillReceiveProps=t.componentWillReceiveProps,delete t.componentWillReceiveProps,e):e};function o(e){var t=[];return a.a.Children.forEach(e,(function(e){t.push(e)})),t}function s(e,t){var n=null;return e&&e.forEach((function(e){n||e&&e.key===t&&(n=e)})),n}function l(e,t,n){var r=null;return e&&e.forEach((function(e){if(e&&e.key===t&&e.props[n]){if(r)throw new Error("two child with same key for children");r=e}})),r}var c=n("i8i4"),u=n.n(c),d=n("UwPn"),f={isAppearSupported:function(e){return e.transitionName&&e.transitionAppear||e.animation.appear},isEnterSupported:function(e){return e.transitionName&&e.transitionEnter||e.animation.enter},isLeaveSupported:function(e){return e.transitionName&&e.transitionLeave||e.animation.leave},allowAppearCallback:function(e){return e.transitionAppear||e.animation.appear},allowEnterCallback:function(e){return e.transitionEnter||e.animation.enter},allowLeaveCallback:function(e){return e.transitionLeave||e.animation.leave}},h=function(){function e(e,t){for(var n=0;n children");return a.a.createElement(g,{key:n.key,ref:function(t){e.childrenRefs[n.key]=t},animation:t.animation,transitionName:t.transitionName,transitionEnter:t.transitionEnter,transitionAppear:t.transitionAppear,transitionLeave:t.transitionLeave},n)})));var i=t.component;if(i){var o=t;return"string"==typeof i&&(o=y({className:t.className,style:t.style},t.componentProps)),a.a.createElement(i,o,r)}return r[0]||null}}]),t}(a.a.Component);S.isAnimate=!0,S.defaultProps={animation:{},component:"span",componentProps:{},transitionEnter:!0,transitionLeave:!0,transitionAppear:!1,onEnd:k,onEnter:k,onLeave:k,onAppear:k};var C=function(){var e=this;this.performEnter=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillEnter(e.handleDoneAdding.bind(e,t,"enter")))},this.performAppear=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillAppear(e.handleDoneAdding.bind(e,t,"appear")))},this.handleDoneAdding=function(t,n){var r=e.props;if(delete e.currentlyAnimatingKeys[t],!r.exclusive||r===e.nextProps){var a=o(x(r));e.isValidChildByKey(a,t)?"appear"===n?f.allowAppearCallback(r)&&(r.onAppear(t),r.onEnd(t,!0)):f.allowEnterCallback(r)&&(r.onEnter(t),r.onEnd(t,!0)):e.performLeave(t)}},this.performLeave=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillLeave(e.handleDoneLeaving.bind(e,t)))},this.handleDoneLeaving=function(t){var n=e.props;if(delete e.currentlyAnimatingKeys[t],!n.exclusive||n===e.nextProps){var r,a,i,s,l=o(x(n));if(e.isValidChildByKey(l,t))e.performEnter(t);else{var c=function(){f.allowLeaveCallback(n)&&(n.onLeave(t),n.onEnd(t,!1))};r=e.state.children,a=l,i=n.showProp,(s=r.length===a.length)&&r.forEach((function(e,t){var n=a[t];e&&n&&(e&&!n||!e&&n||e.key!==n.key||i&&e.props[i]!==n.props[i])&&(s=!1)})),s?c():e.setState({children:l},c)}}}};t.a=i(S)},Urep: /*!**********************************************************!*\ @@ -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/Innovation/PublicDataSet/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/app.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/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/responsiveObserve.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Innovation/PublicDataSet/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/Innovation/PublicDataSet/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/Innovation/PublicDataSet/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js because of ./src/pages/Innovation/PublicDataSet/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/responsiveObserve.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/app.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/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/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/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/hooks/useForceUpdate.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/pages/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ +/*! 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/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/app.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/app.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/pages/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/pages/Three/Model/UpdateNameModel.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/app.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.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/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/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ +/*! 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/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/app.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/.umi-production/plugin-locale/locale.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/pages/Three/Model/UpdateNameModel.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/context.js because of ./src/app.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/pages/Engineering/Lists/CurseSetting/index.tsx */ /*! 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,7 +2267,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/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/Innovation/PublicDataSet/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/app.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/layout/layout.js because of ./src/pages/Messages/Private/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)) */ @@ -2349,11 +2349,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/toConsumableArray.js (<- Module is not an ECMAScript module) */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./src/pages/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/dropdown.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ +/*! 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/app.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/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 */ /*! 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("RIqP"),l=n.n(s),c=n("q1tI"),u=n("TSYQ"),d=n.n(u),f=n("Zm9Q"),h=n("HQEm"),p=n.n(h),m=n("XBQK"),v=n("H84U"),g=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 L=[];t=h.map((function(e){var t,n=j(e.path,w);return n&&L.push(n),e.children&&e.children.length&&(t=c.createElement(k.a,null,e.children.map((function(e){return c.createElement(k.a.Item,{key:e.path||e.breadcrumbName},g(e,w,h,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=l()(e),a=j(t,n);return a&&r.push(a),r}(L,e.path,w)))})))),c.createElement(b,{overlay:t,separator:i,key:n||e.breadcrumbName},g(e,w,h,L))}))}else p&&(t=Object(f.a)(p).map((function(e,t){return e?(Object(S.a)(e.type&&(!0===e.type.__ANT_BREADCRUMB_ITEM||!0===e.type.__ANT_BREADCRUMB_SEPARATOR),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),Object(C.a)(e,{separator:i,key:t})):e})));var T=d()(u,P,o()({},"".concat(P,"-rtl"),"rtl"===A));return c.createElement("div",a()({className:T,style:s},x),t)};O.Item=b,O.Separator=x;var E=O;t.a=E},bKJz: @@ -2404,10 +2404,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/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/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./src/app.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/app.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/tabs/index.js because of ./src/pages/Innovation/PublicDataSet/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)) */ /*! 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("q1tI"),l=n("TSYQ"),c=n.n(l),u=n("BGR+"),d=n("H84U"),f=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,15 +3593,15 @@ 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/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/raf.js because of ./src/pages/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/ref.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/index.js because of ./src/.umi-production/plugin-locale/locale.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/TextArea.js because of ./src/pages/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/pages/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ +/*! 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/virtualSpaces/Lists/Syllabuses/AddOrEdit/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/app.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/index.js because of ./src/app.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/TextArea.js because of ./src/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/app.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) */ /*! 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)) */ @@ -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/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./src/pages/Innovation/PublicDataSet/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/Three/Model/UpdateNameModel.tsx */ -/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/pages/Innovation/PublicDataSet/index.tsx */ +/*! 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/app.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./src/app.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 5a50136e37..429d15060f 100644 --- a/color.less +++ b/color.less @@ -84,7 +84,7 @@ html {--antd-wave-shadow-color: @primary-color;} .zoom-right-enter, .zoom-right-appear {animation-fill-mode: both;} .zoom-right-leave {animation-fill-mode: both;} .ant-alert {color: @text-color;border-radius: 2px;} -.ant-alert-success {background-color: color(~`colorPalette("@{success-color}", 1)`);border: 1px solid color(~`colorPalette("@{success-color}", 4)`);} +.ant-alert-success {background-color: color(~`colorPalette("@{success-color}", 1)`);border: 1px solid color(~`colorPalette("@{success-color}", 3)`);} .ant-alert-success .ant-alert-icon {color: @success-color;} .ant-alert-info {background-color: color(~`colorPalette("@{primary-color}", 1)`);border: 1px solid color(~`colorPalette("@{primary-color}", 3)`);} .ant-alert-info .ant-alert-icon {color: @primary-color;} @@ -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(78, 58, 225, 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(175, 53, 88, 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(78, 58, 225, 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(175, 53, 88, 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(78, 58, 225, 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(175, 53, 88, 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(78, 58, 225, 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(175, 53, 88, 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(78, 58, 225, 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(175, 53, 88, 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(5, 216, 147, 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(25, 108, 95, 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(5, 216, 147, 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(25, 108, 95, 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(5, 216, 147, 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(25, 108, 95, 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(5, 216, 147, 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(25, 108, 95, 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(5, 216, 147, 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(5, 216, 147, 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(25, 108, 95, 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(25, 108, 95, 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;} @@ -1465,7 +1465,7 @@ tr.ant-table-expanded-row:hover > td {background: #fbfbfb;} .ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;} .ant-tag-volcano {color: #fa541c;background: #fff2e8;border-color: #ffbb96;} .ant-tag-volcano-inverse {color: #fff;background: #fa541c;border-color: #fa541c;} -.ant-tag-orange {color: #fa8c16;background: color(~`colorPalette("@{layout-body-background}", 1)`);border-color: #ffd591;} +.ant-tag-orange {color: #fa8c16;background: #fff7e6;border-color: #ffd591;} .ant-tag-orange-inverse {color: #fff;background: #fa8c16;border-color: #fa8c16;} .ant-tag-yellow {color: #fadb14;background: #feffe6;border-color: #fffb8f;} .ant-tag-yellow-inverse {color: #fff;background: #fadb14;border-color: #fadb14;} @@ -1479,14 +1479,14 @@ tr.ant-table-expanded-row:hover > td {background: #fbfbfb;} .ant-tag-green-inverse {color: #fff;background: #52c41a;border-color: #52c41a;} .ant-tag-blue {color: #1890ff;background: #e6f7ff;border-color: #91d5ff;} .ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;} -.ant-tag-geekblue {color: #2f54eb;background: #f0f5ff;border-color: #adc6ff;} +.ant-tag-geekblue {color: #2f54eb;background: color(~`colorPalette("@{heading-color}", 4)`);border-color: #adc6ff;} .ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;} .ant-tag-purple {color: #722ed1;background: #f9f0ff;border-color: #d3adf7;} .ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;} .ant-tag-success {color: #52c41a;background: #f6ffed;border-color: #b7eb8f;} .ant-tag-processing {color: #1890ff;background: #e6f7ff;border-color: #91d5ff;} .ant-tag-error {color: #f5222d;background: #fff1f0;border-color: #ffa39e;} -.ant-tag-warning {color: #fa8c16;background: color(~`colorPalette("@{layout-body-background}", 1)`);border-color: #ffd591;} +.ant-tag-warning {color: #fa8c16;background: #fff7e6;border-color: #ffd591;} .ant-timeline {color: @text-color;} .ant-timeline-item-tail {border-left: 2px solid #f0f0f0;} .ant-timeline-item-pending .ant-timeline-item-head {background-color: transparent;} diff --git a/index.html b/index.html index 1e8d9243ad..45f0f0be6e 100644 --- a/index.html +++ b/index.html @@ -127,6 +127,6 @@ - + diff --git a/monaco-editor.38977551.async.js b/monaco-editor.38977551.async.js index d0ebc507d8..8bf04d6860 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.lineNumbero,u=i>r,l=ir)continue;if(bi)continue;if(g1&&o--,e.columnSelect(t,n,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,o)},e.columnSelectRight=function(e,t,n){for(var i=0,o=Math.min(n.fromViewLineNumber,n.toViewLineNumber),r=Math.max(n.fromViewLineNumber,n.toViewLineNumber),s=o;s<=r;s++){var a=t.getLineMaxColumn(s),u=m.a.visibleColumnFromColumn2(e,t,new v.a(s,a));i=Math.max(i,u)}var l=n.toViewVisualColumn;return l1)for(var r=n.modelState?n.modelState.position:null,s=n.viewState?n.viewState.position:null,a=0,u=o.length;ao&&(i=o);var r=new _.a(i,1,i,e.context.model.getLineMaxColumn(i)),a=0;if(n.at)switch(n.at){case s.RawAtArgument.Top:a=3;break;case s.RawAtArgument.Center:a=1;break;case s.RawAtArgument.Bottom:a=4}var u=e.context.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,u,a,0)},t}(x))),e.SelectAll=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"selectAll",precondition:void 0})||this}return D(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[C.b.selectAll(e.context,e.getPrimaryCursor())])},t}(x))),e.SetSelection=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"setSelection",precondition:void 0})||this}return D(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[m.d.fromModelSelection(t.selection)])},t}(x)))}(u||(u={})),c=l||(l={}),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors();i&&this.runCoreEditingCommand(t,i,n||{})},t}(f.c),c.CoreEditingCommand=d,c.LineBreakInsert=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"lineBreakInsert",precondition:O.a.writable,kbOpts:{weight:0,kbExpr:O.a.textInputFocus,primary:0,mac:{primary:301}}})||this}return D(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,w.a.lineBreakInsert(t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection}))))},t}(d))),c.Outdent=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"outdent",precondition:O.a.writable,kbOpts:{weight:0,kbExpr:L.a.and(O.a.editorTextFocus,O.a.tabDoesNotMoveFocus),primary:1026}})||this}return D(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,w.a.outdent(t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection})))),e.pushUndoStop()},t}(d))),c.Tab=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"tab",precondition:O.a.writable,kbOpts:{weight:0,kbExpr:L.a.and(O.a.editorTextFocus,O.a.tabDoesNotMoveFocus),primary:2}})||this}return D(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,w.a.tab(t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection})))),e.pushUndoStop()},t}(d))),c.DeleteLeft=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"deleteLeft",precondition:O.a.writable,kbOpts:{weight:0,kbExpr:O.a.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})||this}return D(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){var i=y.a.deleteLeft(t.getPrevEditOperationType(),t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection}))),o=i[0],r=i[1];o&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(2)},t}(d))),c.DeleteRight=Object(f.g)(new(function(e){function t(){return e.call(this,{id:"deleteRight",precondition:O.a.writable,kbOpts:{weight:0,kbExpr:O.a.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})||this}return D(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){var i=y.a.deleteRight(t.getPrevEditOperationType(),t.context.config,t.context.model,t.getAll().map((function(e){return e.modelState.selection}))),o=i[0],r=i[1];o&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(3)},t}(d)));var k=function(e){function t(t){var n=e.call(this,t)||this;return n._editorHandler=t.editorHandler,n._inputHandler=t.inputHandler,n}return D(t,e),t.prototype.runCommand=function(e,t){var n=e.get(g.a).getFocusedCodeEditor();if(n&&n.hasTextFocus())return this._runEditorHandler(e,n,t);var i=document.activeElement;if(!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)){var o=e.get(g.a).getActiveCodeEditor();return o?(o.focus(),this._runEditorHandler(e,o,t)):void 0}document.execCommand(this._inputHandler)},t.prototype._runEditorHandler=function(e,t,n){var i=this._editorHandler;"string"==typeof i?t.trigger("keyboard",i,n):((n=n||{}).source="keyboard",i.runEditorCommand(e,t,n))},t}(f.a),E=function(e){function t(t,n,i){var o=e.call(this,{id:t,precondition:void 0,description:i})||this;return o._handlerId=n,o}return D(t,e),t.prototype.runCommand=function(e,t){var n=e.get(g.a).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)},t}(f.a);function I(e,t){N(new E("default:"+e,e)),N(new E(e,e,t))}N(new k({editorHandler:u.SelectAll,inputHandler:"selectAll",id:"editor.action.selectAll",precondition:O.a.textInputFocus,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:{menuId:25,group:"1_basic",title:h.a({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1}})),N(new k({editorHandler:S.b.Undo,inputHandler:"undo",id:S.b.Undo,precondition:O.a.writable,kbOpts:{weight:0,kbExpr:O.a.textInputFocus,primary:2104},menuOpts:{menuId:17,group:"1_do",title:h.a({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1}})),N(new E("default:"+S.b.Undo,S.b.Undo)),N(new k({editorHandler:S.b.Redo,inputHandler:"redo",id:S.b.Redo,precondition:O.a.writable,kbOpts:{weight:0,kbExpr:O.a.textInputFocus,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:{menuId:17,group:"1_do",title:h.a({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2}})),N(new E("default:"+S.b.Redo,S.b.Redo)),I(S.b.Type,{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),I(S.b.ReplacePreviousChar),I(S.b.CompositionStart),I(S.b.CompositionEnd),I(S.b.Paste),I(S.b.Cut)},"1lwE": @@ -181,13 +181,13 @@ /*! 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/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/wordHighlighter/wordHighlighter.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/contrib/gotoSymbol/link/clickLinkGesture.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/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/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/notification/common/notification.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/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/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("YHy6");var i,o=n("3/fG"),r=n("X+cX"),s=n("JQT/"),a=n("/cxE"),u=n("eLzo"),l=n("pmY6"),c=n("MNsG"),d=n("sswD"),h=n("tX9W"),p=n("twdY"),f=n("aBYw"),g=n("bY76"),m=n("aokT"),v=n("G2kB"),_=n("nnTU"),b=n("6OMU"),y=(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)}),C=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())}))},w=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;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},T=function(e,t){return function(n,i){t(n,i,e)}},P=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())}))},R=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] ?(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": /*!*****************************************************************!*\ @@ -401,11 +401,11 @@ /*! 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/contrib/gotoError/gotoError.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 */ -/*! 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/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/progress/common/progress.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */function(e,t,n){"use strict";n.r(t),n.d(t,"DefinitionAction",(function(){return ie}));var i,o=n("OBOq"),r=n("X+cX"),s=n("/kV6"),a=n("MNsG"),u=n("sFUC"),l=n("sswD"),c=n("Vxe3"),d=n("cGHE"),h=n("aokT"),p=n("wQH0"),f=n("twdY"),g=n("NR8r"),m=n("iNS8"),v=n("QY8A"),_=n("9o5J"),b=n("3/fG"),y=n("fjLI"),C=n("T8No"),w=n("sM1p"),S=n("tTk5"),O=n("vRMv"),L=n("nnTU"),D=n("vATl"),x=n("Cg/j"),N=n("9fML"),k=n("nrhi"),E=n("pmY6"),I=n("MI8n"),M=n("bexQ"),T=n("gslv"),P=(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)}),R=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},A=function(e,t){return function(n,i){t(n,i,e)}},F=new C.d("hasSymbols",!1),j=Object(x.c)("ISymbolNavigationService"),W=function(){function e(e,t,n,i){this._editorService=t,this._notificationService=n,this._keybindingService=i,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=F.bindTo(e)}return e.prototype.reset=function(){this._ctxHasSymbols.reset(),Object(E.f)(this._currentState),Object(E.f)(this._currentMessage),this._currentModel=void 0,this._currentIdx=-1},e.prototype.put=function(e){var t=this,n=e.parent.parent;if(n.references.length<=1)this.reset();else{this._currentModel=n,this._currentIdx=n.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();var i=new Y(this._editorService),o=i.onDidChange((function(e){if(!t._ignoreEditorChange){var i=t._editorService.getActiveCodeEditor();if(i){var o=i.getModel(),r=i.getPosition();if(o&&r){for(var s=!1,a=!1,u=0,l=n.references;u0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]1)?[3,1]:(this._openInPeek(n,i),[3,3]);case 1:return r=i.firstReference(),s=i.references.length>1&&"gotoAndPeek"===o,[4,this._openReference(n,e,r,this._configuration.openToSide,!s)];case 2:a=u.sent(),s&&a?this._openInPeek(a,i):i.dispose(),"goto"===o&&t.put(r),u.label=3;case 3:return[2]}}))}))},t.prototype._openReference=function(e,t,n,i,o){return ee(this,void 0,void 0,(function(){var r,s,a,u;return te(this,(function(l){switch(l.label){case 0:return r=void 0,Object(f.G)(n)&&(r=n.targetSelectionRange),r||(r=n.range),[4,t.openCodeEditor({resource:n.uri,options:{selection:h.a.collapseToStart(r),revealInCenterIfOutsideViewport:!0}},e,i)];case 1:return(s=l.sent())?(o&&(a=s.getModel(),u=s.deltaDecorations([],[{range:r,options:{className:"symbolHighlight"}}]),setTimeout((function(){s.getModel()===a&&s.deltaDecorations(u,[])}),350)),[2,s]):[2,void 0]}}))}))},t.prototype._openInPeek=function(e,t){var n=v.a.get(e);n&&e.hasModel()?n.toggleWidget(e.getSelection(),Object(r.f)((function(e){return Promise.resolve(t)})),this._configuration.openInPeek):t.dispose()},t}(l.b),ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){var i;return te(this,(function(o){switch(o.label){case 0:return i=_.c.bind,[4,Object(O.b)(e,t,n)];case 1:return[2,new(i.apply(_.c,[void 0,o.sent(),b.a("def.title","Definitions")]))]}}))}))},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?b.a("noResultWord","No definition found for '{0}'",e.word):b.a("generic.noResults","No definition found")},t.prototype._getAlternativeCommand=function(e){return e.getOption(41).alternativeDefinitionCommand},t.prototype._getGoToPreference=function(e){return e.getOption(41).multipleDefinitions},t}(ne),oe=a.g&&!Z.l?2118:70;Object(l.f)(((V=function(e){function t(){var n=e.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:t.id,label:b.a("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:C.a.and(p.a.hasDefinitionProvider,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:oe,weight:100},contextMenuOpts:{group:"navigation",order:1.1},menuOpts:{menuId:19,group:"4_symbol_nav",order:2,title:b.a({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")}})||this;return L.a.registerCommandAlias("editor.action.goToDeclaration",t.id),n}return $(t,e),t}(ie)).id="editor.action.revealDefinition",V)),Object(l.f)(((B=function(e){function t(){var n=e.call(this,{openToSide:!0,openInPeek:!1,muteMessage:!1},{id:t.id,label:b.a("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:C.a.and(p.a.hasDefinitionProvider,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:Object(s.a)(2089,oe),weight:100}})||this;return L.a.registerCommandAlias("editor.action.openDeclarationToTheSide",t.id),n}return $(t,e),t}(ie)).id="editor.action.revealDefinitionAside",B)),Object(l.f)(((H=function(e){function t(){var n=e.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:t.id,label:b.a("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:C.a.and(p.a.hasDefinitionProvider,m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:8,group:"peek",order:2}})||this;return L.a.registerCommandAlias("editor.action.previewDeclaration",t.id),n}return $(t,e),t}(ie)).id="editor.action.peekDefinition",H));var re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){var i;return te(this,(function(o){switch(o.label){case 0:return i=_.c.bind,[4,Object(O.a)(e,t,n)];case 1:return[2,new(i.apply(_.c,[void 0,o.sent(),b.a("decl.title","Declarations")]))]}}))}))},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?b.a("decl.noResultWord","No declaration found for '{0}'",e.word):b.a("decl.generic.noResults","No declaration found")},t.prototype._getAlternativeCommand=function(e){return e.getOption(41).alternativeDeclarationCommand},t.prototype._getGoToPreference=function(e){return e.getOption(41).multipleDeclarations},t}(ne);Object(l.f)(((z=function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:t.id,label:b.a("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:C.a.and(p.a.hasDeclarationProvider,p.a.isInEmbeddedEditor.toNegated()),contextMenuOpts:{group:"navigation",order:1.3},menuOpts:{menuId:19,group:"4_symbol_nav",order:3,title:b.a({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")}})||this}return $(t,e),t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?b.a("decl.noResultWord","No declaration found for '{0}'",e.word):b.a("decl.generic.noResults","No declaration found")},t}(re)).id="editor.action.revealDeclaration",z)),Object(l.f)(function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:b.a("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:C.a.and(p.a.hasDeclarationProvider,m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated()),contextMenuOpts:{menuId:8,group:"peek",order:3}})||this}return $(t,e),t}(re));var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){var i;return te(this,(function(o){switch(o.label){case 0:return i=_.c.bind,[4,Object(O.e)(e,t,n)];case 1:return[2,new(i.apply(_.c,[void 0,o.sent(),b.a("typedef.title","Type Definitions")]))]}}))}))},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?b.a("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):b.a("goToTypeDefinition.generic.noResults","No type definition found")},t.prototype._getAlternativeCommand=function(e){return e.getOption(41).alternativeTypeDefinitionCommand},t.prototype._getGoToPreference=function(e){return e.getOption(41).multipleTypeDefinitions},t}(ne);Object(l.f)(((U=function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:t.ID,label:b.a("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:C.a.and(p.a.hasTypeDefinitionProvider,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4},menuOpts:{menuId:19,group:"4_symbol_nav",order:3,title:b.a({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")}})||this}return $(t,e),t}(se)).ID="editor.action.goToTypeDefinition",U)),Object(l.f)(((K=function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:t.ID,label:b.a("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:C.a.and(p.a.hasTypeDefinitionProvider,m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated()),contextMenuOpts:{menuId:8,group:"peek",order:4}})||this}return $(t,e),t}(se)).ID="editor.action.peekTypeDefinition",K));var ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){var i;return te(this,(function(o){switch(o.label){case 0:return i=_.c.bind,[4,Object(O.c)(e,t,n)];case 1:return[2,new(i.apply(_.c,[void 0,o.sent(),b.a("impl.title","Implementations")]))]}}))}))},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?b.a("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):b.a("goToImplementation.generic.noResults","No implementation found")},t.prototype._getAlternativeCommand=function(e){return e.getOption(41).alternativeImplementationCommand},t.prototype._getGoToPreference=function(e){return e.getOption(41).multipleImplementations},t}(ne);Object(l.f)(((q=function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:t.ID,label:b.a("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:C.a.and(p.a.hasImplementationProvider,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:2118,weight:100},menuOpts:{menuId:19,group:"4_symbol_nav",order:4,title:b.a({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},contextMenuOpts:{group:"navigation",order:1.45}})||this}return $(t,e),t}(ae)).ID="editor.action.goToImplementation",q)),Object(l.f)(((G=function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:t.ID,label:b.a("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:C.a.and(p.a.hasImplementationProvider,m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:8,group:"peek",order:5}})||this}return $(t,e),t}(ae)).ID="editor.action.peekImplementation",G));var ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),t.prototype._getNoResultFoundMessage=function(e){return e?b.a("references.no","No references found for '{0}'",e.word):b.a("references.noGeneric","No references found")},t.prototype._getAlternativeCommand=function(e){return e.getOption(41).alternativeReferenceCommand},t.prototype._getGoToPreference=function(e){return e.getOption(41).multipleReferences},t}(ne);Object(l.f)(function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:b.a("goToReferences.label","Go to References"),alias:"Go to References",precondition:C.a.and(p.a.hasReferenceProvider,m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:p.a.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45},menuOpts:{menuId:19,group:"4_symbol_nav",order:5,title:b.a({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")}})||this}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){var i;return te(this,(function(o){switch(o.label){case 0:return i=_.c.bind,[4,Object(O.d)(e,t,!0,n)];case 1:return[2,new(i.apply(_.c,[void 0,o.sent(),b.a("ref.title","References")]))]}}))}))},t}(ue)),Object(l.f)(function(e){function t(){return e.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:b.a("references.action.label","Peek References"),alias:"Peek References",precondition:C.a.and(p.a.hasReferenceProvider,m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated()),contextMenuOpts:{menuId:8,group:"peek",order:6}})||this}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){var i;return te(this,(function(o){switch(o.label){case 0:return i=_.c.bind,[4,Object(O.d)(e,t,!1,n)];case 1:return[2,new(i.apply(_.c,[void 0,o.sent(),b.a("ref.title","References")]))]}}))}))},t}(ue));var le=function(e){function t(t,n,i){var o=e.call(this,t,{id:"editor.action.goToLocation",label:b.a("label.generic","Go To Any Symbol"),alias:"Go To Any Symbol",precondition:C.a.and(m.b.notInPeekEditor,p.a.isInEmbeddedEditor.toNegated())})||this;return o._references=n,o._gotoMultipleBehaviour=i,o}return $(t,e),t.prototype._getLocationModel=function(e,t,n){return ee(this,void 0,void 0,(function(){return te(this,(function(e){return[2,new _.c(this._references,b.a("generic.title","Locations"))]}))}))},t.prototype._getNoResultFoundMessage=function(e){return e&&b.a("generic.noResult","No results for '{0}'",e.word)||""},t.prototype._getGoToPreference=function(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(41).multipleReferences},t.prototype._getAlternativeCommand=function(){return""},t}(ne);L.a.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:X.a},{name:"position",description:"The position at which to start",constraint:d.a.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:function(e,t,n,i,o,r){return ee(void 0,void 0,void 0,(function(){var s,a;return te(this,(function(l){switch(l.label){case 0:return Object(Q.a)(X.a.isUri(t)),Object(Q.a)(d.a.isIPosition(n)),Object(Q.a)(Array.isArray(i)),Object(Q.a)(void 0===o||"string"==typeof o),Object(Q.a)(void 0===r||"boolean"==typeof r),[4,(s=e.get(c.a)).openCodeEditor({resource:t},s.getFocusedCodeEditor())];case 1:return a=l.sent(),Object(u.a)(a)?(a.setPosition(n),a.revealPositionInCenterIfOutsideViewport(n,0),[2,a.invokeWithinContext((function(e){var t=new le({muteMessage:!0,openInPeek:Boolean(r),openToSide:!1},i,o);e.get(x.a).invokeFunction(t.run.bind(t),a)}))]):[2]}}))}))}}),L.a.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:X.a},{name:"position",description:"The position at which to start",constraint:d.a.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:function(e,t,n,i,o){return ee(void 0,void 0,void 0,(function(){return te(this,(function(r){return e.get(L.b).executeCommand("editor.action.goToLocations",t,n,i,o,!0),[2]}))}))}}),L.a.registerCommand({id:"editor.action.findReferences",handler:function(e,t,n){Object(Q.a)(X.a.isUri(t)),Object(Q.a)(d.a.isIPosition(n));var i=e.get(c.a);return i.openCodeEditor({resource:t},i.getFocusedCodeEditor()).then((function(e){if(Object(u.a)(e)&&e.hasModel()){var t=v.a.get(e);if(t){var i=Object(r.f)((function(t){return Object(O.d)(e.getModel(),d.a.lift(n),!1,t).then((function(e){return new _.c(e,b.a("ref.title","References"))}))})),o=new h.a(n.lineNumber,n.column,n.lineNumber,n.column);return Promise.resolve(t.toggleWidget(o,i,!1))}}}))}}),L.a.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")},"8gvo": /*!****************************************************************************************!*\ !*** ./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css ***! @@ -428,7 +428,7 @@ /*! 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/parameterHints/parameterHints.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/gotoError/gotoError.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,26 +442,26 @@ /*! 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/quickOutline.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/parameterHints/parameterHints.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/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/quickOutline.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/gotoSymbol/goToCommands.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/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/wordHighlighter/wordHighlighter.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/config/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/editor/browser/config/elementSizeObserver.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/core/editorState.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/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/editorBrowser.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/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/codeAction/codeActionContributions.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 */ @@ -471,25 +471,25 @@ /*! 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/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/multicursor/multicursor.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/wordHighlighter/wordHighlighter.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/contrib/multicursor/multicursor.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/wordHighlighter/wordHighlighter.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/wordHighlighter/wordHighlighter.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/wordHighlighter/wordHighlighter.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/wordHighlighter/wordHighlighter.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/wordOperations/wordOperations.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/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/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/contrib/multicursor/multicursor.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/wordHighlighter/wordHighlighter.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/contrib/parameterHints/parameterHints.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/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 */ @@ -498,13 +498,13 @@ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.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/viewModel/prefixSumComputer.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/viewModel/viewModel.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/view/editorColorRegistry.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/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/editor/common/view/overviewZoneManager.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/standalone/common/standaloneThemeService.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast.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/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/find/findController.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/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/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 */ @@ -520,7 +520,7 @@ /*! 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/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/contrib/gotoSymbol/goToCommands.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/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/registry/common/platform.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -627,7 +627,7 @@ /*! exports provided: QuickFixController, applyCodeAction, QuickFixAction, CodeActionCommand, RefactorAction, SourceAction, OrganizeImportsAction, FixAllAction, AutoFixAction */ /*! exports used: AutoFixAction, CodeActionCommand, FixAllAction, OrganizeImportsAction, QuickFixAction, QuickFixController, RefactorAction, SourceAction */ /*! 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/globalMouseMoveMonitor.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/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/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 */ @@ -643,7 +643,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/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/wordHighlighter/wordHighlighter.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 */ @@ -655,7 +655,7 @@ /*! 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/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/contrib/gotoSymbol/goToCommands.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/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/telemetry/common/telemetry.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 */ @@ -827,12 +827,12 @@ /*! 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/caretOperations/transpose.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/wordOperations/wordOperations.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/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/wordOperations/wordOperations.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/wordOperations/wordOperations.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/contrib/linesOperations/linesOperations.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/wordHighlighter/wordHighlighter.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/wordHighlighter/wordHighlighter.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,7 +1634,7 @@ /*! 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/standalone/browser/quickOpen/quickOutline.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/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/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 */ @@ -1661,14 +1661,14 @@ /*! 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/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/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/wordHighlighter/wordHighlighter.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/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/contrib/gotoSymbol/goToCommands.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/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/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,"CodeLensContribution",(function(){return z}));var i=n("X+cX"),o=n("/cxE"),r=n("pmY6"),s=n("vATl"),a=n("sswD"),u=n("twdY"),l=n("6OMU"),c=n("JQT/"),d=n("bY76"),h=n("G2kB"),p=function(){function e(){this.lenses=[],this._disposables=new r.b}return e.prototype.dispose=function(){this._disposables.dispose()},e.prototype.add=function(e,t){this._disposables.add(e);for(var n=0,i=e.lenses;nt.symbol.range.startLineNumber?1:i.get(e.provider)i.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0})),r}))}Object(a.j)("_executeCodeLensProvider",(function(e,t){var n=t.resource,i=t.itemResolveCount;if(!(n instanceof d.a))throw Object(o.b)();var s=e.get(h.a).getModel(n);if(!s)throw Object(o.b)();var a=[],u=new r.b;return f(s,c.a.None).then((function(e){u.add(e);for(var t=[],n=function(e){void 0===i||Boolean(e.symbol.command)?a.push(e.symbol):i-- >0&&e.provider.resolveCodeLens&&t.push(Promise.resolve(e.provider.resolveCodeLens(s,e.symbol,c.a.None)).then((function(t){return a.push(t||e.symbol)})))},o=0,r=e.lenses;o"+s+"",this._commands.set(String(o),r.command)):n+=""+s+"",o+1 | ")}}i?(n||(n=" "),this._domNode.innerHTML=n,this._isEmpty&&t&&g.f(this._domNode,"fadein"),this._isEmpty=!1):this._domNode.innerHTML="no commands"},e.prototype.getCommand=function(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0},e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.updatePosition=function(e){var t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}},e.prototype.getPosition=function(){return this._widgetPosition||null},e._idPool=0,e}(),L=function(){function e(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}return e.prototype.addDecoration=function(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)},e.prototype.removeDecoration=function(e){this._removeDecorations.push(e)},e.prototype.commit=function(e){for(var t=e.deltaDecorations(this._removeDecorations,this._addDecorations),n=0,i=t.length;n0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(u,!1))}return e.prototype._createContentWidgetIfNecessary=function(){this._contentWidget||(this._contentWidget=new O(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))},e.prototype.dispose=function(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0},e.prototype.isDisposed=function(){return this._isDisposed},e.prototype.isValid=function(){var e=this;return this._decorationIds.some((function(t,n){var i=e._editor.getModel().getDecorationRange(t),o=e._data[n].symbol;return!(!i||_.a.isEmpty(o.range)!==i.isEmpty())}))},e.prototype.updateCodeLensSymbols=function(e,t){var n=this;this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((function(e,i){t.addDecoration({range:e.symbol.range,options:b.a.EMPTY},(function(e){return n._decorationIds[i]=e}))}))},e.prototype.computeIfNecessary=function(e){if(!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone"))return null;for(var t=0;t a:hover { color: "+i+" !important; }"),t.addRule(".monaco-editor .codelens-decoration > a:hover .codicon { color: "+i+" !important; }"))}));var x=n("nnTU"),N=n("sM1p"),k=n("Cg/j"),E=n("9fML"),I=n("QDVR"),M=n("A+jI"),T=n("C/vA"),P=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},R=function(e,t){return function(n,i){t(n,i,e)}},A=Object(k.c)("ICodeLensCache"),F=function(e,t){this.lineCount=e,this.data=t},j=function(){function e(e){var t=this;this._fakeProvider=new(function(){function e(){}return e.prototype.provideCodeLenses=function(){throw new Error("not supported")},e}()),this._cache=new I.a(20,.75);Object(i.k)((function(){return e.remove("codelens/cache",1)}));var n="codelens/cache2",o=e.get(n,1,"{}");this._deserialize(o),Object(T.a)(e.onWillSaveState)((function(i){i.reason===M.c.SHUTDOWN&&e.store(n,t._serialize(),1)}))}return e.prototype.put=function(e,t){var n=t.lenses.map((function(e){var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),i=new p;i.add({lenses:n,dispose:function(){}},this._fakeProvider);var o=new F(e.getLineCount(),i);this._cache.set(e.uri.toString(),o)},e.prototype.get=function(e){var t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0},e.prototype.delete=function(e){this._cache.delete(e.uri.toString())},e.prototype._serialize=function(){var e=Object.create(null);return this._cache.forEach((function(t,n){for(var i=new Set,o=0,r=t.data.lenses;o=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)}},H=function(){for(var e=0,t=0,n=arguments.length;t a > .codicon { line-height: "+n+"px; font-size: "+o+"px; }\n\t\t";this._styleElement.innerHTML=r},e.prototype._localDispose=function(){this._currentFindCodeLensSymbolsPromise&&(this._currentFindCodeLensSymbolsPromise.cancel(),this._currentFindCodeLensSymbolsPromise=void 0,this._modelChangeCounter++),this._currentResolveCodeLensSymbolsPromise&&(this._currentResolveCodeLensSymbolsPromise.cancel(),this._currentResolveCodeLensSymbolsPromise=void 0),this._localToDispose.clear(),this._oldCodeLensModels.clear(),Object(r.f)(this._currentCodeLensModel)},e.prototype._onModelChange=function(){var e=this;this._localDispose();var t=this._editor.getModel();if(t&&this._isEnabled){var n=this._codeLensCache.get(t);if(n&&this._renderCodeLensSymbols(n),u.b.has(t)){for(var a=0,l=u.b.all(t);a0&&h.schedule()}))),this._localToDispose.add(this._editor.onDidLayoutChange((function(){h.schedule()}))),this._localToDispose.add(Object(r.h)((function(){if(e._editor.getModel()){var t=s.c.capture(e._editor);e._editor.changeDecorations((function(t){e._editor.changeViewZones((function(n){e._disposeAllLenses(t,n)}))})),t.restore(e._editor)}else e._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseUp((function(t){var n;if(9===t.target.type){var i=t.target.element;if("SPAN"===(null==i?void 0:i.tagName)&&(i=i.parentElement),"A"===(null==i?void 0:i.tagName))for(var o=0,r=e._lenses;oi||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(u):(n=[u],o.push(n)))}var c=s.c.capture(this._editor);this._editor.changeDecorations((function(e){t._editor.changeViewZones((function(n){for(var i=new L,r=0,s=0;s=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/wordHighlighter/wordHighlighter.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/wordOperations/wordOperations.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/wordHighlighter/wordHighlighter.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,15 +1759,15 @@ /*! 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/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/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/contrib/gotoSymbol/goToCommands.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/parameterHints/parameterHints.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/gotoError/gotoError.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/standalone/browser/quickOpen/quickOutline.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/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 */ @@ -1788,10 +1788,10 @@ /*! 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/contrib/format/formatActions.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/parameterHints/parameterHints.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/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/parameterHints/parameterHints.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 */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/bracketSelections.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/smartSelect/smartSelect.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetController2.js (<- Module is referenced from these modules with unsupported syntax: include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js (referenced with cjs require)) */ /*! 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/snippet/snippetController2.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/quickOutline.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/gotoError/gotoError.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 */ @@ -1851,14 +1851,14 @@ /*! 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/contrib/parameterHints/parameterHints.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/gotoError/gotoError.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/quickOutline.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;ue.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;a=u?o=Math.max(o,u+l-i):(t[n++]=new F(i,o),i=u,o=l)}return t[n++]=new F(i,o),t},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var n=[],i=0,o=e.length;ia)return null;(t=Math.min(a,Math.max(0,t)))!==(i=Math.min(a,Math.max(0,i)))&&i>0&&0===o&&(i--,o=1073741824);var u=e.children[t].firstChild,l=e.children[i].firstChild;if(u&&l||(!u&&0===n&&t>0&&(u=e.children[t-1].firstChild,n=1073741824),!l&&0===o&&i>0&&(l=e.children[i-1].firstChild,o=1073741824)),!u||!l)return null;n=Math.min(u.textContent.length,Math.max(0,n)),o=Math.min(l.textContent.length,Math.max(0,o));var c=this._readClientRects(u,n,l,o,s);return this._createHorizontalRangesFromClientRects(c,r)},e}(),H=n("dBaI"),z=n("baJR"),U=n("t9D7"),K=n("/UlZ"),q=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=!!f.f||!(f.d||m.h||m.k),Y=m.f,Z=function(){function e(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}return Object.defineProperty(e.prototype,"clientRectDeltaLeft",{get:function(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft},enumerable:!0,configurable:!0}),e}(),X=function(){function e(e,t){this.themeType=t;var n=e.options,i=n.get(34);this.renderWhitespace=n.get(74),this.renderControlCharacters=n.get(69),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.useMonospaceOptimizations=i.isMonospace&&!n.get(23),this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(49),this.stopRenderingLineAfter=n.get(88),this.fontLigatures=n.get(35)}return e.prototype.equals=function(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures},e}(),Q=function(){function e(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}return e.prototype.getDomNode=function(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null},e.prototype.setDomNode=function(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=Object(p.b)(e)},e.prototype.onContentChanged=function(){this._isMaybeInvalid=!0},e.prototype.onTokensChanged=function(){this._isMaybeInvalid=!0},e.prototype.onDecorationsChanged=function(){this._isMaybeInvalid=!0},e.prototype.onOptionsChanged=function(e){this._isMaybeInvalid=!0,this._options=e},e.prototype.onSelectionChanged=function(){return!(!Y&&this._options.themeType!==U.b&&"selection"!==this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)},e.prototype.renderLine=function(t,n,i,o){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;var r=i.getViewLineRenderingData(t),s=this._options,a=H.a.filter(r.inlineDecorations,t,r.minColumn,r.maxColumn),u=null;if(Y||s.themeType===U.b||"selection"===this._options.renderWhitespace)for(var l=0,c=i.selections;lt)){var h=d.startLineNumber===t?d.startColumn:r.minColumn,p=d.endLineNumber===t?d.endColumn:r.maxColumn;h');var g=Object(z.d)(f,o);o.appendASCIIString("");var m=null;return G&&r.isBasicASCII&&s.useMonospaceOptimizations&&0===g.containsForeignElements&&r.content.length<300&&f.lineTokens.getCount()<100&&(m=new J(this._renderedViewLine?this._renderedViewLine.domNode:null,f,g.characterMapping)),m||(m=te(this._renderedViewLine?this._renderedViewLine.domNode:null,f,g.characterMapping,g.containsRTL,g.containsForeignElements)),this._renderedViewLine=m,!0},e.prototype.layoutLine=function(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))},e.prototype.getWidth=function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0},e.prototype.getWidthIsFast=function(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()},e.prototype.getVisibleRangesForRange=function(e,t,n){if(!this._renderedViewLine)return null;e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));var i=0|this._renderedViewLine.input.stopRenderingLineAfter,o=!1;-1!==i&&e>i+1&&t>i+1&&(o=!0),-1!==i&&e>i+1&&(e=i+1),-1!==i&&t>i+1&&(t=i+1);var r=this._renderedViewLine.getVisibleRangesForRange(e,t,n);return r&&r.length>0?new W(o,r):null},e.prototype.getColumnOfNodeOffset=function(e,t,n){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,n):1},e.CLASS_NAME="view-line",e}(),J=function(){function e(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth}return e.prototype.getWidth=function(){return this._getCharPosition(this._characterMapping.length)},e.prototype.getWidthIsFast=function(){return!0},e.prototype.getVisibleRangesForRange=function(e,t,n){var i=this._getCharPosition(e),o=this._getCharPosition(t);return[new F(i,o-i)]},e.prototype._getCharPosition=function(e){var t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),$=function(){function e(e,t,n,i,o){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(var r=0,s=this._characterMapping.length;r<=s;r++)this._pixelOffsetCache[r]=-1}}return e.prototype._getReadingTarget=function(e){return e.domNode.firstChild},e.prototype.getWidth=function(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0},e.prototype.getWidthIsFast=function(){return-1!==this._cachedWidth},e.prototype.getVisibleRangesForRange=function(e,t,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){var i=this._readPixelOffset(this.domNode,e,n);if(-1===i)return null;var o=this._readPixelOffset(this.domNode,t,n);return-1===o?null:[new F(i,o-i)]}return this._readVisibleRangesForRange(this.domNode,e,t,n)},e.prototype._readVisibleRangesForRange=function(e,t,n,i){if(t===n){var o=this._readPixelOffset(e,t,i);return-1===o?null:[new F(o,0)]}return this._readRawVisibleRangesForRange(e,t,n,i)},e.prototype._readPixelOffset=function(e,t,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();var i=this._getReadingTarget(e);return i.firstChild?i.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){var o=this._pixelOffsetCache[t];if(-1!==o)return o;var r=this._actualReadPixelOffset(e,t,n);return this._pixelOffsetCache[t]=r,r}return this._actualReadPixelOffset(e,t,n)},e.prototype._actualReadPixelOffset=function(e,t,n){if(0===this._characterMapping.length){var i=B.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.endNode);return i&&0!==i.length?i[0].left:-1}if(t===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var o=this._characterMapping.charOffsetToPartData(t-1),r=z.a.getPartIndex(o),s=z.a.getCharIndex(o),a=B.readHorizontalRanges(this._getReadingTarget(e),r,s,r,s,n.clientRectDeltaLeft,n.endNode);return a&&0!==a.length?a[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,n,i){if(1===t&&n===this._characterMapping.length)return[new F(0,this.getWidth())];var o=this._characterMapping.charOffsetToPartData(t-1),r=z.a.getPartIndex(o),s=z.a.getCharIndex(o),a=this._characterMapping.charOffsetToPartData(n-1),u=z.a.getPartIndex(a),l=z.a.getCharIndex(a);return B.readHorizontalRanges(this._getReadingTarget(e),r,s,u,l,i.clientRectDeltaLeft,i.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return q(t,e),t.prototype._readVisibleRangesForRange=function(t,n,i,o){var r=e.prototype._readVisibleRangesForRange.call(this,t,n,i,o);if(!r||0===r.length||n===i||1===n&&i===this._characterMapping.length)return r;if(!this.input.containsRTL){var s=this._readPixelOffset(t,i,o);if(-1!==s){var a=r[r.length-1];a.left=4&&3===e[0]&&7===e[3]},e.isStrictChildOfViewLines=function(e){return e.length>4&&3===e[0]&&7===e[3]},e.isChildOfScrollableElement=function(e){return e.length>=2&&3===e[0]&&5===e[1]},e.isChildOfMinimap=function(e){return e.length>=2&&3===e[0]&&8===e[1]},e.isChildOfContentWidgets=function(e){return e.length>=4&&3===e[0]&&1===e[3]},e.isChildOfOverflowingContentWidgets=function(e){return e.length>=1&&2===e[0]},e.isChildOfOverlayWidgets=function(e){return e.length>=2&&3===e[0]&&4===e[1]},e}(),de=function(){function e(e,t,n){this.model=e.model;var i=e.configuration.options;this.layoutInfo=i.get(107),this.viewDomNode=t.viewDomNode,this.lineHeight=i.get(49),this.typicalHalfwidthCharacterWidth=i.get(34).typicalHalfwidthCharacterWidth,this.lastRenderData=n,this._context=e,this._viewHelper=t}return e.prototype.getZoneAtCoord=function(t){return e.getZoneAtCoord(this._context,t)},e.getZoneAtCoord=function(e,t){var n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){var i=n.verticalOffset+n.height/2,o=e.model.getLineCount(),r=null,s=void 0,a=null;return n.afterLineNumber!==o&&(a=new oe.a(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(r=new oe.a(n.afterLineNumber,e.model.getLineMaxColumn(n.afterLineNumber))),s=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,ge._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))})),pe={isAfterLines:!0};function fe(e){return{isAfterLines:!1,horizontalDistanceToText:e}}var ge=function(){function e(e,t){this._context=e,this._viewHelper=t}return e.prototype.mouseTargetIsWidget=function(e){var t=e.target,n=T.collect(t,this._viewHelper.viewDomNode);return!(!ce.isChildOfContentWidgets(n)&&!ce.isChildOfOverflowingContentWidgets(n))||!!ce.isChildOfOverlayWidgets(n)},e.prototype.createMouseTarget=function(t,n,i,o){var r=new de(this._context,this._viewHelper,t),s=new he(r,n,i,o);try{return e._createMouseTarget(r,s,!1)}catch(e){return s.fulfill(0)}},e._createMouseTarget=function(t,n,i){if(null===n.target){if(i)return n.fulfill(0);var o=e._doHitTest(t,n);return o.position?e.createMouseTargetFromHitTestPosition(t,n,o.position.lineNumber,o.position.column):this._createMouseTarget(t,n.withTarget(o.hitTarget),!0)}var r=n,s=null;return(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=s||e._hitTestContentWidget(t,r))||e._hitTestOverlayWidget(t,r))||e._hitTestMinimap(t,r))||e._hitTestScrollbarSlider(t,r))||e._hitTestViewZone(t,r))||e._hitTestMargin(t,r))||e._hitTestViewCursor(t,r))||e._hitTestTextArea(t,r))||e._hitTestViewLines(t,r,i))||e._hitTestScrollbar(t,r))||n.fulfill(0)},e._hitTestContentWidget=function(e,t){if(ce.isChildOfContentWidgets(t.targetPath)||ce.isChildOfOverflowingContentWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(9,null,null,n):t.fulfill(0)}return null},e._hitTestOverlayWidget=function(e,t){if(ce.isChildOfOverlayWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(12,null,null,n):t.fulfill(0)}return null},e._hitTestViewCursor=function(e,t){if(t.target)for(var n=0,i=r=e.lastRenderData.lastViewCursorsRenderData;no.contentLeft+o.width)){var c=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(c<=a&&a<=c+o.height)return t.fulfill(6,o.position)}}return null},e._hitTestViewZone=function(e,t){var n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){var i=t.isInContentArea?8:5;return t.fulfill(i,n.position,null,n)}return null},e._hitTestTextArea=function(e,t){return ce.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition(),o=Math.abs(t.pos.x-t.editorPos.x),r={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return(o-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,i,n.range,r):(o-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,i,n.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,i,n.range,r))}return null},e._hitTestViewLines=function(t,n,i){if(!ce.isChildOfViewLines(n.targetPath))return null;if(t.isAfterLines(n.mouseVerticalOffset)){var o=t.model.getLineCount(),r=t.model.getLineMaxColumn(o);return n.fulfill(7,new oe.a(o,r),void 0,pe)}if(i){if(ce.isStrictChildOfViewLines(n.targetPath)){var s=t.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);if(0===t.model.getLineLength(s)){var a=t.getLineWidth(s),u=fe(n.mouseContentHorizontalOffset-a);return n.fulfill(7,new oe.a(s,1),void 0,u)}var l=t.getLineWidth(s);if(n.mouseContentHorizontalOffset>=l){u=fe(n.mouseContentHorizontalOffset-l);var c=new oe.a(s,t.model.getLineMaxColumn(s));return n.fulfill(7,c,void 0,u)}}return n.fulfill(0)}var d=e._doHitTest(t,n);return d.position?e.createMouseTargetFromHitTestPosition(t,n,d.position.lineNumber,d.position.column):this._createMouseTarget(t,n.withTarget(d.hitTarget),!0)},e._hitTestMinimap=function(e,t){if(ce.isChildOfMinimap(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new oe.a(n,i))}return null},e._hitTestScrollbarSlider=function(e,t){if(ce.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){var i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.model.getLineMaxColumn(i);return t.fulfill(11,new oe.a(i,o))}}return null},e._hitTestScrollbar=function(e,t){if(ce.isChildOfScrollableElement(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new oe.a(n,i))}return null},e.prototype.getMouseColumn=function(t,n){var i=this._context.configuration.options,o=i.get(107),r=this._context.viewLayout.getCurrentScrollLeft()+n.x-t.x-o.contentLeft;return e._getMouseColumn(r,i.get(34).typicalHalfwidthCharacterWidth)},e._getMouseColumn=function(e,t){return e<0?1:Math.round(e/t)+1},e.createMouseTargetFromHitTestPosition=function(e,t,n,i){var o=new oe.a(n,i),r=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>r){if(m.e&&1===o.column){var s=fe(t.mouseContentHorizontalOffset-r);return t.fulfill(7,new oe.a(n,e.model.getLineMaxColumn(n)),void 0,s)}var a=fe(t.mouseContentHorizontalOffset-r);return t.fulfill(7,o,void 0,a)}var u=e.visibleRangeForPosition(n,i);if(!u)return t.fulfill(0,o);var l=u.left;if(t.mouseContentHorizontalOffset===l)return t.fulfill(6,o);var c=[];if(c.push({offset:u.left,column:i}),i>1){var d=e.visibleRangeForPosition(n,i-1);d&&c.push({offset:d.left,column:i-1})}if(i=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1);var r=new C(t.pos.x,o),s=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return s.position?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())},e._actualDoHitTestWithCaretRangeFromPoint=function(e,t){var n,i=r.E(e.viewDomNode);if(!(n=i?void 0===i.caretRangeFromPoint?function(e,t,n){var i=document.createRange(),o=e.elementFromPoint(t,n);if(null!==o){for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE;)o=o.lastChild;var r=o.getBoundingClientRect(),s=window.getComputedStyle(o,null).getPropertyValue("font"),a=o.innerText,u=r.left,l=0,c=void 0;if(t>r.left+r.width)l=a.length;else for(var d=me.getInstance(),h=0;h0?1:-1;ve.a.setZoomLevel(n+i),t.preventDefault(),t.stopPropagation()}}}),{capture:!0,passive:!1})),s._context.addEventHandler(s),s}return be(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onCursorStateChanged=function(e){return this._mouseDownOperation.onCursorStateChanged(e),!1},t.prototype.onFocusChanged=function(e){return this._isFocused=e.isFocused,!1},t.prototype.onScrollChanged=function(e){return this._mouseDownOperation.onScrollChanged(),!1},t.prototype.getTargetAtClientPoint=function(e,t){var n=new w(e,t).toPageCoordinates(),i=O(this.viewHelper.viewDomNode);return n.yi.y+i.height||n.xi.x+i.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),i,n,null)},t.prototype._createMouseTarget=function(e,t){return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?e.target:null)},t.prototype._getMouseColumn=function(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)},t.prototype._onContextMenu=function(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})},t.prototype._onMouseMove=function(e){this._mouseDownOperation.isActive()||(e.timestampt.y+t.height){var a,u;r=i.getCurrentScrollTop()+(e.posy-t.y);if(a=de.getZoneAtCoord(this._context,r))if(u=this._helpPositionJumpOverViewZone(a))return new le(null,13,o,u);var l=i.getLineNumberAtVerticalOffset(r);return new le(null,13,o,new oe.a(l,n.getLineMaxColumn(l)))}var c=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new le(null,13,o,new oe.a(c,n.getLineMaxColumn(c))):null},t.prototype._findMousePosition=function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var i=this._createMouseTarget(e,t);if(!i.position)return null;if(8===i.type||5===i.type){var o=this._helpPositionJumpOverViewZone(i.detail);if(o)return new le(i.element,i.type,i.mouseColumn,o,null,i.detail)}return i},t.prototype._helpPositionJumpOverViewZone=function(e){var t=new oe.a(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null},t.prototype._dispatchMouse=function(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})},t}(u.a),Se=function(){function e(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}return Object.defineProperty(e.prototype,"altKey",{get:function(){return this._altKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctrlKey",{get:function(){return this._ctrlKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metaKey",{get:function(){return this._metaKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftKey",{get:function(){return this._shiftKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftButton",{get:function(){return this._leftButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"middleButton",{get:function(){return this._middleButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startedOnLineNumbers",{get:function(){return this._startedOnLineNumbers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._lastMouseDownCount},enumerable:!0,configurable:!0}),e.prototype.setModifiers=function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey},e.prototype.setStartButtons=function(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton},e.prototype.setStartedOnLineNumbers=function(e){this._startedOnLineNumbers=e},e.prototype.trySetCount=function(t,n){var i=(new Date).getTime();i-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=i,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)},e.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e}(),Oe=n("CjF5"),Le=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 De(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}var xe=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.msTouchAction="none",o.viewHelper.linesContentDomNode.style.msContentZooming="none",o._installGestureHandlerTimeout=window.setTimeout((function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",(function(n){var i=n.pointerType;i!==(n.MSPOINTER_TYPE_MOUSE||"mouse")?i===(n.MSPOINTER_TYPE_TOUCH||"touch")?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"})),o._register(r.m(o.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return o._onGestureChange(e)}),De)),o._register(r.j(o.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return o._onCaptureGestureTap(e)}),!0))}}),100),o._lastPointerType="mouse",o}return Le(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new L(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(Ce),Ne=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.touchAction="none",o._installGestureHandlerTimeout=window.setTimeout((function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("pointerdown",(function(n){var i=n.pointerType;"mouse"!==i?"touch"===i?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"})),o._register(r.m(o.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return o._onGestureChange(e)}),De)),o._register(r.j(o.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return o._onCaptureGestureTap(e)}),!0))}}),100),o._lastPointerType="mouse",o}return Le(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new L(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(Ce),ke=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;o._register(g.b.addTarget(o.viewHelper.linesContentDomNode)),o._register(r.j(o.viewHelper.linesContentDomNode,g.a.Tap,(function(e){return o.onTap(e)}))),o._register(r.j(o.viewHelper.linesContentDomNode,g.a.Change,(function(e){return o.onChange(e)}))),o._register(r.j(o.viewHelper.linesContentDomNode,g.a.Contextmenu,(function(e){return o._onContextMenu(new L(e,o.viewHelper.viewDomNode),!1)}))),o._lastPointerType="mouse",o._register(r.j(o.viewHelper.linesContentDomNode,"pointerdown",(function(e){var t=e.pointerType;o._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));var s=new x(o.viewHelper.viewDomNode);return o._register(s.onPointerMoveThrottled(o.viewHelper.viewDomNode,(function(e){return o._onMouseMove(e)}),ye(o.mouseTargetFactory),Ce.MOUSE_MOVE_MINIMUM_TIME)),o._register(s.onPointerUp(o.viewHelper.viewDomNode,(function(e){return o._onMouseUp(e)}))),o._register(s.onPointerLeave(o.viewHelper.viewDomNode,(function(e){return o._onMouseLeave(e)}))),o._register(s.onPointerDown(o.viewHelper.viewDomNode,(function(e){return o._onMouseDown(e)}))),o}return Le(t,e),t.prototype.onTap=function(e){if(e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new L(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}},t.prototype.onChange=function(e){"touch"===this._lastPointerType&&this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype._onMouseDown=function(t){t.target&&this.viewHelper.linesContentDomNode.contains(t.target)&&"touch"===this._lastPointerType||e.prototype._onMouseDown.call(this,t)},t}(Ce),Ee=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o._register(g.b.addTarget(o.viewHelper.linesContentDomNode)),o._register(r.j(o.viewHelper.linesContentDomNode,g.a.Tap,(function(e){return o.onTap(e)}))),o._register(r.j(o.viewHelper.linesContentDomNode,g.a.Change,(function(e){return o.onChange(e)}))),o._register(r.j(o.viewHelper.linesContentDomNode,g.a.Contextmenu,(function(e){return o._onContextMenu(new L(e,o.viewHelper.viewDomNode),!1)}))),o}return Le(t,e),t.prototype.onTap=function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new L(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)},t.prototype.onChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t}(Ce),Ie=function(e){function t(t,n,i){var o=e.call(this)||this;return window.navigator.msPointerEnabled?o.handler=o._register(new xe(t,n,i)):f.c&&Oe.a.pointerEvents?o.handler=o._register(new ke(t,n,i)):window.TouchEvent?o.handler=o._register(new Ee(t,n,i)):window.navigator.pointerEnabled||window.PointerEvent?o.handler=o._register(new Ne(t,n,i)):o.handler=o._register(new Ce(t,n,i)),o}return Le(t,e),t.prototype.getTargetAtClientPoint=function(e,t){return this.handler.getTargetAtClientPoint(e,t)},t}(u.a),Me=(n("VvMK"),n("N0LK")),Te=n("5TxY"),Pe=n("Comh"),Re=(n("Krc3"),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)}}()),Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Re(t,e),t}(E),Fe=n("kYye"),je=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)}}(),We=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._readConfig(),n._lastCursorModelPosition=new oe.a(1,1),n._renderResult=null,n._context.addEventHandler(n),n}return je(t,e),t.prototype._readConfig=function(){var e=this._context.configuration.options;this._lineHeight=e.get(49);var t=e.get(50);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(71);var n=e.get(107);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth},t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return this._readConfig(),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0].getPosition();return this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t),2===this._renderLineNumbers||3===this._renderLineNumbers},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getLineRenderLineNumber=function(e){var t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new oe.a(e,1));if(1!==t.column)return"";var n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(2===this._renderLineNumbers){var i=Math.abs(this._lastCursorModelPosition.lineNumber-n);return 0===i?''+n+"":String(i)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n||n%10==0?String(n):"":String(n)},t.prototype.prepareRender=function(e){if(0!==this._renderLineNumbers){for(var n=f.d?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r='
    ',s=this._context.model.getLineCount(),a=[],u=i;u<=o;u++){var l=u-i;if(this._renderFinalNewline||u!==s||0!==this._context.model.getLineLength(u)){var c=this._getLineRenderLineNumber(u);a[l]=c?r+c+"
    ":""}else a[l]=""}this._renderResult=a}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.CLASS_NAME="line-numbers",t}(Ae);Object(U.e)((function(e,t){var n=e.getColor(Fe.k);n&&t.addRule(".monaco-editor .line-numbers { color: "+n+"; }");var i=e.getColor(Fe.b);i&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: "+i+"; }")}));var Ve=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)}}(),Be=function(e){function t(n){var i=e.call(this,n)||this,o=i._context.configuration.options,r=o.get(107);return i._canUseLayerHinting=!o.get(22),i._contentLeft=r.contentLeft,i._glyphMarginLeft=r.glyphMarginLeft,i._glyphMarginWidth=r.glyphMarginWidth,i._domNode=Object(p.b)(document.createElement("div")),i._domNode.setClassName(t.OUTER_CLASS_NAME),i._domNode.setPosition("absolute"),i._domNode.setAttribute("role","presentation"),i._domNode.setAttribute("aria-hidden","true"),i._glyphMarginBackgroundDomNode=Object(p.b)(document.createElement("div")),i._glyphMarginBackgroundDomNode.setClassName(t.CLASS_NAME),i._domNode.appendChild(i._glyphMarginBackgroundDomNode),i}return Ve(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._canUseLayerHinting=!t.get(22),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollTopChanged},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");var t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);var n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)},t.CLASS_NAME="glyph-margin",t.OUTER_CLASS_NAME="margin",t}(M),He=n("5v8Y"),ze=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)}}(),Ue=function(){function e(e){this.type=1,this._source=e}return e.prototype.hasChanged=function(e){return this._source.hasChanged(e)},e}(),Ke=function(e){this.type=2,this.contentWidth=e.contentWidth,this.contentHeight=e.contentHeight,this.contentWidthChanged=e.contentWidthChanged,this.contentHeightChanged=e.contentHeightChanged},qe=function(e,t){this.type=3,this.selections=e,this.modelSelections=t},Ge=function(){this.type=4},Ye=function(){this.type=5},Ze=function(e){this.type=6,this.isFocused=e},Xe=function(){this.type=7},Qe=function(){this.type=8},Je=function(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t},$e=function(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t},et=function(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t},tt=function(e,t,n,i,o){this.type=12,this.source=e,this.range=t,this.verticalType=n,this.revealHorizontal=i,this.scrollType=o},nt=function(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged},it=function(){this.type=14},ot=function(e){this.type=15,this.ranges=e},rt=function(){this.type=16},st=function(){this.type=17},at=function(e){function t(){var t=e.call(this)||this;return t._listeners=[],t._collector=null,t._collectorCnt=0,t}return ze(t,e),t.prototype.dispose=function(){this._listeners=[],e.prototype.dispose.call(this)},t.prototype._beginEmit=function(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new ut),this._collector},t.prototype._endEmit=function(){if(this._collectorCnt--,0===this._collectorCnt){var e=this._collector.finalize();this._collector=null,e.length>0&&this._emit(e)}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),n=0,i=t.length;n0)return new Pe.b(i,i.length,i.length,n,n)}}return Pe.b.EMPTY}return Pe.a.fromEditorSelection(e,a,o._selections[0],o._accessibilityPageSize,0===o._accessibilitySupport)},deduceModelPosition:function(e,t,n){return o._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)}};return o._textAreaInput=o._register(new Te.b(u,o.textArea)),o._register(o._textAreaInput.onKeyDown((function(e){o._viewController.emitKeyDown(e)}))),o._register(o._textAreaInput.onKeyUp((function(e){o._viewController.emitKeyUp(e)}))),o._register(o._textAreaInput.onPaste((function(e){var t=!1,n=null,i=null;e.metadata&&(t=o._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,n=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,i=e.metadata.mode),o._viewController.paste("keyboard",e.text,t,n,i)}))),o._register(o._textAreaInput.onCut((function(){o._viewController.cut("keyboard")}))),o._register(o._textAreaInput.onType((function(e){e.replaceCharCnt?o._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):o._viewController.type("keyboard",e.text)}))),o._register(o._textAreaInput.onSelectionChangeRequest((function(e){o._viewController.setSelection("keyboard",e)}))),o._register(o._textAreaInput.onCompositionStart((function(){var e=o._selections[0].startLineNumber,t=o._selections[0].startColumn;o._context.privateViewEventBus.emit(new tt("keyboard",new re.a(e,t,e,t),0,!0,1));var n=o._viewHelper.visibleRangeForPositionRelativeToEditor(e,t);n&&(o._visibleTextArea=new dt(o._context.viewLayout.getVerticalOffsetForLineNumber(e),n.left,ht?0:1),o._render()),o.textArea.setClassName("inputarea ime-input"),o._viewController.compositionStart("keyboard")}))),o._register(o._textAreaInput.onCompositionUpdate((function(e){m.f?o._visibleTextArea=o._visibleTextArea.setWidth(0):o._visibleTextArea=o._visibleTextArea.setWidth(function(e,t){var n=document.createElement("canvas").getContext("2d");n.font=(i=t,o="normal",r=i.fontWeight,s=i.fontSize,a=i.lineHeight,u=i.fontFamily,o+" normal "+r+" "+s+"px / "+a+"px "+u);var i,o,r,s,a,u;var l=n.measureText(e);return m.h?l.width+2:l.width}(e.data,o._fontInfo)),o._render()}))),o._register(o._textAreaInput.onCompositionEnd((function(){o._visibleTextArea=null,o._render(),o.textArea.setClassName("inputarea"),o._viewController.compositionEnd("keyboard")}))),o._register(o._textAreaInput.onFocus((function(){o._context.privateViewEventBus.emit(new Ze(!0))}))),o._register(o._textAreaInput.onBlur((function(){o._context.privateViewEventBus.emit(new Ze(!1))}))),o}return ct(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getWordBeforePosition=function(e){for(var t=this._context.model.getLineContent(e.lineNumber),n=Object(He.a)(this._context.configuration.options.get(96)),i=e.column,o=0;i>1;){var r=t.charCodeAt(i-2);if(0!==n.get(r)||o>50)return t.substring(i-1,e.column-1);o++,i--}return t.substring(0,e.column-1)},t.prototype._getCharacterBeforePosition=function(e){if(e.column>1){var t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!Me.z(t.charCodeAt(0)))return t}return""},t.prototype._getAriaLabel=function(e){return 1===e.get(2)?o.a("accessibilityOffAriaLabel","The editor is not accessible at this time. Press Alt+F1 for options."):e.get(4)},t.prototype._setAccessibilityOptions=function(e){this._accessibilitySupport=e.get(2);var t=e.get(3);2===this._accessibilitySupport&&t===K.e.accessibilityPageSize.defaultValue?this._accessibilityPageSize=160:this._accessibilityPageSize=t},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(34),this._lineHeight=t.get(49),this._emptySelectionClipboard=t.get(25),this._copyWithSyntaxHighlighting=t.get(15),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),f.g&&e.hasChanged(68)&&(t.get(68)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.isFocused=function(){return this._textAreaInput.isFocused()},t.prototype.focusTextArea=function(){this._textAreaInput.focusTextArea()},t.prototype.getLastRenderData=function(){return this._lastRenderPosition},t.prototype.setAriaOptions=function(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant"))},t.prototype.prepareRender=function(e){this._primaryCursorPosition=new oe.a(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)},t.prototype.render=function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()},t.prototype._render=function(){if(this._visibleTextArea)this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);else if(this._primaryCursorVisibleRange){var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)this._renderAtTopLeft();else{var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():f.e?this._renderInsideEditor(this._primaryCursorPosition,t,e,ht?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,ht?0:1,ht?0:1)}}else this._renderAtTopLeft()},t.prototype._renderInsideEditor=function(e,t,n,i,o){this._lastRenderPosition=e;var r=this.textArea,s=this.textAreaCover;c.a.applyFontInfo(r,this._fontInfo),r.setTop(t),r.setLeft(n),r.setWidth(i),r.setHeight(o),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)},t.prototype._renderAtTopLeft=function(){this._lastRenderPosition=null;var e=this.textArea,t=this.textAreaCover;if(c.a.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),ht)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);var n=this._context.configuration.options;n.get(40)?t.setClassName("monaco-editor-background textAreaCover "+Be.OUTER_CLASS_NAME):0!==n.get(50).renderType?t.setClassName("monaco-editor-background textAreaCover "+We.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")},t}(M);var ft=n("1YUG"),gt=function(){function e(e,t,n,i){this.configuration=e,this.viewModel=t,this.outgoingEvents=n,this.commandDelegate=i}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this.commandDelegate.executeEditorCommand(e,t)},e.prototype.paste=function(e,t,n,i,o){this.commandDelegate.paste(e,t,n,i,o)},e.prototype.type=function(e,t){this.commandDelegate.type(e,t)},e.prototype.replacePreviousChar=function(e,t,n){this.commandDelegate.replacePreviousChar(e,t,n)},e.prototype.compositionStart=function(e){this.commandDelegate.compositionStart(e)},e.prototype.compositionEnd=function(e){this.commandDelegate.compositionEnd(e)},e.prototype.cut=function(e){this.commandDelegate.cut(e)},e.prototype.setSelection=function(e,t){this.commandDelegate.executeEditorCommand(ft.CoreNavigationCommands.SetSelection,{source:e,selection:t})},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)},e.prototype._usualArgs=function(e){return e=this._validateViewColumn(e),{position:this._convertViewToModelPosition(e),viewPosition:e}},e.prototype.moveTo=function(e){this._execMouseCommand(ft.CoreNavigationCommands.MoveTo,this._usualArgs(e))},e.prototype._moveToSelect=function(e){this._execMouseCommand(ft.CoreNavigationCommands.MoveToSelect,this._usualArgs(e))},e.prototype._columnSelect=function(e,t,n){e=this._validateViewColumn(e),this._execMouseCommand(ft.CoreNavigationCommands.ColumnSelect,{position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})},e.prototype._createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(ft.CoreNavigationCommands.CreateCursor,{position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})},e.prototype._lastCursorMoveToSelect=function(e){this._execMouseCommand(ft.CoreNavigationCommands.LastCursorMoveToSelect,this._usualArgs(e))},e.prototype._wordSelect=function(e){this._execMouseCommand(ft.CoreNavigationCommands.WordSelect,this._usualArgs(e))},e.prototype._wordSelectDrag=function(e){this._execMouseCommand(ft.CoreNavigationCommands.WordSelectDrag,this._usualArgs(e))},e.prototype._lastCursorWordSelect=function(e){this._execMouseCommand(ft.CoreNavigationCommands.LastCursorWordSelect,this._usualArgs(e))},e.prototype._lineSelect=function(e){this._execMouseCommand(ft.CoreNavigationCommands.LineSelect,this._usualArgs(e))},e.prototype._lineSelectDrag=function(e){this._execMouseCommand(ft.CoreNavigationCommands.LineSelectDrag,this._usualArgs(e))},e.prototype._lastCursorLineSelect=function(e){this._execMouseCommand(ft.CoreNavigationCommands.LastCursorLineSelect,this._usualArgs(e))},e.prototype._lastCursorLineSelectDrag=function(e){this._execMouseCommand(ft.CoreNavigationCommands.LastCursorLineSelectDrag,this._usualArgs(e))},e.prototype._selectAll=function(){this._execMouseCommand(ft.CoreNavigationCommands.SelectAll,{})},e.prototype._convertViewToModelPosition=function(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)},e.prototype.emitKeyDown=function(e){this.outgoingEvents.emitKeyDown(e)},e.prototype.emitKeyUp=function(e){this.outgoingEvents.emitKeyUp(e)},e.prototype.emitContextMenu=function(e){this.outgoingEvents.emitContextMenu(e)},e.prototype.emitMouseMove=function(e){this.outgoingEvents.emitMouseMove(e)},e.prototype.emitMouseLeave=function(e){this.outgoingEvents.emitMouseLeave(e)},e.prototype.emitMouseUp=function(e){this.outgoingEvents.emitMouseUp(e)},e.prototype.emitMouseDown=function(e){this.outgoingEvents.emitMouseDown(e)},e.prototype.emitMouseDrag=function(e){this.outgoingEvents.emitMouseDrag(e)},e.prototype.emitMouseDrop=function(e){this.outgoingEvents.emitMouseDrop(e)},e.prototype.emitMouseWheel=function(e){this.outgoingEvents.emitMouseWheel(e)},e}(),mt=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)}}(),vt=function(e){function t(t){var n=e.call(this)||this;return n.onDidContentSizeChange=null,n.onDidScroll=null,n.onDidGainFocus=null,n.onDidLoseFocus=null,n.onKeyDown=null,n.onKeyUp=null,n.onContextMenu=null,n.onMouseMove=null,n.onMouseLeave=null,n.onMouseUp=null,n.onMouseDown=null,n.onMouseDrag=null,n.onMouseDrop=null,n.onMouseWheel=null,n._viewModel=t,n}return mt(t,e),t.prototype.emitContentSizeChange=function(e){this.onDidContentSizeChange&&this.onDidContentSizeChange(e)},t.prototype.emitScrollChanged=function(e){this.onDidScroll&&this.onDidScroll(e)},t.prototype.emitViewFocusGained=function(){this.onDidGainFocus&&this.onDidGainFocus(void 0)},t.prototype.emitViewFocusLost=function(){this.onDidLoseFocus&&this.onDidLoseFocus(void 0)},t.prototype.emitKeyDown=function(e){this.onKeyDown&&this.onKeyDown(e)},t.prototype.emitKeyUp=function(e){this.onKeyUp&&this.onKeyUp(e)},t.prototype.emitContextMenu=function(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseMove=function(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseLeave=function(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseUp=function(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDown=function(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrag=function(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrop=function(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseWheel=function(e){this.onMouseWheel&&this.onMouseWheel(e)},t.prototype._convertViewToModelMouseEvent=function(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e},t.prototype._convertViewToModelMouseTarget=function(e){return t.convertViewToModelMouseTarget(e,this._viewModel.coordinatesConverter)},t.convertViewToModelMouseTarget=function(e,t){return new _t(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)},t}(u.a),_t=function(){function e(e,t,n,i,o,r){this.element=e,this.type=t,this.mouseColumn=n,this.position=i,this.range=o,this.detail=r}return e.prototype.toString=function(){return le.toString(this)},e}(),bt=n("erNZ"),yt=function(){function e(e){this._createLine=e,this._set(1,[])}return e.prototype.flush=function(){this._set(1,[])},e.prototype._set=function(e,t){this._lines=t,this._rendLineNumberStart=e},e.prototype._get=function(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}},e.prototype.getStartLineNumber=function(){return this._rendLineNumberStart},e.prototype.getEndLineNumber=function(){return this._rendLineNumberStart+this._lines.length-1},e.prototype.getCount=function(){return this._lines.length},e.prototype.getLine=function(e){var t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]},e.prototype.onLinesDeleted=function(e,t){if(0===this.getCount())return null;var n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null;for(var r=0,s=0,a=n;a<=i;a++){var u=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=u,s=1):s++)}if(e=n&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var n=t-e+1,i=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);for(var r=[],s=0;sn))for(var a=Math.max(t,s.fromLineNumber),u=Math.min(n,s.toLineNumber),l=a;l<=u;l++){var c=l-this._rendLineNumberStart;this._lines[c].onTokensChanged(),i=!0}}return i},e}(),Ct=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new yt((function(){return t._host.createVisibleLine()}))}return e.prototype._createDomNode=function(){var e=Object(p.b)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e},e.prototype.onConfigurationChanged=function(e){return!!e.hasChanged(107)},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0},e.prototype.onLinesChanged=function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;nt)(u=t)<=(s=Math.min(n,o.rendLineNumberStart-1))&&(this._insertLinesBefore(o,u,s,i,t),o.linesLength+=s-u+1);else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,a),o.linesLength-=a)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1n){var s,a,u=Math.max(0,n-o.rendLineNumberStart+1);(a=(s=o.linesLength-1)-u+1)>0&&(this._removeLinesAfter(o,a),o.linesLength-=a)}return this._finishRendering(o,!1,i),o},e.prototype._renderUntouchedLines=function(e,t,n,i,o){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=n;a++){var u=r+a;s[a].layoutLine(u,i[u-o])}},e.prototype._insertLinesBefore=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var n=0;n=0;s--){var a=e.lines[s];i[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,n){var i=document.createElement("div");i.innerHTML=t;for(var o=0;o'),i.appendASCIIString(o),i.appendASCIIString(""),!0)},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))},e}(),Dt=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options.get(107);return n._contentWidth=i.contentWidth,n.domNode.setHeight(0),n}return St(t,e),t.prototype.onConfigurationChanged=function(t){var n=this._context.configuration.options.get(107);return this._contentWidth=n.contentWidth,e.prototype.onConfigurationChanged.call(this,t)||!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollWidthChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))},t}(Ot),xt=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options,o=i.get(107);return n._contentLeft=o.contentLeft,n.domNode.setClassName("margin-view-overlays"),n.domNode.setWidth(1),c.a.applyFontInfo(n.domNode,i.get(34)),n}return St(t,e),t.prototype.onConfigurationChanged=function(t){var n=this._context.configuration.options;c.a.applyFontInfo(this.domNode,n.get(34));var i=n.get(107);return this._contentLeft=i.contentLeft,e.prototype.onConfigurationChanged.call(this,t)||!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t);var n=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)},t}(Ot),Nt=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)}}(),kt=function(e,t){this.top=e,this.left=t},Et=function(e){function t(t,n){var i=e.call(this,t)||this;return i._viewDomNode=n,i._widgets={},i.domNode=Object(p.b)(document.createElement("div")),T.write(i.domNode,1),i.domNode.setClassName("contentWidgets"),i.domNode.setPosition("absolute"),i.domNode.setTop(0),i.overflowingContentWidgetsDomNode=Object(p.b)(document.createElement("div")),T.write(i.overflowingContentWidgetsDomNode,2),i.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),i}return Nt(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets={}},t.prototype.onConfigurationChanged=function(e){for(var t=0,n=Object.keys(this._widgets);t=i,c=a,d=o.viewportHeight-a>=i,h=e.left,p=t.left;return h+n>o.scrollLeft+o.viewportWidth&&(h=o.scrollLeft+o.viewportWidth-n),p+n>o.scrollLeft+o.viewportWidth&&(p=o.scrollLeft+o.viewportWidth-n),ha&&(u-=o=u-(a-i),n-=o);u=22,b=c+i<=d.height-22;return this._fixedOverflowWidgets?{fitsAbove:_,aboveTop:Math.max(l,22),aboveLeft:f,fitsBelow:b,belowTop:c,belowLeft:v}:{fitsAbove:_,aboveTop:Math.max(s,22),aboveLeft:p,fitsBelow:b,belowTop:a,belowLeft:m}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new kt(e.top,e.left+this._contentLeft)},e.prototype._getTopAndBottomLeft=function(e){if(!this._viewRange)return[null,null];var t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];for(var n=t[0],i=t[0],o=0,r=t;oi.lineNumber&&(i=s)}for(var a=1073741824,u=0,l=n.ranges;ue.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){this._renderData=this._prepareRenderWidget(e)},e.prototype.render=function(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))},e}(),Mt=(n("kw+w"),n("6OMU")),Tt=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)}}(),Pt=!0,Rt=function(e){function t(t){var n=e.call(this)||this;n._context=t;var i=n._context.configuration.options,o=i.get(107);return n._lineHeight=i.get(49),n._renderLineHighlight=i.get(72),n._contentLeft=o.contentLeft,n._contentWidth=o.contentWidth,n._selectionIsEmpty=!0,n._cursorLineNumbers=[],n._selections=[],n._renderData=null,n._context.addEventHandler(n),n}return Tt(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype._readFromSelections=function(){var e=!1,t=Pt?this._selections.slice(0,1):this._selections,n=t.map((function(e){return e.positionLineNumber}));n.sort((function(e,t){return e-t})),Mt.g(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);var i=t.every((function(e){return e.isEmpty()}));return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e},t.prototype.onThemeChanged=function(e){return this._readFromSelections()},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(107);return this._lineHeight=t.get(49),this._renderLineHighlight=t.get(72),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections,this._readFromSelections()},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollWidthChanged||e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(this._shouldRenderThis()){for(var t=this._renderOne(e),n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length,r=0,s=[],a=n;a<=i;a++){for(var u=a-n;r=this._renderData.length?"":this._renderData[n]},t}(Ae),At=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tt(t,e),t.prototype._renderOne=function(e){return'
    '},t.prototype._shouldRenderThis=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t.prototype._shouldRenderOther=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t}(Rt),Ft=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tt(t,e),t.prototype._renderOne=function(e){return'
    '},t.prototype._shouldRenderThis=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t.prototype._shouldRenderOther=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t}(Rt);Object(U.e)((function(e,t){Pt=!1;var n=e.getColor(Fe.i);if(n&&(t.addRule(".monaco-editor .view-overlays .current-line { background-color: "+n+"; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: "+n+"; border: none; }")),!n||n.isTransparent()||e.defines(Fe.j)){var i=e.getColor(Fe.j);i&&(Pt=!0,t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid "+i+"; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid "+i+"; }"),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));n("Vtyv");var jt=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)}}(),Wt=function(e){function t(t){var n=e.call(this)||this;n._context=t;var i=n._context.configuration.options;return n._lineHeight=i.get(49),n._typicalHalfwidthCharacterWidth=i.get(34).typicalHalfwidthCharacterWidth,n._renderResult=null,n._context.addEventHandler(n),n}return jt(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;return this._lineHeight=t.get(49),this._typicalHalfwidthCharacterWidth=t.get(34).typicalHalfwidthCharacterWidth,!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;ot.options.zIndex)return 1;var n=e.options.className,i=t.options.className;return ni?1:re.a.compareRangesUsingStarts(e.range,t.range)}));for(var a=e.visibleRange.startLineNumber,u=e.visibleRange.endLineNumber,l=[],c=a;c<=u;c++){l[c-a]=""}this._renderWholeLineDecorations(e,n,l),this._renderNormalDecorations(e,n,l),this._renderResult=l},t.prototype._renderWholeLineDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s',c=Math.max(u.range.startLineNumber,o),d=Math.min(u.range.endLineNumber,r),h=c;h<=d;h++){n[h-o]+=l}}},t.prototype._renderNormalDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=null,s=!1,a=null,u=0,l=t.length;u';s[d]+=m}}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(Ae),Vt=n("GJhM"),Bt=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)}}(),Ht=function(e){function t(t,n,i,o){var s=e.call(this,t)||this,a=s._context.configuration.options,u=a.get(78),l=a.get(56),c=a.get(27),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+Object(U.d)(t.theme.type),useShadows:!1,lazyRender:!0,vertical:u.vertical,horizontal:u.horizontal,verticalHasArrows:u.verticalHasArrows,horizontalHasArrows:u.horizontalHasArrows,verticalScrollbarSize:u.verticalScrollbarSize,verticalSliderSize:u.verticalSliderSize,horizontalScrollbarSize:u.horizontalScrollbarSize,horizontalSliderSize:u.horizontalSliderSize,handleMouseWheel:u.handleMouseWheel,alwaysConsumeMouseWheel:u.alwaysConsumeMouseWheel,arrowSize:u.arrowSize,mouseWheelScrollSensitivity:l,fastScrollSensitivity:c};s.scrollbar=s._register(new Vt.c(n.domNode,d,s._context.viewLayout.getScrollable())),T.write(s.scrollbar.getDomNode(),5),s.scrollbarDomNode=Object(p.b)(s.scrollbar.getDomNode()),s.scrollbarDomNode.setPosition("absolute"),s._setLayout();var h=function(e,t,n){var i={};if(t){var o=e.scrollTop;o&&(i.scrollTop=s._context.viewLayout.getCurrentScrollTop()+o,e.scrollTop=0)}if(n){var r=e.scrollLeft;r&&(i.scrollLeft=s._context.viewLayout.getCurrentScrollLeft()+r,e.scrollLeft=0)}s._context.viewLayout.setScrollPositionNow(i)};return s._register(r.j(i.domNode,"scroll",(function(e){return h(i.domNode,!0,!0)}))),s._register(r.j(n.domNode,"scroll",(function(e){return h(n.domNode,!0,!1)}))),s._register(r.j(o.domNode,"scroll",(function(e){return h(o.domNode,!0,!1)}))),s._register(r.j(s.scrollbarDomNode.domNode,"scroll",(function(e){return h(s.scrollbarDomNode.domNode,!0,!1)}))),s}return Bt(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._setLayout=function(){var e=this._context.configuration.options,t=e.get(107);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(54).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)},t.prototype.getOverviewRulerLayoutInfo=function(){return this.scrollbar.getOverviewRulerLayoutInfo()},t.prototype.getDomNode=function(){return this.scrollbarDomNode},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)},t.prototype.onConfigurationChanged=function(e){if(e.hasChanged(78)||e.hasChanged(56)||e.hasChanged(27)){var t=this._context.configuration.options,n=t.get(78),i=t.get(56),o=t.get(27),r={handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:o};this.scrollbar.updateOptions(r)}return e.hasChanged(107)&&this._setLayout(),!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onThemeChanged=function(e){return this.scrollbar.updateClassName("editor-scrollable "+Object(U.d)(this._context.theme.type)),!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this.scrollbar.renderNow()},t}(M),zt=(n("hHjc"),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)}}()),Ut=function(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)},Kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zt(t,e),t.prototype._render=function(e,t,n){for(var i=[],o=e;o<=t;o++){i[o-e]=[]}if(0===n.length)return i;n.sort((function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[],a=t;a<=n;a++){var u=a-t,l=i[u];0===l.length?s[u]="":s[u]='
    =this._renderResult.length?"":this._renderResult[n]},t}(Kt),Gt=(n("C6rC"),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)}}()),Yt=function(e){function t(t){var n=e.call(this)||this;n._context=t,n._primaryLineNumber=0;var i=n._context.configuration.options,o=i.get(108),r=i.get(34);return n._lineHeight=i.get(49),n._spaceWidth=r.spaceWidth,n._enabled=i.get(70),n._activeIndentEnabled=i.get(43),n._maxIndentLeft=-1===o.wrappingColumn?-1:o.wrappingColumn*r.typicalHalfwidthCharacterWidth,n._renderResult=null,n._context.addEventHandler(n),n}return Gt(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(108),i=t.get(34);return this._lineHeight=t.get(49),this._spaceWidth=i.spaceWidth,this._enabled=t.get(70),this._activeIndentEnabled=t.get(43),this._maxIndentLeft=-1===n.wrappingColumn?-1:n.wrappingColumn*i.typicalHalfwidthCharacterWidth,!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0],n=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==n&&(this._primaryLineNumber=n,!0)},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.onLanguageConfigurationChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(this._enabled){var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._context.model.getOptions().indentSize*this._spaceWidth,o=e.scrollWidth,r=this._lineHeight,s=this._context.model.getLinesIndentGuides(t,n),a=0,u=0,l=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var c=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,n);a=c.startLineNumber,u=c.endLineNumber,l=c.indent}for(var d=[],h=t;h<=n;h++){var p=a<=h&&h<=u,f=h-t,g=s[f],m="";if(g>=1)for(var v=e.visibleRangeForPosition(new oe.a(h,1)),_=v?v.left:0,b=1;b<=g;b++){if(m+='
    ',(_+=i)>o||this._maxIndentLeft>0&&_>this._maxIndentLeft)break}d[f]=m}this._renderResult=d}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(Ae);Object(U.e)((function(e,t){var n=e.getColor(Fe.h);n&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 "+n+" inset; }");var i=e.getColor(Fe.a)||n;i&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 "+i+" inset; }")}));n("OKK6");var Zt=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)}}(),Xt=function(){function e(){this._currentVisibleRange=new re.a(1,1,1,1)}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange},e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e},e}(),Qt=function(e,t,n,i,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=n,this.startScrollTop=i,this.stopScrollTop=o,this.scrollType=r},Jt=function(e){function t(t,n){var i=e.call(this,t)||this;i._linesContent=n,i._textRangeRestingSpot=document.createElement("div"),i._visibleLines=new Ct(i),i.domNode=i._visibleLines.domNode;var o=i._context.configuration,r=i._context.configuration.options,s=r.get(34),a=r.get(108);return i._lineHeight=r.get(49),i._typicalHalfwidthCharacterWidth=s.typicalHalfwidthCharacterWidth,i._isViewportWrapping=a.isViewportWrapping,i._revealHorizontalRightPadding=r.get(75),i._cursorSurroundingLines=r.get(19),i._cursorSurroundingLinesStyle=r.get(20),i._canUseLayerHinting=!r.get(22),i._viewLineOptions=new X(o,i._context.theme.type),T.write(i.domNode,7),i.domNode.setClassName("view-lines"),c.a.applyFontInfo(i.domNode,s),i._maxLineWidth=0,i._asyncUpdateLineWidths=new _.d((function(){i._updateLineWidthsSlow()}),200),i._lastRenderedData=new Xt,i._horizontalRevealRequest=null,i}return Zt(t,e),t.prototype.dispose=function(){this._asyncUpdateLineWidths.dispose(),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this.domNode},t.prototype.createVisibleLine=function(){return new Q(this._viewLineOptions)},t.prototype.onConfigurationChanged=function(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(108)&&(this._maxLineWidth=0);var t=this._context.configuration.options,n=t.get(34),i=t.get(108);return this._lineHeight=t.get(49),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=i.isViewportWrapping,this._revealHorizontalRightPadding=t.get(75),this._cursorSurroundingLines=t.get(19),this._cursorSurroundingLinesStyle=t.get(20),this._canUseLayerHinting=!t.get(22),c.a.applyFontInfo(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(107)&&(this._maxLineWidth=0),!0},t.prototype._onOptionsMaybeChanged=function(){var e=this._context.configuration,t=new X(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;for(var n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),o=n;o<=i;o++){this._visibleLines.getVisibleLine(o).onOptionsChanged(this._viewLineOptions)}return!0}return!1},t.prototype.onCursorStateChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=!1,o=t;o<=n;o++)i=this._visibleLines.getVisibleLine(o).onSelectionChanged()||i;return i},t.prototype.onDecorationsChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged();return!0},t.prototype.onFlushed=function(e){var t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t},t.prototype.onLinesChanged=function(e){return this._visibleLines.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._visibleLines.onLinesDeleted(e)},t.prototype.onLinesInserted=function(e){return this._visibleLines.onLinesInserted(e)},t.prototype.onRevealRangeRequest=function(e){var t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.range,e.verticalType),n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:this._horizontalRevealRequest=new Qt(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):this._horizontalRevealRequest=null;var i=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop);return 0===e.scrollType&&i>this._lineHeight?this._context.viewLayout.setScrollPositionSmooth(n):this._context.viewLayout.setScrollPositionNow(n),!0},t.prototype.onScrollChanged=function(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){var t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0},t.prototype.onTokensChanged=function(e){return this._visibleLines.onTokensChanged(e)},t.prototype.onZonesChanged=function(e){return this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth),this._visibleLines.onZonesChanged(e)},t.prototype.onThemeChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.getPositionFromDOMInfo=function(e,t){var n=this._getViewLineDomNode(e);if(null===n)return null;var i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new oe.a(i,1);var o=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(ir)return null;var s=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t),a=this._context.model.getLineMinColumn(i);return sn?-1:this._visibleLines.getVisibleLine(e).getWidth()},t.prototype.linesVisibleRangesForRange=function(e,t){if(this.shouldRender())return null;var n=e.endLineNumber,i=re.a.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!i)return null;var o=[],r=0,s=new Z(this.domNode.domNode,this._textRangeRestingSpot),a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new oe.a(i.startLineNumber,1)).lineNumber);for(var u=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber(),c=i.startLineNumber;c<=i.endLineNumber;c++)if(!(cl)){var d=c===i.startLineNumber?i.startColumn:1,h=c===i.endLineNumber?i.endColumn:this._context.model.getLineMaxColumn(c),p=this._visibleLines.getVisibleLine(c).getVisibleRangesForRange(d,h,s);if(p){if(t&&cthis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t,n,new Z(this.domNode.domNode,this._textRangeRestingSpot))},t.prototype.visibleRangeForPosition=function(e){var t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new j(t.outsideRenderedLine,t.ranges[0].left):null},t.prototype.updateLineWidths=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidthsFast=function(){return this._updateLineWidths(!0)},t.prototype._updateLineWidthsSlow=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidths=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=1,o=!0,r=t;r<=n;r++){var s=this._visibleLines.getVisibleLine(r);!e||s.getWidthIsFast()?i=Math.max(i,s.getWidth()):o=!1}return o&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),o},t.prototype.prepareRender=function(){throw new Error("Not supported")},t.prototype.render=function(){throw new Error("Not supported")},t.prototype.renderText=function(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){var t=this._horizontalRevealRequest.lineNumber,n=this._horizontalRevealRequest.startColumn,i=this._horizontalRevealRequest.endColumn,o=this._horizontalRevealRequest.scrollType;if(e.startLineNumber<=t&&t<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var r=this._computeScrollLeftToRevealRange(t,n,i);this._isViewportWrapping||this._ensureMaxLineWidth(r.maxHorizontalOffset),0===o?this._context.viewLayout.setScrollPositionSmooth({scrollLeft:r.scrollLeft}):this._context.viewLayout.setScrollPositionNow({scrollLeft:r.scrollLeft})}}this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");var s=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-s),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())},t.prototype._ensureMaxLineWidth=function(e){var t=Math.ceil(e);this._maxLineWidthu)s=o;else if(1===i||2===i)if(2===i&&a<=o&&r<=l)s=a;else{var d=(o+r)/2;s=Math.max(0,d-u/2)}else s=this._computeMinimumScrolling(a,l,o,r,3===i,4===i);return s},t.prototype._computeScrollLeftToRevealRange=function(e,n,i){var o=0,r=this._context.viewLayout.getCurrentViewport(),s=r.left,a=s+r.width,u=this._visibleRangesForLineRange(e,n,i),l=1073741824,c=0;if(!u)return{scrollLeft:s,maxHorizontalOffset:o};for(var d=0,h=u.ranges;dc&&(c=p.left+p.width)}return o=c,l=Math.max(0,l-t.HORIZONTAL_EXTRA_PX),c+=this._revealHorizontalRightPadding,{scrollLeft:this._computeMinimumScrolling(s,a,l,c),maxHorizontalOffset:o}},t.prototype._computeMinimumScrolling=function(e,t,n,i,o,r){o=!!o,r=!!r;var s=(t|=0)-(e|=0);return(i|=0)-(n|=0)t?Math.max(0,i-s):e:n},t.HORIZONTAL_EXTRA_PX=30,t}(M),$t=(n("J+ZK"),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)}}()),en=function(e){function t(t){var n=e.call(this)||this;n._context=t;var i=n._context.configuration.options.get(107);return n._decorationsLeft=i.decorationsLeft,n._decorationsWidth=i.decorationsWidth,n._renderResult=null,n._context.addEventHandler(n),n}return $t(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options.get(107);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;o
    ',r=[],s=t;s<=n;s++){for(var a=s-t,u=i[a],l="",c=0,d=u.length;c';o[s]=u}this._renderResult=o},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(Kt),on=(n("8gvo"),function(){function e(t,n,i,o){this.r=e._clamp(t),this.g=e._clamp(n),this.b=e._clamp(i),this.a=e._clamp(o)}return e._clamp=function(e){return e<0?0:e>255?255:0|e},e.Empty=new e(0,0,0,0),e}()),rn=n("twdY"),sn=function(){function e(){var e=this;this._onDidChange=new a.a,this.onDidChange=this._onDidChange.event,this._updateColorMap(),rn.B.onDidChange((function(t){t.changedColorMap&&e._updateColorMap()}))}return e.getInstance=function(){return this._INSTANCE||(this._INSTANCE=new e),this._INSTANCE},e.prototype._updateColorMap=function(){var e=rn.B.getColorMap();if(!e)return this._colors=[on.Empty],void(this._backgroundIsLight=!0);this._colors=[on.Empty];for(var t=1;t=.5,this._onDidChange.fire(void 0)},e.prototype.getColor=function(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]},e.prototype.backgroundIsLight=function(){return this._backgroundIsLight},e._INSTANCE=null,e}(),an=n("MD5Z"),un=function(){for(var e=[],t=32;t<=126;t++)e.push(t);return e.push(65533),e}(),ln=function(){function e(t,n){this.scale=n,this.charDataNormal=e.soften(t,.8),this.charDataLight=e.soften(t,50/60)}return e.soften=function(e,t){for(var n=new Uint8ClampedArray(e.length),i=0,o=e.length;ie.width||n+l>e.height)console.warn("bad render request outside image data");else for(var c=a?this.charDataLight:this.charDataNormal,d=function(e,t){return(e-=32)<0||e>96?t<=2?(e+96)%96:95:e}(i,s),h=4*e.width,p=r.r,f=r.g,g=r.b,m=o.r-p,v=o.g-f,_=o.b-g,b=e.data,y=d*u*l,C=n*h+4*t,w=0;we.width||n+a>e.height)console.warn("bad render request outside image data");else for(var u=4*e.width,l=o.r,c=o.g,d=o.b,h=l+.5*(i.r-l),p=c+.5*(i.g-c),f=d+.5*(i.b-d),g=e.data,m=n*u+4*t,v=0;v>1]=dn[e[n]]<<4|15&dn[e[n+1]];return t},pn={1:Object(cn.a)((function(){return hn("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")})),2:Object(cn.a)((function(){return hn("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")}))},fn=function(){function e(){}return e.create=function(t,n){return this.lastCreated&&t===this.lastCreated.scale&&n===this.lastFontFamily?this.lastCreated:(i=pn[t]?new ln(pn[t](),t):e.createFromSampleData(e.createSampleData(n).data,t),this.lastFontFamily=n,this.lastCreated=i,i);var i},e.createSampleData=function(e){var t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",n.fillStyle="#ffffff",n.font="bold 16px "+e,n.textBaseline="middle";for(var i=0,o=0,r=un;o0)for(var l=255/a,c=0;c=s+y)return new e(a,u,_,b,c,C=1,s);var C=Math.max(1,Math.floor(n-b*h/p));return l&&l.scrollHeight===u&&(l.scrollTop>a&&(C=Math.min(C,l.startLineNumber)),l.scrollTop140)n._context.viewLayout.setScrollPositionNow({scrollTop:o.scrollTop});else{var s=e.posy-t;n._context.viewLayout.setScrollPositionNow({scrollTop:o.getDesiredScrollTopFromDelta(s)})}}),(function(){n._slider.toggleClassName("active",!1)}))}})),n._gestureDisposable=g.b.addTarget(n._domNode.domNode),n._sliderTouchStartListener=r.j(n._domNode.domNode,g.a.Start,(function(e){e.preventDefault(),e.stopPropagation(),n._lastRenderData&&(n._slider.toggleClassName("active",!0),n._gestureInProgress=!0,n.scrollDueToTouchEvent(e))})),n._sliderTouchMoveListener=r.o(n._domNode.domNode,g.a.Change,(function(e){e.preventDefault(),e.stopPropagation(),n._lastRenderData&&n._gestureInProgress&&n.scrollDueToTouchEvent(e)})),n._sliderTouchEndListener=r.o(n._domNode.domNode,g.a.End,(function(e){e.preventDefault(),e.stopPropagation(),n._gestureInProgress=!1,n._slider.toggleClassName("active",!1)})),n}return mn(t,e),t.prototype.scrollDueToTouchEvent=function(e){var t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._context.viewLayout.setScrollPositionNow({scrollTop:n})},t.prototype.dispose=function(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),e.prototype.dispose.call(this)},t.prototype._getMinimapDomNodeClassName=function(){return"always"===this._options.showSlider?"minimap slider-always":"minimap slider-mouseover"},t.prototype.getDomNode=function(){return this._domNode},t.prototype._applyLayout=function(){this._domNode.setLeft(this._options.minimapLeft),this._domNode.setWidth(this._options.minimapWidth),this._domNode.setHeight(this._options.minimapHeight),this._shadow.setHeight(this._options.minimapHeight),this._canvas.setWidth(this._options.canvasOuterWidth),this._canvas.setHeight(this._options.canvasOuterHeight),this._canvas.domNode.width=this._options.canvasInnerWidth,this._canvas.domNode.height=this._options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._options.canvasInnerHeight,this._slider.setWidth(this._options.minimapWidth)},t.prototype._getBuffer=function(){return this._buffers||this._options.canvasInnerWidth>0&&this._options.canvasInnerHeight>0&&(this._buffers=new Sn(this._canvas.domNode.getContext("2d"),this._options.canvasInnerWidth,this._options.canvasInnerHeight,this._tokensColorTracker.getColor(2))),this._buffers?this._buffers.getBuffer():null},t.prototype._onOptionsMaybeChanged=function(){var e=new bn(this._context.configuration);return!this._options.equals(e)&&(this._options=e,this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName()),!0)},t.prototype.onConfigurationChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections,this._renderDecorations=!0,!0},t.prototype.onFlushed=function(e){return this._lastRenderData=null,!0},t.prototype.onLinesChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e),!0},t.prototype.onLinesInserted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e),!0},t.prototype.onScrollChanged=function(e){return this._renderDecorations=!0,!0},t.prototype.onTokensChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)},t.prototype.onTokensColorsChanged=function(e){return this._lastRenderData=null,this._buffers=null,!0},t.prototype.onZonesChanged=function(e){return this._lastRenderData=null,!0},t.prototype.onDecorationsChanged=function(e){return this._renderDecorations=!0,!0},t.prototype.onThemeChanged=function(e){return this._context.model.invalidateMinimapColorCache(),this._selectionColor=this._context.theme.getColor(an.Ib),this._renderDecorations=!0,!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){if(0===this._options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");var t=yn.create(this._options,e.visibleRange.startLineNumber,e.visibleRange.endLineNumber,e.viewportHeight,e.viewportData.whitespaceViewportData.length>0,this._context.model.getLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);var n=e.scrollLeft/this._options.typicalHalfwidthCharacterWidth,i=Math.min(this._options.minimapWidth,Math.round(n*_n(this._options.renderMinimap,this._options.fontScale)/this._options.pixelRatio));this._sliderHorizontal.setLeft(i),this._sliderHorizontal.setWidth(this._options.minimapWidth-i),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)},t.prototype.renderDecorations=function(e){if(this._renderDecorations){this._renderDecorations=!1;var t=this._context.model.getDecorationsInViewport(new re.a(e.startLineNumber,1,e.endLineNumber,this._context.model.getLineMaxColumn(e.endLineNumber))),n=this._options,i=n.renderMinimap,o=n.canvasInnerWidth,r=n.canvasInnerHeight,s=vn(i,this._options.fontScale),a=_n(0,this._options.fontScale),u=this._context.model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,o,r);for(var c=new Map,d=0;dthis._options.canvasInnerHeight)){var d=t.get(r),h=!d;if(!d){var p=this._context.model.getLineContent(r);d=[K.f];for(var f=1;fr?d.length-1:_-1;if(w>0){var S=d[w]-C||2;this.renderDecoration(e,i,C,c,S,s)}h&&this.renderLineHighlight(e,i,c,s)}},t.prototype.renderLineHighlight=function(e,t,n,i){e.fillStyle=t&&t.transparent(.5).toString()||"",e.fillRect(K.f,n,e.canvas.width,i)},t.prototype.renderDecoration=function(e,t,n,i,o,r){e.fillStyle=t&&t.toString()||"",e.fillRect(n,i,o,r)},t.prototype.renderLines=function(e){var n=this._options.renderMinimap,i=this._options.charRenderer(),o=e.startLineNumber,r=e.endLineNumber,s=vn(n,this._options.fontScale);if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var a=this._lastRenderData._get();return new wn(e,a.imageData,a.lines)}var u=this._getBuffer();if(!u)return null;for(var l=t._renderUntouchedLines(u,o,r,s,this._lastRenderData),c=l[0],d=l[1],h=l[2],p=this._context.model.getMinimapLinesRenderingData(o,r,h),f=p.tabSize,g=this._tokensColorTracker.getColor(2),m=this._tokensColorTracker.backgroundIsLight(),v=0,_=[],b=0,y=r-o+1;b=0&&Lp)return;var w=c.charCodeAt(g);if(9===w){var S=a-(g+m)%a;m+=S-1,f+=S*h}else if(32===w)f+=h;else for(var O=Me.y(w)?2:1,L=0;Lp)return}},t}(M);Object(U.e)((function(e,t){var n=e.getColor(an.Xb);if(n){var i=n.transparent(.5);t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: "+i+"; }")}var o=e.getColor(an.Yb);if(o){var r=o.transparent(.5);t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: "+r+"; }")}var s=e.getColor(an.Wb);if(s){var a=s.transparent(.5);t.addRule(".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: "+a+"; }")}var u=e.getColor(an.Vb);u&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: "+u+" -6px 0 6px -6px inset; }")}));n("cl4r");var Ln=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)}}(),Dn=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options.get(107);return n._widgets={},n._verticalScrollbarWidth=i.verticalScrollbarWidth,n._minimapWidth=i.minimapWidth,n._horizontalScrollbarHeight=i.horizontalScrollbarHeight,n._editorHeight=i.height,n._editorWidth=i.width,n._domNode=Object(p.b)(document.createElement("div")),T.write(n._domNode,4),n._domNode.setClassName("overlayWidgets"),n}return Ln(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets={}},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options.get(107);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0},t.prototype.addWidget=function(e){var t=Object(p.b)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()},t.prototype.setWidgetPosition=function(e,t){var n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}},t.prototype._renderWidget=function(e){var t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){var n=t.domNode.clientHeight;t.setTop(this._editorHeight-n-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),n=0,i=t.length;n=3){var o,r,s,a=i-(o=Math.floor(i/3))-(r=Math.floor(i/3)),u=(s=e)+o;return[[0,s,u,s,s+o+a,s,u,s],[0,o,a,o+a,r,o+a+r,a+r,o+a+r]]}if(2===n)return[[0,s=e,s,s,s+(o=Math.floor(i/2)),s,s,s],[0,o,o,o,r=i-o,o+r,o+r,o+r]];return[[0,e,e,e,e,e,e,e],[0,i,i,i,i,i,i,i]]},e.prototype.equals=function(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight},e}(),En=function(e){function t(t){var n=e.call(this,t)||this;return n._domNode=Object(p.b)(document.createElement("canvas")),n._domNode.setClassName("decorationsOverviewRuler"),n._domNode.setPosition("absolute"),n._domNode.setLayerHinting(!0),n._domNode.setContain("strict"),n._domNode.setAttribute("aria-hidden","true"),n._updateSettings(!1),n._tokensColorTrackerListener=rn.B.onDidChange((function(e){e.changedColorMap&&n._updateSettings(!0)})),n._cursorPositions=[],n}return Nn(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._tokensColorTrackerListener.dispose()},t.prototype._updateSettings=function(e){var t=new kn(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)},t.prototype.onConfigurationChanged=function(e){return this._updateSettings(!1)},t.prototype.onCursorStateChanged=function(e){this._cursorPositions=[];for(var t=0,n=e.selections.length;tt&&(k=t-a),O=k-a,I=k+a;O>_+1||C!==m?(0!==b&&u.fillRect(l[m],v,c[m],_-v),m=C,v=O,_=I):I>_&&(_=I)}u.fillRect(l[m],v,c[m],_-v)}if(!this._settings.hideCursor&&this._settings.cursorColor){var L=2*this._settings.pixelRatio|0,D=L/2|0,x=this._settings.x[7],N=this._settings.w[7];u.fillStyle=this._settings.cursorColor;for(v=-100,_=-100,b=0,y=this._cursorPositions.length;bt&&(k=t-D);var I=(O=k-D)+L;O>_+1?(0!==b&&u.fillRect(x,v,N,_-v),v=O,_=I):I>_&&(_=I)}u.fillRect(x,v,N,_-v)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,t),u.stroke(),u.moveTo(0,0),u.lineTo(e,0),u.stroke())}else this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"")},t}(M),In=n("MvK1"),Mn=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)}}(),Tn=function(e){function t(t,n){var i=e.call(this)||this;i._context=t;var o=i._context.configuration.options;return i._domNode=Object(p.b)(document.createElement("canvas")),i._domNode.setClassName(n),i._domNode.setPosition("absolute"),i._domNode.setLayerHinting(!0),i._domNode.setContain("strict"),i._zoneManager=new In.b((function(e){return i._context.viewLayout.getVerticalOffsetForLineNumber(e)})),i._zoneManager.setDOMWidth(0),i._zoneManager.setDOMHeight(0),i._zoneManager.setOuterHeight(i._context.viewLayout.getScrollHeight()),i._zoneManager.setLineHeight(o.get(49)),i._zoneManager.setPixelRatio(o.get(105)),i._context.addEventHandler(i),i}return Mn(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;return e.hasChanged(49)&&(this._zoneManager.setLineHeight(t.get(49)),this._render()),e.hasChanged(105)&&(this._zoneManager.setPixelRatio(t.get(105)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0},t.prototype.onFlushed=function(e){return this._render(),!0},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0},t.prototype.onZonesChanged=function(e){return this._render(),!0},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.setLayout=function(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);var t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||t)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())},t.prototype.setZones=function(e){this._zoneManager.setZones(e),this._render()},t.prototype._render=function(){if(0===this._zoneManager.getOuterHeight())return!1;var e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(o,n,i,e),!0},t.prototype._renderOneLane=function(e,t,n,i){for(var o=0,r=0,s=0,a=0,u=t;a=d?s=Math.max(s,h):(e.fillRect(0,r,i,s-r),r=d,s=h)}e.fillRect(0,r,i,s-r)},t}(E),Pn=(n("7zd4"),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)}}()),Rn=function(e){function t(t){var n=e.call(this,t)||this;n.domNode=Object(p.b)(document.createElement("div")),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n.domNode.setClassName("view-rulers"),n._renderedRulers=[];var i=n._context.configuration.options;return n._rulers=i.get(77),n._typicalHalfwidthCharacterWidth=i.get(34).typicalHalfwidthCharacterWidth,n}return Pn(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;return this._rulers=t.get(77),this._typicalHalfwidthCharacterWidth=t.get(34).typicalHalfwidthCharacterWidth,!0},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged},t.prototype.prepareRender=function(e){},t.prototype._ensureRulersCount=function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e0;){(r=Object(p.b)(document.createElement("div"))).setClassName("view-ruler"),r.setWidth(n),this.domNode.appendChild(r),this._renderedRulers.push(r),i--}else for(var o=e-t;o>0;){var r=this._renderedRulers.pop();this.domNode.removeChild(r),o--}},t.prototype.render=function(e){this._ensureRulersCount();for(var t=0,n=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)},t.prototype.getDomNode=function(){return this._domNode},t.prototype._updateWidth=function(){var e=this._context.configuration.options.get(107);0===e.renderMinimap||e.minimapWidth>0&&0===e.minimapLeft?this._width=e.width:this._width=e.width-e.minimapWidth-e.verticalScrollbarWidth},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options.get(78);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0},t.prototype.onScrollChanged=function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")},t}(M);Object(U.e)((function(e,t){var n=e.getColor(an.Vb);n&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: "+n+" 0 6px 6px -6px inset; }")}));n("eC1c");var jn=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)}}(),Wn=function(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null},Vn=function(e,t){this.lineNumber=e,this.ranges=t};function Bn(e){return new Wn(e)}function Hn(e){return new Vn(e.lineNumber,e.ranges.map(Bn))}var zn=m.f,Un=function(e){function t(t){var n=e.call(this)||this;n._previousFrameVisibleRangesWithStyle=[],n._context=t;var i=n._context.configuration.options;return n._lineHeight=i.get(49),n._roundedSelection=i.get(76),n._typicalHalfwidthCharacterWidth=i.get(34).typicalHalfwidthCharacterWidth,n._selections=[],n._renderResult=null,n._context.addEventHandler(n),n}return jn(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;return this._lineHeight=t.get(49),this._roundedSelection=t.get(76),this._typicalHalfwidthCharacterWidth=t.get(34).typicalHalfwidthCharacterWidth,!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._visibleRangesHaveGaps=function(e){for(var t=0,n=e.length;t1)return!0}return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t,n){var i=this._typicalHalfwidthCharacterWidth/4,o=null,r=null;if(n&&n.length>0&&t.length>0){var s=t[0].lineNumber;if(s===e.startLineNumber)for(var a=0;!o&&a=0;a--)n[a].lineNumber===u&&(r=n[a].ranges[0]);o&&!o.startStyle&&(o=null),r&&!r.startStyle&&(r=null)}a=0;for(var l=t.length;a0){var g=t[a-1].ranges[0].left,m=t[a-1].ranges[0].left+t[a-1].ranges[0].width;Kn(d-g)g&&(p.top=1),Kn(h-m)'},t.prototype._actualRenderOneSelection=function(e,n,i,o){if(0!==o.length)for(var r=!!o[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),u=o[0].lineNumber,l=o[o.length-1].lineNumber,c=0,d=o.length;c1,l)}}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t.map((function(e){return e[0]+e[1]}))},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.SELECTION_CLASS_NAME="selected-text",t.SELECTION_TOP_LEFT="top-left-radius",t.SELECTION_BOTTOM_LEFT="bottom-left-radius",t.SELECTION_TOP_RIGHT="top-right-radius",t.SELECTION_BOTTOM_RIGHT="bottom-right-radius",t.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",t.ROUNDED_PIECE_WIDTH=10,t}(Ae);function Kn(e){return e<0?-e:e}Object(U.e)((function(e,t){var n=e.getColor(an.K);n&&t.addRule(".monaco-editor .focused .selected-text { background-color: "+n+"; }");var i=e.getColor(an.F);i&&t.addRule(".monaco-editor .selected-text { background-color: "+i+"; }");var o=e.getColor(an.L);o&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: "+o+"; }")}));n("2Tsy");var qn=function(e,t,n,i,o,r){this.top=e,this.left=t,this.width=n,this.height=i,this.textContent=o,this.textContentClassName=r},Gn=function(){function e(e){this._context=e;var t=this._context.configuration.options,n=t.get(34);this._cursorStyle=t.get(18),this._lineHeight=t.get(49),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(21),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Object(p.b)(document.createElement("div")),this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),c.a.applyFontInfo(this._domNode,n),this._domNode.setDisplay("none"),this._position=new oe.a(1,1),this._lastRenderedContent="",this._renderData=null}return e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return this._position},e.prototype.show=function(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)},e.prototype.hide=function(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)},e.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options,n=t.get(34);return this._cursorStyle=t.get(18),this._lineHeight=t.get(49),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(21),this._typicalHalfwidthCharacterWidth),c.a.applyFontInfo(this._domNode,n),!0},e.prototype.onCursorPositionChanged=function(e){return this._position=e,!0},e.prototype._prepareRender=function(e){var t="";if(this._cursorStyle===K.g.Line||this._cursorStyle===K.g.LineThin){var n,i=e.visibleRangeForPosition(this._position);if(!i||i.outsideRenderedLine)return null;if(this._cursorStyle===K.g.Line){if((n=r.u(this._lineCursorWidth>0?this._lineCursorWidth:2))>2){var o=this._context.model.getLineContent(this._position.lineNumber),s=Me.E(o,this._position.column-1);t=o.substr(this._position.column-1,s)}}else n=r.u(1);var a=i.left;n>=2&&a>=1&&(a-=1);var u=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new qn(u,a,n,this._lineHeight,t,"")}var l=this._context.model.getLineContent(this._position.lineNumber),c=Me.E(l,this._position.column-1),d=e.linesVisibleRangesForRange(new re.a(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+c),!1);if(!d||0===d.length)return null;var h=d[0];if(h.outsideRenderedLine||0===h.ranges.length)return null;var p=h.ranges[0],f=p.width<1?this._typicalHalfwidthCharacterWidth:p.width,g="";if(this._cursorStyle===K.g.Block){var m=this._context.model.getViewLineData(this._position.lineNumber);t=l.substr(this._position.column-1,c);var v=m.tokens.findTokenIndexAtOffset(this._position.column-1);g=m.tokens.getClassName(v)}var _=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,b=this._lineHeight;return this._cursorStyle!==K.g.Underline&&this._cursorStyle!==K.g.UnderlineThin||(_+=this._lineHeight-2,b=2),new qn(_,p.left,f,b,t,g)},e.prototype.prepareRender=function(e){this._renderData=this._prepareRender(e)},e.prototype.render=function(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName("cursor "+this._renderData.textContentClassName),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)},e}(),Yn=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)}}(),Zn=function(e){function t(t){var n=e.call(this,t)||this,i=n._context.configuration.options;return n._readOnly=i.get(68),n._cursorBlinking=i.get(16),n._cursorStyle=i.get(18),n._cursorSmoothCaretAnimation=i.get(17),n._selectionIsEmpty=!0,n._isVisible=!1,n._primaryCursor=new Gn(n._context),n._secondaryCursors=[],n._renderData=[],n._domNode=Object(p.b)(document.createElement("div")),n._domNode.setAttribute("role","presentation"),n._domNode.setAttribute("aria-hidden","true"),n._updateDomClassName(),n._domNode.appendChild(n._primaryCursor.getDomNode()),n._startCursorBlinkAnimation=new _.e,n._cursorFlatBlinkInterval=new _.c,n._blinkingEnabled=!1,n._editorHasFocus=!1,n._updateBlinking(),n}return Yn(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.options;this._readOnly=t.get(68),this._cursorBlinking=t.get(16),this._cursorStyle=t.get(18),this._cursorSmoothCaretAnimation=t.get(17),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(var n=0,i=this._secondaryCursors.length;nt.length){var r=this._secondaryCursors.length-t.length;for(i=0;in){var r=t-n;for(o=0;o=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)},e.prototype._getAll=function(){var e=[];e[0]=this.primaryCursor;for(var t=0,n=this.secondaryCursors.length;td&&S.index--}e.splice(d,1),t.splice(c,1),this._removeSecondaryCursor(d-1),o--}}}}},e}(),ai=n("snIX"),ui=n("GR/f"),li=n("iuje"),ci=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)}}();var di=function(e,t,n,i,o,r){this.selections=e,this.modelVersionId=t,this.oldSelections=n,this.oldModelVersionId=i,this.source=o,this.reason=r},hi=function(){function e(e,t){this.modelVersionId=e.getVersionId(),this.cursorState=t.getAll()}return e.prototype.equals=function(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(var t=0,n=this.cursorState.length;t=t.length)return!1;if(!t[n].strictContainsRange(e[n]))return!1}return!0},e}(),fi=function(e){function t(t,n,i){var o=e.call(this)||this;o._onDidReachMaxCursorCount=o._register(new a.a),o.onDidReachMaxCursorCount=o._onDidReachMaxCursorCount.event,o._onDidAttemptReadOnlyEdit=o._register(new a.a),o.onDidAttemptReadOnlyEdit=o._onDidAttemptReadOnlyEdit.event,o._onDidChange=o._register(new a.a),o.onDidChange=o._onDidChange.event,o._configuration=t,o._model=n,o._knownModelVersionId=o._model.getVersionId(),o._viewModel=i,o.context=new se.c(o._configuration,o._model,o._viewModel),o._cursors=new si(o.context),o._isHandling=!1,o._isDoingComposition=!1,o._selectionsWhenCompositionStarted=null,o._columnSelectData=null,o._autoClosedActions=[],o._prevEditOperationType=0,o._register(o._model.onDidChangeRawContent((function(e){if(o._knownModelVersionId=e.versionId,!o._isHandling){var t=e.containsEvent(1);o._onModelContentChanged(t)}}))),o._register(i.addEventListener((function(e){(function(e){for(var t=0,n=e.length;t0)for(var e=this._cursors.getSelections(),t=0;tt.MAX_CURSOR_COUNT&&(i=i.slice(0,t.MAX_CURSOR_COUNT),this._onDidReachMaxCursorCount.fire(void 0));var o=new hi(this._model,this);this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,n,o)},t.prototype.setColumnSelectData=function(e){this._columnSelectData=e},t.prototype.reveal=function(e,t,n,i){this._revealRange(e,n,0,t,i)},t.prototype.revealRange=function(e,t,n,i,o){this.emitCursorRevealRange(e,n,i,t,o)},t.prototype.scrollTo=function(e){this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop:e})},t.prototype.saveState=function(){for(var e=[],t=this._cursors.getSelections(),n=0,i=t.length;n0&&this._pushAutoClosedAction(n,i),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}},t.prototype._interpretCommandResult=function(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()},t.prototype._emitStateChangedIfNecessary=function(e,t,n){var i=new hi(this._model,this);if(i.equals(n))return!1;var o=this._cursors.getSelections(),r=this._cursors.getViewSelections();try{this._beginEmit().emit(new qe(r,o))}finally{this._endEmit()}if(!n||n.cursorState.length!==i.cursorState.length||i.cursorState.some((function(e,t){return!e.modelState.equals(n.cursorState[t].modelState)}))){var s=n?n.cursorState.map((function(e){return e.modelState.selection})):null,a=n?n.modelVersionId:0;this._onDidChange.fire(new di(o,i.modelVersionId,s,a,e||"keyboard",t))}return!0},t.prototype._revealRange=function(e,t,n,i,o){var r=this._cursors.getViewPositions(),s=r[0];if(1===t)for(var a=1;a1)return;var u=new re.a(s.lineNumber,s.column,s.lineNumber,s.column);this.emitCursorRevealRange(e,u,n,i,o)},t.prototype.emitCursorRevealRange=function(e,t,n,i,o){try{this._beginEmit().emit(new tt(e,t,n,i,o))}finally{this._endEmit()}},t.prototype._findAutoClosingPairs=function(e){if(!e.length)return null;for(var t=[],n=0,i=e.length;n=0)return null;var r=o.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;var s=r[1],a=this.context.config.autoClosingPairsClose2.get(s);if(!a||1!==a.length)return null;var u=a[0].open,l=o.text.length-r[2].length-1,c=o.text.lastIndexOf(u,l-1);if(-1===c)return null;t.push([c,l])}return t},t.prototype.executeEdits=function(e,t,n){var i=this,o=null;"snippet"===e&&(o=this._findAutoClosingPairs(t)),o&&(t[0]._isTracked=!0);var r=[],s=[],a=this._model.pushEditOperations(this.getSelections(),t,(function(e){if(o)for(var t=0,a=o.length;t0&&this._pushAutoClosedAction(r,s)},t.prototype.trigger=function(e,t,n){var i=li.b;if(t===i.CompositionStart)return this._isDoingComposition=!0,void(this._selectionsWhenCompositionStarted=this.getSelections().slice(0));if(t===i.CompositionEnd&&(this._isDoingComposition=!1),this._configuration.options.get(68))this._onDidAttemptReadOnlyEdit.fire(void 0);else{var o=new hi(this._model,this),r=0;t!==i.Undo&&t!==i.Redo&&this._cursors.stopTrackingSelections(),this._cursors.ensureValidState(),this._isHandling=!0;try{switch(t){case i.Type:this._type(e,n.text);break;case i.ReplacePreviousChar:this._replacePreviousChar(n.text,n.replaceCharCnt);break;case i.Paste:r=4,this._paste(n.text,n.pasteOnNewLine,n.multicursorText||[]);break;case i.Cut:this._cut();break;case i.Undo:r=5,this._interpretCommandResult(this._model.undo());break;case i.Redo:r=6,this._interpretCommandResult(this._model.redo());break;case i.ExecuteCommand:this._externalExecuteCommand(n);break;case i.ExecuteCommands:this._externalExecuteCommands(n);break;case i.CompositionEnd:this._interpretCompositionEnd(e)}}catch(e){Object(s.e)(e)}this._isHandling=!1,t!==i.Undo&&t!==i.Redo&&this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,r,o)&&this._revealRange(e,0,0,!0,0)}},t.prototype._interpretCompositionEnd=function(e){if(!this._isDoingComposition&&"keyboard"===e){var t=pi.getAllAutoClosedCharacters(this._autoClosedActions);this._executeEditOperation(ui.a.compositionEndWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this._selectionsWhenCompositionStarted,this.getSelections(),t)),this._selectionsWhenCompositionStarted=null}},t.prototype._type=function(e,t){if(this._isDoingComposition||"keyboard"!==e)this._executeEditOperation(ui.a.typeWithoutInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),t));else for(var n=t.length,i=0;i0&&(r[0]._isTracked=!0);var u=e.model.pushEditOperations(e.selectionsBefore,r,(function(n){for(var i=[],o=0;o0?(i[n].sort(u),l[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:function(){return i[n]},getTrackedSelection:function(t){var n=parseInt(t,10),i=e.model._getTrackedRange(e.trackedRanges[n]);return 0===e.trackedRangesDirection[n]?new _e.a(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new _e.a(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn)}})):l[n]=e.selectionsBefore[n]};for(o=0;oo.identifier.major?i.identifier.major:o.identifier.major).toString()]=!0;for(var s=0;s0&&n--}}return t},e}(),mi=n("9Y+e"),vi=n("wQH0"),_i=n("TQUy"),bi=n("QuOb"),yi=function(){function e(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}return e.prototype.insert=function(e){this._hasPending=!0,this._inserts.push(e)},e.prototype.change=function(e){this._hasPending=!0,this._changes.push(e)},e.prototype.remove=function(e){this._hasPending=!0,this._removes.push(e)},e.prototype.mustCommit=function(){return this._hasPending},e.prototype.commit=function(e){if(this._hasPending){var t=this._inserts,n=this._changes,i=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,i)}},e}(),Ci=function(e,t,n,i,o){this.id=e,this.afterLineNumber=t,this.ordinal=n,this.height=i,this.minWidth=o,this.prefixSum=0},wi=function(){function e(t,n){this._instanceId=Me.M(++e.INSTANCE_COUNT),this._pendingChanges=new yi,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=t,this._lineHeight=n}return e.findInsertionIndex=function(e,t,n){for(var i=0,o=e.length;i>>1;t===e[r].afterLineNumber?n0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){for(var i=0,o=e;it&&(this._arr[n].afterLineNumber-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(var n=0,i=this._arr.length;n=t.length||t[o+1].afterLineNumber>=e)return o;n=o+1|0}else i=o-1|0}return-1},e.prototype._findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceMinWidth=function(){if(this._checkPendingChanges(),-1===this._minWidth){for(var e=0,t=0,n=this._arr.length;tthis.getLinesTotalHeight()},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;for(var t=0|this._lineCount,n=this._lineHeight,i=1,o=t;i=s+n)i=r+1;else{if(e>=s)return r;o=r}}return i>t?t:i},e.prototype.getLinesViewportData=function(e,t){this._checkPendingChanges(),e|=0,t|=0;var n,i,o=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,u=0|this.getFirstWhitespaceIndexAfterLineNumber(r),l=0|this.getWhitespacesCount();-1===u?(u=l,i=a+1,n=0):(i=0|this.getAfterLineNumberForWhitespaceIndex(u),n=0|this.getHeightForWhitespaceIndex(u));var c=s,d=c,h=0;s>=5e5&&(h=5e5*Math.floor(s/5e5),d-=h=Math.floor(h/o)*o);for(var p=[],f=e+(t-e)/2,g=-1,m=r;m<=a;m++){if(-1===g){(c<=f&&ff)&&(g=m)}for(c+=o,p[m-r]=d,d+=o;i===m;)d+=n,c+=n,++u>=l?i=a+1:(i=0|this.getAfterLineNumberForWhitespaceIndex(u),n=0|this.getHeightForWhitespaceIndex(u));if(c>=t){a=m;break}}-1===g&&(g=a);var v=0|this.getVerticalOffsetForLineNumber(a),_=r,b=a;return _t&&b--,{bigNumbersDelta:h,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:p,centeredLineNumber:g,completelyVisibleStartLineNumber:_,completelyVisibleEndLineNumber:b}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e){this._checkPendingChanges(),e|=0;var t=this.getAfterLineNumberForWhitespaceIndex(e);return(t>=1?this._lineHeight*t:0)+(e>0?this.getWhitespacesAccumulatedHeight(e-1):0)},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e){this._checkPendingChanges(),e|=0;var t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(n)+this.getHeightForWhitespaceIndex(n))return-1;for(;t=o+this.getHeightForWhitespaceIndex(i))t=i+1;else{if(e>=o)return i;n=i}}return t},e.prototype.getWhitespaceAtVerticalOffset=function(e){this._checkPendingChanges(),e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;var n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;var i=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:i}},e.prototype.getWhitespaceViewportData=function(e,t){this._checkPendingChanges(),e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this.getWhitespacesCount()-1;if(n<0)return[];for(var o=[],r=n;r<=i;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this.getHeightForWhitespaceIndex(r);if(s>=t)break;o.push({id:this.getIdForWhitespaceIndex(r),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a})}return o},e.prototype.getWhitespaces=function(){return this._checkPendingChanges(),this._arr.slice(0)},e.prototype.getWhitespacesCount=function(){return this._checkPendingChanges(),this._arr.length},e.prototype.getIdForWhitespaceIndex=function(e){return this._checkPendingChanges(),e|=0,this._arr[e].id},e.prototype.getAfterLineNumberForWhitespaceIndex=function(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber},e.prototype.getHeightForWhitespaceIndex=function(e){return this._checkPendingChanges(),e|=0,this._arr[e].height},e.INSTANCE_COUNT=0,e}(),Si=n("qNAo"),Oi=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)}}(),Li=function(){function e(e,t,n,i){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(n|=0)<0&&(n=0),(i|=0)<0&&(i=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=i,this.scrollHeight=Math.max(n,i)}return e.prototype.equals=function(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight},e}(),Di=function(e){function t(t,n){var i=e.call(this)||this;return i._onDidContentSizeChange=i._register(new a.a),i.onDidContentSizeChange=i._onDidContentSizeChange.event,i._dimensions=new Li(0,0,0,0),i._scrollable=i._register(new bi.a(t,n)),i.onDidScroll=i._scrollable.onScroll,i}return Oi(t,e),t.prototype.getScrollable=function(){return this._scrollable},t.prototype.setSmoothScrollDuration=function(e){this._scrollable.setSmoothScrollDuration(e)},t.prototype.validateScrollPosition=function(e){return this._scrollable.validateScrollPosition(e)},t.prototype.getScrollDimensions=function(){return this._dimensions},t.prototype.setScrollDimensions=function(e){if(!this._dimensions.equals(e)){var t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight});var n=t.contentWidth!==e.contentWidth,i=t.contentHeight!==e.contentHeight;(n||i)&&this._onDidContentSizeChange.fire({contentWidth:e.contentWidth,contentHeight:e.contentHeight,contentWidthChanged:n,contentHeightChanged:i})}},t.prototype.getFutureScrollPosition=function(){return this._scrollable.getFutureScrollPosition()},t.prototype.getCurrentScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t.prototype.setScrollPositionNow=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this._scrollable.setScrollPositionSmooth(e)},t}(u.a),xi=function(e){function t(t,n,i){var o=e.call(this)||this;o._configuration=t;var r=o._configuration.options,s=r.get(107);return o._linesLayout=new wi(n,r.get(49)),o._scrollable=o._register(new Di(0,i)),o._configureSmoothScrollDuration(),o._scrollable.setScrollDimensions(new Li(s.contentWidth,0,s.height,0)),o.onDidScroll=o._scrollable.onDidScroll,o.onDidContentSizeChange=o._scrollable.onDidContentSizeChange,o._updateHeight(),o}return Oi(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.getScrollable=function(){return this._scrollable.getScrollable()},t.prototype.onHeightMaybeChanged=function(){this._updateHeight()},t.prototype._configureSmoothScrollDuration=function(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(87)?125:0)},t.prototype.onConfigurationChanged=function(e){var t=this._configuration.options;if(e.hasChanged(49)&&this._linesLayout.setLineHeight(t.get(49)),e.hasChanged(107)){var n=t.get(107),i=n.contentWidth,o=n.height,r=this._scrollable.getScrollDimensions(),s=r.scrollWidth;this._scrollable.setScrollDimensions(new Li(i,r.contentWidth,o,this._getContentHeight(i,o,s)))}else this._updateHeight();e.hasChanged(87)&&this._configureSmoothScrollDuration()},t.prototype.onFlushed=function(e){this._linesLayout.onFlushed(e)},t.prototype.onLinesDeleted=function(e,t){this._linesLayout.onLinesDeleted(e,t)},t.prototype.onLinesInserted=function(e,t){this._linesLayout.onLinesInserted(e,t)},t.prototype._getHorizontalScrollbarHeight=function(e,t){var n=this._configuration.options.get(78);return 2===n.horizontal||e>=t?0:n.horizontalScrollbarSize},t.prototype._getContentHeight=function(e,t,n){var i=this._configuration.options,o=this._linesLayout.getLinesTotalHeight();return i.get(80)?o+=t-i.get(49):o+=this._getHorizontalScrollbarHeight(e,n),o},t.prototype._updateHeight=function(){var e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,i=e.scrollWidth;this._scrollable.setScrollDimensions(new Li(t,e.contentWidth,n,this._getContentHeight(t,n,i)))},t.prototype.getCurrentViewport=function(){var e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new Si.f(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype.getFutureViewport=function(){var e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new Si.f(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype._computeContentWidth=function(e){var t=this._configuration.options,n=t.get(108),i=t.get(34);if(n.isViewportWrapping){var o=t.get(107),r=t.get(54);return e>o.contentWidth+i.typicalHalfwidthCharacterWidth&&r.enabled&&"right"===r.side?e+o.verticalScrollbarWidth:e}var s=t.get(79)*i.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+s,a)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Li(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()},t.prototype.saveState=function(){var e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),scrollLeft:e.scrollLeft}},t.prototype.changeWhitespace=function(e){return this._linesLayout.changeWhitespace(e)},t.prototype.getVerticalOffsetForLineNumber=function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)},t.prototype.isAfterLines=function(e){return this._linesLayout.isAfterLines(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)},t.prototype.getLinesViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)},t.prototype.getLinesViewportDataAtScrollTop=function(e){var t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)},t.prototype.getWhitespaceViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)},t.prototype.getWhitespaces=function(){return this._linesLayout.getWhitespaces()},t.prototype.getContentWidth=function(){return this._scrollable.getScrollDimensions().contentWidth},t.prototype.getScrollWidth=function(){return this._scrollable.getScrollDimensions().scrollWidth},t.prototype.getContentHeight=function(){return this._scrollable.getScrollDimensions().contentHeight},t.prototype.getScrollHeight=function(){return this._scrollable.getScrollDimensions().scrollHeight},t.prototype.getCurrentScrollLeft=function(){return this._scrollable.getCurrentScrollPosition().scrollLeft},t.prototype.getCurrentScrollTop=function(){return this._scrollable.getCurrentScrollPosition().scrollTop},t.prototype.validateScrollPosition=function(e){return this._scrollable.validateScrollPosition(e)},t.prototype.setScrollPositionNow=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this._scrollable.setScrollPositionSmooth(e)},t.prototype.deltaScrollNow=function(e,t){var n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})},t}(u.a),Ni=n("tX9W"),ki=n("LeU+"),Ei=function(e,t){this.outputLineIndex=e,this.outputOffset=t},Ii=function(){function e(e,t,n){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=n}return e.getInputOffsetOfOutputPosition=function(e,t,n){return 0===t?n:e[t-1]+n},e.getOutputPositionOfInputOffset=function(e,t){for(var n=0,i=e.length-1,o=0,r=0;n<=i;){var s=e[o=n+(i-n)/2|0];if(t<(r=o>0?e[o-1]:0))i=o-1;else{if(!(t>=s))break;n=o+1}}return new Ei(o,t-r)},e}(),Mi=function(){function e(e){this._lines=e}return e.prototype.convertViewPositionToModelPosition=function(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)},e.prototype.convertViewRangeToModelRange=function(e){return this._lines.convertViewRangeToModelRange(e)},e.prototype.validateViewPosition=function(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)},e.prototype.validateViewRange=function(e,t){return this._lines.validateViewRange(e,t)},e.prototype.convertModelPositionToViewPosition=function(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)},e.prototype.convertModelRangeToViewRange=function(e){return this._lines.convertModelRangeToViewRange(e)},e.prototype.modelPositionIsVisible=function(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)},e}(),Ti=function(){function e(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}return e.prototype._invalidate=function(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)},e.prototype._ensureValid=function(){if(!this._isValid){for(var e=this._validEndIndex+1,t=this._counts.length;e0?this._modelToView[e-1]:0;this._modelToView[e]=i+n;for(var o=0;o0?this._modelToView[t-1]:0;return new ki.b(t,e-n)},e}(),Pi=function(){function e(e,t,n,i,o,r,s,a){this.model=e,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=t,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=i,this.tabSize=o,this.wrappingStrategy=r,this.wrappingColumn=s,this.wrappingIndent=a,this._constructLines(!0,null)}return e.prototype.dispose=function(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])},e.prototype.createCoordinatesConverter=function(){return new Mi(this)},e.prototype._constructLines=function(e,t){var n=this;this.lines=[],e&&(this.hiddenAreasIds=[]);for(var i=this.model.getLinesContent(),o=i.length,r=this.createLineBreaksComputer(),s=0;s=c&&f<=d,m=Bi(a[s],!g);u[s]=m.getViewLineCount(),this.lines[s]=m}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new Ti(u)},e.prototype.getHiddenAreas=function(){var e=this;return this.hiddenAreasIds.map((function(t){return e.model.getDecorationRange(t)}))},e.prototype._reduceRanges=function(e){var t=this;if(0===e.length)return[];for(var n=e.map((function(e){return t.model.validateRange(e)})).sort(re.a.compareRangesUsingStarts),i=[],o=n[0].startLineNumber,r=n[0].endLineNumber,s=1,a=n.length;sr+1?(i.push(new re.a(o,1,r,1)),o=u.startLineNumber,r=u.endLineNumber):u.endLineNumber>r&&(r=u.endLineNumber)}return i.push(new re.a(o,1,r,1)),i},e.prototype.setHiddenAreas=function(e){var t=this,n=this._reduceRanges(e),i=this.hiddenAreasIds.map((function(e){return t.model.getDecorationRange(e)})).sort(re.a.compareRangesUsingStarts);if(n.length===i.length){for(var o=!1,r=0;r=d&&m<=h?this.lines[r].isVisible()&&(this.lines[r]=this.lines[r].setVisible(!1),v=!0):(g=!0,this.lines[r].isVisible()||(this.lines[r]=this.lines[r].setVisible(!0),v=!0)),v){var _=this.lines[r].getViewLineCount();this.prefixSumComputer.changeValue(r,_)}}return g||this.setHiddenAreas([]),!0},e.prototype.modelPositionIsVisible=function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()},e.prototype.setTabSize=function(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)},e.prototype.setWrappingSettings=function(e,t,n,i){var o=this.fontInfo.equals(e),r=this.wrappingStrategy===t,s=this.wrappingColumn===n,a=this.wrappingIndent===i;if(o&&r&&s&&a)return!1;var u=o&&r&&!s&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=i;var l=null;if(u){l=[];for(var c=0,d=this.lines.length;cs?(p=(h=(l=(u=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+s-1)+1)+(o-s)-1,a=!0):ot?t:0|e},e.prototype.getActiveIndentGuide=function(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);var i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),s=this.model.getActiveIndentGuide(i.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),u=this.convertModelPositionToViewPosition(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:u.lineNumber,indent:s.indent}},e.prototype.getViewLinesIndentGuides=function(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),o=[],r=[],s=[],a=n.lineNumber-1,u=i.lineNumber-1,l=null,c=a;c<=u;c++){var d=this.lines[c];if(d.isVisible()){var h=d.getViewLineNumberOfModelPosition(0,c===a?n.column:1),p=d.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(c+1)),f=0;(C=p-h+1)>1&&1===d.getViewLineMinColumn(this.model,c+1,p)&&(f=0===h?1:2),r.push(C),s.push(f),null===l&&(l=new oe.a(c+1,0))}else null!==l&&(o=o.concat(this.model.getLinesIndentGuides(l.lineNumber,c)),l=null)}null!==l&&(o=o.concat(this.model.getLinesIndentGuides(l.lineNumber,i.lineNumber)),l=null);for(var g=t-e+1,m=new Array(g),v=0,_=0,b=o.length;_t&&(p=!0,h=t-o+1);var f=d+h;if(c.getViewLinesData(this.model,u+1,d,f,o-e,n,a),o+=h,p)break}}return a},e.prototype.validateViewPosition=function(e,t,n){e=this._toValidViewLineNumber(e);var i=this.prefixSumComputer.getIndexOf(e-1),o=i.index,r=i.remainder,s=this.lines[o],a=s.getViewLineMinColumn(this.model,o+1,r),u=s.getViewLineMaxColumn(this.model,o+1,r);tu&&(t=u);var l=s.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new oe.a(o+1,l)).equals(n)?new oe.a(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)},e.prototype.validateViewRange=function(e,t){var n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),i=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new re.a(n.lineNumber,n.column,i.lineNumber,i.column)},e.prototype.convertViewPositionToModelPosition=function(e,t){e=this._toValidViewLineNumber(e);var n=this.prefixSumComputer.getIndexOf(e-1),i=n.index,o=n.remainder,r=this.lines[i].getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new oe.a(i+1,r))},e.prototype.convertViewRangeToModelRange=function(e){var t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new re.a(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype.convertModelPositionToViewPosition=function(e,t){for(var n=this.model.validatePosition(new oe.a(e,t)),i=n.lineNumber,o=n.column,r=i-1,s=!1;r>0&&!this.lines[r].isVisible();)r--,s=!0;if(0===r&&!this.lines[r].isVisible())return new oe.a(1,1);var a=1+(0===r?0:this.prefixSumComputer.getAccumulatedValue(r-1));return s?this.lines[r].getViewPositionOfModelPosition(a,this.model.getLineMaxColumn(r+1)):this.lines[i-1].getViewPositionOfModelPosition(a,o)},e.prototype.convertModelRangeToViewRange=function(e){var t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return e.startLineNumber===e.endLineNumber&&t.lineNumber!==n.lineNumber&&n.column===this.getViewLineMinColumn(n.lineNumber)?new re.a(t.lineNumber,t.column,n.lineNumber-1,this.getViewLineMaxColumn(n.lineNumber-1)):new re.a(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype._getViewLineNumberForModelPosition=function(e,t){var n=e-1;if(this.lines[n].isVisible()){var i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,t)}for(;n>0&&!this.lines[n].isVisible();)n--;if(0===n&&!this.lines[n].isVisible())return 1;var o=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(o,this.model.getLineMaxColumn(n+1))},e.prototype.getAllOverviewRulerDecorations=function(e,t,n){for(var i=this.model.getOverviewRulerDecorations(e,t),o=new Ui,r=0,s=i;rt.id?1:0:n}));for(var d=[],h=0,p=null,f=0,g=r;f0&&(r=Wi(this._lineBreakData.wrappedTextIndentLength)+r),r},e.prototype.getViewLineLength=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n)-i;return n>0&&(o=this._lineBreakData.wrappedTextIndentLength+o),o},e.prototype.getViewLineMinColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this._lineBreakData.wrappedTextIndentLength+1:1},e.prototype.getViewLineMaxColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,n).length+1},e.prototype.getViewLineData=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:o+1});n>0&&(r=Wi(this._lineBreakData.wrappedTextIndentLength)+r);var s=n>0?this._lineBreakData.wrappedTextIndentLength+1:1,a=r.length+1,u=n+10&&(l=this._lineBreakData.wrappedTextIndentLength);var c=e.getLineTokens(t),d=0===n?0:this._lineBreakData.breakOffsetsVisibleColumn[n-1];return new Si.c(r,u,s,a,d,c.sliceAndInflate(i,o,l))},e.prototype.getViewLinesData=function(e,t,n,i,o,r,s){if(!this._isVisible)throw new Error("Not supported");for(var a=n;a0&&(n0&&(o+=this._lineBreakData.wrappedTextIndentLength),new oe.a(e+i,o)},e.prototype.getViewLineNumberOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");return e+Ii.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1).outputLineIndex},e}(),ji=[""];function Wi(e){if(e>=ji.length)for(var t=1;t<=e;t++)ji[t]=Vi(t);return ji[e]}function Vi(e){return new Array(e+1).join(" ")}function Bi(e,t){return null===e?t?Ri.INSTANCE:Ai.INSTANCE:new Fi(e,t)}var Hi=function(){function e(e){this._lines=e}return e.prototype._validPosition=function(e){return this._lines.model.validatePosition(e)},e.prototype._validRange=function(e){return this._lines.model.validateRange(e)},e.prototype.convertViewPositionToModelPosition=function(e){return this._validPosition(e)},e.prototype.convertViewRangeToModelRange=function(e){return this._validRange(e)},e.prototype.validateViewPosition=function(e,t){return this._validPosition(t)},e.prototype.validateViewRange=function(e,t){return this._validRange(t)},e.prototype.convertModelPositionToViewPosition=function(e){return this._validPosition(e)},e.prototype.convertModelRangeToViewRange=function(e){return this._validRange(e)},e.prototype.modelPositionIsVisible=function(e){var t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)},e}(),zi=function(){function e(e){this.model=e}return e.prototype.dispose=function(){},e.prototype.createCoordinatesConverter=function(){return new Hi(this)},e.prototype.getHiddenAreas=function(){return[]},e.prototype.setHiddenAreas=function(e){return!1},e.prototype.setTabSize=function(e){return!1},e.prototype.setWrappingSettings=function(e,t,n,i){return!1},e.prototype.createLineBreaksComputer=function(){var e=[];return{addRequest:function(t,n){e.push(null)},finalize:function(){return e}}},e.prototype.onModelFlushed=function(){},e.prototype.onModelLinesDeleted=function(e,t,n){return new $e(t,n)},e.prototype.onModelLinesInserted=function(e,t,n,i){return new et(t,n)},e.prototype.onModelLineChanged=function(e,t,n){return[!1,new Je(t,t),null,null]},e.prototype.acceptVersionId=function(e){},e.prototype.getViewLineCount=function(){return this.model.getLineCount()},e.prototype.getActiveIndentGuide=function(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}},e.prototype.getViewLinesIndentGuides=function(e,t){for(var n=t-e+1,i=new Array(n),o=0;o=t)return void(n>s&&(o[o.length-1]=n));o.push(i,t,n)}else this.result[e]=[i,t,n]},e}(),Ki=function(){function e(e,t,n,i,o){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=i,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onLineMappingChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype._getOrCreateViewModelDecoration=function(e){var t=e.id,n=this._decorationsCache[t];if(!n){var i=e.range,o=e.options,r=void 0;if(o.isWholeLine){var s=this._coordinatesConverter.convertModelPositionToViewPosition(new oe.a(i.startLineNumber,1)),a=this._coordinatesConverter.convertModelPositionToViewPosition(new oe.a(i.endLineNumber,this.model.getLineMaxColumn(i.endLineNumber)));r=new re.a(s.lineNumber,s.column,a.lineNumber,a.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(i);n=new Si.e(r,o),this._decorationsCache[t]=n}return n},e.prototype.getDecorationsViewportData=function(e){var t=null!==this._cachedModelDecorationsResolver;return(t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver},e.prototype._getDecorationsViewportData=function(e){for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,Object(K.j)(this.configuration.options)),n=e.startLineNumber,i=e.endLineNumber,o=[],r=0,s=[],a=n;a<=i;a++)s[a-n]=[];for(var u=0,l=t.length;u=2&&e.viewportStartLineTrackedRange){var L=e.model._getTrackedRange(e.viewportStartLineTrackedRange);if(L){var D=e.coordinatesConverter.convertModelPositionToViewPosition(L.getStartPosition()),x=e.viewLayout.getVerticalOffsetForLineNumber(D.lineNumber);e.viewLayout.setScrollPositionNow({scrollTop:x+e.viewportStartLineDelta})}}}))),this._register(this.model.onDidChangeTokens((function(t){for(var n=[],i=0,o=t.ranges.length;ia||(r0&&u[c-1]===u[c]||(l+=this.model.getLineContent(u[c])+i);return l}if(o&&t){for(var d=[],h=0,p=0,f=e;p'+this._getHTMLToCopy(i,s)+""}},t.prototype._getHTMLToCopy=function(e,t){for(var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=this.getTabSize(),a="",u=n;u<=o;u++){var l=this.model.getLineTokens(u),c=l.getLineContent(),d=u===n?i-1:0,h=u===o?r-1:c.length;a+=""===c?"
    ":Object(_i.a)(c,l.inflate(),t,d,h,s,f.h)}return a},t.prototype._getColorMap=function(){var e=rn.B.getColorMap(),t=["#000000"];if(e)for(var n=1,i=e.length;n=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue},t}(to.a),oo=[],ro=[],so=function(){function e(e,t){this.classifier=new io(e,t)}return e.create=function(t){return new e(t.get(99),t.get(98))},e.prototype.createLineBreaksComputer=function(e,t,n,i){var o=this;t|=0,n=+n;var r=[],s=[];return{addRequest:function(e,t){r.push(e),s.push(t)},finalize:function(){for(var a=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,u=[],l=0,c=r.length;l=0)for(var _=Math.abs(l[v]-g);v+1=_)break;_=j,v++}for(;vg){S=E,O=L-T,L-w>d&&(C=0),N=!1;break}D=I,x=M}if(N){f>0&&(h[f]=u[u.length-1],p[f]=l[u.length-1],f++);break}}if(0===C){L=y,I=n.charCodeAt(b),M=e.get(I);var P=!1;for(k=b-1;k>=0;k--){E=k+1;if(9===(D=n.charCodeAt(k))){P=!0;break}x=void 0;var R=void 0;if(Me.A(D)?(k--,x=0,R=2):(x=e.get(D),R=Me.y(D)?r:1),L<=g){if(0===S&&(S=E,O=L),L<=g-d)break;if(ho(D,x,I,M)){C=E,w=L;break}}L-=R,I=D,M=x}if(0!==C){var A=d-(O-w);if(A<=i){var F=n.charCodeAt(S);T=void 0;A-(T=Me.z(F)?2:lo(F,O,i,r))<0&&(C=0)}}if(P){v--;continue}}for(0===C&&(C=S,w=O),h[f]=C,p[f]=w,f++,g=w+d;v<0||v=_)break;_=j,v++}}return 0===f?null:(h.length=f,p.length=f,oo=t.breakOffsets,ro=t.breakOffsetsVisibleColumn,t.breakOffsets=h,t.breakOffsetsVisibleColumn=p,t.wrappedTextIndentLength=c,t)}function uo(e,t,n,i,o,r){if(-1===i)return null;var s=t.length;if(s<=1)return null;var a=po(t,n,i,o,r),u=i-a,l=[],c=[],d=0,h=0,p=0,f=i,g=t.charCodeAt(0),m=e.get(g),v=lo(g,0,n,o),_=1;Me.z(g)&&(v+=1,g=t.charCodeAt(1),m=e.get(g),_++);for(var b=_;bf&&((0===h||v-p>u)&&(h=y,p=v-S),l[d]=h,c[d]=p,d++,f=p+u,h=0),g=C,m=w}return 0===d?null:(l[d]=s,c[d]=v,new Ii(l,c,a))}function lo(e,t,n,i){return 9===e?n-t%n:Me.y(e)?i:1}function co(e,t){return t-e%t}function ho(e,t,n,i){return 32!==n&&(2===t||3===t&&2!==i||1===i||3===i&&1!==t)}function po(e,t,n,i,o){var r=0;if(0!==o){var s=Me.q(e);if(-1!==s){for(var a=0;an&&(r=0)}}return r}var fo=function(){function e(){}return e.create=function(){return new e},e.prototype.createLineBreaksComputer=function(e,t,n,i){t|=0,n=+n;var o=[];return{addRequest:function(e,t){o.push(e)},finalize:function(){return function(e,t,n,i,o){if(-1===i){for(var r=[],s=0,a=e.length;su?(_=0,b=0):y=u-S}var O=v.substr(_),L=go(O,b,n,y,d);h[s]=_,p[s]=b,f[s]=O,g[s]=L[0],m[s]=L[1]}l.innerHTML=d.build(),l.style.position="absolute",l.style.top="10000",l.style.wordWrap="break-word",document.body.appendChild(l);var D=document.createRange(),x=Array.prototype.slice.call(l.children,0),N=[];for(s=0;s');for(var r=e.length,s=t,a=0,u=[],l=[],c=0"),[u,l]}function mo(e,t,n,i){if(n.length<=1)return null;var o=[];return function e(t,n,i,o,r,s,a,u){if(o===s)return;if(r=r||vo(t,n,i[o],i[o+1]),a=a||vo(t,n,i[s],i[s+1]),Math.abs(r[0].top-a[0].top)<=.1)return;if(o+1===s)return void u.push(s);var l=o+(s-o)/2|0,c=vo(t,n,i[l],i[l+1]);e(t,n,i,o,r,l,c,u),e(t,n,i,l,c,s,a,u)}(e,t.firstChild,i,0,null,n.length-1,null,o),0===o.length?null:(o.push(n.length),o)}function vo(e,t,n,i){return e.setStart(t,n),e.setEnd(t,i),e.getClientRects()}var _o=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)}}(),bo=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},yo=function(e,t){return function(n,i){t(n,i,e)}},Co=0,wo=function(){function e(e,t,n,i,o,r){this.model=e,this.viewModel=t,this.cursor=n,this.view=i,this.hasRealView=o,this.listenersToRemove=r}return e.prototype.dispose=function(){Object(u.f)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.cursor.dispose(),this.viewModel.dispose()},e}(),So=function(e){function t(t,n,i,o,r,u,l,c,h,p){var f=e.call(this)||this;f._onDidDispose=f._register(new a.a),f.onDidDispose=f._onDidDispose.event,f._onDidChangeModelContent=f._register(new a.a),f.onDidChangeModelContent=f._onDidChangeModelContent.event,f._onDidChangeModelLanguage=f._register(new a.a),f.onDidChangeModelLanguage=f._onDidChangeModelLanguage.event,f._onDidChangeModelLanguageConfiguration=f._register(new a.a),f.onDidChangeModelLanguageConfiguration=f._onDidChangeModelLanguageConfiguration.event,f._onDidChangeModelOptions=f._register(new a.a),f.onDidChangeModelOptions=f._onDidChangeModelOptions.event,f._onDidChangeModelDecorations=f._register(new a.a),f.onDidChangeModelDecorations=f._onDidChangeModelDecorations.event,f._onDidChangeConfiguration=f._register(new a.a),f.onDidChangeConfiguration=f._onDidChangeConfiguration.event,f._onDidChangeModel=f._register(new a.a),f.onDidChangeModel=f._onDidChangeModel.event,f._onDidChangeCursorPosition=f._register(new a.a),f.onDidChangeCursorPosition=f._onDidChangeCursorPosition.event,f._onDidChangeCursorSelection=f._register(new a.a),f.onDidChangeCursorSelection=f._onDidChangeCursorSelection.event,f._onDidAttemptReadOnlyEdit=f._register(new a.a),f.onDidAttemptReadOnlyEdit=f._onDidAttemptReadOnlyEdit.event,f._onDidLayoutChange=f._register(new a.a),f.onDidLayoutChange=f._onDidLayoutChange.event,f._editorTextFocus=f._register(new Oo),f.onDidFocusEditorText=f._editorTextFocus.onDidChangeToTrue,f.onDidBlurEditorText=f._editorTextFocus.onDidChangeToFalse,f._editorWidgetFocus=f._register(new Oo),f.onDidFocusEditorWidget=f._editorWidgetFocus.onDidChangeToTrue,f.onDidBlurEditorWidget=f._editorWidgetFocus.onDidChangeToFalse,f._onWillType=f._register(new a.a),f.onWillType=f._onWillType.event,f._onDidType=f._register(new a.a),f.onDidType=f._onDidType.event,f._onDidCompositionStart=f._register(new a.a),f.onDidCompositionStart=f._onDidCompositionStart.event,f._onDidCompositionEnd=f._register(new a.a),f.onDidCompositionEnd=f._onDidCompositionEnd.event,f._onDidPaste=f._register(new a.a),f.onDidPaste=f._onDidPaste.event,f._onMouseUp=f._register(new a.a),f.onMouseUp=f._onMouseUp.event,f._onMouseDown=f._register(new a.a),f.onMouseDown=f._onMouseDown.event,f._onMouseDrag=f._register(new a.a),f.onMouseDrag=f._onMouseDrag.event,f._onMouseDrop=f._register(new a.a),f.onMouseDrop=f._onMouseDrop.event,f._onContextMenu=f._register(new a.a),f.onContextMenu=f._onContextMenu.event,f._onMouseMove=f._register(new a.a),f.onMouseMove=f._onMouseMove.event,f._onMouseLeave=f._register(new a.a),f.onMouseLeave=f._onMouseLeave.event,f._onMouseWheel=f._register(new a.a),f.onMouseWheel=f._onMouseWheel.event,f._onKeyUp=f._register(new a.a),f.onKeyUp=f._onKeyUp.event,f._onKeyDown=f._register(new a.a),f.onKeyDown=f._onKeyDown.event,f._onDidContentSizeChange=f._register(new a.a),f.onDidContentSizeChange=f._onDidContentSizeChange.event,f._onDidScrollChange=f._register(new a.a),f.onDidScrollChange=f._onDidScrollChange.event,f._onDidChangeViewZones=f._register(new a.a),f.onDidChangeViewZones=f._onDidChangeViewZones.event,f._domElement=t,f._id=++Co,f._decorationTypeKeysToIds={},f._decorationTypeSubtypes={},f.isSimpleWidget=i.isSimpleWidget||!1,f._telemetryData=i.telemetryData,n=n||{},f._configuration=f._register(f._createConfiguration(n,p)),f._register(f._configuration.onDidChange((function(e){f._onDidChangeConfiguration.fire(e);var t=f._configuration.options;if(e.hasChanged(107)){var n=t.get(107);f._onDidLayoutChange.fire(n)}}))),f._contextKeyService=f._register(l.createScoped(f._domElement)),f._notificationService=h,f._codeEditorService=r,f._commandService=u,f._themeService=c,f._register(new Lo(f,f._contextKeyService)),f._register(new Do(f,f._contextKeyService)),f._instantiationService=o.createChild(new Qi.a([Zi.c,f._contextKeyService])),f._modelData=null,f._contributions={},f._actions={},f._focusTracker=new xo(t),f._focusTracker.onChange((function(){f._editorWidgetFocus.setValue(f._focusTracker.hasFocus())})),f._contentWidgets={},f._overlayWidgets={};for(var g=0,m=Array.isArray(i.contributions)?i.contributions:d.d.getEditorContributions();g1),this._hasNonEmptySelection.set(e.some((function(e){return!e.isEmpty()})))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())},t.prototype._updateFromFocus=function(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())},t.prototype._updateFromModel=function(){var e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))},t}(u.a),Do=function(e){function t(t,n){var i=e.call(this)||this;i._editor=t,i._contextKeyService=n,i._langId=vi.a.languageId.bindTo(n),i._hasCompletionItemProvider=vi.a.hasCompletionItemProvider.bindTo(n),i._hasCodeActionsProvider=vi.a.hasCodeActionsProvider.bindTo(n),i._hasCodeLensProvider=vi.a.hasCodeLensProvider.bindTo(n),i._hasDefinitionProvider=vi.a.hasDefinitionProvider.bindTo(n),i._hasDeclarationProvider=vi.a.hasDeclarationProvider.bindTo(n),i._hasImplementationProvider=vi.a.hasImplementationProvider.bindTo(n),i._hasTypeDefinitionProvider=vi.a.hasTypeDefinitionProvider.bindTo(n),i._hasHoverProvider=vi.a.hasHoverProvider.bindTo(n),i._hasDocumentHighlightProvider=vi.a.hasDocumentHighlightProvider.bindTo(n),i._hasDocumentSymbolProvider=vi.a.hasDocumentSymbolProvider.bindTo(n),i._hasReferenceProvider=vi.a.hasReferenceProvider.bindTo(n),i._hasRenameProvider=vi.a.hasRenameProvider.bindTo(n),i._hasSignatureHelpProvider=vi.a.hasSignatureHelpProvider.bindTo(n),i._hasDocumentFormattingProvider=vi.a.hasDocumentFormattingProvider.bindTo(n),i._hasDocumentSelectionFormattingProvider=vi.a.hasDocumentSelectionFormattingProvider.bindTo(n),i._hasMultipleDocumentFormattingProvider=vi.a.hasMultipleDocumentFormattingProvider.bindTo(n),i._hasMultipleDocumentSelectionFormattingProvider=vi.a.hasMultipleDocumentSelectionFormattingProvider.bindTo(n),i._isInWalkThrough=vi.a.isInEmbeddedEditor.bindTo(n);var o=function(){return i._update()};return i._register(t.onDidChangeModel(o)),i._register(t.onDidChangeModelLanguage(o)),i._register(rn.d.onDidChange(o)),i._register(rn.a.onDidChange(o)),i._register(rn.b.onDidChange(o)),i._register(rn.f.onDidChange(o)),i._register(rn.e.onDidChange(o)),i._register(rn.q.onDidChange(o)),i._register(rn.C.onDidChange(o)),i._register(rn.p.onDidChange(o)),i._register(rn.i.onDidChange(o)),i._register(rn.m.onDidChange(o)),i._register(rn.u.onDidChange(o)),i._register(rn.v.onDidChange(o)),i._register(rn.g.onDidChange(o)),i._register(rn.j.onDidChange(o)),i._register(rn.x.onDidChange(o)),o(),i}return _o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.reset=function(){var e=this;this._contextKeyService.bufferChangeEvents((function(){e._langId.reset(),e._hasCompletionItemProvider.reset(),e._hasCodeActionsProvider.reset(),e._hasCodeLensProvider.reset(),e._hasDefinitionProvider.reset(),e._hasDeclarationProvider.reset(),e._hasImplementationProvider.reset(),e._hasTypeDefinitionProvider.reset(),e._hasHoverProvider.reset(),e._hasDocumentHighlightProvider.reset(),e._hasDocumentSymbolProvider.reset(),e._hasReferenceProvider.reset(),e._hasRenameProvider.reset(),e._hasDocumentFormattingProvider.reset(),e._hasDocumentSelectionFormattingProvider.reset(),e._hasSignatureHelpProvider.reset(),e._isInWalkThrough.reset()}))},t.prototype._update=function(){var e=this,t=this._editor.getModel();t?this._contextKeyService.bufferChangeEvents((function(){e._langId.set(t.getLanguageIdentifier().language),e._hasCompletionItemProvider.set(rn.d.has(t)),e._hasCodeActionsProvider.set(rn.a.has(t)),e._hasCodeLensProvider.set(rn.b.has(t)),e._hasDefinitionProvider.set(rn.f.has(t)),e._hasDeclarationProvider.set(rn.e.has(t)),e._hasImplementationProvider.set(rn.q.has(t)),e._hasTypeDefinitionProvider.set(rn.C.has(t)),e._hasHoverProvider.set(rn.p.has(t)),e._hasDocumentHighlightProvider.set(rn.i.has(t)),e._hasDocumentSymbolProvider.set(rn.m.has(t)),e._hasReferenceProvider.set(rn.u.has(t)),e._hasRenameProvider.set(rn.v.has(t)),e._hasSignatureHelpProvider.set(rn.x.has(t)),e._hasDocumentFormattingProvider.set(rn.g.has(t)||rn.j.has(t)),e._hasDocumentSelectionFormattingProvider.set(rn.j.has(t)),e._hasMultipleDocumentFormattingProvider.set(rn.g.all(t).length+rn.j.all(t).length>1),e._hasMultipleDocumentSelectionFormattingProvider.set(rn.j.all(t).length>1),e._isInWalkThrough.set(t.uri.scheme===l.b.walkThroughSnippet)})):this.reset()},t}(u.a),xo=function(e){function t(t){var n=e.call(this)||this;return n._onChange=n._register(new a.a),n.onChange=n._onChange.event,n._hasFocus=!1,n._domFocusTracker=n._register(r.Z(t)),n._register(n._domFocusTracker.onDidFocus((function(){n._hasFocus=!0,n._onChange.fire(void 0)}))),n._register(n._domFocusTracker.onDidBlur((function(){n._hasFocus=!1,n._onChange.fire(void 0)}))),n}return _o(t,e),t.prototype.hasFocus=function(){return this._hasFocus},t}(u.a),No=encodeURIComponent("");function Eo(e){return No+encodeURIComponent(e.toString())+ko}var Io=encodeURIComponent('');Object(U.e)((function(e,t){var n=e.getColor(an.p);n&&t.addRule(".monaco-editor .squiggly-error { border-bottom: 4px double "+n+"; }");var i=e.getColor(an.q);i&&t.addRule('.monaco-editor .squiggly-error { background: url("data:image/svg+xml,'+Eo(i)+'") repeat-x bottom left; }');var o=e.getColor(an.O);o&&t.addRule(".monaco-editor .squiggly-warning { border-bottom: 4px double "+o+"; }");var r=e.getColor(an.P);r&&t.addRule('.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,'+Eo(r)+'") repeat-x bottom left; }');var s=e.getColor(an.G);s&&t.addRule(".monaco-editor .squiggly-info { border-bottom: 4px double "+s+"; }");var a=e.getColor(an.H);a&&t.addRule('.monaco-editor .squiggly-info { background: url("data:image/svg+xml,'+Eo(a)+'") repeat-x bottom left; }');var u=e.getColor(an.y);u&&t.addRule(".monaco-editor .squiggly-hint { border-bottom: 2px dotted "+u+"; }");var l=e.getColor(an.z);l&&t.addRule('.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,'+(Io+encodeURIComponent(l.toString())+Mo+'") no-repeat bottom left; }'));var c=e.getColor(Fe.o);c&&t.addRule(".monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: "+c.rgba.a+"; }");var d=e.getColor(Fe.n);d&&t.addRule(".monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed "+d+"; }");var h=e.getColor(an.x)||"inherit";t.addRule(".monaco-editor .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: "+h+"}")}))},nD70: /*!**********************************************************************!*\ @@ -2289,9 +2289,9 @@ /*! 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.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/textModelSearch.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/wordHighlighter/wordHighlighter.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/wordHighlighter/wordHighlighter.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.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/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/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/contextkey/common/contextkey.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2299,7 +2299,7 @@ /*! 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 */ -/*! 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/gotoSymbol/goToCommands.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/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/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,"getSelectionSearchString",(function(){return vt})),n.d(t,"CommonFindController",(function(){return _t})),n.d(t,"FindController",(function(){return bt})),n.d(t,"StartFindAction",(function(){return yt})),n.d(t,"StartFindWithSelectionAction",(function(){return Ct})),n.d(t,"MatchFindAction",(function(){return wt})),n.d(t,"NextMatchFindAction",(function(){return St})),n.d(t,"NextMatchFindAction2",(function(){return Ot})),n.d(t,"PreviousMatchFindAction",(function(){return Lt})),n.d(t,"PreviousMatchFindAction2",(function(){return Dt})),n.d(t,"SelectionMatchFindAction",(function(){return xt})),n.d(t,"NextSelectionMatchFindAction",(function(){return Nt})),n.d(t,"PreviousSelectionMatchFindAction",(function(){return kt})),n.d(t,"StartFindReplaceAction",(function(){return Et}));var i=n("3/fG"),o=n("X+cX"),r=n("pmY6"),s=n("N0LK"),a=n("sswD"),u=n("wQH0"),l=n("LCkn"),c=n("cGHE"),d=n("aokT"),h=n("gCVg"),p=n("jAJ/"),f=n("M1Kb"),g=n("tX9W"),m=n("MD5Z"),v=n("t9D7"),_=function(){function e(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationId=null,this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}return e.prototype.dispose=function(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationId=null,this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null},e.prototype.reset=function(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationId=null,this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null},e.prototype.getCount=function(){return this._decorations.length},e.prototype.getFindScope=function(){return this._findScopeDecorationId?this._editor.getModel().getDecorationRange(this._findScopeDecorationId):null},e.prototype.getStartPosition=function(){return this._startPosition},e.prototype.setStartPosition=function(e){this._startPosition=e,this.setCurrentFindMatch(null)},e.prototype._getDecorationIndex=function(e){var t=this._decorations.indexOf(e);return t>=0?t+1:1},e.prototype.getCurrentMatchesPosition=function(t){for(var n=0,i=this._editor.getModel().getDecorationsInRange(t);n1e3){r=e._FIND_MATCH_NO_OVERVIEW_DECORATION;for(var a=i._editor.getModel().getLineCount(),u=i._editor.getLayoutInfo().height/a,l=Math.max(2,Math.ceil(3/u)),c=t[0].range.startLineNumber,h=t[0].range.endLineNumber,p=1,f=t.length;p=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(s.push({range:new d.a(c,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),c=g.startLineNumber,h=g.endLineNumber)}s.push({range:new d.a(c,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}var m=new Array(t.length);for(p=0,f=t.length;p=0;t--){var n=this._decorations[t],i=this._editor.getModel().getDecorationRange(n);if(i&&!(i.endLineNumber>e.lineNumber)){if(i.endLineNumbere.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])},e.prototype.matchAfterPosition=function(e){if(0===this._decorations.length)return null;for(var t=0,n=this._decorations.length;te.lineNumber)return o;if(!(o.startColumn0){for(var n=[],i=0;i0;){if(e0},e.prototype._cannotFind=function(){if(!this._hasMatches()){var e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1},e.prototype._setCurrentFindMatch=function(e){var t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)},e.prototype._prevSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,i=e.column,o=this._editor.getModel();return t||1===i?(1===n?n=o.getLineCount():n--,i=o.getLineMaxColumn(n)):i--,new c.a(n,i)},e.prototype._moveToPrevMatch=function(t,n){if(void 0===n&&(n=!1),this._decorations.getCount()<19999){var i=this._decorations.matchBeforePosition(t);return i&&i.isEmpty()&&i.getStartPosition().equals(t)&&(t=this._prevSearchPosition(t),i=this._decorations.matchBeforePosition(t)),void(i&&this._setCurrentFindMatch(i))}if(!this._cannotFind()){var o=this._decorations.getFindScope(),r=e._getSearchRange(this._editor.getModel(),o);r.getEndPosition().isBefore(t)&&(t=r.getEndPosition()),t.isBefore(r.getStartPosition())&&(t=r.getEndPosition());var s=t.lineNumber,a=t.column,u=this._editor.getModel(),l=new c.a(s,a),d=u.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(96):null,!1);if(d&&d.range.isEmpty()&&d.range.getStartPosition().equals(l)&&(l=this._prevSearchPosition(l),d=u.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(96):null,!1)),d)return n||r.containsRange(d.range)?void this._setCurrentFindMatch(d.range):this._moveToPrevMatch(d.range.getStartPosition(),!0)}},e.prototype.moveToPrevMatch=function(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())},e.prototype._nextSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,i=e.column,o=this._editor.getModel();return t||i===o.getLineMaxColumn(n)?(n===o.getLineCount()?n=1:n++,i=1):i++,new c.a(n,i)},e.prototype._moveToNextMatch=function(e){if(this._decorations.getCount()<19999){var t=this._decorations.matchAfterPosition(e);return t&&t.isEmpty()&&t.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),t=this._decorations.matchAfterPosition(e)),void(t&&this._setCurrentFindMatch(t))}var n=this._getNextMatch(e,!1,!0);n&&this._setCurrentFindMatch(n.range)},e.prototype._getNextMatch=function(t,n,i,o){if(void 0===o&&(o=!1),this._cannotFind())return null;var r=this._decorations.getFindScope(),s=e._getSearchRange(this._editor.getModel(),r);s.getEndPosition().isBefore(t)&&(t=s.getStartPosition()),t.isBefore(s.getStartPosition())&&(t=s.getStartPosition());var a=t.lineNumber,u=t.column,l=this._editor.getModel(),d=new c.a(a,u),h=l.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(96):null,n);return i&&h&&h.range.isEmpty()&&h.range.getStartPosition().equals(d)&&(d=this._nextSearchPosition(d),h=l.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(96):null,n)),h?o||s.containsRange(h.range)?h:this._getNextMatch(h.range.getEndPosition(),n,i,!0):null},e.prototype.moveToNextMatch=function(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())},e.prototype._getReplacePattern=function(){return this._state.isRegex?function(e){if(!e||0===e.length)return new L(null);for(var t=new x(e),n=0,i=e.length;n=i)break;if(36===(a=e.charCodeAt(n))){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(48===a||38===a){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1);continue}if(49<=a&&a<=57){var r=a-48;if(n+1=i)break;var a;switch(a=e.charCodeAt(n)){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic("\n",n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic("\t",n+1)}}}return t.finalize()}(this._state.replaceString):L.fromStaticValue(this._state.replaceString)},e.prototype.replace=function(){if(this._hasMatches()){var e=this._getReplacePattern(),t=this._editor.getSelection(),n=this._getNextMatch(t.getStartPosition(),!0,!1);if(n)if(t.equalsRange(n.range)){var i=e.buildReplaceString(n.matches,this._state.preserveCase),o=new l.a(t,i);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new c.a(t.startLineNumber,t.startColumn+i.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}},e.prototype._findMatches=function(t,n,i){var o=e._getSearchRange(this._editor.getModel(),t);return this._editor.getModel().findMatches(this._state.searchString,o,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(96):null,n,i)},e.prototype.replaceAll=function(){if(this._hasMatches()){var e=this._decorations.getFindScope();null===e&&this._state.matchesCount>=19999?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}},e.prototype._largeReplaceAll=function(){var e=new p.a(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(96):null).parseSearchRequest();if(e){var t=e.regex;if(!t.multiline){var n="mu";t.ignoreCase&&(n+="i"),t.global&&(n+="g"),t=new RegExp(t.source,n)}var i,o=this._editor.getModel(),r=o.getValue(1),s=o.getFullModelRange(),a=this._getReplacePattern(),u=this._state.preserveCase;i=a.hasReplacementPatterns||u?r.replace(t,(function(){return a.buildReplaceString(arguments,u)})):r.replace(t,a.buildReplaceString(null,u));var c=new l.b(s,i,this._editor.getSelection());this._executeEditorCommand("replaceAll",c)}},e.prototype._regularReplaceAll=function(e){for(var t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),i=[],o=0,r=n.length;ot&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,i.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,i.matchesCount=!0,o=!0),void 0!==n&&(d.a.equalsRange(this._currentMatch,n)||(this._currentMatch=n,i.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(i)},t.prototype.change=function(e,t,n){void 0===n&&(n=!0);var i={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},o=!1,r=this.isRegex,s=this.wholeWord,a=this.matchCase,u=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,i.searchString=!0,o=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,i.replaceString=!0,o=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,i.isRevealed=!0,o=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,i.isReplaceRevealed=!0,o=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&(d.a.equalsRange(this._searchScope,e.searchScope)||(this._searchScope=e.searchScope,i.searchScope=!0,o=!0)),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,r!==this.isRegex&&(o=!0,i.isRegex=!0),s!==this.wholeWord&&(o=!0,i.wholeWord=!0),a!==this.matchCase&&(o=!0,i.matchCase=!0),u!==this.preserveCase&&(o=!0,i.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(i)},t}(r.a),be=(n("AbCa"),n("OBOq")),ye=n("cMOf"),Ce=n("/cxE"),we=n("MNsG"),Se=(n("yqFB"),n("0+8E")),Oe=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)}}(),Le=i.a("defaultLabel","input"),De=function(e){function t(t,n,i,o){var r=e.call(this)||this;r._showOptionButtons=i,r.fixFocusOnOptionClickEnabled=!0,r._onDidOptionChange=r._register(new ne.a),r.onDidOptionChange=r._onDidOptionChange.event,r._onKeyDown=r._register(new ne.a),r.onKeyDown=r._onKeyDown.event,r._onMouseDown=r._register(new ne.a),r.onMouseDown=r._onMouseDown.event,r._onInput=r._register(new ne.a),r._onKeyUp=r._register(new ne.a),r._onCaseSensitiveKeyDown=r._register(new ne.a),r.onCaseSensitiveKeyDown=r._onCaseSensitiveKeyDown.event,r._onRegexKeyDown=r._register(new ne.a),r.onRegexKeyDown=r._onRegexKeyDown.event,r._lastHighlightFindOptions=0,r.contextViewProvider=n,r.placeholder=o.placeholder||"",r.validation=o.validation,r.label=o.label||Le,r.inputActiveOptionBorder=o.inputActiveOptionBorder,r.inputActiveOptionBackground=o.inputActiveOptionBackground,r.inputBackground=o.inputBackground,r.inputForeground=o.inputForeground,r.inputBorder=o.inputBorder,r.inputValidationInfoBorder=o.inputValidationInfoBorder,r.inputValidationInfoBackground=o.inputValidationInfoBackground,r.inputValidationInfoForeground=o.inputValidationInfoForeground,r.inputValidationWarningBorder=o.inputValidationWarningBorder,r.inputValidationWarningBackground=o.inputValidationWarningBackground,r.inputValidationWarningForeground=o.inputValidationWarningForeground,r.inputValidationErrorBorder=o.inputValidationErrorBorder,r.inputValidationErrorBackground=o.inputValidationErrorBackground,r.inputValidationErrorForeground=o.inputValidationErrorForeground;var s=o.appendCaseSensitiveLabel||"",a=o.appendWholeWordsLabel||"",u=o.appendRegexLabel||"",l=o.history||[],c=!!o.flexibleHeight,d=!!o.flexibleWidth,h=o.flexibleMaxHeight;r.domNode=document.createElement("div"),$.f(r.domNode,"monaco-findInput"),r.inputBox=r._register(new Se.a(r.domNode,r.contextViewProvider,{placeholder:r.placeholder||"",ariaLabel:r.label||"",validationOptions:{validation:r.validation},inputBackground:r.inputBackground,inputForeground:r.inputForeground,inputBorder:r.inputBorder,inputValidationInfoBackground:r.inputValidationInfoBackground,inputValidationInfoForeground:r.inputValidationInfoForeground,inputValidationInfoBorder:r.inputValidationInfoBorder,inputValidationWarningBackground:r.inputValidationWarningBackground,inputValidationWarningForeground:r.inputValidationWarningForeground,inputValidationWarningBorder:r.inputValidationWarningBorder,inputValidationErrorBackground:r.inputValidationErrorBackground,inputValidationErrorForeground:r.inputValidationErrorForeground,inputValidationErrorBorder:r.inputValidationErrorBorder,history:l,flexibleHeight:c,flexibleWidth:d,flexibleMaxHeight:h})),r.regex=r._register(new pe({appendTitle:u,isChecked:!1,inputActiveOptionBorder:r.inputActiveOptionBorder,inputActiveOptionBackground:r.inputActiveOptionBackground})),r._register(r.regex.onChange((function(e){r._onDidOptionChange.fire(e),!e&&r.fixFocusOnOptionClickEnabled&&r.inputBox.focus(),r.validate()}))),r._register(r.regex.onKeyDown((function(e){r._onRegexKeyDown.fire(e)}))),r.wholeWords=r._register(new he({appendTitle:a,isChecked:!1,inputActiveOptionBorder:r.inputActiveOptionBorder,inputActiveOptionBackground:r.inputActiveOptionBackground})),r._register(r.wholeWords.onChange((function(e){r._onDidOptionChange.fire(e),!e&&r.fixFocusOnOptionClickEnabled&&r.inputBox.focus(),r.validate()}))),r.caseSensitive=r._register(new de({appendTitle:s,isChecked:!1,inputActiveOptionBorder:r.inputActiveOptionBorder,inputActiveOptionBackground:r.inputActiveOptionBackground})),r._register(r.caseSensitive.onChange((function(e){r._onDidOptionChange.fire(e),!e&&r.fixFocusOnOptionClickEnabled&&r.inputBox.focus(),r.validate()}))),r._register(r.caseSensitive.onKeyDown((function(e){r._onCaseSensitiveKeyDown.fire(e)}))),r._showOptionButtons&&(r.inputBox.paddingRight=r.caseSensitive.width()+r.wholeWords.width()+r.regex.width());var p=[r.caseSensitive.domNode,r.wholeWords.domNode,r.regex.domNode];r.onkeydown(r.domNode,(function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=p.indexOf(document.activeElement);if(t>=0){var n=-1;e.equals(17)?n=(t+1)%p.length:e.equals(15)&&(n=0===t?p.length-1:t-1),e.equals(9)?p[t].blur():n>=0&&p[n].focus(),$.c.stop(e,!0)}}}));var f=document.createElement("div");return f.className="controls",f.style.display=r._showOptionButtons?"block":"none",f.appendChild(r.caseSensitive.domNode),f.appendChild(r.wholeWords.domNode),f.appendChild(r.regex.domNode),r.domNode.appendChild(f),t&&t.appendChild(r.domNode),r.onkeydown(r.inputBox.inputElement,(function(e){return r._onKeyDown.fire(e)})),r.onkeyup(r.inputBox.inputElement,(function(e){return r._onKeyUp.fire(e)})),r.oninput(r.inputBox.inputElement,(function(e){return r._onInput.fire()})),r.onmousedown(r.inputBox.inputElement,(function(e){return r._onMouseDown.fire(e)})),r}return Oe(t,e),t.prototype.enable=function(){$.P(this.domNode,"disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()},t.prototype.disable=function(){$.f(this.domNode,"disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()},t.prototype.setFocusInputOnOptionClick=function(e){this.fixFocusOnOptionClickEnabled=e},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},t.prototype.getValue=function(){return this.inputBox.value},t.prototype.setValue=function(e){this.inputBox.value!==e&&(this.inputBox.value=e)},t.prototype.style=function(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()},t.prototype.applyStyles=function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);var t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}},t.prototype.select=function(){this.inputBox.select()},t.prototype.focus=function(){this.inputBox.focus()},t.prototype.getCaseSensitive=function(){return this.caseSensitive.checked},t.prototype.setCaseSensitive=function(e){this.caseSensitive.checked=e},t.prototype.getWholeWords=function(){return this.wholeWords.checked},t.prototype.setWholeWords=function(e){this.wholeWords.checked=e},t.prototype.getRegex=function(){return this.regex.checked},t.prototype.setRegex=function(e){this.regex.checked=e,this.validate()},t.prototype.focusOnCaseSensitive=function(){this.caseSensitive.focus()},t.prototype.highlightFindOptions=function(){$.P(this.domNode,"highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,$.f(this.domNode,"highlight-"+this._lastHighlightFindOptions)},t.prototype.validate=function(){this.inputBox.validate()},t.prototype.clearMessage=function(){this.inputBox.hideMessage()},t}(ee.a),xe=n("nrhi"),Ne=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)}}(),ke=i.a("defaultLabel","input"),Ee=i.a("label.preserveCaseCheckbox","Preserve Case"),Ie=function(e){function t(t){return e.call(this,{actionClassName:"codicon-preserve-case",title:Ee+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder,inputActiveOptionBackground:t.inputActiveOptionBackground})||this}return Ne(t,e),t}(se),Me=function(e){function t(t,n,i,o){var r=e.call(this)||this;r._showOptionButtons=i,r.fixFocusOnOptionClickEnabled=!0,r.cachedOptionsWidth=0,r._onDidOptionChange=r._register(new ne.a),r.onDidOptionChange=r._onDidOptionChange.event,r._onKeyDown=r._register(new ne.a),r.onKeyDown=r._onKeyDown.event,r._onMouseDown=r._register(new ne.a),r._onInput=r._register(new ne.a),r._onKeyUp=r._register(new ne.a),r._onPreserveCaseKeyDown=r._register(new ne.a),r.onPreserveCaseKeyDown=r._onPreserveCaseKeyDown.event,r.contextViewProvider=n,r.placeholder=o.placeholder||"",r.validation=o.validation,r.label=o.label||ke,r.inputActiveOptionBorder=o.inputActiveOptionBorder,r.inputActiveOptionBackground=o.inputActiveOptionBackground,r.inputBackground=o.inputBackground,r.inputForeground=o.inputForeground,r.inputBorder=o.inputBorder,r.inputValidationInfoBorder=o.inputValidationInfoBorder,r.inputValidationInfoBackground=o.inputValidationInfoBackground,r.inputValidationInfoForeground=o.inputValidationInfoForeground,r.inputValidationWarningBorder=o.inputValidationWarningBorder,r.inputValidationWarningBackground=o.inputValidationWarningBackground,r.inputValidationWarningForeground=o.inputValidationWarningForeground,r.inputValidationErrorBorder=o.inputValidationErrorBorder,r.inputValidationErrorBackground=o.inputValidationErrorBackground,r.inputValidationErrorForeground=o.inputValidationErrorForeground;var s=o.history||[],a=!!o.flexibleHeight,u=!!o.flexibleWidth,l=o.flexibleMaxHeight;r.domNode=document.createElement("div"),$.f(r.domNode,"monaco-findInput"),r.inputBox=r._register(new Se.a(r.domNode,r.contextViewProvider,{ariaLabel:r.label||"",placeholder:r.placeholder||"",validationOptions:{validation:r.validation},inputBackground:r.inputBackground,inputForeground:r.inputForeground,inputBorder:r.inputBorder,inputValidationInfoBackground:r.inputValidationInfoBackground,inputValidationInfoForeground:r.inputValidationInfoForeground,inputValidationInfoBorder:r.inputValidationInfoBorder,inputValidationWarningBackground:r.inputValidationWarningBackground,inputValidationWarningForeground:r.inputValidationWarningForeground,inputValidationWarningBorder:r.inputValidationWarningBorder,inputValidationErrorBackground:r.inputValidationErrorBackground,inputValidationErrorForeground:r.inputValidationErrorForeground,inputValidationErrorBorder:r.inputValidationErrorBorder,history:s,flexibleHeight:a,flexibleWidth:u,flexibleMaxHeight:l})),r.preserveCase=r._register(new Ie({appendTitle:"",isChecked:!1,inputActiveOptionBorder:r.inputActiveOptionBorder,inputActiveOptionBackground:r.inputActiveOptionBackground})),r._register(r.preserveCase.onChange((function(e){r._onDidOptionChange.fire(e),!e&&r.fixFocusOnOptionClickEnabled&&r.inputBox.focus(),r.validate()}))),r._register(r.preserveCase.onKeyDown((function(e){r._onPreserveCaseKeyDown.fire(e)}))),r._showOptionButtons?r.cachedOptionsWidth=r.preserveCase.width():r.cachedOptionsWidth=0;var c=[r.preserveCase.domNode];r.onkeydown(r.domNode,(function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=c.indexOf(document.activeElement);if(t>=0){var n=-1;e.equals(17)?n=(t+1)%c.length:e.equals(15)&&(n=0===t?c.length-1:t-1),e.equals(9)?c[t].blur():n>=0&&c[n].focus(),$.c.stop(e,!0)}}}));var d=document.createElement("div");return d.className="controls",d.style.display=r._showOptionButtons?"block":"none",d.appendChild(r.preserveCase.domNode),r.domNode.appendChild(d),t&&t.appendChild(r.domNode),r.onkeydown(r.inputBox.inputElement,(function(e){return r._onKeyDown.fire(e)})),r.onkeyup(r.inputBox.inputElement,(function(e){return r._onKeyUp.fire(e)})),r.oninput(r.inputBox.inputElement,(function(e){return r._onInput.fire()})),r.onmousedown(r.inputBox.inputElement,(function(e){return r._onMouseDown.fire(e)})),r}return Ne(t,e),t.prototype.enable=function(){$.P(this.domNode,"disabled"),this.inputBox.enable(),this.preserveCase.enable()},t.prototype.disable=function(){$.f(this.domNode,"disabled"),this.inputBox.disable(),this.preserveCase.disable()},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},t.prototype.style=function(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()},t.prototype.applyStyles=function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);var t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}},t.prototype.select=function(){this.inputBox.select()},t.prototype.focus=function(){this.inputBox.focus()},t.prototype.getPreserveCase=function(){return this.preserveCase.checked},t.prototype.setPreserveCase=function(e){this.preserveCase.checked=e},t.prototype.focusOnPreserve=function(){this.preserveCase.focus()},t.prototype.validate=function(){this.inputBox&&this.inputBox.validate()},Object.defineProperty(t.prototype,"width",{set:function(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t}(ee.a),Te=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)}}(),Pe=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},Re=function(e,t){return function(n,i){t(n,i,e)}};function Ae(e,t){return e.getContext(document.activeElement).getValue(t)}function Fe(e,t){var n=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,n){new k.d(n,t).bindTo(e)}(n,t,"historyNavigationWidget"),{scopedContextKeyService:n,historyNavigationEnablement:new k.d("historyNavigationEnabled",!0).bindTo(n)}}var je=function(e){function t(t,n,i,o,r){void 0===r&&(r=!1);var s=e.call(this,t,n,r,i)||this;return s._register(Fe(o,{target:s.inputBox.element,historyNavigator:s.inputBox}).scopedContextKeyService),s}return Te(t,e),t=Pe([Re(3,k.c)],t)}(De),We=function(e){function t(t,n,i,o,r){void 0===r&&(r=!1);var s=e.call(this,t,n,r,i)||this;return s._register(Fe(o,{target:s.inputBox.element,historyNavigator:s.inputBox}).scopedContextKeyService),s}return Te(t,e),t=Pe([Re(3,k.c)],t)}(Me);xe.a.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:k.a.and(k.a.has("historyNavigationWidget"),k.a.equals("historyNavigationEnabled",!0)),primary:16,secondary:[528],handler:function(e,t){var n=Ae(e.get(k.c),"historyNavigationWidget");n&&n.historyNavigator.showPreviousValue()}}),xe.a.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:k.a.and(k.a.has("historyNavigationWidget"),k.a.equals("historyNavigationEnabled",!0)),primary:18,secondary:[530],handler:function(e,t){var n=Ae(e.get(k.c),"historyNavigationWidget");n&&n.historyNavigator.showNextValue()}});var Ve=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)}}(),Be=i.a("label.find","Find"),He=i.a("placeholder.find","Find"),ze=i.a("label.previousMatchButton","Previous match"),Ue=i.a("label.nextMatchButton","Next match"),Ke=i.a("label.toggleSelectionFind","Find in selection"),qe=i.a("label.closeButton","Close"),Ge=i.a("label.replace","Replace"),Ye=i.a("placeholder.replace","Replace"),Ze=i.a("label.replaceButton","Replace"),Xe=i.a("label.replaceAllButton","Replace All"),Qe=i.a("label.toggleReplaceButton","Toggle Replace mode"),Je=i.a("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",19999),$e=i.a("label.matchesLocation","{0} of {1}"),et=i.a("label.noResults","No Results"),tt=69,nt=we.e?256:2048,it=function(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"};function ot(e,t,n){var i=!!t.match(/\n/);n&&i&&n.selectionStart>0&&e.stopPropagation()}function rt(e,t,n){var i=!!t.match(/\n/);n&&i&&n.selectionEnd0&&0===this._state.matchesCount;$.Y(this._domNode,"no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory()},t.prototype._delayedUpdateHistory=function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))},t.prototype._updateHistory=function(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()},t.prototype._updateMatchesCount=function(){var e;if(this._matchesCount.style.minWidth=tt+"px",this._state.matchesCount>=19999?this._matchesCount.title=Je:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){var t=String(this._state.matchesCount);this._state.matchesCount>=19999&&(t+="+");var n=String(this._state.matchesPosition);"0"===n&&(n="?"),e=s.r($e,n,t)}else e=et;this._matchesCount.appendChild(document.createTextNode(e)),Object(be.a)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString),!0),tt=Math.max(tt,this._matchesCount.clientWidth)},t.prototype._getAriaLabel=function(e,t,n){return e===et?""===n?i.a("ariaSearchNoResultEmpty","{0} found",e):i.a("ariaSearchNoResult","{0} found for {1}",e,n):t?i.a("ariaSearchNoResultWithLineNum","{0} found for {1} at {2}",e,n,t.startLineNumber+":"+t.startColumn):i.a("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for {1}",e,n)},t.prototype._updateToggleSelectionFindButton=function(){var e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()},t.prototype._updateButtons=function(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);var e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t),this._nextBtn.setEnabled(this._isVisible&&e&&t),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),$.Y(this._domNode,"replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("codicon-chevron-right",!this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("codicon-chevron-down",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);var n=!this._codeEditor.getOption(68);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)},t.prototype._reveal=function(){var e=this;if(!this._isVisible){this._isVisible=!0;var t=this._codeEditor.getSelection();switch(this._codeEditor.getOption(28).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":var n=!!t&&t.startLineNumber!==t.endLineNumber;this._toggleSelectionFind.checked=n}this._tryUpdateWidgetWidth(),this._updateButtons(),setTimeout((function(){$.f(e._domNode,"visible"),e._domNode.setAttribute("aria-hidden","false")}),0),setTimeout((function(){e._findInput.validate()}),200),this._codeEditor.layoutOverlayWidget(this);var i=!0;if(this._codeEditor.getOption(28).seedSearchStringFromSelection&&t){var o=this._codeEditor.getDomNode();if(o){var r=$.C(o),s=this._codeEditor.getScrolledVisiblePosition(t.getStartPosition()),a=r.left+(s?s.left:0),u=s?s.top:0;if(this._viewZone&&ut.startLineNumber&&(i=!1);var l=$.F(this._domNode).left;a>l&&(i=!1);var c=this._codeEditor.getScrolledVisiblePosition(t.getEndPosition());r.left+(c?c.left:0)>l&&(i=!1)}}}this._showViewZone(i)}},t.prototype._hide=function(e){this._isVisible&&(this._isVisible=!1,this._updateButtons(),$.P(this._domNode,"visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())},t.prototype._layoutViewZone=function(){var e=this;if(this._codeEditor.getOption(28).addExtraSpaceOnTop){if(this._isVisible){var t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((function(n){t.heightInPx=e._getHeight(),e._viewZoneId=n.addZone(t),e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+t.heightInPx)}))}}else this._removeViewZone()},t.prototype._showViewZone=function(e){var t=this;if((void 0===e&&(e=!0),this._isVisible)&&this._codeEditor.getOption(28).addExtraSpaceOnTop){void 0===this._viewZone&&(this._viewZone=new it(0));var n=this._viewZone;this._codeEditor.changeViewZones((function(i){if(void 0!==t._viewZoneId){var o=t._getHeight();if(o===n.heightInPx)return;var r=o-n.heightInPx;return n.heightInPx=o,i.layoutZone(t._viewZoneId),void(e&&t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()+r))}r=t._getHeight();n.heightInPx=r,t._viewZoneId=i.addZone(n),e&&t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()+r)}))}},t.prototype._removeViewZone=function(){var e=this;this._codeEditor.changeViewZones((function(t){void 0!==e._viewZoneId&&(t.removeZone(e._viewZoneId),e._viewZoneId=void 0,e._viewZone&&(e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()-e._viewZone.heightInPx),e._viewZone=void 0))}))},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(m.Y),inputActiveOptionBackground:e.getColor(m.X),inputBackground:e.getColor(m.Z),inputForeground:e.getColor(m.bb),inputBorder:e.getColor(m.ab),inputValidationInfoBackground:e.getColor(m.fb),inputValidationInfoForeground:e.getColor(m.hb),inputValidationInfoBorder:e.getColor(m.gb),inputValidationWarningBackground:e.getColor(m.ib),inputValidationWarningForeground:e.getColor(m.kb),inputValidationWarningBorder:e.getColor(m.jb),inputValidationErrorBackground:e.getColor(m.cb),inputValidationErrorForeground:e.getColor(m.eb),inputValidationErrorBorder:e.getColor(m.db)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)},t.prototype._tryUpdateWidgetWidth=function(){if(this._isVisible&&$.M(this._domNode)){var e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)$.f(this._domNode,"hiddenEditor");else{$.I(this._domNode,"hiddenEditor")&&$.P(this._domNode,"hiddenEditor");var t=e.width,n=e.minimapWidth,i=!1,o=!1,r=!1;if(this._resized)if($.H(this._domNode)>419)return this._domNode.style.maxWidth=t-28-n-15+"px",void(this._replaceInput.width=$.H(this._findInput.domNode));if(447+n>=t&&(o=!0),447+n-tt>=t&&(r=!0),447+n-tt>=t+50&&(i=!0),$.Y(this._domNode,"collapsed-find-widget",i),$.Y(this._domNode,"narrow-find-widget",r),$.Y(this._domNode,"reduced-find-widget",o),r||i||(this._domNode.style.maxWidth=t-28-n-15+"px"),this._resized){this._findInput.inputBox.layout();var s=this._findInput.inputBox.element.clientWidth;s>0&&(this._replaceInput.width=s)}else this._isReplaceVisible&&(this._replaceInput.width=$.H(this._findInput.domNode))}}},t.prototype._getHeight=function(){var e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4},t.prototype._tryUpdateHeight=function(){var e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=e+"px",!0)},t.prototype.focusFindInput=function(){this._findInput.select(),this._findInput.focus()},t.prototype.focusReplaceInput=function(){this._replaceInput.select(),this._replaceInput.focus()},t.prototype.highlightFindOptions=function(){this._findInput.highlightFindOptions()},t.prototype._updateSearchScope=function(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){var e=this._codeEditor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));var t=this._state.currentMatch;e.startLineNumber!==e.endLineNumber&&(d.a.equalsRange(e,t)||this._state.change({searchScope:e},!0))}},t.prototype._onFindInputMouseDown=function(e){e.middleButton&&e.stopPropagation()},t.prototype._onFindInputKeyDown=function(e){return e.equals(3|nt)?(this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?ot(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?rt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0},t.prototype._onReplaceInputKeyDown=function(e){return e.equals(3|nt)?(we.h&&we.f&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(i.a("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store("ctrlEnterReplaceAll.windows.donotask",!0,0)),this._replaceInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?ot(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?rt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0},t.prototype.getHorizontalSashTop=function(e){return 0},t.prototype.getHorizontalSashLeft=function(e){return 0},t.prototype.getHorizontalSashWidth=function(e){return 500},t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype._buildDomNode=function(){var e=this;this._findInput=this._register(new je(null,this._contextViewProvider,{width:221,label:Be,placeholder:He,appendCaseSensitiveLabel:this._keybindingLabelFor(K),appendWholeWordsLabel:this._keybindingLabelFor(q),appendRegexLabel:this._keybindingLabelFor(G),validation:function(t){if(0===t.length||!e._findInput.getRegex())return null;try{return new RegExp(t),null}catch(e){return{content:e.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((function(t){return e._onFindInputKeyDown(t)}))),this._register(this._findInput.inputBox.onDidChange((function(){e._ignoreChangeEvent||e._state.change({searchString:e._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((function(){e._state.change({isRegex:e._findInput.getRegex(),wholeWord:e._findInput.getWholeWords(),matchCase:e._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((function(t){t.equals(1026)&&e._isReplaceVisible&&(e._replaceInput.focus(),t.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceInput.focusOnPreserve(),t.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((function(t){e._tryUpdateHeight()&&e._showViewZone()}))),we.d&&this._register(this._findInput.onMouseDown((function(t){return e._onFindInputMouseDown(t)}))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new at({label:ze+this._keybindingLabelFor(V),className:"codicon codicon-arrow-up",onTrigger:function(){e._codeEditor.getAction(V).run().then(void 0,Ce.e)}})),this._nextBtn=this._register(new at({label:Ue+this._keybindingLabelFor(W),className:"codicon codicon-arrow-down",onTrigger:function(){e._codeEditor.getAction(W).run().then(void 0,Ce.e)}}));var t=document.createElement("div");t.className="find-part",t.appendChild(this._findInput.domNode);var n=document.createElement("div");n.className="find-actions",t.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new se({actionClassName:"codicon codicon-selection",title:Ke+this._keybindingLabelFor(Y),isChecked:!1})),this._register(this._toggleSelectionFind.onChange((function(){if(e._toggleSelectionFind.checked){if(e._codeEditor.hasModel()){var t=e._codeEditor.getSelection();1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,e._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()||e._state.change({searchScope:t},!0)}}else e._state.change({searchScope:null},!0)}))),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new at({label:qe+this._keybindingLabelFor(U),className:"codicon codicon-close",onTrigger:function(){e._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceBtn.isEnabled()?e._replaceBtn.focus():e._codeEditor.focus(),t.preventDefault())}})),n.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new We(null,void 0,{label:Ge,placeholder:Ye,history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((function(t){return e._onReplaceInputKeyDown(t)}))),this._register(this._replaceInput.inputBox.onDidChange((function(){e._state.change({replaceString:e._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((function(t){e._isReplaceVisible&&e._tryUpdateHeight()&&e._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((function(){e._state.change({preserveCase:e._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((function(t){t.equals(2)&&(e._prevBtn.isEnabled()?e._prevBtn.focus():e._nextBtn.isEnabled()?e._nextBtn.focus():e._toggleSelectionFind.enabled?e._toggleSelectionFind.focus():e._closeBtn.isEnabled()&&e._closeBtn.focus(),t.preventDefault())}))),this._replaceBtn=this._register(new at({label:Ze+this._keybindingLabelFor(Z),className:"codicon codicon-replace",onTrigger:function(){e._controller.replace()},onKeyDown:function(t){t.equals(1026)&&(e._closeBtn.focus(),t.preventDefault())}})),this._replaceAllBtn=this._register(new at({label:Xe+this._keybindingLabelFor(X),className:"codicon codicon-replace-all",onTrigger:function(){e._controller.replaceAll()}}));var i=document.createElement("div");i.className="replace-part",i.appendChild(this._replaceInput.domNode);var o=document.createElement("div");o.className="replace-actions",i.appendChild(o),o.appendChild(this._replaceBtn.domNode),o.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new at({label:Qe,className:"codicon toggle left",onTrigger:function(){e._state.change({isReplaceRevealed:!e._isReplaceVisible},!1),e._isReplaceVisible&&(e._replaceInput.width=$.H(e._findInput.domNode),e._replaceInput.inputBox.layout()),e._showViewZone()}})),this._toggleReplaceBtn.toggleClass("codicon-chevron-down",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("codicon-chevron-right",!this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(i),this._resizeSash=new ye.a(this._domNode,this,{orientation:0}),this._resized=!1;var r=419;this._register(this._resizeSash.onDidStart((function(){r=$.H(e._domNode)}))),this._register(this._resizeSash.onDidChange((function(t){e._resized=!0;var n=r+t.startX-t.currentX;n<419||(n>(parseFloat($.z(e._domNode).maxWidth)||0)||(e._domNode.style.width=n+"px",e._isReplaceVisible&&(e._replaceInput.width=$.H(e._findInput.domNode)),e._findInput.inputBox.layout(),e._tryUpdateHeight()))}))),this._register(this._resizeSash.onDidReset((function(){var t=$.H(e._domNode);if(!(t<419)){var n=419;if(!e._resized||419===t){var i=e._codeEditor.getLayoutInfo();n=i.width-28-i.minimapWidth-15,e._resized=!0}e._domNode.style.width=n+"px",e._isReplaceVisible&&(e._replaceInput.width=$.H(e._findInput.domNode)),e._findInput.inputBox.layout()}})))},t.prototype.updateAccessibilitySupport=function(){var e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(2!==e)},t.ID="editor.contrib.findWidget",t}(ee.a),at=function(e){function t(t){var n=e.call(this)||this;return n._opts=t,n._domNode=document.createElement("div"),n._domNode.title=n._opts.label,n._domNode.tabIndex=0,n._domNode.className="button "+n._opts.className,n._domNode.setAttribute("role","button"),n._domNode.setAttribute("aria-label",n._opts.label),n.onclick(n._domNode,(function(e){n._opts.onTrigger(),e.preventDefault()})),n.onkeydown(n._domNode,(function(e){if(e.equals(10)||e.equals(3))return n._opts.onTrigger(),void e.preventDefault();n._opts.onKeyDown&&n._opts.onKeyDown(e)})),n}return Ve(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),t.prototype.isEnabled=function(){return this._domNode.tabIndex>=0},t.prototype.focus=function(){this._domNode.focus()},t.prototype.setEnabled=function(e){$.Y(this._domNode,"disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1},t.prototype.setExpanded=function(e){this._domNode.setAttribute("aria-expanded",String(!!e))},t.prototype.toggleClass=function(e,t){$.Y(this._domNode,e,t)},t}(ee.a);Object(v.e)((function(e,t){var n=function(e,n){n&&t.addRule(".monaco-editor "+e+" { background-color: "+n+"; }")};n(".findMatch",e.getColor(m.t)),n(".currentFindMatch",e.getColor(m.r)),n(".findScope",e.getColor(m.v)),n(".find-widget",e.getColor(m.Q));var i=e.getColor(m.hc);i&&t.addRule(".monaco-editor .find-widget { box-shadow: 0 2px 8px "+i+"; }");var o=e.getColor(m.u);o&&t.addRule(".monaco-editor .findMatch { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+o+"; box-sizing: border-box; }");var r=e.getColor(m.s);r&&t.addRule(".monaco-editor .currentFindMatch { border: 2px solid "+r+"; padding: 1px; box-sizing: border-box; }");var s=e.getColor(m.w);s&&t.addRule(".monaco-editor .findScope { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+s+"; }");var a=e.getColor(m.e);a&&t.addRule(".monaco-editor .find-widget { border: 1px solid "+a+"; }");var u=e.getColor(m.S);u&&t.addRule(".monaco-editor .find-widget { color: "+u+"; }");var l=e.getColor(m.U);l&&t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: "+l+"; }");var c=e.getColor(m.T);if(c)t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+c+"; width: 3px !important; margin-left: -4px;}");else{var d=e.getColor(m.R);d&&t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+d+"; width: 3px !important; margin-left: -4px;}")}var h=e.getColor(m.V);h&&t.addRule(".monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: "+h+"; }")}));var ut=n("9XeP"),lt=n("Uzvx"),ct=n("Cg/j"),dt=n("bexQ"),ht=n("A+jI"),pt=n("sM1p"),ft=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)}}(),gt=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},mt=function(e,t){return function(n,i){t(n,i,e)}};function vt(e){if(!e.hasModel())return null;var t=e.getSelection();if(t.startLineNumber===t.endLineNumber)if(t.isEmpty()){var n=e.getModel().getWordAtPosition(t.getStartPosition());if(n)return n.word}else if(e.getModel().getValueLengthInRange(t)<524288)return e.getModel().getValueInRange(t);return null}var _t=function(e){function t(t,n,i,r){var s=e.call(this)||this;return s._editor=t,s._findWidgetVisible=E.bindTo(n),s._contextKeyService=n,s._storageService=i,s._clipboardService=r,s._updateHistoryDelayer=new o.a(500),s._state=s._register(new _e),s.loadQueryState(),s._register(s._state.onFindReplaceStateChange((function(e){return s._onStateChanged(e)}))),s._model=null,s._register(s._editor.onDidChangeModel((function(){var e=s._editor.getModel()&&s._state.isRevealed;s.disposeModel(),s._state.change({searchScope:null,matchCase:s._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:s._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:s._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:s._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&s._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1})}))),s}return ft(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this.disposeModel(),e.prototype.dispose.call(this)},t.prototype.disposeModel=function(){this._model&&(this._model.dispose(),this._model=null)},t.prototype._onStateChanged=function(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)},t.prototype.saveQueryState=function(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1)},t.prototype.loadQueryState=function(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)},t.prototype.isFindInputFocused=function(){return!!I.getValue(this._contextKeyService)},t.prototype.getState=function(){return this._state},t.prototype.closeFindWidget=function(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()},t.prototype.toggleCaseSensitive=function(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()},t.prototype.toggleWholeWords=function(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()},t.prototype.toggleRegex=function(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()},t.prototype.toggleSearchScope=function(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){var e=this._editor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()||this._state.change({searchScope:e},!0)}},t.prototype.setSearchString=function(e){this._state.isRegex&&(e=s.p(e)),this._state.change({searchString:e},!1)},t.prototype.highlightFindOptions=function(){},t.prototype._start=function(e){if(this.disposeModel(),this._editor.hasModel()){var t,n={isRevealed:!0};if(e.seedSearchStringFromSelection)(t=vt(this._editor))&&(this._state.isRegex?n.searchString=s.p(t):n.searchString=t);if(!n.searchString&&e.seedSearchStringFromGlobalClipboard)(t=this.getGlobalBufferTerm())&&(n.searchString=t);if(e.forceRevealReplace?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){var i=this._editor.getSelection();i.isEmpty()||(n.searchScope=i)}this._state.change(n,!1),this._model||(this._model=new J(this._editor,this._state))}},t.prototype.start=function(e){this._start(e)},t.prototype.moveToNextMatch=function(){return!!this._model&&(this._model.moveToNextMatch(),!0)},t.prototype.moveToPrevMatch=function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)},t.prototype.replace=function(){return!!this._model&&(this._model.replace(),!0)},t.prototype.replaceAll=function(){return!!this._model&&(this._model.replaceAll(),!0)},t.prototype.selectAllMatches=function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)},t.prototype.getGlobalBufferTerm=function(){return this._editor.getOption(28).globalFindClipboard&&this._clipboardService&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""},t.prototype.setGlobalBufferTerm=function(e){this._editor.getOption(28).globalFindClipboard&&this._clipboardService&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)},t.ID="editor.contrib.findController",t=gt([mt(1,k.c),mt(2,ht.a),mt(3,ut.a)],t)}(r.a),bt=function(e){function t(t,n,i,o,r,s,a,u){var l=e.call(this,t,i,a,u)||this;return l._contextViewService=n,l._keybindingService=o,l._themeService=r,l._notificationService=s,l._widget=null,l._findOptionsWidget=null,l}return ft(t,e),t.prototype._start=function(t){this._widget||this._createFindWidget();var n=this._editor.getSelection(),i=!1;switch(this._editor.getOption(28).autoFindInSelection){case"always":i=!0;break;case"never":i=!1;break;case"multiline":i=!!n&&n.startLineNumber!==n.endLineNumber}t.updateSearchScope=i,e.prototype._start.call(this,t),2===t.shouldFocus?this._widget.focusReplaceInput():1===t.shouldFocus&&this._widget.focusFindInput()},t.prototype.highlightFindOptions=function(){this._widget||this._createFindWidget(),this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()},t.prototype._createFindWidget=function(){this._widget=this._register(new st(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new ge(this._editor,this._state,this._keybindingService,this._themeService))},t=gt([mt(1,lt.b),mt(2,k.c),mt(3,dt.a),mt(4,v.c),mt(5,pt.a),mt(6,ht.a),mt(7,Object(ct.d)(ut.a))],t)}(_t),yt=function(e){function t(){return e.call(this,{id:F,label:i.a("startFindAction","Find"),alias:"Find",precondition:void 0,kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:17,group:"3_find",title:i.a({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})||this}return ft(t,e),t.prototype.run=function(e,t){var n=_t.get(t);n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(28).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(28).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1})},t}(a.b),Ct=function(e){function t(){return e.call(this,{id:j,label:i.a("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})||this}return ft(t,e),t.prototype.run=function(e,t){var n=_t.get(t);n&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1}),n.setGlobalBufferTerm(n.getState().searchString))},t}(a.b),wt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ft(t,e),t.prototype.run=function(e,t){var n=_t.get(t);n&&!this._run(n)&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&t.getOption(28).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1}),this._run(n))},t}(a.b),St=function(e){function t(){return e.call(this,{id:W,label:i.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:u.a.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100}})||this}return ft(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(wt),Ot=function(e){function t(){return e.call(this,{id:W,label:i.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:k.a.and(u.a.focus,I),primary:3,weight:100}})||this}return ft(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(wt),Lt=function(e){function t(){return e.call(this,{id:V,label:i.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:u.a.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100}})||this}return ft(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(wt),Dt=function(e){function t(){return e.call(this,{id:V,label:i.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:k.a.and(u.a.focus,I),primary:1027,weight:100}})||this}return ft(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(wt),xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ft(t,e),t.prototype.run=function(e,t){var n=_t.get(t);if(n){var i=vt(t);i&&n.setSearchString(i),this._run(n)||(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(28).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1}),this._run(n))}},t}(a.b),Nt=function(e){function t(){return e.call(this,{id:B,label:i.a("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:u.a.focus,primary:2109,weight:100}})||this}return ft(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(xt),kt=function(e){function t(){return e.call(this,{id:H,label:i.a("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:u.a.focus,primary:3133,weight:100}})||this}return ft(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(xt),Et=function(e){function t(){return e.call(this,{id:z,label:i.a("startReplace","Replace"),alias:"Replace",precondition:void 0,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:17,group:"3_find",title:i.a({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})||this}return ft(t,e),t.prototype.run=function(e,t){if(t.hasModel()&&!t.getOption(68)){var n=_t.get(t),i=t.getSelection(),o=n.isFindInputFocused(),r=!i.isEmpty()&&i.startLineNumber===i.endLineNumber&&t.getOption(28).seedSearchStringFromSelection&&!o,s=o||r?2:1;n&&n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r,seedSearchStringFromGlobalClipboard:t.getOption(28).seedSearchStringFromSelection,shouldFocus:s,shouldAnimate:!0,updateSearchScope:!1})}},t}(a.b);Object(a.h)(_t.ID,bt),Object(a.f)(yt),Object(a.f)(Ct),Object(a.f)(St),Object(a.f)(Ot),Object(a.f)(Lt),Object(a.f)(Dt),Object(a.f)(Nt),Object(a.f)(kt),Object(a.f)(Et);var It=a.c.bindToContribution(_t.get);Object(a.g)(new It({id:U,precondition:E,handler:function(e){return e.closeFindWidget()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:9,secondary:[1033]}})),Object(a.g)(new It({id:K,precondition:void 0,handler:function(e){return e.toggleCaseSensitive()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:T.primary,mac:T.mac,win:T.win,linux:T.linux}})),Object(a.g)(new It({id:q,precondition:void 0,handler:function(e){return e.toggleWholeWords()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),Object(a.g)(new It({id:G,precondition:void 0,handler:function(e){return e.toggleRegex()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),Object(a.g)(new It({id:Y,precondition:void 0,handler:function(e){return e.toggleSearchScope()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:A.primary,mac:A.mac,win:A.win,linux:A.linux}})),Object(a.g)(new It({id:Z,precondition:E,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:3094}})),Object(a.g)(new It({id:Z,precondition:E,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:k.a.and(u.a.focus,M),primary:3}})),Object(a.g)(new It({id:X,precondition:E,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:2563}})),Object(a.g)(new It({id:X,precondition:E,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:k.a.and(u.a.focus,M),primary:void 0,mac:{primary:2051}}})),Object(a.g)(new It({id:Q,precondition:E,handler:function(e){return e.selectAllMatches()},kbOpts:{weight:105,kbExpr:u.a.focus,primary:515}}))},oiKk: @@ -2386,7 +2386,7 @@ /*! 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/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/ui/scrollbar/scrollableElement.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.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/gotoError/gotoError.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/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 */ @@ -2402,10 +2402,10 @@ /*! 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/wordHighlighter/wordHighlighter.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/markersDecorationService.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/contrib/parameterHints/parameterHints.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/contrib/codeAction/codeAction.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/codeAction/codeActionCommands.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/codeAction/types.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js */ @@ -2432,7 +2432,7 @@ /*! 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/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/inputbox/inputBox.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/parameterHints/parameterHints.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/gotoError/gotoError.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 */ /*! 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/color.js because of ./node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.js */ @@ -2447,7 +2447,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/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/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/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/wordHighlighter/wordHighlighter.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/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/styler.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/goToCommands.js */ @@ -2539,15 +2539,15 @@ /*! 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.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/textModelSearch.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/editor/common/model/tokensStore.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/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/wordOperations/wordOperations.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/nullMode.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/supports.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/modes/supports/richEditBrackets.js because of ./node_modules/monaco-editor/esm/vs/editor/contrib/wordOperations/wordOperations.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: +/*! 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/linesOperations/linesOperations.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/linesOperations/linesOperations.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 ***! \****************************************************************************************************/ @@ -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/contrib/wordOperations/wordOperations.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/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/wordHighlighter/wordHighlighter.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 */ diff --git a/office.html b/office.html index 52a9a0db9a..075587b1e6 100644 --- a/office.html +++ b/office.html @@ -4,7 +4,6 @@ Title - @@ -23,14 +22,7 @@ margin: 0; } - - - - - - - diff --git a/p__Classrooms__Lists__CommonHomework__Detail__index.4259a733.async.js b/p__Classrooms__Lists__CommonHomework__Detail__index.4259a733.async.js new file mode 100644 index 0000000000..a3eb6473d9 --- /dev/null +++ b/p__Classrooms__Lists__CommonHomework__Detail__index.4259a733.async.js @@ -0,0 +1,1190 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[48,3,5,6,7,8,10],{"+NIl": +/*!***************************************************!*\ + !*** ./node_modules/codemirror/mode/stex/stex.js ***! + \***************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function r(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function i(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var a={};function o(e,t){e.f=t}function s(e,t){var i;if(e.match(/^\\[a-zA-Z@]+/)){var s=e.current().slice(1);return n(t,i=new(i=a.hasOwnProperty(s)?a[s]:a.DEFAULT)),o(t,c),i.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return o(t,(function(e,t){return l(e,t,"\\]")})),"keyword";if(e.match("\\("))return o(t,(function(e,t){return l(e,t,"\\)")})),"keyword";if(e.match("$$"))return o(t,(function(e,t){return l(e,t,"$$")})),"keyword";if(e.match("$"))return o(t,(function(e,t){return l(e,t,"$")})),"keyword";var u=e.next();return"%"==u?(e.skipToEnd(),"comment"):"}"==u||"]"==u?(i=r(t))?(i.closeBracket(u),o(t,c),"bracket"):"error":"{"==u||"["==u?(n(t,i=new(i=a.DEFAULT)),"bracket"):/\d/.test(u)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(i=function(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var r=t[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(t)).name&&(i.argument=e.current()),i.styleIdentifier())}function l(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return o(t,s),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=e.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(e.skipToEnd(),"comment"):"error"}function c(e,t){var n=e.peek();return"{"==n||"["==n?(r(t).openBracket(n),e.eat(n),o(t,s),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(o(t,s),function(e){var t=e.cmdState.pop();t&&t.closeBracket()}(t),s(e,t))}return a.importmodule=i("importmodule","tag",["string","builtin"]),a.documentclass=i("documentclass","tag",["","atom"]),a.usepackage=i("usepackage","tag",["atom"]),a.begin=i("begin","tag",["atom"]),a.end=i("end","tag",["atom"]),a.label=i("label","tag",["atom"]),a.ref=i("ref","tag",["atom"]),a.eqref=i("eqref","tag",["atom"]),a.cite=i("cite","tag",["atom"]),a.bibitem=i("bibitem","tag",["atom"]),a.Bibitem=i("Bibitem","tag",["atom"]),a.RBibitem=i("RBibitem","tag",["atom"]),a.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return l(e,t)}:s}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=s,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}(n(/*! ../../lib/codemirror */"VrN/"))},"/iVV": +/*!********************************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/CommonHomework/Detail/components/WorkDescription/index.less?modules ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___2FARP",flex_space_between:"flex_space_between___oDbHE",flex_box_vertical_center:"flex_box_vertical_center___30YaW",flex_box_center_end:"flex_box_center_end___2jDbg",flex_box_column:"flex_box_column___34FVf",top:"top___3fhcI",desc:"desc___1KGAw",liked:"liked___peMDs",likedActive:"likedActive___3FVHj",reply:"reply___-RXGA",replyList:"replyList___3zoOQ",comment:"comment___lxBqi",headpic:"headpic___2JDco"}},"19Vz": +/*!**************************************************************!*\ + !*** ./node_modules/codemirror/addon/display/placeholder.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){a(e)&&n(e)}function i(e){var r=e.getWrapperElement(),i=a(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(a,o,s){var l=s&&s!=e.Init;if(o&&!l)a.on("blur",r),a.on("change",i),a.on("swapDoc",i),e.on(a.getInputField(),"compositionupdate",a.state.placeholderCompose=function(){!function(e){setTimeout((function(){var r=!1,i=e.getInputField();"TEXTAREA"==i.nodeName?r=!i.value:1==e.lineCount()&&(r=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),r?n(e):t(e)}),20)}(a)}),i(a);else if(!o&&l){a.off("blur",r),a.off("change",i),a.off("swapDoc",i),e.off(a.getInputField(),"compositionupdate",a.state.placeholderCompose),t(a);var c=a.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}o&&!a.hasFocus()&&r(a)}))}(n(/*! ../../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(e,t,n){!function(e){"use strict";var t={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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var a,o,s=r.indentUnit,l={},c=i.htmlMode?t:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function h(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(f("atom","]]>")):null:e.match("--")?n(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=h;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(a=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=h,a=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return a="equals",null;if("<"==i){t.tokenize=h,t.state=v,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=d;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=h;break}n.next()}return e}}function p(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function m(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;m(e)}}function v(e,t,n){return"openTag"==e?(n.tagStart=t.column(),y):"closeTag"==e?b:v}function y(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",C):l.allowMissingTagName&&"endTag"==e?(o="tag bracket",C(e,0,n)):(o="error",y)}function b(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(o="tag",x):(o="tag error",w)}return l.allowMissingTagName&&"endTag"==e?(o="tag bracket",x(e,0,n)):(o="error",w)}function x(e,t,n){return"endTag"!=e?(o="error",x):(m(n),v)}function w(e,t,n){return o="error",x(e,0,n)}function C(e,t,n){if("word"==e)return o="attribute",E;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new p(n,r,i==n.indented)),v}return o="error",C}function E(e,t,n){return"equals"==e?k:(l.allowMissing||(o="error"),C(e,0,n))}function k(e,t,n){return"string"==e?S:"word"==e&&l.allowUnquoted?(o="string",C):(o="error",C(e,0,n))}function S(e,t,n){return"string"==e?S:C(e,0,n)}return h.isInText=!0,{startState:function(e){var t={tokenize:h,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;a=null;var n=t.tokenize(e,t);return(n||a)&&"comment"!=n&&(o=null,t.state=t.state(a||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=d&&t.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=C)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(/*! ../../lib/codemirror */"VrN/"))},"1j5w": +/*!*******************************************************!*\ + !*** ./node_modules/rc-menu/es/index.js + 11 modules ***! + \*******************************************************/ +/*! exports provided: SubMenu, Item, MenuItem, MenuItemGroup, ItemGroup, Divider, default */ +/*! exports used: Divider, Item, ItemGroup, SubMenu, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */ +/*! 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)) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.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/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"d",(function(){return oe})),n.d(t,"b",(function(){return xe})),n.d(t,"c",(function(){return Ce})),n.d(t,"a",(function(){return ke}));var r=n("VTBJ"),i=n("1OyB"),a=n("vuIU"),o=n("JX7q"),s=n("Ji7U"),l=n("LK+K"),c=n("q1tI"),u=n("I8Z2"),h=n("BGR+"),d=n("wx14"),f=n("rePB"),p=n("4IlW"),m=n("2GS6"),g=n("Gytx"),v=n.n(g),y=n("TSYQ"),b=n.n(y),x=n("U8pU"),w=n("ODXe"),C=/iPhone/i,E=/iPod/i,k=/iPad/i,S=/\bAndroid(?:.+)Mobile\b/i,O=/Android/i,T=/\bAndroid(?:.+)SD4930UR\b/i,_=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,A=/Windows Phone/i,L=/\bWindows(?:.+)ARM\b/i,D=/BlackBerry/i,R=/BB10/i,M=/Opera Mini/i,I=/\b(CriOS|Chrome)(?:.+)Mobile/i,j=/Mobile(?:.+)Firefox\b/i;function N(e,t){return e.test(t)}function P(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),n=t.split("[FBAN");if(void 0!==n[1]){var r=n;t=Object(w.a)(r,1)[0]}if(void 0!==(n=t.split("Twitter"))[1]){var i=n;t=Object(w.a)(i,1)[0]}var a={apple:{phone:N(C,t)&&!N(A,t),ipod:N(E,t),tablet:!N(C,t)&&N(k,t)&&!N(A,t),device:(N(C,t)||N(E,t)||N(k,t))&&!N(A,t)},amazon:{phone:N(T,t),tablet:!N(T,t)&&N(_,t),device:N(T,t)||N(_,t)},android:{phone:!N(A,t)&&N(T,t)||!N(A,t)&&N(S,t),tablet:!N(A,t)&&!N(T,t)&&!N(S,t)&&(N(_,t)||N(O,t)),device:!N(A,t)&&(N(T,t)||N(_,t)||N(S,t)||N(O,t))||N(/\bokhttp\b/i,t)},windows:{phone:N(A,t),tablet:N(L,t),device:N(A,t)||N(L,t)},other:{blackberry:N(D,t),blackberry10:N(R,t),opera:N(M,t),firefox:N(j,t),chrome:N(I,t),device:N(D,t)||N(R,t)||N(M,t)||N(j,t)||N(I,t)},any:null,phone:null,tablet:null};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var F=Object(r.a)(Object(r.a)({},P()),{},{isMobile:P});function B(){}function H(e,t,n){var r=t||"";return e.key||"".concat(r,"item_").concat(n)}function U(e){return"".concat(e,"-menu-")}function z(e,t){var n=-1;c.Children.forEach(e,(function(e){n+=1,e&&e.type&&e.type.isMenuItemGroup?c.Children.forEach(e.props.children,(function(e){t(e,n+=1)})):t(e,n)}))}var V=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],W=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),i=r.marginLeft,a=r.marginRight;n+=+i.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},G=function(e,t,n){e&&"object"===Object(x.a)(e.style)&&(e.style[t]=n)},K=n("KQm4"),Y=n("Ff2n"),q=n("i8i4"),X=n("bdgK"),$=n("uciX"),J=n("8XRh"),Z={adjustX:1,adjustY:1},Q={topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Z,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Z,offset:[4,0]}},ee={topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Z,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Z,offset:[4,0]}},te=0,ne={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},re=function(e,t,n){var i=U(t),a=e.getState();e.setState({defaultActiveFirst:Object(r.a)(Object(r.a)({},a.defaultActiveFirst),{},Object(f.a)({},i,n))})},ie=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;Object(i.a)(this,n),(a=t.call(this,e)).onDestroy=function(e){a.props.onDestroy(e)},a.onKeyDown=function(e){var t=e.keyCode,n=a.menuInstance,r=a.props,i=r.isOpen,o=r.store;if(t===p.a.ENTER)return a.onTitleClick(e),re(o,a.props.eventKey,!0),!0;if(t===p.a.RIGHT)return i?n.onKeyDown(e):(a.triggerOpenChange(!0),re(o,a.props.eventKey,!0)),!0;if(t===p.a.LEFT){var s;if(!i)return;return(s=n.onKeyDown(e))||(a.triggerOpenChange(!1),s=!0),s}return!i||t!==p.a.UP&&t!==p.a.DOWN?void 0:n.onKeyDown(e)},a.onOpenChange=function(e){a.props.onOpenChange(e)},a.onPopupVisibleChange=function(e){a.triggerOpenChange(e,e?"mouseenter":"mouseleave")},a.onMouseEnter=function(e){var t=a.props,n=t.eventKey,r=t.onMouseEnter,i=t.store;re(i,a.props.eventKey,!1),r({key:n,domEvent:e})},a.onMouseLeave=function(e){var t=a.props,n=t.parentMenu,r=t.eventKey,i=t.onMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,domEvent:e})},a.onTitleMouseEnter=function(e){var t=a.props,n=t.eventKey,r=t.onItemHover,i=t.onTitleMouseEnter;r({key:n,hover:!0}),i({key:n,domEvent:e})},a.onTitleMouseLeave=function(e){var t=a.props,n=t.parentMenu,r=t.eventKey,i=t.onItemHover,s=t.onTitleMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,hover:!1}),s({key:r,domEvent:e})},a.onTitleClick=function(e){var t=Object(o.a)(a).props;t.onTitleClick({key:t.eventKey,domEvent:e}),"hover"!==t.triggerSubMenuAction&&(a.triggerOpenChange(!t.isOpen,"click"),re(t.store,a.props.eventKey,!1))},a.onSubMenuClick=function(e){"function"==typeof a.props.onClick&&a.props.onClick(a.addKeyPath(e))},a.onSelect=function(e){a.props.onSelect(e)},a.onDeselect=function(e){a.props.onDeselect(e)},a.getPrefixCls=function(){return"".concat(a.props.rootPrefixCls,"-submenu")},a.getActiveClassName=function(){return"".concat(a.getPrefixCls(),"-active")},a.getDisabledClassName=function(){return"".concat(a.getPrefixCls(),"-disabled")},a.getSelectedClassName=function(){return"".concat(a.getPrefixCls(),"-selected")},a.getOpenClassName=function(){return"".concat(a.props.rootPrefixCls,"-submenu-open")},a.saveMenuInstance=function(e){a.menuInstance=e},a.addKeyPath=function(e){return Object(r.a)(Object(r.a)({},e),{},{keyPath:(e.keyPath||[]).concat(a.props.eventKey)})},a.triggerOpenChange=function(e,t){var n=a.props.eventKey,r=function(){a.onOpenChange({key:n,item:Object(o.a)(a),trigger:t,open:e})};"mouseenter"===t?a.mouseenterTimeout=setTimeout((function(){r()}),0):r()},a.isChildrenSelected=function(){var e={find:!1};return function e(t,n,r){t&&!r.find&&c.Children.forEach(t,(function(t){if(t){var i=t.type;if(!i||!(i.isSubMenu||i.isMenuItem||i.isMenuItemGroup))return;-1!==n.indexOf(t.key)?r.find=!0:t.props.children&&e(t.props.children,n,r)}}))}(a.props.children,a.props.selectedKeys,e),e.find},a.isOpen=function(){return-1!==a.props.openKeys.indexOf(a.props.eventKey)},a.adjustWidth=function(){if(a.subMenuTitle&&a.menuInstance){var e=q.findDOMNode(a.menuInstance);e.offsetWidth>=a.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(a.subMenuTitle.offsetWidth,"px"))}},a.saveSubMenuTitle=function(e){a.subMenuTitle=e},a.getBaseProps=function(){var e=Object(o.a)(a).props;return{mode:"horizontal"===e.mode?"vertical":e.mode,visible:a.props.isOpen,level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:a.onSubMenuClick,onSelect:a.onSelect,onDeselect:a.onDeselect,onDestroy:a.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:a.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(o.a)(a),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[U(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:a.internalMenuId,manualRef:a.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},a.getMotion=function(e,t){var n=Object(o.a)(a).haveRendered,i=a.props,s=i.motion,l=i.rootPrefixCls;return Object(r.a)(Object(r.a)({},s),{},{leavedClassName:"".concat(l,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var s=e.store,l=e.eventKey,u=s.getState().defaultActiveFirst;a.isRootMenu=!1;var h=!1;return u&&(h=u[l]),re(s,l,h),a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,i=t.manualRef;i&&i(this),"horizontal"===n&&r.isRootMenu&&this.props.isOpen&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(e){var t=this,n=this.getBaseProps(),r=this.getMotion(n.mode,n.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||n.visible||n.forceSubMenuRender,!this.haveOpened)return c.createElement("div",null);var i=n.direction;return c.createElement(J.default,Object.assign({visible:n.visible},r),(function(r){var a=r.className,o=r.style,s=b()("".concat(n.prefixCls,"-sub"),a,Object(f.a)({},"".concat(n.prefixCls,"-rtl"),"rtl"===i));return c.createElement(pe,Object.assign({},n,{id:t.internalMenuId,className:s,style:o}),e)}))}},{key:"render",value:function(){var e,t=Object(r.a)({},this.props),n=t.isOpen,i=this.getPrefixCls(),a="inline"===t.mode,o=b()(i,"".concat(i,"-").concat(t.mode),(e={},Object(f.a)(e,t.className,!!t.className),Object(f.a)(e,this.getOpenClassName(),n),Object(f.a)(e,this.getActiveClassName(),t.active||n&&!a),Object(f.a)(e,this.getDisabledClassName(),t.disabled),Object(f.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(t.eventKey?this.internalMenuId="".concat(t.eventKey,"$Menu"):(te+=1,this.internalMenuId="$__$".concat(te,"$Menu")));var s={},l={},u={};t.disabled||(s={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},l={onClick:this.onTitleClick},u={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var h={},d=t.direction;a&&("rtl"===d?h.paddingRight=t.inlineIndent*t.level:h.paddingLeft=t.inlineIndent*t.level);var p={};this.props.isOpen&&(p={"aria-owns":this.internalMenuId});var m=null;"horizontal"!==t.mode&&(m=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(m=c.createElement(this.props.expandIcon,Object(r.a)({},this.props))));var g=c.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:h,className:"".concat(i,"-title"),role:"button"},u,l,{"aria-expanded":n},p,{"aria-haspopup":"true",title:"string"==typeof t.title?t.title:void 0}),t.title,m||c.createElement("i",{className:"".concat(i,"-arrow")})),v=this.renderChildren(t.children),y=t.parentMenu.isRootMenu?t.parentMenu.props.getPopupContainer:function(e){return e.parentNode},x=ne[t.mode],w=t.popupOffset?{offset:t.popupOffset}:{},C="inline"===t.mode?"":t.popupClassName;C+="rtl"===d?" ".concat(i,"-rtl"):"";var E=t.disabled,k=t.triggerSubMenuAction,S=t.subMenuOpenDelay,O=t.forceSubMenuRender,T=t.subMenuCloseDelay,_=t.builtinPlacements;V.forEach((function(e){return delete t[e]})),delete t.onClick;var A="rtl"===d?Object.assign({},ee,_):Object.assign({},Q,_);return delete t.direction,c.createElement("li",Object.assign({},t,s,{className:o,role:"menuitem"}),a&&g,a&&v,!a&&c.createElement($.a,{prefixCls:i,popupClassName:b()("".concat(i,"-popup"),C),getPopupContainer:y,builtinPlacements:A,popupPlacement:x,popupVisible:n,popupAlign:w,popup:v,action:E?[]:[k],mouseEnterDelay:S,mouseLeaveDelay:T,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:O},g))}}]),n}(c.Component);ie.defaultProps={onMouseEnter:B,onMouseLeave:B,onTitleMouseEnter:B,onTitleMouseLeave:B,onTitleClick:B,manualRef:B,mode:"vertical",title:""};var ae=Object(u.b)((function(e,t){var n=e.openKeys,r=e.activeKey,i=e.selectedKeys,a=t.eventKey,o=t.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[o]===a,selectedKeys:i}}))(ie);ae.isSubMenu=!0;var oe=ae,se=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=q.findDOMNode(Object(o.a)(e));return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,i){var a=e.props,o=a.overflowedIndicator,s=a.level,l=a.mode,u=a.prefixCls,h=a.theme;if(1!==s||"horizontal"!==l)return null;var d=e.props.children[0].props,f=(d.children,d.title,d.style),p=Object(Y.a)(d,["children","title","style"]),m=Object(r.a)({},f),g="".concat(t,"-overflowed-indicator"),v="".concat(t,"-overflowed-indicator");0===n.length&&!0!==i?m=Object(r.a)(Object(r.a)({},m),{},{display:"none"}):i&&(m=Object(r.a)(Object(r.a)({},m),{},{visibility:"hidden",position:"absolute"}),g="".concat(g,"-placeholder"),v="".concat(v,"-placeholder"));var y=h?"".concat(u,"-").concat(h):"",b={};return V.forEach((function(e){void 0!==p[e]&&(b[e]=p[e])})),c.createElement(oe,Object.assign({title:o,className:"".concat(u,"-overflowed-submenu"),popupClassName:y},b,{key:g,eventKey:v,disabled:!1,style:m}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=q.findDOMNode(Object(o.a)(e));if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];G(r,"display","inline-block");var i=e.getMenuItemNodes(),a=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(e){G(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return W(e,!0)})),a.forEach((function(e){G(e,"display","none")})),e.overflowedIndicatorWidth=W(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),G(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=q.findDOMNode(Object(o.a)(e));if(t){var n=W(t);e.overflowedItems=[];var r,i=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=q.findDOMNode(this);if(!t)return;this.resizeObserver=new X.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,i,a){var o=i;if("horizontal"===t.props.mode){var s=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(a>n&&(o=c.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),a===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return c.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),s=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var l=[].concat(Object(K.a)(r),[s,o]);return a===e.length-1&&l.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),l}return[].concat(Object(K.a)(r),[o])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(Y.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return c.createElement(i,Object.assign({},r),this.renderChildren(n))}}]),n}(c.Component);se.defaultProps={tag:"div",className:""};var le=se;function ce(e,t,n){var i=e.getState();e.setState({activeKey:Object(r.a)(Object(r.a)({},i.activeKey),{},Object(f.a)({},t,n))})}function ue(e){return e.eventKey||"0-menu-"}function he(e,t){var n,r=t,i=e.children,a=e.eventKey;if(r&&(z(i,(function(e,t){e&&e.props&&!e.props.disabled&&r===H(e,a,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(z(i,(function(e,t){r||!e||e.props.disabled||(r=H(e,a,t))})),r):r}function de(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var fe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(a.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var i=null;return r!==p.a.UP&&r!==p.a.DOWN||(i=a.step(r===p.a.UP?-1:1)),i?(e.preventDefault(),ce(a.props.store,ue(a.props),i.props.eventKey),"function"==typeof t&&t(i),1):void 0},a.onItemHover=function(e){var t=e.key,n=e.hover;ce(a.props.store,ue(a.props),n?t:null)},a.onDeselect=function(e){a.props.onDeselect(e)},a.onSelect=function(e){a.props.onSelect(e)},a.onClick=function(e){a.props.onClick(e)},a.onOpenChange=function(e){a.props.onOpenChange(e)},a.onDestroy=function(e){a.props.onDestroy(e)},a.getFlatInstanceArray=function(){return a.instanceArray},a.step=function(e){var t=a.getFlatInstanceArray(),n=a.props.store.getState().activeKey[ue(a.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var i=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(i=t,!1)})),a.props.defaultActiveFirst||-1===i||(o=t.slice(i,r-1)).length&&!o.every((function(e){return!!e.props.disabled}))){var o,s=(i+1)%r,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},a.renderCommonMenuItem=function(e,t,n){var i=a.props.store.getState(),s=Object(o.a)(a).props,l=H(e,s.eventKey,t),u=e.props;if(!u||"string"==typeof e.type)return e;var h=l===i.activeKey,d=Object(r.a)(Object(r.a)({mode:u.mode||s.mode,level:s.level,inlineIndent:s.inlineIndent,renderMenuItem:a.renderMenuItem,rootPrefixCls:s.prefixCls,index:t,parentMenu:s.parentMenu,manualRef:u.disabled?void 0:Object(m.a)(e.ref,de.bind(Object(o.a)(a))),eventKey:l,active:!u.disabled&&h,multiple:s.multiple,onClick:function(e){(u.onClick||B)(e),a.onClick(e)},onItemHover:a.onItemHover,motion:s.motion,subMenuOpenDelay:s.subMenuOpenDelay,subMenuCloseDelay:s.subMenuCloseDelay,forceSubMenuRender:s.forceSubMenuRender,onOpenChange:a.onOpenChange,onDeselect:a.onDeselect,onSelect:a.onSelect,builtinPlacements:s.builtinPlacements,itemIcon:u.itemIcon||a.props.itemIcon,expandIcon:u.expandIcon||a.props.expandIcon},n),{},{direction:s.direction});return("inline"===s.mode||F.any)&&(d.triggerSubMenuAction="click"),c.cloneElement(e,d)},a.renderMenuItem=function(e,t,n){if(!e)return null;var r=a.props.store.getState(),i={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:a.props.triggerSubMenuAction,subMenuKey:n};return a.renderCommonMenuItem(e,t,i)},e.store.setState({activeKey:Object(r.a)(Object(r.a)({},e.store.getState().activeKey),{},Object(f.a)({},e.eventKey,he(e,e.activeKey)))}),a.instanceArray=[],a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!v()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[ue(t)],r=he(t,n);if(r!==n)ce(t.store,ue(t),r);else if("activeKey"in e){r!==he(e,e.activeKey)&&ce(t.store,ue(t),r)}}},{key:"render",value:function(){var e=this,t=Object(d.a)({},this.props);this.instanceArray=[];var n={className:b()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,a=t.visible,o=t.level,s=t.mode,l=t.overflowedIndicator,u=t.theme;return V.forEach((function(e){return delete t[e]})),delete t.onClick,c.createElement(le,Object.assign({},t,{prefixCls:r,mode:s,tag:"ul",level:o,theme:u,visible:a,overflowedIndicator:l},n),c.Children.map(t.children,(function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")})))}}]),n}(c.Component);fe.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:B};var pe=Object(u.b)()(fe),me=n("Kwbf");function ge(e,t,n){var r=e.prefixCls,i=e.motion,a=e.defaultMotions,o=void 0===a?{}:a,s=e.openAnimation,l=e.openTransitionName,c=t.switchingModeFromInline;if(i)return i;if("object"===Object(x.a)(s)&&s)Object(me.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=o[n];return u||(c?null:o.other)}var ve=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;Object(i.a)(this,n),(a=t.call(this,e)).inlineOpenKeys=[],a.onSelect=function(e){var t=Object(o.a)(a).props;if(t.selectable){var n=a.store.getState().selectedKeys,i=e.key;n=t.multiple?n.concat([i]):[i],"selectedKeys"in t||a.store.setState({selectedKeys:n}),t.onSelect(Object(r.a)(Object(r.a)({},e),{},{selectedKeys:n}))}},a.onClick=function(e){var t=a.getRealMenuMode(),n=Object(o.a)(a),r=n.store,i=n.props.onOpenChange;"inline"===t||"openKeys"in a.props||(r.setState({openKeys:[]}),i([])),a.props.onClick(e)},a.onKeyDown=function(e,t){a.innerMenu.getWrappedInstance().onKeyDown(e,t)},a.onOpenChange=function(e){var t=Object(o.a)(a).props,n=a.store.getState().openKeys.concat(),r=!1,i=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var i=n.indexOf(e.key);(t=-1!==i)&&n.splice(i,1)}r=r||t};Array.isArray(e)?e.forEach(i):i(e),r&&("openKeys"in a.props||a.store.setState({openKeys:n}),t.onOpenChange(n))},a.onDeselect=function(e){var t=Object(o.a)(a).props;if(t.selectable){var n=a.store.getState().selectedKeys.concat(),i=e.key,s=n.indexOf(i);-1!==s&&n.splice(s,1),"selectedKeys"in t||a.store.setState({selectedKeys:n}),t.onDeselect(Object(r.a)(Object(r.a)({},e),{},{selectedKeys:n}))}},a.onMouseEnter=function(e){a.restoreModeVerticalFromInline();var t=a.props.onMouseEnter;t&&t(e)},a.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,r="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,i="font-size"===e.propertyName&&r.indexOf("anticon")>=0;(t||i)&&a.restoreModeVerticalFromInline()},a.setInnerMenu=function(e){a.innerMenu=e},a.isRootMenu=!0;var s=e.defaultSelectedKeys,l=e.defaultOpenKeys;return"selectedKeys"in e&&(s=e.selectedKeys||[]),"openKeys"in e&&(l=e.openKeys||[]),a.store=Object(u.c)({selectedKeys:s,openKeys:l,activeKey:{"0-menu-":he(e,e.activeKey)}}),a.state={switchingModeFromInline:!1},a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){this.updateOpentKeysWhenSwitchMode(e),this.updateMiniStore();var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&i([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(e){var t=this.props,n=this.store,r=this.inlineOpenKeys,i=n.getState(),a={};"inline"===e.mode&&"inline"!==t.mode&&this.setState({switchingModeFromInline:!0}),"openKeys"in t||((t.inlineCollapsed&&!e.inlineCollapsed||t.siderCollapsed&&!e.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=i.openKeys.concat(),a.openKeys=[]),(!t.inlineCollapsed&&e.inlineCollapsed||!t.siderCollapsed&&e.siderCollapsed)&&(a.openKeys=r,this.inlineOpenKeys=[])),Object.keys(a).length&&n.setState(a)}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(r.a)({},Object(h.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(r.a)(Object(r.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ge(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,c.createElement(u.a,{store:this.store},c.createElement(pe,Object.assign({},e,{ref:this.setInnerMenu}),this.props.children))}}]),n}(c.Component);ve.defaultProps={selectable:!0,onClick:B,onSelect:B,onOpenChange:B,onDeselect:B,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:c.createElement("span",null,"···")};var ye=ve,be=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===p.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseLeave;i({key:r,hover:!1}),a({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseEnter;i({key:r,hover:!0}),a({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,i=n.multiple,a=n.onClick,s=n.onSelect,l=n.onDeselect,c=n.isSelected,u={key:r,keyPath:[r],item:Object(o.a)(e),domEvent:t};a(u),i?c?l(u):s(u):c||s(u)},e.saveNode=function(t){e.node=t},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(r.a)({},this.props),n=b()(this.getPrefixCls(),t.className,(e={},Object(f.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(f.a)(e,this.getSelectedClassName(),t.isSelected),Object(f.a)(e,this.getDisabledClassName(),t.disabled),e)),i=Object(r.a)(Object(r.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?i=Object(r.a)(Object(r.a)({},i),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(i.role="none");var a={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},o=Object(r.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?o.paddingRight=t.inlineIndent*t.level:o.paddingLeft=t.inlineIndent*t.level),V.forEach((function(e){return delete t[e]})),delete t.direction;var s=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(s=c.createElement(this.props.itemIcon,this.props)),c.createElement("li",Object.assign({},Object(h.default)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,a,{style:o,ref:this.saveNode}),t.children,s)}}]),n}(c.Component);be.isMenuItem=!0,be.defaultProps={onSelect:B,onMouseEnter:B,onMouseLeave:B,manualRef:B};var xe=Object(u.b)((function(e,t){var n=e.activeKey,r=e.selectedKeys,i=t.eventKey;return{active:n[t.subMenuKey]===i,isSelected:-1!==r.indexOf(i)}}))(be),we=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(a.a)(n,[{key:"render",value:function(){var e=Object(d.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,i="".concat(r,"-item-group-title"),a="".concat(r,"-item-group-list"),o=e.title,s=e.children;return V.forEach((function(t){return delete e[t]})),delete e.onClick,delete e.direction,c.createElement("li",Object.assign({},e,{className:"".concat(n," ").concat(r,"-item-group")}),c.createElement("div",{className:i,title:"string"==typeof o?o:void 0},o),c.createElement("ul",{className:a},c.Children.map(s,this.renderInnerMenuItem)))}}]),n}(c.Component);we.isMenuItemGroup=!0,we.defaultProps={disabled:!0};var Ce=we,Ee=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return c.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};Ee.defaultProps={disabled:!0,className:"",style:{}};var ke=Ee;t.e=ye},"28ck": +/*!*****************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/CommonHomework/Detail/index.less?modules ***! + \*****************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___2EzbZ",flex_space_between:"flex_space_between___2jjzS",flex_box_vertical_center:"flex_box_vertical_center___35dLT",flex_box_center_end:"flex_box_center_end___2fyJ3",flex_box_column:"flex_box_column___3lKUC",title:"title___3cIut",export:"export___3pzhF",bg:"bg___2HApn",tabs:"tabs___pZ5ue",workListTabWrap:"workListTabWrap___3EyRO",workListTabButton:"workListTabButton___1vYHr"}},"3IPh": +/*!*************************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/CommonHomework/Detail/components/WorkList/index.less?modules ***! + \*************************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={wrap:"wrap___cA_8q",MdEditor:"MdEditor___8fwED",workListButtonWrap:"workListButtonWrap___19mp3",anticon:"anticon___3Lzu8",workListClass:"workListClass___1J6Go",left:"left___21zr0",visible:"visible___38N4N",status:"status___1j6mP",tips:"tips___2L_mR"}},"49sm": +/*!***************************************!*\ + !*** ./node_modules/isarray/index.js ***! + \***************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},"4HvA": +/*!**************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/CommonHomework/components/Publish.tsx ***! + \**************************************************************************/ +/*! exports provided: disabledTime, default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),i=(n(/*! antd/es/checkbox/style */"sRBo"),n(/*! antd/es/checkbox */"kaz8")),a=(n(/*! antd/es/radio/style */"7Kak"),n(/*! antd/es/radio */"9yH6")),o=(n(/*! antd/es/row/style */"14J3"),n(/*! antd/es/row */"BMrR")),s=(n(/*! antd/es/col/style */"jCWc"),n(/*! antd/es/col */"kPKH")),l=(n(/*! antd/es/date-picker/style */"iQDF"),n(/*! antd/es/date-picker */"+eQT")),c=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),u=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty */"jrin"),h=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),d=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),f=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),p=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),m=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),g=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */"PpiC"),v=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),y=n.n(v),b=n(/*! react */"q1tI"),x=n.n(b),w=n(/*! moment */"wd/R"),C=n.n(w),E=n(/*! @/utils/fetch */"ErOA"),k=n(/*! @/utils/authority */"xKgJ"),S=n(/*! @/utils/util */"1vsH"),O=n(/*! umi */"Ty5D"),T=n(/*! umi */"9kvl"),_=n(/*! ../../ShixunHomeworks/components/TrfList */"4wi7"),A=n(/*! @/service/classrooms */"oUNq");function L(e,t){for(var n=[],r=e;r0)){e.next=7;break}return c.b.info("发布班级不能为空"),e.abrupt("return");case 7:return i={homework_ids:Object(h.a)(t.actionTabs.selectArrs),group_ids:ne.map((function(e){return e.id})),end_time:C()(r.end_time).format("YYYY-MM-DD HH:mm"),publish_time:C()(r.publish_time).format("YYYY-MM-DD HH:mm"),unified_setting:oe},e.next=10,Object(E.a)("/api/courses/".concat(w.coursesId,"/homework_commons/publish_with_homework_list_position.json"),{method:"post",body:Object(f.a)({},i)});case 10:0===e.sent.status&&(Object(S.Y)(["教学课堂","图文作业","立即发布"]),c.b.success("发布成功"),n({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),v.onCallback&&v.onCallback(),ce(),"0"===localStorage.getItem("Noviceguide")||n({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:13,text:x.a.createElement("div",null,"最后,咱们给教学课堂添加一名学生~点击“添加学生”,在弹窗页面中输入并搜索学生姓名,点击“确定”就可以为您的课堂添加第一位学生啦~")}}));case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return x.a.createElement(r.a,{width:600,centered:!0,title:"发布作业",visible:"立即发布"===t.actionTabs.key,okText:"发布作业",cancelText:"暂不发布",onOk:ue,onCancel:function(){j(1),B([]),re([]),ce(),n({type:"classroomList/setActionTabs",payload:{}})}},x.a.createElement("p",{className:"tc"},"学生将立即收到作业",x.a.createElement("br",null),'本操作只对"未发布"的作业有效'),F&&x.a.createElement(p.a,{form:L},x.a.createElement("div",{style:{paddingLeft:0}},x.a.createElement(o.a,{className:"mt30",align:"middle"},x.a.createElement(s.a,null,x.a.createElement(p.a.Item,{name:"publish_time",label:"发布时间"},x.a.createElement(l.a,{style:{width:155,marginRight:"25px"},getPopupContainer:function(e){return e.parentNode},disabledDate:function(e){return e&&e<=C()().subtract(0,"days")},disabledTime:D,placeholder:"请选择发布时间",showTime:{format:"HH:mm",defaultValue:C()(Object(S.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1}))),x.a.createElement(s.a,{className:"ml20"},x.a.createElement(p.a.Item,{name:"end_time",label:"截止时间"},x.a.createElement(l.a,{style:{width:170},getPopupContainer:function(e){return e.parentNode},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:C()(Object(S.d)(),"HH:mm")},disabledDate:function(e){return e&&e0&&x.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"}},x.a.createElement("span",{style:{flex:1}},x.a.createElement(i.a,{checked:ne.length===F.length,onChange:function(e){ne.length===F.length?re([]):re(F.filter((function(e){return!e.is_published})))}},"全选")," "),x.a.createElement("span",{style:{width:16}}),x.a.createElement("span",{style:{flex:1}},"已选择",ne.length||0,"个分班")),(1===t.actionTabs.type||!oe)&&F.length>0&&x.a.createElement(_.a,{data:F,selectedRowKeys:ne,setSelectedRowKeys:re})))}))},"4wi7": +/*!*********************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/ShixunHomeworks/components/TrfList/index.tsx ***! + \*********************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/row/style */"14J3");var r=n(/*! antd/es/row */"BMrR"),i=(n(/*! antd/es/checkbox/style */"sRBo"),n(/*! antd/es/checkbox */"kaz8")),a=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=n.n(l),u=n(/*! react */"q1tI"),h=n.n(u),d=n(/*! ./index.less?modules */"oOBs"),f=n.n(d),p=n(/*! ./delete.png */"xOL1"),m=n.n(p),g=n(/*! @/components/NoData */"BdwD");t.a=function(e){var t=e.data,n=(e.value,e.handleChangePage,e.setSelectedRowKeys),l=e.selectedRowKeys,d=(e.onChange,Object(u.useState)([])),p=Object(s.a)(d,2),v=p[0],y=p[1],b=Object(u.useState)([]),x=Object(s.a)(b,2),w=x[0],C=x[1],E=Object(u.useState)([]),k=Object(s.a)(E,2),S=k[0],O=k[1],T=Object(u.useState)(1),_=Object(s.a)(T,2),A=(_[0],_[1],Object(u.useState)()),L=Object(s.a)(A,2);L[0],L[1];return Object(u.useEffect)((function(){y(t),C([]),O([])}),[t]),Object(u.useEffect)((function(){n&&(C(l),O(l))}),[l]),h.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},h.a.createElement("div",{className:f.a.leftdiv},h.a.createElement(a.a.Search,{size:"large",onChange:function(){var e=Object(o.a)(c.a.mark((function e(n){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y(t.filter((function(e){var t;return null==e||null===(t=e.name)||void 0===t?void 0:t.includes(n.target.value)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),placeholder:"可输入班级名称查询"}),0===v.length&&h.a.createElement(g.a,{styles:{margin:"70px auto"},customText:"暂无分班"}),h.a.createElement("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"}},h.a.createElement(i.a.Group,{value:w.map((function(e){return"".concat(e.id)})),onChange:function(e){n(v.filter((function(t){return e.includes("".concat(t.id))})))},style:{marginTop:"10px"}},v.map((function(e,t){return h.a.createElement(r.a,{key:e.id,style:{marginTop:"10px",lineHeight:"24px",display:"flex",width:200}},h.a.createElement(i.a,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:e.is_published,value:"".concat(e.id)},h.a.createElement("div",{className:f.a.listClass},h.a.createElement("span",{className:f.a.spantitle,style:{width:e.is_published?"108px":"170px"}},e.name),e.is_published&&h.a.createElement("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"}},"已发布"))))}))))),h.a.createElement("div",{className:f.a.rightdiv},h.a.createElement(a.a.Search,{onChange:function(e){O(w.filter((function(t){return t.name.includes(e.target.value)})))},size:"large",placeholder:"可输入班级名称查询"}),0===S.length&&h.a.createElement(g.a,{styles:{margin:"70px auto"},customText:"暂未选择分班"}),S.length>0&&h.a.createElement("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"}},h.a.createElement("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0}},S.map((function(e,t){return h.a.createElement(r.a,{justify:"space-between",style:{marginTop:"10px"},key:e.id},h.a.createElement("div",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:"5px",marginLeft:"5px",width:"75%"}},e.name),h.a.createElement("img",{src:m.a,style:{cursor:"pointer",height:"16px",marginRight:17},onClick:function(){n(w.filter((function(t){return"".concat(t.id)!="".concat(e.id)})))}}))}))))))}},"500L": +/*!**********************************************!*\ + !*** ./src/components/MultiUpload/index.tsx ***! + \**********************************************/ +/*! exports provided: coverToFileList, default */ +/*! exports used: coverToFileList, default */function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=(n(/*! antd/es/modal/style */"2qtc"),n(/*! antd/es/modal */"kLXV")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),s=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),c=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),u=(n(/*! antd/es/upload/style */"DZo9"),n(/*! antd/es/upload */"8z0m")),h=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),d=n.n(h),f=n(/*! react */"q1tI"),p=n.n(f),m=n(/*! @/utils/env */"m3rI"),g=n(/*! @/pages/MoopCases/FormPanel/service */"wzkS"),v=n(/*! ../SingleUpload */"y5JW"),y=n(/*! @ant-design/icons */"LtfV"),b=u.a.Dragger;function x(e){var t=[];return e&&e.length>0&&(t=e.map((function(e){return{uid:e.id,id:e.id,name:e.title+v.c+e.filesize,url:e.url,filesize:e.filesize,status:"done",response:{id:e.id}}}))),t}t.b=function(e){var t=e.value,n=e.onChange,h=e.action,x=e.className,w=e.maxSize,C=void 0===w?150:w,E=e.title,k=void 0===E?"上传附件":E,S=e.showRemoveModal,O=void 0!==S&&S,T=e.accept,_=void 0===T?"":T,A=e.additionalText,L=e.isDragger,D=e.number,R=void 0===D?1e3:D,M=e.aloneClear,I=void 0!==M&&M,j=e.restrict,N=void 0===j||j,P=Object(f.useState)(!1),F=Object(c.a)(P,2),B=F[0],H=F[1],U=Object(f.useState)(t||[]),z=Object(c.a)(U,2),V=z[0],W=z[1];Object(f.useEffect)((function(){t&&(W(Object(l.a)(t)),R===(null==t?void 0:t.length)&&H(!0))}),[t]);var G,K=function(){setTimeout((function(){V.pop(),W(Object(l.a)(V))}),500)},Y={multiple:!0,disabled:B,accept:_,withCredentials:!0,fileList:V,beforeUpload:function(e,t){var n=e.size/1024/1024;return V.concat(t).length>R?(V.pop(),W(Object(l.a)(V)),s.b.error("最多只能上传".concat(R,"个文件")),I?Promise.reject():(K(),!1)):n=R?H(!0):H(!1),W(Object(l.a)(t)),t=t.map((function(e){var t,n;null!=e&&null!==(t=e.response)&&void 0!==t&&t.id&&(e.url="/api/attachments/".concat(null==e||null===(n=e.response)||void 0===n?void 0:n.id));return-1===e.name.indexOf(v.c)&&(e.name="".concat(e.name).concat(v.c).concat(Object(v.a)(e.size))),Object(o.a)({},e)})),console.log("info:",e),n(t)},onRemove:(G=Object(a.a)(d.a.mark((function e(t){var n;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=function(){var e=Object(a.a)(d.a.mark((function e(){var n;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.response?t.response.id:t.id)){e.next=8;break}return e.next=4,Object(g.d)(t.response?t.response.id:t.uid);case 4:return n=e.sent,e.abrupt("return",n);case 8:return e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!O){e.next=5;break}return e.abrupt("return",new Promise((function(e,t){var r;i.a.confirm({centered:!0,width:530,okText:"确定",cancelText:"取消",title:"提示",content:p.a.createElement("div",{className:"tc font16"},"是否确认删除?"),onOk:(r=Object(a.a)(d.a.mark((function t(){return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n();case 2:t.sent,s.b.success("删除成功"),e(!0);case 5:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)}),onCancel:function(){return e(!1)}})})));case 5:return e.next=7,n();case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)}))),function(e){return G.apply(this,arguments)})};return p.a.createElement("div",{className:"multi-upload ".concat(x||"")},L&&p.a.createElement(b,Y,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) ")),A),!L&&p.a.createElement(u.a,Y,p.a.createElement(r.a,{disabled:B},k),p.a.createElement("span",{onClick:function(e){e.preventDefault(),e.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(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return b}));var r=n(/*! react-router */"Ty5D"),i=n(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),a=n(/*! react */"q1tI"),o=n.n(a),s=n(/*! history */"YS25"),l=(n(/*! prop-types */"17x9"),n(/*! @babel/runtime/helpers/esm/extends */"wx14")),c=n(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),u=n(/*! tiny-invariant */"9R94");o.a.Component;o.a.Component;var h=function(e,t){return"function"==typeof e?e(t):e},d=function(e,t){return"string"==typeof e?Object(s.c)(e,null,null,t):e},f=function(e){return e},p=o.a.forwardRef;void 0===p&&(p=f);var m=p((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,a=Object(c.a)(e,["innerRef","navigate","onClick"]),s=a.target,u=Object(l.a)({},a,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=f!==p&&t||n,o.a.createElement("a",u)}));var g=p((function(e,t){var n=e.component,i=void 0===n?m:n,a=e.replace,s=e.to,g=e.innerRef,v=Object(c.a)(e,["component","replace","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=e.history,r=d(h(s,e.location),e.location),c=r?n.createHref(r):"",m=Object(l.a)({},v,{href:c,navigate:function(){var t=h(s,e.location);(a?n.replace:n.push)(t)}});return f!==p?m.ref=t||g:m.innerRef=g,o.a.createElement(i,m)}))})),v=function(e){return e},y=o.a.forwardRef;void 0===y&&(y=v);var b=y((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,a=e.activeClassName,s=void 0===a?"active":a,f=e.activeStyle,p=e.className,m=e.exact,b=e.isActive,x=e.location,w=e.sensitive,C=e.strict,E=e.style,k=e.to,S=e.innerRef,O=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=x||e.location,a=d(h(k,n),n),c=a.pathname,T=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),_=T?Object(r.f)(n.pathname,{path:T,exact:m,sensitive:w,strict:C}):null,A=!!(b?b(_,n):_),L=A?function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||t.relatedTarget.className.indexOf("".concat(a,"-next"))>=0)||(e.setState({goInputText:""}),i(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==m&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return Object(s.a)(n,[{key:"getValidValue",value:function(){var e=this.state,t=e.goInputText,n=e.current;return!t||isNaN(t)?n:Number(t)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.locale,i=t.rootPrefixCls,a=t.changeSize,o=t.quickGo,s=t.goButton,l=t.selectComponentClass,c=t.buildOptionText,u=t.selectPrefixCls,d=t.disabled,f=this.state.goInputText,p="".concat(i,"-options"),m=l,g=null,v=null,y=null;if(!a&&!o)return null;var b=this.getPageSizeOptions();if(a&&m){var x=b.map((function(t,n){return h.a.createElement(m.Option,{key:n,value:t.toString()},(c||e.buildOptionText)(t))}));g=h.a.createElement(m,{disabled:d,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||b[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},x)}return o&&(s&&(y="boolean"==typeof s?h.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:d,className:"".concat(p,"-quick-jumper-button")},r.jump_to_confirm):h.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),v=h.a.createElement("div",{className:"".concat(p,"-quick-jumper")},r.jump_to,h.a.createElement("input",{disabled:d,type:"text",value:f,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,y)),h.a.createElement("li",{className:"".concat(p)},g,v)}}]),n}(h.a.Component);y.defaultProps={pageSizeOptions:["10","20","50","100"]};var b=y,x=n("N2Kk");function w(){}function C(e,t,n){var r=void 0===e?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var E=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(o.a)(this,n),(r=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(C(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,t){var n=r.props.prefixCls,i=e||h.a.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"==typeof e&&(i=h.a.createElement(e,Object(a.a)({},r.props))),i},r.savePaginationNode=function(e){r.paginationNode=e},r.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==r.state.current;var t},r.shouldDisplayQuickJumper=function(){var e=r.props,t=e.showQuickJumper,n=e.pageSize;return!(e.total<=n)&&t},r.handleKeyDown=function(e){e.keyCode!==g&&e.keyCode!==v||e.preventDefault()},r.handleKeyUp=function(e){var t=r.getValidValue(e);t!==r.state.currentInputValue&&r.setState({currentInputValue:t}),e.keyCode===m?r.handleChange(t):e.keyCode===g?r.handleChange(t-1):e.keyCode===v&&r.handleChange(t+1)},r.changePageSize=function(e){var t=r.state.current,n=C(e,r.state,r.props);t=t>n?n:t,0===n&&(t=r.state.current),"number"==typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:t,currentInputValue:t})),r.props.onShowSizeChange(t,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(t,e)},r.handleChange=function(e){var t=r.props.disabled,n=e;if(r.isValid(n)&&!t){var i=C(void 0,r.state,r.props);n>i?n=i:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var a=r.state.pageSize;return r.props.onChange(n,a),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current2?n-2:0),i=2;i=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,r=e.totalBoundaryShowSizeChanger;return void 0!==t?t:n>r}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,r=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),i=!this.hasPrev();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,r=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),i=!this.hasNext();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,a=t.className,o=t.style,s=t.disabled,l=t.hideOnSinglePage,c=t.total,d=t.locale,m=t.showQuickJumper,g=t.showLessItems,v=t.showTitle,y=t.showTotal,x=t.simple,w=t.itemRender,E=t.showPrevNextJumpers,k=t.jumpPrevIcon,S=t.jumpNextIcon,O=t.selectComponentClass,T=t.selectPrefixCls,_=t.pageSizeOptions,A=this.state,L=A.current,D=A.pageSize,R=A.currentInputValue;if(!0===l&&c<=D)return null;var M=C(void 0,this.state,this.props),I=[],j=null,N=null,P=null,F=null,B=null,H=m&&m.goButton,U=g?1:2,z=L-1>0?L-1:0,V=L+1=2*U&&3!==L&&(I[0]=Object(u.cloneElement)(I[0],{className:"".concat(n,"-item-after-jump-prev")}),I.unshift(j)),M-L>=2*U&&L!==M-2&&(I[I.length-1]=Object(u.cloneElement)(I[I.length-1],{className:"".concat(n,"-item-before-jump-next")}),I.push(N)),1!==$&&I.unshift(P),J!==M&&I.push(F)}var ee=null;y&&(ee=h.a.createElement("li",{className:"".concat(n,"-total-text")},y(c,[0===c?0:(L-1)*D+1,L*D>c?c:L*D])));var te=!this.hasPrev()||!M,ne=!this.hasNext()||!M;return h.a.createElement("ul",Object(r.a)({className:f()(n,a,Object(i.a)({},"".concat(n,"-disabled"),s)),style:o,unselectable:"unselectable",ref:this.savePaginationNode},W),ee,h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:te?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),te)),"aria-disabled":te},this.renderPrev(z)),I,h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:ne?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),ne)),"aria-disabled":ne},this.renderNext(V)),h.a.createElement(b,{disabled:s,locale:d,rootPrefixCls:n,selectComponentClass:O,selectPrefixCls:T,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:L,pageSize:D,pageSizeOptions:_,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:H}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,i=C(e.pageSize,t,e);r=r>i?i:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),n}(h.a.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:w,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:w,locale:x.a,style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};var k=E},"6RRn": +/*!*******************************************!*\ + !*** ./node_modules/rc-table/es/index.js ***! + \*******************************************/ +/*! exports provided: Summary, Column, ColumnGroup, INTERNAL_COL_DEFINE, default */ +/*! exports used: INTERNAL_COL_DEFINE, Summary, default */function(e,t,n){"use strict";var r=n(/*! ./Table */"wCXF"),i=n(/*! ./Footer */"n6Qo");n.d(t,"b",(function(){return i.a}));n(/*! ./sugar/Column */"IBYe"),n(/*! ./sugar/ColumnGroup */"6eGT");var a=n(/*! ./utils/legacyUtil */"hW8S");n.d(t,"a",(function(){return a.a})),t.c=r.b},"6eGT": +/*!*******************************************************!*\ + !*** ./node_modules/rc-table/es/sugar/ColumnGroup.js ***! + \*******************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";t.a=function(e){return null}},"7Cbv": +/*!**************************************************************!*\ + !*** ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function a(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}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 s=function(e){return"string"==typeof e&&o.test(e)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};t.a=function(e,t,n){var r=(e=e||{}).random||(e.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return u(r)}},"7ahc": +/*!*************************************************************!*\ + !*** ./src/components/markdown-editor/code-block/index.tsx ***! + \*************************************************************/ +/*! exports provided: default, MyCodeMirror */ +/*! exports used: MyCodeMirror, default */function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),a=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),o=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),c=n(/*! react */"q1tI"),u=n.n(c),h=n(/*! codemirror */"VrN/"),d=n.n(h),f=(n(/*! codemirror/lib/codemirror.css */"p77/"),n(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},m={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 g(e){var t=e.value,n=e.onChange,i=e.mode,a=e.options,o=void 0===a?{}:a,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(s.a)(h,2),p=f[0],m=f[1];return Object(c.useEffect)((function(){if(p){function e(e){var t=e.getValue();n&&n(t)}return p.on("change",e),function(){p.off("change",e)}}}),[p,n]),Object(c.useEffect)((function(){p&&p.setOption("mode",i)}),[p,i]),Object(c.useEffect)((function(){p&&(t===p.getValue()&&""!==t||setTimeout((function(){p.setValue(t||" ")}),300))}),[p,t]),Object(c.useEffect)((function(){if(l.current&&!p){var e=d.a.fromTextArea(l.current,Object(r.a)({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},o));m(e)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}t.b=function(e){var t=e.callback,n=e.onCancel,r=Object(c.useState)("python"),h=Object(s.a)(r,2),d=h[0],v=h[1];return u.a.createElement(o.a,Object(i.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)}}),u.a.createElement(o.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(e){v(m[e][1])}},Object.keys(m).map((function(e){return u.a.createElement(f,{key:e,value:e},m[e][0])})))),u.a.createElement(o.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(g,{mode:d})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(a.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(a.a,{type:"ghost",onClick:n},"取消")))}},"7ixt": +/*!**************************************************!*\ + !*** ./node_modules/rc-tooltip/es/placements.js ***! + \**************************************************/ +/*! exports provided: placements, default */ +/*! exports used: placements */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r={adjustX:1,adjustY:1},i=[0,0],a={left:{points:["cr","cl"],overflow:r,offset:[-4,0],targetOffset:i},right:{points:["cl","cr"],overflow:r,offset:[4,0],targetOffset:i},top:{points:["bc","tc"],overflow:r,offset:[0,-4],targetOffset:i},bottom:{points:["tc","bc"],overflow:r,offset:[0,4],targetOffset:i},topLeft:{points:["bl","tl"],overflow:r,offset:[0,-4],targetOffset:i},leftTop:{points:["tr","tl"],overflow:r,offset:[-4,0],targetOffset:i},topRight:{points:["br","tr"],overflow:r,offset:[0,-4],targetOffset:i},rightTop:{points:["tl","tr"],overflow:r,offset:[4,0],targetOffset:i},bottomRight:{points:["tr","br"],overflow:r,offset:[0,4],targetOffset:i},rightBottom:{points:["bl","br"],overflow:r,offset:[4,0],targetOffset:i},bottomLeft:{points:["tl","bl"],overflow:r,offset:[0,4],targetOffset:i},leftBottom:{points:["br","bl"],overflow:r,offset:[-4,0],targetOffset:i}}},"815F": +/*!***************************************************!*\ + !*** ./node_modules/rc-tree/es/utils/treeUtil.js ***! + \***************************************************/ +/*! exports provided: getKey, warningWithoutKey, convertTreeToData, flattenTreeData, traverseDataNodes, convertDataToEntities, getTreeNodeProps, convertNodePropsToEventData */ +/*! exports used: convertDataToEntities, convertNodePropsToEventData, convertTreeToData, flattenTreeData, getKey, getTreeNodeProps */function(e,t,n){"use strict";n.d(t,"e",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return h})),n.d(t,"a",(function(){return f})),n.d(t,"f",(function(){return p})),n.d(t,"b",(function(){return m}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! rc-util/es/Children/toArray */"Zm9Q"),s=n(/*! rc-util/es/warning */"Kwbf"),l=n(/*! ../util */"OZM5");function c(e,t){return null!=e?e:t}function u(e){return function e(t){return Object(o.a)(t).map((function(t){if(!Object(l.i)(t))return Object(s.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,o=r.children,c=Object(a.a)(r,["children"]),u=Object(i.a)({key:n},c),h=e(o);return h.length&&(u.children=h),u})).filter((function(e){return e}))}(e)}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===t?[]:t),a=[];function o(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.map((function(u,h){var d=Object(l.h)(s?s.pos:"0",h),f=c(u.key,d),p=Object(i.a)(Object(i.a)({},u),{},{parent:s,pos:d,children:null,data:u,isStart:[].concat(Object(r.a)(s?s.isStart:[]),[0===h]),isEnd:[].concat(Object(r.a)(s?s.isEnd:[]),[h===e.length-1])});return a.push(p),!0===t||n.has(f)?p.children=o(u.children||[],p):p.children=[],p}))}return o(e),a}function d(e,t,n){var r;n?"string"==typeof n?r=function(e){return e[n]}:"function"==typeof n&&(r=function(e){return n(e)}):r=function(e,t){return c(e.key,t)},function n(i,a,o){var s=i?i.children:e,c=i?Object(l.h)(o.pos,a):"0";if(i){var u=r(i,c),h={node:i,index:a,pos:c,key:u,parentPos:o.node?o.pos:null,level:o.level+1};t(h)}s&&s.forEach((function(e,t){n(e,t,{node:i,pos:c,level:o?o.level+1:-1})}))}(null)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,a=arguments.length>2?arguments[2]:void 0,o={},s={},l={posEntities:o,keyEntities:s};return n&&(l=n(l)||l),d(e,(function(e){var t=e.node,n=e.index,i=e.pos,a=e.key,u=e.parentPos,h={node:t,index:n,key:a,pos:i,level:e.level},d=c(a,i);o[i]=h,s[d]=h,h.parent=o[u],h.parent&&(h.parent.children=h.parent.children||[],h.parent.children.push(h)),r&&r(h,l)}),a),i&&i(l),l}function p(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,a=t.loadingKeys,o=t.checkedKeys,s=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,u=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==i.indexOf(e),loading:-1!==a.indexOf(e),checked:-1!==o.indexOf(e),halfChecked:-1!==s.indexOf(e),pos:String(u?u.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function m(e){var t=e.data,n=e.expanded,r=e.selected,a=e.checked,o=e.loaded,l=e.loading,c=e.halfChecked,u=e.dragOver,h=e.dragOverGapTop,d=e.dragOverGapBottom,f=e.pos,p=e.active,m=Object(i.a)(Object(i.a)({},t),{},{expanded:n,selected:r,checked:a,loaded:o,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:h,dragOverGapBottom:d,pos:f,active:p});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Object(s.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}},"8EBN": +/*!**********************************************!*\ + !*** ./node_modules/codemirror/mode/meta.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.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 t=0;t-1&&t.substring(i+1,t.length);if(a)return e.findModeByExtension(a)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n0?d.a.createElement("span",null,"(已拆分",h,"个zip包)"):"")}),i===(null==n?void 0:n.length)-1?A(r,h>0?h+1:0):l>943718400?(h++,l=0,_(h,(function(){i++,f()}))):(i++,f());case 3:case"end":return e.stop()}}),e)}))),2600)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)},f=function(){return p.apply(this,arguments)},n=t||c,k(!0),i=0,l=0,h=0,r=o.a.info({width:460,title:d.a.createElement("div",null,"正在导出附件,",d.a.createElement("span",{className:"c-red"},"请勿关闭或操作当前浏览器窗口")),content:d.a.createElement("div",null,"当前进度: ",d.a.createElement("span",{className:"c-blue"},i+1),"/",null==n?void 0:n.length),maskClosable:!1,okText:"我知道了",onOk:function(){}}),f();case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(e,t,n,r){var i=t,a=new window.XMLHttpRequest;return a.withCredentials=!0,a.addEventListener("load",(function(e){n(e,a)}),!1),a.addEventListener("error",(function(e){r&&r(e)}),!1),a.responseType="blob",a.open("GET",i),a.send(null),a},_=function(e,t){S.current.generateAsync({type:"blob"}).then((function(n){var r=document.createElement("a");r.href=window.URL.createObjectURL(n),r.download=f+"-".concat(e)+".zip",document.body.appendChild(r);var i=document.createEvent("MouseEvents");i.initEvent("click",!1,!1),r.dispatchEvent(i),document.body.removeChild(r),S.current=new p.a,t()}))},A=function(e,t){S.current.generateAsync({type:"blob"}).then((function(n){var r=document.createElement("a");r.href=window.URL.createObjectURL(n),r.download=t>0?f+"-".concat(t)+".zip":f+".zip",document.body.appendChild(r);var i=document.createEvent("MouseEvents");i.initEvent("click",!1,!1),r.dispatchEvent(i),document.body.removeChild(r),e.destroy(),k(!1),x(),S.current=new p.a}))};return y?d.a.createElement(d.a.Fragment,null):d.a.createElement(r.a,Object(i.a)({},v,{onClick:function(){return O()},loading:E}),"下载")};t.a=Object(h.forwardRef)(g)},"8hTe": +/*!******************************************************!*\ + !*** ./src/components/RenderHtml/index.less?modules ***! + \******************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={button:"button___1wy9m"}},"9Bee": +/*!*********************************************************!*\ + !*** ./src/components/RenderHtml/index.tsx + 3 modules ***! + \*********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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/RenderHtml/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/PreviewAll/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hls.js/dist/hls.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/katex/dist/katex.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/lib/marked.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/src/helpers.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("DYRE");var r=n("zeV3"),i=(n("+L6B"),n("2/Rp")),a=n("k1fw"),o=n("9og8"),s=n("tJVT"),l=n("WmNS"),c=n.n(l),u=n("q1tI"),h=n.n(u),d=(n("vg9a"),n("DlQD")),f=n.n(d),p=n("rUJ1");var m=[],g=["
      "],v=new f.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){m.length=0,g=["
        "]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(){return function e(t,n,r,i){if(n>=t.length||t[n].level<=r)return n;var a=t[n];i.push("
      • "+a.text+"");var o=[];return n=e(t,++n,a.level,o),o.length>0&&(i.push("
          "),o.forEach((function(e){i.push(e)})),i.push("
        ")),i.push("
      • "),n=e(t,n,r,i)}(m,0,0,g),g.push("
      "),g.join("")}var C={heading:function(e){var t=y.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:Object(s.a)(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||""),i=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(i)>=0){var a=S(),o=r;r=a,O[a]={type:"block",expression:o}}return{type:"code",raw:n,lang:i,text:r}}}},E=/(?:\${2})([^\n`]+?)(?:\${2})/gi,k=0,S=function(){return"__special_katext_id_".concat(k++,"__")},O={};function T(){k=0,O={}}function _(e){return e=e.replace(E,(function(e,t){var n=S();return O[n]={type:"inline",expression:t},n}))}var A=v.listitem;v.listitem=function(e){return A(_(e))};var L=v.paragraph;v.paragraph=function(e){return L(_(e))};var D=v.tablecell;v.tablecell=function(e,t){return D(_(e),t)},v.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"

      ".concat(e,"

      "):'
      ').concat(n?e:Object(p.escape)(e,!0),"
      \n"):'
      '+(n?e:Object(p.escape)(e,!0))+"
      "},v.heading=function(e,t,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:r,level:t,text:e}),"'+e+""},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:C,renderer:v});var R=f.a,M=(n("SJMd"),n("ulZh")),I=n.n(M),j=n("m3rI"),N=n("Oy/b"),P=n("p5ED"),F=n("ErOA"),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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function H(e,t){function n(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function U(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function z(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]',"select"),this.addActionButton(n,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'',"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(e){var n=document.createElement("div");n.className=""+t.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",e.typeName),n.innerHTML=e.icon,n.addEventListener("click",(function(){t.markerToolbarButtonClicked(n,e)})),t.buttons.push(n),t.markerButtons.push(n)})),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()},e.prototype.addButtonClickListener=function(e){this.buttonClickListeners.push(e)},e.prototype.removeButtonClickListener=function(e){this.buttonClickListeners.indexOf(e)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(e),1)},e.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},e.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var e=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t0&&this.buttonClickListeners.forEach((function(e){return e("marker",t)})),this.markerButtonOverflowBlock.style.display="none"},e.prototype.actionToolbarButtonClicked=function(e,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("action",t)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},e.prototype.setActiveButton=function(e){this.resetButtonStyles(),e.className=e.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),e.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},e.prototype.setActiveMarkerButton=function(e){var t=this.markerButtons.find((function(t){return t.getAttribute("data-type-name")===e}));t&&this.setActiveButton(t)},e.prototype.setCurrentMarker=function(e){var t=this;this.currentMarker=e,this.buttons.filter((function(e){return/delete|notes/.test(e.getAttribute("data-action"))})).forEach((function(e){void 0===t.currentMarker?(e.style.fillOpacity="0.4",e.style.pointerEvents="none"):(e.style.fillOpacity="1",e.style.pointerEvents="all")}))},e}(),Z=function(){function e(e,t,n,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=e,this.displayMode=t,this.uiStyleSettings=n,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return e.prototype.addStyles=function(){var e;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 t=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!==(e=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==e?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"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 "))},e.prototype.show=function(e){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==t?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},e.prototype.setPanelButtons=function(e){var t,n,r=this;this.panels=e,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==t?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(e){var t;e.uiStyleSettings=r.uiStyleSettings;var n=document.createElement("div");n.className=r.toolboxButtonStyleClass.name+" "+(null!==(t=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==t?t:r.toolboxButtonStyleColorsClass.name),n.innerHTML=e.icon,n.title=e.title,n.addEventListener("click",(function(){r.panelButtonClick(e)})),r.panelButtons.push(n),r.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},e.prototype.panelButtonClick=function(e){var t=this,n=-1;if(e!==this.activePanel){n=this.panels.indexOf(e),this.panelRow.innerHTML="";var r=e.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=e}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===t.displayMode?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(e,r){var i,a;e.className=t.toolboxButtonStyleClass.name+" "+(r===n?""+(null!==(i=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==i?i:t.toolboxActiveButtonStyleColorsClass.name):""+(null!==(a=t.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==a?a:t.toolboxButtonStyleColorsClass.name))}))},e}(),Q=function(e,t){this.title=e,this.icon=t},ee=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.colors=[],a.addTransparent=!1,a.colorBoxes=[],a.colors=n,a.currentColor=r,a.setCurrentColor=a.setCurrentColor.bind(a),a.getColorBox=a.getColorBox.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.colors.forEach((function(n){var r=e.getColorBox(n);t.appendChild(r),e.colorBoxes.push(r)})),t},t.prototype.getColorBox=function(e){var t=this,n=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-n,i=document.createElement("div");i.style.display="inline-block",i.style.boxSizing="content-box",i.style.width=r-2+"px",i.style.height=r-2+"px",i.style.padding="1px",i.style.marginRight="2px",i.style.marginBottom="2px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderRadius=(r+2)/2+"px",i.style.borderColor=e===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentColor(e,i)}));var a=document.createElement("div");return a.style.display="inline-block",a.style.width=r-2+"px",a.style.height=r-2+"px",a.style.backgroundColor=e,a.style.borderRadius=r/2+"px","transparent"===e&&(a.style.fill=this.uiStyleSettings.toolboxAccentColor,a.innerHTML='\n \n '),i.appendChild(a),i},t.prototype.setCurrentColor=function(e,t){var n=this;this.currentColor=e,this.colorBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(e)},t}(Q),te=function(){function e(e,t,n){this._state="new",this._isSelected=!1,this._container=e,this._overlayContainer=t,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(e.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!1},Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},e.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},e.prototype.pointerDown=function(e,t){},e.prototype.dblClick=function(e,t){},e.prototype.manipulate=function(e){},e.prototype.pointerUp=function(e){this.stateChanged()},e.prototype.dispose=function(){},e.prototype.addMarkerVisualToContainer=function(e){this.container.childNodes.length>0?this.container.insertBefore(e,this.container.childNodes[0]):this.container.appendChild(e)},e.prototype.getState=function(){return{typeName:e.typeName,state:this.state,notes:this.notes}},e.prototype.restoreState=function(e){this._state=e.state,this.notes=e.notes},e.prototype.scale=function(e,t){},e.prototype.colorChanged=function(e){this.onColorChanged&&this.onColorChanged(e),this.stateChanged()},e.prototype.fillColorChanged=function(e){this.onFillColorChanged&&this.onFillColorChanged(e),this.stateChanged()},e.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var e=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),e.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(e)&&this.onStateChanged(this)}},e.typeName="MarkerBase",e}(),ne=function(){function e(){this.findGripByVisual=this.findGripByVisual.bind(this)}return e.prototype.findGripByVisual=function(e){return this.topLeft.ownsTarget(e)?this.topLeft:this.topCenter.ownsTarget(e)?this.topCenter:this.topRight.ownsTarget(e)?this.topRight:this.centerLeft.ownsTarget(e)?this.centerLeft:this.centerRight.ownsTarget(e)?this.centerRight:this.bottomLeft.ownsTarget(e)?this.bottomLeft:this.bottomCenter.ownsTarget(e)?this.bottomCenter:this.bottomRight.ownsTarget(e)?this.bottomRight:void 0},e}(),re=function(){function e(){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 e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e}(),ie=function(){function e(){}return e.toITransformMatrix=function(e){return{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}},e.toSVGMatrix=function(e,t){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},e}(),ae=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(W.createTransform()),i.setupControlBox(),i}return H(t,e),Object.defineProperty(t.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visual",{get:function(){return this._visual},set:function(e){this._visual=e;var t=W.createTransform();this._visual.transform.baseVal.appendItem(t)},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!!(void 0!==this.controlGrips.findGripByVisual(t)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(t);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(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},t.prototype.moveVisual=function(e){this.visual.style.transform="translate("+e.x+"px, "+e.y+"px)"},t.prototype.manipulate=function(e){var t=this.unrotatePoint(e);"creating"===this.state?this.resize(e):"move"===this.state?(this.left=this.manipulationStartLeft+(t.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(t.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(t):"rotate"===this.state&&this.rotate(e)},t.prototype.resize=function(e){var t=this.manipulationStartLeft,n=this.manipulationStartWidth,r=this.manipulationStartTop,i=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:t=this.manipulationStartLeft+e.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-t;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+e.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+e.y-this.manipulationStartY,i=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:i=this.manipulationStartHeight+e.y-this.manipulationStartY}n>=0?(this.left=t,this.width=n):(this.left=t+n,this.width=-n),i>=0?(this.top=r,this.height=i):(this.top=r+i,this.height=-i),this.setSize()},t.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},t.prototype.rotate=function(e){if(Math.abs(e.x-this.centerX)>.1){var t=Math.sign(e.x-this.centerX);this.rotationAngle=180*Math.atan((e.y-this.centerY)/(e.x-this.centerX))/Math.PI+90*t,this.applyRotation()}},t.prototype.applyRotation=function(){var e=this.container.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(e,0)},t.prototype.rotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM(),n=W.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.unrotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM();t=t.inverse();var n=W.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=W.createGroup();var e=W.createTransform();e.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(e),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 ne,this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){var e=this.controlBox.transform.baseVal.getItem(0);e.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(e,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),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()},t.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()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.controlGrips.topLeft.GRIP_SIZE,t=-e/2,n=t,r=(this.width+this.CB_DISTANCE)/2-e/2,i=(this.height+this.CB_DISTANCE)/2-e/2,a=this.height+this.CB_DISTANCE-e/2,o=this.width+this.CB_DISTANCE-e/2;this.positionGrip(this.controlGrips.topLeft.visual,t,n),this.positionGrip(this.controlGrips.topCenter.visual,r,n),this.positionGrip(this.controlGrips.topRight.visual,o,n),this.positionGrip(this.controlGrips.centerLeft.visual,t,i),this.positionGrip(this.controlGrips.centerRight.visual,o,i),this.positionGrip(this.controlGrips.bottomLeft.visual,t,a),this.positionGrip(this.controlGrips.bottomCenter.visual,r,a),this.positionGrip(this.controlGrips.bottomRight.visual,o,a),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,n-3*this.CB_DISTANCE)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.hideControlBox=function(){this.controlBox.style.display="none"},t.prototype.showControlBox=function(){this.controlBox.style.display=""},t.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ie.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ie.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*t,y:r.y*n});this.left=i.x,this.top=i.y,this.width=this.width*t,this.height=this.height*n,this.adjustControlBox()},t}(te),oe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&W.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&W.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&W.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&W.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.title="Rectangle marker",t}(ae),se=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.widths=[],a.widthBoxes=[],a.widths=n,a.currentWidth=r,a.setCurrentWidth=a.setCurrentWidth.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.widths.forEach((function(n){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=n===e.currentWidth?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentWidth(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=n.toString(),i.style.marginRight="5px",r.appendChild(i);var a=document.createElement("div");a.style.minHeight="20px",a.style.flexGrow="2",a.style.display="flex",a.style.alignItems="center";var o=document.createElement("hr");o.style.minWidth="20px",o.style.border="0px",o.style.borderTop=n+"px solid "+e.uiStyleSettings.toolboxColor,o.style.flexGrow="2",a.appendChild(o),r.appendChild(a),e.widthBoxes.push(r)})),t},t.prototype.setCurrentWidth=function(e,t){var n=this;this.currentWidth=e,this.widthBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},t}(Q),le=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.styles=[],a.styleBoxes=[],a.styles=n,a.currentStyle=r,a.setCurrentStyle=a.setCurrentStyle.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.styles.forEach((function(n){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/e.styles.length-5+"%",r.style.borderColor=n===e.currentStyle?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentStyle(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.minHeight="20px",i.style.flexGrow="2",i.style.overflow="hidden";var a='\n \n ";i.innerHTML=a,r.appendChild(i),e.styleBoxes.push(r)})),t},t.prototype.setCurrentStyle=function(e,t){var n=this;this.currentStyle=e,this.styleBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},t}(Q),ce=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return H(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="FrameMarker",t.title="Frame marker",t.icon='',t}(oe),ue=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},he=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return H(t,e),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartX=t.x,this.manipulationStartY=t.y,"new"===this.state&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.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(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"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(t),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},t.prototype.adjustVisual=function(){},t.prototype.manipulate=function(e){"creating"===this.state?this.resize(e):"move"===this.state?(this.x1=this.manipulationStartX1+e.x-this.manipulationStartX,this.y1=this.manipulationStartY1+e.y-this.manipulationStartY,this.x2=this.manipulationStartX2+e.x-this.manipulationStartX,this.y2=this.manipulationStartY2+e.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(e)},t.prototype.resize=function(e){switch(this.activeGrip){case this.grip1:this.x1=e.x,this.y1=e.y;break;case this.grip2:case void 0:this.x2=e.x,this.y2=e.y}this.adjustVisual(),this.adjustControlBox()},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=W.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){this.positionGrips()},t.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-e/2,this.y1-e/2),this.positionGrip(this.grip2.visual,this.x2-e/2,this.y2-e/2)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.x1=this.x1*t,this.y1=this.y1*n,this.x2=this.x2*t,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},t}(te),de=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},t.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},t.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()]]))},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},t.typeName="LineMarker",t.title="Line marker",t.icon='',t}(he),fe=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.fonts=[],a.fontBoxes=[],a.fonts=n,a.currentFont=r,a.setCurrentFont=a.setCurrentFont.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.flexGrow="2",this.fonts.forEach((function(n){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/e.fonts.length-5+"%",r.style.borderColor=n===e.currentFont?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentFont(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.display="flex",i.style.minHeight="20px",i.style.flexGrow="2",i.style.fontFamily=n,i.style.overflow="hidden";var a=document.createElement("div");a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.innerHTML="The quick brown fox jumps over the lazy dog",i.appendChild(a),r.appendChild(i),e.fontBoxes.push(r)})),t},t.prototype.setCurrentFont=function(e,t){var n=this;this.currentFont=e,this.fontBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},t}(Q),pe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.padding=5,i.DEFAULT_TEXT="your text here",i.text=i.DEFAULT_TEXT,i.isMoved=!1,i.color=r.defaultColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setColor=i.setColor.bind(i),i.setFont=i.setFont.bind(i),i.renderText=i.renderText.bind(i),i.sizeText=i.sizeText.bind(i),i.textEditDivClicked=i.textEditDivClicked.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.setSize=i.setSize.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i}return H(t,e),t.prototype.ownsTarget=function(t){if(e.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(e){e===t&&(n=!0)})),n},t.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()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.renderText=function(){var e=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(t){e.textElement.appendChild(W.createTSpan(""===t.trim()?" ":t.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},t.prototype.getTextScale=function(){var e=this.textElement.getBBox(),t=1;if(e.width>0&&e.height>0){var n=(1*this.width-this.width*this.padding*2/100)/e.width,r=(1*this.height-this.height*this.padding*2/100)/e.height;t=Math.min(n,r)}return t},t.prototype.getTextPosition=function(e){var t=this.textElement.getBBox(),n=0,r=0;return t.width>0&&t.height>0&&(n=(this.width-t.width*e)/2,r=this.height/2-t.height*e/2),{x:n,y:r}},t.prototype.sizeText=function(){var e=this.textElement.getBBox(),t=this.getTextScale(),n=this.getTextPosition(t);n.y-=e.y*t,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+t+", "+t+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(t,t))},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.sizeText()},t.prototype.setSize=function(){e.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()]]))},t.prototype.pointerUp=function(t){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),e.prototype.pointerUp.call(this,t),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.showTextEditor=function(){var e=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(e){e.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var t=Number.parseFloat(e.textEditor.style.fontSize);e.textEditor.clientWidth>=Number.parseInt(e.textEditor.style.maxWidth)&&t>.9;)t-=.1,e.textEditor.style.fontSize=Math.max(t,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(e){if(e.clipboardData){var t=e.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(t)),e.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){e.textEditDivClicked(e.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},t.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var e=this.getTextScale(),t=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),r={x:n.width*e,y:n.height*e};t.x-=r.x/2,t.y-=r.y/2,this.textEditor.style.top=t.y+"px",this.textEditor.style.left=t.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-t.x+"px",this.textEditor.style.fontSize=Math.max(16*e,12)+"px",this.textElement.style.display="none"}},t.prototype.textEditDivClicked=function(e){this.text=e.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},t.prototype.select=function(){e.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},t.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),e.prototype.deselect.call(this)},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setColor=function(e){this.textElement&&W.setAttributes(this.textElement,[["fill",e]]),this.color=e,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(e)},t.prototype.setFont=function(e){this.textElement&&W.setAttributes(this.textElement,[["font-family",e]]),this.fontFamily=e,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},t.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},t.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize(),this.sizeText(),this.positionTextEditor()},t.typeName="TextMarker",t.title="Text marker",t.icon='',t}(ae),me=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},t.prototype.createVisual=function(){this.visual=W.createGroup(),this.drawingImage=W.createImage(),this.visual.appendChild(this.drawingImage);var e=W.createTransform();this.visual.transform.baseVal.appendItem(e),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){"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(t.x,t.y),this.drawing=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.manipulate=function(t){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):e.prototype.pointerUp.call(this,t)},t.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)},t.prototype.select=function(){"creating"===this.state&&this.finishCreation(),e.prototype.select.call(this)},t.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),e.prototype.deselect.call(this)},t.prototype.finishCreation=function(){for(var e=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),t=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=t[0],r=t[1],i=t[2],a=t[3],o=!1,s=0;s0&&(o=!0,sa&&(a=s),l>i&&(i=l));if(o){this.left=n/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(i-n)/this.pixelRatio,this.height=(a-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=i-n,c.height=a-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,r,i-n,a-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},t.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})},t.prototype.setColor=function(e){this.color=e,this.colorChanged(e)},t.prototype.setLineWidth=function(e){this.lineWidth=e},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){this.createVisual(),e.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setDrawingImage()},t.typeName="FreehandMarker",t.title="Freehand marker",t.icon='',t}(ae),ge=function(e){function t(t,n,r){var i=e.call(this,t,r||'')||this;return i.typeBoxes=[],i.currentType=n,i.setCurrentType=i.setCurrentType.bind(i),i}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2";for(var n=function(n){var i="both";switch(n){case 0:i="both";break;case 1:i="start";break;case 2:i="end";break;case 3:i="none"}var a=document.createElement("div");if(a.style.display="flex",a.style.flexGrow="2",a.style.alignItems="center",a.style.justifyContent="space-between",a.style.padding="5px",a.style.borderWidth="2px",a.style.borderStyle="solid",a.style.borderColor=i===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",a.addEventListener("click",(function(){e.setCurrentType(i,a)})),t.appendChild(a),"both"===i||"start"===i){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",a.appendChild(o)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.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",s.appendChild(l),a.appendChild(s),"both"===i||"end"===i){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",a.appendChild(c)}r.typeBoxes.push(a)},r=this,i=0;i<4;i++)n(i);return t},t.prototype.setCurrentType=function(e,t){var n=this;this.currentType=e,this.typeBoxes.forEach((function(e){e.style.borderColor=e===t?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},t}(Q),ve=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new ge("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},t.prototype.getArrowPoints=function(e,t){var n=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return e-n/2+","+(t+r/2)+" "+e+","+(t-r/2)+" "+(e+n/2)+","+(t+r/2)},t.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.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 t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},t.prototype.setArrowType=function(e){this.arrowType=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},t.typeName="ArrowMarker",t.title="Arrow marker",t.icon='',t}(de),ye=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new ee("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return H(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="CoverMarker",t.title="Cover marker",t.icon='',t}(oe),be=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.opacities=[],a.opacityBoxes=[],a.opacities=n,a.currentOpacity=r,a.setCurrentOpacity=a.setCurrentOpacity.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",t.style.justifyContent="space-between",this.opacities.forEach((function(n){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=n===e.currentOpacity?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentOpacity(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=100*n+"%",r.appendChild(i),e.opacityBoxes.push(r)})),t},t.prototype.setCurrentOpacity=function(e,t){var n=this;this.currentOpacity=e,this.opacityBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},t}(Q),xe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new ee("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new be("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return H(t,e),t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&W.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="HighlightMarker",t.title="Highlight marker",t.icon='',t}(ye),we='',Ce=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new ee("Text color",r.defaultColorSet,i.color,''),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new ee("Fill color",r.defaultColorSet,i.bgColor,we),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new re,i.tipGrip.visual.transform.baseVal.appendItem(W.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return H(t,e),t.prototype.ownsTarget=function(t){return e.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},t.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)},t.prototype.pointerDown=function(t,n){"new"===this.state&&e.prototype.pointerDown.call(this,t,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,e.prototype.pointerUp.call(this,t);else{var n="creating"===this.state;e.prototype.pointerUp.call(this,t),this.setTipPoints(n),this.positionTip()}},t.prototype.manipulate=function(t){if(this.tipMoving){var n=this.unrotatePoint(t);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else e.prototype.manipulate.call(this,t)},t.prototype.setBgColor=function(e){this.bgRectangle&&this.tip&&(W.setAttributes(this.bgRectangle,[["fill",e]]),W.setAttributes(this.tip,[["fill",e]])),this.bgColor=e,this.fillColorChanged(e)},t.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},t.prototype.setTipPoints=function(e){void 0===e&&(e=!1);var t=Math.min(this.height/2,15),n=this.height/5;e&&(this.tipPosition={x:t+n/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 t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},t.typeName="MeasurementMarker",t.title="Measurement marker",t.icon='',t}(de),Se=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return H(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="EllipseFrameMarker",t.title="Ellipse frame marker",t.icon='',t}(Ee),Oe=function(){function e(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),e.prototype.addUndoStep=function(e){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},e.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},e.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},e.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return void 0!==e&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},e.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},e}(),Te=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},t.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},t.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=t.x,this.curveY=t.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},t.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()]]))},t.prototype.setupControlBox=function(){e.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)},t.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,e.prototype.addControlGrips.call(this)},t.prototype.positionGrips=function(){e.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/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()))},t.prototype.manipulate=function(t){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),e.prototype.resize.call(this,t),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual()},t.prototype.scale=function(t,n){this.curveX=this.curveX*t,this.curveY=this.curveY*n,e.prototype.scale.call(this,t,n)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},t.typeName="CurveMarker",t.title="Curve marker",t.icon='',t}(he),_e=function(){function e(e,t){void 0===t&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(e.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){this._defaultPrevented=!0},e}(),Ae=function(e){function t(t,n,r){var i=e.call(this,t,!1)||this;return i.dataUrl=n,i.state=r,i}return H(t,e),t}(_e),Le=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,r)||this;return i.marker=n,i}return H(t,e),t}(_e),De=function(){function e(){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 e.prototype.addEventListener=function(e,t){this[e].push(t)},e.prototype.removeEventListener=function(e,t){var n=this[e].indexOf(t);n>-1&&this[e].splice(n,1)},e}(),Re=function(){function e(t){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ue,this._isOpen=!1,this.undoRedoManager=new Oe,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 De,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=e.instanceCounter++,this.styles=new q(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=t,this.targetRoot=document.body,this.width=t.clientWidth,this.height=t.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(e.prototype,"ALL_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,Se,Ee,xe,Ce,ke,ye,de,Te]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,Ee,xe,Ce]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(e){if("string"==typeof e){var n=t.ALL_MARKER_TYPES.find((function(t){return t.typeName===e}));void 0!==n&&t._availableMarkerTypes.push(n)}else t._availableMarkerTypes.push(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),G.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},e.prototype.show=function(){var e=this;void 0===this.styles.styleSheetRoot&&void 0!==Y.styleSheetRoot&&(this.styles.styleSheetRoot=Y.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new _e(e))}))},e.prototype.render=function(){return U(this,void 0,void 0,(function(){var e;return z(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new K).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},e.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isOpen){var n=!1;e||this.eventListeners.beforeclose.forEach((function(e){var r=new _e(t,!0);e(r),r.defaultPrevented&&(n=!0)})),n||(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(e){return e(new _e(t))})),this.detachEvents(),this._isOpen=!1)}},e.prototype.addMarkersToToolbar=function(){for(var e,t=[],n=0;nthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,n=t',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},e.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")},e.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"},e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},e.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 e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"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 J(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1","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(e),1),e.dispose()},e.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())},e.prototype.toolbarButtonClicked=function(e,t){if("marker"===e&&void 0!==t)this.createNewMarker(t);else if("action"===e)switch(t){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()}},e.prototype.deleteSelectedMarker=function(){var e=this;if(void 0!==this._currentMarker){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Le(e,e._currentMarker,!0);n(r),r.defaultPrevented&&(t=!0)})),!t){var n=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(t){return t(new Le(e,n))}))}}},e.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Le(e,void 0,!0);n(r),r.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var n=function(t){var n=r.markers[t];r.setCurrentMarker(r.markers[t]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(t){return t(new Le(e,n))}))},r=this,i=this.markers.length-1;i>=0;i--)n(i);this.addUndoStep()}},Object.defineProperty(e.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),e.prototype.showNotesEditor=function(){var e;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!==(e=this._currentMarker.notes)&&void 0!==e?e:"",this.overlayContainer.appendChild(this.notesArea))},e.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)},e.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},e.prototype.addUndoStep=function(){var e=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var t=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===t.width&&n.height===t.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),r1&&this.panTo({x:e.clientX,y:e.clientY}))},e.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep()},e.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},e.prototype.onKeyUp=function(e){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==e.key&&"Backspace"!==e.key||this.deleteSelectedMarker()},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.markerImage.getBoundingClientRect();return{x:(e-n.left)/this.zoomLevel,y:(t-n.top)/this.zoomLevel}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.addLicenseKey=function(e){G.addKey(e)},e.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},e.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),e.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new _e(e))})))},e.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new _e(e))})))},e.instanceCounter=0,e}(),Me=function(e,t){return(Me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}; +/* ********************************** +cropro version 1.2.0 +@license SEE LICENSE IN LICENSE + +copyright Alan Mendelevich +see README and LICENSE for details +********************************** */ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */function Ie(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Me(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function je(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function Ne(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&t>0){var n=new Ye(e,t),r=n.ratio>=1?20:n.getHorizontalLength(20),i=n.ratio<1?20:n.getVerticalLength(20),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(a);var o=Fe.createDefs();a.appendChild(o);var s=Fe.createElement("clipPath",[["id","text-bg-clip"]]);o.appendChild(s);var l=Fe.createPath(Fe.getHollowRectanglePath((24-r)/2,(24-i)/2,r,i,(24-r)/2+2,(24-i)/2+2,r-4,i-4));a.appendChild(l);var c=Fe.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Fe.createTSpan(e+":"+t)),a.appendChild(c);var u=c.getBBox();Fe.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=Fe.createPath(Fe.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 s.appendChild(h),Fe.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(a),a.outerHTML}return''},e}(),Xe=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.isDropdownOpen=!1,i.onClick=i.dropdownButtonClicked,i.dropdownButtons=r,i}return Ie(t,e),t.prototype.setupDropdown=function(){var e=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(t){t.className=e.className,t.colorsClassName=e.colorsClassName,e.dropdownBlock.appendChild(t.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},t.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},t.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},t.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},t.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},t.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},t}(Ge),$e=function(){function e(e,t){this.GRIP_SIZE=10,this.color=e,this.fillColor=t,this.visual=Fe.createGroup(),this.visual.appendChild(Fe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Fe.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e.prototype.setCenter=function(e,t){this.visual.childNodes.forEach((function(n){return Fe.setAttributes(n,[["cx",e.toString()],["cy",t.toString()]])}))},e}(),Je=function(){function e(e,t,n,r){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=e,this.canvasHeight=t,this.margin=n,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(e.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(e){this._aspectRatio=e,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.gridContainer&&Fe.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),e.prototype.open=function(){var e=this;this.cropShadeElement=Fe.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Fe.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var t=0;tthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-t.height/2),Fe.setAttributes(this.cropRectElement,[["x",t.x.toString()],["y",t.y.toString()],["width",t.width.toString()],["height",t.height.toString()]]);var n=t.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(e,r){var i=t.y+n*(r+1);Fe.setAttributes(e,[["x1",""+t.x],["y1",""+i],["x2",""+(t.x+t.width)],["y2",""+i]])}));var r=t.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(e,n){var i=t.x+r*(n+1);Fe.setAttributes(e,[["x1",""+i],["y1",""+t.y],["x2",""+i],["y2",""+(t.y+t.height)]])})),Fe.setAttributes(this.cropShadeElement,[["d",Fe.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,t.x,t.y,t.width,t.height)]]),this.topLeftGrip.setCenter(t.x,t.y),this.topRightGrip.setCenter(t.x+t.width,t.y),this.bottomLeftGrip.setCenter(t.x,t.y+t.height),this.bottomRightGrip.setCenter(t.x+t.width,t.y+t.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},e.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)},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.container.getBoundingClientRect();return{x:e-n.left+this.margin,y:t-n.top+this.margin}},e.prototype.onPointerDown=function(e){this.container.setPointerCapture(e.pointerId),this.previousPoint=this.clientToLocalCoordinates(e.clientX,e.clientY),this.cropRectElement===e.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(e.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(e.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(e.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(e.target)&&(this.activeGrip=this.bottomRightGrip)},e.prototype.onPointerMove=function(e){if(this.isMoving)this.move(this.clientToLocalCoordinates(e.clientX,e.clientY));else if(this.activeGrip){var t=this.clientToLocalCoordinates(e.clientX,e.clientY);this.resize(t)}e.preventDefault()},e.prototype.onPointerUp=function(e){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(e.pointerId)},e.prototype.move=function(e){var t=e.x-this.previousPoint.x,n=e.y-this.previousPoint.y;1!==this.zoomFactor&&(t=-t/this.zoomFactor,n=-n/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+t),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+n),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=e},e.prototype.resize=function(e){var t=Object.assign({},this.cropRect),n=e.x-this.previousPoint.x,r=e.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:t.x+nthis.canvasWidth*this.zoomFactor&&(n=this.canvasWidth*this.zoomFactor-t.width),t.width+=n}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(t.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(n),t.height=this.aspectRatio.getVerticalLength(t.width)):(t.y+=r,t.height=this.cropRect.y+this.cropRect.height-t.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?t.height=this.aspectRatio.getVerticalLength(t.width):t.height+=r}t.width<10&&(t.x=this.cropRect.x,t.width=10),t.height<10&&(t.y=this.cropRect.y,t.height=10),this.previousPoint=e,t.x>=this.margin&&t.y>=this.margin&&t.x-this.margin+t.width<=this.canvasWidth&&t.y-this.margin+t.height<=this.canvasHeight&&(this.cropRect=t,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},e.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var e=this.cropRect.x+this.cropRect.width/2,t=this.cropRect.y+this.cropRect.height/2,n=this.aspectRatio.getHorizontalLength(this.cropRect.height),r=this.aspectRatio.getVerticalLength(this.cropRect.width);n/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=e-this.cropRect.width/2,this.cropRect.y=t-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)}},e.prototype.getRescaledRect=function(e,t,n,r,i,a){var o=n/e,s=r/t;return{x:(i.x-a)*o+a,y:(i.y-a)*s+a,width:i.width*o,height:i.height*s}},e.prototype.scaleCanvas=function(e,t){var n=this.getRescaledRect(this.canvasWidth,this.canvasHeight,e,t,this.cropRect,this.margin);this.canvasWidth=e,this.canvasHeight=t,this.onCropChange&&this.onCropChange(n),this.setCropRectangle(n)},e}(),Ze=function(){function e(e){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=e,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(e.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),e.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},e.prototype.onPointerDown=function(e){this.controlContainer.setPointerCapture(e.pointerId),this.isDragging=!0,this.previousPoint={x:e.clientX,y:e.clientY}},e.prototype.onPointerMove=function(e){this.isDragging&&(this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.previousPoint.x=e.clientX)},e.prototype.onPointerUp=function(e){this.isDragging&&this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(e.pointerId)},e.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var e=this.angleLabelText.getBBox();Fe.setAttributes(this.angleLabelElement,[["x",((this.width-e.width)/2).toString()],["y",(this.height/2).toString()]])}},e.prototype.positionScaleShape=function(){if(this.scaleShape){var e=this.scaleShape.transform.baseVal.getItem(0);e.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(e,0)}},e.prototype.getVisual=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("width",this.width+"px"),e.setAttribute("height",this.height+"px"),e.setAttribute("viewBox","0 0 "+this.width+" "+this.height),e.style.flexShrink="0",document.body.appendChild(e);for(var t="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,n=1;n<=this.width/5+10;n++){var r=n%5==0?this.height/3:this.height/6;t+="h4v"+-r+"h1v"+r}t+="v1H0Z",this.scaleShape=Fe.createPath(t);var i=Fe.createTransform();this.scaleShape.transform.baseVal.appendItem(i),e.appendChild(this.scaleShape),this.angleLabelElement=Fe.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Fe.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var a=Fe.createTSpan("");return a.innerHTML="°",this.angleLabelElement.appendChild(a),e.appendChild(this.angleLabelElement),document.body.removeChild(e),e},e}(),Qe=function(){function e(){this.naturalSize=!1,this.imageType="image/png"}return e.prototype.rasterize=function(e,t,n,r,i,a,o){var s=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=e.width.baseVal.value-2*r,c.height=e.height.baseVal.value-2*r;var u=1,h=1;!0===s.naturalSize?(u=t.naturalWidth/(e.width.baseVal.value-2*r)/a,h=t.naturalHeight/(e.height.baseVal.value-2*r)/o,c.width=t.naturalWidth/a,c.height=t.naturalHeight/o):void 0!==s.width&&void 0!==s.height&&(u=s.width/n.width,h=s.height/n.height,c.width*=u,c.height*=h);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(i*Math.PI/180),d.scale(a,o),d.translate(-c.width/2,-c.height/2),d.drawImage(t,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=n.width*u,f.height=n.height*h,f.getContext("2d").putImageData(d.getImageData((n.x-r)*u,(n.y-r)*h,n.width*u,n.height*h),0,0),l(f.toDataURL(s.imageType,s.imageQuality))}))},e}(),et=function(){function e(t){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=e.instanceCounter++,this.styles=new Be(this.instanceNo),this.target=t,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(e){this._zoomToCropEnabled=e,e?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gridLines",{get:function(){return this._gridLines},set:function(e){this._gridLines=e,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(e){this._rotationAngle=e,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"aspectRatio",{get:function(){var e;return null!==(e=this._aspectRatio)&&void 0!==e?e:this.aspectRatios[0]},set:function(e){this._aspectRatio=e},enumerable:!1,configurable:!0}),e.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},e.prototype.show=function(){this.showUI(),this.open()},e.prototype.close=function(e){void 0===e&&(e=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),e||this.closeEventListeners.forEach((function(e){return e()})),this._isOpen=!1)},e.prototype.addRenderEventListener=function(e){this.renderEventListeners.push(e)},e.prototype.removeRenderEventListener=function(e){this.renderEventListeners.indexOf(e)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(e),1)},e.prototype.addCloseEventListener=function(e){this.closeEventListeners.push(e)},e.prototype.removeCloseEventListener=function(e){this.closeEventListeners.indexOf(e)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(e),1)},e.prototype.setupResizeObserver=function(){var e=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.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))},e.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.contentDiv.clientWidth/e>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*e:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,n=t+2*this.CANVAS_MARGINe+this.CANVAS_MARGIN?this.target.offsetTop-(e+this.CANVAS_MARGIN):0;this.coverDiv.style.top=t+"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},e.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},e.prototype.addTopToolbar=function(){var e=this;this.topToolbar=new ze,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 t=new We;t.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(t);var n=[];this.aspectRatios.forEach((function(t){var r=new Ge(qe.getIcon(t.horizontal,t.vertical),0===t.horizontal&&0===t.vertical?"FREE":t.horizontal+":"+t.vertical);r.onClick=function(){return e.ratioButtonClicked(t)},n.push(r)})),this.aspectRatioButton=new Xe(qe.getIcon(0,0),"Aspect ratio",n),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,t.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var r=new Ge('',"Toggle grid");r.isActive=this.isGridVisible,r.onClick=function(){e.isGridVisible=!e.isGridVisible,r.isActive=e.isGridVisible},t.addButton(r);var i=new Ge('',"Zoom to selection");if(i.isActive=this.zoomToCropEnabled,i.onClick=function(){e.zoomToCropEnabled=!e.zoomToCropEnabled,i.isActive=e.zoomToCropEnabled},t.addButton(i),!Pe.isLicensed){var a=new Ke;this.topToolbar.addElementBlock(a);var o=document.createElement("div");o.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var s=document.createElement("a");s.style.color="currentColor",s.href="https://markerjs.com/products/cropro",s.target="_blank",s.innerHTML='',o.appendChild(s),a.addElement(o)}var l=new We;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new Ge('',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new Ge('',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},e.prototype.addBottomToolbar=function(){var e=this;this.bottomToolbar=new ze,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 t=new We;t.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(t);var n=new Ge('',"Rotate left");n.onClick=this.rotateLeftButtonClicked,t.addButton(n);var r=new Ge('',"Rotate right");r.onClick=this.rotateRightButtonClicked,t.addButton(r);var i=new Ke;i.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(i),this.straightener=new Ze("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(t){e.rotateBy(t),e.straightener.angle=e.rotationAngle},i.addElement(this.straightener.getUI());var a=new We;a.minWidth=2*this.toolbarHeight+"px",a.contentAlign="end",this.bottomToolbar.addButtonBlock(a);var o=new Ge('',"Flip horizontal");o.onClick=this.flipHorizontallyButtonClicked,a.addButton(o);var s=new Ge('',"Flip vertical");s.onClick=this.flipVerticallyButtonClicked,a.addButton(s)},e.prototype.ratioButtonClicked=function(e){this.aspectRatio=e,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},e.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=qe.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},e.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new Ye(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},e.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},e.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},e.prototype.restoreState=function(e){if(e){var t=this.cropLayer.getRescaledRect(e.width,e.height,this.imageWidth,this.imageHeight,e.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(t),this.cropRectChanged(t),this.flippedHorizontally=e.flippedHorizontally,this.flippedVertically=e.flippedVertically,this.applyFlip(),this.rotationAngle=e.rotationAngle,this.applyRotation()}},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.cropImage.getBoundingClientRect();return{x:e-n.left,y:t-n.top}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var e=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.rotateLeftButtonClicked=function(){var e=this.rotationAngle-90;this.rotationAngle%90!=0&&(e+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateRightButtonClicked=function(){var e=this.rotationAngle+90;this.rotationAngle%90!=0&&(e-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateTo=function(e){e=(e=e>180?e-360:e)<=-180?e+360:e,this.rotationAngle=e,this.applyRotation()},e.prototype.rotateBy=function(e){this.rotateTo((this.rotationAngle+e)%360)},e.prototype.applyRotation=function(){var e=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var t=this.editingTargetRotationContainer.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(t,0);var n=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/n.width,this.imageHeight/n.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=e},e.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},e.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},e.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},e.prototype.startRenderAndClose=function(){return je(this,void 0,void 0,(function(){var e,t;return Ne(this,(function(n){switch(n.label){case 0:return[4,this.render()];case 1:return e=n.sent(),t=this.getState(),this.renderEventListeners.forEach((function(n){return n(e,t)})),this.close(!0),[2]}}))}))},e.prototype.render=function(){return je(this,void 0,void 0,(function(){var e;return Ne(this,(function(t){switch(t.label){case 0:return(e=new Qe).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.width=this.renderWidth,e.height=this.renderHeight,this.unzoomFromCrop(),Fe.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,e.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 t.sent(),[4,e.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,t.sent()]}}))}))},e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ue("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 Ue("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new Ue("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var e=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ue("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*e)+"px;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ue("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ue("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new He("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new He("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new Ue("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 Ue("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ue("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 Ue("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ue("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},e.instanceCounter=0,e}(),tt=n("8hTe"),nt=n.n(tt),rt=/]*>/g;t.a=function(e){var t=e.value,n=void 0===t?"":t,l=e.edit,d=void 0!==l&&l,f=e.className,p=e.showTextOnly,m=e.showLines,g=e.replaces,v=e.zoomImg,y=e.hasMask,C=e.style,E=void 0===C?{}:C,k=e.stylesPrev,S=void 0===k?{}:k,_=String(n),A=Object(u.useRef)(),L=Object(u.useRef)(),D=Object(u.useState)(""),M=Object(s.a)(D,2),B=M[0],H=M[1],U=Object(u.useState)("office"),z=Object(s.a)(U,2),V=z[0],W=z[1],G=Object(u.useMemo)((function(){try{_=(_=_.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+j.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+j.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+j.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]

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

      "+e+"

      \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
      \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
      ":"
      "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"},t.image=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/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},e}(),ne=r.defaults,re=C,ie=function(){function e(e){this.options=e||ne,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,a,o,s,l,c,u,h,d,f,p,m,g,v,y,b,x="",w=e.length;for(n=0;n0&&"text"===g.tokens[0].type?(g.tokens[0].text=b+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=b+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(g.tokens,p),u+=this.renderer.listitem(m,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;n+1An error occurred:

      "+se(e.message+"",!0)+"
      ";throw e}}return he.options=he.setOptions=function(e){return ae(he.defaults,e),ce(he.defaults),he},he.getDefaults=le,he.defaults=ue,he.use=function(e){var t=ae({},e);if(e.renderer&&function(){var n=he.defaults.renderer||new Q,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,a=new Array(i),o=0;o",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,o){o&&o!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(a(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var a=r(i,"pairs"),o=t.listSelections(),c=0;c=0;c--){var h=o[c].head;t.replaceRange("",n(h.line,h.ch-1),n(h.line,h.ch+1),"+delete")}},Enter:function(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),o=0;o1&&d.indexOf(i)>=0&&t.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;v="addFour"}else if(f){var w=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(x)||w==i||e.isWordChar(w))return e.Pass;v="both"}else{if(!m||!(0===x.length||/\s/.test(x)||h.indexOf(x)>-1))return e.Pass;v="both"}else v=f&&c(t,b)?"both":d.indexOf(i)>=0&&t.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=v)return e.Pass}else u=v}var C=l%2?o.charAt(l-1):i,E=l%2?i:o.charAt(l+1);t.operation((function(){if("skip"==u)t.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==u){var i=t.getSelections();for(r=0;r0,{anchor:new n(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new n(a.head.line,a.head.ch+(o?1:-1))});t.setSelections(i)}else"both"==u?(t.replaceSelection(C+E,null),t.triggerElectric(C+E),t.execCommand("goCharLeft")):"addFour"==u&&(t.replaceSelection(C+C+C+C,"before"),t.execCommand("goCharRight"));var a,o}))}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}a(t.pairs+"`")}(n(/*! ../../lib/codemirror */"VrN/"))},FOrL: +/*!********************************************!*\ + !*** ./src/assets/images/icons/nodata.png ***! + \********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/nodata.a6b3f948.png"},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(e,t,n){"use strict";var r=n("q1tI"),i=n.n(r),a=n("TSYQ"),o=n.n(a);function s(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}function l(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var r=e.data[t];Array.isArray(r)?r.forEach((function(e){n.append(t+"[]",e)})):n.append(t,e.data[t])})),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var n="cannot "+e.method+" "+e.action+" "+t.status+"'",r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),s(t)):e.onSuccess(s(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(e){null!==r[e]&&t.setRequestHeader(e,r[e])})),t.send(n),{abort:function(){t.abort()}}}var c=+new Date,u=0;function h(){return"rc-upload-"+c+"-"+ ++u}var d=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",a=i.replace(/\/.*$/,"");return n.some((function(e){var t,n,o=e.trim();return"."===o.charAt(0)?(t=r.toLowerCase(),n=o.toLowerCase(),-1!==t.indexOf(n,t.length-n.length)):/\/\*$/.test(o)?a===o.replace(/\/.*$/,""):i===o}))}return!0};var f=function(e,t,n){var r=function e(r,i){i=i||"",r.isFile?r.file((function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))})):r.isDirectory&&function(e,t){var n=e.createReader(),r=[];!function e(){n.readEntries((function(n){var i=Array.prototype.slice.apply(n);r=r.concat(i),!i.length?t(r):e()}))}()}(r,(function(t){t.forEach((function(t){e(t,""+i+r.name+"/")}))}))};e.forEach((function(e){r(e.webkitGetAsEntry())}))},p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),w=o()((v(e={},a,!0),v(e,a+"-disabled",l),v(e,s,s),e)),C=l?{}:{onClick:g?this.onClick:function(){},onKeyDown:g?this.onKeyDown:function(){},onMouseEnter:y,onMouseLeave:b,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return i.a.createElement(r,p({},C,{className:w,role:"button",style:u}),i.a.createElement("input",p({},(t=x,Object.keys(t).reduce((function(e,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(e[n]=t[n]),e}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:d,directory:m?"directory":null,webkitdirectory:m?"webkitdirectory":null,multiple:h,onChange:this.onChange})),f)}}]),t}(r.Component),w=Object.assign||function(e){for(var t=1;t0?o-4:o;for(n=0;n>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=0,s=n-i;os?s:o+16383));1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,a,o=[],s=t;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},HDXh: +/*!*********************************************************************!*\ + !*** ./node_modules/node-libs-browser/node_modules/buffer/index.js ***! + \*********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";(function(e){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +var r=n(/*! base64-js */"H7XF"),i=n(/*! ieee754 */"kVK+"),a=n(/*! isarray */"49sm");function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(r)return H(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return _(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(a=n;as&&(n=s-l),a=n;a>=0;a--){for(var h=!0,d=0;di&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function O(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,i),u=e.slice(t,n),h=0;hi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return C(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function I(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function j(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,a){return a||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,a){return a||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],i=1,a=0;++a=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(/*! ./../../../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},HmJG: +/*!****************************************************************!*\ + !*** ./src/components/markdown-editor/upload-image/index.less ***! + \****************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},I8Z2: +/*!**********************************************************!*\ + !*** ./node_modules/mini-store/esm/index.js + 3 modules ***! + \**********************************************************/ +/*! exports provided: Provider, connect, create */ +/*! exports used: Provider, connect, create */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.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/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return v}));var r,i=n("q1tI"),a=(r=function(e,t){return(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=i.createContext(null),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return i.createElement(o.Provider,{value:this.props.store},this.props.children)},t}(i.Component),l=n("Gytx"),c=n.n(l),u=n("2mql"),h=n.n(u),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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n47?jt({status:!0,visible:!0}):jt({status:!1,visible:!0}))}),[be.course_group_info&&be.course_group_info.length]),Object(f.useEffect)((function(){null!=be&&be.course_id&&(Object(H.c)()||Ie([Object(c.a)(Object(c.a)({},be),{isMe:!0})]),Le(Object(R.a)(be.student_works)))}),[be]);var zt=function(){var e=Object(s.a)(d.a.mark((function e(){var t;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,me({type:"shixunHomeworks/getWorkList",payload:Object(c.a)({},ye)});case 2:t=e.sent,Object(H.c)()?Le(Object(R.a)(t.student_works)):Le(Object(R.a)(t));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function Vt(){Ue(1),Ge(""),Xe(""),Qe(""),rt(""),Et([])}var Wt=[{title:"序号",dataIndex:"name",width:"5%",align:"center",render:function(e,t,n){return null!=t&&t.isMe&&null!=Ae&&Ae.length?"我":ye.limit*(ye.page-1)+n+1}},{title:"姓名",width:"8%",ellipsis:!0,align:"center",dataIndex:"user_name"},!(null!=be&&be.anonymous_comment)&&{title:"学号",width:"8%",ellipsis:!0,align:"center",dataIndex:"student_id",sortOrder:Ft.student_id,sortDirections:["descend","ascend"],sorter:!0,render:function(e){return e}},!(Object(H.s)()&&(null!=be&&null!==(t=be.homework_status)&&void 0!==t&&t.includes("匿评中")||null!=be&&null!==(n=be.homework_status)&&void 0!==n&&n.includes("申诉中")))&&0!==be.course_group_count&&{title:"分班",width:"8%",ellipsis:!0,align:"center",dataIndex:"group_name"},{title:"作品状态",dataIndex:"work_status",width:"8%",align:"center",render:function(e){return-1===e?"重做中":p.a.createElement(b.a,{status:e})}},{title:"打回次数",dataIndex:"redo_count",width:"8%",align:"center",render:function(e){return e||"- -"}},{title:"更新时间",width:"10%",align:"center",dataIndex:"update_time",sortOrder:Ft.update_time,sortDirections:["descend","ascend"],sorter:!0,render:function(e){return e?j()(e).format("YYYY-MM-DD HH:mm"):"--"}},(Object(H.c)()||(null==be||null===(r=be.homework_status)||void 0===r?void 0:r.includes("已截止")))&&{title:"教师评分",width:"8%",align:"center",dataIndex:"teacher_score"},(Object(H.c)()||(null==be||null===(i=be.homework_status)||void 0===i?void 0:i.includes("已截止")))&&{title:"助教评分",width:"8%",align:"center",dataIndex:"teaching_asistant_score"},(null==be?void 0:be.anonymous_comment)&&{title:"匿评评分",width:"8%",align:"center",dataIndex:"student_score",render:function(e){return p.a.createElement(L.a,{title:"你的评阅分数:".concat(e,"分")},p.a.createElement("span",null,e))}},(null==be?void 0:be.anonymous_comment)&&Object(H.i)()&&{title:"匿评完成度",width:"10%",align:"center",dataIndex:"anonymous_comment_rate",render:function(e){return p.a.createElement("span",null,e,"%")}},(null==be?void 0:be.anonymous_comment)&&{title:"已评数",width:"8%",align:"center",dataIndex:"user_comment_count",render:function(e){return p.a.createElement(L.a,{title:"在匿评期间评阅的作品数量"},p.a.createElement("span",null,e))}},(null==be?void 0:be.anonymous_comment)&&{title:"匿评申诉",width:"8%",align:"center",dataIndex:"appeal_all_count",render:function(e,t){return p.a.createElement("div",null,!!e&&p.a.createElement(L.a,{placement:"bottom",title:"共有".concat(e,"条匿评申诉,").concat(t.appeal_deal_count,"条待处理")},p.a.createElement("span",{style:{minWidth:"30px",display:"inline-block",textAlign:"center"}},"".concat(t.appeal_deal_count,"/").concat(e))),!e&&p.a.createElement("span",null,"-/-"))}},(Object(H.c)()||Object(H.s)()&&!(null!=be&&be.anonymous_comment)&&!be.anonymous_appeal||Object(H.s)()&&(null===(h=be.homework_status)||void 0===h?void 0:h.includes("已截止")))&&{title:"当前成绩",width:"9%",align:"center",dataIndex:"work_score",sortOrder:Ft.work_score,sortDirections:["descend","ascend"],sorter:!0,render:function(e){return e}},{title:"操作",width:"8%",align:"center",dataInex:"action",render:function(e,t){var n;return 0!==t.work_status||Object(H.c)()?p.a.createElement("div",null,!Object(H.c)()&&p.a.createElement("div",null,p.a.createElement(v.a,{target:"_blank",to:"/classrooms/".concat(ye.coursesId,"/common_homework/").concat(ye.categoryId,"/review/").concat(t.work_id||t.id)},"查看")),Object(H.c)()&&p.a.createElement("div",null,p.a.createElement(v.a,{className:"c-blue",target:"_blank",to:ye.course_group?"/classrooms/".concat(ye.coursesId,"/common_homework/").concat(ye.categoryId,"/review/").concat(t.id,"?ids=").concat(null===(n=ye.course_group)||void 0===n?void 0:n.toString()):"/classrooms/".concat(ye.coursesId,"/common_homework/").concat(ye.categoryId,"/review/").concat(t.id)},t.has_comment?"已评阅":"评阅"),p.a.createElement("br",null),p.a.createElement(L.a,{placement:"bottom",title:p.a.createElement("p",null,"调整学生当前成绩",p.a.createElement("br",null),"其它历史评分将全部失效")},p.a.createElement("a",{className:"c-green",onClick:function(e){e.preventDefault(),me({type:"shixunHomeworks/setActionTabs",payload:{key:"调分",selectArrs:t,id:t.id,params:ye}})}},"调分")))):p.a.createElement("div",null,"--")}}].filter((function(e){return!!e})),Gt=function(){var e=Object(s.a)(d.a.mark((function e(){var t,n;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return pe(!0),e.next=3,Object(P.a)("/api/homework_commons/".concat(null==ye?void 0:ye.categoryId,"/export_student_works.json"),{method:"get",params:JSON.parse(sessionStorage.all_student_works_params)});case 3:0===(t=e.sent).status?null===(n=de.current)||void 0===n||n.exportReport(t.files):pe(!1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return p.a.createElement("section",{className:"".concat(z.a.wrap," minH500")},p.a.createElement("aside",null,p.a.createElement("aside",{className:"minH500 bg-white pl30 ".concat(Object(H.c)()?"pt30":""," pr30")},!(null!=be&&be.all_member_count)&&!he["shixunHomeworks/getWorkList"]&&((null==be||null===(g=be.homework_status)||void 0===g?void 0:g.includes("未发布"))||(null==be||null===(y=be.homework_status)||void 0===y?void 0:y.includes("未开始")))&&p.a.createElement("aside",{className:"bg-white inline-block w100"},p.a.createElement(N.a,null)),!Object(H.c)()&&p.a.createElement("aside",{className:"pt10 pb10"},p.a.createElement("span",{className:"c-orange"},be.commit_count),"已交",p.a.createElement("span",{className:"ml10"},be.uncommit_count),"未交",(null==be||null===(I=be.left_time)||void 0===I?void 0:I.time)&&p.a.createElement("span",{className:"ml10"},p.a.createElement("span",null,null==be||null===(U=be.left_time)||void 0===U?void 0:U.status),p.a.createElement("span",{className:"c-orange"},null==be||null===($=be.left_time)||void 0===$?void 0:$.time))),!(null!=be&&null!==(J=be.homework_status)&&void 0!==J&&J.includes("未发布"))&&!(null!=be&&null!==(Z=be.homework_status)&&void 0!==Z&&Z.includes("未开始"))&&p.a.createElement("aside",null,Object(H.c)()&&!(null==be||!be.all_member_count)&&p.a.createElement("aside",{className:"mb30"},p.a.createElement(M.a,{form:Ut,onChange:function(){ye.page=1;var e=Object.assign({},Ut.getFieldValue());Pe(!1),Object.keys(e).map((function(t){switch(t){case"task_status":e[t].includes("all")||be[t].length===e[t].length||!e[t].length?(delete ye.work_status,Ut.setFieldsValue(Object(D.a)({},"task_status","all"))):(ye.work_status=e[t],Ut.setFieldsValue(Object(D.a)({},"task_status",ye.work_status)));break;case"course_group_info":e[t].includes("all")||be[t].length===e[t].length||!e[t].length?(delete ye.course_group,Ut.setFieldsValue(Object(D.a)({},"course_group_info","all"))):(ye.course_group=e[t],Ut.setFieldsValue(Object(D.a)({},"course_group_info",ye.course_group)));break;case"teacher_comment":e[t].includes("all")||be[t].length===e[t].length||!e[t].length?(delete ye.teacher_comment,Ut.setFieldsValue(Object(D.a)({},"teacher_comment","all"))):(ye.teacher_comment=e[t][0],Ut.setFieldsValue(Object(D.a)({},"teacher_comment",e[t])))}})),zt()},initialValues:(Q={},Object(D.a)(Q,"task_status","all"),Object(D.a)(Q,"course_group_info","all"),Object(D.a)(Q,"teacher_comment","all"),Q)},!(null===(ee=be.teacher_comment)||void 0===ee||!ee.length)&&Object(H.c)()&&p.a.createElement(M.a.Item,{name:"teacher_comment"},p.a.createElement(T.a.Group,{style:{width:"100%"}},p.a.createElement(O.a,null,p.a.createElement(_.a,{flex:"80px",style:{fontSize:14}},"你的评阅:"),p.a.createElement(_.a,{flex:"80px"},p.a.createElement(T.a,{value:"all"},"全部")),p.a.createElement(_.a,{flex:"1"},null===(te=be.teacher_comment)||void 0===te?void 0:te.map((function(e,t){return p.a.createElement(T.a,{value:e.id},e.name,"(",e.count,")")})))))),!(null===(ne=be.task_status)||void 0===ne||!ne.length)&&Object(H.c)()&&p.a.createElement(M.a.Item,{name:"task_status"},p.a.createElement(T.a.Group,{value:[],style:{width:"100%"}},p.a.createElement(O.a,null,p.a.createElement(_.a,{flex:"80px",style:{fontSize:14}},"作品状态:"),p.a.createElement(_.a,{flex:"80px"},p.a.createElement(T.a,{value:"all"},"全部")),p.a.createElement(_.a,{flex:"1"},null===(re=be.task_status)||void 0===re?void 0:re.map((function(e,t){return p.a.createElement(T.a,{name:"task_status",value:e.id},e.name,"(",e.count,")")})))))),!(null===(ie=be.course_group_info)||void 0===ie||!ie.length)&&p.a.createElement(M.a.Item,{name:"course_group_info"},p.a.createElement(T.a.Group,{style:{width:"100%"}},p.a.createElement(O.a,null,p.a.createElement(_.a,{flex:"80px",style:{fontSize:14}},"分班情况:"),p.a.createElement(_.a,{flex:"80px"},p.a.createElement(T.a,{value:"all",checked:!ye.course_group_info},"全部")),p.a.createElement(_.a,{flex:"1",className:"".concat(z.a.workListClass," ").concat(It.visible?z.a.visible:""," ").concat(It.status?"":z.a.status)},p.a.createElement("div",{ref:X,className:z.a.left},be.course_group_info.map((function(e,t){return p.a.createElement(T.a,{value:e.course_group_id},e.group_group_name,"(",e.count,")")}))),It.status&&p.a.createElement("div",{className:z.a.tips,onClick:function(){return jt(Object(c.a)(Object(c.a)({},It),{},{visible:!It.visible}))}},p.a.createElement("span",null,It.visible?"展开":"收起",It.visible?p.a.createElement(W.a,{style:{marginBottom:"3px",marginLeft:"2px"}}):p.a.createElement(G.a,{style:{marginBottom:"3px",marginLeft:"2px"}})))))))),p.a.createElement(O.a,{align:"middle"},p.a.createElement(_.a,{flex:"1"},p.a.createElement(O.a,{align:"middle"},p.a.createElement(_.a,null,p.a.createElement(S.a.Search,{allowClear:!0,placeholder:"请输入姓名或者学号搜索",onSearch:function(e){ye.page=1,ye.search=e,zt()},style:{width:240}})),p.a.createElement(_.a,null,p.a.createElement("span",{className:"ml5 c-red"},be.work_count),"个检索结果(",be.work_count,"个学生)"))),p.a.createElement(_.a,{style:{textAlign:"end"},className:z.a.workListButtonWrap},((null==be||null===(ae=be.homework_status)||void 0===ae?void 0:ae.includes("提交中"))||(null==be||null===(oe=be.homework_status)||void 0===oe?void 0:oe.includes("补交中"))||(null==be||null===(se=be.homework_status)||void 0===se?void 0:se.includes("进行中")))&&p.a.createElement(l.a,{type:"default",style:{marginRight:"20px"},onClick:function(){bt(!0)},icon:p.a.createElement("i",{className:"iconfont icon-dahuizhongzuo3x"})},"一键打回"),p.a.createElement(l.a,{type:"default",style:{marginRight:"20px"},onClick:function(){st(!0)},icon:p.a.createElement("i",{className:"iconfont icon-yijiandianping"})},"一键点评"),p.a.createElement(k.a,{overlay:function(){return p.a.createElement(A.a,null,p.a.createElement(A.a.Item,{key:"1"},p.a.createElement("span",{onClick:function(){return Object(q.h)(JSON.parse(sessionStorage.all_student_works_params),"normal_work_list")}},"导出成绩")),p.a.createElement(A.a.Item,{key:"1"},p.a.createElement(l.a,{loading:fe,ghost:!0,style:{paddingLeft:0,background:"transparent"},type:"text",onClick:function(){return Gt()}},"导出作品附件")),p.a.createElement(A.a.Item,{key:"2"},p.a.createElement(v.a,{to:"/classrooms/".concat(ye.coursesId,"/exportlist/normal_work_list")},"历史导出")))}},p.a.createElement(l.a,null,p.a.createElement(K.a,null),"导出",p.a.createElement(Y.a,null)))))),Object(H.s)()&&p.a.createElement(E.a,{hideOnSinglePage:!0,pagination:!1,dataSource:Me,columns:Wt,showHeader:!Ae||0===(null==Ae?void 0:Ae.length)}),p.a.createElement(E.a,{loading:he["shixunHomeworks/getWorkList"],hideOnSinglePage:!0,pagination:!1,dataSource:Ae,columns:Wt,onChange:function(e,t,n){if(Ft={},void 0===n.order)switch(Ft[n.field]="descend",n.field){case"student_id":Ce("descend"),ye.b_order="desc"}else ye.b_order=n.order.replace("end",""),Ft[n.field]=n.order;Bt(Object(c.a)({},Ft)),ye.order=n.field,zt()}}))),p.a.createElement("aside",{className:"tc mb50 mt30"},p.a.createElement(C.a,{showSizeChanger:!1,onChange:function(e,t){ye.page=e,ye.limit=20,zt()},hideOnSinglePage:!0,defaultCurrent:ye.page||1,current:ye.page||1,defaultPageSize:20,total:ue.workList.work_count}))),p.a.createElement(B,null),p.a.createElement(F,null),p.a.createElement(a.a,{title:"一键评阅",visible:ot,centered:!0,onOk:function(){if(1===He){if(0===We);else if(!We)return void o.b.info("分数不能为空");st(!1),mt(!0)}else{if(0===Ze||0===qe);else{if(!Ze)return void o.b.info("最低分不能为空");if(!qe)return void o.b.info("最高分不能为空")}if(Ze>qe)return void o.b.info("最高分不能大于最低分");st(!1),mt(!0)}},onCancel:function(){st(!1),Vt()}},p.a.createElement("div",{style:{padding:"32px"}},p.a.createElement("div",null,p.a.createElement("div",null,p.a.createElement("span",{style:{width:"80px"}},"评阅方式:"),p.a.createElement(w.a.Group,{value:He,onChange:function(e){Ue(e.target.value)}},p.a.createElement(w.a,{value:1},"统一得分"),p.a.createElement(w.a,{value:2},"区间随机得分"))),1===He&&p.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},p.a.createElement("span",{style:{width:"70px",textAlign:"end"}},p.a.createElement("span",{style:{color:"red"}},"*"),"得分:"),p.a.createElement(x.a,{min:0,max:100,value:We,onChange:function(e){return Ge(e)}})),2===He&&p.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},p.a.createElement("span",{style:{width:"70px",textAlign:"end"}},p.a.createElement("span",{style:{color:"red"}},"*"),"最低分:"),p.a.createElement(x.a,{min:0,max:100,value:Ze,onChange:function(e){return Qe(e)},style:{width:"100px"}}),p.a.createElement("span",{style:{width:"80px",textAlign:"end"}},p.a.createElement("span",{style:{color:"red"}},"*"),"最高分:"),p.a.createElement(x.a,{min:0,max:100,value:qe,onChange:function(e){return Xe(e)},style:{width:"100px"}})),p.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},p.a.createElement("span",{style:{width:"80px",textAlign:"end"}},"评语:"),p.a.createElement(S.a.TextArea,{value:nt,onChange:function(e){return rt(e.target.value)},placeholder:"请填写评语"}))))),p.a.createElement(a.a,{title:"提示",visible:pt,centered:!0,okText:"确定点评",cancelText:"放弃点评",onOk:Object(s.a)(d.a.mark((function e(){var t;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={},1===He?t.score=We||"0":(t.min_score=Ze||"0",t.max_score=qe||"0"),t.comment=nt,t.student_work_ids=1===ut?Ae.map((function(e){return e.id})):Ae.filter((function(e){return!e.has_comment})).map((function(e){return e.id})),e.next=6,Object(P.a)("/api/homework_commons/".concat(ye.categoryId,"/batch_add_score.json"),{method:"post",body:t});case 6:0===e.sent.status&&(o.b.info("修改成功"),mt(!1),Vt(),zt());case 8:case"end":return e.stop()}}),e)}))),onCancel:function(){Vt(),mt(!1)}},p.a.createElement("div",{style:{padding:"32px",textAlign:"center"}},p.a.createElement("span",null,"部分学生已有点评内容,是否覆盖已有点评内容?"),p.a.createElement("br",null),p.a.createElement(w.a.Group,{value:ut,onChange:function(e){return ht(e.target.value)}},p.a.createElement(w.a,{value:1},"覆盖已有评论"),p.a.createElement(w.a,{value:2},"跳过已有点评")))),p.a.createElement(a.a,{title:"一键打回重做",visible:yt,centered:!0,destroyOnClose:!0,forceRender:!0,width:700,onOk:Object(s.a)(d.a.mark((function e(){var t,n;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(2!==He){e.next=13;break}if(!(Ct.length<=0)){e.next=4;break}return o.b.info("请选择作业状态"),e.abrupt("return");case 4:if(nt){e.next=7;break}return o.b.info("评语不能为空"),e.abrupt("return");case 7:return e.next=9,Object(P.a)("/api/homework_commons/".concat(ye.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:ye.categoryId,comment:nt,status:Ct}});case 9:0===(t=e.sent).status&&(Dt(t),bt(!1),Tt(!0)),e.next=32;break;case 13:if(0!==Ze&&0!==qe){e.next=16;break}e.next=22;break;case 16:if(Ze){e.next=19;break}return o.b.info("最低分不能为空"),e.abrupt("return");case 19:if(qe){e.next=22;break}return o.b.info("最高分不能为空"),e.abrupt("return");case 22:if(!(Ze>qe)){e.next=25;break}return o.b.info("最高分不能大于最低分"),e.abrupt("return");case 25:if(nt){e.next=28;break}return o.b.info("评语不能为空"),e.abrupt("return");case 28:return e.next=30,Object(P.a)("/api/homework_commons/".concat(ye.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:ye.categoryId,comment:nt,min_score:Ze,max_score:qe}});case 30:0===(n=e.sent).status&&(Dt(n),bt(!1),Tt(!0));case 32:case"end":return e.stop()}}),e)}))),onCancel:function(){bt(!1),Vt()}},p.a.createElement("div",{style:{padding:"32px"}},p.a.createElement("div",null,p.a.createElement("div",null,p.a.createElement("span",{style:{width:"80px"}},"打回方式:"),p.a.createElement(w.a.Group,{value:He,onChange:function(e){Ue(e.target.value)}},p.a.createElement(w.a,{value:1},"按成绩打回"),p.a.createElement(w.a,{value:2},"按作业状态打回"))),1===He&&p.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},p.a.createElement("span",{style:{width:"70px",textAlign:"end"}},p.a.createElement("span",{style:{color:"red"}},"*"),"最低分:"),p.a.createElement(x.a,{min:0,max:100,value:Ze,onChange:function(e){return Qe(e)},style:{width:"100px"}}),p.a.createElement("span",{style:{width:"80px",textAlign:"end"}},p.a.createElement("span",{style:{color:"red"}},"*"),"最高分:"),p.a.createElement(x.a,{min:0,max:100,value:qe,onChange:function(e){return Xe(e)},style:{width:"100px"}})),2===He&&p.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},p.a.createElement("span",{style:{width:"80px"}},"作业状态:"),p.a.createElement(T.a.Group,{onChange:function(e){Et(Object(R.a)(e))},style:{width:"100%"}},null===(le=be.task_status)||void 0===le?void 0:le.map((function(e,t){return p.a.createElement(T.a,{name:"task_status",value:e.id},e.name,"(",e.count,")")})))),p.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},p.a.createElement("span",{style:{width:"70px",textAlign:"end"}},p.a.createElement("span",{style:{color:"red"}},"*")," 评语:"),p.a.createElement(V.a,{className:z.a.MdEditor,onChange:function(e){return rt(e)},placeholder:"请填写评语"}))))),p.a.createElement(a.a,{visible:Ot,title:"打回确认",onOk:Object(s.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(2!==He){e.next=7;break}return e.next=3,Object(P.a)("/api/homework_commons/".concat(ye.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:ye.categoryId,comment:nt,status:Ct}});case 3:0===e.sent.status&&(o.b.info("打回成功"),Vt(),zt(),Tt(!1)),e.next=11;break;case 7:return e.next=9,Object(P.a)("/api/homework_commons/".concat(ye.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:ye.categoryId,comment:nt,min_score:Ze,max_score:qe}});case 9:0===e.sent.status&&(o.b.info("打回成功"),Vt(),zt(),Tt(!1));case 11:case"end":return e.stop()}}),e)}))),onCancel:function(){Vt(),Tt(!1)}},p.a.createElement("div",{style:{padding:"32px"}},1===He&&p.a.createElement("span",null,"确认将成绩在",Ze,"-",qe,"的学生进行打回重做吗?"),2===He&&p.a.createElement("span",null,"确认将作业状态为",(null===(ce=be.task_status)||void 0===ce?void 0:ce.filter((function(e){return null==Ct?void 0:Ct.includes(e.id)})).map((function(e){return e.name})).toString())+",","的学生进行作业打回重做吗?"),p.a.createElement("br",null),p.a.createElement("span",null,"该条件下共有",null==Lt?void 0:Lt.count,"名学生"))))})),J=n("m3rI"),Z=n("9Bee"),Q=Object(g.a)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var t=e.shixunHomeworks,n=e.dispatch;Object(m.i)();return p.a.createElement(a.a,{centered:!0,title:"提示",visible:"删除"===t.actionTabs.key,okText:"确定",cancelText:"取消",onOk: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,n({type:"shixunHomeworks/deleteReply",payload:{object_id:t.actionTabs.selectArr.id,object_type:"journals_for_message"}});case 2:0===e.sent.status&&(o.b.success("删除成功"),n({type:"shixunHomeworks/setActionTabs",payload:{}}),n({type:"shixunHomeworks/getReplyList",payload:Object(c.a)({},t.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){n({type:"shixunHomeworks/setActionTabs",payload:{}})}},p.a.createElement("p",null,"确定要删除该条回复吗?"))})),ee=n("/MfK"),te=n("BtR2"),ne=n("/iVV"),re=n.n(ne),ie=n("p5ED");j.a.lang("ZH-cn");var ae=Object(g.a)((function(e){var t=e.shixunHomeworks,n=e.classroomList,r=e.user,i=e.loading;return{shixunHomeworks:t,globalSetting:e.globalSetting,user:r,classroomList:n,loading:i.effects}}))((function(e){var t,n=e.shixunHomeworks,r=e.classroomList,i=e.user,a=(e.globalSetting,e.loading,e.dispatch),h=Object(f.useState)(Object(c.a)({},Object(m.i)())),g=Object(u.a)(h,2),v=g[0],y=(g[1],Object(f.useState)(!1)),x=Object(u.a)(y,2),w=x[0],E=x[1],k=Object(f.useState)(-1),T=Object(u.a)(k,2),A=T[0],D=T[1],R=Object(f.useState)(""),M=Object(u.a)(R,2),I=M[0],j=M[1],N=Object(f.useState)(""),F=Object(u.a)(N,2),B=F[0],U=F[1],z=(n.workList,r.detailLeftMenus),W=n.replyList,G=n.workDetail;v.page_size=10;var K=Object(f.useState)({content:"",type:""}),Y=Object(u.a)(K,2),q=Y[0],X=Y[1],$=Object(f.useRef)();return Object(f.useEffect)((function(){a({type:"shixunHomeworks/getReplyList",payload:Object(c.a)({},v)}),a({type:"shixunHomeworks/getWorkDetail",payload:Object(c.a)({},v)}),z.course_modules||a({type:"classroomList/getClassroomLeftMenus",payload:Object(c.a)({},v)})}),[v.categoryId]),p.a.createElement("section",{className:re.a.bg},p.a.createElement("section",{className:""},p.a.createElement("aside",{className:[re.a.desc,"c-black","font14","bg-white"].join(" ")},"编辑作业"!==n.actionTabs.key&&p.a.createElement(Z.a,{value:(null==G?void 0:G.description)||"暂无~"}),null==G||null===(t=G.attachments)||void 0===t?void 0:t.map((function(e,t){return p.a.createElement("div",null,p.a.createElement("a",{href:"".concat(J.a.API_SERVER).concat(e.url),onClick:function(){var t=Object(s.a)(d.a.mark((function t(n){var r;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.preventDefault(),"txt"!==e.file_type){t.next=6;break}return t.next=4,Object(P.a)(e.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:r=t.sent,$.current=r;case 6:X({type:e.file_type,content:window.location.origin+e.url});case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},p.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),p.a.createElement("span",{className:"ml10 c-black"},e.title),p.a.createElement("span",{className:"c-light-black ml20 font12"},e.filesize),p.a.createElement("span",{className:"ml10 c-light-primary current",onClick:function(t){t.preventDefault(),Object(b.v)("","".concat(J.a.API_SERVER).concat(e.url))}},"下载"),p.a.createElement("span",{className:"ml10 c-green-29b current",onClick:function(){var t=Object(s.a)(d.a.mark((function t(n){var r;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.preventDefault(),"txt"!==e.file_type){t.next=6;break}return t.next=4,Object(P.a)(e.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:r=t.sent,$.current=r;case 6:X({type:e.file_type,content:window.location.origin+e.url});case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},"预览")))})),"编辑作业"===n.actionTabs.key&&p.a.createElement("aside",{className:["bg-white"].join(" ")},p.a.createElement(V.a,{onChange:function(e){j(e)},defaultValue:null==G?void 0:G.explanation,height:200,isFocus:!0,watch:!0}),p.a.createElement(O.a,null,p.a.createElement(_.a,{span:24,className:"tr"},p.a.createElement(l.a,{type:"default",size:"large",onClick:Object(s.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a({type:"shixunHomeworks/setActionTabs",payload:{key:""}});case 1:case"end":return e.stop()}}),e)})))},"取消"),p.a.createElement(l.a,{type:"primary",size:"large",className:"ml20",onClick:Object(s.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==I){e.next=4;break}o.b.error("请输入内容"),e.next=8;break;case 4:return e.next=6,a({type:"shixunHomeworks/updateWork",payload:{explanation:I,categoryId:v.categoryId}});case 6:0===e.sent.status&&(o.b.success("操作成功"),a({type:"shixunHomeworks/setActionTabs",payload:{key:""}}),a({type:"shixunHomeworks/getWorkDetail",payload:Object(c.a)({},v)}));case 8:case"end":return e.stop()}}),e)})))},"保存"))))),p.a.createElement("aside",{className:[re.a.reply,"bg-white","mt20"].join(" ")},w&&p.a.createElement(V.a,{onChange:function(e){j(e)},height:200,isFocus:!0,watch:!0}),p.a.createElement(O.a,{onClick:function(){E(!0)}},p.a.createElement(_.a,{flex:"1"},!w&&p.a.createElement(S.a,{size:"large",className:"current",placeholder:"说点什么",disabled:!0})),p.a.createElement(_.a,null,p.a.createElement(l.a,{type:"primary",size:"large",onClick:Object(s.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==I){e.next=4;break}o.b.error("请输入内容"),e.next=8;break;case 4:return e.next=6,a({type:"shixunHomeworks/createReply",payload:{journals_for_message:{jour_id:v.categoryId,jour_type:"HomeworkCommon",reply_id:1,notes:I}}});case 6:0===e.sent.status&&(o.b.success("发布成功"),a({type:"shixunHomeworks/getReplyList",payload:Object(c.a)({},v)}),E(!1),j(""));case 8:case"end":return e.stop()}}),e)})))},"发表")))),(null==W?void 0:W.comments)&&""!=W.comments&&p.a.createElement("aside",{className:[re.a.replyList,"bg-white"].join(" ")},null==W?void 0:W.comments.map((function(e,t){var n,r,u,h;return p.a.createElement(O.a,{gutter:[12,12],key:t},p.a.createElement(_.a,{flex:"40px"},p.a.createElement("img",{className:re.a.headpic,width:"40",src:"".concat(J.a.IMG_SERVER,"/images/").concat(null==e||null===(n=e.author)||void 0===n?void 0:n.image_url)})),p.a.createElement(_.a,{flex:"1"},p.a.createElement(O.a,{align:"middle"},p.a.createElement(_.a,{span:20},p.a.createElement("span",{className:"c-light-black"},null==e||null===(r=e.author)||void 0===r?void 0:r.name),p.a.createElement("span",{className:"c-light-black ml10"},null==e?void 0:e.time," 发布")),p.a.createElement(_.a,{className:"tr",span:4},(Object(H.c)()||(null==i||null===(u=i.userInfo)||void 0===u?void 0:u.login)===(null==e||null===(h=e.author)||void 0===h?void 0:h.login))&&p.a.createElement(L.a,{title:"删除"},p.a.createElement(ee.a,{className:"current",onClick:function(){a({type:"shixunHomeworks/setActionTabs",payload:{key:"删除",params:v,selectArr:e}})}}))),p.a.createElement(_.a,{span:24},p.a.createElement(Z.a,{value:e.content})),e.children&&p.a.createElement("aside",{className:re.a.comment},e.children.map((function(e,t){var n,r;return p.a.createElement(O.a,{key:t},p.a.createElement(_.a,{span:24},p.a.createElement(O.a,null,p.a.createElement(_.a,{flex:"1"},e.author.name,p.a.createElement("span",{className:"c-light-black ml10"},null==e?void 0:e.time)),p.a.createElement(_.a,null,(Object(H.c)()||(null==i||null===(n=i.userInfo)||void 0===n?void 0:n.login)===(null==e||null===(r=e.author)||void 0===r?void 0:r.login))&&p.a.createElement(L.a,{title:"删除"},p.a.createElement(ee.a,{className:"current",onClick:function(){a({type:"shixunHomeworks/setActionTabs",payload:{key:"删除",params:v,selectArr:e}})}}))))),p.a.createElement(_.a,null,p.a.createElement(Z.a,{value:e.content})))}))),p.a.createElement(_.a,{span:24,className:"mt5 c-light-black"},A===t&&p.a.createElement("aside",null,p.a.createElement(V.a,{onChange:function(e){U(e)},height:150,isFocus:!0}),p.a.createElement(O.a,null,p.a.createElement(_.a,{span:24,className:"tr"},p.a.createElement(l.a,{type:"primary",size:"large",onClick:Object(s.a)(d.a.mark((function t(){return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(""!==B){t.next=4;break}o.b.error("请输入内容"),t.next=9;break;case 4:return t.next=6,a({type:"shixunHomeworks/createReply",payload:{journals_for_message:{jour_id:v.categoryId,jour_type:"HomeworkCommon",m_parent_id:e.id,reply_id:1,notes:B}}});case 6:a({type:"shixunHomeworks/getReplyList",payload:Object(c.a)({},v)}),o.b.success("发布成功"),D(-1);case 9:case"end":return t.stop()}}),t)})))},"发表")))),A!==t&&p.a.createElement("div",{className:"tr"},p.a.createElement("span",{className:"iconfont icon-huifu1 mr5 ml30",onClick:function(){return D(t)}}),!!e.user_praise&&p.a.createElement("span",{className:"c-orange"},p.a.createElement(te.a,{className:"mr5 ml30",onClick:Object(s.a)(d.a.mark((function t(){return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a({type:"shixunHomeworks/replyUnLike",payload:{object_id:e.id,object_type:"journals_for_message"}});case 2:a({type:"shixunHomeworks/getReplyList",payload:Object(c.a)({},v)});case 3:case"end":return t.stop()}}),t)})))}),!!e.praise_count&&e.praise_count),!e.user_praise&&p.a.createElement("span",null,p.a.createElement(te.a,{className:"mr5 ml30",onClick:Object(s.a)(d.a.mark((function t(){return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a({type:"shixunHomeworks/replyLike",payload:{object_id:e.id,object_type:"journals_for_message"}});case 2:a({type:"shixunHomeworks/getReplyList",payload:Object(c.a)({},v)});case 3:case"end":return t.stop()}}),t)})))}),!!e.praise_count&&e.praise_count))))))})))),p.a.createElement("aside",{className:"tc mt30 pb30"},p.a.createElement(C.a,{defaultCurrent:1,total:null==W?void 0:W.total_count,hideOnSinglePage:!0,current:v.page||1,onChange:function(e){v.page=e,a({type:"shixunHomeworks/getReplyList",payload:Object(c.a)({},v)})}})),p.a.createElement(Q,null),p.a.createElement(ie.a,{close:!0,data:null==q?void 0:q.content,type:null==q?void 0:q.type,hasMask:!0,monacoEditor:{value:$.current,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onClose:function(){return X({content:"",type:""})}}))}));j.a.lang("ZH-cn");var oe=Object(g.a)((function(e){var t=e.shixunHomeworks,n=e.classroomList,r=e.loading;return{shixunHomeworks:t,globalSetting:e.globalSetting,classroomList:n,loading:r.effects}}))((function(e){var t,n,r=e.shixunHomeworks,i=e.classroomList,a=(e.globalSetting,e.loading,e.dispatch),o=Object(m.i)(),l=i.detailLeftMenus,h=(r.replyList,r.referenceAnswer);o.page_size=10;var g=Object(f.useState)({content:"",type:""}),v=Object(u.a)(g,2),y=v[0],x=v[1],w=Object(f.useRef)();return Object(f.useEffect)((function(){a({type:"shixunHomeworks/getReplyList",payload:Object(c.a)({},o)}),a({type:"shixunHomeworks/getReferenceAnswer",payload:{coursesId:o.categoryId}}),l.course_modules||a({type:"classroomList/getClassroomLeftMenus",payload:Object(c.a)({},o)})}),[o.categoryId]),p.a.createElement("section",{className:"pb30 bg-white pl30 pr30 pt30"},p.a.createElement("aside",{className:["c-black","font14"].join(" ")},p.a.createElement("div",null,(null==h?void 0:h.reference_answer)&&p.a.createElement(Z.a,{value:null==h?void 0:h.reference_answer}),!(null!=h&&h.reference_answer)&&!(null!==(t=h.attachments)&&void 0!==t&&t.length)&&p.a.createElement(N.a,null)),null==h||null===(n=h.attachments)||void 0===n?void 0:n.map((function(e,t){return p.a.createElement("div",null,p.a.createElement("a",{href:"".concat(J.a.API_SERVER).concat(e.url),onClick:function(){var t=Object(s.a)(d.a.mark((function t(n){var r;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.preventDefault(),"txt"!==e.file_type){t.next=6;break}return t.next=4,Object(P.a)(e.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:r=t.sent,w.current=r;case 6:x({type:e.file_type,content:window.location.origin+e.url});case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},p.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),p.a.createElement("span",{className:"ml10 c-black"},e.title),p.a.createElement("span",{className:"c-light-black ml20 font12"},e.filesize),p.a.createElement("span",{className:"ml10 c-light-primary current",onClick:function(t){t.stopPropagation(),Object(b.v)("","".concat(J.a.API_SERVER).concat(e.url))}},"下载"),p.a.createElement("span",{className:"ml10 c-green-29b current",onClick:function(){var t=Object(s.a)(d.a.mark((function t(n){var r;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.preventDefault(),"txt"!==e.file_type){t.next=6;break}return t.next=4,Object(P.a)(e.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:r=t.sent,w.current=r;case 6:x({type:e.file_type,content:window.location.origin+e.url});case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},"预览")))}))),p.a.createElement(ie.a,{close:!0,data:null==y?void 0:y.content,type:null==y?void 0:y.type,hasMask:!0,monacoEditor:{value:w.current,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onClose:function(){return x({content:"",type:""})}}))})),se=n("4HvA"),le=n("aUhZ"),ce=n("NNe0"),ue=n.n(ce),he=Object(g.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){e.shixunHomeworks,e.loading,e.dispatch;var t,n,r=Object(f.useState)(!0),i=Object(u.a)(r,2),c=i[0],h=i[1],g=Object(f.useState)(!1),v=Object(u.a)(g,2),y=v[0],b=v[1],x=Object(f.useState)([]),w=Object(u.a)(x,2),C=w[0],k=w[1],T=Object(f.useState)([]),A=Object(u.a)(T,2),L=A[0],D=A[1],R=Object(f.useState)([]),M=Object(u.a)(R,2),I=M[0],j=M[1],F=Object(f.useState)([]),B=Object(u.a)(F,2),H=B[0],U=B[1],z=Object(m.i)();function V(){return W.apply(this,arguments)}function W(){return(W=Object(s.a)(d.a.mark((function e(){var t;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(P.a)("/api/homework_commons/".concat(z.categoryId,"/homework_common_collaborators.json"),{method:"get"});case 2:t=e.sent,D(t);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(){return K.apply(this,arguments)}function K(){return(K=Object(s.a)(d.a.mark((function e(){var t;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(P.a)("/api/courses/".concat(null==z?void 0:z.coursesId,"/teachers"),{method:"get",params:{homework_id:z.categoryId}});case 2:null==(t=e.sent)||t.teacher_list.map((function(e){e.key=e.user_id})),j(null==t?void 0:t.teacher_list),U(null==t?void 0:t.teacher_list);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(f.useEffect)((function(){V(),G()}),[z]);return p.a.createElement("section",{className:[ue.a.form," bg-white pl30 pr30 pt10"].join(" ")},p.a.createElement(O.a,null,p.a.createElement(_.a,{flex:"1"},p.a.createElement("span",{style:{fontSize:"16px"}},"协作设置"),(null==L?void 0:L.can_edit)&&p.a.createElement("span",{style:{cursor:"pointer",color:"#0152d9",marginLeft:"10px"},onClick:function(){b(!0)}},"+添加协作者"))),p.a.createElement(O.a,{style:{marginTop:"20px",marginBottom:"20px"}},(null==L||null===(t=L.data)||void 0===t?void 0:t.length)<=0&&p.a.createElement(N.a,{customText:"该作业暂无协作者"}),null==L||null===(n=L.data)||void 0===n?void 0:n.map((function(e){return p.a.createElement("span",{style:{display:"inline-flex",height:"40px",borderRadius:"4px",border:"1px solid #44D7B6",padding:"7px 20px",color:"#44D7B6",marginRight:"40px"}},p.a.createElement("span",{style:{flex:"1"}},null==e?void 0:e.real_name),(null==L?void 0:L.can_edit)&&p.a.createElement("span",{style:{cursor:"pointer",marginLeft:"10px"},onClick:Object(s.a)(d.a.mark((function t(){return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(P.a)("/api/homework_commons/".concat(z.categoryId,"/homework_common_collaborators/delete.json"),{method:"delete",body:{user_id:e.id}});case 2:0===t.sent.status&&(o.b.info("删除成功"),V(),G());case 4:case"end":return t.stop()}}),t)})))},"X"))}))),p.a.createElement(O.a,null,!c&&p.a.createElement(_.a,{className:"mb50"},p.a.createElement(l.a,{type:"primary",size:"large",onClick:function(){}},"提交"),p.a.createElement(l.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){h(!0)}},"取消"))),p.a.createElement(a.a,{title:"添加协作者",visible:y,onCancel:function(){return b(!1)},onOk:Object(s.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==C.length){e.next=3;break}return o.b.info("请选择协作老师"),e.abrupt("return");case 3:return e.next=5,Object(P.a)("/api/homework_commons/".concat(z.categoryId,"/homework_common_collaborators.json"),{method:"post",body:{user_ids:C}});case 5:0===e.sent.status&&(o.b.info("添加成功"),k([]),V(),G(),b(!1));case 7:case"end":return e.stop()}}),e)})))},p.a.createElement("div",null,p.a.createElement("div",{style:{display:"flex"}},p.a.createElement("label",{style:{width:"50px"}},"姓名:")," ",p.a.createElement(S.a.Search,{onChange:function(e){j(H.filter((function(t){return t.name.indexOf(e.target.value)>-1})))}})),p.a.createElement(E.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,t){k(e)},selectedRowKeys:C,getCheckboxProps:function(e){return{disabled:e.is_collaborator}}},pagination:!1,dataSource:I,columns:[{title:"姓名",dataIndex:"name",key:"name"},{title:"角色",dataIndex:"role",key:"role"}]}))))})),de=(n("/zsF"),n("PArb")),fe=(n("OaEy"),n("2fM7")),pe=(n("iQDF"),n("+eQT")),me=n("w5pM"),ge=n("LvDl"),ve=pe.a.RangePicker,ye=fe.a.Option,be=Object(g.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var t,n,r,i,a,h,g,v,y,C,E,k=e.shixunHomeworks,S=(e.loading,e.dispatch),A=Object(m.i)(),D=(Object(m.h)(),k.workSetting),I=k.workList,N=Object(f.useState)(!0),F=Object(u.a)(N,2),B=F[0],U=F[1],z=Object(f.useState)({}),V=Object(u.a)(z,2),W=(V[0],V[1],M.a.useForm()),G=(Object(u.a)(W,1)[0],Object(f.useState)([])),K=Object(u.a)(G,2),Y=K[0],q=K[1],X=Object(f.useState)([]),$=Object(u.a)(X,2),J=$[0],Z=$[1],Q=Object(f.useState)({unified_setting:!1,publish_time:"",end_time:"",ta_mode:1,final_mode:!1,st_proportion:"",ta_proportion:"",te_proportion:"",student_comment:!1,anonymous_appeal:!1,appeal_penalty:0,appeal_time:"",anonymous_comment:!1,evaluation_num:0,evaluation_start:"",evaluation_end:"",absence_penalty:0,work_public:!1,unified_late:!0,allow_late:!1,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,comment_public:!0,score_open:!1,total_score:"",eff_score:""}),te=Object(u.a)(Q,2),ne=te[0],re=te[1];(null==I||null===(t=I.homework_status)||void 0===t?void 0:t.includes("匿评中"))||null==I||null===(n=I.homework_status)||void 0===n||n.includes("申诉中"),(null==I||null===(r=I.homework_status)||void 0===r?void 0:r.includes("匿评中"))||(null==I||null===(i=I.homework_status)||void 0===i?void 0:i.includes("申诉中"))||null==I||null===(a=I.homework_status)||void 0===a||a.includes("已截止");Object(f.useEffect)((function(){ie()}),[]),Object(f.useEffect)((function(){null!=D&&D.course_id&&(Object.keys(ne).map((function(e){ne[e]=D[e]})),ne.allow_late&&ne.unified_late||(ne.late_penalty=5),Y=JSON.parse(JSON.stringify(D.group_settings.map((function(e){return Object(c.a)(Object(c.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),J=JSON.parse(JSON.stringify(D.allow_late_settings.map((function(e){return Object(c.a)(Object(c.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),re(Object(c.a)({},ne)),q(Object(R.a)(Y)),Z(Object(R.a)(J)))}),[D]);var ie=function(){S({type:"shixunHomeworks/getWorkSetting",payload:Object(c.a)({},A)})},ae=function(){var e=Object(s.a)(d.a.mark((function e(){var t,n,r;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=JSON.parse(JSON.stringify(ne))).categoryId=A.categoryId,ne.unified_setting||null===(t=Y)||void 0===t||t.map((function(e){var t,n;if(!e.publish_time||!e.end_time)throw o.b.error("请把发布时间填写完整"),new String("请把发布时间填写完整");if(!e.group_name)throw o.b.error("请选择分班名称"),new String("请选择分班名称");e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,console.log("item:0",e,D.group_settings,Y),e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(n=t.map((function(e){var t,n,r=null===(t=D.group_settings)||void 0===t||null===(n=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===n?void 0:n[0];return console.log("d:",r,e),null==r?void 0:r.group_id})))||void 0===n?void 0:n.toString().split(",")})),n.group_settings=Y,!ne.allow_late){e.next=16;break}if(!ne.unified_late){e.next=14;break}if(!(null===ne.late_penalty||void 0===ne.late_penalty||ne.late_penalty<0||ne.late_penalty>100)){e.next=9;break}throw o.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");case 9:if(ne.late_time){e.next=12;break}throw o.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整");case 12:e.next=16;break;case 14:J=null===(r=J)||void 0===r?void 0:r.map((function(e){var t,n;if(null===e.late_penalty||void 0===e.late_penalty||e.late_penalty<0||e.late_penalty>100)throw o.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw o.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(!e.group_name)throw o.b.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(n=t.map((function(e){var t,n,r=null===(t=D.group_settings)||void 0===t||null===(n=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===n?void 0:n[0];return null==r?void 0:r.group_id})))||void 0===n?void 0:n.toString().split(","),e})),n.allow_late_settings=J;case 16:return Object.keys(n).map((function(e){e.indexOf("proportion")>-1&&(n[e]=n[e]/100)})),e.next=19,Object(P.a)("/api/homework_commons/".concat(A.categoryId,"/publish_setting.json"),{method:"post",body:Object(c.a)({},n)});case 19:0===e.sent.status&&(o.b.success("更新成功"),U(!0),ie(),S({type:"shixunHomeworks/getWorkList",payload:Object(c.a)({},A)}));case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(e){return e&&e0&&!e.id&&p.a.createElement(ee.a,{onClick:function(){Y=Y.filter((function(e,n){return t!==n})),q(Y.slice()),setTimeout((function(){return q(Y.slice())}),10)}}),p.a.createElement(me.a,{className:"c-green ml20",onClick:function(){q(Y.concat({}))}}))))}))),p.a.createElement(de.a,null),p.a.createElement(O.a,null,p.a.createElement(_.a,null,p.a.createElement("strong",null,"补交设置")),p.a.createElement(_.a,{span:24,className:"mt15 pl30"},p.a.createElement(T.a,{checked:ne.allow_late,disabled:B,onChange:function(){ne.allow_late=!ne.allow_late,""==J&&Z([{late_penalty:5}]),re(Object.assign({},ne))}},p.a.createElement("strong",null,"开启补交")),p.a.createElement("span",{className:"c-grey-c font12"},"(选中,则允许学生延时提交作品)"))),(null==ne?void 0:ne.allow_late)&&p.a.createElement("div",{style:{marginLeft:22}},p.a.createElement("div",{className:"ml30 mt20"},p.a.createElement("span",null,"补交方式:"),p.a.createElement(w.a.Group,{disabled:B,value:ne.unified_late,onChange:function(e){ne.unified_late=e.target.value,""!=J||e.target.value||Z([{late_penalty:5}]),re(Object(c.a)({},ne))}},(null==ne?void 0:ne.unified_setting)&&p.a.createElement(w.a,{value:!0}," 统一补交 "),(null==D||null===(E=D.group_settings)||void 0===E?void 0:E.length)&&p.a.createElement(w.a,{value:!1}," 分班补交 "))),null!=ne&&ne.unified_late?p.a.createElement(p.a.Fragment,null,p.a.createElement(O.a,{align:"middle",className:"mt25 pl30"},p.a.createElement(_.a,null,"补交扣分:"),p.a.createElement(_.a,{className:"ml5"},p.a.createElement(x.a,{disabled:B||!ne.allow_late,value:ne.late_penalty,onChange:function(e){ne.late_penalty=e,re(Object.assign({},ne))}})),p.a.createElement(_.a,{flex:"1",className:"ml5"},"分",p.a.createElement("span",{className:"c-grey-c ml10"},"(延时提交作品时,学生成绩将被扣减的分值)"))),p.a.createElement(O.a,{align:"middle",className:"mt25 pl30"},p.a.createElement(_.a,null,"补交截止时间:"),p.a.createElement(_.a,{className:"ml5"},p.a.createElement(pe.a,{allowClear:!1,style:{width:170},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:j()(Object(b.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:B||!ne.allow_late,value:ne.late_time?j()(ne.late_time):"",disabledDate:oe,onChange:function(e,t){ne.late_time=t,re(Object.assign({},ne))}})),p.a.createElement(_.a,null,p.a.createElement("span",{className:"c-grey-c ml10"},"(学生“延时”提交作品的时间截点)")))):J.map((function(e,t){var n;return p.a.createElement(_.a,{span:24,key:t},p.a.createElement(O.a,{className:"mt25"},p.a.createElement(_.a,{style:{marginLeft:30}},p.a.createElement("span",null,"补交规则",t+1,":"),p.a.createElement(fe.a,{disabled:B||!(null!=I&&null!==(n=I.homework_status)&&void 0!==n&&n.includes("未发布"))&&e.id,mode:"multiple",style:{width:306},value:"string"==typeof e.group_name?[e.group_name]:e.group_name,placeholder:"请选择分班名称",onChange:function(n){J[t].group_name=n,J[t].group_id=e.group_id,Z(J.slice())}},D.group_settings&&D.group_settings.map((function(e){return null!=ne&&ne.unified_setting&&!J.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))||Y.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))&&!J.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))?p.a.createElement(ye,{value:e.group_name,key:e.id},e.group_name):void 0})))),p.a.createElement(_.a,{className:"ml20"},p.a.createElement("span",null,"补交扣分:"),p.a.createElement(x.a,{min:0,max:100,disabled:B,defaultValue:e.late_penalty,onChange:function(e){J[t].late_penalty=e}})),p.a.createElement(_.a,{className:"ml20"},p.a.createElement("span",null,"补交截止时间:"),p.a.createElement(pe.a,{disabled:B,style:{width:200},showTime:{format:"HH:mm",defaultValue:j()(Object(b.d)(),"HH:mm")},placeholder:"请选择截止时间",disabledDate:oe,format:"YYYY-MM-DD HH:mm",value:null!=e&&e.late_time?j()(e.late_time):void 0,onChange:function(e,n){J[t].late_time=n,Z(Object(R.a)(J))}})),!B&&p.a.createElement(_.a,{className:"ml20"},t>0&&!e.id&&p.a.createElement(ee.a,{onClick:function(){J=J.filter((function(e,n){return t!==n})),Z(J.slice()),setTimeout((function(){return Z(J.slice())}),10)}}),p.a.createElement(me.a,{className:"c-green ml20",onClick:function(){Z(J.concat({late_penalty:5}))}}))))}))),p.a.createElement(de.a,null)),p.a.createElement(O.a,null,!B&&p.a.createElement(_.a,{className:"mb50 mt20 btn-w120"},p.a.createElement(l.a,{type:"primary",size:"large",onClick:function(){return ae()}},"提交"),p.a.createElement(l.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){U(!0),ie()}},"取消"))))})),xe=(n("Q9mQ"),n("diRs")),we=n("Lyp1"),Ce=(pe.a.RangePicker,fe.a.Option,Object(g.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var t,n,r,i,a,h,g=e.shixunHomeworks,v=(e.loading,e.dispatch),y=Object(m.i)(),w=(Object(m.h)(),g.workSetting),C=g.workList,E=Object(f.useState)(!0),k=Object(u.a)(E,2),S=k[0],A=k[1],L=Object(f.useState)({}),D=Object(u.a)(L,2),I=(D[0],D[1],M.a.useForm()),N=(Object(u.a)(I,1)[0],Object(f.useState)([])),F=Object(u.a)(N,2),B=F[0],H=F[1],U=Object(f.useState)([]),z=Object(u.a)(U,2),V=z[0],W=z[1],G=Object(f.useState)({unified_setting:!1,publish_time:"",end_time:"",ta_mode:1,final_mode:!1,st_proportion:"",ta_proportion:"",te_proportion:"",student_comment:!1,anonymous_appeal:!1,appeal_penalty:0,appeal_time:"",anonymous_comment:!1,evaluation_num:0,evaluation_start:"",evaluation_end:"",absence_penalty:0,work_public:!1,unified_late:!0,allow_late:!1,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,total_score:"",eff_score:""}),K=Object(u.a)(G,2),Y=K[0],q=K[1],X=(null==C||null===(t=C.homework_status)||void 0===t?void 0:t.includes("匿评中"))||(null==C||null===(n=C.homework_status)||void 0===n?void 0:n.includes("申诉中"));(null==C||null===(r=C.homework_status)||void 0===r?void 0:r.includes("匿评中"))||(null==C||null===(i=C.homework_status)||void 0===i?void 0:i.includes("申诉中"))||null==C||null===(a=C.homework_status)||void 0===a||a.includes("已截止");Object(f.useEffect)((function(){$()}),[]),Object(f.useEffect)((function(){null!=w&&w.course_id&&(Object.keys(Y).map((function(e){Y[e]=w[e]})),Y.allow_late&&Y.unified_late||(Y.late_penalty=5),B=JSON.parse(JSON.stringify(w.group_settings.map((function(e){return Object(c.a)(Object(c.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),V=JSON.parse(JSON.stringify(w.allow_late_settings.map((function(e){return Object(c.a)(Object(c.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),q(Object(c.a)({},Y)),H(Object(R.a)(B)),W(Object(R.a)(V)))}),[w]);var $=function(){v({type:"shixunHomeworks/getWorkSetting",payload:Object(c.a)({},y)})},J=function(){var e=Object(s.a)(d.a.mark((function e(){var t,n,r;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=JSON.parse(JSON.stringify(Y))).categoryId=y.categoryId,Y.unified_setting||null===(t=B)||void 0===t||t.map((function(e){var t,n;if(!e.publish_time||!e.end_time)throw o.b.error("请把发布时间填写完整"),new String("请把发布时间填写完整");if(!e.group_name)throw o.b.error("请选择分班名称"),new String("请选择分班名称");e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,console.log("item:0",e,w.group_settings,B),e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(n=t.map((function(e){var t,n,r=null===(t=w.group_settings)||void 0===t||null===(n=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===n?void 0:n[0];return console.log("d:",r,e),null==r?void 0:r.group_id})))||void 0===n?void 0:n.toString().split(",")})),n.group_settings=B,!Y.allow_late){e.next=16;break}if(!Y.unified_late){e.next=14;break}if(!(null===Y.late_penalty||void 0===Y.late_penalty||Y.late_penalty<0||Y.late_penalty>100)){e.next=9;break}throw o.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");case 9:if(Y.late_time){e.next=12;break}throw o.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整");case 12:e.next=16;break;case 14:V=null===(r=V)||void 0===r?void 0:r.map((function(e){var t,n;if(null===e.late_penalty||void 0===e.late_penalty||e.late_penalty<0||e.late_penalty>100)throw o.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw o.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(!e.group_name)throw o.b.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(n=t.map((function(e){var t,n,r=null===(t=w.group_settings)||void 0===t||null===(n=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===n?void 0:n[0];return null==r?void 0:r.group_id})))||void 0===n?void 0:n.toString().split(","),e})),n.allow_late_settings=V;case 16:if(!Y.evaluation_start){e.next=23;break}if(!(Y.end_time&&j()(Y.evaluation_start)<=j()(Y.end_time))){e.next=20;break}throw o.b.error("匿评开启时间要晚于作业截止时间、补交截止时间"),new String("匿评开启时间要晚于作业截止时间、补交截止时间");case 20:if(!(Y.late_time&&j()(Y.evaluation_start)<=j()(Y.late_time))){e.next=23;break}throw o.b.error("匿评开启时间要晚于作业截止时间、补交截止时间"),new String("匿评开启时间要晚于作业截止时间、补交截止时间");case 23:return Object.keys(n).map((function(e){e.indexOf("proportion")>-1&&(n[e]=n[e]/100)})),e.next=26,Object(P.a)("/api/homework_commons/".concat(y.categoryId,"/evaluation_setting.json"),{method:"post",body:Object(c.a)({},n)});case 26:0===e.sent.status&&(o.b.success("更新成功"),A(!0),$(),v({type:"shixunHomeworks/getWorkList",payload:Object(c.a)({},y)}));case 28:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return p.a.createElement("section",{className:[ue.a.form].join(" ")},p.a.createElement("aside",{className:"pl30 pr30 pb30 bg-white"},p.a.createElement(O.a,null,p.a.createElement(_.a,{span:24},p.a.createElement(O.a,{align:"middle"},p.a.createElement(_.a,{flex:"1"},p.a.createElement("h1",{className:"mt15"},"匿评设置")),p.a.createElement(_.a,null,(null==w?void 0:w.can_edit)&&S&&p.a.createElement(l.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return A(!1)}},"编辑设置")))),p.a.createElement(_.a,{span:24,className:"mt15 pl30"},p.a.createElement(T.a,{checked:Y.anonymous_comment,disabled:S||(null===(h=C.homework_status)||void 0===h?void 0:h.includes("匿评中")),onChange:function(){Y.anonymous_comment=!Y.anonymous_comment,Y.allow_late&&!Y.evaluation_start?Y.late_time&&""!=Y.late_time&&(Y.evaluation_start=j()(Y.late_time).add(14,"day").format("YYYY-MM-DD HH:mm:ss"),Y.evaluation_end=j()(Y.late_time).add(28,"day").format("YYYY-MM-DD HH:mm:ss")):Y.unified_setting&&!Y.evaluation_start&&Y.end_time&&""!=Y.end_time&&(Y.evaluation_start=j()(Y.end_time).add(14,"day").format("YYYY-MM-DD HH:mm:ss"),Y.evaluation_end=j()(Y.end_time).add(28,"day").format("YYYY-MM-DD HH:mm:ss")),Y.anonymous_comment&&(Y.evaluation_num=parseInt(Y.evaluation_num)?Y.evaluation_num:3,Y.absence_penalty=parseInt(Y.absence_penalty)?Y.absence_penalty:3),q(Object.assign({},Y))}},p.a.createElement("strong",null,"启用匿评")),p.a.createElement("span",{className:"c-grey-c font12"},"(提交作品的数量≥2个,可以开启匿评;为确保公平,匿评规则确定后不可再修改,请谨慎操作!)"))),p.a.createElement(O.a,{align:"middle",className:"mt25 pl30"},p.a.createElement(_.a,null,"开始时间:"),p.a.createElement(_.a,{className:"ml5"},p.a.createElement(pe.a,{allowClear:!1,style:{width:170},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:j()(Object(b.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:S||!Y.anonymous_comment||X,value:Y.evaluation_start?j()(Y.evaluation_start):"",onChange:function(e,t){Y.evaluation_start=t,q(Object.assign({},Y))}})),p.a.createElement(_.a,null,p.a.createElement("span",{className:"c-grey-c ml10"},"(匿评开始时间之前提交作品的学生,参与匿评)"))),p.a.createElement(O.a,{align:"middle",className:"mt25 pl30"},p.a.createElement(_.a,null,"结束时间:"),p.a.createElement(_.a,{className:"ml5"},p.a.createElement(pe.a,{allowClear:!1,style:{width:170},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:j()(Object(b.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:S||!Y.anonymous_comment,value:Y.evaluation_end?j()(Y.evaluation_end):"",onChange:function(e,t){Y.evaluation_end=t,q(Object.assign({},Y))}})),p.a.createElement(_.a,null,p.a.createElement("span",{className:"c-grey-c ml10"},"(学生匿评TA人作品的时间截点)"))),p.a.createElement(O.a,{align:"middle",className:"mt25 pl30"},p.a.createElement(_.a,null,"匿评数量:"),p.a.createElement(_.a,{className:"ml5"},p.a.createElement(x.a,{disabled:S||!Y.anonymous_comment||X,value:Y.evaluation_num,onChange:function(e){Y.evaluation_num=e,q(Object.assign({},Y))}})),p.a.createElement(_.a,{flex:"1",className:"ml5"},p.a.createElement("span",{className:"c-grey-c ml10"},"(本处填写每个学生将被分配的匿评作品数量。如全班实际提交作业数量小于本数值,则以实际提交作业数量为准。)"))),p.a.createElement(O.a,{align:"middle",className:"mt25 pl30"},p.a.createElement(_.a,null,"缺评扣分:"),p.a.createElement(_.a,{className:"ml5"},p.a.createElement(x.a,{min:0,disabled:S||!Y.anonymous_comment||X,value:Y.absence_penalty,onChange:function(e){Y.absence_penalty=e,q(Object.assign({},Y))}})),p.a.createElement(_.a,{flex:"1",className:"ml5"},"分",p.a.createElement("span",{className:"c-grey-c ml10"},"(学生缺评时,其成绩将被扣减的分值)"))),Y.anonymous_comment&&p.a.createElement(p.a.Fragment,null,p.a.createElement(O.a,null,p.a.createElement(_.a,{span:24,className:"mt15 pl30"},p.a.createElement(T.a,{checked:Y.student_comment,disabled:S||j()(Y.evaluation_start)-1&&(y[e]=100*y[e]),W[e]=y[e]})),W.allow_late&&W.unified_late||(W.late_penalty=5),j=JSON.parse(JSON.stringify(y.group_settings.map((function(e){return Object(c.a)(Object(c.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),H=JSON.parse(JSON.stringify(y.allow_late_settings.map((function(e){return Object(c.a)(Object(c.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),G(Object(c.a)({},W)),N(Object(R.a)(j)),U(Object(R.a)(H)))}),[y]);var K=function(){g({type:"shixunHomeworks/getWorkSetting",payload:Object(c.a)({},v)})},Y=function(){var e=Object(s.a)(d.a.mark((function e(){var t,n,r;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=JSON.parse(JSON.stringify(W))).categoryId=v.categoryId,W.unified_setting||null===(t=j)||void 0===t||t.map((function(e){var t,n;if(!e.publish_time||!e.end_time)throw o.b.error("请把发布时间填写完整"),new String("请把发布时间填写完整");if(!e.group_name)throw o.b.error("请选择分班名称"),new String("请选择分班名称");e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,console.log("item:0",e,y.group_settings,j),e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(n=t.map((function(e){var t,n,r=null===(t=y.group_settings)||void 0===t||null===(n=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===n?void 0:n[0];return console.log("d:",r,e),null==r?void 0:r.group_id})))||void 0===n?void 0:n.toString().split(",")})),n.group_settings=j,!W.allow_late){e.next=16;break}if(!W.unified_late){e.next=14;break}if(!(null===W.late_penalty||void 0===W.late_penalty||W.late_penalty<0||W.late_penalty>100)){e.next=9;break}throw o.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");case 9:if(W.late_time){e.next=12;break}throw o.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整");case 12:e.next=16;break;case 14:H=null===(r=H)||void 0===r?void 0:r.map((function(e){var t,n;if(null===e.late_penalty||void 0===e.late_penalty||e.late_penalty<0||e.late_penalty>100)throw o.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw o.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(!e.group_name)throw o.b.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(n=t.map((function(e){var t,n,r=null===(t=y.group_settings)||void 0===t||null===(n=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===n?void 0:n[0];return null==r?void 0:r.group_id})))||void 0===n?void 0:n.toString().split(","),e})),n.allow_late_settings=H;case 16:return Object.keys(n).map((function(e){e.indexOf("proportion")>-1&&(n[e]=n[e]/100)})),e.next=19,Object(P.a)("/api/homework_commons/".concat(v.categoryId,"/score_setting_with_normal.json"),{method:"post",body:Object(c.a)({},n)});case 19:0===e.sent.status&&(o.b.success("更新成功"),S(!0),K(),g({type:"shixunHomeworks/getWorkList",payload:Object(c.a)({},v)}));case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=p.a.createElement("div",{className:"mask-tips"},"计算说明:",p.a.createElement("br",null),"教师评分 * 其百分比 + 助教评分 * 其百分比 + 学生匿评平均分 * 其百分比 - (",p.a.createElement("br",null),"迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )",p.a.createElement("br",null),p.a.createElement("br",null),"注意",p.a.createElement("br",null),"非零百分比的评分选项,若评分记录为空,则其百分比将自动平摊到其它非零",p.a.createElement("br",null),"评分选项上。",p.a.createElement("br",null),"例:教师评分40% + 助教评分35% + 学生匿评25%,学生A没有教师评分记",p.a.createElement("br",null),"录,则其最终成绩按照助教评分55% + 学生匿评45%进行计算"),X=p.a.createElement("div",{className:"mask-tips"},"计算说明:",p.a.createElement("br",null),"优先顺序排前的非零评分 * 100% -",p.a.createElement("br",null),"( 迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )",p.a.createElement("br",null),"例:有教师评分则教师评分100%,否则教辅评分100%,依次类推");return p.a.createElement("section",{className:[ue.a.form].join(" ")},p.a.createElement("aside",{className:"pl30 pr30 pb30 bg-white"},p.a.createElement(O.a,null,p.a.createElement(_.a,{span:24},p.a.createElement(O.a,{align:"middle"},p.a.createElement(_.a,{flex:"1"},p.a.createElement("h1",{className:"mt15"},"评分设置")),p.a.createElement(_.a,null,(null==y?void 0:y.can_edit)&&k&&p.a.createElement(l.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return S(!1)}},"编辑设置"))))),p.a.createElement(O.a,{className:"mt25",style:{paddingLeft:40}},p.a.createElement(_.a,null,p.a.createElement("strong",null,"助教评分")),p.a.createElement(_.a,{span:24,className:"pl30 mt10"})),p.a.createElement(O.a,{style:{paddingLeft:65}},p.a.createElement(w.a.Group,{disabled:k,value:W.ta_mode,onChange:function(e){W.ta_mode=e.target.value,G(Object(c.a)({},W))}},p.a.createElement(w.a,{value:1,style:{marginTop:15}},p.a.createElement("strong",null,"普通模式"),p.a.createElement("span",{className:"c-grey-c"},"(选中,则取各助教最终评分的平均分)")),p.a.createElement("br",null),p.a.createElement(w.a,{value:0,style:{marginTop:15}},p.a.createElement("strong",null,"复审模式"),p.a.createElement("span",{className:"c-grey-c"},"(选中,则只取最新的助教评分)")))),p.a.createElement(O.a,{className:"mt25",style:{paddingLeft:40}},p.a.createElement(_.a,null,p.a.createElement("strong",null,"最终成绩组成:")),p.a.createElement(_.a,{span:24,className:"pl30 mt10"})),p.a.createElement(O.a,{style:{paddingLeft:65}},p.a.createElement(w.a.Group,{disabled:k,value:W.final_mode,onChange:function(e){W.final_mode=e.target.value,G(Object(c.a)({},W))}},p.a.createElement(w.a,{value:!1,style:{marginTop:15}},p.a.createElement("strong",null,"多项评分配比"),p.a.createElement("span",{className:"c-grey-c"},"(选中,则按照比例计算最终成绩)",p.a.createElement(xe.a,{placement:"bottomLeft",content:q,trigger:"click"},p.a.createElement(we.a,{className:"ml20 current"})))),p.a.createElement(O.a,{align:"middle",className:"mt25 pl30 font14"},p.a.createElement(_.a,null,"教师评分:"),p.a.createElement(_.a,{className:"ml5"},p.a.createElement(x.a,{disabled:k,value:W.te_proportion,onChange:function(e){W.te_proportion=e,G(Object.assign({},W))}}),p.a.createElement("span",{className:"ml10"},"%"))),p.a.createElement(O.a,{align:"middle",className:"mt25 pl30 font14"},p.a.createElement(_.a,null,"助教评分:"),p.a.createElement(_.a,{className:"ml5"},p.a.createElement(x.a,{disabled:k,value:W.ta_proportion,onChange:function(e){W.ta_proportion=e,G(Object.assign({},W))}}),p.a.createElement("span",{className:"ml10"},"%"))),p.a.createElement(O.a,{align:"middle",className:"mt25 pl30 font14"},p.a.createElement(_.a,null,"学生匿评:"),p.a.createElement(_.a,{className:"ml5"},p.a.createElement(x.a,{disabled:k,value:W.st_proportion,onChange:function(e){W.st_proportion=e,G(Object.assign({},W))}}),p.a.createElement("span",{className:"ml10"},"%"))),p.a.createElement("br",null),p.a.createElement(w.a,{value:!0,style:{marginTop:15}},p.a.createElement("strong",null,"单项评分优先"),p.a.createElement("span",{className:"c-grey-c"},"(选中,则按照优先顺序计算最终成绩)",p.a.createElement(xe.a,{placement:"bottomLeft",content:X,trigger:"click"},p.a.createElement(we.a,{className:"ml20 current"}))))),p.a.createElement("br",null)),p.a.createElement("div",{style:{paddingLeft:77}},"(教师评分 → 教辅评分 → 学生匿评评分)")),p.a.createElement(O.a,null,!k&&p.a.createElement(_.a,{className:"mb50 mt20 btn-w120"},p.a.createElement(l.a,{type:"primary",size:"large",onClick:function(){return Y()}},"提交"),p.a.createElement(l.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){S(!0),K()}},"取消"))))}))),ke=(pe.a.RangePicker,fe.a.Option,Object(g.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var t,n,r,i,a,s=e.shixunHomeworks,h=(e.loading,e.dispatch),d=Object(m.i)(),g=(Object(m.h)(),s.workSetting),v=s.workList,y=Object(f.useState)(!0),b=Object(u.a)(y,2),x=b[0],w=b[1],C=Object(f.useState)({}),E=Object(u.a)(C,2),k=(E[0],E[1],M.a.useForm()),S=(Object(u.a)(k,1)[0],Object(f.useState)([])),A=Object(u.a)(S,2),L=A[0],D=A[1],I=Object(f.useState)([]),j=Object(u.a)(I,2),N=j[0],P=j[1],F=Object(f.useState)({unified_setting:!1,publish_time:"",end_time:"",ta_mode:1,final_mode:!1,st_proportion:"",ta_proportion:"",te_proportion:"",student_comment:!1,anonymous_appeal:!1,appeal_penalty:0,appeal_time:"",anonymous_comment:!1,evaluation_num:0,evaluation_start:"",evaluation_end:"",absence_penalty:0,work_public:!1,unified_late:!0,allow_late:!1,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,total_score:"",eff_score:""}),B=Object(u.a)(F,2),H=B[0],U=B[1];(null==v||null===(t=v.homework_status)||void 0===t?void 0:t.includes("匿评中"))||null==v||null===(n=v.homework_status)||void 0===n||n.includes("申诉中"),(null==v||null===(r=v.homework_status)||void 0===r?void 0:r.includes("匿评中"))||(null==v||null===(i=v.homework_status)||void 0===i?void 0:i.includes("申诉中"))||null==v||null===(a=v.homework_status)||void 0===a||a.includes("已截止");Object(f.useEffect)((function(){z()}),[]),Object(f.useEffect)((function(){null!=g&&g.course_id&&(Object.keys(H).map((function(e){H[e]=g[e]})),H.allow_late&&H.unified_late||(H.late_penalty=5),L=JSON.parse(JSON.stringify(g.group_settings.map((function(e){return Object(c.a)(Object(c.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),N=JSON.parse(JSON.stringify(g.allow_late_settings.map((function(e){return Object(c.a)(Object(c.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),U(Object(c.a)({},H)),D(Object(R.a)(L)),P(Object(R.a)(N)))}),[g]);var z=function(){h({type:"shixunHomeworks/getWorkSetting",payload:Object(c.a)({},d)})};return p.a.createElement("section",{className:[ue.a.form].join(" ")},p.a.createElement("aside",{className:"pl30 pr30 pb30 bg-white"},p.a.createElement(O.a,null,p.a.createElement(_.a,{span:24},p.a.createElement(O.a,{align:"middle"},p.a.createElement(_.a,{flex:"1"},p.a.createElement("h1",{className:"mt15"},"公开设置")),p.a.createElement(_.a,null,(null==g?void 0:g.can_edit)&&x&&p.a.createElement(l.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return w(!1)}},"编辑设置")))),p.a.createElement(_.a,{span:24,className:"mt15 pl30"},p.a.createElement(T.a,{checked:H.work_public,disabled:x,onChange:function(e){H.work_public=e.target.checked,U(Object.assign({},H))}},p.a.createElement("strong",null,"公开作品")),p.a.createElement("span",{className:"c-grey-c font12"},"(选中,则在作业截止/补交结束时间之后,已提交作品的学生可以查看其它学生的作品,否则只能查看自己的作品)")),p.a.createElement(_.a,{span:24,className:"mt15 pl30"},p.a.createElement(T.a,{checked:H.score_open,disabled:x,onChange:function(e){H.score_open=e.target.checked,U(Object.assign({},H))}},p.a.createElement("strong",null,"公开成绩")),p.a.createElement("span",{className:"c-grey-c font12"},"(选中,则在作业截止/补交结束时间之后,已提交作品的学生可以查看其它学生的成绩,否则只能查看自己的成绩)")),p.a.createElement(_.a,{span:24,className:"mt15 pl30 pb40"},p.a.createElement(T.a,{checked:H.answer_public,disabled:x,onChange:function(e){H.answer_public=e.target.checked,U(Object.assign({},H))}},p.a.createElement("strong",null,"公开答案")),p.a.createElement("span",{className:"c-grey-c font12"},"(选中,则在作业截止/补交结束时间之后,已提交作品的学生可以查看作业参考答案,否则不能查看作业参考答案)")))),p.a.createElement(O.a,null,!x&&p.a.createElement(_.a,{className:"mb50 mt20 btn-w120"},p.a.createElement(l.a,{type:"primary",size:"large",onClick:function(){return function(){var e,t=JSON.parse(JSON.stringify(H));if(t.categoryId=d.categoryId,H.unified_setting||null===(e=L)||void 0===e||e.map((function(e){var t,n;if(!e.publish_time||!e.end_time)throw o.b.error("请把发布时间填写完整"),new String("请把发布时间填写完整");if(!e.group_name)throw o.b.error("请选择分班名称"),new String("请选择分班名称");e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,console.log("item:0",e,g.group_settings,L),e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(n=t.map((function(e){var t,n,r=null===(t=g.group_settings)||void 0===t||null===(n=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===n?void 0:n[0];return console.log("d:",r,e),null==r?void 0:r.group_id})))||void 0===n?void 0:n.toString().split(",")})),t.group_settings=L,H.allow_late)if(H.unified_late){if(null===H.late_penalty||void 0===H.late_penalty||H.late_penalty<0||H.late_penalty>100)throw o.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!H.late_time)throw o.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整")}else{var n;N=null===(n=N)||void 0===n?void 0:n.map((function(e){var t,n;if(null===e.late_penalty||void 0===e.late_penalty||e.late_penalty<0||e.late_penalty>100)throw o.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw o.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(!e.group_name)throw o.b.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(n=t.map((function(e){var t,n,r=null===(t=g.group_settings)||void 0===t||null===(n=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===n?void 0:n[0];return null==r?void 0:r.group_id})))||void 0===n?void 0:n.toString().split(","),e})),t.allow_late_settings=N}Object.keys(t).map((function(e){e.indexOf("proportion")>-1&&(t[e]=t[e]/100)})),h({type:"shixunHomeworks/updateSetting",payload:t}).then((function(e){0===e.status&&(o.b.success("更新成功"),w(!0),z(),h({type:"shixunHomeworks/getWorkList",payload:Object(c.a)({},d)}))}))}()}},"提交"),p.a.createElement(l.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){w(!0),z()}},"取消"))))}))),Se=Object(g.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){e.shixunHomeworks,e.loading,e.dispatch;return p.a.createElement("section",{className:"".concat([ue.a.form].join(" ")," ").concat(ue.a.configWorkContainer)},p.a.createElement(r.a,null,p.a.createElement(r.a.TabPane,{tab:"发布设置",key:1},p.a.createElement(be,null)),p.a.createElement(r.a.TabPane,{tab:"匿评设置",key:2},p.a.createElement(Ce,null)),p.a.createElement(r.a.TabPane,{tab:"评分设置",key:3},p.a.createElement(Ee,null)),p.a.createElement(r.a.TabPane,{tab:"公开设置",key:4},p.a.createElement(ke,null)),p.a.createElement(r.a.TabPane,{tab:"协作设置",key:5},p.a.createElement(he,null))))})),Oe=n("28ck"),Te=n.n(Oe),_e=n("XYT7"),Ae=n("uiYX"),Le=n("8GSA");t.default=Object(g.a)((function(e){var t=e.user,n=e.shixunHomeworks,r=e.loading;return{user:t,shixunHomeworks:n,globalSetting:e.globalSetting,loading:r.effects}}))((function(e){var t,n,h=e.user,x=e.shixunHomeworks,w=e.dispatch,C=Object(m.i)(),E=Object(m.h)(),k=Object(f.useState)(E.query.tabs||"0"),S=Object(u.a)(k,2),O=S[0],T=S[1],_=Object(f.useRef)(null),A=Object(f.useState)(!1),L=Object(u.a)(A,2),D=L[0],R=L[1],M=x.workList;E.query.category_id&&(C.category=E.query.category_id),Object(f.useEffect)((function(){Y()}),[C.coursesId]);var I,j,N,P,F,B,U,z,V,W,G,K,Y=function(){w({type:"shixunHomeworks/getWorkList",payload:Object(c.a)({},C)})},q=[{name:Object(H.c)()?"作业列表":"作品列表",id:"0",compontent:p.a.createElement($,{zip:_,btnLoading:D,setBtnLoading:R})},{name:"作业描述",id:"1",compontent:p.a.createElement("div",{className:"minH500"},p.a.createElement(ae,null))},{name:"参考答案",id:"2",compontent:p.a.createElement(oe,null)},{name:Object(H.c)()?"设置":"得分规则",id:"3",compontent:p.a.createElement(Se,null)}].filter((function(e){return null!=M&&M.view_answer?e:"参考答案"!==e.name}));return p.a.createElement("section",{className:Te.a.bg},p.a.createElement("div",{className:"edu-container mb30"},M.homework_name&&p.a.createElement("section",{className:"animated fadeIn"},p.a.createElement("aside",{className:"mt10"},M.category&&p.a.createElement(i.a,{separator:">"},p.a.createElement(i.a.Item,null,p.a.createElement(v.a,{to:"/classrooms/".concat(M.course_id,"/common_homework")},M.course_name)),p.a.createElement(i.a.Item,null,p.a.createElement(v.a,{to:"/classrooms/".concat(M.course_id,"/common_homework/").concat(1===(null===(t=M.category)||void 0===t?void 0:t.main)?"":M.category.category_id)},M.category.category_name)),p.a.createElement(i.a.Item,null,"作业详情"))),p.a.createElement("aside",{className:[Te.a.title,"mt20"].join(" ")},p.a.createElement(v.a,{to:"/classrooms/".concat(M.course_id,"/common_homework/").concat(1===(null===(n=M.category)||void 0===n?void 0:n.main)?"":M.category.category_id)},p.a.createElement(y.a,{className:"font16 c-black"})),p.a.createElement("strong",{className:"font20 ml5"},M.homework_name),p.a.createElement(b.k,{status:M.homework_status}))),p.a.createElement("aside",{className:"mt30 relative ".concat(Te.a.workListTabWrap)},p.a.createElement(r.a,{type:"card",activeKey:O,tabBarExtraContent:p.a.createElement("div",{className:Te.a.workListTabButton},Object(H.c)()&&p.a.createElement(p.a.Fragment,null,((null===(I=M.homework_status)||void 0===I?void 0:I.includes("未发布"))||(null===(j=M.homework_status)||void 0===j?void 0:j.includes("未开始")))&&p.a.createElement(l.a,{type:"primary",icon:p.a.createElement("i",{className:"iconfont icon-yishezhifabushijian1"}),onClick:function(e){e.preventDefault(),w({type:"classroomList/setActionTabs",payload:{key:"立即发布",selectArrs:[C.categoryId],selectArrsAll:[],params:C,type:2}})}},"立即发布"),!(null!==(N=M.homework_status)&&void 0!==N&&N.includes("未发布"))&&!(null!==(P=M.homework_status)&&void 0!==P&&P.includes("未开始"))&&!(null!==(F=M.homework_status)&&void 0!==F&&F.includes("已截止"))&&M.can_end&&p.a.createElement(l.a,{type:"primary",icon:p.a.createElement("i",{className:"iconfont icon-jiezhishiyan"}),onClick:function(e){e.preventDefault(),w({type:"classroomList/setActionTabs",payload:{key:"立即截止",selectArrs:[C.categoryId],selectArrsAll:[],params:C,type:2}})}},"立即截止"),p.a.createElement(l.a,{type:"primary",icon:p.a.createElement("i",{className:"iconfont icon-bianji2"}),onClick:function(){return g.d.push("/classrooms/".concat(C.coursesId,"/common_homework/").concat(C.categoryId,"/edit"))}},"编辑作业")),(null==M||null===(B=M.work_statuses)||void 0===B?void 0:B.includes("取消关联"))&&p.a.createElement(l.a,{type:"primary",onClick:Object(s.a)(d.a.mark((function e(){var t;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(_e.h)({homeworkId:C.categoryId});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(o.b.success("取消关联成功"),w({type:"shixunHomeworks/getWorkList",payload:Object(c.a)({},C)}));case 4:case"end":return e.stop()}}),e)})))},"取消关联"),(null==M||null===(U=M.work_statuses)||void 0===U?void 0:U.includes("关联项目"))&&p.a.createElement(l.a,{type:"primary",onClick:function(){var e,t;return Object(b.O)("".concat(null===(e=h.navigationInfo)||void 0===e||null===(t=e.top)||void 0===t?void 0:t.old_url,"/projects/deposit/new"))}},"创建项目"),(null==M||null===(z=M.work_statuses)||void 0===z?void 0:z.includes("关联项目"))&&p.a.createElement(l.a,{type:"primary",onClick:function(e){e.preventDefault(),a.a.confirm({title:"关联项目",centered:!0,width:600,okText:"确定",cancelText:"取消",content:p.a.createElement("div",{className:"tc font14"},"您当前尚未管理任何项目,请先",p.a.createElement("a",{onClick:function(){var e,t;Object(b.O)("".concat(null===(e=h.navigationInfo)||void 0===e||null===(t=e.top)||void 0===t?void 0:t.old_url,"/projects/deposit/new"))}},"创建项目"),"再关联")})}},"关联项目"),(null==M||null===(V=M.work_statuses)||void 0===V?void 0:V.includes("提交作品"))&&p.a.createElement(l.a,{type:"primary",onClick:function(){return Object(b.O)("/classrooms/".concat(M.course_id,"/common_homework/").concat(M.homework_id,"/post"))}},"提交作品"),(null==M||null===(W=M.work_statuses)||void 0===W?void 0:W.includes("修改作品"))&&p.a.createElement(l.a,{type:"primary",onClick:function(){return Object(b.O)("/classrooms/".concat(M.course_id,"/common_homework/").concat(M.homework_id,"/").concat(M.id,"/edit"))}},"修改作品"),(null==M||null===(G=M.work_statuses)||void 0===G?void 0:G.includes("补交作品"))&&p.a.createElement(l.a,{type:"primary",onClick:function(){return Object(b.O)("/classrooms/".concat(M.course_id,"/common_homework/").concat(M.homework_id,"/post"))}},"补交作品"),(null==M||null===(K=M.work_statuses)||void 0===K?void 0:K.includes("补交附件"))&&p.a.createElement(l.a,{type:"primary",onClick:function(){w({type:"classroomList/setActionTabs",payload:{key:"补交附件",params:C,selectArrs:Object(c.a)({},M)}})}},"补交附件")),onTabClick:function(e,t){if(2===parseInt(e)){if(null==M||!M.view_answer)return void o.b.info("本次作业老师未公开答案");(null==M?void 0:M.time_status)>2||Object(H.d)()?T(e):o.b.info("截止之后的试卷才能查看答案")}else T(e)},className:Te.a.tabs},q.map((function(e,t){return p.a.createElement(r.a.TabPane,{tab:e.name,key:e.id},e.compontent)}))))),p.a.createElement(Ae.a,null),p.a.createElement(se.a,{type:"edit",onCallback:function(){return Y()}}),p.a.createElement(le.a,{type:"edit",onCallback:function(){return Y()}}),p.a.createElement(Le.a,{ref:_,hide:!0,name:"".concat(null==M?void 0:M.homework_name,"-作品附件"),onOk:function(){return R(!1)}}))}))},LdHM: +/*!********************************************************!*\ + !*** ./node_modules/rc-select/es/index.js + 6 modules ***! + \********************************************************/ +/*! exports provided: Option, OptGroup, default */ +/*! exports used: OptGroup, Option, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.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-select/es/TransBtn.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/pickAttrs.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/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";n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return E}));var r=n("1OyB"),i=n("vuIU"),a=n("Ji7U"),o=n("LK+K"),s=n("q1tI"),l=n("rePB"),c=n("Ff2n"),u=n("ODXe"),h=n("4IlW"),d=n("bX4T"),f=n("YrtM"),p=n("TSYQ"),m=n.n(p),g=n("+nKL"),v=n("8OUc"),y=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,i=e.flattenOptions,a=e.childrenAsData,o=e.values,p=e.searchValue,y=e.multiple,b=e.defaultActiveFirstOption,x=e.height,w=e.itemHeight,C=e.notFoundContent,E=e.open,k=e.menuItemSelectedIcon,S=e.virtual,O=e.onSelect,T=e.onToggleOpen,_=e.onActiveValue,A=e.onScroll,L=e.onMouseEnter,D="".concat(n,"-item"),R=Object(f.a)((function(){return i}),[E,i],(function(e,t){return t[0]&&e[1]!==t[1]})),M=s.useRef(null),I=function(e){e.preventDefault()},j=function(e){M.current&&M.current.scrollTo({index:e})},N=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=R.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];return Object(S.a)(e).map((function(e,n){if(!s.isValidElement(e)||!e.type)return null;var r=e.type.isSelectOptGroup,i=e.key,a=e.props,o=a.children,l=Object(c.a)(a,["children"]);return t||!r?O(e):Object(k.a)(Object(k.a)({key:"__RC_SELECT_GRP__".concat(null===i?n:i,"__"),label:i},l),{},{options:T(o)})})).filter((function(e){return e}))}var _=n("2Qr1"),A=n("qNPg"),L=n("U8pU"),D=n("Kwbf"),R=n("WKfj");var M=function(e){var t=e.mode,n=e.options,r=e.children,i=e.backfill,a=e.allowClear,o=e.placeholder,l=e.getInputElement,c=e.showSearch,u=e.onSearch,h=e.defaultOpen,d=e.autoFocus,f=e.labelInValue,p=e.value,m=e.inputValue,g=e.optionLabelProp,v="multiple"===t||"tags"===t,y=void 0!==c?c:v||"combobox"===t,b=n||T(r);if(Object(D.a)("tags"!==t||b.every((function(e){return!e.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===t||"combobox"===t){var x=b.some((function(e){return e.options?e.options.some((function(e){return"number"==typeof("value"in e?e.value:e.key)})):"number"==typeof("value"in e?e.value:e.key)}));Object(D.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(D.a)("combobox"!==t||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(D.a)("combobox"===t||!i,"`backfill` only works with `combobox` mode."),Object(D.a)("combobox"===t||!l,"`getInputElement` only work with `combobox` mode."),Object(D.b)("combobox"!==t||!l||!a||!o,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==t&&"tags"!==t&&Object(D.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(D.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 w=Object(R.d)(p);Object(D.a)(!f||w.every((function(e){return"object"===Object(L.a)(e)&&("key"in e||"value"in e)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(D.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var C=null;Object(S.a)(r).some((function(e){if(!s.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(S.a)(e.props.children).every((function(t){return!(s.isValidElement(t)&&e.type&&!t.type.isSelectOption)||(C=t.type,!1)})):(C=t,!0))})),C&&Object(D.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(C.displayName||C.name||C,"`.")),Object(D.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},I=Object(A.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:T,flattenOptions:_.d,getLabeledValue:_.e,filterOptions:_.b,isValueDisabled:_.g,findValueOption:_.c,warningProps:M,fillOptionsWithMissingValue:_.a}),j=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).selectRef=s.createRef(),e.focus=function(){e.selectRef.current.focus()},e.blur=function(){e.selectRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return s.createElement(I,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);j.Option=w,j.OptGroup=E;var N=j;t.c=N},M8RZ: +/*!**********************************!*\ + !*** ./src/components/modal.tsx ***! + \**********************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! react-dom */"i8i4"),u=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;Object(r.a)(this,n),i=t.call(this,e);var a=window.document;return i.node=a.createElement("div"),a.body.appendChild(i.node),i}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props.children;return Object(c.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(l.a.Component)},NNe0: +/*!****************************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/CommonHomework/Detail/components/ConfigWorks/index.less?modules ***! + \****************************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___1rG9K",flex_space_between:"flex_space_between___s26wD",flex_box_vertical_center:"flex_box_vertical_center___1Ur8s",flex_box_center_end:"flex_box_center_end___2GQdX",flex_box_column:"flex_box_column___EoDtg",form:"form___1ZYPY",efficiency:"efficiency___2srAz",configWorkContainer:"configWorkContainer___3nRpn"}},NvD2: +/*!******************************************************!*\ + !*** ./node_modules/rc-tree/es/utils/conductUtil.js ***! + \******************************************************/ +/*! exports provided: isCheckDisabled, conductCheck */ +/*! exports used: conductCheck */function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(/*! rc-util/es/warning */"Kwbf");function i(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function a(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!(!n&&!r)||!1===i}function o(e,t,n,o){var s,l=[];s=o||a;var c=new Set(e.filter((function(e){var t=!!n[e];return t||l.push(e),t}))),u=new Map,h=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,i=u.get(r);i||(i=new Set,u.set(r,i)),i.add(t),h=Math.max(h,r)})),Object(r.a)(!l.length,"Tree missing follow keys: ".concat(l.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),!0===t?function(e,t,n,r){for(var a=new Set(e),o=new Set,s=0;s<=n;s+=1){(t.get(s)||new Set).forEach((function(e){var t=e.key,n=e.node,i=e.children,o=void 0===i?[]:i;a.has(t)&&!r(n)&&o.filter((function(e){return!r(e.node)})).forEach((function(e){a.add(e.key)}))}))}for(var l=new Set,c=n;c>=0;c-=1){(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var i=!0,s=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);i&&!n&&(i=!1),s||!n&&!o.has(t)||(s=!0)})),i&&a.add(t.key),s&&o.add(t.key),l.add(t.key)}}))}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(i(o,a))}}(c,u,h,s):function(e,t,n,r,a){for(var o=new Set(e),s=new Set(t),l=0;l<=r;l+=1){(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,i=void 0===r?[]:r;o.has(t)||s.has(t)||a(n)||i.filter((function(e){return!a(e.node)})).forEach((function(e){o.delete(e.key)}))}))}s=new Set;for(var c=new Set,u=r;u>=0;u-=1){(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!a(n)&&e.parent&&!c.has(e.parent.key))if(a(e.parent.node))c.add(t.key);else{var r=!0,i=!1;(t.children||[]).filter((function(e){return!a(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);r&&!n&&(r=!1),i||!n&&!s.has(t)||(i=!0)})),r||o.delete(t.key),i&&s.add(t.key),c.add(t.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(i(s,o))}}(c,t.halfCheckedKeys,u,h,s)}},OLES: +/*!*********************************************************!*\ + !*** ./node_modules/rc-tooltip/es/index.js + 2 modules ***! + \*********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tooltip/es/placements.js because of ./node_modules/antd/es/tooltip/placements.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/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("U8pU"),i=n("VTBJ"),a=n("Ff2n"),o=n("q1tI"),s=n("uciX"),l=n("7ixt"),c=function(e){var t=e.overlay,n=e.prefixCls,r=e.id,i=e.overlayInnerStyle;return o.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:i},"function"==typeof t?t():t)},u=Object(o.forwardRef)((function(e,t){var n=e.overlayClassName,u=e.trigger,h=void 0===u?["hover"]:u,d=e.mouseEnterDelay,f=void 0===d?0:d,p=e.mouseLeaveDelay,m=void 0===p?.1:p,g=e.overlayStyle,v=e.prefixCls,y=void 0===v?"rc-tooltip":v,b=e.children,x=e.onVisibleChange,w=e.afterVisibleChange,C=e.transitionName,E=e.animation,k=e.placement,S=void 0===k?"right":k,O=e.align,T=void 0===O?{}:O,_=e.destroyTooltipOnHide,A=void 0!==_&&_,L=e.defaultVisible,D=e.getTooltipContainer,R=e.overlayInnerStyle,M=Object(a.a)(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),I=Object(o.useRef)(null);Object(o.useImperativeHandle)(t,(function(){return I.current}));var j=Object(i.a)({},M);"visible"in e&&(j.popupVisible=e.visible);var N=!1,P=!1;if("boolean"==typeof A)N=A;else if(A&&"object"===Object(r.a)(A)){var F=A.keepParent;N=!0===F,P=!1===F}return o.createElement(s.a,Object.assign({popupClassName:n,prefixCls:y,popup:function(){var t=e.arrowContent,n=void 0===t?null:t,r=e.overlay,i=e.id;return[o.createElement("div",{className:"".concat(y,"-arrow"),key:"arrow"},n),o.createElement(c,{key:"content",prefixCls:y,id:i,overlay:r,overlayInnerStyle:R})]},action:h,builtinPlacements:l.a,popupPlacement:S,ref:I,popupAlign:T,getPopupContainer:D,onPopupVisibleChange:x,afterPopupVisibleChange:w,popupTransitionName:C,popupAnimation:E,defaultPopupVisible:L,destroyPopupOnHide:N,autoDestroy:P,mouseLeaveDelay:m,popupStyle:g,mouseEnterDelay:f},j),b)}));t.a=u},OZM5: +/*!*****************************************!*\ + !*** ./node_modules/rc-tree/es/util.js ***! + \*****************************************/ +/*! exports provided: arrDel, arrAdd, posToArr, getPosition, isTreeNode, getDragNodesKeys, calcDropPosition, calcSelectedKeys, convertDataToTree, parseCheckedKeys, conductExpandParent, getDataAndAria */ +/*! exports used: arrAdd, arrDel, calcDropPosition, calcSelectedKeys, conductExpandParent, getDataAndAria, getDragNodesKeys, getPosition, isTreeNode, parseCheckedKeys, posToArr */function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"k",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"g",(function(){return h})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return f})),n.d(t,"j",(function(){return p})),n.d(t,"e",(function(){return m})),n.d(t,"f",(function(){return g}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),a=(n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),n(/*! react */"q1tI"),n(/*! rc-util/es/warning */"Kwbf"));n(/*! ./TreeNode */"WaYH");function o(e,t){var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function s(e,t){var n=e.slice();return-1===n.indexOf(t)&&n.push(t),n}function l(e){return e.split("-")}function c(e,t){return"".concat(e,"-").concat(t)}function u(e){return e&&e.type&&e.type.isTreeNode}function h(e,t){var n=[e];return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var r=t.key,i=t.children;n.push(r),e(i)}))}(t[e].children),n}function d(e,t){var n=e.clientY,r=t.selectHandle.getBoundingClientRect(),i=r.top,a=r.bottom,o=r.height,s=Math.max(.25*o,2);return n<=i+s?-1:n>=a-s?1:0}function f(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function p(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==Object(i.a)(e))return Object(a.a)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function m(e,t){var n=new Set;return(e||[]).forEach((function(e){!function e(r){if(!n.has(r)){var i=t[r];if(i){n.add(r);var a=i.parent;i.node.disabled||a&&e(a.key)}}}(e)})),Object(r.a)(n)}function g(e){var t={};return Object.keys(e).forEach((function(n){(n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n])})),t}},Ot1p: +/*!**************************************************************!*\ + !*** ./src/components/markdown-editor/index.tsx + 6 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./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/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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/RenderHtml/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ +/*! 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/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ +/*! 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(e,t,n){"use strict";n("2qtc");var r=n("kLXV"),i=n("rAM+"),a=(n("miYZ"),n("tsqr")),o=n("9og8"),s=n("tJVT"),l=n("jrin"),c=n("WmNS"),u=n.n(c),h=n("q1tI"),d=n.n(h),f=n("VrN/"),p=n.n(f),m=n("bdgK"),g=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),v=function(e){var t=e.value,n=void 0===t?"":t,r=(e.className,e.showTextOnly,e.showLines,e.style,Object(h.useMemo)((function(){return""}),[n]));return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},y=n("0Owb"),b=(n("dejd"),n("C+DQ"),n("1vsH")),x=n("m3rI"),w=[{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(e){var t=e.onActionCallback,n=e.title,r=e.icon,i=e.actionName,a=e.className,o=void 0===a?"":a,s=e.children;return d.a.createElement("a",{title:n,className:o,onClick:function(){t(i)}},d.a.createElement("i",{className:"md-iconfont ".concat(r)}),s)}var E=function(e){var t=e.watch,n=e.showNullButton,r=e.onActionCallback,i=e.fullScreen,a=e.insertTemp,o=e.hidetoolBar,s=e.uuid;e.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(s,"&api=").concat(encodeURIComponent(x.a.PROXY_SERVER)));var l=[].concat(w,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!o&&l.map((function(e,t){return d.a.createElement("li",{key:t},e.actionName?d.a.createElement(C,Object(y.a)({},e,{onActionCallback:r})):d.a.createElement("span",{className:"v-line"}))})),n?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,a&&d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(C,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},k=n("M8RZ"),S=(n("+L6B"),n("2/Rp")),O=(n("y8nQ"),n("Vl3Y")),T=(n("5NDa"),n("5rEg")),_={labelCol:{span:4},wrapperCol:{span:20}},A=function(e){var t=e.callback,n=e.onCancel;return d.a.createElement(O.a,Object(y.a)({},_,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)}}),d.a.createElement(O.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(T.a,null)),d.a.createElement(O.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(T.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(S.a,{type:"ghost",onClick:n},"取消")))},L=n("7ahc"),D=n("k1fw"),R=(n("HmJG"),n("BjJ7")),M=O.a.useForm,I={width:280,marginRight:10},j={labelCol:{span:5},wrapperCol:{span:19}},N=function(e){var t=e.callback,n=e.onCancel,r=M(),i=Object(s.a)(r,1)[0],a=Object(h.useRef)();function o(e,t){i.setFieldsValue({src:"/api/attachments/".concat(e.id,"?type=").concat(e.content_type),type:t.type})}return d.a.createElement(O.a,Object(y.a)({form:i},j,{className:"upload-image-panel",onFinish:function(e){t(Object(D.a)(Object(D.a)({},e),{},{name:a.current}))}}),d.a.createElement(O.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(O.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(T.a,{style:I})),d.a.createElement(P,{onFileChange:function(e){var t=e.target.files[0];a.current=t.name,F(t,o)}}))),d.a.createElement(O.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(T.a,{style:{width:264}})),d.a.createElement(O.a.Item,{style:{textAlign:"right"}},d.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(S.a,{type:"ghost",onClick:n},"取消")))};function P(e){var t=e.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:t}))}function F(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),r.addEventListener("error",(function(e){console.error(e)}),!1),r.open("POST","".concat(R.a,"/api/attachments.json")),r.send(n)}n("giR+");var B,H,U=n("fyUT"),z=(n("7Kak"),n("9yH6")),V=z.a.Group,W={margin:"0 8px"},G=function(e){var t=e.callback,n=e.onCancel;return d.a.createElement(O.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)}},d.a.createElement("div",{className:"flex-container"},d.a.createElement("span",{style:W},"单元格数:"),d.a.createElement("span",{style:W},"行数"),d.a.createElement(O.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(U.a,null)),d.a.createElement("span",{style:W},"列数"),d.a.createElement(O.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(U.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:W},"对齐方式:"),d.a.createElement(O.a.Item,{name:"align"},d.a.createElement(V,null,d.a.createElement(z.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(z.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(z.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(z.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(S.a,{type:"ghost",onClick:n},"取消")))},K=n("ErOA"),Y=n("7Cbv"),q="------------",X={default:q,left:":".concat(q),center:":".concat(q,":"),right:"".concat(q,":")},$=n("9VGf");function J(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var Z=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Q=["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"],ee=(B={},Object(l.a)(B,Z+"-B","bold"),Object(l.a)(B,Z+"-I","italic"),B),te=(H={},Object(l.a)(H,"link","添加链接"),Object(l.a)(H,"code-block","添加代码块"),Object(l.a)(H,"upload-image","添加文件"),Object(l.a)(H,"add-table","添加表格"),H);t.a=function(e){var t=e.defaultValue,n=void 0===t?"":t,c=e.onChange,f=e.width,y=void 0===f?"100%":f,b=e.height,w=void 0===b?400:b,C=e.miniToolbar,S=void 0!==C&&C,O=e.isFocus,T=void 0!==O&&O,_=e.watch,D=e.insertTemp,R=e.mode,M=void 0===R?"markdown":R,I=e.id,j=void 0===I?"markdown-editor-id":I,P=e.showResizeBar,B=void 0!==P&&P,H=e.noStorage,U=void 0!==H&&H,z=e.showNullButton,V=void 0!==z&&z,W=e.hidetoolBar,q=void 0!==W&&W,Z=e.fullScreen,ne=void 0!==Z&&Z,re=e.onBlur,ie=e.onCMBeforeChange,ae=e.onFullScreen,oe=e.className,se=void 0===oe?"":oe,le=e.disablePaste,ce=void 0!==le&&le,ue=e.placeholder,he=void 0===ue?"":ue,de=e.values,fe=void 0===de?"":de,pe=Object(h.useState)(null),me=Object(s.a)(pe,2),ge=me[0],ve=me[1],ye=Object(h.useState)(n),be=Object(s.a)(ye,2),xe=be[0],we=be[1],Ce=Object(h.useState)(_),Ee=Object(s.a)(Ce,2),ke=Ee[0],Se=Ee[1],Oe=Object(h.useState)(ne),Te=Object(s.a)(Oe,2),_e=Te[0],Ae=Te[1],Le=Object(h.useState)(""),De=Object(s.a)(Le,2),Re=De[0],Me=De[1],Ie=Object(h.useState)(0),je=Object(s.a)(Ie,2),Ne=je[0],Pe=je[1],Fe=Object(h.useState)(w),Be=Object(s.a)(Fe,2),He=Be[0],Ue=Be[1],ze=Object(h.useState)(!1),Ve=Object(s.a)(ze,2),We=(Ve[0],Ve[1]),Ge=Object(h.useRef)(Object(Y.a)()),Ke=Object(h.useRef)(!1),Ye=Object(h.useRef)(),qe=Object(h.useRef)(),Xe=Object(h.useRef)(),$e=Object(h.useRef)(),Je=Object(h.useRef)(),Ze=function(){var e=Object(o.a)(u.a.mark((function e(){var t,n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(K.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Ge.current}});case 2:null!=(n=e.sent)&&null!==(t=n.attachments)&&void 0!==t&&t.length&&(console.log("cm:",ge,qe),n.attachments.map((function(e){e.content_type.indexOf("image")>-1?ge.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):e.content_type.indexOf("video")>-1?ge.replaceSelection('')):e.content_type.indexOf("pdf")>-1?ge.replaceSelection('
      ').concat(e.name,"")):ge.replaceSelection("[".concat(e.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")"))})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(h.useEffect)((function(){we(fe),null==ge||ge.setValue(fe)}),[fe]),Object(h.useEffect)((function(){null==ae||ae(_e)}),[_e]),Object(h.useEffect)((function(){if(qe.current){var e=p.a.fromTextArea(qe.current,{mode:M,lineNumbers:!S,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function t(t,n){if(!ce){var r=n.clipboardData;if(r){var i=r.types.toString(),o=r.items;if("Files"===i||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==M)return;try{var s,l=o[1];"file"===(null===(s=o[0])||void 0===s?void 0:s.kind)&&(l=o[0]);var c=l.getAsFile(),u=c.name.split(".").pop();F(c,(function(t){var n,r,i;t.id?(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?e.replaceSelection('')):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?e.replaceSelection('').concat(c.name,"")):Q.includes(u)?e.replaceSelection('').concat(c.name,"")):e.replaceSelection("[".concat(c.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))}catch(n){a.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return T&&e.focus(),e.on("paste",t),e.on("dragleave",(function(e,t){Xe.current.classList.remove("mouse-hover-md")})),e.on("dragover",(function(e,t){Xe.current.classList.add("mouse-hover-md")})),e.on("drop",(function(t,n){var r;if(Xe.current.classList.add("mouse-hover-md"),(r=n.dataTransfer.files).length>0){n.preventDefault(),n.stopPropagation();for(var i=function(t){var n=r[t],i=n.name.split(".").pop();F(n,(function(t){var r,a,o;t.id?(null==n||null===(r=n.type)||void 0===r?void 0:r.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==n||null===(a=n.type)||void 0===a?void 0:a.indexOf("video"))>-1?e.replaceSelection('')):(null==n||null===(o=n.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?e.replaceSelection('').concat(n.name,"")):Q.includes(i)?e.replaceSelection('').concat(n.name,"")):e.replaceSelection("[".concat(n.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))},a=0;a0||r.target.offsetWidth>0)&&(Qe(),ge.setSize("100%","100%"),ge.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(qe.current.parentElement),e}();return function(){e.unobserve(qe.current.parentElement)}}}),[ge,Qe]),Object(h.useEffect)((function(){if(ge){for(var e=[],t=function(){var t=r[n],i=(a=Object(s.a)(t,2))[0],o=a[1],c=Object(l.a)({},i,(function(){et(o)}));e.push(c),ge.addKeyMap(c)},n=0,r=Object.entries(ee);n0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(j);e>=Ne+1e4&&(!t||t!==xe)&&(window.sessionStorage.setItem(j,xe),We(!0))}}),1e4),Object(h.useEffect)((function(){Se(_)}),[ge,_]),Object(h.useEffect)((function(){ge&&T&&ge.focus()}),[ge,T]),Object(h.useEffect)((function(){if(ke&&ge){var e=ge.getScrollerElement();function t(e){var t=e.target;if(Je.current){var n=t.scrollTop/t.scrollHeight;Je.current.scrollTop=Je.current.scrollHeight*n}}return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[ge,ke]),Object(h.useEffect)((function(){if(ge&&ie){function e(e,t){ie(e,t)}return ge.on("beforeChange",e),function(){ge.off("beforeChange",e)}}}),[ge,ie]),Object(h.useEffect)((function(){if(ge&&re){function e(){re(ge.getValue())}return ge.on("blur",e),function(){ge.off("blur",e)}}}),[ge,re]),Object(h.useEffect)((function(){if(ge){function e(e){var t=e.getValue();we(t),Pe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(t)}return ge.on("change",e),function(){ge.off("change",e)}}}),[ge,c]),Object(h.useEffect)((function(){ge&&(null==n?(ge.setValue(""),we("")):n!==ge.getValue()&&(ge.setValue(n),we(n),ge.setCursor(ge.lineCount(),0)))}),[ge,n]);var et=Object(h.useCallback)((function(e){var t=ge.getCursor(),n=ge.getSelection(),r=n.split("\n");switch(e){case"bold":return ge.replaceSelection("**"+n+"**"),""===n&&ge.setCursor(t.line,t.ch+2),ge.focus();case"italic":return ge.replaceSelection("*"+n+"*"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"code":return ge.replaceSelection("`"+n+"`"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"inline-latex":return ge.replaceSelection("`$$"+n+"$$`"),""===n&&ge.setCursor(t.line,t.ch+3),ge.focus();case"latex":return ge.replaceSelection("```latex\n"+n+"\n```"),ge.setCursor(t.line+1,n.length+1),ge.focus();case"line-break":return ge.replaceSelection("
      \n"),ge.focus();case"list-ul":return""===n?ge.replaceSelection("- "+n):ge.replaceSelection(r.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),ge.focus();case"list-ol":return""===n?ge.replaceSelection("1. "+n):ge.replaceSelection(r.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),ge.focus();case"add-null-ch":return""===n&&ge.setCursor(t.line,t.ch+1),ge.replaceSelection("▁"),ge.focus();case"inster-template-1":return""===n&&ge.setCursor(t.line,t.ch),ge.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),ge.focus();case"eraser":return ge.setValue(""),ge.focus();case"trigger-watch":return Se(!ke),ge.focus();case"trigger-full-screen":return Ae(!_e),ge.focus();case"link":return void Me("link");case"code-block":return void Me("code-block");case"upload-image":return void Me("upload-image");case"add-table":return void Me("add-table");default:throw new Error}}),[ge,ke,_e]),tt=Object(h.useCallback)((function(e){switch(Me(""),Re){case"link":var t=e.title,n=e.link;return ge.replaceSelection("[".concat(t,"](").concat(n,")")),ge.focus();case"code-block":var r=e.language,i=e.content;return ge.replaceSelection(["```"+r,i,"```"].join("\n")),ge.focus();case"upload-image":var a=e.src,o=e.alt,s=e.name;return a.indexOf("type=image")>-1?ge.replaceSelection("![ ".concat(o||""," ]( ").concat(a,' "').concat(o||"",'" )')):a.indexOf("type=application/pdf")>-1?ge.replaceSelection('').concat(s,"")):ge.replaceSelection('').concat(s,"")),ge.focus();case"add-table":for(var l=e.row,c=e.col,u=e.align,h="\n",d=0;d300&&(r=300),Ue(w+r+"px")}}return e.addEventListener("mousedown",r),document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),function(){e.removeEventListener("mousedown",r),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i)}}}),[ge,$e]),Object(h.useEffect)((function(){Ue(w)}),[w]);var it={width:J(y),height:J(He)};Object(h.useMemo)((function(){if(Ne){var e=new Date(Ne),t=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(r)}return 0}),[Ne]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Xe},d.a.createElement("div",{className:"markdown-editor-container ".concat(se," ").concat(ke?"on-preview":""," ").concat(S?"mini":""," ").concat(_e?"full-screen":""),style:it},d.a.createElement(E,{insertTemp:D,watch:ke,fullScreen:_e,showNullButton:V,onActionCallback:et,hidetoolBar:q,uuid:Ge.current,setOpenPhones:function(){Ke.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:qe,placeholder:he})),ke?d.a.createElement("div",{ref:Je,className:"preview-container"},"stex"===M&&d.a.createElement(v,{value:xe}),"stex"!==M&&d.a.createElement(g.a,{edit:!0,value:xe,replaces:function(e,t){var n=ge.getValue();n=n.replace(e,t),we(n),null==ge||ge.setValue(n)}})):null))),B?d.a.createElement("a",{ref:$e,className:"editor-resize"}):null,d.a.createElement(k.a,null,te[Re]?d.a.createElement(r.a,{centered:!0,title:te[Re],visible:!0,onCancel:rt,footer:null},nt):null))}},"SA+Z": +/*!********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/toArray.js ***! + \********************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./arrayWithHoles.js */"wTVA"),i=n(/*! ./iterableToArray.js */"EbDI"),a=n(/*! ./unsupportedIterableToArray.js */"ZhPi"),o=n(/*! ./nonIterableRest.js */"wkBT");e.exports=function(e){return r(e)||i(e)||a(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},SJMd: +/*!****************************************************!*\ + !*** ./node_modules/code-prettify/src/prettify.js ***! + \****************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var e=window,t=["break,continue,do,else,for,if,return,while"],n=[[t,"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=[n,"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"],i=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[n,"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=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",l=[t,"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=[t,"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=[t,"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(e,t,n,r,i){if(n){var a={sourceNode:e,pre:1,langExtension:null,numberLines:null,sourceCode:n,spans:null,basePos:t,decorations:null};r(a),i.push.apply(i,a.decorations)}}var f=/\S/;function p(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling){var r=n.nodeType;t=1===r?t?e:n:3===r&&f.test(n.nodeValue)?e:t}return t===e?void 0:t}function m(e,t){var n,r={};!function(){for(var i=e.concat(t),a=[],o={},s=0,l=i.length;s=0;)r[u.charAt(h)]=c;var d=c[1],f=""+d;o.hasOwnProperty(f)||(a.push(d),o[f]=null)}a.push(/[\0-\uffff]/),n=function(e){for(var t=0,n=!1,r=!1,i=0,a=e.length;i122||(u<65||h>90||n.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||n.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}n.sort((function(e,t){return e[0]-t[0]||t[1]-e[1]}));var d=[],f=[];for(a=0;ap[0]&&(p[1]+1>p[0]&&i.push("-"),i.push(l(p[1])))}return i.push("]"),i.join("")}function u(e){for(var r=e.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")),i=r.length,a=[],o=0,s=0;o=2&&"["===d?r[o]=c(h):"\\"!==d&&(r[o]=h.replace(/[a-zA-Z]/g,(function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"})))}return r.join("")}var h=[];for(i=0,a=e.length;i=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(g=!1,y="src"),g||(f[v]=y)}var E=u;if(u+=v.length,g){var k=b[1],S=v.indexOf(k),O=S+k.length;b[2]&&(S=(O=v.length-b[2].length)-k.length);var T=y.substring(5);d(l,s+E,v.substring(0,S),a,c),d(l,s+E+S,k,w(T,k),c),d(l,s+E+O,v.substring(O),a,c)}else c.push(s+E,y)}e.decorations=c};return a}function g(e){var t=[],n=[];e.tripleQuotedStrings?t.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=e.hashComments;r&&(e.cStyleComments?(r>1?t.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push(["com",/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var i=e.regexLiterals;if(i){var a=i>1?"":"\n\r",o=a?".":"[\\S\\s]",s="/(?=[^/*"+a+"])(?:[^/\\x5B\\x5C"+a+"]|\\x5C"+o+"|\\x5B(?:[^\\x5C\\x5D"+a+"]|\\x5C"+o+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+s+")")])}var l=e.types;l&&n.push(["typ",l]);var c=(""+e.keywords).replace(/^ | $/g,"");c.length&&n.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return e.regexLiterals&&(u+="(?!s*/)"),n.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]),m(t,n)}var v=g({keywords:[r,a,i,o,s,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(e,t,n){for(var r=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,a=e.ownerDocument,o=a.createElement("li");e.firstChild;)o.appendChild(e.firstChild);var s=[o];function l(e){var t=e.nodeType;if(1!=t||r.test(e.className)){if((3==t||4==t)&&n){var o=e.nodeValue,s=o.match(i);if(s){var u=o.substring(0,s.index);e.nodeValue=u;var h=o.substring(s.index+s[0].length);if(h)e.parentNode.insertBefore(a.createTextNode(h),e.nextSibling);c(e),u||e.parentNode.removeChild(e)}}}else if("br"===e.nodeName)c(e),e.parentNode&&e.parentNode.removeChild(e);else for(var d=e.firstChild;d;d=d.nextSibling)l(d)}function c(e){for(;!e.nextSibling;)if(!(e=e.parentNode))return;for(var t,n=function e(t,n){var r=n?t.cloneNode(!1):t,i=t.parentNode;if(i){var a=e(i,1),o=t.nextSibling;a.appendChild(r);for(var s=o;s;s=o)o=s.nextSibling,a.appendChild(s)}return r}(e.nextSibling,0);(t=n.parentNode)&&1===t.nodeType;)n=t;s.push(n)}for(var u=0;u=0;){var i=n[r];b.hasOwnProperty(i)?e.console&&console.warn("cannot override language handler %s",i):b[i]=t}}function w(e,t){return e&&b.hasOwnProperty(e)||(e=/^\s*=x&&(u+=2),s>=w&&(f+=2)}}finally{v&&(v.style.display=y)}}(t)}catch(t){e.console&&console.log(t&&t.stack||t)}}function E(e,t,n){var r=n||!1,i=t||null,a=document.createElement("div");return a.innerHTML="
      "+e+"
      ",a=a.firstChild,r&&y(a,r,!0),C({langExtension:i,numberLines:r,sourceNode:a,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),a.innerHTML}function k(t,n){var r=n||document.body,i=r.ownerDocument||document;function a(e){return r.getElementsByTagName(e)}for(var o=[a("pre"),a("code"),a("xmp")],s=[],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(m([["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(m([],[["atv",/^[\s\S]+/]]),["uq.val"]),x(g({keywords:r,hashComments:!0,cStyleComments:!0,types:h}),["c","cc","cpp","cxx","cyc","m"]),x(g({keywords:"null,true,false"}),["json"]),x(g({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:h}),["cs"]),x(g({keywords:i,cStyleComments:!0}),["java"]),x(g({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(g({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(g({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(g({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(g({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),x(g({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(m([],[["str",/^[\s\S]+/]]),["regex"]);var S=e.PR={createSimpleLexer:m,registerLangHandler:x,sourceDecorator:g,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:E,prettyPrint:k},O=e.define;"function"==typeof O&&O.amd&&O("google-code-prettify",[],(function(){return S}))}()},"VrN/": +/*!***************************************************!*\ + !*** ./node_modules/codemirror/lib/codemirror.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),l=!a&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!a&&/Chrome\//.test(e),h=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),m=!a&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),w=h&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var C=y&&(c||h&&(null==w||w<12.11)),E=n||o&&s>=9;function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,O=function(e,t){var n=e.className,r=k(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function _(e,t){return T(e).appendChild(t)}function A(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a=t)return o+(t-a);o+=s-a,o+=n-o%n,a=s+1}}m?j=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(j=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=N(this.onTimeout,this)};function H(e,t){for(var n=0;n=t)return r+Math.min(o,t-i);if(i+=a-r,r=a+1,(i+=n-i%n)>=t)return r}}var K=[""];function Y(e){for(;K.length<=e;)K.push(q(K)+" ");return K[e]}function q(e){return e[e.length-1]}function X(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Q(e))||t.test(e):Q(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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 re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}var oe=null;function se(e,t,n){var r;oe=null;for(var i=0;it)return i;a.to==t&&(a.from!=a.to&&"before"==n?r=i:oe=i),a.from==t&&(a.from!=a.to&&"before"!=n?r=i:oe=i)}return null!=r?r:oe}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function a(e,t,n){this.level=e,this.from=t,this.to=n}return function(o,s){var l="ltr"==s?"L":"R";if(0==o.length||"ltr"==s&&!e.test(o))return!1;for(var c,u=o.length,h=[],d=0;d-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function pe(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function ye(e){e.prototype.on=function(e,t){he(this,e,t)},e.prototype.off=function(e,t){fe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ce(e){be(e),xe(e)}function Ee(e){return e.target||e.srcElement}function ke(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Se,Oe,Te=function(){if(o&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function _e(e){if(null==Se){var t=A("span","​");_(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=Se?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ae(e){if(null!=Oe)return Oe;var t=_(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(Oe=r.right-n.right<3)}var Le,De=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var a=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),o=a.indexOf("\r");-1!=o?(n.push(a.slice(0,o)),t+=o+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Me="oncopy"in(Le=A("div"))||(Le.setAttribute("oncopy","return;"),"function"==typeof Le.oncopy),Ie=null,je={},Ne={};function Pe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function Fe(e){if("string"==typeof e&&Ne.hasOwnProperty(e))e=Ne[e];else if(e&&"string"==typeof e.name&&Ne.hasOwnProperty(e.name)){var t=Ne[e.name];"string"==typeof t&&(t={name:t}),(e=J(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Fe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Fe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=Fe(t);var n=je[t.name];if(!n)return Be(e,"text/plain");var r=n(e,t);if(He.hasOwnProperty(t.name)){var i=He[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var He={};function Ue(e,t){P(t,He.hasOwnProperty(e)?He[e]:He[e]={})}function ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ve(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function We(e,t,n){return!e.startState||e.startState(t,n)}var Ge=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ke(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t=e.first&&tn?et(n,Ke(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ke(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r=this.string.length},Ge.prototype.sol=function(){return this.pos==this.lineStart},Ge.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ge.prototype.next=function(){if(this.post},Ge.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ge.prototype.skipToEnd=function(){this.pos=this.string.length},Ge.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ge.prototype.backUp=function(e){this.pos-=e},Ge.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ge.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ge.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ge.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ge.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ht(e,t,n,r){var i=[e.state.modeGen],a={};xt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),a,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,xt(e,t.text,s.mode,n,(function(e,t){for(var n=l;ce&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&ze(e.doc.mode,r.state),a=ht(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ft(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ut(r,!0,t);var a=function(e,t,n){for(var r,i,a=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var l=Ke(a,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=a.modeFrontier))return s;var u=F(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),o=a>r.first&&Ke(r,a-1).stateAfter,s=o?ut.fromSaved(r,o,a):new ut(r,We(r.mode),a);return r.iter(a,t,(function(n){pt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,ze(e.mode,t.state),n,t.lookAhead):new ut(e,ze(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,a,o=e.doc,s=o.mode,l=Ke(o,(t=st(o,t)).line),c=ft(e,t.line,n),u=new Ge(l.text,e.options.tabSize,c);for(r&&(a=[]);(r||u.pose.options.maxHighlightLength?(s=!1,o&&pt(e,t,r,h.pos),h.pos=t.length,l=null):l=bt(gt(n,h,r.state,d),a),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c=t:a.to>t);(r||(r=[])).push(new Et(o,a.from,s?null:a.to))}}return r}(n,i,o),l=function(e,t,n){var r;if(e)for(var i=0;i=t:a.to>t)||a.from==t&&"bookmark"==o.type&&(!n||a.marker.insertLeft)){var s=null==a.from||(o.inclusiveLeft?a.from<=t:a.from0&&s)for(var b=0;bt)&&(!n||Rt(n,a.marker)<0)&&(n=a.marker)}return n}function Pt(e,t,n,r,i){var a=Ke(e,t),o=Ct&&a.markedSpans;if(o)for(var s=0;s=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Ft(e){for(var t;t=It(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var n=Ke(e,t),r=Ft(n);return n==r?t:$e(r)}function Ht(e,t){if(t>e.lastLine())return t;var n,r=Ke(e,t);if(!Ut(e,r))return t;for(;n=jt(r);)r=n.find(1,!0).line;return $e(r)+1}function Ut(e,t){var n=Ct&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Kt=function(e,t,n){this.text=e,At(this,t),this.height=n?n(this):1};function Yt(e){e.parent=null,_t(e)}Kt.prototype.lineNo=function(){return $e(this)},ye(Kt);var qt={},Xt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Xt:qt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Jt(e,t){var n=L("span",null,null,l?"padding-right: .1px":null),r={pre:L("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=Qt,Ae(e.display.measure)&&(o=ce(a,e.doc.direction))&&(r.addToken=en(r.addToken,o)),r.map=[],nn(a,r,dt(e,a,t!=e.display.externalMeasured&&$e(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=I(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=I(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(_e(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=I(r.pre.className,r.textClass||"")),r}function Zt(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Qt(e,t,n,r,i,a,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&h.from<=c);d++);if(h.to>=u)return e(n,r,i,a,o,s,l);e(n,r.slice(0,h.to-c),i,a,null,s,l),a=null,r=r.slice(h.to-c),c=h.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(r)for(var o,s,l,c,u,h,d,f=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=u=s="",d=null,h=null,v=1/0;for(var y=[],b=void 0,x=0;xp||C.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,c=""),C.className&&(l+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&w.from==p&&(u+=" "+C.startStyle),C.endStyle&&w.to==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var E in C.attributes)(d||(d={}))[E]=C.attributes[E];C.collapsed&&(!h||Rt(h.marker,C)<0)&&(h=w)}else w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var O=Math.min(f,v);;){if(g){var T=p+g.length;if(!h){var _=T>O?g.slice(0,O-p):g;t.addToken(t,_,o?o+l:l,u,p+_.length==v?c:"",s,d)}if(T>=O){g=g.slice(O-p),p=O;break}p=T,u=""}g=i.slice(a,a=n[m++]),o=$t(n[m++],t.cm.options)}}else for(var A=1;An)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ln(e,t,n,r){return Mn(e,Rn(e,t),n,r)}function Dn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&a.push((l.bottom+c.top)/2-n.top)}}a.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(a=function(e,t,n,r){var i,a=Nn(t.map,n,r),l=a.node,c=a.start,u=a.end,h=a.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&re(t.line.text.charAt(a.coverStart+c));)--c;for(;a.coverStart+u1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var f;c>0&&(h=r="right"),i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+ir(e.display),top:p.top,bottom:p.bottom}:jn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;bt)&&(i=(a=l-s)-1,t>=l&&(o="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],o="left";if("right"==n&&i==l-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function Fn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return o("before"==c?l-1:l,"before"==c);function u(e,t,n){return o(n?e-1:e,1==s[t].level!=n)}var h=se(s,l,c),d=oe,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function qn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ke(e.doc,t.line),i=Vt(r)+En(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Xn(e,t,n,r,i){var a=et(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function $n(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Xn(r.first,0,null,-1,-1);var i=Je(r,n),a=r.first+r.size-1;if(i>a)return Xn(r.first+r.size-1,Ke(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=Ke(r,i);;){var s=er(e,o,i,t,n),l=Nt(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;o=Ke(r,i=c.line)}}function Jn(e,t,n,r){r-=Vn(t);var i=t.text.length,a=ae((function(t){return Mn(e,n,t-1).bottom<=r}),i,0);return{begin:a,end:i=ae((function(t){return Mn(e,n,t).top>r}),a,i)}}function Zn(e,t,n,r){return n||(n=Rn(e,t)),Jn(e,t,n,Wn(e,t,Mn(e,n,r),"line").top)}function Qn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Vt(t);var a=Rn(e,t),o=Vn(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var h=(e.options.lineWrapping?nr:tr)(e,t,n,a,u,r,i);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,m=null,g=ae((function(t){var n=Mn(e,a,t);return n.top+=o,n.bottom+=o,!!Qn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left=x.bottom?1:0}return Xn(n,g=ie(t.text,g,1),f,v,r-d)}function tr(e,t,n,r,i,a,o){var s=ae((function(s){var l=i[s],c=1!=l.level;return Qn(Yn(e,et(n,c?l.to:l.from,c?"before":"after"),"line",t,r),a,o,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Yn(e,et(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Qn(u,a,o,!0)&&u.top>o&&(l=i[s-1])}return l}function nr(e,t,n,r,i,a,o){var s=Jn(e,t,r,o),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=Mn(e,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,m=pm)&&(u=f,h=m)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==In){In=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)In.appendChild(document.createTextNode("x")),In.appendChild(A("br"));In.appendChild(document.createTextNode("x"))}_(e.measure,In);var n=In.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),T(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),n=A("pre",[t],"CodeMirror-line-like");_(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ar(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:or(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function or(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(Ut(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o0&&(l=Ke(e.doc,c.line).text).length==c.ch){var u=F(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((a-Sn(e.display).left)/ir(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ct&&Bt(e.doc,t)i.viewFrom?fr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)fr(e);else if(t<=i.viewFrom){var a=pr(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):fr(e)}else if(n>=i.viewTo){var o=pr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):fr(e)}else{var s=pr(e,t,t,-1),l=pr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(an(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):fr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var a=r.view[ur(e,t)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==H(o,n)&&o.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,a=ur(e,t),o=e.display.view;if(!Ct||n==e.doc.first+e.doc.size)return{index:a,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(a==o.length-1)return null;i=s+o[a].size-t,a++}else i=s-t;t+=i,n+=i}for(;Bt(e.doc,n)!=n;){if(a==(r<0?0:o.length-1))return null;n+=r*o[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:n}}function mr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().linet||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),1==o.level?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?d:r,(function(e,t,i,h){var g="ltr"==i,v=f(e,g?"left":"right"),y=f(t-1,g?"right":"left"),b=null==n&&0==e,x=null==r&&t==d,w=0==h,C=!m||h==m.length-1;if(y.top-v.top<=3){var E=(c?x:b)&&C,k=(c?b:x)&&w?s:(g?v:y).left,S=E?l:(g?y:v).right;u(k,v.top,S-k,v.bottom)}else{var O,T,_,A;g?(O=c&&b&&w?s:v.left,T=c?l:p(e,i,"before"),_=c?s:p(t,i,"after"),A=c&&x&&C?l:y.right):(O=c?p(e,i,"before"):s,T=!c&&b&&w?l:v.right,_=!c&&x&&C?s:y.left,A=c?p(t,i,"after"):l),u(O,v.top,T-O,v.bottom),v.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Sr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Cr(e){e.state.focused||(e.display.input.focus(),kr(e))}function Er(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Sr(e))}),100)}function kr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(pe(e,"focus",e,t),e.state.focused=!0,M(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),wr(e))}function Sr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,O(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Or(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||d<-.005)&&(Xe(i.line,l),Tr(i.line),i.rest))for(var f=0;fe.display.sizerWidth){var p=Math.ceil(c/ir(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Tr(e){if(e.widgets)for(var t=0;t=o&&(a=Je(t,Vt(Ke(t,l))-e.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function Ar(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,a=_n(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+kn(n),l=t.tops-r;if(t.topi+a){var u=Math.min(t.top,(c?s:t.bottom)-a);u!=i&&(o.scrollTop=u)}var h=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-h,f=Tn(e)-n.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?o.scrollLeft=0:t.leftf+d-3&&(o.scrollLeft=t.right+(p?0:10)-f),o}function Lr(e,t){null!=t&&(Mr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Dr(e){Mr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Rr(e,t,n){null==t&&null==n||Mr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Mr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Ir(e,qn(e,t.from),qn(e,t.to),t.margin))}function Ir(e,t,n,r){var i=Ar(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Rr(e,i.scrollLeft,i.scrollTop)}function jr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||li(e,{top:t}),Nr(e,t,!0),n&&li(e),ri(e,100))}function Nr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Pr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,hi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+kn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+On(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Br=function(e,t,n){this.cm=n;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),he(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),he(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Br.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var e=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Br.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Br.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Hr=function(){};function Ur(e,t){t||(t=Fr(e));var n=e.display.barWidth,r=e.display.barHeight;zr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Or(e),zr(e,Fr(e)),n=e.display.barWidth,r=e.display.barHeight}function zr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Hr.prototype.update=function(){return{bottom:0,right:0}},Hr.prototype.setScrollLeft=function(){},Hr.prototype.setScrollTop=function(){},Hr.prototype.clear=function(){};var Vr={native:Br,null:Hr};function Wr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&O(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Vr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),he(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Pr(e,t):jr(e,t)}),e),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)}var Gr=0;function Kr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++Gr},t=e.curOp,on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}function Yr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ai(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Xr(e){e.updatedDisplay=e.mustUpdate&&oi(e.cm,e.update)}function $r(e){var t=e.cm,n=t.display;e.updatedDisplay&&Or(t),e.barMeasure=Fr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ln(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+On(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Tn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Jr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var a=A("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-En(e.display))+"px;\n height: "+(t.bottom-t.top+On(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=Yn(e,t),l=n&&n!=t?Yn(e,n):s,c=Ar(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=c.scrollTop&&(jr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(Pr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(o=!0)),!o)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var o=0;o=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ft(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(a){if(r.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?ze(t.mode,r.state):null,l=ht(e,a,r,!0);s&&(r.state=s),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var h=!o||o.length!=a.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&dn)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Qr(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;di(e)&&(fr(e),t.dims=ar(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFromo&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),Ct&&(a=Bt(e.doc,a),o=Ht(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=an(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=an(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n}(e,a,o),n.viewOffset=Vt(Ke(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=mr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=R();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,h=0;h-1&&(f=!1),un(e,d,u,n)),f&&(T(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Qe(e.options,u)))),o=d.node.nextSibling}else{var p=vn(e,d,u,n);a.insertBefore(p,o)}u+=d.size}for(;o;)o=s(o)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=R()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Tn(e))r&&(t.visible=_r(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+kn(e.display)-_n(e),n.top)}),t.visible=_r(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!oi(e,t))break;Or(e);var i=Fr(e);gr(e),Ur(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var n=new ai(e,t);if(oi(e,n)){Or(e),si(e,n);var r=Fr(e);gr(e),Ur(e,r),ui(e,r),n.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+On(e)+"px"}function hi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=or(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",o=0;os.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||a&&u){if(a&&y&&l)e:for(var d=t.target,f=o.view;d!=s;d=d.parentNode)for(var p=0;p=0&&tt(e,r.to())<=0)return n}return-1};var Ei=function(e,t){this.anchor=e,this.head=t};function ki(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=H(t,i);for(var a=1;a0:l>=0){var c=at(s.from(),o.from()),u=it(s.to(),o.to()),h=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,t.splice(--a,2,new Ei(h?u:c,h?c:u))}}return new Ci(t,n)}function Si(e,t){return new Ci([new Ei(e,t||e)],0)}function Oi(e){return e.text?et(e.from.line+e.text.length-1,q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ti(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Oi(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Oi(t).ch-t.to.ch),et(n,r)}function _i(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Ii(e,t,n){!function e(r,i,a){if(r.linked)for(var o=0;os-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(a=function(e,t){return t?(Bi(e.done),q(e.done)):e.done.length&&!q(e.done).ranges?q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),q(e.done)):void 0}(i,i.lastOp==r)))o=q(a.changes),0==tt(t.from,t.to)&&0==tt(t.from,o.to)?o.to=Oi(t):a.changes.push(Fi(e,t));else{var l=q(i.done);for(l&&l.ranges||zi(e.sel,i.done),a={changes:[Fi(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,o||pe(e,"historyAdded")}function Ui(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,a,q(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function zi(e,t){var n=q(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Vi(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=n.markedSpans),++a}))}function Wi(e){if(!e)return null;for(var t,n=0;n-1&&(q(s)[h]=c[h],delete c[h])}}}return r}function Yi(e,t,n,r){if(r){var i=e.anchor;if(n){var a=tt(t,i)<0;a!=tt(n,i)<0?(i=t,t=n):a!=tt(t,n)<0&&(t=n)}return new Ei(i,t)}return new Ei(n||t,t)}function qi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Qi(e,new Ci([Yi(e.sel.primary(),t,n,i)],0),r)}function Xi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:s.to>t.ch))){if(i&&(pe(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!l.atomic)continue;if(n){var h=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(h=oa(e,h,-r,h&&h.line==t.line?a:null)),h&&h.line==t.line&&(d=tt(h,n))&&(r<0?d<0:d>0))return ia(e,h,t,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=oa(e,f,r,f.line==t.line?a:null)),f?ia(e,f,t,r,i):null}}return t}function aa(e,t,n,r,i){var a=r||1,o=ia(e,t,n,a,i)||!i&&ia(e,t,n,a,!0)||ia(e,t,n,-a,i)||!i&&ia(e,t,n,-a,!0);return o||(e.cantEdit=!0,et(e.first,0))}function oa(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ke(e,t.line)).text.length?t.line0)){var u=[l,1],h=tt(c.from,s.from),d=tt(c.to,s.to);(h<0||!o.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(d>0||!o.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)ua(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else ua(e,t)}}function ua(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=_i(e,t);Hi(e,t,n,e.cm?e.cm.curOp.id:NaN),fa(e,t,n,Ot(e,t));var r=[];Ii(e,(function(e,n){n||-1!=H(r,e.history)||(va(e.history,t),r.push(e.history)),fa(e,t,null,Ot(e,t))}))}}function ha(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,a=e.history,o=e.sel,s="undo"==t?a.done:a.undone,l="undo"==t?a.undone:a.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function da(e,t){if(0!=t&&(e.first+=t,e.sel=new Ci(X(e.sel.ranges,(function(e){return new Ei(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){hr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linea&&(t={from:t.from,to:et(a,Ke(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ye(e,t.from,t.to),n||(n=_i(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,s=!1,l=a.line;e.options.lineWrapping||(l=$e(Ft(Ke(r,a.line))),r.iter(l,o.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Mi(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,a.line+t.text.length,(function(e){var t=Wt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ke(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead1||!(this.children[0]instanceof ba))){var s=[];this.collapse(s),this.children=[new ba(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var o=i.lines.length%25+25,s=o;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=L("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Pt(e,t.line,t,n,a)||t.line!=n.line&&Pt(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ct=!0}a.addToHistory&&Hi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(e){c&&a.collapsed&&!c.options.lineWrapping&&Ft(e)==c.display.maxLine&&(s=!0),a.collapsed&&l!=t.line&&Xe(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Et(a,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),a.collapsed&&e.iter(t.line,n.line+1,(function(t){Ut(e,t)&&Xe(t,0)})),a.clearOnEnter&&he(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Ea,a.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),a.collapsed)hr(c,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=t.line;u<=n.line;u++)dr(c,u,"text");a.atomic&&na(c.doc),ln(c,"markerAdded",c,a)}return a}ka.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kr(e),ve(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;ae.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&hr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&na(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&Yr(e),this.parent&&this.parent.clear()}},ka.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)ca(this,r[l]);s?Zi(this,s):this.cm&&Dr(this.cm)})),undo:ni((function(){ha(this,"undo")})),redo:ni((function(){ha(this,"redo")})),undoSelection:ni((function(){ha(this,"undo",!0)})),redoSelection:ni((function(){ha(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(a){var o=a.markedSpans;if(o)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=a,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var h=e.dataTransfer.getData("Text");if(h){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),ea(t.doc,Si(n,n)),d)for(var f=0;f=0;t--)pa(e.doc,"",r[t].from,r[t].to,"+delete");Dr(e)}))}function Ja(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Za(e,t,n){var r=Ja(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function Qa(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var a=ce(n,t.doc.direction);if(a){var o,s=i<0?q(a):a[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Rn(t,n);o=i<0?n.text.length-1:0;var u=Mn(t,c,o).top;o=ae((function(e){return Mn(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,o),"before"==l&&(o=Ja(n,o,1))}else o=i<0?s.to:s.from;return new et(r,o,l)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}za.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"},za.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"},za.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"},za.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"]},za.default=y?za.macDefault:za.pcDefault;var eo={selectAll:sa,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return $a(e,(function(t){if(t.empty()){var n=Ke(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Ke(e.doc,i.line-1).text;o&&(i=new et(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),et(i.line-1,o.length-1),i,"+transpose"))}n.push(new Ei(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Qr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,a=!1,c=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,fe(i.wrapper.ownerDocument,"mouseup",c),fe(i.wrapper.ownerDocument,"mousemove",u),fe(i.scroller,"dragstart",h),fe(i.scroller,"drop",c),a||(be(t),r.addNew||qi(e.doc,n,null,null,r.extend),l&&!d||o&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){a=a||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return a=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),he(i.wrapper.ownerDocument,"mouseup",c),he(i.wrapper.ownerDocument,"mousemove",u),he(i.scroller,"dragstart",h),he(i.scroller,"drop",c),Er(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,a):function(e,t,n,r){var i=e.display,a=e.doc;be(t);var o,s,l=a.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=a.sel.contains(n),o=s>-1?c[s]:new Ei(n,n)):(o=a.sel.primary(),s=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new Ei(n,n)),n=cr(e,t,!0,!0),s=-1;else{var u=vo(e,n,r.unit);o=r.extend?Yi(o,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,Qi(a,ki(e,c.concat([o]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Qi(a,ki(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):$i(a,s,o,V):(s=0,Qi(a,new Ci([o],0),V),l=a.sel);var h=n;function d(t){if(0!=tt(h,t))if(h=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=F(Ke(a,n.line).text,n.ch,c),d=F(Ke(a,t.line).text,t.ch,c),f=Math.min(u,d),p=Math.max(u,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ke(a,m).text,y=G(v,f,c);f==p?i.push(new Ei(et(m,y),et(m,y))):v.length>y&&i.push(new Ei(et(m,y),et(m,G(v,p,c))))}i.length||i.push(new Ei(n,n)),Qi(a,ki(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=o,w=vo(e,t,r.unit),C=x.anchor;tt(w.anchor,C)>0?(b=w.head,C=at(x.from(),w.anchor)):(b=w.anchor,C=it(x.to(),w.head));var E=l.ranges.slice(0);E[s]=function(e,t){var n=t.anchor,r=t.head,i=Ke(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var a=ce(i);if(!a)return t;var o=se(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=o+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==a.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(a,r.ch,r.sticky),h=u-o||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=a[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,m=f?"after":"before";return n.ch==p&&n.sticky==m?t:new Ei(new et(n.line,p,m),r)}(e,new Ei(st(a,C),b)),Qi(a,ki(e,E,s),V)}}var f=i.wrapper.getBoundingClientRect(),p=0;function m(t){e.state.selectingText=!1,p=1/0,t&&(be(t),i.input.focus()),fe(i.wrapper.ownerDocument,"mousemove",g),fe(i.wrapper.ownerDocument,"mouseup",v),a.history.lastSelOrigin=null}var g=ei(e,(function(t){0!==t.buttons&&ke(t)?function t(n){var o=++p,s=cr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,h)){e.curOp.focus=R(),d(s);var l=_r(i,a);(s.line>=l.to||s.linef.bottom?20:0;c&&setTimeout(ei(e,(function(){p==o&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),v=ei(e,m);e.state.selectingText=v,he(i.wrapper.ownerDocument,"mousemove",g),he(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,a)}(t,r,a,e):Ee(e)==n.scroller&&be(e):2==i?(r&&qi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(E?t.display.input.onContextMenu(e):Er(t)))}}function vo(e,t,n){if("char"==n)return new Ei(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ei(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Ei(r.from,r.to)}function yo(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!ve(e,n))return we(t);a-=s.top-o.viewOffset;for(var l=0;l=i)return pe(e,n,e,Je(e.doc,a),e.display.gutterSpecs[l].className,t),we(t)}}function bo(e,t){return yo(e,t,"gutterClick",!0)}function xo(e,t){Cn(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&yo(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||E||e.display.input.onContextMenu(t)}function wo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hn(e)}mo.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var Co={toString:function(){return"CodeMirror.Init"}},Eo={},ko={};function So(e,t,n){if(!t!=!(n&&n!=Co)){var r=e.display.dragFunctions,i=t?he:fe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Oo(e){e.options.lineWrapping?(M(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(O(e.display.wrapper,"CodeMirror-wrap"),Gt(e)),lr(e),hr(e),Hn(e),setTimeout((function(){return Ur(e)}),100)}function To(e,t){var n=this;if(!(this instanceof To))return new To(e,t);this.options=t=t?P(t):{},P(Eo,t,!1);var r=t.value;"string"==typeof r?r=new La(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new To.inputStyles[t.inputStyle](this),a=this.display=new gi(e,r,i,t);for(var c in a.wrapper.CodeMirror=this,wo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wr(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 B,keySeq:null,specialChars:null},t.autofocus&&!v&&a.input.focus(),o&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;he(t.scroller,"mousedown",ei(e,go)),he(t.scroller,"dblclick",o&&s<11?ei(e,(function(t){if(!me(e,t)){var n=cr(e,t);if(n&&!bo(e,t)&&!Cn(e.display,t)){be(t);var r=e.findWordAt(n);qi(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||be(t)}),he(t.scroller,"contextmenu",(function(t){return xo(e,t)})),he(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||xo(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function a(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}he(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!bo(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),he(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),he(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Cn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,s=e.coordsChar(t.activeTouch,"page");o=!r.prev||a(r,r.prev)?new Ei(s,s):!r.prev.prev||a(r,r.prev.prev)?e.findWordAt(s):new Ei(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),be(n)}i()})),he(t.scroller,"touchcancel",i),he(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(jr(e,t.scroller.scrollTop),Pr(e,t.scroller.scrollLeft,!0),pe(e,"scroll",e))})),he(t.scroller,"mousewheel",(function(t){return wi(e,t)})),he(t.scroller,"DOMMouseScroll",(function(t){return wi(e,t)})),he(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||Ce(t)},over:function(t){me(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),_(e.display.dragCursor,r)}}(e,t),Ce(t))},start:function(t){return function(e,t){if(o&&(!e.state.draggingText||+new Date-Da<100))Ce(t);else if(!me(e,t)&&!Cn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Ra),leave:function(t){me(e,t)||Ma(e)}};var l=t.input.getField();he(l,"keyup",(function(t){return uo.call(e,t)})),he(l,"keydown",ei(e,co)),he(l,"keypress",ei(e,ho)),he(l,"focus",(function(t){return kr(e,t)})),he(l,"blur",(function(t){return Sr(e,t)}))}(this),Na(),Kr(this),this.curOp.forceUpdate=!0,ji(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&kr(n)}),20):Sr(this),ko)ko.hasOwnProperty(c)&&ko[c](this,t[c],Co);di(this),t.finishInit&&t.finishInit(this);for(var u=0;u<_o.length;++u)_o[u](this);Yr(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(a.lineDiv).textRendering&&(a.lineDiv.style.textRendering="auto")}To.defaults=Eo,To.optionHandlers=ko;var _o=[];function Ao(e,t,n,r){var i,a=e.doc;null==n&&(n="add"),"smart"==n&&(a.mode.indent?i=ft(e,t).state:n="prev");var o=e.options.tabSize,s=Ke(a,t),l=F(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=a.mode.indent(i,s.text.slice(u.length),s.text))==U||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>a.first?F(Ke(a,t-1).text,null,o):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/o);f;--f)d+=o,h+="\t";if(do,l=De(t),c=null;if(s&&r.ranges.length>1)if(Lo&&Lo.text.join("\n")==t){if(r.ranges.length%Lo.text.length==0){c=[];for(var u=0;u=0;d--){var f=r.ranges[d],p=f.from(),m=f.to();f.empty()&&(n&&n>0?p=et(p.line,p.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ke(a,m.line).text.length,m.ch+q(l).length)):s&&Lo&&Lo.lineWise&&Lo.text.join("\n")==l.join("\n")&&(p=m=et(p.line,0)));var g={from:p,to:m,text:c?c[d%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};ca(e.doc,g),ln(e,"inputRead",e,g)}t&&!s&&Io(e,t),Dr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Mo(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Qr(t,(function(){return Ro(t,n,0,null,"paste")})),!0}function Io(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s-1){o=Ao(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ke(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Ao(e,i.head.line,"smart"));o&&ln(e,"electricInput",e,i.head.line)}}}function jo(e){for(var t=[],n=[],r=0;r0?0:-1));o=isNaN(u)?null:new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else o=i?function(e,t,n,r){var i=ce(t,e.doc.direction);if(!i)return Za(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=se(i,n.ch,n.sticky),o=i[a];if("ltr"==e.doc.direction&&o.level%2==0&&(r>0?o.to>n.ch:o.from=o.from&&d>=u.begin)){var f=h?"before":"after";return new et(n.line,d,f)}}var p=function(e,t,r){for(var a=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e0==(1!=o.level),c=s?r.begin:l(r.end,-1);if(o.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=p(r>0?0:i.length-1,r,c(g)))?null:m}(e.cm,s,t,n):Za(s,t,n);if(null==o){if(a||(c=t.line+l)=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=Ke(e,c))))return!1;t=Qa(i,e.cm,s,t.line,l)}else t=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=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var p=s.text.charAt(t.ch)||"\n",m=ee(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(u=m),n>0&&!c(!f))break}var g=aa(e,t,a,o,!0);return nt(a,g)&&(g.hitSide=!0),g}function Bo(e,t,n,r){var i,a,o=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(a=$n(e,s,i)).outside;){if(n<0?i<=0:i>=o.height){a.hitSide=!0;break}i+=5*n}return a}var Ho=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Uo(e,t){var n=Dn(e,t.line);if(!n||n.hidden)return null;var r=Ke(e.doc,t.line),i=An(n,r,t.line),a=ce(r,e.doc.direction),o="left";a&&(o=se(a,t.ch)%2?"right":"left");var s=Nn(i.map,t.ch,o);return s.offset="right"==s.collapse?s.end:s.start,s}function zo(e,t){return t&&(e.bad=!0),e}function Vo(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return zo(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||a.line=t.display.viewFrom&&Uo(t,i)||{node:l[0].measure.map[2],offset:0},u=a.liner.firstLine()&&(o=et(o.line-1,Ke(r.doc,o.line-1).length)),s.ch==Ke(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;o.line==i.viewFrom||0==(e=ur(r,o.line))?(t=$e(i.view[0].line),n=i.view[0].node):(t=$e(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=$e(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(e,t,n,r,i){var a="",o=!1,s=e.doc.lineSeparator(),l=!1;function c(){o&&(a+=s,l&&(a+=s),o=l=!1)}function u(e){e&&(c(),a+=e)}function h(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var a,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(et(r,0),et(i+1,0),(g=+d,function(e){return e.id==g}));return void(f.length&&(a=f[0].find(0))&&u(Ye(e.doc,a.from,a.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&c();for(var m=0;m1&&d.length>1;)if(q(h)==q(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),t++}for(var f=0,p=0,m=h[0],g=d[0],v=Math.min(m.length,g.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 w=et(t,f),C=et(l,d.length?q(d).length-p:0);return h.length>1||h[0]||tt(w,C)?(pa(r.doc,h,w,C,"+input"),!0):void 0},Ho.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ho.prototype.reset=function(){this.forceCompositionEnd()},Ho.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ho.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ho.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return hr(e.cm)}))},Ho.prototype.setUneditable=function(e){e.contentEditable="false"},Ho.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Ro)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ho.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ho.prototype.onContextMenu=function(){},Ho.prototype.resetPosition=function(){},Ho.prototype.needsContentAttribute=!0;var Go=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};Go.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function a(e){if(!me(r,e)){if(r.somethingSelected())Do({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=jo(r);Do({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,z):(n.prevInput="",i.value=t.text.join("\n"),j(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),he(i,"input",(function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),he(i,"paste",(function(e){me(r,e)||Mo(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),he(i,"cut",a),he(i,"copy",a),he(e.scroller,"paste",(function(t){if(!Cn(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var a=new Event("paste");a.clipboardData=t.clipboardData,i.dispatchEvent(a)}})),he(e.lineSpace,"selectstart",(function(t){Cn(e,t)||be(t)})),he(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),he(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Go.prototype.createField=function(e){this.wrapper=Po(),this.textarea=this.wrapper.firstChild},Go.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Go.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=Yn(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},Go.prototype.showSelection=function(e){var t=this.cm.display;_(t.cursorDiv,e.cursors),_(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Go.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&j(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null))}},Go.prototype.getField=function(){return this.textarea},Go.prototype.supportsTouch=function(){return!1},Go.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||R()!=this.textarea))try{this.textarea.focus()}catch(e){}},Go.prototype.blur=function(){this.textarea.blur()},Go.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Go.prototype.receivedFocus=function(){this.slowPoll()},Go.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Go.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Go.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Re(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(8203!=a||r||(r="​"),8666==a)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Go.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Go.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},Go.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=cr(n,e),c=r.scroller.scrollTop;if(a&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(a)&&ei(n,Qi)(n.doc,Si(a),z);var u,d=i.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.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(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&s>=9&&g(),E){Ce(e);var m=function(){fe(window,"mouseup",m),setTimeout(v,20)};he(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),a="​"+(e?i.value:"");i.value="⇚",i.value=a,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=d,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!o||o&&s<9)&&g();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ei(n,sa)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},Go.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Go.prototype.setUneditable=function(){},Go.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=Co&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Co,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Li(e)}),!0),n("indentUnit",2,Li,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Di(e),Hn(e),hr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(-1==a)break;i=a+t.length,n.push(et(r,a))}r++}));for(var i=n.length-1;i>=0;i--)pa(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Co&&e.refresh()})),n("specialCharPlaceholder",Zt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){wo(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Xa(t),i=n!=Co&&Xa(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Oo,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=fi(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?or(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Ur(e)}),!0),n("scrollbarStyle","native",(function(e){Wr(e),Ur(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=fi(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Sr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,So),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Di,!0),n("addModeClass",!1,Di,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Di,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(To),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),pe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Xa(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Ao(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Dr(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;l0&&$i(this.doc,r,new Ei(a,c[r].to()),z)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=dt(this,Ke(this.doc,e.line)),r=0,i=(n.length-1)/2,a=e.ch;if(0==a)t=n[2];else for(;;){var o=r+i>>1;if((o?n[2*o-1]:0)>=a)i=o;else{if(!(n[2*o+1]a&&(e=a,i=!0),r=Ke(this.doc,e)}else r=e;return Wn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Vt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a,o,s,l=this.display,c=(e=Yn(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.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||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(c=e.bottom),u+t.offsetWidth>d&&(u=d-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(a=this,o={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Ar(a,o)).scrollTop&&jr(a,s.scrollTop),null!=s.scrollLeft&&Pr(a,s.scrollLeft))},triggerOnKeyDown:ti(co),triggerOnKeyPress:ti(ho),triggerOnKeyUp:uo,triggerOnMouseDown:ti(go),execCommand:function(e){if(eo.hasOwnProperty(e))return eo[e].call(null,this)},triggerElectric:ti((function(e){Io(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=st(this.doc,e),o=0;o0&&o(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&lr(this),pe(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),ji(this,e),Hn(this),this.display.input.reset(),Rr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},ye(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,a){e.registerHelper(t,r,a),n[t]._global.push({pred:i,val:a})}}(To);var Ko="iter insert remove copy getEditor constructor".split(" ");for(var Yo in La.prototype)La.prototype.hasOwnProperty(Yo)&&H(Ko,Yo)<0&&(To.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(La.prototype[Yo]));return ye(La),To.inputStyles={textarea:Go,contenteditable:Ho},To.defineMode=function(e){To.defaults.mode||"null"==e||(To.defaults.mode=e),Pe.apply(this,arguments)},To.defineMIME=function(e,t){Ne[e]=t},To.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),To.defineMIME("text/plain","null"),To.defineExtension=function(e,t){To.prototype[e]=t},To.defineDocExtension=function(e,t){La.prototype[e]=t},To.fromTextArea=function(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=R();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(he(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(fe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=To((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=fe,e.on=he,e.wheelEventPixels=xi,e.Doc=La,e.splitLines=De,e.countColumn=F,e.findColumn=G,e.isWordChar=Q,e.Pass=U,e.signal=pe,e.Line=Kt,e.changeEnd=Oi,e.scrollbarModel=Vr,e.Pos=et,e.cmpPos=tt,e.modes=je,e.mimeModes=Ne,e.resolveMode=Fe,e.getMode=Be,e.modeExtensions=He,e.extendMode=Ue,e.copyState=ze,e.startState=We,e.innerMode=Ve,e.commands=eo,e.keyMap=za,e.keyName=qa,e.isModifierKey=Ka,e.lookupKey=Ga,e.normalizeKeyMap=Wa,e.StringStream=Ge,e.SharedTextMarker=Oa,e.TextMarker=ka,e.LineWidget=wa,e.e_preventDefault=be,e.e_stopPropagation=xe,e.e_stop=Ce,e.addClass=M,e.contains=D,e.rmClass=O,e.keyNames=Fa}(To),To.version="5.58.2",To}()},WaYH: +/*!*********************************************************!*\ + !*** ./node_modules/rc-tree/es/TreeNode.js + 1 modules ***! + \*********************************************************/ +/*! exports provided: InternalTreeNode, default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.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-tree/es/contextTypes.js because of ./node_modules/rc-tree/es/Tree.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/util.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.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"),i=n("Ff2n"),a=n("VTBJ"),o=n("1OyB"),s=n("vuIU"),l=n("JX7q"),c=n("Ji7U"),u=n("LK+K"),h=n("q1tI"),d=n("TSYQ"),f=n.n(d),p=n("sboe"),m=n("OZM5"),g=function(e){var t=e.prefixCls,n=e.level,i=e.isStart,a=e.isEnd;if(!n)return null;for(var o="".concat(t,"-indent-unit"),s=[],l=0;l1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&_[n])return _[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),a=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=T.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),l={sizingStyle:s,paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(_[n]=l),l}var L,D=n("Gytx"),R=n.n(D);!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(L||(L={}));var M=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,e)).nextFrameActionId=void 0,a.resizeFrameId=void 0,a.textArea=void 0,a.saveTextArea=function(e){a.textArea=e},a.handleResize=function(e){var t=a.state.resizeStatus,n=a.props,r=n.autoSize,i=n.onResize;t===L.NONE&&("function"==typeof i&&i(e),r&&a.resizeOnNextFrame())},a.resizeOnNextFrame=function(){cancelAnimationFrame(a.nextFrameActionId),a.nextFrameActionId=requestAnimationFrame(a.resizeTextarea)},a.resizeTextarea=function(){var e=a.props.autoSize;if(e&&a.textArea){var t=e.minRows,n=e.maxRows,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;w||((w=document.createElement("textarea")).setAttribute("tab-index","-1"),w.setAttribute("aria-hidden","true"),document.body.appendChild(w)),e.getAttribute("wrap")?w.setAttribute("wrap",e.getAttribute("wrap")):w.removeAttribute("wrap");var i=A(e,t),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,l=i.sizingStyle;w.setAttribute("style","".concat(l,";").concat(O)),w.value=e.value||e.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,d=w.scrollHeight;if("border-box"===s?d+=o:"content-box"===s&&(d-=a),null!==n||null!==r){w.value=" ";var f=w.scrollHeight-a;null!==n&&(u=f*n,"border-box"===s&&(u=u+a+o),d=Math.max(u,d)),null!==r&&(h=f*r,"border-box"===s&&(h=h+a+o),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(a.textArea,!1,t,n);a.setState({textareaStyles:r,resizeStatus:L.RESIZING},(function(){cancelAnimationFrame(a.resizeFrameId),a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:L.RESIZED},(function(){a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:L.NONE}),a.fixFirefoxAutoScroll()}))}))}))}))}},a.renderTextArea=function(){var e=a.props,t=e.prefixCls,n=void 0===t?"rc-textarea":t,i=e.autoSize,o=e.onResize,s=e.className,h=e.disabled,d=a.state,f=d.textareaStyles,p=d.resizeStatus,m=Object(E.a)(a.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),g=S()(n,s,Object(u.a)({},"".concat(n,"-disabled"),h));"value"in m&&(m.value=m.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},a.props.style),f),p===L.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(C,{onResize:a.handleResize,disabled:!(i||o)},l.createElement("textarea",Object(r.a)({},m,{className:g,style:v,ref:a.saveTextArea})))},a.state={textareaStyles:{},resizeStatus:L.NONE},a}return Object(a.a)(n,[{key:"componentDidUpdate",value:function(e){e.value===this.props.value&&R()(e.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 e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.textArea.setSelectionRange(e,t)}}catch(e){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(l.Component),I=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;Object(i.a)(this,n),(r=t.call(this,e)).resizableTextArea=void 0,r.focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(e){r.resizableTextArea=e},r.handleChange=function(e){var t=r.props.onChange;r.setValue(e.target.value,(function(){r.resizableTextArea.resizeTextarea()})),t&&t(e)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,i=t.onKeyDown;13===e.keyCode&&n&&n(e),i&&i(e)};var a=void 0===e.value||null===e.value?e.defaultValue:e.value;return r.state={value:a},r}return Object(a.a)(n,[{key:"setValue",value:function(e,t){"value"in this.props||this.setState({value:e},t)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(M,Object(r.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value}:null}}]),n}(l.Component);t.default=I},ZW9T: +/*!************************************************************!*\ + !*** ./src/components/monaco-editor/index.jsx + 1 modules ***! + \************************************************************/ +/*! exports provided: getLanguageByMirrorName, default, DiffEditor */ +/*! exports used: DiffEditor, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./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/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n("k1fw"),i=(n("miYZ"),n("tsqr")),a=n("rAM+"),o=n("tJVT"),s=n("PpiC"),l=n("q1tI"),c=n.n(l),u=n("bdgK");function h(e,t,n,i,a){var o=t.getWordUntilPosition(n),s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=i.map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Keyword,insertText:t,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}));return a.map((function(e){l.push(Object(r.a)(Object(r.a)({},e),{},{range:s}))})),l}n("LvDl");function d(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}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 m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e;if(Array.isArray(e)){for(var n=0;n0||r.target.offsetWidth>0)&&G.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(W.current),e}();return Z(!0),function(){var e=G.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),G.current.subscription&&G.current.subscription.dispose(),j&&window.removeEventListener("paste",ee),n.unobserve(W.current)}}catch(e){}}))}),[]),Object(l.useEffect)((function(){if(G.current.instance&&J)return document.addEventListener("keydown",te,!1),function(){document.removeEventListener("keydown",te)}}),[D,J]),Object(l.useEffect)((function(){var e=G.current.instance;if(e&&J){var t=m(w);g.editor.setModelLanguage(e.getModel(),t),console.log("language:",w,e.getModel(),t)}}),[w,J]),Object(l.useEffect)((function(){G.current.instance&&J&&g.editor.setTheme(A)}),[A,J]),Object(l.useEffect)((function(){var e=G.current.instance;e&&J&&(e.updateOptions(Object(r.a)({},S)),setTimeout((function(){e.getModel().updateOptions(Object(r.a)({},S))}),200))}),[JSON.stringify(S),J]),Object(l.useEffect)((function(){var e=G.current.instance;e&&J&&e.layout()}),[p,y,J]);var ie=Object(l.useState)(d(p)),ae=Object(o.a)(ie,2),oe=ae[0],se=(ae[1],Object(l.useState)(d(y))),le=Object(o.a)(se,2),ce=le[0],ue=le[1],he=Object(r.a)(Object(r.a)({},E),{},{width:oe,height:ce});return c.a.createElement("div",{className:"my-monaco-editor",ref:W,style:he})};function v(e){var t=e.width,i=void 0===t?"100%":t,s=e.height,h=void 0===s?"100%":s,f=e.original,p=e.modified,m=e.language,v=e.options,y=void 0===v?{}:v,b=Object(l.useRef)(),x=Object(l.useState)(null),w=Object(o.a)(x,2),C=w[0],E=w[1];Object(l.useEffect)((function(){b.current&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){var t=(g=e).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}));E(t);var n=function(e){var t;return b.current&&(t=new u.default((function(t){var n,r=Object(a.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&e.layout()}}catch(e){r.e(e)}finally{r.f()}}))).observe(b.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),n.unobserve(b.current)}}))}),[]),Object(l.useEffect)((function(){C&&C.setModel({original:g.editor.createModel(f,m),modified:g.editor.createModel(p,m)})}),[f,p,m,C]);var k={width:d(i),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(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function i(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function a(e,t){if(e.clientHeightt||a>e&&o=t&&s>=n?a-e-r:o>t&&sn?o-t+i:0}var s=function(e,t){var n=window,i=t.scrollMode,s=t.block,l=t.inline,c=t.boundary,u=t.skipOverflowHiddenElements,h="function"==typeof c?c:function(e){return e!==c};if(!r(e))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],p=e;r(p)&&h(p);){if((p=p.parentElement)===d){f.push(p);break}null!=p&&p===document.body&&a(p)&&!a(document.documentElement)||null!=p&&a(p,u)&&f.push(p)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),x=b.height,w=b.width,C=b.top,E=b.right,k=b.bottom,S=b.left,O="start"===s||"nearest"===s?C:"end"===s?k:C+x/2,T="center"===l?S+w/2:"end"===l?E:S,_=[],A=0;A=0&&S>=0&&k<=g&&E<=m&&C>=I&&k<=N&&S>=P&&E<=j)return _;var F=getComputedStyle(L),B=parseInt(F.borderLeftWidth,10),H=parseInt(F.borderTopWidth,10),U=parseInt(F.borderRightWidth,10),z=parseInt(F.borderBottomWidth,10),V=0,W=0,G="offsetWidth"in L?L.offsetWidth-L.clientWidth-B-U:0,K="offsetHeight"in L?L.offsetHeight-L.clientHeight-H-z:0;if(d===L)V="start"===s?O:"end"===s?O-g:"nearest"===s?o(y,y+g,g,H,z,y+O,y+O+x,x):O-g/2,W="start"===l?T:"center"===l?T-m/2:"end"===l?T-m:o(v,v+m,m,B,U,v+T,v+T+w,w),V=Math.max(0,V+y),W=Math.max(0,W+v);else{V="start"===s?O-I-H:"end"===s?O-N+z+K:"nearest"===s?o(I,N,R,H,z+K,O,O+x,x):O-(I+R/2)+K/2,W="start"===l?T-P-B:"center"===l?T-(P+M/2)+G/2:"end"===l?T-j+U+G:o(P,j,M,B,U+G,T,T+w,w);var Y=L.scrollLeft,q=L.scrollTop;O+=q-(V=Math.max(0,Math.min(q+V,L.scrollHeight-R+K))),T+=Y-(W=Math.max(0,Math.min(Y+W,L.scrollWidth-M+G)))}_.push({el:L,top:V,left:W})}return _};function l(e){return e===Object(e)&&0!==Object.keys(e).length}t.a=function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(l(t)&&"function"==typeof t.behavior)return t.behavior(n?[]:s(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:l(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,i=e.top,a=e.left;r.scroll&&n?r.scroll({top:i,left:a,behavior:t}):(r.scrollTop=i,r.scrollLeft=a)}))}(s(e,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(e,t,n){var r;!function(i){var a=/^\s+/,o=/\s+$/,s=0,l=i.round,c=i.min,u=i.max,h=i.random;function d(e,t){if(t=t||{},(e=e||"")instanceof d)return e;if(!(this instanceof d))return new d(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,l=null,h=!1,d=!1;"string"==typeof e&&(e=function(e){e=e.replace(a,"").replace(o,"").toLowerCase();var t,n=!1;if(L[e])e=L[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=V.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=V.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=V.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=V.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=V.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=V.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=V.hex8.exec(e))return{r:j(t[1]),g:j(t[2]),b:j(t[3]),a:B(t[4]),format:n?"name":"hex8"};if(t=V.hex6.exec(e))return{r:j(t[1]),g:j(t[2]),b:j(t[3]),format:n?"name":"hex"};if(t=V.hex4.exec(e))return{r:j(t[1]+""+t[1]),g:j(t[2]+""+t[2]),b:j(t[3]+""+t[3]),a:B(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=V.hex3.exec(e))return{r:j(t[1]+""+t[1]),g:j(t[2]+""+t[2]),b:j(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(W(e.r)&&W(e.g)&&W(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*M(f,255),g:255*M(p,255),b:255*M(m,255)},h=!0,d="%"===String(e.r).substr(-1)?"prgb":"rgb"):W(e.h)&&W(e.s)&&W(e.v)?(r=P(e.s),s=P(e.v),t=function(e,t,n){e=6*M(e,360),t=M(t,100),n=M(n,100);var r=i.floor(e),a=e-r,o=n*(1-t),s=n*(1-a*t),l=n*(1-(1-a)*t),c=r%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(e.h,r,s),h=!0,d="hsv"):W(e.h)&&W(e.s)&&W(e.l)&&(r=P(e.s),l=P(e.l),t=function(e,t,n){var r,i,a;function o(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=M(e,360),t=M(t,100),n=M(n,100),0===t)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=o(l,s,e+1/3),i=o(l,s,e),a=o(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*a}}(e.h,r,l),h=!0,d="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=R(n),{ok:h,format:e.format||d,r:c(255,u(t.r,0)),g:c(255,u(t.g,0)),b:c(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.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=n.ok,this._tc_id=s++}function f(e,t,n){e=M(e,255),t=M(t,255),n=M(n,255);var r,i,a=u(e,t,n),o=c(e,t,n),s=(a+o)/2;if(a==o)r=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case e:r=(t-n)/l+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(d(r));return a}function A(e,t){t=t||6;for(var n=d(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(d({h:r,s:i,v:a})),a=(a+s)%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 e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=R(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var a=[N(l(e).toString(16)),N(l(t).toString(16)),N(l(n).toString(16)),N(F(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},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*M(this._r,255))+"%",g:l(100*M(this._g,255))+"%",b:l(100*M(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*M(this._r,255))+"%, "+l(100*M(this._g,255))+"%, "+l(100*M(this._b,255))+"%)":"rgba("+l(100*M(this._r,255))+"%, "+l(100*M(this._g,255))+"%, "+l(100*M(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(D[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=d(e);n="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(w,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(E,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(k,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(O,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:P(e[r]));e=n}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(e,t,n){n=0===n?0:n||50;var r=d(e).toRgb(),i=d(t).toRgb(),a=n/100;return d({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},d.readability=function(e,t){var n=d(e),r=d(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(e,t,n){var r,i,a=d.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},d.mostReadable=function(e,t,n){var r,i,a,o,s=null,l=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var c=0;cl&&(l=r,s=d(t[c]));return d.isReadable(e,s,{level:a,size:o})||!i?s:(n.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],n))};var L=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"},D=d.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(L);function R(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function M(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function I(e){return c(1,u(0,e))}function j(e){return parseInt(e,16)}function N(e){return 1==e.length?"0"+e:""+e}function P(e){return e<=1&&(e=100*e+"%"),e}function F(e){return i.round(255*parseFloat(e)).toString(16)}function B(e){return j(e)/255}var H,U,z,V=(U="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",z="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+U),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+U),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+U),hsva:new RegExp("hsva"+z),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(e){return!!V.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(r=function(){return d}.call(t,n,t,e))||(e.exports=r)}(Math)},aUhZ: +/*!****************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/CommonHomework/components/CutOffNow.tsx ***! + \****************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),i=(n(/*! antd/es/table/style */"g9YV"),n(/*! antd/es/table */"wCAj")),a=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),o=(n(/*! antd/es/row/style */"14J3"),n(/*! antd/es/row */"BMrR")),s=(n(/*! antd/es/date-picker/style */"iQDF"),n(/*! antd/es/date-picker */"+eQT")),l=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),c=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty */"jrin"),u=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),h=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),d=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),f=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),p=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),m=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */"PpiC"),g=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),v=n.n(g),y=n(/*! react */"q1tI"),b=n.n(y),x=n(/*! moment */"wd/R"),w=n.n(x),C=n(/*! @/utils/fetch */"ErOA"),E=n(/*! @/utils/util */"1vsH"),k=n(/*! umi */"Ty5D"),S=n(/*! umi */"9kvl"),O=n(/*! @/service/classrooms */"oUNq"),T=n(/*! @/utils/authority */"xKgJ");t.a=Object(S.a)((function(e){return{classroomList:e.classroomList}}))((function(e){var t=e.classroomList,n=e.dispatch,g=Object(m.a)(e,["classroomList","dispatch"]),x=Object(k.i)(),S=f.a.useForm(),_=Object(p.a)(S,1)[0],A=Object(y.useState)(1),L=Object(p.a)(A,2),D=L[0],R=L[1],M=Object(y.useState)([]),I=Object(p.a)(M,2),j=I[0],N=I[1],P=Object(y.useState)(0),F=Object(p.a)(P,2),B=(F[0],F[1]),H=Object(y.useState)(2e4),U=Object(p.a)(H,2),z=U[0],V=(U[1],Object(y.useState)(!0)),W=Object(p.a)(V,2),G=(W[0],W[1]),K=Object(y.useState)(),Y=Object(p.a)(K,2),q=Y[0],X=Y[1],$=Object(y.useState)([]),J=Object(p.a)($,2),Z=J[0],Q=J[1];x.id=x.coursesId,Object(y.useEffect)((function(){"立即截止"===t.actionTabs.key?ee():(Q([]),N([]))}),[t.actionTabs.key]);var ee=function(){var e=Object(d.a)(v.a.mark((function e(n){var r,i,a;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return G(!0),e.next=3,Object(O.A)(Object(h.a)(Object(h.a)({},x),{},{page:n||D,limit:z,homework_id:1===t.actionTabs.type?"":t.actionTabs.selectArrs[0],end_homework_action:!0,all:!0}));case 3:null==(r=e.sent)||r.course_groups.map((function(e){e.key=e.id})),r&&(N([].concat(Object(u.a)(j),Object(u.a)(null==r?void 0:r.course_groups))),B(null==r?void 0:r.group_count),X(null==r?void 0:r.course_groups),G(!1),n||_.setFieldsValue((a={},Object(c.a)(a,"group_ids",null==r||null===(i=r.course_groups)||void 0===i?void 0:i.map((function(e){return String(e.id)}))),Object(c.a)(a,"end_time",w()(w()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),a)));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),te=function(){var e=Object(d.a)(v.a.mark((function e(){var r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(h.a)({},_.getFieldsValue()),console.log("----",r.group_ids),e.next=4,Object(C.a)("/api/courses/".concat(x.id,"/homework_commons/end_with_homework_list_position.json"),{method:"post",body:{homework_ids:Object(u.a)(t.actionTabs.selectArrs),group_ids:(null==Z?void 0:Z.length)>0?Z:[],unified_setting:!(null!=j&&j.length),end_time:w()(r.end_time).format("YYYY-MM-DD HH:mm")}});case 4:0===e.sent.status&&(ne(),Object(E.Y)(["教学课堂","图文作业","立即截止"]),l.b.success("操作成功"),n({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),g.onCallback&&g.onCallback(),Object(T.c)()?(n({type:"classroomList/setActionTabs",payload:{}}),n({type:"classroomList/getClassroomTeacherCommonList",payload:Object(h.a)(Object(h.a)({},t.actionTabs.params),{},{type:1})})):n({type:"classroomList/getClassroomCommonList",payload:Object(h.a)({},t.actionTabs.params)}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=function(){R(1),N([])};return b.a.createElement(r.a,{centered:!0,title:"截止作业",visible:"立即截止"===t.actionTabs.key,okText:"截止作业",cancelText:"暂不截止",onOk:te,onCancel:function(){ne(),n({type:"classroomList/setActionTabs",payload:{}})}},b.a.createElement("p",{className:"tc"},"学生将不能再提交作业",b.a.createElement("br",null),'本操作只对"提交中" “补交中”的作业有效'),j&&b.a.createElement(f.a,{form:_},b.a.createElement(o.a,null,b.a.createElement("span",{className:"mr5"},"截止时间:"),b.a.createElement(f.a.Item,{name:"end_time"},b.a.createElement(s.a,{style:{width:170},getPopupContainer:function(e){return e.parentNode},disabledDate:function(e){return e&&e0&&b.a.createElement(o.a,null,b.a.createElement("span",{className:"mr5"},"选择班级:"),b.a.createElement(a.a.Search,{style:{width:"300px"},onChange:function(e){N(q.filter((function(t){return t.name.indexOf(e.target.value)>-1})))}})),(null==j?void 0:j.length)>0&&1===t.actionTabs.type&&b.a.createElement(i.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,t){Q(e)}},rowKey:"id",pagination:!1,dataSource:j,columns:[{title:"班级",dataIndex:"name",key:"name"}]}),(null==j?void 0:j.length)>0&&2===t.actionTabs.type&&b.a.createElement(i.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,t){Q(e)}},rowKey:"id",pagination:!1,dataSource:j,columns:[{title:"班级",dataIndex:"name",key:"name"},{title:"发布时间",dataIndex:"publish_time",key:"publish_time"},{title:"截止时间",dataIndex:"end_time",key:"end_time"}]})))}))},bT9E: +/*!*****************************************!*\ + !*** ./node_modules/rc-util/es/omit.js ***! + \*****************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function i(e,t){var n=Object(r.a)({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}},biw7: +/*!**********************************************************!*\ + !*** ./node_modules/rc-table/es/context/TableContext.js ***! + \**********************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! react */"q1tI"),i=r.createContext(null);t.a=i},c5Ni: +/*!******************************************************!*\ + !*** ./node_modules/codemirror/theme/blackboard.css ***! + \******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},dejd: +/*!***********************************************************!*\ + !*** ./src/components/markdown-editor/toolbar/index.less ***! + \***********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},dmUQ: +/*!**************************************************************!*\ + !*** ./node_modules/rc-input-number/es/index.js + 1 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! 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(e,t,n){"use strict";var r=n("Ff2n"),i=n("rePB"),a=n("1OyB"),o=n("vuIU"),s=n("Ji7U"),l=n("md7G"),c=n("foSv"),u=n("q1tI"),h=n.n(u),d=n("TSYQ"),f=n.n(d),p=n("4IlW");function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t1?s-1:0),c=1;c1?n-1:0),a=1;a=0)return parseInt(t.slice(t.indexOf("e-")+2),10);var n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n},r.getInputDisplayValue=function(e){var t,n=e||r.state,i=n.focused,a=n.inputValue,o=n.value;null==(t=i?a:r.toPrecisionAsStep(o))&&(t="");var s=r.formatWrapper(t);return w(r.props.decimalSeparator)&&(s=s.toString().replace(".",r.props.decimalSeparator)),s},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(e){}},r.restoreByAfter=function(e){if(void 0===e)return!1;var t=r.input.value,n=t.lastIndexOf(e);if(-1===n)return!1;var i=r.cursorBefore.length;return r.lastKeyCode===p.a.DELETE&&r.cursorBefore.charAt(i-1)===e[0]?(r.fixCaret(i,i),!0):n+e.length===t.length&&(r.fixCaret(n,n),!0)},r.partRestoreByAfter=function(e){return void 0!==e&&Array.prototype.some.call(e,(function(t,n){var i=e.substring(n);return r.restoreByAfter(i)}))},r.isNotCompleteNumber=function(e){return isNaN(e)||""===e||null===e||e&&e.toString().indexOf(".")===e.toString().length-1},r.stop=function(){r.autoStepTimer&&clearTimeout(r.autoStepTimer)},r.down=function(e,t,n){r.pressingUpOrDown=!0,r.step("down",e,t,n)},r.up=function(e,t,n){r.pressingUpOrDown=!0,r.step("up",e,t,n)},r.saveInput=function(e){r.input=e};var i=e.value;void 0===i&&(i=e.defaultValue),r.state={focused:e.autoFocus};var o=r.getValidValue(r.toNumber(i));return r.state=g(g({},r.state),{},{inputValue:r.toPrecisionAsStep(o),value:o}),r}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.value,r=t.onChange,i=t.max,a=t.min,o=this.state.focused;if(e){if(!C(e.value,n)||!C(e.max,i)||!C(e.min,a)){var s,l=o?n:this.getValidValue(n);s=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:s})}var c="value"in this.props?n:this.state.value;"max"in this.props&&e.max!==i&&"number"==typeof c&&c>i&&r&&r(i),"min"in this.props&&e.min!==a&&"number"==typeof c&&c1&&void 0!==arguments[1]?arguments[1]:this.props.min,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,r=parseFloat(e);return isNaN(r)?e:(rn&&(r=n),r)}},{key:"setValue",value:function(e,t){var n=this.props.precision,r=this.isNotCompleteNumber(parseFloat(e))?null:parseFloat(e),i=this.state.value,a=void 0===i?null:i,o=this.state.inputValue,s=void 0===o?null:o,l="number"==typeof r?r.toFixed(n):"".concat(r),c=r!==a||l!=="".concat(s);return"value"in this.props?(s=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:s},t)):this.setState({value:r,inputValue:this.toPrecisionAsStep(e)},t),c&&this.props.onChange(r),r}},{key:"getMaxPrecision",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.props,r=n.precision,i=n.step;if(w(r))return r;var a=this.getPrecision(t),o=this.getPrecision(i),s=this.getPrecision(e);return e?Math.max(s,a+o):a+o}},{key:"getPrecisionFactor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getMaxPrecision(e,t);return Math.pow(10,n)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(e){return this.props.formatter?this.props.formatter(e):e}},{key:"toPrecisionAsStep",value:function(e){if(this.isNotCompleteNumber(e)||""===e)return e;var t=Math.abs(this.getMaxPrecision(e));return isNaN(t)?e.toString():Number(e).toFixed(t)}},{key:"toNumber",value:function(e){var t=this.props.precision,n=this.state.focused,r=e&&e.length>16&&n;return this.isNotCompleteNumber(e)||r?e:w(t)?Math.round(e*Math.pow(10,t))/Math.pow(10,t):Number(e)}},{key:"upStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),a=((r*e+r*n*t)/r).toFixed(i);return this.toNumber(a)}},{key:"downStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),a=((r*e-r*n*t)/r).toFixed(i);return this.toNumber(a)}},{key:"step",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0;this.stop(),t&&(t.persist(),t.preventDefault());var a=this.props;if(!a.disabled){var o=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(o)){var s=this["".concat(e,"Step")](o,r),l=s>a.max||sa.max?s=a.max:s=p)||a||o,Y=(H||0===H)&&(isNaN(H)||Number(H)<=m)||a||o,q=f()("".concat(n,"-handler"),"".concat(n,"-handler-up"),Object(i.a)({},"".concat(n,"-handler-up-disabled"),K)),X=f()("".concat(n,"-handler"),"".concat(n,"-handler-down"),Object(i.a)({},"".concat(n,"-handler-down-disabled"),Y)),$=s?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},J=s?{onTouchStart:Y?y:this.down,onTouchEnd:this.stop}:{onMouseDown:Y?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:z,style:g,title:v,onMouseEnter:x,onMouseLeave:w,onMouseOver:C,onMouseOut:E,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(n,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:q}),c||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner"),onClick:b})),h.a.createElement("span",Object.assign({unselectable:"on"},J,{role:"button","aria-label":"Decrease Value","aria-disabled":Y,className:X}),u||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner"),onClick:b}))),h.a.createElement("div",{className:"".concat(n,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":m,"aria-valuemax":p,"aria-valuenow":H,required:k,type:T,placeholder:_,onPaste:N,onClick:S,onMouseUp:this.onMouseUp,className:"".concat(n,"-input"),tabIndex:O,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:W?this.onKeyDown:y,onKeyUp:W?this.onKeyUp:y,autoFocus:I,maxLength:M,readOnly:o,disabled:a,max:p,min:m,step:R,name:j,title:v,id:A,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(G),pattern:D,inputMode:L,onInput:P},V))))}}]),n}(h.a.Component);E.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(e){return e.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var k=E;t.a=k},fyJ8: +/*!************************************************!*\ + !*** ./node_modules/rc-table/es/Cell/index.js ***! + \************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),s=n(/*! react */"q1tI"),l=n(/*! classnames */"TSYQ"),c=n.n(l),u=n(/*! rc-util/es/ref */"c+Xe"),h=n(/*! ../utils/valueUtil */"sR1s");var d=s.forwardRef((function(e,t){var n,l,d,f=e.prefixCls,p=e.className,m=e.record,g=e.index,v=e.dataIndex,y=e.render,b=e.children,x=e.component,w=void 0===x?"td":x,C=e.colSpan,E=e.rowSpan,k=e.fixLeft,S=e.fixRight,O=e.firstFixLeft,T=e.lastFixLeft,_=e.firstFixRight,A=e.lastFixRight,L=e.appendNode,D=e.additionalProps,R=void 0===D?{}:D,M=e.ellipsis,I=e.align,j=e.rowType,N=e.isSticky,P="".concat(f,"-cell");if(b)d=b;else{var F=Object(h.b)(m,v);if(d=F,y){var B=y(F,m,g);!function(e){return e&&"object"===Object(o.a)(e)&&!Array.isArray(e)&&!s.isValidElement(e)}(B)?d=B:(d=B.children,l=B.props)}}"object"!==Object(o.a)(d)||Array.isArray(d)||s.isValidElement(d)||(d=null),M&&(T||_)&&(d=s.createElement("span",{className:"".concat(P,"-content")},d));var H=l||{},U=H.colSpan,z=H.rowSpan,V=H.style,W=H.className,G=Object(a.a)(H,["colSpan","rowSpan","style","className"]),K=void 0!==U?U:C,Y=void 0!==z?z:E;if(0===K||0===Y)return null;var q={},X="number"==typeof k,$="number"==typeof S;X&&(q.position="sticky",q.left=k),$&&(q.position="sticky",q.right=S);var J,Z={};I&&(Z.textAlign=I);var Q=!0===M?{showTitle:!0}:M;Q&&(Q.showTitle||"header"===j)&&("string"==typeof d||"number"==typeof d?J=d.toString():s.isValidElement(d)&&"string"==typeof d.props.children&&(J=d.props.children));var ee,te=Object(i.a)(Object(i.a)(Object(i.a)({title:J},G),R),{},{colSpan:K&&1!==K?K:null,rowSpan:Y&&1!==Y?Y:null,className:c()(P,p,(n={},Object(r.a)(n,"".concat(P,"-fix-left"),X),Object(r.a)(n,"".concat(P,"-fix-left-first"),O),Object(r.a)(n,"".concat(P,"-fix-left-last"),T),Object(r.a)(n,"".concat(P,"-fix-right"),$),Object(r.a)(n,"".concat(P,"-fix-right-first"),_),Object(r.a)(n,"".concat(P,"-fix-right-last"),A),Object(r.a)(n,"".concat(P,"-ellipsis"),M),Object(r.a)(n,"".concat(P,"-with-append"),L),Object(r.a)(n,"".concat(P,"-fix-sticky"),(X||$)&&N),n),R.className,W),style:Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},R.style),Z),q),V),ref:(ee=w,"string"==typeof ee||Object(u.c)(ee)?t:null)});return s.createElement(w,Object.assign({},te),L,d)}));d.displayName="Cell";var f=s.memo(d,(function(e,t){return!!t.shouldCellUpdate&&!t.shouldCellUpdate(t.record,e.record)}));t.a=f},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(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n("q1tI"),i=n.n(r),a=n("TSYQ"),o=n.n(a),s={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},l=function(e){var t=e.map((function(){return Object(r.useRef)()})),n=Object(r.useRef)();return Object(r.useEffect)((function(){var e=Date.now(),r=!1;Object.keys(t).forEach((function(i){var a=t[i].current;if(a){r=!0;var o=a.style;o.transitionDuration=".3s, .3s, .3s, .06s",n.current&&e-n.current<100&&(o.transitionDuration="0s, 0s")}})),r&&(n.current=Date.now())})),[t]};function c(){return(c=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var f=function(e){var t=e.className,n=e.percent,r=e.prefixCls,a=e.strokeColor,s=e.strokeLinecap,h=e.strokeWidth,f=e.style,p=e.trailColor,m=e.trailWidth,g=e.transition,v=d(e,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete v.gapPosition;var y=Array.isArray(n)?n:[n],b=Array.isArray(a)?a:[a],x=u(l(y),1)[0],w=h/2,C=100-h/2,E="M ".concat("round"===s?w:0,",").concat(w,"\n L ").concat("round"===s?C:100,",").concat(w),k="0 0 100 ".concat(h),S=0;return i.a.createElement("svg",c({className:o()("".concat(r,"-line"),t),viewBox:k,preserveAspectRatio:"none",style:f},v),i.a.createElement("path",{className:"".concat(r,"-line-trail"),d:E,strokeLinecap:s,stroke:p,strokeWidth:m||h,fillOpacity:"0"}),y.map((function(e,t){var n={strokeDasharray:"".concat(e,"px, 100px"),strokeDashoffset:"-".concat(S,"px"),transition:g||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},a=b[t]||b[b.length-1];return S+=e,i.a.createElement("path",{key:t,className:"".concat(r,"-line-path"),d:E,strokeLinecap:s,stroke:a,strokeWidth:h,fillOpacity:"0",ref:x[t],style:n})})))};f.defaultProps=s;function p(){return(p=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var y=0;function b(e){return+e.replace("%","")}function x(e){return Array.isArray(e)?e:[e]}function w(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,o=50-r/2,s=0,l=-o,c=0,u=-2*o;switch(a){case"left":s=-o,l=0,c=2*o,u=0;break;case"right":s=o,l=0,c=-2*o,u=0;break;case"bottom":l=o,u=2*o}var h="M 50,50 m ".concat(s,",").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:n,strokeDasharray:"".concat(t/100*(d-i),"px ").concat(d,"px"),strokeDashoffset:"-".concat(i/2+e/100*(d-i),"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(e){var t,n=e.prefixCls,a=e.strokeWidth,s=e.trailWidth,c=e.gapDegree,u=e.gapPosition,h=e.trailColor,d=e.strokeLinecap,f=e.style,g=e.className,C=e.strokeColor,E=e.percent,k=v(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),S=Object(r.useMemo)((function(){return y+=1}),[]),O=w(0,100,h,a,c,u),T=O.pathString,_=O.pathStyle,A=x(E),L=x(C),D=L.find((function(e){return"[object Object]"===Object.prototype.toString.call(e)})),R=m(l(A),1)[0];return i.a.createElement("svg",p({className:o()("".concat(n,"-circle"),g),viewBox:"0 0 100 100",style:f},k),D&&i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"".concat(n,"-gradient-").concat(S),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(D).sort((function(e,t){return b(e)-b(t)})).map((function(e,t){return i.a.createElement("stop",{key:t,offset:e,stopColor:D[e]})})))),i.a.createElement("path",{className:"".concat(n,"-circle-trail"),d:T,stroke:h,strokeLinecap:d,strokeWidth:s||a,fillOpacity:"0",style:_}),(t=0,A.map((function(e,r){var o=L[r]||L[L.length-1],s="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(n,"-gradient-").concat(S,")"):"",l=w(t,e,o,a,c,u);return t+=e,i.a.createElement("path",{key:r,className:"".concat(n,"-circle-path"),d:l.pathString,stroke:s,strokeLinecap:d,strokeWidth:a,opacity:0===e?0:1,fillOpacity:"0",style:l.pathStyle,ref:R[r]})}))).reverse())};C.defaultProps=s;var E=C},hW8S: +/*!******************************************************!*\ + !*** ./node_modules/rc-table/es/utils/legacyUtil.js ***! + \******************************************************/ +/*! exports provided: INTERNAL_COL_DEFINE, getExpandableProps, getDataAndAriaProps */ +/*! exports used: INTERNAL_COL_DEFINE, getDataAndAriaProps, getExpandableProps */function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=(n(/*! rc-util/es/warning */"Kwbf"),"RC_TABLE_INTERNAL_COL_DEFINE");function o(e){var t=e.expandable,n=Object(i.a)(e,["expandable"]);return"expandable"in e?Object(r.a)(Object(r.a)({},n),t):n}function s(e){return Object.keys(e).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)||(t[n]=e[n]),t}),{})}},k3GJ: +/*!*******************************************************!*\ + !*** ./node_modules/rc-tabs/es/index.js + 50 modules ***! + \*******************************************************/ +/*! exports provided: TabPane, default */ +/*! exports used: TabPane, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.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/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-align/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-dropdown/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.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/canUseDom.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Portal.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/raf.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.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/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return Gt}));var r=n("rePB"),i=n("ODXe"),a=n("Ff2n"),o=n("VTBJ"),s=n("q1tI"),l=n("TSYQ"),c=n.n(l),u=n("Zm9Q"),h=n("6cGi"),d=n("KQm4"),f=n("xEkU"),p=n.n(f),m=n("t23M");function g(e){var t=Object(s.useRef)(),n=Object(s.useRef)(!1);return Object(s.useEffect)((function(){return function(){n.current=!0,p.a.cancel(t.current)}}),[]),function(){for(var r=arguments.length,i=new Array(r),a=0;a1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),i=r.marginLeft,a=r.marginRight;n+=+i.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},ne=function(e,t,n){e&&"object"===Object(R.a)(e.style)&&(e.style[t]=n)},re=n("bdgK"),ie=n("i8i4"),ae=n.n(ie),oe=n("wgJM"),se=n("l4aY"),le=n("m+aA"),ce=n("c+Xe"),ue=n("zT1h"),he=n("QC+M");function de(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var fe=n("MNnm");function pe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var me,ge,ve,ye=(me=Object(fe.a)(),ge="undefined"!=typeof window?window:{},ve={animationend:pe("Animation","AnimationEnd"),transitionend:pe("Transition","TransitionEnd")},me&&("AnimationEvent"in ge||delete ve.animationend.animation,"TransitionEvent"in ge||delete ve.transitionend.transition),ve),be={};if(Object(fe.a)()){var xe=document.createElement("div");be=xe.style}var we={};function Ce(e){if(we[e])return we[e];var t=ye[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i1&&void 0!==arguments[1]?arguments[1]:2;t();var a=Object(oe.a)((function(){i<=1?r({isCanceled:function(){return a!==e.current}}):n(r,i-1)}));e.current=a},t]}(),c=Object(i.a)(l,2),u=c[0],h=c[1];return Le((function(){if("none"!==a&&"end"!==a){var e=De.indexOf(a),n=De[e+1],r=t(a);!1===r?o(n):u((function(e){function t(){e.isCanceled()||o(n)}!0===r?t():Promise.resolve(r).then(t)}))}}),[e,a]),s.useEffect((function(){return function(){h()}}),[]),[function(){o("prepare")},a]};function Ie(e,t,n,a){var l=a.motionEnter,c=void 0===l||l,u=a.motionAppear,h=void 0===u||u,d=a.motionLeave,f=void 0===d||d,p=a.motionDeadline,m=a.motionLeaveImmediately,g=a.onAppearPrepare,v=a.onEnterPrepare,y=a.onLeavePrepare,b=a.onAppearStart,x=a.onEnterStart,w=a.onLeaveStart,C=a.onAppearActive,E=a.onEnterActive,k=a.onLeaveActive,S=a.onAppearEnd,O=a.onEnterEnd,T=a.onLeaveEnd,_=a.onVisibleChanged,A=Ae(),L=Object(i.a)(A,2),D=L[0],R=L[1],M=Ae("none"),I=Object(i.a)(M,2),j=I[0],N=I[1],P=Ae(null),F=Object(i.a)(P,2),B=F[0],H=F[1],U=Object(s.useRef)(!1),z=Object(s.useRef)(null),V=Object(s.useRef)(!1),W=Object(s.useRef)(null);function G(){return n()||W.current}var K=Object(s.useRef)(!1);function Y(e){var t,n=G();e&&!e.deadline&&e.target!==n||("appear"===j&&K.current?t=null==S?void 0:S(n,e):"enter"===j&&K.current?t=null==O?void 0:O(n,e):"leave"===j&&K.current&&(t=null==T?void 0:T(n,e)),!1===t||V.current||(N("none"),H(null)))}var q=function(e){var t=Object(s.useRef)(),n=Object(s.useRef)(e);n.current=e;var r=s.useCallback((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(Te,r),e.removeEventListener(Oe,r))}return s.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(Te,r),e.addEventListener(Oe,r),t.current=e)},i]}(Y),X=Object(i.a)(q,1)[0],$=s.useMemo((function(){var e,t,n;switch(j){case"appear":return e={},Object(r.a)(e,"prepare",g),Object(r.a)(e,"start",b),Object(r.a)(e,"active",C),e;case"enter":return t={},Object(r.a)(t,"prepare",v),Object(r.a)(t,"start",x),Object(r.a)(t,"active",E),t;case"leave":return n={},Object(r.a)(n,"prepare",y),Object(r.a)(n,"start",w),Object(r.a)(n,"active",k),n;default:return{}}}),[j]),J=Me(j,(function(e){if("prepare"===e){var t=$.prepare;return!!t&&t(G())}var n;ee in $&&H((null===(n=$[ee])||void 0===n?void 0:n.call($,G(),null))||null);return"active"===ee&&(X(G()),p>0&&(clearTimeout(z.current),z.current=setTimeout((function(){Y({deadline:!0})}),p))),!0})),Z=Object(i.a)(J,2),Q=Z[0],ee=Z[1],te=Re(ee);K.current=te,Le((function(){R(t);var n,r=U.current;(U.current=!0,e)&&(!r&&t&&h&&(n="appear"),r&&t&&c&&(n="enter"),(r&&!t&&f||!r&&m&&!t&&f)&&(n="leave"),n&&(N(n),Q()))}),[t]),Object(s.useEffect)((function(){("appear"===j&&!h||"enter"===j&&!c||"leave"===j&&!f)&&N("none")}),[h,c,f]),Object(s.useEffect)((function(){return function(){clearTimeout(z.current),V.current=!0}}),[]),Object(s.useEffect)((function(){void 0!==D&&"none"===j&&(null==_||_(D))}),[D,j]);var ne=B;return $.prepare&&"start"===ee&&(ne=Object(o.a)({transition:"none"},ne)),[j,ee,ne,null!=D?D:t]}var je=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(){return Object(C.a)(this,n),t.apply(this,arguments)}return Object(E.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(s.Component);var Ne=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===Object(R.a)(e)&&(t=e.transitionSupport);var a=s.forwardRef((function(e,t){var a=e.visible,l=void 0===a||a,u=e.removeOnLeave,h=void 0===u||u,d=e.forceRender,f=e.children,p=e.motionName,m=e.leavedClassName,g=e.eventProps,v=n(e),y=Object(s.useRef)(),b=Object(s.useRef)();var x=Ie(v,l,(function(){try{return Object(le.a)(y.current||b.current)}catch(e){return null}}),e),w=Object(i.a)(x,4),C=w[0],E=w[1],k=w[2],S=w[3],O=s.useRef(S);S&&(O.current=!0);var T=Object(s.useRef)(t);T.current=t;var _,A=s.useCallback((function(e){y.current=e,Object(ce.b)(T.current,e)}),[]),L=Object(o.a)(Object(o.a)({},g),{},{visible:l});if(f)if("none"!==C&&n(e)){var D,R;"prepare"===E?R="prepare":Re(E)?R="active":"start"===E&&(R="start"),_=f(Object(o.a)(Object(o.a)({},L),{},{className:c()(_e(p,C),(D={},Object(r.a)(D,_e(p,"".concat(C,"-").concat(R)),R),Object(r.a)(D,p,"string"==typeof p),D)),style:k}),A)}else _=S?f(Object(o.a)({},L),A):!h&&O.current?f(Object(o.a)(Object(o.a)({},L),{},{className:m}),A):d?f(Object(o.a)(Object(o.a)({},L),{},{style:{display:"none"}}),A):null;else _=null;return s.createElement(je,{ref:b},_)}));return a.displayName="CSSMotion",a}(Se);function Pe(e){var t;return t=e&&"object"===Object(R.a)(e)&&"key"in e?e:{key:e},Object(o.a)(Object(o.a)({},t),{},{key:String(t.key)})}function Fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Pe)}function Be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,a=Fe(e),s=Fe(t);a.forEach((function(e){for(var t=!1,a=r;a1}));return c.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 He=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ne,n=function(e){Object(S.a)(r,e);var n=Object(O.a)(r);function r(){var e;return Object(C.a)(this,r),(e=n.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(o.a)(Object(o.a)({},e),{},{status:"removed"})}))}}))},e}return Object(E.a)(r,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,r=this.props,i=r.component,o=r.children,l=r.onVisibleChanged,c=Object(a.a)(r,["component","children","onVisibleChanged"]),u=i||s.Fragment,h={};return He.forEach((function(e){h[e]=c[e],delete c[e]})),delete c.keys,s.createElement(u,c,n.map((function(n){var r=n.status,i=Object(a.a)(n,["status"]),c="add"===r||"keep"===r;return s.createElement(t,Object(w.a)({},h,{key:i.key,visible:c,eventProps:i,onVisibleChanged:function(t){null==l||l(t,{key:i.key}),t||e.removeKey(i.key)}}),o)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,i=Fe(n);return{keyEntities:Be(r,i).filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||"removed"!==t.status||"remove"!==e.status}))}}}]),r}(s.Component);n.defaultProps={component:"div"}}(Se);var Ue=Ne;function ze(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function Ve(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,i=e.mask,a=e.maskMotion,l=e.maskAnimation,u=e.maskTransitionName;if(!i)return null;var h={};return(a||u||l)&&(h=Object(o.a)({motionAppear:!0},ze({motion:a,prefixCls:t,transitionName:u,animation:l}))),s.createElement(Ue,Object(w.a)({},h,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return s.createElement("div",{style:{zIndex:r},className:c()("".concat(t,"-mask"),n)})}))}var We=n("9mu1"),Ge=n("o0o1"),Ke=n.n(Ge),Ye=n("HaE+"),qe=["measure","align",null,"motion"],Xe=s.forwardRef((function(e,t){var n=e.visible,r=e.prefixCls,a=e.className,l=e.style,u=e.children,h=e.zIndex,d=e.stretch,f=e.destroyPopupOnHide,p=e.forceRender,m=e.align,g=e.point,v=e.getRootDomNode,y=e.getClassNameFromAlign,b=e.onAlign,x=e.onMouseEnter,C=e.onMouseLeave,E=e.onMouseDown,k=e.onTouchStart,S=Object(s.useRef)(),O=Object(s.useRef)(),T=Object(s.useState)(),_=Object(i.a)(T,2),A=_[0],L=_[1],D=function(e){var t=s.useState({width:0,height:0}),n=Object(i.a)(t,2),r=n[0],a=n[1];return[s.useMemo((function(){var t={};if(e){var n=r.width,i=r.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,r]),function(e){a({width:e.offsetWidth,height:e.offsetHeight})}]}(d),R=Object(i.a)(D,2),M=R[0],I=R[1];var j=function(e,t){var n=Object(s.useState)(null),r=Object(i.a)(n,2),a=r[0],o=r[1],l=Object(s.useRef)(),c=Object(s.useRef)(!1);function u(e){c.current||o(e)}function h(){oe.a.cancel(l.current)}return Object(s.useEffect)((function(){u("measure")}),[e]),Object(s.useEffect)((function(){switch(a){case"measure":t()}a&&(l.current=Object(oe.a)(Object(Ye.a)(Ke.a.mark((function e(){var t,n;return Ke.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=qe.indexOf(a),(n=qe[t+1])&&-1!==t&&u(n);case 3:case"end":return e.stop()}}),e)})))))}),[a]),Object(s.useEffect)((function(){return function(){c.current=!0,h()}}),[]),[a,function(e){h(),l.current=Object(oe.a)((function(){u((function(e){switch(a){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){d&&I(v())})),N=Object(i.a)(j,2),P=N[0],F=N[1],B=Object(s.useRef)();function H(){var e;null===(e=S.current)||void 0===e||e.forceAlign()}function U(e,t){var n=y(t);A!==n&&L(n),"align"===P&&(A!==n?Promise.resolve().then((function(){H()})):F((function(){var e;null===(e=B.current)||void 0===e||e.call(B)})),null==b||b(e,t))}var z=Object(o.a)({},ze(e));function V(){return new Promise((function(e){B.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=z[e];z[e]=function(e,n){return F(),null==t?void 0:t(e,n)}})),s.useEffect((function(){z.motionName||"motion"!==P||F()}),[z.motionName,P]),s.useImperativeHandle(t,(function(){return{forceAlign:H,getElement:function(){return O.current}}}));var W=Object(o.a)(Object(o.a)({},M),{},{zIndex:h,opacity:"motion"!==P&&"stable"!==P&&n?0:void 0,pointerEvents:"stable"===P?void 0:"none"},l),G=!0;!(null==m?void 0:m.points)||"align"!==P&&"stable"!==P||(G=!1);var K=u;return s.Children.count(u)>1&&(K=s.createElement("div",{className:"".concat(r,"-content")},u)),s.createElement(Ue,Object(w.a)({visible:n,ref:O,leavedClassName:"".concat(r,"-hidden")},z,{onAppearPrepare:V,onEnterPrepare:V,removeOnLeave:f,forceRender:p}),(function(e,t){var n=e.className,i=e.style,l=c()(r,a,A,n);return s.createElement(We.a,{target:g||v,key:"popup",ref:S,monitorWindowResize:!0,disabled:G,align:m,onAlign:U},s.createElement("div",{ref:t,className:l,onMouseEnter:x,onMouseLeave:C,onMouseDownCapture:E,onTouchStartCapture:k,style:Object(o.a)(Object(o.a)({},i),W)},K))}))}));Xe.displayName="PopupInner";var $e=Xe,Je=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.visible,i=e.zIndex,a=e.children,l=e.mobile,u=(l=void 0===l?{}:l).popupClassName,h=l.popupStyle,d=l.popupMotion,f=void 0===d?{}:d,p=l.popupRender,m=s.useRef();s.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return m.current}}}));var g=Object(o.a)({zIndex:i},h),v=a;return s.Children.count(a)>1&&(v=s.createElement("div",{className:"".concat(n,"-content")},a)),p&&(v=p(v)),s.createElement(Ue,Object(w.a)({visible:r,ref:m,removeOnLeave:!0},f),(function(e,t){var r=e.className,i=e.style,a=c()(n,u,r);return s.createElement("div",{ref:t,className:a,style:Object(o.a)(Object(o.a)({},i),g)},v)}))}));Je.displayName="MobilePopupInner";var Ze=Je,Qe=["visible","mobile"],et=s.forwardRef((function(e,t){var n=e.visible,r=e.mobile,l=Object(a.a)(e,Qe),c=Object(s.useState)(n),u=Object(i.a)(c,2),h=u[0],d=u[1],f=Object(s.useState)(!1),p=Object(i.a)(f,2),m=p[0],g=p[1],v=Object(o.a)(Object(o.a)({},l),{},{visible:h});Object(s.useEffect)((function(){d(n),n&&r&&g(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4)))}())}),[n,r]);var y=m?s.createElement(Ze,Object(w.a)({},v,{mobile:r,ref:t})):s.createElement($e,Object(w.a)({},v,{ref:t}));return s.createElement("div",null,s.createElement(Ve,v),y)}));et.displayName="Popup";var tt=et,nt=s.createContext(null);function rt(){}function it(){return""}function at(e){return e?e.ownerDocument:window.document}var ot=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var st,lt,ct=(st=he.a,(lt=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(e){var r,i;return Object(C.a)(this,n),(r=t.call(this,e)).popupRef=s.createRef(),r.triggerRef=s.createRef(),r.attachId=void 0,r.clickOutsideHandler=void 0,r.touchOutsideHandler=void 0,r.contextMenuOutsideHandler1=void 0,r.contextMenuOutsideHandler2=void 0,r.mouseDownTimeout=void 0,r.focusTime=void 0,r.preClickTime=void 0,r.preTouchTime=void 0,r.delayTimer=void 0,r.hasPopupMouseDown=void 0,r.onMouseEnter=function(e){var t=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",e),r.delaySetPopupVisible(!0,t,t?null:e)},r.onMouseMove=function(e){r.fireEvents("onMouseMove",e),r.setPoint(e)},r.onMouseLeave=function(e){r.fireEvents("onMouseLeave",e),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onPopupMouseEnter=function(){r.clearDelayTimer()},r.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Object(se.a)(null===(t=r.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onFocus=function(e){r.fireEvents("onFocus",e),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))},r.onMouseDown=function(e){r.fireEvents("onMouseDown",e),r.preClickTime=Date.now()},r.onTouchStart=function(e){r.fireEvents("onTouchStart",e),r.preTouchTime=Date.now()},r.onBlur=function(e){r.fireEvents("onBlur",e),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)},r.onContextMenu=function(e){e.preventDefault(),r.fireEvents("onContextMenu",e),r.setPopupVisible(!0,e)},r.onContextMenuClose=function(){r.isContextMenuToShow()&&r.close()},r.onClick=function(e){if(r.fireEvents("onClick",e),r.focusTime){var t;if(r.preClickTime&&r.preTouchTime?t=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?t=r.preClickTime:r.preTouchTime&&(t=r.preTouchTime),Math.abs(t-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,e)},r.onPopupMouseDown=function(){var e;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(e=r.context).onPopupMouseDown.apply(e,arguments)},r.onDocumentClick=function(e){if(!r.props.mask||r.props.maskClosable){var t=e.target,n=r.getRootDomNode(),i=r.getPopupDomNode();Object(se.a)(n,t)&&!r.isContextMenuOnly()||Object(se.a)(i,t)||r.hasPopupMouseDown||r.close()}},r.getRootDomNode=function(){var e=r.props.getTriggerDOMNode;if(e)return e(r.triggerRef.current);try{var t=Object(le.a)(r.triggerRef.current);if(t)return t}catch(e){}return ae.a.findDOMNode(Object(k.a)(r))},r.getPopupClassNameFromAlign=function(e){var t=[],n=r.props,i=n.popupPlacement,a=n.builtinPlacements,o=n.prefixCls,s=n.alignPoint,l=n.getPopupClassNameFromAlign;return i&&a&&t.push(function(e,t,n,r){for(var i=n.points,a=Object.keys(e),o=0;o=r.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(r.subMenuTitle.offsetWidth,"px"))}},r.saveSubMenuTitle=function(e){r.subMenuTitle=e},r.getBaseProps=function(){var e=Object(k.a)(r).props,t=r.getMode();return{mode:"horizontal"===t?"vertical":t,visible:r.getVisible(),level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:r.onSubMenuClick,onSelect:r.onSelect,onDeselect:r.onDeselect,onDestroy:r.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:r.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(k.a)(r),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[Z(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:r.internalMenuId,manualRef:r.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},r.getMotion=function(e,t){var n=Object(k.a)(r).haveRendered,i=r.props,a=i.motion,s=i.rootPrefixCls;return Object(o.a)(Object(o.a)({},a),{},{leavedClassName:"".concat(s,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var i=e.store,a=e.eventKey,l=i.getState().defaultActiveFirst;r.isRootMenu=!1;var c=!1;return l&&(c=l[a]),mt(i,a,c),r.state={mode:e.mode,isOpen:e.isOpen},r}return Object(E.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,i=t.manualRef,a=t.isOpen,o=function(){e.setState({mode:n,isOpen:a})},s=a!==this.state.isOpen,l=n!==this.state.mode;(l||s)&&(oe.a.cancel(this.updateStateRaf),l?this.updateStateRaf=Object(oe.a)(o):o()),i&&i(this),"horizontal"===n&&(null==r?void 0:r.isRootMenu)&&a&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),oe.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(e,t){var n=this.getBaseProps();return s.createElement(Ot,Object(w.a)({},n,{id:this.internalMenuId,className:e,style:t}),this.props.children)}},{key:"renderChildren",value:function(){var e=this,t=this.getBaseProps(),n=t.mode,i=t.visible,a=t.forceSubMenuRender,o=t.direction,l=this.getMotion(n,i);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||i||a,!this.haveOpened)return s.createElement("div",null);var u=c()("".concat(t.prefixCls,"-sub"),Object(r.a)({},"".concat(t.prefixCls,"-rtl"),"rtl"===o));return this.isInlineMode()?s.createElement(Ue,Object(w.a)({visible:t.visible,forceRender:a},l),(function(t){var n=t.className,r=t.style,i=c()(u,n);return e.renderPopupMenu(i,r)})):this.renderPopupMenu(u)}},{key:"render",value:function(){var e,t,n,i=Object(o.a)({},this.props),a=this.getVisible(),l=this.getPrefixCls(),u=this.isInlineMode(),h=this.getMode(),d=c()(l,"".concat(l,"-").concat(h),(e={},Object(r.a)(e,i.className,!!i.className),Object(r.a)(e,this.getOpenClassName(),a),Object(r.a)(e,this.getActiveClassName(),i.active||a&&!u),Object(r.a)(e,this.getDisabledClassName(),i.disabled),Object(r.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(i.eventKey?this.internalMenuId="".concat(i.eventKey,"$Menu"):(ft+=1,this.internalMenuId="$__$".concat(ft,"$Menu")));var f={},p={},m={};i.disabled||(f={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},p={onClick:this.onTitleClick},m={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var g={},v="rtl"===i.direction;u&&(v?g.paddingRight=i.inlineIndent*i.level:g.paddingLeft=i.inlineIndent*i.level);var y={};this.getVisible()&&(y={"aria-owns":this.internalMenuId});var b=null;"horizontal"!==h&&(b=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(b=s.createElement(this.props.expandIcon,Object(o.a)({},this.props))));var x=s.createElement("div",Object(w.a)({ref:this.saveSubMenuTitle,style:g,className:"".concat(l,"-title"),role:"button"},m,p,{"aria-expanded":a},y,{"aria-haspopup":"true",title:"string"==typeof i.title?i.title:void 0}),i.title,b||s.createElement("i",{className:"".concat(l,"-arrow")})),C=this.renderChildren(),E=(null===(t=i.parentMenu)||void 0===t?void 0:t.isRootMenu)?i.parentMenu.props.getPopupContainer:function(e){return e.parentNode},k=pt[h],S=i.popupOffset?{offset:i.popupOffset}:{},O=c()((n={},Object(r.a)(n,i.popupClassName,i.popupClassName&&!u),Object(r.a)(n,"".concat(l,"-rtl"),v),n)),T=i.disabled,_=i.triggerSubMenuAction,A=i.subMenuOpenDelay,L=i.forceSubMenuRender,D=i.subMenuCloseDelay,R=i.builtinPlacements;ee.forEach((function(e){return delete i[e]})),delete i.onClick;var M=v?Object(o.a)(Object(o.a)({},dt),R):Object(o.a)(Object(o.a)({},ht),R);delete i.direction;var I=this.getBaseProps(),j=u?null:this.getMotion(I.mode,I.visible);return s.createElement("li",Object(w.a)({},i,f,{className:d,role:"menuitem"}),s.createElement(ct,{prefixCls:l,popupClassName:c()("".concat(l,"-popup"),O),getPopupContainer:E,builtinPlacements:M,popupPlacement:k,popupVisible:!u&&a,popupAlign:S,popup:u?null:C,action:T||u?[]:[_],mouseEnterDelay:A,mouseLeaveDelay:D,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:L,popupMotion:j},x),u?C:null)}}]),n}(s.Component);gt.defaultProps={onMouseEnter:$,onMouseLeave:$,onTitleMouseEnter:$,onTitleMouseLeave:$,onTitleClick:$,manualRef:$,mode:"vertical",title:""};var vt=Object(T.b)((function(e,t){var n=e.openKeys,r=e.activeKey,i=e.selectedKeys,a=t.eventKey,o=t.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[o]===a,selectedKeys:i}}))(gt);vt.isSubMenu=!0;var yt=vt,bt=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(){var e;return Object(C.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.childRef=s.createRef(),e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=e.childRef.current;return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,r){var i=e.props,l=i.overflowedIndicator,c=i.level,u=i.mode,h=i.prefixCls,d=i.theme;if(1!==c||"horizontal"!==u)return null;var f=e.props.children[0].props,p=(f.children,f.title,f.style),m=Object(a.a)(f,["children","title","style"]),g=Object(o.a)({},p),v="".concat(t,"-overflowed-indicator"),y="".concat(t,"-overflowed-indicator");0===n.length&&!0!==r?g=Object(o.a)(Object(o.a)({},g),{},{display:"none"}):r&&(g=Object(o.a)(Object(o.a)({},g),{},{visibility:"hidden",position:"absolute"}),v="".concat(v,"-placeholder"),y="".concat(y,"-placeholder"));var b=d?"".concat(h,"-").concat(d):"",x={};return ee.forEach((function(e){void 0!==m[e]&&(x[e]=m[e])})),s.createElement(yt,Object(w.a)({title:l,className:"".concat(h,"-overflowed-submenu"),popupClassName:b},x,{key:v,eventKey:y,disabled:!1,style:g}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];ne(r,"display","inline-block");var i=e.getMenuItemNodes(),a=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(e){ne(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return te(e,!0)})),a.forEach((function(e){ne(e,"display","none")})),e.overflowedIndicatorWidth=te(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),ne(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=te(t);e.overflowedItems=[];var r,i=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(E.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=this.childRef.current;if(!t)return;this.resizeObserver=new re.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,i,a){var o=i;if("horizontal"===t.props.mode){var l=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(a>n&&(o=s.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),a===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return s.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),l=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var c=[].concat(Object(d.a)(r),[l,o]);return a===e.length-1&&c.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),c}return[].concat(Object(d.a)(r),[o])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(a.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return s.createElement(i,Object(w.a)({ref:this.childRef},r),this.renderChildren(n))}}]),n}(s.Component);bt.defaultProps={tag:"div",className:""};var xt=bt;function wt(e,t,n){var i=e.getState();e.setState({activeKey:Object(o.a)(Object(o.a)({},i.activeKey),{},Object(r.a)({},t,n))})}function Ct(e){return e.eventKey||"0-menu-"}function Et(e,t){var n,r=t,i=e.children,a=e.eventKey;if(r&&(Q(i,(function(e,t){e&&e.props&&!e.props.disabled&&r===J(e,a,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(Q(i,(function(e,t){r||!e||e.props.disabled||(r=J(e,a,t))})),r):r}function kt(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var St=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(e){var i;return Object(C.a)(this,n),(i=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(i.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var a=null;return r!==v.a.UP&&r!==v.a.DOWN||(a=i.step(r===v.a.UP?-1:1)),a?(e.preventDefault(),wt(i.props.store,Ct(i.props),a.props.eventKey),"function"==typeof t&&t(a),1):void 0},i.onItemHover=function(e){var t=e.key,n=e.hover;wt(i.props.store,Ct(i.props),n?t:null)},i.onDeselect=function(e){i.props.onDeselect(e)},i.onSelect=function(e){i.props.onSelect(e)},i.onClick=function(e){i.props.onClick(e)},i.onOpenChange=function(e){i.props.onOpenChange(e)},i.onDestroy=function(e){i.props.onDestroy(e)},i.getFlatInstanceArray=function(){return i.instanceArray},i.step=function(e){var t=i.getFlatInstanceArray(),n=i.props.store.getState().activeKey[Ct(i.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var a=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(a=t,!1)})),i.props.defaultActiveFirst||-1===a||(o=t.slice(a,r-1)).length&&!o.every((function(e){return!!e.props.disabled}))){var o,s=(a+1)%r,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},i.renderCommonMenuItem=function(e,t,n){var r=i.props.store.getState(),a=Object(k.a)(i).props,l=J(e,a.eventKey,t),c=e.props;if(!c||"string"==typeof e.type)return e;var u=l===r.activeKey,h=Object(o.a)(Object(o.a)({mode:c.mode||a.mode,level:a.level,inlineIndent:a.inlineIndent,renderMenuItem:i.renderMenuItem,rootPrefixCls:a.prefixCls,index:t,parentMenu:a.parentMenu,manualRef:c.disabled?void 0:Object(A.a)(e.ref,kt.bind(Object(k.a)(i))),eventKey:l,active:!c.disabled&&u,multiple:a.multiple,onClick:function(e){(c.onClick||$)(e),i.onClick(e)},onItemHover:i.onItemHover,motion:a.motion,subMenuOpenDelay:a.subMenuOpenDelay,subMenuCloseDelay:a.subMenuCloseDelay,forceSubMenuRender:a.forceSubMenuRender,onOpenChange:i.onOpenChange,onDeselect:i.onDeselect,onSelect:i.onSelect,builtinPlacements:a.builtinPlacements,itemIcon:c.itemIcon||i.props.itemIcon,expandIcon:c.expandIcon||i.props.expandIcon},n),{},{direction:a.direction});return("inline"===a.mode||X.any)&&(h.triggerSubMenuAction="click"),s.cloneElement(e,Object(o.a)(Object(o.a)({},h),{},{key:l||t}))},i.renderMenuItem=function(e,t,n){if(!e)return null;var r=i.props.store.getState(),a={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:i.props.triggerSubMenuAction,subMenuKey:n};return i.renderCommonMenuItem(e,t,a)},e.store.setState({activeKey:Object(o.a)(Object(o.a)({},e.store.getState().activeKey),{},Object(r.a)({},e.eventKey,Et(e,e.activeKey)))}),i.instanceArray=[],i}return Object(E.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!D()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[Ct(t)],r=Et(t,n);if(r!==n)wt(t.store,Ct(t),r);else if("activeKey"in e){r!==Et(e,e.activeKey)&&wt(t.store,Ct(t),r)}}},{key:"render",value:function(){var e=this,t=Object(w.a)({},this.props);this.instanceArray=[];var n={className:c()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,a=t.visible,o=t.level,l=t.mode,h=t.overflowedIndicator,d=t.theme;return ee.forEach((function(e){return delete t[e]})),delete t.onClick,s.createElement(xt,Object(w.a)({},t,{prefixCls:r,mode:l,tag:"ul",level:o,theme:d,visible:a,overflowedIndicator:h},n),Object(u.a)(t.children).map((function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")})))}}]),n}(s.Component);St.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:$};var Ot=Object(T.b)()(St),Tt=n("Kwbf");function _t(e,t,n){var r=e.prefixCls,i=e.motion,a=e.defaultMotions,o=void 0===a?{}:a,s=e.openAnimation,l=e.openTransitionName,c=t.switchingModeFromInline;if(i)return i;if("object"===Object(R.a)(s)&&s)Object(Tt.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=o[n];return u||(c?null:o.other)}var At=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(e){var r;Object(C.a)(this,n),(r=t.call(this,e)).onSelect=function(e){var t=Object(k.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys,i=e.key;n=t.multiple?n.concat([i]):[i],"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onSelect(Object(o.a)(Object(o.a)({},e),{},{selectedKeys:n}))}},r.onClick=function(e){var t=r.getRealMenuMode(),n=Object(k.a)(r),i=n.store,a=n.props.onOpenChange;"inline"===t||"openKeys"in r.props||(i.setState({openKeys:[]}),a([])),r.props.onClick(e)},r.onKeyDown=function(e,t){r.innerMenu.getWrappedInstance().onKeyDown(e,t)},r.onOpenChange=function(e){var t=Object(k.a)(r).props,n=r.store.getState().openKeys.concat(),i=!1,a=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var r=n.indexOf(e.key);(t=-1!==r)&&n.splice(r,1)}i=i||t};Array.isArray(e)?e.forEach(a):a(e),i&&("openKeys"in r.props||r.store.setState({openKeys:n}),t.onOpenChange(n))},r.onDeselect=function(e){var t=Object(k.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys.concat(),i=e.key,a=n.indexOf(i);-1!==a&&n.splice(a,1),"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onDeselect(Object(o.a)(Object(o.a)({},e),{},{selectedKeys:n}))}},r.onMouseEnter=function(e){r.restoreModeVerticalFromInline();var t=r.props.onMouseEnter;t&&t(e)},r.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,i="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,a="font-size"===e.propertyName&&i.indexOf("anticon")>=0;(t||a)&&r.restoreModeVerticalFromInline()},r.setInnerMenu=function(e){r.innerMenu=e},r.isRootMenu=!0;var i=e.defaultSelectedKeys,a=e.defaultOpenKeys;return"selectedKeys"in e&&(i=e.selectedKeys||[]),"openKeys"in e&&(a=e.openKeys||[]),r.store=Object(T.c)({selectedKeys:i,openKeys:a,activeKey:{"0-menu-":Et(e,e.activeKey)}}),r.state={switchingModeFromInline:!1,prevProps:e,inlineOpenKeys:[],store:r.store},r}return Object(E.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&i([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(o.a)({},Object(_.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(o.a)(Object(o.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:_t(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,s.createElement(T.a,{store:this.store},s.createElement(Ot,Object(w.a)({},e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.store,i=r.getState(),a={},o={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(o.switchingModeFromInline=!0),"openKeys"in e?a.openKeys=e.openKeys||[]:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(o.switchingModeFromInline=!0,o.inlineOpenKeys=i.openKeys,a.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(a.openKeys=t.inlineOpenKeys,o.inlineOpenKeys=[])),Object.keys(a).length&&r.setState(a),o}}]),n}(s.Component);At.defaultProps={selectable:!0,onClick:$,onSelect:$,onOpenChange:$,onDeselect:$,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:s.createElement("span",null,"···")};var Lt=At,Dt=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(){var e;return Object(C.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===v.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseLeave;i({key:r,hover:!1}),a({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseEnter;i({key:r,hover:!0}),a({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,i=n.multiple,a=n.onClick,o=n.onSelect,s=n.onDeselect,l=n.isSelected,c={key:r,keyPath:[r],item:Object(k.a)(e),domEvent:t};a(c),i?l?s(c):o(c):l||o(c)},e.saveNode=function(t){e.node=t},e}return Object(E.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(o.a)({},this.props),n=c()(this.getPrefixCls(),t.className,(e={},Object(r.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(r.a)(e,this.getSelectedClassName(),t.isSelected),Object(r.a)(e,this.getDisabledClassName(),t.disabled),e)),i=Object(o.a)(Object(o.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?i=Object(o.a)(Object(o.a)({},i),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(i.role="none");var a={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},l=Object(o.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?l.paddingRight=t.inlineIndent*t.level:l.paddingLeft=t.inlineIndent*t.level),ee.forEach((function(e){return delete t[e]})),delete t.direction;var u=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(u=s.createElement(this.props.itemIcon,this.props)),s.createElement("li",Object(w.a)({},Object(_.a)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,a,{style:l,ref:this.saveNode}),t.children,u)}}]),n}(s.Component);Dt.isMenuItem=!0,Dt.defaultProps={onSelect:$,onMouseEnter:$,onMouseLeave:$,manualRef:$};var Rt=Object(T.b)((function(e,t){var n=e.activeKey,r=e.selectedKeys,i=t.eventKey;return{active:n[t.subMenuKey]===i,isSelected:Array.isArray(r)?-1!==r.indexOf(i):r===i}}))(Dt),Mt=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(){var e;return Object(C.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(E.a)(n,[{key:"render",value:function(){var e=Object(w.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,i="".concat(r,"-item-group-title"),a="".concat(r,"-item-group-list"),o=e.title,l=e.children;return ee.forEach((function(t){return delete e[t]})),delete e.direction,s.createElement("li",Object(w.a)({},e,{onClick:function(e){return e.stopPropagation()},className:"".concat(n," ").concat(r,"-item-group")}),s.createElement("div",{className:i,title:"string"==typeof o?o:void 0},o),s.createElement("ul",{className:a},s.Children.map(l,this.renderInnerMenuItem)))}}]),n}(s.Component);Mt.isMenuItemGroup=!0,Mt.defaultProps={disabled:!0};var It=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return s.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};It.defaultProps={disabled:!0,className:"",style:{}};var jt=Lt,Nt=n("eDIo");var Pt=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,a=e.style;return r&&!1!==r.showAdd?s.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:a,"aria-label":(null==i?void 0:i.addAriaLabel)||"Add tab",onClick:function(e){r.onEdit("add",{event:e})}},r.addIcon||"+"):null}));var Ft=s.forwardRef((function(e,t){var n=e.prefixCls,a=e.id,o=e.tabs,l=e.locale,u=e.mobile,h=e.moreIcon,d=void 0===h?"More":h,f=e.moreTransitionName,p=e.style,m=e.className,g=e.editable,y=e.tabBarGutter,b=e.rtl,x=e.onTabClick,w=Object(s.useState)(!1),C=Object(i.a)(w,2),E=C[0],k=C[1],S=Object(s.useState)(null),O=Object(i.a)(S,2),T=O[0],_=O[1],A="".concat(a,"-more-popup"),L="".concat(n,"-dropdown"),D=null!==T?"".concat(A,"-").concat(T):null,R=null==l?void 0:l.dropdownAriaLabel,M=s.createElement(jt,{onClick:function(e){var t=e.key,n=e.domEvent;x(t,n),k(!1)},id:A,tabIndex:-1,role:"listbox","aria-activedescendant":D,selectedKeys:[T],"aria-label":void 0!==R?R:"expanded dropdown"},o.map((function(e){return s.createElement(Rt,{key:e.key,id:"".concat(A,"-").concat(e.key),role:"option","aria-controls":a&&"".concat(a,"-panel-").concat(e.key),disabled:e.disabled},e.tab)})));function I(e){for(var t=o.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===T}))||0,r=t.length,i=0;it?"left":"right"})})),V=Object(i.a)(z,2),W=V[0],G=V[1],K=Ut(0,(function(e,t){!U&&R&&R({direction:e>t?"top":"bottom"})})),Y=Object(i.a)(K,2),q=Y[0],X=Y[1],$=Object(s.useState)(0),J=Object(i.a)($,2),Z=J[0],Q=J[1],ee=Object(s.useState)(0),te=Object(i.a)(ee,2),ne=te[0],re=te[1],ie=Object(s.useState)(0),ae=Object(i.a)(ie,2),oe=ae[0],se=ae[1],le=Object(s.useState)(0),ce=Object(i.a)(le,2),ue=ce[0],he=ce[1],de=Object(s.useState)(null),fe=Object(i.a)(de,2),pe=fe[0],me=fe[1],ge=Object(s.useState)(null),ve=Object(i.a)(ge,2),ye=ve[0],be=ve[1],xe=Object(s.useState)(0),we=Object(i.a)(xe,2),Ce=we[0],Ee=we[1],ke=Object(s.useState)(0),Se=Object(i.a)(ke,2),Oe=Se[0],Te=Se[1],_e=function(e){var t=Object(s.useRef)([]),n=Object(s.useState)({}),r=Object(i.a)(n,2)[1],a=Object(s.useRef)("function"==typeof e?e():e),o=g((function(){var e=a.current;t.current.forEach((function(t){e=t(e)})),t.current=[],a.current=e,r({})}));return[a.current,function(e){t.current.push(e),o()}]}(new Map),Ae=Object(i.a)(_e,2),Le=Ae[0],De=Ae[1],Re=function(e,t,n){return Object(s.useMemo)((function(){for(var n,r=new Map,i=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||b,a=i.left+i.width,s=0;sje?[je,!1]:[e,!0]}U?k?(Ie=0,je=Math.max(0,Z-pe)):(Ie=Math.min(0,pe-Z),je=0):(Ie=Math.min(0,ye-ne),je=0);var Pe=Object(s.useRef)(),Fe=Object(s.useState)(),Be=Object(i.a)(Fe,2),He=Be[0],Ue=Be[1];function ze(){Ue(Date.now())}function Ve(){window.clearTimeout(Pe.current)}function We(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=Re.get(e);if(t)if(U){var n=W;k?t.rightW+pe&&(n=t.right+t.width-pe):t.left<-W?n=-t.left:t.left+t.width>-W+pe&&(n=-(t.left+t.width-pe)),X(0),G(Ne(n)[0])}else{var r=q;t.top<-q?r=-t.top:t.top+t.height>-q+ye&&(r=-(t.top+t.height-ye)),G(0),X(Ne(r)[0])}}!function(e,t){var n=Object(s.useState)(),r=Object(i.a)(n,2),a=r[0],o=r[1],l=Object(s.useState)(0),c=Object(i.a)(l,2),u=c[0],h=c[1],d=Object(s.useState)(0),f=Object(i.a)(d,2),p=f[0],m=f[1],g=Object(s.useState)(),v=Object(i.a)(g,2),y=v[0],b=v[1],x=Object(s.useRef)(),w=Object(s.useRef)(0),C=Object(s.useRef)(!1),E=Object(s.useRef)(),k=Object(s.useRef)(null);k.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;o({x:n,y:r}),window.clearInterval(x.current)},onTouchMove:function(e){if(a){e.preventDefault();var n=e.touches[0],r=n.screenX,i=n.screenY;o({x:r,y:i});var s=r-a.x,l=i-a.y;t(s,l);var c=Date.now();h(c),m(c-u),b({x:s,y:l})}},onTouchEnd:function(){if(a&&(o(null),b(null),y)){var e=y.x/p,n=y.y/p,r=Math.abs(e),i=Math.abs(n);if(Math.max(r,i)<.1)return;var s=e,l=n;x.current=window.setInterval((function(){Math.abs(s)<.01&&Math.abs(l)<.01?window.clearInterval(x.current):t(20*(s*=Ht),20*(l*=Ht))}),20)}},onWheel:function(e){var n=e.deltaX,r=e.deltaY,i=0,a=Math.abs(n),o=Math.abs(r);a===o?i="x"===E.current?n:r:a>o?(i=n,E.current="x"):(i=r,E.current="y");var s=Date.now();s-w.current>100&&(C.current=!1),(t(-i,-i)||C.current)&&(e.preventDefault(),C.current=!0),w.current=s}},s.useEffect((function(){function t(e){k.current.onTouchMove(e)}function n(e){k.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){k.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){k.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(M,(function(e,t){var n=!1;function r(e,t){e((function(e){var r=Ne(e+t),a=Object(i.a)(r,2),o=a[0],s=a[1];return n=s,o}))}if(U){if(pe>=Z)return n;r(G,e)}else{if(ye>=ne)return n;r(X,t)}return Ve(),ze(),n})),Object(s.useEffect)((function(){return Ve(),He&&(Pe.current=window.setTimeout((function(){Ue(0)}),100)),Ve}),[He]);var Ge=function(e,t,n,r,i){var a,o,l,c=i.tabs,u=i.tabPosition,h=i.rtl;["top","bottom"].includes(u)?(a="width",o=h?"right":"left",l=Math.abs(t.left)):(a="height",o="top",l=-t.top);var d=t[a],f=n[a],p=r[a],m=d;return f+p>d&&(m=d-p),Object(s.useMemo)((function(){if(!c.length)return[0,0];for(var t=c.length,n=t,r=0;rl+m){n=r-1;break}}for(var s=0,u=t-1;u>=0;u-=1){if((e.get(c[u].key)||x)[o]0,st=W+pe */ +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=n?-1:1,f=e[t+h];for(h+=d,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+h],h+=d,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=c}return(f?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=p,o/=256,c-=8);e[n+f-p]|=128*m}},lZu9: +/*!***********************************************************!*\ + !*** ./node_modules/codemirror/mode/markdown/markdown.js ***! + \***********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),i="null"==r.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var a={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 a)a.hasOwnProperty(o)&&n.tokenTypeOverrides[o]&&(a[o]=n.tokenTypeOverrides[o]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,d=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 g(e,t,n){return t.f=t.inline=n,n(e,t)}function v(e,t,n){return t.f=t.block=n,n(e,t)}function y(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==x){var n=i;if(!n){var a=e.innerMode(r,t.htmlState);n="xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText}n&&(t.f=k,t.block=b,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function b(r,i){var o,d=r.column()===i.indentation,m=!(o=i.prevLine.stream)||!/\S/.test(o.string),v=i.indentedCode,y=i.prevLine.hr,b=!1!==i.list,x=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var E=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,b)){for(i.list=null;E=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return r.skipToEnd(),i.indentedCode=!0,a.code;if(r.eatSpace())return null;if(d&&i.indentation<=x&&(O=r.match(u))&&O[1].length<=6)return i.quote=0,i.header=O[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,C(i);if(i.indentation<=x&&r.eat(">"))return i.quote=d?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),r.eatSpace(),C(i);if(!S&&!i.setext&&d&&i.indentation<=x&&(O=r.match(l))){var T=O[1]?"ol":"ul";return i.indentation=E+r.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&r.match(c,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+T]),C(i)}return d&&i.indentation<=x&&(O=r.match(f,!0))?(i.quote=0,i.fencedEndRE=new RegExp(O[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&function(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}(O[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=w,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,C(i)):i.setext||!(k&&b||i.quote||!1!==i.list||i.code||S||p.test(r.string))&&(O=r.lookAhead(1))&&(O=O.match(h))?(i.setext?(i.header=i.setext,i.setext=0,r.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==O[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,C(i)):S?(r.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,a.hr):"["===r.peek()?g(r,i,_):g(r,i,i.inline)}function x(t,n){var a=r.token(t,n.htmlState);if(!i){var o=e.innerMode(r,n.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=k,n.block=b,n.htmlState=null)}return a}function w(e,t){var r,i=t.listStack[t.listStack.length-1]||0,o=t.indentation=e.quote?t.push(a.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function E(e,t){if(e.match(d,!0))return C(t)}function k(t,i){var o=i.text(t,i);if(void 0!==o)return o;if(i.list)return i.list=null,C(i);if(i.taskList)return" "===t.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,C(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),C(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(u),!0))return a.linkHref}if("`"===s){var h=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var d=t.current().length;if(0!=i.code||i.quote&&1!=d){if(d==i.code){var f=C(i);return i.code=0,f}return i.formatting=h,C(i)}return i.code=d,C(i)}if(i.code)return C(i);if("\\"===s&&(t.next(),n.highlightFormatting)){var p=C(i),g=a.formatting+"-escape";return p?p+" "+g:g}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),C(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),C(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var p=C(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=O,p}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),C(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var p=C(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?O:k,p}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link"),(p=C(i))?p+=" ":p="",p+a.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link"),(p=C(i))?p+=" ":p="",p+a.linkEmail;if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=t.string.indexOf(">",t.pos);if(-1!=y){var b=t.string.substring(t.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),v(t,i,x)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var w=1,E=1==t.pos?" ":t.string.charAt(t.pos-2);w<3&&t.eat(s);)w++;var T=t.peek()||" ",_=!/\s/.test(T)&&(!m.test(T)||/\s/.test(E)||m.test(E)),A=!/\s/.test(E)&&(!m.test(E)||/\s/.test(T)||m.test(T)),L=null,D=null;if(w%2&&(i.em||!_||"*"!==s&&A&&!m.test(E)?i.em!=s||!A||"*"!==s&&_&&!m.test(T)||(L=!1):L=!0),w>1&&(i.strong||!_||"*"!==s&&A&&!m.test(E)?i.strong!=s||!A||"*"!==s&&_&&!m.test(T)||(D=!1):D=!0),null!=D||null!=L)return n.highlightFormatting&&(i.formatting=null==L?"strong":null==D?"em":"strong em"),!0===L&&(i.em=s),!0===D&&(i.strong=s),f=C(i),!1===L&&(i.em=!1),!1===D&&(i.strong=!1),f}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return C(i);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),f=C(i),i.strikethrough=!1,f;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),C(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return C(i);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var R=C(i);return i.emoji=!1,R}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),C(i)}function S(e,t){if(">"===e.next()){t.f=t.inline=k,n.highlightFormatting&&(t.formatting="link");var r=C(t);return r?r+=" ":r="",r+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function O(e,t){if(e.eatSpace())return null;var r,i=e.next();return"("===i||"["===i?(t.f=t.inline=(r="("===i?")":"]",function(e,t){if(e.next()===r){t.f=t.inline=k,n.highlightFormatting&&(t.formatting="link-string");var i=C(t);return t.linkHref=!1,i}return e.match(T[r]),t.linkHref=!0,C(t)}),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,C(t)):"error"}var T={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function _(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=A,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,C(t)):g(e,t,k)}function A(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=L,n.highlightFormatting&&(t.formatting="link");var r=C(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function L(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=k,a.linkHref+" url")}var D={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:k,text:E,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(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return y(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=x)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==x?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:D}},indent:function(t,n,i){return t.block==x&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:y,getType:C,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return D}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../xml/xml */"1eCo"),n(/*! ../meta */"8EBN"))},mgmH: +/*!*****************************!*\ + !*** ./src/utils/export.ts ***! + \*****************************/ +/*! exports provided: ExportCourseInfo, ExportCourseActScore, ExportCourseMemberScores, ExportCourseAndOther, exportMoocrecord, ExportCourseTotalScore, ExportCourseWorkListScores, ExportCourseWorkListAppendix, ExportPollsScores, ExportAttendance, ExportVideoStudent, ExportCourseStudentsInfo, ExportProblemset, Exportcompetitions, ExportExerciseStudentScores, getDownFile, getecyears, getec_training_objectives, getec_graduation_requirements */ +/*! exports used: ExportAttendance, ExportCourseActScore, ExportCourseAndOther, ExportCourseInfo, ExportCourseMemberScores, ExportCourseStudentsInfo, ExportCourseTotalScore, ExportCourseWorkListScores, ExportExerciseStudentScores, ExportPollsScores, ExportProblemset, ExportVideoStudent, Exportcompetitions, exportMoocrecord, getDownFile, getec_graduation_requirements, getec_training_objectives, getecyears */function(e,t,n){"use strict";n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"e",(function(){return g})),n.d(t,"c",(function(){return v})),n.d(t,"n",(function(){return y})),n.d(t,"g",(function(){return b})),n.d(t,"h",(function(){return x})),n.d(t,"j",(function(){return w})),n.d(t,"a",(function(){return C})),n.d(t,"l",(function(){return E})),n.d(t,"f",(function(){return k})),n.d(t,"k",(function(){return S})),n.d(t,"m",(function(){return O})),n.d(t,"i",(function(){return T})),n.d(t,"o",(function(){return _})),n.d(t,"r",(function(){return A})),n.d(t,"q",(function(){return L})),n.d(t,"p",(function(){return D}));n(/*! antd/es/message/style */"miYZ");var r=n(/*! antd/es/message */"tsqr"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),s=n.n(o),l=n(/*! @/service/classrooms */"oUNq"),c=n(/*! umi */"9kvl"),u=n(/*! ./util */"1vsH"),h=n(/*! ./env */"m3rI"),d=function(){Object(c.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在生成文件,请稍后..."}})},f=function(){Object(c.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},p=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(),e.next=3,Object(l.s)(Object(i.a)({},t));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,Object(u.u)("",Object(u.U)({url:h.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/export_couser_info.json"),query:t}));case 7:f();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.q)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_member_act_score")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_member_act_score")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.t)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_score")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_score")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.r)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.y)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.u)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_homework")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_homework")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=Object(a.a)(s.a.mark((function e(t,n){var a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.w)(Object(i.a)({},t));case 2:0===(a=e.sent).status?(r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/").concat(n))):-3===a.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/").concat(n)));case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),w=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(),e.next=3,Object(l.z)(Object(i.a)({},t));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,Object(u.u)("",Object(u.U)({url:h.a.API_SERVER+"/api/polls/".concat(t.categoryId,"/commit_result.xlsx"),query:t}));case 7:f();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),C=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/attendances/export_xlsx_data.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/video_study_statics.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/export_course_students_info.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/item_banks/export.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/competitions/region_reports.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.x)(Object(i.a)({},t));case 2:0===(n=e.sent).status?(r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/exercise_score"))):-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/exercise_score")));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("----------","调用下载"),e.next=3,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/export_records/".concat(t.id,".xlsx"),query:t}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),L=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/ec_years/".concat(null==t?void 0:t.ec_year_id,"/ec_training_objectives.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/ec_years/".concat(null==t?void 0:t.ec_year_id,"/ec_graduation_requirements.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},n6Qo: +/*!**************************************************************!*\ + !*** ./node_modules/rc-table/es/Footer/index.js + 2 modules ***! + \**************************************************************/ +/*! exports provided: default, FooterComponents */ +/*! exports used: FooterComponents, default */ +/*! 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/context/TableContext.js because of ./node_modules/antd/es/table/Table.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 o}));var r=n("q1tI"),i=n("biw7"),a=n("fyJ8");t.b=function(e){var t=e.children,n=r.useContext(i.a).prefixCls;return r.createElement("tfoot",{className:"".concat(n,"-summary")},t)};var o={Cell:function(e){var t=e.className,n=e.index,o=e.children,s=e.colSpan,l=e.rowSpan,c=r.useContext(i.a),u=c.prefixCls,h=c.fixedInfoList[n];return r.createElement(a.a,Object.assign({className:t,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,render:function(){return{children:o,props:{colSpan:s,rowSpan:l}}}},h))},Row:function(e){return r.createElement("tr",Object.assign({},e))}}},oOBs: +/*!******************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/ShixunHomeworks/components/TrfList/index.less?modules ***! + \******************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={leftdiv:"leftdiv___1FhsT",listClass:"listClass___1Y2ac",spantitle:"spantitle___1pL39",rightdiv:"rightdiv___3ZICD"}},ogmK: +/*!*********************************************************!*\ + !*** ./node_modules/rc-picker/es/index.js + 42 modules ***! + \*********************************************************/ +/*! exports provided: PickerPanel, RangePicker, default */ +/*! exports used: RangePicker, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.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 */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */ +/*! 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/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return ze}));var r=n("1OyB"),i=n("vuIU"),a=n("Ji7U"),o=n("LK+K"),s=n("rePB"),l=n("VTBJ"),c=n("ODXe"),u=n("q1tI"),h=n("TSYQ"),d=n.n(h),f=n("Kwbf"),p=n("6cGi"),m=n("U8pU"),g=n("4IlW"),v=u.createContext({}),y={visibility:"hidden"};var b=function(e){var t=e.prefixCls,n=e.prevIcon,r=void 0===n?"‹":n,i=e.nextIcon,a=void 0===i?"›":i,o=e.superPrevIcon,s=void 0===o?"«":o,l=e.superNextIcon,c=void 0===l?"»":l,h=e.onSuperPrev,d=e.onSuperNext,f=e.onPrev,p=e.onNext,m=e.children,g=u.useContext(v),b=g.hideNextBtn,x=g.hidePrevBtn;return u.createElement("div",{className:t},h&&u.createElement("button",{type:"button",onClick:h,tabIndex:-1,className:"".concat(t,"-super-prev-btn"),style:x?y:{}},s),f&&u.createElement("button",{type:"button",onClick:f,tabIndex:-1,className:"".concat(t,"-prev-btn"),style:x?y:{}},r),u.createElement("div",{className:"".concat(t,"-view")},m),p&&u.createElement("button",{type:"button",onClick:p,tabIndex:-1,className:"".concat(t,"-next-btn"),style:b?y:{}},a),d&&u.createElement("button",{type:"button",onClick:d,tabIndex:-1,className:"".concat(t,"-super-next-btn"),style:b?y:{}},c))};var x=function(e){if(u.useContext(v).hideHeader)return null;var t=e.prefixCls,n=e.generateConfig,r=e.locale,i=e.value,a=e.format,o="".concat(t,"-header");return u.createElement(b,{prefixCls:o},i?n.locale.format(r.locale,i,a):" ")},w=n("YrtM"),C=n("KQm4"),E=new Map;function k(e,t,n){if(E.get(e)&&cancelAnimationFrame(E.get(e)),n<=0)E.set(e,requestAnimationFrame((function(){e.scrollTop=t})));else{var r=(t-e.scrollTop)/n*10;E.set(e,requestAnimationFrame((function(){e.scrollTop+=r,e.scrollTop!==t&&k(e,t,n-10)})))}}function S(e,t){var n=t.onLeftRight,r=t.onCtrlLeftRight,i=t.onUpDown,a=t.onPageUpDown,o=t.onEnter,s=e.which,l=e.ctrlKey,c=e.metaKey;switch(s){case g.a.LEFT:if(l||c){if(r)return r(-1),!0}else if(n)return n(-1),!0;break;case g.a.RIGHT:if(l||c){if(r)return r(1),!0}else if(n)return n(1),!0;break;case g.a.UP:if(i)return i(-1),!0;break;case g.a.DOWN:if(i)return i(1),!0;break;case g.a.PAGE_UP:if(a)return a(-1),!0;break;case g.a.PAGE_DOWN:if(a)return a(1),!0;break;case g.a.ENTER:if(o)return o(),!0}return!1}function O(e,t,n,r){var i=e;if(!i)switch(t){case"time":i=r?"hh:mm:ss a":"HH:mm:ss";break;case"week":i="gggg-wo";break;case"month":i="YYYY-MM";break;case"quarter":i="YYYY-[Q]Q";break;case"year":i="YYYY";break;default:i=n?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return i}function T(e,t){var n="time"===e?8:10;return Math.max(n,t.length)+2}var _=null,A=new Set;var L={year:function(e){return"month"===e||"date"===e?"year":e},month:function(e){return"date"===e?"month":e},quarter:function(e){return"month"===e||"date"===e?"quarter":e},week:function(e){return"date"===e?"week":e},time:null,date:null};function D(e,t){return e.some((function(e){return e&&e.contains(t)}))}var R=function(e){var t=e.prefixCls,n=e.units,r=e.onSelect,i=e.value,a=e.active,o=e.hideDisabledOptions,l="".concat(t,"-cell"),c=u.useContext(v).open,h=u.useRef(null),f=u.useRef(new Map);return u.useLayoutEffect((function(){var e=f.current.get(i);e&&!1!==c&&k(h.current,e.offsetTop,120)}),[i]),u.useLayoutEffect((function(){if(c){var e=f.current.get(i);e&&k(h.current,e.offsetTop,0)}}),[c]),u.createElement("ul",{className:d()("".concat(t,"-column"),Object(s.a)({},"".concat(t,"-column-active"),a)),ref:h,style:{position:"relative"}},n.map((function(e){var t;return o&&e.disabled?null:u.createElement("li",{key:e.value,ref:function(t){f.current.set(e.value,t)},className:d()(l,(t={},Object(s.a)(t,"".concat(l,"-disabled"),e.disabled),Object(s.a)(t,"".concat(l,"-selected"),i===e.value),t)),onClick:function(){e.disabled||r(e.value)}},u.createElement("div",{className:"".concat(l,"-inner")},e.label))})))};function M(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0",r=String(e);r.length=12,A%=12);var P=u.useMemo((function(){if(!f)return[!1,!1];var e=[!0,!0];return N.forEach((function(t){var n=t.disabled,r=t.value;n||(r>=12?e[1]=!1:e[0]=!1)})),e}),[f,N]),U=Object(c.a)(P,2),z=U[0],V=U[1],W=u.useMemo((function(){return f?N.filter(t?function(e){return e.value>=12}:function(e){return e.value<12}).map((function(e){var t=e.value%12,n=0===t?"12":M(t,2);return Object(l.a)(Object(l.a)({},e),{},{label:n,value:t})})):N}),[f,N]),G=H(0,59,v,C&&C(A)),K=H(0,59,b,E&&E(A,L));function Y(e,t,n,r,i){!1!==e&&O.push({node:u.cloneElement(t,{prefixCls:_,value:n,active:a===O.length,onSelect:i,units:r,hideDisabledOptions:k}),onSelect:i,value:n,units:r})}i.current={onUpDown:function(e){var t=O[a];if(t)for(var n=t.units.findIndex((function(e){return e.value===t.value})),r=t.units.length,i=1;i3&&void 0!==arguments[3]?arguments[3]:1;switch(t){case"year":return n.addYear(e,10*r);case"quarter":case"month":return n.addYear(e,r);default:return n.addMonth(e,r)}}var Q=u.createContext({});function ee(e){var t=e.cellPrefixCls,n=e.generateConfig,r=e.rangedValue,i=e.hoverRangedValue,a=e.isInView,o=e.isSameCell,l=e.offsetCell,c=e.today,u=e.value;return function(e){var h,d=l(e,-1),f=l(e,1),p=N(r,0),m=N(r,1),g=N(i,0),v=N(i,1),y=J(n,g,v,e);function b(e){return o(p,e)}function x(e){return o(m,e)}var w=o(g,e),C=o(v,e),E=(y||C)&&(!a(d)||x(d)),k=(y||w)&&(!a(f)||b(f));return h={},Object(s.a)(h,"".concat(t,"-in-view"),a(e)),Object(s.a)(h,"".concat(t,"-in-range"),J(n,p,m,e)),Object(s.a)(h,"".concat(t,"-range-start"),b(e)),Object(s.a)(h,"".concat(t,"-range-end"),x(e)),Object(s.a)(h,"".concat(t,"-range-start-single"),b(e)&&!m),Object(s.a)(h,"".concat(t,"-range-end-single"),x(e)&&!p),Object(s.a)(h,"".concat(t,"-range-start-near-hover"),b(e)&&(o(d,g)||J(n,g,v,d))),Object(s.a)(h,"".concat(t,"-range-end-near-hover"),x(e)&&(o(f,v)||J(n,g,v,f))),Object(s.a)(h,"".concat(t,"-range-hover"),y),Object(s.a)(h,"".concat(t,"-range-hover-start"),w),Object(s.a)(h,"".concat(t,"-range-hover-end"),C),Object(s.a)(h,"".concat(t,"-range-hover-edge-start"),E),Object(s.a)(h,"".concat(t,"-range-hover-edge-end"),k),Object(s.a)(h,"".concat(t,"-range-hover-edge-start-near-range"),E&&o(d,m)),Object(s.a)(h,"".concat(t,"-range-hover-edge-end-near-range"),k&&o(f,p)),Object(s.a)(h,"".concat(t,"-today"),o(c,e)),Object(s.a)(h,"".concat(t,"-selected"),o(u,e)),h}}function te(e){for(var t=e.prefixCls,n=e.disabledDate,r=e.onSelect,i=e.rowNum,a=e.colNum,o=e.prefixColumn,c=e.rowClassName,h=e.baseDate,f=e.getCellClassName,p=e.getCellText,m=e.getCellNode,g=e.getCellDate,y=e.titleCell,b=e.headerCells,x=u.useContext(v),w=x.onDateMouseEnter,C=x.onDateMouseLeave,E="".concat(t,"-cell"),k=[],S=0;S1&&(o=t.addDate(o,-7)),o}(i.locale,n,o),p="".concat(t,"-cell"),m=n.locale.getWeekFirstDay(i.locale),g=n.getNow(),v=[],y=i.shortWeekDays||(n.locale.getShortWeekDays?n.locale.getShortWeekDays(i.locale):[]);r&&v.push(u.createElement("th",{key:"empty","aria-label":"empty cell"}));for(var b=0;b<7;b+=1)v.push(u.createElement("th",{key:b},y[(b+m)%7]));var x=ee({cellPrefixCls:p,today:g,value:s,generateConfig:n,rangedValue:r?null:h,hoverRangedValue:r?null:d,isSameCell:function(e,t){return q(n,e,t)},isInView:function(e){return Y(n,e,o)},offsetCell:function(e,t){return n.addDate(e,t)}}),w=l?function(e){return l(e,g)}:void 0;return u.createElement(te,Object.assign({},e,{rowNum:a,colNum:7,baseDate:f,getCellNode:w,getCellText:n.getDate,getCellClassName:x,getCellDate:n.addDate,titleCell:function(e){return n.locale.format(i.locale,e,"YYYY-MM-DD")},headerCells:v}))};var re=function(e){var t=e.prefixCls,n=e.generateConfig,r=e.locale,i=e.viewDate,a=e.onNextMonth,o=e.onPrevMonth,s=e.onNextYear,l=e.onPrevYear,c=e.onYearClick,h=e.onMonthClick;if(u.useContext(v).hideHeader)return null;var d="".concat(t,"-header"),f=r.shortMonths||(n.locale.getShortMonths?n.locale.getShortMonths(r.locale):[]),p=n.getMonth(i),m=u.createElement("button",{type:"button",key:"year",onClick:c,tabIndex:-1,className:"".concat(t,"-year-btn")},n.locale.format(r.locale,i,r.yearFormat)),g=u.createElement("button",{type:"button",key:"month",onClick:h,tabIndex:-1,className:"".concat(t,"-month-btn")},r.monthFormat?n.locale.format(r.locale,i,r.monthFormat):f[p]),y=r.monthBeforeYear?[g,m]:[m,g];return u.createElement(b,Object.assign({},e,{prefixCls:d,onSuperPrev:l,onPrev:o,onNext:a,onSuperNext:s}),y)};var ie=function(e){var t=e.prefixCls,n=e.panelName,r=void 0===n?"date":n,i=e.keyboardConfig,a=e.active,o=e.operationRef,c=e.generateConfig,h=e.value,f=e.viewDate,p=e.onViewDateChange,m=e.onPanelChange,g=e.onSelect,v="".concat(t,"-").concat(r,"-panel");o.current={onKeyDown:function(e){return S(e,Object(l.a)({onLeftRight:function(e){g(c.addDate(h||f,e),"key")},onCtrlLeftRight:function(e){g(c.addYear(h||f,e),"key")},onUpDown:function(e){g(c.addDate(h||f,7*e),"key")},onPageUpDown:function(e){g(c.addMonth(h||f,e),"key")}},i))}};var y=function(e){var t=c.addYear(f,e);p(t),m(null,t)},b=function(e){var t=c.addMonth(f,e);p(t),m(null,t)};return u.createElement("div",{className:d()(v,Object(s.a)({},"".concat(v,"-active"),a))},u.createElement(re,Object.assign({},e,{prefixCls:t,value:h,viewDate:f,onPrevYear:function(){y(-1)},onNextYear:function(){y(1)},onPrevMonth:function(){b(-1)},onNextMonth:function(){b(1)},onMonthClick:function(){m("month",f)},onYearClick:function(){m("year",f)}})),u.createElement(ne,Object.assign({},e,{onSelect:function(e){return g(e,"mouse")},prefixCls:t,value:h,viewDate:f,rowCount:6})))};var ae=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]&&arguments[2];(Ne===S||n)&&(Te(e),I&&I(e),le&&le(e,t),j&&!$(h,e,Oe)&&j(e))},We=function(e){return be.current&&be.current.onKeyDown?([g.a.LEFT,g.a.RIGHT,g.a.UP,g.a.DOWN,g.a.PAGE_UP,g.a.PAGE_DOWN,g.a.ENTER].includes(e.which)&&e.preventDefault(),be.current.onKeyDown(e)):(Object(f.a)(!1,"Panel not correct handle keyDown event. Please help to fire issue about this."),!1)};re&&"right"!==me&&(re.current={onKeyDown:We,onClose:function(){be.current&&be.current.onClose&&be.current.onClose()}}),u.useEffect((function(){y&&!xe.current&&De(y)}),[y]),u.useEffect((function(){xe.current=!1}),[]);var Ge,Ke,Ye,qe=Object(l.a)(Object(l.a)({},e),{},{operationRef:be,prefixCls:r,viewDate:Le,value:Oe,onViewDateChange:Re,sourceMode:Ue,onPanelChange:function(e,t){var n=Me(e||Ne);ze(Ne),Pe(n),N&&(Ne!==n||$(h,Le,Le))&&N(t,n)},disabledDate:"decade"!==Ne?C:void 0});switch(delete qe.onChange,delete qe.onSelect,Ne){case"decade":Fe=u.createElement(Ce,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}}));break;case"year":Fe=u.createElement(ve,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}}));break;case"month":Fe=u.createElement(ue,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}}));break;case"quarter":Fe=u.createElement(fe,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}}));break;case"week":Fe=u.createElement(se,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}}));break;case"time":delete qe.showTime,Fe=u.createElement(z,Object.assign({},qe,"object"===Object(m.a)(A)?A:null,{onSelect:function(e,t){Re(e),Ve(e,t)}}));break;default:Fe=A?u.createElement(oe,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}})):u.createElement(ie,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}}))}if(ce||(Ge=Ee(r,Ne,R),Ke=ke({prefixCls:r,components:U,needConfirmButton:J,okDisabled:!Oe||C&&C(Oe),locale:o,showNow:_,onNow:J&&function(){var e=h.getNow(),t=function(e,t,n,r,i,a){var o=Math.floor(e/r)*r;if(o1&&void 0!==arguments[1]&&arguments[1];cancelAnimationFrame(h.current),t?l(e):h.current=requestAnimationFrame((function(){l(e)}))}var f=Me(s,{formatList:n,generateConfig:r,locale:i}),p=Object(c.a)(f,2)[1];function m(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d(null,e)}return Object(u.useEffect)((function(){m(!0)}),[e]),Object(u.useEffect)((function(){return function(){return cancelAnimationFrame(h.current)}}),[]),[p,function(e){d(e)},m]}function je(e){var t,n=e.prefixCls,r=void 0===n?"rc-picker":n,i=e.id,a=e.tabIndex,o=e.style,h=e.className,m=e.dropdownClassName,g=e.dropdownAlign,y=e.popupStyle,b=e.transitionName,x=e.generateConfig,w=e.locale,C=e.inputReadOnly,E=e.allowClear,k=e.autoFocus,S=e.showTime,_=e.picker,A=void 0===_?"date":_,L=e.format,R=e.use12Hours,M=e.value,N=e.defaultValue,P=e.open,F=e.defaultOpen,B=e.defaultOpenValue,H=e.suffixIcon,U=e.clearIcon,z=e.disabled,V=e.disabledDate,W=e.placeholder,G=e.getPopupContainer,K=e.pickerRef,Y=e.panelRender,q=e.onChange,X=e.onOpenChange,J=e.onFocus,Z=e.onBlur,Q=e.onMouseDown,ee=e.onMouseUp,te=e.onMouseEnter,ne=e.onMouseLeave,re=e.onContextMenu,ie=e.onClick,ae=e.direction,oe=e.autoComplete,se=void 0===oe?"off":oe,le=u.useRef(null),ce="date"===A&&!!S||"time"===A,ue=I(O(L,A,S,R)),he=u.useRef(null),de=u.useRef(null),fe=Object(p.a)(null,{value:M,defaultValue:N}),pe=Object(c.a)(fe,2),me=pe[0],ge=pe[1],ve=u.useState(me),ye=Object(c.a)(ve,2),be=ye[0],xe=ye[1],we=u.useRef(null),Ce=Object(p.a)(!1,{value:P,defaultValue:F,postState:function(e){return!z&&e},onChange:function(e){X&&X(e),!e&&we.current&&we.current.onClose&&we.current.onClose()}}),Ee=Object(c.a)(Ce,2),ke=Ee[0],Oe=Ee[1],Te=Me(be,{formatList:ue,generateConfig:x,locale:w}),De=Object(c.a)(Te,2),Re=De[0],je=De[1],Ne=Le({valueTexts:Re,onTextChange:function(e){var t=x.locale.parse(w.locale,e,ue);!t||V&&V(t)||xe(t)}}),Pe=Object(c.a)(Ne,3),Fe=Pe[0],Be=Pe[1],He=Pe[2],Ue=function(e){xe(e),ge(e),q&&!$(x,me,e)&&q(e,e?x.locale.format(w.locale,e,ue[0]):"")},ze=function(e){z&&e||Oe(e)},Ve=Ae({blurToCancel:ce,open:ke,value:Fe,triggerOpen:ze,forwardKeyDown:function(e){return ke&&we.current&&we.current.onKeyDown?we.current.onKeyDown(e):(Object(f.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},isClickOutside:function(e){return!D([he.current,de.current],e)},onSubmit:function(){return(!V||!V(be))&&(Ue(be),ze(!1),He(),!0)},onCancel:function(){ze(!1),xe(me),He()},onFocus:J,onBlur:Z}),We=Object(c.a)(Ve,2),Ge=We[0],Ke=We[1],Ye=Ke.focused,qe=Ke.typing;u.useEffect((function(){ke||(xe(me),Re.length&&""!==Re[0]?je!==Fe&&He():Be(""))}),[ke,Re]),u.useEffect((function(){ke||He()}),[A]),u.useEffect((function(){xe(me)}),[me]),K&&(K.current={focus:function(){le.current&&le.current.focus()},blur:function(){le.current&&le.current.blur()}});var Xe=Object(l.a)(Object(l.a)({},e),{},{className:void 0,style:void 0,pickerValue:void 0,onPickerValueChange:void 0}),$e=u.createElement(Se,Object.assign({},Xe,{generateConfig:x,className:d()(Object(s.a)({},"".concat(r,"-panel-focused"),!qe)),value:be,locale:w,tabIndex:-1,onChange:xe,direction:ae}));Y&&($e=Y($e));var Je,Ze,Qe=u.createElement("div",{className:"".concat(r,"-panel-container"),onMouseDown:function(e){e.preventDefault()}},$e);H&&(Je=u.createElement("span",{className:"".concat(r,"-suffix")},H)),E&&me&&!z&&(Ze=u.createElement("span",{onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},onMouseUp:function(e){e.preventDefault(),e.stopPropagation(),Ue(null),ze(!1)},className:"".concat(r,"-clear")},U||u.createElement("span",{className:"".concat(r,"-clear-btn")})));var et="rtl"===ae?"bottomRight":"bottomLeft",tt=Ie(Fe,{formatList:ue,generateConfig:x,locale:w}),nt=Object(c.a)(tt,3),rt=nt[0],it=nt[1],at=nt[2];return u.createElement(v.Provider,{value:{operationRef:we,hideHeader:"time"===A,panelRef:he,onSelect:function(e,t){("submit"===t||"key"!==t&&!ce)&&(Ue(e),ze(!1))},open:ke,defaultOpenValue:B,onDateMouseEnter:it,onDateMouseLeave:at}},u.createElement(_e,{visible:ke,popupElement:Qe,popupStyle:y,prefixCls:r,dropdownClassName:m,dropdownAlign:g,getPopupContainer:G,transitionName:b,popupPlacement:et,direction:ae},u.createElement("div",{className:d()(r,h,(t={},Object(s.a)(t,"".concat(r,"-disabled"),z),Object(s.a)(t,"".concat(r,"-focused"),Ye),Object(s.a)(t,"".concat(r,"-rtl"),"rtl"===ae),t)),style:o,onMouseDown:Q,onMouseUp:function(){ee&&ee.apply(void 0,arguments),le.current&&(le.current.focus(),ze(!0))},onMouseEnter:te,onMouseLeave:ne,onContextMenu:re,onClick:ie},u.createElement("div",{className:d()("".concat(r,"-input"),Object(s.a)({},"".concat(r,"-input-placeholder"),!!rt)),ref:de},u.createElement("input",Object.assign({id:i,tabIndex:a,disabled:z,readOnly:C||!qe,value:rt||Fe,onChange:function(e){Be(e.target.value)},autoFocus:k,placeholder:W,ref:le,title:Fe},Ge,{size:T(A,ue[0])},j(e),{autoComplete:se})),Je,Ze))))}var Ne=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).pickerRef=u.createRef(),e.focus=function(){e.pickerRef.current&&e.pickerRef.current.focus()},e.blur=function(){e.pickerRef.current&&e.pickerRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return u.createElement(je,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),n}(u.Component);function Pe(e,t,n,r){var i=Z(e,n,r,1);function a(n){return n(e,t)?"same":n(i,t)?"closing":"far"}switch(n){case"year":return a((function(e,t){return function(e,t,n){var r=V(t,n);return"boolean"==typeof r?r:Math.floor(e.getYear(t)/10)===Math.floor(e.getYear(n)/10)}(r,e,t)}));case"quarter":case"month":return a((function(e,t){return W(r,e,t)}));default:return a((function(e,t){return Y(r,e,t)}))}}function Fe(e){var t=e.values,n=e.picker,r=e.defaultDates,i=e.generateConfig,a=u.useState((function(){return[N(r,0),N(r,1)]})),o=Object(c.a)(a,2),s=o[0],l=o[1],h=u.useState(null),d=Object(c.a)(h,2),f=d[0],p=d[1],m=N(t,0),g=N(t,1);return[function(e){return s[e]?s[e]:N(f,e)||function(e,t,n,r){var i=N(e,0),a=N(e,1);if(0===t)return i;if(i&&a)switch(Pe(i,a,n,r)){case"same":case"closing":return i;default:return Z(a,n,r,-1)}return i}(t,e,n,i)||m||g||i.getNow()},function(e,n){if(e){var r=P(f,e,n);l(P(s,null,n)||[null,null]);var i=(n+1)%2;N(t,i)||(r=P(r,e,i)),p(r)}else(m||g)&&p(null)}]}function Be(e,t){return e&&e[0]&&e[1]&&t.isAfter(e[0],e[1])?[e[1],e[0]]:e}function He(e,t,n,r){return!!e||(!(!r||!r[t])||!!n[(t+1)%2])}function Ue(e){var t,n,r,i=e.prefixCls,a=void 0===i?"rc-picker":i,o=e.id,h=e.style,g=e.className,y=e.popupStyle,b=e.dropdownClassName,x=e.transitionName,w=e.dropdownAlign,C=e.getPopupContainer,E=e.generateConfig,k=e.locale,S=e.placeholder,_=e.autoFocus,A=e.disabled,L=e.format,R=e.picker,M=void 0===R?"date":R,F=e.showTime,B=e.use12Hours,H=e.separator,U=void 0===H?"~":H,z=e.value,V=e.defaultValue,W=e.defaultPickerValue,Y=e.open,J=e.defaultOpen,ee=e.disabledDate,te=e.disabledTime,ne=e.dateRender,re=e.panelRender,ie=e.ranges,ae=e.allowEmpty,oe=e.allowClear,se=e.suffixIcon,le=e.clearIcon,ce=e.pickerRef,ue=e.inputReadOnly,he=e.mode,de=e.renderExtraFooter,fe=e.onChange,pe=e.onOpenChange,me=e.onPanelChange,ge=e.onCalendarChange,ve=e.onFocus,ye=e.onBlur,be=e.onOk,xe=e.components,we=e.order,Ce=e.direction,Oe=e.activePickerIndex,Te=e.autoComplete,De=void 0===Te?"off":Te,Re="date"===M&&!!F||"time"===M,je=Object(u.useRef)({}),Ne=Object(u.useRef)(null),Pe=Object(u.useRef)(null),Ue=Object(u.useRef)(null),ze=Object(u.useRef)(null),Ve=Object(u.useRef)(null),We=Object(u.useRef)(null),Ge=Object(u.useRef)(null),Ke=I(O(L,M,F,B)),Ye=Object(p.a)(0,{value:Oe}),qe=Object(c.a)(Ye,2),Xe=qe[0],$e=qe[1],Je=Object(u.useRef)(null),Ze=u.useMemo((function(){return Array.isArray(A)?A:[A||!1,A||!1]}),[A]),Qe=Object(p.a)(null,{value:z,defaultValue:V,postState:function(e){return"time"!==M||we?Be(e,E):e}}),et=Object(c.a)(Qe,2),tt=et[0],nt=et[1],rt=Fe({values:tt,picker:M,defaultDates:W,generateConfig:E}),it=Object(c.a)(rt,2),at=it[0],ot=it[1],st=Object(p.a)(tt,{postState:function(e){var t=e;if(Ze[0]&&Ze[1])return t;for(var n=0;n<2;n+=1)!Ze[n]||N(t,n)||N(ae,n)||(t=P(t,E.getNow(),n));return t}}),lt=Object(c.a)(st,2),ct=lt[0],ut=lt[1],ht=Object(p.a)([M,M],{value:he}),dt=Object(c.a)(ht,2),ft=dt[0],pt=dt[1];Object(u.useEffect)((function(){pt([M,M])}),[M]);var mt=function(e,t){pt(e),me&&me(t,e)},gt=function(e,t,n){var r=e.picker,i=e.locale,a=e.selectedValue,o=e.disabledDate,s=e.disabled,l=e.generateConfig,c=N(a,0),h=N(a,1);function d(e){return 100*l.getYear(e)+l.locale.getWeek(i.locale,e)}function f(e){return 100*l.getYear(e)+l.getMonth(e)}function p(e){return 10*l.getYear(e)+G(l,e)}return[u.useCallback((function(e){if(o&&o(e))return!0;if(s[1]&&h)return!q(l,e,h)&&l.isAfter(e,h);if(t&&h)switch(r){case"quarter":return p(e)>p(h);case"month":return f(e)>f(h);case"week":return d(e)>d(h);default:return!q(l,e,h)&&l.isAfter(e,h)}return!1}),[o,s[1],h,t]),u.useCallback((function(e){if(o&&o(e))return!0;if(s[0]&&c)return!q(l,e,h)&&l.isAfter(c,e);if(n&&c)switch(r){case"quarter":return p(e)0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;Ct&&ln&&ln[0]&&ln[1]&&E.isAfter(ln[1],ln[0])&&(r=ln);var i=F;if(F&&"object"===Object(m.a)(F)&&F.defaultValue){var o=F.defaultValue;i=Object(l.a)(Object(l.a)({},F),{},{defaultValue:N(o,Xe)||void 0})}var c=null;return ne&&(c=function(e,t){return ne(e,t,{range:Xe?"end":"start"})}),u.createElement(Q.Provider,{value:{inRange:!0,panelPosition:t,rangedValue:rn||ct,hoverRangedValue:r}},u.createElement(Se,Object.assign({},e,n,{dateRender:c,showTime:i,mode:ft[Xe],generateConfig:E,style:void 0,direction:Ce,disabledDate:0===Xe?yt:bt,disabledTime:function(e){return!!te&&te(e,0===Xe?"start":"end")},className:d()(Object(s.a)({},"".concat(a,"-panel-focused"),0===Xe?!On:!Rn)),value:N(ct,Xe),locale:k,tabIndex:-1,onPanelChange:function(e,n){mt(P(ft,n,Xe),P(ct,e,Xe));var r=e;"right"===t&&ft[Xe]===n&&(r=Z(r,n,E,-1)),ot(r,Xe)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:void 0,defaultPickerValue:void 0})))}var Pn=0,Fn=0;Xe&&Ue.current&&Ve.current&&Pe.current&&(Pn=Ue.current.offsetWidth+Ve.current.offsetWidth,Pe.current.offsetWidth&&Pn>Pe.current.offsetWidth&&(Fn=Pn));var Bn="rtl"===Ce?{right:Pn}:{left:Pn};var Hn,Un,zn=u.createElement("div",{className:d()("".concat(a,"-range-wrapper"),"".concat(a,"-").concat(M,"-range-wrapper")),style:{minWidth:_t}},u.createElement("div",{className:"".concat(a,"-range-arrow"),style:Bn}),function(){var e,t=Ee(a,ft[Xe],de),n=ke({prefixCls:a,components:xe,needConfirmButton:Re,okDisabled:!N(ct,Xe)||ee&&ee(ct[Xe]),locale:k,rangeList:jn,onOk:function(){N(ct,Xe)&&(Mt(ct,Xe),be&&be(ct))}});if("time"===M||F)e=Nn();else{var r=at(Xe),i=Z(r,M,E),o=ft[Xe]===M,s=Nn(!!o&&"left",{pickerValue:r,onPickerValueChange:function(e){ot(e,Xe)}}),l=Nn("right",{pickerValue:i,onPickerValueChange:function(e){ot(Z(e,M,E,-1),Xe)}});e="rtl"===Ce?u.createElement(u.Fragment,null,l,o&&s):u.createElement(u.Fragment,null,s,o&&l)}var c=u.createElement(u.Fragment,null,u.createElement("div",{className:"".concat(a,"-panels")},e),(t||n)&&u.createElement("div",{className:"".concat(a,"-footer")},t,n));return re&&(c=re(c)),u.createElement("div",{className:"".concat(a,"-panel-container"),style:{marginLeft:Fn},ref:Pe,onMouseDown:function(e){e.preventDefault()}},c)}());se&&(Hn=u.createElement("span",{className:"".concat(a,"-suffix")},se)),oe&&(N(tt,0)&&!Ze[0]||N(tt,1)&&!Ze[1])&&(Un=u.createElement("span",{onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},onMouseUp:function(e){e.preventDefault(),e.stopPropagation();var t=tt;Ze[0]||(t=P(t,null,0)),Ze[1]||(t=P(t,null,1)),Mt(t,null),Dt(!1,Xe)},className:"".concat(a,"-clear")},le||u.createElement("span",{className:"".concat(a,"-clear-btn")})));var Vn={size:T(M,Ke[0])},Wn=0,Gn=0;Ue.current&&ze.current&&Ve.current&&(0===Xe?Gn=Ue.current.offsetWidth:(Wn=Pn,Gn=ze.current.offsetWidth));var Kn="rtl"===Ce?{right:Wn}:{left:Wn};return u.createElement(v.Provider,{value:{operationRef:Je,hideHeader:"time"===M,onDateMouseEnter:function(e){cn(P(ct,e,Xe)),0===Xe?fn(e):yn(e)},onDateMouseLeave:function(){cn(P(ct,null,Xe)),0===Xe?pn():bn()},hideRanges:!0,onSelect:function(e,t){var n=P(ct,e,Xe);"submit"===t||"key"!==t&&!Re?(Mt(n,Xe),0===Xe?pn():bn()):ut(n)},open:Ct}},u.createElement(_e,{visible:Ct,popupElement:zn,popupStyle:y,prefixCls:a,dropdownClassName:b,dropdownAlign:w,getPopupContainer:C,transitionName:x,range:!0,direction:Ce},u.createElement("div",Object.assign({ref:Ne,className:d()(a,"".concat(a,"-range"),g,(t={},Object(s.a)(t,"".concat(a,"-disabled"),Ze[0]&&Ze[1]),Object(s.a)(t,"".concat(a,"-focused"),0===Xe?Sn:Dn),Object(s.a)(t,"".concat(a,"-rtl"),"rtl"===Ce),t)),style:h,onClick:function(e){Ct||We.current.contains(e.target)||Ge.current.contains(e.target)||(Ze[0]?Ze[1]||Rt(1):Rt(0))},onMouseDown:function(e){!Ct||!Sn&&!Dn||We.current.contains(e.target)||Ge.current.contains(e.target)||e.preventDefault()}},j(e)),u.createElement("div",{className:d()("".concat(a,"-input"),(n={},Object(s.a)(n,"".concat(a,"-input-active"),0===Xe),Object(s.a)(n,"".concat(a,"-input-placeholder"),!!dn),n)),ref:Ue},u.createElement("input",Object.assign({id:o,disabled:Ze[0],readOnly:ue||!On,value:dn||Yt,onChange:function(e){qt(e.target.value)},autoFocus:_,placeholder:N(S,0)||"",ref:We},En,Vn,{autoComplete:De}))),u.createElement("div",{className:"".concat(a,"-range-separator"),ref:Ve},U),u.createElement("div",{className:d()("".concat(a,"-input"),(r={},Object(s.a)(r,"".concat(a,"-input-active"),1===Xe),Object(s.a)(r,"".concat(a,"-input-placeholder"),!!vn),r)),ref:ze},u.createElement("input",Object.assign({disabled:Ze[1],readOnly:ue||!Rn,value:vn||Zt,onChange:function(e){Qt(e.target.value)},placeholder:N(S,1)||"",ref:Ge},An,Vn,{autoComplete:De}))),u.createElement("div",{className:"".concat(a,"-active-bar"),style:Object(l.a)(Object(l.a)({},Kn),{},{width:Gn,position:"absolute"})}),Hn,Un)))}var ze=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).pickerRef=u.createRef(),e.focus=function(){e.pickerRef.current&&e.pickerRef.current.focus()},e.blur=function(){e.pickerRef.current&&e.pickerRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return u.createElement(Ue,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),n}(u.Component);t.b=Ne},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(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.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",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function a(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function o(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(o(e,t+1)){i.lastIndex=t,e.ch=t;var n=i.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function h(e){for(;;){i.lastIndex=e.ch;var t=i.exec(e.text);if(!t){if(s(e))continue;return}if(o(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function d(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function f(e,n){for(var r=[];;){var i,a=h(e),o=e.line,s=e.ch-(a?a[0].length:0);if(!a||!(i=c(e)))return;if("selfClose"!=i)if(a[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==a[2]){r.length=l;break}if(l<0&&(!n||n==a[2]))return{tag:a[2],from:t(o,s),to:t(e.line,e.ch)}}else r.push(a[2])}}function p(e,n){for(var r=[];;){var i=d(e);if(!i)return;if("selfClose"!=i){var a=e.line,o=e.ch,s=u(e);if(!s)return;if(s[1])r.push(s[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(a,o)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,r){for(var i=new a(e,r.line,0);;){var o=h(i);if(!o||i.line!=r.line)return;var s=c(i);if(!s)return;if(!o[1]&&"selfClose"!=s){var l=t(i.line,i.ch),u=f(i,o[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),e.findMatchingTag=function(e,r,i){var o=new a(e,r.line,r.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=c(o),l=s&&t(o.line,o.ch),h=s&&u(o);if(s&&h&&!(n(o,r)>0)){var d={from:t(o.line,o.ch),to:l,tag:h[2]};return"selfClose"==s?{open:d,close:null,at:"open"}:h[1]?{open:p(o,h[2]),close:d,at:"close"}:{open:d,close:f(o=new a(e,l.line,l.ch,i),h[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new a(e,t.line,t.ch,n);;){var o=p(i,r);if(!o)break;var s=f(new a(e,t.line,t.ch,n),o.tag);if(s)return{open:o,close:s}}},e.scanForClosingTag=function(e,t,n,r){return f(new a(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(/*! ../../lib/codemirror */"VrN/"))},p5ED: +/*!*********************************************!*\ + !*** ./src/components/PreviewAll/index.tsx ***! + \*********************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=(n(/*! antd/es/tooltip/style */"5Dmo"),n(/*! antd/es/tooltip */"3S7+")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=n.n(l),u=n(/*! react */"q1tI"),h=n.n(u),d=n(/*! ./index.less?modules */"vHTk"),f=n.n(d),p=n(/*! @ant-design/icons */"yEEn"),m=n(/*! @/components/monaco-editor */"ZW9T"),g=n(/*! @/utils/util */"1vsH"),v=n(/*! @/service/exercise */"V0Rq"),y=n(/*! @/utils/env */"m3rI");t.a=function(e){var t,n,l,d,b,x,w=e.editOffice,C=void 0===w?"view":w,E=(e.name,e.data),k=(e.theme,e.type),S=e.filename,O=e.monacoEditor,T=e.className,_=e.style,A=e.close,L=e.onClose,D=e.hasMask,R=e.disabledDownload,M=e.onImgDimensions,I=e.otherData,j=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),N=Object(s.a)(j,2),P=(N[0],N[1],Object(u.useState)("")),F=Object(s.a)(P,2),B=(F[0],F[1]),H=Object(u.useState)(),U=Object(s.a)(H,2),z=U[0],V=U[1],W="build"===window.ENV?"/react/build":"",G=location.host.startsWith("localhost")?y.a.PROXY_SERVER:y.a.API_SERVER,K=Object(u.useRef)();null!==(t=E)&&void 0!==t&&t.startsWith("/api")&&"txt"!==k&&(E=y.a.API_SERVER+E),"office"===k&&Object(g.P)(E).filesize>10485760&&(k="other"),S&&(O.filename=S),Object(u.useEffect)((function(){var e,t,n=null===(e=document.cookie)||void 0===e||null===(t=e.replace(/\s/g,""))||void 0===t?void 0:t.split(";");null==n||n.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&B(t[1])}))}),[]),Object(u.useEffect)((function(){"office"===k&&Y()}),[k,E]);var Y=function(){var e=Object(o.a)(c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",E),t=E,E.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,Object(v.U)({attachment_id:n});case 6:r=e.sent,V(r);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){E.startsWith("http")||E.startsWith("blob:")?X():Object(g.x)(S||"educoder",E,S)},X=function(){Object(g.v)(S||"educoder",decodeURIComponent(E))};return h.a.createElement("div",{style:Object(a.a)({},_||{}),className:"".concat(D&&f.a.bgBlack," ").concat(k?f.a.wrp:"hide")},A&&h.a.createElement("div",{className:f.a.close,ref:K},!!M&&h.a.createElement(i.a,{title:"点击对图片进行批注",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:function(){L(),M()}},h.a.createElement("i",{className:"icon-yulanpizhu"}))),!R&&h.a.createElement(i.a,{title:"点击下载此文件",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:X},h.a.createElement("i",{className:"icon-quxiaozhiding"}))),h.a.createElement(i.a,{title:"关闭",getPopupContainer:function(){return K.current}},h.a.createElement("span",{className:"",onClick:L},h.a.createElement("i",{className:"icon-guanbi1"})))),h.a.createElement("div",{className:"".concat(f.a[T]," ").concat(T," ").concat(f.a.monaco," ").concat("txt"===k?"show":"hide")},"txt"===k&&h.a.createElement(m.b,O)),"audio"===k&&h.a.createElement("audio",{src:"".concat((null===(n=E)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(l=E)||void 0===l?void 0:l.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(E),autoPlay:!0}),"video"===k&&h.a.createElement(h.a.Fragment,null,(null===(d=E)||void 0===d?void 0:d.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"===k&&z&&h.a.createElement("iframe",{src:"".concat(W,"/office.html?key=").concat(z.key,"&url=").concat(G+z.url,"&callbackUrl=").concat(G+z.callbackUrl,"&fileType=").concat(z.fileType,"&title=").concat(z.title,"&model=").concat(C,"&officeServer=").concat(y.a.OFFICE_SERVER,"&disabledDownload=").concat(!!R)}),("xlsx"===k||"doc"===k||"pptx"===k||"docx"===k)&&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=").concat(I.model)}),"html"===k&&h.a.createElement("iframe",{src:E+"&disposition=inline"}),"pdf"===k&&h.a.createElement("embed",{className:f.a.embed,src:E}),"image"===k&&h.a.createElement("img",{src:"".concat((null===(b=E)||void 0===b?void 0:b.indexOf("http://"))>-1||(null===(x=E)||void 0===x?void 0:x.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(E)}),"other"===k&&h.a.createElement("div",null,h.a.createElement(r.a,{type:"primary",size:"large",onClick:q},h.a.createElement(p.a,null),"点击下载")),"download"===k&&h.a.createElement(r.a,{type:"primary",size:"large",onClick:q},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(e,t,n){},"rAM+": +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***! + \*******************************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}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,s=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==n.return||n.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(e,t){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},s=e=>o[e];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(e){return e.replace(l,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const u=/(^|[^\[])\^/g;const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const f={},p=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(e,t){f[" "+e]||(p.test(e)?f[" "+e]=e+"/":f[" "+e]=y(e,"/",!0));const n=-1===(e=f[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(g,"$1")+t:e+t}function y(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i(r=(r=r.source||r).replace(u,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(c(n)).replace(h,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!d.test(n)&&(n=v(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:v,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length1)Object(h.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===t.length)return Object(h.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var n=t[0];if(l.isValidElement(n)&&Object(d.c)(n)){var r=n.ref;t[0]=l.cloneElement(n,{ref:Object(d.a)(r,this.setChildNode)})}return 1===t.length?t[0]:t.map((function(e,t){return!l.isValidElement(e)||"key"in e&&null!==e.key?e:l.cloneElement(e,{key:"".concat("rc-observer-key","-").concat(t)})}))}}]),n}(l.Component);p.displayName="ResizeObserver",t.a=p},uiYX: +/*!********************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/CommonHomework/components/AfterAppendix.tsx ***! + \********************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),i=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),c=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),u=n.n(c),h=n(/*! react */"q1tI"),d=n.n(h),f=n(/*! @/service/shixunHomeworks */"XYT7"),p=n(/*! umi */"Ty5D"),m=n(/*! umi */"9kvl"),g=n(/*! @/components/MultiUpload */"500L");t.a=Object(m.a)((function(e){return{classroomList:e.classroomList,loading:e.loading}}))((function(e){var t=e.classroomList,n=(e.loading,e.dispatch),c=(Object(p.i)(),s.a.useForm()),h=Object(l.a)(c,1)[0];return d.a.createElement(r.a,{centered:!0,title:"补交附件",visible:"补交附件"===t.actionTabs.key,bodyStyle:{minHeight:200},onOk:Object(o.a)(u.a.mark((function e(){var r,i,o;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.validateFields();case 2:return i=Object(a.a)({},h.getFieldValue()),o=t.actionTabs.selectArrs,i.attachment_ids=null===(r=i.attachment_ids)||void 0===r?void 0:r.map((function(e){return e.response.id})),e.next=7,Object(f.R)(Object(a.a)(Object(a.a)({},i),{},{homeworkId:o.work_id}));case 7:0===e.sent.status&&(h.resetFields(),n({type:"classroomList/setActionTabs",payload:{}}));case 9:case"end":return e.stop()}}),e)}))),onCancel:function(){h.resetFields(),n({type:"classroomList/setActionTabs",payload:{}})}},d.a.createElement(s.a,{form:h,initialValues:{}},d.a.createElement(s.a.Item,{name:"attachment_ids",rules:[{required:!0,message:"请上传附件"}]},d.a.createElement(g.b,null)),d.a.createElement(s.a.Item,{name:"description"},d.a.createElement(i.a.TextArea,{placeholder:"请在此输入补交附件的原因,最大限制100个字符",rows:7}))))}))},ulZh: +/*!*****************************************!*\ + !*** ./node_modules/hls.js/dist/hls.js ***! + \*****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;"undefined"!=typeof window&&(r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js": +/*!*********************************************!*\ + !*** ./node_modules/eventemitter3/index.js ***! + \*********************************************/ +/*! no static exports found */function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function a(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,r,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,r||e,a),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new a:delete e._events[t]}function c(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(i=!1)),c.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},c.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,o=new Array(a);r0}),!1)}e.exports=function(e,t){t=t||{};var i={main:n.m},s=t.all?{main:Object.keys(i.main)}:function(e,t){for(var n={main:[t]},r={main:[]},i={main:{}};o(n);)for(var s=Object.keys(n),l=0;l=2*h/f||b<=w)){var C,E=Number.POSITIVE_INFINITY;for(C=e.level-1;C>m&&!((E=h*p[C].maxBitrate/(6.4*y))=b)){var k=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.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: "+E.toFixed(3)+" s\n Time to underbuffer: "+w.toFixed(3)+" s"),n.nextLoadLevel=C,this.bwEstimator.sample(d,u.loaded),this.clearTimer(),e.loader&&(this.fragCurrent=this.partCurrent=null,e.loader.abort()),n.trigger(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:u})}}}}}},d.onFragLoaded=function(e,t){var n=t.frag,i=t.part;if(n.type===l.PlaylistLevelType.MAIN&&Object(r.isFiniteNumber)(n.sn)){var o=i?i.stats:n.stats,s=i?i.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[n.level],u=(c.loaded?c.loaded.bytes:0)+o.loaded,h=(c.loaded?c.loaded.duration:0)+s;c.loaded={bytes:u,duration:h},c.realBitrate=Math.round(8*u/h)}if(n.bitrateTest){var d={stats:o,frag:n,part:i,id:n.type};this.onFragBuffered(a.Events.FRAG_BUFFERED,d),n.bitrateTest=!1}}},d.onFragBuffered=function(e,t){var n=t.frag,r=t.part,i=r?r.stats:n.stats;if(!i.aborted&&n.type===l.PlaylistLevelType.MAIN&&"initSegment"!==n.sn){var a=i.parsing.end-i.loading.start;this.bwEstimator.sample(a,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},d.onError=function(e,t){switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},d.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},d.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,a=n.minAutoLevel,s=n.media,l=t?t.duration:e?e.duration:0,u=s?s.currentTime:0,h=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,f=(o.BufferHelper.bufferInfo(s,u,i.maxBufferHole).end-u)/h,p=this.findBestLevel(d,a,r,f,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var m=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(!f){var y=this.bitrateTestDelay;y&&(m=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*m)+" ms"),g=v=1)}return p=this.findBestLevel(d,a,r,f+m,g,v),Math.max(p,0)},d.findBestLevel=function(e,t,n,r,i,a){for(var o,s=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,m=l?l.duration:s?s.duration:0,g=n;g>=t;g--){var v=h[g];if(v&&(!p||v.codecSet===p)){var y=v.details,b=(l?null==y?void 0:y.partTarget:null==y?void 0:y.averagetargetduration)||m,x=void 0;x=g<=u?i*e:a*e;var w=h[g].maxBitrate,C=w*b/x;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(x)+"/"+w+"/"+b+"/"+r+"/"+C),x>w&&(!C||f&&!this.bitrateTestDelay||C0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=i.State.IDLE):(this.loadedmetadata=!1,this.state=i.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},w.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_TRACK:var t,n=this.levels,r=this.trackId,a=null==n||null===(t=n[r])||void 0===t?void 0:t.details;if(a){if(this.waitForCdnTuneIn(a))break;this.state=i.State.WAITING_INIT_PTS}break;case i.State.FRAG_LOADING_WAITING_RETRY:var s,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=i.State.IDLE);break;case i.State.WAITING_INIT_PTS:var u=this.waitingData;if(u){var h=u.frag,d=u.part,f=u.cache,m=u.complete;if(void 0!==this.initPTS[h.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.FRAG_LOADING;var g={frag:h,part:d,payload:f.flush(),networkDetails:null};this._handleFragmentLoadProgress(g),m&&e.prototype._handleFragmentLoadComplete.call(this,g)}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=i.State.IDLE}this.onTickEnd()},w.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.IDLE)},w.onTickEnd=function(){var e=this.media;if(e&&e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length&&(this.loadedmetadata=!0),this.lastCurrentTime=e.currentTime}},w.doTickIdle=function(){var e,t,n=this.hls,r=this.levels,o=this.media,s=this.trackId,l=n.config;if(r&&r[s]&&(o||!this.startFragRequested&&l.startFragPrefetch)){var h=r[s].details;if(!h||h.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(h))this.state=i.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(),m=this.audioSwitch;if(!(f>=p)||m){if(!m&&this._streamEnded(d,h))return n.trigger(a.Events.BUFFER_EOS,{type:"audio"}),void(this.state=i.State.ENDED);var g=h.fragments[0].start,v=d.end;if(m){var y=this.getLoadPosition();v=y,h.PTSKnown&&yg||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),o.currentTime=g+.05)}var b=this.getNextFragment(v,h);b?"identity"!==(null===(e=b.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=b.decryptdata)&&void 0!==t&&t.key?this.loadFragment(b,h,v):this.loadKey(b,h):this.bufferFlushed=!0}}}}},w.getMaxBufferLength=function(){var t=e.prototype.getMaxBufferLength.call(this),n=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===n?t:Math.max(t,n.len)},w.onMediaDetaching=function(){this.videoBuffer=null,e.prototype.onMediaDetaching.call(this)},w.onAudioTracksUpdated=function(e,t){var n=t.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(e){return new l.Level(e)}))},w.onAudioTrackSwitching=function(e,t){var n=!!t.url;this.trackId=t.id;var r=this.fragCurrent;null!=r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.audioSwitch=!0,this.state=i.State.IDLE):this.state=i.State.STOPPED,this.tick()},w.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},w.onLevelLoaded=function(e,t){this.mainDetails=t.details},w.onAudioTrackLoaded=function(e,t){var n,r=this.levels,a=t.details,o=t.id;if(r){this.log("Track "+o+" loaded ["+a.startSN+","+a.endSN+"],duration:"+a.totalduration);var s=r[o],l=0;if(a.live||null!==(n=s.details)&&void 0!==n&&n.live){var c=this.mainDetails;if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed||!c)return;!s.details&&a.hasProgramDateTime&&c.hasProgramDateTime?(Object(m.alignMediaPlaylistByPDT)(a,c),l=a.fragments[0].start):l=this.alignPlaylists(a,s.details)}s.details=a,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(s.details,l),this.state!==i.State.WAITING_TRACK||this.waitForCdnTuneIn(a)||(this.state=i.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+o)},w._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,a=e.payload,o=this.config,s=this.trackId,l=this.levels;if(l){var u=l[s];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 m=o.defaultAudioCodec||u.audioCodec||"mp4a.40.2",g=this.transmuxer;g||(g=this.transmuxer=new d.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var y=this.initPTS[n.cc],b=null===(t=n.initSegment)||void 0===t?void 0:t.data;if(void 0!==y){var x=r?r.index:-1,w=-1!==x,C=new f.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,a.byteLength,x,w);g.push(a,b,m,"",n,r,p.totalduration,!1,C,y)}else v.logger.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+s),(this.waitingData=this.waitingData||{frag:n,part:r,cache:new h.default,complete:!1}).cache.push(new Uint8Array(a)),this.waitingVideoCC=this.videoTrackCC,this.state=i.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},w._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},w.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},w.onBufferCreated=function(e,t){var n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},w.onFragBuffered=function(e,t){var n=t.frag,r=t.part;n.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(n)?this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==n.sn&&(this.fragPrevious=n,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(n,r)))},w.onError=function(t,n){switch(n.details){case g.ErrorDetails.FRAG_LOAD_ERROR:case g.ErrorDetails.FRAG_LOAD_TIMEOUT:case g.ErrorDetails.KEY_LOAD_ERROR:case g.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,n);break;case g.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case g.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==i.State.ERROR&&this.state!==i.State.STOPPED&&(this.state=n.fatal?i.State.ERROR:i.State.IDLE,this.warn(n.details+" while loading frag, switching to "+this.state+" state"));break;case g.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===n.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var r=!0,a=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);a&&a.len>.5&&(r=!this.reduceMaxBufferLength(a.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},w.onBufferFlushed=function(e,t){t.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},w._handleTransmuxComplete=function(e){var t,n="audio",r=this.hls,o=e.remuxResult,s=e.chunkMeta,l=this.getCurrentContext(s);if(!l)return this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(s.level);var c=l.frag,h=l.part,d=o.audio,f=o.text,p=o.id3,m=o.initSegment;if(!this.fragContextChanged(c)){if(this.state=i.State.PARSING,this.audioSwitch&&d&&this.completeAudioSwitch(),null!=m&&m.tracks&&(this._bufferInitSegment(m.tracks,c,s),r.trigger(a.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:n,tracks:m.tracks})),d){var g=d.startPTS,v=d.endPTS,b=d.startDTS,x=d.endDTS;h&&(h.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:g,endPTS:v,startDTS:b,endDTS:x}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,g,v,b,x),this.bufferFragmentData(d,c,h,s)}if(null!=p&&null!==(t=p.samples)&&void 0!==t&&t.length){var w=y({frag:c,id:n},p);r.trigger(a.Events.FRAG_PARSING_METADATA,w)}if(f){var C=y({frag:c,id:n},f);r.trigger(a.Events.FRAG_PARSING_USERDATA,C)}}},w._bufferInitSegment=function(e,t,n){if(this.state===i.State.PARSING){e.video&&delete e.video;var r=e.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(a.Events.BUFFER_CODECS,e);var o=r.initSegment;if(null!=o&&o.byteLength){var s={type:"audio",frag:t,part:null,chunkMeta:n,parent:t.type,data:o};this.hls.trigger(a.Events.BUFFER_APPENDING,s)}this.tick()}}},w.loadFragment=function(t,n,a){var o=this.fragmentTracker.getState(t);this.fragCurrent=t,(this.audioSwitch||o===s.FragmentState.NOT_LOADED||o===s.FragmentState.PARTIAL)&&("initSegment"===t.sn?this._loadInitSegment(t):n.live&&!Object(r.isFiniteNumber)(this.initPTS[t.cc])?(this.log("Waiting for video PTS in continuity counter "+t.cc+" of live stream before loading audio fragment "+t.sn+" of level "+this.trackId),this.state=i.State.WAITING_INIT_PTS):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,a)))},w.completeAudioSwitch=function(){var t=this.hls,n=this.media,r=this.trackId;n&&(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,t.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:r})},x}(i.default);t.default=x},"./src/controller/audio-track-controller.ts": +/*!**************************************************!*\ + !*** ./src/controller/audio-track-controller.ts ***! + \**************************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),o=n(/*! ../types/loader */"./src/types/loader.ts");function s(e,t){for(var n=0;n=t.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var n=t[this.trackId];this.log("Now switching to audio-track index "+e);var i=t[e],a=i.id,o=i.groupId,s=void 0===o?"":o,l=i.name,c=i.type,u=i.url;if(this.trackId=e,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(r.Events.AUDIO_TRACK_SWITCHING,{id:a,groupId:s,name:l,type:c,url:u}),!i.details||i.details.live){var h=this.switchParams(i.url,null==n?void 0:n.details);this.loadPlaylist(h)}}},d.selectInitialTrack=function(){var e=this.tracksInGroup;console.assert(e.length,"Initial audio track should be selected when tracks are known");var t=this.trackName,n=this.findTrackId(t)||this.findTrackId();-1!==n?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},d.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;nt.partTarget&&(c+=1)}if(Object(r.isFiniteNumber)(l))return new i.HlsUrlParameters(l,Object(r.isFiniteNumber)(c)?c:void 0,i.HlsSkip.No)}}},t.loadPlaylist=function(e){},t.shouldLoadTrack=function(e){return this.canLoad&&e&&!!e.url&&(!e.details||e.details.live)},t.playlistLoaded=function(e,t,n){var r=this,i=t.details,o=t.stats,s=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(i.advancedDateTime=Date.now()-s,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&Object(a.mergeDetails)(n,i),!this.canLoad||!i.live)return;var l,c=void 0,u=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var h=this.hls.config.lowLatencyMode,d=i.lastPartSn,f=i.endSN,p=i.lastPartIndex,m=d===f;-1!==p?(c=m?f+1:d,u=m?h?0:p:p+1):c=f+1;var g=i.age,v=g+i.ageHeader,y=Math.min(v-i.partTarget,1.5*i.targetduration);if(y>0){if(n&&y>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+y+" with playlist age: "+i.age),y=0;else{var b=Math.floor(y/i.targetduration);c+=b,void 0!==u&&(u+=Math.round(y%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+y+" skip sn "+b+" to part "+u)}i.tuneInGoal=y}if(l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u),h||!m)return void this.loadPlaylist(l)}else l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u);var x=Object(a.computeReloadInterval)(i,o);void 0!==c&&i.canBlockReload&&(x-=i.partTarget||1),this.log("reload live playlist "+e+" in "+Math.round(x)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),x)}else this.clearTimer()},t.getDeliveryDirectives=function(e,t,n,r){var a=Object(i.getSkipValue)(e,n);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,a=i.HlsSkip.No),new i.HlsUrlParameters(n,r,a)},t.retryLoadingOrFail=function(e){var t,n=this,r=this.hls.config,i=this.retryCount-1&&null!==(t=e.context)&&void 0!==t&&t.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+e.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return n.loadPlaylist()}),a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+e.details+'"')}else this.warn('cannot recover from error "'+e.details+'"'),this.clearTimer(),e.fatal=!0;return i},e}()},"./src/controller/base-stream-controller.ts": +/*!**************************************************!*\ + !*** ./src/controller/base-stream-controller.ts ***! + \**************************************************/ +/*! exports provided: State, default */function(e,t,n){"use strict";n.r(t),n.d(t,"State",(function(){return w})),n.d(t,"default",(function(){return C}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../task-loop */"./src/task-loop.ts"),a=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ../utils/logger */"./src/utils/logger.ts"),l=n(/*! ../events */"./src/events.ts"),c=n(/*! ../errors */"./src/errors.ts"),u=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),h=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),d=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),f=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=n(/*! ./level-helper */"./src/controller/level-helper.ts"),m=n(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),g=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),v=n(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),y=n(/*! ../types/loader */"./src/types/loader.ts");function b(e,t){for(var n=0;nt.start+t.duration+c;(s0&&a&&a.key&&a.iv&&"AES-128"===a.method){var o=self.performance.now();return t.decrypter.webCryptoDecrypt(new Uint8Array(i),a.key.buffer,a.iv.buffer).then((function(t){var i=self.performance.now();return r.trigger(l.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:o,tdecrypt:i}}),n.payload=t,n}))}return n})).then((function(n){var r=t.fragCurrent,i=t.hls,a=t.levels;if(!a)throw new Error("init load aborted, missing levels");var o=a[e.level].details;console.assert(o,"Level details are defined when init segment is loaded");var s=e.stats;t.state=w.IDLE,t.fragLoadError=0,e.data=new Uint8Array(n.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),n.frag===r&&i.trigger(l.Events.FRAG_BUFFERED,{stats:s,frag:r,part:null,id:e.type}),t.tick()})).catch((function(n){t.warn(n),t.resetFragmentLoading(e)}))},S.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},S.fragBufferedComplete=function(e,t){var n=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level+" "+v.default.toString(o.BufferHelper.getBuffered(n))),this.state=w.IDLE,this.tick()},S._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var n=e.frag,r=e.part,i=e.partsLoaded,a=!i||0===i.length||i.some((function(e){return!e})),o=new u.ChunkMetadata(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!a);t.flush(o)}},S._handleFragmentLoadProgress=function(e){},S._doFragLoad=function(e,t,n,i){var a=this;if(void 0===n&&(n=null),!this.levels)throw new Error("frag load aborted, missing levels");if(n=Math.max(e.start,n||0),this.config.lowLatencyMode&&t){var o=t.partList;if(o&&i){n>e.end&&t.fragmentHint&&(e=t.fragmentHint);var s=this.getNextPart(o,e,n);if(s>-1){var c=o[s];return this.log("Loading part sn: "+e.sn+" p: "+c.index+" cc: "+e.cc+" of playlist ["+t.startSN+"-"+t.endSN+"] parts [0-"+s+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=w.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,part:o[s],targetBufferTime:n}),this.doFragPartsLoad(e,o,s,i).catch((function(e){return a.handleFragLoadError(e)}))}if(!e.url||this.loadedEndOfParts(o,n))return Promise.resolve(null)}}return this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(t?"of ["+t.startSN+"-"+t.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),Object(r.isFiniteNumber)(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=w.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragmentLoader.load(e,i).catch((function(e){return a.handleFragLoadError(e)}))},S.doFragPartsLoad=function(e,t,n,r){var i=this;return new Promise((function(a,o){var s=[];!function n(c){var u=t[c];i.fragmentLoader.loadPart(e,u,r).then((function(r){s[u.index]=r;var o=r.part;i.hls.trigger(l.Events.FRAG_LOADED,r);var h=t[c+1];if(!h||h.fragment!==e)return a({frag:e,part:o,partsLoaded:s});n(c+1)})).catch(o)}(n)}))},S.handleFragLoadError=function(e){var t=e.data;return t&&t.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(l.Events.ERROR,t),null},S._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===w.PARSING){var n=t.frag,r=t.part,i=t.level,a=self.performance.now();n.stats.parsing.end=a,r&&(r.stats.parsing.end=a),this.updateLevelTiming(n,r,i,e.partial)}else this.fragCurrent||(this.state=w.IDLE)},S.getCurrentContext=function(e){var t=this.levels,n=e.level,r=e.sn,i=e.part;if(!t||!t[n])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+n+". The current chunk will not be buffered."),null;var a=t[n],o=i>-1?Object(p.getPartWith)(a,r,i):null,s=o?o.fragment:Object(p.getFragmentWithSN)(a,r,this.fragCurrent);return s?{frag:s,part:o,level:a}:null},S.bufferFragmentData=function(e,t,n,r){if(e&&this.state===w.PARSING){var i=e.data1,a=e.data2,o=i;if(i&&a&&(o=Object(h.appendUint8Array)(i,a)),o&&o.length){var s={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:o};this.hls.trigger(l.Events.BUFFER_APPENDING,s),e.dropped&&e.independent&&!n&&this.flushBufferGap(t)}}},S.flushBufferGap=function(e){var t=this.media;if(t)if(o.BufferHelper.isBuffered(t,t.currentTime)){var n=t.currentTime,r=o.BufferHelper.bufferInfo(t,n,0),i=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),s=Math.max(Math.min(e.start-a,r.end-a),n+a);e.start-s>a&&this.flushMainBuffer(s,e.start)}else this.flushMainBuffer(0,e.start)},S.getFwdBufferInfo=function(e,t){var n=this.config,i=this.getLoadPosition();if(!Object(r.isFiniteNumber)(i))return null;var a=o.BufferHelper.bufferInfo(e,i,n.maxBufferHole);if(0===a.len&&void 0!==a.nextStart){var s=this.fragmentTracker.getBufferedFrag(i,t);if(s&&a.nextStart=n&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},S.getNextFragment=function(e,t){var n,r,i=t.fragments,a=i.length;if(!a)return null;var o,s=this.config,l=i[0].start;if(t.live){var c=s.initialLiveManifestSize;if(a-1&&nn.start&&n.loaded},S.getInitialLiveFragment=function(e,t){var n=this.fragPrevious,r=null;if(n){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=Object(f.findFragmentByPDT)(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){var a=t[i-e.startSN];n.cc===a.cc&&(r=a,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=Object(f.findFragWithCC)(t,n.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?e.fragmentEnd:e.edge,e))}return r},S.getFragmentAtPosition=function(e,t,n){var r,i=this.config,o=this.fragPrevious,s=n.fragments,l=n.endSN,c=n.fragmentHint,u=i.maxFragLookUpTolerance,h=!!(i.lowLatencyMode&&n.partList&&c);if(h&&c&&!this.bitrateTest&&(s=s.concat(c),l=c.sn),et-u?0:u;r=Object(f.findFragmentByPTS)(o,s,e,d)}else r=s[s.length-1];if(r){var p=r.sn-n.startSN,m=o&&r.level===o.level,g=s[p+1];if(this.fragmentTracker.getState(r)===a.FragmentState.BACKTRACKED){r=null;for(var v=p;s[v]&&this.fragmentTracker.getState(s[v])===a.FragmentState.BACKTRACKED;)r=o?s[v--]:s[--v];r||(r=g)}else o&&r.sn===o.sn&&!h&&m&&(r.sn=a-t.maxFragLookUpTolerance&&i<=o;if(null!==r&&n.duration>r&&(i"+e.startSN+" prev-sn: "+(a?a.sn:"na")+" fragments: "+s),h}return l},S.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},S.setStartPosition=function(e,t){var n=this.startPosition;if(n"+e))}}])&&b(C.prototype,E),k&&b(C,k),i}(i.default)},"./src/controller/buffer-controller.ts": +/*!*********************************************!*\ + !*** ./src/controller/buffer-controller.ts ***! + \*********************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ../errors */"./src/errors.ts"),s=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=n(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),h=Object(l.getMediaSource)(),d=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function e(e){var t=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 e=t.hls,n=t.media,r=t.mediaSource;a.logger.log("[buffer-controller]: Media source opened"),n&&(t.updateMediaElementDuration(),e.trigger(i.Events.MEDIA_ATTACHED,{media:n})),r&&r.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){a.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){a.logger.log("[buffer-controller]: Media source ended")},this.hls=e,this._initSourceBuffer(),this.registerListeners()}var t=e.prototype;return t.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},t.destroy=function(){this.unregisterListeners(),this.details=null},t.registerListeners=function(){var e=this.hls;e.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(i.Events.BUFFER_RESET,this.onBufferReset,this),e.on(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.on(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(i.Events.BUFFER_EOS,this.onBufferEos,this),e.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(i.Events.FRAG_PARSED,this.onFragParsed,this),e.on(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(i.Events.BUFFER_RESET,this.onBufferReset,this),e.off(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.off(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(i.Events.BUFFER_EOS,this.onBufferEos,this),e.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(i.Events.FRAG_PARSED,this.onFragParsed,this),e.off(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},t.onManifestParsed=function(e,t){var n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.details=null,a.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var n=this.media=t.media;if(n&&h){var r=this.mediaSource=new h;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(r),this._objectUrl=n.src}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,n=this._objectUrl;if(t){if(a.logger.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){a.logger.warn("[buffer-controller]: onMediaDetaching: "+e.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(n&&self.URL.revokeObjectURL(n),e.src===n?(e.removeAttribute("src"),e.load()):a.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(i.Events.MEDIA_DETACHED,void 0)},t.onBufferReset=function(){var e=this;this.getSourceBufferTypes().forEach((function(t){var n=e.sourceBuffer[t];try{n&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(n),e.sourceBuffer[t]=void 0)}catch(e){a.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",e)}})),this._initSourceBuffer()},t.onBufferCodecs=function(e,t){var n=this,r=this.getSourceBufferTypes().length;Object.keys(t).forEach((function(e){if(r){var i=n.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var a=t[e],o=a.codec,s=a.levelCodec,l=a.container;if((i.levelCodec||i.codec).replace(d,"$1")!==(s||o).replace(d,"$1")){var c=l+";codecs="+(s||o);n.appendChangeType(e,c)}}}else n.pendingTracks[e]=t[e]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},t.appendChangeType=function(e,t){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[e];i&&(a.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){a.logger.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",t)}};r.append(i,e)},t.onBufferAppending=function(e,t){var n=this,r=this.hls,l=this.operationQueue,c=this.tracks,u=t.data,h=t.type,d=t.frag,f=t.part,p=t.chunkMeta,m=p.buffering[h],g=self.performance.now();m.start=g;var v=d.stats.buffering,y=f?f.stats.buffering:null;0===v.start&&(v.start=g),y&&0===y.start&&(y.start=g);var b=c.audio,x="audio"===h&&1===p.id&&"audio/mpeg"===(null==b?void 0:b.container),w={execute:function(){if(m.executeStart=self.performance.now(),x){var e=n.sourceBuffer[h];if(e){var t=d.start-e.timestampOffset;Math.abs(t)>=.1&&(a.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+t+") sn: "+d.sn+")"),e.timestampOffset=d.start)}}n.appendExecutor(u,h)},onStart:function(){},onComplete:function(){var e=self.performance.now();m.executeEnd=m.end=e,0===v.first&&(v.first=e),y&&0===y.first&&(y.first=e);var t=n.sourceBuffer,r={};for(var a in t)r[a]=s.BufferHelper.getBuffered(t[a]);n.appendError=0,n.hls.trigger(i.Events.BUFFER_APPENDED,{type:h,frag:d,part:f,chunkMeta:p,parent:d.type,timeRanges:r})},onError:function(e){a.logger.error("[buffer-controller]: Error encountered while trying to append to the "+h+" SourceBuffer",e);var t={type:o.ErrorTypes.MEDIA_ERROR,parent:d.type,details:o.ErrorDetails.BUFFER_APPEND_ERROR,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=o.ErrorDetails.BUFFER_FULL_ERROR:(n.appendError++,t.details=o.ErrorDetails.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(a.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0)),r.trigger(i.Events.ERROR,t)}};l.append(w,h)},t.onBufferFlushing=function(e,t){var n=this,r=this.operationQueue,o=function(e){return{execute:n.removeExecutor.bind(n,e,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(i.Events.BUFFER_FLUSHED,{type:e})},onError:function(t){a.logger.warn("[buffer-controller]: Failed to remove from "+e+" SourceBuffer",t)}}};t.type?r.append(o(t.type),t.type):this.getSourceBufferTypes().forEach((function(e){r.append(o(e),e)}))},t.onFragParsed=function(e,t){var n=this,r=t.frag,o=t.part,s=[],l=o?o.elementaryStreams:r.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&s.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&s.push("video")),0===s.length&&a.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var e=self.performance.now();r.stats.buffering.end=e,o&&(o.stats.buffering.end=e);var t=o?o.stats:r.stats;n.hls.trigger(i.Events.FRAG_BUFFERED,{frag:r,part:o,stats:t,id:r.type})}),s)},t.onFragChanged=function(e,t){this.flushBackBuffer()},t.onBufferEos=function(e,t){var n=this;this.getSourceBufferTypes().reduce((function(e,r){var i=n.sourceBuffer[r];return t.type&&t.type!==r||i&&!i.ended&&(i.ended=!0,a.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS")),e&&!(i&&!i.ended)}),!0)&&this.blockBuffers((function(){var e=n.mediaSource;e&&"open"===e.readyState&&e.endOfStream()}))},t.onLevelUpdated=function(e,t){var n=t.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.flushBackBuffer=function(){var e=this.hls,t=this.details,n=this.media,a=this.sourceBuffer;if(n&&null!==t){var o=this.getSourceBufferTypes();if(o.length){var l=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if(Object(r.isFiniteNumber)(l)&&!(l<0)){var c=n.currentTime,u=t.levelTargetDuration,h=Math.max(l,u),d=Math.floor(c/u)*u-h;o.forEach((function(n){var r=a[n];if(r){var o=s.BufferHelper.getBuffered(r);o.length>0&&d>o.start(0)&&(e.trigger(i.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),t.live&&e.trigger(i.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),e.trigger(i.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:n}))}}))}}}},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var e=this.details,t=this.hls,n=this.media,i=this.mediaSource,o=e.fragments[0].start+e.totalduration,s=n.duration,l=Object(r.isFiniteNumber)(i.duration)?i.duration:0;e.live&&t.config.liveDurationInfinity?(a.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),i.duration=1/0,this.updateSeekableRange(e)):(o>l&&o>s||!Object(r.isFiniteNumber)(s))&&(a.logger.log("[buffer-controller]: Updating Media Source duration to "+o.toFixed(3)),i.duration=o)}},t.updateSeekableRange=function(e){var t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&null!=t&&t.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+e.totalduration);t.setLiveSeekableRange(r,i)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&!e||2===r){this.createSourceBuffers(n),this.pendingTracks={};var a=this.getSourceBufferTypes();if(0===a.length)return void this.hls.trigger(i.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)"});a.forEach((function(e){t.executeNext(e)}))}},t.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var s in e)if(!t[s]){var l=e[s];if(!l)throw Error("source buffer exists for track "+s+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;a.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var h=t[s]=n.addSourceBuffer(u),d=s;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[s]={buffer:h,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},r++}catch(e){a.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+e.message),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:u})}}r&&this.hls.trigger(i.Events.BUFFER_CREATED,{tracks:this.tracks})},t._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},t._onSBUpdateEnd=function(e){var t=this.operationQueue;t.current(e).onComplete(),t.shiftAndExecuteNext(e)},t._onSBUpdateError=function(e,t){a.logger.error("[buffer-controller]: "+e+" SourceBuffer error",t),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var n=this.operationQueue.current(e);n&&n.onError(t)},t.removeExecutor=function(e,t,n){var i=this.media,o=this.mediaSource,s=this.operationQueue,l=this.sourceBuffer[e];if(!i||!o||!l)return a.logger.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void s.shiftAndExecuteNext(e);var c=Object(r.isFiniteNumber)(i.duration)?i.duration:1/0,u=Object(r.isFiniteNumber)(o.duration)?o.duration:1/0,h=Math.max(0,t),d=Math.min(n,c,u);d>h?(a.logger.log("[buffer-controller]: Removing ["+h+","+d+"] from the "+e+" SourceBuffer"),console.assert(!l.updating,e+" sourceBuffer must not be updating"),l.remove(h,d)):s.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var n=this.operationQueue,r=this.sourceBuffer[t];if(!r)return a.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),void n.shiftAndExecuteNext(t);r.ended=!1,console.assert(!r.updating,t+" sourceBuffer must not be updating"),r.appendBuffer(e)},t.blockBuffers=function(e,t){var n=this;if(void 0===t&&(t=this.getSourceBufferTypes()),!t.length)return a.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(e);var r=this.operationQueue,i=t.map((function(e){return r.appendBlocker(e)}));Promise.all(i).then((function(){e(),t.forEach((function(e){var t=n.sourceBuffer[e];t&&t.updating||r.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,n){var r=this.sourceBuffer[e];if(r){var i=n.bind(this,e);this.listeners[e].push({event:t,listener:i}),r.addEventListener(t,i)}},t.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach((function(e){t.removeEventListener(e.event,e.listener)}))},e}()},"./src/controller/buffer-operation-queue.ts": +/*!**************************************************!*\ + !*** ./src/controller/buffer-operation-queue.ts ***! + \**************************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=function(){function e(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}var t=e.prototype;return t.append=function(e,t){var n=this.queues[t];n.push(e),1===n.length&&this.buffers[t]&&this.executeNext(t)},t.insertAbort=function(e,t){this.queues[t].unshift(e),this.executeNext(t)},t.appendBlocker=function(e){var t,n=new Promise((function(e){t=e})),r={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,e),n},t.executeNext=function(e){var t=this.buffers,n=this.queues,i=t[e],a=n[e];if(a.length){var o=a[0];try{o.execute()}catch(t){r.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(t),i&&i.updating||(a.shift(),this.executeNext(e))}}},t.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},t.current=function(e){return this.queues[e][0]},e}()},"./src/controller/cap-level-controller.ts": +/*!************************************************!*\ + !*** ./src/controller/cap-level-controller.ts ***! + \************************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts");function i(e,t){for(var n=0;n0&&this.mediaWidth>0){var e=this.hls.levels;if(e.length){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},o.getMaxLevel=function(t){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(r,i){return e.isLevelAllowed(i,n.restrictedLevels)&&i<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(i,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 e=this.media,t={width:0,height:0};if(e){var n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t},e.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},e.getMaxLevelByMediaSize=function(e,t,n){if(!e||!e.length)return-1;for(var r,i,a=e.length-1,o=0;o=t||s.height>=n)&&(r=s,!(i=e[o+1])||r.width!==i.width||r.height!==i.height)){a=o;break}}return a},t=e,a=[{key:"contentScaleFactor",get:function(){var e=1;try{e=self.devicePixelRatio}catch(e){}return e}}],(n=[{key:"mediaWidth",get:function(){return this.getDimensions().width*e.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*e.contentScaleFactor}}])&&i(t.prototype,n),a&&i(t,a),e}();t.default=a},"./src/controller/cmcd-controller.ts": +/*!*******************************************!*\ + !*** ./src/controller/cmcd-controller.ts ***! + \*******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return d}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../types/cmcd */"./src/types/cmcd.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts");function s(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nn&&(n=a.bitrate)}return n>0?n:NaN},t.getBufferLength=function(e){var t=this.hls.media,n=e===i.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return n&&t?1e3*a.BufferHelper.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},t.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},e.uuid=function(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)},e.serialize=function(e){for(var t,n=[],r=function(e){return!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e},i=function(e){return Math.round(e)},a=function(e){return 100*i(e/100)},o={br:i,d:i,bl:a,dl:a,mtp:a,nor:function(e){return encodeURIComponent(e)},rtp:a,tb:i},s=c(Object.keys(e||{}).sort());!(t=s()).done;){var l=t.value,u=e[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),n.push(f)}}return n.join(",")},e.toHeaders=function(t){for(var n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={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,s=Object.keys(t);o3)return void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;a.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(n,o)}}},c._generateLicenseRequestChallenge=function(e,t){switch(e.mediaKeySystemDomain){case o.KeySystems.WIDEVINE:return t}throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},c._requestLicense=function(e,t){a.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return a.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var o=this.getLicenseServerUrl(n.mediaKeySystemDomain),s=this._createLicenseXhr(o,e,t);a.logger.log("Sending license request to URL: "+o);var l=this._generateLicenseRequestChallenge(n,e);s.send(l)}catch(e){a.logger.error("Failure requesting DRM license: "+e),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(e,t){if(this._emeEnabled){var n=t.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)}},c.onMediaDetached=function(){var e=this._media,t=this._mediaKeysList;e&&(e.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map((function(e){if(e.mediaKeysSession)return e.mediaKeysSession.close().catch((function(){}))}))).then((function(){return e.setMediaKeys(null)})).catch((function(){})))},c.onManifestParsed=function(e,t){if(this._emeEnabled){var n=t.levels.map((function(e){return e.audioCodec})).filter((function(e){return!!e})),r=t.levels.map((function(e){return e.videoCodec})).filter((function(e){return!!e}));this._attemptKeySystemAccess(o.KeySystems.WIDEVINE,n,r)}},t=e,(n=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&s(t.prototype,n),l&&s(t,l),e}();t.default=l},"./src/controller/fps-controller.ts": +/*!******************************************!*\ + !*** ./src/controller/fps-controller.ts ***! + \******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=function(){function e(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching)},t.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},t.onMediaAttaching=function(e,t){var n=this.hls.config;if(n.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.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),n.fpsDroppedMonitoringPeriod)}},t.checkFPS=function(e,t,n){var a=performance.now();if(t){if(this.lastTime){var o=a-this.lastTime,s=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,c=1e3*s/o,u=this.hls;if(u.trigger(r.Events.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),c>0&&s>u.config.fpsDroppedMonitoringThreshold*l){var h=u.currentLevel;i.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=a,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.checkFPSInterval=function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},e}();t.default=a},"./src/controller/fragment-finders.ts": +/*!********************************************!*\ + !*** ./src/controller/fragment-finders.ts ***! + \********************************************/ +/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(e,t,n){"use strict";n.r(t),n.d(t,"findFragmentByPDT",(function(){return a})),n.d(t,"findFragmentByPTS",(function(){return o})),n.d(t,"fragmentWithinToleranceTest",(function(){return s})),n.d(t,"pdtWithinToleranceTest",(function(){return l})),n.d(t,"findFragWithCC",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function a(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!Object(r.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var i=0;ie&&n.start?-1:0}function l(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}function c(e,t){return i.default.search(e,(function(e){return e.cct?-1:0}))}},"./src/controller/fragment-tracker.ts": +/*!********************************************!*\ + !*** ./src/controller/fragment-tracker.ts ***! + \********************************************/ +/*! exports provided: FragmentState, FragmentTracker */function(e,t,n){"use strict";n.r(t),n.d(t,"FragmentState",(function(){return r})),n.d(t,"FragmentTracker",(function(){return o}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../types/loader */"./src/types/loader.ts");!function(e){e.NOT_LOADED="NOT_LOADED",e.BACKTRACKED="BACKTRACKED",e.APPENDING="APPENDING",e.PARTIAL="PARTIAL",e.OK="OK"}(r||(r={}));var o=function(){function e(e){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=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.on(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.off(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},t.getAppendedFrag=function(e,t){if(t===a.PlaylistLevelType.MAIN){var n=this.activeFragment,r=this.activeParts;if(!n)return null;if(r)for(var i=r.length;i--;){var o=r[i],s=o?o.end:n.appendedPTS;if(o.start<=e&&void 0!==s&&e<=s)return i>9&&(this.activeParts=r.slice(i-9)),o}else if(n.start<=e&&void 0!==n.appendedPTS&&e<=n.appendedPTS)return n}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var a=n[r[i]];if((null==a?void 0:a.body.type)===t&&a.buffered){var o=a.body;if(o.start<=e&&e<=o.end)return o}}return null},t.detectEvictedFragments=function(e,t,n){var r=this;Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a)if(a.buffered){var o=a.range[e];o&&o.time.some((function(e){var n=!r.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&r.removeFragment(a.body),n}))}else a.body.type===n&&r.removeFragment(a.body)}))},t.detectPartialFragments=function(e){var t=this,n=this.timeRanges,r=e.frag,i=e.part;if(n&&"initSegment"!==r.sn){var a=l(r),o=this.fragments[a];o&&(Object.keys(n).forEach((function(e){var a=r.elementaryStreams[e];if(a){var s=n[e],l=null!==i||!0===a.partial;o.range[e]=t.getBufferedTimes(r,i,l,s)}})),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body))}},t.fragBuffered=function(e){var t=l(e),n=this.fragments[t];n&&(n.backtrack=n.loaded=null,n.buffered=!0)},t.getBufferedTimes=function(e,t,n,r){for(var i={time:[],partial:n},a=t?t.start:e.start,o=t?t.end:e.end,s=e.minEndPTS||o,l=e.maxStartPTS||a,c=0;c=u&&s<=h){i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});break}if(au)i.partial=!0,i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});else if(o<=u)break}return i},t.getPartialFragment=function(e){var t,n,r,i=null,a=0,o=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&s(u)&&(n=u.body.start-o,r=u.body.end+o,e>=n&&e<=r&&(t=Math.min(e-n,r-e),a<=t&&(i=u.body,a=t)))})),i},t.getState=function(e){var t=l(e),n=this.fragments[t];return n?n.buffered?s(n)?r.PARTIAL:r.OK:n.backtrack?r.BACKTRACKED:r.APPENDING:r.NOT_LOADED},t.backtrack=function(e,t){var n=l(e),r=this.fragments[n];if(!r||r.backtrack)return null;var i=r.backtrack=t||r.loaded;return r.loaded=null,i},t.getBacktrackData=function(e){var t=l(e),n=this.fragments[t];if(n){var r,i=n.backtrack;if(null!=i&&null!==(r=i.payload)&&void 0!==r&&r.byteLength)return i;this.removeFragment(e)}return null},t.isTimeBuffered=function(e,t,n){for(var r,i,a=0;a=r&&t<=i)return!0;if(t<=r)return!1}return!1},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if("initSegment"!==n.sn&&!n.bitrateTest&&!r){var i=l(n);this.fragments[i]={body:n,loaded:t,backtrack:null,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var n=this,r=t.frag,i=t.part,o=t.timeRanges;if(r.type===a.PlaylistLevelType.MAIN)if(this.activeFragment=r,i){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(i)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach((function(e){var t=o[e];if(n.detectEvictedFragments(e,t),!i)for(var a=0;ae&&r.removeFragment(o)}}))},t.removeFragment=function(e){var t=l(e);e.stats.loaded=0,e.clearElementaryStreamInfo(),delete this.fragments[t]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},e}();function s(e){var t,n;return e.buffered&&((null===(t=e.range.video)||void 0===t?void 0:t.partial)||(null===(n=e.range.audio)||void 0===n?void 0:n.partial))}function l(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.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(e,t,n){"use strict";n.r(t),n.d(t,"STALL_MINIMUM_DURATION_MS",(function(){return s})),n.d(t,"MAX_START_GAP_JUMP",(function(){return l})),n.d(t,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),n.d(t,"SKIP_BUFFER_RANGE_START",(function(){return u})),n.d(t,"default",(function(){return h}));var r=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=250,l=2,c=.1,u=.05,h=function(){function e(e,t,n,r){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=e,this.media=t,this.fragmentTracker=n,this.hls=r}var t=e.prototype;return t.destroy=function(){this.hls=this.fragmentTracker=this.media=null},t.poll=function(e){var t=this.config,n=this.media,i=this.stalled,a=n.currentTime,c=n.seeking,u=this.seeking&&!c,h=!this.seeking&&c;if(this.seeking=c,a===e){if((h||u)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&r.BufferHelper.getBuffered(n).length){var d=r.BufferHelper.bufferInfo(n,a,0),f=d.len>0,p=d.nextStart||0;if(f||p){if(c){var m=d.len>l,g=!p||p-a>l&&!this.fragmentTracker.getPartialFragment(a);if(m||g)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,y=Math.max(p,d.start||0)-a,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 w=self.performance.now();if(null!==i){var C=w-i;!c&&C>=s&&this._reportStall(d.len);var E=r.BufferHelper.bufferInfo(n,a,t.maxBufferHole);this._tryFixBufferStall(E,C)}else this.stalled=w}}}else if(this.moved=!0,null!==i){if(this.stallReported){var k=self.performance.now()-i;o.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media.currentTime,a=r.getPartialFragment(i);a&&this._trySkipBufferHole(a)||e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(o.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,o.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+e+")"),t.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},t._trySkipBufferHole=function(e){for(var t=this.config,n=this.hls,s=this.media,l=s.currentTime,h=0,d=r.BufferHelper.getBuffered(s),f=0;f=h&&l.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,a)),u=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;e.playbackRate=Math.min(c,Math.max(1,u))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}}}}},l.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},l.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},t=e,(n=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e)return null;var t=e.holdBack,n=e.partHoldBack,r=e.targetduration,i=this.config,a=i.liveSyncDuration,o=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,c=s&&n||t;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==a?a:o*r);var u=r;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(null===e||null===t||null===n)return null;var r=n.edge,i=e-t-this.edgeStalled,a=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,i),o)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var n=e.buffered.length;return n?e.buffered.end(n-1):t.edge-this.currentTime}}])&&o(t.prototype,n),s&&o(t,s),e}()},"./src/controller/level-controller.ts": +/*!********************************************!*\ + !*** ./src/controller/level-controller.ts ***! + \********************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return p}));var r=n(/*! ../types/level */"./src/types/level.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/codecs */"./src/utils/codecs.ts"),s=n(/*! ./level-helper */"./src/controller/level-helper.ts"),l=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(e){for(var t=1;t0){n=c[0].bitrate,c.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=c;for(var v=0;vthis.hls.config.fragLoadingMaxRetry&&(o=n.frag.level)):o=n.frag.level}break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(l=!1),o=r.level),s=!0;break;case a.ErrorDetails.REMUX_ALLOC_ERROR:o=n.level,s=!0}void 0!==o&&this.recoverLevel(n,o,s,l)}}},v.recoverLevel=function(e,t,n,r){var i=e.details,a=this._levels[t];if(a.loadError++,n){if(!this.retryLoadingOrFail(e))return void(this.currentLevelIndex=-1);e.levelRetry=!0}if(r){var o=a.url.length;if(o>1&&a.loadError1){var r=(t.urlId+1)%n;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(e){e.urlId=r})),this.level=e}},v.onFragLoaded=function(e,t){var n=t.frag;if(void 0!==n&&n.type===c.PlaylistLevelType.MAIN){var r=this._levels[n.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},v.onLevelLoaded=function(e,t){var n,r,i=t.level,a=t.details,o=this._levels[i];if(!o)return this.warn("Invalid level index "+i),void(null!==(r=t.deliveryDirectives)&&void 0!==r&&r.skip&&(a.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(i,t,o.details)):null!==(n=t.deliveryDirectives)&&void 0!==n&&n.skip&&(a.deltaUpdateFailed=!0)},v.onAudioTrackSwitched=function(e,t){var n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=this.hls.audioTracks[t.id].groupId,a=0;a0){var r=n.urlId,a=n.url[r];if(e)try{a=e.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Attempt loading level index "+t+(e?" at sn "+e.msn+" part "+e.part:"")+" with URL-id "+r+" "+a),this.clearTimer(),this.hls.trigger(i.Events.LEVEL_LOADING,{url:a,level:t,id:r,deliveryDirectives:e||null})}},v.removeLevel=function(e,t){var n=function(e,n){return n!==t},r=this._levels.filter((function(r,i){return i!==e||r.url.length>1&&void 0!==t&&(r.url=r.url.filter(n),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(n)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(n)),r.urlId=0,!0)})).map((function(e,t){var n=e.details;return null!=n&&n.fragments&&n.fragments.forEach((function(e){e.level=t})),e}));this._levels=r,this.hls.trigger(i.Events.LEVELS_UPDATED,{levels:r})},p=l,(m=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t,n=this._levels;if(0!==n.length&&(this.currentLevelIndex!==e||null===(t=n[e])||void 0===t||!t.details)){if(e<0||e>=n.length){var r=e<0;if(this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:r,reason:"invalid level idx"}),r)return;e=Math.min(e,n.length-1)}this.clearTimer();var o=this.currentLevelIndex,s=n[o],l=n[e];this.log("switching to level "+e+" from "+o),this.currentLevelIndex=e;var c=u({},l,{level:e,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(i.Events.LEVEL_SWITCHING,c);var h=l.details;if(!h||h.live){var d=this.switchParams(l.uri,null==s?void 0:s.details);this.loadPlaylist(d)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&h(p.prototype,m),g&&h(p,g),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(e,t,n){"use strict";n.r(t),n.d(t,"addGroupId",(function(){return a})),n.d(t,"assignTrackIdsByGroup",(function(){return o})),n.d(t,"updatePTS",(function(){return s})),n.d(t,"updateFragPTSDTS",(function(){return c})),n.d(t,"mergeDetails",(function(){return u})),n.d(t,"mapPartIntersection",(function(){return h})),n.d(t,"mapFragmentIntersection",(function(){return d})),n.d(t,"adjustSliding",(function(){return f})),n.d(t,"addSliding",(function(){return p})),n.d(t,"computeReloadInterval",(function(){return m})),n.d(t,"getFragmentWithSN",(function(){return g})),n.d(t,"getPartWith",(function(){return v}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts");function a(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function o(e){var t={};e.forEach((function(e){var n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}function s(e,t,n){l(e[t],e[n])}function l(e,t){var n=t.startPTS;if(Object(r.isFiniteNumber)(n)){var i,a=0;t.sn>e.sn?(a=n-e.start,i=e):(a=e.start-n,i=t),i.duration!==a&&(i.duration=a)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}function c(e,t,n,a,o,s){a-n<=0&&(i.logger.warn("Fragment should have a positive duration",t),a=n+t.duration,s=o+t.duration);var c=n,u=a,h=t.startPTS,d=t.endPTS;if(Object(r.isFiniteNumber)(h)){var f=Math.abs(h-n);Object(r.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(f,t.deltaPTS):t.deltaPTS=f,c=Math.max(n,h),n=Math.min(n,h),o=Math.min(o,t.startDTS),u=Math.min(a,d),a=Math.max(a,d),s=Math.max(s,t.endDTS)}t.duration=a-n;var p=n-t.start;t.appendedPTS=a,t.start=t.startPTS=n,t.maxStartPTS=c,t.startDTS=o,t.endPTS=a,t.minEndPTS=u,t.endDTS=s;var m,g=t.sn;if(!e||ge.endSN)return 0;var v=g-e.startSN,y=e.fragments;for(y[v]=t,m=v;m>0;m--)l(y[m],y[m-1]);for(m=v;m=0;o--){var s=a[o].initSegment;if(s){n=s;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var l,u=0;if(d(e,t,(function(e,i){e.relurl&&(u=e.cc-i.cc),Object(r.isFiniteNumber)(e.startPTS)&&Object(r.isFiniteNumber)(e.endPTS)&&(i.start=i.startPTS=e.startPTS,i.startDTS=e.startDTS,i.appendedPTS=e.appendedPTS,i.maxStartPTS=e.maxStartPTS,i.endPTS=e.endPTS,i.endDTS=e.endDTS,i.minEndPTS=e.minEndPTS,i.duration=e.endPTS-e.startPTS,i.duration&&(l=i),t.PTSKnown=t.alignedSliding=!0),i.elementaryStreams=e.elementaryStreams,i.loader=e.loader,i.stats=e.stats,i.urlId=e.urlId,e.initSegment&&(i.initSegment=e.initSegment,n=e.initSegment)})),n&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((function(e){var t;e.initSegment&&e.initSegment.relurl!==(null===(t=n)||void 0===t?void 0:t.relurl)||(e.initSegment=n)})),t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some((function(e){return!e})),t.deltaUpdateFailed)){i.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=t.skippedSegments;p--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var m=t.fragments;if(u){i.logger.warn("discontinuity sliding from playlist, take drift into account");for(var g=0;g=r.length||p(t,r[n].start)}function p(e,t){if(t){for(var n=e.fragments,r=e.skippedSegments;r0&&a<3*r,s=t.loading.end-t.loading.start,l=e.availabilityDelay;if(!1===e.updated)if(o){var c=333*e.misses;n=Math.max(Math.min(i,2*s),c),e.availabilityDelay=(e.availabilityDelay||0)+n}else n=i;else o?(l=Math.min(l||r/2,a),e.availabilityDelay=l,n=l+r-a):n=r-s;return Math.round(n)}function g(e,t,n){if(!e||!e.details)return null;var r=e.details,i=r.fragments[t-r.startSN];return i||((i=r.fragmentHint)&&i.sn===t?i:t0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=i.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=i.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_LEVEL:var e,t=this.levels,n=this.level,r=null==t||null===(e=t[n])||void 0===e?void 0:e.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=i.State.IDLE;break}break;case i.State.FRAG_LOADING_WAITING_RETRY:var a,o=self.performance.now(),s=this.retryDate;(!s||o>=s||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=i.State.IDLE)}this.onTickEnd()},C.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var e,t,n=this.hls,r=this.levelLastLoaded,a=this.levels,s=this.media,h=n.config,d=n.nextLoadLevel;if(null!==r&&(s||!this.startFragRequested&&h.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&a&&a[d]){var f=a[d];this.level=n.nextLoadLevel=d;var p=f.details;if(!p||this.state===i.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==d)this.state=i.State.WAITING_LEVEL;else{var m=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:s,c.PlaylistLevelType.MAIN);if(null!==m&&!(m.len>=this.getMaxBufferLength(f.maxBitrate))){if(this._streamEnded(m,p)){var g={};return this.altAudio&&(g.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,g),void(this.state=i.State.ENDED)}var v=m.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(s,x,c.PlaylistLevelType.MAIN),y=this.getNextFragment(this.nextLoadPosition,p)}y&&(!y.initSegment||y.initSegment.data||this.bitrateTest||(y=y.initSegment),"identity"!==(null===(e=y.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=y.decryptdata)&&void 0!==t&&t.key?this.loadFragment(y,p,v):this.loadKey(y,p))}}}},C.loadFragment=function(t,n,r){var i,a=this.fragmentTracker.getState(t);if(this.fragCurrent=t,a===l.FragmentState.BACKTRACKED){var o=this.fragmentTracker.getBacktrackData(t);if(o)return this._handleFragmentLoadProgress(o),void this._handleFragmentLoadComplete(o);a=l.FragmentState.NOT_LOADED}a===l.FragmentState.NOT_LOADED||a===l.FragmentState.PARTIAL?"initSegment"===t.sn?this._loadInitSegment(t):this.bitrateTest?(t.bitrateTest=!0,this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t)):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)):a===l.FragmentState.APPENDING?this.reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t):0===(null===(i=this.media)||void 0===i?void 0:i.buffered.length)&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(e){var t=this.fragmentTracker.getAppendedFrag(e,c.PlaylistLevelType.MAIN);return t&&"fragment"in t?t.fragment:t},C.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,c.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var n,r=this.getAppendedFrag(t.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!t.paused&&e){var i=e[this.hls.nextLoadLevel],a=this.fragLastKbps;n=a&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*a)+1:0}else n=0;var o=this.getBufferedFrag(t.currentTime+n);if(o){var s=this.followingBufferedFrag(o);if(s){this.abortCurrentFrag();var l=s.maxStartPTS?s.maxStartPTS:s.start,c=s.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 e=this.fragCurrent;this.fragCurrent=null,null!=e&&e.loader&&e.loader.abort(),this.state===i.State.KEY_LOADING&&(this.state=i.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(t,n){e.prototype.flushMainBuffer.call(this,t,n,this.altAudio?"video":null)},C.onMediaAttached=function(t,n){e.prototype.onMediaAttached.call(this,t,n);var r=n.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 t=this.media;t&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),e.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;Object(r.isFiniteNumber)(t)&&this.log("Media seeked to "+t.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(e,t){var n,r=!1,i=!1;t.levels.forEach((function(e){(n=e.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(r=!0),-1!==n.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=r&&i&&!Object(a.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},C.onLevelLoading=function(e,t){var n=this.levels;if(n&&this.state===i.State.IDLE){var r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(r.details))&&(this.state=i.State.WAITING_LEVEL)}},C.onLevelLoaded=function(e,t){var n,r=this.levels,a=t.level,s=t.details,l=s.totalduration;if(r){this.log("Level "+a+" loaded ["+s.startSN+","+s.endSN+"], cc ["+s.startCC+", "+s.endCC+"] duration:"+l);var c=this.fragCurrent;!c||this.state!==i.State.FRAG_LOADING&&this.state!==i.State.FRAG_LOADING_WAITING_RETRY||c.level!==t.level&&c.loader&&(this.state=i.State.IDLE,c.loader.abort());var u=r[a],h=0;if(s.live||null!==(n=u.details)&&void 0!==n&&n.live){if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed)return;h=this.alignPlaylists(s,u.details)}if(u.details=s,this.levelLastLoaded=a,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:s,level:a}),this.state===i.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=i.State.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,h),this.tick()}else this.warn("Levels were reset while loading level "+a)},C._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.levels;if(a){var o=a[n.level],s=o.details;if(s){var l=o.videoCodec,u=s.PTSKnown||!s.live,f=null===(t=n.initSegment)||void 0===t?void 0:t.data,p=this._getAudioCodec(o),m=this.transmuxer=this.transmuxer||new h.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),g=r?r.index:-1,v=-1!==g,y=new d.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,i.byteLength,g,v),b=this.initPTS[n.cc];m.push(i,f,p,l,n,r,s.totalduration,u,y,b)}else this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},C.onAudioTrackSwitching=function(e,t){var n=this.altAudio,r=!!t.url,i=t.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 a=this.fragCurrent;null!=a&&a.loader&&(this.log("Switching to main audio track, cancel main fragment load"),a.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var s=this.hls;n&&s.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:i})}},C.onAudioTrackSwitched=function(e,t){var n=t.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},C.onBufferCreated=function(e,t){var n,r,i=t.tracks,a=!1;for(var o in i){var s=i[o];if("main"===s.id){if(r=o,n=s,"video"===o){var l=i[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(e,t){var n=t.frag,r=t.part;if(!n||n.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===i.State.PARSED&&(this.state=i.State.IDLE));var a=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},C.onError=function(e,t){switch(t.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,t);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==i.State.ERROR&&(t.fatal?(this.warn(""+t.details),this.state=i.State.ERROR):t.levelRetry||this.state!==i.State.WAITING_LEVEL||(this.state=i.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:if("main"===t.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var n=!0,r=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);r&&r.len>.5&&(n=!this.reduceMaxBufferLength(r.len)),n&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},C.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){var n=s.BufferHelper.getBuffered(e);!this.loadedmetadata&&n.length?(this.loadedmetadata=!0,this.seekToStartPos()):t.poll(this.lastCurrentTime),this.lastCurrentTime=e.currentTime}},C.onFragLoadEmergencyAborted=function(){this.state=i.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(e,t){var n=t.type;if(n!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(n===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,c.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(e,t){this.levels=t.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var e=this.media,t=e.currentTime,n=this.startPosition;if(n>=0&&t0&&(i1&&!1===e.seeking){var n=e.currentTime;if(s.BufferHelper.isBuffered(e,n)?t=this.getAppendedFrag(n):s.BufferHelper.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){var r=this.fragPlaying,i=t.level;r&&t.sn===r.sn&&r.level===i&&t.urlId===r.urlId||(this.hls.trigger(o.Events.FRAG_CHANGED,{frag:t}),r&&r.level===i||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:i}),this.fragPlaying=t)}}},b=y,(x=[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);return this.followingBufferedFrag(t)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&g(b.prototype,x),w&&g(b,w),y}(i.default)},"./src/controller/subtitle-stream-controller.ts": +/*!******************************************************!*\ + !*** ./src/controller/subtitle-stream-controller.ts ***! + \******************************************************/ +/*! exports provided: SubtitleStreamController */function(e,t,n){"use strict";n.r(t),n.d(t,"SubtitleStreamController",(function(){return m}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),s=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),l=n(/*! ./level-helper */"./src/controller/level-helper.ts"),c=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),u=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),h=n(/*! ../types/loader */"./src/types/loader.ts"),d=n(/*! ../types/level */"./src/types/level.ts");function f(e,t){for(var n=0;n=i[s].start&&o<=i[s].end){a=i[s];break}var l=n.start+n.duration;a?a.end=l:(a={start:o,end:l},i.push(a)),this.fragmentTracker.fragBuffered(n)}}},b.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=this.currentTrackId,a=this.levels;if(!a.length||!a[i]||!a[i].details)return;var o=r-a[i].details.targetduration;if(o<=0)return;t.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(e){for(var t=0;t=c.length||i!==a)&&h){if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||null!==(n=h.details)&&void 0!==n&&n.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(s.alignMediaPlaylistByPDT)(r,d):f&&Object(l.addSliding)(r,f.start)}h.details=r,this.levelLastLoaded=i,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(e){var t=e.frag,n=e.payload,i=t.decryptdata,a=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var o=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(n),i.key.buffer,i.iv.buffer).then((function(e){var n=performance.now();a.trigger(r.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:o,tdecrypt:n}})}))}},b.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var e,t=this.currentTrackId,n=this.levels;if(!n.length||!n[t]||!n[t].details)return;var s=n[t].details,l=s.targetduration,h=this.config,d=this.media,f=a.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,d.currentTime-l,h.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(s,"Subtitle track details are defined on idle subtitle stream controller tick");var m,g=s.fragments,v=g.length,y=s.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(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},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(e){Object(i.clearCurrentCues)(e)})),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(e,t){this.tracks=t.subtitleTracks},f.onSubtitleTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.trackId,a=this.tracksInGroup[i];if(a){var o=a.details;a.details=t.details,this.log("subtitle track "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,o))}else this.warn("Invalid subtitle track id "+n)},f.onLevelLoading=function(e,t){this.switchLevel(t.level)},f.onLevelSwitching=function(e,t){this.switchLevel(t.level)},f.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.textGroupIds){var n=t.textGroupIds[t.urlId];if(this.groupId!==n){var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,a=this.tracks.filter((function(e){return!n||e.groupId===n}));this.tracksInGroup=a;var o=this.findTrackId(null==i?void 0:i.name)||this.findTrackId();this.groupId=n;var s={subtitleTracks:a};this.log("Updating subtitle tracks, "+a.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(r.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==o&&this.setSubtitleTrack(o,i)}}},f.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n=i.length)){this.clearTimer();var a=i[e];if(this.log("Switching to subtitle track "+e),this.trackId=e,a){var o=a.id,s=a.groupId,l=void 0===s?"":s,c=a.name,u=a.type,h=a.url;this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:l,name:c,type:u,url:h});var d=this.switchParams(a.url,null==t?void 0:t.details);this.loadPlaylist(d)}else this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:e})}}else this.queuedDefaultTrack=e},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=u(this.media.textTracks),n=0;n=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),u=!0,f/(n-t)>.5))return}if(u||a.push([t,n]),this.config.renderTextTracksNatively){var p=this.captionsTracks[e];this.Cues.newCue(p,t,n,r)}else{var m=this.Cues.newCue(null,t,n,r);this.hls.trigger(i.Events.CUES_PARSED,{type:"captions",cues:m,track:e})}},t.onInitPtsFound=function(e,t){var n=this,r=t.frag,a=t.id,o=t.initPTS,s=t.timescale,l=this.unparsedVttFrags;"main"===a&&(this.initPTS[r.cc]=o,this.timescale[r.cc]=s),l.length&&(this.unparsedVttFrags=[],l.forEach((function(e){n.onFragLoaded(i.Events.FRAG_LOADED,e)})))},t.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n>>8^255&g^99,e[f]=g,t[g]=f;var v=d[f],y=d[v],b=d[y],x=257*d[g]^16843008*g;r[f]=x<<24|x>>>8,i[f]=x<<16|x>>>16,a[f]=x<<8|x>>>24,o[f]=x,x=16843009*b^65537*y^257*v^16843008*f,l[g]=x<<24|x>>>8,c[g]=x<<16|x>>>16,u[g]=x<<8|x>>>24,h[g]=x,f?(f=v^d[d[d[b^v]]],p^=d[d[p]]):f=p=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r>>6);var p=(60&t[n+2])>>>2;if(!(p>f.length-1))return c=(1&t[n+2])<<2,c|=(192&t[n+3])>>>6,r.logger.log("manifest codec:"+o+", ADTS type:"+s+", samplingIndex:"+p),/firefox/i.test(h)?p>=6?(s=5,u=new Array(4),l=p-3):(s=2,u=new Array(2),l=p):-1!==h.indexOf("android")?(s=2,u=new Array(2),l=p):(s=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)&&(s=2,u=new Array(2)),l=p)),u[0]=s<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===s&&(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."+s,manifestCodec:d};e.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function s(e,t){return 255===e[t]&&240==(246&e[t+1])}function l(e,t){return 1&e[t+1]?7:9}function c(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function u(e,t){return t+5=e.length)return!1;var r=c(e,t);if(r<=n)return!1;var i=t+r;return i===e.length||h(e,i)}return!1}function p(e,t,n,i,a){if(!e.samplerate){var s=o(t,n,i,a);if(!s)return;e.config=s.config,e.samplerate=s.samplerate,e.channelCount=s.channelCount,e.codec=s.codec,e.manifestCodec=s.manifestCodec,r.logger.log("parsed codec:"+e.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function m(e){return 9216e4/e}function g(e,t,n,r,i){var a=l(e,t),o=c(e,t);if((o-=a)>0)return{headerLength:a,frameLength:o,stamp:n+r*i}}function v(e,t,n,r,i){var a=g(t,n,r,i,m(e.samplerate));if(a){var o,s=a.frameLength,l=a.headerLength,c=a.stamp,u=l+s,h=Math.max(0,n+u-t.length);h?(o=new Uint8Array(u-l)).set(t.subarray(n+l,t.length),0):o=t.subarray(n+l,n+u);var d={unit:o,pts:c};return h||e.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(e,t,n){"use strict";n.r(t),n.d(t,"initPTSFn",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),o=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),l=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(){},t.resetContiguity=function(){},t.canParse=function(e,t){return!1},t.appendFrame=function(e,t,n){},t.demux=function(e,t){this.cachedData&&(e=Object(o.appendUint8Array)(this.cachedData,e),this.cachedData=null);var n,r,l=i.getID3Data(e,0),u=l?l.length:0,h=this._audioTrack,d=this._id3Track,f=l?i.getTimeStamp(l):void 0,p=e.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=c(f,t)),l&&l.length>0&&d.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),r=this.initPTS;ue?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&r.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){for(var t=8,n=8,r=0;r0)return e.subarray(n,n+r)},s=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3]},l=function(e,t){return i(e,t)&&s(e,t+6)+10<=e.length-t},c=function(e){for(var t=d(e),n=0;n>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(a);break;case 12:case 13:o=e[u++],c+=String.fromCharCode((31&a)<<6|63&o);break;case 14:o=e[u++],s=e[u++],c+=String.fromCharCode((15&a)<<12|(63&o)<<6|(63&s)<<0)}}return c},b={decodeTextFrame:m};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(e,t,n){"use strict";n.r(t);var r=n(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ./mpegaudio */"./src/demux/mpegaudio.ts");function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var l=r.prototype;return l.resetInitSegment=function(t,n,r){e.prototype.resetInitSegment.call(this,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(i.getID3Data(e,0)||[]).length,n=e.length;t0},t.demux=function(e){var t=e,n=Object(i.dummyTrack)();if(this.config.progressive){this.remainderData&&(t=Object(r.appendUint8Array)(this.remainderData,e));var a=Object(r.segmentValidRange)(t);this.remainderData=a.remainder,n.samples=a.valid||new Uint8Array}else n.samples=t;return{audioTrack:Object(i.dummyTrack)(),avcTrack:n,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.flush=function(){var e=Object(i.dummyTrack)();return e.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(i.dummyTrack)(),avcTrack:e,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){},e}();a.minProbeByteLength=1024,t.default=a},"./src/demux/mpegaudio.ts": +/*!********************************!*\ + !*** ./src/demux/mpegaudio.ts ***! + \********************************/ +/*! exports provided: appendFrame, parseHeader, isHeaderPattern, isHeader, canParse, probe */function(e,t,n){"use strict";n.r(t),n.d(t,"appendFrame",(function(){return l})),n.d(t,"parseHeader",(function(){return c})),n.d(t,"isHeaderPattern",(function(){return u})),n.d(t,"isHeader",(function(){return h})),n.d(t,"canParse",(function(){return d})),n.d(t,"probe",(function(){return f}));var r=null,i=[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],a=[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]],s=[0,1,1,4];function l(e,t,n,r,i){if(!(n+24>t.length)){var a=c(t,n);if(a&&n+a.frameLength<=t.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength,missing:0}}}}function c(e,t){var n=e[t+1]>>3&3,l=e[t+1]>>1&3,c=e[t+2]>>4&15,u=e[t+2]>>2&3;if(1!==n&&0!==c&&15!==c&&3!==u){var h=e[t+2]>>1&1,d=e[t+3]>>6,f=1e3*i[14*(3===n?3-l:3===l?3:4)+c-1],p=a[3*(3===n?0:2===n?1:2)+u],m=3===d?1:2,g=o[n][l],v=s[l],y=8*g*v,b=Math.floor(g*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&&(e[t+3]=128|e[t+3]),{sampleRate:p,channelCount:m,frameLength:b,samplesPerFrame:y}}}function u(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function h(e,t){return t+1=e.length)return void n();if(!(e[t].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,r),!r)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n},t.getAvcDecryptedUnit=function(e,t){for(var n=new Uint8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e},t.decryptAvcSample=function(e,t,n,r,a,o){var s=Object(i.discardEPB)(a.data),l=this.getAvcEncryptedData(s),c=this;this.decryptBuffer(l.buffer,(function(i){a.data=c.getAvcDecryptedUnit(s,i),o||c.decryptAvcSamples(e,t,n+1,r)}))},t.decryptAvcSamples=function(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var a=i[n];if(!(a.data.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,r,a,o),!o)return}}}},e}();t.default=a},"./src/demux/transmuxer-interface.ts": +/*!*******************************************!*\ + !*** ./src/demux/transmuxer-interface.ts ***! + \*******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h}));var r=n(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function e(e,t,n,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=e,this.id=t,this.onTransmuxComplete=n,this.onFlush=l;var d=e.config,f=function(t,n){(n=n||{}).frag=h.frag,n.id=h.id,e.trigger(t,n)};this.observer=new c.EventEmitter,this.observer.on(i.Events.FRAG_DECRYPTED,f),this.observer.on(i.Events.ERROR,f);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(d.enableWorker&&"undefined"!=typeof Worker){var g;o.logger.log("demuxing in webworker");try{g=this.worker=r(/*! ../demux/transmuxer-worker.ts */"./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(t){e.trigger(i.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(t.message+" ("+t.filename+":"+t.lineno+")")})},g.postMessage({cmd:"init",typeSupported:p,vendor:m,id:t,config:JSON.stringify(d)})}catch(e){o.logger.warn("Error in worker:",e),o.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new a.default(this.observer,p,d,m,t),this.worker=null}}else this.transmuxer=new a.default(this.observer,p,d,m,t)}var t=e.prototype;return t.destroy=function(){var e=this.worker;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.worker=null;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var n=this.observer;n&&n.removeAllListeners(),this.observer=null},t.push=function(e,t,n,r,i,s,l,c,u,h){var d=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,m=s?s.start:i.start,g=i.decryptdata,v=this.frag,y=!(v&&i.cc===v.cc),b=!(v&&u.level===v.level),x=v?u.sn-v.sn:-1,w=this.part?u.part-this.part.index:1,C=!b&&(1===x||0===x&&1===w),E=self.performance.now();(b||x||0===i.stats.parsing.start)&&(i.stats.parsing.start=E),!s||!w&&C||(s.stats.parsing.start=E);var k=new a.TransmuxState(y,C,c,b,m);if(!C||y){o.logger.log("[transmuxer-interface, "+i.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: "+m);var S=new a.TransmuxConfig(n,r,t,l,h);this.configureTransmuxer(S)}if(this.frag=i,this.part=s,p)p.postMessage({cmd:"demux",data:e,decryptdata:g,chunkMeta:u,state:k},e instanceof ArrayBuffer?[e]:[]);else if(f){var O=f.push(e,g,u,k);Object(a.isPromise)(O)?O.then((function(e){d.handleTransmuxComplete(e)})):this.handleTransmuxComplete(O)}},t.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:e});else if(n){var i=n.flush(e);Object(a.isPromise)(i)?i.then((function(n){t.handleFlushResult(n,e)})):this.handleFlushResult(i,e)}},t.handleFlushResult=function(e,t){var n=this;e.forEach((function(e){n.handleTransmuxComplete(e)})),this.onFlush(t)},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},t.configureTransmuxer=function(e){var t=this.worker,n=this.transmuxer;t?t.postMessage({cmd:"configure",config:e}):n&&n.configure(e)},t.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},e}()},"./src/demux/transmuxer-worker.ts": +/*!****************************************!*\ + !*** ./src/demux/transmuxer-worker.ts ***! + \****************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return s}));var r=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function s(e){var t=new o.EventEmitter,n=function(t,n){e.postMessage({event:t,data:n})};t.on(i.Events.FRAG_DECRYPTED,n),t.on(i.Events.ERROR,n),e.addEventListener("message",(function(i){var o=i.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);e.transmuxer=new r.default(t,o.typeSupported,s,o.vendor,o.id),Object(a.enableLogs)(s.debug),n("init",null);break;case"configure":e.transmuxer.configure(o.config);break;case"demux":var c=e.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(r.isPromise)(c)?c.then((function(t){l(e,t)})):l(e,c);break;case"flush":var h=o.chunkMeta,d=e.transmuxer.flush(h);Object(r.isPromise)(d)?d.then((function(t){u(e,t,h)})):u(e,d,h)}}))}function l(e,t){if((n=t.remuxResult).audio||n.video||n.text||n.id3||n.initSegment){var n,r=[],i=t.remuxResult,a=i.audio,o=i.video;a&&c(r,a),o&&c(r,o),e.postMessage({event:"transmuxComplete",data:t},r)}}function c(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function u(e,t,n){t.forEach((function(t){l(e,t)})),e.postMessage({event:"flush",data:n})}},"./src/demux/transmuxer.ts": +/*!*********************************!*\ + !*** ./src/demux/transmuxer.ts ***! + \*********************************/ +/*! exports provided: default, isPromise, TransmuxConfig, TransmuxState */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return y})),n.d(t,"isPromise",(function(){return x})),n.d(t,"TransmuxConfig",(function(){return w})),n.d(t,"TransmuxState",(function(){return C}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),s=n(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.ts"),l=n(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.ts"),c=n(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.ts"),u=n(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.ts"),h=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),d=n(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.ts"),f=n(/*! ./chunk-cache */"./src/demux/chunk-cache.ts"),p=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),m=n(/*! ../utils/logger */"./src/utils/logger.ts");try{r=self.performance.now.bind(self.performance)}catch(e){m.logger.debug("Unable to use Performance API on this environment"),r=self.Date.now}var g=[{demux:c.default,remux:h.default},{demux:l.default,remux:d.default},{demux:s.default,remux:h.default},{demux:u.default,remux:h.default}],v=1024;g.forEach((function(e){var t=e.demux;v=Math.max(v,t.minProbeByteLength)}));var y=function(){function e(e,t,n,r,i){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=e,this.typeSupported=t,this.config=n,this.vendor=r,this.id=i}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(e,t,n,i){var a=this,o=n.transmuxing;o.executeStart=r();var s=new Uint8Array(e),l=this.cache,c=this.config,u=this.currentTransmuxState,h=this.transmuxConfig;i&&(this.currentTransmuxState=i);var d=function(e,t){var n=null;return e.byteLength>0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(n=t),n}(s,t);if(d&&"AES-128"===d.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(s,d.key.buffer,d.iv.buffer).then((function(e){var t=a.push(e,null,n);return a.decryptionPromise=null,t})),this.decryptionPromise;var m=f.softwareDecrypt(s,d.key.buffer,d.iv.buffer);if(!m)return o.executeEnd=r(),b(n);s=new Uint8Array(m)}var g=i||u,v=g.contiguous,y=g.discontinuity,x=g.trackSwitch,w=g.accurateTimeOffset,C=g.timeOffset,E=h.audioCodec,k=h.videoCodec,S=h.defaultInitPts,O=h.duration,T=h.initSegmentData;if((y||x)&&this.resetInitSegment(T,E,k,O),y&&this.resetInitialTimestamp(S),v||this.resetContiguity(),this.needsProbing(s,y,x)){if(l.dataLength){var _=l.flush();s=Object(p.appendUint8Array)(_,s)}this.configureTransmuxer(s,h)}var A=this.transmux(s,d,C,w,n),L=this.currentTransmuxState;return L.contiguous=!0,L.discontinuity=!1,L.trackSwitch=!1,o.executeEnd=r(),A},t.flush=function(e){var t=this,n=e.transmuxing;n.executeStart=r();var o=this.decrypter,s=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return t.flush(e)}));var u=[],h=l.timeOffset;if(o){var d=o.flush();d&&u.push(this.push(d,null,e))}var f=s.dataLength;s.reset();var p=this.demuxer,m=this.remuxer;if(!p||!m)return f>=v&&this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),n.executeEnd=r(),[b(e)];var g=p.flush(h);return x(g)?g.then((function(n){return t.flushRemux(u,n,e),u})):(this.flushRemux(u,g,e),u)},t.flushRemux=function(e,t,n){var i=t.audioTrack,a=t.avcTrack,o=t.id3Track,s=t.textTrack,l=this.currentTransmuxState,c=l.accurateTimeOffset,u=l.timeOffset;m.logger.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var h=this.remuxer.remux(i,a,o,s,u,c,!0,this.id);e.push({remuxResult:h,chunkMeta:n}),n.transmuxing.executeEnd=r()},t.resetInitialTimestamp=function(e){var t=this.demuxer,n=this.remuxer;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,n,r){var i=this.demuxer,a=this.remuxer;i&&a&&(i.resetInitSegment(t,n,r),a.resetInitSegment(e,t,n))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(e,t,n,r,i){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,r,i):this.transmuxUnencrypted(e,n,r,i)},t.transmuxUnencrypted=function(e,t,n,r){var i=this.demuxer.demux(e,t,!1,!this.config.progressive),a=i.audioTrack,o=i.avcTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(a,o,s,l,t,n,!1,this.id),chunkMeta:r}},t.transmuxSampleAes=function(e,t,n,r,i){var a=this;return this.demuxer.demuxSampleAes(e,t,n).then((function(e){return{remuxResult:a.remuxer.remux(e.audioTrack,e.avcTrack,e.id3Track,e.textTrack,n,r,!1,a.id),chunkMeta:i}}))},t.configureTransmuxer=function(e,t){for(var n,r=this.config,i=this.observer,a=this.typeSupported,o=this.vendor,s=t.audioCodec,c=t.defaultInitPts,u=t.duration,h=t.initSegmentData,f=t.videoCodec,p=0,v=g.length;p>4>1){if((L=T+5+t[T+4])===T+188)continue}else L=T+4;switch(A){case f:_&&(p&&(a=v(p))&&this.parseAVCPES(a,!1),p={data:[],size:0}),p&&(p.data.push(t.subarray(L,T+188)),p.size+=T+188-L);break;case y:_&&(x&&(a=v(x))&&(s.isAAC?this.parseAACPES(a):this.parseMPEGPES(a)),x={data:[],size:0}),x&&(x.data.push(t.subarray(L,T+188)),x.size+=T+188-L);break;case b:_&&(w&&(a=v(w))&&this.parseID3PES(a),w={data:[],size:0}),w&&(w.data.push(t.subarray(L,T+188)),w.size+=T+188-L);break;case 0:_&&(L+=t[L]+1),k=this._pmtId=m(t,L);break;case k:_&&(L+=t[L]+1);var D=g(t,L,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,r);(f=D.avc)>0&&(o.pid=f),(y=D.audio)>0&&(s.pid=y,s.isAAC=D.isAAC),(b=D.id3)>0&&(d.pid=b),C&&!E&&(u.logger.log("reparse from beginning"),C=!1,T=O-188),E=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,s.pesData=x,d.pesData=w;var R={audioTrack:s,avcTrack:o,id3Track:d,textTrack:this._txtTrack};return i&&this.extractRemainingSamples(R),R},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,n=e.audioTrack,r=e.avcTrack,i=e.id3Track,a=r.pesData,o=n.pesData,s=i.pesData;a&&(t=v(a))?(this.parseAVCPES(t,!0),r.pesData=null):r.pesData=a,o&&(t=v(o))?(n.isAAC?this.parseAACPES(t):this.parseMPEGPES(t),n.pesData=null):(null!=o&&o.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=o),s&&(t=v(s))?(this.parseID3PES(t),i.pesData=null):i.pesData=s},t.demuxSampleAes=function(e,t,n){var r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new s.default(this.observer,this.config,t);return this.decrypt(r,i)},t.decrypt=function(e,t){return new Promise((function(n){var r=e.audioTrack,i=e.avcTrack;r.samples&&r.isAAC?t.decryptAacSamples(r.samples,0,(function(){i.samples?t.decryptAvcSamples(i.samples,0,0,(function(){n(e)})):n(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(function(){n(e)}))}))},t.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},t.parseAVCPES=function(e,t){var n,r=this,i=this._avcTrack,s=this.parseAVCNALu(e.data),l=this.avcSample,c=!1;e.data=null,l&&s.length&&!i.audFound&&(y(l,i),l=this.avcSample=p(!1,e.pts,e.dts,"")),s.forEach((function(t){switch(t.type){case 1:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.frame=!0;var s=t.data;if(c&&s.length>4){var u=new a.default(s).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(l.key=!0)}break;case 5:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:n=!0;var h=new a.default(x(t.data));h.readUByte();for(var d=0,f=0,m=!1,g=0;!m&&h.bytesAvailable>1;){d=0;do{d+=g=h.readUByte()}while(255===g);f=0;do{f+=g=h.readUByte()}while(255===g);if(4===d&&0!==h.bytesAvailable){if(m=!0,181===h.readUByte()&&49===h.readUShort()&&1195456820===h.readUInt()&&3===h.readUByte()){for(var v=h.readUByte(),w=31&v,C=[v,h.readUByte()],E=0;E16){for(var k=[],S=0;S<16;S++)k.push(h.readUByte().toString(16)),3!==S&&5!==S&&7!==S&&9!==S||k.push("-");for(var O=f-16,T=new Uint8Array(O),_=0;_=0){var h={data:e.subarray(c,l-a-1),type:u};s.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)),(n=l-a-1)>0)){var f=new Uint8Array(d.data.byteLength+n);f.set(d.data,0),f.set(e.subarray(0,n),d.data.byteLength),d.data=f,d.state=0}}l=0&&a>=0){var p={data:e.subarray(c,r),type:u,state:a};s.push(p)}if(0===s.length){var m=this.getLastNalUnit();if(m){var g=new Uint8Array(m.data.byteLength+e.byteLength);g.set(m.data,0),g.set(e,m.data.byteLength),m.data=g}}return i.naluState=a,s},t.parseAACPES=function(e){var t,n,i,a,o,s=0,c=this._audioTrack,d=this.aacOverFlow,f=e.data;if(d){this.aacOverFlow=null;var p=d.sample.unit.byteLength,m=Math.min(d.missing,p),g=p-m;d.sample.unit.set(f.subarray(0,m),g),c.samples.push(d.sample),s=d.missing}for(t=s,n=f.length;t1;){var l=new Uint8Array(s[0].length+s[1].length);l.set(s[0]),l.set(s[1],s[0].length),s[0]=l,s.splice(1,1)}if(1===((t=s[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;var c=t[7];192&c&&(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&c?i-(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(u.logger.warn(Math.round((i-a)/9e4)+"s delta between PTS and DTS, align them"),i=a):a=i);var h=(r=t[8])+9;if(e.size<=h)return null;e.size-=h;for(var d=new Uint8Array(e.size),f=0,p=s.length;fm){h-=m;continue}t=t.subarray(h),m-=h,h=0}d.set(t,o),o+=m}return n&&(n-=r+3),{data:d,pts:i,dts:a,len:n}}return null}function y(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var n=t.samples,r=n.length;if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}t.samples.push(e)}e.debug.length&&u.logger.log(e.pts+"/"+e.dts+":"+e.debug)}function b(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var r=n-1;r>=0;r--)if(t.ptst)return r;return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{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(t.prototype,n),y&&v(t,y),e}();y.defaultConfig=void 0},"./src/is-supported.ts": +/*!*****************************!*\ + !*** ./src/is-supported.ts ***! + \*****************************/ +/*! exports provided: isSupported, changeTypeSupported */function(e,t,n){"use strict";n.r(t),n.d(t,"isSupported",(function(){return a})),n.d(t,"changeTypeSupported",(function(){return o}));var r=n(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function i(){return self.SourceBuffer||self.WebKitSourceBuffer}function a(){var e=Object(r.getMediaSource)();if(!e)return!1;var t=i(),n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),a=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!a}function o(){var e,t=i();return"function"==typeof(null==t||null===(e=t.prototype)||void 0===e?void 0:e.changeType)}},"./src/loader/fragment-loader.ts": +/*!***************************************!*\ + !*** ./src/loader/fragment-loader.ts ***! + \***************************************/ +/*! exports provided: default, LoadError */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h})),n.d(t,"LoadError",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../errors */"./src/errors.ts");function a(e){var t="function"==typeof Map?new Map:void 0;return(a=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return o(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,e)})(e)}function o(e,t,n){return(o=s()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&l(i,n.prototype),i}).apply(null,arguments)}function s(){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}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=Math.pow(2,17),h=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var n=this,r=e.url;if(!r)return Promise.reject(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(r?"part list":"url")));this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(r,l){n.loader&&n.loader.destroy();var c=n.loader=e.loader=o?new o(a):new s(a),h=d(e),p={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=c.stats,c.load(h,p,{onSuccess:function(t,i,a,o){n.resetLoader(e,c),r({frag:e,part:null,payload:t.data,networkDetails:o})},onError:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:a}))},onAbort:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:a}))},onTimeout:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:a}))},onProgress:function(n,r,i,a){t&&t({frag:e,part:null,payload:i,networkDetails:a})}})}))},t.loadPart=function(e,t,n){var r=this;this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(l,c){r.loader&&r.loader.destroy();var h=r.loader=e.loader=o?new o(a):new s(a),p=d(e,t),m={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=h.stats,h.load(p,m,{onSuccess:function(i,a,o,s){r.resetLoader(e,h),r.updateStatsFromPart(e,t);var c={frag:e,part:t,payload:i.data,networkDetails:s};n(c),l(c)},onError:function(n,a,o){r.resetLoader(e,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:n,networkDetails:o}))},onAbort:function(n,a,o){e.stats.aborted=t.stats.aborted,r.resetLoader(e,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:o}))},onTimeout:function(n,a,o){r.resetLoader(e,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,networkDetails:o}))}})}))},t.updateStatsFromPart=function(e,t){var n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){var a=Math.round(e.duration/t.duration),o=Math.min(Math.round(n.loaded/i),a),s=(a-o)*Math.round(n.loaded/o);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,c=r.loading;l.start?l.first+=c.first-c.start:(l.start=c.start,l.first=c.first),l.end=c.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function d(e,t){void 0===t&&(t=null);var n=t||e,i={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},a=n.byteRangeStartOffset,o=n.byteRangeEndOffset;return Object(r.isFiniteNumber)(a)&&Object(r.isFiniteNumber)(o)&&(i.rangeStart=a,i.rangeEnd=o),i}var f=function(e){var t,n;function r(t){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a>8*(15-n)&255;return t},n.setDecryptDataFromLevelKey=function(e,t){var n=e;return"AES-128"===(null==e?void 0:e.method)&&e.uri&&!e.iv&&((n=s.LevelKey.fromURI(e.uri)).method=e.method,n.iv=this.createInitializationVector(t),n.keyFormat="identity"),n},n.setElementaryStreamInfo=function(e,t,n,r,i,a){void 0===a&&(a=!1);var o=this.elementaryStreams,s=o[e];s?(s.startPTS=Math.min(s.startPTS,t),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,r),s.endDTS=Math.max(s.endDTS,i)):o[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:a}},n.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[r.AUDIO]=null,e[r.VIDEO]=null,e[r.AUDIOVIDEO]=null},d(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(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'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(i.isFiniteNumber)(this.programDateTime))return null;var e=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;return!(null===(e=this.decryptdata)||void 0===e||!e.keyFormat||!this.decryptdata.uri)}}]),t}(f),m=function(e){function t(t,n,r,i,a){var o;(o=e.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=t.decimalFloatingPoint("DURATION"),o.gap=t.bool("GAP"),o.independent=t.bool("INDEPENDENT"),o.relurl=t.enumeratedString("URI"),o.fragment=n,o.index=i;var s=t.enumeratedString("BYTERANGE");return s&&o.setByteRange(s,a),a&&(o.fragOffset=a.fragOffset+a.duration),o}return c(t,e),d(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(f)},"./src/loader/key-loader.ts": +/*!**********************************!*\ + !*** ./src/loader/key-loader.ts ***! + \**********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=function(){function e(e){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){this.hls.on(r.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(r.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){for(var e in this._unregisterListeners(),this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={}},t.onKeyLoading=function(e,t){var n=t.frag,i=n.type,o=this.loaders[i];if(n.decryptdata){var s=n.decryptdata.uri;if(s!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(o&&(a.logger.warn("abort previous key loader for type:"+i),o.abort()),!s)return void a.logger.warn("key uri is falsy");var c=l.loader,u=n.loader=this.loaders[i]=new c(l);this.decrypturl=s,this.decryptkey=null;var h={url:s,frag:n,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&&(n.decryptdata.key=this.decryptkey,this.hls.trigger(r.Events.KEY_LOADED,{frag:n}))}else a.logger.warn("Missing decryption data on fragment in onKeyLoading")},t.loadsuccess=function(e,t,n){var i=n.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(r.Events.KEY_LOADED,{frag:i})):a.logger.error("after key load, decryptdata unset")},t.loaderror=function(e,t){var n=t.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})},t.loadtimeout=function(e,t){var n=t.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},e}()},"./src/loader/level-details.ts": +/*!*************************************!*\ + !*** ./src/loader/level-details.ts ***! + \*************************************/ +/*! exports provided: LevelDetails */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelDetails",(function(){return a}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function i(e,t){for(var n=0;ne.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},t=e,(n=[{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 e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!==(e=this.fragments)&&void 0!==e&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&i(t.prototype,n),a&&i(t,a),e}()},"./src/loader/level-key.ts": +/*!*********************************!*\ + !*** ./src/loader/level-key.ts ***! + \*********************************/ +/*! exports provided: LevelKey */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelKey",(function(){return a}));var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js");function i(e,t){for(var n=0;n2){var n=t.shift()+".";return n+=parseInt(t.shift()).toString(16),n+=("000"+parseInt(t.shift()).toString(16)).substr(-4)}return e},e.resolve=function(e,t){return i.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var r,i=[],a={},o=!1;for(h.lastIndex=0;null!=(r=h.exec(t));)if(r[1]){var s=new l.AttrList(r[1]),c={attrs:s,bitrate:s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),name:s.NAME,url:e.resolve(r[2],n)},u=s.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((s.CODECS||"").split(/[ ,]+/).filter((function(e){return e})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=e.convertAVC1ToAVCOTI(c.videoCodec)),i.push(c)}else if(r[3]){var d=new l.AttrList(r[3]);d["DATA-ID"]&&(o=!0,a[d["DATA-ID"]]=d)}return{levels:i,sessionData:o?a:null}},e.parseMasterPlaylistMedia=function(t,n,r,i){var a;void 0===i&&(i=[]);var o=[],s=0;for(d.lastIndex=0;null!==(a=d.exec(t));){var c=new l.AttrList(a[1]);if(c.TYPE===r){var u={attrs:c,bitrate:0,id:s++,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?e.resolve(c.URI,n):""};if(i.length){var h=e.findGroup(i,u.groupId)||i[0];y(u,h,"audioCodec"),y(u,h,"textCodec")}o.push(u)}}return o},e.parseLevelPlaylist=function(e,t,n,u,h){var d,g,v,y=new o.LevelDetails(t),x=y.fragments,w=null,C=0,E=0,k=0,S=0,O=null,T=new a.Fragment(u,t),_=-1,A=!1;for(f.lastIndex=0,y.m3u8=e;null!==(d=f.exec(e));){A&&(A=!1,(T=new a.Fragment(u,t)).start=k,T.sn=C,T.cc=S,T.level=n,w&&(T.initSegment=w,T.rawProgramDateTime=w.rawProgramDateTime));var L=d[1];if(L){T.duration=parseFloat(L);var D=(" "+d[2]).slice(1);T.title=D||null,T.tagList.push(D?["INF",L,D]:["INF",L])}else if(d[3])Object(r.isFiniteNumber)(T.duration)&&(T.start=k,v&&(T.levelkey=v),T.sn=C,T.level=n,T.cc=S,T.urlId=h,x.push(T),T.relurl=(" "+d[3]).slice(1),b(T,O),O=T,k+=T.duration,C++,E=0,A=!0);else if(d[4]){var R=(" "+d[4]).slice(1);O?T.setByteRange(R,O):T.setByteRange(R)}else if(d[5])T.rawProgramDateTime=(" "+d[5]).slice(1),T.tagList.push(["PROGRAM-DATE-TIME",T.rawProgramDateTime]),-1===_&&(_=x.length);else{if(!(d=d[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(g=1;g-1){c.logger.warn("Keyformat "+Y+" is not supported from the manifest");continue}if("identity"!==Y)continue;z&&(v=s.LevelKey.fromURL(t,V),V&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(z)>=0&&(v.method=z,v.keyFormat=Y,K&&(v.keyID=K),G&&(v.keyFormatVersions=G),v.iv=W));break;case"START":var q=new l.AttrList(I).decimalFloatingPoint("TIME-OFFSET");Object(r.isFiniteNumber)(q)&&(y.startTimeOffset=q);break;case"MAP":var X=new l.AttrList(I);T.relurl=X.URI,X.BYTERANGE&&T.setByteRange(X.BYTERANGE),T.level=n,T.sn="initSegment",v&&(T.levelkey=v),T.initSegment=null,w=T,A=!0;break;case"SERVER-CONTROL":var $=new l.AttrList(I);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 J=new l.AttrList(I);y.partTarget=J.decimalFloatingPoint("PART-TARGET");break;case"PART":var Z=y.partList;Z||(Z=y.partList=[]);var Q=E>0?Z[Z.length-1]:void 0,ee=E++,te=new a.Part(new l.AttrList(I),T,t,ee,Q);Z.push(te),T.duration+=te.duration;break;case"PRELOAD-HINT":var ne=new l.AttrList(I);y.preloadHint=ne;break;case"RENDITION-REPORT":var re=new l.AttrList(I);y.renditionReports=y.renditionReports||[],y.renditionReports.push(re);break;default:c.logger.warn("line parsed but not handled: "+d)}}}O&&!O.relurl?(x.pop(),k-=O.duration,y.partList&&(y.fragmentHint=O)):y.partList&&(b(T,O),T.cc=S,y.fragmentHint=T);var ie=x.length,ae=x[0],oe=x[ie-1];if((k+=y.skippedSegments*y.targetduration)>0&&ie&&oe){y.averagetargetduration=k/ie;var se=oe.sn;y.endSN="initSegment"!==se?se:0,ae&&(y.startCC=ae.cc,ae.initSegment||y.fragments.every((function(e){return e.relurl&&(t=e.relurl,m.test(null!=(n=null===(r=i.parseURL(t))||void 0===r?void 0:r.path)?n:""));var t,n,r}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(T=new a.Fragment(u,t)).relurl=oe.relurl,T.level=n,T.sn="initSegment",ae.initSegment=T,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(k+=y.fragmentHint.duration),y.totalduration=k,y.endCC=S,_>0&&function(e,t){for(var n=e[t],r=t;r--;){var i=e[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(x,_),y},e}();function v(e,t){["video","audio","text"].forEach((function(n){var r=e.filter((function(e){return Object(u.isCodecType)(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}function y(e,t,n){var r=t[n];r&&(e[n]=r)}function b(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Object(r.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts": +/*!***************************************!*\ + !*** ./src/loader/playlist-loader.ts ***! + \***************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=n(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function h(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}var d=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.hls=e,this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return e.loader=i,this.loaders[e.type]=i,i},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var n=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:n,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var n=t.id,r=t.level,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:null,level:r,responseType:"text",type:c.PlaylistContextType.LEVEL,url:i,deliveryDirectives:a})},t.onAudioTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:a})},t.onSubtitleTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:a})},t.load=function(e){var t,n,r,i,a,s,l=this.hls.config,u=this.getInternalLoader(e);if(u){var h=u.context;if(h&&h.url===e.url)return void o.logger.trace("[playlist-loader]: playlist request ongoing");o.logger.log("[playlist-loader]: aborting previous loader for type: "+e.type),u.abort()}switch(e.type){case c.PlaylistContextType.MANIFEST:n=l.manifestLoadingMaxRetry,r=l.manifestLoadingTimeOut,i=l.manifestLoadingRetryDelay,a=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:n=0,r=l.levelLoadingTimeOut;break;default:n=l.levelLoadingMaxRetry,r=l.levelLoadingTimeOut,i=l.levelLoadingRetryDelay,a=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(e),null!==(t=e.deliveryDirectives)&&void 0!==t&&t.part&&(e.type===c.PlaylistContextType.LEVEL&&null!==e.level?s=this.hls.levels[e.level].details:e.type===c.PlaylistContextType.AUDIO_TRACK&&null!==e.id?s=this.hls.audioTracks[e.id].details:e.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==e.id&&(s=this.hls.subtitleTracks[e.id].details),s)){var d=s.partTarget,f=s.targetduration;d&&f&&(r=Math.min(1e3*Math.max(3*d,.8*f),r))}var p={timeout:r,maxRetry:n,retryDelay:i,maxRetryDelay:a,highWaterMark:0},m={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(e,p,m)},t.loadsuccess=function(e,t,n,r){if(void 0===r&&(r=null),n.isSidxRequest)return this.handleSidxRequest(e,n),void this.handlePlaylistLoaded(e,t,n,r);this.resetInternalLoader(n.type);var i=e.data;0===i.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(e,t,n,r):this.handleMasterPlaylist(e,t,n,r)):this.handleManifestParsingError(e,n,"no EXTM3U delimiter",r)},t.loaderror=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!1,e)},t.loadtimeout=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!0)},t.handleMasterPlaylist=function(e,t,n,r){var a=this.hls,s=e.data,c=h(e,n),d=l.default.parseMasterPlaylist(s,c),f=d.levels,p=d.sessionData;if(f.length){var m=f.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),g=f.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),v=l.default.parseMasterPlaylistMedia(s,c,"AUDIO",m),y=l.default.parseMasterPlaylistMedia(s,c,"SUBTITLES",g),b=l.default.parseMasterPlaylistMedia(s,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(e){return!e.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:""}))),a.trigger(i.Events.MANIFEST_LOADED,{levels:f,audioTracks:v,subtitles:y,captions:b,url:c,stats:t,networkDetails:r,sessionData:p})}else this.handleManifestParsingError(e,n,"no level found in manifest",r)},t.handleTrackOrLevelPlaylist=function(e,t,n,o){var s=this.hls,d=n.id,f=n.level,p=n.type,m=h(e,n),g=Object(r.isFiniteNumber)(d)?d:0,v=Object(r.isFiniteNumber)(f)?f:g,y=function(e){switch(e.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(n),b=l.default.parseLevelPlaylist(e.data,m,v,y,g);if(b.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var x={attrs:new u.AttrList({}),bitrate:0,details:b,name:"",url:m};s.trigger(i.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:m,stats:t,networkDetails:o,sessionData:null})}if(t.parsing.end=performance.now(),b.needSidxRanges){var w,C=null===(w=b.fragments[0].initSegment)||void 0===w?void 0:w.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 n.levelDetails=b,this.handlePlaylistLoaded(e,t,n,o)}else s.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:m,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},t.handleSidxRequest=function(e,t){var n=Object(s.parseSegmentIndex)(new Uint8Array(e.data));if(n){var r=n.references,i=t.levelDetails;r.forEach((function(e,t){var r=e.info,a=i.fragments[t];0===a.byteRange.length&&a.setByteRange(String(1+r.end-r.start)+"@"+String(r.start)),a.initSegment&&a.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}))}},t.handleManifestParsingError=function(e,t,n,r){this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===c.PlaylistContextType.MANIFEST,url:e.url,reason:n,response:e,context:t,networkDetails:r})},t.handleNetworkError=function(e,t,n,r){void 0===n&&(n=!1),o.logger.warn("[playlist-loader]: A network "+(n?"timeout":"error")+" occurred while loading "+e.type+" level: "+e.level+" id: "+e.id+' group-id: "'+e.groupId+'"');var s=a.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(e);switch(e.type){case c.PlaylistContextType.MANIFEST:s=n?a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:a.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:s=n?a.ErrorDetails.LEVEL_LOAD_TIMEOUT:a.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:s=n?a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:s=n?a.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:a.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(e.type);var h={type:a.ErrorTypes.NETWORK_ERROR,details:s,fatal:l,url:e.url,loader:u,context:e,networkDetails:t};r&&(h.response=r),this.hls.trigger(i.Events.ERROR,h)},t.handlePlaylistLoaded=function(e,t,n,r){var a=n.type,o=n.level,s=n.id,l=n.groupId,u=n.loader,h=n.levelDetails,d=n.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)),a){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(i.Events.LEVEL_LOADED,{details:h,level:o||0,id:s||0,stats:t,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(i.Events.AUDIO_TRACK_LOADED,{details:h,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(i.Events.SUBTITLE_TRACK_LOADED,{details:h,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:d})}}else this.handleManifestParsingError(e,n,"invalid target duration",r)},e}();t.default=d},"./src/polyfills/number.ts": +/*!*********************************!*\ + !*** ./src/polyfills/number.ts ***! + \*********************************/ +/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(e,t,n){"use strict";n.r(t),n.d(t,"isFiniteNumber",(function(){return r})),n.d(t,"MAX_SAFE_INTEGER",(function(){return i}));var r=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},i=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts": +/*!*********************************!*\ + !*** ./src/remux/aac-helper.ts ***! + \*********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(){}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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===t)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===t)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===t)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===t)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])}},e}();t.default=r},"./src/remux/mp4-generator.ts": +/*!************************************!*\ + !*** ./src/remux/mp4-generator.ts ***! + \************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=Math.pow(2,32)-1,i=function(){function e(){}return e.init=function(){var t;for(t in e.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:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=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]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t=8,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=255&t,s.set(e,4),a=0,t=8;a>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var i=Math.floor(n/(r+1)),a=Math.floor(n%(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,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,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 e.box(e.types.mvhd,o)},e.sdtp=function(t){var n,r,i=t.samples||[],a=new Uint8Array(4+i.length);for(n=0;n>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,c=t.height,u=t.pixelRatio[0],h=t.pixelRatio[1];return e.box(e.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]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,h>>24,h>>16&255,h>>8&255,255&h])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,i=t.duration*t.timescale,a=t.width,o=t.height,s=Math.floor(i/(r+1)),l=Math.floor(i%(r+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,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,a>>8&255,255&a,0,0,o>>8&255,255&o,0,0]))},e.traf=function(t,n){var i=e.sdtp(t),a=t.id,o=Math.floor(n/(r+1)),s=Math.floor(n%(r+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,i.length+16+20+8+16+8+8),i)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,a,o,s,l,c=t.samples||[],u=c.length,h=12+16*u,d=new Uint8Array(h);for(n+=8+h,d.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,d)},e.initSegment=function(t){e.types||e.init();var n=e.moov(t),r=new Uint8Array(e.FTYP.byteLength+n.byteLength);return r.set(e.FTYP),r.set(n,e.FTYP.byteLength),r},e}();i.types=void 0,i.HDLR_TYPES=void 0,i.STTS=void 0,i.STSC=void 0,i.STCO=void 0,i.STSZ=void 0,i.VMHD=void 0,i.SMHD=void 0,i.STSD=void 0,i.FTYP=void 0,i.DINF=void 0,t.default=i},"./src/remux/mp4-remuxer.ts": +/*!**********************************!*\ + !*** ./src/remux/mp4-remuxer.ts ***! + \**********************************/ +/*! exports provided: default, normalizePts */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return m})),n.d(t,"normalizePts",(function(){return g}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./aac-helper */"./src/remux/aac-helper.ts"),a=n(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),o=n(/*! ../events */"./src/events.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/logger */"./src/utils/logger.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function h(){return(h=Object.assign||function(e){for(var t=1;t0?e:n.pts}),e[0].pts);return t&&l.logger.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,i,a,o,s){var u,h,d,f,p,m,v=i,y=i,b=e.pid>-1,x=t.pid>-1,w=t.samples.length,C=e.samples.length>0,E=w>1;if((!b||C)&&(!x||E)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(e,t,i));var k=this.isVideoContiguous,S=-1;if(E&&(S=function(e){for(var t=0;t0){l.logger.warn("[mp4-remuxer]: Dropped "+S+" out of "+w+" video samples due to a missing keyframe");var O=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(S),t.dropped+=S,y+=(t.samples[0].pts-O)/(t.timescale||9e4)}else-1===S&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+w+" video samples"),m=!1);if(this.ISGenerated){if(C&&E){var T=this.getVideoStartPts(t.samples),_=(g(e.samples[0].pts,T)-T)/t.inputTimeScale;v+=Math.max(0,_),y+=Math.max(0,-_)}if(C){if(e.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(e,t,i)),h=this.remuxAudio(e,v,this.isAudioContiguous,a,x||E||s===c.PlaylistLevelType.AUDIO?y:void 0),E){var A=h?h.endPTS-h.startPTS:0;t.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(e,t,i)),u=this.remuxVideo(t,y,k,A)}}else E&&(u=this.remuxVideo(t,y,k,0));u&&(u.firstKeyFrame=S,u.independent=-1!==S)}}return this.ISGenerated&&(n.samples.length&&(p=this.remuxID3(n,i)),r.samples.length&&(f=this.remuxText(r,i))),{audio:h,video:u,initSegment:d,independent:m,text:f,id3:p}},t.generateIS=function(e,t,n){var i,o,s,l=e.samples,c=t.samples,u=this.typeSupported,h={},d=!Object(r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(i=o=1/0),e.config&&l.length&&(e.timescale=e.samplerate,e.isAAC||(u.mpeg?(f="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3")),h.audio={id:"audio",container:f,codec:e.codec,initSegment:!e.isAAC&&u.mpeg?new Uint8Array(0):a.default.initSegment([e]),metadata:{channelCount:e.channelCount}},d&&(s=e.inputTimeScale,i=o=l[0].pts-Math.round(s*n))),t.sps&&t.pps&&c.length&&(t.timescale=t.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:a.default.initSegment([t]),metadata:{width:t.width,height:t.height}},d)){s=t.inputTimeScale;var p=this.getVideoStartPts(c),m=Math.round(s*n);o=Math.min(o,g(c[0].dts,p)-m),i=Math.min(i,p-m)}if(Object.keys(h).length)return this.ISGenerated=!0,d&&(this._initPTS=i,this._initDTS=o),{tracks:h,initPTS:i,timescale:s}},t.remuxVideo=function(e,t,n,r){var i,c,f,m=e.inputTimeScale,y=e.samples,b=[],x=y.length,w=this._initPTS,C=this.nextAvcDts,E=8,k=Number.POSITIVE_INFINITY,S=Number.NEGATIVE_INFINITY,O=0,T=!1;n&&null!==C||(C=t*m-(y[0].pts-g(y[0].dts,y[0].pts)));for(var _=0;_A.pts&&(O=Math.max(Math.min(O,A.pts-A.dts),-18e3)),A.dts0?_-1:_].dts&&(T=!0)}T&&y.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),c=y[0].dts,f=y[y.length-1].dts;var L=Math.round((f-c)/(x-1));if(O<0){if(O<-2*L){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-L,!0)+" ms");for(var D=O,R=0;RL;if(j||I<-1){j?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(I,!0)+" ms ("+I+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-I,!0)+" ms ("+I+"dts) overlapping between fragments detected"),c=C;var N=y[0].pts-I;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)(I,!0)+" ms")}}p&&(c=Math.max(0,c));for(var P=0,F=0,B=0;B0?q-1:q].dts;if(re.stretchShortVideoTrack&&null!==this.nextAudioPts){var ae=Math.floor(re.maxBufferHole*m),oe=(r?k+r*m:this.nextAudioPts)-X.pts;oe>ae?((i=oe-ie)<0&&(i=ie),l.logger.log("[mp4-remuxer]: It is approximately "+oe/90+" ms to the next segment; using duration "+i/90+" ms for the last video frame.")):i=ie}else i=ie}var se=Math.round(X.pts-X.dts);b.push(new v(X.key,i,J,se))}if(b.length&&d&&d<70){var le=b[0].flags;le.dependsOn=2,le.isNonSync=0}console.assert(void 0!==i,"mp4SampleDuration must be computed"),this.nextAvcDts=C=f+i,this.isVideoContiguous=!0;var ce={data1:a.default.moof(e.sequenceNumber++,c,h({},e,{samples:b})),data2:G,startPTS:k/m,endPTS:(S+i)/m,startDTS:c/m,endDTS:C/m,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:e.dropped};return e.samples=[],e.dropped=0,console.assert(G.length,"MDAT length must not be zero"),ce},t.remuxAudio=function(e,t,n,r,c){var u=e.inputTimeScale,d=u/(e.samplerate?e.samplerate:u),f=e.isAAC?1024:1152,p=f*d,m=this._initPTS,y=!e.isAAC&&this.typeSupported.mpeg,b=[],x=e.samples,w=y?0:8,C=this.nextAudioPts||-1,E=t*u;if(this.isAudioContiguous=n=n||x.length&&C>0&&(r&&Math.abs(E-C)<9e3||Math.abs(g(x[0].pts-m,E)-C)<20*p),x.forEach((function(e){e.pts=g(e.pts-m,E)})),!n||C<0){if(!(x=x.filter((function(e){return e.pts>=0}))).length)return;C=0===c?0:r?Math.max(0,E):x[0].pts}if(e.isAAC)for(var k=void 0!==c,S=this.config.maxAudioFramesDrift,O=0,T=C;O=S*p&&D<1e4&&k){var R=Math.round(L/p);(T=A-R*p)<0&&(R--,T+=p),0===O&&(this.nextAudioPts=C=T),l.logger.warn("[mp4-remuxer]: Injecting "+R+" audio frame @ "+(T/u).toFixed(3)+"s due to "+Math.round(1e3*L/u)+" ms gap.");for(var M=0;M0))return;B+=w;try{N=new Uint8Array(B)}catch(e){return void this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:B,reason:"fail allocating audio mdat "+B})}y||(new DataView(N.buffer).setUint32(0,B),N.set(a.default.types.mdat,4))}N.set(W,w);var K=W.byteLength;w+=K,b.push(new v(!0,f,K,0)),F=G}var Y=b.length;if(Y){var q=b[b.length-1];this.nextAudioPts=C=F+d*q.duration;var X=y?new Uint8Array(0):a.default.moof(e.sequenceNumber++,P/d,h({},e,{samples:b}));e.samples=[];var $=P/u,J=C/u,Z={data1:X,data2:N,startPTS:$,endPTS:J,startDTS:$,endDTS:J,type:"audio",hasAudio:!0,hasVideo:!1,nb:Y};return this.isAudioContiguous=!0,console.assert(N.length,"MDAT length must not be zero"),Z}},t.remuxEmptyAudio=function(e,t,n,r){var a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),s=this.nextAudioPts,c=(null!==s?s:r.startDTS*a)+this._initDTS,u=r.endDTS*a+this._initDTS,h=1024*o,d=Math.ceil((u-c)/h),f=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var p=[],m=0;m4294967296;)e+=n;return e}var v=function(e,t,n,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=n,this.cts=r,this.flags=new y(e)},y=function(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}},"./src/remux/passthrough-remuxer.ts": +/*!******************************************!*\ + !*** ./src/remux/passthrough-remuxer.ts ***! + \******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),a=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=function(){function e(){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 t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this.initPTS=e,this.lastEndDTS=null},t.resetNextTimestamp=function(){this.lastEndDTS=null},t.resetInitSegment=function(e,t,n){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(e),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,n=this.videoCodec;if(!e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=Object(i.parseInitSegment)(e);t||(t=c(r.audio,a.ElementaryStreamTypes.AUDIO)),n||(n=c(r.video,a.ElementaryStreamTypes.VIDEO));var s={};r.audio&&r.video?s.audiovideo={container:"video/mp4",codec:t+","+n,initSegment:e,id:"main"}:r.audio?s.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?s.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:o.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s},t.remux=function(e,t,n,a,s){var c=this.initPTS,u=this.lastEndDTS,h={audio:void 0,video:void 0,text:a,id3:n,initSegment:void 0};Object(r.isFiniteNumber)(u)||(u=this.lastEndDTS=s||0);var d=t.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 m=Object(i.getDuration)(d,p),g=u,v=m+g;Object(i.offsetStartDTS)(p,d,c),m>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 w={data1:d,startPTS:g,startDTS:g,endPTS:v,endDTS:v,type:x,hasAudio:y,hasVideo:b,nb:1,dropped:0};return h.audio="audio"===w.type?w:void 0,h.video="audio"!==w.type?w:void 0,h.text=a,h.id3=n,h.initSegment=f,h},e}(),l=function(e,t,n){return Object(i.getStartDTS)(e,t)-n};function c(e,t){var n=null==e?void 0:e.codec;return n&&n.length>4?n:"hvc1"===n?"hvc1.1.c.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||t===a.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}t.default=s},"./src/task-loop.ts": +/*!**************************!*\ + !*** ./src/task-loop.ts ***! + \**************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},t.onHandlerDestroyed=function(){},t.hasInterval=function(){return!!this._tickInterval},t.hasNextTick=function(){return!!this._tickTimer},t.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},t.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},t.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},t.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},t.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},t.doTick=function(){},e}()},"./src/types/cmcd.ts": +/*!***************************!*\ + !*** ./src/types/cmcd.ts ***! + \***************************/ +/*! exports provided: CMCDVersion, CMCDObjectType, CMCDStreamingFormat, CMCDStreamType */function(e,t,n){"use strict";n.r(t),n.d(t,"CMCDVersion",(function(){return o})),n.d(t,"CMCDObjectType",(function(){return r})),n.d(t,"CMCDStreamingFormat",(function(){return i})),n.d(t,"CMCDStreamType",(function(){return a}));var r,i,a,o=1;!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(r||(r={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(i||(i={})),function(e){e.VOD="v",e.LIVE="l"}(a||(a={}))},"./src/types/level.ts": +/*!****************************!*\ + !*** ./src/types/level.ts ***! + \****************************/ +/*! exports provided: HlsSkip, getSkipValue, HlsUrlParameters, Level */function(e,t,n){"use strict";function r(e,t){for(var n=0;nNumber.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;rNumber.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var n=this[e];return n?parseFloat(n):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=r.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(i.lastIndex=0;null!==(t=i.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n},e}()},"./src/utils/binary-search.ts": +/*!************************************!*\ + !*** ./src/utils/binary-search.ts ***! + \************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={search:function(e,t){for(var n=0,r=e.length-1,i=null,a=null;n<=r;){var o=t(a=e[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null}}},"./src/utils/buffer-helper.ts": +/*!************************************!*\ + !*** ./src/utils/buffer-helper.ts ***! + \************************************/ +/*! exports provided: BufferHelper */function(e,t,n){"use strict";n.r(t),n.d(t,"BufferHelper",(function(){return a}));var r=n(/*! ./logger */"./src/utils/logger.ts"),i={length:0,start:function(){return 0},end:function(){return 0}},a=function(){function e(){}return e.isBuffered=function(t,n){try{if(t)for(var r=e.getBuffered(t),i=0;i=r.start(i)&&n<=r.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(t,n,r){try{if(t){var i,a=e.getBuffered(t),o=[];for(i=0;io&&(r[a-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,c=t,u=t,h=0;h=d&&t=e&&i.logger.log(this.time+" ["+e+"] "+t)},e}(),f=function(e){for(var t=[],n=0;n100&&(this.logger.log(r.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n=144&&this.backSpace();var t=o(e);this.pos>=100?this.logger.log(r.ERROR,"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<100;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<100;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),v=function(){function e(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var t=0;t<15;t++)this.rows.push(new g(e));this.logger=e,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<15;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(r.INFO,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(r.INFO,"pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),y=function(){function e(e,t,n){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=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new v(n),this.nonDisplayedMemory=new v(n),this.lastOutputScreen=new v(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var t=e.prototype;return t.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},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(r.INFO,"MODE="+e),"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=e)},t.insertChars=function(e){for(var t=0;t=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(r.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),b=function(){function e(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new d;this.channels=[null,new y(e,t,r),new y(e+1,n,r)],this.cmdHistory={a:null,b:null},this.logger=r}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,i,a,o=!1;this.logger.time=e;for(var s=0;s ("+f([i,a])+")"),(n=this.parseCmd(i,a))||(n=this.parseMidrow(i,a)),n||(n=this.parsePAC(i,a)),n||(n=this.parseBackgroundAttributes(i,a)),!n&&(o=this.parseChars(i,a))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(o):this.logger.log(r.WARNING,"No channel found yet. TEXT-MODE?")}n||o||this.logger.log(r.WARNING,"Couldn't parse cleaned data "+f([i,a])+" orig: "+f([t[s],t[s+1]]))}},t.parseCmd=function(e,t){var n=this.cmdHistory;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(w(e,t,n))return x(null,null,n),this.logger.log(r.DEBUG,"Repeated command ("+f([e,t])+") is dropped"),!0;var i=20===e||21===e||23===e?1:2,a=this.channels[i];return 20===e||21===e||28===e||29===e?32===t?a.ccRCL():33===t?a.ccBS():34===t?a.ccAOF():35===t?a.ccAON():36===t?a.ccDER():37===t?a.ccRU(2):38===t?a.ccRU(3):39===t?a.ccRU(4):40===t?a.ccFON():41===t?a.ccRDC():42===t?a.ccTR():43===t?a.ccRTD():44===t?a.ccEDM():45===t?a.ccCR():46===t?a.ccENM():47===t&&a.ccEOC():a.ccTO(t-32),x(e,t,n),this.currentChannel=i,!0},t.parseMidrow=function(e,t){var n=0;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currentChannel)return this.logger.log(r.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[n];return!!i&&(i.ccMIDROW(t),this.logger.log(r.DEBUG,"MIDROW ("+f([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var n,r=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(w(e,t,r))return x(null,null,r),!0;var i=e<=23?1:2;n=t>=64&&t<=95?1===i?s[e]:c[e]:1===i?l[e]:u[e];var a=this.channels[i];return!!a&&(a.setPAC(this.interpretPAC(n,t)),x(e,t,r),this.currentChannel=i,!0)},t.interpretPAC=function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.parseChars=function(e,t){var n,i,a=null,s=null;if(e>=25?(n=2,s=e-8):(n=1,s=e),s>=17&&s<=19?(i=17===s?t+80:18===s?t+112:t+144,this.logger.log(r.INFO,"Special char '"+o(i)+"' in channel "+n),a=[i]):e>=32&&e<=127&&(a=0===t?[e]:[e,t]),a){var l=f(a);this.logger.log(r.DEBUG,"Char codes = "+l.join(",")),x(e,t,this.cmdHistory)}return a},t.parseBackgroundAttributes=function(e,t){var n;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=h[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));var i=e<=23?1:2;return this.channels[i].setBkgData(r),x(e,t,this.cmdHistory),!0},t.reset=function(){for(var e=0;e=16?h--:h++;var v=Object(r.fixLineBreaks)(d.trim()),y=Object(i.generateCueId)(t,n,v);e&&e.cues&&e.cues.getCueById(y)||((c=new p(t,n,v)).id=y,c.line=m+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*h/32)),f.push(c))}return e&&f.length&&(f.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),f.forEach((function(t){return Object(a.addCueToTrack)(e,t)}))),f}};t.default=s},"./src/utils/discontinuities.ts": +/*!**************************************!*\ + !*** ./src/utils/discontinuities.ts ***! + \**************************************/ +/*! exports provided: findFirstFragWithCC, shouldAlignOnDiscontinuities, findDiscontinuousReferenceFrag, adjustSlidingStart, alignStream, alignPDT, alignFragmentByPDTDelta, alignMediaPlaylistByPDT */function(e,t,n){"use strict";n.r(t),n.d(t,"findFirstFragWithCC",(function(){return o})),n.d(t,"shouldAlignOnDiscontinuities",(function(){return s})),n.d(t,"findDiscontinuousReferenceFrag",(function(){return l})),n.d(t,"adjustSlidingStart",(function(){return u})),n.d(t,"alignStream",(function(){return h})),n.d(t,"alignPDT",(function(){return d})),n.d(t,"alignFragmentByPDTDelta",(function(){return f})),n.d(t,"alignMediaPlaylistByPDT",(function(){return p}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./logger */"./src/utils/logger.ts"),a=n(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function o(e,t){for(var n=null,r=0,i=e.length;rn.startCC||e&&e.cc=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();t.default=i},"./src/utils/ewma.ts": +/*!***************************!*\ + !*** ./src/utils/ewma.ts ***! + \***************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}();t.default=r},"./src/utils/fetch-loader.ts": +/*!***********************************!*\ + !*** ./src/utils/fetch-loader.ts ***! + \***********************************/ +/*! exports provided: fetchSupported, default */function(e,t,n){"use strict";n.r(t),n.d(t,"fetchSupported",(function(){return d}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=n(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function o(e){var t="function"==typeof Map?new Map:void 0;return(o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)})(e)}function s(e,t,n){return(s=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&c(i,n.prototype),i}).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(e){return!1}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(){return(h=Object.assign||function(e){for(var t=1;t=r&&i(t,n,o.flush(),e)):i(t,n,l,e),a()})).catch((function(){return Promise.reject()}))}()},e}();function p(e,t){return new self.Request(e.url,t)}var m=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r}(o(Error));t.default=f},"./src/utils/imsc1-ttml-parser.ts": +/*!****************************************!*\ + !*** ./src/utils/imsc1-ttml-parser.ts ***! + \****************************************/ +/*! exports provided: IMSC1_CODEC, parseIMSC1 */function(e,t,n){"use strict";n.r(t),n.d(t,"IMSC1_CODEC",(function(){return u})),n.d(t,"parseIMSC1",(function(){return p}));var r=n(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),i=n(/*! ./vttparser */"./src/utils/vttparser.ts"),a=n(/*! ./vttcue */"./src/utils/vttcue.ts"),o=n(/*! ../demux/id3 */"./src/demux/id3.ts"),s=n(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=n(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function c(){return(c=Object.assign||function(e){for(var t=1;t"):r}function s(e){if(self.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function h(e,t){var n,r,i,a=[];if(!t.length)return a;"data"in e?(n=e.data,r=e.start,i=e.end):(r=0,i=(n=e).byteLength);for(var l=r;l1?l+u:i;if(s(n.subarray(l+4,l+8))===t[0])if(1===t.length)a.push({data:n,start:l+8,end:d});else{var f=h({data:n,start:l+8,end:d},t.slice(1));f.length&&o.apply(a,f)}l=d}return a}function d(e){var t=h(e,["moov"])[0],n=t?t.end:null,r=h(e,["sidx"]);if(!r||!r[0])return null;var i=[],a=r[0],o=a.data[0],s=0===o?8:16,u=c(a,s);s+=4,s+=0===o?8:16,s+=2;var d=a.end+0,f=l(a,s);s+=2;for(var p=0;p>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(a,m);m+=4,i.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/u,start:d,end:d+v-1}}),d+=v,s=m+=4}return{earliestPresentationTime:0,timescale:u,version:o,referencesCount:f,references:i,moovEndOffset:n}}function f(e){for(var t=[],n=h(e,["moov","trak"]),r=0;re)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[]},e}()},"./src/utils/texttrack-utils.ts": +/*!**************************************!*\ + !*** ./src/utils/texttrack-utils.ts ***! + \**************************************/ +/*! exports provided: sendAddTrackEvent, addCueToTrack, clearCurrentCues, removeCuesInRange, getCuesInRange */function(e,t,n){"use strict";n.r(t),n.d(t,"sendAddTrackEvent",(function(){return i})),n.d(t,"addCueToTrack",(function(){return a})),n.d(t,"clearCurrentCues",(function(){return o})),n.d(t,"removeCuesInRange",(function(){return s})),n.d(t,"getCuesInRange",(function(){return l}));var r=n(/*! ./logger */"./src/utils/logger.ts");function i(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function a(e,t){var n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(n){r.logger.debug("[texttrack-utils]: "+n);var i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}"disabled"===n&&(e.mode=n)}function o(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var n=e.cues.length;n--;)e.removeCue(e.cues[n]);"disabled"===t&&(e.mode=t)}function s(e,t,n){var r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var i=l(e.cues,t,n),a=0;ae[n].endTime)return-1;for(var r=0,i=n;r<=i;){var a=Math.floor((i+r)/2);if(te[a].startTime&&r-1)for(var a=i,o=e.length;a=t&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}},"./src/utils/time-ranges.ts": +/*!**********************************!*\ + !*** ./src/utils/time-ranges.ts ***! + \**********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={toString:function(e){for(var t="",n=e.length,r=0;r1?t-1:0),r=1;r100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return x},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");x=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},l,{get:function(){return w},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");w=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},l,{get:function(){return C},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");C=t,this.hasBeenReset=!0}})),s.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}()},"./src/utils/vttparser.ts": +/*!********************************!*\ + !*** ./src/utils/vttparser.ts ***! + \********************************/ +/*! exports provided: parseTimeStamp, fixLineBreaks, VTTParser */function(e,t,n){"use strict";n.r(t),n.d(t,"parseTimeStamp",(function(){return a})),n.d(t,"fixLineBreaks",(function(){return h})),n.d(t,"VTTParser",(function(){return d}));var r=n(/*! ./vttcue */"./src/utils/vttcue.ts"),i=function(){function e(){}return e.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},e}();function a(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+parseFloat(r||0)}var n=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?t(n[2],n[3],0,n[4]):t(n[1],n[2],n[3],n[4]):null}var o=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,n){for(var r=0;r=0&&n<=100)return this.set(e,n),!0}return!1},e}();function s(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}var l=new r.default(0,0,""),c="middle"===l.align?"middle":"center";function u(e,t,n){var r=e;function i(){var t=a(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=i(),u(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),u(),t.endTime=i(),u(),function(e,t){var r=new o;s(e,(function(e,t){var i;switch(e){case"region":for(var a=n.length-1;a>=0;a--)if(n[a].id===t){r.set(e,n[a].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),r.integer(e,i[0]),r.percent(e,i[0])&&r.set("snapToLines",!1),r.alt(e,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",c,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",c,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===l.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",c);var a=r.get("position","auto");"auto"===a&&50===l.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function h(e){return e.replace(//gi,"\n")}var d=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new i,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=h(e);n>>0).toString()};function h(e,t,n){return u(e.toString())+u(t.toString())+u(n)}function d(e,t,n,u,d,f,p,m){var g,v=new i.VTTParser,y=Object(a.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(l,"\n").split("\n"),b=[],x=Object(o.toMpegTsClockFromTimescale)(t,n),w="00:00.000",C=0,E=0,k=!0,S=!1;v.oncue=function(e){var t=u[d],n=u.ccOffset,r=(C-x)/9e4;if(null!=t&&t.new&&(void 0!==E?n=u.ccOffset=t.start:function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;null!==(a=i)&&void 0!==a&&a.new;){var a;e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC]}e.presentationOffset=n}(u,d,r)),r&&(n=r-u.presentationOffset),S){var i=e.endTime-e.startTime,a=Object(s.normalizePts)(9e4*(e.startTime+n-E),9e4*f)/9e4;e.startTime=a,e.endTime=a+i}var o=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(o)),e.id||(e.id=h(e.startTime,e.endTime,o)),e.endTime>0&&b.push(e)},v.onparsingerror=function(e){g=e},v.onflush=function(){g?m(g):p(b)},y.forEach((function(e){if(k){if(c(e,"X-TIMESTAMP-MAP=")){k=!1,S=!0,e.substr(16).split(",").forEach((function(e){c(e,"LOCAL:")?w=e.substr(6):c(e,"MPEGTS:")&&(C=parseInt(e.substr(7)))}));try{E=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),i=parseInt(e.substr(-9,2)),a=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(r.isFiniteNumber)(t)&&Object(r.isFiniteNumber)(n)&&Object(r.isFiniteNumber)(i)&&Object(r.isFiniteNumber)(a)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,t+=6e4*i,t+=36e5*a}(w)/1e3}catch(e){S=!1,g=e}return}""===e&&(k=!1)}v.parse(e+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts": +/*!*********************************!*\ + !*** ./src/utils/xhr-loader.ts ***! + \*********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=/^age:\s*[\d.]+\s*$/m,o=function(){function e(e){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=e?e.xhrSetup:null,this.stats=new i.LoadStats,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e=this.config,t=this.context;if(e){var n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(n,t.url)}catch(e){n.open("GET",t.url,!0),i(n,t.url)}n.readyState||n.open("GET",t.url,!0);var a=this.context.headers;if(a)for(var o in a)n.setRequestHeader(o,a[o])}catch(e){return void this.callbacks.onError({code:n.status,text:e.message},t,n)}t.rangeEnd&&n.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),n.onreadystatechange=this.readystatechange.bind(this),n.onprogress=this.loadprogress.bind(this),n.responseType=t.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.timeout),n.send()}},t.readystatechange=function(){var e=this.context,t=this.loader,n=this.stats;if(e&&t){var i=t.readyState,a=this.config;if(!n.aborted&&i>=2)if(self.clearTimeout(this.requestTimeout),0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start)),4===i){t.onreadystatechange=null,t.onprogress=null;var o=t.status;if(o>=200&&o<300){var s,l;if(n.loading.end=Math.max(self.performance.now(),n.loading.first),l="arraybuffer"===e.responseType?(s=t.response).byteLength:(s=t.responseText).length,n.loaded=n.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(n,e,s,t),!this.callbacks)return;var u={url:t.responseURL,data:s};this.callbacks.onSuccess(u,n,e,t)}else n.retry>=a.maxRetry||o>=400&&o<499?(r.logger.error(o+" while loading "+e.url),this.callbacks.onError({code:o,text:t.statusText},e,t)):(r.logger.warn(o+" while loading "+e.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),n.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)}},t.loadtimeout=function(){r.logger.warn("timeout while loading "+this.context.url);var e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&a.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},e}();t.default=o}}).default},e.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(e,t,n){e.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF: +/*!********************************************************!*\ + !*** ./node_modules/rc-table/es/Table.js + 17 modules ***! + \********************************************************/ +/*! exports provided: INTERNAL_HOOKS, default */ +/*! exports used: INTERNAL_HOOKS, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ +/*! 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/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-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 */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */ +/*! 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/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return Z}));var r=n("rePB"),i=n("VTBJ"),a=n("KQm4"),o=n("U8pU"),s=n("ODXe"),l=n("q1tI"),c=n("TSYQ"),u=n.n(c),h=n("Gytx"),d=n.n(h),f=n("Kwbf"),p=n("t23M"),m=n("qx4F"),g=n("6eGT"),v=n("IBYe"),y=n("Ff2n"),b=n("c+Xe"),x=n("fyJ8"),w=n("biw7");function C(e,t,n,r,i){var a,o,s=n[e]||{},l=n[t]||{};"left"===s.fixed?a=r.left[e]:"right"===l.fixed&&(o=r.right[t]);var c=!1,u=!1,h=!1,d=!1,f=n[t+1],p=n[e-1];if("rtl"===i){if(void 0!==a)d=!(p&&"left"===p.fixed);else if(void 0!==o){h=!(f&&"right"===f.fixed)}}else if(void 0!==a){c=!(f&&"left"===f.fixed)}else if(void 0!==o){u=!(p&&"right"===p.fixed)}return{fixLeft:a,fixRight:o,lastFixLeft:c,firstFixRight:u,lastFixRight:h,firstFixLeft:d,isSticky:r.isSticky}}var E=n("sR1s");function k(e){var t,n=e.cells,r=e.stickyOffsets,i=e.flattenColumns,a=e.rowComponent,o=e.cellComponent,s=e.onHeaderRow,c=e.index,u=l.useContext(w.a),h=u.prefixCls,d=u.direction;s&&(t=s(n.map((function(e){return e.column})),c));var f=Object(E.a)(n.map((function(e){return e.column})));return l.createElement(a,Object.assign({},t),n.map((function(e,t){var n,a=e.column,s=C(e.colStart,e.colEnd,i,r,d);return a&&a.onHeaderCell&&(n=e.column.onHeaderCell(a)),l.createElement(x.a,Object.assign({},e,{ellipsis:a.ellipsis,align:a.align,component:o,prefixCls:h,key:f[t]},s,{additionalProps:n,rowType:"header"}))})))}k.displayName="HeaderRow";var S=k;var O=function(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,i=e.onHeaderRow,a=l.useContext(w.a),o=a.prefixCls,s=a.getComponent,c=l.useMemo((function(){return function(e){var t=[];!function e(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[i]=t[i]||[];var a=r,o=n.filter(Boolean).map((function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:a},o=1,s=n.children;return s&&s.length>0&&(o=e(s,a,i+1).reduce((function(e,t){return e+t}),0),r.hasSubColumns=!0),"colSpan"in n&&(o=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=o,r.colEnd=r.colStart+o-1,t[i].push(r),a+=o,o}));return o}(e,0);for(var n=t.length,r=function(e){t[e].forEach((function(t){"rowSpan"in t||t.hasSubColumns||(t.rowSpan=n-e)}))},i=0;i=0;a-=1){var o=t[a],s=n&&n[a],c=s&&s[T.a];(o||c||i)&&(r.unshift(l.createElement("col",Object.assign({key:a,style:{width:o,minWidth:o}},c))),i=!0)}return l.createElement("colgroup",null,r)};var A=l.forwardRef((function(e,t){var n=e.noData,o=e.columns,s=e.flattenColumns,c=e.colWidths,h=e.columCount,d=e.stickyOffsets,f=e.direction,p=e.fixHeader,m=e.offsetHeader,g=e.stickyClassName,v=e.onScroll,x=Object(y.a)(e,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),C=l.useContext(w.a),E=C.prefixCls,k=C.scrollbarSize,S=C.isSticky,T=S&&!p?0:k,A=l.useRef(null),L=l.useCallback((function(e){Object(b.b)(t,e),Object(b.b)(A,e)}),[]);l.useEffect((function(){var e;function t(e){var t=e.currentTarget,n=e.deltaX;n&&(v({currentTarget:t,scrollLeft:t.scrollLeft+n}),e.preventDefault())}return null===(e=A.current)||void 0===e||e.addEventListener("wheel",t),function(){var e;null===(e=A.current)||void 0===e||e.removeEventListener("wheel",t)}}),[]);var D=s[s.length-1],R={fixed:D?D.fixed:null,onHeaderCell:function(){return{className:"".concat(E,"-cell-scrollbar")}}},M=Object(l.useMemo)((function(){return T?[].concat(Object(a.a)(o),[R]):o}),[T,o]),I=Object(l.useMemo)((function(){return T?[].concat(Object(a.a)(s),[R]):s}),[T,s]),j=Object(l.useMemo)((function(){var e=d.right,t=d.left;return Object(i.a)(Object(i.a)({},d),{},{left:"rtl"===f?[].concat(Object(a.a)(t.map((function(e){return e+T}))),[0]):t,right:"rtl"===f?e:[].concat(Object(a.a)(e.map((function(e){return e+T}))),[0]),isSticky:S})}),[T,d,S]),N=function(e,t){return Object(l.useMemo)((function(){for(var n=[],r=0;r1?n-1:0),a=1;a=p&&(r=p-g),c({scrollLeft:r/p*(f+2)}),E.current.x=e.pageX}else O&&T(!1)},L=function(){var e=Object(q.b)(o.current).top,t=e+o.current.offsetHeight,n=document.documentElement.scrollTop+window.innerHeight;t-Object(m.a)()<=n||e>=n-h?C((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!0})})):C((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!1})}))},D=function(e){C((function(t){return Object(i.a)(Object(i.a)({},t),{},{scrollLeft:e/f*p||0})}))};return l.useImperativeHandle(t,(function(){return{setScrollLeft:D}})),l.useEffect((function(){var e=Object(Y.a)(document.body,"mouseup",_,!1),t=Object(Y.a)(document.body,"mousemove",A,!1);return L(),function(){e.remove(),t.remove()}}),[g,O]),l.useEffect((function(){var e=Object(Y.a)(window,"scroll",L,!1),t=Object(Y.a)(window,"resize",L,!1);return function(){e.remove(),t.remove()}}),[]),l.useEffect((function(){x.isHiddenScrollBar||C((function(e){var t,n;return Object(i.a)(Object(i.a)({},e),{},{scrollLeft:o.current.scrollLeft/(null===(t=o.current)||void 0===t?void 0:t.scrollWidth)*(null===(n=o.current)||void 0===n?void 0:n.clientWidth)})}))}),[x.isHiddenScrollBar]),f<=p||!g||x.isHiddenScrollBar?null:l.createElement("div",{style:{height:Object(m.a)(),width:p,bottom:h},className:"".concat(d,"-sticky-scroll")},l.createElement("div",{onMouseDown:function(e){e.persist(),E.current.delta=e.pageX-x.scrollLeft,E.current.x=0,T(!0),e.preventDefault()},ref:v,className:u()("".concat(d,"-sticky-scroll-bar"),Object(r.a)({},"".concat(d,"-sticky-scroll-bar-active"),O)),style:{width:"".concat(g,"px"),transform:"translate3d(".concat(x.scrollLeft,"px, 0, 0)")}}))}));var $=[],J={},Z="rc-table-internal-hook",Q=l.memo((function(e){return e.children}),(function(e,t){return!!d()(e.props,t.props)&&(e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight)}));function ee(e){var t,n=e.prefixCls,c=e.className,h=e.rowClassName,d=e.style,g=e.data,v=e.rowKey,y=e.scroll,b=e.tableLayout,x=e.direction,k=e.title,S=e.footer,A=e.summary,R=e.id,M=e.showHeader,I=e.components,N=e.emptyText,P=e.onRow,H=e.onHeaderRow,U=e.internalHooks,Y=e.transformColumns,q=e.internalRefs,ee=e.sticky,te=g||$,ne=!!te.length,re=l.useState(0),ie=Object(s.a)(re,2),ae=ie[0],oe=ie[1];l.useEffect((function(){oe(Object(m.a)())}));var se,le,ce,ue=l.useMemo((function(){return Object(E.c)(I,{})}),[I]),he=l.useCallback((function(e,t){return Object(E.b)(ue,e)||t}),[ue]),de=l.useMemo((function(){return"function"==typeof v?v:function(e){return e&&e[v]}}),[v]),fe=Object(T.c)(e),pe=fe.expandIcon,me=fe.expandedRowKeys,ge=fe.defaultExpandedRowKeys,ve=fe.defaultExpandAllRows,ye=fe.expandedRowRender,be=fe.onExpand,xe=fe.onExpandedRowsChange,we=fe.expandRowByClick,Ce=fe.rowExpandable,Ee=fe.expandIconColumnIndex,ke=fe.expandedRowClassName,Se=fe.childrenColumnName,Oe=fe.indentSize,Te=pe||K,_e=Se||"children",Ae=l.useMemo((function(){return ye?"row":!!(e.expandable&&U===Z&&e.expandable.__PARENT_RENDER_ICON__||te.some((function(e){return e&&"object"===Object(o.a)(e)&&e[_e]})))&&"nest"}),[!!ye,te]),Le=l.useState((function(){return ge||(ve?function(e,t,n){var r=[];return function e(i){(i||[]).forEach((function(i,a){r.push(t(i,a)),e(i[n])}))}(e),r}(te,de,_e):[])})),De=Object(s.a)(Le,2),Re=De[0],Me=De[1],Ie=l.useMemo((function(){return new Set(me||Re||[])}),[me,Re]),je=l.useCallback((function(e){var t,n=de(e,te.indexOf(e)),r=Ie.has(n);r?(Ie.delete(n),t=Object(a.a)(Ie)):t=[].concat(Object(a.a)(Ie),[n]),Me(t),be&&be(!r,e),xe&&xe(t)}),[de,Ie,te,be,xe]),Ne=l.useState(0),Pe=Object(s.a)(Ne,2),Fe=Pe[0],Be=Pe[1],He=Object(B.b)(Object(i.a)(Object(i.a)(Object(i.a)({},e),fe),{},{expandable:!!ye,expandedKeys:Ie,getRowKey:de,onTriggerExpand:je,expandIcon:Te,expandIconColumnIndex:Ee,direction:x}),U===Z?Y:null),Ue=Object(s.a)(He,2),ze=Ue[0],Ve=Ue[1],We=l.useMemo((function(){return{columns:ze,flattenColumns:Ve}}),[ze,Ve]),Ge=l.useRef(),Ke=l.useRef(),Ye=l.useRef(),qe=l.useState(!1),Xe=Object(s.a)(qe,2),$e=Xe[0],Je=Xe[1],Ze=l.useState(!1),Qe=Object(s.a)(Ze,2),et=Qe[0],tt=Qe[1],nt=z(new Map),rt=Object(s.a)(nt,2),it=rt[0],at=rt[1],ot=Object(E.a)(Ve).map((function(e){return it.get(e)})),st=l.useMemo((function(){return ot}),[ot.join("_")]),lt=V(st,Ve.length,x),ct=y&&Object(E.d)(y.y),ut=y&&Object(E.d)(y.x),ht=ut&&Ve.some((function(e){return e.fixed})),dt=l.useRef(),ft=function(e,t){return l.useMemo((function(){var n=!!e;return{isSticky:n,stickyClassName:n?"".concat(t,"-sticky-header"):"",offsetHeader:"object"===Object(o.a)(e)&&e.offsetHeader||0,offsetScroll:"object"===Object(o.a)(e)&&e.offsetScroll||0}}),[e,t])}(ee,n),pt=ft.isSticky,mt=ft.offsetHeader,gt=ft.offsetScroll,vt=ft.stickyClassName;ct&&(le={overflowY:"scroll",maxHeight:y.y}),ut&&(se={overflowX:"auto"},ct||(le={overflowY:"hidden"}),ce={width:!0===y.x?"auto":y.x,minWidth:"100%"});var yt=l.useCallback((function(e,t){at((function(n){var r=new Map(n);return r.set(e,t),r}))}),[]),bt=function(e){var t=Object(l.useRef)(e),n=Object(l.useRef)(null);function r(){window.clearTimeout(n.current)}return Object(l.useEffect)((function(){return r}),[]),[function(e){t.current=e,r(),n.current=window.setTimeout((function(){t.current=null,n.current=null}),100)},function(){return t.current}]}(null),xt=Object(s.a)(bt,2),wt=xt[0],Ct=xt[1];function Et(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e))}var kt=function(e){var t,n=e.currentTarget,r=e.scrollLeft,i="number"==typeof r?r:n.scrollLeft,a=n||J;Ct()&&Ct()!==a||(wt(a),Et(i,Ke.current),Et(i,Ye.current),Et(i,null===(t=dt.current)||void 0===t?void 0:t.setScrollLeft));if(n){var o=n.scrollWidth,s=n.clientWidth;Je(i>0),tt(i0?[].concat(Object(i.a)(e),Object(i.a)(h(o).map((function(e){return Object(a.a)({fixed:r},e)})))):[].concat(Object(i.a)(e),[Object(a.a)(Object(a.a)({},t),{},{fixed:r})])}),[])}t.b=function(e,t){var n=e.prefixCls,i=e.columns,l=e.children,d=e.expandable,f=e.expandedKeys,p=e.getRowKey,m=e.onTriggerExpand,g=e.expandIcon,v=e.rowExpandable,y=e.expandIconColumnIndex,b=e.direction,x=e.expandRowByClick,w=s.useMemo((function(){return i||u(l)}),[i,l]),C=s.useMemo((function(){if(d){var e,t=y||0,i=w[t],a=(e={},Object(r.a)(e,c.a,{className:"".concat(n,"-expand-icon-col")}),Object(r.a)(e,"title",""),Object(r.a)(e,"fixed",i?i.fixed:null),Object(r.a)(e,"className","".concat(n,"-row-expand-icon-cell")),Object(r.a)(e,"render",(function(e,t,r){var i=p(t,r),a=f.has(i),o=!v||v(t),l=g({prefixCls:n,expanded:a,expandable:o,record:t,onExpand:m});return x?s.createElement("span",{onClick:function(e){return e.stopPropagation()}},l):l})),e),o=w.slice();return t>=0&&o.splice(t,0,a),o}return w}),[d,w,p,f,g,b]),E=s.useMemo((function(){var e=C;return t&&(e=t(e)),e.length||(e=[{render:function(){return null}}]),e}),[t,C,b]),k=s.useMemo((function(){return"rtl"===b?function(e){return e.map((function(e){var t=e.fixed,n=Object(o.a)(e,["fixed"]),r=t;return"left"===t?r="right":"right"===t&&(r="left"),Object(a.a)({fixed:r},n)}))}(h(E)):h(E)}),[E,b]);return[E,k]}},wzkS: +/*!**************************************************!*\ + !*** ./src/pages/MoopCases/FormPanel/service.ts ***! + \**************************************************/ +/*! exports provided: getMoopCase, getLibraryTags, removeAttachment, addMoopCase, updateMoopCase */ +/*! exports used: addMoopCase, getLibraryTags, getMoopCase, removeAttachment, updateMoopCase */function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return c})),n.d(t,"a",(function(){return h})),n.d(t,"e",(function(){return d}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),a=n.n(i),o=n(/*! @/utils/fetch */"ErOA");function s(e){return Object(o.c)("libraries/".concat(e,".json"))}function l(){return Object(o.c)("library_tags.json")}function c(e){return u.apply(this,arguments)}function u(){return(u=Object(r.a)(a.a.mark((function e(t){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(o.b)("attachments/".concat(t,".json"));case 2:return n=e.sent,e.abrupt("return",0===n.status);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return Object(o.f)("libraries.json",e)}function d(e,t){return Object(o.g)("libraries/".concat(e,".json"),t)}},xOL1: +/*!**********************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/ShixunHomeworks/components/TrfList/delete.png ***! + \**********************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC"},"y0+3": +/*!********************************************!*\ + !*** ./node_modules/rc-util/es/Dom/css.js ***! + \********************************************/ +/*! exports provided: get, set, getOuterWidth, getOuterHeight, getDocSize, getClientSize, getScroll, getOffset */ +/*! exports used: getClientSize, getOffset */function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));function r(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function i(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}},y5JW: +/*!***********************************************!*\ + !*** ./src/components/SingleUpload/index.tsx ***! + \***********************************************/ +/*! exports provided: uploadNameSizeSeperator, bytesToSize, default */ +/*! exports used: bytesToSize, default, uploadNameSizeSeperator */function(e,t,n){"use strict";n.d(t,"c",(function(){return m})),n.d(t,"a",(function(){return g}));n(/*! antd/es/upload/style */"DZo9");var r=n(/*! antd/es/upload */"8z0m"),i=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),l=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),c=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),u=n.n(c),h=n(/*! react */"q1tI"),d=n.n(h),f=n(/*! @/utils/env */"m3rI"),p=n(/*! @/pages/MoopCases/FormPanel/service */"wzkS"),m="  ";function g(e){if(0==e)return"0 Byte";var t=parseInt(""+Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,t)).toFixed(1)+" "+["Bytes","KB","MB","GB","TB"][t]}t.b=function(e){var t,n=e.value,c=void 0===n?[]:n,h=(e.action,e.onChange),v=e.className,y=e.maxSize,b=void 0===y?150:y,x=e.title,w=void 0===x?"文件上传":x,C=e.accept,E={multiple:!1,fileList:c,accept:void 0===C?null:C,withCredentials:!0,beforeUpload:function(e){return e.size/1024/10240?"每次只能上传一个资源, 删除下面资源可重新上传 ":"",disabled:c.length>0,ghost:!0},w),d.a.createElement("span",{onClick:function(e){e.preventDefault(),e.stopPropagation()},style:{marginLeft:10}},"(单个文件最大",b,"M) ")))}}}]); \ No newline at end of file diff --git a/p__Classrooms__Lists__CommonHomework__Review__index.3e968cde.async.js b/p__Classrooms__Lists__CommonHomework__Review__index.3e968cde.async.js new file mode 100644 index 0000000000..9ae7d602f4 --- /dev/null +++ b/p__Classrooms__Lists__CommonHomework__Review__index.3e968cde.async.js @@ -0,0 +1,1011 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[51,5,6,7,9],{"+NIl": +/*!***************************************************!*\ + !*** ./node_modules/codemirror/mode/stex/stex.js ***! + \***************************************************/ +/*! no static exports found */ +/*! 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 a={};function s(t,e){t.f=e}function o(t,e){var n;if(t.match(/^\\[a-zA-Z@]+/)){var o=t.current().slice(1);return i(e,n=new(n=a.hasOwnProperty(o)?a[o]:a.DEFAULT)),s(e,c),n.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return s(e,(function(t,e){return l(t,e,"\\]")})),"keyword";if(t.match("\\("))return s(e,(function(t,e){return l(t,e,"\\)")})),"keyword";if(t.match("$$"))return s(e,(function(t,e){return l(t,e,"$$")})),"keyword";if(t.match("$"))return s(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),s(e,c),"bracket"):"error":"{"==u||"["==u?(i(e,n=new(n=a.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 s(e,o),"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),s(e,o),"bracket"):/[ \t\r]/.test(i)?(t.eat(i),null):(s(e,o),function(t){var e=t.cmdState.pop();e&&e.closeBracket()}(e),o(t,e))}return a.importmodule=n("importmodule","tag",["string","builtin"]),a.documentclass=n("documentclass","tag",["","atom"]),a.usepackage=n("usepackage","tag",["atom"]),a.begin=n("begin","tag",["atom"]),a.end=n("end","tag",["atom"]),a.label=n("label","tag",["atom"]),a.ref=n("ref","tag",["atom"]),a.eqref=n("eqref","tag",["atom"]),a.cite=n("cite","tag",["atom"]),a.bibitem=n("bibitem","tag",["atom"]),a.Bibitem=n("Bibitem","tag",["atom"]),a.RBibitem=n("RBibitem","tag",["atom"]),a.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)}:o}},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=o,t.cmdState.length=0},lineComment:"%"}})),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")}(i(/*! ../../lib/codemirror */"VrN/"))},"/GNS": +/*!*********************************************!*\ + !*** ./src/assets/images/icons/search1.png ***! + \*********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/search1.c4136dd4.png"},"19Vz": +/*!**************************************************************!*\ + !*** ./node_modules/codemirror/addon/display/placeholder.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! 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){a(t)&&i(t)}function n(t){var r=t.getWrapperElement(),n=a(t);r.className=r.className.replace(" CodeMirror-empty","")+(n?" CodeMirror-empty":""),n?i(t):e(t)}function a(t){return 1===t.lineCount()&&""===t.getLine(0)}t.defineOption("placeholder","",(function(a,s,o){var l=o&&o!=t.Init;if(s&&!l)a.on("blur",r),a.on("change",n),a.on("swapDoc",n),t.on(a.getInputField(),"compositionupdate",a.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)}(a)}),n(a);else if(!s&&l){a.off("blur",r),a.off("change",n),a.off("swapDoc",n),t.off(a.getInputField(),"compositionupdate",a.state.placeholderCompose),e(a);var c=a.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}s&&!a.hasFocus()&&r(a)}))}(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,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 a,s,o=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"):(a=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,a=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return a="equals",null;if("<"==n){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var s=e.tokenize(t,e);return s?s+" 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(),s="tag",C):l.allowMissingTagName&&"endTag"==t?(s="tag bracket",C(t,0,i)):(s="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?(s="tag",S):(s="tag error",E)}return l.allowMissingTagName&&"endTag"==t?(s="tag bracket",S(t,0,i)):(s="error",E)}function S(t,e,i){return"endTag"!=t?(s="error",S):(g(i),v)}function E(t,e,i){return s="error",S(t,0,i)}function C(t,e,i){if("word"==t)return s="attribute",k;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 s="error",C}function k(t,e,i){return"equals"==t?A:(l.allowMissing||(s="error"),C(t,0,i))}function A(t,e,i){return"string"==t?x:"word"==t&&l.allowUnquoted?(s="string",C):(s="error",C(t,0,i))}function x(t,e,i){return"string"==t?x: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;a=null;var i=e.tokenize(t,e);return(i||a)&&"comment"!=i&&(s=null,e.state=e.state(a||i,t,e),s&&(i="error"==s?i+" error":s)),i},indent:function(e,i,r){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+o;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+o*(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==A&&(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/"))},"4qgm": +/*!*********************************************!*\ + !*** ./src/assets/images/icons/tx-live.png ***! + \*********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH5ZbNED/R3+mYDHSL5kcqVLZOZB8imq/lvAWWHdWpOGySIqYEwvKk1mtsmtl5/M72WNk4Wf6dj8jIAqce1qGJEparsgSHQVoIar3M3GRadWnDp+rb5eyJi0RaykgCy47q9DS1srDUvLRzme+YFXhg5CY2YD4uf/RdVrROkffCGgk13vQTOrzdZZUKi8SmOCy1pMLUYfCDkfD7T+Cvl1PTckKNereENM1L6rFmaAc/PzRD3L6E9jlUabN+Swj2tfFB6o8Q7h0e/GQMPDcy9djBS7DjPJzthOJ+0lSPvzguyxonyz96E9mjwIpGHeGZ+lFYiEXMpP+ozQhcPgZmj7z95MUE1H8Ef7gIhnCszyXOPWqa5lWUDVcvsu3Mk5KrXsodEhUtOtNT6qwYj0allj2dXAIzvx+5CtvOwT9vQpEFVtTVMzuK8QJT1yY55HssbZ0sLd3N3LF+k47pZ70YcZS5WNj5UAsr0PS74cG+C/DLNrjppYTm0wKaSW7gUxvz2HL0q/Jpxs4tgeVN+rRvUWPF+Hx/qEURmOl7uh1ePweN11Iua+XjtsYLUjSP+BZLW0vlmLEvk07paK+LNWoxWwQxBXKhWm8u2n2MpA+/+S/suQDXvfxc1ti0ioIC/ybK5o5BbJbSJj1pD+HLXnu0DBlmEaIIzNjbfi6VhErydNeAmgX2MPCu8ZxMaNJptlBjSi6zv+VbKOcSHFVgwxXY/CFc6AI7Hzc14kzBni7xPJtFgZnxp/S+WJLFAsvEYWiko04vKMMKbOtK7Y9/+h/4mmchkFWkWz6VxyvkzYBm9vzKjmsFFnX9PfZkbPYl0BSVBy7CzvNwvqsfm3/WMct1WXUy65h1lyNMb9CS9iEsUouVls3w/tDsTeCZDjDxduhqKqHk5ZJpaprgQ/VZleug3KOnl/1dJ6QvjL4Z5uohbAx2+fBWG/ziY7icTFHLp4W96ug1lM3l0eCxvIhQicWIqBu/IbhyLDz7cErCiRup6qX5ej/2u4iXVaFyVdlxfUyFN0UojbJPGlozH4B5o+DAJfh1GxjR+VYs2deNFrx2vELa+qIfSqAxUtqkW61iXvY7+zJ55+/mFGHcsN0FJ8+a89Y1RoL3xWVF85TwF8ahBZY16RtSzEtRBRq5RmTogbqtn6GGh+vDThHiLWVyadYstffvl/Q1cu8LHnrc/giMxjzdOxNrCU6rsry1Qv5sflkQ1x8qjN5VJWvD2C2cQGMpwmG4t8lJUUAtobDds1l3coJcnVulox2LdU4xzyc62berWmbfG4GSKo80SVKK0gfjfIWaGDXFcoJW32dZ6yR5x4hYuEafUaixbcYaX3cT7NlVLfMGXGAmq4nPHlz2YvMjbJ41k4iSbYOSylBz6VThZ+2dbPzga3Jj4Todhcd6FZ4XAd8DJwZucqAF3q4gPgCWZ78GK2/S76nFBonxSKhzZfoc5ydpxGNpy2Q5HFCr0mew2WjZPOJmXZcMuMDgFZiPi1Dv3SRuXmTOqdWhRV28ZHkc3hGXw+VN+rAK67GYjWD1VCAYd/Q9borHZrWpaymTjoWv6igtZh0E59OAWnYbMIGljbrDGc4L3g3eRQNqB83A89bo4zb81HYodV06VKkb+S4b4/slMbFRn7JsaiTGF7JpZu5S/ARH8FjSMkUaja35cZ1lCTUBNXPwzhHLRmAywd7dcZlb2Bhs1C3EGNTlsOr0eLkyZ7kOdYawyoJXRCj2PDArbjvguRxVl1d2rZXGCa36oO2zBmWexLCD+ExwHai91M6WszOkc06Vfi5msc4QNzmrO7VsIbEiSCTYubtaXiiowNJmfcBssumVniGw2XaY6Jl3gN1W2oj0fTrUY9PIf7HB0Cxv0ifUZhF+SlxzuZy4i1ofV5NOyu5ltXiqvlL+VlCBGWNzV+vX7RgHnRj3JXPeRKZ6ZtP0fBbviacugTItoOakY60PasalLTuIx3dIsrh+rZwKIy6YR9iOmX7z6zUmbTwhQq1l82gugtk20zRvqrKJDrZeKaX9/vd42oIay7kzQ+aaS/C8x3WEtZc9tu2PS6TXPZEFZibx4w36YMKl2lRPIti9xY2haQh4LmcQbqBMSBPpcX2zPKDB91m8Oy4no8LIi2D3QRZW6Uxs6sLQtMzhNkfq724zTf2aKutH+rwej0gt217eBLONLKzWh8z/wWgImr1RCKgZ0h4N4rJk59pUIupPK4jAzAQWxPU7QJ3t8MW+YjMXNfW55ivriy+xbfv23C9ToootqEAzeEDTplqV+X3FZibbWqlE0iCwZOdr/adWcBfNtarzqvS7tkWt1QtNE2uGGrAhNpzXty8qDLV7IjBDUy3ioszHwspk2lux5tOgHkt3xaU1quuF7V9wF+2Rpk0dwjhTXypcQ9lYdD9bB4LaPSPYPdOqsAcYh8336yulOSyF/vT7P83Gv9qVBJysAAAAAElFTkSuQmCC"},"4u4S": +/*!*********************************************!*\ + !*** ./src/assets/images/icons/groups2.png ***! + \*********************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAASm0lEQVR4Xu2dd5QUVRbGfz3kJDkKCJJBAVFWRUUkGFBQEFRWFhUWmBlAoqCoMGKAVcC8CLKLBEEkKCZMgKjkqIIIKCKiMCAsUfLUntuvi+7pqeqq7q7pcbrrncMfTL10v/f1q/vuu/eWR0vmBaA/bnERiGMEPFoaSaTzLhrt4lhOV7QER8Aj8mtDKMJxlqJxeYLj4Yofpwh4ie4l+wAqcopVaFSJU1ldsRIYgfNE95K9L5dyjq/RuCCBMXFFj0MEMhHdS/ZUbkTjQzTyxqG8rkgJikAWonvJnkIvNCYmKCau2HGIgCHRfWQfg8awOJTZFSkBETAnuoaHFN4GOiUgLq7IcYaAKdG9u3oaBUlnCRpXxZncrjgJhkBIonvJ3o+ynGUlGhcnGDauuHGEgCXRfWbHupxjORol40h2V5QEQsAW0X1kb8FZPgHyJxA+rqhxgoBtovts7N3IYGqcyO6KkUAIhEV0H9nTyGBkAmHkihoHCIRNdJ+NfToaXeNAfleEBEEgMqKnkZ+9fAY0TxCcXDFzOQIREd27qw+kFCdZgUbtXI6BO/0EQCBiovts7DU4w0qgTAJg5YqYixGIiui+w2kzMlgEFMzFODg/9dLVISkPHN0PJw+b91+gGGSchTMnnJ9DcI9FSsNFTeHgL5C+DbRzmWt48mT9m5OzkvFLXAgHdsLJI072bNlX1ET3kf1uMpgFONKf5axzQ4Uxe6B4BXi7Pyx5yXzGveZBo9th21J4sVX0kpW6CA79DhlnsvZ1xT3QYxZoGgwsDqeO+utUuhRSFsCcgfDtgujnYdRDp/HQaqCa3/Cq2fujChrfMWJqyTwMjM4ehCx6HbgESla1P/TLN8P+7ap+gaLw6Df22r4zFDbMs1fXDtGrXw1Dl6v+5g2Bz8fZ69usVlI+GPsH5C8Mb3SDtbL3BJQOz8KND8HerfBE3czP+nwIl7RVP4J3H4FP/xXdXIJb5ysEo3+DIiXh49GwYLiz/Vv05hjRvTt7CpPR6BFTCWSwUT9B2TBccUZdAns2q2kWvACeD6FaBAoz9QFY+YY98ayIXrgUPLwaytZQ/f260Vp9WfwirJttPn6t62HQF+r5o9Xh4M7MdfsvgrotYfVMmHJv5mf5CkP3N6HxHervy6fAjH+ClmFPXqtaV90P901RtUbU9m80Vu0ceu4s0dPISzoL0Wjt0PzsdaMT/dNnYcN84zYeDwxdoZ6ZEX3BY/D7pqztH5gBBYuCEdFLVgHRbYNJFYroeQtCv4VQu4U9+fRaolYsluwkJuWOMXDTMNizBUbVz1pp7EG1o84dDIvGZ33uSQJRL1r6sp+smArTuztD9mGroNrfYPtXMD72VmlHiS7IacMozhGWodEgvFWMorZO9Jkp8NVrJkRPgn/7Dl9mRB/fArYvNSDIAShSKivRWw+BDv+CrYvhpTaZ25kR/YIKkPwuVL9S1V/4NOz+1lx4qdd6kHo+/gbY7tuxjVo8uhEqN4LPxsH8IZlryOH4qR2+fkzk1FvcOhJuS1P/+3oyvNlLVtZ4jqI21rjWevHy+CIzRTXKCDoEW7f21xhWEY7/EU4Lb13Hie4lex8uIsPr2lsh7BlF0iCniC67+Yjv1W7/SlvYvNA/eyOiN7gF7p0EJStDRgbMTIZlr5tLfEFFeGQtlKgEa96C/3Yxr1u8Eoz5TT1/oZX68QWWy+6EXnOVDj6ohLXVo/OL0PJB9XZ4rhmcOGQ89qAvodZ1kaxaZG2GlP3rEN1L9r5cwVlkeywcmURhtMopossUWw2CTuPg983wVCO/JSGQ6GtnQ9fJ0PA2JdSp4zC9B2z7Apo9oHbgYCtJ3gIgu+XFV8PJozCyDhzZYw5Ks+7wj/+ouoNLZ+2v/dNwy3BlVkyrYwNcD7R/Epa8DEfTzetXuQwKlTB/ftV9cPV96vmMXrD/Rxtjh6jy49fGFiWLXrNlR9fH1PpwOxnMRyMpOuksWutEF/1PP2QGNxEd/bre6q9OqS7Sl+jnw9dD5YZqIfUdOpDoSyfAgM+hVnPYtBBmpSj7+uPfqUO0EH5SJzh+QM2vfF11MKzaRL3mp3WHVdNCg9BzDjTpBAd/hdVvZq0rh8wKdWH/T7BuTmTL8et6WB9G28qN1bkoX0H48jUldw6VbCW6yKSlMACN57NVPqesLuHq6LpQjTpA8nw4vBdG1oJTxyBYdSlaFmrfAOslDNdXqjRR+nqpKrB/B0xoD2I5uXMs5C8EJ4/Bf+6BTR+Ghi8pLzy3HwqH2FmdWICV02Cqb3e26k+sWaJ2laulZHuqIZw+7m8lF2W9fabaN+4L/bayGsvG82wnuo/sr6DRx8Z8IquiE/3b92HnauM+ZEdvN8r5Hd3bo0ftzpUawIej4IORWYluJlmxctBzrtJzZfeW21Qp/9sNr94Gv9mw8ctBU9QnsyLPqzRW+vk370aGsbSSN0+oy6/Anv85Gy6/S51Fnm8BP36VeVwxr47zvcEerwF/+A7Kkc8uZMvYEP1t8rCEBWjcmi1y5KSOrgvU9O9K3fh5FTx3DYzebX0zWqE+NO2i/un29DOn4OtJyhoTSjcOB0iddDtWqINldpfmqdDlVTWKkQVI/h6PRPfu6qkUReNLNC5zHOe/AtFFVxdT4A7fTaeR1aVIGWU7r3MD1GmpdGa9CMGXTVa3hod91hMngCpcUr1d8hWAOYNgcfZqkV5fmsFfqfHEYvNMEzh7Mqsk8Up0L9n7UomzrAIqO7GG5/v4KxA9WCAjot/9MrTom7nmrvUgKpeQ/NBu/zOx5jRPgd0b4fXOkcMlfXT5t1JbxL8kcIzIezVuKT/e3u9AIV/qziPpcHSfcV05V1Ssp56JJejsqdCzmXA7HPg54hnHRHUJnJ3Wj0acQRS2YhHPOrihTvR3HoaVJiGtcuun25mdtLqYCWG4o5dWurxO7u8+MN+9dXOgqELPRpFWR7+RPH0CNn0UHuTiYSg3o3aKqG7dpkDe/OpHJWciJ8sT9WHvloh7dHg29uahpdKODN6zV9tGrZy2uhhN0exmVH5wdvxHnCB6xQYwwsClwQak3irH/oCHylrXbjMUOoxR5D5xGOYOUjZ9KVPvhxMGLrkFi8H9vk1pVqqyWAUXsTzJuUdKWj1I/8F6LiY1coboyYijxcCIZ222o9vtMLt3dCHzs+lQtIzfTff6vnBRGN9ZENOj2OaFbLLz60V2eDM3h2D5u89UB129rJ8LPy2zRkns8TWuUW+e0SHmLHLe9aJfHRNLkdwQy6XV0z41w+wm046OLp6lL/hciXMb0bUUuqIx3RrtMGroO/rbA2C5bycJ1fz0n/5dNdB7MVI7euBYYh8Wgum3oLo/eu/50LhDGEKZVJVbVrGtW5ULG4L4vsguK/7f4kYgRHzyUvPrfOmz+IWQ9oNya5jUGTbMNR9J9y+XGr99p0guZ4BS1RKb6FoKl6PxtePRSHYOo2bL5STRZYFT34cLL/GPphP9mp7Klm23VLtSvQGO7MtMtl3rYPl/rXtJeQ8atoPDe+CZy5Xfe+lqxi66gb31eAuuuFu5NMiPwsyZS9qIeVRcjeUtM7GjP5IqkYmuJVMOD2uz5dMxVkQXX4zrU+GTMVn1Y6eILh58smsXKwt/HgLxVREd0yzCyCpsLRodPTCgQwIwVk2Huq2hvyRuQLkUrPD5hgeS/NLb1A9VyuR7Qvu+6+1kLPnxnTvt7ylRia5NJB8bWYRG9ri5hSK66JEjNiubtRx6vpyQeTeMluhCWHGWajsCxBX1wC/wyi0wYLHxhVH+IuqGtt6NMO46czUiUqKL2e6hZcr3+6flMFZcaH0utve+DtdKMIWmfNIDbeoN2qorefFL2fwxvHqrvUOz0bslYYmewgQ0kq3ftxHWsNrRW/SDu19SO6147gXadqMhetmacP90uNhn/pPDmxDkyF5zFwAh+tCVSr3ZugReusnYGy9Sord7Eto+pq7exzQFccTSi4TadZ+hrualLHoB5g2Ghu1Bbk/FNLhjpXLzPfNnhItBYuroWio9yWBS5KjZaGlFdNl1H14DVS+DYMckK6JLiNm4g+qmT5yPAr0Iu0yA5r7fr4SnSYCC7rgUKsKoTA01H4n2kZA1I1t1JESveR0M/AKSkuCricrfPbjIG+7vE9XOLkU8PsUVWN5GopePaw5/HrQBeogqibaja6lIKowl2Z6B14rosiZNOkNPn+egLKbuZGREdLlN1O3d9W+GRu3VqqbVhfSt/hUuWwuGr4M5Yu0JOiBaxYzWvwn6fKRIKbbm4IuucIku55DHvoFSVeH4/5QXpe72a8TJwB+pPJc2cvh0wv3AKaIHBpP8Vc2L3uv+c6yLSZSRGdELFlc+2ld2Ve6v+m2dV3e9Ri2/EdEf/AzqBYW9eq0QAdYUnTzifWh0zW1FdGnfcSy0GawCMcQnZN82PyXDIbocfMXKUv9GpX9P6QprZhpvuXnyw/V9oO3j6o0SWHaugfdHwPcf58yOLq7Mkvfl7Gl1kJd5SmCKXEI9VC7zgTfMGWbLhZHWjwKc4Uvgb2HOJ7LqT+6AMtVBYkY3zlc6Z6M7lKVBVA697PkeRK8WXfSVW2HzR8ZEl2idayVO0hcN9N37IPbrUBE+wTO3Q3Qh6CPr4OAumPZAZm9Fu0QX4kpuGN1u/1Y/WPqKMY6NO6oY13I11XPxdxdLVKVLlEnx/EawTBE+OBzP7upEuqOL6jVYaBNUJEh72v12Rzeslz1ET0ZsV9HNzK5YNZurFA+ySGIzLlZeqQN6kZvFNbOUbr5rLeivbO+t3xUgV9F6uguzCyO7cwmsZ4foUt/sjdDxOWgzRNmozXxdxMIi6ph+ESX5WIS4gUXyqUjiInEmk4glvcgPVywvuqoidnvxaZcbUb3s2qAipuT8ESrbWDA+kRJdDstP71R5aaRIRjGJhhJT6OHfI1mF820cJ7qWzIPAi1HNKpzGElcZnDbi2AHY8qnahcWRKTAes0RlGPWjOnDJRYocHnOS6CKrvLJFffGmpdOU1eLBT6B8bZW+Y9KdxoiISbPdE+qZ+K+/95i/XpmLlfejvJ0kg4Fe5K02u5/5bi1B1Lc/o8bWiziESQideFgGB1AYzUwIq/vX79tunJHLjgtAODywqOso0bW+tOAcn8X0q9PNeqjI+l/WKPuv6JcSZRTKcUoCduUHcGy/seriBMB2d3QZS4I0RDcV/frMSaWf6iXUNXz5OvD4Jlj6qjoQ60VUoqd+huIV/X+ToOLPx6t0c5ZOZR5ocLPSkSVzgf6GFBVLgrSN/MvDxSy3Et2b4uIca2OeWVdezfKqC2VhCLUIVubFcBdQrx8O0SWUrknQrr3vRxX29t7joYklFz3eNBtBeVfE5UD80MWRS5IVyUYQSQl8M8gt7+oZkfSStU1uJLqWRmHSvUmLwnDmcAav6Hvx+Hc+0ecDr7Kj6bxcbRAdWi6PrOzS8mMTTz29SOxotGF0Yh4V85xTgRayocjbJpTvSzh4yd2G7vsj2dGsAi/C6dugriOqi5bCLDRsuNRFOVu3uYtAhAhETXQtlaFk4HDq1QilcZu5CJggEBXRtWRuwsNH2Z6gyF0+F4EoEYiY6FoqNdFY7X5NOsoVcJvHBIGIiO5LXSFJRGOXMTcmcLiDxCsCYRNd0/CQ6s2n6MsYH6/QuHLFEwLhEz3Z+9VoX/LseILClSWeEQiL6N7suOd4J7vyqscz0K5sOYuAbaJrqdQjw5tly7nEQzkruzt6AiFgi+jaAEpwEklTWyuBsHFFjSMELImupZFEOh+gcUscye2KkmAIWBM9ldFkeL8h6hYXgVyLQEiia324i3OE+LBlrpXbnXiCIWBKdF/WW0n2nf0f20ow0F1xY4+AIdG1PpT2+ZZXi/2U3BFdBJxHIAvRNfX150/QaOn8cG6PLgI5g0BWoicj3+D2fSM7Zybljuoi4DQCmYiupdKNDEw+GeH00G5/LgKxQ+A80bVUmpLhzcVSMHbDuyO5CMQGAS/Rtf6U55Q3sNnZj2jFRgZ3FBcBSwQ83pTOG7z5EQMy11i2cyu4COQqBDxaMq8BvXPVrN3JugiEiYClC0CY/bnVXQRii0DHWkEJbYKG95ABnmSX6LFdFnc0pxEISXTPWTxaN+Ztn+US3Wng3f5ii4A50U/hydOZeT94P8rkEj22y+KO5jQCRkT3eI6T5GnPHH/ea5foTgPv9hdbBLIS/RD58t7C7C0rAyfiEj22y+KO5jQCmYm+j3yeG5m97ZvgYVyiOw28219sEfATfTd5klozZ2vAR6b8U3GJHttlcUdzGgFF9J8gbyvmb/nFrHuX6E4D7/YXWwTurLWJQnnbMGPLnlADu0SP7bK4ozmNQLe6pZn2wwGrbv8PSygpSs9Cw9cAAAAASUVORK5CYII="},"500L": +/*!**********************************************!*\ + !*** ./src/components/MultiUpload/index.tsx ***! + \**********************************************/ +/*! exports provided: coverToFileList, default */ +/*! exports used: coverToFileList, default */function(t,e,i){"use strict";i.d(e,"a",(function(){return S}));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")),a=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=(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 S(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,S=t.className,E=t.maxSize,C=void 0===E?150:E,k=t.title,A=void 0===k?"上传附件":k,x=t.showRemoveModal,w=void 0!==x&&x,T=t.accept,L=void 0===T?"":T,I=t.additionalText,D=t.isDragger,R=t.number,O=void 0===R?1e3:R,M=t.aloneClear,N=void 0!==M&&M,P=t.restrict,B=void 0===P||P,F=Object(f.useState)(!1),_=Object(c.a)(F,2),j=_[0],U=_[1],G=Object(f.useState)(e||[]),H=Object(c.a)(G,2),z=H[0],V=H[1];Object(f.useEffect)((function(){e&&(V(Object(l.a)(e)),O===(null==e?void 0:e.length)&&U(!0))}),[e]);var W,K=function(){setTimeout((function(){z.pop(),V(Object(l.a)(z))}),500)},Q={multiple:!0,disabled:j,accept:L,withCredentials:!0,fileList:z,beforeUpload:function(t,e){var i=t.size/1024/1024;return z.concat(e).length>O?(z.pop(),V(Object(l.a)(z)),o.b.error("最多只能上传".concat(O,"个文件")),N?Promise.reject():(K(),!1)):i=O?U(!0):U(!1),V(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(s.a)({},t)})),console.log("info:",t),i(e)},onRemove:(W=Object(a.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(a.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)}}(),!w){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(a.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,o.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 W.apply(this,arguments)})};return p.a.createElement("div",{className:"multi-upload ".concat(S||"")},D&&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:B?"block":"none"}},"(单个文件最大限制为",C,"MB) ")),I),!D&&p.a.createElement(u.a,Q,p.a.createElement(r.a,{disabled:j},A),p.a.createElement("span",{onClick:function(t){t.preventDefault(),t.stopPropagation()},style:{marginLeft:10,color:"#FA6400",display:B?"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,i){"use strict";i.d(e,"a",(function(){return m})),i.d(e,"b",(function(){return b}));var r=i(/*! react-router */"Ty5D"),n=i(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),a=i(/*! react */"q1tI"),s=i.n(a),o=i(/*! history */"YS25"),l=(i(/*! prop-types */"17x9"),i(/*! @babel/runtime/helpers/esm/extends */"wx14")),c=i(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),u=i(/*! tiny-invariant */"9R94");s.a.Component;s.a.Component;var h=function(t,e){return"function"==typeof t?t(e):t},d=function(t,e){return"string"==typeof t?Object(o.c)(t,null,null,e):t},f=function(t){return t},p=s.a.forwardRef;void 0===p&&(p=f);var g=p((function(t,e){var i=t.innerRef,r=t.navigate,n=t.onClick,a=Object(c.a)(t,["innerRef","navigate","onClick"]),o=a.target,u=Object(l.a)({},a,{onClick:function(t){try{n&&n(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||o&&"_self"!==o||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),r())}});return u.ref=f!==p&&e||i,s.a.createElement("a",u)}));var m=p((function(t,e){var i=t.component,n=void 0===i?g:i,a=t.replace,o=t.to,m=t.innerRef,v=Object(c.a)(t,["component","replace","to","innerRef"]);return s.a.createElement(r.e.Consumer,null,(function(t){t||Object(u.a)(!1);var i=t.history,r=d(h(o,t.location),t.location),c=r?i.createHref(r):"",g=Object(l.a)({},v,{href:c,navigate:function(){var e=h(o,t.location);(a?i.replace:i.push)(e)}});return f!==p?g.ref=e||m:g.innerRef=m,s.a.createElement(n,g)}))})),v=function(t){return t},y=s.a.forwardRef;void 0===y&&(y=v);var b=y((function(t,e){var i=t["aria-current"],n=void 0===i?"page":i,a=t.activeClassName,o=void 0===a?"active":a,f=t.activeStyle,p=t.className,g=t.exact,b=t.isActive,S=t.location,E=t.sensitive,C=t.strict,k=t.style,A=t.to,x=t.innerRef,w=Object(c.a)(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return s.a.createElement(r.e.Consumer,null,(function(t){t||Object(u.a)(!1);var i=S||t.location,a=d(h(A,i),i),c=a.pathname,T=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),L=T?Object(r.f)(i.pathname,{path:T,exact:g,sensitive:E,strict:C}):null,I=!!(b?b(L,i):L),D=I?function(){for(var t=arguments.length,e=new Array(t),i=0;i1&&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(!o(i))throw TypeError("Stringified UUID is invalid");return i};e.a=function(t,e,i){var r=(t=t||{}).random||(t.rng||a)();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)}},"7ZXX": +/*!**********************************************!*\ + !*** ./src/assets/images/classrooms/err.png ***! + \**********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/err.6e7c5817.png"},"7ahc": +/*!*************************************************************!*\ + !*** ./src/components/markdown-editor/code-block/index.tsx ***! + \*************************************************************/ +/*! exports provided: default, MyCodeMirror */ +/*! 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"),a=(i(/*! antd/es/button/style */"+L6B"),i(/*! antd/es/button */"2/Rp")),s=(i(/*! antd/es/form/style */"y8nQ"),i(/*! antd/es/form */"Vl3Y")),o=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,a=t.options,s=void 0===a?{}:a,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(o.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},s));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(o.a)(r,2),d=h[0],v=h[1];return u.a.createElement(s.a,Object(n.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(t){e(t)}}),u.a.createElement(s.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(s.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(a.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(a.a,{type:"ghost",onClick:i},"取消")))}},"7v3h": +/*!**************************************!*\ + !*** ./src/assets/images/empty2.png ***! + \**************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/empty2.dd73f390.png"},"8/bI": +/*!*************************************!*\ + !*** ./src/assets/images/empty.png ***! + \*************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/empty.8918e228.png"},"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,i){!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(a)return t.findModeByExtension(a)},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 S={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function E(){return function t(e,i,r,n){if(i>=e.length||e[i].level<=r)return i;var a=e[i];n.push("
      • "+a.text+"");var s=[];return i=t(e,++i,a.level,s),s.length>0&&(n.push("
          "),s.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(o.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 a=x(),s=r;r=a,w[a]={type:"block",expression:s}}return{type:"code",raw:i,lang:n,text:r}}}},k=/(?:\${2})([^\n`]+?)(?:\${2})/gi,A=0,x=function(){return"__special_katext_id_".concat(A++,"__")},w={};function T(){A=0,w={}}function L(t){return t=t.replace(k,(function(t,e){var i=x();return w[i]={type:"inline",expression:e},i}))}var I=v.listitem;v.listitem=function(t){return I(L(t))};var D=v.paragraph;v.paragraph=function(t){return D(L(t))};var R=v.tablecell;v.tablecell=function(t,e){return R(L(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 O=f.a,M=(i("SJMd"),i("ulZh")),N=i.n(M),P=i("m3rI"),B=i("Oy/b"),F=i("p5ED"),_=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 G(t,e,i,r){return new(i||(i=Promise))((function(n,a){function s(t){try{l(r.next(t))}catch(t){a(t)}}function o(t){try{l(r.throw(t))}catch(t){a(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(s,o)}l((r=r.apply(t,e||[])).next())}))}function H(t,e){var i,r,n,a,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,r&&(n=2&a[0]?r.return:a[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;switch(r=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[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}(),X=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 q("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 q("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new q("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new q("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new q("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 q("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 q("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 q("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new q("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new J("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new J("."+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,a;t.className=e.toolboxButtonStyleClass.name+" "+(r===i?""+(null!==(n=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==n?n:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(a=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==a?a:e.toolboxButtonStyleColorsClass.name))}))},t}(),$=function(t,e){this.title=t,this.icon=e},tt=function(t){function e(e,i,r,n){var a=t.call(this,e,n||'')||this;return a.colors=[],a.addTransparent=!1,a.colorBoxes=[],a.colors=i,a.currentColor=r,a.setCurrentColor=a.setCurrentColor.bind(a),a.getColorBox=a.getColorBox.bind(a),a}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 a=document.createElement("div");return a.style.display="inline-block",a.style.width=r-2+"px",a.style.height=r-2+"px",a.style.backgroundColor=t,a.style.borderRadius=r/2+"px","transparent"===t&&(a.style.fill=this.uiStyleSettings.toolboxAccentColor,a.innerHTML='\n \n '),n.appendChild(a),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}($),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=V.createGroup(),this.visual.appendChild(V.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(V.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}(),at=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(V.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=V.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 a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,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=V.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=V.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=V.createGroup();var t=V.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=V.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=V.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(V.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,a=this.height+this.CB_DISTANCE-t/2,s=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,s,i),this.positionGrip(this.controlGrips.centerLeft.visual,e,n),this.positionGrip(this.controlGrips.centerRight.visual,s,n),this.positionGrip(this.controlGrips.bottomLeft.visual,e,a),this.positionGrip(this.controlGrips.bottomCenter.visual,r,a),this.positionGrip(this.controlGrips.bottomRight.visual,s,a),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),st=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=V.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),V.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&&V.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&V.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&V.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&V.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}(at),ot=function(t){function e(e,i,r,n){var a=t.call(this,e,n||'')||this;return a.widths=[],a.widthBoxes=[],a.widths=i,a.currentWidth=r,a.setCurrentWidth=a.setCurrentWidth.bind(a),a}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 a=document.createElement("div");a.style.minHeight="20px",a.style.flexGrow="2",a.style.display="flex",a.style.alignItems="center";var s=document.createElement("hr");s.style.minWidth="20px",s.style.border="0px",s.style.borderTop=i+"px solid "+t.uiStyleSettings.toolboxColor,s.style.flexGrow="2",a.appendChild(s),r.appendChild(a),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}($),lt=function(t){function e(e,i,r,n){var a=t.call(this,e,n||'')||this;return a.styles=[],a.styleBoxes=[],a.styles=i,a.currentStyle=r,a.setCurrentStyle=a.setCurrentStyle.bind(a),a}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 a='\n \n ";n.innerHTML=a,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}($),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 ot("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}(st),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=V.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(V.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 ot("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=V.createGroup(),this.selectorLine=V.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=V.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()),V.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),V.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 a=t.call(this,e,n||'')||this;return a.fonts=[],a.fontBoxes=[],a.fonts=i,a.currentFont=r,a.setCurrentFont=a.setCurrentFont.bind(a),a}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 a=document.createElement("div");a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.innerHTML="The quick brown fox jumps over the lazy dog",n.appendChild(a),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}($),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=V.createGroup(),this.bgRectangle=V.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=V.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(V.createTransform()),this.textElement.transform.baseVal.appendItem(V.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(V.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&&(V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.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&&V.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&&V.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}(at),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 ot("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=V.createGroup(),this.drawingImage=V.createImage(),this.visual.appendChild(this.drawingImage);var t=V.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),V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.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],a=e[3],s=!1,o=0;o0&&(s=!0,oa&&(a=o),l>n&&(n=l));if(s){this.left=i/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(n-i)/this.pixelRatio,this.height=(a-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=n-i,c.height=a-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(i,r,n-i,a-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(){V.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),V.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}(at),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 a=document.createElement("div");if(a.style.display="flex",a.style.flexGrow="2",a.style.alignItems="center",a.style.justifyContent="space-between",a.style.padding="5px",a.style.borderWidth="2px",a.style.borderStyle="solid",a.style.borderColor=n===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",a.addEventListener("click",(function(){t.setCurrentType(n,a)})),e.appendChild(a),"both"===n||"start"===n){var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.innerHTML='\n \n ',s.style.marginLeft="5px",a.appendChild(s)}var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.minHeight="20px",o.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",o.appendChild(l),a.appendChild(o),"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",a.appendChild(c)}r.typeBoxes.push(a)},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}($),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=V.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=V.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(V.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",V.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),V.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}(st),bt=function(t){function e(e,i,r,n){var a=t.call(this,e,n||'')||this;return a.opacities=[],a.opacityBoxes=[],a.opacities=i,a.currentOpacity=r,a.setCurrentOpacity=a.setCurrentOpacity.bind(a),a}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}($),St=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&&V.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),Et='',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,Et),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(V.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(){V.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=V.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&&(V.setAttributes(this.bgRectangle,[["fill",t]]),V.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),xt=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}(kt),wt=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}(),Tt=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 ot("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=V.createGroup(),this.selectorCurve=V.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=V.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()),V.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=V.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=V.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),Lt=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}(),It=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}(Lt),Dt=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}(Lt),Rt=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}(),Ot=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 wt,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 Rt,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,xt,kt,St,Ct,At,yt,dt,Tt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,kt,St,Ct]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,St]},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(),W.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 Lt(t))}))},t.prototype.render=function(){return G(this,void 0,void 0,(function(){var t;return H(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 Lt(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 Lt(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 Dt(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 Dt(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 Dt(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 Dt(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){W.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 Lt(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 Lt(t))})))},t.instanceCounter=0,t}(),Mt=function(t,e){return(Mt=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 + +copyright Alan Mendelevich +see README and LICENSE for details +********************************** */ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */function Nt(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}Mt(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,a){function s(t){try{l(r.next(t))}catch(t){a(t)}}function o(t){try{l(r.throw(t))}catch(t){a(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(s,o)}l((r=r.apply(t,e||[])).next())}))}function Bt(t,e){var i,r,n,a,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,r&&(n=2&a[0]?r.return:a[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;switch(r=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[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),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(a);var s=_t.createDefs();a.appendChild(s);var o=_t.createElement("clipPath",[["id","text-bg-clip"]]);s.appendChild(o);var l=_t.createPath(_t.getHollowRectanglePath((24-r)/2,(24-n)/2,r,n,(24-r)/2+2,(24-n)/2+2,r-4,n-4));a.appendChild(l);var c=_t.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(_t.createTSpan(t+":"+e)),a.appendChild(c);var u=c.getBBox();_t.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=_t.createPath(_t.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 o.appendChild(h),_t.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(a),a.outerHTML}return''},t}(),Jt=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 Nt(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}(Wt),qt=function(){function t(t,e){this.GRIP_SIZE=10,this.color=t,this.fillColor=e,this.visual=_t.createGroup(),this.visual.appendChild(_t.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_t.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 _t.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&&_t.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=_t.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=_t.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),_t.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);_t.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);_t.setAttributes(t,[["x1",""+n],["y1",""+e.y],["x2",""+n],["y2",""+(e.y+e.height)]])})),_t.setAttributes(this.cropShadeElement,[["d",_t.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,a){var s=i/t,o=r/e;return{x:(n.x-a)*s+a,y:(n.y-a)*o+a,width:n.width*s,height:n.height*o}},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}(),Xt=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();_t.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=_t.createPath(e);var n=_t.createTransform();this.scaleShape.transform.baseVal.appendItem(n),t.appendChild(this.scaleShape),this.angleLabelElement=_t.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=_t.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var a=_t.createTSpan("");return a.innerHTML="°",this.angleLabelElement.appendChild(a),t.appendChild(this.angleLabelElement),document.body.removeChild(t),t},t}(),$t=function(){function t(){this.naturalSize=!1,this.imageType="image/png"}return t.prototype.rasterize=function(t,e,i,r,n,a,s){var o=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===o.naturalSize?(u=e.naturalWidth/(t.width.baseVal.value-2*r)/a,h=e.naturalHeight/(t.height.baseVal.value-2*r)/s,c.width=e.naturalWidth/a,c.height=e.naturalHeight/s):void 0!==o.width&&void 0!==o.height&&(u=o.width/i.width,h=o.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(a,s),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(o.imageType,o.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 Ht,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 Vt;e.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(e);var i=[];this.aspectRatios.forEach((function(e){var r=new Wt(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 Jt(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 Wt('',"Toggle grid");r.isActive=this.isGridVisible,r.onClick=function(){t.isGridVisible=!t.isGridVisible,r.isActive=t.isGridVisible},e.addButton(r);var n=new Wt('',"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 a=new Kt;this.topToolbar.addElementBlock(a);var s=document.createElement("div");s.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var o=document.createElement("a");o.style.color="currentColor",o.href="https://markerjs.com/products/cropro",o.target="_blank",o.innerHTML='',s.appendChild(o),a.addElement(s)}var l=new Vt;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new Wt('',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new Wt('',"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 Ht,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 Vt;e.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(e);var i=new Wt('',"Rotate left");i.onClick=this.rotateLeftButtonClicked,e.addButton(i);var r=new Wt('',"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 Xt("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 a=new Vt;a.minWidth=2*this.toolbarHeight+"px",a.contentAlign="end",this.bottomToolbar.addButtonBlock(a);var s=new Wt('',"Flip horizontal");s.onClick=this.flipHorizontallyButtonClicked,a.addButton(s);var o=new Wt('',"Flip vertical");o.onClick=this.flipVerticallyButtonClicked,a.addButton(o)},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 Bt(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 Bt(this,(function(e){switch(e.label){case 0:return(t=new $t).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.width=this.renderWidth,t.height=this.renderHeight,this.unzoomFromCrop(),_t.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 Gt("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 Gt("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new Gt("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 Gt("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 Gt("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Gt("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 Gt("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 Gt("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Gt("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 Gt("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 Gt("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,k=void 0===C?{}:C,A=t.stylesPrev,x=void 0===A?{}:A,L=String(i),I=Object(u.useRef)(),D=Object(u.useRef)(),R=Object(u.useState)(""),M=Object(o.a)(R,2),j=M[0],U=M[1],G=Object(u.useState)("office"),H=Object(o.a)(G,2),z=H[0],V=H[1],W=Object(u.useMemo)((function(){try{L=(L=L.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]

      ",E()),b()),t=(t=t.replace(/(__special_katext_id_\d+__)/g,(function(t,i){var r=e[i],n=r.type,a=r.expression;return Object(B.renderToString)(function(t){var e=document.createElement("div");return e.innerHTML=t,0===e.childNodes.length?"":e.childNodes[0].nodeValue}(a)||"",{displayMode:"block"===n,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),T(),p){var i=document.createElement("div");return i.innerHTML=t,i.innerText}return setTimeout((function(){return Y()}),500),t}),[L]),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),V("image")}}else if("A"===e.tagName.toUpperCase()){var r=e.getAttribute("href");if(r.indexOf("office")>-1)t.preventDefault(),U(r),V("office");else if(r.indexOf("application/pdf")>-1)t.preventDefault(),U(r),V("pdf");else if(r.indexOf("type=text")>-1)t.preventDefault(),U(r),V("html");else if(r.startsWith("#")){t.preventDefault();var n=document.getElementById(r.replace("#",""));n&&n.scrollIntoView(!0)}}}S.WebkitLineClamp=g,g&&(k=Object(a.a)(Object(a.a)({},k),S));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(N.a.isSupported()){var e=new N.a;e.loadSource(t.src),e.attachMedia(t)}}))};Object(u.useEffect)((function(){if(K.current&&W&&W.match(re)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",Q),function(){K.current.removeEventListener("click",Q),T(),b()}}),[W,K.current,Q]);return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:K,style:Object(a.a)({},k),className:"".concat(f||""," markdown-body ").concat(ie.a.mdBody),onMouseOver:function(t){d&&("IMG"===t.target.nodeName?(I.current.style.display="flex",I.current.style.width=t.target.clientWidth+"px",I.current.style.height=t.target.clientHeight+"px",I.current.style.top=t.target.offsetTop+"px",I.current.style.left=t.target.offsetLeft+"px",D.current.src=t.target.getAttribute("src")):I.current.style.display="none")},dangerouslySetInnerHTML:{__html:W}}),h.a.createElement("div",{ref:I,className:ie.a.button},h.a.createElement(r.a,null,h.a.createElement(n.a,{onClick:function(){return(t=new te(D.current)).displayMode="popup",t.addRenderEventListener(function(){var t=Object(s.a)(c.a.mark((function t(e){var i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return I.current.style.display="none",t.next=3,Object(_.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(D.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 Ot(D.current)).settings.displayMode="popup",t.addEventListener("render",function(){var t=Object(s.a)(c.a.mark((function t(e){var i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(I.current.style.display="none",!D.current){t.next=6;break}return t.next=4,Object(_.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(D.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:D,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(a.a)({},x),onClose:function(){return U("")}}))}},"9VGf": +/*!****************************************!*\ + !*** ./src/components/useInterval.tsx ***! + \****************************************/ +/*! exports provided: default */ +/*! 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])}},"A/g1": +/*!*******************************************!*\ + !*** ./src/assets/images/icons/done1.png ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMjEtMDctMDJUMTk6Mzg6MjMrMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmVkYzRhODM0LTVjNWQtNDQ1My04MDYzLWNkNzcwODQyODg5ZSIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjQ4MTE0OTVlLTVkMDctZTk0YS1iNWEwLWYxOWJmZmM0NGUyNyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmMwNjQyYzA1LTg5MzQtNDdlYy04MTFiLTlkYjdhZGNkYjFiMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YzA2NDJjMDUtODkzNC00N2VjLTgxMWItOWRiN2FkY2RiMWIwIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjM4OjIzKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZWRjNGE4MzQtNWM1ZC00NDUzLTgwNjMtY2Q3NzA4NDI4ODllIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5fJkpyAAAGoElEQVRogc2abWxbVxnH/8+59/rdTpx2GW3UNWJJV7Ylaxp3LUFsWgJDiI5R8bK2GppAmsgQLKQthS8IEJ9okibrREf3gX2Y1K2bxAoDtog60RBSVxKnWUO7kpSppXJZK2ja2HFi33vPw4cmpbN9r++1k8Lv2znnf577f+zje95Mhw4dQqUkwljpF7kuv0EdHkm1HklRr6TQq2tn5xcklwhIMnMSQJIJxykTiSce+1am0mer5XacqM7uDJjiqbAuWlvSygrBnmKyxcoIA+tBBAAgAAikjNZ47zCIh8E8mOjYO1aOD3L7DYzXZJurs8qhuzLqFsH22hcbUs6CMudAol8Ic2Dkkb0fuvEj3IinwvobjTOeRP1safOuIPIA/AMpxbsb4z3fc9PVUQLvRY37L/vMDxtT2peCBpU97BywlkD9sXjvbzcfG7jTSYeSCZyK6l9tTCkn75xXHAVcChh4zCDzLy1DfQ+U0tomcDaSO9A8rb0WWN5P3QK+SzCPx471bLdTWSYwFdZfXz/j+e7SG3MHE73SGu+19FE0gTNV+o8aU9pXls+Waw7E4r2fL9ZQkMB4jd5xd1r96fJ7cgeDX944vL8hv74ggdUZccRrLsw4/1fQCpLyYH7tRxKYCutv1M4rK26fKdd8Nn+euJnAySp9w+o5dettt+QSItHV+nb/qsXyzddj1KAXlnmSsuIMgV8v1sCgHxdWcj002QXgh8BCAqdq9B33T2tbltOlBWcEia+NtO86nd/QOtR3EGyxXmHZHXun78jow7tPCgAI6NixpGsbZ1ibj/d2gvkZy55EHpbcDiz8BkK62LRsNotjaX5TvK8NzH0lI5j0aQAQ4z69pjarfGwZTFphab55sCdogntAFCgZhfgLn3xtv19oPnTexuFjaR4ANJV6CWhzGEvNrpQPiYBOt+vVaWu+Nd7bCaDTTUCS9LDwSNQuiT17bM3fGPd4zn1YWSc8kqJO5e9H9P6LAeNvLp9ia755sCcoiftAKLqptoOI6oRXUsiJ+FxIf/MTM9quNRl1/XhN7p7zQWPUQTdb88CNcQ9GWXMQA3XCb5JWSngxYJxtSGtfXCxvuOqZrJ9VN53wpcMfhIxhs8jSb0aT2VLmyxn3edQ52hOnNf5dsfrN86H0x9Nqu8KgqbBxdF5hCdwwfyFkPmFnflO8rw3AL8qy/V9YzCmsl1I1pNTdp6N6t52mMaVu85mkTEb0ly6EzCeaprXfWGmbB3uCTHgOLk9FCqGkmhWcBlBjJ9MkUX1K3TcRzV5qmvYesdOum9G+Weqxmop+Zo65dFsAEydFTvC0E3HQIHVNWnvpvRVGRYu+G+Oenq4kxiIk+ZLIKbjitEO1Lvyr0/SHieD8qtLqQhbG/Qvl9C2OSIqMWvwHasUdWSW6Umojbh/VPNgTlOCCLWElsOB3hO7BL6XLHfCqOaXuYsA466aPR6XnAZQ8qHKB4fWJP4kNV7SrV3ymqwNVAFiTUe85HzLedaKNxfd/h4FvuPdoA9Hvj7ftmhMAkFbZyaxaQH1a3XwurL9tp4kN7fsUQz5fTnxbGH8GFt7DcwpecTuMFmlIaZ+bjOgvF2u7d/gnIWZR+Q1KPowcIIaAhQSarqmH/xE0TpQbb92M9uT7kdz+/HqfDB0EcF/ZRi1ggYFER/cYcMtMOO3jzlmVjXKDrkt5uv9are9ZLJ8L6UcJ+HplVotygVRlYLFwM4GWf2njl/ymq1fqrSgM3J1Sfz5Rnd15ulp/tiGtPV6h0aIwaCDxUPc/F8sfOQdqTKnbrvjMf9fOK7ZLCyv8Jom1s9qvsHANttQw4dhY++6BW+sKFlNJr7E9K6wOZEoT0YU3ogvXm5OSMK5KQ347v7oggZbr3j/+PWwUnoj9jyHCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},BU3w: +/*!***************************************************!*\ + !*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***! + \***************************************************/ +/*! exports provided: injectCSS, updateCSS */ +/*! exports used: updateCSS */function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var r=i(/*! ./canUseDom */"MNnm");function n(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function a(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(r.a)())return null;var a,s=document.createElement("style");(null===(e=i.csp)||void 0===e?void 0:e.nonce)&&(s.nonce=null===(a=i.csp)||void 0===a?void 0:a.nonce);s.innerHTML=t;var o=n(i),l=o.firstChild;return i.prepend&&o.prepend?o.prepend(s):i.prepend&&l?o.insertBefore(s,l):o.appendChild(s),s}var s=new Map;function o(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n(i);if(!s.has(r)){var o=a("",i),l=o.parentNode;s.set(r,l),l.removeChild(o)}var c=Array.from(s.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=a(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,i){!function(t){t.defineOption("autoCloseTags",!1,(function(s,o,l){if(l!=t.Init&&l&&s.removeKeyMap("autoCloseTags"),o){var c={name:"autoCloseTags"};"object"==typeof o&&!1===o.whenClosing||(c["'/'"]=function(e){return function(e){return e.getOption("disableInput")?t.Pass:r(e,!0)}(e)}),"object"==typeof o&&!1===o.whenOpening||(c["'>'"]=function(r){return function(r){if(r.getOption("disableInput"))return t.Pass;for(var s=r.listSelections(),o=[],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||a(r,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],g,u,!0))return t.Pass;var S="object"==typeof l&&l.emptyTags;if(S&&n(S,g)>-1)o[c]={text:"/>",newPos:t.Pos(u.line,u.ch+2)};else{var E=y&&n(y,b)>-1;o[c]={indent:E,text:">"+(E?"\n\n":"")+"",newPos:E?t.Pos(u.line+1,0):t.Pos(u.line,u.ch+1)}}}var C="object"==typeof l&&l.dontIndentOnAutoClose;for(c=s.length-1;c>=0;c--){var k=o[c];r.replaceRange(k.text,s[c].head,s[c].anchor,"+insert");var A=r.listSelections().slice(0);A[c]={head:k.newPos,anchor:k.newPos},r.setSelections(A),!C&&k.indent&&(r.indentLine(k.newPos.line,null,!0),r.indentLine(k.newPos.line+1,null,!0))}}(r)}),s.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=[],s=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=o.to,c=1;c0){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"",i=[],r=0;rt.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,/[&<>"']/),a=/[&<>"']/g,s=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\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]=S(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 S(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:O(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:M(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,a,s,o,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)&&(a=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-a.length),v=m-1)),s=g||/\n\n(?!\s*$)/.test(i),v!==m-1&&(g="\n"===i.charAt(i.length-1),s||(s=g)),s&&(f.loose=!0),l=void 0,(o=/^\[[ xX]\] /.test(i))&&(l=" "!==i[1],i=i.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:o,checked:l,loose:s,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]):N(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:M(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]):N(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],a="";if(this.options.pedantic){var s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);s?(n=s[1],a=s[3]):a=""}else a=e[3]?e[3].slice(1,-1):"";return B(e,{href:(n=n.trim().replace(/^<([\s\S]*)>$/,"$1"))?n.replace(this.rules.inline._escapes,"$1"):n,title:a?a.replace(this.rules.inline._escapes,"$1"):a},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 B(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,a="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(a.lastIndex=0;null!=(r=a.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,a="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(a.lastIndex=0;null!=(r=a.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=N(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=N(this.options.mangle?e(n[1]):n[1])):i=N(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=N(this.options.mangle?e(i[0]):i[0]));else{var a;do{a=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(a!==i[0]);r=N(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]):N(n[0]):n[0]:N(this.options.smartypants?i(n[0]):n[0]),{type:"text",raw:n[0],text:r}},t}(),_=x,j=k,U=w,G={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:_,table:_,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?'|\([^()]*\))/};G.def=j(G.def).replace("label",G._label).replace("title",G._title).getRegex(),G.bullet=/(?:[*+-]|\d{1,9}[.)])/,G.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,G.item=j(G.item,"gm").replace(/bull/g,G.bullet).getRegex(),G.list=j(G.list).replace(/bull/g,G.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+G.def.source+")").getRegex(),G._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",G._comment=//,G.html=j(G.html,"i").replace("comment",G._comment).replace("tag",G._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),G.paragraph=j(G._paragraph).replace("hr",G.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",G._tag).getRegex(),G.blockquote=j(G.blockquote).replace("paragraph",G.paragraph).getRegex(),G.normal=U({},G),G.gfm=U({},G.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*|$)"}),G.gfm.nptable=j(G.gfm.nptable).replace("hr",G.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",G._tag).getRegex(),G.gfm.table=j(G.gfm.table).replace("hr",G.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",G._tag).getRegex(),G.pedantic=U({},G.normal,{html:j("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",G._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:_,paragraph:j(G.normal._paragraph).replace("hr",G.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",G.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var H={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:_,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:_,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};H.punctuation=j(H.punctuation).replace(/punctuation/g,H._punctuation).getRegex(),H._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",H._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",H.em.start=j(H.em.start).replace(/punctuation/g,H._punctuation).getRegex(),H.em.middle=j(H.em.middle).replace(/punctuation/g,H._punctuation).replace(/overlapSkip/g,H._overlapSkip).getRegex(),H.em.endAst=j(H.em.endAst,"g").replace(/punctuation/g,H._punctuation).getRegex(),H.em.endUnd=j(H.em.endUnd,"g").replace(/punctuation/g,H._punctuation).getRegex(),H.strong.start=j(H.strong.start).replace(/punctuation/g,H._punctuation).getRegex(),H.strong.middle=j(H.strong.middle).replace(/punctuation/g,H._punctuation).replace(/blockSkip/g,H._blockSkip).getRegex(),H.strong.endAst=j(H.strong.endAst,"g").replace(/punctuation/g,H._punctuation).getRegex(),H.strong.endUnd=j(H.strong.endUnd,"g").replace(/punctuation/g,H._punctuation).getRegex(),H.blockSkip=j(H._blockSkip,"g").getRegex(),H.overlapSkip=j(H._overlapSkip,"g").getRegex(),H._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,H._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,H._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])?)+(?![-_])/,H.autolink=j(H.autolink).replace("scheme",H._scheme).replace("email",H._email).getRegex(),H._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,H.tag=j(H.tag).replace("comment",G._comment).replace("attribute",H._attribute).getRegex(),H._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,H._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,H._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,H.link=j(H.link).replace("label",H._label).replace("href",H._href).replace("title",H._title).getRegex(),H.reflink=j(H.reflink).replace("label",H._label).getRegex(),H.reflinkSearch=j(H.reflinkSearch,"g").replace("reflink",H.reflink).replace("nolink",H.nolink).getRegex(),H.normal=U({},H),H.pedantic=U({},H.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",H._label).getRegex(),reflink:j(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",H._label).getRegex()}),H.gfm=U({},H.normal,{escape:j(H.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 J=function(){function e(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||V,this.options.tokenizer=this.options.tokenizer||new F,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var e={block:W.normal,inline:K.normal};this.options.pedantic?(e.block=W.pedantic,e.inline=K.pedantic):this.options.gfm&&(e.block=W.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,a=e.prototype;return a.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},a.blockTokens=function(t,e,i){var r,n,a,s;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):((s=e[e.length-1]).raw+="\n"+r.raw,s.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),a=r.items.length,n=0;n0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(o));)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(o));)o=o.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(a=this.tokenizer.escape(t))t=t.substring(a.raw.length),e.push(a);else if(a=this.tokenizer.tag(t,i,r))t=t.substring(a.raw.length),i=a.inLink,r=a.inRawBlock,e.push(a);else if(a=this.tokenizer.link(t))t=t.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),e.push(a);else if(a=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),e.push(a);else if(a=this.tokenizer.strong(t,o,n))t=t.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],i,r),e.push(a);else if(a=this.tokenizer.em(t,o,n))t=t.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],i,r),e.push(a);else if(a=this.tokenizer.codespan(t))t=t.substring(a.raw.length),e.push(a);else if(a=this.tokenizer.br(t))t=t.substring(a.raw.length),e.push(a);else if(a=this.tokenizer.del(t))t=t.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],i,r),e.push(a);else if(a=this.tokenizer.autolink(t,Y))t=t.substring(a.raw.length),e.push(a);else if(i||!(a=this.tokenizer.url(t,Y))){if(a=this.tokenizer.inlineText(t,r,Q))t=t.substring(a.raw.length),n=a.raw.slice(-1),e.push(a);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(a.raw.length),e.push(a);return e},i=e,n=[{key:"rules",get:function(){return{block:W,inline:K}}}],(r=null)&&t(i.prototype,r),n&&t(i,n),e}(),q=r.defaults,Z=A,X=E,$=function(){function t(t){this.options=t||q}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:X(t,!0))+"
      \n":"
      "+(i?t:X(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 $,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,a,s,o,l,c,u,h,d,f,p,g,m,v,y,b,S="",E=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);S+=this.renderer.list(u,d,f);continue;case"html":S+=this.renderer.html(h.text);continue;case"paragraph":S+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;i+1An error occurred:

      "+ot(t.message+"",!0)+"
      ";throw t}}return ht.options=ht.setOptions=function(t){return at(ht.defaults,t),ct(ht.defaults),ht},ht.getDefaults=lt,ht.defaults=ut,ht.use=function(t){var e=at({},t);if(t.renderer&&function(){var i=ht.defaults.renderer||new $,r=function(e){var r=i[e];i[e]=function(){for(var n=arguments.length,a=new Array(n),s=0;s",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,s){s&&s!=t.Init&&(e.removeKeyMap(n),e.state.closeBrackets=null),i&&(a(r(i,"pairs")),e.state.closeBrackets=i,e.addKeyMap(n))}));var n={Backspace:function(e){var n=o(e);if(!n||e.getOption("disableInput"))return t.Pass;for(var a=r(n,"pairs"),s=e.listSelections(),c=0;c=0;c--){var h=s[c].head;e.replaceRange("",i(h.line,h.ch-1),i(h.line,h.ch+1),"+delete")}},Enter:function(e){var i=o(e),n=i&&r(i,"explode");if(!n||e.getOption("disableInput"))return t.Pass;for(var a=e.listSelections(),s=0;s1&&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 E=0==b.ch?" ":e.getRange(i(b.line,b.ch-1),b);if(t.isWordChar(S)||E==n||t.isWordChar(E))return t.Pass;v="both"}else{if(!g||!(0===S.length||/\s/.test(S)||h.indexOf(S)>-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?s.charAt(l-1):n,k=l%2?n:s.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(a.anchor.line,a.anchor.ch+(s?-1:1)),head:new i(a.head.line,a.head.ch+(s?1:-1))});e.setSelections(n)}else"both"==u?(e.replaceSelection(C+k,null),e.triggerElectric(C+k),e.execCommand("goCharLeft")):"addFour"==u&&(e.replaceSelection(C+C+C+C,"before"),e.execCommand("goCharRight"));var a,s}))}(n,e)}}function o(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)))}a(e.pairs+"`")}(i(/*! ../../lib/codemirror */"VrN/"))},FOrL: +/*!********************************************!*\ + !*** ./src/assets/images/icons/nodata.png ***! + \********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/nodata.a6b3f948.png"},FPkq: +/*!**************************************!*\ + !*** ./src/assets/images/qrCode.png ***! + \**************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/qrCode.dd0fe9b2.png"},GABl: +/*!********************************************!*\ + !*** ./src/assets/images/icons/chrome.png ***! + \********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAKi0lEQVRoQ71ae3BU1Rn//e7dzYuioNRsHlSqRiUB2eUx0hbaKAHEAMWxiQ6PTUAUGCuIQNVOZ0xnrHUE5GHHIqOwCag8BlQiQnnUokgt5AEIK5GnBpIFXwjkAdl7vs7dkJCETXLvEj3/5d7v9/u+337nfN8554bowBHo16+3YRh3K7IPBHcRSIDI9QJ0AWkA8h0E3xM8DWAvde5x6Pqe+D17jnVUGLxWogqPp78SGSeC3wP4ZUR8pJ+Ct50O7e344uKjEXFcBkUkSERY6e43RkE9JcCgawngaiw3O6A/l7CvaHckvLYFhTKi5B8C3B2JQ6sYEhvpcMxKKioqs4ox7SwLkvT0mFNnz82HqKkCaHacRGxL1gDybHJp6WKSYoXHkqBytzuF4FoR6WOFtKNtCP4b0c7s5N27v22Pu11B5e7+6ZTgBgE6t0f2Y74n8IUjOuo+1+7dx9vy06agcrf7fgjXARLzYwZrnZsB6BzevaRkf2uYVgWdcruHKnAjRJzWHf4ElmSl5nTcnbRnT3k4b2EFVfTt29NQ8l+zKf4EIUbi4kAnhz7ohuLiH1qCwwo62cf9ccf3l0jibh1DckPy3lKzmTcbYQWV9+k7HlArOjaEjmejRm9yaWmzOMMKMncCp9x9dwlkYEeEQUCBrO0IrqYcApx1xsV6XLt2nWl43kyQqyB38dQJPZ7MY56qdLsHGIL/iY3m24R0p2jc6BDZrkVHf3XTiBFfMy9PdbSgNotCYv6kDAPGVhCTT3vz3zCNT7o9PhHJsRoIwUJN518TS0qKrWI62q4xQ/H5uTsB+Q3I0521zrcfGf/KuTMDBrguXar7or2mSuCCRm1q4t6SN5sGOGZBTQ9DsRdgJEFpQeo8pRvRJe/MYeMUMe2lYlQczl4cBki7jT78DyCVTN32qfkuRJC8Mrd3nSGNzYoa5wYm+P5kvivv43kakBdbbWTk1zqRnlBa6jdt8j4UR1Fx9WQAUyG4aqtEUIHYBWJh4ay4dQ28ciBjJiAvR5Qx8jtEOROZsuliSFBCQc4LSvBs4xogLjmjolPLH156VLKyok4ePuKHyK1XOSN/0Bz6PUlFRaXmuzELLrmNYHCVQO6wEhjBT5zReHj99LiToUwdGPIYgNesYMPE8hDTtq0JCYovyD0KkVuaGZHvnfb6xpjPTnk8o5WS91qSNC2bo+fWZiqq1RDpZDOggMPhHPHuzKi99aIy8gHx2uQwJ9t69tr2IBPfyr3TqJPPwxE4dGScGp+//XKB2CIiQ6/YcXP3faUjGjITNII7IxBTT0eeitJjB6yfyUr5MrMrLtT6IXDZFHUWaTd0Y8LKieOVEb6JkjgwOCbTvTY726j0eFINwT4RcYRi0LVfJZeUfGqumeKimgNWp1kbQX7w/pxOmaEsHRw6BaKW2BRkBjWQCQUTFylR01td9ODjgRzfq6Gp18ezSEGmEyxJ3lfaz3w2en7VNKUQen+tQ9O0ezfMiv1QjmZcj1oJQGBvl09tKl0Fuf8Rkd+1Koj4NkqPS/lq3D+/PztoUNcLF6oOQ7AweV/p8yZm5LyqveGqWSTiSK4pnB33UH2WMtZAJMsWD7HIFHRQRFLbBnLR6Rzfk6G15PFM05R2NHFf8RazzwSDqs0Dl52ACJ6PuTm229psXhJ/xjQosZl5vs/4/NxKQNpegERQd7B3xVjfIcnK0iuPHYtOLC6uHjW/dqQoo9BO0O3ZRkfpt6+bEXNY/BmZUPJ+e/bN3pM76crPrRVIdHtAkpsDXl+oqjWMUfOrpoiC/cXbhjPqWnrhU7E75NB9dyFYt6+9uFq838/4gpwfILjOCpBkZsDr+6DBduTcmomAWmYFa9VGc3DQhplxn4h/aAqU+sIqLmRHfkZXQU6ZCG63AiRZlpQa1bu4/9K6UEGYXzMESm2zgrVqQ2i3FM6JPS7+jIEwT832xi668nN2CPBbqziN2lOV3uULTPusl6uTahTKIZFuKpt7JXGm36y4hDxSiX/YI1DG61bjupyhzaag1QJkWwfyrO6MSqkYu/QbEzNqXvV2EbnXOr51S2p4o3BWJ3Nja5btAohMsMfLV80qtxCQGXaAJJcEvL5pJmb0vJpxStRKO/hwtuYunE7ds+HJ6P1yfEwXVJ+vgCDWFi8xg64Vk7JFGattAg2nw9n35NjX92etEb32qxpzn3dNWSKxvHB2p0n12RkyHYJFtmIyjXUtnT3eye1Sc16+gUC3Q0CyJCk1aqBZIB6YKzfVsdrcMSTY4WiwJbC/C+J+vWIOq0TyHPDvNI8rKba4iBpERXUNHR9cBTkfi9j/LEJqLwW8y582OR6Ye7FXHYx3gTDnpjYiM8U4o5nZeCbyD50BpRbaEmMaE1uZtn3Y5fPQxGch6gXbJKDSdW1ExfhlW0zsmAXSxQjW+ARy1X1ZS+76k6vkd5G4J8zMhKZa2ahuqKs+DPOLn91BPsK0bctCghJXTLrDUMoPiO3PJAQvApwSyFme3xDD6PmXPCJ1MwA+KCI/axqbWZpBFFJ3LDYLQNN3cnDIEgim2NWC+unmYsqmc42XEq6C3FUiEtrpRjIIzBscm/mMeXZqih+9UOIhNbeFMhBkRb/ZMV+afaalDykb3gdBowRi/0cFtcVM2xqq1FcErZyYKoZ8FkmWGoMjjwGy6MaYTsv82a9eaOuHue2DJ6KP3P/KxQYbOThkB8R6g2/i8xwcsbfyjsJQX2x50XhNWboigGcBrKam7RKRMqce+vodYwiSIOihREYAPN5wJJGDGdkQsdc6Gpxp/AtTt/2t4c9mghIKJvcU1O0VQVQk084yhjgHxKac9i45I+VZsTj3/SGI/MIyvjF6VqBrbAoTC6vDCjIfulZM/KMo9YptchsAEk8HvPkvhdbVwYznIJJnA97EVBvLXlvfblZ0whG58nPWCvCHyJy0gyKPde7WOdVcP3JkWHfUqkOAxNn2Rcxn2vbZLXFhr15vW/nEdeeNcyUArr5ctO25OUAjH6z0+tZfzs4qRFJZiU1IHTySvPoDQKt3yeb1cFDJNhHcdI0amhQk7gh4fen1YoYPhgQ/ss/NzxHtHGj2nHDYNi/Hk9/MTQka2CoiN9t3fNVkUDr0/hU5b5SK5Gnw7yyCiMcWL+GH5sxkz80nWsO1e9uftHJysqHqtoigpy3nLYxJLgt4fY+EsnMg41FAltriIzciyjm2tcy0WuXCOUnKf/xGg1VvishwW0Fc8XIhNoYpJ7J9gfpLRByGyM8tc5FzkTromXBrxlJRaM2ReW0sSi0QQTfLwZiG1P582rv876Hs+DNehpKZFvEnoWE2U7dbbrrtTrmWjhPfeqybEby0ECLjrARF8ETML9DzxD2+WikbdifqDHND2vb/PpDm5/oXcV3XRey+tsaKH1tTLhyh661H0xCsmyaQCW1dg1HTHwpMWLbmcpneBJH7Wg+QVdCwFKI/z7R/fWdHyDULaiCIL5jdScM3Y6X+m04/aXIPQGJnwJs/OCTm8yEjYSDMLSurQPkI5CrcoK2ja0vobBTpsD3l2nKU/mGe43DFiV5Ksb8SNUCj9lrlhOUl5r8JwG9evjMBhDmdjkJYBp2luLPHHrL+nq8jxv8BV2A7FHmr6w0AAAAASUVORK5CYII="},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,i){"use strict";var r=i("q1tI"),n=i.n(r),a=i("TSYQ"),s=i.n(a);function o(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 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),o(e)):t.onSuccess(o(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||"",a=n.replace(/\/.*$/,"");return i.some((function(t){var e,i,s=t.trim();return"."===s.charAt(0)?(e=r.toLowerCase(),i=s.toLowerCase(),-1!==e.indexOf(i,e.length-i.length)):/\/\*$/.test(s)?a===s.replace(/\/.*$/,""):n===s}))}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"]),E=s()((v(t={},a,!0),v(t,a+"-disabled",l),v(t,o,o),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:E,role:"button",style:u}),n.a.createElement("input",p({},(e=S,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),E=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:1,i=O.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];return Object(x.a)(t).map((function(t,i){if(!o.isValidElement(t)||!t.type)return null;var r=t.type.isSelectOptGroup,n=t.key,a=t.props,s=a.children,l=Object(c.a)(a,["children"]);return e||!r?w(t):Object(A.a)(Object(A.a)({key:"__RC_SELECT_GRP__".concat(null===n?i:n,"__"),label:n},l),{},{options:T(s)})})).filter((function(t){return t}))}var L=i("2Qr1"),I=i("qNPg"),D=i("U8pU"),R=i("Kwbf"),O=i("WKfj");var M=function(t){var e=t.mode,i=t.options,r=t.children,n=t.backfill,a=t.allowClear,s=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||T(r);if(Object(R.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 S=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(R.a)(!S,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(R.a)("combobox"!==e||!m,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(R.a)("combobox"===e||!n,"`backfill` only works with `combobox` mode."),Object(R.a)("combobox"===e||!l,"`getInputElement` only work with `combobox` mode."),Object(R.b)("combobox"!==e||!l||!a||!s,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==e&&"tags"!==e&&Object(R.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(R.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 E=Object(O.d)(p);Object(R.a)(!f||E.every((function(t){return"object"===Object(D.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(R.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var C=null;Object(x.a)(r).some((function(t){if(!o.isValidElement(t)||!t.type)return!1;var e=t.type;return!e.isSelectOption&&(e.isSelectOptGroup?!Object(x.a)(t.props.children).every((function(e){return!(o.isValidElement(e)&&t.type&&!e.type.isSelectOption)||(C=e.type,!1)})):(C=e,!0))})),C&&Object(R.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(C.displayName||C.name||C,"`.")),Object(R.a)(void 0===g,"`inputValue` is deprecated, please use `searchValue` instead.")}},N=Object(I.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:T,flattenOptions:L.d,getLabeledValue:L.e,filterOptions:L.b,isValueDisabled:L.g,findValueOption:L.c,warningProps:M,fillOptionsWithMissingValue:L.a}),P=function(t){Object(a.a)(i,t);var e=Object(s.a)(i);function i(){var t;return Object(r.a)(this,i),(t=e.apply(this,arguments)).selectRef=o.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 o.createElement(N,Object.assign({ref:this.selectRef},this.props))}}]),i}(o.Component);P.Option=E,P.OptGroup=k;var B=P;e.c=B},M8RZ: +/*!**********************************!*\ + !*** ./src/components/modal.tsx ***! + \**********************************/ +/*! exports provided: default */ +/*! 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"),a=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),s=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),o=i(/*! react */"q1tI"),l=i.n(o),c=i(/*! react-dom */"i8i4"),u=function(t){Object(a.a)(i,t);var e=Object(s.a)(i);function i(t){var n;Object(r.a)(this,i),n=e.call(this,t);var a=window.document;return n.node=a.createElement("div"),a.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)},Nmxd: +/*!*******************************************!*\ + !*** ./src/assets/images/icons/done2.png ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAF4ElEQVRoQ91aW2wUVRj+/rPbSivURIgKjZcHjUYTgZ0lthgv3V0LSqB9IAQeNNEIaKKwZbcFnuQJoZ1piyYawJjIiwZDwiVBaHd28QItaWeLD4KJPgimiA+YCAZj6Z7fzPZiu7e57WriJE0f5v++//tm/j3nn3MOoQyXcmJ/LdfeCBOjEUA9EdUzUA9g0ST9VQJGmXkU5n/CAN2q043Vm295TU9uCRS9MwCiFWBqAmD++R1yjQNIgTgF5tNGuCPtEJ8Nd2xgWarzPil9UbBsA1G1m6R5GOYxkOgRItM71NRxzQmnIwMBvStKoCiAB50kcRB7mcG96XB7r12MLQNPJXrvzdD4QQZW2yX2EkfACR/7N56PRH+14rE0sDSpLRaM4wA/YEVW3vt0RRLWjIRi35biLWkgmOhaz0SflleYMzZi3jAcaf+sGKqoAUVX3wbwnrN0FYveYoTj7xdiL2ggqKsvMnCyYnJcEBPw0nA4/kUuNM9AINX9MMnMIEDzXeSpIISvs/A1pJu2/TgzSZ4BRVf7ALxQQSVeqPuNcLy5qIHJcb7HS4ZKYxncNnOemH4DyqmehaiW58D8UKVFeOIn+gljYrmxsu2XWa2Eomt7AN7uidwd+CKBPy8EZdA7hSlprxGO7Zg2EPxSW8q35WDZehv7Ri4KEuuGQtu+y4UoSe0DML9ZkIp5jKpEw/BzsZFsCSkpNQYJ1X7eskQWF6+rbwD4sGQWgbjRFNcmDCS0oyBuKYsseyRFxS/TteWSZT+IaktSMR0zIrFWajzcXTM2X95w0c/bk5ofVVT8k6e77vT7qY+A5TbIx6uvizoKJNUVxDhlA1COkKLis5Wgq2bZmOVj62LCSlIS2m4Q77SF8BZkJd667nPzM71LSqLrExC94k2bJbqk+Im65xQIzr7wmA9RUFcTDIQtJWQDaB3A5lT+ur34bFRJ8WbdV1VRAowGB5wTagCdFF29BOAxSzAjbkTiWrZWU+oCSJgTScwCV1K8m7rPyfe9acAcgeaVFsIHjXD7ptyYxw/vqq5ZMHcHGOZvaE7OfTvindf97CQ3bRkgorXDodiRUiYDuhYlZAeDe6zKxuTJ1j34awDC8u0XD7hht4RuwkctxvOxlFWyYFJ7jUDnC7UHU1iz7qurxBlmDlrxlb5Pl5z8iC8LIVuHmjoueEtqjvddBwDa6JWHCQlnwyjjAu7wtxjPRK+4Ta7Y6XPskpvDqJLUdoMdTWTJOX9kWs+2bL9pN89U3GTdn3WKKxpvTmRuWglmPpKOtK91IiQ73vvJFL/YCa5UbLaVaDzXXTP2p4tmjvGREYnbruOgrn7MwKvlEg9gvLpG1E2000ntKNh5O82EznQobvkVF9S732LIgus6rg0RHTNCsdYJA7oWB7jLJdlOIxzfUwwbTHY+zSy+ccldAkbtRjimThroCYAzA46bqUl6JmxOh+IH8mbq1K65NXLuIIAnymqAMQbyNRrhtvT0qkQgqe4lRof7RHKdEe6Y9XEe0NVDBLzsnrMwcmbp/rOs8lXPQtzODHhY+/9LEq0aCcV0M22wX21jge5yiwdwGVW+RuPZnGUVM9FkP+NlYesaIFcJ8s+TLM9UQDwY1JYOx6Y3QPLXRpNqPzEiHpJfBOAD8KgHjoJQs3VIh+Kzlj3zDCzp63zEJ8QgCHeXW4AnPsZvGSkbLjR3/DCT5/+3vD7lTkl0bQHRPk9PrVxg5q1GpL3gZkvpLaZU93qW8r/dYhJiw3DTNudbTFMPb1lf5xIpxHEQ7i/XA7XFw/hZSLlmqLn094flLqWZzNzcZikO/JvbrCTkJjub3rYMZJ8YgwJJbSuBK7zRTb3pUGwfCGznTdk3MMm2tG/vIvL7tpJE1G3vlCeMMcYCvTye2TfSvP2qHeFTMY4NTI9Sek8AJFewlCGi7IEPc/JycmWYOUVCJMHitNmYOQF7NjAzmTK8v5Z/N4/biEYI1BN46riNeeTGvEazx21Ao5DmcRs5QHfV6UbQ+3GbvwHH7EQQahyMxwAAAABJRU5ErkJggg=="},Ohmc: +/*!*******************************************!*\ + !*** ./src/assets/images/certificate.jpg ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/certificate.fc32dc1b.jpg"},Ot1p: +/*!**************************************************************!*\ + !*** ./src/components/markdown-editor/index.tsx + 6 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./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/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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/RenderHtml/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ +/*! 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/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ +/*! 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,i){"use strict";i("2qtc");var r=i("kLXV"),n=i("rAM+"),a=(i("miYZ"),i("tsqr")),s=i("9og8"),o=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")),S=i("m3rI"),E=[{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,a=t.className,s=void 0===a?"":a,o=t.children;return d.a.createElement("a",{title:i,className:s,onClick:function(){e(n)}},d.a.createElement("i",{className:"md-iconfont ".concat(r)}),o)}var k=function(t){var e=t.watch,i=t.showNullButton,r=t.onActionCallback,n=t.fullScreen,a=t.insertTemp,s=t.hidetoolBar,o=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(o,"&api=").concat(encodeURIComponent(S.a.PROXY_SERVER)));var l=[].concat(E,[{title:"".concat(e?"关闭实时预览":"开启实时预览"),icon:"".concat(e?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!s&&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,a&&d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),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})))},A=i("M8RZ"),x=(i("+L6B"),i("2/Rp")),w=(i("y8nQ"),i("Vl3Y")),T=(i("5NDa"),i("5rEg")),L={labelCol:{span:4},wrapperCol:{span:20}},I=function(t){var e=t.callback,i=t.onCancel;return d.a.createElement(w.a,Object(y.a)({},L,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(t){e(t)}}),d.a.createElement(w.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(T.a,null)),d.a.createElement(w.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(T.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(x.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(x.a,{type:"ghost",onClick:i},"取消")))},D=i("7ahc"),R=i("k1fw"),O=(i("HmJG"),i("BjJ7")),M=w.a.useForm,N={width:280,marginRight:10},P={labelCol:{span:5},wrapperCol:{span:19}},B=function(t){var e=t.callback,i=t.onCancel,r=M(),n=Object(o.a)(r,1)[0],a=Object(h.useRef)();function s(t,e){n.setFieldsValue({src:"/api/attachments/".concat(t.id,"?type=").concat(t.content_type),type:e.type})}return d.a.createElement(w.a,Object(y.a)({form:n},P,{className:"upload-image-panel",onFinish:function(t){e(Object(R.a)(Object(R.a)({},t),{},{name:a.current}))}}),d.a.createElement(w.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(w.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(T.a,{style:N})),d.a.createElement(F,{onFileChange:function(t){var e=t.target.files[0];a.current=e.name,_(e,s)}}))),d.a.createElement(w.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(T.a,{style:{width:264}})),d.a.createElement(w.a.Item,{style:{textAlign:"right"}},d.a.createElement(x.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(x.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 _(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(O.a,"/api/attachments.json")),r.send(i)}i("giR+");var j,U,G=i("fyUT"),H=(i("7Kak"),i("9yH6")),z=H.a.Group,V={margin:"0 8px"},W=function(t){var e=t.callback,i=t.onCancel;return d.a.createElement(w.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:V},"单元格数:"),d.a.createElement("span",{style:V},"行数"),d.a.createElement(w.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(G.a,null)),d.a.createElement("span",{style:V},"列数"),d.a.createElement(w.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(G.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:V},"对齐方式:"),d.a.createElement(w.a.Item,{name:"align"},d.a.createElement(z,null,d.a.createElement(H.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(H.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(H.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(H.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(x.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(x.a,{type:"ghost",onClick:i},"取消")))},K=i("ErOA"),Q=i("7Cbv"),Y="------------",J={default:Y,left:":".concat(Y),center:":".concat(Y,":"),right:"".concat(Y,":")},q=i("9VGf");function Z(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}var X=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",$=["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,X+"-B","bold"),Object(l.a)(j,X+"-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,E=void 0===b?400:b,C=t.miniToolbar,x=void 0!==C&&C,w=t.isFocus,T=void 0!==w&&w,L=t.watch,R=t.insertTemp,O=t.mode,M=void 0===O?"markdown":O,N=t.id,P=void 0===N?"markdown-editor-id":N,F=t.showResizeBar,j=void 0!==F&&F,U=t.noStorage,G=void 0!==U&&U,H=t.showNullButton,z=void 0!==H&&H,V=t.hidetoolBar,Y=void 0!==V&&V,X=t.fullScreen,it=void 0!==X&&X,rt=t.onBlur,nt=t.onCMBeforeChange,at=t.onFullScreen,st=t.className,ot=void 0===st?"":st,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(o.a)(pt,2),mt=gt[0],vt=gt[1],yt=Object(h.useState)(i),bt=Object(o.a)(yt,2),St=bt[0],Et=bt[1],Ct=Object(h.useState)(L),kt=Object(o.a)(Ct,2),At=kt[0],xt=kt[1],wt=Object(h.useState)(it),Tt=Object(o.a)(wt,2),Lt=Tt[0],It=Tt[1],Dt=Object(h.useState)(""),Rt=Object(o.a)(Dt,2),Ot=Rt[0],Mt=Rt[1],Nt=Object(h.useState)(0),Pt=Object(o.a)(Nt,2),Bt=Pt[0],Ft=Pt[1],_t=Object(h.useState)(E),jt=Object(o.a)(_t,2),Ut=jt[0],Gt=jt[1],Ht=Object(h.useState)(!1),zt=Object(o.a)(Ht,2),Vt=(zt[0],zt[1]),Wt=Object(h.useRef)(Object(Q.a)()),Kt=Object(h.useRef)(!1),Qt=Object(h.useRef)(),Yt=Object(h.useRef)(),Jt=Object(h.useRef)(),qt=Object(h.useRef)(),Zt=Object(h.useRef)(),Xt=function(){var t=Object(s.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:Wt.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(S.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(){Et(ft),null==mt||mt.setValue(ft)}),[ft]),Object(h.useEffect)((function(){null==at||at(Lt)}),[Lt]),Object(h.useEffect)((function(){if(Yt.current){var t=p.a.fromTextArea(Yt.current,{mode:M,lineNumbers:!x,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(),s=r.items;if("Files"===n||r.types.indexOf("Files")>-1){if(i.preventDefault(),"stex"==M)return;try{var o,l=s[1];"file"===(null===(o=s[0])||void 0===o?void 0:o.kind)&&(l=s[0]);var c=l.getAsFile(),u=c.name.split(".").pop();_(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,"")):$.includes(u)?t.replaceSelection('').concat(c.name,"")):t.replaceSelection("[".concat(c.name,"](").concat(S.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){a.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}i.preventDefault()}return T&&t.focus(),t.on("paste",e),t.on("dragleave",(function(t,e){Jt.current.classList.remove("mouse-hover-md")})),t.on("dragover",(function(t,e){Jt.current.classList.add("mouse-hover-md")})),t.on("drop",(function(e,i){var r;if(Jt.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();_(i,(function(e){var r,a,s;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===(a=i.type)||void 0===a?void 0:a.indexOf("video"))>-1?t.replaceSelection('')):(null==i||null===(s=i.type)||void 0===s?void 0:s.indexOf("pdf"))>-1?t.replaceSelection('').concat(i.name,"")):$.includes(n)?t.replaceSelection('').concat(i.name,"")):t.replaceSelection("[".concat(i.name,"](").concat(S.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")}))},a=0;a0||r.target.offsetWidth>0)&&($t(),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,$t]),Object(h.useEffect)((function(){if(mt){for(var t=[],e=function(){var e=r[i],n=(a=Object(o.a)(e,2))[0],s=a[1],c=Object(l.a)({},n,(function(){te(s)}));t.push(c),mt.addKeyMap(c)},i=0,r=Object.entries(tt);i0){var t=(new Date).getTime(),e=window.sessionStorage.getItem(P);t>=Bt+1e4&&(!e||e!==St)&&(window.sessionStorage.setItem(P,St),Vt(!0))}}),1e4),Object(h.useEffect)((function(){xt(L)}),[mt,L]),Object(h.useEffect)((function(){mt&&T&&mt.focus()}),[mt,T]),Object(h.useEffect)((function(){if(At&&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,At]),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();Et(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(""),Et("")):i!==mt.getValue()&&(mt.setValue(i),Et(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 xt(!At),mt.focus();case"trigger-full-screen":return It(!Lt),mt.focus();case"link":return void Mt("link");case"code-block":return void Mt("code-block");case"upload-image":return void Mt("upload-image");case"add-table":return void Mt("add-table");default:throw new Error}}),[mt,At,Lt]),ee=Object(h.useCallback)((function(t){switch(Mt(""),Ot){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 a=t.src,s=t.alt,o=t.name;return a.indexOf("type=image")>-1?mt.replaceSelection("![ ".concat(s||""," ]( ").concat(a,' "').concat(s||"",'" )')):a.indexOf("type=application/pdf")>-1?mt.replaceSelection('').concat(o,"")):mt.replaceSelection('').concat(o,"")),mt.focus();case"add-table":for(var l=t.row,c=t.col,u=t.align,h="\n",d=0;d300&&(r=300),Gt(E+r+"px")}}return t.addEventListener("mousedown",r),document.addEventListener("mousemove",a),document.addEventListener("mouseup",n),function(){t.removeEventListener("mousedown",r),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",n)}}}),[mt,qt]),Object(h.useEffect)((function(){Gt(E)}),[E]);var ne={width:Z(y),height:Z(Ut)};Object(h.useMemo)((function(){if(Bt){var t=new Date(Bt),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}),[Bt]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Jt},d.a.createElement("div",{className:"markdown-editor-container ".concat(ot," ").concat(At?"on-preview":""," ").concat(x?"mini":""," ").concat(Lt?"full-screen":""),style:ne},d.a.createElement(k,{insertTemp:R,watch:At,fullScreen:Lt,showNullButton:z,onActionCallback:te,hidetoolBar:Y,uuid:Wt.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})),At?d.a.createElement("div",{ref:Zt,className:"preview-container"},"stex"===M&&d.a.createElement(v,{value:St}),"stex"!==M&&d.a.createElement(m.a,{edit:!0,value:St,replaces:function(t,e){var i=mt.getValue();i=i.replace(t,e),Et(i),null==mt||mt.setValue(i)}})):null))),j?d.a.createElement("a",{ref:qt,className:"editor-resize"}):null,d.a.createElement(A.a,null,et[Ot]?d.a.createElement(r.a,{centered:!0,title:et[Ot],visible:!0,onCancel:re,footer:null},ie):null))}},RMFE: +/*!**********************************!*\ + !*** ./src/assets/images/hb.png ***! + \**********************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA+BAAECUQGBjh7GWgQIEBBo3wABAgSiAgIdPYy1CBAgINC+AQIECEQFBDp6GGsRIEBAoH0DBAgQiAoIdPQw1iJAgIBA+wYIECAQFRDo6GGsRYAAAYH2DRAgQCAqINDRw1iLAAECAu0bIECAQFRAoKOHsRYBAgQE2jdAgACBqIBARw9jLQIECAi0b4AAAQJRAYGOHsZaBAgQEGjfAAECBKICAh09jLUIECAg0L4BAgQIRAUEOnoYaxEgQECgfQMECBCICgh09DDWIkCAgED7BggQIBAVEOjoYaxFgAABgfYNECBAICog0NHDWIsAAQIC7RsgQIBAVECgo4exFgECBATaN0CAAIGogEBHD2MtAgQICLRvgAABAlEBgY4exloECBAQaN8AAQIEogICHT2MtQgQICDQvgECBAhEBQQ6ehhrESBAQKB9AwQIEIgKCHT0MNYiQICAQPsGCBAgEBUQ6OhhrEWAAAGB9g0QIEAgKiDQ0cNYiwABAgLtGyBAgEBUQKCjh7EWAQIEBNo3QIAAgaiAQEcPYy0CBAh8/5Tg6+vrp3/q7wgQIEDgPwKfz+c/v92v/Ac9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICXz/dJvP5/PTP/V3BAgQIHAg4D/oA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},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"],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"],a=[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"],s=[i,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],o="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",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 a={sourceNode:t,pre:1,langExtension:null,numberLines:null,sourceCode:i,spans:null,basePos:e,decorations:null};r(a),n.push.apply(n,a.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),a=[],s={},o=0,l=n.length;o=0;)r[u.charAt(h)]=c;var d=c[1],f=""+d;s.hasOwnProperty(f)||(a.push(d),s[f]=null)}a.push(/[\0-\uffff]/),i=function(t){for(var e=0,i=!1,r=!1,n=0,a=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(a=0;ap[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,a=[],s=0,o=0;s=2&&"["===d?r[s]=c(h):"\\"!==d&&(r[s]=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,a=t.length;n=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(m=!1,y="src"),m||(f[v]=y)}var k=u;if(u+=v.length,m){var A=b[1],x=v.indexOf(A),w=x+A.length;b[2]&&(x=(w=v.length-b[2].length)-A.length);var T=y.substring(5);d(l,o+k,v.substring(0,x),a,c),d(l,o+k+x,A,E(T,A),c),d(l,o+k+w,v.substring(w),a,c)}else c.push(o+k,y)}t.decorations=c};return a}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 a=n>1?"":"\n\r",s=a?".":"[\\S\\s]",o="/(?=[^/*"+a+"])(?:[^/\\x5B\\x5C"+a+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+a+"]|\\x5C"+s+")*(?:\\x5D|$))+/";i.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+o+")")])}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,a,n,s,o,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/,a=t.ownerDocument,s=a.createElement("li");t.firstChild;)s.appendChild(t.firstChild);var o=[s];function l(t){var e=t.nodeType;if(1!=e||r.test(t.className)){if((3==e||4==e)&&i){var s=t.nodeValue,o=s.match(n);if(o){var u=s.substring(0,o.index);t.nodeValue=u;var h=s.substring(o.index+o[0].length);if(h)t.parentNode.insertBefore(a.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 a=t(n,1),s=e.nextSibling;a.appendChild(r);for(var o=s;o;o=s)s=o.nextSibling,a.appendChild(o)}return r}(t.nextSibling,0);(e=i.parentNode)&&1===e.nodeType;)i=e;o.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 E(t,e){return t&&b.hasOwnProperty(t)||(t=/^\s*=S&&(u+=2),o>=E&&(f+=2)}}finally{v&&(v.style.display=y)}}(e)}catch(e){t.console&&console.log(e&&e.stack||e)}}function k(t,e,i){var r=i||!1,n=e||null,a=document.createElement("div");return a.innerHTML="
      "+t+"
      ",a=a.firstChild,r&&y(a,r,!0),C({langExtension:n,numberLines:r,sourceNode:a,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),a.innerHTML}function A(e,i){var r=i||document.body,n=r.ownerDocument||document;function a(t){return r.getElementsByTagName(t)}for(var s=[a("pre"),a("code"),a("xmp")],o=[],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"]),S(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"]),S(g([],[["atv",/^[\s\S]+/]]),["uq.val"]),S(m({keywords:r,hashComments:!0,cStyleComments:!0,types:h}),["c","cc","cpp","cxx","cyc","m"]),S(m({keywords:"null,true,false"}),["json"]),S(m({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:h}),["cs"]),S(m({keywords:n,cStyleComments:!0}),["java"]),S(m({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),S(m({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),S(m({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),S(m({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),S(m({keywords:s,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),S(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"]),S(g([],[["str",/^[\s\S]+/]]),["regex"]);var x=t.PR={createSimpleLexer:g,registerLangHandler:S,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:k,prettyPrint:A},w=t.define;"function"==typeof w&&w.amd&&w("google-code-prettify",[],(function(){return x}))}()},SMhR: +/*!*****************************************!*\ + !*** ./src/assets/images/teacherQQ.png ***! + \*****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcYAAAHGCAYAAADuYispAAAAAklEQVR4AewaftIAABHTSURBVO3BQY4cy5IEQdNA3//KNo2/8NU8XzCQyCpSReivSJKk/zmRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7yMiB/s7a5AWTTNhsgN9pmA2TTNp8MyI22uQHkv7TNDSCbttkAudE2bwJyo22eBGTTNhsgf7O2ecuJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpPGTD9c2nwzIk9pmA2TTNjeAPAnIpm1uANm0zQbIDSBPAXIDyKZtPhmQG22zAfLN2uaTAflUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGT74ckCe1zZOAbNpm0zYbIDfaZgPkRts8qW1utM0GyKZtntI2GyBPArJpmw2QTds8CcimbW4A+WRAntQ23+pEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0viJXtU2T2qbDZA3Adm0zZOAbNpm0zYbIJu2+VZtswGyaZsbbbMBsmmbDZBN29xoG32mE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJ3oVkCe1zZPaZgNk0zYbIJu2eRKQJwF5S9vcAPIkIJu2uQFk0zY32kbf6USSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnS+MmXa5t/WdtsgGza5psB+WRt8xQgN4DcaJtv1jYbIDfa5pO1jf5/J5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGTz4ckH9Z22yAbNpmA2TTNhsgm7bZANm0zQbIpm02QDZtswFyA8h/aZsbbbMBsmmbDZBN22yAbNpmA2TTNhsgm7bZALkBZNM2N4Doz5xIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGiSRJGvRX9LGAvKltNkA2bXMDyJvaZgNk0zZPAfLN2mYD5EbbPAnIk9pG7ziRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7y4YBs2uYGkE3bbIBs2mYD5Ebb/Mva5klAbgB5S9tsgGza5gaQDZBN2zwJyJPaZgNkA2TTNhsgN9pmA2TTNt/qRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdKgv/IPA3KjbW4AeVLb3ADyzdrmBpAntc2nAnKjbTZANm1zA8gna5sNkH9Z27zlRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4yZcDcqNtbgDZtM2mbTZANm1zA8imbTZANm1zA8iTgGza5gaQpwDZtM2NttkAudE2b2qbDZAbbbMB8qa20f/vRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4ycuA3GibDZANkBttswHyJCA32uZJQDZt8yQgTwKyaZsNkD/VNk8CsmmbDZA3tc0GyI222QDZtM0NIJu2eRKQTdt8qxNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4yf/uLbZANkA2bTNDSBPAnKjbd7UNhsgN4Bs2uZG27wFyKZtbrTNBsimbW4AudE2N9pmA+RG29wAsmmbJwHZtM1bTiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNn3w5IJu2udE2N4DcaJsbQDZtswGyAfIvA7Jpmz8F5EbbPAnIpm1uANm0zZuAbNpm0zYbIBsgm7a5AeRJbfOpTiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNn3y4ttkAuQFk0zYbIDfa5gaQN7XNk4A8qW02QG4A+VNtswHyzdpmA+RJbfMkIJu2eVPbbIBs2uZvdSJJksaJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRp/ERX2kb/DcimbW4AuQFk0zYbIDfa5i1t8yYgm7a50TYbIN+sbW4A2bTNk4Bs2uYtJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGT/5yQDZtswHypLbZAHlT29xomw2QTdvcAHIDyKdqmze1zZuAvKltNkCeBOSTAflWJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZIG/ZUPBuRG22yAbNrmBpAbbbMBcqNtNkA2bbMBsmmbDZBN2zwJyFvaZgNk0zYbIDfaZgNk0zYbIG9qm08GZNM2GyCbttkA2bTNtzqRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7yMiBPAvIkIN8MyA0gm7bZALkB5Elt8yQgf6pt9N/aZgPkTUA2bbNpmycB+VedSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSxokkSRr0V/5iQDZt882AbNrmBpBN22yAbNpmA+RG2zwJyKZt/hSQTds8CcimbW4A2bTNk4B8s7bZALnRNhsgm7bZANm0zVtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2ffDggm7bZtM0GyJvaZgPkBpBN2zypbTZAbrTNBsimbZ4E5ClAbrTNNwOyaZsbbXMDyI222QDZtM0GyAbIDSCbtvlUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZIG/ZV/GJAbbbMB8qa22QDZtM0GyKZtbgDZtM0NIJu22QC50Tb/BciNttkAeVLbbIDcaJsNkE3bbIA8qW02QN7UNv+qE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJy8DcqNt3gTkkwH5ZECeBOSTAXkKkE3bbIA8qW2e1DY32mYDZNM2GyD6TCeSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSxk++HJBN29xomycB2bTNm4Bs2mYD5JsBudE2TwGyaZsNkCcBudE2N4C8CciNtnkSkBtAbrTNpzqRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7ysrb5ZkA2bXMDyI22eRKQTds8CcimbTZANm2zAXIDyH9pmye1zQbIpm02QG4A+WRtswHyJCCbtnlT23yrE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0vjJy4A8qW2e1DZvapsbQDZtswFyA8imbTZtc6Nt3tQ2TwGyaZtN22yA3GibDZBN22yAPAnIm9rmSUA2bbMBcqNt3nIiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkadBf+WBANm2zAfLN2mYD5Ebb3AByo202QPSOttkA2bTNm4Bs2uYGEP25tvlUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZIG/ZUXAbnRNjeA3GibG0ButM03A/LJ2mYDZNM2fwrIJ2ubG0A2bXMDyI22uQFk0zY3gNxomxtANm3zrU4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkDforLwKyaZsNkE3bPAnIpm02QJ7UNk8CcqNtNkButM0GyJPaZgPkT7XNBsiNttkA+Ze1zQ0gN9pmA+RNbbMBsmmbt5xIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGiSRJGvRX/mJANm3zzYDcaJsbQG60zQ0gm7a5AeRJbfMWIE9qmw2QG22zAXKjbTZANm2zAfKktrkB5E1t85YTSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeMnLwOyaZsbbbMB8qa2udE2GyBvapsNkE3bbNrmTW2zAbIB8l/a5kltswHypLZ5U9s8CciNtnkSkE3b/KtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2fvKxtbgDZtM2NtvlmbbMB8iQgTwKyaZsNkG8F5Elt8yYgm7Z5EpBN2zwJyCcDcqNtPtWJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpPGTDwdk0zY32uYGkE3b3ACyaZtP1jZvArJpmw2QDZBN22yA/Bcgm7bZALkB5Ebb6L8B2bTNDSCbttkAudE2GyCbtnnLiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRBf+UvBmTTNhsgm7a5AeSTtc2TgNxomw2QG22zAbJpmz8F5EbbbIC8qW2+GZBN2zwJyKZtNkButM0GyI22ecuJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpEF/5UVAbrTNk4DcaJsNkG/WNk8C8qS22QDZtM0GyKZtPhWQN7XNk4Bs2mYD5Elt8yQgN9rmb3UiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkadBfeRGQN7XNk4Bs2uabAdm0zQbIm9rmUwHZtM0GyI222QB5U9tsgDypbZ4EZNM2bwKyaZtvdSJJksaJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRp/OTDtc0GyJOA3GibDZAbbXMDyKZtntQ23wzIjbb5L21zo21uALnRNhsgn6xtNkA2bfMmIG8CsmmbT3UiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkadBf+WBANm2zAbJpmw2QTdv8y4DcaJsbQDZtswFyo202QDZt8xQgm7a5AeRG23wzIDfa5k1ANm1zA8iNtnnLiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqTxk79c2zwJyI222QDZtM2TgGzaZgNkA+RNbbMBcqNtNkD+VNvcALJpmzcB2bTNBsimbT4ZkE3bvAnIpm2+1YkkSRonkiRpnEiSpHEiSZLGiSRJGieSJGmcSJKkQX/lgwF5Uts8CciNtrkB5EltcwPIjbbZANm0zQbIp2qbJwHZtM0NIG9qmzcB2bTNBsiNttkAeVLbfKoTSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSYP+youAPKltngRk0zY3gGza5klAntQ2N4A8qW02QL5V22yAfLK22QC50TYbIJu22QD5Zm2zAXKjbd5yIkmSxokkSRonkiRpnEiSpHEiSZLGiSRJGieSJGnQX9FrgGzaZgNk0zYbIDfaZgNk0zYbIJu22QDZtM0NIJu2eQqQG21zA8imbTZANm3zJiBvapsnAbnRNn+rE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJy8D8jdrm03b3GibDZA3tc2NtnkSkDcB+S9tc6NtntQ2N9rmBpAbbXOjbW4AuQFk0zZPAnKjbT7ViSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqTxkw/XNp8MyJOAbNrmRts8CcimbT5Z22yA3GibpwDZtM0NIJ+sbTZAbgB5U9s8qW02QDZt861OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2ffDkgT2qbJwF5UttsgLwJyJPa5gaQG0De0jY3gGza5gaQG22zAXKjbZ4EZAPkTUBuANm0zac6kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjR+ole1zZvaZgPkRtvcAPIkIJu22QDZtM3fCsiNttkAudE2TwKyaZtN22yAbNrmBpAbbbMBsgGyaZu3nEiSpHEiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaP9FHA3KjbTZAngRk0zafDMiTgPyptrkB5Eltc6Nt3gTkTW1zA8imbZ7UNt/qRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4yZdrm28G5JO1zQ0gN9pmA2QDZNM2GyCbtrnRNk8BcqNtNkA2QN7UNhsgTwKyaZsNkE3bvAnIjbb5VCeSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSBv2VFwH5m7XNk4Bs2uZJQJ7UNjeA3GibTwXkRttsgNxomw2QG22zAXKjbW4AeVLbbIDcaJsNkCe1zVtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJA36K5Ik6X9OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4/8ATrCgy9kbxW8AAAAASUVORK5CYII="},TGq3: +/*!***********************************************!*\ + !*** ./src/assets/images/icons/lockclose.svg ***! + \***********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/lockclose.365036e8.svg"},"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,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),a=/Edge\/(\d+)/.exec(t),s=r||n||a,o=s&&(r?document.documentMode||6:+(a||n)[1]),l=!a&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!a&&/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=!a&&/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),S=/win/i.test(e),E=h&&t.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(h=!1,l=!0);var C=y&&(c||h&&(null==E||E<12.11)),k=i||s&&o>=9;function A(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var x,w=function(t,e){var i=t.className,r=A(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 T(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function L(t,e){return T(t).appendChild(e)}function I(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 a=0;a=e)return s+(e-a);s+=o-a,s+=i-s%i,a=o+1}}g?P=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:s&&(P=function(t){try{t.select()}catch(t){}});var j=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};function U(t,e){for(var i=0;i=e)return r+Math.min(s,e-n);if(n+=a-r,r=a+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 J(t,e){for(var i=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||X.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&$(t))||e.test(t):$(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,a=r<0?Math.ceil(n):Math.floor(n);if(a==e)return t(a)?e:i;t(a)?i=a:e=a+r}}var st=null;function ot(t,e,i){var r;st=null;for(var n=0;ne)return n;a.to==e&&(a.from!=a.to&&"before"==i?r=n:st=n),a.from==e&&(a.from!=a.to&&"before"!=i?r=n:st=n)}return null!=r?r:st}var lt=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,i=/[LRr]/,r=/[Lb1n]/,n=/[1n]/;function a(t,e,i){this.level=t,this.from=e,this.to=i}return function(s,o){var l="ltr"==o?"L":"R";if(0==s.length||"ltr"==o&&!t.test(s))return!1;for(var c,u=s.length,h=[],d=0;d-1&&(r[e]=n.slice(0,a).concat(n.slice(a+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 St(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Et(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ct(t){bt(t),St(t)}function kt(t){return t.target||t.srcElement}function At(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 xt,wt,Tt=function(){if(s&&o<9)return!1;var t=I("div");return"draggable"in t||"dragDrop"in t}();function Lt(t){if(null==xt){var e=I("span","​");L(t,I("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(xt=e.offsetWidth<=1&&e.offsetHeight>2&&!(s&&o<8))}var i=xt?I("span","​"):I("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function It(t){if(null!=wt)return wt;var e=L(t,document.createTextNode("AخA")),i=x(e,0,1).getBoundingClientRect(),r=x(e,1,2).getBoundingClientRect();return T(t),!(!i||i.left==i.right)&&(wt=r.right-i.right<3)}var Dt,Rt=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 a=t.slice(e,"\r"==t.charAt(n-1)?n-1:n),s=a.indexOf("\r");-1!=s?(i.push(a.slice(0,s)),e+=s+1):(i.push(a),e=n+1)}return i}:function(t){return t.split(/\r\n?|\n/)},Ot=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)},Mt="oncopy"in(Dt=I("div"))||(Dt.setAttribute("oncopy","return;"),"function"==typeof Dt.oncopy),Nt=null,Pt={},Bt={};function Ft(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Pt[t]=e}function _t(t){if("string"==typeof t&&Bt.hasOwnProperty(t))t=Bt[t];else if(t&&"string"==typeof t.name&&Bt.hasOwnProperty(t.name)){var e=Bt[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 _t("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return _t("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function jt(t,e){e=_t(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 a in n)n.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=n[a])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)r[s]=e.modeProps[s];return r}var Ut={};function Gt(t,e){F(e,Ut.hasOwnProperty(t)?Ut[t]:Ut[t]={})}function Ht(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 Vt(t,e,i){return!t.startState||t.startState(e,i)}var Wt=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],a=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},Wt.prototype.sol=function(){return this.pos==this.lineStart},Wt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Wt.prototype.next=function(){if(this.pose},Wt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Wt.prototype.skipToEnd=function(){this.pos=this.string.length},Wt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Wt.prototype.backUp=function(t){this.pos-=t},Wt.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},Wt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Wt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Wt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Wt.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],a={};Se(t,e.text,t.doc.mode,i,(function(t,e){return n.push(t,e)}),a,r);for(var s=i.state,o=function(r){i.baseTokens=n;var o=t.state.overlays[r],l=1,c=0;i.state=!0,Se(t,e.text,o.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(o.opaque)n.splice(i,l-i,t,"overlay "+e),l=i+2;else for(;it.options.maxHighlightLength&&Ht(t.doc.mode,r.state),a=he(t,e,r);n&&(r.state=n),e.stateAfter=r.save(!n),e.styles=a.styles,a.classes?e.styleClasses=a.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 a=function(t,e,i){for(var r,n,a=t.doc,s=i?-1:e-(t.doc.mode.innerMode?1e3:100),o=e;o>s;--o){if(o<=a.first)return a.first;var l=Kt(a,o-1),c=l.stateAfter;if(c&&(!i||o+(c instanceof ce?c.lookAhead:0)<=a.modeFrontier))return o;var u=_(l.text,null,t.options.tabSize);(null==n||r>u)&&(n=o-1,r=u)}return n}(t,e,i),s=a>r.first&&Kt(r,a-1).stateAfter,o=s?ue.fromSaved(r,s,a):new ue(r,Vt(r.mode),a);return r.iter(a,e,(function(i){pe(t,i.text,o);var r=o.line;i.stateAfter=r==e-1||r%5==0||r>=n.viewFrom&&re.start)return a}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,Ht(t.mode,e.state),i,e.lookAhead):new ue(t,Ht(t.mode,e),i)},ue.prototype.save=function(t){var e=!1!==t?Ht(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,a,s=t.doc,o=s.mode,l=Kt(s,(e=oe(s,e)).line),c=fe(t,e.line,i),u=new Wt(l.text,t.options.tabSize,c);for(r&&(a=[]);(r||u.post.options.maxHighlightLength?(o=!1,s&&pe(t,e,r,h.pos),h.pos=e.length,l=null):l=be(me(i,h,r.state,d),a),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!o||u!=l){for(;c=e:a.to>e);(r||(r=[])).push(new ke(s,a.from,o?null:a.to))}}return r}(i,n,s),l=function(t,e,i){var r;if(t)for(var n=0;n=e:a.to>e)||a.from==e&&"bookmark"==s.type&&(!i||a.marker.insertLeft)){var o=null==a.from||(s.inclusiveLeft?a.from<=e:a.from0&&o)for(var b=0;be)&&(!i||Oe(i,a.marker)<0)&&(i=a.marker)}return i}function Fe(t,e,i,r,n){var a=Kt(t,e),s=Ce&&a.markedSpans;if(s)for(var o=0;o=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 _e(t){for(var e;e=Ne(t);)t=e.find(-1,!0).line;return t}function je(t,e){var i=Kt(t,e),r=_e(i);return i==r?e:qt(r)}function Ue(t,e){if(e>t.lastLine())return e;var i,r=Kt(t,e);if(!Ge(t,r))return e;for(;i=Pe(r);)r=i.find(1,!0).line;return qt(r)+1}function Ge(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,Ie(this,e),this.height=i?i(this):1};function Qe(t){t.parent=null,Le(t)}Ke.prototype.lineNo=function(){return qt(this)},yt(Ke);var Ye={},Je={};function qe(t,e){if(!t||/^\s*$/.test(t))return null;var i=e.addModeClass?Je:Ye;return i[t]||(i[t]=t.replace(/\S+/g,"cm-$&"))}function Ze(t,e){var i=D("span",null,null,l?"padding-right: .1px":null),r={pre:D("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 a=n?e.rest[n-1]:e.line,s=void 0;r.pos=0,r.addToken=$e,It(t.display.measure)&&(s=ct(a,t.doc.direction))&&(r.addToken=ti(r.addToken,s)),r.map=[],ii(a,r,de(t,a,e!=t.display.externalMeasured&&qt(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=N(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=N(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Lt(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 o=r.content.lastChild;(/\bcm-tab\b/.test(o.className)||o.querySelector&&o.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=N(r.pre.className,r.textClass||"")),r}function Xe(t){var e=I("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function $e(t,e,i,r,n,a,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,a,s,o,l);t(i,r.slice(0,h.to-c),n,a,null,o,l),a=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,a=0;if(r)for(var s,o,l,c,u,h,d,f=n.length,p=0,g=1,m="",v=0;;){if(v==p){l=c=u=o="",d=null,h=null,v=1/0;for(var y=[],b=void 0,S=0;Sp||C.collapsed&&E.to==p&&E.from==p)){if(null!=E.to&&E.to!=p&&v>E.to&&(v=E.to,c=""),C.className&&(l+=" "+C.className),C.css&&(o=(o?o+";":"")+C.css),C.startStyle&&E.from==p&&(u+=" "+C.startStyle),C.endStyle&&E.to==v&&(b||(b=[])).push(C.endStyle,E.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var k in C.attributes)(d||(d={}))[k]=C.attributes[k];C.collapsed&&(!h||Oe(h.marker,C)<0)&&(h=E)}else E.from>p&&v>E.from&&(v=E.from)}if(b)for(var A=0;A=f)break;for(var w=Math.min(f,v);;){if(m){var T=p+m.length;if(!h){var L=T>w?m.slice(0,w-p):m;e.addToken(e,L,s?s+l:l,u,p+L.length==v?c:"",o,d)}if(T>=w){m=m.slice(w-p),p=w;break}p=T,u=""}m=n.slice(a,a=i[g++]),s=qe(i[g++],e.cm.options)}}else for(var I=1;Ii)return{map:t.measure.maps[n],cache:t.measure.caches[n],before:!0}}function Ii(t,e,i,r){return Oi(t,Ri(t,e),i,r)}function Di(t,e){if(e>=t.display.viewFrom&&e=i.lineN&&e2&&a.push((l.bottom+c.top)/2-i.top)}}a.push(i.bottom-i.top)}}(t,e.view,e.rect),e.hasHeights=!0),(a=function(t,e,i,r){var n,a=Pi(e.map,i,r),l=a.node,c=a.start,u=a.end,h=a.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&rt(e.line.text.charAt(a.coverStart+c));)--c;for(;a.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(s&&o<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}:Ni}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=(a=l-o)-1,e>=l&&(s="right")),null!=n){if(r=t[c+2],o==l&&i==(r.insertLeft?"left":"right")&&(s=i),"left"==i&&0==n)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],s="left";if("right"==i&&n==l-o)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"),!o)return s("before"==c?l-1:l,"before"==c);function u(t,e,i){return s(i?t-1:t,1==o[e].level!=i)}var h=ot(o,l,c),d=st,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=oe(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 a=te(t,e,i);return a.xRel=n,r&&(a.outside=r),a}function Ji(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),a=r.first+r.size-1;if(n>a)return Yi(r.first+r.size-1,Kt(r,a).text.length,null,1,1);e<0&&(e=0);for(var s=Kt(r,n);;){var o=$i(t,s,n,e,i),l=Be(s,o.ch+(o.xRel>0||o.outside>0?1:0));if(!l)return o;var c=l.find(1);if(c.line==n)return c;s=Kt(r,n=c.line)}}function qi(t,e,i,r){r-=Hi(e);var n=e.text.length,a=at((function(e){return Oi(t,i,e-1).bottom<=r}),n,0);return{begin:a,end:n=at((function(e){return Oi(t,i,e).top>r}),a,n)}}function Zi(t,e,i,r){return i||(i=Ri(t,e)),qi(t,e,i,zi(t,e,Oi(t,i,r),"line").top)}function Xi(t,e,i,r){return!(t.bottom<=i)&&(t.top>i||(r?t.left:t.right)>e)}function $i(t,e,i,r,n){n-=ze(e);var a=Ri(t,e),s=Hi(e),o=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,a,u,r,n);o=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,g=null,m=at((function(e){var i=Oi(t,a,e);return i.top+=s,i.bottom+=s,!!Xi(i,r,n,!1)&&(i.top<=n&&i.left<=r&&(p=e,g=i),!0)}),o,l),v=!1;if(g){var y=r-g.left=S.bottom?1:0}return Yi(i,m=nt(e.text,m,1),f,v,r-d)}function tr(t,e,i,r,n,a,s){var o=at((function(o){var l=n[o],c=1!=l.level;return Xi(Ki(t,te(i,c?l.to:l.from,c?"before":"after"),"line",e,r),a,s,!0)}),0,n.length-1),l=n[o];if(o>0){var c=1!=l.level,u=Ki(t,te(i,c?l.from:l.to,c?"after":"before"),"line",e,r);Xi(u,a,s,!0)&&u.top>s&&(l=n[o-1])}return l}function er(t,e,i,r,n,a,s){var o=qi(t,e,r,s),l=o.begin,c=o.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=Oi(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==Mi){Mi=I("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Mi.appendChild(document.createTextNode("x")),Mi.appendChild(I("br"));Mi.appendChild(document.createTextNode("x"))}L(t.measure,Mi);var i=Mi.offsetHeight/50;return i>3&&(t.cachedTextHeight=i),T(t.measure),i||1}function rr(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=I("span","xxxxxxxxxx"),i=I("pre",[e],"CodeMirror-line-like");L(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,a=e.gutters.firstChild,s=0;a;a=a.nextSibling,++s){var o=t.display.gutterSpecs[s].className;i[o]=a.offsetLeft+a.clientLeft+n,r[o]=a.clientWidth}return{fixedPos:ar(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:i,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function ar(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function sr(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(Ge(t.doc,n))return 0;var a=0;if(n.widgets)for(var s=0;s0&&(l=Kt(t.doc,c.line).text).length==c.ch){var u=_(l,l.length,t.options.tabSize)-l.length;c=te(c.line,Math.max(0,Math.round((a-Ai(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 a=fr(t,i,i+r,1);a?(n.view=n.view.slice(a.index),n.viewFrom=a.lineN,n.viewTo+=r):dr(t)}else if(i>=n.viewTo){var s=fr(t,e,e,-1);s?(n.view=n.view.slice(0,s.index),n.viewTo=s.lineN):dr(t)}else{var o=fr(t,e,e,-1),l=fr(t,i,i+r,1);o&&l?(n.view=n.view.slice(0,o.index).concat(ni(t,o.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 a=r.view[cr(t,e)];if(null!=a.node){var s=a.changes||(a.changes=[]);-1==U(s,i)&&s.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,a=cr(t,e),s=t.display.view;if(!Ce||i==t.doc.first+t.doc.size)return{index:a,lineN:i};for(var o=t.display.viewFrom,l=0;l0){if(a==s.length-1)return null;n=o+s[a].size-e,a++}else n=o-e;e+=n,i+=n}for(;je(t.doc,i)!=i;){if(a==(r<0?0:s.length-1))return null;i+=r*s[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:i}}function pr(t){for(var e=t.display.view,i=0,r=0;r=t.display.viewTo||o.to().linee||e==i&&s.to==e)&&(r(Math.max(s.from,e),Math.min(s.to,i),1==s.level?"rtl":"ltr",a),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,S=null==r&&e==d,E=0==h,C=!g||h==g.length-1;if(y.top-v.top<=3){var k=(c?S:b)&&C,A=(c?b:S)&&E?o:(m?v:y).left,x=k?l:(m?y:v).right;u(A,v.top,x-A,v.bottom)}else{var w,T,L,I;m?(w=c&&b&&E?o:v.left,T=c?l:p(t,n,"before"),L=c?o:p(e,n,"after"),I=c&&S&&C?l:y.right):(w=c?p(t,n,"before"):o,T=!c&&b&&E?l:v.right,L=!c&&S&&C?o:y.left,I=c?p(e,n,"after"):l),u(w,v.top,T-w,v.bottom),v.bottom0?e.blinker=setInterval((function(){t.hasFocus()||Ar(t),e.cursorDiv.style.visibility=(i=!i)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Er(t){t.state.focused||(t.display.input.focus(),kr(t))}function Cr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Ar(t))}),100)}function kr(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,M(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()),Sr(t))}function Ar(t,e){t.state.delayingBlurEvent||(t.state.focused&&(pt(t,"blur",t,e),t.state.focused=!1,w(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function xr(t){for(var e=t.display,i=e.lineDiv.offsetTop,r=0;r.005||d<-.005)&&(Jt(n.line,l),wr(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 wr(t){if(t.widgets)for(var e=0;e=s&&(a=Zt(e,ze(Kt(e,l))-t.wrapper.clientHeight),s=l)}return{from:a,to:Math.max(s,a+1)}}function Lr(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,a=Ti(t),s={};e.bottom-e.top>a&&(e.bottom=e.top+a);var o=t.doc.height+ki(i),l=e.topo-r;if(e.topn+a){var u=Math.min(e.top,(c?o:e.bottom)-a);u!=n&&(s.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=wi(t)-i.gutters.offsetWidth,p=e.right-e.left>f;return p&&(e.right=e.left+f),e.left<10?s.scrollLeft=0:e.leftf+d-3&&(s.scrollLeft=e.right+(p?0:10)-f),s}function Ir(t,e){null!=e&&(Or(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Dr(t){Or(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Rr(t,e,i){null==e&&null==i||Or(t),null!=e&&(t.curOp.scrollLeft=e),null!=i&&(t.curOp.scrollTop=i)}function Or(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Mr(t,Qi(t,e.from),Qi(t,e.to),e.margin))}function Mr(t,e,i,r){var n=Lr(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});Rr(t,n.scrollLeft,n.scrollTop)}function Nr(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 Br(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+ki(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+xi(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:i}}var _r=function(t,e,i){this.cm=i;var r=this.vert=I("div",[I("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=I("div",[I("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,s&&o<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};_r.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 a=t.viewWidth-t.barLeft-(i?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+a)+"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}},_r.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},_r.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},_r.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},_r.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)}))},_r.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;Gr(t,e);for(var n=0;n<4&&i!=t.display.barWidth||r!=t.display.barHeight;n++)i!=t.display.barWidth&&t.options.lineWrapping&&xr(t),Gr(t,Fr(t)),i=t.display.barWidth,r=t.display.barHeight}function Gr(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 Hr={native:_r,null:jr};function zr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&w(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Hr[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?Br(t,e):Nr(t,e)}),t),t.display.scrollbars.addClass&&M(t.display.wrapper,t.display.scrollbars.addClass)}var Vr=0;function Wr(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:++Vr},e=t.curOp,ai?ai.ops.push(e):e.ownsGroup=ai={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 an(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Yr(t){t.updatedDisplay=t.mustUpdate&&sn(t.cm,t.update)}function Jr(t){var e=t.cm,i=e.display;t.updatedDisplay&&xr(e),t.barMeasure=Fr(e),i.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ii(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+xi(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+t.adjustWidthTo-wi(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=i.input.prepareSelection())}function qr(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 a=I("div","​",null,"position: absolute;\n top: "+(e.top-i.viewOffset-Ci(t.display))+"px;\n height: "+(e.bottom-e.top+xi(t)+i.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(a),a.scrollIntoView(n),t.display.lineSpace.removeChild(a)}}}(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 a=0;a<5;a++){var s=!1,o=Ki(t,e),l=i&&i!=e?Ki(t,i):o,c=Lr(t,n={left:Math.min(o.left,l.left),top:Math.min(o.top,l.top)-r,right:Math.max(o.left,l.left),bottom:Math.max(o.bottom,l.bottom)+r}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Nr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Br(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return n}(e,oe(r,t.scrollToPos.from),oe(r,t.scrollToPos.to),t.scrollToPos.margin));var n=t.maybeHiddenMarkers,a=t.maybeUnhiddenMarkers;if(n)for(var s=0;s=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(a){if(r.line>=t.display.viewFrom){var s=a.styles,o=a.text.length>t.options.maxHighlightLength?Ht(e.mode,r.state):null,l=he(t,a,r,!0);o&&(r.state=o),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var h=!s||s.length!=a.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&&Xr(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,a=Math.max(e.visible.from-t.options.viewportMargin,r.first),s=Math.min(n,e.visible.to+t.options.viewportMargin);i.viewFroms&&i.viewTo-s<20&&(s=Math.min(n,i.viewTo)),Ce&&(a=je(t.doc,a),s=Ue(t.doc,s));var o=a!=i.viewFrom||s!=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,a,s),i.viewOffset=ze(Kt(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=pr(t);if(!o&&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=O();if(!e||!R(t.display.lineDiv,e))return null;var i={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&R(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,a=r.lineDiv,s=a.firstChild;function o(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&&(T(d.lineNumber),d.lineNumber.appendChild(document.createTextNode($t(t.options,u)))),s=d.node.nextSibling}else{var p=mi(t,d,u,i);a.insertBefore(p,s)}u+=d.size}for(;s;)s=o(s)}(t,i.updateLineNumbers,e.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,function(t){if(t&&t.activeElt&&t.activeElt!=O()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&R(document.body,t.anchorNode)&&R(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),T(i.cursorDiv),T(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,o&&(i.lastWrapHeight=e.wrapperHeight,i.lastWrapWidth=e.wrapperWidth,rn(t,400)),i.updateLineNumbers=null,!0}function on(t,e){for(var i=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=wi(t))r&&(e.visible=Tr(t.display,t.doc,i));else if(i&&null!=i.top&&(i={top:Math.min(t.doc.height+ki(t.display)-Ti(t),i.top)}),e.visible=Tr(t.display,t.doc,i),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!sn(t,e))break;xr(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 an(t,e);if(sn(t,i)){xr(t),on(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+xi(t)+"px"}function hn(t){var e=t.display,i=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=ar(e)-e.scroller.scrollLeft+t.doc.scrollLeft,n=e.gutters.offsetWidth,a=r+"px",s=0;so.clientWidth,u=o.scrollHeight>o.clientHeight;if(n&&c||a&&u){if(a&&y&&l)t:for(var d=e.target,f=s.view;d!=o;d=d.parentNode)for(var p=0;p=0&&ee(t,r.to())<=0)return i}return-1};var kn=function(t,e){this.anchor=t,this.head=e};function An(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 a=1;a0:l>=0){var c=ae(o.from(),s.from()),u=ne(o.to(),s.to()),h=o.empty()?s.from()==s.head:o.from()==o.head;a<=i&&--i,e.splice(--a,2,new kn(h?u:c,h?c:u))}}return new Cn(e,i)}function xn(t,e){return new Cn([new kn(t,e||t)],0)}function wn(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 Tn(t,e){if(ee(t,e.from)<0)return t;if(ee(t,e.to)<=0)return wn(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+=wn(e).ch-e.to.ch),te(i,r)}function Ln(t,e){for(var i=[],r=0;r1&&t.remove(o.line+1,p-1),t.insert(o.line+1,v)}oi(t,"change",t,e)}function Nn(t,e,i){!function t(r,n,a){if(r.linked)for(var s=0;so-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(a=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)))s=Y(a.changes),0==ee(e.from,e.to)&&0==ee(e.from,s.to)?s.to=wn(e):a.changes.push(_n(t,e));else{var l=Y(n.done);for(l&&l.ranges||Hn(t.sel,n.done),a={changes:[_n(t,e)],generation:n.generation},n.done.push(a);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=o,n.lastOp=n.lastSelOp=r,n.lastOrigin=n.lastSelOrigin=e.origin,s||pt(t,"historyAdded")}function Gn(t,e,i,r){var n=t.history,a=r&&r.origin;i==n.lastSelOp||a&&n.lastSelOrigin==a&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==a||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,a,Y(n.done),e))?n.done[n.done.length-1]=e:Hn(e,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=a,n.lastSelOp=i,r&&!1!==r.clearRedo&&jn(n.undone)}function Hn(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],a=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]={}))[a]=i.markedSpans),++a}))}function Vn(t){if(!t)return null;for(var e,i=0;i-1&&(Y(o)[h]=c[h],delete c[h])}}}return r}function Qn(t,e,i,r){if(r){var n=t.anchor;if(i){var a=ee(e,n)<0;a!=ee(i,n)<0?(n=e,e=i):a!=ee(e,i)<0&&(e=i)}return new kn(n,e)}return new kn(i||e,e)}function Yn(t,e,i,r,n){null==n&&(n=t.cm&&(t.cm.display.shift||t.extend)),$n(t,new Cn([Qn(t.sel.primary(),e,i,n)],0),r)}function Jn(t,e,i){for(var r=[],n=t.cm&&(t.cm.display.shift||t.extend),a=0;a=e.ch:o.to>e.ch))){if(n&&(pt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--s;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=sa(t,h,-r,h&&h.line==e.line?a:null)),h&&h.line==e.line&&(d=ee(h,i))&&(r<0?d<0:d>0))return na(t,h,e,r,n)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=sa(t,f,r,f.line==e.line?a:null)),f?na(t,f,e,r,n):null}}return e}function aa(t,e,i,r,n){var a=r||1,s=na(t,e,i,a,n)||!n&&na(t,e,i,a,!0)||na(t,e,i,-a,n)||!n&&na(t,e,i,-a,!0);return s||(t.cantEdit=!0,te(t.first,0))}function sa(t,e,i,r){return i<0&&0==e.ch?e.line>t.first?oe(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,o.from),d=ee(c.to,o.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:o.from}),(d>0||!s.inclusiveRight&&!d)&&u.push({from:o.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)ua(t,{from:r[n].from,to:r[n].to,text:n?[""]:e.text,origin:e.origin});else ua(t,e)}}function ua(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ee(e.from,e.to)){var i=Ln(t,e);Un(t,e,i,t.cm?t.cm.curOp.id:NaN),fa(t,e,i,we(t,e));var r=[];Nn(t,(function(t,i){i||-1!=U(r,t.history)||(va(t.history,e),r.push(t.history)),fa(t,e,null,we(t,e))}))}}function ha(t,e,i){var r=t.cm&&t.cm.state.suppressEdits;if(!r||i){for(var n,a=t.history,s=t.sel,o="undo"==e?a.done:a.undone,l="undo"==e?a.undone:a.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function da(t,e){if(0!=e&&(t.first+=e,t.sel=new Cn(J(t.sel.ranges,(function(t){return new kn(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.linea&&(e={from:e.from,to:te(a,Kt(t,a).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Qt(t,e.from,e.to),i||(i=Ln(t,e)),t.cm?function(t,e,i){var r=t.doc,n=t.display,a=e.from,s=e.to,o=!1,l=a.line;t.options.lineWrapping||(l=qt(_e(Kt(r,a.line))),r.iter(l,s.line+1,(function(t){if(t==n.maxLine)return o=!0,!0}))),r.sel.contains(e.from,e.to)>-1&&mt(t),Mn(r,e,i,sr(t)),t.options.lineWrapping||(r.iter(l,a.line+e.text.length,(function(t){var e=Ve(t);e>n.maxLineLength&&(n.maxLine=t,n.maxLineLength=e,n.maxLineChanged=!0,o=!1)})),o&&(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 ba))){var o=[];this.collapse(o),this.children=[new ba(o)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var s=n.lines.length%25+25,o=s;o10);t.parent.maybeSpill()}},iterN:function(t,e,i){for(var r=0;r0||0==s&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=D("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Fe(t,e.line,e,i,a)||e.line!=i.line&&Fe(t,i.line,e,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ce=!0}a.addToHistory&&Un(t,{from:e,to:i,origin:"markText"},t.sel,NaN);var o,l=e.line,c=t.cm;if(t.iter(l,i.line+1,(function(t){c&&a.collapsed&&!c.options.lineWrapping&&_e(t)==c.display.maxLine&&(o=!0),a.collapsed&&l!=e.line&&Jt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new ke(a,l==e.line?e.ch:null,l==i.line?i.ch:null)),++l})),a.collapsed&&t.iter(e.line,i.line+1,(function(e){Ge(t,e)&&Jt(e,0)})),a.clearOnEnter&&ht(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(Ee=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),a.collapsed&&(a.id=++ka,a.atomic=!0),c){if(o&&(c.curOp.updateMaxLine=!0),a.collapsed)ur(c,e.line,i.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=e.line;u<=i.line;u++)hr(c,u,"text");a.atomic&&ia(c.doc),oi(c,"markerAdded",c,a)}return a}Aa.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Wr(t),vt(this,"clear")){var i=this.find();i&&oi(this,"clear",i.from,i.to)}for(var r=null,n=null,a=0;at.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&&ia(t.doc)),t&&oi(t,"markerCleared",t,this,r,n),e&&Kr(t),this.parent&&this.parent.clear()}},Aa.prototype.find=function(t,e){var i,r;null==t&&"bookmark"==this.type&&(t=1);for(var n=0;n=0;l--)ca(this,r[l]);o?Xn(this,o):this.cm&&Dr(this.cm)})),undo:en((function(){ha(this,"undo")})),redo:en((function(){ha(this,"redo")})),undoSelection:en((function(){ha(this,"undo",!0)})),redoSelection:en((function(){ha(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=oe(this,t),e=oe(this,e);var r=[],n=t.line;return this.iter(t.line,e.line+1,(function(a){var s=a.markedSpans;if(s)for(var o=0;o=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-=a,++i})),oe(this,te(i,e))},indexFromPos:function(t){var e=(t=oe(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()),ta(e.doc,xn(i,i)),d)for(var f=0;f=0;e--)pa(t.doc,"",r[e].from,r[e].to,"+delete");Dr(t)}))}function Za(t,e,i){var r=nt(t.text,e+i,i);return r<0||r>t.text.length?null:r}function Xa(t,e,i){var r=Za(t,e.ch,i);return null==r?null:new te(e.line,r,i<0?"after":"before")}function $a(t,e,i,r,n){if(t){"rtl"==e.doc.direction&&(n=-n);var a=ct(i,e.doc.direction);if(a){var s,o=n<0?Y(a):a[0],l=n<0==(1==o.level)?"after":"before";if(o.level>0||"rtl"==e.doc.direction){var c=Ri(e,i);s=n<0?i.text.length-1:0;var u=Oi(e,c,s).top;s=at((function(t){return Oi(e,c,t).top==u}),n<0==(1==o.level)?o.from:o.to-1,s),"before"==l&&(s=Za(i,s,1))}else s=n<0?o.to:o.from;return new te(r,s,l)}}return new te(r,n<0?i.text.length:0,n<0?"before":"after")}Ha.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"},Ha.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"},Ha.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"},Ha.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"]},Ha.default=y?Ha.macDefault:Ha.pcDefault;var ts={selectAll:oa,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),H)},killLine:function(t){return qa(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(a.charAt(n.ch-1)+a.charAt(n.ch-2),te(n.line,n.ch-2),n,"+transpose");else if(n.line>t.doc.first){var s=Kt(t.doc,n.line-1).text;s&&(n=new te(n.line,1),t.replaceRange(a.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),te(n.line-1,s.length-1),n,"+transpose"))}i.push(new kn(n,n))}t.setSelections(i)}))},newlineAndIndent:function(t){return Xr(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,a=!1,c=$r(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),a||(bt(e),r.addNew||Yn(t.doc,i,null,null,r.extend),l&&!d||s&&9==o?setTimeout((function(){n.wrapper.ownerDocument.body.focus({preventScroll:!0}),n.input.focus()}),20):n.input.focus())})),u=function(t){a=a||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return a=!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,a):function(t,e,i,r){var n=t.display,a=t.doc;bt(e);var s,o,l=a.sel,c=l.ranges;if(r.addNew&&!r.extend?(o=a.sel.contains(i),s=o>-1?c[o]:new kn(i,i)):(s=a.sel.primary(),o=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new kn(i,i)),i=lr(t,e,!0,!0),o=-1;else{var u=ms(t,i,r.unit);s=r.extend?Qn(s,u.anchor,u.head,r.extend):u}r.addNew?-1==o?(o=c.length,$n(a,An(t,c.concat([s]),o),{scroll:!1,origin:"*mouse"})):c.length>1&&c[o].empty()&&"char"==r.unit&&!r.extend?($n(a,An(t,c.slice(0,o).concat(c.slice(o+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):qn(a,o,s,z):(o=0,$n(a,new Cn([s],0),z),l=a.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=_(Kt(a,i.line).text,i.ch,c),d=_(Kt(a,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(a,g).text,y=W(v,f,c);f==p?n.push(new kn(te(g,y),te(g,y))):v.length>y&&n.push(new kn(te(g,y),te(g,W(v,p,c))))}n.length||n.push(new kn(i,i)),$n(a,An(t,l.ranges.slice(0,o).concat(n),o),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,S=s,E=ms(t,e,r.unit),C=S.anchor;ee(E.anchor,C)>0?(b=E.head,C=ae(S.from(),E.anchor)):(b=E.anchor,C=ne(S.to(),E.head));var k=l.ranges.slice(0);k[o]=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 a=ct(n);if(!a)return e;var s=ot(a,i.ch,i.sticky),o=a[s];if(o.from!=i.ch&&o.to!=i.ch)return e;var l,c=s+(o.from==i.ch==(1!=o.level)?0:1);if(0==c||c==a.length)return e;if(r.line!=i.line)l=(r.line-i.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=ot(a,r.ch,r.sticky),h=u-s||(r.ch-i.ch)*(1==o.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=a[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 kn(new te(i.line,p,g),r)}(t,new kn(oe(a,C),b)),$n(a,An(t,k,o),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),a.history.lastSelOrigin=null}var m=$r(t,(function(e){0!==e.buttons&&At(e)?function e(i){var s=++p,o=lr(t,i,!0,"rectangle"==r.unit);if(o)if(0!=ee(o,h)){t.curOp.focus=O(),d(o);var l=Tr(n,a);(o.line>=l.to||o.linef.bottom?20:0;c&&setTimeout($r(t,(function(){p==s&&(n.scroller.scrollTop+=c,e(i))})),50)}}(e):g(e)})),v=$r(t,g);t.state.selectingText=v,ht(n.wrapper.ownerDocument,"mousemove",m),ht(n.wrapper.ownerDocument,"mouseup",v)}(t,r,e,a)}(e,r,a,t):kt(t)==i.scroller&&bt(t):2==n?(r&&Yn(e.doc,r),setTimeout((function(){return i.input.focus()}),20)):3==n&&(k?e.display.input.onContextMenu(t):Cr(e)))}}function ms(t,e,i){if("char"==i)return new kn(e,e);if("word"==i)return t.findWordAt(e);if("line"==i)return new kn(te(e.line,0),oe(t.doc,te(e.line+1,0)));var r=i(t,e);return new kn(r.from,r.to)}function vs(t,e,i,r){var n,a;if(e.touches)n=e.touches[0].clientX,a=e.touches[0].clientY;else try{n=e.clientX,a=e.clientY}catch(t){return!1}if(n>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&bt(e);var s=t.display,o=s.lineDiv.getBoundingClientRect();if(a>o.bottom||!vt(t,i))return Et(e);a-=o.top-s.viewOffset;for(var l=0;l=n)return pt(t,i,t,Zt(t.doc,a),t.display.gutterSpecs[l].className,e),Et(e)}}function ys(t,e){return vs(t,e,"gutterClick",!0)}function bs(t,e){Ei(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&vs(t,e,"gutterContextMenu",!1)}(t,e)||gt(t,e,"contextmenu")||k||t.display.input.onContextMenu(e)}function Ss(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)}ps.prototype.compare=function(t,e,i){return this.time+400>t&&0==ee(e,this.pos)&&i==this.button};var Es={toString:function(){return"CodeMirror.Init"}},Cs={},ks={};function As(t,e,i){if(!e!=!(i&&i!=Es)){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 xs(t){t.options.lineWrapping?(M(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(w(t.display.wrapper,"CodeMirror-wrap"),We(t)),or(t),ur(t),ji(t),setTimeout((function(){return Ur(t)}),100)}function ws(t,e){var i=this;if(!(this instanceof ws))return new ws(t,e);this.options=e=e?F(e):{},F(Cs,e,!1);var r=e.value;"string"==typeof r?r=new Da(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var n=new ws.inputStyles[e.inputStyle](this),a=this.display=new mn(t,r,n,e);for(var c in a.wrapper.CodeMirror=this,Ss(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&&a.input.focus(),s&&o<11&&setTimeout((function(){return i.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",$r(t,gs)),ht(e.scroller,"dblclick",s&&o<11?$r(t,(function(e){if(!gt(t,e)){var i=lr(t,e);if(i&&!ys(t,e)&&!Ei(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 bs(t,e)})),ht(e.input.getField(),"contextmenu",(function(i){e.scroller.contains(i.target)||bs(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 a(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)&&!ys(t,n)){e.input.ensurePolled(),clearTimeout(i);var a=+new Date;e.activeTouch={start:a,moved:!1,prev:a-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&&!Ei(e,i)&&null!=r.left&&!r.moved&&new Date-r.start<300){var s,o=t.coordsChar(e.activeTouch,"page");s=!r.prev||a(r,r.prev)?new kn(o,o):!r.prev.prev||a(r,r.prev.prev)?t.findWordAt(o):new kn(te(o.line,0),oe(t.doc,te(o.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),bt(i)}n()})),ht(e.scroller,"touchcancel",n),ht(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Nr(t,e.scroller.scrollTop),Br(t,e.scroller.scrollLeft,!0),pt(t,"scroll",t))})),ht(e.scroller,"mousewheel",(function(e){return En(t,e)})),ht(e.scroller,"DOMMouseScroll",(function(e){return En(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=I("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),L(t.display.dragCursor,r)}}(t,e),Ct(e))},start:function(e){return function(t,e){if(s&&(!t.state.draggingText||+new Date-Ra<100))Ct(e);else if(!gt(t,e)&&!Ei(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!d)){var i=I("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:$r(t,Oa),leave:function(e){gt(t,e)||Ma(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return us.call(t,e)})),ht(l,"keydown",$r(t,cs)),ht(l,"keypress",$r(t,hs)),ht(l,"focus",(function(e){return kr(t,e)})),ht(l,"blur",(function(e){return Ar(t,e)}))}(this),Ba(),Wr(this),this.curOp.forceUpdate=!0,Pn(this,r),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){i.hasFocus()&&!i.state.focused&&kr(i)}),20):Ar(this),ks)ks.hasOwnProperty(c)&&ks[c](this,e[c],Es);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>a.first?_(Kt(a,e-1).text,null,s):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/s);f;--f)d+=s,h+="\t";if(ds,l=Rt(e),c=null;if(o&&r.ranges.length>1)if(Is&&Is.text.join("\n")==e){if(r.ranges.length%Is.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&&!o?g=te(g.line,Math.min(Kt(a,g.line).text.length,g.ch+Y(l).length)):o&&Is&&Is.lineWise&&Is.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||(o?"paste":t.state.cutIncoming>s?"cut":"+input")};ca(t.doc,m),oi(t,"inputRead",t,m)}e&&!o&&Ms(t,e),Dr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Os(t,e){var i=t.clipboardData&&t.clipboardData.getData("Text");if(i)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Xr(e,(function(){return Rs(e,i,0,null,"paste")})),!0}function Ms(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 a=t.getModeAt(n.head),s=!1;if(a.electricChars){for(var o=0;o-1){s=Ls(t,n.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Kt(t.doc,n.head.line).text.slice(0,n.head.ch))&&(s=Ls(t,n.head.line,"smart"));s&&oi(t,"electricInput",t,n.head.line)}}}function Ns(t){for(var e=[],i=[],r=0;r0?0:-1));s=isNaN(u)?null:new te(e.line,Math.max(0,Math.min(o.text.length,e.ch+i*(u>=55296&&u<56320?2:1))),-i)}else s=n?function(t,e,i,r){var n=ct(e,t.doc.direction);if(!n)return Xa(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 a=ot(n,i.ch,i.sticky),s=n[a];if("ltr"==t.doc.direction&&s.level%2==0&&(r>0?s.to>i.ch:s.from=s.from&&d>=u.begin)){var f=h?"before":"after";return new te(i.line,d,f)}}var p=function(t,e,r){for(var a=function(t,e){return e?new te(i.line,l(t,1),"before"):new te(i.line,t,"after")};t>=0&&t0==(1!=s.level),c=o?r.begin:l(r.end,-1);if(s.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,o,e,i):Xa(o,e,i);if(null==s){if(a||(c=e.line+l)=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(o=Kt(t,c))))return!1;e=$a(n,t.cm,o,e.line,l)}else e=s;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=o.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=aa(t,e,a,s,!0);return ie(a,m)&&(m.hitSide=!0),m}function _s(t,e,i,r){var n,a,s=t.doc,o=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(;(a=Ji(t,o,n)).outside;){if(i<0?n<=0:n>=s.height){a.hitSide=!0;break}n+=5*i}return a}var js=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 Us(t,e){var i=Di(t,e.line);if(!i||i.hidden)return null;var r=Kt(t.doc,e.line),n=Li(i,r,e.line),a=ct(r,t.doc.direction),s="left";a&&(s=ot(a,e.ch)%2?"right":"left");var o=Pi(n.map,e.ch,s);return o.offset="right"==o.collapse?o.end:o.start,o}function Gs(t,e){return e&&(t.bad=!0),t}function Hs(t,e,i){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[i]))return Gs(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||a.line=e.display.viewFrom&&Us(e,n)||{node:l[0].measure.map[2],offset:0},u=a.liner.firstLine()&&(s=te(s.line-1,Kt(r.doc,s.line-1).length)),o.ch==Kt(r.doc,o.line).text.length&&o.linen.viewTo-1)return!1;s.line==n.viewFrom||0==(t=cr(r,s.line))?(e=qt(n.view[0].line),i=n.view[0].node):(e=qt(n.view[t].line),i=n.view[t-1].node.nextSibling);var l,c,u=cr(r,o.line);if(u==n.view.length-1?(l=n.viewTo-1,c=n.lineDiv.lastChild):(l=qt(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 a="",s=!1,o=t.doc.lineSeparator(),l=!1;function c(){s&&(a+=o,l&&(a+=o),s=l=!1)}function u(t){t&&(c(),a+=t)}function h(e){if(1==e.nodeType){var i=e.getAttribute("cm-text");if(i)return void u(i);var a,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&&(a=f[0].find(0))&&u(Qt(t.doc,a.from,a.to).join(o)))}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);fs.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 E=te(e,f),C=te(l,d.length?Y(d).length-p:0);return h.length>1||h[0]||ee(E,C)?(pa(r.doc,h,E,C,"+input"),!0):void 0},js.prototype.ensurePolled=function(){this.forceCompositionEnd()},js.prototype.reset=function(){this.forceCompositionEnd()},js.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},js.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))},js.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Xr(this.cm,(function(){return ur(t.cm)}))},js.prototype.setUneditable=function(t){t.contentEditable="false"},js.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||$r(this.cm,Rs)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},js.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},js.prototype.onContextMenu=function(){},js.prototype.resetPosition=function(){},js.prototype.needsContentAttribute=!0;var Vs=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new j,this.hasSelection=!1,this.composing=null};Vs.prototype.init=function(t){var e=this,i=this,r=this.cm;this.createField(t);var n=this.textarea;function a(t){if(!gt(r,t)){if(r.somethingSelected())Ds({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ns(r);Ds({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,H):(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(){s&&o>=9&&e.hasSelection&&(e.hasSelection=null),i.poll()})),ht(n,"paste",(function(t){gt(r,t)||Os(t,r)||(r.state.pasteIncoming=+new Date,i.fastPoll())})),ht(n,"cut",a),ht(n,"copy",a),ht(t.scroller,"paste",(function(e){if(!Ei(t,e)&&!gt(r,e)){if(!n.dispatchEvent)return r.state.pasteIncoming=+new Date,void i.focus();var a=new Event("paste");a.clipboardData=e.clipboardData,n.dispatchEvent(a)}})),ht(t.lineSpace,"selectstart",(function(e){Ei(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)}))},Vs.prototype.createField=function(t){this.wrapper=Bs(),this.textarea=this.wrapper.firstChild},Vs.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Vs.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"),a=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,n.top+s.top-a.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,n.left+s.left-a.left))}return r},Vs.prototype.showSelection=function(t){var e=this.cm.display;L(e.cursorDiv,t.cursors),L(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Vs.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),s&&o>=9&&(this.hasSelection=i)}else t||(this.prevInput=this.textarea.value="",s&&o>=9&&(this.hasSelection=null))}},Vs.prototype.getField=function(){return this.textarea},Vs.prototype.supportsTouch=function(){return!1},Vs.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||O()!=this.textarea))try{this.textarea.focus()}catch(t){}},Vs.prototype.blur=function(){this.textarea.blur()},Vs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Vs.prototype.receivedFocus=function(){this.slowPoll()},Vs.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Vs.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))}))},Vs.prototype.poll=function(){var t=this,e=this.cm,i=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||Ot(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(s&&o>=9&&this.hasSelection===n||y&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var a=n.charCodeAt(0);if(8203!=a||r||(r="​"),8666==a)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},Vs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Vs.prototype.onKeyPress=function(){s&&o>=9&&(this.hasSelection=null),this.fastPoll()},Vs.prototype.onContextMenu=function(t){var e=this,i=e.cm,r=i.display,n=e.textarea;e.contextMenuPending&&e.contextMenuPending();var a=lr(i,t),c=r.scroller.scrollTop;if(a&&!h){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(a)&&$r(i,$n)(i.doc,xn(a),H);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: "+(s?"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),s&&o>=9&&m(),k){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(),a="​"+(t?n.value:"");n.value="⇚",n.value=a,e.prevInput=t?"":"​",n.selectionStart=1,n.selectionEnd=a.length,r.selForContextMenu=i.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,n.style.cssText=d,s&&o<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=n.selectionStart)){(!s||s&&o<9)&&m();var t=0,a=function(){r.selForContextMenu==i.doc.sel&&0==n.selectionStart&&n.selectionEnd>0&&"​"==e.prevInput?$r(i,oa)(i):t++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},Vs.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Vs.prototype.setUneditable=function(){},Vs.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function i(i,r,n,a){t.defaults[i]=r,n&&(e[i]=a?function(t,e,i){i!=Es&&n(t,e,i)}:n)}t.defineOption=i,t.Init=Es,i("value","",(function(t,e){return t.setValue(e)}),!0),i("mode",null,(function(t,e){t.doc.modeOption=e,Dn(t)}),!0),i("indentUnit",2,Dn,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,(function(t){Rn(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 a=t.text.indexOf(e,n);if(-1==a)break;n=a+e.length,i.push(te(r,a))}r++}));for(var n=i.length-1;n>=0;n--)pa(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!=Es&&t.refresh()})),i("specialCharPlaceholder",Xe,(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",!S),i("wholeLineUpdateBefore",!0),i("theme","default",(function(t){Ss(t),gn(t)}),!0),i("keyMap","default",(function(t,e,i){var r=Ja(e),n=i!=Es&&Ja(i);n&&n.detach&&n.detach(t,r),r.attach&&r.attach(t,n||null)})),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,xs,!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?ar(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&&(Ar(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,As),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,Rn,!0),i("addModeClass",!1,Rn,!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,Rn,!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)}(ws),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)&&$r(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"](Ja(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,i=0;ii&&(Ls(this,n.head.line,t,!0),i=n.head.line,r==this.doc.sel.primIndex&&Dr(this));else{var a=n.from(),s=n.to(),o=Math.max(i,a.line);i=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=o;l0&&qn(this.doc,r,new kn(a,c[r].to()),H)}}})),getTokenAt:function(t,e){return ye(this,t,e)},getLineTokens:function(t,e){return ye(this,te(t),e,!0)},getTokenTypeAt:function(t){t=oe(this.doc,t);var e,i=de(this,Kt(this.doc,t.line)),r=0,n=(i.length-1)/2,a=t.ch;if(0==a)e=i[2];else for(;;){var s=r+n>>1;if((s?i[2*s-1]:0)>=a)n=s;else{if(!(i[2*s+1]a&&(t=a,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 a,s,o,l=this.display,c=(t=Ki(this,oe(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&&(a=this,s={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(o=Lr(a,s)).scrollTop&&Nr(a,o.scrollTop),null!=o.scrollLeft&&Br(a,o.scrollLeft))},triggerOnKeyDown:tn(cs),triggerOnKeyPress:tn(hs),triggerOnKeyUp:us,triggerOnMouseDown:tn(gs),execCommand:function(t){if(ts.hasOwnProperty(t))return ts[t].call(null,this)},triggerElectric:tn((function(t){Ms(this,t)})),findPosH:function(t,e,i,r){var n=1;e<0&&(n=-1,e=-e);for(var a=oe(this.doc,t),s=0;s0&&s(e.charAt(i-1));)--i;for(;r.5||this.options.lineWrapping)&&or(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(),Rr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,oi(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,a){t.registerHelper(e,r,a),i[e]._global.push({pred:n,val:a})}}(ws);var Ws="iter insert remove copy getEditor constructor".split(" ");for(var Ks in Da.prototype)Da.prototype.hasOwnProperty(Ks)&&U(Ws,Ks)<0&&(ws.prototype[Ks]=function(t){return function(){return t.apply(this.doc,arguments)}}(Da.prototype[Ks]));return yt(Da),ws.inputStyles={textarea:Vs,contenteditable:js},ws.defineMode=function(t){ws.defaults.mode||"null"==t||(ws.defaults.mode=t),Ft.apply(this,arguments)},ws.defineMIME=function(t,e){Bt[t]=e},ws.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),ws.defineMIME("text/plain","null"),ws.defineExtension=function(t,e){ws.prototype[t]=e},ws.defineDocExtension=function(t,e){Da.prototype[t]=e},ws.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=O();e.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}function r(){t.value=o.getValue()}var n;if(t.form&&(ht(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var a=t.form;n=a.submit;try{var s=a.submit=function(){r(),a.submit=n,a.submit(),a.submit=s}}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 o=ws((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return o},function(t){t.off=ft,t.on=ht,t.wheelEventPixels=Sn,t.Doc=Da,t.splitLines=Rt,t.countColumn=_,t.findColumn=W,t.isWordChar=$,t.Pass=G,t.signal=pt,t.Line=Ke,t.changeEnd=wn,t.scrollbarModel=Hr,t.Pos=te,t.cmpPos=ee,t.modes=Pt,t.mimeModes=Bt,t.resolveMode=_t,t.getMode=jt,t.modeExtensions=Ut,t.extendMode=Gt,t.copyState=Ht,t.startState=Vt,t.innerMode=zt,t.commands=ts,t.keyMap=Ha,t.keyName=Ya,t.isModifierKey=Ka,t.lookupKey=Wa,t.normalizeKeyMap=Va,t.StringStream=Wt,t.SharedTextMarker=wa,t.TextMarker=Aa,t.LineWidget=Ea,t.e_preventDefault=bt,t.e_stopPropagation=St,t.e_stop=Ct,t.addClass=M,t.contains=R,t.rmClass=w,t.keyNames=_a}(ws),ws.version="5.58.2",ws}()},W6BS: +/*!************************************************!*\ + !*** ./src/assets/images/icons/weibaitong.png ***! + \************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAVs0lEQVRoQ+2aa6xlZ3nff++677Xv+9zPHM/YHo+xwQ4E14GKKESkiFsSM8bYQBIEkaBEAkqbRmo/9FulSoX2Qz9GVVQJqUJBhKKA1KRJCIlowwdDDDa+jOd65syc275f1v1d1fOufYYE2ZhJZKRWXjOjvffaa6/1/p//8/yfyzuqLMuS/48P9RrA/8fZfY3B2yXQBHQpf185tBUK+SvH8uV2H/eK1/+jGfwRIBC5ks/Vq/yplq2Wqz+B/ONg5LNlrlz+Qhnot373iih+wgX/YIAivrJgjTKA9BKcYa/Uy/MnUEpD0S2AyzdKkMslZYklbwVYWZpXQSygrSVoc+4fcPzUAKtsom4xpIGiLCkMZbJGs1LkvOHPfJbrhRX5/CM/NDwJZlXiqBKlc7AEjg1aI2iVDXZpoeS9AFXlkmV1W8z+VACLE7dbMiWLE2CFADLgqig6SakCSs4jizcvAvBHMVkqxxhKkePqAs8S1mxyLUxqw6AYKLdtbMtGINpiKKUM07bc96dk9BUBykIFoNYVC/JewMkCDDh18p0so6w+GzfT+FoWC7Yl11curQpFVCoyJQsvDThP6crNdVldi0KLcwogyzJGssVrxYWXAOWzwWg84eXd92UByoK0WHEJqBCA4oC6ChstYHRJIW6lZHWQlsoYQH6rypyOLZ5Xuahx3NIi1TAvLBIcHIlUw8rfcWFLFmzhmPBUxi0NKIRdAVi5qmPAL88LrS9z/AigmHBpCcOaCIUA1BVj4ma6LCi1FkjLBZRoVRrLR9piXjhkysI2mqJxhY2lQUrDjG3iVv5k5YmgyHI1ngLPBqfUxg21nC5LbGUhHJbGUPKu8hTbUthKGcZP3Palks3fY/BECQVQLoDk0QWURYFVFuTaNudtS+Pb8mCNZcQEYmMQi8KymCSQGLJLIx7zKCFKi1uuJNZvNXxDvLBVszUtW5xSm0WL8Mh9hV0xoGFfKRItVzjYJmaFSQtHAFqVwY3i/pi7Kl2e6N9SOJaxkJk4q0CmqcZVBaGtybFY5OIaCscqKqsaUYBE6LYU08Jimi/dxrIYjudM5ynCohzCyvZaw3iCLEviqW3ntDxR1SreTDCbQ1OI65c2qZKQsY0RKlUVFoVxWcsS5DLdnHisKk6iX1iTeBOXlNgqK4kXxmTdgapAVlWKYpKLsuVYykSJictxVtKPNMq1K0saFiym8wWzKKkiSnKeDSud9i1llOe0XE3PrUTMLEmerys1zpVEYCVWIjqVS1aGEjYlJKrvKvYrAVoWGcKgxIkBYmKuurlRTuOqmkIrdCEOJ8qpyIuc/iInL7R5oAEoOVEXRv0cx8HyHBZxZAySJilplqFE8i3bGLHXqZvFlEp4qOJOKM6zrJKkUuN7Lp6t8GxxxcqIEtfCsnFNw1yViuQuxlVNbJ6AFNUuSjEUmbFWBfJEZITF6rywalW5ryyJc21czpSSy/RmErpSFIU2bJWWRRTFVcqwHPOdo3I8HbO60mVi1Y31qwqmYkN+Ox5Nl/Kv2V7t4DhWJWoSfZZFzy3whTUJCxNA4m02meVWgAWcASr31Kgk1+XJwitfl3ykDaPyWdzTiIeW9xKDBWlREkkgVmloWTdWorBIcwajiTlryZOkJClSVDRARUN0HvPut7+NuarxbD8hKqrEbcJTjDePTfiJiKy267iOu8yBot6KrgC0xWMkHiUMSiNsri2GqAoCCYETJlWU6VJcRpiTxUp6yMU1JQ7lPMJKFZvGXUXic4ijtKodxY7KIs8LFlFElC4rEbFwFsGsTzk74sbNI/70UsQDd67zyXe9mSKes3XnnVxZKK7sz8yzxcWWkWMW3mk3cB1xzyqXmtRg2LRMvMn13tItxXVFeBwJF0kfAlIqHgEoYPJSJFjyU0kugITJQlVgTYo4UVlFlmvyRFxUtNliMl2wWLqlZTuUyZxkvE/Wv8rFG2P+aq/g/yR1Um+dT53L+MyvvoUXD2esFGPO7qyhWqs8f3PGMMEsrCpQFM1miOvYOLbCtW2U5EgKE2+uFANWWamnI6AroTEKWyocAxDULClKEXsBUrEkqlm5ZxQXZLkIx7INEoYtG5NC4qxSYsthOJ+RZZp8MSUeXGF84wYv7A74q8OSZ4Yp+dadnGpYvKkW88vr8L5feQffGyo8yyU/usIDpwJ2du7gRuJyaRBRaI1rKxqdLkVekC5mzIaHnFnv4DRWsFWBrWxciTeTSKRIKAlcSTlV2hG3NwAnaVFKjFUsanItLiklmMUsTsky0dOTvk5R2DapUaXCKKhtW+xd36W/+zyH13Z5+uox3+6XXKWH17D4OTfi/tWQerLg2qjgvtNNPvbrv8K1m4c49R5Huk6jHtCY3eTcVkh9ZZtn+xnXb+4zH+9x/cJFJkf7BI7iNz78OO3tc9xc5NSEIaEsLxhNMpo1m9W2Z0SryqXiriVqnIjICIPaMJMLuKIqdhdJsgQoNQMMo4RUa0rbMbknGRxwcOUZLj73It/dnfA3U8U4Vpzq+Lxho8YOBcPpnCuJy1z5lG6Dd52Gjzx+nmf6BSvJDWppjFrZ5jj2qLs5O/6cuzZX+fZ3nuS//+GXTBz11k/R7K7yofe/lzu21om8JoeLAlvUM8lJC00YWKw0PcNelUbEVUvUKClLkf7MKKcxyDIdWEQnDJYWgac4mMdEGYz3d7n5/JNcuHCZJ/cWPD0u0Y7L2Y0G9wXgZDHXJhl7sUWSlnTXemzVYcsvOde1eeyD57kwUEROm3h0zE4zJcgXxO0dJrGibo24by0kmy/4ytf+mJuHx3RX1njiA49gez5NV+H1Nrl0nOFIzyhdia/otURxJVVonGUNqwaxLiVXSb4TIalctYrJJMlMvSe+/fyFF/iDL/1PvLCGH+3zv184Znde0Gp1eF3PYtWF/qzg4njBOLOot2qcabqc8nNCzyaKNLtzhwd26nzqo49xae+ItZpN4nWIW6tMR2N27DmBnTMPegwjm1P1jJ265vf/4IvYrsfjH3iUYPUU2XxA09J47TVujIQQi1oAnaazLCGlIKjKctWP88pFDbglwEK0o2oFnn3+Al/6+p/x7aeukRSKaf8Kd6+vMCngbCekKHN2+ykHixw3CNgRUC2bhl0yTkpuTguGqkFpe4jCvn1b87GPfYQfzBp0VETQ32WzV6OwA7LmNkk8o82Y0C4ZuqvU0hHf/PrXSCn5zQ9+AK97iv7xDVp1H0+VtFpdrs5sfNun2zzpMERdq/e3AIqWSCKXMksi8LtPP88Xv/a/+NZTV8nckE5vlWQ8ZHF4kbee7nF5EHMwzU2SXW/4nGo51FyYRQV7EfQz1whVqFLarQYbtYL1oGDdhw9/8AOo+ip7WY3RPKPXaaCm+3TtCK/WQNfXiZKYlrWg6RR8+ctfQyv40KPncbobFOni1vjEL2Ka7R6TMsCWErEs8BwIPZMt/w5AuUNZ8L3v/5D/9kd/yp8/dY1ZaRHW5IeKmhdiJxGL4R4bjYBpUrDTklbHYZzAzUXJsLDNA9qBzXrDZTVMWbczPJWT5jAvA+qBy71ntui26txz5gy9nTNE3gr9eY5da6KSEV0VmfxXNnqo6JBvfPUbaKX4yGOP0tjc4ehgn3araepbycV2HtNqNJmoJnkSUQsCVpoOlkwNbrmoFMXzOe/55L/nuVFCKwywpf6TYrdWJ2h2SKcT5jee5+c26xzNcg4XmrEWkCVrocVGqFi1clyVkOUpi8Iz8ZSqOkVjg6y+wYP+DX73n3+YZy5cZTE6IjoesNkOWNvcpLW6Req0SLyAdD6l5cQ0SPnDr3wdbdt86PwjWO0ViiTC93ziNMb1fMosMa+DhUWjXqfmO6w07R8HqEgWc9772f/M1cEY31Km0pdaUqoL16uhkgXp+AYrgccwKdgKNWtuQSiAsoJRDlOrSeT2SFtr0tNj1+u4cUJYU0S5zZnkAr/z6c8xi2BnewWdxswnxyz6+4wPbtDwLLa3t2msbuGvbZH29/jjr3wV7Xg88egjhJtnGPf3qbmeSc8iMKpIsL0ax4uSXqtJ4Dn0mnZVthkGpZBGkUYR7/7MF7g6nOJL3yWjBNfFDgLCRodiPjYJ/RdWC/L5hJG2megaU7tDFrSw7Rp23aNt2fRaHuuhzXY7pBfa3H/XFg/9k7dw/dJz2BtneXFvhvbq6DwhsApWuy08pyAeDTjcvUg02SdUDmfvOcuf/OW3cJ2Ax87/GrG3SjQfs73eIY1j07WUeY7teAwSixWpX215vsx8LNQgLpbdBESLiPd++j9ydTjDcaW6kxYILFtUyiFfLJiOD+gGAX4yZNy+h17DpRf6bPd8tkOHjW6dhqcME4WCRZwxj1LuP3c373/fO43r1ms1U8DPEs3hLGV3MKe/kM8JUvkHrk27XuNo90W+9T++SKfbpdXu8eivvYeodZpo2qfu26gix5f8kEZYtscwdel1mqau3Oh4+I6NGsZSqkFSwmgScf53/xPX+hPDoJQ7ruPg+QFOo0OnXKDGN7h7Z53NsKTVWaHpS5uSsUil77N5dnfI6TWfb//wiMZaB3824Wri8W/Pv4kHf+k9PHPtJg+tWBzqBmE559RaD6U1YehXRUSiORhF9Oea4+Njvvnl368YWVvn8fe/jwNrnWgyYLXbrCZudombx3h+jWHqGE+QY7O9BDgyAEtSA3DB+c99gWujObbkQXFyS4avVWvyxBtabDUcRrOUSVS1TtcOI06thTy1N+EX7+rx/Rsj3nhmhfF0SiMMaDnC4oI3PvB6nnjsPP3RhHbD5zD2IBkztQLy+QisOg07QzkO6w1PujrT9gyPjti7ecizL77Im99wP/vuafJkTCusUeYyJbDwSHFdj1R5rHVbpszcarumWVaTWGpRTYZiNIt55LNf4NJghGu7ph0x/ZhfpxO43FeLqXslea6o+VIO2SRFSTdUHExj1kOPZ/s59/U8vrM7YbXXppgOuZGF/Kt338tb3/M437uyyy+s+xxlLr4V0wzqFDqiXu9CnphFinpHmSbRBTXXIQzrXHnuaXScct2/h2S+T7veQBUpjhuaKYHjunhByEq3bXjZ7Mj9S9Q0LctqyFRw4dI1/sV/+K8cLyK6niKwLZM0m3aKVh5d1yJzfKJE5iZVz9Wf5ex0PK4Mc16/6nBtmnNn1zV5re471FTGPNE8/MbX8Vsf/U1GozHtekA/d3CKiKT0ydMZuRXg6oyFVrQ8mftUfZ909rWgxqXnnyXPUi6rM+hE7tEwY/6isPDLBa4XENbrZqxhpgwWPHimi5qnupQkOhsN+czv/TuSLEZJ01qYmbXpEeVGMq5r1VxKp40uJcFKV20xiXN6fsneXHNHy+IHfYsHVkue2Yuot+t48Zy9LOR33nGGdz72cf724lUe2nA50CENEiyvgU6m1MI6vjTctk3o2qSZNN/g26IZFrsXLpDGC75nvw4VjWj5MrbQxvA15vhuwFqnUc1mtAzKSt567ypqkelSW4pR/5hPfvbfEEuBbfYKSjKkMpFZSEGuLDphCH6DPNfVwMjCjCg6gc0gUWzVUo5ih9VAM4+1WV1YZIzTkrf9/Dk+8clPMZjO6dUcxri42YKs9CjSOTpo4Ocps1yKe5uiyMhKaXxdiiJl/9JFoijiyDmFThY4gWcmfalWODrFdXy2N1bJZcBVajNyfMu5VVSSlbJlwHH/iI9/4tNMU/BktKRcclVgaRtLi2UVnaAOQYM0l8FrhrJtJqliJdDsRTZ3hylPj33e0Em51M+pd3uEi0P2dIPf/qen+PWPfoKnL+/x4JrPXuYTFlMIOuTRGK/eoVbGLAqLRijViSbTOTU3QArR65dfZL6IcdbvIs1TdocF3bpPJ3RMzGWzASvr22C7ZpIn/x6+W+LUzPXgsN/nN574CEmSUtrVjo4lvaFTYDlSiSt6Gx1Cv0vhxliJTe6UlEnN7CRpw7QiLmVvopoOoF0sO2MclfzSm+/hM//y95guUtpShARtnCJmEeUoFeM1mziZJo4WeEHN7EUUSUpk73P95vfZvTYAvUa+ukGez9g7njPqF7Rd6RwKiugKi/llHMfHsnwzZG76ddTBwWGZZinD4YjPfvpzTGYzijwxsxBJxt07MlpnE1RmYbuKQG+iuhP0wEe1c+ILr8d2UhOrWldjDKu7TznaJFjbZX58Cqt2mTfd+y5+6+Nv53jyIr3mvYRunX5ymZ71MK6q4Qc+cVYwi2IaNR/PtdGpx7Xoqzx3+CeE84d54NR5IYhWo8Zf/s03+Oo3/wtrvW1Ct0PgrhA6K9TcDqV2jSAJc+rzn/98OZ1Ol/MVl7IsiOOINM0YTw4ZRJeJ9ZDpZEzQ9fGKDexmRJkVqMBn+twOyo5pNJsEYcjx8QG9h55kcel1hGcvMnvhHGrlBR66/1f55X+2zQvX/5q13r2QOQzzH/Lz7X/NYfEAvaZiePOQsrfOSnJIOwiNmz23+xccHr3AweGc8RjCIOD05lksakyjIzrBnRRimNmYXGdmHTs7pzh37pypadW1a9dKqRgODg7Y399nMhmTZZm5ecIxUTpgkR4yiQ+IFhPiLCeOZpSFB3GTXDdwdIv17hmarR4//MGT3PGL+1z/bo/em6/S/84pmg89zwPrj/COd55mMDkirNWwkx3G0QsUB2/Ba57jjq0OZTxGOS46ryYJ82jApetPcTDYJ6yt4tshtVoIuUMz7NI/HqJ1SthscMfOHZy9+y62trbwPO/WbuHf3z7TmvlcLDVmMBgwHIwYjSbMJ3Nm0ZxI5p3JjHk6RkbCgVfDsgN8ArP3N5juM5jdJD26xrOjq9TzCcfzkGYYcXrrbTz6xDs5OrrMeHzIjck+2eiA65OYdrjOPace5NzOw/hO10zW5ZDm27VDUxdLnMtwOctSk+NqtYDNzU3W1tfpdbvm2pc6bgE0u7IvsRUs56M4Yj6dmfJrOhwyGE8YjkaMxkNmszlpLDGbkeUx02RAlC2Y5UeUSZ+pdYyaz1k4Y9OdhE4D5dVoB6dZWbuLlneaXm2DPC1NR5BGCbF0CWVJEAQ0GnXanTb1sE69Xmdzc4uNjQ1ardZy4+dlN3fNF6+4R/9SP5eHJ0nMYhEh8TscDun3+0aoJuMJi8WCJMnRZgRZkJOR5FMKvWBz/QyN2gqqsEjTBE1q7iU5znZsfN83i2+32zSbTXq9HisrK6yurtJoNH4ympf49rYAvhzL1b5JSZqmZqGTyZT+4Jj+cd+4+mg4Yh7F5Kk0xqK4Jb7rVP87w1KGpU6nR6vVNMAEkPzrdDqGxX/McVsAb/dBsh0mKWgxnzMajxgOhhwf9+n3j5nNZ7RbbbrdrgElYE5Aua57u4962etfNYAvx7YISJIkxrXFxdvtlnFJW+Yiy+MnecrtIn/VAN7uQl6t618D+GpZ9md139cY/FlZ+tV6zmsMvlqW/Vnd9/8CAe3hZpCQX/4AAAAASUVORK5CYII="},XFxt: +/*!*********************************************************!*\ + !*** ./src/components/image-preview/index.less?modules ***! + \*********************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports={"image-preview-container":"image-preview-container___1L8o9","image-preview":"image-preview___3YjNO","button-group":"button-group___3y9R5","preview-wrp-group":"preview-wrp-group___19bWd"}},Xsq0: +/*!*************************************************!*\ + !*** ./src/assets/images/banner/mainbanner.jpg ***! + \*************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/mainbanner.0a951716.jpg"},Y1PL: +/*!**********************************************************!*\ + !*** ./node_modules/rc-textarea/es/index.js + 7 modules ***! + \**********************************************************/ +/*! exports provided: ResizableTextArea, default */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.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/Children/toArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */ +/*! 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,i){"use strict";i.r(e),i.d(e,"ResizableTextArea",(function(){return M}));var r=i("wx14"),n=i("1OyB"),a=i("vuIU"),s=i("Ji7U"),o=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(s.a)(i,t);var e=Object(o.a)(i);function i(){return Object(n.a)(this,i),e.apply(this,arguments)}return Object(a.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),a=l.useContext(y),s=l.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),o=l.isValidElement(e)&&Object(d.c)(e),u=o?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(),o=n.width,l=n.height,u=t.offsetWidth,h=t.offsetHeight,d=Math.floor(o),f=Math.floor(l);if(s.current.width!==d||s.current.height!==f||s.current.offsetWidth!==u||s.current.offsetHeight!==h){var g={width:d,height:f,offsetWidth:u,offsetHeight:h};s.current=g;var m=u===Math.round(o)?o:u,v=h===Math.round(l)?l:h,y=Object(c.a)(Object(c.a)({},g),{},{offsetWidth:m,offsetHeight:v});null==a||a(y,t,r),i&&Promise.resolve().then((function(){i(y,t)}))}}),[]);return l.useEffect((function(){var t,e,a=Object(f.a)(r.current)||Object(f.a)(n.current);return a&&!i&&(t=a,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)))}(a,b)}}),[r.current,i]),l.createElement(v,{ref:n},o?l.cloneElement(e,{ref:h}):e)}function S(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)}))}S.Collection=function(t){var e=t.children,i=t.onBatchResize,r=l.useRef(0),n=l.useRef([]),a=l.useContext(y),s=l.useCallback((function(t,e,s){r.current+=1;var o=r.current;n.current.push({size:t,element:e,data:s}),Promise.resolve().then((function(){o===r.current&&(null==i||i(n.current),n.current=[])})),null==a||a(t,e,s)}),[i,a]);return l.createElement(y.Provider,{value:s},e)};var E,C=S,k=i("bT9E"),A=i("TSYQ"),x=i.n(A),w="\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",T=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],L={};function I(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&&L[i])return L[i];var r=window.getComputedStyle(t),n=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),a=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),s=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),o=T.map((function(t){return"".concat(t,":").concat(r.getPropertyValue(t))})).join(";"),l={sizingStyle:o,paddingSize:a,borderSize:s,boxSizing:n};return e&&i&&(L[i]=l),l}var D,R=i("Gytx"),O=i.n(R);!function(t){t[t.NONE=0]="NONE",t[t.RESIZING=1]="RESIZING",t[t.RESIZED=2]="RESIZED"}(D||(D={}));var M=function(t){Object(s.a)(i,t);var e=Object(o.a)(i);function i(t){var a;return Object(n.a)(this,i),(a=e.call(this,t)).nextFrameActionId=void 0,a.resizeFrameId=void 0,a.textArea=void 0,a.saveTextArea=function(t){a.textArea=t},a.handleResize=function(t){var e=a.state.resizeStatus,i=a.props,r=i.autoSize,n=i.onResize;e===D.NONE&&("function"==typeof n&&n(t),r&&a.resizeOnNextFrame())},a.resizeOnNextFrame=function(){cancelAnimationFrame(a.nextFrameActionId),a.nextFrameActionId=requestAnimationFrame(a.resizeTextarea)},a.resizeTextarea=function(){var t=a.props.autoSize;if(t&&a.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;E||((E=document.createElement("textarea")).setAttribute("tab-index","-1"),E.setAttribute("aria-hidden","true"),document.body.appendChild(E)),t.getAttribute("wrap")?E.setAttribute("wrap",t.getAttribute("wrap")):E.removeAttribute("wrap");var n=I(t,e),a=n.paddingSize,s=n.borderSize,o=n.boxSizing,l=n.sizingStyle;E.setAttribute("style","".concat(l,";").concat(w)),E.value=t.value||t.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,d=E.scrollHeight;if("border-box"===o?d+=s:"content-box"===o&&(d-=a),null!==i||null!==r){E.value=" ";var f=E.scrollHeight-a;null!==i&&(u=f*i,"border-box"===o&&(u=u+a+s),d=Math.max(u,d)),null!==r&&(h=f*r,"border-box"===o&&(h=h+a+s),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(a.textArea,!1,e,i);a.setState({textareaStyles:r,resizeStatus:D.RESIZING},(function(){cancelAnimationFrame(a.resizeFrameId),a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:D.RESIZED},(function(){a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:D.NONE}),a.fixFirefoxAutoScroll()}))}))}))}))}},a.renderTextArea=function(){var t=a.props,e=t.prefixCls,i=void 0===e?"rc-textarea":e,n=t.autoSize,s=t.onResize,o=t.className,h=t.disabled,d=a.state,f=d.textareaStyles,p=d.resizeStatus,g=Object(k.a)(a.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),m=x()(i,o,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)({},a.props.style),f),p===D.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(C,{onResize:a.handleResize,disabled:!(n||s)},l.createElement("textarea",Object(r.a)({},g,{className:m,style:v,ref:a.saveTextArea})))},a.state={textareaStyles:{},resizeStatus:D.NONE},a}return Object(a.a)(i,[{key:"componentDidUpdate",value:function(t){t.value===this.props.value&&O()(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),N=function(t){Object(s.a)(i,t);var e=Object(o.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 a=void 0===t.value||null===t.value?t.defaultValue:t.value;return r.state={value:a},r}return Object(a.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(M,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=N},ZW9T: +/*!************************************************************!*\ + !*** ./src/components/monaco-editor/index.jsx + 1 modules ***! + \************************************************************/ +/*! exports provided: getLanguageByMirrorName, default, DiffEditor */ +/*! exports used: DiffEditor, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./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/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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,i){"use strict";i.d(e,"a",(function(){return v}));var r=i("k1fw"),n=(i("miYZ"),i("tsqr")),a=i("rAM+"),s=i("tJVT"),o=i("PpiC"),l=i("q1tI"),c=i.n(l),u=i("bdgK");function h(t,e,i,n,a){var s=e.getWordUntilPosition(i),o={startLineNumber:i.lineNumber,endLineNumber:i.lineNumber,startColumn:s.startColumn,endColumn:s.endColumn},l=n.map((function(e){return{label:e,kind:t.languages.CompletionItemKind.Keyword,insertText:e,insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o}}));return a.map((function(t){l.push(Object(r.a)(Object(r.a)({},t),{},{range:o}))})),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)&&W.current.instance.layout()}}catch(t){i.e(t)}finally{i.f()}}))).observe(V.current),t}();return X(!0),function(){var t=W.current.instance;t.dispose();var e=t.getModel();e&&e.dispose(),W.current.subscription&&W.current.subscription.dispose(),P&&window.removeEventListener("paste",tt),i.unobserve(V.current)}}catch(t){}}))}),[]),Object(l.useEffect)((function(){if(W.current.instance&&Z)return document.addEventListener("keydown",et,!1),function(){document.removeEventListener("keydown",et)}}),[R,Z]),Object(l.useEffect)((function(){var t=W.current.instance;if(t&&Z){var e=g(E);m.editor.setModelLanguage(t.getModel(),e),console.log("language:",E,t.getModel(),e)}}),[E,Z]),Object(l.useEffect)((function(){W.current.instance&&Z&&m.editor.setTheme(I)}),[I,Z]),Object(l.useEffect)((function(){var t=W.current.instance;t&&Z&&(t.updateOptions(Object(r.a)({},x)),setTimeout((function(){t.getModel().updateOptions(Object(r.a)({},x))}),200))}),[JSON.stringify(x),Z]),Object(l.useEffect)((function(){var t=W.current.instance;t&&Z&&t.layout()}),[p,y,Z]);var nt=Object(l.useState)(d(p)),at=Object(s.a)(nt,2),st=at[0],ot=(at[1],Object(l.useState)(d(y))),lt=Object(s.a)(ot,2),ct=lt[0],ut=lt[1],ht=Object(r.a)(Object(r.a)({},k),{},{width:st,height:ct});return c.a.createElement("div",{className:"my-monaco-editor",ref:V,style:ht})};function v(t){var e=t.width,n=void 0===e?"100%":e,o=t.height,h=void 0===o?"100%":o,f=t.original,p=t.modified,g=t.language,v=t.options,y=void 0===v?{}:v,b=Object(l.useRef)(),S=Object(l.useState)(null),E=Object(s.a)(S,2),C=E[0],k=E[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}));k(e);var i=function(t){var e;return b.current&&(e=new u.default((function(e){var i,r=Object(a.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 A={width:d(n),height:d(h)};return c.a.createElement("div",{className:"my-diff-editor",ref:b,style:A})}},ZpRC: +/*!*************************************************************************!*\ + !*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***! + \*************************************************************************/ +/*! exports provided: default */ +/*! 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 a(t,e){if(t.clientHeighte||a>t&&s=e&&o>=i?a-t-r:s>e&&oi?s-e+n:0}var o=function(t,e){var i=window,n=e.scrollMode,o=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&&a(p)&&!a(document.documentElement)||null!=p&&a(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(),S=b.height,E=b.width,C=b.top,k=b.right,A=b.bottom,x=b.left,w="start"===o||"nearest"===o?C:"end"===o?A:C+S/2,T="center"===l?x+E/2:"end"===l?k:x,L=[],I=0;I=0&&x>=0&&A<=m&&k<=g&&C>=N&&A<=B&&x>=F&&k<=P)return L;var _=getComputedStyle(D),j=parseInt(_.borderLeftWidth,10),U=parseInt(_.borderTopWidth,10),G=parseInt(_.borderRightWidth,10),H=parseInt(_.borderBottomWidth,10),z=0,V=0,W="offsetWidth"in D?D.offsetWidth-D.clientWidth-j-G:0,K="offsetHeight"in D?D.offsetHeight-D.clientHeight-U-H:0;if(d===D)z="start"===o?w:"end"===o?w-m:"nearest"===o?s(y,y+m,m,U,H,y+w,y+w+S,S):w-m/2,V="start"===l?T:"center"===l?T-g/2:"end"===l?T-g:s(v,v+g,g,j,G,v+T,v+T+E,E),z=Math.max(0,z+y),V=Math.max(0,V+v);else{z="start"===o?w-N-U:"end"===o?w-B+H+K:"nearest"===o?s(N,B,O,U,H+K,w,w+S,S):w-(N+O/2)+K/2,V="start"===l?T-F-j:"center"===l?T-(F+M/2)+W/2:"end"===l?T-P+G+W:s(F,P,M,j,G+W,T,T+E,E);var Q=D.scrollLeft,Y=D.scrollTop;w+=Y-(z=Math.max(0,Math.min(Y+z,D.scrollHeight-O+K))),T+=Q-(V=Math.max(0,Math.min(Q+V,D.scrollWidth-M+W)))}L.push({el:D,top:z,left:V})}return L};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?[]:o(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,a=t.left;r.scroll&&i?r.scroll({top:n,left:a,behavior:e}):(r.scrollTop=n,r.scrollLeft=a)}))}(o(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,i){var r;!function(n){var a=/^\s+/,s=/\s+$/,o=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,o=null,l=null,h=!1,d=!1;"string"==typeof t&&(t=function(t){t=t.replace(a,"").replace(s,"").toLowerCase();var e,i=!1;if(D[t])t=D[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&&(V(t.r)&&V(t.g)&&V(t.b)?(f=t.r,p=t.g,g=t.b,e={r:255*M(f,255),g:255*M(p,255),b:255*M(g,255)},h=!0,d="%"===String(t.r).substr(-1)?"prgb":"rgb"):V(t.h)&&V(t.s)&&V(t.v)?(r=F(t.s),o=F(t.v),e=function(t,e,i){t=6*M(t,360),e=M(e,100),i=M(i,100);var r=n.floor(t),a=t-r,s=i*(1-e),o=i*(1-a*e),l=i*(1-(1-a)*e),c=r%6;return{r:255*[i,o,s,s,l,i][c],g:255*[l,i,i,o,s,s][c],b:255*[s,s,l,i,i,o][c]}}(t.h,r,o),h=!0,d="hsv"):V(t.h)&&V(t.s)&&V(t.l)&&(r=F(t.s),l=F(t.l),e=function(t,e,i){var r,n,a;function s(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=M(t,360),e=M(e,100),i=M(i,100),0===e)r=n=a=i;else{var o=i<.5?i*(1+e):i+e-i*e,l=2*i-o;r=s(l,o,t+1/3),n=s(l,o,t),a=s(l,o,t-1/3)}return{r:255*r,g:255*n,b:255*a}}(t.h,r,l),h=!0,d="hsl"),t.hasOwnProperty("a")&&(i=t.a));var f,p,g;return i=O(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=o++}function f(t,e,i){t=M(t,255),e=M(e,255),i=M(i,255);var r,n,a=u(t,e,i),s=c(t,e,i),o=(a+s)/2;if(a==s)r=n=0;else{var l=a-s;switch(n=o>.5?l/(2-a-s):l/(a+s),a){case t:r=(e-i)/l+(e>1)+720)%360;--e;)r.h=(r.h+n)%360,a.push(d(r));return a}function I(t,e){e=e||6;for(var i=d(t).toHsv(),r=i.h,n=i.s,a=i.v,s=[],o=1/e;e--;)s.push(d({h:r,s:n,v:a})),a=(a+o)%1;return s}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=O(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 a=[B(l(t).toString(16)),B(l(e).toString(16)),B(l(i).toString(16)),B(_(r))];if(n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.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*M(this._r,255))+"%",g:l(100*M(this._g,255))+"%",b:l(100*M(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*M(this._r,255))+"%, "+l(100*M(this._g,255))+"%, "+l(100*M(this._b,255))+"%)":"rgba("+l(100*M(this._r,255))+"%, "+l(100*M(this._g,255))+"%, "+l(100*M(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(R[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(S,arguments)},brighten:function(){return this._applyModification(E,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(k,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(w,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(),a=i/100;return d({r:(n.r-r.r)*a+r.r,g:(n.g-r.g)*a+r.g,b:(n.b-r.b)*a+r.b,a:(n.a-r.a)*a+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,a=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=a>=4.5;break;case"AAlarge":n=a>=3;break;case"AAAsmall":n=a>=7}return n},d.mostReadable=function(t,e,i){var r,n,a,s,o=null,l=0;n=(i=i||{}).includeFallbackColors,a=i.level,s=i.size;for(var c=0;cl&&(l=r,o=d(e[c]));return d.isReadable(t,o,{level:a,size:s})||!n?o:(i.includeFallbackColors=!1,d.mostReadable(t,["#fff","#000"],i))};var D=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"},R=d.hexNames=function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}(D);function O(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function M(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 N(t){return c(1,u(0,t))}function P(t){return parseInt(t,16)}function B(t){return 1==t.length?"0"+t:""+t}function F(t){return t<=1&&(t=100*t+"%"),t}function _(t){return n.round(255*parseFloat(t)).toString(16)}function j(t){return P(t)/255}var U,G,H,z=(G="[\\s|\\(]+("+(U="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",H="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+G),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+G),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+G),hsva:new RegExp("hsva"+H),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 V(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,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,i){},cRFk: +/*!**************************************************!*\ + !*** ./src/assets/images/RepositoryNoneData.png ***! + \**************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/RepositoryNoneData.828085a8.png"},csWT: +/*!********************************************!*\ + !*** ./src/assets/images/icons/choose.svg ***! + \********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/choose.4ad1045f.svg"},dejd: +/*!***********************************************************!*\ + !*** ./src/components/markdown-editor/toolbar/index.less ***! + \***********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){},djh8: +/*!********************************************!*\ + !*** ./src/assets/images/icons/qrCode.png ***! + \********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/qrCode.42927872.png"},dmUQ: +/*!**************************************************************!*\ + !*** ./node_modules/rc-input-number/es/index.js + 1 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! 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,i){"use strict";var r=i("Ff2n"),n=i("rePB"),a=i("1OyB"),s=i("vuIU"),o=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?o-1:0),c=1;c1?i-1:0),a=1;a=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,a=i.inputValue,s=i.value;null==(e=n?a:r.toPrecisionAsStep(s))&&(e="");var o=r.formatWrapper(e);return E(r.props.decimalSeparator)&&(o=o.toString().replace(".",r.props.decimalSeparator)),o},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 s=r.getValidValue(r.toNumber(n));return r.state=m(m({},r.state),{},{inputValue:r.toPrecisionAsStep(s),value:s}),r}return Object(s.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,a=e.min,s=this.state.focused;if(t){if(!C(t.value,i)||!C(t.max,n)||!C(t.min,a)){var o,l=s?i:this.getValidValue(i);o=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:o})}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!==a&&"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,a=void 0===n?null:n,s=this.state.inputValue,o=void 0===s?null:s,l="number"==typeof r?r.toFixed(i):"".concat(r),c=r!==a||l!=="".concat(o);return"value"in this.props?(o=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:o},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(E(r))return r;var a=this.getPrecision(e),s=this.getPrecision(n),o=this.getPrecision(t);return t?Math.max(o,a+s):a+s}},{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:E(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)),a=((r*t+r*i*e)/r).toFixed(n);return this.toNumber(a)}},{key:"downStep",value:function(t,e){var i=this.props.step,r=this.getPrecisionFactor(t,e),n=Math.abs(this.getMaxPrecision(t,e)),a=((r*t-r*i*e)/r).toFixed(n);return this.toNumber(a)}},{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 a=this.props;if(!a.disabled){var s=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(s)){var o=this["".concat(t,"Step")](s,r),l=o>a.max||oa.max?o=a.max:o=p)||a||s,Q=(U||0===U)&&(isNaN(U)||Number(U)<=g)||a||s,Y=f()("".concat(i,"-handler"),"".concat(i,"-handler-up"),Object(n.a)({},"".concat(i,"-handler-up-disabled"),K)),J=f()("".concat(i,"-handler"),"".concat(i,"-handler-down"),Object(n.a)({},"".concat(i,"-handler-down-disabled"),Q)),q=o?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Z=o?{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:H,style:m,title:v,onMouseEnter:S,onMouseLeave:E,onMouseOver:C,onMouseOut:k,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"},q,{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:J}),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:A,type:T,placeholder:L,onPaste:B,onClick:x,onMouseUp:this.onMouseUp,className:"".concat(i,"-input"),tabIndex:w,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:V?this.onKeyDown:y,onKeyUp:V?this.onKeyUp:y,autoFocus:N,maxLength:M,readOnly:s,disabled:a,max:p,min:g,step:O,name:P,title:v,id:I,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(W),pattern:R,inputMode:D,onInput:F},z))))}}]),i}(h.a.Component);k.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:S,min:-S,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 A=k;e.a=A},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,i){"use strict";i.d(e,"a",(function(){return k}));var r=i("q1tI"),n=i.n(r),a=i("TSYQ"),s=i.n(a),o={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 a=e[n].current;if(a){r=!0;var s=a.style;s.transitionDuration=".3s, .3s, .3s, .06s",i.current&&t-i.current<100&&(s.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 a=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,a=t.strokeColor,o=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(a)?a:[a],S=u(l(y),1)[0],E=h/2,C=100-h/2,k="M ".concat("round"===o?E:0,",").concat(E,"\n L ").concat("round"===o?C:100,",").concat(E),A="0 0 100 ".concat(h),x=0;return n.a.createElement("svg",c({className:s()("".concat(r,"-line"),e),viewBox:A,preserveAspectRatio:"none",style:f},v),n.a.createElement("path",{className:"".concat(r,"-line-trail"),d:k,strokeLinecap:o,stroke:p,strokeWidth:g||h,fillOpacity:"0"}),y.map((function(t,e){var i={strokeDasharray:"".concat(t,"px, 100px"),strokeDashoffset:"-".concat(x,"px"),transition:m||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},a=b[e]||b[b.length-1];return x+=t,n.a.createElement("path",{key:e,className:"".concat(r,"-line-path"),d:k,strokeLinecap:o,stroke:a,strokeWidth:h,fillOpacity:"0",ref:S[e],style:i})})))};f.defaultProps=o;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 a=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 S(t){return Array.isArray(t)?t:[t]}function E(t,e,i,r){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,s=50-r/2,o=0,l=-s,c=0,u=-2*s;switch(a){case"left":o=-s,l=0,c=2*s,u=0;break;case"right":o=s,l=0,c=-2*s,u=0;break;case"bottom":l=s,u=2*s}var h="M 50,50 m ".concat(o,",").concat(l,"\n a ").concat(s,",").concat(s," 0 1 1 ").concat(c,",").concat(-u,"\n a ").concat(s,",").concat(s," 0 1 1 ").concat(-c,",").concat(u),d=2*Math.PI*s,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,a=t.strokeWidth,o=t.trailWidth,c=t.gapDegree,u=t.gapPosition,h=t.trailColor,d=t.strokeLinecap,f=t.style,m=t.className,C=t.strokeColor,k=t.percent,A=v(t,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),x=Object(r.useMemo)((function(){return y+=1}),[]),w=E(0,100,h,a,c,u),T=w.pathString,L=w.pathStyle,I=S(k),D=S(C),R=D.find((function(t){return"[object Object]"===Object.prototype.toString.call(t)})),O=g(l(I),1)[0];return n.a.createElement("svg",p({className:s()("".concat(i,"-circle"),m),viewBox:"0 0 100 100",style:f},A),R&&n.a.createElement("defs",null,n.a.createElement("linearGradient",{id:"".concat(i,"-gradient-").concat(x),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(R).sort((function(t,e){return b(t)-b(e)})).map((function(t,e){return n.a.createElement("stop",{key:e,offset:t,stopColor:R[t]})})))),n.a.createElement("path",{className:"".concat(i,"-circle-trail"),d:T,stroke:h,strokeLinecap:d,strokeWidth:o||a,fillOpacity:"0",style:L}),(e=0,I.map((function(t,r){var s=D[r]||D[D.length-1],o="[object Object]"===Object.prototype.toString.call(s)?"url(#".concat(i,"-gradient-").concat(x,")"):"",l=E(e,t,s,a,c,u);return e+=t,n.a.createElement("path",{key:r,className:"".concat(i,"-circle-path"),d:l.pathString,stroke:o,strokeLinecap:d,strokeWidth:a,opacity:0===t?0:1,fillOpacity:"0",style:l.pathStyle,ref:O[r]})}))).reverse())};C.defaultProps=o;var k=C},isY5: +/*!********************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/CommonHomework/Review/index.tsx + 2 modules ***! + \********************************************************************************/ +/*! exports provided: default */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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/pages/Classrooms/Lists/CommonHomework/Review/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/ImagesIcon/index.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/MultiUpload/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/PreviewAll/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/image-preview/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/mediator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/service/shixunHomeworks.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ +/*! 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/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */ +/*! 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(t,e,i){"use strict";i.r(e);i("5Dmo");var r=i("3S7+"),n=(i("giR+"),i("fyUT")),a=(i("+L6B"),i("2/Rp")),s=(i("/zsF"),i("PArb")),o=(i("14J3"),i("BMrR")),l=(i("jCWc"),i("kPKH")),c=(i("sPJy"),i("bE4q")),u=(i("miYZ"),i("tsqr")),h=i("9og8"),d=i("k1fw"),f=(i("y8nQ"),i("Vl3Y")),p=(i("2qtc"),i("kLXV")),g=i("tJVT"),m=i("WmNS"),v=i.n(m),y=i("q1tI"),b=i.n(y),S=i("Ty5D"),E=i("9kvl"),C=i("55Ip"),k=i("jhfD"),A=i("/MfK"),x=i("kaH+"),w=i("ErOA"),T=i("Ot1p"),L=i("dhSg"),I=i("p5ED"),D=i("wd/R"),R=i.n(D),O=i("m3rI"),M=i("XYT7"),N=(i("5NDa"),i("5rEg")),P=Object(E.a)((function(t){return{shixunHomeworks:t.shixunHomeworks}}))((function(t){var e=t.shixunHomeworks,i=t.dispatch,r=Object(S.i)(),a=Object(y.useState)(!0),s=Object(g.a)(a,2),o=(s[0],s[1],f.a.useForm()),l=Object(g.a)(o,1)[0];return b.a.createElement(b.a.Fragment,null,b.a.createElement(p.a,{centered:!0,title:"调分",visible:"调分"===e.actionTabs.key,okText:"确定",cancelText:"取消",onOk:Object(h.a)(v.a.mark((function t(){var n;return v.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.validateFields();case 2:return n=l.getFieldsValue(),t.next=5,Object(w.a)("/api/student_works/".concat(e.actionTabs.id,"/adjust_score.json"),{method:"post",body:Object(d.a)({},n)});case 5:0===t.sent.status&&(u.b.success("评阅成功"),l.resetFields(),i({type:"shixunHomeworks/setActionTabs",payload:{}}),i({type:"shixunHomeworks/getStudentWorkCommon",payload:Object(d.a)({},r)}));case 7:case"end":return t.stop()}}),t)}))),onCancel:function(){i({type:"shixunHomeworks/setActionTabs",payload:{}})}},b.a.createElement("p",{className:"tc"},"该学生的最终成绩将不会按照评分规则进行计算"),b.a.createElement(f.a,{form:l,layout:"horizontal"},b.a.createElement("div",{style:{display:"flex",alignItems:"baseline"}},b.a.createElement(f.a.Item,{label:"成绩",name:"score",rules:[{required:!0,message:"请输入!"}]},b.a.createElement(n.a,{min:0,placeholder:"请填写分数"})),b.a.createElement("span",{className:"ml10"},"分")),b.a.createElement("div",null,b.a.createElement(f.a.Item,{name:"comment"},b.a.createElement(N.a.TextArea,{placeholder:"请填写您对作品调分的原因",rows:8}))))))})),B=i("pAaK"),F=i.n(B),_=i("9Bee"),j=i("LvDl"),U=i("500L"),G=Object(E.a)((function(t){return{classroomList:t.classroomList,loading:t.loading}}))((function(t){var e=t.classroomList,i=(t.loading,t.dispatch),r=(Object(S.i)(),f.a.useForm()),n=Object(g.a)(r,1)[0];return b.a.createElement(p.a,{centered:!0,title:"补交附件",visible:"补交附件"===e.actionTabs.key,bodyStyle:{minHeight:200},onOk:Object(h.a)(v.a.mark((function t(){var r,a,s;return v.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.validateFields();case 2:return a=Object(d.a)({},n.getFieldValue()),s=e.actionTabs.selectArrs,a.attachment_ids=null===(r=a.attachment_ids)||void 0===r?void 0:r.map((function(t){return t.response.id})),t.next=7,Object(M.R)(Object(d.a)(Object(d.a)({},a),{},{homeworkId:s.work_id}));case 7:0===t.sent.status&&(n.resetFields(),i({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:Object(d.a)({},e.actionTabs.params)}),i({type:"classroomList/setActionTabs",payload:{}}));case 9:case"end":return t.stop()}}),t)}))),onCancel:function(){n.resetFields(),i({type:"classroomList/setActionTabs",payload:{}})}},b.a.createElement(f.a,{form:n,initialValues:{}},b.a.createElement(f.a.Item,{name:"attachment_ids",rules:[{required:!0,message:"请上传附件"}]},b.a.createElement(U.b,null)),b.a.createElement(f.a.Item,{name:"description"},b.a.createElement(N.a.TextArea,{placeholder:"请在此输入补交附件的原因,最大限制100个字符",rows:7}))))})),H=i("1vsH"),z=i("xKgJ"),V=i("lzim");e.default=Object(E.a)((function(t){var e=t.shixunHomeworks,i=t.loading,r=t.user;return{shixunHomeworks:e,globalSetting:t.globalSetting,user:r,loading:i.effects}}))((function(t){var e,i,m,D,N,B,W,K,Q,Y,J,q,Z,X,$,tt,et,it,rt,nt,at=t.shixunHomeworks,st=(t.globalSetting,t.loading,t.user),ot=t.dispatch,lt=Object(S.i)(),ct=Object(y.useRef)(),ut=st.userInfo,ht=at.studentWorkDetail,dt=at.studentWorkCommon,ft=at.studentWorkSupplyDetail,pt=(at.workList,Object(y.useState)("")),gt=Object(g.a)(pt,2),mt=gt[0],vt=gt[1],yt=Object(y.useState)({show:!1,type:0,active:null}),bt=Object(g.a)(yt,2),St=bt[0],Et=bt[1],Ct=p.a.useModal(),kt=Object(g.a)(Ct,2),At=kt[0],xt=kt[1],wt=Object(y.useState)({last:!1}),Tt=Object(g.a)(wt,2),Lt=Tt[0],It=Tt[1],Dt=Object(y.useState)({last:!1}),Rt=Object(g.a)(Dt,2),Ot=Rt[0],Mt=Rt[1],Nt=f.a.useForm(),Pt=Object(g.a)(Nt,1)[0],Bt=Object(y.useState)(!1),Ft=Object(g.a)(Bt,2),_t=Ft[0],jt=Ft[1],Ut=Object(y.useState)(""),Gt=Object(g.a)(Ut,2),Ht=Gt[0],zt=Gt[1],Vt=Object(y.useState)({content:"",type:""}),Wt=Object(g.a)(Vt,2),Kt=Wt[0],Qt=Wt[1],Yt=Object(S.h)(),Jt=function(){ot({type:"shixunHomeworks/getStudentWorkCommon",payload:Object(d.a)({},lt)})};function qt(){return(qt=Object(h.a)(v.a.mark((function t(){var e,i,r,n,a,s,o,l,c,u;return v.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=JSON.parse(sessionStorage.all_student_works_params||"{}"),a={},null!=Yt&&null!==(e=Yt.query)&&void 0!==e&&e.ids&&(a.course_group=null==Yt||null===(s=Yt.query)||void 0===s?void 0:s.ids.split(",")),t.next=5,ot({type:"shixunHomeworks/getAllStudentWorks",payload:Object(d.a)(Object(d.a)(Object(d.a)({},lt),n),a)});case 5:o=t.sent,(l=null===(i=o.all_student_works)||void 0===i?void 0:i.map((function(t){return String(t.student_work_id)})).indexOf(lt.userId))===(null===(r=o.all_student_works)||void 0===r?void 0:r.length)-1?It({last:!0}):It(null===(c=o.all_student_works)||void 0===c?void 0:c[l+1]),Mt(0===l?{last:!0}:null===(u=o.all_student_works)||void 0===u?void 0:u[l-1]);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}Object(y.useEffect)((function(){ot({type:"shixunHomeworks/getStudentWorkDetail",payload:Object(d.a)({},lt)}),ot({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:Object(d.a)({},lt)}),Jt(),function(){qt.apply(this,arguments)}(),ct.current.onclick=function(t){"IMG"===t.target.nodeName&&""!==t.target.alt&&L.a.publish("preview-image",t.target.src)}}),[lt.categoryId,lt.userId]),Object(y.useEffect)((function(){return ot({type:"globalSetting/footerToggle",payload:!1}),function(){ot({type:"globalSetting/footerToggle",payload:!0})}}),[]);var Zt=function(t){var e;At.confirm({title:"是否确认删除?",onOk:(e=Object(h.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(M.k)({score_id:t.comment_id,userId:lt.userId});case 2:0===e.sent.status&&(u.b.success("删除成功"),Jt());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},Xt=function(){var t=Object(h.a)(v.a.mark((function t(e){var i;return v.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.attachment_ids=null===(i=e.attachment_ids)||void 0===i?void 0:i.map((function(t){var e;return null==t||null===(e=t.response)||void 0===e?void 0:e.id})),t.next=3,Object(M.e)(Object(d.a)(Object(d.a)({},e),{},{userId:lt.userId}));case 3:0===t.sent.status&&(Pt.resetFields(),u.b.success("提交成功"),Jt());case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),$t=function(){var t=Object(h.a)(v.a.mark((function t(e){var i,r,n,a,s,o,l,c,u;return v.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=Pt.getFieldsValue(),r=i.comment,n=i.score,a=i.attachment_ids,s=!Object(j.isNil)(n),!(r||s||a)){t.next=5;break}return p.a.confirm({centered:!0,okText:"离开",cancelText:"取消",title:"离开此页提示",content:b.a.createElement("div",{className:"tc"},"系统可能不会保存您所做的更改"),onOk:function(){var t,i;if(Pt.resetFields(),"last"===e)E.d.push(null!=Yt&&null!==(t=Yt.query)&&void 0!==t&&t.ids?"/classrooms/".concat(null==lt?void 0:lt.coursesId,"/common_homework/").concat(null==lt?void 0:lt.categoryId,"/review/").concat(null==Ot?void 0:Ot.student_work_id,"?ids=").concat(null==Yt||null===(i=Yt.query)||void 0===i?void 0:i.ids):"/classrooms/".concat(null==lt?void 0:lt.coursesId,"/common_homework/").concat(null==lt?void 0:lt.categoryId,"/review/").concat(null==Ot?void 0:Ot.student_work_id));else if("read"===e){var r,n;E.d.push(null!=Yt&&null!==(r=Yt.query)&&void 0!==r&&r.ids?"/classrooms/".concat(null==lt?void 0:lt.coursesId,"/common_homework/").concat(null==lt?void 0:lt.categoryId,"/review/").concat(null==Lt?void 0:Lt.student_work_id,"?ids=").concat(null==Yt||null===(n=Yt.query)||void 0===n?void 0:n.ids):"/classrooms/".concat(null==lt?void 0:lt.coursesId,"/common_homework/").concat(null==lt?void 0:lt.categoryId,"/review/").concat(null==Lt?void 0:Lt.student_work_id))}else E.d.push("/classrooms/".concat(lt.coursesId,"/common_homework/").concat(lt.categoryId,"/detail"))}}),t.abrupt("return");case 5:"last"===e?E.d.push(null!=Yt&&null!==(o=Yt.query)&&void 0!==o&&o.ids?"/classrooms/".concat(null==lt?void 0:lt.coursesId,"/common_homework/").concat(null==lt?void 0:lt.categoryId,"/review/").concat(null==Ot?void 0:Ot.student_work_id,"?ids=").concat(null==Yt||null===(l=Yt.query)||void 0===l?void 0:l.ids):"/classrooms/".concat(null==lt?void 0:lt.coursesId,"/common_homework/").concat(null==lt?void 0:lt.categoryId,"/review/").concat(null==Ot?void 0:Ot.student_work_id)):"read"===e?E.d.push(null!=Yt&&null!==(c=Yt.query)&&void 0!==c&&c.ids?"/classrooms/".concat(null==lt?void 0:lt.coursesId,"/common_homework/").concat(null==lt?void 0:lt.categoryId,"/review/").concat(null==Lt?void 0:Lt.student_work_id,"?ids=").concat(null==Yt||null===(u=Yt.query)||void 0===u?void 0:u.ids):"/classrooms/".concat(null==lt?void 0:lt.coursesId,"/common_homework/").concat(null==lt?void 0:lt.categoryId,"/review/").concat(null==Lt?void 0:Lt.student_work_id)):E.d.push("/classrooms/".concat(lt.coursesId,"/common_homework/").concat(lt.categoryId,"/detail"));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return b.a.createElement("section",{className:"edu-container",ref:ct},b.a.createElement("section",{className:"animated fadeIn"},b.a.createElement("aside",{className:"mt10"},ut&&b.a.createElement(c.a,{separator:">"},b.a.createElement(c.a.Item,null,b.a.createElement(C.a,{to:"/classrooms/".concat(lt.coursesId,"/common_homework/").concat(null!=ht&&null!==(e=ht.category)&&void 0!==e&&e.main?"":null==ht||null===(i=ht.category)||void 0===i?void 0:i.category_id)},null==ut||null===(m=ut.course)||void 0===m?void 0:m.course_name)),b.a.createElement(c.a.Item,null,b.a.createElement(C.a,{to:"/classrooms/".concat(lt.coursesId,"/common_homework/").concat(null!=ht&&null!==(D=ht.category)&&void 0!==D&&D.main?"":null==ht||null===(N=ht.category)||void 0===N?void 0:N.category_id)},null==ht||null===(B=ht.category)||void 0===B?void 0:B.category_name)),b.a.createElement(c.a.Item,null,b.a.createElement(C.a,{to:"/classrooms/".concat(lt.coursesId,"/common_homework/").concat(lt.categoryId,"/detail")},"作业详情")),b.a.createElement(c.a.Item,null,null==ht?void 0:ht.author_name))),b.a.createElement("aside",{className:[F.a.title,"mt20"].join(" ")},b.a.createElement(o.a,{style:{width:"100%"}},b.a.createElement(l.a,{flex:"1"},b.a.createElement(C.a,{to:"/classrooms/".concat(lt.coursesId,"/common_homework")},b.a.createElement(k.a,{className:"font16 c-black"})),b.a.createElement("strong",{className:"font20 ml5"},null==ht?void 0:ht.homework_name),b.a.createElement(H.k,{status:null==ht?void 0:ht.homework_status})),b.a.createElement(l.a,null,Object(z.s)()&&(null==ht||null===(W=ht.homework_status)||void 0===W?void 0:W.includes("补交中"))&&b.a.createElement("span",{onClick:function(){ot({type:"classroomList/setActionTabs",payload:{key:"补交附件",params:lt,selectArrs:{homework_id:lt.commonHomeworkId,work_id:lt.userId}}})},className:"c-blue current font14"},"补交附件"))))),b.a.createElement("ul",{className:F.a["nav-tab"]},b.a.createElement("li",{className:"active"},"作业详情"),Object(z.u)()&&b.a.createElement("li",null,b.a.createElement(C.a,{to:"/classrooms/".concat(lt.coursesId,"/common_homework/").concat(lt.categoryId,"/lab-report-view/").concat(lt.userId)}," ","实验报告"," "))),b.a.createElement("section",{className:[F.a.bg,"pt30","pl30","pr30","pb30"].join(" ")},(null==ht?void 0:ht.description)&&b.a.createElement("aside",null,b.a.createElement("div",{className:"font16"},"内容"),b.a.createElement("div",{className:"pl30 mt20"},b.a.createElement(_.a,{value:(null==ht?void 0:ht.description)||"暂无~"})),null==ht||null===(K=ht.attachments)||void 0===K?void 0:K.map((function(t,e){return b.a.createElement("div",{className:"pl30",key:e},b.a.createElement("a",{href:"".concat(O.a.API_SERVER).concat(t.url),onClick:function(e){e.preventDefault(),Qt({type:t.file_type,content:O.a.API_SERVER+t.url})}},b.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),b.a.createElement("span",{className:"ml10 c-black"},t.title),b.a.createElement("span",{className:"c-light-black ml20 font12"},t.filesize),b.a.createElement("span",{className:"ml10 c-light-primary current",onClick:function(e){e.preventDefault(),Object(H.v)("","".concat(O.a.API_SERVER).concat(t.url))}},"下载"),b.a.createElement("span",{className:"ml10 c-green-29b current",onClick:function(){var e=Object(h.a)(v.a.mark((function e(i){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.preventDefault(),Qt({type:t.file_type,content:O.a.API_SERVER+t.url});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},"预览")))})),b.a.createElement("aside",{className:"tr"},b.a.createElement("span",{className:" c-light-black"},R()(ht.commit_time).format("YYYY-MM-DD HH:mm")),b.a.createElement("span",{className:"ml10"},ht.commit_user_name),b.a.createElement("span",{className:"ml10 c-light-black"},"提交"),b.a.createElement("span",{className:"ml30 c-light-black"},R()(ht.update_time).format("YYYY-MM-DD HH:mm")),b.a.createElement("span",{className:"ml10"},ht.update_user_name),b.a.createElement("span",{className:"ml10 c-light-black"},"更新"))),(null==ht?void 0:ht.redo_description)&&b.a.createElement("aside",null,b.a.createElement(s.a,null),b.a.createElement("div",{className:"font16"},"重做记录"),b.a.createElement("div",{className:"pl30 mt20"},b.a.createElement(_.a,{value:(null==ht?void 0:ht.redo_description)||"暂无~"})),null==ht||null===(Q=ht.redo_attachments)||void 0===Q?void 0:Q.map((function(t,e){return b.a.createElement("div",{className:"pl30",key:e},b.a.createElement("a",{href:"".concat(O.a.API_SERVER).concat(t.url),onClick:function(e){e.preventDefault(),Qt({type:t.file_type,content:O.a.API_SERVER+t.url})}},b.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),b.a.createElement("span",{className:"ml10 c-black"},t.title),b.a.createElement("span",{className:"c-light-black ml20 font12"},t.filesize),b.a.createElement("span",{className:"ml10 c-light-primary current",onClick:function(e){e.preventDefault(),Object(H.v)("","".concat(O.a.API_SERVER).concat(t.url))}},"下载"),b.a.createElement("span",{className:"ml10 c-green-29b current",onClick:function(){var e=Object(h.a)(v.a.mark((function e(i){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.preventDefault(),Qt({type:t.file_type,content:O.a.API_SERVER+t.url});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},"预览")))})),b.a.createElement("aside",{className:"tr"},b.a.createElement("span",{className:" c-light-black"},R()(ht.redo_commit_time).format("YYYY-MM-DD HH:mm")),b.a.createElement("span",{className:"ml10"},ht.commit_user_name),b.a.createElement("span",{className:"ml10 c-light-black"},"提交"),b.a.createElement("span",{className:"ml30 c-light-black"},R()(ht.redo_update_time).format("YYYY-MM-DD HH:mm")),b.a.createElement("span",{className:"ml10"},ht.update_user_name),b.a.createElement("span",{className:"ml10 c-light-black"},"更新"))),(null==ft?void 0:ft.revise_reason)&&b.a.createElement("aside",null,b.a.createElement(s.a,null),b.a.createElement("div",{className:"font16"},"补交内容"),b.a.createElement("div",{className:"pl30 mt20"},b.a.createElement(_.a,{value:(null==ft?void 0:ft.revise_reason)||"暂无~"})),null==ft||null===(Y=ft.revise_attachments)||void 0===Y?void 0:Y.map((function(t,e){return b.a.createElement("div",{className:"pl30",key:e},b.a.createElement("a",{href:"".concat(O.a.API_SERVER).concat(t.url),onClick:function(e){e.preventDefault(),Qt({type:t.file_type,content:O.a.API_SERVER+t.url})}},b.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),b.a.createElement("span",{className:"ml10 c-black"},t.title),b.a.createElement("span",{className:"c-light-black ml20 font12"},t.filesize),b.a.createElement("span",{className:"ml10 c-light-primary current",onClick:function(e){e.preventDefault(),Object(H.v)("","".concat(O.a.API_SERVER).concat(t.url))}},"下载"),b.a.createElement("span",{className:"ml10 c-green-29b current",onClick:function(){var e=Object(h.a)(v.a.mark((function e(i){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.preventDefault(),Qt({type:t.file_type,content:O.a.API_SERVER+t.url});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},"预览")))})),b.a.createElement("aside",{className:"tr"},b.a.createElement("span",{className:"ml30 c-light-black"},R()(ft.atta_update_time).format("YYYY-MM-DD HH:mm")),b.a.createElement("span",{className:"ml10"},ft.atta_update_user),b.a.createElement("span",{className:"ml10 c-light-black"},"更新")))),(null==ht?void 0:ht.anonymous_comment)&&Object(z.i)()&&b.a.createElement("section",{className:[F.a.bg,"mt30","pt30","pl30","pr30","pb30"].join(" ")},b.a.createElement("p",null,"匿评学生"),!(null==ht||null===(J=ht.no_commented_user_names)||void 0===J||!J.length)&&b.a.createElement("p",null,"未完成匿评:",ht.no_commented_user_names.join("、")),b.a.createElement("div",null,"已完成匿评:",null===(q=ht.commented_user_names)||void 0===q?void 0:q.join("、"))),(Object(z.h)()||(null==ht||null===(Z=ht.homework_status)||void 0===Z?void 0:Z.includes("匿评中")))&&b.a.createElement("section",null,b.a.createElement("aside",{className:[F.a.replyList,"bg-white"].join(" ")},b.a.createElement(o.a,{gutter:[10,20]},b.a.createElement(l.a,{flex:1},!(null==dt||null===(X=dt.comment_scores)||void 0===X||!X.length)&&b.a.createElement("span",{className:"font-16"},"全部评阅(",null==dt?void 0:dt.comment_count,")")),b.a.createElement(l.a,{style:{lineHeight:"40px"}},Object(z.c)()&&(null==dt?void 0:dt.ultimate)&&b.a.createElement("span",{className:"font-16 c-blue current",onClick:function(){ot({type:"shixunHomeworks/setActionTabs",payload:{key:"调分",selectArrs:ht,id:lt.userId,params:lt}})}},"调分")),b.a.createElement(l.a,null,Object(z.i)()&&((null==ht||null===($=ht.homework_status)||void 0===$?void 0:$.includes("提交中"))||(null==ht||null===(tt=ht.homework_status)||void 0===tt?void 0:tt.includes("补交中"))||(null==ht||null===(et=ht.homework_status)||void 0===et?void 0:et.includes("进行中")))&&b.a.createElement(a.a,{style:{width:"124px",height:"40px"},type:"primary",onClick:function(){return jt(!0)}},"打回重做"))),!dt.is_author&&!(null!=dt&&dt.ultimate)&&(Object(z.c)()||(null==ht||null===(it=ht.homework_status)||void 0===it?void 0:it.includes("匿评中")))&&b.a.createElement("aside",null,b.a.createElement(f.a,{layout:"vertical",form:Pt,onFinish:function(t){return Xt(t)}},b.a.createElement(f.a.Item,{label:"评语",name:"comment",rules:[{required:!0,message:"请填写评语"}]},b.a.createElement(T.a,{defaultValue:"",height:250})),b.a.createElement("div",null,b.a.createElement(f.a.Item,{name:"attachment_ids"},b.a.createElement(U.b,null))),b.a.createElement("div",{className:"mt10"},b.a.createElement(o.a,null,b.a.createElement(l.a,{flex:"1"},b.a.createElement(o.a,{align:"middle",justify:"start"},b.a.createElement(l.a,null,b.a.createElement(f.a.Item,{noStyle:!0,name:"score",rules:[{required:!Object(z.c)(),message:"请填写分数"}]},b.a.createElement(n.a,{step:.1,min:0,style:{width:100},size:"large",placeholder:"请填写分数"}))),b.a.createElement(l.a,null,b.a.createElement("span",{className:"ml5 mr20"},"分")))),b.a.createElement(l.a,null))),b.a.createElement("aside",{className:"".concat(F.a.buttonFixed)},b.a.createElement("aside",{className:"edu-container"},b.a.createElement(o.a,{align:"middle"},b.a.createElement(l.a,{flex:"1"},b.a.createElement(a.a,{type:"default",onClick:function(){return $t("list")}},"返回列表")),b.a.createElement(l.a,{flex:"1",className:"tr"},!Object(z.s)()&&b.a.createElement(a.a,{type:"default",onClick:function(){return $t("last")},disabled:null==Ot?void 0:Ot.last},"上一个"),!Object(z.s)()&&b.a.createElement(a.a,{type:"default",disabled:null==Lt?void 0:Lt.last,style:{marginLeft:"20px",marginRight:"20px"},onClick:function(){return $t("read")}},"下一个"),b.a.createElement(a.a,{htmlType:"submit",type:"primary"},"提交评阅"))))))),b.a.createElement(s.a,null),(Object(z.h)()||(null==ht||null===(rt=ht.homework_status)||void 0===rt?void 0:rt.includes("匿评中")))&&(null==dt||null===(nt=dt.comment_scores)||void 0===nt?void 0:nt.map((function(t,e){var i,n,c,d,f,g;return b.a.createElement("aside",{key:e},b.a.createElement(o.a,{gutter:[12,12],key:e},b.a.createElement(l.a,{flex:"40px"},"--"===(null==t?void 0:t.user_image_url)&&b.a.createElement("img",{className:F.a.headpic,width:"40",src:V.b}),"--"!==(null==t?void 0:t.user_image_url)&&b.a.createElement("img",{className:F.a.headpic,width:"40",src:"".concat(O.a.IMG_SERVER,"/images/").concat(null==t?void 0:t.user_image_url)})),b.a.createElement(l.a,{flex:"1"},b.a.createElement(o.a,{align:"middle"},b.a.createElement(l.a,{span:24},b.a.createElement(o.a,null,b.a.createElement(l.a,{flex:1},b.a.createElement("span",{className:"c-light-black"},null==t?void 0:t.user_name),b.a.createElement("span",{className:"c-light-black ml10"},R()(null==t?void 0:t.comment_time).format("YYYY-MM-DD HH:mm")),null!==t.score&&b.a.createElement("span",{className:"ml30 c-orange"},t.score,"分")),b.a.createElement(l.a,null,0===e?b.a.createElement("aside",null,t.delete&&b.a.createElement("span",{className:"c-blue current",onClick:function(){Zt(t)}},"删除"),t.can_appeal&&b.a.createElement("span",{className:"c-blue current",onClick:function(){Et({show:!0,type:1,active:e})}},"申诉"),t.can_reply&&b.a.createElement("span",{className:"c-blue current ml10",onClick:function(){return Et({show:!0,type:0,active:e})}},"回复")):b.a.createElement("aside",null,t.delete&&b.a.createElement("span",{className:"c-blue current",onClick:function(){Zt(t)}},"删除"),t.can_appeal&&b.a.createElement("span",{className:"c-blue current",onClick:function(){Et({show:!0,type:1,active:e})}},"申诉"),t.can_reply&&b.a.createElement("span",{className:"c-blue current ml10",onClick:function(){return Et({show:!0,type:0,active:e})}},"回复"),!t.can_reply&&b.a.createElement("span",{className:"c-light-black ml10"},"失效"))))),b.a.createElement(l.a,{span:24},t.content&&b.a.createElement(_.a,{value:t.content}),!t.content&&b.a.createElement("span",{className:"c-light-black"},"暂未写评语"),null==t||null===(i=t.attachments)||void 0===i?void 0:i.map((function(t,e){return b.a.createElement("div",{key:e},b.a.createElement("a",{href:"".concat(O.a.API_SERVER).concat(t.url),onClick:function(e){e.preventDefault(),Qt({type:t.file_type,content:O.a.API_SERVER+t.url})}},b.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),b.a.createElement("span",{className:"ml10 c-black"},t.title),b.a.createElement("span",{className:"c-light-black ml20 font12"},t.filesize),b.a.createElement("span",{className:"ml10 c-light-primary current",onClick:function(e){e.preventDefault(),Object(H.v)("","".concat(O.a.API_SERVER).concat(t.url))}},"下载"),b.a.createElement("span",{className:"ml10 c-green-29b current",onClick:function(){var e=Object(h.a)(v.a.mark((function e(i){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.preventDefault(),Qt({type:t.file_type,content:O.a.API_SERVER+t.url});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},"预览")))}))),b.a.createElement("div",{className:"w100"},b.a.createElement(s.a,null),b.a.createElement("aside",{className:[F.a.comment,"w100"].join(" ")},t.appeal_info&&""!=t.appeal_info&&b.a.createElement("aside",null,b.a.createElement(o.a,null,b.a.createElement(l.a,{span:24},b.a.createElement(o.a,null,b.a.createElement(l.a,{flex:"50px"},"--"===(null==t||null===(n=t.appeal_info)||void 0===n?void 0:n.user_image_url)&&b.a.createElement("img",{className:F.a.headpic,width:"40",src:V.b}),"--"!==(null==t||null===(c=t.appeal_info)||void 0===c?void 0:c.user_image_url)&&b.a.createElement("img",{className:F.a.headpic,width:"40",src:"".concat(O.a.IMG_SERVER,"/images/").concat(null==t||null===(d=t.appeal_info)||void 0===d?void 0:d.user_image_url)})),b.a.createElement(l.a,{flex:"1"},b.a.createElement(o.a,null,b.a.createElement(l.a,{flex:"1"},null==t||null===(f=t.appeal_info)||void 0===f?void 0:f.user_name,b.a.createElement("span",{className:"c-light-black ml10"},R()(null==t||null===(g=t.appeal_info)||void 0===g?void 0:g.time).format("YYYY-MM-DD HH:mm")),1===(null==t?void 0:t.appeal_status)&&b.a.createElement("span",{className:"tag-style bg-blue ml10"},"申诉中"),2===(null==t?void 0:t.appeal_status)&&b.a.createElement("span",{className:"tag-style bg-grey-ede c-light-black ml10"},"申诉已撤销"),3===(null==t?void 0:t.appeal_status)&&b.a.createElement("span",{className:"tag-style bg-blue ml10"},"申诉成功"),4===(null==t?void 0:t.appeal_status)&&b.a.createElement("span",{className:"tag-style bg-grey-ede c-light-black ml10"},"申诉被拒绝"),5===(null==t?void 0:t.appeal_status)&&b.a.createElement("span",{className:"tag-style bg-grey-ede c-light-black ml10"},"申诉失败")),b.a.createElement(l.a,null,1===(null==t?void 0:t.appeal_status)&&t.can_appeal&&b.a.createElement("span",{onClick:function(){var t;p.a.confirm({title:b.a.createElement("div",null,"撤销申诉后,无法再对本评阅记录进行申诉",b.a.createElement("br",null),"是否确认撤销申诉"),onOk:(t=Object(h.a)(v.a.mark((function t(){return v.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Jt();case 1:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})},className:"c-blue current"},"撤销申诉"),1===(null==t?void 0:t.appeal_status)&&Object(z.c)()&&b.a.createElement("span",{onClick:function(){var e;p.a.confirm({title:b.a.createElement("div",null,"此匿评成绩将被废弃,评阅人的作品将被违规扣分",b.a.createElement("br",null),"是否确认接受申诉"),onOk:(e=Object(h.a)(v.a.mark((function e(){var i;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(w.a)("/api/student_works/".concat(lt.userId,"/deal_appeal_score.json"),{method:"post",body:{score_id:t.score_id,status:3}});case 2:0===(null==(i=e.sent)?void 0:i.status)&&Jt();case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},className:"c-red current"},"接受申诉"),1===(null==t?void 0:t.appeal_status)&&Object(z.c)()&&b.a.createElement("span",{onClick:function(){var e;p.a.confirm({title:b.a.createElement("div",null,"此匿评成绩将被认为合理",b.a.createElement("br",null),"是否确认拒绝申诉"),onOk:(e=Object(h.a)(v.a.mark((function e(){var i;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(w.a)("/api/student_works/".concat(lt.userId,"/deal_appeal_score.json"),{method:"post",body:{score_id:t.score_id,status:4}});case 2:0===(null==(i=e.sent)?void 0:i.status)&&Jt();case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},className:"c-light-black current ml10"},"拒绝申诉"))),b.a.createElement(_.a,{value:null==t?void 0:t.appeal_info.content})),b.a.createElement(l.a,null))))),t.journals.map((function(e,i){var n,a,c,d;return b.a.createElement("aside",{key:i},b.a.createElement(o.a,{key:i},b.a.createElement(l.a,{span:24},b.a.createElement(o.a,null,b.a.createElement(l.a,{flex:"50px"},"--"===(null==e||null===(n=e.user_info)||void 0===n?void 0:n.user_image_url)&&b.a.createElement("img",{className:F.a.headpic,width:"40",src:V.b}),"--"!==(null==e||null===(a=e.user_info)||void 0===a?void 0:a.user_image_url)&&b.a.createElement("img",{className:F.a.headpic,width:"40",src:"".concat(O.a.IMG_SERVER,"/images/").concat(null==e||null===(c=e.user_info)||void 0===c?void 0:c.user_image_url)})),b.a.createElement(l.a,{flex:"1"},null==e||null===(d=e.user_info)||void 0===d?void 0:d.user_name,b.a.createElement("span",{className:"c-light-black ml10"},R()(null==e?void 0:e.time).format("YYYY-MM-DD HH:mm")),b.a.createElement(_.a,{value:e.content})),b.a.createElement(l.a,null,(null==e?void 0:e.can_delete)&&b.a.createElement(r.a,{title:"删除"},b.a.createElement(A.a,{className:"current c-light-black",onClick:function(){var t,i;t=e,At.confirm({title:"是否确认删除?",onOk:(i=Object(h.a)(v.a.mark((function e(){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ot({type:"shixunHomeworks/deleteReply",payload:{object_id:t.id,object_type:"journals_for_message"}});case 2:0===e.sent.status&&(u.b.success("删除成功"),Jt());case 4:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})})}})))))),i!==t.journals.length-1&&b.a.createElement(s.a,null))}))))),St.show&&e===St.active&&b.a.createElement("aside",{className:["bg-white"].join(" ")},b.a.createElement(T.a,{onChange:function(t){vt(t)},height:150,isFocus:!0,watch:!0}),b.a.createElement(o.a,null,b.a.createElement(l.a,{span:24,className:"tr"},b.a.createElement(a.a,{type:"default",size:"large",onClick:Object(h.a)(v.a.mark((function t(){return v.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Et({show:!1,type:0,active:e});case 1:case"end":return t.stop()}}),t)})))},"取消"),b.a.createElement(a.a,{type:"primary",size:"large",className:"ml20",onClick:Object(h.a)(v.a.mark((function i(){var r;return v.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(""!==mt){i.next=4;break}u.b.error("请输入内容"),i.next=14;break;case 4:if(0!==St.type){i.next=10;break}return i.next=7,Object(M.f)({comment:mt,userId:lt.userId,score_id:t.score_id});case 7:r=i.sent,i.next=13;break;case 10:return i.next=12,Object(M.g)({comment:mt,score_id:t.score_id,userId:lt.userId});case 12:r=i.sent;case 13:0===r.status&&(u.b.success("操作成功"),Et({show:!1,type:0,active:e}),Jt());case 14:case"end":return i.stop()}}),i)})))},0===St.type?"回复":"申诉")))))),b.a.createElement(s.a,null))}))))),b.a.createElement(P,null),b.a.createElement(G,null),b.a.createElement(x.a,null),b.a.createElement(p.a,{title:"确认打回重做",visible:_t,destroyOnClose:!0,forceRender:!0,onCancel:function(){jt(!1)},onOk:Object(h.a)(v.a.mark((function t(){var e;return v.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Ht){t.next=3;break}return u.b.info("评语不能为空"),t.abrupt("return");case 3:return t.next=5,Object(w.a)("/api/student_works/".concat(lt.userId,"/redo_modal.json"),{method:"post",body:{comment:Ht,id:lt.userId}});case 5:0===(null==(e=t.sent)?void 0:e.status)&&(u.b.info("打回重做成功"),jt(!1),Jt());case 7:case"end":return t.stop()}}),t)}))),width:700},b.a.createElement("div",{style:{padding:"32px"}},b.a.createElement("span",null,"确认将",null==ht?void 0:ht.author_name,"的作业打回重做吗"),b.a.createElement("div",{style:{marginTop:"20px"}},b.a.createElement("label",null,b.a.createElement("span",{style:{marginRight:"5px",color:"red"}},"*"),"评语:"),b.a.createElement(T.a,{className:F.a.MdEditor,onChange:function(t){return zt(t)},defaultValue:"",height:250})))),xt,b.a.createElement(I.a,{close:!0,data:null==Kt?void 0:Kt.content,type:null==Kt?void 0:Kt.type,onClose:function(){return Qt({content:"",type:""})}}))}))},ji0R: +/*!*******************************************!*\ + !*** ./src/assets/images/icons/douyu.jpg ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/douyu.3e6df9ee.jpg"},kPWJ: +/*!****************************************!*\ + !*** ./src/assets/images/question.gif ***! + \****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/question.cb52bef9.gif"},kPYp: +/*!******************************************!*\ + !*** ./src/assets/images/icons/zoom.png ***! + \******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF8AAAAUCAYAAADr0+FaAAANEklEQVRYR8WZe5RX1XXHP/vce3/zHoaXgFp5DQyOQLRgUTEtDW1qYyVmZUGNklRdiRpKE3lHfPyc4TngIBgfC0wx1ixt1NRWal2kotbE2lbRiCIISBCGhzDAvGd+87v37K5z5zfDzMCM46pr9fw1a+45+5zz3fvs/d3fn4yr1F8Do0UIUb74UFR8Gm3IO/Wf8MThat7mOYnaDZUmNUF/htpWLlePK4xwCcoQICHQbOGoKDuM4U1p5r0Px1DNrDPrezzQs+qNPUh/o4xXj6tRJhlhGEqeQNrCCYXdGvGfFt5JNHLoozJp7WyvdI0OtR4LEK7CstUIWyJLTSRcLfCnvlAiUKSgCEfV8o6NeMVE/G53itOUiXX3Sxcx2ov4qhG+qjBWoFChWYUqIt6VgFeblR0H5lEL0oGyjKvU1yHezPviyHdZ0Ro180basvD398n77svIFTokK5vrgW8LTELJRwgA6bTSHcaBckot/yWGX2YZtv5untT0dJ7SpOZrAX9mLTeIYarAIIQEYLrZTQNNFj7A8rx6/GrPfDncPmdihV6Y9nkA+Ot4nrIXaDSGElH6KfjdzpBSpVo8ttVU8Xitx/7hw/imWmYD4wXy6Iqjje9mOGYj/uX0bjYf/5nsaLcpY9fqDZ5hNTD8/wi+27bB+CzfOVcqSiq0BMPdRpiBUNANmHNvJUQo1ZFls0lTuXupnOw+0UVamMsCz+eHCuf3MWgUjZ3w76kUZQeW8j4iOnadXmCUNQI3xvsIbl7bX70MEdKpFLutcCA7iz/BxvfrfY2hNVXDb2v2s/TkU/Lf8SZXrtOcUxFfF8P1AiNVSYj0aihUGOoCu/vFFVpQlpmQX1iflQg3dMxxR1OaVHERfUIglXFKf6AIIbs97SnUq7I5VFZ+skiOt+NwSVIHpAu4wwgLBAZ04COkUGoytusEAhUGi9APyO+UTlWVfyPkrt0/kQ8y4FcI3NQF6zYnNAEn1VKtQuAJg1XiPRPOnnggFmwmicTIC/VqOa5wCiFHhCFGGGAtnkNUBGyaLVGKJXvvZXe8ZlpS/UP5DAh8cgPt8nTP8n+LZbS7vIHpdH2WzcBzUZp1njCTgB/HacYNQxS1sluFF4zwmgpHEpa09ckOleGkuUaEa70sRmrU4fgGG7L8VBOPnCiThgvXaU5ByE14rAGcwxA/vsxha3lJPF4ylv0mpCVKYBCGRRFXm5BvedlMcEEVgyY0hSHP+nn8XZiin1G6gu+At3watfC0l8MWIk5GBs+0UhxZbvSyuM545Gvn+ijYsIU9GvKkyeLVIOBUypIwKSbSyt94RUxHCeIgMNRFEauaDBt6fSrdkS+p0MnisUpgGtIlH7rc9nOU8pQyPmF4XGBY5v2G6RRvtp7irkFjeGf7bYTuyXfYVpUhi8gtLOCaoJA1KKPaL2aVHXjM+XievFm6Ti+JlE0GrupIDMqRps+4z6vh+f3DqHcF8MyZVSbdhl9lKCm8gBVBPn+pNq43qHBSlTujgNeDkJUo3+3Iw9BYF3F3i7K5eonUd9hLqhm2lz/IG8OaYADflgjPndMBGHkcqD3B4mMn+Gc2iaszbSOpZtDbFBdN4uFgINOJMAqOjGxLW77bJ/BHJDU7kcfXjOEeEa7s9NzdM65WeNK0sC5dQGjSrPDgB+1zVNiRqmbh7wO2dQWnm2tv0+C8Zq7rfxkbjOEC3AsQmtSyYnc9q8cW8kMDSYHB7saqHGs+xvLgQ36272VJ9Zajh92ukwtH8JCXxxWajvFSC1sjZYEPC0W4pT3RG3jj0xQ/qF8qe86ymVRTbLg2KOQxLBdkvkdWeLoR7qyaL6fOWqMqI+9jZvYAHsEyKP7eVtj//HPBn5bU7CP9uN4oi4GvSFdGcRhhgybYvHuunByzXqd4IZtEmNi2BzZSklrPQ/vKpK43gOJvEzWvZDZrvYCb1ZIDhBZeyE3xt01ZrDRwc5zqhCiyPNtaxZwD63tmRe37jbhZs/1i5iQKSGpIYeZs+7HcKYYZwPfb50bwSK2l/LNOtabzuUet0TGB4VdGmJD5f0qFiro6Ko7cL65OnDVcxjA+zwDFmY9H/TY62/OYuFbzQphthXIRzus8U4kLy10DhGfemi8u3zOuUv9K4Km4gLaF14kIbty7SF75XOAzE0rW6iwxPBxHOFiUt0Plx77HvSjXZiLntI0o/3iJrO+bXZWSCibh8QsjlMRnE06IZYWjiEgb+CLo6RQrm1t4oKbs3E4dnNSh/fLYkvCZHNtRmppDysOAh6oyOHQ/0+i1Ot6HZzyPS1TjunvcRFzVI/gZjn6rKPORzHNps+ro4A6F5aaef+1oXFSl9EFmqvIEkBunBstea5i9Z778T99AgnFr1dWTp0S4sO1u7ETj1LCItiLvEu1RQn6ya7H8Q5/tJnWEzecFz+PSDPtxKWIdMMJFvkNEDHq4iuU1dVSySWrPZXvkeh2SHfEi8EfGQBTRWFdLecLw0IEyaTnXmovX6ng1PC3CeNeuifCZCeP+5OxRXKEXGp95hrgouAjsGBZ+KxHLTCOvd+0YVUrXMUMVB0j70z4cRty0b7H8R19BKqnUGQY20kZnXU1511rm+R5LFa7J2KmOQpJ7lsijfbU7brVOwOcfRSiNIxaqjbBaLeNc5HeAf5DlNQ1fAPyQxoY6yv0vA/xxq3QEAcvFMCumR2eG476vRsKCPQvY0blNbp9y8Xr9YxvyhBFGZS4YRSFzCot4YvvtnVhAT4hN0mDsDSz1PRaoUuCYgcLWAO4IYbXAdzLNTGgtmz5exNxzneMs80n1i7P4TpDLOokY5KiWKlXAYhG+1iXyPw/8FTokO7tT5H8p4CfVlBbyFassFeE6IKvTJRqt5QVfWLVzoXzUE3bOcZpgjYGZmfTgmpBt0UkW71vJe70CNVO9QZbLBl7J3xufCY7tZJq29UPrufdIAYtNG1j9XEqzyq7mwyw+eIiXO2tJ5zrbebfoqKIxVPr5zNB03AOoVd6KWpkbJJwDubXPkf9lgz9powaNdUw1HveqMrUz8Erc6W0OI9bvW8T+Lhy9+003alDcyPd8pVKIu0uHU2O6medaPmP5oZ/KJ+d03DT1i6cy2eSzzE8wTV0P4agS7DeWH+1aJC+VPKhTRXlUNMOkhEhb2d58jLsPHuYNnusqmrXvM2i2DisazeKgkFsRCp1dFRpUWGYifolQDnzv/wV8p5XYfP5CPMpRLu0GzlGrrB9g+Gltbdwc9Dhyzke3HyEqzmKgn2CDSCxWuShzmk86XcvrErDR+vxGsqhNnESbwHiFDJYGvi4+3w8KmEK6Q/azqjzWYLjP8efipBb6eSwQj6XtnbVJQNTEzqiVjZ7PlpYWjuWCbR2ImFYKwkamGMstWf3jBivXVW91+lHIG4W5zKxpJbu9w+0r+CPW6NBcjxcVLo8Lbl/TjvCMmFjRPVNwix/Q0kDiAuc6xy6qoAqHULaKpVGlZ9WzLQtwysLbrR5vZaco1SDO0a6ixzbFgLUcUdhllE+d5OpSiIXhpq0IDnShHrMkSClsM5YluxbJh7HHVWXCaka2BpQb4Vsxo2pr192C084uzq5y2mk7GEaIk4SFi1xHlUmDroC/Z5V79iyUlztrOw58l45OVbMsFbLudEUPbGeFDsnJjsFvYzt9Bf9cbKe0Ui8DnlYY1z2sXcETzfSavdMKB0OI4/7C42EtD5tcLhef+w1c0U0DcpYcXXUauYOus8Mdns1W2eIpy3Y18FGXrjipZmzAMLIoM4ZZQqwmdh7Oaltv3E0id1lMlR1hRJnk8PK+H0mqu7DmHBDB4vw6HtneQ8N06YNalIp4HmF6X8EfV6ljRfk5EmNxJvIdn09ksdYIs7oV2d7h7uGrhUOEzP14ibzoNgXmC3wjQx3dbwZdwM6YcbHpNJFDKjxr4dHOunv3rcY9rANNC7dbR4WFkbhIP7ddFxSxTK3Cr0nzgFMz2+05Su37saTsWJRVS5VnuHnnAnmtp8vPnKne+1NY4jlZwtDfWpob6ijzhQ098fyLVmn/bJ97PMPtQJ5r8Dxck5VUMyqXP0wEzEHjNFHQR438rPPZtuyiKpTtmsdjrji7SGmJmBJrGYZSlIsyfYD7oaJVlVqEAwbejSJeafR5t6dOsfOGTuXMTTHeBExHmCzCaDTurLPEFWOlXqFKlI+s8prfwG92lnXVXkoq9HwTcD/KdSp8mGrmyVSaf+pJJmjff/gKHZaTxR3G8E1rKWyoY4MvbOwJfIdIcSUX+8Ic1yg6yT6Eb7Q1Wc4BORRk+RQZQ2DD3n8Y+Lwn4edT/cEcOd0xL6nmyn5knWghPzuL7JQQJMC0umjzafUbaG5J0XigjFSfeHuHYZXSJIH0Iz+VJtczBL6H58pLZAhTaVqKCmnYfoSWc4l6Tko/nscg8clvMtQPyOFUn/oRVCauJZcs+jeHJFLHOX1wFTW9MkEnyg0kP2EpitJ4+YVU/S8v1xqrW4H9MAAAAABJRU5ErkJggg=="},kSUc: +/*!***************************************************!*\ + !*** ./src/components/markdown-editor/index.less ***! + \***************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){},"kaH+": +/*!************************************************!*\ + !*** ./src/components/image-preview/index.tsx ***! + \************************************************/ +/*! exports provided: default */ +/*! 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(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),a=i(/*! react */"q1tI"),s=i.n(a),o=i(/*! ./index.less?modules */"XFxt"),l=i.n(o),c=i(/*! @/components/mediator */"dhSg"),u=i(/*! @ant-design/icons */"rLCj"),h=i(/*! @ant-design/icons */"dF/Y"),d=i(/*! @ant-design/icons */"4i/N");e.a=function(){var t=Object(a.useState)(""),e=Object(n.a)(t,2),i=e[0],o=e[1],f=Object(a.useState)(0),p=Object(n.a)(f,2),g=p[0],m=p[1],v=Object(a.useRef)("");function y(t){27==t.keyCode&&v.current&&b()}function b(){document.body.style.overflow="auto",o("")}return Object(a.useEffect)((function(){return c.a.subscribe("preview-image",(function(t){o(t),document.body.style.overflow="hidden"}))}),[]),Object(a.useEffect)((function(){return document.addEventListener("keydown",y),function(){document.removeEventListener("keydown",y)}}),[]),Object(a.useEffect)((function(){v.current=i}),[i]),s.a.createElement(a.Fragment,null,i?s.a.createElement("div",{className:l.a["image-preview-container"]},s.a.createElement("div",{className:l.a["button-group"]},s.a.createElement(r.a,{onClick:function(){m(g+90)}},"旋转",s.a.createElement(u.a,null)),s.a.createElement(r.a,{href:i},"下载",s.a.createElement(h.a,null)),s.a.createElement(r.a,{onClick:b},"关闭",s.a.createElement(d.a,null))),s.a.createElement("div",{className:l.a["preview-wrp-group"]},s.a.createElement("img",{className:l.a["image-preview"],src:i,alt:"预览大图",style:{transform:"rotate(".concat(g,"deg)")}}))):null)}},l2Kq: +/*!***********************************************!*\ + !*** ./src/assets/images/forums/match_ad.jpg ***! + \***********************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/match_ad.24dc22fd.jpg"},lZu9: +/*!***********************************************************!*\ + !*** ./node_modules/codemirror/mode/markdown/markdown.js ***! + \***********************************************************/ +/*! no static exports found */ +/*! 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 a={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 s in a)a.hasOwnProperty(s)&&i.tokenTypeOverrides[s]&&(a[s]=i.tokenTypeOverrides[s]);var o=/^([*\-_])(?:\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==S){var i=n;if(!i){var a=t.innerMode(r,e.htmlState);i="xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText}i&&(e.f=A,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 s,d=r.column()===n.indentation,g=!(s=n.prevLine.stream)||!/\S/.test(s.string),v=n.indentedCode,y=n.prevLine.hr,b=!1!==n.list,S=(n.listStack[n.listStack.length-1]||0)+3;n.indentedCode=!1;var k=n.indentation;if(null===n.indentationDiff&&(n.indentationDiff=n.indentation,b)){for(n.list=null;k=4&&(v||n.prevLine.fencedCodeEnd||n.prevLine.header||g))return r.skipToEnd(),n.indentedCode=!0,a.code;if(r.eatSpace())return null;if(d&&n.indentation<=S&&(w=r.match(u))&&w[1].length<=6)return n.quote=0,n.header=w[1].length,n.thisLine.header=!0,i.highlightFormatting&&(n.formatting="header"),n.f=n.inline,C(n);if(n.indentation<=S&&r.eat(">"))return n.quote=d?1:n.quote+1,i.highlightFormatting&&(n.formatting="quote"),r.eatSpace(),C(n);if(!x&&!n.setext&&d&&n.indentation<=S&&(w=r.match(l))){var T=w[1]?"ol":"ul";return n.indentation=k+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-"+T]),C(n)}return d&&n.indentation<=S&&(w=r.match(f,!0))?(n.quote=0,n.fencedEndRE=new RegExp(w[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}(w[2]||i.fencedCodeBlockDefaultMode),n.localMode&&(n.localState=t.startState(n.localMode)),n.f=n.block=E,i.highlightFormatting&&(n.formatting="code-block"),n.code=-1,C(n)):n.setext||!(A&&b||n.quote||!1!==n.list||n.code||x||p.test(r.string))&&(w=r.lookAhead(1))&&(w=w.match(h))?(n.setext?(n.header=n.setext,n.setext=0,r.skipToEnd(),i.highlightFormatting&&(n.formatting="header")):(n.header="="==w[0].charAt(0)?1:2,n.setext=n.header),n.thisLine.header=!0,n.f=n.inline,C(n)):x?(r.skipToEnd(),n.hr=!0,n.thisLine.hr=!0,a.hr):"["===r.peek()?m(r,n,L):m(r,n,n.inline)}function S(e,i){var a=r.token(e,i.htmlState);if(!n){var s=t.innerMode(r,i.htmlState);("xml"==s.mode.name&&null===s.state.tagStart&&!s.state.context&&s.state.tokenize.isInText||i.md_inside&&e.current().indexOf(">")>-1)&&(i.f=A,i.block=b,i.htmlState=null)}return a}function E(t,e){var r,n=e.listStack[e.listStack.length-1]||0,s=e.indentation=t.quote?e.push(a.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(a.linkHref,"url"):(t.strong&&e.push(a.strong),t.em&&e.push(a.em),t.strikethrough&&e.push(a.strikethrough),t.emoji&&e.push(a.emoji),t.linkText&&e.push(a.linkText),t.code&&e.push(a.code),t.image&&e.push(a.image),t.imageAltText&&e.push(a.imageAltText,"link"),t.imageMarker&&e.push(a.imageMarker)),t.header&&e.push(a.header,a.header+"-"+t.header),t.quote&&(e.push(a.quote),!i.maxBlockquoteDepth||i.maxBlockquoteDepth>=t.quote?e.push(a.quote+"-"+t.quote):e.push(a.quote+"-"+i.maxBlockquoteDepth)),!1!==t.list){var n=(t.listStack.length-1)%3;n?1===n?e.push(a.list2):e.push(a.list3):e.push(a.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 k(t,e){if(t.match(d,!0))return C(e)}function A(e,n){var s=n.text(e,n);if(void 0!==s)return s;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 o=e.next();if(n.linkTitle){n.linkTitle=!1;var l=o;"("===o&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(e.match(new RegExp(u),!0))return a.linkHref}if("`"===o){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("\\"===o&&(e.next(),i.highlightFormatting)){var p=C(n),m=a.formatting+"-escape";return p?p+" "+m:m}if("!"===o&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return n.imageMarker=!0,n.image=!0,i.highlightFormatting&&(n.formatting="image"),C(n);if("["===o&&n.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return n.imageMarker=!1,n.imageAltText=!0,i.highlightFormatting&&(n.formatting="image"),C(n);if("]"===o&&n.imageAltText){i.highlightFormatting&&(n.formatting="image");var p=C(n);return n.imageAltText=!1,n.image=!1,n.inline=n.f=w,p}if("["===o&&!n.image)return n.linkText&&e.match(/^.*?\]/)||(n.linkText=!0,i.highlightFormatting&&(n.formatting="link")),C(n);if("]"===o&&n.linkText){i.highlightFormatting&&(n.formatting="link");var p=C(n);return n.linkText=!1,n.inline=n.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?w:A,p}if("<"===o&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=x,i.highlightFormatting&&(n.formatting="link"),(p=C(n))?p+=" ":p="",p+a.linkInline;if("<"===o&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=x,i.highlightFormatting&&(n.formatting="link"),(p=C(n))?p+=" ":p="",p+a.linkEmail;if(i.xml&&"<"===o&&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,S)}if(i.xml&&"<"===o&&e.match(/^\/\w*?>/))return n.md_inside=!1,"tag";if("*"===o||"_"===o){for(var E=1,k=1==e.pos?" ":e.string.charAt(e.pos-2);E<3&&e.eat(o);)E++;var T=e.peek()||" ",L=!/\s/.test(T)&&(!g.test(T)||/\s/.test(k)||g.test(k)),I=!/\s/.test(k)&&(!g.test(k)||/\s/.test(T)||g.test(T)),D=null,R=null;if(E%2&&(n.em||!L||"*"!==o&&I&&!g.test(k)?n.em!=o||!I||"*"!==o&&L&&!g.test(T)||(D=!1):D=!0),E>1&&(n.strong||!L||"*"!==o&&I&&!g.test(k)?n.strong!=o||!I||"*"!==o&&L&&!g.test(T)||(R=!1):R=!0),null!=R||null!=D)return i.highlightFormatting&&(n.formatting=null==D?"strong":null==R?"em":"strong em"),!0===D&&(n.em=o),!0===R&&(n.strong=o),f=C(n),!1===D&&(n.em=!1),!1===R&&(n.strong=!1),f}else if(" "===o&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return C(n);e.backUp(1)}if(i.strikethrough)if("~"===o&&e.eatWhile(o)){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(" "===o&&e.match(/^~~/,!0)){if(" "===e.peek())return C(n);e.backUp(2)}if(i.emoji&&":"===o&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){n.emoji=!0,i.highlightFormatting&&(n.formatting="emoji");var O=C(n);return n.emoji=!1,O}return" "===o&&(e.match(/^ +$/,!1)?n.trailingSpace++:n.trailingSpace&&(n.trailingSpaceNewLine=!0)),C(n)}function x(t,e){if(">"===t.next()){e.f=e.inline=A,i.highlightFormatting&&(e.formatting="link");var r=C(e);return r?r+=" ":r="",r+a.linkInline}return t.match(/^[^>]+/,!0),a.linkInline}function w(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=A,i.highlightFormatting&&(e.formatting="link-string");var n=C(e);return e.linkHref=!1,n}return t.match(T[r]),e.linkHref=!0,C(e)}),i.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,C(e)):"error"}var T={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function L(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=I,t.next(),i.highlightFormatting&&(e.formatting="link"),e.linkText=!0,C(e)):m(t,e,A)}function I(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=D,i.highlightFormatting&&(e.formatting="link");var r=C(e);return e.linkText=!1,r}return t.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function D(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=A,a.linkHref+" url")}var R={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:A,text:k,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!=S)){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==S?{state:t.htmlState,mode:r}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:R}},indent:function(e,i,n){return e.block==S&&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 R}),"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")}(i(/*! ../../lib/codemirror */"VrN/"),i(/*! ../xml/xml */"1eCo"),i(/*! ../meta */"8EBN"))},lzim: +/*!********************************************!*\ + !*** ./src/components/ImagesIcon/index.ts ***! + \********************************************/ +/*! exports provided: qrCode, searchIcon, search1Icon, noDataIcon, smallProgramIcon, anonyIcon, errIcon, chromeIcon, firefoxIcon, exportExerciseTemplate, txLiveIcon, blibliIcon, douyuIcon, weibaitongIcon, zoomIcon, groups1Icon, groups2Icon, groups3Icon, matchAdIcon, hbIcon, lockcloseIcon, teacherQQIcon, emptyIcon, charpterWhiteIcon, mainbannerBg, certificateIcon, chooseIcon, emptyIcon2, repositoryNoneDataIcon, questionIcon, noticeIcon, qrCodeIcon, done1Icon, done2Icon, done3Icon, UserQrCode */ +/*! exports used: UserQrCode, anonyIcon, blibliIcon, certificateIcon, charpterWhiteIcon, chooseIcon, chromeIcon, done1Icon, done2Icon, done3Icon, douyuIcon, emptyIcon, emptyIcon2, errIcon, exportExerciseTemplate, firefoxIcon, hbIcon, lockcloseIcon, mainbannerBg, noDataIcon, noticeIcon, qrCode, qrCodeIcon, questionIcon, repositoryNoneDataIcon, search1Icon, searchIcon, smallProgramIcon, teacherQQIcon, txLiveIcon, weibaitongIcon, zoomIcon */function(t,e,i){"use strict";var r=i(/*! @/assets/images/icons/search.png */"E7E6"),n=i.n(r);i.d(e,"A",(function(){return n.a}));var a=i(/*! @/assets/images/icons/search1.png */"/GNS"),s=i.n(a);i.d(e,"z",(function(){return s.a}));var o=i(/*! @/assets/images/icons/nodata.png */"FOrL"),l=i.n(o);i.d(e,"t",(function(){return l.a}));var c=i(/*! @/assets/images/classrooms/small_program.png */"HpTS"),u=i.n(c);i.d(e,"B",(function(){return u.a}));var h=i(/*! @/assets/images/icons/anony.png */"tWlo"),d=i.n(h);i.d(e,"b",(function(){return d.a}));var f=i(/*! @/assets/images/classrooms/err.png */"7ZXX"),p=i.n(f);i.d(e,"n",(function(){return p.a}));var g=i(/*! @/assets/images/icons/chrome.png */"GABl"),m=i.n(g);i.d(e,"g",(function(){return m.a}));var v=i(/*! @/assets/images/icons/firefox.png */"onxn"),y=i.n(v);i.d(e,"p",(function(){return y.a}));var b=i(/*! @/assets/images/classrooms/export_exercise-template.png */"nKGa"),S=i.n(b);i.d(e,"o",(function(){return S.a}));var E=i(/*! @/assets/images/icons/tx-live.png */"4qgm"),C=i.n(E);i.d(e,"D",(function(){return C.a}));var k=i(/*! @/assets/images/icons/blibli.png */"JeFH"),A=i.n(k);i.d(e,"c",(function(){return A.a}));var x=i(/*! @/assets/images/icons/douyu.jpg */"ji0R"),w=i.n(x);i.d(e,"k",(function(){return w.a}));var T=i(/*! @/assets/images/icons/weibaitong.png */"W6BS"),L=i.n(T);i.d(e,"E",(function(){return L.a}));var I=i(/*! @/assets/images/icons/zoom.png */"kPYp"),D=i.n(I);i.d(e,"F",(function(){return D.a}));i(/*! @/assets/images/icons/groups1.png */"nukY"),i(/*! @/assets/images/icons/groups2.png */"4u4S"),i(/*! @/assets/images/icons/groups3.png */"yslc"),i(/*! @/assets/images/forums/match_ad.jpg */"l2Kq");var R=i(/*! @/assets/images/hb.png */"RMFE"),O=i.n(R);i.d(e,"q",(function(){return O.a}));var M=i(/*! @/assets/images/icons/lockclose.svg */"TGq3"),N=i.n(M);i.d(e,"r",(function(){return N.a}));var P=i(/*! @/assets/images/teacherQQ.png */"SMhR"),B=i.n(P);i.d(e,"C",(function(){return B.a}));var F=i(/*! @/assets/images/empty.png */"8/bI"),_=i.n(F);i.d(e,"l",(function(){return _.a}));var j=i(/*! @/assets/images/icons/charpter-white.svg */"JWDV"),U=i.n(j);i.d(e,"e",(function(){return U.a}));var G=i(/*! @/assets/images/banner/mainbanner.jpg */"Xsq0"),H=i.n(G);i.d(e,"s",(function(){return H.a}));var z=i(/*! @/assets/images/certificate.jpg */"Ohmc"),V=i.n(z);i.d(e,"d",(function(){return V.a}));var W=i(/*! @/assets/images/icons/choose.svg */"csWT"),K=i.n(W);i.d(e,"f",(function(){return K.a}));var Q=i(/*! @/assets/images/empty2.png */"7v3h"),Y=i.n(Q);i.d(e,"m",(function(){return Y.a}));var J=i(/*! @/assets/images/RepositoryNoneData.png */"cRFk"),q=i.n(J);i.d(e,"y",(function(){return q.a}));var Z=i(/*! @/assets/images/question.gif */"kPWJ"),X=i.n(Z);i.d(e,"x",(function(){return X.a}));var $=i(/*! @/assets/images/notice.gif */"qgvg"),tt=i.n($);i.d(e,"u",(function(){return tt.a}));var et=i(/*! @/assets/images/qrCode.png */"FPkq"),it=i.n(et);i.d(e,"w",(function(){return it.a}));var rt=i(/*! @/assets/images/icons/done1.png */"A/g1"),nt=i.n(rt);i.d(e,"h",(function(){return nt.a}));var at=i(/*! @/assets/images/icons/done2.png */"Nmxd"),st=i.n(at);i.d(e,"i",(function(){return st.a}));var ot=i(/*! @/assets/images/icons/done3.png */"5D2P"),lt=i.n(ot);i.d(e,"j",(function(){return lt.a}));var ct=i(/*! @/assets/images/icons/qrCode.png */"djh8"),ut=i.n(ct);i.d(e,"v",(function(){return ut.a}));var ht=i(/*! @/assets/images/user/qrcode.png */"Jq4h"),dt=i.n(ht);i.d(e,"a",(function(){return dt.a}))},nKGa: +/*!*******************************************************************!*\ + !*** ./src/assets/images/classrooms/export_exercise-template.png ***! + \*******************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports=i.p+"static/export_exercise-template.f7655c19.png"},nukY: +/*!*********************************************!*\ + !*** ./src/assets/images/icons/groups1.png ***! + \*********************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAMkklEQVR4Xu2dWWwcSRnHv7Yd577v+74vkgWEQCAEy6IVWuCB62GVICFIYkcsvMC+LW8LL7BIiTiEhCweInjgPrRCC2KBJTBVYzm24yRO4ty3kziJj9ie+tC/d9oaT2b67ume7irJsjdbVf19X/266quvjjaEEG8w8yukk7ZAii1gMHODEOK3RPRSivXUqmXcAgb07+jomDk2NvYPZn4u4/bQ6qfUAiboSEKI5cz8XyJanVJdtVoZtsAE6EXYdzPzv4hoToZtolVPoQUmgV6E/QVm/hMRNaVQX61SRi3wDOiwg5Tya0qpn2TUJlrtFFqgIujFnv27zPztFOqsVcqgBaqCzsyGlPJXzPy5DNpFq5wyC1QFHXr29fVN6+/v/zszfyBlemt1MmYBW9Bhi3w+v7hQKJwkog0Zs41WN0UWcAS96K9vI6J3mHl+inTXqmTIAq5Ahz1yudxHDcN4k5mbM2QfrWpKLOAa9CLsB4ioLSW6azUyZAFPoBdh/w4RvZYhG2lVU2ABz6AXYf8FEb2cAv21ChmxgC/Qu7q6moeHh/9KRB/JiJ20mnVuAV+gQ+fu7u4FQ0ND/yGiLXVuAy1+BizgG/Ri2HEjEZ1k5kUZsJVWsY4tEAh06N3e3v7B8fHxt4hoWh3bIRbRm5qaaHx83NOzDcMg/DCz+RNlamhoMKtXSkX5mJrUHRh0SCml/CIzn8D+mJpInYKHNDY20p49e2hoaIguX75MIyMjrrRatWoVLVu2jJ48eUJnzpxxVcZPpunTp9POnTvNot3d3TQ8POynmsSUCQ1MIcSrzPx6YjSrIMiSJUvM3jCK9PTpU3r48KHrqhcvXkxr166lQqFAp06dMn+7SRp0N1Z6Nk+orS6E+Bkzf8WfKNGX2rdvH6EnjSINDAxQb2+v66p37NhBM2bMoNu3b9PVq1ddl9OguzbVpIyhgs7MTUKIvxDR8/7EibbU1q1byfI7w3pSc3MzTZkyhbyADsABOnzsrq4uwmhgJYw406ZVn+4sXbqUFi1aZLo8fX19VdUYHR2dNEqsWbOG5sxxf0ISckydOtWsH/J5mQ88ePCArl+/HpaJQ6knVNAhkRBiLjP/m4jedfBSntatW2eC5wV0QAc3CkBcuHBhkoWslyCo2S5dukT37t2bqGbTpk00b968oNW6Ko/n4vlJSqGDDuXy+fza4tbeZUlSNgpZvIKOSMvu3btNF+rs2bP0+PHjmoA+e/Zsc+RxmzBSwU1CunbtGmGEcJswAgwODrrNXpN8kYBehP29SincFTOjJprE9BCvoK9evZrgfgBwgG4lRDkA4/37923dhJUrV5qjAUA6d+5cVa0REvTibpRXpKMuHoDK5XKfMQzj17gNzEOxSLMi2oFGBCj9/f2Bn+UFdPSSu3btMiM/PT09pp9tpS1btpg+NEC/ePFiVbn0ZNRfk0XWo1viSCm/oZT6gT/xwi+1ceNGmj9/vum/huFHegHdylv+bPTkmCijF8bk1M5NCAo63Be87E4JLhZGDqQ7d+64WtiCXl5cHCcZwvz/kYMOYXO53DEiag1TcL91xQU6IilYgLFgHhsbM1VA775t2zaaOXMm3bp1y/SH7VJQ0MOa7FaSsdKcw287hV2uJqAzc6OU8nfM/KmwFfBaXxygoxcFzAjXwWXCD/4G/HBnADu2AnR2dpohQfw33KtKCf79woULzZXKauFF9KrVthaUgo4Frmp+PCbLVjjy0aNHtgtaGCGRMg86jNDV1TVreHj4bSLa5xXOMPPHBfrevXtt1cA2gLt375p58BIgMuM3YVTA6FAplYLe0dFB1shSntftZBTrEvv379eglxown8+vKBQKuMj03bhVDMkCHT1ntUb2IhZ6a/R+TnF0PBe9J0Jv2NeC3wsWLJiIoGByaiUNupcWcJe3Jq5LGex7C4XCP4lotjsRw81lgR5ureQIeqUec/v27aabgs1Z5XHnICu4drsNdY8edsvb1CelfEkp9fsaPnLiURboiGNbrkIYcmB0KF/8sasXkGMC6nWvS1BZNehBLeihvJTy+0qpb3ooElrWsH10P4JhQomFI7gwp0+frul+71LQ8aJX6/0RXsSkFwnrDXb75qEPkp6MltAgpXxZKYXD1bGkuEFHL46YOVwWgIF95aUJ/jn8d4AGWb0mLDjZjVQ6vOjVoj7ySymfU0rhQwOxnUaKE3RMXOGyIKRoRUbwN8J41g8gx8QU/46DGV6TUyweMlg9cKW6EfLE5i+EKCEDkvU3wpF2B0TwgpXuxPQqe5T5azYZ7ejoWDI6Oiri/nRMXKADGjwbPTr8eUADuK2tsFYj49/Pnz8/CfQbN244Roiw2one2gl0O5gwiuBFxG/E6LHjEQn77NevX2/G0vESej3+FyXAbuuuCehCCGybe4uZP+xWsKjyRQ06lvkBK8KNpYsxGzZsMMOJ5Qk+MtwX5Ec5q0cs7dGxkOTUU1rbcP2CDlcK+22wHQFbIxAFKj1Kh7g6dMCEG5vJgmwYi6pt7eqtFeg/YubDcShY/swoQUc8HaeYkDDJLN20hYkdXgIAi3/HyiZ+A5xKE8Jago5QJiCGy2KNKJUWjHD0DyMHZMao4/b4XxLaPXLQpZRfVUr9NAnKQoYoQS9d6ClfdbRO77s9UV8r0OGmbN682XSpADDcFMhYbWUULgxeWvjqyOs00iSl3SMFHVdhFAoFfEggMTfwRgn63LlzTWgwrEspfbWxdXgbk0ZrMhqV6zJr1izT98YLCvcJLon1ItptAbBsCF/9ypUr5tbipKfIQC8u96O1E3XKKErQcQ0FdhfCLcEVEW4TelW8JHAdMEHFSincgqhAh4sFOXEEEC9WJVfEDnSUwXFAa7sv3B3s1QljS4Vbm3nNFwnovb29UwcGBt5m5vd7FSjq/NbQiyEXPWWYCfFxTOawwGJ3cBm9NVwFREkANv4uvYYDL0kUoOMZmBDjlJIVOqw2eXWzqQsvCoCHj4/e/ebNm+be9SROVCMBXQjxc2b+cpgQhVXX8uXLzYZGQiMDyqCHBQCFtUEL9QLy0tNL6EFxiAFA46fS2U1MTHFYGr0jRoRSHx2ugdPEzwpVVgIXgANKjDhWOBNgIrpS7S4aN6BDV7ysGCWtemFLAI9DGEkCPnTQhRBfZ+YfhgVm2PWgQRA2C7Jpyk4mDN84JVQKJsAu36aLfPCL4TYAtvKXLcwFoxUrVhB+kAAfXhwsWNm5Gm5BR52wJerHQpQ1MiH2j5+kpFBBx+dfiAjXSSf6q9PwhzHkli/WBGkUAARocRlRpevbcPDCOnQBwJ1GkVLQnfaaQG7499CnUo8OEPFyA2zI5+aEvhfQLbuhDEKQSNjekMoeHVdcKKVEPd2sC5cCvW3Qa+qsfeZhNmzY4UXo6WWy6Ad0C3jY1cnVCtKp+CkbSo8uhJhRvLToPX6E0GUqW8Dy5d0ACrjQcwMwt7F6O7sHuakrie0ZCui5XO4EEX0piQpqmbQFYIHAoOdyuW8R0fe0ObUFkmyBQKBLKT/JzH9O0gVFSTa2li0+C/gGXUq5iZn/p78mHV/j6Se7t4Av0ItXV5zMyo257s2pcybVAp5Bx+dbpJS4T/GzSVVKy6UtUG4Bz6BLKV9TSuHr0TppC9SNBTyBXrwd9zf6o1x1075a0KIFXIMupdyulMItW7FcPKRbTFsgiAVcgd7e3j6vUCggwrI5yMN0WW2BuCzgCDpi5EKIPxLRi3EJqZ+rLRDUAo6gCyFeZ+ZXgz5Il9cWiNMCtqBLKb+glPplnALqZ2sLhGGBqqDn8/m9Sql30v6xrTCMqOtIvgUqgt7T07NwcHAQe8vXJV8FLaG2gLMFngEdX3+WUr7JzB9zLq5zaAvUhwWeAV0I8QYzv1If4msptQXcWWAS6Llc7gARtbkrqnNpC9SPBSZAb29vf9/4+Dg+phXblc71YzYtab1ZwAS9s7Nz6cjICK50ju0jWvVmOC1vfVnAKF7pjPsRP1RfomtptQXcWwB7y3+slDrkvojOqS1QfxZw3AJQfyppibNkgWPHjrGDvsowjMMa9CxRkUJdHUAfNwzjQGtr6wkNegobP0sq2YD+1DCMz7e2tv4B9tCgZ4mKFOpaBfTBxsbGTx85cuRvlsoa9BQ2fpZUqgD6w4aGhhdbWlpwS8VE0qBniYoU6loKumEYdxobG184fPhwR7mqGvQUNn6WVCoB/VpDQ8PzLS0tZyvpr0HPEhUp1LUI+gUi+vjRo0cvV1NRg57Cxs+SSsePH+9qamr6xKFDh27a6a1BzxIVKdS1ra1t4cGDB/udVPs/YIoD4AHLutsAAAAASUVORK5CYII="},onxn: +/*!*********************************************!*\ + !*** ./src/assets/images/icons/firefox.png ***! + \*********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAQFElEQVRoQ71aCXRUVZr+7ttqr6yVPSRASCBIVFBUWgUURZFW7FYa9Xhc2lHWGdM9bYszaqa1tcUFV9RRu3V6etw4DQJqY4MDLUJQEQIYEsieqspW2Wp/9ZY7570ia1VIRXH+cyo59e6/3O/+//3vf/9XBGeR8sr/lipS6QpKyMUApoOiGISmgBIbJZSAwkdA+ihQB0JqCPAVy3K7Op5Z3Hm2pkF+qKKiik/sfV7lF5SSOwF6MSiYiekklBAcIqDvmAzkLy1/WNo7MfmR3N8bUF75fpOInnIK+iClsP2QSQzIEiAIBk8L9uwN7ooLgt9H54QBUUqJo3zHrZTgSVDkfx+jY8lcaqgDJ0awl5S6KGXWezYu+W9CCJ2IjQkByvzXnZNlRXoPlM4dywghBJRhwBACkNPRp1nRpqX/p6CqJq2Cqqr+XSdFgVGg2DRlG85FE7Y6i/Bs6NqvZdZwc9uz1zUnCiouIPrBzaxr9+Eb816v2zygKONXO+apKrZSUEeMcg0AwwAMB8JMaI2iABUFqihC7e0HMQr43YwDuGvqd/B2yni0bn7/X6W5i47J5aUC1K1pL9V5zwQurnXXqmnrKMX8vNdO3aQJp//641ug0D9RUMOgMs0BLBf9aN44C0RlGbKrHVSW8OCsY1hXVg0qq6issStfdOQ+ssrw+VKVKtfnPHvSM2aEjB6gFQuMzjaXi4AazclJOcWR391LqbphiI+AcGwMkDsNO7DCvBNFllYc8J6L273/8b0gamEot7WDhsJ4+JxDWHleva6ntQl0c2PRK/fYv1zESOwjjicPb463v2KW1rWyeIVK1Xc1JSeZ3E+XG35zDUB1PsKwYHgeGOaROVw13nI8jmxr9Chp6MvHPM9boDTB7K1SqH4/wLIgRgMIy4JTJZCudgR8Et77yW5cNrlb193WotLaOn7TvOn9a8KuwIbs3x/77ehViwHkXDntY0rpEo1RDPF0m3AB+b11OViOxSS2B4WcGy7GgXopH4u5SryVXwGek3W9vrAVs5zvIUSNCXtH6eiE4vNH+QkBa7fBEvRg2/kfoaOHxfrm+dh67R6k2RWdpaNeUpSWnu0ZZUk3BI93Xpy98eRXw43FAGpdWdQDihRR5CAGObCciu6kZGSrPeAhg+EU8FYRooVBRnonBENkUN8jrlV4PfjzhMFojHJ7Z9RDo6jQ7MOuqz8GI0r4pCEHN14Y9ZJGx48xvpIMP1V8kj91UuEksvzDKNrTiXSQsW3l9EKZyo2yxCDoF8ALCkxmKZpu4xBhVKQVt8FoD8EXtmCac0vioTagT8twEUlP21pSoOEwVH9AH51u7cFn132mlx5UoWCMrP5cSxQNDcQ9dQrNDhxsvzvj6eq34wNaVTRfVrEn4DOA52UIxkHgY656xsxWCBYR3zpn4drQxgl5ZyxmLQw1kMQg4IXCHfhZWUcMq9QnUc7MyqLb70m7/6ucuIDcq4uuFsPMTm2Q4/XT78zEqMid06DnCNfRPDyl3In3rQvGk5rQON/pxndXvQPeFCdMFJVSFaR/f9tVuRtP7IoJuTdWL69YLH/7aKLHCmeKIGtWiz7BhsqpCPeb4DVYEGSMCDEGeIkZzX6CPRkLcdhaOiEgA8xUkvGY5V3cPts1pnyoumdn+kPfXhMD6G+rrvDOVFsSLjQNSUE4Sty6obovihEJCjFGWwMEp4QcPFbym9gJaftGkvVUDZ4bO6z7G3Fw8fsjxhm5DyqXrD+TOoL9yfft178M+nHL6ut+eYFS++ZEltGYHEB6cZsu0vR1IYI91hhxr92B59hF2Jty0YgxqlJIzS16MtCJZSEUThpxxg0IqIEgjs99EbZhS82Fm6EIGaCMCUpARvCLnsys1452DgL6ZtUFTZlqX8FEAAmWMDJmOnWR9upcBKRS8JmZYA0GRDo7YJ5RisaICTc0XhajVnK69Yw2nBizGVx2ZiwoSvGu4xVcXDSU3tlIGxjZC8lcohe+3kr3kuynqj/VAblWlZSoqlIzETAaLyPIyDmvSRfz+yZDmXH/CBWHGv24o+VCRNSRVYMWZrp34hCbngY2OWlohFJI7jaszjqIh35SO/ickXog+I4jnKotFkH4uKc87d+PPK8DqrnvnA0WhOME+fgQM85pgWCOQFUIvBkPg5jSIPZ78W8n87HNnxdXgVavqZ5uqMEgqBx7NLBJdrCOdF02V2xFyN2LkqR+/M+SL4cB6oPR+w3CyXOhsnaEjvc+rnSJL+uAjq46vzZF9RWPP/1YDrPDi9TJ0TouJBbgSPhnuKlrCeRo+TcuKX1eKJ7Y4pmxmEFMZsy2tOH53C245dvFOHCTfqLoxEQ8MPqOIGKeAtk0Be3HfO8a3L07CS2/xNQa9PgIaPQYTpQIhS27V/8wbPSSpv3NOvX30QVIjEbZ5dYvd2xaKrR9IzW3gkpSDB9jEFCcKWP35e/huf8twK8WDt3zWLEdBv9xyIIDEdu5qK0UD2T2dewl7lXT57QR2xcZSq8pUSysICFtWrteIYym0rrN6KbRdBqPNCBSQ3TfaZlNSwKyM5r6RxPhOORmCTi44G30dipISWcx0IJhRRcM/hNQWTPCyfPwx12Oqhulb+qJc/W08/YyZQcul6oSKpEZXkZGqROsQUbEZ0QkJKCLSQHHS8g2dyGv6dMzrou2Z6SmxG7UhGFgNhOcXKbfZoau8QD4QA34sFO/2ASs83Hb3690bmL+XKUH+r7VlyoFSntCF5i0Ei1cAPexPB2MxHBYWvAHRAiHEtKMWnrmzK8VoFJT/AwXbyVYQtFy24cxQ8a+A2CUaBHbTS/BVftWeLcbX9pD+stnpvqCooeOWVMP6RKsISQVeNBwYCqoEsVfaSvFese9iUarvsqRxkZApYB2WYyzd4YrM3MyTq34a/SRKgKMAVAjMPf+Y5DtSM9CPHBsofQn05+3E+fKaUsppdsTmVFSvgc+jxV97uge0arxzcnzsdGstx4SJqXfCzAMWLMJES38ztCoKrL3Y+/1OwFVAhvphGLMBRd2QggMHZsvVK8A2yurNwpVbxDXyuInVao+mMhsUqe1oeXbfKgyp4MxmiRECI8Pci7BxuAt42a3eDbktg6ogWjoxKOrspx4e9F+ECUAPliPiPUcGPv2g1GjVYa2Fk/sW4E7hEOUIeSfNQ99Fqb8IgMi4x4cyYWdaDk8CRyvwGwdSrPZcxrwlW8WVnieQHhYY2hgggKVcD5biwuEE+hV7NitXIgONTUaRYEANFDxaEnqCUxNjuDBebVgpG4I/mrI5skQ/EPeURQWbYcmR8UJt5A4VxY9U8vm/0ux3Dp2uXvamjW7D+01mbDYIiDMUJzY87phz+lFQDThma478Mfg9RBIBD/lvsQ91q0oSWkAyw1VBIrCYFPHL/B44Jd6X05u17wUBGuzQfH5BrEdvHQjZJKEwgIruHArhEAtVNYIRhmqASNBAzqP50MFQ+0mcyrpXD2zaC+Zcvhi+URsqTxq2QzJAfg67BAMCiglGN6ltWT0w57bA5ZXoltCyzKnfa7IDJQID6oS/TkryPrnmuZXcEQqiXrqdJNRckWrd42ci9dDMJoh2UrAB2rBh1tjHBnw2NDbkIlDaqG47I1dRt3kf629uW6hdHjqePtIO4PkCA+GUIRD2gQBg0kGM8xbnEkEZ5T0LKh95AgHVeJ0MLLM6DIKyyJgMeAJ2y3Yq84eMkspIvWN+neWKOi6dh1UzgbRPgeC5yA4MuS9AaGexgwEu+x4UVlU8/Sbr83QAf1l3c+3XB6pWjYeoBHjFAj4DVBkogPSukMsR4e8RgFF1QAQKArRi1eNGq3ZeCr5VtQKsX1+rfzRyiCN1k/ZhQdKPoDC2NDdkA9HQfXwduDgVNqqChAOG7EC5U9/9Z8rH9CtfLL2p8tmSSe2TAiQ3ncnCAd5SJHxz2TKMnjVcQM+NM8f04zS3QOlt08fPzr/CeSbmxAJGOBzp+il1miSRQ7tVYXYJp5DH7Xeled5+Qa3Dkhrztd+XiNaaGhiBeppC5LEIBLmdW+NJonlsN86E8+lrICXGbtcVMPhwZou19iDo/PXQxF5hPvM0K762hVlNPW7UuF1pWFdeEXfR+88lqKND85g59orj5RKzedO1EvD+ZtIJt4WFiNV9qGdS8XXxhL0MPaEVMqdXVC90T2yvWwj5mXVwHMqG9aMfphTY88pLfG0VxVgu68MIc5Sef8b710yAtDna69cPU1qfiUh62dgOspNwUOWe9DGRM+ZRGmKtw62Xieuzq5Ceckn6D6ZCXNaAAZ7CLwp1jthrwnHvpuBfXIRvcZY+3Tpa1V6n3vQQ7RiAXe409/nUPosiU5iLL4QMaCeycFxbjK+4Gehkp8xpkoGKubKNdjgfwP9ioA8iweqyMKW1acDMaX64yaDzpocrHbdhg227YqBKMvyXju1YwQg7cvuNVfcXyy3nJ32J4AAMeFz4Tzs4mejgclBO5sCCoJ0tR9TVTeWipXIUz2YLrfoffMBsmb1InlSNwLdVljSYvveWqJ49OtbYGZlepehMpyXnZdKKvbop+2IXUwrKpjDHR93OdTeicVLgi6VwUJ7t89ijK4sQ2HP6dGrDm2PhLotetiNpgPVZXi741I8aN0t80R9Pv/VU4P9kJi0VLnm8iU5cvsOAu1Y//8jLZMlF3SBN0ZrRNFnBG8RRxza2utYf3syDjWVoIjV30Z8kzc7aR6579BgYRl30tvXLH7rPLn+7h8bjlZ5mFP9MDt8EMxD13lt4lpb2ZQc0qegnTeyyKOv2QE5FO3OSgzvFjjporyX6qKNwdMU/6UxpWTfmsuOFCrtZT8WKMKqyJkdbfSPpn5nql4XamMamN5GB0TvUK4KE6HbTqS5ma+eahgtO2ZY9fx2TlKtVziZp3Zl/FigUiZ3wOIYWZ/52pLR35oOU6oPtuw+dNdl6QfsAHmYlMZcEpiXsak6tnQY70bWubrUepjkNJTKTbGv8s8SSlOaD5Z0LwhL4XWmQvSa42rWrgf7+Fn7byVVV5KX6mLbTWcKueEa6etz+M+OphwqlZtmnSUME1bjJyb6vOmm8tc3PvrCeMIJZTLt5zBb1i59tUxuvDeRm+14RscbD1IB9Uo6ZnHRfp2XsX4489Ujy8eT08YTAjSg6Plf333p9HDLpzPlpnEvg4kYH83TrZrxcugy7IkU4SnrdszlW6AS5iOzndzu2FAbexmKY2RCgDR5zVsfrFm2YSrc92cqveNe2xMF9pk4HZvFMmQwflxrqMZFXKub49R1+ZtOne5hJaZpwoAG1GpXjhf/YXuxTK37pyLFPZSGErM7JleYCPVGRN7kreaXsp45OnY7aAwN3xvQcH1b1y65VabMwzMU5zQ79bMKmLHLm2GCEXC0jUkVRSLUF6hdW62c8n7WyzXHfsianBVAg16rqGCOerYt+E4tuOIbviR3suK+cBp1Zdpp0GRVRfZl4/XHD7AzTpnYSFWB0vHlzS2TDiz/cPn4vx2YAML/AxiD3K8wfl5pAAAAAElFTkSuQmCC"},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,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 a(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 s(t,i){var r=t.cm.getTokenTypeAt(e(t.line,i));return r&&/\btag\b/.test(r)}function o(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(o(t))continue;return}if(s(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(s(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(o(t))continue;return}if(s(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(s(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,a=h(t),s=t.line,o=t.ch-(a?a[0].length:0);if(!a||!(n=c(t)))return;if("selfClose"!=n)if(a[1]){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(s,o),to:e(t.line,t.ch)}}else r.push(a[2])}}function p(t,i){for(var r=[];;){var n=d(t);if(!n)return;if("selfClose"!=n){var a=t.line,s=t.ch,o=u(t);if(!o)return;if(o[1])r.push(o[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==o[2]){r.length=l;break}if(l<0&&(!i||i==o[2]))return{tag:o[2],from:e(t.line,t.ch),to:e(a,s)}}}else u(t)}}t.registerHelper("fold","xml",(function(t,r){for(var n=new a(t,r.line,0);;){var s=h(n);if(!s||n.line!=r.line)return;var o=c(n);if(!o)return;if(!s[1]&&"selfClose"!=o){var l=e(n.line,n.ch),u=f(n,s[2]);return u&&i(u.from,l)>0?{from:l,to:u.from}:null}}})),t.findMatchingTag=function(t,r,n){var s=new a(t,r.line,r.ch,n);if(-1!=s.text.indexOf(">")||-1!=s.text.indexOf("<")){var o=c(s),l=o&&e(s.line,s.ch),h=o&&u(s);if(o&&h&&!(i(s,r)>0)){var d={from:e(s.line,s.ch),to:l,tag:h[2]};return"selfClose"==o?{open:d,close:null,at:"open"}:h[1]?{open:p(s,h[2]),close:d,at:"close"}:{open:d,close:f(s=new a(t,l.line,l.ch,n),h[2]),at:"open"}}}},t.findEnclosingTag=function(t,e,i,r){for(var n=new a(t,e.line,e.ch,i);;){var s=p(n,r);if(!s)break;var o=f(new a(t,e.line,e.ch,i),s.tag);if(o)return{open:s,close:o}}},t.scanForClosingTag=function(t,e,i,r){return f(new a(t,e.line,e.ch,r?{from:0,to:r}:null),i)}}(i(/*! ../../lib/codemirror */"VrN/"))},p5ED: +/*!*********************************************!*\ + !*** ./src/components/PreviewAll/index.tsx ***! + \*********************************************/ +/*! exports provided: default */ +/*! 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+")),a=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),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/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){var e,i,l,d,b,S,E=t.editOffice,C=void 0===E?"view":E,k=(t.name,t.data),A=(t.theme,t.type),x=t.filename,w=t.monacoEditor,T=t.className,L=t.style,I=t.close,D=t.onClose,R=t.hasMask,O=t.disabledDownload,M=t.onImgDimensions,N=t.otherData,P=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),B=Object(o.a)(P,2),F=(B[0],B[1],Object(u.useState)("")),_=Object(o.a)(F,2),j=(_[0],_[1]),U=Object(u.useState)(),G=Object(o.a)(U,2),H=G[0],z=G[1],V="build"===window.ENV?"/react/build":"",W=location.host.startsWith("localhost")?y.a.PROXY_SERVER:y.a.API_SERVER,K=Object(u.useRef)();null!==(e=k)&&void 0!==e&&e.startsWith("/api")&&"txt"!==A&&(k=y.a.API_SERVER+k),"office"===A&&Object(m.P)(k).filesize>10485760&&(A="other"),x&&(w.filename=x),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]&&j(e[1])}))}),[]),Object(u.useEffect)((function(){"office"===A&&Q()}),[A,k]);var Q=function(){var t=Object(s.a)(c.a.mark((function t(){var e,i,r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("data:",k),e=k,k.startsWith("http")||(e=location.origin+e),i=new URL(e).pathname.split("/").pop(),t.next=6,Object(v.U)({attachment_id:i});case 6:r=t.sent,z(r);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Y=function(){k.startsWith("http")||k.startsWith("blob:")?J():Object(m.x)(x||"educoder",k,x)},J=function(){Object(m.v)(x||"educoder",decodeURIComponent(k))};return h.a.createElement("div",{style:Object(a.a)({},L||{}),className:"".concat(R&&f.a.bgBlack," ").concat(A?f.a.wrp:"hide")},I&&h.a.createElement("div",{className:f.a.close,ref:K},!!M&&h.a.createElement(n.a,{title:"点击对图片进行批注",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:function(){D(),M()}},h.a.createElement("i",{className:"icon-yulanpizhu"}))),!O&&h.a.createElement(n.a,{title:"点击下载此文件",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:J},h.a.createElement("i",{className:"icon-quxiaozhiding"}))),h.a.createElement(n.a,{title:"关闭",getPopupContainer:function(){return K.current}},h.a.createElement("span",{className:"",onClick:D},h.a.createElement("i",{className:"icon-guanbi1"})))),h.a.createElement("div",{className:"".concat(f.a[T]," ").concat(T," ").concat(f.a.monaco," ").concat("txt"===A?"show":"hide")},"txt"===A&&h.a.createElement(g.b,w)),"audio"===A&&h.a.createElement("audio",{src:"".concat((null===(i=k)||void 0===i?void 0:i.indexOf("http://"))>-1||(null===(l=k)||void 0===l?void 0:l.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(k),autoPlay:!0}),"video"===A&&h.a.createElement(h.a.Fragment,null,(null===(d=k)||void 0===d?void 0:d.indexOf("http"))>-1?h.a.createElement("video",{controls:!0,src:"".concat(k),autoPlay:!0}):h.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(k),autoPlay:!0})),"office"===A&&H&&h.a.createElement("iframe",{src:"".concat(V,"/office.html?key=").concat(H.key,"&url=").concat(W+H.url,"&callbackUrl=").concat(W+H.callbackUrl,"&fileType=").concat(H.fileType,"&title=").concat(H.title,"&model=").concat(C,"&officeServer=").concat(y.a.OFFICE_SERVER,"&disabledDownload=").concat(!!O)}),("xlsx"===A||"doc"===A||"pptx"===A||"docx"===A)&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(N.key,"&url=").concat(y.a.API_SERVER+N.url,"&callbackUrl=").concat(y.a.API_SERVER+N.callbackUrl,"&fileType=").concat(N.fileType,"&title=").concat(N.title,"&model=").concat(N.model)}),"html"===A&&h.a.createElement("iframe",{src:k+"&disposition=inline"}),"pdf"===A&&h.a.createElement("embed",{className:f.a.embed,src:k}),"image"===A&&h.a.createElement("img",{src:"".concat((null===(b=k)||void 0===b?void 0:b.indexOf("http://"))>-1||(null===(S=k)||void 0===S?void 0:S.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(k)}),"other"===A&&h.a.createElement("div",null,h.a.createElement(r.a,{type:"primary",size:"large",onClick:Y},h.a.createElement(p.a,null),"点击下载")),"download"===A&&h.a.createElement(r.a,{type:"primary",size:"large",onClick:Y},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,i){},pAaK: +/*!*****************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/CommonHomework/Review/index.less?modules ***! + \*****************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,i){t.exports={flex_box_center:"flex_box_center___3d46B",flex_space_between:"flex_space_between___3a07p",flex_box_vertical_center:"flex_box_vertical_center___3U-TP",flex_box_center_end:"flex_box_center_end___2f78_",flex_box_column:"flex_box_column___2G3XJ",bg:"bg___1MTM3",title:"title___161Lo",replyList:"replyList___3TAxX","nav-tab":"nav-tab___2QveN",buttonFixed:"buttonFixed___3jsue",exitComment:"exitComment___2ZV_r",nextComment:"nextComment___1M4hZ",modal:"modal___14a4J",MdEditor:"MdEditor___2fxIJ"}},qgvg: +/*!**************************************!*\ + !*** ./src/assets/images/notice.gif ***! + \**************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0U3Nzk1NkY5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0U3Nzk1NzA5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RTc3OTU2RDlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},"rAM+": +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***! + \*******************************************************************************************************************/ +/*! exports provided: default */ +/*! 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,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}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 s,o=!0,l=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return o=t.done,t},e:function(t){l=!0,s=t},f:function(){try{o||null==i.return||i.return()}finally{if(l)throw s}}}}},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 i=/[&<>"']/,r=/[&<>"']/g,n=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},o=t=>s[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:i.m},o=e.all?{main:Object.keys(n.main)}:function(t,e){for(var i={main:[e]},r={main:[]},n={main:{}};s(i);)for(var o=Object.keys(i),l=0;l=2*h/f||b<=E)){var C,k=Number.POSITIVE_INFINITY;for(C=t.level-1;C>g&&!((k=h*p[C].maxBitrate/(6.4*y))=b)){var A=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)(A)?(A/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: "+k.toFixed(3)+" s\n Time to underbuffer: "+E.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(a.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 s=n?n.stats:i.stats,o=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)+s.loaded,h=(c.loaded?c.loaded.duration:0)+o;c.loaded={bytes:u,duration:h},c.realBitrate=Math.round(8*u/h)}if(i.bitrateTest){var d={stats:s,frag:i,part:n,id:i.type};this.onFragBuffered(a.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 a=n.parsing.end-n.loading.start;this.bwEstimator.sample(a,n.loaded),n.bwEstimate=this.bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},d.onError=function(t,e){switch(e.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.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,a=i.minAutoLevel,o=i.media,l=e?e.duration:t?t.duration:0,u=o?o.currentTime:0,h=o&&0!==o.playbackRate?Math.abs(o.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():n.abrEwmaDefaultEstimate,f=(s.BufferHelper.bufferInfo(o,u,n.maxBufferHole).end-u)/h,p=this.findBestLevel(d,a,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,a,r,f+g,m,v),Math.max(p,0)},d.findBestLevel=function(t,e,i,r,n,a){for(var s,o=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,h=this.hls.levels,d=h[u],f=!(null==d||null===(s=d.details)||void 0===s||!s.live),p=null==d?void 0:d.codecSet,g=l?l.duration:o?o.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,S=void 0;S=m<=u?n*t:a*t;var E=h[m].maxBitrate,C=E*b/S;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+m+"/"+Math.round(S)+"/"+E+"/"+b+"/"+r+"/"+C),S>E&&(!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()},E.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,a=null==i||null===(e=i[r])||void 0===e?void 0:e.details;if(a){if(this.waitForCdnTuneIn(a))break;this.state=n.State.WAITING_INIT_PTS}break;case n.State.FRAG_LOADING_WAITING_RETRY:var o,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(o=this.media)&&void 0!==o&&o.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=s.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()},E.clearWaitingFragment=function(){var t=this.waitingData;t&&(this.fragmentTracker.removeFragment(t.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=n.State.IDLE)},E.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}},E.doTickIdle=function(){var t,e,i=this.hls,r=this.levels,s=this.media,o=this.trackId,l=i.config;if(r&&r[o]&&(s||!this.startFragRequested&&l.startFragPrefetch)){var h=r[o].details;if(!h||h.live&&this.levelLastLoaded!==o||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(a.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"),s.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}}}}},E.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)},E.onMediaDetaching=function(){this.videoBuffer=null,t.prototype.onMediaDetaching.call(this)},E.onAudioTracksUpdated=function(t,e){var i=e.audioTracks;this.resetTransmuxer(),this.levels=i.map((function(t){return new l.Level(t)}))},E.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()},E.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},E.onLevelLoaded=function(t,e){this.mainDetails=e.details},E.onAudioTrackLoaded=function(t,e){var i,r=this.levels,a=e.details,s=e.id;if(r){this.log("Track "+s+" loaded ["+a.startSN+","+a.endSN+"],duration:"+a.totalduration);var o=r[s],l=0;if(a.live||null!==(i=o.details)&&void 0!==i&&i.live){var c=this.mainDetails;if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed||!c)return;!o.details&&a.hasProgramDateTime&&c.hasProgramDateTime?(Object(g.alignMediaPlaylistByPDT)(a,c),l=a.fragments[0].start):l=this.alignPlaylists(a,o.details)}o.details=a,this.levelLastLoaded=s,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(o.details,l),this.state!==n.State.WAITING_TRACK||this.waitForCdnTuneIn(a)||(this.state=n.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+s)},E._handleFragmentLoadProgress=function(t){var e,i=t.frag,r=t.part,a=t.payload,s=this.config,o=this.trackId,l=this.levels;if(l){var u=l[o];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=s.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 S=r?r.index:-1,E=-1!==S,C=new f.ChunkMetadata(i.level,i.sn,i.stats.chunkCount,a.byteLength,S,E);m.push(a,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 "+o),(this.waitingData=this.waitingData||{frag:i,part:r,cache:new h.default,complete:!1}).cache.push(new Uint8Array(a)),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")},E._handleFragmentLoadComplete=function(e){this.waitingData?this.waitingData.complete=!0:t.prototype._handleFragmentLoadComplete.call(this,e)},E.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},E.onBufferCreated=function(t,e){var i=e.tracks.audio;i&&(this.mediaBuffer=i.buffer),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},E.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(a.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(i,r)))},E.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,a=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);a&&a.len>.5&&(r=!this.reduceMaxBufferLength(a.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()}}},E.onBufferFlushed=function(t,e){e.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},E._handleTransmuxComplete=function(t){var e,i="audio",r=this.hls,s=t.remuxResult,o=t.chunkMeta,l=this.getCurrentContext(o);if(!l)return this.warn("The loading context changed while buffering fragment "+o.sn+" of level "+o.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(o.level);var c=l.frag,h=l.part,d=s.audio,f=s.text,p=s.id3,g=s.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,o),r.trigger(a.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:i,tracks:g.tracks})),d){var m=d.startPTS,v=d.endPTS,b=d.startDTS,S=d.endDTS;h&&(h.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:m,endPTS:v,startDTS:b,endDTS:S}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,m,v,b,S),this.bufferFragmentData(d,c,h,o)}if(null!=p&&null!==(e=p.samples)&&void 0!==e&&e.length){var E=y({frag:c,id:i},p);r.trigger(a.Events.FRAG_PARSING_METADATA,E)}if(f){var C=y({frag:c,id:i},f);r.trigger(a.Events.FRAG_PARSING_USERDATA,C)}}},E._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(a.Events.BUFFER_CODECS,t);var s=r.initSegment;if(null!=s&&s.byteLength){var o={type:"audio",frag:e,part:null,chunkMeta:i,parent:e.type,data:s};this.hls.trigger(a.Events.BUFFER_APPENDING,o)}this.tick()}}},E.loadFragment=function(e,i,a){var s=this.fragmentTracker.getState(e);this.fragCurrent=e,(this.audioSwitch||s===o.FragmentState.NOT_LOADED||s===o.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,a)))},E.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(a.Events.AUDIO_TRACK_SWITCHED,{id:r})},S}(n.default);e.default=S},"./src/controller/audio-track-controller.ts": +/*!**************************************************!*\ + !*** ./src/controller/audio-track-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"),a=i(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),s=i(/*! ../types/loader */"./src/types/loader.ts");function o(t,e){for(var i=0;i=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],a=n.id,s=n.groupId,o=void 0===s?"":s,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:a,groupId:o,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(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,s=e.stats,o=s.loading.end?Math.max(0,self.performance.now()-s.loading.end):0;if(n.advancedDateTime=Date.now()-o,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(a.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 S=Object(a.computeReloadInterval)(n,s);void 0!==c&&n.canBlockReload&&(S-=n.partTarget||1),this.log("reload live playlist "+t+" in "+Math.round(S)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),S)}else this.clearTimer()},e.getDeliveryDirectives=function(t,e,i,r){var a=Object(n.getSkipValue)(t,i);return null!=e&&e.skip&&t.deltaUpdateFailed&&(i=e.msn,r=e.part,a=n.HlsSkip.No),new n.HlsUrlParameters(i,r,a)},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 a=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return i.loadPlaylist()}),a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' 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,i){"use strict";i.r(e),i.d(e,"State",(function(){return E})),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"),a=i(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),s=i(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=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;(o0&&a&&a.key&&a.iv&&"AES-128"===a.method){var s=self.performance.now();return e.decrypter.webCryptoDecrypt(new Uint8Array(n),a.key.buffer,a.iv.buffer).then((function(e){var n=self.performance.now();return r.trigger(l.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:s,tdecrypt:n}}),i.payload=e,i}))}return i})).then((function(i){var r=e.fragCurrent,n=e.hls,a=e.levels;if(!a)throw new Error("init load aborted, missing levels");var s=a[t.level].details;console.assert(s,"Level details are defined when init segment is loaded");var o=t.stats;e.state=E.IDLE,e.fragLoadError=0,t.data=new Uint8Array(i.payload),o.parsing.start=o.buffering.start=self.performance.now(),o.parsing.end=o.buffering.end=self.performance.now(),i.frag===r&&n.trigger(l.Events.FRAG_BUFFERED,{stats:o,frag:r,part:null,id:t.type}),e.tick()})).catch((function(i){e.warn(i),e.resetFragmentLoading(t)}))},x.fragContextChanged=function(t){var e=this.fragCurrent;return!t||!e||t.level!==e.level||t.sn!==e.sn||t.urlId!==e.urlId},x.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(s.BufferHelper.getBuffered(i))),this.state=E.IDLE,this.tick()},x._handleFragmentLoadComplete=function(t){var e=this.transmuxer;if(e){var i=t.frag,r=t.part,n=t.partsLoaded,a=!n||0===n.length||n.some((function(t){return!t})),s=new u.ChunkMetadata(i.level,i.sn,i.stats.chunkCount+1,0,r?r.index:-1,!a);e.flush(s)}},x._handleFragmentLoadProgress=function(t){},x._doFragLoad=function(t,e,i,n){var a=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 s=e.partList;if(s&&n){i>t.end&&e.fragmentHint&&(t=e.fragmentHint);var o=this.getNextPart(s,t,i);if(o>-1){var c=s[o];return this.log("Loading part sn: "+t.sn+" p: "+c.index+" cc: "+t.cc+" of playlist ["+e.startSN+"-"+e.endSN+"] parts [0-"+o+"-"+(s.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(i.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=E.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,part:s[o],targetBufferTime:i}),this.doFragPartsLoad(t,s,o,n).catch((function(t){return a.handleFragLoadError(t)}))}if(!t.url||this.loadedEndOfParts(s,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=E.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:t,targetBufferTime:i}),this.fragmentLoader.load(t,n).catch((function(t){return a.handleFragLoadError(t)}))},x.doFragPartsLoad=function(t,e,i,r){var n=this;return new Promise((function(a,s){var o=[];!function i(c){var u=e[c];n.fragmentLoader.loadPart(t,u,r).then((function(r){o[u.index]=r;var s=r.part;n.hls.trigger(l.Events.FRAG_LOADED,r);var h=e[c+1];if(!h||h.fragment!==t)return a({frag:t,part:s,partsLoaded:o});i(c+1)})).catch(s)}(i)}))},x.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},x._handleTransmuxerFlush=function(t){var e=this.getCurrentContext(t);if(e&&this.state===E.PARSING){var i=e.frag,r=e.part,n=e.level,a=self.performance.now();i.stats.parsing.end=a,r&&(r.stats.parsing.end=a),this.updateLevelTiming(i,r,n,t.partial)}else this.fragCurrent||(this.state=E.IDLE)},x.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 a=e[i],s=n>-1?Object(p.getPartWith)(a,r,n):null,o=s?s.fragment:Object(p.getFragmentWithSN)(a,r,this.fragCurrent);return o?{frag:o,part:s,level:a}:null},x.bufferFragmentData=function(t,e,i,r){if(t&&this.state===E.PARSING){var n=t.data1,a=t.data2,s=n;if(n&&a&&(s=Object(h.appendUint8Array)(n,a)),s&&s.length){var o={type:t.type,frag:e,part:i,chunkMeta:r,parent:e.type,data:s};this.hls.trigger(l.Events.BUFFER_APPENDING,o),t.dropped&&t.independent&&!i&&this.flushBufferGap(e)}}},x.flushBufferGap=function(t){var e=this.media;if(e)if(s.BufferHelper.isBuffered(e,e.currentTime)){var i=e.currentTime,r=s.BufferHelper.bufferInfo(e,i,0),n=t.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*n),o=Math.max(Math.min(t.start-a,r.end-a),i+a);t.start-o>a&&this.flushMainBuffer(o,t.start)}else this.flushMainBuffer(0,t.start)},x.getFwdBufferInfo=function(t,e){var i=this.config,n=this.getLoadPosition();if(!Object(r.isFiniteNumber)(n))return null;var a=s.BufferHelper.bufferInfo(t,n,i.maxBufferHole);if(0===a.len&&void 0!==a.nextStart){var o=this.fragmentTracker.getBufferedFrag(n,e);if(o&&a.nextStart=i&&(e.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},x.getNextFragment=function(t,e){var i,r,n=e.fragments,a=n.length;if(!a)return null;var s,o=this.config,l=n[0].start;if(e.live){var c=o.initialLiveManifestSize;if(a-1&&ii.start&&i.loaded},x.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 a=e[n-t.startSN];i.cc===a.cc&&(r=a,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 s=this.hls.liveSyncPosition;null!==s&&(r=this.getFragmentAtPosition(s,this.bitrateTest?t.fragmentEnd:t.edge,t))}return r},x.getFragmentAtPosition=function(t,e,i){var r,n=this.config,s=this.fragPrevious,o=i.fragments,l=i.endSN,c=i.fragmentHint,u=n.maxFragLookUpTolerance,h=!!(n.lowLatencyMode&&i.partList&&c);if(h&&c&&!this.bitrateTest&&(o=o.concat(c),l=c.sn),te-u?0:u;r=Object(f.findFragmentByPTS)(s,o,t,d)}else r=o[o.length-1];if(r){var p=r.sn-i.startSN,g=s&&r.level===s.level,m=o[p+1];if(this.fragmentTracker.getState(r)===a.FragmentState.BACKTRACKED){r=null;for(var v=p;o[v]&&this.fragmentTracker.getState(o[v])===a.FragmentState.BACKTRACKED;)r=s?o[v--]:o[--v];r||(r=m)}else s&&r.sn===s.sn&&!h&&g&&(r.sn=a-e.maxFragLookUpTolerance&&n<=s;if(null!==r&&i.duration>r&&(n"+t.startSN+" prev-sn: "+(a?a.sn:"na")+" fragments: "+o),h}return l},x.waitForCdnTuneIn=function(t){return t.live&&t.canBlockReload&&t.tuneInGoal>Math.max(t.partHoldBack,3*t.partTarget)},x.setStartPosition=function(t,e){var i=this.startPosition;if(i"+t))}}])&&b(C.prototype,k),A&&b(C,A),n}(n.default)},"./src/controller/buffer-controller.ts": +/*!*********************************************!*\ + !*** ./src/controller/buffer-controller.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"),a=i(/*! ../utils/logger */"./src/utils/logger.ts"),s=i(/*! ../errors */"./src/errors.ts"),o=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;a.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(){a.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){a.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,a.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(a.logger.log("[buffer-controller]: media source detaching"),"open"===e.readyState)try{e.endOfStream()}catch(t){a.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()):a.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){a.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 a=e[t],s=a.codec,o=a.levelCodec,l=a.container;if((n.levelCodec||n.codec).replace(d,"$1")!==(o||s).replace(d,"$1")){var c=l+";codecs="+(o||s);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&&(a.logger.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+e),n.changeType(e)),r.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(e){a.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,S="audio"===h&&1===p.id&&"audio/mpeg"===(null==b?void 0:b.container),E={execute:function(){if(g.executeStart=self.performance.now(),S){var t=i.sourceBuffer[h];if(t){var e=d.start-t.timestampOffset;Math.abs(e)>=.1&&(a.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 a in e)r[a]=o.BufferHelper.getBuffered(e[a]);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){a.logger.error("[buffer-controller]: Error encountered while trying to append to the "+h+" SourceBuffer",t);var e={type:s.ErrorTypes.MEDIA_ERROR,parent:d.type,details:s.ErrorDetails.BUFFER_APPEND_ERROR,err:t,fatal:!1};t.code===DOMException.QUOTA_EXCEEDED_ERR?e.details=s.ErrorDetails.BUFFER_FULL_ERROR:(i.appendError++,e.details=s.ErrorDetails.BUFFER_APPEND_ERROR,i.appendError>r.config.appendErrorMaxRetry&&(a.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(E,h)},e.onBufferFlushing=function(t,e){var i=this,r=this.operationQueue,s=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){a.logger.warn("[buffer-controller]: Failed to remove from "+t+" SourceBuffer",e)}}};e.type?r.append(s(e.type),e.type):this.getSourceBufferTypes().forEach((function(t){r.append(s(t),t)}))},e.onFragParsed=function(t,e){var i=this,r=e.frag,s=e.part,o=[],l=s?s.elementaryStreams:r.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?o.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&o.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&o.push("video")),0===o.length&&a.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,s&&(s.stats.buffering.end=t);var e=s?s.stats:r.stats;i.hls.trigger(n.Events.FRAG_BUFFERED,{frag:r,part:s,stats:e,id:r.type})}),o)},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,a.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,a=this.sourceBuffer;if(i&&null!==e){var s=this.getSourceBufferTypes();if(s.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;s.forEach((function(i){var r=a[i];if(r){var s=o.BufferHelper.getBuffered(r);s.length>0&&d>s.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,s=t.fragments[0].start+t.totalduration,o=i.duration,l=Object(r.isFiniteNumber)(n.duration)?n.duration:0;t.live&&e.config.liveDurationInfinity?(a.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),n.duration=1/0,this.updateSeekableRange(t)):(s>l&&s>o||!Object(r.isFiniteNumber)(o))&&(a.logger.log("[buffer-controller]: Updating Media Source duration to "+s.toFixed(3)),n.duration=s)}},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 a=this.getSourceBufferTypes();if(0===a.length)return void this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});a.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 o in t)if(!e[o]){var l=t[o];if(!l)throw Error("source buffer exists for track "+o+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;a.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var h=e[o]=i.addSourceBuffer(u),d=o;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[o]={buffer:h,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},r++}catch(t){a.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+t.message),this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.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){a.logger.error("[buffer-controller]: "+t+" SourceBuffer error",e),this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.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,s=this.mediaSource,o=this.operationQueue,l=this.sourceBuffer[t];if(!n||!s||!l)return a.logger.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),void o.shiftAndExecuteNext(t);var c=Object(r.isFiniteNumber)(n.duration)?n.duration:1/0,u=Object(r.isFiniteNumber)(s.duration)?s.duration:1/0,h=Math.max(0,e),d=Math.min(i,c,u);d>h?(a.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)):o.shiftAndExecuteNext(t)},e.appendExecutor=function(t,e){var i=this.operationQueue,r=this.sourceBuffer[e];if(!r)return a.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 a.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,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],a=i[t];if(a.length){var s=a[0];try{s.execute()}catch(e){r.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),s.onError(e),n&&n.updating||(a.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,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}}},s.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)},s.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())},s.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},s.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,a=t.length-1,s=0;s=e||o.height>=i)&&(r=o,!(n=t[s+1])||r.width!==n.width||r.height!==n.height)){a=s;break}}return a},e=t,a=[{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),a&&n(e,a),t}();e.default=a},"./src/controller/cmcd-controller.ts": +/*!*******************************************!*\ + !*** ./src/controller/cmcd-controller.ts ***! + \*******************************************/ +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return d}));var r=i(/*! ../events */"./src/events.ts"),n=i(/*! ../types/cmcd */"./src/types/cmcd.ts"),a=i(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts");function o(t,e){for(var i=0;i=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=a.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*a.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)},a=function(t){return 100*n(t/100)},s={br:n,d:n,bl:a,dl:a,mtp:a,nor:function(t){return encodeURIComponent(t)},rtp:a,tb:n},o=c(Object.keys(t||{}).sort());!(e=o()).done;){var l=e.value,u=t[l];if(r(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var h=s[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=[{},{},{},{}],a={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},s=0,o=Object.keys(e);s3)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;a.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(i,s)}}},c._generateLicenseRequestChallenge=function(t,e){switch(t.mediaKeySystemDomain){case s.KeySystems.WIDEVINE:return e}throw new Error("unsupported key-system: "+t.mediaKeySystemDomain)},c._requestLicense=function(t,e){a.logger.log("Requesting content license for key-system");var i=this._mediaKeysList[0];if(!i)return a.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 s=this.getLicenseServerUrl(i.mediaKeySystemDomain),o=this._createLicenseXhr(s,t,e);a.logger.log("Sending license request to URL: "+s);var l=this._generateLicenseRequestChallenge(i,t);o.send(l)}catch(t){a.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(s.KeySystems.WIDEVINE,i,r)}},e=t,(i=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&o(e.prototype,i),l&&o(e,l),t}();e.default=l},"./src/controller/fps-controller.ts": +/*!******************************************!*\ + !*** ./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(/*! ../utils/logger */"./src/utils/logger.ts"),a=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 a=performance.now();if(e){if(this.lastTime){var s=a-this.lastTime,o=i-this.lastDroppedFrames,l=e-this.lastDecodedFrames,c=1e3*o/s,u=this.hls;if(u.trigger(r.Events.FPS_DROP,{currentDropped:o,currentDecoded:l,totalDroppedFrames:i}),c>0&&o>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=a,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=a},"./src/controller/fragment-finders.ts": +/*!********************************************!*\ + !*** ./src/controller/fragment-finders.ts ***! + \********************************************/ +/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(t,e,i){"use strict";i.r(e),i.d(e,"findFragmentByPDT",(function(){return a})),i.d(e,"findFragmentByPTS",(function(){return s})),i.d(e,"fragmentWithinToleranceTest",(function(){return o})),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 a(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,i){"use strict";i.r(e),i.d(e,"FragmentState",(function(){return r})),i.d(e,"FragmentTracker",(function(){return s}));var r,n=i(/*! ../events */"./src/events.ts"),a=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 s=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===a.PlaylistLevelType.MAIN){var i=this.activeFragment,r=this.activeParts;if(!i)return null;if(r)for(var n=r.length;n--;){var s=r[n],o=s?s.end:i.appendedPTS;if(s.start<=t&&void 0!==o&&t<=o)return n>9&&(this.activeParts=r.slice(n-9)),s}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 a=i[r[n]];if((null==a?void 0:a.body.type)===e&&a.buffered){var s=a.body;if(s.start<=t&&t<=s.end)return s}}return null},e.detectEvictedFragments=function(t,e,i){var r=this;Object.keys(this.fragments).forEach((function(n){var a=r.fragments[n];if(a)if(a.buffered){var s=a.range[t];s&&s.time.some((function(t){var i=!r.isTimeBuffered(t.startPTS,t.endPTS,e);return i&&r.removeFragment(a.body),i}))}else a.body.type===i&&r.removeFragment(a.body)}))},e.detectPartialFragments=function(t){var e=this,i=this.timeRanges,r=t.frag,n=t.part;if(i&&"initSegment"!==r.sn){var a=l(r),s=this.fragments[a];s&&(Object.keys(i).forEach((function(t){var a=r.elementaryStreams[t];if(a){var o=i[t],l=null!==n||!0===a.partial;s.range[t]=e.getBufferedTimes(r,n,l,o)}})),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.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},a=e?e.start:t.start,s=e?e.end:t.end,o=t.minEndPTS||s,l=t.maxStartPTS||a,c=0;c=u&&o<=h){n.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(s,r.end(c))});break}if(au)n.partial=!0,n.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(s,r.end(c))});else if(s<=u)break}return n},e.getPartialFragment=function(t){var e,i,r,n=null,a=0,s=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&o(u)&&(i=u.body.start-s,r=u.body.end+s,t>=i&&t<=r&&(e=Math.min(t-i,r-t),a<=e&&(n=u.body,a=e)))})),n},e.getState=function(t){var e=l(t),i=this.fragments[e];return i?i.buffered?o(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,a=0;a=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,s=e.timeRanges;if(r.type===a.PlaylistLevelType.MAIN)if(this.activeFragment=r,n){var o=this.activeParts;o||(this.activeParts=o=[]),o.push(n)}else this.activeParts=null;this.timeRanges=s,Object.keys(s).forEach((function(t){var e=s[t];if(i.detectEvictedFragments(t,e),!n)for(var a=0;at&&r.removeFragment(s)}}))},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 o(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,i){"use strict";i.r(e),i.d(e,"STALL_MINIMUM_DURATION_MS",(function(){return o})),i.d(e,"MAX_START_GAP_JUMP",(function(){return l})),i.d(e,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),i.d(e,"SKIP_BUFFER_RANGE_START",(function(){return u})),i.d(e,"default",(function(){return h}));var r=i(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),n=i(/*! ../errors */"./src/errors.ts"),a=i(/*! ../events */"./src/events.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts"),o=250,l=2,c=.1,u=.05,h=function(){function t(t,e,i,r){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=i,this.hls=r}var e=t.prototype;return e.destroy=function(){this.hls=this.fragmentTracker=this.media=null},e.poll=function(t){var e=this.config,i=this.media,n=this.stalled,a=i.currentTime,c=i.seeking,u=this.seeking&&!c,h=!this.seeking&&c;if(this.seeking=c,a===t){if((h||u)&&(this.stalled=null),!i.paused&&!i.ended&&0!==i.playbackRate&&r.BufferHelper.getBuffered(i).length){var d=r.BufferHelper.bufferInfo(i,a,0),f=d.len>0,p=d.nextStart||0;if(f||p){if(c){var g=d.len>l,m=!p||p-a>l&&!this.fragmentTracker.getPartialFragment(a);if(g||m)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,y=Math.max(p,d.start||0)-a,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,S=(null==b||null===(v=b.details)||void 0===v?void 0:v.live)?2*b.details.targetduration:l;if(y>0&&y<=S)return void this._trySkipBufferHole(null)}var E=self.performance.now();if(null!==n){var C=E-n;!c&&C>=o&&this._reportStall(d.len);var k=r.BufferHelper.bufferInfo(i,a,e.maxBufferHole);this._tryFixBufferStall(k,C)}else this.stalled=E}}}else if(this.moved=!0,null!==n){if(this.stallReported){var A=self.performance.now()-n;s.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(A)+"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,a=r.getPartialFragment(n);a&&this._trySkipBufferHole(a)||t.len>i.maxBufferHole&&e>1e3*i.highBufferWatchdogPeriod&&(s.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,s.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer (buffer="+t+")"),e.trigger(a.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,o=this.media,l=o.currentTime,h=0,d=r.BufferHelper.getBuffered(o),f=0;f=h&&l.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,a)),u=Math.round(2/(1+Math.exp(-.75*o-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,a=n.liveSyncDuration,s=n.liveSyncDurationCount,o=n.lowLatencyMode,l=this.hls.userConfig,c=o&&i||e;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==a?a:s*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,a=r-i.totalduration,s=r-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(a,n),s)}},{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}}])&&s(e.prototype,i),o&&s(e,o),t}()},"./src/controller/level-controller.ts": +/*!********************************************!*\ + !*** ./src/controller/level-controller.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"),a=i(/*! ../errors */"./src/errors.ts"),s=i(/*! ../utils/codecs */"./src/utils/codecs.ts"),o=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&&(s=i.frag.level)):s=i.frag.level}break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(l=!1),s=r.level),o=!0;break;case a.ErrorDetails.REMUX_ALLOC_ERROR:s=i.level,o=!0}void 0!==s&&this.recoverLevel(i,s,o,l)}}},v.recoverLevel=function(t,e,i,r){var n=t.details,a=this._levels[e];if(a.loadError++,i){if(!this.retryLoadingOrFail(t))return void(this.currentLevelIndex=-1);t.levelRetry=!0}if(r){var s=a.url.length;if(s>1&&a.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,a=e.details,s=this._levels[n];if(!s)return this.warn("Invalid level index "+n),void(null!==(r=e.deliveryDirectives)&&void 0!==r&&r.skip&&(a.deltaUpdateFailed=!0));n===this.currentLevelIndex?(0===s.fragmentError&&(s.loadError=0,this.retryCount=0),this.playlistLoaded(n,e,s.details)):null!==(i=e.deliveryDirectives)&&void 0!==i&&i.skip&&(a.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,a=0;a0){var r=i.urlId,a=i.url[r];if(t)try{a=t.addDirectives(a)}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+" "+a),this.clearTimer(),this.hls.trigger(n.Events.LEVEL_LOADING,{url:a,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:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.LEVEL_SWITCH_ERROR,level:t,fatal:r,reason:"invalid level idx"}),r)return;t=Math.min(t,i.length-1)}this.clearTimer();var s=this.currentLevelIndex,o=i[s],l=i[t];this.log("switching to level "+t+" from "+s),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==o?void 0:o.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,i){"use strict";i.r(e),i.d(e,"addGroupId",(function(){return a})),i.d(e,"assignTrackIdsByGroup",(function(){return s})),i.d(e,"updatePTS",(function(){return o})),i.d(e,"updateFragPTSDTS",(function(){return c})),i.d(e,"mergeDetails",(function(){return u})),i.d(e,"mapPartIntersection",(function(){return h})),i.d(e,"mapFragmentIntersection",(function(){return d})),i.d(e,"adjustSliding",(function(){return f})),i.d(e,"addSliding",(function(){return p})),i.d(e,"computeReloadInterval",(function(){return g})),i.d(e,"getFragmentWithSN",(function(){return m})),i.d(e,"getPartWith",(function(){return v}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../utils/logger */"./src/utils/logger.ts");function a(t,e,i){switch(e){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(i);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(i)}}function s(t){var e={};t.forEach((function(t){var i=t.groupId||"";t.id=e[i]=e[i]||0,e[i]++}))}function o(t,e,i){l(t[e],t[i])}function l(t,e){var i=e.startPTS;if(Object(r.isFiniteNumber)(i)){var n,a=0;e.sn>t.sn?(a=i-t.start,n=t):(a=t.start-i,n=e),n.duration!==a&&(n.duration=a)}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,a,s,o){a-i<=0&&(n.logger.warn("Fragment should have a positive duration",e),a=i+e.duration,o=s+e.duration);var c=i,u=a,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),s=Math.min(s,e.startDTS),u=Math.min(a,d),a=Math.max(a,d),o=Math.max(o,e.endDTS)}e.duration=a-i;var p=i-e.start;e.appendedPTS=a,e.start=e.startPTS=i,e.maxStartPTS=c,e.startDTS=s,e.endPTS=a,e.minEndPTS=u,e.endDTS=o;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;s--){var o=a[s].initSegment;if(o){i=o;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&&a<3*r,o=e.loading.end-e.loading.start,l=t.availabilityDelay;if(!1===t.updated)if(s){var c=333*t.misses;i=Math.max(Math.min(n,2*o),c),t.availabilityDelay=(t.availabilityDelay||0)+i}else i=n;else s?(l=Math.min(l||r/2,a),t.availabilityDelay=l,i=l+r-a):i=r-o;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,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 a,s=self.performance.now(),o=this.retryDate;(!o||s>=o||null!==(a=this.media)&&void 0!==a&&a.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,a=this.levels,o=this.media,h=i.config,d=i.nextLoadLevel;if(null!==r&&(o||!this.startFragRequested&&h.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&a&&a[d]){var f=a[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:o,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(s.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 S=this.audioOnly&&!this.altAudio?u.ElementaryStreamTypes.AUDIO:u.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(o,S,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,a=this.fragmentTracker.getState(e);if(this.fragCurrent=e,a===l.FragmentState.BACKTRACKED){var s=this.fragmentTracker.getBacktrackData(e);if(s)return this._handleFragmentLoadProgress(s),void this._handleFragmentLoadComplete(s);a=l.FragmentState.NOT_LOADED}a===l.FragmentState.NOT_LOADED||a===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)):a===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],a=this.fragLastKbps;i=a&&this.fragCurrent?this.fragCurrent.duration*n.maxBitrate/(1e3*a)+1:0}else i=0;var s=this.getBufferedFrag(e.currentTime+i);if(s){var o=this.followingBufferedFrag(s);if(o){this.abortCurrentFrag();var l=o.maxStartPTS?o.maxStartPTS:o.start,c=o.duration,u=Math.max(s.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(s.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(a.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,a=e.level,o=e.details,l=o.totalduration;if(r){this.log("Level "+a+" loaded ["+o.startSN+","+o.endSN+"], cc ["+o.startCC+", "+o.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[a],h=0;if(o.live||null!==(i=u.details)&&void 0!==i&&i.live){if(o.fragments[0]||(o.deltaUpdateFailed=!0),o.deltaUpdateFailed)return;h=this.alignPlaylists(o,u.details)}if(u.details=o,this.levelLastLoaded=a,this.hls.trigger(s.Events.LEVEL_UPDATED,{details:o,level:a}),this.state===n.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=n.State.IDLE}this.startFragRequested?o.live&&this.synchronizeToLiveEdge(o):this.setStartPosition(o,h),this.tick()}else this.warn("Levels were reset while loading level "+a)},C._handleFragmentLoadProgress=function(t){var e,i=t.frag,r=t.part,n=t.payload,a=this.levels;if(a){var s=a[i.level],o=s.details;if(o){var l=s.videoCodec,u=o.PTSKnown||!o.live,f=null===(e=i.initSegment)||void 0===e?void 0:e.data,p=this._getAudioCodec(s),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,o.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 a=this.fragCurrent;null!=a&&a.loader&&(this.log("Switching to main audio track, cancel main fragment load"),a.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var o=this.hls;i&&o.trigger(s.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),o.trigger(s.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,a=!1;for(var s in n){var o=n[s];if("main"===o.id){if(r=s,i=o,"video"===s){var l=n[s];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&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 a=r?r.stats:i.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.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=o.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(o.BufferHelper.isBuffered(t,i)?e=this.getAppendedFrag(i):o.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(s.Events.FRAG_CHANGED,{frag:e}),r&&r.level===n||this.hls.trigger(s.Events.LEVEL_SWITCHED,{level:n}),this.fragPlaying=e)}}},b=y,(S=[{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,S),E&&m(b,E),y}(n.default)},"./src/controller/subtitle-stream-controller.ts": +/*!******************************************************!*\ + !*** ./src/controller/subtitle-stream-controller.ts ***! + \******************************************************/ +/*! exports provided: SubtitleStreamController */function(t,e,i){"use strict";i.r(e),i.d(e,"SubtitleStreamController",(function(){return g}));var r=i(/*! ../events */"./src/events.ts"),n=i(/*! ../utils/logger */"./src/utils/logger.ts"),a=i(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=i(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),o=i(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),l=i(/*! ./level-helper */"./src/controller/level-helper.ts"),c=i(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),u=i(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),h=i(/*! ../types/loader */"./src/types/loader.ts"),d=i(/*! ../types/level */"./src/types/level.ts");function f(t,e){for(var i=0;i=n[o].start&&s<=n[o].end){a=n[o];break}var l=i.start+i.duration;a?a.end=l:(a={start:s,end:l},n.push(a)),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,a=this.levels;if(!a.length||!a[n]||!a[n].details)return;var s=r-a[n].details.targetduration;if(s<=0)return;e.endOffsetSubtitles=Math.max(0,s),this.tracksBuffered.forEach((function(t){for(var e=0;e=c.length||n!==a)&&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(o.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(s.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,a=this.hls;if(!this.fragContextChanged(e)&&i&&i.byteLength>0&&n&&n.key&&n.iv&&"AES-128"===n.method){var s=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(i),n.key.buffer,n.iv.buffer).then((function(t){var i=performance.now();a.trigger(r.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:s,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 o=i[e].details,l=o.targetduration,h=this.config,d=this.media,f=a.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,d.currentTime-l,h.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(o,"Subtitle track details are defined on idle subtitle stream controller tick");var g,m=o.fragments,v=m.length,y=o.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 i=e.id,r=e.details,n=this.trackId,a=this.tracksInGroup[n];if(a){var s=a.details;a.details=e.details,this.log("subtitle track "+i+" loaded ["+r.startSN+"-"+r.endSN+"]"),i===this.trackId&&(this.retryCount=0,this.playlistLoaded(i,e,s))}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,a=this.tracks.filter((function(t){return!i||t.groupId===i}));this.tracksInGroup=a;var s=this.findTrackId(null==n?void 0:n.name)||this.findTrackId();this.groupId=i;var o={subtitleTracks:a};this.log("Updating subtitle tracks, "+a.length+' track(s) found in "'+i+'" group-id'),this.hls.trigger(r.Events.SUBTITLE_TRACKS_UPDATED,o),-1!==s&&this.setSubtitleTrack(s,n)}}},f.findTrackId=function(t){for(var e=this.tracksInGroup,i=0;i=n.length)){this.clearTimer();var a=n[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,a){var s=a.id,o=a.groupId,l=void 0===o?"":o,c=a.name,u=a.type,h=a.url;this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:s,groupId:l,name:c,type:u,url:h});var d=this.switchParams(a.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],i),u=!0,f/(i-e)>.5))return}if(u||a.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,a=e.id,s=e.initPTS,o=e.timescale,l=this.unparsedVttFrags;"main"===a&&(this.initPTS[r.cc]=s,this.timescale[r.cc]=o),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],S=257*d[m]^16843008*m;r[f]=S<<24|S>>>8,n[f]=S<<16|S>>>16,a[f]=S<<8|S>>>24,s[f]=S,S=16843009*b^65537*y^257*v^16843008*f,l[m]=S<<24|S>>>8,c[m]=S<<16|S>>>16,u[m]=S<<8|S>>>24,h[m]=S,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[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:"+s+", ADTS type:"+o+", samplingIndex:"+p),/firefox/i.test(h)?p>=6?(o=5,u=new Array(4),l=p-3):(o=2,u=new Array(2),l=p):-1!==h.indexOf("android")?(o=2,u=new Array(2),l=p):(o=5,u=new Array(4),s&&(-1!==s.indexOf("mp4a.40.29")||-1!==s.indexOf("mp4a.40.5"))||!s&&p>=6?l=p-3:((s&&-1!==s.indexOf("mp4a.40.2")&&(p>=6&&1===c||/vivaldi/i.test(h))||!s&&1===c)&&(o=2,u=new Array(2)),l=p)),u[0]=o<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===o&&(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."+o,manifestCodec:d};t.trigger(a.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function o(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,a){if(!t.samplerate){var o=s(e,i,n,a);if(!o)return;t.config=o.config,t.samplerate=o.samplerate,t.channelCount=o.channelCount,t.codec=o.codec,t.manifestCodec=o.manifestCodec,r.logger.log("parsed codec:"+t.codec+", rate:"+o.samplerate+", channels:"+o.channelCount)}}function g(t){return 9216e4/t}function m(t,e,i,r,n){var a=l(t,e),s=c(t,e);if((s-=a)>0)return{headerLength:a,frameLength:s,stamp:i+r*n}}function v(t,e,i,r,n){var a=m(e,i,r,n,g(t.samplerate));if(a){var s,o=a.frameLength,l=a.headerLength,c=a.stamp,u=l+o,h=Math.max(0,i+u-e.length);h?(s=new Uint8Array(u-l)).set(e.subarray(i+l,e.length),0):s=e.subarray(i+l,i+u);var d={unit:s,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,i){"use strict";i.r(e),i.d(e,"initPTSFn",(function(){return c}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../demux/id3 */"./src/demux/id3.ts"),a=i(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),s=i(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),o=i(/*! ../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,i){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,i){},e.demux=function(t,e){this.cachedData&&(t=Object(s.appendUint8Array)(this.cachedData,t),this.cachedData=null);var i,r,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}),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),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(i,i+r)},o=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)&&o(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(a);break;case 12:case 13:s=t[u++],c+=String.fromCharCode((31&a)<<6|63&s);break;case 14:s=t[u++],o=t[u++],c+=String.fromCharCode((15&a)<<12|(63&s)<<6|(63&o)<<0)}}return c},b={decodeTextFrame:g};function S(){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,i){"use strict";i.r(e);var r=i(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),n=i(/*! ../demux/id3 */"./src/demux/id3.ts"),a=i(/*! ../utils/logger */"./src/utils/logger.ts"),s=i(/*! ./mpegaudio */"./src/demux/mpegaudio.ts");function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(t){var e,i;function r(){return t.apply(this,arguments)||this}i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,o(e,i);var l=r.prototype;return l.resetInitSegment=function(e,i,r){t.prototype.resetInitSegment.call(this,e,i,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:e,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(t){if(!t)return!1;for(var e=(n.getID3Data(t,0)||[]).length,i=t.length;e0},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 a=Object(r.segmentValidRange)(e);this.remainderData=a.remainder,i.samples=a.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}();a.minProbeByteLength=1024,e.default=a},"./src/demux/mpegaudio.ts": +/*!********************************!*\ + !*** ./src/demux/mpegaudio.ts ***! + \********************************/ +/*! exports provided: appendFrame, parseHeader, isHeaderPattern, isHeader, canParse, probe */function(t,e,i){"use strict";i.r(e),i.d(e,"appendFrame",(function(){return l})),i.d(e,"parseHeader",(function(){return c})),i.d(e,"isHeaderPattern",(function(){return u})),i.d(e,"isHeader",(function(){return h})),i.d(e,"canParse",(function(){return d})),i.d(e,"probe",(function(){return f}));var r=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],a=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],s=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],o=[0,1,1,4];function l(t,e,i,r,n){if(!(i+24>e.length)){var a=c(e,i);if(a&&i+a.frameLength<=e.length){var s=r+n*(9e4*a.samplesPerFrame/a.sampleRate),o={unit:e.subarray(i,i+a.frameLength),pts:s,dts:s};return t.config=[],t.channelCount=a.channelCount,t.samplerate=a.sampleRate,t.samples.push(o),{sample:o,length:a.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=a[3*(3===i?0:2===i?1:2)+u],g=3===d?1:2,m=s[i][l],v=o[l],y=8*m*v,b=Math.floor(m*f/p+h)*v;if(null===r){var S=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);r=S?parseInt(S[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 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,a,s){var o=Object(n.discardEPB)(a.data),l=this.getAvcEncryptedData(o),c=this;this.decryptBuffer(l.buffer,(function(n){a.data=c.getAvcDecryptedUnit(o,n),s||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 a=n[i];if(!(a.data.length<=48||1!==a.type&&5!==a.type)){var s=this.decrypter.isSync();if(this.decryptAvcSample(t,e,i,r,a,s),!s)return}}}},t}();e.default=a},"./src/demux/transmuxer-interface.ts": +/*!*******************************************!*\ + !*** ./src/demux/transmuxer-interface.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"),a=i(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts"),o=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;s.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:o.ErrorTypes.OTHER_ERROR,details:o.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){s.logger.warn("Error in worker:",t),s.logger.error("Error while initializing DemuxerWorker, fallback to inline"),m&&self.URL.revokeObjectURL(m.objectURL),this.transmuxer=new a.default(this.observer,p,d,g,e),this.worker=null}}else this.transmuxer=new a.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,o,l,c,u,h){var d=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,g=o?o.start:n.start,m=n.decryptdata,v=this.frag,y=!(v&&n.cc===v.cc),b=!(v&&u.level===v.level),S=v?u.sn-v.sn:-1,E=this.part?u.part-this.part.index:1,C=!b&&(1===S||0===S&&1===E),k=self.performance.now();(b||S||0===n.stats.parsing.start)&&(n.stats.parsing.start=k),!o||!E&&C||(o.stats.parsing.start=k);var A=new a.TransmuxState(y,C,c,b,g);if(!C||y){s.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 x=new a.TransmuxConfig(i,r,e,l,h);this.configureTransmuxer(x)}if(this.frag=n,this.part=o,p)p.postMessage({cmd:"demux",data:t,decryptdata:m,chunkMeta:u,state:A},t instanceof ArrayBuffer?[t]:[]);else if(f){var w=f.push(t,m,u,A);Object(a.isPromise)(w)?w.then((function(t){d.handleTransmuxComplete(t)})):this.handleTransmuxComplete(w)}},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(a.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,i){"use strict";i.r(e),i.d(e,"default",(function(){return o}));var r=i(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),n=i(/*! ../events */"./src/events.ts"),a=i(/*! ../utils/logger */"./src/utils/logger.ts"),s=i(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function o(t){var e=new s.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 s=n.data;switch(s.cmd){case"init":var o=JSON.parse(s.config);t.transmuxer=new r.default(e,s.typeSupported,o,s.vendor,s.id),Object(a.enableLogs)(o.debug),i("init",null);break;case"configure":t.transmuxer.configure(s.config);break;case"demux":var c=t.transmuxer.push(s.data,s.decryptdata,s.chunkMeta,s.state);Object(r.isPromise)(c)?c.then((function(e){l(t,e)})):l(t,c);break;case"flush":var h=s.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,a=n.audio,s=n.video;a&&c(r,a),s&&c(r,s),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,i){"use strict";i.r(e),i.d(e,"default",(function(){return y})),i.d(e,"isPromise",(function(){return S})),i.d(e,"TransmuxConfig",(function(){return E})),i.d(e,"TransmuxState",(function(){return C}));var r,n=i(/*! ../events */"./src/events.ts"),a=i(/*! ../errors */"./src/errors.ts"),s=i(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),o=i(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.ts"),l=i(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.ts"),c=i(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.ts"),u=i(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.ts"),h=i(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),d=i(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.ts"),f=i(/*! ./chunk-cache */"./src/demux/chunk-cache.ts"),p=i(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),g=i(/*! ../utils/logger */"./src/utils/logger.ts");try{r=self.performance.now.bind(self.performance)}catch(t){g.logger.debug("Unable to use Performance API on this environment"),r=self.Date.now}var m=[{demux:c.default,remux:h.default},{demux:l.default,remux:d.default},{demux:o.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,i,r,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=i,this.vendor=r,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,i,n){var a=this,s=i.transmuxing;s.executeStart=r();var o=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 i=null;return t.byteLength>0&&null!=e&&null!=e.key&&null!==e.iv&&null!=e.method&&(i=e),i}(o,e);if(d&&"AES-128"===d.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(o,d.key.buffer,d.iv.buffer).then((function(t){var e=a.push(t,null,i);return a.decryptionPromise=null,e})),this.decryptionPromise;var g=f.softwareDecrypt(o,d.key.buffer,d.iv.buffer);if(!g)return s.executeEnd=r(),b(i);o=new Uint8Array(g)}var m=n||u,v=m.contiguous,y=m.discontinuity,S=m.trackSwitch,E=m.accurateTimeOffset,C=m.timeOffset,k=h.audioCodec,A=h.videoCodec,x=h.defaultInitPts,w=h.duration,T=h.initSegmentData;if((y||S)&&this.resetInitSegment(T,k,A,w),y&&this.resetInitialTimestamp(x),v||this.resetContiguity(),this.needsProbing(o,y,S)){if(l.dataLength){var L=l.flush();o=Object(p.appendUint8Array)(L,o)}this.configureTransmuxer(o,h)}var I=this.transmux(o,d,C,E,i),D=this.currentTransmuxState;return D.contiguous=!0,D.discontinuity=!1,D.trackSwitch=!1,s.executeEnd=r(),I},e.flush=function(t){var e=this,i=t.transmuxing;i.executeStart=r();var s=this.decrypter,o=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return e.flush(t)}));var u=[],h=l.timeOffset;if(s){var d=s.flush();d&&u.push(this.push(d,null,t))}var f=o.dataLength;o.reset();var p=this.demuxer,g=this.remuxer;if(!p||!g)return f>=v&&this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),i.executeEnd=r(),[b(t)];var m=p.flush(h);return S(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,a=e.avcTrack,s=e.id3Track,o=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,a,s,o,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,a=this.remuxer;n&&a&&(n.resetInitSegment(e,i,r),a.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),a=n.audioTrack,s=n.avcTrack,o=n.id3Track,l=n.textTrack;return{remuxResult:this.remuxer.remux(a,s,o,l,e,i,!1,this.id),chunkMeta:r}},e.transmuxSampleAes=function(t,e,i,r,n){var a=this;return this.demuxer.demuxSampleAes(t,e,i).then((function(t){return{remuxResult:a.remuxer.remux(t.audioTrack,t.avcTrack,t.id3Track,t.textTrack,i,r,!1,a.id),chunkMeta:n}}))},e.configureTransmuxer=function(t,e){for(var i,r=this.config,n=this.observer,a=this.typeSupported,s=this.vendor,o=e.audioCodec,c=e.defaultInitPts,u=e.duration,h=e.initSegmentData,f=e.videoCodec,p=0,v=m.length;p>4>1){if((D=T+5+e[T+4])===T+188)continue}else D=T+4;switch(I){case f:L&&(p&&(a=v(p))&&this.parseAVCPES(a,!1),p={data:[],size:0}),p&&(p.data.push(e.subarray(D,T+188)),p.size+=T+188-D);break;case y:L&&(S&&(a=v(S))&&(o.isAAC?this.parseAACPES(a):this.parseMPEGPES(a)),S={data:[],size:0}),S&&(S.data.push(e.subarray(D,T+188)),S.size+=T+188-D);break;case b:L&&(E&&(a=v(E))&&this.parseID3PES(a),E={data:[],size:0}),E&&(E.data.push(e.subarray(D,T+188)),E.size+=T+188-D);break;case 0:L&&(D+=e[D]+1),A=this._pmtId=g(e,D);break;case A:L&&(D+=e[D]+1);var R=m(e,D,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,r);(f=R.avc)>0&&(s.pid=f),(y=R.audio)>0&&(o.pid=y,o.isAAC=R.isAAC),(b=R.id3)>0&&(d.pid=b),C&&!k&&(u.logger.log("reparse from beginning"),C=!1,T=w-188),k=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"});s.pesData=p,o.pesData=S,d.pesData=E;var O={audioTrack:o,avcTrack:s,id3Track:d,textTrack:this._txtTrack};return n&&this.extractRemainingSamples(O),O},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,a=r.pesData,s=i.pesData,o=n.pesData;a&&(e=v(a))?(this.parseAVCPES(e,!0),r.pesData=null):r.pesData=a,s&&(e=v(s))?(i.isAAC?this.parseAACPES(e):this.parseMPEGPES(e),i.pesData=null):(null!=s&&s.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),i.pesData=s),o&&(e=v(o))?(this.parseID3PES(e),n.pesData=null):n.pesData=o},e.demuxSampleAes=function(t,e,i){var r=this.demux(t,i,!0,!this.config.progressive),n=this.sampleAes=new o.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,o=this.parseAVCNALu(t.data),l=this.avcSample,c=!1;t.data=null,l&&o.length&&!n.audFound&&(y(l,n),l=this.avcSample=p(!1,t.pts,t.dts,"")),o.forEach((function(e){switch(e.type){case 1:i=!0,l||(l=r.avcSample=p(!0,t.pts,t.dts,"")),l.frame=!0;var o=e.data;if(c&&o.length>4){var u=new a.default(o).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 a.default(S(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(),E=31&v,C=[v,h.readUByte()],k=0;k16){for(var A=[],x=0;x<16;x++)A.push(h.readUByte().toString(16)),3!==x&&5!==x&&7!==x&&9!==x||A.push("-");for(var w=f-16,T=new Uint8Array(w),L=0;L=0){var h={data:t.subarray(c,l-a-1),type:u};o.push(h)}else{var d=this.getLastNalUnit();if(d&&(s&&l<=4-s&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-s)),(i=l-a-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&&a>=0){var p={data:t.subarray(c,r),type:u,state:a};o.push(p)}if(0===o.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=a,o},e.parseAACPES=function(t){var e,i,n,a,s,o=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),o=d.missing}for(e=o,i=f.length;e1;){var l=new Uint8Array(o[0].length+o[1].length);l.set(o[0]),l.set(o[1],o[0].length),o[0]=l,o.splice(1,1)}if(1===((e=o[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-(a=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-a)/9e4)+"s delta between PTS and DTS, align them"),n=a):a=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=o.length;fg){h-=g;continue}e=e.subarray(h),g-=h,h=0}d.set(e,s),s+=g}return i&&(i-=r+3),{data:d,pts:n,dts:a,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 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,i){"use strict";i.r(e),i.d(e,"isSupported",(function(){return a})),i.d(e,"changeTypeSupported",(function(){return s}));var r=i(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function n(){return self.SourceBuffer||self.WebKitSourceBuffer}function a(){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"'),a=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!i&&!!a}function s(){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,i){"use strict";i.r(e),i.d(e,"default",(function(){return h})),i.d(e,"LoadError",(function(){return f}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../errors */"./src/errors.ts");function a(t){var e="function"==typeof Map?new Map:void 0;return(a=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 s(t,arguments,c(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,t)})(t)}function s(t,e,i){return(s=o()?Reflect.construct:function(t,e,i){var r=[null];r.push.apply(r,e);var n=new(Function.bind.apply(t,r));return i&&l(n,i.prototype),n}).apply(null,arguments)}function o(){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 i=this,r=t.url;if(!r)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 "+(r?"part list":"url")));this.abort();var a=this.config,s=a.fLoader,o=a.loader;return new Promise((function(r,l){i.loader&&i.loader.destroy();var c=i.loader=t.loader=s?new s(a):new o(a),h=d(t),p={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=c.stats,c.load(h,p,{onSuccess:function(e,n,a,s){i.resetLoader(t,c),r({frag:t,part:null,payload:e.data,networkDetails:s})},onError:function(e,r,a){i.resetLoader(t,c),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:e,networkDetails:a}))},onAbort:function(e,r,a){i.resetLoader(t,c),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:a}))},onTimeout:function(e,r,a){i.resetLoader(t,c),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:a}))},onProgress:function(i,r,n,a){e&&e({frag:t,part:null,payload:n,networkDetails:a})}})}))},e.loadPart=function(t,e,i){var r=this;this.abort();var a=this.config,s=a.fLoader,o=a.loader;return new Promise((function(l,c){r.loader&&r.loader.destroy();var h=r.loader=t.loader=s?new s(a):new o(a),p=d(t,e),g={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=h.stats,h.load(p,g,{onSuccess:function(n,a,s,o){r.resetLoader(t,h),r.updateStatsFromPart(t,e);var c={frag:t,part:e,payload:n.data,networkDetails:o};i(c),l(c)},onError:function(i,a,s){r.resetLoader(t,h),c(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:e,response:i,networkDetails:s}))},onAbort:function(i,a,s){t.stats.aborted=e.stats.aborted,r.resetLoader(t,h),c(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:e,networkDetails:s}))},onTimeout:function(i,a,s){r.resetLoader(t,h),c(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:e,networkDetails:s}))}})}))},e.updateStatsFromPart=function(t,e){var i=t.stats,r=e.stats,n=r.total;if(i.loaded+=r.loaded,n){var a=Math.round(t.duration/e.duration),s=Math.min(Math.round(i.loaded/n),a),o=(a-s)*Math.round(i.loaded/s);i.total=i.loaded+o}else i.total=Math.max(i.loaded,i.total);var l=i.loading,c=r.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 i=e||t,n={frag:t,part:e,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},a=i.byteRangeStartOffset,s=i.byteRangeEndOffset;return Object(r.isFiniteNumber)(a)&&Object(r.isFiniteNumber)(s)&&(n.rangeStart=a,n.rangeEnd=s),n}var f=function(t){var e,i;function r(e){for(var i,r=arguments.length,n=new Array(r>1?r-1:0),a=1;a>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=o.LevelKey.fromURI(t.uri)).method=t.method,i.iv=this.createInitializationVector(e),i.keyFormat="identity"),i},i.setElementaryStreamInfo=function(t,e,i,r,n,a){void 0===a&&(a=!1);var s=this.elementaryStreams,o=s[t];o?(o.startPTS=Math.min(o.startPTS,e),o.endPTS=Math.max(o.endPTS,i),o.startDTS=Math.min(o.startDTS,r),o.endDTS=Math.max(o.endDTS,n)):s[t]={startPTS:e,endPTS:i,startDTS:r,endDTS:n,partial:a}},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&&s.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,a){var s;(s=t.call(this,r)||this).fragOffset=0,s.duration=0,s.gap=!1,s.independent=!1,s.relurl=void 0,s.fragment=void 0,s.index=void 0,s.stats=new l.LoadStats,s.duration=e.decimalFloatingPoint("DURATION"),s.gap=e.bool("GAP"),s.independent=e.bool("INDEPENDENT"),s.relurl=e.enumeratedString("URI"),s.fragment=i,s.index=n;var o=e.enumeratedString("BYTERANGE");return o&&s.setByteRange(o,a),a&&(s.fragOffset=a.fragOffset+a.duration),s}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,i){"use strict";i.r(e),i.d(e,"default",(function(){return s}));var r=i(/*! ../events */"./src/events.ts"),n=i(/*! ../errors */"./src/errors.ts"),a=i(/*! ../utils/logger */"./src/utils/logger.ts"),s=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,s=this.loaders[n];if(i.decryptdata){var o=i.decryptdata.uri;if(o!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(s&&(a.logger.warn("abort previous key loader for type:"+n),s.abort()),!o)return void a.logger.warn("key uri is falsy");var c=l.loader,u=i.loader=this.loaders[n]=new c(l);this.decrypturl=o,this.decryptkey=null;var h={url:o,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 a.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})):a.logger.error("after key load, decryptdata unset")},e.loaderror=function(t,e){var i=e.frag,a=i.loader;a&&a.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,a=i.loader;a&&a.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,i){"use strict";i.r(e),i.d(e,"LevelDetails",(function(){return a}));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),a&&n(e,a),t}()},"./src/loader/level-key.ts": +/*!*********************************!*\ + !*** ./src/loader/level-key.ts ***! + \*********************************/ +/*! exports provided: LevelKey */function(t,e,i){"use strict";i.r(e),i.d(e,"LevelKey",(function(){return a}));var r=i(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js");function n(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=[],a={},s=!1;for(h.lastIndex=0;null!=(r=h.exec(e));)if(r[1]){var o=new l.AttrList(r[1]),c={attrs:o,bitrate:o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),name:o.NAME,url:t.resolve(r[2],i)},u=o.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((o.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"]&&(s=!0,a[d["DATA-ID"]]=d)}return{levels:n,sessionData:s?a:null}},t.parseMasterPlaylistMedia=function(e,i,r,n){var a;void 0===n&&(n=[]);var s=[],o=0;for(d.lastIndex=0;null!==(a=d.exec(e));){var c=new l.AttrList(a[1]);if(c.TYPE===r){var u={attrs:c,bitrate:0,id:o++,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")}s.push(u)}}return s},t.parseLevelPlaylist=function(t,e,i,u,h){var d,m,v,y=new s.LevelDetails(e),S=y.fragments,E=null,C=0,k=0,A=0,x=0,w=null,T=new a.Fragment(u,e),L=-1,I=!1;for(f.lastIndex=0,y.m3u8=t;null!==(d=f.exec(t));){I&&(I=!1,(T=new a.Fragment(u,e)).start=A,T.sn=C,T.cc=x,T.level=i,E&&(T.initSegment=E,T.rawProgramDateTime=E.rawProgramDateTime));var D=d[1];if(D){T.duration=parseFloat(D);var R=(" "+d[2]).slice(1);T.title=R||null,T.tagList.push(R?["INF",D,R]:["INF",D])}else if(d[3])Object(r.isFiniteNumber)(T.duration)&&(T.start=A,v&&(T.levelkey=v),T.sn=C,T.level=i,T.cc=x,T.urlId=h,S.push(T),T.relurl=(" "+d[3]).slice(1),b(T,w),w=T,A+=T.duration,C++,k=0,I=!0);else if(d[4]){var O=(" "+d[4]).slice(1);w?T.setByteRange(O,w):T.setByteRange(O)}else if(d[5])T.rawProgramDateTime=(" "+d[5]).slice(1),T.tagList.push(["PROGRAM-DATE-TIME",T.rawProgramDateTime]),-1===L&&(L=S.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;H&&(v=o.LevelKey.fromURL(e,z),z&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(H)>=0&&(v.method=H,v.keyFormat=Q,K&&(v.keyID=K),W&&(v.keyFormatVersions=W),v.iv=V));break;case"START":var Y=new l.AttrList(N).decimalFloatingPoint("TIME-OFFSET");Object(r.isFiniteNumber)(Y)&&(y.startTimeOffset=Y);break;case"MAP":var J=new l.AttrList(N);T.relurl=J.URI,J.BYTERANGE&&T.setByteRange(J.BYTERANGE),T.level=i,T.sn="initSegment",v&&(T.levelkey=v),T.initSegment=null,E=T,I=!0;break;case"SERVER-CONTROL":var q=new l.AttrList(N);y.canBlockReload=q.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=q.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&q.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=q.optionalFloat("PART-HOLD-BACK",0),y.holdBack=q.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var Z=new l.AttrList(N);y.partTarget=Z.decimalFloatingPoint("PART-TARGET");break;case"PART":var X=y.partList;X||(X=y.partList=[]);var $=k>0?X[X.length-1]:void 0,tt=k++,et=new a.Part(new l.AttrList(N),T,e,tt,$);X.push(et),T.duration+=et.duration;break;case"PRELOAD-HINT":var it=new l.AttrList(N);y.preloadHint=it;break;case"RENDITION-REPORT":var rt=new l.AttrList(N);y.renditionReports=y.renditionReports||[],y.renditionReports.push(rt);break;default:c.logger.warn("line parsed but not handled: "+d)}}}w&&!w.relurl?(S.pop(),A-=w.duration,y.partList&&(y.fragmentHint=w)):y.partList&&(b(T,w),T.cc=x,y.fragmentHint=T);var nt=S.length,at=S[0],st=S[nt-1];if((A+=y.skippedSegments*y.targetduration)>0&&nt&&st){y.averagetargetduration=A/nt;var ot=st.sn;y.endSN="initSegment"!==ot?ot:0,at&&(y.startCC=at.cc,at.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"),(T=new a.Fragment(u,e)).relurl=st.relurl,T.level=i,T.sn="initSegment",at.initSegment=T,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(A+=y.fragmentHint.duration),y.totalduration=A,y.endCC=x,L>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}}(S,L),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,i){"use strict";i.r(e);var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ../events */"./src/events.ts"),a=i(/*! ../errors */"./src/errors.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts"),o=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,a=e.deliveryDirectives;this.load({id:i,groupId:null,level:r,responseType:"text",type:c.PlaylistContextType.LEVEL,url:n,deliveryDirectives:a})},e.onAudioTrackLoading=function(t,e){var i=e.id,r=e.groupId,n=e.url,a=e.deliveryDirectives;this.load({id:i,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:n,deliveryDirectives:a})},e.onSubtitleTrackLoading=function(t,e){var i=e.id,r=e.groupId,n=e.url,a=e.deliveryDirectives;this.load({id:i,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:n,deliveryDirectives:a})},e.load=function(t){var e,i,r,n,a,o,l=this.hls.config,u=this.getInternalLoader(t);if(u){var h=u.context;if(h&&h.url===t.url)return void s.logger.trace("[playlist-loader]: playlist request ongoing");s.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,a=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,a=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(t),null!==(e=t.deliveryDirectives)&&void 0!==e&&e.part&&(t.type===c.PlaylistContextType.LEVEL&&null!==t.level?o=this.hls.levels[t.level].details:t.type===c.PlaylistContextType.AUDIO_TRACK&&null!==t.id?o=this.hls.audioTracks[t.id].details:t.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==t.id&&(o=this.hls.subtitleTracks[t.id].details),o)){var d=o.partTarget,f=o.targetduration;d&&f&&(r=Math.min(1e3*Math.max(3*d,.8*f),r))}var p={timeout:r,maxRetry:i,retryDelay:n,maxRetryDelay:a,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 a=this.hls,o=t.data,c=h(t,i),d=l.default.parseMasterPlaylist(o,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(o,c,"AUDIO",g),y=l.default.parseMasterPlaylistMedia(o,c,"SUBTITLES",m),b=l.default.parseMasterPlaylistMedia(o,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(t){return!t.url}))||!f[0].audioCodec||f[0].attrs.AUDIO||(s.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:""}))),a.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,s){var o=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 S={attrs:new u.AttrList({}),bitrate:0,details:b,name:"",url:g};o.trigger(n.Events.MANIFEST_LOADED,{levels:[S],audioTracks:[],url:g,stats:e,networkDetails:s,sessionData:null})}if(e.parsing.end=performance.now(),b.needSidxRanges){var E,C=null===(E=b.fragments[0].initSegment)||void 0===E?void 0:E.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,s)}else o.trigger(n.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.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(o.parseSegmentIndex)(new Uint8Array(t.data));if(i){var r=i.references,n=e.levelDetails;r.forEach((function(t,e){var r=t.info,a=n.fragments[e];0===a.byteRange.length&&a.setByteRange(String(1+r.end-r.start)+"@"+String(r.start)),a.initSegment&&a.initSegment.setByteRange(String(i.moovEndOffset)+"@0")}))}},e.handleManifestParsingError=function(t,e,i,r){this.hls.trigger(n.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.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),s.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 o=a.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(t);switch(t.type){case c.PlaylistContextType.MANIFEST:o=i?a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:a.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:o=i?a.ErrorDetails.LEVEL_LOAD_TIMEOUT:a.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:o=i?a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:o=i?a.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:a.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(t.type);var h={type:a.ErrorTypes.NETWORK_ERROR,details:o,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 a=i.type,s=i.level,o=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)),a){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(n.Events.LEVEL_LOADED,{details:h,level:s||0,id:o||0,stats:e,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(n.Events.AUDIO_TRACK_LOADED,{details:h,id:o||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:o||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,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,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,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]),a=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=a,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 s=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,s,l,s,o),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,o[1]=e>>16&255,o[2]=e>>8&255,o[3]=255&e,o.set(t,4),a=0,e=8;a>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,a>>24,a>>16&255,a>>8&255,255&a,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)),a=Math.floor(i%(r+1)),s=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,a>>24,a>>16&255,a>>8&255,255&a,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,s)},t.sdtp=function(e){var i,r,n=e.samples||[],a=new Uint8Array(4+n.length);for(i=0;i>>8&255),a.push(255&n),a=a.concat(Array.prototype.slice.call(r));for(i=0;i>>8&255),s.push(255&n),s=s.concat(Array.prototype.slice.call(r));var o=t.box(t.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|e.sps.length].concat(a).concat([e.pps.length]).concat(s))),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]),o,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,a=e.width,s=e.height,o=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,o>>24,o>>16&255,o>>8&255,255&o,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,a>>8&255,255&a,0,0,s>>8&255,255&s,0,0]))},t.traf=function(e,i){var n=t.sdtp(e),a=e.id,s=Math.floor(i/(r+1)),o=Math.floor(i%(r+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,o>>24,o>>16&255,o>>8&255,255&o])),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,a,s,o,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,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.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,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"),a=i(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),s=i(/*! ../events */"./src/events.ts"),o=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,a,s,o){var u,h,d,f,p,g,v=n,y=n,b=t.pid>-1,S=e.pid>-1,E=e.samples.length,C=t.samples.length>0,k=E>1;if((!b||C)&&(!S||k)||this.ISGenerated||s){this.ISGenerated||(d=this.generateIS(t,e,n));var A=this.isVideoContiguous,x=-1;if(k&&(x=function(t){for(var e=0;e0){l.logger.warn("[mp4-remuxer]: Dropped "+x+" out of "+E+" video samples due to a missing keyframe");var w=this.getVideoStartPts(e.samples);e.samples=e.samples.slice(x),e.dropped+=x,y+=(e.samples[0].pts-w)/(e.timescale||9e4)}else-1===x&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+E+" video samples"),g=!1);if(this.ISGenerated){if(C&&k){var T=this.getVideoStartPts(e.samples),L=(m(t.samples[0].pts,T)-T)/e.inputTimeScale;v+=Math.max(0,L),y+=Math.max(0,-L)}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,a,S||k||o===c.PlaylistLevelType.AUDIO?y:void 0),k){var I=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,A,I)}}else k&&(u=this.remuxVideo(e,y,A,0));u&&(u.firstKeyFrame=x,u.independent=-1!==x)}}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,s,o,l=t.samples,c=e.samples,u=this.typeSupported,h={},d=!Object(r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(n=s=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):a.default.initSegment([t]),metadata:{channelCount:t.channelCount}},d&&(o=t.inputTimeScale,n=s=l[0].pts-Math.round(o*i))),e.sps&&e.pps&&c.length&&(e.timescale=e.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:e.codec,initSegment:a.default.initSegment([e]),metadata:{width:e.width,height:e.height}},d)){o=e.inputTimeScale;var p=this.getVideoStartPts(c),g=Math.round(o*i);s=Math.min(s,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=s),{tracks:h,initPTS:n,timescale:o}},e.remuxVideo=function(t,e,i,r){var n,c,f,g=t.inputTimeScale,y=t.samples,b=[],S=y.length,E=this._initPTS,C=this.nextAvcDts,k=8,A=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY,w=0,T=!1;i&&null!==C||(C=e*g-(y[0].pts-m(y[0].dts,y[0].pts)));for(var L=0;LI.pts&&(w=Math.max(Math.min(w,I.pts-I.dts),-18e3)),I.dts0?L-1:L].dts&&(T=!0)}T&&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 D=Math.round((f-c)/(S-1));if(w<0){if(w<-2*D){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-D,!0)+" ms");for(var R=w,O=0;OD;if(P||N<-1){P?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(N,!0)+" ms ("+N+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-N,!0)+" ms ("+N+"dts) overlapping between fragments detected"),c=C;var B=y[0].pts-N;y[0].dts=c,y[0].pts=B,l.logger.log("Video: First PTS/DTS adjusted: "+Object(u.toMsFromMpegTsClock)(B,!0)+"/"+Object(u.toMsFromMpegTsClock)(c,!0)+", delta: "+Object(u.toMsFromMpegTsClock)(N,!0)+" ms")}}p&&(c=Math.max(0,c));for(var F=0,_=0,j=0;j0?Y-1:Y].dts;if(rt.stretchShortVideoTrack&&null!==this.nextAudioPts){var at=Math.floor(rt.maxBufferHole*g),st=(r?A+r*g:this.nextAudioPts)-J.pts;st>at?((n=st-nt)<0&&(n=nt),l.logger.log("[mp4-remuxer]: It is approximately "+st/90+" ms to the next segment; using duration "+n/90+" ms for the last video frame.")):n=nt}else n=nt}var ot=Math.round(J.pts-J.dts);b.push(new v(J.key,n,Z,ot))}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:a.default.moof(t.sequenceNumber++,c,h({},t,{samples:b})),data2:W,startPTS:A/g,endPTS:(x+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(W.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=[],S=t.samples,E=y?0:8,C=this.nextAudioPts||-1,k=e*u;if(this.isAudioContiguous=i=i||S.length&&C>0&&(r&&Math.abs(k-C)<9e3||Math.abs(m(S[0].pts-g,k)-C)<20*p),S.forEach((function(t){t.pts=m(t.pts-g,k)})),!i||C<0){if(!(S=S.filter((function(t){return t.pts>=0}))).length)return;C=0===c?0:r?Math.max(0,k):S[0].pts}if(t.isAAC)for(var A=void 0!==c,x=this.config.maxAudioFramesDrift,w=0,T=C;w=x*p&&R<1e4&&A){var O=Math.round(D/p);(T=I-O*p)<0&&(O--,T+=p),0===w&&(this.nextAudioPts=C=T),l.logger.warn("[mp4-remuxer]: Injecting "+O+" audio frame @ "+(T/u).toFixed(3)+"s due to "+Math.round(1e3*D/u)+" ms gap.");for(var M=0;M0))return;j+=E;try{B=new Uint8Array(j)}catch(t){return void this.observer.emit(s.Events.ERROR,s.Events.ERROR,{type:o.ErrorTypes.MUX_ERROR,details:o.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:j,reason:"fail allocating audio mdat "+j})}y||(new DataView(B.buffer).setUint32(0,j),B.set(a.default.types.mdat,4))}B.set(V,E);var K=V.byteLength;E+=K,b.push(new v(!0,f,K,0)),_=W}var Q=b.length;if(Q){var Y=b[b.length-1];this.nextAudioPts=C=_+d*Y.duration;var J=y?new Uint8Array(0):a.default.moof(t.sequenceNumber++,F/d,h({},t,{samples:b}));t.samples=[];var q=F/u,Z=C/u,X={data1:J,data2:B,startPTS:q,endPTS:Z,startDTS:q,endDTS:Z,type:"audio",hasAudio:!0,hasVideo:!1,nb:Q};return this.isAudioContiguous=!0,console.assert(B.length,"MDAT length must not be zero"),X}},e.remuxEmptyAudio=function(t,e,i,r){var a=t.inputTimeScale,s=a/(t.samplerate?t.samplerate:a),o=this.nextAudioPts,c=(null!==o?o:r.startDTS*a)+this._initDTS,u=r.endDTS*a+this._initDTS,h=1024*s,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,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"),a=i(/*! ../loader/fragment */"./src/loader/fragment.ts"),s=i(/*! ../utils/logger */"./src/utils/logger.ts"),o=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,a.ElementaryStreamTypes.AUDIO)),i||(i=c(r.video,a.ElementaryStreamTypes.VIDEO));var o={};r.audio&&r.video?o.audiovideo={container:"video/mp4",codec:e+","+i,initSegment:t,id:"main"}:r.audio?o.audio={container:"audio/mp4",codec:e,initSegment:t,id:"audio"}:r.video?o.video={container:"video/mp4",codec:i,initSegment:t,id:"main"}:s.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=o},e.remux=function(t,e,i,a,o){var c=this.initPTS,u=this.lastEndDTS,h={audio:void 0,video:void 0,text:a,id3:i,initSegment:void 0};Object(r.isFiniteNumber)(u)||(u=this.lastEndDTS=o||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 s.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:(s.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!p.audio,b=!!p.video,S="";y&&(S+="audio"),b&&(S+="video");var E={data1:d,startPTS:m,startDTS:m,endPTS:v,endDTS:v,type:S,hasAudio:y,hasVideo:b,nb:1,dropped:0};return h.audio="audio"===E.type?E:void 0,h.video="audio"!==E.type?E:void 0,h.text=a,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===a.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}e.default=o},"./src/task-loop.ts": +/*!**************************!*\ + !*** ./src/task-loop.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,i){"use strict";i.r(e),i.d(e,"CMCDVersion",(function(){return s})),i.d(e,"CMCDObjectType",(function(){return r})),i.d(e,"CMCDStreamingFormat",(function(){return n})),i.d(e,"CMCDStreamType",(function(){return a}));var r,n,a,s=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"}(a||(a={}))},"./src/types/level.ts": +/*!****************************!*\ + !*** ./src/types/level.ts ***! + \****************************/ +/*! exports provided: HlsSkip, getSkipValue, HlsUrlParameters, Level */function(t,e,i){"use strict";function r(t,e){for(var i=0;iNumber.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,i){"use strict";i.r(e),e.default={search:function(t,e){for(var i=0,r=t.length-1,n=null,a=null;i<=r;){var s=e(a=t[n=(i+r)/2|0]);if(s>0)i=n+1;else{if(!(s<0))return a;r=n-1}}return null}}},"./src/utils/buffer-helper.ts": +/*!************************************!*\ + !*** ./src/utils/buffer-helper.ts ***! + \************************************/ +/*! exports provided: BufferHelper */function(t,e,i){"use strict";i.r(e),i.d(e,"BufferHelper",(function(){return a}));var r=i(/*! ./logger */"./src/utils/logger.ts"),n={length:0,start:function(){return 0},end:function(){return 0}},a=function(){function t(){}return t.isBuffered=function(e,i){try{if(e)for(var r=t.getBuffered(e),n=0;n=r.start(n)&&i<=r.end(n))return!0}catch(t){}return!1},t.bufferInfo=function(e,i,r){try{if(e){var n,a=t.getBuffered(e),s=[];for(n=0;ns&&(r[a-1].end=t[n].end):r.push(t[n])}else r.push(t[n])}else r=t;for(var o,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=[],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=s(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,a,s=!1;this.logger.time=t;for(var o=0;o ("+f([n,a])+")"),(i=this.parseCmd(n,a))||(i=this.parseMidrow(n,a)),i||(i=this.parsePAC(n,a)),i||(i=this.parseBackgroundAttributes(n,a)),!i&&(s=this.parseChars(n,a))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(s):this.logger.log(r.WARNING,"No channel found yet. TEXT-MODE?")}i||s||this.logger.log(r.WARNING,"Couldn't parse cleaned data "+f([n,a])+" orig: "+f([e[o],e[o+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(E(t,e,i))return S(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,a=this.channels[n];return 20===t||21===t||28===t||29===t?32===e?a.ccRCL():33===e?a.ccBS():34===e?a.ccAOF():35===e?a.ccAON():36===e?a.ccDER():37===e?a.ccRU(2):38===e?a.ccRU(3):39===e?a.ccRU(4):40===e?a.ccFON():41===e?a.ccRDC():42===e?a.ccTR():43===e?a.ccRTD():44===e?a.ccEDM():45===e?a.ccCR():46===e?a.ccENM():47===e&&a.ccEOC():a.ccTO(e-32),S(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(E(t,e,r))return S(null,null,r),!0;var n=t<=23?1:2;i=e>=64&&e<=95?1===n?o[t]:c[t]:1===n?l[t]:u[t];var a=this.channels[n];return!!a&&(a.setPAC(this.interpretPAC(i,e)),S(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,a=null,o=null;if(t>=25?(i=2,o=t-8):(i=1,o=t),o>=17&&o<=19?(n=17===o?e+80:18===o?e+112:e+144,this.logger.log(r.INFO,"Special char '"+s(n)+"' in channel "+i),a=[n]):t>=32&&t<=127&&(a=0===e?[t]:[t,e]),a){var l=f(a);this.logger.log(r.DEBUG,"Char codes = "+l.join(",")),S(t,e,this.cmdHistory)}return a},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),S(t,e,this.cmdHistory),!0},e.reset=function(){for(var t=0;t=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(a.addCueToTrack)(t,e)}))),f}};e.default=o},"./src/utils/discontinuities.ts": +/*!**************************************!*\ + !*** ./src/utils/discontinuities.ts ***! + \**************************************/ +/*! exports provided: findFirstFragWithCC, shouldAlignOnDiscontinuities, findDiscontinuousReferenceFrag, adjustSlidingStart, alignStream, alignPDT, alignFragmentByPDTDelta, alignMediaPlaylistByPDT */function(t,e,i){"use strict";i.r(e),i.d(e,"findFirstFragWithCC",(function(){return s})),i.d(e,"shouldAlignOnDiscontinuities",(function(){return o})),i.d(e,"findDiscontinuousReferenceFrag",(function(){return l})),i.d(e,"adjustSlidingStart",(function(){return u})),i.d(e,"alignStream",(function(){return h})),i.d(e,"alignPDT",(function(){return d})),i.d(e,"alignFragmentByPDTDelta",(function(){return f})),i.d(e,"alignMediaPlaylistByPDT",(function(){return p}));var r=i(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=i(/*! ./logger */"./src/utils/logger.ts"),a=i(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function s(t,e){for(var i=null,r=0,n=t.length;ri.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": +/*!***************************!*\ + !*** ./src/utils/ewma.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,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"),a=i(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function s(t){var e="function"==typeof Map?new Map:void 0;return(s=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 o(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 o(t,e,i){return(o=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,s.flush(),t)):n(e,i,l,t),a()})).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}(s(Error));e.default=f},"./src/utils/imsc1-ttml-parser.ts": +/*!****************************************!*\ + !*** ./src/utils/imsc1-ttml-parser.ts ***! + \****************************************/ +/*! exports provided: IMSC1_CODEC, parseIMSC1 */function(t,e,i){"use strict";i.r(e),i.d(e,"IMSC1_CODEC",(function(){return u})),i.d(e,"parseIMSC1",(function(){return p}));var r=i(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),n=i(/*! ./vttparser */"./src/utils/vttparser.ts"),a=i(/*! ./vttcue */"./src/utils/vttcue.ts"),s=i(/*! ../demux/id3 */"./src/demux/id3.ts"),o=i(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=i(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function c(){return(c=Object.assign||function(t){for(var e=1;e"):r}function o(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]=i>>16&255,t[e+2]=i>>8&255,t[e+3]=255&i}function h(t,e){var i,r,n,a=[];if(!e.length)return a;"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(o(i.subarray(l+4,l+8))===e[0])if(1===e.length)a.push({data:i,start:l+8,end:d});else{var f=h({data:i,start:l+8,end:d},e.slice(1));f.length&&s.apply(a,f)}l=d}return a}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=[],a=r[0],s=a.data[0],o=0===s?8:16,u=c(a,o);o+=4,o+=0===s?8:16,o+=2;var d=a.end+0,f=l(a,o);o+=2;for(var p=0;p>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(a,g);g+=4,n.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/u,start:d,end:d+v-1}}),d+=v,o=g+=4}return{earliestPresentationTime:0,timescale:u,version:s,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=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,i){"use strict";i.r(e),i.d(e,"sendAddTrackEvent",(function(){return n})),i.d(e,"addCueToTrack",(function(){return a})),i.d(e,"clearCurrentCues",(function(){return s})),i.d(e,"removeCuesInRange",(function(){return o})),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 a(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 s(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 o(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),a=0;at[i].endTime)return-1;for(var r=0,n=i;r<=n;){var a=Math.floor((n+r)/2);if(et[a].startTime&&r-1)for(var a=n,s=t.length;a=e&&o.endTime<=i)r.push(o);else if(o.startTime>i)return r}return r}},"./src/utils/time-ranges.ts": +/*!**********************************!*\ + !*** ./src/utils/time-ranges.ts ***! + \**********************************/ +/*! exports provided: default */function(t,e,i){"use strict";i.r(e),e.default={toString:function(t){for(var e="",i=t.length,r=0;r1?e-1:0),r=1;r100)throw new Error("Position must be between 0 and 100.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",n({},l,{get:function(){return S},set:function(t){var e=r(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");S=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",n({},l,{get:function(){return E},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");E=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"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}})),o.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}()},"./src/utils/vttparser.ts": +/*!********************************!*\ + !*** ./src/utils/vttparser.ts ***! + \********************************/ +/*! exports provided: parseTimeStamp, fixLineBreaks, VTTParser */function(t,e,i){"use strict";i.r(e),i.d(e,"parseTimeStamp",(function(){return a})),i.d(e,"fixLineBreaks",(function(){return h})),i.d(e,"VTTParser",(function(){return d}));var r=i(/*! ./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 a(t){function e(t,e,i,r){return 3600*(0|t)+60*(0|e)+(0|i)+parseFloat(r||0)}var i=t.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return i?parseFloat(i[2])>59?e(i[2],i[3],0,i[4]):e(i[1],i[2],i[3],i[4]):null}var s=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 o(t,e,i,r){var n=r?t.split(r):[t];for(var a in n)if("string"==typeof n[a]){var s=n[a].split(i);2===s.length&&e(s[0],s[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=a(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 s;o(t,(function(t,e){var n;switch(t){case"region":for(var a=i.length-1;a>=0;a--)if(i[a].id===e){r.set(t,i[a].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 a=r.get("position","auto");"auto"===a&&50===l.position&&(a="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=a}(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,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(a.utf8ArrayToStr)(new Uint8Array(t)).trim().replace(l,"\n").split("\n"),b=[],S=Object(s.toMpegTsClockFromTimescale)(e,i),E="00:00.000",C=0,k=0,A=!0,x=!1;v.oncue=function(t){var e=u[d],i=u.ccOffset,r=(C-S)/9e4;if(null!=e&&e.new&&(void 0!==k?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!==(a=n)&&void 0!==a&&a.new;){var a;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),x){var n=t.endTime-t.startTime,a=Object(o.normalizePts)(9e4*(t.startTime+i-k),9e4*f)/9e4;t.startTime=a,t.endTime=a+n}var s=t.text.trim();t.text=decodeURIComponent(encodeURIComponent(s)),t.id||(t.id=h(t.startTime,t.endTime,s)),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(A){if(c(t,"X-TIMESTAMP-MAP=")){A=!1,x=!0,t.substr(16).split(",").forEach((function(t){c(t,"LOCAL:")?E=t.substr(6):c(t,"MPEGTS:")&&(C=parseInt(t.substr(7)))}));try{k=function(t){var e=parseInt(t.substr(-3)),i=parseInt(t.substr(-6,2)),n=parseInt(t.substr(-9,2)),a=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)(a)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+t);return e+=1e3*i,e+=6e4*n,e+=36e5*a}(E)/1e3}catch(t){x=!1,m=t}return}""===t&&(A=!1)}v.parse(t+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts": +/*!*********************************!*\ + !*** ./src/utils/xhr-loader.ts ***! + \*********************************/ +/*! 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"),a=/^age:\s*[\d.]+\s*$/m,s=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 a=this.context.headers;if(a)for(var s in a)i.setRequestHeader(s,a[s])}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,a=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 s=e.status;if(s>=200&&s<300){var o,l;if(i.loading.end=Math.max(self.performance.now(),i.loading.first),l="arraybuffer"===t.responseType?(o=e.response).byteLength:(o=e.responseText).length,i.loaded=i.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(i,t,o,e),!this.callbacks)return;var u={url:e.responseURL,data:o};this.callbacks.onSuccess(u,i,t,e)}else i.retry>=a.maxRetry||s>=400&&s<499?(r.logger.error(s+" while loading "+t.url),this.callbacks.onError({code:s,text:e.statusText},t,e)):(r.logger.warn(s+" 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,a.maxRetryDelay),i.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.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&&a.test(this.loader.getAllResponseHeaders())){var e=this.loader.getResponseHeader("age");t=e?parseFloat(e):null}return t},t}();e.default=s}}).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,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,i){"use strict";i.d(e,"c",(function(){return o})),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"),a=i.n(n),s=i(/*! @/utils/fetch */"ErOA");function o(t){return Object(s.c)("libraries/".concat(t,".json"))}function l(){return Object(s.c)("library_tags.json")}function c(t){return u.apply(this,arguments)}function u(){return(u=Object(r.a)(a.a.mark((function t(e){var i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(s.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(s.f)("libraries.json",t)}function d(t,e){return Object(s.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,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")),a=i(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),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/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,S=t.title,E=void 0===S?"文件上传":S,C=t.accept,k={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},E),d.a.createElement("span",{onClick:function(t){t.preventDefault(),t.stopPropagation()},style:{marginLeft:10}},"(单个文件最大",b,"M) ")))}},yslc: +/*!*********************************************!*\ + !*** ./src/assets/images/icons/groups3.png ***! + \*********************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAOHklEQVR4Xu1dCXQURRr+emZyTO6D3BCEgKCInCKeK3IoiyIqlxLyQBRBV8DNhCCrS3Z9Cq66KOoi68ECKocCcutTLhUERM1MEpBLEuQmQMKEnDNd+6onEzKTuXqmJ5l0V/EeL+mp+qu+r77UVP1V9TcHffZbIJgOlhgDMmaAA8lTwVDxJQh5UMY4GTSFM8AJ+PW6cIDsBEEfhfPB4MuUAYvQaTowOwV1NXtB0E6mWBksBTNwTeiUBENud/CmHwBEKZgTBl2GDNgKnQIsyBkCM9kEEI0M8TJICmWgqdCFkT17MngsUignDLYMGXAsdAo0XzcPILkyxMwgKZAB50InhIMhZxUIGalAXhhkmTHgXOgU6PG8UFwxbgdBf5nhZnAUxoBroVMyjryQgMraPSDoqDBuGFwZMeBe6MLi9IWuIHW7QUisjLAzKApiwDOhC25H3T3g8TUICVYQPwyqTBjwXOgUsD4nC4RfIhPsDIaCGBAndEHsujwQMkdBHDGoMmBAvNAtPvZlAMmUAX4GQSEMeCf0wrxgmCu+ASF3K4QnBrOVM+Cd0Cnoorw4mIw/guD6Vs4Ba74CGPBe6IInJicDZn4PgDYK4IpBbMUM+CZ0Qey5t4M3bwUhoa2YB4dNT1CHIzkoEkZzDYrrLtvkCeU0aBsULTw7WntRbtARoQrGbWHtBVw/Vpaggq9t1Rh9F7qwOM0ZA45fDgJp7PmJ0i4hCegU3AabjAc9qmF24r14JeXP+MZ4GEN+/69NmVvD0rGn8zThWYghF7XE7JFN+0wL0x5BQfVZLL60D1XE5JUNfxTqEZqC/C7Zgumeh96EvvqMP6ppNpvSCTM/ZxbAz222lousqGtIAnZkPIMETThmndmM1y/scGvB30KfFNcPH7YbLbRjwokVWHJ5v/CzltMgWq112z5HGXgQnDdVeFW2cSEmdFcU6nUfgpBJPrPsBwPhqmCsSM/EA9E3CtaXXPoJk09+4XIk9qfQrwuKhaFLNiLVodh7tQS3HX0HpB735Lj+WNTOu0Ojl0yViC/6u88MMqG7opDkaWCo2AJCBvnMtB8MqMFhQdoIPNPmDsH6+vIijCxegjrwDmvzl9BV4LAtYwr+FJEBEzHj1iML8EvVqYY2MKFL3/nSTV2sbTuWGw2jaReAbtI3VxqLuQkDMC91mGBsXXkhRhUvFcQeBBViNWENlcxocxdeSBqInRXHMLpkmU3lfbRtsbnjk8KzdgdetvlmKDVdBZ1COEuvJA/F7KSBwsfPnVyLdy9Suq6lOLUWafULXbGITYTHwZrzYos1yc9GdE8oPJDdHnXcHhCS7En2lsgzJ2kw8pLvA094YaG5teIoBoRnYFunqT43J6koz+E8mX6jLGz7KJ6KtxzvpwvQJ/5Y5XN9nhp4NLo7empTPcqepIlsaOcHF/fgnMnoUbmi6nNYUZbvUd7mzCT9iG5tfcHMvjDzOwFybYhsTmQe1PVGygPClOGzsl+F3P4UOl0jrGyfiWFRljXCBjptKlnqtbfGA3hNsixLfwyZsf4N3bO6zCDgCrTkP6FTpAbdQyBYA0JUgQbcUXvoiEsFaU26hHvwUvJgbK84ihHHF9sU6RvWDlszpgjPEgr/biNYI19jM3FJ0kRgY4dJoGVo+rxMj3ElnzasDai/flBkZ3xeZoDJyXpBCv6sQj9XZ4TBjbswUhWC/uEWP/qeqyWgmFylm0KTkRIUBWUKnTKj180AIfOl6KjmtiHVYnRB6gg8l3Cn0Pz/lO7CtFNfwtzoT2HtdRMwIvom6KtOo8/h+TafSYnZKnT6h2a/5rCvR+wcfUm7sciK66tgoVMG87PfBfCslJ3WHLZeTByEl1Pux8byA3iw+GObKsVsGD0U1Q2fpj8uuDOt0ySrsYmxt+Dj9DHCrxNPrMD/6n3p/sDHhO4PVhvbJKvU0O9bBxCLq6MFUhgX5LBWOlVwtqv5r5RhyEkcgE8v/4LME595LXQ6HUoPimniDWnsS6dz9uHFi4V1gtWb4wtNtL2rywtsTDCh+8Kop2UL8yJgNn4Hgl6eFpEqHz23Yez+qkNzruaUH7QdhSfjbxWmG8+eWuu10B1VTH3p2zOm4O6IDFw0XUW3Q6/jnKkCAyM64dv6ub8v+McUL8Oqcj0Tej0D/l2M2vfUbzNTUcPvBSFtfelEsWW9FfoX7bPwaMzNmHtuK2af3SKp0F9NHir46GkaXbwUn5cbhJ/bqMNwW/h1biF2CI7D22kjhHxTT67GqbpymzI/V57EadMVJvQWETqttDC3B8zm70FIpNvelDAD3YRpnGa0uVvwqFhHdDrnzoztbZNneFQ3pAfHClv0P1X9YfMZ9TOPiukhPFtYuhtmO2/JS2e+Qhlf3QSBBirBl06/KWj61ngYg+0OjHkCu/Fisctv83C4ptRtMTZ1cUuRxBn0ugdByHqJrYoyNytxAOamDGsQ+oTYvlicPlaUDVeZ6W7pSbtRlrrsVrUfj/ujujYU/eTyzxh/YrnoehsLvetvr+FQzQW3NpjQ3VIkcYb8nH8D/PMSWxVlzl7o9Oz1hLhbGmwkayIxPLobCCH4+NK+Ji6/RE2E4BKk6aOLe5t8PuvMJlw2VzXYS9VEYVPHSeipTROemQkPNacCE7qobvM6c/PO0WkzC3SZMBPbgyNeN9/7gvZCt7f0z6T7hKkNPedyz7GFTSoS4168MSQJX3V8Cu2CYwQ7b5zfgdSgKDwe21sSoYudurANI+9141lJQ3YfEO6HQLiN5ErodIe05MYXhYNVT5xYicWXf/JJ6COiumFth4m4aq7BpJOrsLJMD+sGixQjulihe9ZZ3uVS7s6olS+9LhEg+wPl1TGuhP5A1A3Y0GESKvla0ANajq6RiRnRqddnb+dpGFvyiXCbiKaWFPrB6nNYXe/lcSZnsYe6Hoq6Cd21KQrfGSWLgmA4Qu+V3uXdOCF9KWdCp/7tbzOexoCITlh2aT+y/ljhsHIxQqcGgjm1zcZUSwqdHQGQXk8Wi/qchSC85QRUgCRnQl/UdiQmx/cXFqF3HX0PuyqLJRG6vZGWEPro6B7opU2Dofo0lrs5Siv2rMuo6JvRW9sWBdVnmhxzCIQu9/9i1KB7CjyxvVkcAMgdCb3xhYi/nlqP+aXfOW2p2BE9EIQuhnaxQhdjuyXy+lfollAY2wMxAq/14oV18RSvDsPxG2YLdzgXXPge00+vc9kfTOgtIVfv6/Sf0C3b/T8H4i2jJ+P64d20RxCi0qCGN2FMyTKsu1KEx2J6CrudI4uXurwKR+lmQvdedC1R0j9CP7IgBFdL6Pd+v5YA5arO+anDMSPBEjKyzFyFGLVWuE73t7NbMO/8dtAtek8uP3QLScJH9aEq7jz6nkdlGrerJeboYvqCTV08YSs/m17HmeBJ1ubMMy6mFz5pP06ocvaZzZh3fhueib8d76Q9DI7jsPzyr5hz9mscqXV/bsTXdvsqdHo5e//1M4RmeOpHF9NmJnR3bOl100DI2+6yNffnnYPb4Jfrn0eEOgTvl+7G1FNrGppA/wDoOZcgTi08O1pTiiM1F3DWZASNk0JHeHq7nm7b09v99H4//Z+O/nQbX8OpoIZKKB/CqaFVBWFdeRHWXil0CtNTodPIBF1DE1HF16GSr0MVqQM9M5OXPAQT4/oJ4TKSi/6Bi+ZKSSllQndFJ339ixnfBOJbp3dkTBXiqNDNkt6H56PaLvxbL20q5iQNAT2xSEd3X9PQ3z/AV8ZDkgj9SvdXEKpyfHHEemHD1/bal2dCd8YoDXFRCxpTLSAj6/YMTRVu7tAYLs584xRatCoUPbSp6BqSiFi1FtHqUISpgqHmOGHUpiM4PSKg4jjQf87S9FNf4oqLC8WejujU/u5Of2lyRp1e1th85SDevLDTL3ERmdAd9ezpvDCcr9gFkJ5SjyxS2qMiLndwRlzKOjy1Ra/RxWvChdtF9pF67W3QIwR0Z7VxKjdX++0SNa2HXgAZG2O5DLai7FeUSjw18pQnqfL5/h1NW6LXLQch0h3mlgods8MYqGfAd6EbcmaC519jjDIGApkB34Sen3sfOPPm1hKgKJA7grXNvwx4L/SiWZ1gMu1jb5P2bwcx69Iw4J3QaegKk5G+uyhgI+ZKQw+zIhcGxAudEA56Hd1tscRaYIkx0AoYEC90vW4OCMlrBdhYExkDDQyIE7oQHZesDfSXcrH+ZQzYM+C50Atm3gBeiLLVrIGHWJcxBqRgwDOhH8+LQXnFPoB0lqJSZoMx0NwMuBc6yVPBULERhAxt7sax+hgDUjHgXuiG7LngMUuqCpkdxkBLMOBa6AW60TCTlS3RMFYnY0BKBpwLnUa9NZl3B/LLtqQkgtmSNwOOhX7whXjU1NKz5e4DdcubH4ZOJgw0Fbrl7c9fg5B7ZYKRwWAMOLgio89+CwTTGTeMATkxYDui63OyQPglcgLIsDAGKAPXhF6YfQvM3HeBENKZdQ1jQGoGLEIvmJ0EvnZ/c79ES2owzB5jwBkDHGhIZ/2R7QC5g9HEGJArAxzyde8D5Gm5AmS4GAO2c3TGB2OgFTLALR1KA6e5SByvUpEp7s+6tELwrMnKYcCl0DmYVOCyzOM3L2dCV44mZInUhdBrVFCPMmdt3MCmLrLsemWBcih0DlfVBMNNWVu2WdlgI7qydCE7tE2FzpVpVOqhdZkbaJSKhsSELruuVxYgG6FzOK+Bekjd+I16exaY0JWlC9mhbRA6h5PBCBpUM369w1jdTOiy63plAaoX+rEQNTewetzmEmfomdCVpQvZoeWWDi3UctrBlePXnHHpTZcdcgZIUQxErnk43vjI2ovuQP8faDGikjbF4FsAAAAASUVORK5CYII="}}]); \ No newline at end of file diff --git a/p__Classrooms__Lists__Exercise__Detail__index.a6d2e13f.async.js b/p__Classrooms__Lists__Exercise__Detail__index.a6d2e13f.async.js new file mode 100644 index 0000000000..2652dd64b0 --- /dev/null +++ b/p__Classrooms__Lists__Exercise__Detail__index.a6d2e13f.async.js @@ -0,0 +1,2284 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[61,3,5,6,7,8,9,10,178],{"+NIl": +/*!***************************************************!*\ + !*** ./node_modules/codemirror/mode/stex/stex.js ***! + \***************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function r(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function i(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var a={};function o(e,t){e.f=t}function s(e,t){var i;if(e.match(/^\\[a-zA-Z@]+/)){var s=e.current().slice(1);return n(t,i=new(i=a.hasOwnProperty(s)?a[s]:a.DEFAULT)),o(t,c),i.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return o(t,(function(e,t){return l(e,t,"\\]")})),"keyword";if(e.match("\\("))return o(t,(function(e,t){return l(e,t,"\\)")})),"keyword";if(e.match("$$"))return o(t,(function(e,t){return l(e,t,"$$")})),"keyword";if(e.match("$"))return o(t,(function(e,t){return l(e,t,"$")})),"keyword";var u=e.next();return"%"==u?(e.skipToEnd(),"comment"):"}"==u||"]"==u?(i=r(t))?(i.closeBracket(u),o(t,c),"bracket"):"error":"{"==u||"["==u?(n(t,i=new(i=a.DEFAULT)),"bracket"):/\d/.test(u)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(i=function(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var r=t[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(t)).name&&(i.argument=e.current()),i.styleIdentifier())}function l(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return o(t,s),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=e.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(e.skipToEnd(),"comment"):"error"}function c(e,t){var n=e.peek();return"{"==n||"["==n?(r(t).openBracket(n),e.eat(n),o(t,s),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(o(t,s),function(e){var t=e.cmdState.pop();t&&t.closeBracket()}(t),s(e,t))}return a.importmodule=i("importmodule","tag",["string","builtin"]),a.documentclass=i("documentclass","tag",["","atom"]),a.usepackage=i("usepackage","tag",["atom"]),a.begin=i("begin","tag",["atom"]),a.end=i("end","tag",["atom"]),a.label=i("label","tag",["atom"]),a.ref=i("ref","tag",["atom"]),a.eqref=i("eqref","tag",["atom"]),a.cite=i("cite","tag",["atom"]),a.bibitem=i("bibitem","tag",["atom"]),a.Bibitem=i("Bibitem","tag",["atom"]),a.RBibitem=i("RBibitem","tag",["atom"]),a.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return l(e,t)}:s}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=s,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}(n(/*! ../../lib/codemirror */"VrN/"))},"+yhJ": +/*!******************************************!*\ + !*** ./src/assets/images/paper/xixi.svg ***! + \******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/xixi.e1179cb8.svg"},"/GNS": +/*!*********************************************!*\ + !*** ./src/assets/images/icons/search1.png ***! + \*********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/search1.c4136dd4.png"},"06Qe": +/*!**********************************************!*\ + !*** ./node_modules/zrender/lib/vml/core.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i=n(/*! ../core/env */"ItGF"),a="urn:schemas-microsoft-com:vml",o="undefined"==typeof window?null:window,s=!1,l=o&&o.document;if(l&&!i.canvasSupported)try{!l.namespaces.zrvml&&l.namespaces.add("zrvml",a),r=function(e){return l.createElement("')}}catch(e){r=function(e){return l.createElement("<"+e+' xmlns="'+a+'" class="zrvml">')}}t.doc=l,t.createNode=function(e){return r(e)},t.initVML=function(){if(!s&&l){s=!0;var e=l.styleSheets;e.length<31?l.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):e[0].addRule(".zrvml","behavior:url(#default#VML)")}}},"0eGx": +/*!*******************************************!*\ + !*** ./src/assets/images/paper/zhong.svg ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/zhong.e01397e1.svg"},"0r65": +/*!******************************************!*\ + !*** ./node_modules/webworkify/index.js ***! + \******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=arguments[3],r=arguments[4],i=arguments[5],a=JSON.stringify;e.exports=function(e,t){for(var o,s=Object.keys(i),l=0,c=s.length;lr.getWidth()||n<0||n>r.getHeight()}h.prototype={constructor:h,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(r.each(d,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},mousemove:function(e){var t=e.zrX,n=e.zrY,r=p(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(a=(i=this.findHover(i.x,i.y)).target);var o=this._hovered=r?{x:t,y:n}:this.findHover(t,n),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(i,"mouseout",e),this.dispatchToElement(o,"mousemove",e),s&&s!==a&&this.dispatchToElement(o,"mouseover",e)},mouseout:function(e){var t=e.zrEventControl,n=e.zrIsToLocalDOM;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&!n&&this.trigger("globalout",{type:"globalout",event:e})},resize:function(e){this._hovered={}},dispatch:function(e,t){var n=this[e];n&&n.call(this,t)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},dispatchToElement:function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var i="on"+t,a=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:c}}(t,e,n);r&&(r[i]&&(a.cancelBubble=r[i].call(r,a)),r.trigger(t,a),r=r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer((function(e){"function"==typeof e[i]&&e[i].call(e,a),e.trigger&&e.trigger(t,a)})))}},findHover:function(e,t,n){for(var r=this.storage.getDisplayList(),i={x:e,y:t},a=r.length-1;a>=0;a--){var o;if(r[a]!==n&&!r[a].ignore&&(o=f(r[a],e,t))&&(!i.topTarget&&(i.topTarget=r[a]),"silent"!==o)){i.target=r[a];break}}return i},processGesture:function(e,t){this._gestureMgr||(this._gestureMgr=new l);var n=this._gestureMgr;"start"===t&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),r){var i=r.type;e.gestureEvent=i,this.dispatchToElement({target:r.target},i,r.event)}}},r.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){h.prototype[e]=function(t){var n,r,a=t.zrX,o=t.zrY,s=p(this,a,o);if("mouseup"===e&&s||(r=(n=this.findHover(a,o)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||i.dist(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}})),r.mixin(h,o),r.mixin(h,a);var m=h;e.exports=m},"19Vz": +/*!**************************************************************!*\ + !*** ./node_modules/codemirror/addon/display/placeholder.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){a(e)&&n(e)}function i(e){var r=e.getWrapperElement(),i=a(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(a,o,s){var l=s&&s!=e.Init;if(o&&!l)a.on("blur",r),a.on("change",i),a.on("swapDoc",i),e.on(a.getInputField(),"compositionupdate",a.state.placeholderCompose=function(){!function(e){setTimeout((function(){var r=!1,i=e.getInputField();"TEXTAREA"==i.nodeName?r=!i.value:1==e.lineCount()&&(r=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),r?n(e):t(e)}),20)}(a)}),i(a);else if(!o&&l){a.off("blur",r),a.off("change",i),a.off("swapDoc",i),e.off(a.getInputField(),"compositionupdate",a.state.placeholderCompose),t(a);var c=a.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}o&&!a.hasFocus()&&r(a)}))}(n(/*! ../../lib/codemirror */"VrN/"))},"1Jh7": +/*!************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/Polyline.js ***! + \************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../helper/poly */"T6xi"),a=r.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(e,t){i.buildPath(e,t,!1)}});e.exports=a},"1MYJ": +/*!**********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/CompoundPath.js ***! + \**********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Path */"y+Vt"),i=r.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var e=this.__dirtyPath,t=this.shape.paths,n=0;n=this._maxSize&&o>0){var l=n.head;n.remove(l),delete r[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new i(t),s.key=e,n.insertEntry(s),r[e]=s}return a},o.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},o.clear=function(){this._list.clear(),this._map={}};var s=a;e.exports=s},"1bdT": +/*!*********************************************!*\ + !*** ./node_modules/zrender/lib/Element.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core/guid */"3gBT"),i=n(/*! ./mixin/Eventful */"H6uX"),a=n(/*! ./mixin/Transformable */"DN4a"),o=n(/*! ./mixin/Animatable */"vWvF"),s=n(/*! ./core/util */"bYtY"),l=function(e){a.call(this,e),i.call(this,e),o.call(this,e),this.id=e.id||r()};l.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(e,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(e,t){},attrKV:function(e,t){if("position"===e||"scale"===e||"origin"===e){if(t){var n=this[e];n||(n=this[e]=[]),n[0]=t[0],n[1]=t[1]}}else this[e]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(s.isObject(e))for(var n in e)e.hasOwnProperty(n)&&this.attrKV(n,e[n]);return this.dirty(!1),this},setClipPath:function(e){var t=this.__zr;t&&e.addSelfToZr(t),this.clipPath&&this.clipPath!==e&&this.removeClipPath(),this.clipPath=e,e.__zr=t,e.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var e=this.clipPath;e&&(e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n")):null:e.match("--")?n(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=d;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(a=e.eat("/")?"closeTag":"openTag",t.tokenize=h,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function h(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=d,a=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return a="equals",null;if("<"==i){t.tokenize=d,t.state=v,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=h;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function p(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function m(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;m(e)}}function v(e,t,n){return"openTag"==e?(n.tagStart=t.column(),b):"closeTag"==e?y:v}function b(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",_):l.allowMissingTagName&&"endTag"==e?(o="tag bracket",_(e,0,n)):(o="error",b)}function y(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(o="tag",x):(o="tag error",E)}return l.allowMissingTagName&&"endTag"==e?(o="tag bracket",x(e,0,n)):(o="error",E)}function x(e,t,n){return"endTag"!=e?(o="error",x):(m(n),v)}function E(e,t,n){return o="error",x(e,0,n)}function _(e,t,n){if("word"==e)return o="attribute",k;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new p(n,r,i==n.indented)),v}return o="error",_}function k(e,t,n){return"equals"==e?w:(l.allowMissing||(o="error"),_(e,0,n))}function w(e,t,n){return"string"==e?S:"word"==e&&l.allowUnquoted?(o="string",_):(o="error",_(e,0,n))}function S(e,t,n){return"string"==e?S:_(e,0,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;a=null;var n=t.tokenize(e,t);return(n||a)&&"comment"!=n&&(o=null,t.state=t.state(a||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=h&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=_)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(/*! ../../lib/codemirror */"VrN/"))},"1j5w": +/*!*******************************************************!*\ + !*** ./node_modules/rc-menu/es/index.js + 11 modules ***! + \*******************************************************/ +/*! exports provided: SubMenu, Item, MenuItem, MenuItemGroup, ItemGroup, Divider, default */ +/*! exports used: Divider, Item, ItemGroup, SubMenu, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */ +/*! 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)) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.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/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"d",(function(){return oe})),n.d(t,"b",(function(){return xe})),n.d(t,"c",(function(){return _e})),n.d(t,"a",(function(){return we}));var r=n("VTBJ"),i=n("1OyB"),a=n("vuIU"),o=n("JX7q"),s=n("Ji7U"),l=n("LK+K"),c=n("q1tI"),u=n("I8Z2"),d=n("BGR+"),h=n("wx14"),f=n("rePB"),p=n("4IlW"),m=n("2GS6"),g=n("Gytx"),v=n.n(g),b=n("TSYQ"),y=n.n(b),x=n("U8pU"),E=n("ODXe"),_=/iPhone/i,k=/iPod/i,w=/iPad/i,S=/\bAndroid(?:.+)Mobile\b/i,C=/Android/i,O=/\bAndroid(?:.+)SD4930UR\b/i,A=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,T=/Windows Phone/i,I=/\bWindows(?:.+)ARM\b/i,D=/BlackBerry/i,L=/BB10/i,R=/Opera Mini/i,N=/\b(CriOS|Chrome)(?:.+)Mobile/i,j=/Mobile(?:.+)Firefox\b/i;function M(e,t){return e.test(t)}function P(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),n=t.split("[FBAN");if(void 0!==n[1]){var r=n;t=Object(E.a)(r,1)[0]}if(void 0!==(n=t.split("Twitter"))[1]){var i=n;t=Object(E.a)(i,1)[0]}var a={apple:{phone:M(_,t)&&!M(T,t),ipod:M(k,t),tablet:!M(_,t)&&M(w,t)&&!M(T,t),device:(M(_,t)||M(k,t)||M(w,t))&&!M(T,t)},amazon:{phone:M(O,t),tablet:!M(O,t)&&M(A,t),device:M(O,t)||M(A,t)},android:{phone:!M(T,t)&&M(O,t)||!M(T,t)&&M(S,t),tablet:!M(T,t)&&!M(O,t)&&!M(S,t)&&(M(A,t)||M(C,t)),device:!M(T,t)&&(M(O,t)||M(A,t)||M(S,t)||M(C,t))||M(/\bokhttp\b/i,t)},windows:{phone:M(T,t),tablet:M(I,t),device:M(T,t)||M(I,t)},other:{blackberry:M(D,t),blackberry10:M(L,t),opera:M(R,t),firefox:M(j,t),chrome:M(N,t),device:M(D,t)||M(L,t)||M(R,t)||M(j,t)||M(N,t)},any:null,phone:null,tablet:null};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var B=Object(r.a)(Object(r.a)({},P()),{},{isMobile:P});function F(){}function U(e,t,n){var r=t||"";return e.key||"".concat(r,"item_").concat(n)}function H(e){return"".concat(e,"-menu-")}function G(e,t){var n=-1;c.Children.forEach(e,(function(e){n+=1,e&&e.type&&e.type.isMenuItemGroup?c.Children.forEach(e.props.children,(function(e){t(e,n+=1)})):t(e,n)}))}var z=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],V=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),i=r.marginLeft,a=r.marginRight;n+=+i.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},W=function(e,t,n){e&&"object"===Object(x.a)(e.style)&&(e.style[t]=n)},K=n("KQm4"),q=n("Ff2n"),Y=n("i8i4"),Q=n("bdgK"),J=n("uciX"),X=n("8XRh"),Z={adjustX:1,adjustY:1},$={topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Z,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Z,offset:[4,0]}},ee={topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Z,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Z,offset:[4,0]}},te=0,ne={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},re=function(e,t,n){var i=H(t),a=e.getState();e.setState({defaultActiveFirst:Object(r.a)(Object(r.a)({},a.defaultActiveFirst),{},Object(f.a)({},i,n))})},ie=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;Object(i.a)(this,n),(a=t.call(this,e)).onDestroy=function(e){a.props.onDestroy(e)},a.onKeyDown=function(e){var t=e.keyCode,n=a.menuInstance,r=a.props,i=r.isOpen,o=r.store;if(t===p.a.ENTER)return a.onTitleClick(e),re(o,a.props.eventKey,!0),!0;if(t===p.a.RIGHT)return i?n.onKeyDown(e):(a.triggerOpenChange(!0),re(o,a.props.eventKey,!0)),!0;if(t===p.a.LEFT){var s;if(!i)return;return(s=n.onKeyDown(e))||(a.triggerOpenChange(!1),s=!0),s}return!i||t!==p.a.UP&&t!==p.a.DOWN?void 0:n.onKeyDown(e)},a.onOpenChange=function(e){a.props.onOpenChange(e)},a.onPopupVisibleChange=function(e){a.triggerOpenChange(e,e?"mouseenter":"mouseleave")},a.onMouseEnter=function(e){var t=a.props,n=t.eventKey,r=t.onMouseEnter,i=t.store;re(i,a.props.eventKey,!1),r({key:n,domEvent:e})},a.onMouseLeave=function(e){var t=a.props,n=t.parentMenu,r=t.eventKey,i=t.onMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,domEvent:e})},a.onTitleMouseEnter=function(e){var t=a.props,n=t.eventKey,r=t.onItemHover,i=t.onTitleMouseEnter;r({key:n,hover:!0}),i({key:n,domEvent:e})},a.onTitleMouseLeave=function(e){var t=a.props,n=t.parentMenu,r=t.eventKey,i=t.onItemHover,s=t.onTitleMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,hover:!1}),s({key:r,domEvent:e})},a.onTitleClick=function(e){var t=Object(o.a)(a).props;t.onTitleClick({key:t.eventKey,domEvent:e}),"hover"!==t.triggerSubMenuAction&&(a.triggerOpenChange(!t.isOpen,"click"),re(t.store,a.props.eventKey,!1))},a.onSubMenuClick=function(e){"function"==typeof a.props.onClick&&a.props.onClick(a.addKeyPath(e))},a.onSelect=function(e){a.props.onSelect(e)},a.onDeselect=function(e){a.props.onDeselect(e)},a.getPrefixCls=function(){return"".concat(a.props.rootPrefixCls,"-submenu")},a.getActiveClassName=function(){return"".concat(a.getPrefixCls(),"-active")},a.getDisabledClassName=function(){return"".concat(a.getPrefixCls(),"-disabled")},a.getSelectedClassName=function(){return"".concat(a.getPrefixCls(),"-selected")},a.getOpenClassName=function(){return"".concat(a.props.rootPrefixCls,"-submenu-open")},a.saveMenuInstance=function(e){a.menuInstance=e},a.addKeyPath=function(e){return Object(r.a)(Object(r.a)({},e),{},{keyPath:(e.keyPath||[]).concat(a.props.eventKey)})},a.triggerOpenChange=function(e,t){var n=a.props.eventKey,r=function(){a.onOpenChange({key:n,item:Object(o.a)(a),trigger:t,open:e})};"mouseenter"===t?a.mouseenterTimeout=setTimeout((function(){r()}),0):r()},a.isChildrenSelected=function(){var e={find:!1};return function e(t,n,r){t&&!r.find&&c.Children.forEach(t,(function(t){if(t){var i=t.type;if(!i||!(i.isSubMenu||i.isMenuItem||i.isMenuItemGroup))return;-1!==n.indexOf(t.key)?r.find=!0:t.props.children&&e(t.props.children,n,r)}}))}(a.props.children,a.props.selectedKeys,e),e.find},a.isOpen=function(){return-1!==a.props.openKeys.indexOf(a.props.eventKey)},a.adjustWidth=function(){if(a.subMenuTitle&&a.menuInstance){var e=Y.findDOMNode(a.menuInstance);e.offsetWidth>=a.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(a.subMenuTitle.offsetWidth,"px"))}},a.saveSubMenuTitle=function(e){a.subMenuTitle=e},a.getBaseProps=function(){var e=Object(o.a)(a).props;return{mode:"horizontal"===e.mode?"vertical":e.mode,visible:a.props.isOpen,level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:a.onSubMenuClick,onSelect:a.onSelect,onDeselect:a.onDeselect,onDestroy:a.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:a.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(o.a)(a),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[H(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:a.internalMenuId,manualRef:a.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},a.getMotion=function(e,t){var n=Object(o.a)(a).haveRendered,i=a.props,s=i.motion,l=i.rootPrefixCls;return Object(r.a)(Object(r.a)({},s),{},{leavedClassName:"".concat(l,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var s=e.store,l=e.eventKey,u=s.getState().defaultActiveFirst;a.isRootMenu=!1;var d=!1;return u&&(d=u[l]),re(s,l,d),a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,i=t.manualRef;i&&i(this),"horizontal"===n&&r.isRootMenu&&this.props.isOpen&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(e){var t=this,n=this.getBaseProps(),r=this.getMotion(n.mode,n.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||n.visible||n.forceSubMenuRender,!this.haveOpened)return c.createElement("div",null);var i=n.direction;return c.createElement(X.default,Object.assign({visible:n.visible},r),(function(r){var a=r.className,o=r.style,s=y()("".concat(n.prefixCls,"-sub"),a,Object(f.a)({},"".concat(n.prefixCls,"-rtl"),"rtl"===i));return c.createElement(pe,Object.assign({},n,{id:t.internalMenuId,className:s,style:o}),e)}))}},{key:"render",value:function(){var e,t=Object(r.a)({},this.props),n=t.isOpen,i=this.getPrefixCls(),a="inline"===t.mode,o=y()(i,"".concat(i,"-").concat(t.mode),(e={},Object(f.a)(e,t.className,!!t.className),Object(f.a)(e,this.getOpenClassName(),n),Object(f.a)(e,this.getActiveClassName(),t.active||n&&!a),Object(f.a)(e,this.getDisabledClassName(),t.disabled),Object(f.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(t.eventKey?this.internalMenuId="".concat(t.eventKey,"$Menu"):(te+=1,this.internalMenuId="$__$".concat(te,"$Menu")));var s={},l={},u={};t.disabled||(s={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},l={onClick:this.onTitleClick},u={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var d={},h=t.direction;a&&("rtl"===h?d.paddingRight=t.inlineIndent*t.level:d.paddingLeft=t.inlineIndent*t.level);var p={};this.props.isOpen&&(p={"aria-owns":this.internalMenuId});var m=null;"horizontal"!==t.mode&&(m=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(m=c.createElement(this.props.expandIcon,Object(r.a)({},this.props))));var g=c.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:d,className:"".concat(i,"-title"),role:"button"},u,l,{"aria-expanded":n},p,{"aria-haspopup":"true",title:"string"==typeof t.title?t.title:void 0}),t.title,m||c.createElement("i",{className:"".concat(i,"-arrow")})),v=this.renderChildren(t.children),b=t.parentMenu.isRootMenu?t.parentMenu.props.getPopupContainer:function(e){return e.parentNode},x=ne[t.mode],E=t.popupOffset?{offset:t.popupOffset}:{},_="inline"===t.mode?"":t.popupClassName;_+="rtl"===h?" ".concat(i,"-rtl"):"";var k=t.disabled,w=t.triggerSubMenuAction,S=t.subMenuOpenDelay,C=t.forceSubMenuRender,O=t.subMenuCloseDelay,A=t.builtinPlacements;z.forEach((function(e){return delete t[e]})),delete t.onClick;var T="rtl"===h?Object.assign({},ee,A):Object.assign({},$,A);return delete t.direction,c.createElement("li",Object.assign({},t,s,{className:o,role:"menuitem"}),a&&g,a&&v,!a&&c.createElement(J.a,{prefixCls:i,popupClassName:y()("".concat(i,"-popup"),_),getPopupContainer:b,builtinPlacements:T,popupPlacement:x,popupVisible:n,popupAlign:E,popup:v,action:k?[]:[w],mouseEnterDelay:S,mouseLeaveDelay:O,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:C},g))}}]),n}(c.Component);ie.defaultProps={onMouseEnter:F,onMouseLeave:F,onTitleMouseEnter:F,onTitleMouseLeave:F,onTitleClick:F,manualRef:F,mode:"vertical",title:""};var ae=Object(u.b)((function(e,t){var n=e.openKeys,r=e.activeKey,i=e.selectedKeys,a=t.eventKey,o=t.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[o]===a,selectedKeys:i}}))(ie);ae.isSubMenu=!0;var oe=ae,se=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=Y.findDOMNode(Object(o.a)(e));return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,i){var a=e.props,o=a.overflowedIndicator,s=a.level,l=a.mode,u=a.prefixCls,d=a.theme;if(1!==s||"horizontal"!==l)return null;var h=e.props.children[0].props,f=(h.children,h.title,h.style),p=Object(q.a)(h,["children","title","style"]),m=Object(r.a)({},f),g="".concat(t,"-overflowed-indicator"),v="".concat(t,"-overflowed-indicator");0===n.length&&!0!==i?m=Object(r.a)(Object(r.a)({},m),{},{display:"none"}):i&&(m=Object(r.a)(Object(r.a)({},m),{},{visibility:"hidden",position:"absolute"}),g="".concat(g,"-placeholder"),v="".concat(v,"-placeholder"));var b=d?"".concat(u,"-").concat(d):"",y={};return z.forEach((function(e){void 0!==p[e]&&(y[e]=p[e])})),c.createElement(oe,Object.assign({title:o,className:"".concat(u,"-overflowed-submenu"),popupClassName:b},y,{key:g,eventKey:v,disabled:!1,style:m}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=Y.findDOMNode(Object(o.a)(e));if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];W(r,"display","inline-block");var i=e.getMenuItemNodes(),a=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(e){W(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return V(e,!0)})),a.forEach((function(e){W(e,"display","none")})),e.overflowedIndicatorWidth=V(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),W(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=Y.findDOMNode(Object(o.a)(e));if(t){var n=V(t);e.overflowedItems=[];var r,i=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=Y.findDOMNode(this);if(!t)return;this.resizeObserver=new Q.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,i,a){var o=i;if("horizontal"===t.props.mode){var s=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(a>n&&(o=c.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),a===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return c.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),s=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var l=[].concat(Object(K.a)(r),[s,o]);return a===e.length-1&&l.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),l}return[].concat(Object(K.a)(r),[o])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(q.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return c.createElement(i,Object.assign({},r),this.renderChildren(n))}}]),n}(c.Component);se.defaultProps={tag:"div",className:""};var le=se;function ce(e,t,n){var i=e.getState();e.setState({activeKey:Object(r.a)(Object(r.a)({},i.activeKey),{},Object(f.a)({},t,n))})}function ue(e){return e.eventKey||"0-menu-"}function de(e,t){var n,r=t,i=e.children,a=e.eventKey;if(r&&(G(i,(function(e,t){e&&e.props&&!e.props.disabled&&r===U(e,a,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(G(i,(function(e,t){r||!e||e.props.disabled||(r=U(e,a,t))})),r):r}function he(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var fe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(a.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var i=null;return r!==p.a.UP&&r!==p.a.DOWN||(i=a.step(r===p.a.UP?-1:1)),i?(e.preventDefault(),ce(a.props.store,ue(a.props),i.props.eventKey),"function"==typeof t&&t(i),1):void 0},a.onItemHover=function(e){var t=e.key,n=e.hover;ce(a.props.store,ue(a.props),n?t:null)},a.onDeselect=function(e){a.props.onDeselect(e)},a.onSelect=function(e){a.props.onSelect(e)},a.onClick=function(e){a.props.onClick(e)},a.onOpenChange=function(e){a.props.onOpenChange(e)},a.onDestroy=function(e){a.props.onDestroy(e)},a.getFlatInstanceArray=function(){return a.instanceArray},a.step=function(e){var t=a.getFlatInstanceArray(),n=a.props.store.getState().activeKey[ue(a.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var i=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(i=t,!1)})),a.props.defaultActiveFirst||-1===i||(o=t.slice(i,r-1)).length&&!o.every((function(e){return!!e.props.disabled}))){var o,s=(i+1)%r,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},a.renderCommonMenuItem=function(e,t,n){var i=a.props.store.getState(),s=Object(o.a)(a).props,l=U(e,s.eventKey,t),u=e.props;if(!u||"string"==typeof e.type)return e;var d=l===i.activeKey,h=Object(r.a)(Object(r.a)({mode:u.mode||s.mode,level:s.level,inlineIndent:s.inlineIndent,renderMenuItem:a.renderMenuItem,rootPrefixCls:s.prefixCls,index:t,parentMenu:s.parentMenu,manualRef:u.disabled?void 0:Object(m.a)(e.ref,he.bind(Object(o.a)(a))),eventKey:l,active:!u.disabled&&d,multiple:s.multiple,onClick:function(e){(u.onClick||F)(e),a.onClick(e)},onItemHover:a.onItemHover,motion:s.motion,subMenuOpenDelay:s.subMenuOpenDelay,subMenuCloseDelay:s.subMenuCloseDelay,forceSubMenuRender:s.forceSubMenuRender,onOpenChange:a.onOpenChange,onDeselect:a.onDeselect,onSelect:a.onSelect,builtinPlacements:s.builtinPlacements,itemIcon:u.itemIcon||a.props.itemIcon,expandIcon:u.expandIcon||a.props.expandIcon},n),{},{direction:s.direction});return("inline"===s.mode||B.any)&&(h.triggerSubMenuAction="click"),c.cloneElement(e,h)},a.renderMenuItem=function(e,t,n){if(!e)return null;var r=a.props.store.getState(),i={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:a.props.triggerSubMenuAction,subMenuKey:n};return a.renderCommonMenuItem(e,t,i)},e.store.setState({activeKey:Object(r.a)(Object(r.a)({},e.store.getState().activeKey),{},Object(f.a)({},e.eventKey,de(e,e.activeKey)))}),a.instanceArray=[],a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!v()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[ue(t)],r=de(t,n);if(r!==n)ce(t.store,ue(t),r);else if("activeKey"in e){r!==de(e,e.activeKey)&&ce(t.store,ue(t),r)}}},{key:"render",value:function(){var e=this,t=Object(h.a)({},this.props);this.instanceArray=[];var n={className:y()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,a=t.visible,o=t.level,s=t.mode,l=t.overflowedIndicator,u=t.theme;return z.forEach((function(e){return delete t[e]})),delete t.onClick,c.createElement(le,Object.assign({},t,{prefixCls:r,mode:s,tag:"ul",level:o,theme:u,visible:a,overflowedIndicator:l},n),c.Children.map(t.children,(function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")})))}}]),n}(c.Component);fe.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:F};var pe=Object(u.b)()(fe),me=n("Kwbf");function ge(e,t,n){var r=e.prefixCls,i=e.motion,a=e.defaultMotions,o=void 0===a?{}:a,s=e.openAnimation,l=e.openTransitionName,c=t.switchingModeFromInline;if(i)return i;if("object"===Object(x.a)(s)&&s)Object(me.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=o[n];return u||(c?null:o.other)}var ve=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;Object(i.a)(this,n),(a=t.call(this,e)).inlineOpenKeys=[],a.onSelect=function(e){var t=Object(o.a)(a).props;if(t.selectable){var n=a.store.getState().selectedKeys,i=e.key;n=t.multiple?n.concat([i]):[i],"selectedKeys"in t||a.store.setState({selectedKeys:n}),t.onSelect(Object(r.a)(Object(r.a)({},e),{},{selectedKeys:n}))}},a.onClick=function(e){var t=a.getRealMenuMode(),n=Object(o.a)(a),r=n.store,i=n.props.onOpenChange;"inline"===t||"openKeys"in a.props||(r.setState({openKeys:[]}),i([])),a.props.onClick(e)},a.onKeyDown=function(e,t){a.innerMenu.getWrappedInstance().onKeyDown(e,t)},a.onOpenChange=function(e){var t=Object(o.a)(a).props,n=a.store.getState().openKeys.concat(),r=!1,i=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var i=n.indexOf(e.key);(t=-1!==i)&&n.splice(i,1)}r=r||t};Array.isArray(e)?e.forEach(i):i(e),r&&("openKeys"in a.props||a.store.setState({openKeys:n}),t.onOpenChange(n))},a.onDeselect=function(e){var t=Object(o.a)(a).props;if(t.selectable){var n=a.store.getState().selectedKeys.concat(),i=e.key,s=n.indexOf(i);-1!==s&&n.splice(s,1),"selectedKeys"in t||a.store.setState({selectedKeys:n}),t.onDeselect(Object(r.a)(Object(r.a)({},e),{},{selectedKeys:n}))}},a.onMouseEnter=function(e){a.restoreModeVerticalFromInline();var t=a.props.onMouseEnter;t&&t(e)},a.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,r="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,i="font-size"===e.propertyName&&r.indexOf("anticon")>=0;(t||i)&&a.restoreModeVerticalFromInline()},a.setInnerMenu=function(e){a.innerMenu=e},a.isRootMenu=!0;var s=e.defaultSelectedKeys,l=e.defaultOpenKeys;return"selectedKeys"in e&&(s=e.selectedKeys||[]),"openKeys"in e&&(l=e.openKeys||[]),a.store=Object(u.c)({selectedKeys:s,openKeys:l,activeKey:{"0-menu-":de(e,e.activeKey)}}),a.state={switchingModeFromInline:!1},a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){this.updateOpentKeysWhenSwitchMode(e),this.updateMiniStore();var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&i([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(e){var t=this.props,n=this.store,r=this.inlineOpenKeys,i=n.getState(),a={};"inline"===e.mode&&"inline"!==t.mode&&this.setState({switchingModeFromInline:!0}),"openKeys"in t||((t.inlineCollapsed&&!e.inlineCollapsed||t.siderCollapsed&&!e.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=i.openKeys.concat(),a.openKeys=[]),(!t.inlineCollapsed&&e.inlineCollapsed||!t.siderCollapsed&&e.siderCollapsed)&&(a.openKeys=r,this.inlineOpenKeys=[])),Object.keys(a).length&&n.setState(a)}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(r.a)({},Object(d.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(r.a)(Object(r.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ge(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,c.createElement(u.a,{store:this.store},c.createElement(pe,Object.assign({},e,{ref:this.setInnerMenu}),this.props.children))}}]),n}(c.Component);ve.defaultProps={selectable:!0,onClick:F,onSelect:F,onOpenChange:F,onDeselect:F,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:c.createElement("span",null,"···")};var be=ve,ye=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===p.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseLeave;i({key:r,hover:!1}),a({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseEnter;i({key:r,hover:!0}),a({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,i=n.multiple,a=n.onClick,s=n.onSelect,l=n.onDeselect,c=n.isSelected,u={key:r,keyPath:[r],item:Object(o.a)(e),domEvent:t};a(u),i?c?l(u):s(u):c||s(u)},e.saveNode=function(t){e.node=t},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(r.a)({},this.props),n=y()(this.getPrefixCls(),t.className,(e={},Object(f.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(f.a)(e,this.getSelectedClassName(),t.isSelected),Object(f.a)(e,this.getDisabledClassName(),t.disabled),e)),i=Object(r.a)(Object(r.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?i=Object(r.a)(Object(r.a)({},i),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(i.role="none");var a={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},o=Object(r.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?o.paddingRight=t.inlineIndent*t.level:o.paddingLeft=t.inlineIndent*t.level),z.forEach((function(e){return delete t[e]})),delete t.direction;var s=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(s=c.createElement(this.props.itemIcon,this.props)),c.createElement("li",Object.assign({},Object(d.default)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,a,{style:o,ref:this.saveNode}),t.children,s)}}]),n}(c.Component);ye.isMenuItem=!0,ye.defaultProps={onSelect:F,onMouseEnter:F,onMouseLeave:F,manualRef:F};var xe=Object(u.b)((function(e,t){var n=e.activeKey,r=e.selectedKeys,i=t.eventKey;return{active:n[t.subMenuKey]===i,isSelected:-1!==r.indexOf(i)}}))(ye),Ee=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(a.a)(n,[{key:"render",value:function(){var e=Object(h.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,i="".concat(r,"-item-group-title"),a="".concat(r,"-item-group-list"),o=e.title,s=e.children;return z.forEach((function(t){return delete e[t]})),delete e.onClick,delete e.direction,c.createElement("li",Object.assign({},e,{className:"".concat(n," ").concat(r,"-item-group")}),c.createElement("div",{className:i,title:"string"==typeof o?o:void 0},o),c.createElement("ul",{className:a},c.Children.map(s,this.renderInnerMenuItem)))}}]),n}(c.Component);Ee.isMenuItemGroup=!0,Ee.defaultProps={disabled:!0};var _e=Ee,ke=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return c.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};ke.defaultProps={disabled:!0,className:"",style:{}};var we=ke;t.e=be},"24YM": +/*!**************************************************!*\ + !*** ./node_modules/size-sensor/lib/constant.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SensorTabIndex=t.SensorClassName=t.SizeSensorId=void 0;t.SizeSensorId="size-sensor-id";t.SensorClassName="size-sensor-object";t.SensorTabIndex="-1"},"2DNl": +/*!**************************************************!*\ + !*** ./node_modules/zrender/lib/contain/path.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/PathProxy */"IMiH"),i=n(/*! ./line */"loD1"),a=n(/*! ./cubic */"59Ip"),o=n(/*! ./quadratic */"aKvl"),s=n(/*! ./arc */"n1HI"),l=n(/*! ./util */"hX1E").normalizeRadian,c=n(/*! ../core/curve */"Sj9i"),u=n(/*! ./windingLine */"hyiK"),d=r.CMD,h=2*Math.PI;var f=[-1,-1,-1],p=[-1,-1];function m(e,t,n,r,i,a,o,s,l,u){if(u>t&&u>r&&u>a&&u>s||u1&&(d=void 0,d=p[0],p[0]=p[1],p[1]=d),m=c.cubicAt(t,r,a,s,p[0]),b>1&&(g=c.cubicAt(t,r,a,s,p[1]))),2===b?xt&&s>r&&s>a||s=0&&u<=1){for(var d=0,h=c.quadraticAt(t,r,a,u),p=0;pn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);f[0]=-c,f[1]=c;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u%h<1e-4){r=0,i=h;var d=a?1:-1;return o>=f[0]+e&&o<=f[1]+e?d:0}if(a){c=r;r=l(i),i=l(c)}else r=l(r),i=l(i);r>i&&(i+=h);for(var p=0,m=0;m<2;m++){var g=f[m];if(g+e>o){var v=Math.atan2(s,g);d=a?1:-1;v<0&&(v=h+v),(v>=r&&v<=i||v+h>=r&&v+h<=i)&&(v>Math.PI/2&&v<1.5*Math.PI&&(d=-d),p+=d)}}return p}function b(e,t,n,r,l){for(var c,h,f=0,p=0,b=0,y=0,x=0,E=0;E1&&(n||(f+=u(p,b,y,x,r,l))),1===E&&(y=p=e[E],x=b=e[E+1]),_){case d.M:p=y=e[E++],b=x=e[E++];break;case d.L:if(n){if(i.containStroke(p,b,e[E],e[E+1],t,r,l))return!0}else f+=u(p,b,e[E],e[E+1],r,l)||0;p=e[E++],b=e[E++];break;case d.C:if(n){if(a.containStroke(p,b,e[E++],e[E++],e[E++],e[E++],e[E],e[E+1],t,r,l))return!0}else f+=m(p,b,e[E++],e[E++],e[E++],e[E++],e[E],e[E+1],r,l)||0;p=e[E++],b=e[E++];break;case d.Q:if(n){if(o.containStroke(p,b,e[E++],e[E++],e[E],e[E+1],t,r,l))return!0}else f+=g(p,b,e[E++],e[E++],e[E],e[E+1],r,l)||0;p=e[E++],b=e[E++];break;case d.A:var k=e[E++],w=e[E++],S=e[E++],C=e[E++],O=e[E++],A=e[E++];E+=1;var T=1-e[E++],I=Math.cos(O)*S+k,D=Math.sin(O)*C+w;E>1?f+=u(p,b,I,D,r,l):(y=I,x=D);var L=(r-k)*C/S+k;if(n){if(s.containStroke(k,w,C,O,O+A,T,t,L,l))return!0}else f+=v(k,w,C,O,O+A,T,L,l);p=Math.cos(O+A)*S+k,b=Math.sin(O+A)*C+w;break;case d.R:y=p=e[E++],x=b=e[E++];I=y+e[E++],D=x+e[E++];if(n){if(i.containStroke(y,x,I,x,t,r,l)||i.containStroke(I,x,I,D,t,r,l)||i.containStroke(I,D,y,D,t,r,l)||i.containStroke(y,D,y,x,t,r,l))return!0}else f+=u(I,x,I,D,r,l),f+=u(y,D,y,x,r,l);break;case d.Z:if(n){if(i.containStroke(p,b,y,x,t,r,l))return!0}else f+=u(p,b,y,x,r,l);p=y,b=x}}return n||(c=b,h=x,Math.abs(c-h)<1e-4)||(f+=u(p,b,y,x,r,l)||0),0!==f}t.contain=function(e,t,n){return b(e,0,!1,t,n)},t.containStroke=function(e,t,n,r){return b(e,t,!0,n,r)}},"2JKx": +/*!**********************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/ConfigWorks/index.less?modules ***! + \**********************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___21flX",flex_space_between:"flex_space_between___hkcwT",flex_box_vertical_center:"flex_box_vertical_center___1JAyR",flex_box_center_end:"flex_box_center_end___2trjo",flex_box_column:"flex_box_column___2q5e9",form:"form___1j7IG",efficiency:"efficiency___KDh-I",ipItem:"ipItem___2NlCp",ipWrp:"ipWrp___2kiZa"}},"2fw6": +/*!**********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/Circle.js ***! + \**********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt").extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(e,t,n){n&&e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI,!0)}});e.exports=r},"3C/r": +/*!*****************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Pattern.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=function(e,t){this.image=e,this.repeat=t,this.type="pattern"};n.prototype.getCanvasPattern=function(e){return e.createPattern(this.image,this.repeat||"repeat")};var r=n;e.exports=r},"3CBa": +/*!*************************************************!*\ + !*** ./node_modules/zrender/lib/svg/Painter.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core */"hydK").createElement,i=n(/*! ../core/util */"bYtY"),a=n(/*! ../core/log */"SUKs"),o=n(/*! ../graphic/Path */"y+Vt"),s=n(/*! ../graphic/Image */"Dagg"),l=n(/*! ../graphic/Text */"dqUG"),c=n(/*! ../core/arrayDiff2 */"DBLp"),u=n(/*! ./helper/GradientManager */"sW+o"),d=n(/*! ./helper/ClippathManager */"n6Mw"),h=n(/*! ./helper/ShadowManager */"vKoX"),f=n(/*! ./graphic */"P47w"),p=f.path,m=f.image,g=f.text;function v(e){return parseInt(e,10)}function b(e,t){return t&&e&&t.parentNode!==e}function y(e,t,n){if(b(e,t)&&n){var r=n.nextSibling;r?e.insertBefore(t,r):e.appendChild(t)}}function x(e,t){if(b(e,t)){var n=e.firstChild;n?e.insertBefore(t,n):e.appendChild(t)}}function E(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)}function _(e){return e.__textSvgEl}function k(e){return e.__svgEl}var w=function(e,t,n,a){this.root=e,this.storage=t,this._opts=n=i.extend({},n||{});var o=r("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;";var s=r("g");o.appendChild(s);var l=r("g");o.appendChild(l),this.gradientManager=new u(a,l),this.clipPathManager=new d(a,l),this.shadowManager=new h(a,l);var c=document.createElement("div");c.style.cssText="overflow:hidden;position:relative",this._svgDom=o,this._svgRoot=l,this._backgroundRoot=s,this._viewport=c,e.appendChild(c),c.appendChild(o),this.resize(n.width,n.height),this._visibleList=[]};w.prototype={constructor:w,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0);this._paintList(e)},setBackgroundColor:function(e){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var t=r("rect");t.setAttribute("width",this.getWidth()),t.setAttribute("height",this.getHeight()),t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("id",0),t.style.fill=e,this._backgroundRoot.appendChild(t),this._backgroundNode=t},_paintList:function(e){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var t,n,r=this._svgRoot,i=this._visibleList,a=e.length,u=[];for(t=0;t=0;--r)if(n[r]===e)return!0;return!1}),t):null:t[0]},resize:function(e,t){var n=this._viewport;n.style.display="none";var r=this._opts;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=this._getSize(0),t=this._getSize(1),n.style.display="",this._width!==e||this._height!==t){this._width=e,this._height=t;var i=n.style;i.width=e+"px",i.height=t+"px";var a=this._svgDom;a.setAttribute("width",e),a.setAttribute("height",t)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",e),this._backgroundNode.setAttribute("height",t))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,n=["width","height"][e],r=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=t[n]&&"auto"!==t[n])return parseFloat(t[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||v(s[n])||v(o.style[n]))-(v(s[i])||0)-(v(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/>\n\r<"))}},i.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(e){var t;w.prototype[e]=(t=e,function(){a('In SVG mode painter not support method "'+t+'"')})}));var S=w;e.exports=S},"3e3G": +/*!************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/RadialGradient.js ***! + \************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ./Gradient */"QuXc"),a=function(e,t,n,r,a){this.x=null==e?.5:e,this.y=null==t?.5:t,this.r=null==n?.5:n,this.type="radial",this.global=a||!1,i.call(this,r)};a.prototype={constructor:a},r.inherits(a,i);var o=a;e.exports=o},"3gBT": +/*!***********************************************!*\ + !*** ./node_modules/zrender/lib/core/guid.js ***! + \***********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=2311;e.exports=function(){return n++}},"4fz+": +/*!*****************************************************!*\ + !*** ./node_modules/zrender/lib/container/Group.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ../Element */"1bdT"),a=n(/*! ../core/BoundingRect */"mFDi"),o=function(e){for(var t in e=e||{},i.call(this,e),e)e.hasOwnProperty(t)&&(this[t]=e[t]);this._children=[],this.__storage=null,this.__dirty=!0};o.prototype={constructor:o,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(e){return this._children[e]},childOfName:function(e){for(var t=this._children,n=0;n=0&&(n.splice(r,0,e),this._doAdd(e))}return this},_doAdd:function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__storage,n=this.__zr;t&&t!==e.__storage&&(t.addToStorage(e),e instanceof o&&e.addChildrenToStorage(t)),n&&n.refresh()},remove:function(e){var t=this.__zr,n=this.__storage,i=this._children,a=r.indexOf(i,e);return a<0||(i.splice(a,1),e.parent=null,n&&(n.delFromStorage(e),e instanceof o&&e.delChildrenFromStorage(n)),t&&t.refresh()),this},removeAll:function(){var e,t,n=this._children,r=this.__storage;for(t=0;t1e-4)return p[0]=e-n,p[1]=t-i,m[0]=e+n,void(m[1]=t+i);if(u[0]=l(a)*n+e,u[1]=s(a)*i+t,d[0]=l(o)*n+e,d[1]=s(o)*i+t,g(p,u,d),v(m,u,d),(a%=c)<0&&(a+=c),(o%=c)<0&&(o+=c),a>o&&!f?o+=c:aa&&(h[0]=l(x)*n+e,h[1]=s(x)*i+t,g(p,h,p),v(m,h,m))}},"4qgm": +/*!*********************************************!*\ + !*** ./src/assets/images/icons/tx-live.png ***! + \*********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH5ZbNED/R3+mYDHSL5kcqVLZOZB8imq/lvAWWHdWpOGySIqYEwvKk1mtsmtl5/M72WNk4Wf6dj8jIAqce1qGJEparsgSHQVoIar3M3GRadWnDp+rb5eyJi0RaykgCy47q9DS1srDUvLRzme+YFXhg5CY2YD4uf/RdVrROkffCGgk13vQTOrzdZZUKi8SmOCy1pMLUYfCDkfD7T+Cvl1PTckKNereENM1L6rFmaAc/PzRD3L6E9jlUabN+Swj2tfFB6o8Q7h0e/GQMPDcy9djBS7DjPJzthOJ+0lSPvzguyxonyz96E9mjwIpGHeGZ+lFYiEXMpP+ozQhcPgZmj7z95MUE1H8Ef7gIhnCszyXOPWqa5lWUDVcvsu3Mk5KrXsodEhUtOtNT6qwYj0allj2dXAIzvx+5CtvOwT9vQpEFVtTVMzuK8QJT1yY55HssbZ0sLd3N3LF+k47pZ70YcZS5WNj5UAsr0PS74cG+C/DLNrjppYTm0wKaSW7gUxvz2HL0q/Jpxs4tgeVN+rRvUWPF+Hx/qEURmOl7uh1ePweN11Iua+XjtsYLUjSP+BZLW0vlmLEvk07paK+LNWoxWwQxBXKhWm8u2n2MpA+/+S/suQDXvfxc1ti0ioIC/ybK5o5BbJbSJj1pD+HLXnu0DBlmEaIIzNjbfi6VhErydNeAmgX2MPCu8ZxMaNJptlBjSi6zv+VbKOcSHFVgwxXY/CFc6AI7Hzc14kzBni7xPJtFgZnxp/S+WJLFAsvEYWiko04vKMMKbOtK7Y9/+h/4mmchkFWkWz6VxyvkzYBm9vzKjmsFFnX9PfZkbPYl0BSVBy7CzvNwvqsfm3/WMct1WXUy65h1lyNMb9CS9iEsUouVls3w/tDsTeCZDjDxduhqKqHk5ZJpaprgQ/VZleug3KOnl/1dJ6QvjL4Z5uohbAx2+fBWG/ziY7icTFHLp4W96ug1lM3l0eCxvIhQicWIqBu/IbhyLDz7cErCiRup6qX5ej/2u4iXVaFyVdlxfUyFN0UojbJPGlozH4B5o+DAJfh1GxjR+VYs2deNFrx2vELa+qIfSqAxUtqkW61iXvY7+zJ55+/mFGHcsN0FJ8+a89Y1RoL3xWVF85TwF8ahBZY16RtSzEtRBRq5RmTogbqtn6GGh+vDThHiLWVyadYstffvl/Q1cu8LHnrc/giMxjzdOxNrCU6rsry1Qv5sflkQ1x8qjN5VJWvD2C2cQGMpwmG4t8lJUUAtobDds1l3coJcnVulox2LdU4xzyc62berWmbfG4GSKo80SVKK0gfjfIWaGDXFcoJW32dZ6yR5x4hYuEafUaixbcYaX3cT7NlVLfMGXGAmq4nPHlz2YvMjbJ41k4iSbYOSylBz6VThZ+2dbPzga3Jj4Todhcd6FZ4XAd8DJwZucqAF3q4gPgCWZ78GK2/S76nFBonxSKhzZfoc5ydpxGNpy2Q5HFCr0mew2WjZPOJmXZcMuMDgFZiPi1Dv3SRuXmTOqdWhRV28ZHkc3hGXw+VN+rAK67GYjWD1VCAYd/Q9borHZrWpaymTjoWv6igtZh0E59OAWnYbMIGljbrDGc4L3g3eRQNqB83A89bo4zb81HYodV06VKkb+S4b4/slMbFRn7JsaiTGF7JpZu5S/ARH8FjSMkUaja35cZ1lCTUBNXPwzhHLRmAywd7dcZlb2Bhs1C3EGNTlsOr0eLkyZ7kOdYawyoJXRCj2PDArbjvguRxVl1d2rZXGCa36oO2zBmWexLCD+ExwHai91M6WszOkc06Vfi5msc4QNzmrO7VsIbEiSCTYubtaXiiowNJmfcBssumVniGw2XaY6Jl3gN1W2oj0fTrUY9PIf7HB0Cxv0ifUZhF+SlxzuZy4i1ofV5NOyu5ltXiqvlL+VlCBGWNzV+vX7RgHnRj3JXPeRKZ6ZtP0fBbviacugTItoOakY60PasalLTuIx3dIsrh+rZwKIy6YR9iOmX7z6zUmbTwhQq1l82gugtk20zRvqrKJDrZeKaX9/vd42oIay7kzQ+aaS/C8x3WEtZc9tu2PS6TXPZEFZibx4w36YMKl2lRPIti9xY2haQh4LmcQbqBMSBPpcX2zPKDB91m8Oy4no8LIi2D3QRZW6Uxs6sLQtMzhNkfq724zTf2aKutH+rwej0gt217eBLONLKzWh8z/wWgImr1RCKgZ0h4N4rJk59pUIupPK4jAzAQWxPU7QJ3t8MW+YjMXNfW55ivriy+xbfv23C9ToootqEAzeEDTplqV+X3FZibbWqlE0iCwZOdr/adWcBfNtarzqvS7tkWt1QtNE2uGGrAhNpzXty8qDLV7IjBDUy3ioszHwspk2lux5tOgHkt3xaU1quuF7V9wF+2Rpk0dwjhTXypcQ9lYdD9bB4LaPSPYPdOqsAcYh8336yulOSyF/vT7P83Gv9qVBJysAAAAAElFTkSuQmCC"},"4u4S": +/*!*********************************************!*\ + !*** ./src/assets/images/icons/groups2.png ***! + \*********************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAASm0lEQVR4Xu2dd5QUVRbGfz3kJDkKCJJBAVFWRUUkGFBQEFRWFhUWmBlAoqCoMGKAVcC8CLKLBEEkKCZMgKjkqIIIKCKiMCAsUfLUntuvi+7pqeqq7q7pcbrrncMfTL10v/f1q/vuu/eWR0vmBaA/bnERiGMEPFoaSaTzLhrt4lhOV7QER8Aj8mtDKMJxlqJxeYLj4Yofpwh4ie4l+wAqcopVaFSJU1ldsRIYgfNE95K9L5dyjq/RuCCBMXFFj0MEMhHdS/ZUbkTjQzTyxqG8rkgJikAWonvJnkIvNCYmKCau2HGIgCHRfWQfg8awOJTZFSkBETAnuoaHFN4GOiUgLq7IcYaAKdG9u3oaBUlnCRpXxZncrjgJhkBIonvJ3o+ynGUlGhcnGDauuHGEgCXRfWbHupxjORol40h2V5QEQsAW0X1kb8FZPgHyJxA+rqhxgoBtovts7N3IYGqcyO6KkUAIhEV0H9nTyGBkAmHkihoHCIRNdJ+NfToaXeNAfleEBEEgMqKnkZ+9fAY0TxCcXDFzOQIREd27qw+kFCdZgUbtXI6BO/0EQCBiovts7DU4w0qgTAJg5YqYixGIiui+w2kzMlgEFMzFODg/9dLVISkPHN0PJw+b91+gGGSchTMnnJ9DcI9FSsNFTeHgL5C+DbRzmWt48mT9m5OzkvFLXAgHdsLJI072bNlX1ET3kf1uMpgFONKf5axzQ4Uxe6B4BXi7Pyx5yXzGveZBo9th21J4sVX0kpW6CA79DhlnsvZ1xT3QYxZoGgwsDqeO+utUuhRSFsCcgfDtgujnYdRDp/HQaqCa3/Cq2fujChrfMWJqyTwMjM4ehCx6HbgESla1P/TLN8P+7ap+gaLw6Df22r4zFDbMs1fXDtGrXw1Dl6v+5g2Bz8fZ69usVlI+GPsH5C8Mb3SDtbL3BJQOz8KND8HerfBE3czP+nwIl7RVP4J3H4FP/xXdXIJb5ysEo3+DIiXh49GwYLiz/Vv05hjRvTt7CpPR6BFTCWSwUT9B2TBccUZdAns2q2kWvACeD6FaBAoz9QFY+YY98ayIXrgUPLwaytZQ/f260Vp9WfwirJttPn6t62HQF+r5o9Xh4M7MdfsvgrotYfVMmHJv5mf5CkP3N6HxHervy6fAjH+ClmFPXqtaV90P901RtUbU9m80Vu0ceu4s0dPISzoL0Wjt0PzsdaMT/dNnYcN84zYeDwxdoZ6ZEX3BY/D7pqztH5gBBYuCEdFLVgHRbYNJFYroeQtCv4VQu4U9+fRaolYsluwkJuWOMXDTMNizBUbVz1pp7EG1o84dDIvGZ33uSQJRL1r6sp+smArTuztD9mGroNrfYPtXMD72VmlHiS7IacMozhGWodEgvFWMorZO9Jkp8NVrJkRPgn/7Dl9mRB/fArYvNSDIAShSKivRWw+BDv+CrYvhpTaZ25kR/YIKkPwuVL9S1V/4NOz+1lx4qdd6kHo+/gbY7tuxjVo8uhEqN4LPxsH8IZlryOH4qR2+fkzk1FvcOhJuS1P/+3oyvNlLVtZ4jqI21rjWevHy+CIzRTXKCDoEW7f21xhWEY7/EU4Lb13Hie4lex8uIsPr2lsh7BlF0iCniC67+Yjv1W7/SlvYvNA/eyOiN7gF7p0EJStDRgbMTIZlr5tLfEFFeGQtlKgEa96C/3Yxr1u8Eoz5TT1/oZX68QWWy+6EXnOVDj6ohLXVo/OL0PJB9XZ4rhmcOGQ89qAvodZ1kaxaZG2GlP3rEN1L9r5cwVlkeywcmURhtMopossUWw2CTuPg983wVCO/JSGQ6GtnQ9fJ0PA2JdSp4zC9B2z7Apo9oHbgYCtJ3gIgu+XFV8PJozCyDhzZYw5Ks+7wj/+ouoNLZ+2v/dNwy3BlVkyrYwNcD7R/Epa8DEfTzetXuQwKlTB/ftV9cPV96vmMXrD/Rxtjh6jy49fGFiWLXrNlR9fH1PpwOxnMRyMpOuksWutEF/1PP2QGNxEd/bre6q9OqS7Sl+jnw9dD5YZqIfUdOpDoSyfAgM+hVnPYtBBmpSj7+uPfqUO0EH5SJzh+QM2vfF11MKzaRL3mp3WHVdNCg9BzDjTpBAd/hdVvZq0rh8wKdWH/T7BuTmTL8et6WB9G28qN1bkoX0H48jUldw6VbCW6yKSlMACN57NVPqesLuHq6LpQjTpA8nw4vBdG1oJTxyBYdSlaFmrfAOslDNdXqjRR+nqpKrB/B0xoD2I5uXMs5C8EJ4/Bf+6BTR+Ghi8pLzy3HwqH2FmdWICV02Cqb3e26k+sWaJ2laulZHuqIZw+7m8lF2W9fabaN+4L/bayGsvG82wnuo/sr6DRx8Z8IquiE/3b92HnauM+ZEdvN8r5Hd3bo0ftzpUawIej4IORWYluJlmxctBzrtJzZfeW21Qp/9sNr94Gv9mw8ctBU9QnsyLPqzRW+vk370aGsbSSN0+oy6/Anv85Gy6/S51Fnm8BP36VeVwxr47zvcEerwF/+A7Kkc8uZMvYEP1t8rCEBWjcmi1y5KSOrgvU9O9K3fh5FTx3DYzebX0zWqE+NO2i/un29DOn4OtJyhoTSjcOB0iddDtWqINldpfmqdDlVTWKkQVI/h6PRPfu6qkUReNLNC5zHOe/AtFFVxdT4A7fTaeR1aVIGWU7r3MD1GmpdGa9CMGXTVa3hod91hMngCpcUr1d8hWAOYNgcfZqkV5fmsFfqfHEYvNMEzh7Mqsk8Up0L9n7UomzrAIqO7GG5/v4KxA9WCAjot/9MrTom7nmrvUgKpeQ/NBu/zOx5jRPgd0b4fXOkcMlfXT5t1JbxL8kcIzIezVuKT/e3u9AIV/qziPpcHSfcV05V1Ssp56JJejsqdCzmXA7HPg54hnHRHUJnJ3Wj0acQRS2YhHPOrihTvR3HoaVJiGtcuun25mdtLqYCWG4o5dWurxO7u8+MN+9dXOgqELPRpFWR7+RPH0CNn0UHuTiYSg3o3aKqG7dpkDe/OpHJWciJ8sT9WHvloh7dHg29uahpdKODN6zV9tGrZy2uhhN0exmVH5wdvxHnCB6xQYwwsClwQak3irH/oCHylrXbjMUOoxR5D5xGOYOUjZ9KVPvhxMGLrkFi8H9vk1pVqqyWAUXsTzJuUdKWj1I/8F6LiY1coboyYijxcCIZ222o9vtMLt3dCHzs+lQtIzfTff6vnBRGN9ZENOj2OaFbLLz60V2eDM3h2D5u89UB129rJ8LPy2zRkns8TWuUW+e0SHmLHLe9aJfHRNLkdwQy6XV0z41w+wm046OLp6lL/hciXMb0bUUuqIx3RrtMGroO/rbA2C5bycJ1fz0n/5dNdB7MVI7euBYYh8Wgum3oLo/eu/50LhDGEKZVJVbVrGtW5ULG4L4vsguK/7f4kYgRHzyUvPrfOmz+IWQ9oNya5jUGTbMNR9J9y+XGr99p0guZ4BS1RKb6FoKl6PxtePRSHYOo2bL5STRZYFT34cLL/GPphP9mp7Klm23VLtSvQGO7MtMtl3rYPl/rXtJeQ8atoPDe+CZy5Xfe+lqxi66gb31eAuuuFu5NMiPwsyZS9qIeVRcjeUtM7GjP5IqkYmuJVMOD2uz5dMxVkQXX4zrU+GTMVn1Y6eILh58smsXKwt/HgLxVREd0yzCyCpsLRodPTCgQwIwVk2Huq2hvyRuQLkUrPD5hgeS/NLb1A9VyuR7Qvu+6+1kLPnxnTvt7ylRia5NJB8bWYRG9ri5hSK66JEjNiubtRx6vpyQeTeMluhCWHGWajsCxBX1wC/wyi0wYLHxhVH+IuqGtt6NMO46czUiUqKL2e6hZcr3+6flMFZcaH0utve+DtdKMIWmfNIDbeoN2qorefFL2fwxvHqrvUOz0bslYYmewgQ0kq3ftxHWsNrRW/SDu19SO6147gXadqMhetmacP90uNhn/pPDmxDkyF5zFwAh+tCVSr3ZugReusnYGy9Sord7Eto+pq7exzQFccTSi4TadZ+hrualLHoB5g2Ghu1Bbk/FNLhjpXLzPfNnhItBYuroWio9yWBS5KjZaGlFdNl1H14DVS+DYMckK6JLiNm4g+qmT5yPAr0Iu0yA5r7fr4SnSYCC7rgUKsKoTA01H4n2kZA1I1t1JESveR0M/AKSkuCricrfPbjIG+7vE9XOLkU8PsUVWN5GopePaw5/HrQBeogqibaja6lIKowl2Z6B14rosiZNOkNPn+egLKbuZGREdLlN1O3d9W+GRu3VqqbVhfSt/hUuWwuGr4M5Yu0JOiBaxYzWvwn6fKRIKbbm4IuucIku55DHvoFSVeH4/5QXpe72a8TJwB+pPJc2cvh0wv3AKaIHBpP8Vc2L3uv+c6yLSZSRGdELFlc+2ld2Ve6v+m2dV3e9Ri2/EdEf/AzqBYW9eq0QAdYUnTzifWh0zW1FdGnfcSy0GawCMcQnZN82PyXDIbocfMXKUv9GpX9P6QprZhpvuXnyw/V9oO3j6o0SWHaugfdHwPcf58yOLq7Mkvfl7Gl1kJd5SmCKXEI9VC7zgTfMGWbLhZHWjwKc4Uvgb2HOJ7LqT+6AMtVBYkY3zlc6Z6M7lKVBVA697PkeRK8WXfSVW2HzR8ZEl2idayVO0hcN9N37IPbrUBE+wTO3Q3Qh6CPr4OAumPZAZm9Fu0QX4kpuGN1u/1Y/WPqKMY6NO6oY13I11XPxdxdLVKVLlEnx/EawTBE+OBzP7upEuqOL6jVYaBNUJEh72v12Rzeslz1ET0ZsV9HNzK5YNZurFA+ySGIzLlZeqQN6kZvFNbOUbr5rLeivbO+t3xUgV9F6uguzCyO7cwmsZ4foUt/sjdDxOWgzRNmozXxdxMIi6ph+ESX5WIS4gUXyqUjiInEmk4glvcgPVywvuqoidnvxaZcbUb3s2qAipuT8ESrbWDA+kRJdDstP71R5aaRIRjGJhhJT6OHfI1mF820cJ7qWzIPAi1HNKpzGElcZnDbi2AHY8qnahcWRKTAes0RlGPWjOnDJRYocHnOS6CKrvLJFffGmpdOU1eLBT6B8bZW+Y9KdxoiISbPdE+qZ+K+/95i/XpmLlfejvJ0kg4Fe5K02u5/5bi1B1Lc/o8bWiziESQideFgGB1AYzUwIq/vX79tunJHLjgtAODywqOso0bW+tOAcn8X0q9PNeqjI+l/WKPuv6JcSZRTKcUoCduUHcGy/seriBMB2d3QZS4I0RDcV/frMSaWf6iXUNXz5OvD4Jlj6qjoQ60VUoqd+huIV/X+ToOLPx6t0c5ZOZR5ocLPSkSVzgf6GFBVLgrSN/MvDxSy3Et2b4uIca2OeWVdezfKqC2VhCLUIVubFcBdQrx8O0SWUrknQrr3vRxX29t7joYklFz3eNBtBeVfE5UD80MWRS5IVyUYQSQl8M8gt7+oZkfSStU1uJLqWRmHSvUmLwnDmcAav6Hvx+Hc+0ecDr7Kj6bxcbRAdWi6PrOzS8mMTTz29SOxotGF0Yh4V85xTgRayocjbJpTvSzh4yd2G7vsj2dGsAi/C6dugriOqi5bCLDRsuNRFOVu3uYtAhAhETXQtlaFk4HDq1QilcZu5CJggEBXRtWRuwsNH2Z6gyF0+F4EoEYiY6FoqNdFY7X5NOsoVcJvHBIGIiO5LXSFJRGOXMTcmcLiDxCsCYRNd0/CQ6s2n6MsYH6/QuHLFEwLhEz3Z+9VoX/LseILClSWeEQiL6N7suOd4J7vyqscz0K5sOYuAbaJrqdQjw5tly7nEQzkruzt6AiFgi+jaAEpwEklTWyuBsHFFjSMELImupZFEOh+gcUscye2KkmAIWBM9ldFkeL8h6hYXgVyLQEiia324i3OE+LBlrpXbnXiCIWBKdF/WW0n2nf0f20ow0F1xY4+AIdG1PpT2+ZZXi/2U3BFdBJxHIAvRNfX150/QaOn8cG6PLgI5g0BWoicj3+D2fSM7Zybljuoi4DQCmYiupdKNDEw+GeH00G5/LgKxQ+A80bVUmpLhzcVSMHbDuyO5CMQGAS/Rtf6U55Q3sNnZj2jFRgZ3FBcBSwQ83pTOG7z5EQMy11i2cyu4COQqBDxaMq8BvXPVrN3JugiEiYClC0CY/bnVXQRii0DHWkEJbYKG95ABnmSX6LFdFnc0pxEISXTPWTxaN+Ztn+US3Wng3f5ii4A50U/hydOZeT94P8rkEj22y+KO5jQCRkT3eI6T5GnPHH/ea5foTgPv9hdbBLIS/RD58t7C7C0rAyfiEj22y+KO5jQCmYm+j3yeG5m97ZvgYVyiOw28219sEfATfTd5klozZ2vAR6b8U3GJHttlcUdzGgFF9J8gbyvmb/nFrHuX6E4D7/YXWwTurLWJQnnbMGPLnlADu0SP7bK4ozmNQLe6pZn2wwGrbv8PSygpSs9Cw9cAAAAASUVORK5CYII="},"51gm": +/*!***************************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/StatisticsResult/index.less?modules ***! + \***************************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={title:"title___1NT0J",wrap:"wrap___2hvUc"}},"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(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return y}));var r=n(/*! react-router */"Ty5D"),i=n(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),a=n(/*! react */"q1tI"),o=n.n(a),s=n(/*! history */"YS25"),l=(n(/*! prop-types */"17x9"),n(/*! @babel/runtime/helpers/esm/extends */"wx14")),c=n(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),u=n(/*! tiny-invariant */"9R94");o.a.Component;o.a.Component;var d=function(e,t){return"function"==typeof e?e(t):e},h=function(e,t){return"string"==typeof e?Object(s.c)(e,null,null,t):e},f=function(e){return e},p=o.a.forwardRef;void 0===p&&(p=f);var m=p((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,a=Object(c.a)(e,["innerRef","navigate","onClick"]),s=a.target,u=Object(l.a)({},a,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=f!==p&&t||n,o.a.createElement("a",u)}));var g=p((function(e,t){var n=e.component,i=void 0===n?m:n,a=e.replace,s=e.to,g=e.innerRef,v=Object(c.a)(e,["component","replace","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=e.history,r=h(d(s,e.location),e.location),c=r?n.createHref(r):"",m=Object(l.a)({},v,{href:c,navigate:function(){var t=d(s,e.location);(a?n.replace:n.push)(t)}});return f!==p?m.ref=t||g:m.innerRef=g,o.a.createElement(i,m)}))})),v=function(e){return e},b=o.a.forwardRef;void 0===b&&(b=v);var y=b((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,a=e.activeClassName,s=void 0===a?"active":a,f=e.activeStyle,p=e.className,m=e.exact,y=e.isActive,x=e.location,E=e.sensitive,_=e.strict,k=e.style,w=e.to,S=e.innerRef,C=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=x||e.location,a=h(d(w,n),n),c=a.pathname,O=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),A=O?Object(r.f)(n.pathname,{path:O,exact:m,sensitive:E,strict:_}):null,T=!!(y?y(A,n):A),I=T?function(){for(var e=arguments.length,t=new Array(e),n=0;nt+h&&d>i+h&&d>o+h&&d>l+h||de+h&&u>n+h&&u>a+h&&u>s+h||u=0||t.relatedTarget.className.indexOf("".concat(a,"-next"))>=0)||(e.setState({goInputText:""}),i(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==m&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return Object(s.a)(n,[{key:"getValidValue",value:function(){var e=this.state,t=e.goInputText,n=e.current;return!t||isNaN(t)?n:Number(t)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.locale,i=t.rootPrefixCls,a=t.changeSize,o=t.quickGo,s=t.goButton,l=t.selectComponentClass,c=t.buildOptionText,u=t.selectPrefixCls,h=t.disabled,f=this.state.goInputText,p="".concat(i,"-options"),m=l,g=null,v=null,b=null;if(!a&&!o)return null;var y=this.getPageSizeOptions();if(a&&m){var x=y.map((function(t,n){return d.a.createElement(m.Option,{key:n,value:t.toString()},(c||e.buildOptionText)(t))}));g=d.a.createElement(m,{disabled:h,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||y[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},x)}return o&&(s&&(b="boolean"==typeof s?d.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:h,className:"".concat(p,"-quick-jumper-button")},r.jump_to_confirm):d.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),v=d.a.createElement("div",{className:"".concat(p,"-quick-jumper")},r.jump_to,d.a.createElement("input",{disabled:h,type:"text",value:f,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,b)),d.a.createElement("li",{className:"".concat(p)},g,v)}}]),n}(d.a.Component);b.defaultProps={pageSizeOptions:["10","20","50","100"]};var y=b,x=n("N2Kk");function E(){}function _(e,t,n){var r=void 0===e?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var k=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(o.a)(this,n),(r=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(_(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,t){var n=r.props.prefixCls,i=e||d.a.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"==typeof e&&(i=d.a.createElement(e,Object(a.a)({},r.props))),i},r.savePaginationNode=function(e){r.paginationNode=e},r.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==r.state.current;var t},r.shouldDisplayQuickJumper=function(){var e=r.props,t=e.showQuickJumper,n=e.pageSize;return!(e.total<=n)&&t},r.handleKeyDown=function(e){e.keyCode!==g&&e.keyCode!==v||e.preventDefault()},r.handleKeyUp=function(e){var t=r.getValidValue(e);t!==r.state.currentInputValue&&r.setState({currentInputValue:t}),e.keyCode===m?r.handleChange(t):e.keyCode===g?r.handleChange(t-1):e.keyCode===v&&r.handleChange(t+1)},r.changePageSize=function(e){var t=r.state.current,n=_(e,r.state,r.props);t=t>n?n:t,0===n&&(t=r.state.current),"number"==typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:t,currentInputValue:t})),r.props.onShowSizeChange(t,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(t,e)},r.handleChange=function(e){var t=r.props.disabled,n=e;if(r.isValid(n)&&!t){var i=_(void 0,r.state,r.props);n>i?n=i:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var a=r.state.pageSize;return r.props.onChange(n,a),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current<_(void 0,r.state,r.props)},r.runIfEnter=function(e,t){if("Enter"===e.key||13===e.charCode){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,r=e.totalBoundaryShowSizeChanger;return void 0!==t?t:n>r}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,r=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),i=!this.hasPrev();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,r=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),i=!this.hasNext();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,a=t.className,o=t.style,s=t.disabled,l=t.hideOnSinglePage,c=t.total,h=t.locale,m=t.showQuickJumper,g=t.showLessItems,v=t.showTitle,b=t.showTotal,x=t.simple,E=t.itemRender,k=t.showPrevNextJumpers,w=t.jumpPrevIcon,S=t.jumpNextIcon,C=t.selectComponentClass,O=t.selectPrefixCls,A=t.pageSizeOptions,T=this.state,I=T.current,D=T.pageSize,L=T.currentInputValue;if(!0===l&&c<=D)return null;var R=_(void 0,this.state,this.props),N=[],j=null,M=null,P=null,B=null,F=null,U=m&&m.goButton,H=g?1:2,G=I-1>0?I-1:0,z=I+1=2*H&&3!==I&&(N[0]=Object(u.cloneElement)(N[0],{className:"".concat(n,"-item-after-jump-prev")}),N.unshift(j)),R-I>=2*H&&I!==R-2&&(N[N.length-1]=Object(u.cloneElement)(N[N.length-1],{className:"".concat(n,"-item-before-jump-next")}),N.push(M)),1!==J&&N.unshift(P),X!==R&&N.push(B)}var ee=null;b&&(ee=d.a.createElement("li",{className:"".concat(n,"-total-text")},b(c,[0===c?0:(I-1)*D+1,I*D>c?c:I*D])));var te=!this.hasPrev()||!R,ne=!this.hasNext()||!R;return d.a.createElement("ul",Object(r.a)({className:f()(n,a,Object(i.a)({},"".concat(n,"-disabled"),s)),style:o,unselectable:"unselectable",ref:this.savePaginationNode},V),ee,d.a.createElement("li",{title:v?h.prev_page:null,onClick:this.prev,tabIndex:te?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),te)),"aria-disabled":te},this.renderPrev(G)),N,d.a.createElement("li",{title:v?h.next_page:null,onClick:this.next,tabIndex:ne?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),ne)),"aria-disabled":ne},this.renderNext(z)),d.a.createElement(y,{disabled:s,locale:h,rootPrefixCls:n,selectComponentClass:C,selectPrefixCls:O,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:I,pageSize:D,pageSizeOptions:A,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:U}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,i=_(e.pageSize,t,e);r=r>i?i:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),n}(d.a.Component);k.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:E,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:E,locale:x.a,style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};var w=k},"6GrX": +/*!**************************************************!*\ + !*** ./node_modules/zrender/lib/contain/text.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/BoundingRect */"mFDi"),i=n(/*! ../graphic/helper/image */"Xnb7"),a=n(/*! ../core/util */"bYtY"),o=a.getContext,s=a.extend,l=a.retrieve2,c=a.retrieve3,u=a.trim,d={},h=0,f=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,p={};function m(e,t){var n=e+":"+(t=t||"12px sans-serif");if(d[n])return d[n];for(var r=(e+"").split("\n"),i=0,a=0,o=r.length;a5e3&&(h=0,d={}),h++,d[n]=i,i}function g(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function v(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function b(e,t,n){var r=t.textPosition,i=t.textDistance,a=n.x,o=n.y;i=i||0;var s=n.height,l=n.width,c=s/2,u="left",d="top";switch(r){case"left":a-=i,o+=c,u="right",d="middle";break;case"right":a+=i+l,o+=c,d="middle";break;case"top":a+=l/2,o-=i,u="center",d="bottom";break;case"bottom":a+=l/2,o+=s+i,u="center";break;case"inside":a+=l/2,o+=c,u="center",d="middle";break;case"insideLeft":a+=i,o+=c,d="middle";break;case"insideRight":a+=l-i,o+=c,u="right",d="middle";break;case"insideTop":a+=l/2,o+=i,u="center";break;case"insideBottom":a+=l/2,o+=s-i,u="center",d="bottom";break;case"insideTopLeft":a+=i,o+=i;break;case"insideTopRight":a+=l-i,o+=i,u="right";break;case"insideBottomLeft":a+=i,o+=s-i,d="bottom";break;case"insideBottomRight":a+=l-i,o+=s-i,u="right",d="bottom"}return(e=e||{}).x=a,e.y=o,e.textAlign=u,e.textVerticalAlign=d,e}function y(e,t,n,r,i){if(!t)return"";var a=(e+"").split("\n");i=x(t,n,r,i);for(var o=0,s=a.length;o=a;c++)o-=a;var u=m(n,t);return u>o&&(n="",u=0),o=e-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=o,r.containerWidth=e,r}function E(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";var a=m(e,r);if(a<=n)return e;for(var o=0;;o++){if(a<=i||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?_(e,i,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*i/a):0;a=m(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function _(e,t,n,r){for(var i=0,a=0,o=e.length;ad)e="",o=[];else if(null!=h)for(var f=x(h-(n?n[1]+n[3]:0),t,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),p=0,m=o.length;pa&&O(n,e.substring(a,o)),O(n,r[2],r[1]),a=f.lastIndex}ab)return{lines:[],width:0,height:0};P.textWidth=m(P.text,T);var D=C.textWidth,L=null==D||"auto"===D;if("string"==typeof D&&"%"===D.charAt(D.length-1))P.percentWidth=D,h.push(P),D=0;else{if(L){D=P.textWidth;var R=C.textBackgroundColor,N=R&&R.image;N&&(N=i.findExistImage(N),i.isImageReady(N)&&(D=Math.max(D,N.width*I/N.height)))}var j=A?A[1]+A[3]:0;D+=j;var M=null!=v?v-w:null;null!=M&&M1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};t.a=function(e,t,n){var r=(e=e||{}).random||(e.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return u(r)}},"7SHv": +/*!*********************************************!*\ + !*** ./node_modules/zrender/lib/Painter.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./config */"LPTA").devicePixelRatio,i=n(/*! ./core/util */"bYtY"),a=n(/*! ./core/log */"SUKs"),o=n(/*! ./core/BoundingRect */"mFDi"),s=n(/*! ./core/timsort */"BPZU"),l=n(/*! ./Layer */"Xmg4"),c=n(/*! ./animation/requestAnimationFrame */"mLcG"),u=n(/*! ./graphic/Image */"Dagg"),d=n(/*! ./core/env */"ItGF");function h(e){return parseInt(e,10)}var f=new o(0,0,0,0),p=new o(0,0,0,0);var m=function(e,t,n){this.type="canvas";var a=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=i.extend({},n||{}),this.dpr=n.devicePixelRatio||r,this._singleCanvas=a,this.root=e;var o=e.style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",e.innerHTML=""),this.storage=t;var s=this._zlevelList=[],c=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,a){var u=e.width,d=e.height;null!=n.width&&(u=n.width),null!=n.height&&(d=n.height),this.dpr=n.devicePixelRatio||1,e.width=u*this.dpr,e.height=d*this.dpr,this._width=u,this._height=d;var h=new l(e,this,this.dpr);h.__builtin__=!0,h.initContext(),c[314159]=h,h.zlevel=314159,s.push(314159),this._domRoot=e}else{this._width=this._getSize(0),this._height=this._getSize(1);var f=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(f)}this._hoverlayer=null,this._hoverElements=[]};m.prototype={constructor:m,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(e){var t=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,e,this._redrawId);for(var r=0;r=0&&n.splice(r,1),e.__hoverMir=null},clearHover:function(e){for(var t=this._hoverElements,n=0;n15)break}l.__drawIndex=v,l.__drawIndex0&&e>r[0]){for(s=0;se);s++);o=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(o){var c=o.dom;c.nextSibling?l.insertBefore(t.dom,c.nextSibling):l.appendChild(t.dom)}else l.firstChild?l.insertBefore(t.dom,l.firstChild):l.appendChild(t.dom)}else a("Layer of zlevel "+e+" is not valid")},eachLayer:function(e,t){var n,r,i=this._zlevelList;for(r=0;r0?.01:0),this._needsManuallyCompositing),l.__builtin__||a("ZLevel "+c+" has been used by unkown layer "+l.id),l!==i&&(l.__used=!0,l.__startIndex!==n&&(l.__dirty=!0),l.__startIndex=n,l.incremental?l.__drawIndex=-1:l.__drawIndex=n,t(n),i=l),s.__dirty&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=n))}t(n),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(e){e.clear()},setBackgroundColor:function(e){this._backgroundColor=e},configLayer:function(e,t){if(t){var n=this._layerConfig;n[e]?i.merge(n[e],t,!0):n[e]=t;for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===t?[]:t),a=[];function o(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.map((function(u,d){var h=Object(l.h)(s?s.pos:"0",d),f=c(u.key,h),p=Object(i.a)(Object(i.a)({},u),{},{parent:s,pos:h,children:null,data:u,isStart:[].concat(Object(r.a)(s?s.isStart:[]),[0===d]),isEnd:[].concat(Object(r.a)(s?s.isEnd:[]),[d===e.length-1])});return a.push(p),!0===t||n.has(f)?p.children=o(u.children||[],p):p.children=[],p}))}return o(e),a}function h(e,t,n){var r;n?"string"==typeof n?r=function(e){return e[n]}:"function"==typeof n&&(r=function(e){return n(e)}):r=function(e,t){return c(e.key,t)},function n(i,a,o){var s=i?i.children:e,c=i?Object(l.h)(o.pos,a):"0";if(i){var u=r(i,c),d={node:i,index:a,pos:c,key:u,parentPos:o.node?o.pos:null,level:o.level+1};t(d)}s&&s.forEach((function(e,t){n(e,t,{node:i,pos:c,level:o?o.level+1:-1})}))}(null)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,a=arguments.length>2?arguments[2]:void 0,o={},s={},l={posEntities:o,keyEntities:s};return n&&(l=n(l)||l),h(e,(function(e){var t=e.node,n=e.index,i=e.pos,a=e.key,u=e.parentPos,d={node:t,index:n,key:a,pos:i,level:e.level},h=c(a,i);o[i]=d,s[h]=d,d.parent=o[u],d.parent&&(d.parent.children=d.parent.children||[],d.parent.children.push(d)),r&&r(d,l)}),a),i&&i(l),l}function p(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,a=t.loadingKeys,o=t.checkedKeys,s=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,u=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==i.indexOf(e),loading:-1!==a.indexOf(e),checked:-1!==o.indexOf(e),halfChecked:-1!==s.indexOf(e),pos:String(u?u.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function m(e){var t=e.data,n=e.expanded,r=e.selected,a=e.checked,o=e.loaded,l=e.loading,c=e.halfChecked,u=e.dragOver,d=e.dragOverGapTop,h=e.dragOverGapBottom,f=e.pos,p=e.active,m=Object(i.a)(Object(i.a)({},t),{},{expanded:n,selected:r,checked:a,loaded:o,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:d,dragOverGapBottom:h,pos:f,active:p});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Object(s.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}},"8EBN": +/*!**********************************************!*\ + !*** ./node_modules/codemirror/mode/meta.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.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 t=0;t-1&&t.substring(i+1,t.length);if(a)return e.findModeByExtension(a)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n"],v=new f.a.Renderer,b=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function y(){m.length=0,g=["
        "]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function E(){return function e(t,n,r,i){if(n>=t.length||t[n].level<=r)return n;var a=t[n];i.push("
      • "+a.text+"");var o=[];return n=e(t,++n,a.level,o),o.length>0&&(i.push("
          "),o.forEach((function(e){i.push(e)})),i.push("
        ")),i.push("
      • "),n=e(t,n,r,i)}(m,0,0,g),g.push("
      "),g.join("")}var _={heading:function(e){var t=b.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:Object(s.a)(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||""),i=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(i)>=0){var a=S(),o=r;r=a,C[a]={type:"block",expression:o}}return{type:"code",raw:n,lang:i,text:r}}}},k=/(?:\${2})([^\n`]+?)(?:\${2})/gi,w=0,S=function(){return"__special_katext_id_".concat(w++,"__")},C={};function O(){w=0,C={}}function A(e){return e=e.replace(k,(function(e,t){var n=S();return C[n]={type:"inline",expression:t},n}))}var T=v.listitem;v.listitem=function(e){return T(A(e))};var I=v.paragraph;v.paragraph=function(e){return I(A(e))};var D=v.tablecell;v.tablecell=function(e,t){return D(A(e),t)},v.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"

      ".concat(e,"

      "):'
      ').concat(n?e:Object(p.escape)(e,!0),"
      \n"):'
      '+(n?e:Object(p.escape)(e,!0))+"
      "},v.heading=function(e,t,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:r,level:t,text:e}),"'+e+""},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:_,renderer:v});var L=f.a,R=(n("SJMd"),n("ulZh")),N=n.n(R),j=n("m3rI"),M=n("Oy/b"),P=n("p5ED"),B=n("ErOA"),F=function(e,t){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function U(e,t){function n(){this.constructor=e}F(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function H(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function G(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]',"select"),this.addActionButton(n,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'',"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(e){var n=document.createElement("div");n.className=""+t.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",e.typeName),n.innerHTML=e.icon,n.addEventListener("click",(function(){t.markerToolbarButtonClicked(n,e)})),t.buttons.push(n),t.markerButtons.push(n)})),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()},e.prototype.addButtonClickListener=function(e){this.buttonClickListeners.push(e)},e.prototype.removeButtonClickListener=function(e){this.buttonClickListeners.indexOf(e)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(e),1)},e.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},e.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var e=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t0&&this.buttonClickListeners.forEach((function(e){return e("marker",t)})),this.markerButtonOverflowBlock.style.display="none"},e.prototype.actionToolbarButtonClicked=function(e,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("action",t)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},e.prototype.setActiveButton=function(e){this.resetButtonStyles(),e.className=e.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),e.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},e.prototype.setActiveMarkerButton=function(e){var t=this.markerButtons.find((function(t){return t.getAttribute("data-type-name")===e}));t&&this.setActiveButton(t)},e.prototype.setCurrentMarker=function(e){var t=this;this.currentMarker=e,this.buttons.filter((function(e){return/delete|notes/.test(e.getAttribute("data-action"))})).forEach((function(e){void 0===t.currentMarker?(e.style.fillOpacity="0.4",e.style.pointerEvents="none"):(e.style.fillOpacity="1",e.style.pointerEvents="all")}))},e}(),Z=function(){function e(e,t,n,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=e,this.displayMode=t,this.uiStyleSettings=n,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return e.prototype.addStyles=function(){var e;this.toolboxStyleClass=this.styles.addClass(new J("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 J("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var t=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new J("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new J("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new J("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 J("toolbox-panel-row_colors","\n background-color: "+(null!==(e=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==e?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new J("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new J("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new J("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new Q("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new Q("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},e.prototype.show=function(e){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==t?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},e.prototype.setPanelButtons=function(e){var t,n,r=this;this.panels=e,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==t?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(e){var t;e.uiStyleSettings=r.uiStyleSettings;var n=document.createElement("div");n.className=r.toolboxButtonStyleClass.name+" "+(null!==(t=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==t?t:r.toolboxButtonStyleColorsClass.name),n.innerHTML=e.icon,n.title=e.title,n.addEventListener("click",(function(){r.panelButtonClick(e)})),r.panelButtons.push(n),r.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},e.prototype.panelButtonClick=function(e){var t=this,n=-1;if(e!==this.activePanel){n=this.panels.indexOf(e),this.panelRow.innerHTML="";var r=e.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=e}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===t.displayMode?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(e,r){var i,a;e.className=t.toolboxButtonStyleClass.name+" "+(r===n?""+(null!==(i=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==i?i:t.toolboxActiveButtonStyleColorsClass.name):""+(null!==(a=t.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==a?a:t.toolboxButtonStyleColorsClass.name))}))},e}(),$=function(e,t){this.title=e,this.icon=t},ee=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.colors=[],a.addTransparent=!1,a.colorBoxes=[],a.colors=n,a.currentColor=r,a.setCurrentColor=a.setCurrentColor.bind(a),a.getColorBox=a.getColorBox.bind(a),a}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.colors.forEach((function(n){var r=e.getColorBox(n);t.appendChild(r),e.colorBoxes.push(r)})),t},t.prototype.getColorBox=function(e){var t=this,n=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-n,i=document.createElement("div");i.style.display="inline-block",i.style.boxSizing="content-box",i.style.width=r-2+"px",i.style.height=r-2+"px",i.style.padding="1px",i.style.marginRight="2px",i.style.marginBottom="2px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderRadius=(r+2)/2+"px",i.style.borderColor=e===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentColor(e,i)}));var a=document.createElement("div");return a.style.display="inline-block",a.style.width=r-2+"px",a.style.height=r-2+"px",a.style.backgroundColor=e,a.style.borderRadius=r/2+"px","transparent"===e&&(a.style.fill=this.uiStyleSettings.toolboxAccentColor,a.innerHTML='\n \n '),i.appendChild(a),i},t.prototype.setCurrentColor=function(e,t){var n=this;this.currentColor=e,this.colorBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(e)},t}($),te=function(){function e(e,t,n){this._state="new",this._isSelected=!1,this._container=e,this._overlayContainer=t,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(e.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!1},Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},e.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},e.prototype.pointerDown=function(e,t){},e.prototype.dblClick=function(e,t){},e.prototype.manipulate=function(e){},e.prototype.pointerUp=function(e){this.stateChanged()},e.prototype.dispose=function(){},e.prototype.addMarkerVisualToContainer=function(e){this.container.childNodes.length>0?this.container.insertBefore(e,this.container.childNodes[0]):this.container.appendChild(e)},e.prototype.getState=function(){return{typeName:e.typeName,state:this.state,notes:this.notes}},e.prototype.restoreState=function(e){this._state=e.state,this.notes=e.notes},e.prototype.scale=function(e,t){},e.prototype.colorChanged=function(e){this.onColorChanged&&this.onColorChanged(e),this.stateChanged()},e.prototype.fillColorChanged=function(e){this.onFillColorChanged&&this.onFillColorChanged(e),this.stateChanged()},e.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var e=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),e.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(e)&&this.onStateChanged(this)}},e.typeName="MarkerBase",e}(),ne=function(){function e(){this.findGripByVisual=this.findGripByVisual.bind(this)}return e.prototype.findGripByVisual=function(e){return this.topLeft.ownsTarget(e)?this.topLeft:this.topCenter.ownsTarget(e)?this.topCenter:this.topRight.ownsTarget(e)?this.topRight:this.centerLeft.ownsTarget(e)?this.centerLeft:this.centerRight.ownsTarget(e)?this.centerRight:this.bottomLeft.ownsTarget(e)?this.bottomLeft:this.bottomCenter.ownsTarget(e)?this.bottomCenter:this.bottomRight.ownsTarget(e)?this.bottomRight:void 0},e}(),re=function(){function e(){this.GRIP_SIZE=10,this.visual=V.createGroup(),this.visual.appendChild(V.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(V.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e}(),ie=function(){function e(){}return e.toITransformMatrix=function(e){return{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}},e.toSVGMatrix=function(e,t){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},e}(),ae=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(V.createTransform()),i.setupControlBox(),i}return U(t,e),Object.defineProperty(t.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visual",{get:function(){return this._visual},set:function(e){this._visual=e;var t=V.createTransform();this._visual.transform.baseVal.appendItem(t)},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!!(void 0!==this.controlGrips.findGripByVisual(t)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(t);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(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},t.prototype.moveVisual=function(e){this.visual.style.transform="translate("+e.x+"px, "+e.y+"px)"},t.prototype.manipulate=function(e){var t=this.unrotatePoint(e);"creating"===this.state?this.resize(e):"move"===this.state?(this.left=this.manipulationStartLeft+(t.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(t.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(t):"rotate"===this.state&&this.rotate(e)},t.prototype.resize=function(e){var t=this.manipulationStartLeft,n=this.manipulationStartWidth,r=this.manipulationStartTop,i=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:t=this.manipulationStartLeft+e.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-t;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+e.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+e.y-this.manipulationStartY,i=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:i=this.manipulationStartHeight+e.y-this.manipulationStartY}n>=0?(this.left=t,this.width=n):(this.left=t+n,this.width=-n),i>=0?(this.top=r,this.height=i):(this.top=r+i,this.height=-i),this.setSize()},t.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},t.prototype.rotate=function(e){if(Math.abs(e.x-this.centerX)>.1){var t=Math.sign(e.x-this.centerX);this.rotationAngle=180*Math.atan((e.y-this.centerY)/(e.x-this.centerX))/Math.PI+90*t,this.applyRotation()}},t.prototype.applyRotation=function(){var e=this.container.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(e,0)},t.prototype.rotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM(),n=V.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.unrotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM();t=t.inverse();var n=V.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=V.createGroup();var e=V.createTransform();e.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(e),this.container.appendChild(this.controlBox),this.controlRect=V.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=V.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 ne,this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){var e=this.controlBox.transform.baseVal.getItem(0);e.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(e,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),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()},t.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()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(V.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.controlGrips.topLeft.GRIP_SIZE,t=-e/2,n=t,r=(this.width+this.CB_DISTANCE)/2-e/2,i=(this.height+this.CB_DISTANCE)/2-e/2,a=this.height+this.CB_DISTANCE-e/2,o=this.width+this.CB_DISTANCE-e/2;this.positionGrip(this.controlGrips.topLeft.visual,t,n),this.positionGrip(this.controlGrips.topCenter.visual,r,n),this.positionGrip(this.controlGrips.topRight.visual,o,n),this.positionGrip(this.controlGrips.centerLeft.visual,t,i),this.positionGrip(this.controlGrips.centerRight.visual,o,i),this.positionGrip(this.controlGrips.bottomLeft.visual,t,a),this.positionGrip(this.controlGrips.bottomCenter.visual,r,a),this.positionGrip(this.controlGrips.bottomRight.visual,o,a),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,n-3*this.CB_DISTANCE)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.hideControlBox=function(){this.controlBox.style.display="none"},t.prototype.showControlBox=function(){this.controlBox.style.display=""},t.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ie.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ie.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*t,y:r.y*n});this.left=i.x,this.top=i.y,this.width=this.width*t,this.height=this.height*n,this.adjustControlBox()},t}(te),oe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&V.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&V.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&V.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&V.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.title="Rectangle marker",t}(ae),se=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.widths=[],a.widthBoxes=[],a.widths=n,a.currentWidth=r,a.setCurrentWidth=a.setCurrentWidth.bind(a),a}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.widths.forEach((function(n){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=n===e.currentWidth?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentWidth(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=n.toString(),i.style.marginRight="5px",r.appendChild(i);var a=document.createElement("div");a.style.minHeight="20px",a.style.flexGrow="2",a.style.display="flex",a.style.alignItems="center";var o=document.createElement("hr");o.style.minWidth="20px",o.style.border="0px",o.style.borderTop=n+"px solid "+e.uiStyleSettings.toolboxColor,o.style.flexGrow="2",a.appendChild(o),r.appendChild(a),e.widthBoxes.push(r)})),t},t.prototype.setCurrentWidth=function(e,t){var n=this;this.currentWidth=e,this.widthBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},t}($),le=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.styles=[],a.styleBoxes=[],a.styles=n,a.currentStyle=r,a.setCurrentStyle=a.setCurrentStyle.bind(a),a}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.styles.forEach((function(n){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/e.styles.length-5+"%",r.style.borderColor=n===e.currentStyle?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentStyle(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.minHeight="20px",i.style.flexGrow="2",i.style.overflow="hidden";var a='\n \n ";i.innerHTML=a,r.appendChild(i),e.styleBoxes.push(r)})),t},t.prototype.setCurrentStyle=function(e,t){var n=this;this.currentStyle=e,this.styleBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},t}($),ce=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="FrameMarker",t.title="Frame marker",t.icon='',t}(oe),ue=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},de=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return U(t,e),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartX=t.x,this.manipulationStartY=t.y,"new"===this.state&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.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(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"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(t),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},t.prototype.adjustVisual=function(){},t.prototype.manipulate=function(e){"creating"===this.state?this.resize(e):"move"===this.state?(this.x1=this.manipulationStartX1+e.x-this.manipulationStartX,this.y1=this.manipulationStartY1+e.y-this.manipulationStartY,this.x2=this.manipulationStartX2+e.x-this.manipulationStartX,this.y2=this.manipulationStartY2+e.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(e)},t.prototype.resize=function(e){switch(this.activeGrip){case this.grip1:this.x1=e.x,this.y1=e.y;break;case this.grip2:case void 0:this.x2=e.x,this.y2=e.y}this.adjustVisual(),this.adjustControlBox()},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=V.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){this.positionGrips()},t.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(V.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-e/2,this.y1-e/2),this.positionGrip(this.grip2.visual,this.x2-e/2,this.y2-e/2)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.x1=this.x1*t,this.y1=this.y1*n,this.x2=this.x2*t,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},t}(te),he=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.selectorLine=V.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},t.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()),V.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},t.typeName="LineMarker",t.title="Line marker",t.icon='',t}(de),fe=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.fonts=[],a.fontBoxes=[],a.fonts=n,a.currentFont=r,a.setCurrentFont=a.setCurrentFont.bind(a),a}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.flexGrow="2",this.fonts.forEach((function(n){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/e.fonts.length-5+"%",r.style.borderColor=n===e.currentFont?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentFont(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.display="flex",i.style.minHeight="20px",i.style.flexGrow="2",i.style.fontFamily=n,i.style.overflow="hidden";var a=document.createElement("div");a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.innerHTML="The quick brown fox jumps over the lazy dog",i.appendChild(a),r.appendChild(i),e.fontBoxes.push(r)})),t},t.prototype.setCurrentFont=function(e,t){var n=this;this.currentFont=e,this.fontBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},t}($),pe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.padding=5,i.DEFAULT_TEXT="your text here",i.text=i.DEFAULT_TEXT,i.isMoved=!1,i.color=r.defaultColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setColor=i.setColor.bind(i),i.setFont=i.setFont.bind(i),i.renderText=i.renderText.bind(i),i.sizeText=i.sizeText.bind(i),i.textEditDivClicked=i.textEditDivClicked.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.setSize=i.setSize.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i}return U(t,e),t.prototype.ownsTarget=function(t){if(e.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(e){e===t&&(n=!0)})),n},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.bgRectangle=V.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=V.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(V.createTransform()),this.textElement.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.renderText=function(){var e=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(t){e.textElement.appendChild(V.createTSpan(""===t.trim()?" ":t.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},t.prototype.getTextScale=function(){var e=this.textElement.getBBox(),t=1;if(e.width>0&&e.height>0){var n=(1*this.width-this.width*this.padding*2/100)/e.width,r=(1*this.height-this.height*this.padding*2/100)/e.height;t=Math.min(n,r)}return t},t.prototype.getTextPosition=function(e){var t=this.textElement.getBBox(),n=0,r=0;return t.width>0&&t.height>0&&(n=(this.width-t.width*e)/2,r=this.height/2-t.height*e/2),{x:n,y:r}},t.prototype.sizeText=function(){var e=this.textElement.getBBox(),t=this.getTextScale(),n=this.getTextPosition(t);n.y-=e.y*t,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+t+", "+t+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(t,t))},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.sizeText()},t.prototype.setSize=function(){e.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},t.prototype.pointerUp=function(t){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),e.prototype.pointerUp.call(this,t),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.showTextEditor=function(){var e=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(e){e.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var t=Number.parseFloat(e.textEditor.style.fontSize);e.textEditor.clientWidth>=Number.parseInt(e.textEditor.style.maxWidth)&&t>.9;)t-=.1,e.textEditor.style.fontSize=Math.max(t,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(e){if(e.clipboardData){var t=e.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(t)),e.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){e.textEditDivClicked(e.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},t.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var e=this.getTextScale(),t=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),r={x:n.width*e,y:n.height*e};t.x-=r.x/2,t.y-=r.y/2,this.textEditor.style.top=t.y+"px",this.textEditor.style.left=t.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-t.x+"px",this.textEditor.style.fontSize=Math.max(16*e,12)+"px",this.textElement.style.display="none"}},t.prototype.textEditDivClicked=function(e){this.text=e.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},t.prototype.select=function(){e.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},t.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),e.prototype.deselect.call(this)},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setColor=function(e){this.textElement&&V.setAttributes(this.textElement,[["fill",e]]),this.color=e,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(e)},t.prototype.setFont=function(e){this.textElement&&V.setAttributes(this.textElement,[["font-family",e]]),this.fontFamily=e,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},t.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},t.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize(),this.sizeText(),this.positionTextEditor()},t.typeName="TextMarker",t.title="Text marker",t.icon='',t}(ae),me=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.drawingImage=V.createImage(),this.visual.appendChild(this.drawingImage);var e=V.createTransform();this.visual.transform.baseVal.appendItem(e),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){"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(t.x,t.y),this.drawing=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.manipulate=function(t){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):e.prototype.pointerUp.call(this,t)},t.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)},t.prototype.select=function(){"creating"===this.state&&this.finishCreation(),e.prototype.select.call(this)},t.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),e.prototype.deselect.call(this)},t.prototype.finishCreation=function(){for(var e=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),t=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=t[0],r=t[1],i=t[2],a=t[3],o=!1,s=0;s0&&(o=!0,sa&&(a=s),l>i&&(i=l));if(o){this.left=n/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(i-n)/this.pixelRatio,this.height=(a-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=i-n,c.height=a-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,r,i-n,a-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},t.prototype.setDrawingImage=function(){V.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},t.prototype.setColor=function(e){this.color=e,this.colorChanged(e)},t.prototype.setLineWidth=function(e){this.lineWidth=e},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){this.createVisual(),e.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setDrawingImage()},t.typeName="FreehandMarker",t.title="Freehand marker",t.icon='',t}(ae),ge=function(e){function t(t,n,r){var i=e.call(this,t,r||'')||this;return i.typeBoxes=[],i.currentType=n,i.setCurrentType=i.setCurrentType.bind(i),i}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2";for(var n=function(n){var i="both";switch(n){case 0:i="both";break;case 1:i="start";break;case 2:i="end";break;case 3:i="none"}var a=document.createElement("div");if(a.style.display="flex",a.style.flexGrow="2",a.style.alignItems="center",a.style.justifyContent="space-between",a.style.padding="5px",a.style.borderWidth="2px",a.style.borderStyle="solid",a.style.borderColor=i===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",a.addEventListener("click",(function(){e.setCurrentType(i,a)})),t.appendChild(a),"both"===i||"start"===i){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",a.appendChild(o)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.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",s.appendChild(l),a.appendChild(s),"both"===i||"end"===i){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",a.appendChild(c)}r.typeBoxes.push(a)},r=this,i=0;i<4;i++)n(i);return t},t.prototype.setCurrentType=function(e,t){var n=this;this.currentType=e,this.typeBoxes.forEach((function(e){e.style.borderColor=e===t?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},t}($),ve=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new ge("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},t.prototype.getArrowPoints=function(e,t){var n=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return e-n/2+","+(t+r/2)+" "+e+","+(t-r/2)+" "+(e+n/2)+","+(t+r/2)},t.prototype.createTips=function(){this.arrow1=V.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=V.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.arrow2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.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",V.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),V.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},t.prototype.setArrowType=function(e){this.arrowType=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},t.typeName="ArrowMarker",t.title="Arrow marker",t.icon='',t}(he),be=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new ee("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="CoverMarker",t.title="Cover marker",t.icon='',t}(oe),ye=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.opacities=[],a.opacityBoxes=[],a.opacities=n,a.currentOpacity=r,a.setCurrentOpacity=a.setCurrentOpacity.bind(a),a}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",t.style.justifyContent="space-between",this.opacities.forEach((function(n){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=n===e.currentOpacity?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentOpacity(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=100*n+"%",r.appendChild(i),e.opacityBoxes.push(r)})),t},t.prototype.setCurrentOpacity=function(e,t){var n=this;this.currentOpacity=e,this.opacityBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},t}($),xe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new ee("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new ye("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return U(t,e),t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&V.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="HighlightMarker",t.title="Highlight marker",t.icon='',t}(be),Ee='',_e=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new ee("Text color",r.defaultColorSet,i.color,''),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new ee("Fill color",r.defaultColorSet,i.bgColor,Ee),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new re,i.tipGrip.visual.transform.baseVal.appendItem(V.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return U(t,e),t.prototype.ownsTarget=function(t){return e.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},t.prototype.createTip=function(){V.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=V.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},t.prototype.pointerDown=function(t,n){"new"===this.state&&e.prototype.pointerDown.call(this,t,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,e.prototype.pointerUp.call(this,t);else{var n="creating"===this.state;e.prototype.pointerUp.call(this,t),this.setTipPoints(n),this.positionTip()}},t.prototype.manipulate=function(t){if(this.tipMoving){var n=this.unrotatePoint(t);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else e.prototype.manipulate.call(this,t)},t.prototype.setBgColor=function(e){this.bgRectangle&&this.tip&&(V.setAttributes(this.bgRectangle,[["fill",e]]),V.setAttributes(this.tip,[["fill",e]])),this.bgColor=e,this.fillColorChanged(e)},t.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},t.prototype.setTipPoints=function(e){void 0===e&&(e=!1);var t=Math.min(this.height/2,15),n=this.height/5;e&&(this.tipPosition={x:t+n/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 t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},t.typeName="MeasurementMarker",t.title="Measurement marker",t.icon='',t}(he),Se=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="EllipseFrameMarker",t.title="Ellipse frame marker",t.icon='',t}(ke),Ce=function(){function e(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),e.prototype.addUndoStep=function(e){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},e.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},e.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},e.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return void 0!==e&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},e.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},e}(),Oe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},t.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.selectorCurve=V.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=t.x,this.curveY=t.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},t.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),V.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setupControlBox=function(){e.prototype.setupControlBox.call(this),this.curveControlLine1=V.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=V.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)},t.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,e.prototype.addControlGrips.call(this)},t.prototype.positionGrips=function(){e.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/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()))},t.prototype.manipulate=function(t){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),e.prototype.resize.call(this,t),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual()},t.prototype.scale=function(t,n){this.curveX=this.curveX*t,this.curveY=this.curveY*n,e.prototype.scale.call(this,t,n)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},t.typeName="CurveMarker",t.title="Curve marker",t.icon='',t}(de),Ae=function(){function e(e,t){void 0===t&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(e.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){this._defaultPrevented=!0},e}(),Te=function(e){function t(t,n,r){var i=e.call(this,t,!1)||this;return i.dataUrl=n,i.state=r,i}return U(t,e),t}(Ae),Ie=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,r)||this;return i.marker=n,i}return U(t,e),t}(Ae),De=function(){function e(){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 e.prototype.addEventListener=function(e,t){this[e].push(t)},e.prototype.removeEventListener=function(e,t){var n=this[e].indexOf(t);n>-1&&this[e].splice(n,1)},e}(),Le=function(){function e(t){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ue,this._isOpen=!1,this.undoRedoManager=new Ce,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 De,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=e.instanceCounter++,this.styles=new Y(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=t,this.targetRoot=document.body,this.width=t.clientWidth,this.height=t.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(e.prototype,"ALL_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,Se,ke,xe,_e,we,be,he,Oe]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,ke,xe,_e]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(e){if("string"==typeof e){var n=t.ALL_MARKER_TYPES.find((function(t){return t.typeName===e}));void 0!==n&&t._availableMarkerTypes.push(n)}else t._availableMarkerTypes.push(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),W.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},e.prototype.show=function(){var e=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(t){return t(new Ae(e))}))},e.prototype.render=function(){return H(this,void 0,void 0,(function(){var e;return G(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new K).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},e.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isOpen){var n=!1;e||this.eventListeners.beforeclose.forEach((function(e){var r=new Ae(t,!0);e(r),r.defaultPrevented&&(n=!0)})),n||(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(e){return e(new Ae(t))})),this.detachEvents(),this._isOpen=!1)}},e.prototype.addMarkersToToolbar=function(){for(var e,t=[],n=0;nthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,n=t',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},e.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")},e.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"},e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},e.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 e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"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 X(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(e),1),e.dispose()},e.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())},e.prototype.toolbarButtonClicked=function(e,t){if("marker"===e&&void 0!==t)this.createNewMarker(t);else if("action"===e)switch(t){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()}},e.prototype.deleteSelectedMarker=function(){var e=this;if(void 0!==this._currentMarker){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Ie(e,e._currentMarker,!0);n(r),r.defaultPrevented&&(t=!0)})),!t){var n=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(t){return t(new Ie(e,n))}))}}},e.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Ie(e,void 0,!0);n(r),r.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var n=function(t){var n=r.markers[t];r.setCurrentMarker(r.markers[t]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(t){return t(new Ie(e,n))}))},r=this,i=this.markers.length-1;i>=0;i--)n(i);this.addUndoStep()}},Object.defineProperty(e.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),e.prototype.showNotesEditor=function(){var e;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!==(e=this._currentMarker.notes)&&void 0!==e?e:"",this.overlayContainer.appendChild(this.notesArea))},e.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)},e.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},e.prototype.addUndoStep=function(){var e=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var t=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===t.width&&n.height===t.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),r1&&this.panTo({x:e.clientX,y:e.clientY}))},e.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep()},e.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},e.prototype.onKeyUp=function(e){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==e.key&&"Backspace"!==e.key||this.deleteSelectedMarker()},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.markerImage.getBoundingClientRect();return{x:(e-n.left)/this.zoomLevel,y:(t-n.top)/this.zoomLevel}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.addLicenseKey=function(e){W.addKey(e)},e.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},e.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),e.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new Ae(e))})))},e.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new Ae(e))})))},e.instanceCounter=0,e}(),Re=function(e,t){return(Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}; +/* ********************************** +cropro version 1.2.0 +@license SEE LICENSE IN LICENSE + +copyright Alan Mendelevich +see README and LICENSE for details +********************************** */ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */function Ne(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Re(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function je(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function Me(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&t>0){var n=new qe(e,t),r=n.ratio>=1?20:n.getHorizontalLength(20),i=n.ratio<1?20:n.getVerticalLength(20),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(a);var o=Be.createDefs();a.appendChild(o);var s=Be.createElement("clipPath",[["id","text-bg-clip"]]);o.appendChild(s);var l=Be.createPath(Be.getHollowRectanglePath((24-r)/2,(24-i)/2,r,i,(24-r)/2+2,(24-i)/2+2,r-4,i-4));a.appendChild(l);var c=Be.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Be.createTSpan(e+":"+t)),a.appendChild(c);var u=c.getBBox();Be.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var d=Be.createPath(Be.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 s.appendChild(d),Be.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(a),a.outerHTML}return''},e}(),Qe=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.isDropdownOpen=!1,i.onClick=i.dropdownButtonClicked,i.dropdownButtons=r,i}return Ne(t,e),t.prototype.setupDropdown=function(){var e=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(t){t.className=e.className,t.colorsClassName=e.colorsClassName,e.dropdownBlock.appendChild(t.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},t.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},t.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},t.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},t.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},t.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},t}(We),Je=function(){function e(e,t){this.GRIP_SIZE=10,this.color=e,this.fillColor=t,this.visual=Be.createGroup(),this.visual.appendChild(Be.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Be.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e.prototype.setCenter=function(e,t){this.visual.childNodes.forEach((function(n){return Be.setAttributes(n,[["cx",e.toString()],["cy",t.toString()]])}))},e}(),Xe=function(){function e(e,t,n,r){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=e,this.canvasHeight=t,this.margin=n,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(e.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(e){this._aspectRatio=e,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.gridContainer&&Be.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),e.prototype.open=function(){var e=this;this.cropShadeElement=Be.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Be.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var t=0;tthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-t.height/2),Be.setAttributes(this.cropRectElement,[["x",t.x.toString()],["y",t.y.toString()],["width",t.width.toString()],["height",t.height.toString()]]);var n=t.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(e,r){var i=t.y+n*(r+1);Be.setAttributes(e,[["x1",""+t.x],["y1",""+i],["x2",""+(t.x+t.width)],["y2",""+i]])}));var r=t.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(e,n){var i=t.x+r*(n+1);Be.setAttributes(e,[["x1",""+i],["y1",""+t.y],["x2",""+i],["y2",""+(t.y+t.height)]])})),Be.setAttributes(this.cropShadeElement,[["d",Be.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,t.x,t.y,t.width,t.height)]]),this.topLeftGrip.setCenter(t.x,t.y),this.topRightGrip.setCenter(t.x+t.width,t.y),this.bottomLeftGrip.setCenter(t.x,t.y+t.height),this.bottomRightGrip.setCenter(t.x+t.width,t.y+t.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},e.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)},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.container.getBoundingClientRect();return{x:e-n.left+this.margin,y:t-n.top+this.margin}},e.prototype.onPointerDown=function(e){this.container.setPointerCapture(e.pointerId),this.previousPoint=this.clientToLocalCoordinates(e.clientX,e.clientY),this.cropRectElement===e.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(e.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(e.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(e.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(e.target)&&(this.activeGrip=this.bottomRightGrip)},e.prototype.onPointerMove=function(e){if(this.isMoving)this.move(this.clientToLocalCoordinates(e.clientX,e.clientY));else if(this.activeGrip){var t=this.clientToLocalCoordinates(e.clientX,e.clientY);this.resize(t)}e.preventDefault()},e.prototype.onPointerUp=function(e){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(e.pointerId)},e.prototype.move=function(e){var t=e.x-this.previousPoint.x,n=e.y-this.previousPoint.y;1!==this.zoomFactor&&(t=-t/this.zoomFactor,n=-n/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+t),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+n),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=e},e.prototype.resize=function(e){var t=Object.assign({},this.cropRect),n=e.x-this.previousPoint.x,r=e.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:t.x+nthis.canvasWidth*this.zoomFactor&&(n=this.canvasWidth*this.zoomFactor-t.width),t.width+=n}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(t.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(n),t.height=this.aspectRatio.getVerticalLength(t.width)):(t.y+=r,t.height=this.cropRect.y+this.cropRect.height-t.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?t.height=this.aspectRatio.getVerticalLength(t.width):t.height+=r}t.width<10&&(t.x=this.cropRect.x,t.width=10),t.height<10&&(t.y=this.cropRect.y,t.height=10),this.previousPoint=e,t.x>=this.margin&&t.y>=this.margin&&t.x-this.margin+t.width<=this.canvasWidth&&t.y-this.margin+t.height<=this.canvasHeight&&(this.cropRect=t,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},e.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var e=this.cropRect.x+this.cropRect.width/2,t=this.cropRect.y+this.cropRect.height/2,n=this.aspectRatio.getHorizontalLength(this.cropRect.height),r=this.aspectRatio.getVerticalLength(this.cropRect.width);n/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=e-this.cropRect.width/2,this.cropRect.y=t-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)}},e.prototype.getRescaledRect=function(e,t,n,r,i,a){var o=n/e,s=r/t;return{x:(i.x-a)*o+a,y:(i.y-a)*s+a,width:i.width*o,height:i.height*s}},e.prototype.scaleCanvas=function(e,t){var n=this.getRescaledRect(this.canvasWidth,this.canvasHeight,e,t,this.cropRect,this.margin);this.canvasWidth=e,this.canvasHeight=t,this.onCropChange&&this.onCropChange(n),this.setCropRectangle(n)},e}(),Ze=function(){function e(e){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=e,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(e.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),e.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},e.prototype.onPointerDown=function(e){this.controlContainer.setPointerCapture(e.pointerId),this.isDragging=!0,this.previousPoint={x:e.clientX,y:e.clientY}},e.prototype.onPointerMove=function(e){this.isDragging&&(this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.previousPoint.x=e.clientX)},e.prototype.onPointerUp=function(e){this.isDragging&&this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(e.pointerId)},e.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var e=this.angleLabelText.getBBox();Be.setAttributes(this.angleLabelElement,[["x",((this.width-e.width)/2).toString()],["y",(this.height/2).toString()]])}},e.prototype.positionScaleShape=function(){if(this.scaleShape){var e=this.scaleShape.transform.baseVal.getItem(0);e.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(e,0)}},e.prototype.getVisual=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("width",this.width+"px"),e.setAttribute("height",this.height+"px"),e.setAttribute("viewBox","0 0 "+this.width+" "+this.height),e.style.flexShrink="0",document.body.appendChild(e);for(var t="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,n=1;n<=this.width/5+10;n++){var r=n%5==0?this.height/3:this.height/6;t+="h4v"+-r+"h1v"+r}t+="v1H0Z",this.scaleShape=Be.createPath(t);var i=Be.createTransform();this.scaleShape.transform.baseVal.appendItem(i),e.appendChild(this.scaleShape),this.angleLabelElement=Be.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Be.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var a=Be.createTSpan("");return a.innerHTML="°",this.angleLabelElement.appendChild(a),e.appendChild(this.angleLabelElement),document.body.removeChild(e),e},e}(),$e=function(){function e(){this.naturalSize=!1,this.imageType="image/png"}return e.prototype.rasterize=function(e,t,n,r,i,a,o){var s=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=e.width.baseVal.value-2*r,c.height=e.height.baseVal.value-2*r;var u=1,d=1;!0===s.naturalSize?(u=t.naturalWidth/(e.width.baseVal.value-2*r)/a,d=t.naturalHeight/(e.height.baseVal.value-2*r)/o,c.width=t.naturalWidth/a,c.height=t.naturalHeight/o):void 0!==s.width&&void 0!==s.height&&(u=s.width/n.width,d=s.height/n.height,c.width*=u,c.height*=d);var h=c.getContext("2d");h.translate(c.width/2,c.height/2),h.rotate(i*Math.PI/180),h.scale(a,o),h.translate(-c.width/2,-c.height/2),h.drawImage(t,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=n.width*u,f.height=n.height*d,f.getContext("2d").putImageData(h.getImageData((n.x-r)*u,(n.y-r)*d,n.width*u,n.height*d),0,0),l(f.toDataURL(s.imageType,s.imageQuality))}))},e}(),et=function(){function e(t){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=e.instanceCounter++,this.styles=new Fe(this.instanceNo),this.target=t,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(e){this._zoomToCropEnabled=e,e?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gridLines",{get:function(){return this._gridLines},set:function(e){this._gridLines=e,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(e){this._rotationAngle=e,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"aspectRatio",{get:function(){var e;return null!==(e=this._aspectRatio)&&void 0!==e?e:this.aspectRatios[0]},set:function(e){this._aspectRatio=e},enumerable:!1,configurable:!0}),e.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},e.prototype.show=function(){this.showUI(),this.open()},e.prototype.close=function(e){void 0===e&&(e=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),e||this.closeEventListeners.forEach((function(e){return e()})),this._isOpen=!1)},e.prototype.addRenderEventListener=function(e){this.renderEventListeners.push(e)},e.prototype.removeRenderEventListener=function(e){this.renderEventListeners.indexOf(e)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(e),1)},e.prototype.addCloseEventListener=function(e){this.closeEventListeners.push(e)},e.prototype.removeCloseEventListener=function(e){this.closeEventListeners.indexOf(e)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(e),1)},e.prototype.setupResizeObserver=function(){var e=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.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))},e.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.contentDiv.clientWidth/e>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*e:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,n=t+2*this.CANVAS_MARGINe+this.CANVAS_MARGIN?this.target.offsetTop-(e+this.CANVAS_MARGIN):0;this.coverDiv.style.top=t+"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},e.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},e.prototype.addTopToolbar=function(){var e=this;this.topToolbar=new Ge,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 t=new Ve;t.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(t);var n=[];this.aspectRatios.forEach((function(t){var r=new We(Ye.getIcon(t.horizontal,t.vertical),0===t.horizontal&&0===t.vertical?"FREE":t.horizontal+":"+t.vertical);r.onClick=function(){return e.ratioButtonClicked(t)},n.push(r)})),this.aspectRatioButton=new Qe(Ye.getIcon(0,0),"Aspect ratio",n),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,t.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var r=new We('',"Toggle grid");r.isActive=this.isGridVisible,r.onClick=function(){e.isGridVisible=!e.isGridVisible,r.isActive=e.isGridVisible},t.addButton(r);var i=new We('',"Zoom to selection");if(i.isActive=this.zoomToCropEnabled,i.onClick=function(){e.zoomToCropEnabled=!e.zoomToCropEnabled,i.isActive=e.zoomToCropEnabled},t.addButton(i),!Pe.isLicensed){var a=new Ke;this.topToolbar.addElementBlock(a);var o=document.createElement("div");o.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var s=document.createElement("a");s.style.color="currentColor",s.href="https://markerjs.com/products/cropro",s.target="_blank",s.innerHTML='',o.appendChild(s),a.addElement(o)}var l=new Ve;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new We('',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new We('',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},e.prototype.addBottomToolbar=function(){var e=this;this.bottomToolbar=new Ge,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 t=new Ve;t.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(t);var n=new We('',"Rotate left");n.onClick=this.rotateLeftButtonClicked,t.addButton(n);var r=new We('',"Rotate right");r.onClick=this.rotateRightButtonClicked,t.addButton(r);var i=new Ke;i.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(i),this.straightener=new Ze("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(t){e.rotateBy(t),e.straightener.angle=e.rotationAngle},i.addElement(this.straightener.getUI());var a=new Ve;a.minWidth=2*this.toolbarHeight+"px",a.contentAlign="end",this.bottomToolbar.addButtonBlock(a);var o=new We('',"Flip horizontal");o.onClick=this.flipHorizontallyButtonClicked,a.addButton(o);var s=new We('',"Flip vertical");s.onClick=this.flipVerticallyButtonClicked,a.addButton(s)},e.prototype.ratioButtonClicked=function(e){this.aspectRatio=e,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},e.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Ye.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},e.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new qe(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},e.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},e.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},e.prototype.restoreState=function(e){if(e){var t=this.cropLayer.getRescaledRect(e.width,e.height,this.imageWidth,this.imageHeight,e.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(t),this.cropRectChanged(t),this.flippedHorizontally=e.flippedHorizontally,this.flippedVertically=e.flippedVertically,this.applyFlip(),this.rotationAngle=e.rotationAngle,this.applyRotation()}},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.cropImage.getBoundingClientRect();return{x:e-n.left,y:t-n.top}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var e=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.rotateLeftButtonClicked=function(){var e=this.rotationAngle-90;this.rotationAngle%90!=0&&(e+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateRightButtonClicked=function(){var e=this.rotationAngle+90;this.rotationAngle%90!=0&&(e-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateTo=function(e){e=(e=e>180?e-360:e)<=-180?e+360:e,this.rotationAngle=e,this.applyRotation()},e.prototype.rotateBy=function(e){this.rotateTo((this.rotationAngle+e)%360)},e.prototype.applyRotation=function(){var e=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var t=this.editingTargetRotationContainer.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(t,0);var n=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/n.width,this.imageHeight/n.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=e},e.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},e.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},e.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},e.prototype.startRenderAndClose=function(){return je(this,void 0,void 0,(function(){var e,t;return Me(this,(function(n){switch(n.label){case 0:return[4,this.render()];case 1:return e=n.sent(),t=this.getState(),this.renderEventListeners.forEach((function(n){return n(e,t)})),this.close(!0),[2]}}))}))},e.prototype.render=function(){return je(this,void 0,void 0,(function(){var e;return Me(this,(function(t){switch(t.label){case 0:return(e=new $e).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.width=this.renderWidth,e.height=this.renderHeight,this.unzoomFromCrop(),Be.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,e.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 t.sent(),[4,e.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,t.sent()]}}))}))},e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new He("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 He("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new He("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var e=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new He("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*e)+"px;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new He("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new He("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new Ue("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Ue("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new He("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 He("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new He("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 He("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new He("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},e.instanceCounter=0,e}(),tt=n("8hTe"),nt=n.n(tt),rt=/]*>/g;t.a=function(e){var t=e.value,n=void 0===t?"":t,l=e.edit,h=void 0!==l&&l,f=e.className,p=e.showTextOnly,m=e.showLines,g=e.replaces,v=e.zoomImg,b=e.hasMask,_=e.style,k=void 0===_?{}:_,w=e.stylesPrev,S=void 0===w?{}:w,A=String(n),T=Object(u.useRef)(),I=Object(u.useRef)(),D=Object(u.useState)(""),R=Object(s.a)(D,2),F=R[0],U=R[1],H=Object(u.useState)("office"),G=Object(s.a)(H,2),z=G[0],V=G[1],W=Object(u.useMemo)((function(){try{A=(A=A.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+j.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+j.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+j.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]

      ",E()),y()),e=(e=e.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var r=t[n],i=r.type,a=r.expression;return Object(M.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(a)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),O(),p){var n=document.createElement("div");return n.innerHTML=e,n.innerText}return setTimeout((function(){return Y()}),500),e}),[A]),K=Object(u.useRef)();function q(e){var t=e.target;if("IMG"===t.tagName.toUpperCase()){if(v){var n=t.getAttribute("src");U(n),V("image")}}else if("A"===t.tagName.toUpperCase()){var r=t.getAttribute("href");if(r.indexOf("office")>-1)e.preventDefault(),U(r),V("office");else if(r.indexOf("application/pdf")>-1)e.preventDefault(),U(r),V("pdf");else if(r.indexOf("type=text")>-1)e.preventDefault(),U(r),V("html");else if(r.startsWith("#")){e.preventDefault();var i=document.getElementById(r.replace("#",""));i&&i.scrollIntoView(!0)}}}x.WebkitLineClamp=m,m&&(k=Object(a.a)(Object(a.a)({},k),x));var Y=function(){var e,t=null===(e=K.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(N.a.isSupported()){var t=new N.a;t.loadSource(e.src),t.attachMedia(e)}}))};Object(u.useEffect)((function(){if(K.current&&W&&W.match(rt)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",q),function(){K.current.removeEventListener("click",q),O(),y()}}),[W,K.current,q]);return d.a.createElement("div",{style:{position:"relative"}},d.a.createElement("div",{ref:K,style:Object(a.a)({},k),className:"".concat(f||""," markdown-body ").concat(nt.a.mdBody),onMouseOver:function(e){h&&("IMG"===e.target.nodeName?(T.current.style.display="flex",T.current.style.width=e.target.clientWidth+"px",T.current.style.height=e.target.clientHeight+"px",T.current.style.top=e.target.offsetTop+"px",T.current.style.left=e.target.offsetLeft+"px",I.current.src=e.target.getAttribute("src")):T.current.style.display="none")},dangerouslySetInnerHTML:{__html:W}}),d.a.createElement("div",{ref:T,className:nt.a.button},d.a.createElement(r.a,null,d.a.createElement(i.a,{onClick:function(){return(e=new et(I.current)).displayMode="popup",e.addRenderEventListener(function(){var e=Object(o.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T.current.style.display="none",e.next=3,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:t}});case 3:null!=(n=e.sent)&&n.id&&g(I.current.getAttribute("src").replace(j.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),void e.show();var e}},"裁剪"),d.a.createElement(i.a,{onClick:function(){return(e=new Le(I.current)).settings.displayMode="popup",e.addEventListener("render",function(){var e=Object(o.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(T.current.style.display="none",!I.current){e.next=6;break}return e.next=4,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:t.dataUrl}});case 4:null!=(n=e.sent)&&n.id&&g(I.current.getAttribute("src").replace(j.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.show(),void(window.markerArea=e);var e}},"编辑"))),d.a.createElement("img",{ref:I,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),d.a.createElement(P.a,{close:!0,data:F,hasMask:b,type:null!=F&&F.length?z:"",style:Object(a.a)({},S),onClose:function(){return U("")}}))}},"9VGf": +/*!****************************************!*\ + !*** ./src/components/useInterval.tsx ***! + \****************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! react */"q1tI");function i(e,t){var n=Object(r.useRef)();Object(r.useEffect)((function(){n.current=e})),Object(r.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}},"A/g1": +/*!*******************************************!*\ + !*** ./src/assets/images/icons/done1.png ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMjEtMDctMDJUMTk6Mzg6MjMrMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmVkYzRhODM0LTVjNWQtNDQ1My04MDYzLWNkNzcwODQyODg5ZSIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjQ4MTE0OTVlLTVkMDctZTk0YS1iNWEwLWYxOWJmZmM0NGUyNyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmMwNjQyYzA1LTg5MzQtNDdlYy04MTFiLTlkYjdhZGNkYjFiMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YzA2NDJjMDUtODkzNC00N2VjLTgxMWItOWRiN2FkY2RiMWIwIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjM4OjIzKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZWRjNGE4MzQtNWM1ZC00NDUzLTgwNjMtY2Q3NzA4NDI4ODllIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5fJkpyAAAGoElEQVRogc2abWxbVxnH/8+59/rdTpx2GW3UNWJJV7Ylaxp3LUFsWgJDiI5R8bK2GppAmsgQLKQthS8IEJ9okibrREf3gX2Y1K2bxAoDtog60RBSVxKnWUO7kpSppXJZK2ja2HFi33vPw4cmpbN9r++1k8Lv2znnf577f+zje95Mhw4dQqUkwljpF7kuv0EdHkm1HklRr6TQq2tn5xcklwhIMnMSQJIJxykTiSce+1am0mer5XacqM7uDJjiqbAuWlvSygrBnmKyxcoIA+tBBAAgAAikjNZ47zCIh8E8mOjYO1aOD3L7DYzXZJurs8qhuzLqFsH22hcbUs6CMudAol8Ic2Dkkb0fuvEj3IinwvobjTOeRP1safOuIPIA/AMpxbsb4z3fc9PVUQLvRY37L/vMDxtT2peCBpU97BywlkD9sXjvbzcfG7jTSYeSCZyK6l9tTCkn75xXHAVcChh4zCDzLy1DfQ+U0tomcDaSO9A8rb0WWN5P3QK+SzCPx471bLdTWSYwFdZfXz/j+e7SG3MHE73SGu+19FE0gTNV+o8aU9pXls+Waw7E4r2fL9ZQkMB4jd5xd1r96fJ7cgeDX944vL8hv74ggdUZccRrLsw4/1fQCpLyYH7tRxKYCutv1M4rK26fKdd8Nn+euJnAySp9w+o5dettt+QSItHV+nb/qsXyzddj1KAXlnmSsuIMgV8v1sCgHxdWcj002QXgh8BCAqdq9B33T2tbltOlBWcEia+NtO86nd/QOtR3EGyxXmHZHXun78jow7tPCgAI6NixpGsbZ1ibj/d2gvkZy55EHpbcDiz8BkK62LRsNotjaX5TvK8NzH0lI5j0aQAQ4z69pjarfGwZTFphab55sCdogntAFCgZhfgLn3xtv19oPnTexuFjaR4ANJV6CWhzGEvNrpQPiYBOt+vVaWu+Nd7bCaDTTUCS9LDwSNQuiT17bM3fGPd4zn1YWSc8kqJO5e9H9P6LAeNvLp9ia755sCcoiftAKLqptoOI6oRXUsiJ+FxIf/MTM9quNRl1/XhN7p7zQWPUQTdb88CNcQ9GWXMQA3XCb5JWSngxYJxtSGtfXCxvuOqZrJ9VN53wpcMfhIxhs8jSb0aT2VLmyxn3edQ52hOnNf5dsfrN86H0x9Nqu8KgqbBxdF5hCdwwfyFkPmFnflO8rw3AL8qy/V9YzCmsl1I1pNTdp6N6t52mMaVu85mkTEb0ly6EzCeaprXfWGmbB3uCTHgOLk9FCqGkmhWcBlBjJ9MkUX1K3TcRzV5qmvYesdOum9G+Weqxmop+Zo65dFsAEydFTvC0E3HQIHVNWnvpvRVGRYu+G+Oenq4kxiIk+ZLIKbjitEO1Lvyr0/SHieD8qtLqQhbG/Qvl9C2OSIqMWvwHasUdWSW6Umojbh/VPNgTlOCCLWElsOB3hO7BL6XLHfCqOaXuYsA466aPR6XnAZQ8qHKB4fWJP4kNV7SrV3ymqwNVAFiTUe85HzLedaKNxfd/h4FvuPdoA9Hvj7ftmhMAkFbZyaxaQH1a3XwurL9tp4kN7fsUQz5fTnxbGH8GFt7DcwpecTuMFmlIaZ+bjOgvF2u7d/gnIWZR+Q1KPowcIIaAhQSarqmH/xE0TpQbb92M9uT7kdz+/HqfDB0EcF/ZRi1ggYFER/cYcMtMOO3jzlmVjXKDrkt5uv9are9ZLJ8L6UcJ+HplVotygVRlYLFwM4GWf2njl/ymq1fqrSgM3J1Sfz5Rnd15ulp/tiGtPV6h0aIwaCDxUPc/F8sfOQdqTKnbrvjMf9fOK7ZLCyv8Jom1s9qvsHANttQw4dhY++6BW+sKFlNJr7E9K6wOZEoT0YU3ogvXm5OSMK5KQ347v7oggZbr3j/+PWwUnoj9jyHCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},BPZU: +/*!**************************************************!*\ + !*** ./node_modules/zrender/lib/core/timsort.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function r(e,t,n,r,i){for(r===t&&r++;r>>1])<0?l=a:s=a+1;var c=r-s;switch(c){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;c>0;)e[s+c]=e[s+c-1],c--}e[s]=o}}function i(e,t,n,r,i,a){var o=0,s=0,l=1;if(a(e,t[n+i])>0){for(s=r-i;l0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var c=o;o=i-l,l=i-c}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:l=u}return l}function a(e,t,n,r,i,a){var o=0,s=0,l=1;if(a(e,t[n+i])<0){for(s=i+1;ls&&(l=s);var c=o;o=i-l,l=i-c}else{for(s=r-i;l=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(e,t[n+u])<0?l=u:o=u+1}return l}function o(e,t){var n,r,o,s=7,l=0;n=e.length;var c=[];function u(n){var u=r[n],d=o[n],h=r[n+1],f=o[n+1];o[n]=d+f,n===l-3&&(r[n+1]=r[n+2],o[n+1]=o[n+2]),l--;var p=a(e[h],e,u,d,0,t);u+=p,0!==(d-=p)&&0!==(f=i(e[u+d-1],e,h,f,f-1,t))&&(d<=f?function(n,r,o,l){var u=0;for(u=0;u=7||m>=7);if(g)break;v<0&&(v=0),v+=2}if((s=v)<1&&(s=1),1===r){for(u=0;u=0;u--)e[m+u]=e[p+u];return void(e[f]=c[h])}var g=s;for(;;){var v=0,b=0,y=!1;do{if(t(c[h],e[d])<0){if(e[f--]=e[d--],v++,b=0,0==--r){y=!0;break}}else if(e[f--]=c[h--],b++,v=0,1==--l){y=!0;break}}while((v|b)=0;u--)e[m+u]=e[p+u];if(0===r){y=!0;break}}if(e[f--]=c[h--],1==--l){y=!0;break}if(0!==(b=l-i(e[d],c,0,l,l-1,t))){for(l-=b,m=(f-=b)+1,p=(h-=b)+1,u=0;u=7||b>=7);if(y)break;g<0&&(g=0),g+=2}(s=g)<1&&(s=1);if(1===l){for(m=(f-=r)+1,p=(d-=r)+1,u=r-1;u>=0;u--)e[m+u]=e[p+u];e[f]=c[h]}else{if(0===l)throw new Error;for(p=f-(l-1),u=0;u1;){var e=l-2;if(e>=1&&o[e-1]<=o[e]+o[e+1]||e>=2&&o[e-2]<=o[e]+o[e-1])o[e-1]o[e+1])break;u(e)}},this.forceMergeRuns=function(){for(;l>1;){var e=l-2;e>0&&o[e-1]=32;)t|=1&e,e>>=1;return e+t}(s);do{if((l=n(e,i,a,t))u&&(d=u),r(e,i,i+d,i+l,t),l=d}c.pushRun(i,l),c.mergeRuns(),s-=l,i+=l}while(0!==s);c.forceMergeRuns()}}}},BU3w: +/*!***************************************************!*\ + !*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***! + \***************************************************/ +/*! exports provided: injectCSS, updateCSS */ +/*! exports used: updateCSS */function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(/*! ./canUseDom */"MNnm");function i(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function a(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(r.a)())return null;var a,o=document.createElement("style");(null===(t=n.csp)||void 0===t?void 0:t.nonce)&&(o.nonce=null===(a=n.csp)||void 0===a?void 0:a.nonce);o.innerHTML=e;var s=i(n),l=s.firstChild;return n.prepend&&s.prepend?s.prepend(o):n.prepend&&l?s.insertBefore(o,l):s.appendChild(o),o}var o=new Map;function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i(n);if(!o.has(r)){var s=a("",n),l=s.parentNode;o.set(r,l),l.removeChild(s)}var c=Array.from(o.get(r).children).find((function(e){return"STYLE"===e.tagName&&e["rc-util-key"]===t}));if(c){var u,d,h;if((null===(u=n.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(d=n.csp)||void 0===d?void 0:d.nonce))c.nonce=null===(h=n.csp)||void 0===h?void 0:h.nonce;return c.innerHTML!==e&&(c.innerHTML=e),c}var f=a(e,n);return f["rc-util-key"]=t,f}},Bd2K: +/*!********************************************************!*\ + !*** ./node_modules/codemirror/addon/edit/closetag.js ***! + \********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(o,s,l){if(l!=e.Init&&l&&o.removeKeyMap("autoCloseTags"),s){var c={name:"autoCloseTags"};"object"==typeof s&&!1===s.whenClosing||(c["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}(t)}),"object"==typeof s&&!1===s.whenOpening||(c["'>'"]=function(r){return function(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),s=[],l=r.getOption("autoCloseTags"),c=0;cu.ch&&(m=m.slice(0,m.length-d.end+u.ch));var y=m.toLowerCase();if(!m||"string"==d.type&&(d.end!=u.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&p.close||d.string.indexOf("/")==u.ch-d.start-1||v&&i(v,y)>-1||a(r,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(f)||[],m,u,!0))return e.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&i(x,m)>-1)s[c]={text:"/>",newPos:e.Pos(u.line,u.ch+2)};else{var E=b&&i(b,y)>-1;s[c]={indent:E,text:">"+(E?"\n\n":"")+"",newPos:E?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}}var _="object"==typeof l&&l.dontIndentOnAutoClose;for(c=o.length-1;c>=0;c--){var k=s[c];r.replaceRange(k.text,o[c].head,o[c].anchor,"+insert");var w=r.listSelections().slice(0);w[c]={head:k.newPos,anchor:k.newPos},r.setSelections(w),!_&&k.indent&&(r.indentLine(k.newPos.line,null,!0),r.indentLine(k.newPos.line+1,null,!0))}}(r)}),o.addKeyMap(c)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["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(t,n){for(var r=t.listSelections(),i=[],o=n?"/":""!=t.getLine(u.line).charAt(d.end)&&(p+=">"),i[c]=p}if(t.replaceSelections(i),r=t.listSelections(),!l)for(c=0;c=0&&n[c]==r;c--)++l;for(i=s.to,c=1;c0){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=0;r.5?t:e}function d(e,t,n,r,i){var a=e.length;if(1===i)for(var o=0;oi)e.length=i;else for(var a=r;a=0&&!(O[n]<=t);n--);n=Math.min(n,x-2)}else{for(n=U;nt);n++);n=Math.min(n-1,x-2)}U=n,H=t;var r=O[n+1]-O[n];if(0!==r)if(j=(t-O[n])/r,y)if(P=A[n],M=A[0===n?n:n-1],B=A[n>x-2?x-1:n+1],F=A[n>x-3?x-1:n+2],k)p(M,P,B,F,j,j*j,j*j*j,g(e,s),C);else{if(w)i=p(M,P,B,F,j,j*j,j*j*j,G,1),i=v(G);else{if(S)return u(P,B,j);i=m(M,P,B,F,j,j*j,j*j*j)}b(e,s,i)}else if(k)d(A[n],A[n+1],j,g(e,s),C);else{var i;if(w)d(A[n],A[n+1],j,G,1),i=v(G);else{if(S)return u(A[n],A[n+1],j);i=c(A[n],A[n+1],j)}b(e,s,i)}},ondestroy:n});return t&&"spline"!==t&&(z.easing=t),z}}}var y=function(e,t,n,r){this._tracks={},this._target=e,this._loop=t||!1,this._getter=n||s,this._setter=r||l,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};y.prototype={when:function(e,t){var n=this._tracks;for(var r in t)if(t.hasOwnProperty(r)){if(!n[r]){n[r]=[];var i=this._getter(this._target,r);if(null==i)continue;0!==e&&n[r].push({time:0,value:g(i)})}n[r].push({time:e,value:t[r]})}return this},during:function(e){return this._onframeList.push(e),this},pause:function(){for(var e=0;e1&&i&&i.length>1){var s=a(i)/a(o);!isFinite(s)&&(s=1),t.pinchScale=s;var l=[((r=i)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=l[0],t.pinchY=l[1],{type:"pinch",target:e[0].target,event:t}}}}},s=i;e.exports=s},CCdo: +/*!***************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/Redo/index.less?modules ***! + \***************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___3ACWg",flex_space_between:"flex_space_between___2YdIf",flex_box_vertical_center:"flex_box_vertical_center___lNx6c",flex_box_center_end:"flex_box_center_end___1EQGR",flex_box_column:"flex_box_column___3gBVY",title:"title___1Uu39",search:"search___17Xmk",head:"head___3jpio",row:"row___2jdpt",btns:"btns___3Qg_w",sort:"sort___uQoc6"}},CIbS: +/*!********************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/Exercise/components/Publish.tsx ***! + \********************************************************************/ +/*! exports provided: disabledTime, default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),i=(n(/*! antd/es/spin/style */"T2oS"),n(/*! antd/es/spin */"W9HT")),a=(n(/*! antd/es/checkbox/style */"sRBo"),n(/*! antd/es/checkbox */"kaz8")),o=(n(/*! antd/es/radio/style */"7Kak"),n(/*! antd/es/radio */"9yH6")),s=(n(/*! antd/es/row/style */"14J3"),n(/*! antd/es/row */"BMrR")),l=(n(/*! antd/es/date-picker/style */"iQDF"),n(/*! antd/es/date-picker */"+eQT")),c=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),u=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty */"jrin"),d=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),h=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),f=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),p=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),m=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),g=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),v=n.n(g),b=n(/*! react */"q1tI"),y=n.n(b),x=n(/*! moment */"wd/R"),E=n.n(x),_=n(/*! @/utils/fetch */"ErOA"),k=n(/*! @/utils/util */"1vsH"),w=n(/*! umi */"Ty5D"),S=n(/*! umi */"9kvl"),C=n(/*! @/utils/authority */"xKgJ"),O=n(/*! @/service/exercise */"V0Rq"),A=n(/*! @/assets/images/paper/jinshi.svg */"6K3P"),T=n.n(A),I=n(/*! ./TrfList */"jr/l");function D(e,t){for(var n=[],r=e;r0)){e.next=10;break}return c.b.info("班级不能为空"),e.abrupt("return");case 10:return ne(!0),F.map((function(e){return e.key})),i={check_ids:Object(d.a)(g.actionTabs.selectArrs),end_time:E()(t.end_time).format("YYYY-MM-DD HH:mm"),publish_time:E()(t.publish_time).format("YYYY-MM-DD HH:mm")},X?i.unified_setting=!0:i.group_ids=q.map((function(e){return e.course_group_id})),e.next=16,Object(_.a)("/api/courses/".concat(S.coursesId,"/exercises/publish.json"),{method:"post",body:i});case 16:0===e.sent.status&&(Object(k.Y)(["教学课堂","试卷","立即发布"]),ae(),c.b.success("发布成功"),x({type:"exercise/setActionTabs",payload:{}}),null!=g&&null!==(a=g.actionTabs)&&void 0!==a&&a.cb?null==g||null===(o=g.actionTabs)||void 0===o||o.cb():x({type:"classroomList/getClassroomExercisesList",payload:Object(h.a)({},g.actionTabs.params)})),ne(!1);case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=function(){M(1),U([]),Y([])};return y.a.createElement(r.a,{centered:!0,title:"发布考试",visible:"批量发布"===g.actionTabs.key,okText:"确认",cancelText:"取消",onOk:ie,confirmLoading:te||z,onCancel:function(){ae(),x({type:"exercise/setActionTabs",payload:{}})}},y.a.createElement(i.a,{spinning:z},F&&y.a.createElement(p.a,{form:D},!(null==g||null===(t=g.actionTabs)||void 0===t||!t.disabled)&&y.a.createElement("div",{style:{color:"#333333",display:"flex"},className:"font14 mb10"},y.a.createElement("img",{style:{marginRight:5},src:T.a}),"已经发布过考试的试卷不可以统一发布。"),y.a.createElement(s.a,null,y.a.createElement("span",{className:"mr10 mt5"},y.a.createElement("span",{style:{color:"red",marginRight:3}},"*"),"考试时间"),y.a.createElement(p.a.Item,{name:"publish_time"},y.a.createElement(l.a,{style:{width:155},getPopupContainer:function(e){return e.parentNode},disabledDate:function(e){return e&&e<=E()().subtract(0,"days")},disabledTime:L,placeholder:"请选择发布时间",showTime:{format:"HH:mm",defaultValue:E()(Object(k.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1})),y.a.createElement("span",{className:"mt5 ml5 mr5"},"到"),y.a.createElement(p.a.Item,{name:"end_time"},y.a.createElement(l.a,{style:{width:170},getPopupContainer:function(e){return e.parentNode},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:E()(Object(k.d)(),"HH:mm")},disabledDate:function(e){return e&&e0&&y.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"}},y.a.createElement("span",{style:{flex:1}},y.a.createElement(a.a,{checked:q.length===F.length,onChange:function(e){q.length===F.length?Y([]):Y(F)}},"全选")," "),y.a.createElement("span",{style:{width:16}}),y.a.createElement("span",{style:{flex:1}},"已选择",q.length||0,"个分班")),(1===g.actionTabs.type||!X)&&F.length>0&&y.a.createElement(I.a,{data:F,selectedRowKeys:q,setSelectedRowKeys:Y}))))}))},DBLp: +/*!*****************************************************!*\ + !*** ./node_modules/zrender/lib/core/arrayDiff2.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(){}function r(e,t,n,r){for(var i=0,a=t.length,o=0,s=0;i=a&&u+1>=o){for(var d=[],h=0;h=a&&h+1>=o)return r(i,l.components,t,e);c[n]=l}else c[n]=void 0}var m;s++}for(;s<=l;){var p=f();if(p)return p}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var i=t.length,a=n.length,o=e.newPos,s=o-r,l=0;o+15e-5||e<-5e-5}var s=function(e){(e=e||{}).position||(this.position=[0,0]),null==e.rotation&&(this.rotation=0),e.scale||(this.scale=[1,1]),this.origin=this.origin||null},l=s.prototype;l.transform=null,l.needLocalTransform=function(){return o(this.rotation)||o(this.position[0])||o(this.position[1])||o(this.scale[0]-1)||o(this.scale[1]-1)};var c=[];l.updateTransform=function(){var e=this.parent,t=e&&e.transform,n=this.needLocalTransform(),i=this.transform;if(n||t){i=i||r.create(),n?this.getLocalTransform(i):a(i),t&&(n?r.mul(i,e.transform,i):r.copy(i,e.transform)),this.transform=i;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(c);var s=c[0]<0?-1:1,l=c[1]<0?-1:1,u=((c[0]-s)*o+s)/c[0]||0,d=((c[1]-l)*o+l)/c[1]||0;i[0]*=u,i[1]*=u,i[2]*=d,i[3]*=d}this.invTransform=this.invTransform||r.create(),r.invert(this.invTransform,i)}else i&&a(i)},l.getLocalTransform=function(e){return s.getLocalTransform(this,e)},l.setTransform=function(e){var t=this.transform,n=e.dpr||1;t?e.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):e.setTransform(n,0,0,n,0,0)},l.restoreTransform=function(e){var t=e.dpr||1;e.setTransform(t,0,0,t,0,0)};var u=[],d=r.create();l.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=this.position,i=this.scale;o(t-1)&&(t=Math.sqrt(t)),o(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(t=-t),e[3]<0&&(n=-n),r[0]=e[4],r[1]=e[5],i[0]=t,i[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/t)}},l.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(r.mul(u,e.invTransform,t),t=u);var n=this.origin;n&&(n[0]||n[1])&&(d[4]=n[0],d[5]=n[1],r.mul(u,t,d),u[4]-=n[0],u[5]-=n[1],t=u),this.setLocalTransform(t)}},l.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},l.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&i.applyTransform(n,n,r),n},l.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&i.applyTransform(n,n,r),n},s.getLocalTransform=function(e,t){a(t=t||[]);var n=e.origin,i=e.scale||[1,1],o=e.rotation||0,s=e.position||[0,0];return n&&(t[4]-=n[0],t[5]-=n[1]),r.scale(t,t,i),o&&r.rotate(t,t,o),n&&(t[4]+=n[0],t[5]+=n[1]),t[4]+=s[0],t[5]+=s[1],t};var h=s;e.exports=h},Dagg: +/*!***************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Image.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Displayable */"Gev7"),i=n(/*! ../core/BoundingRect */"mFDi"),a=n(/*! ../core/util */"bYtY"),o=n(/*! ./helper/image */"Xnb7");function s(e){r.call(this,e)}s.prototype={constructor:s,type:"image",brush:function(e,t){var n=this.style,r=n.image;n.bind(e,this,t);var i=this._image=o.createOrUpdateImage(r,this._image,this,this.onload);if(i&&o.isImageReady(i)){var a=n.x||0,s=n.y||0,l=n.width,c=n.height,u=i.width/i.height;if(null==l&&null!=c?l=c*u:null==c&&null!=l?c=l/u:null==l&&null==c&&(l=i.width,c=i.height),this.setTransform(e),n.sWidth&&n.sHeight){var d=n.sx||0,h=n.sy||0;e.drawImage(i,d,h,n.sWidth,n.sHeight,a,s,l,c)}else if(n.sx&&n.sy){var f=l-(d=n.sx),p=c-(h=n.sy);e.drawImage(i,d,h,f,p,a,s,l,c)}else e.drawImage(i,a,s,l,c);null!=n.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))}},getBoundingRect:function(){var e=this.style;return this._rect||(this._rect=new i(e.x||0,e.y||0,e.width||0,e.height||0)),this._rect}},a.inherits(s,r);var l=s;e.exports=l},DlQD: +/*!*******************************************!*\ + !*** ./node_modules/marked/lib/marked.js ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";function e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[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.")}return(r=e[Symbol.iterator]()).next.bind(r)}var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){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}}e.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:t,changeDefaults:function(t){e.exports.defaults=t}}})),i=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),a=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function d(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var h=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},g=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(e,t){m[" "+e]||(g.test(e)?m[" "+e]=e+"/":m[" "+e]=x(e,"/",!0));var n=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(v,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(b,"$1")+t:e+t}function x(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:L(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,r,i,a,o,s,l,c=t[0],u=t[2],d=u.length>1,h=")"===u[u.length-1],f={type:"list",raw:c,ordered:d,start:d?+u.slice(0,-1):"",loose:!1,items:[]},p=t[0].match(this.rules.block.item),m=!1,g=p.length,v=0;v1||this.options.smartLists&&i!==u)&&(a=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-a.length),v=g-1)),o=m||/\n\n(?!\s*$)/.test(n),v!==g-1&&(m="\n"===n.charAt(n.length-1),o||(o=m)),o&&(f.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:l,loose:o,text:n});return f}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):N(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i=n.align.length;for(r=0;r/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):N(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=j(t[2],"()");if(n>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,r).trim(),t[3]=""}var i=t[2],a="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o?(i=o[1],a=o[3]):a=""}else a=t[3]?t[3].slice(1,-1):"";return M(t,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return M(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,a="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(a.lastIndex=0;null!=(r=a.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,a="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(a.lastIndex=0;null!=(r=a.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=N(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=N(this.options.mangle?t(i[1]):i[1])):n=N(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=N(this.options.mangle?t(n[0]):n[0]));else{var a;do{a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(a!==n[0]);r=N(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):N(i[0]):i[0]:N(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),B=S,F=k,U=C,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=F(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=F(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=F(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=F(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=F(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=F(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=F(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=F(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:F("^ *(?: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:F(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=F(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",G._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",G.em.start=F(G.em.start).replace(/punctuation/g,G._punctuation).getRegex(),G.em.middle=F(G.em.middle).replace(/punctuation/g,G._punctuation).replace(/overlapSkip/g,G._overlapSkip).getRegex(),G.em.endAst=F(G.em.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.em.endUnd=F(G.em.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.start=F(G.strong.start).replace(/punctuation/g,G._punctuation).getRegex(),G.strong.middle=F(G.strong.middle).replace(/punctuation/g,G._punctuation).replace(/blockSkip/g,G._blockSkip).getRegex(),G.strong.endAst=F(G.strong.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.endUnd=F(G.strong.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=F(G._blockSkip,"g").getRegex(),G.overlapSkip=F(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=F(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=F(G.tag).replace("comment",H._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=F(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=F(G.reflink).replace("label",G._label).getRegex(),G.reflinkSearch=F(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:F(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:F(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=U({},G.normal,{escape:F(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&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var Q=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||V,this.options.tokenizer=this.options.tokenizer||new P,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:W.normal,inline:K.normal};this.options.pedantic?(t.block=W.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=W.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)};var n,r,i,a=t.prototype;return a.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},a.blockTokens=function(e,t,n){var r,i,a,o;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((o=t[t.length-1]).raw+="\n"+r.raw,o.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),a=r.items.length,i=0;i0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(a=this.tokenizer.escape(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.tag(e,n,r))e=e.substring(a.raw.length),n=a.inLink,r=a.inRawBlock,t.push(a);else if(a=this.tokenizer.link(e))e=e.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),t.push(a);else if(a=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),t.push(a);else if(a=this.tokenizer.strong(e,s,i))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.em(e,s,i))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.codespan(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.br(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.del(e))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.autolink(e,Y))e=e.substring(a.raw.length),t.push(a);else if(n||!(a=this.tokenizer.url(e,Y))){if(a=this.tokenizer.inlineText(e,r,q))e=e.substring(a.raw.length),i=a.raw.slice(-1),t.push(a);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(a.raw.length),t.push(a);return t},n=t,i=[{key:"rules",get:function(){return{block:W,inline:K}}}],(r=null)&&e(n.prototype,r),i&&e(n,i),t}(),J=r.defaults,X=w,Z=E,$=function(){function e(e){this.options=e||J}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'
      '+(n?e:Z(e,!0))+"
      \n":"
      "+(n?e:Z(e,!0))+"
      \n"},t.blockquote=function(e){return"
      \n"+e+"
      \n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
      \n":"
      \n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
    • "+e+"
    • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

      "+e+"

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

      "+se(e.message+"",!0)+"
      ";throw e}}return de.options=de.setOptions=function(e){return ae(de.defaults,e),ce(de.defaults),de},de.getDefaults=le,de.defaults=ue,de.use=function(e){var t=ae({},e);if(e.renderer&&function(){var n=de.defaults.renderer||new $,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,a=new Array(i),o=0;o",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,o){o&&o!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(a(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var a=r(i,"pairs"),o=t.listSelections(),c=0;c=0;c--){var d=o[c].head;t.replaceRange("",n(d.line,d.ch-1),n(d.line,d.ch+1),"+delete")}},Enter:function(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),o=0;o1&&h.indexOf(i)>=0&&t.getRange(n(y.line,y.ch-2),y)==i+i){if(y.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(y.line,y.ch-2))))return e.Pass;v="addFour"}else if(f){var E=0==y.ch?" ":t.getRange(n(y.line,y.ch-1),y);if(e.isWordChar(x)||E==i||e.isWordChar(E))return e.Pass;v="both"}else{if(!m||!(0===x.length||/\s/.test(x)||d.indexOf(x)>-1))return e.Pass;v="both"}else v=f&&c(t,y)?"both":h.indexOf(i)>=0&&t.getRange(y,n(y.line,y.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=v)return e.Pass}else u=v}var _=l%2?o.charAt(l-1):i,k=l%2?i:o.charAt(l+1);t.operation((function(){if("skip"==u)t.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==u){var i=t.getSelections();for(r=0;r0,{anchor:new n(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new n(a.head.line,a.head.ch+(o?1:-1))});t.setSelections(i)}else"both"==u?(t.replaceSelection(_+k,null),t.triggerElectric(_+k),t.execCommand("goCharLeft")):"addFour"==u&&(t.replaceSelection(_+_+_+_,"before"),t.execCommand("goCharRight"));var a,o}))}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}a(t.pairs+"`")}(n(/*! ../../lib/codemirror */"VrN/"))},FIWC: +/*!**********************************************************************!*\ + !*** ./src/pages/Paperlibrary/Random/PreviewEdit/index.less?modules ***! + \**********************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___gdHkq",flex_space_between:"flex_space_between___lk_Gv",flex_box_vertical_center:"flex_box_vertical_center___2WNVo",flex_box_center_end:"flex_box_center_end___13O11",flex_box_column:"flex_box_column___kMb8L",wrap:"wrap___1y6rg",crumbs:"crumbs___1vKDo"}},FOrL: +/*!********************************************!*\ + !*** ./src/assets/images/icons/nodata.png ***! + \********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/nodata.a6b3f948.png"},FPkq: +/*!**************************************!*\ + !*** ./src/assets/images/qrCode.png ***! + \**************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/qrCode.dd0fe9b2.png"},Fofx: +/*!*************************************************!*\ + !*** ./node_modules/zrender/lib/core/matrix.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n="undefined"==typeof Float32Array?Array:Float32Array;function r(){var e=new n(6);return i(e),e}function i(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}t.create=r,t.identity=i,t.copy=a,t.mul=function(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e},t.translate=function(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e},t.rotate=function(e,t,n){var r=t[0],i=t[2],a=t[4],o=t[1],s=t[3],l=t[5],c=Math.sin(n),u=Math.cos(n);return e[0]=r*u+o*c,e[1]=-r*c+o*u,e[2]=i*u+s*c,e[3]=-i*c+u*s,e[4]=u*a+c*l,e[5]=u*l-c*a,e},t.scale=function(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e},t.invert=function(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=n*o-a*r;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-o*i)*l,e[5]=(a*i-n*s)*l,e):null},t.clone=function(e){var t=r();return a(t,e),t}},FxDU: +/*!*******************************************************!*\ + !*** ./node_modules/size-sensor/lib/sensors/index.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSensor=void 0;var r=n(/*! ./object */"QO+J"),i=n(/*! ./resizeObserver */"j5sG"),a="undefined"!=typeof ResizeObserver?i.createSensor:r.createSensor;t.createSensor=a},Fzz4: +/*!**********************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/Exercise/components/CutOffNow.tsx ***! + \**********************************************************************/ +/*! exports provided: disabledTime, default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),i=(n(/*! antd/es/spin/style */"T2oS"),n(/*! antd/es/spin */"W9HT")),a=(n(/*! antd/es/checkbox/style */"sRBo"),n(/*! antd/es/checkbox */"kaz8")),o=(n(/*! antd/es/row/style */"14J3"),n(/*! antd/es/row */"BMrR")),s=(n(/*! antd/es/date-picker/style */"iQDF"),n(/*! antd/es/date-picker */"+eQT")),l=(n(/*! antd/es/radio/style */"7Kak"),n(/*! antd/es/radio */"9yH6")),c=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),u=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty */"jrin"),d=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),h=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),f=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),p=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),m=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),g=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),v=n.n(g),b=n(/*! react */"q1tI"),y=n.n(b),x=n(/*! moment */"wd/R"),E=n.n(x),_=n(/*! @/utils/fetch */"ErOA"),k=n(/*! @/utils/util */"1vsH"),w=n(/*! umi */"Ty5D"),S=n(/*! umi */"9kvl"),C=n(/*! @/assets/images/paper/jinshi.svg */"6K3P"),O=n.n(C),A=n(/*! ./TrfList */"jr/l");function T(e,t){for(var n=[],r=e;r0)){e.next=4;break}return c.b.info("班级不能为空"),e.abrupt("return");case 4:return X(!0),i={check_ids:t.actionTabs.selectArrs,group_ids:G},K||(i.end_time=E()(r.end_time).format("YYYY-MM-DD HH:mm")),i.group_ids=G.map((function(e){return e.course_group_id})),e.next=10,Object(_.a)("/api/courses/".concat(g.coursesId,"/exercises/end_exercise.json"),{method:"post",body:i});case 10:0===e.sent.status&&(c.b.success("操作成功"),Object(k.Y)(["教学课堂","试卷","批量结束"]),n({type:"exercise/setActionTabs",payload:{}}),null!=t&&null!==(a=t.actionTabs)&&void 0!==a&&a.cb?null==t||null===(o=t.actionTabs)||void 0===o||o.cb():n({type:"classroomList/getClassroomExercisesList",payload:Object(h.a)({},t.actionTabs.params)})),X(!1);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return y.a.createElement(r.a,{centered:!0,title:"结束考试",visible:"批量结束"===t.actionTabs.key,okText:"确认",cancelText:"取消",onOk:$,width:680,confirmLoading:J||B,onCancel:function(){D(1),j([]),z([]),q(!0),n({type:"exercise/setActionTabs",payload:{}})}},y.a.createElement(i.a,{spinning:B},N&&y.a.createElement(p.a,{form:S},y.a.createElement("div",{style:{color:"#333333",display:"flex"},className:"font14 mb10"},y.a.createElement("img",{style:{marginRight:5},src:O.a}),"考试时间结束后,学生将不能再答题。"),y.a.createElement(o.a,{className:"mt20 mb10"},y.a.createElement("span",{className:"mr10"},y.a.createElement("span",{style:{color:"red",marginRight:3}},"*"),"结束时间"),y.a.createElement(l.a.Group,{value:K,onChange:function(e){q(e.target.value),z([])}},y.a.createElement(l.a,{value:!0},"立即结束"),y.a.createElement(l.a,{value:!1},"定时结束")),y.a.createElement(p.a.Item,{name:"end_time",style:{marginTop:-3,visibility:K?"hidden":"visible"}},y.a.createElement(s.a,{style:{width:170},getPopupContainer:function(e){return e.parentNode},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:E()(Object(k.d)(),"HH:mm")},disabledDate:function(e){return e&&e0&&y.a.createElement(o.a,{style:{marginBottom:"10px"}},y.a.createElement("span",{className:"mr10"},y.a.createElement("span",{style:{color:"red",marginRight:3}},"*"),"选择班级:"),y.a.createElement("div",null,N.length>0&&y.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"}},y.a.createElement("span",{style:{flex:1}},y.a.createElement(a.a,{checked:G.length===N.length,onChange:function(e){G.length===N.length?z([]):z(N)}},"全选")," "),y.a.createElement("span",{style:{width:16}}),y.a.createElement("span",{style:{flex:1}},"已选择",G.length||0,"个分班")),y.a.createElement(A.a,{data:N,selectedRowKeys:G,setSelectedRowKeys:z}))))))}))},GABl: +/*!********************************************!*\ + !*** ./src/assets/images/icons/chrome.png ***! + \********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAKi0lEQVRoQ71ae3BU1Rn//e7dzYuioNRsHlSqRiUB2eUx0hbaKAHEAMWxiQ6PTUAUGCuIQNVOZ0xnrHUE5GHHIqOwCag8BlQiQnnUokgt5AEIK5GnBpIFXwjkAdl7vs7dkJCETXLvEj3/5d7v9/u+337nfN8554bowBHo16+3YRh3K7IPBHcRSIDI9QJ0AWkA8h0E3xM8DWAvde5x6Pqe+D17jnVUGLxWogqPp78SGSeC3wP4ZUR8pJ+Ct50O7e344uKjEXFcBkUkSERY6e43RkE9JcCgawngaiw3O6A/l7CvaHckvLYFhTKi5B8C3B2JQ6sYEhvpcMxKKioqs4ox7SwLkvT0mFNnz82HqKkCaHacRGxL1gDybHJp6WKSYoXHkqBytzuF4FoR6WOFtKNtCP4b0c7s5N27v22Pu11B5e7+6ZTgBgE6t0f2Y74n8IUjOuo+1+7dx9vy06agcrf7fgjXARLzYwZrnZsB6BzevaRkf2uYVgWdcruHKnAjRJzWHf4ElmSl5nTcnbRnT3k4b2EFVfTt29NQ8l+zKf4EIUbi4kAnhz7ohuLiH1qCwwo62cf9ccf3l0jibh1DckPy3lKzmTcbYQWV9+k7HlArOjaEjmejRm9yaWmzOMMKMncCp9x9dwlkYEeEQUCBrO0IrqYcApx1xsV6XLt2nWl43kyQqyB38dQJPZ7MY56qdLsHGIL/iY3m24R0p2jc6BDZrkVHf3XTiBFfMy9PdbSgNotCYv6kDAPGVhCTT3vz3zCNT7o9PhHJsRoIwUJN518TS0qKrWI62q4xQ/H5uTsB+Q3I0521zrcfGf/KuTMDBrguXar7or2mSuCCRm1q4t6SN5sGOGZBTQ9DsRdgJEFpQeo8pRvRJe/MYeMUMe2lYlQczl4cBki7jT78DyCVTN32qfkuRJC8Mrd3nSGNzYoa5wYm+P5kvivv43kakBdbbWTk1zqRnlBa6jdt8j4UR1Fx9WQAUyG4aqtEUIHYBWJh4ay4dQ28ciBjJiAvR5Qx8jtEOROZsuliSFBCQc4LSvBs4xogLjmjolPLH156VLKyok4ePuKHyK1XOSN/0Bz6PUlFRaXmuzELLrmNYHCVQO6wEhjBT5zReHj99LiToUwdGPIYgNesYMPE8hDTtq0JCYovyD0KkVuaGZHvnfb6xpjPTnk8o5WS91qSNC2bo+fWZiqq1RDpZDOggMPhHPHuzKi99aIy8gHx2uQwJ9t69tr2IBPfyr3TqJPPwxE4dGScGp+//XKB2CIiQ6/YcXP3faUjGjITNII7IxBTT0eeitJjB6yfyUr5MrMrLtT6IXDZFHUWaTd0Y8LKieOVEb6JkjgwOCbTvTY726j0eFINwT4RcYRi0LVfJZeUfGqumeKimgNWp1kbQX7w/pxOmaEsHRw6BaKW2BRkBjWQCQUTFylR01td9ODjgRzfq6Gp18ezSEGmEyxJ3lfaz3w2en7VNKUQen+tQ9O0ezfMiv1QjmZcj1oJQGBvl09tKl0Fuf8Rkd+1Koj4NkqPS/lq3D+/PztoUNcLF6oOQ7AweV/p8yZm5LyqveGqWSTiSK4pnB33UH2WMtZAJMsWD7HIFHRQRFLbBnLR6Rzfk6G15PFM05R2NHFf8RazzwSDqs0Dl52ACJ6PuTm229psXhJ/xjQosZl5vs/4/NxKQNpegERQd7B3xVjfIcnK0iuPHYtOLC6uHjW/dqQoo9BO0O3ZRkfpt6+bEXNY/BmZUPJ+e/bN3pM76crPrRVIdHtAkpsDXl+oqjWMUfOrpoiC/cXbhjPqWnrhU7E75NB9dyFYt6+9uFq838/4gpwfILjOCpBkZsDr+6DBduTcmomAWmYFa9VGc3DQhplxn4h/aAqU+sIqLmRHfkZXQU6ZCG63AiRZlpQa1bu4/9K6UEGYXzMESm2zgrVqQ2i3FM6JPS7+jIEwT832xi668nN2CPBbqziN2lOV3uULTPusl6uTahTKIZFuKpt7JXGm36y4hDxSiX/YI1DG61bjupyhzaag1QJkWwfyrO6MSqkYu/QbEzNqXvV2EbnXOr51S2p4o3BWJ3Nja5btAohMsMfLV80qtxCQGXaAJJcEvL5pJmb0vJpxStRKO/hwtuYunE7ds+HJ6P1yfEwXVJ+vgCDWFi8xg64Vk7JFGattAg2nw9n35NjX92etEb32qxpzn3dNWSKxvHB2p0n12RkyHYJFtmIyjXUtnT3eye1Sc16+gUC3Q0CyJCk1aqBZIB6YKzfVsdrcMSTY4WiwJbC/C+J+vWIOq0TyHPDvNI8rKba4iBpERXUNHR9cBTkfi9j/LEJqLwW8y582OR6Ye7FXHYx3gTDnpjYiM8U4o5nZeCbyD50BpRbaEmMaE1uZtn3Y5fPQxGch6gXbJKDSdW1ExfhlW0zsmAXSxQjW+ARy1X1ZS+76k6vkd5G4J8zMhKZa2ahuqKs+DPOLn91BPsK0bctCghJXTLrDUMoPiO3PJAQvApwSyFme3xDD6PmXPCJ1MwA+KCI/axqbWZpBFFJ3LDYLQNN3cnDIEgim2NWC+unmYsqmc42XEq6C3FUiEtrpRjIIzBscm/mMeXZqih+9UOIhNbeFMhBkRb/ZMV+afaalDykb3gdBowRi/0cFtcVM2xqq1FcErZyYKoZ8FkmWGoMjjwGy6MaYTsv82a9eaOuHue2DJ6KP3P/KxQYbOThkB8R6g2/i8xwcsbfyjsJQX2x50XhNWboigGcBrKam7RKRMqce+vodYwiSIOihREYAPN5wJJGDGdkQsdc6Gpxp/AtTt/2t4c9mghIKJvcU1O0VQVQk084yhjgHxKac9i45I+VZsTj3/SGI/MIyvjF6VqBrbAoTC6vDCjIfulZM/KMo9YptchsAEk8HvPkvhdbVwYznIJJnA97EVBvLXlvfblZ0whG58nPWCvCHyJy0gyKPde7WOdVcP3JkWHfUqkOAxNn2Rcxn2vbZLXFhr15vW/nEdeeNcyUArr5ctO25OUAjH6z0+tZfzs4qRFJZiU1IHTySvPoDQKt3yeb1cFDJNhHcdI0amhQk7gh4fen1YoYPhgQ/ss/NzxHtHGj2nHDYNi/Hk9/MTQka2CoiN9t3fNVkUDr0/hU5b5SK5Gnw7yyCiMcWL+GH5sxkz80nWsO1e9uftHJysqHqtoigpy3nLYxJLgt4fY+EsnMg41FAltriIzciyjm2tcy0WuXCOUnKf/xGg1VvishwW0Fc8XIhNoYpJ7J9gfpLRByGyM8tc5FzkTromXBrxlJRaM2ReW0sSi0QQTfLwZiG1P582rv876Hs+DNehpKZFvEnoWE2U7dbbrrtTrmWjhPfeqybEby0ECLjrARF8ETML9DzxD2+WikbdifqDHND2vb/PpDm5/oXcV3XRey+tsaKH1tTLhyh661H0xCsmyaQCW1dg1HTHwpMWLbmcpneBJH7Wg+QVdCwFKI/z7R/fWdHyDULaiCIL5jdScM3Y6X+m04/aXIPQGJnwJs/OCTm8yEjYSDMLSurQPkI5CrcoK2ja0vobBTpsD3l2nKU/mGe43DFiV5Ksb8SNUCj9lrlhOUl5r8JwG9evjMBhDmdjkJYBp2luLPHHrL+nq8jxv8BV2A7FHmr6w0AAAAASUVORK5CYII="},GUcZ: +/*!*****************************************************!*\ + !*** ./node_modules/flv.js/src/flv.js + 40 modules ***! + \*****************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/events/events.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("fWQN"),i=n("mtLc"),a=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","error",r),e.ENABLE_ERROR&&(console.error?console.error(r):console.warn?console.warn(r):console.log(r))}},{key:"i",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","info",r),e.ENABLE_INFO&&(console.info?console.info(r):console.log(r))}},{key:"w",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",r),e.ENABLE_WARN&&(console.warn?console.warn(r):console.log(r))}},{key:"d",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",r),e.ENABLE_DEBUG&&(console.debug?console.debug(r):console.log(r))}},{key:"v",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",r),e.ENABLE_VERBOSE&&console.log(r)}}]),e}();c.GLOBAL_TAG="flv.js",c.FORCE_GLOBAL_TAG=!1,c.ENABLE_ERROR=!0,c.ENABLE_INFO=!0,c.ENABLE_WARN=!0,c.ENABLE_DEBUG=!0,c.ENABLE_VERBOSE=!0,c.ENABLE_CALLBACK=!1,c.emitter=new l.a;var u=c,d=function(){function e(){Object(r.a)(this,e),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return Object(i.a)(e,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}]),e}(),h=n("yKVA"),f=n("879j"),p=function(){function e(t){Object(r.a)(this,e),this._message=t}return Object(i.a)(e,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),e}(),m=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e){return Object(r.a)(this,n),t.call(this,e)}return Object(i.a)(n,[{key:"name",get:function(){return"IllegalStateException"}}]),n}(p),g=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e){return Object(r.a)(this,n),t.call(this,e)}return Object(i.a)(n,[{key:"name",get:function(){return"InvalidArgumentException"}}]),n}(p),v=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e){return Object(r.a)(this,n),t.call(this,e)}return Object(i.a)(n,[{key:"name",get:function(){return"NotImplementedException"}}]),n}(p),b={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},y={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},x=function(){function e(t){Object(r.a)(this,e),this._type=t||"undefined",this._status=b.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Object(i.a)(e,[{key:"destroy",value:function(){this._status=b.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===b.kConnecting||this._status===b.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"open",value:function(e,t){throw new v("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new v("Unimplemented abstract function!")}}]),e}(),E=n("oZsa");function _(e,t,n){return(_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(E.a)(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}var k={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:n[0]||""},i={};if(r.browser){i[r.browser]=!0;var a=r.majorVersion.split(".");i.version={major:parseInt(r.majorVersion,10),string:r.version},a.length>1&&(i.version.minor=parseInt(a[1],10)),a.length>2&&(i.version.build=parseInt(a[2],10))}if(r.platform&&(i[r.platform]=!0),(i.chrome||i.opr||i.safari)&&(i.webkit=!0),i.rv||i.iemobile){i.rv&&delete i.rv;r.browser="msie",i.msie=!0}if(i.edge){delete i.edge;r.browser="msedge",i.msedge=!0}if(i.opr){r.browser="opera",i.opera=!0}if(i.safari&&i.android){r.browser="android",i.android=!0}for(var o in i.name=r.browser,i.platform=r.platform,k)k.hasOwnProperty(o)&&delete k[o];Object.assign(k,i)}();var w=k,S=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this,"fetch-stream-loader")).TAG="FetchStreamLoader",a._seekHandler=e,a._config=i,a._needStash=!0,a._requestAbort=!1,a._contentLength=null,a._receivedLength=0,a}return Object(i.a)(n,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),_(Object(E.a)(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){var n=this;this._dataSource=e,this._range=t;var r=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(r=e.redirectedURL);var i=this._seekHandler.getConfig(r,t),a=new self.Headers;if("object"==typeof i.headers){var o=i.headers;for(var s in o)o.hasOwnProperty(s)&&a.append(s,o[s])}var l={method:"GET",headers:a,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"==typeof this._config.headers)for(var c in this._config.headers)a.append(c,this._config.headers[c]);!1===e.cors&&(l.mode="same-origin"),e.withCredentials&&(l.credentials="include"),e.referrerPolicy&&(l.referrerPolicy=e.referrerPolicy),this._status=b.kConnecting,self.fetch(i.url,l).then((function(e){if(n._requestAbort)return n._requestAbort=!1,void(n._status=b.kIdle);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==i.url&&n._onURLRedirect){var t=n._seekHandler.removeURLParameters(e.url);n._onURLRedirect(t)}var r=e.headers.get("Content-Length");return null!=r&&(n._contentLength=parseInt(r),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,e.body.getReader())}if(n._status=b.kError,!n._onError)throw new p("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);n._onError(y.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})})).catch((function(e){if(n._status=b.kError,!n._onError)throw e;n._onError(y.EXCEPTION,{code:-1,msg:e.message})}))}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(e){var t=this;return e.read().then((function(n){if(n.done)if(null!==t._contentLength&&t._receivedLength=15048,t=!w.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}}}]),n}(x),C=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this,"xhr-moz-chunked-loader")).TAG="MozChunkedLoader",a._seekHandler=e,a._config=i,a._needStash=!0,a._xhr=null,a._requestAbort=!1,a._contentLength=null,a._receivedLength=0,a}return Object(i.a)(n,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),_(Object(E.a)(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t;var n=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(n=e.redirectedURL);var r=this._seekHandler.getConfig(n,t);this._requestURL=r.url;var i=this._xhr=new XMLHttpRequest;if(i.open("GET",r.url,!0),i.responseType="moz-chunked-arraybuffer",i.onreadystatechange=this._onReadyStateChange.bind(this),i.onprogress=this._onProgress.bind(this),i.onloadend=this._onLoadEnd.bind(this),i.onerror=this._onXhrError.bind(this),e.withCredentials&&(i.withCredentials=!0),"object"==typeof r.headers){var a=r.headers;for(var o in a)a.hasOwnProperty(o)&&i.setRequestHeader(o,a[o])}if("object"==typeof this._config.headers){var s=this._config.headers;for(var l in s)s.hasOwnProperty(l)&&i.setRequestHeader(l,s[l])}this._status=b.kConnecting,i.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=b.kComplete}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var n=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(n)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=b.kError,!this._onError)throw new p("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(y.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=b.kBuffering}}},{key:"_onProgress",value:function(e){if(this._status!==b.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(e){!0!==this._requestAbort?this._status!==b.kError&&(this._status=b.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1}},{key:"_onXhrError",value:function(e){this._status=b.kError;var t=0,n=null;if(this._contentLength&&e.loaded=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(e,t){this._lastTimeLoaded=0;var n=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?n=this._currentRedirectedURL:null!=e.redirectedURL&&(n=e.redirectedURL));var r=this._seekHandler.getConfig(n,t);this._currentRequestURL=r.url;var i=this._xhr=new XMLHttpRequest;if(i.open("GET",r.url,!0),i.responseType="arraybuffer",i.onreadystatechange=this._onReadyStateChange.bind(this),i.onprogress=this._onProgress.bind(this),i.onload=this._onLoad.bind(this),i.onerror=this._onXhrError.bind(this),e.withCredentials&&(i.withCredentials=!0),"object"==typeof r.headers){var a=r.headers;for(var o in a)a.hasOwnProperty(o)&&i.setRequestHeader(o,a[o])}if("object"==typeof this._config.headers){var s=this._config.headers;for(var l in s)s.hasOwnProperty(l)&&i.setRequestHeader(l,s[l])}i.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=b.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=b.kBuffering}else{if(this._status=b.kError,!this._onError)throw new p("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(y.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}},{key:"_onProgress",value:function(e){if(this._status!==b.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var n=e.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var r=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(r)}}},{key:"_normalizeSpeed",value:function(e){var t=this._chunkSizeKBList,n=t.length-1,r=0,i=0,a=n;if(e=t[r]&&e=3&&(t=this._speedSampler.currentKBps)),0!==t){var n=this._normalizeSpeed(t);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var r=e.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=r.byteLength;var a=!1;null!=this._contentLength&&this._receivedLength0&&this._receivedLength0)for(var a=n.split("&"),o=0;o0;s[0]!==this._startName&&s[0]!==this._endName&&(l&&(i+="&"),i+=a[o])}return 0===i.length?t:t+"?"+i}}]),e}(),D=function(){function e(t,n,i){Object(r.a)(this,e),this.TAG="IOController",this._config=n,this._extraData=i,this._stashInitialSize=393216,null!=n.stashInitialSize&&n.stashInitialSize>0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===n.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new d,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return Object(i.a)(e,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(e){this._extraData=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(e){this._onSeeked=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(e){this._onRedirect=e}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return null!=this._redirectedURL||null!=this._dataSource.redirectedURL}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===O?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new T(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",n=e.seekParamEnd||"bend";this._seekHandler=new I(t,n)}else{if("custom"!==e.seekType)throw new g("Invalid seekType in config: ".concat(e.seekType));if("function"!=typeof e.customSeekHandler)throw new g("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}},{key:"_selectLoader",value:function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=A;else if(S.isSupported())this._loaderClass=S;else if(C.isSupported())this._loaderClass=C;else{if(!O.isSupported())throw new p("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=O}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}},{key:"seek",value:function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}},{key:"_internalSeek",value:function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var n={from:e,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(e){if(!e||"string"!=typeof e||0===e.length)throw new g("Url must be a non-empty string!");this._dataSource.url=e}},{key:"_expandBuffer",value:function(e){for(var t=this._stashSize;t+10485760){var r=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(n,0,t).set(r,0)}this._stashBuffer=n,this._bufferSize=t}}},{key:"_normalizeSpeed",value:function(e){var t=this._speedNormalizeList,n=t.length-1,r=0,i=0,a=n;if(e=t[r]&&e=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var n=1024*t+1048576;this._bufferSize0){var o=this._stashBuffer.slice(0,this._stashUsed),s=this._dispatchChunks(o,this._stashByteStart);if(s0){var l=new Uint8Array(o,s);a.set(l,0),this._stashUsed=l.byteLength,this._stashByteStart+=s}}else this._stashUsed=0,this._stashByteStart+=s;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var c=this._dispatchChunks(e,t);if(cthis._bufferSize&&(this._expandBuffer(u),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e,c),0),this._stashUsed+=u,this._stashByteStart=t+c}}}else if(0===this._stashUsed){var d=this._dispatchChunks(e,t);if(dthis._bufferSize&&this._expandBuffer(h),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(e,d),0),this._stashUsed+=h,this._stashByteStart=t+d}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var f=new Uint8Array(this._stashBuffer,0,this._bufferSize);f.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var p=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(p0){var g=new Uint8Array(this._stashBuffer,p);f.set(g,0)}this._stashUsed-=p,this._stashByteStart+=p}}}},{key:"_flushStashBuffer",value:function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(t,this._stashByteStart),r=t.byteLength-n;if(n0){var i=new Uint8Array(this._stashBuffer,0,this._bufferSize),a=new Uint8Array(t,n);i.set(a,0),this._stashUsed=a.byteLength,this._stashByteStart+=n}return 0}u.w(this.TAG,"".concat(r," bytes unconsumed data remain when flush buffer, dropped"))}return this._stashUsed=0,this._stashByteStart=0,r}return 0}},{key:"_onLoaderComplete",value:function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(e,t){switch(u.e(this.TAG,"Loader error, code = ".concat(t.code,", msg = ").concat(t.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=y.UNRECOVERABLE_EARLY_EOF),e){case y.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n0){var n=e.getConfig();t.emit("change",n)}}},{key:"registerListener",value:function(t){e.emitter.addListener("change",t)}},{key:"removeListener",value:function(t){e.emitter.removeListener("change",t)}},{key:"addLogListener",value:function(t){u.emitter.addListener("log",t),u.emitter.listenerCount("log")>0&&(u.ENABLE_CALLBACK=!0,e._notifyChange())}},{key:"removeLogListener",value:function(t){u.emitter.removeListener("log",t),0===u.emitter.listenerCount("log")&&(u.ENABLE_CALLBACK=!1,e._notifyChange())}}]),e}();M.emitter=new l.a;var P=M,B=function(){function e(){Object(r.a)(this,e),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return Object(i.a)(e,[{key:"isComplete",value:function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t}},{key:"isSeekable",value:function(){return!0===this.hasKeyframesIndex}},{key:"getNearestKeyframe",value:function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,n=this._search(t.times,e);return{index:n,milliseconds:t.times[n],fileposition:t.filepositions[n]}}},{key:"_search",value:function(e,t){var n=0,r=e.length-1,i=0,a=0,o=r;for(t=e[i]&&t=128){t.push(String.fromCharCode(65535&a)),r+=2;continue}}}else if(n[r]<240){if(F(n,r,2)){var o=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(o>=2048&&55296!=(63488&o)){t.push(String.fromCharCode(65535&o)),r+=3;continue}}}else if(n[r]<248&&F(n,r,3)){var s=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(s>65536&&s<1114112){s-=65536,t.push(String.fromCharCode(s>>>10|55296)),t.push(String.fromCharCode(1023&s|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")},G=(U=new ArrayBuffer(2),new DataView(U).setInt16(0,256,!0),256===new Int16Array(U)[0]),z=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"parseScriptData",value:function(t,n,r){var i={};try{var a=e.parseValue(t,n,r),o=e.parseValue(t,n+a.size,r-a.size);i[a.data]=o.data}catch(e){u.e("AMF",e.toString())}return i}},{key:"parseObject",value:function(t,n,r){if(r<3)throw new m("Data not enough when parse ScriptDataObject");var i=e.parseString(t,n,r),a=e.parseValue(t,n+i.size,r-i.size),o=a.objectEnd;return{data:{name:i.data,value:a.data},size:i.size+a.size,objectEnd:o}}},{key:"parseVariable",value:function(t,n,r){return e.parseObject(t,n,r)}},{key:"parseString",value:function(e,t,n){if(n<2)throw new m("Data not enough when parse String");var r=new DataView(e,t,n).getUint16(0,!G);return{data:r>0?H(new Uint8Array(e,t+2,r)):"",size:2+r}}},{key:"parseLongString",value:function(e,t,n){if(n<4)throw new m("Data not enough when parse LongString");var r=new DataView(e,t,n).getUint32(0,!G);return{data:r>0?H(new Uint8Array(e,t+4,r)):"",size:4+r}}},{key:"parseDate",value:function(e,t,n){if(n<10)throw new m("Data size invalid when parse Date");var r=new DataView(e,t,n),i=r.getFloat64(0,!G),a=r.getInt16(8,!G);return{data:new Date(i+=60*a*1e3),size:10}}},{key:"parseValue",value:function(t,n,r){if(r<1)throw new m("Data not enough when parse Value");var i,a=new DataView(t,n,r),o=1,s=a.getUint8(0),l=!1;try{switch(s){case 0:i=a.getFloat64(1,!G),o+=8;break;case 1:i=!!a.getUint8(1),o+=1;break;case 2:var c=e.parseString(t,n+1,r-1);i=c.data,o+=c.size;break;case 3:i={};var d=0;for(9==(16777215&a.getUint32(r-4,!G))&&(d=3);o32)throw new g("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var r=e-this._current_word_bits_left;this._fillCurrentWord();var i=Math.min(r,this._current_word_bits_left),a=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,n=n<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}(),W=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"_ebsp2rbsp",value:function(e){for(var t=e,n=t.byteLength,r=new Uint8Array(n),i=0,a=0;a=2&&3===t[a]&&0===t[a-1]&&0===t[a-2]||(r[i]=t[a],i++);return new Uint8Array(r.buffer,0,i)}},{key:"parseSPS",value:function(t){var n=e._ebsp2rbsp(t),r=new V(n);r.readByte();var i=r.readByte();r.readByte();var a=r.readByte();r.readUEG();var o=e.getProfileString(i),s=e.getLevelString(a),l=1,c=420,u=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(3===(l=r.readUEG())&&r.readBits(1),l<=3&&(c=[0,420,422,444][l]),u=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool()))for(var d=3!==l?8:12,h=0;h0&&I<16?(w=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][I-1],S=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][I-1]):255===I&&(w=r.readByte()<<8|r.readByte(),S=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){var D=r.readBits(32),L=r.readBits(32);O=r.readBool(),C=(A=L)/(T=2*D)}}var R=1;1===w&&1===S||(R=w/S);var N=0,j=0;0===l?(N=1,j=2-y):(N=3===l?1:2,j=(1===l?2:1)*(2-y));var M=16*(v+1),P=16*(b+1)*(2-y);M-=(x+E)*N,P-=(_+k)*j;var B=Math.ceil(M*R);return r.destroy(),r=null,{profile_string:o,level_string:s,bit_depth:u,ref_frames:g,chroma_format:c,chroma_format_string:e.getChromaFormatString(c),frame_rate:{fixed:O,fps:C,fps_den:T,fps_num:A},sar_ratio:{width:w,height:S},codec_size:{width:M,height:P},present_size:{width:B,height:P}}}},{key:"_skipScalingList",value:function(e,t){for(var n=8,r=8,i=0;i13))return 0;r=e.probe(t).dataOffset}this._firstParse&&(this._firstParse=!1,n+r!==this._dataOffset&&u.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(t,r).getUint32(0,!i)&&u.w(this.TAG,"PrevTagSize0 !== 0 !!!"),r+=4);for(;rt.byteLength)break;var o=a.getUint8(0),s=16777215&a.getUint32(0,!i);if(r+11+s+4>t.byteLength)break;if(8===o||9===o||18===o){var l=a.getUint8(4),c=a.getUint8(5),d=a.getUint8(6)|c<<8|l<<16|a.getUint8(7)<<24;0!==(16777215&a.getUint32(7,!i))&&u.w(this.TAG,"Meet tag which has StreamID != 0!");var h=r+11;switch(o){case 8:this._parseAudioData(t,h,s,d);break;case 9:this._parseVideoData(t,h,s,d,n+r);break;case 18:this._parseScriptData(t,h,s)}var f=a.getUint32(11+s,!i);f!==11+s&&u.w(this.TAG,"Invalid PrevTagSize ".concat(f)),r+=11+s+4}else u.w(this.TAG,"Unsupported tag type ".concat(o,", skipped")),r+=11+s+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),r}},{key:"_parseScriptData",value:function(e,t,n){var r=z.parseScriptData(e,t,n);if(r.hasOwnProperty("onMetaData")){if(null==r.onMetaData||"object"!=typeof r.onMetaData)return void u.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&u.w(this.TAG,"Found another onMetaData tag!"),this._metadata=r;var i=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},i)),"boolean"==typeof i.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=i.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof i.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=i.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof i.audiodatarate&&(this._mediaInfo.audioDataRate=i.audiodatarate),"number"==typeof i.videodatarate&&(this._mediaInfo.videoDataRate=i.videodatarate),"number"==typeof i.width&&(this._mediaInfo.width=i.width),"number"==typeof i.height&&(this._mediaInfo.height=i.height),"number"==typeof i.duration){if(!this._durationOverrided){var a=Math.floor(i.duration*this._timescale);this._duration=a,this._mediaInfo.duration=a}}else this._mediaInfo.duration=0;if("number"==typeof i.framerate){var o=Math.floor(1e3*i.framerate);if(o>0){var s=o/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=s,this._referenceFrameRate.fps_num=o,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=s}}if("object"==typeof i.keyframes){this._mediaInfo.hasKeyframesIndex=!0;var l=i.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(l),i.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=i,u.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(r).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},r))}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],n=[],r=1;r>>4;if(2===a||10===a){var o=0,s=(12&i)>>>2;if(s>=0&&s<=4){o=this._flvSoundRateTable[s];var l=1&i,c=this._audioMetadata,d=this._audioTrack;if(c||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(c=this._audioMetadata={}).type="audio",c.id=d.id,c.timescale=this._timescale,c.duration=this._duration,c.audioSampleRate=o,c.channelCount=0===l?1:2),10===a){var h=this._parseAACAudioData(e,t+1,n-1);if(null==h)return;if(0===h.packetType){c.config&&u.w(this.TAG,"Found another AudioSpecificConfig!");var f=h.data;c.audioSampleRate=f.samplingRate,c.channelCount=f.channelCount,c.codec=f.codec,c.originalCodec=f.originalCodec,c.config=f.config,c.refSampleDuration=1024/c.audioSampleRate*c.timescale,u.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",c);var p=this._mediaInfo;p.audioCodec=c.originalCodec,p.audioSampleRate=c.audioSampleRate,p.audioChannelCount=c.channelCount,p.hasVideo?null!=p.videoCodec&&(p.mimeType='video/x-flv; codecs="'+p.videoCodec+","+p.audioCodec+'"'):p.mimeType='video/x-flv; codecs="'+p.audioCodec+'"',p.isComplete()&&this._onMediaInfo(p)}else if(1===h.packetType){var m=this._timestampBase+r,g={unit:h.data,length:h.data.byteLength,dts:m,pts:m};d.samples.push(g),d.length+=h.data.length}else u.e(this.TAG,"Flv: Unsupported AAC data type ".concat(h.packetType))}else if(2===a){if(!c.codec){var v=this._parseMP3AudioData(e,t+1,n-1,!0);if(null==v)return;c.audioSampleRate=v.samplingRate,c.channelCount=v.channelCount,c.codec=v.codec,c.originalCodec=v.originalCodec,c.refSampleDuration=1152/c.audioSampleRate*c.timescale,u.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",c);var b=this._mediaInfo;b.audioCodec=c.codec,b.audioSampleRate=c.audioSampleRate,b.audioChannelCount=c.channelCount,b.audioDataRate=v.bitRate,b.hasVideo?null!=b.videoCodec&&(b.mimeType='video/x-flv; codecs="'+b.videoCodec+","+b.audioCodec+'"'):b.mimeType='video/x-flv; codecs="'+b.audioCodec+'"',b.isComplete()&&this._onMediaInfo(b)}var y=this._parseMP3AudioData(e,t+1,n-1,!1);if(null==y)return;var x=this._timestampBase+r,E={unit:y,length:y.byteLength,dts:x,pts:x};d.samples.push(E),d.length+=y.length}}else this._onError(K.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+s)}else this._onError(K.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a)}}},{key:"_parseAACAudioData",value:function(e,t,n){if(!(n<=1)){var r={},i=new Uint8Array(e,t,n);return r.packetType=i[0],0===i[0]?r.data=this._parseAACAudioSpecificConfig(e,t+1,n-1):r.data=i.subarray(1),r}u.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,n){var r,i,a=new Uint8Array(e,t,n),o=null,s=0,l=null;if(s=r=a[0]>>>3,(i=(7&a[0])<<1|a[1]>>>7)<0||i>=this._mpegSamplingRates.length)this._onError(K.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var c=this._mpegSamplingRates[i],u=(120&a[1])>>>3;if(!(u<0||u>=8)){5===s&&(l=(7&a[1])<<1|a[2]>>>7,(124&a[2])>>>2);var d=self.navigator.userAgent.toLowerCase();return-1!==d.indexOf("firefox")?i>=6?(s=5,o=new Array(4),l=i-3):(s=2,o=new Array(2),l=i):-1!==d.indexOf("android")?(s=2,o=new Array(2),l=i):(s=5,l=i,o=new Array(4),i>=6?l=i-3:1===u&&(s=2,o=new Array(2),l=i)),o[0]=s<<3,o[0]|=(15&i)>>>1,o[1]=(15&i)<<7,o[1]|=(15&u)<<3,5===s&&(o[1]|=(15&l)>>>1,o[2]=(1&l)<<7,o[2]|=8,o[3]=0),{config:o,samplingRate:c,channelCount:u,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+r}}this._onError(K.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}}},{key:"_parseMP3AudioData",value:function(e,t,n,r){if(!(n<4)){this._littleEndian;var i=new Uint8Array(e,t,n),a=null;if(r){if(255!==i[0])return;var o=i[1]>>>3&3,s=(6&i[1])>>1,l=(240&i[2])>>>4,c=(12&i[2])>>>2,d=3!==(i[3]>>>6&3)?2:1,h=0,f=0;switch(o){case 0:h=this._mpegAudioV25SampleRateTable[c];break;case 2:h=this._mpegAudioV20SampleRateTable[c];break;case 3:h=this._mpegAudioV10SampleRateTable[c]}switch(s){case 1:34,l>>4,s=15&a;7===s?this._parseAVCVideoPacket(e,t+1,n-1,r,i,o):this._onError(K.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(s))}}},{key:"_parseAVCVideoPacket",value:function(e,t,n,r,i,a){if(n<4)u.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var o=this._littleEndian,s=new DataView(e,t,n),l=s.getUint8(0),c=(16777215&s.getUint32(0,!o))<<8>>8;if(0===l)this._parseAVCDecoderConfigurationRecord(e,t+4,n-4);else if(1===l)this._parseAVCVideoData(e,t+4,n-4,r,i,a,c);else if(2!==l)return void this._onError(K.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(l))}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,n){if(n<7)u.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var r=this._videoMetadata,i=this._videoTrack,a=this._littleEndian,o=new DataView(e,t,n);r?void 0!==r.avcc&&u.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(r=this._videoMetadata={}).type="video",r.id=i.id,r.timescale=this._timescale,r.duration=this._duration);var s=o.getUint8(0),l=o.getUint8(1);o.getUint8(2),o.getUint8(3);if(1===s&&0!==l)if(this._naluLengthSize=1+(3&o.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var c=31&o.getUint8(5);if(0!==c){c>1&&u.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(c));for(var d=6,h=0;h1&&u.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(k)),d++;for(var w=0;w=n){u.w(this.TAG,"Malformed Nalu near timestamp ".concat(p,", offset = ").concat(h,", dataSize = ").concat(n));break}var g=l.getUint32(h,!s);if(3===f&&(g>>>=8),g>n-f)return void u.w(this.TAG,"Malformed Nalus near timestamp ".concat(p,", NaluSize > DataSize!"));var v=31&l.getUint8(h+f);5===v&&(m=!0);var b=new Uint8Array(e,t+h,f+g),y={type:v,data:b};c.push(y),d+=b.byteLength,h+=f+g}if(c.length){var x=this._videoTrack,E={units:c,length:d,isKeyframe:m,dts:p,cts:o,pts:p+o};m&&(E.fileposition=i),x.samples.push(E),x.length+=d}}}],[{key:"probe",value:function(e){var t=new Uint8Array(e),n={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return n;var r,i,a=(4&t[4])>>>2!=0,o=0!=(1&t[4]),s=(r=t)[i=5]<<24|r[i+1]<<16|r[i+2]<<8|r[i+3];return s<9?n:{match:!0,consumed:s,dataOffset:s,hasAudioTrack:a,hasVideoTrack:o}}}]),e}(),Y=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"init",value:function(){for(var t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=e.constants={};n.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),n.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),n.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),n.STSC=n.STCO=n.STTS,n.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),n.HDLR_VIDEO=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]),n.HDLR_AUDIO=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]),n.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),n.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(e){for(var t=8,n=null,r=Array.prototype.slice.call(arguments,1),i=r.length,a=0;a>>24&255,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n.set(e,4);for(var o=8,s=0;s>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,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]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var n=t.id,r=t.duration,i=t.presentWidth,a=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,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,i>>>8&255,255&i,0,0,a>>>8&255,255&a,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var n=t.timescale,r=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,85,196,0,0]))}},{key:"hdlr",value:function(t){var n=null;return n="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,n)}},{key:"minf",value:function(t){var n=null;return n="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,n,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))}},{key:"stsd",value:function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp3",value:function(t){var n=t.channelCount,r=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types[".mp3"],i)}},{key:"mp4a",value:function(t){var n=t.channelCount,r=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types.mp4a,i,e.esds(t))}},{key:"esds",value:function(t){var n=t.config||[],r=n.length,i=new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(n).concat([6,1,2]));return e.box(e.types.esds,i)}},{key:"avc1",value:function(t){var n=t.avcc,r=t.codecWidth,i=t.codecHeight,a=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,r>>>8&255,255&r,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,a,e.box(e.types.avcC,n))}},{key:"mvex",value:function(t){return e.box(e.types.mvex,e.trex(t))}},{key:"trex",value:function(t){var n=t.id,r=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,r)}},{key:"moof",value:function(t,n){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,n))}},{key:"mfhd",value:function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,n)}},{key:"traf",value:function(t,n){var r=t.id,i=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),a=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),o=e.sdtp(t),s=e.trun(t,o.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,i,a,s,o)}},{key:"sdtp",value:function(t){for(var n=t.samples||[],r=n.length,i=new Uint8Array(4+r),a=0;a>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var s=0;s>>24&255,l>>>16&255,l>>>8&255,255&l,c>>>24&255,c>>>16&255,c>>>8&255,255&c,u.isLeading<<2|u.dependsOn,u.isDependedOn<<6|u.hasRedundancy<<4|u.isNonSync,0,0,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*s)}return e.box(e.types.trun,o)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();Y.init();var Q=Y,J=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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===t)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])}else{if(1===t)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===t)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===t)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])}return null}}]),e}(),X=function e(t,n,i,a,o){Object(r.a)(this,e),this.dts=t,this.pts=n,this.duration=i,this.originalDts=a,this.isSyncPoint=o,this.fileposition=null},Z=function(){function e(){Object(r.a)(this,e),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return Object(i.a)(e,[{key:"appendSyncPoint",value:function(e){e.isSyncPoint=!0,this.syncPoints.push(e)}}]),e}(),$=function(){function e(){Object(r.a)(this,e),this._list=[]}return Object(i.a)(e,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts=t[i].dts&&et[r].lastSample.originalDts&&e=t[r].lastSample.originalDts&&(r===t.length-1||r0&&(i=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=i,this._list.splice(i,0,n)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].syncPoints;0===n.length&&t>0;)t--,n=this._list[t].syncPoints;return n.length>0?n[n.length-1]:null}}]),e}(),te=function(){function e(t){Object(r.a)(this,e),this.TAG="MP4Remuxer",this._config=t,this._isLive=!0===t.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new ee("audio"),this._videoSegmentInfoList=new ee("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!w.chrome||!(w.version.major<50||50===w.version.major&&w.version.build<2661)),this._fillSilentAfterSeek=w.msedge||w.msie,this._mp3UseMpegAudio=!w.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(i.a)(e,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(e,t){if(!this._onMediaSegment)throw new m("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)}},{key:"_onTrackMetadataReceived",value:function(e,t){var n=null,r="mp4",i=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(r="mpeg",i="",n=new Uint8Array):n=Q.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,n=Q.generateInitSegment(t)}if(!this._onInitSegment)throw new m("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:n.buffer,codec:i,container:"".concat(e,"/").concat(r),mediaDuration:t.duration})}},{key:"_calculateDtsBase",value:function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}},{key:"flushStashedSamples",value:function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,n={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(n.samples.push(e),n.length=e.length);var r={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(r.samples.push(t),r.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(n,!0),this._remuxAudio(r,!0)}},{key:"_remuxAudio",value:function(e,t){if(null!=this._audioMeta){var n,r=e,i=r.samples,a=void 0,o=-1,s=this._audioMeta.refSampleDuration,l="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,c=this._dtsBaseInited&&void 0===this._audioNextDts,d=!1;if(i&&0!==i.length&&(1!==i.length||t)){var h=0,f=null,p=0;l?(h=0,p=r.length):(h=8,p=8+r.length);var m=null;if(i.length>1&&(p-=(m=i.pop()).length),null!=this._audioStashedLastSample){var g=this._audioStashedLastSample;this._audioStashedLastSample=null,i.unshift(g),p+=g.length}null!=m&&(this._audioStashedLastSample=m);var v=i[0].dts-this._dtsBase;if(this._audioNextDts)a=v-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())a=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(d=!0);else{var b=this._audioSegmentInfoList.getLastSampleBefore(v);if(null!=b){var y=v-(b.originalDts+b.duration);y<=3&&(y=0),a=v-(b.dts+b.duration+y)}else a=0}if(d){var x=v-a,E=this._videoSegmentInfoList.getLastSegmentBefore(v);if(null!=E&&E.beginDts=1?C[C.length-1].duration:Math.floor(s);var R=!1,N=null;if(L>1.5*s&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!w.safari){R=!0;var j=Math.abs(L-s),M=Math.ceil(j/s),P=D+s;u.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\n"+"dts: ".concat(D+L," ms, expected: ").concat(D+Math.round(s)," ms, ")+"delta: ".concat(Math.round(j)," ms, generate: ").concat(M," frames"));var B=J.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==B&&(u.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),B=T),N=[];for(var F=0;F0){var H=N[N.length-1];H.duration=U-H.dts}var G={dts:U,pts:U,cts:0,unit:B,size:B.byteLength,duration:0,originalDts:I,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};N.push(G),p+=G.size,P+=s}var z=N[N.length-1];z.duration=D+L-z.dts,L=Math.round(s)}C.push({dts:D,pts:D,cts:0,unit:A.unit,size:A.unit.byteLength,duration:L,originalDts:I,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),R&&C.push.apply(C,N)}l?f=new Uint8Array(p):((f=new Uint8Array(p))[0]=p>>>24&255,f[1]=p>>>16&255,f[2]=p>>>8&255,f[3]=255&p,f.set(Q.types.mdat,4));for(var V=0;V1&&(d-=(h=a.pop()).length),null!=this._videoStashedLastSample){var f=this._videoStashedLastSample;this._videoStashedLastSample=null,a.unshift(f),d+=f.length}null!=h&&(this._videoStashedLastSample=h);var p=a[0].dts-this._dtsBase;if(this._videoNextDts)o=p-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())o=0;else{var m=this._videoSegmentInfoList.getLastSampleBefore(p);if(null!=m){var g=p-(m.originalDts+m.duration);g<=3&&(g=0),o=p-(m.dts+m.duration+g)}else o=0}for(var v=new Z,b=[],y=0;y=1?b[b.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(_){var O=new X(k,S,C,x.dts,!0);O.fileposition=x.fileposition,v.appendSyncPoint(O)}b.push({dts:k,pts:S,cts:w,units:x.units,size:x.length,isKeyframe:_,duration:C,originalDts:E,flags:{isLeading:0,dependsOn:_?2:1,isDependedOn:_?1:0,hasRedundancy:0,isNonSync:_?0:1}})}(u=new Uint8Array(d))[0]=d>>>24&255,u[1]=d>>>16&255,u[2]=d>>>8&255,u[3]=255&d,u.set(Q.types.mdat,4);for(var A=0;A0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,i=this._demuxer.parseChunks(e,t);else if((r=q.probe(e)).match){this._demuxer=new q(r,this._config),this._remuxer||(this._remuxer=new te(this._config));var a=this._mediaDataSource;null==a.duration||isNaN(a.duration)||(this._demuxer.overridedDuration=a.duration),"boolean"==typeof a.hasAudio&&(this._demuxer.overridedHasAudio=a.hasAudio),"boolean"==typeof a.hasVideo&&(this._demuxer.overridedHasVideo=a.hasVideo),this._demuxer.timestampBase=a.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),i=this._demuxer.parseChunks(e,t)}else r=null,u.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then((function(){n._internalAbort()})),this._emitter.emit(ne.DEMUX_ERROR,K.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),i=0;return i}},{key:"_onMediaInfo",value:function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,B.prototype));var n=Object.assign({},e);Object.setPrototypeOf(n,B.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)}))}},{key:"_onMetaDataArrived",value:function(e){this._emitter.emit(ne.METADATA_ARRIVED,e)}},{key:"_onScriptDataArrived",value:function(e){this._emitter.emit(ne.SCRIPTDATA_ARRIVED,e)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(e){var t=e+1;t0&&n[0].originalDts===r&&(r=n[0].pts),this._emitter.emit(ne.RECOMMEND_SEEKPOINT,r)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(e){var t=this._mediaInfo.segments[e],n=Object.assign({},t);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(ne.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(ne.STATISTICS_INFO,e)}}]),e}(),ie=function(e){var t=null,n=function(t,n){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:n}})}.bind(this);function r(t,n){var r={msg:ne.INIT_SEGMENT,data:{type:t,data:n}};e.postMessage(r,[n.data])}function i(t,n){var r={msg:ne.MEDIA_SEGMENT,data:{type:t,data:n}};e.postMessage(r,[n.data])}function a(){var t={msg:ne.LOADING_COMPLETE};e.postMessage(t)}function s(){var t={msg:ne.RECOVERED_EARLY_EOF};e.postMessage(t)}function l(t){var n={msg:ne.MEDIA_INFO,data:t};e.postMessage(n)}function c(t){var n={msg:ne.METADATA_ARRIVED,data:t};e.postMessage(n)}function u(t){var n={msg:ne.SCRIPTDATA_ARRIVED,data:t};e.postMessage(n)}function d(t){var n={msg:ne.STATISTICS_INFO,data:t};e.postMessage(n)}function h(t,n){e.postMessage({msg:ne.IO_ERROR,data:{type:t,info:n}})}function f(t,n){e.postMessage({msg:ne.DEMUX_ERROR,data:{type:t,info:n}})}function p(t){e.postMessage({msg:ne.RECOMMEND_SEEKPOINT,data:t})}o.install(),e.addEventListener("message",(function(o){switch(o.data.cmd){case"init":(t=new re(o.data.param[0],o.data.param[1])).on(ne.IO_ERROR,h.bind(this)),t.on(ne.DEMUX_ERROR,f.bind(this)),t.on(ne.INIT_SEGMENT,r.bind(this)),t.on(ne.MEDIA_SEGMENT,i.bind(this)),t.on(ne.LOADING_COMPLETE,a.bind(this)),t.on(ne.RECOVERED_EARLY_EOF,s.bind(this)),t.on(ne.MEDIA_INFO,l.bind(this)),t.on(ne.METADATA_ARRIVED,c.bind(this)),t.on(ne.SCRIPTDATA_ARRIVED,u.bind(this)),t.on(ne.STATISTICS_INFO,d.bind(this)),t.on(ne.RECOMMEND_SEEKPOINT,p.bind(this));break;case"destroy":t&&(t.destroy(),t=null),e.postMessage({msg:"destroyed"});break;case"start":t.start();break;case"stop":t.stop();break;case"seek":t.seek(o.data.param);break;case"pause":t.pause();break;case"resume":t.resume();break;case"logging_config":var m=o.data.param;P.applyConfig(m),!0===m.enableCallback?P.addLogListener(n):P.removeLogListener(n)}}))},ae=function(){function e(t,i){if(Object(r.a)(this,e),this.TAG="Transmuxer",this._emitter=new l.a,i.enableWorker&&"undefined"!=typeof Worker)try{var a=n(/*! webworkify */"0r65");this._worker=a(ie),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[t,i]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},P.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:P.getConfig()})}catch(e){u.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new re(t,i)}else this._controller=new re(t,i);if(this._controller){var o=this._controller;o.on(ne.IO_ERROR,this._onIOError.bind(this)),o.on(ne.DEMUX_ERROR,this._onDemuxError.bind(this)),o.on(ne.INIT_SEGMENT,this._onInitSegment.bind(this)),o.on(ne.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),o.on(ne.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),o.on(ne.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),o.on(ne.MEDIA_INFO,this._onMediaInfo.bind(this)),o.on(ne.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),o.on(ne.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),o.on(ne.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),o.on(ne.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(i.a)(e,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),P.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"hasWorker",value:function(){return null!=this._worker}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(ne.INIT_SEGMENT,e,t)}))}},{key:"_onMediaSegment",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(ne.MEDIA_SEGMENT,e,t)}))}},{key:"_onLoadingComplete",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(ne.LOADING_COMPLETE)}))}},{key:"_onRecoveredEarlyEof",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(ne.RECOVERED_EARLY_EOF)}))}},{key:"_onMediaInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.MEDIA_INFO,e)}))}},{key:"_onMetaDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.METADATA_ARRIVED,e)}))}},{key:"_onScriptDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.SCRIPTDATA_ARRIVED,e)}))}},{key:"_onStatisticsInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.STATISTICS_INFO,e)}))}},{key:"_onIOError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(ne.IO_ERROR,e,t)}))}},{key:"_onDemuxError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(ne.DEMUX_ERROR,e,t)}))}},{key:"_onRecommendSeekpoint",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.RECOMMEND_SEEKPOINT,e)}))}},{key:"_onLoggingConfigChanged",value:function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})}},{key:"_onWorkerMessage",value:function(e){var t=e.data,n=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case ne.INIT_SEGMENT:case ne.MEDIA_SEGMENT:this._emitter.emit(t.msg,n.type,n.data);break;case ne.LOADING_COMPLETE:case ne.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case ne.MEDIA_INFO:Object.setPrototypeOf(n,B.prototype),this._emitter.emit(t.msg,n);break;case ne.METADATA_ARRIVED:case ne.SCRIPTDATA_ARRIVED:case ne.STATISTICS_INFO:this._emitter.emit(t.msg,n);break;case ne.IO_ERROR:case ne.DEMUX_ERROR:this._emitter.emit(t.msg,n.type,n.info);break;case ne.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,n);break;case"logcat_callback":u.emitter.emit("log",n.type,n.logcat)}}}]),e}(),oe={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},se=function(){function e(t){Object(r.a)(this,e),this.TAG="MSEController",this._config=t,this._emitter=new l.a,this._config.isLive&&null==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new $}return Object(i.a)(e,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaSource)throw new m("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var n=this._pendingSegments[t];n.splice(0,n.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var r=this._sourceBuffers[t];if(r){if("closed"!==e.readyState){try{e.removeSourceBuffer(r)}catch(e){u.e(this.TAG,e.message)}r.removeEventListener("error",this.e.onSourceBufferError),r.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(e){u.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var n=e,r="".concat(n.container);n.codec&&n.codec.length>0&&(r+=";codecs=".concat(n.codec));var i=!1;if(u.v(this.TAG,"Received Initialization Segment, mimeType: "+r),this._lastInitSegments[n.type]=n,r!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])u.v(this.TAG,"Notice: ".concat(n.type," mimeType changed, origin: ").concat(this._mimeTypes[n.type],", target: ").concat(r));else{i=!0;try{var a=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(r);a.addEventListener("error",this.e.onSourceBufferError),a.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return u.e(this.TAG,e.message),void this._emitter.emit(oe.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[n.type]=r}t||this._pendingSegments[n.type].push(n),i||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),w.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[t.type];!n||n.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}},{key:"seek",value:function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var n=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{n.abort()}catch(e){u.e(this.TAG,e.message)}this._idrList.clear();var r=this._pendingSegments[t];if(r.splice(0,r.length),"closed"!==this._mediaSource.readyState){for(var i=0;i=1&&e-r.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){for(var r=n.buffered,i=!1,a=0;a=this._config.autoCleanupMaxBackwardDuration){i=!0;var l=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:o,end:l})}}else s0&&(isNaN(t)||n>t)&&(u.v(this.TAG,"Update MediaSource duration from ".concat(t," to ").concat(n)),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],n=this._pendingRemoveRanges[e];n.length&&!t.updating;){var r=n.shift();t.remove(r.start,r.end)}}},{key:"_doAppendSegments",value:function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var n=e[t].shift();if(n.timestampOffset){var r=this._sourceBuffers[t].timestampOffset,i=n.timestampOffset/1e3;Math.abs(r-i)>.1&&(u.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(r," to ").concat(i)),this._sourceBuffers[t].timestampOffset=i),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(n.data),this._isBufferFull=!1,"video"===t&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(n),22===e.code?(this._isBufferFull||this._emitter.emit(oe.BUFFER_FULL),this._isBufferFull=!0):(u.e(this.TAG,e.message),this._emitter.emit(oe.ERROR,{code:e.code,msg:e.message}))}}}},{key:"_onSourceOpen",value:function(){if(u.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(oe.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){u.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){u.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(oe.UPDATE_END)}},{key:"_onSourceBufferError",value:function(e){u.e(this.TAG,"SourceBuffer Error: ".concat(e))}}]),e}(),le={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},ce={NETWORK_EXCEPTION:y.EXCEPTION,NETWORK_STATUS_CODE_INVALID:y.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:y.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:y.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:K.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:K.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:K.CODEC_UNSUPPORTED},ue=function(){function e(t,n){if(Object(r.a)(this,e),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new l.a,this._config=R(),"object"==typeof n&&Object.assign(this._config,n),"flv"!==t.type.toLowerCase())throw new g("FlvPlayer requires an flv MediaDataSource input!");!0===t.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=t,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var i=w.chrome&&(w.version.major<50||50===w.version.major&&w.version.build<2661);this._alwaysSeekKeyframe=!!(i||w.msedge||w.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(i.a)(e,[{key:"destroy",value:function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===j.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){n._emitter.emit(j.MEDIA_INFO,n.mediaInfo)})):e===j.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){n._emitter.emit(j.STATISTICS_INFO,n.statisticsInfo)})),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){var t=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new se(this._config),this._msectl.on(oe.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(oe.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(oe.SOURCE_OPEN,(function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())})),this._msectl.on(oe.ERROR,(function(e){t._emitter.emit(j.ERROR,le.MEDIA_ERROR,ce.MEDIA_MSE_ERROR,e)})),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var e=this;if(!this._mediaElement)throw new m("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new m("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new ae(this._mediaDataSource,this._config),this._transmuxer.on(ne.INIT_SEGMENT,(function(t,n){e._msectl.appendInitSegment(n)})),this._transmuxer.on(ne.MEDIA_SEGMENT,(function(t,n){if(e._msectl.appendMediaSegment(n),e._config.lazyLoad&&!e._config.isLive){var r=e._mediaElement.currentTime;n.info.endDts>=1e3*(r+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(u.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}})),this._transmuxer.on(ne.LOADING_COMPLETE,(function(){e._msectl.endOfStream(),e._emitter.emit(j.LOADING_COMPLETE)})),this._transmuxer.on(ne.RECOVERED_EARLY_EOF,(function(){e._emitter.emit(j.RECOVERED_EARLY_EOF)})),this._transmuxer.on(ne.IO_ERROR,(function(t,n){e._emitter.emit(j.ERROR,le.NETWORK_ERROR,t,n)})),this._transmuxer.on(ne.DEMUX_ERROR,(function(t,n){e._emitter.emit(j.ERROR,le.MEDIA_ERROR,t,{code:-1,msg:n})})),this._transmuxer.on(ne.MEDIA_INFO,(function(t){e._mediaInfo=t,e._emitter.emit(j.MEDIA_INFO,Object.assign({},t))})),this._transmuxer.on(ne.METADATA_ARRIVED,(function(t){e._emitter.emit(j.METADATA_ARRIVED,t)})),this._transmuxer.on(ne.SCRIPTDATA_ARRIVED,(function(t){e._emitter.emit(j.SCRIPTDATA_ARRIVED,t)})),this._transmuxer.on(ne.STATISTICS_INFO,(function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(j.STATISTICS_INFO,Object.assign({},e._statisticsInfo))})),this._transmuxer.on(ne.RECOMMEND_SEEKPOINT,(function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)})),this._transmuxer.open()))}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=r),e}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,n=0,r=0;r=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(u.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){u.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,n=!1,r=0;r=i&&e=a-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(u.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(e){for(var t=this._mediaElement.buffered,n=0;n=r&&e0){var i=this._mediaElement.buffered.start(0);(i<1&&e0&&t.currentTime0){var r=n.start(0);if(r<1&&t0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){var e={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e}},{key:"statisticsInfo",get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=r),e}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(j.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(j.STATISTICS_INFO,this.statisticsInfo)}}]),e}();o.install();var he={createPlayer:function(e,t){var n=e;if(null==n||"object"!=typeof n)throw new g("MediaDataSource must be an javascript object!");if(!n.hasOwnProperty("type"))throw new g("MediaDataSource must has type field to indicate video file type!");switch(n.type){case"flv":return new ue(n,t);default:return new de(n,t)}},isSupported:function(){return N.supportMSEH264Playback()},getFeatureList:function(){return N.getFeatureList()}};he.BaseLoader=x,he.LoaderStatus=b,he.LoaderErrors=y,he.Events=j,he.ErrorTypes=le,he.ErrorDetails=ce,he.FlvPlayer=ue,he.NativePlayer=de,he.LoggingControl=P,Object.defineProperty(he,"version",{enumerable:!0,get:function(){return"__VERSION__"}});t.a=he},Gev7: +/*!*********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Displayable.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ./Style */"K2GJ"),a=n(/*! ../Element */"1bdT"),o=n(/*! ./mixin/RectText */"ni6a");function s(e){for(var t in e=e||{},a.call(this,e),e)e.hasOwnProperty(t)&&"style"!==t&&(this[t]=e[t]);this.style=new i(e.style,this),this._rect=null,this.__clipPaths=null}s.prototype={constructor:s,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(e){},afterBrush:function(e){},brush:function(e,t){},getBoundingRect:function(){},contain:function(e,t){return this.rectContain(e,t)},traverse:function(e,t){e.call(t,this)},rectContain:function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(e){return this.animate("style",e)},attrKV:function(e,t){"style"!==e?a.prototype.attrKV.call(this,e,t):this.style.set(t)},setStyle:function(e,t){return this.style.set(e,t),this.dirty(!1),this},useStyle:function(e){return this.style=new i(e,this),this.dirty(!1),this},calculateTextPosition:null},r.inherits(s,a),r.mixin(s,o);var l=s;e.exports=l},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(e,t,n){"use strict";var r=n("q1tI"),i=n.n(r),a=n("TSYQ"),o=n.n(a);function s(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}function l(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var r=e.data[t];Array.isArray(r)?r.forEach((function(e){n.append(t+"[]",e)})):n.append(t,e.data[t])})),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var n="cannot "+e.method+" "+e.action+" "+t.status+"'",r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),s(t)):e.onSuccess(s(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(e){null!==r[e]&&t.setRequestHeader(e,r[e])})),t.send(n),{abort:function(){t.abort()}}}var c=+new Date,u=0;function d(){return"rc-upload-"+c+"-"+ ++u}var h=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",a=i.replace(/\/.*$/,"");return n.some((function(e){var t,n,o=e.trim();return"."===o.charAt(0)?(t=r.toLowerCase(),n=o.toLowerCase(),-1!==t.indexOf(n,t.length-n.length)):/\/\*$/.test(o)?a===o.replace(/\/.*$/,""):i===o}))}return!0};var f=function(e,t,n){var r=function e(r,i){i=i||"",r.isFile?r.file((function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))})):r.isDirectory&&function(e,t){var n=e.createReader(),r=[];!function e(){n.readEntries((function(n){var i=Array.prototype.slice.apply(n);r=r.concat(i),!i.length?t(r):e()}))}()}(r,(function(t){t.forEach((function(t){e(t,""+i+r.name+"/")}))}))};e.forEach((function(e){r(e.webkitGetAsEntry())}))},p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),E=o()((v(e={},a,!0),v(e,a+"-disabled",l),v(e,s,s),e)),_=l?{}:{onClick:g?this.onClick:function(){},onKeyDown:g?this.onKeyDown:function(){},onMouseEnter:b,onMouseLeave:y,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return i.a.createElement(r,p({},_,{className:E,role:"button",style:u}),i.a.createElement("input",p({},(t=x,Object.keys(t).reduce((function(e,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(e[n]=t[n]),e}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:h,directory:m?"directory":null,webkitdirectory:m?"webkitdirectory":null,multiple:d,onChange:this.onChange})),f)}}]),t}(r.Component),E=Object.assign||function(e){for(var t=1;t3&&(i=n.call(i,1));for(var o=t.length,s=0;s4&&(i=n.call(i,1,i.length-1));for(var o=i[i.length-1],s=t.length,l=0;lthis._ux||b(t-this._yi)>this._uy||this._len<5;return this.addData(l.L,e,t),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(e,t):this._ctx.lineTo(e,t)),n&&(this._xi=e,this._yi=t),this},bezierCurveTo:function(e,t,n,r,i,a){return this.addData(l.C,e,t,n,r,i,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(e,t,n,r,i,a):this._ctx.bezierCurveTo(e,t,n,r,i,a)),this._xi=i,this._yi=a,this},quadraticCurveTo:function(e,t,n,r){return this.addData(l.Q,e,t,n,r),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(e,t,n,r):this._ctx.quadraticCurveTo(e,t,n,r)),this._xi=n,this._yi=r,this},arc:function(e,t,n,r,i,a){return this.addData(l.A,e,t,n,n,r,i-r,0,a?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=m(i)*n+e,this._yi=g(i)*n+t,this},arcTo:function(e,t,n,r,i){return this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},rect:function(e,t,n,r){return this._ctx&&this._ctx.rect(e,t,n,r),this.addData(l.R,e,t,n,r),this},closePath:function(){this.addData(l.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&(this._needsDash()&&this._dashedLineTo(t,n),e.closePath()),this._xi=t,this._yi=n,this},fill:function(e){e&&e.fill(),this.toStatic()},stroke:function(e){e&&e.stroke(),this.toStatic()},setLineDash:function(e){if(e instanceof Array){this._lineDash=e,this._dashIdx=0;for(var t=0,n=0;nt.length&&(this._expandData(),t=this.data);for(var n=0;n0&&m<=e||u<0&&m>=e||0===u&&(d>0&&g<=t||d<0&&g>=t);)m+=u*(n=o[r=this._dashIdx]),g+=d*n,this._dashIdx=(r+1)%b,u>0&&ml||d>0&&gc||s[r%2?"moveTo":"lineTo"](u>=0?f(m,e):p(m,e),d>=0?f(g,t):p(g,t));u=m-e,d=g-t,this._dashOffset=-v(u*u+d*d)},_dashedBezierTo:function(e,t,n,i,a,o){var s,l,c,u,d,h=this._dashSum,f=this._dashOffset,p=this._lineDash,m=this._ctx,g=this._xi,b=this._yi,y=r.cubicAt,x=0,E=this._dashIdx,_=p.length,k=0;for(f<0&&(f=h+f),f%=h,s=0;s<1;s+=.1)l=y(g,e,n,a,s+.1)-y(g,e,n,a,s),c=y(b,t,i,o,s+.1)-y(b,t,i,o,s),x+=v(l*l+c*c);for(;E<_&&!((k+=p[E])>f);E++);for(s=(k-f)/x;s<=1;)u=y(g,e,n,a,s),d=y(b,t,i,o,s),E%2?m.moveTo(u,d):m.lineTo(u,d),s+=p[E]/x,E=(E+1)%_;E%2!=0&&m.lineTo(a,o),l=a-u,c=o-d,this._dashOffset=-v(l*l+c*c)},_dashedQuadraticTo:function(e,t,n,r){var i=n,a=r;n=(n+2*e)/3,r=(r+2*t)/3,e=(this._xi+2*e)/3,t=(this._yi+2*t)/3,this._dashedBezierTo(e,t,n,r,i,a)},toStatic:function(){var e=this.data;e instanceof Array&&(e.length=this._len,y&&(this.data=new Float32Array(e)))},getBoundingRect:function(){c[0]=c[1]=d[0]=d[1]=Number.MAX_VALUE,u[0]=u[1]=h[0]=h[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,s=0,f=0;fc||b(o-i)>u||h===d-1)&&(e.lineTo(a,o),r=a,i=o);break;case l.C:e.bezierCurveTo(s[h++],s[h++],s[h++],s[h++],s[h++],s[h++]),r=s[h-2],i=s[h-1];break;case l.Q:e.quadraticCurveTo(s[h++],s[h++],s[h++],s[h++]),r=s[h-2],i=s[h-1];break;case l.A:var p=s[h++],v=s[h++],y=s[h++],x=s[h++],E=s[h++],_=s[h++],k=s[h++],w=s[h++],S=y>x?y:x,C=y>x?1:y/x,O=y>x?x/y:1,A=E+_;Math.abs(y-x)>.001?(e.translate(p,v),e.rotate(k),e.scale(C,O),e.arc(0,0,S,E,A,1-w),e.scale(1/C,1/O),e.rotate(-k),e.translate(-p,-v)):e.arc(p,v,S,E,A,1-w),1===h&&(t=m(E)*y+p,n=g(E)*x+v),r=m(A)*y+p,i=g(A)*x+v;break;case l.R:t=r=s[h],n=i=s[h+1],e.rect(s[h++],s[h++],s[h++],s[h++]);break;case l.Z:e.closePath(),r=t,i=n}}}},x.CMD=l;var E=x;e.exports=E},ItGF: +/*!**********************************************!*\ + !*** ./node_modules/zrender/lib/core/env.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(e){var t={},n=e.match(/Firefox\/([\d.]+)/),r=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(e);n&&(t.firefox=!0,t.version=n[1]);r&&(t.ie=!0,t.version=r[1]);i&&(t.edge=!0,t.version=i[1]);a&&(t.weChat=!0);return{browser:t,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!t.ie&&!t.edge,pointerEventsSupported:"onpointerdown"in window&&(t.edge||t.ie&&t.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent);e.exports=n},JNOM: +/*!***************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/Exercise/Detail/index.tsx + 19 modules ***! + \***************************************************************************/ +/*! exports provided: default */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CaretDownOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CaretUpOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/DeliveredProcedureOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/DownOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/FilterOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/PlusCircleOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/PlusOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/UpOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! 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/pages/Classrooms/Lists/Exercise/Detail/components/CameraMonitoring/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/Checking/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/ConfigWorks/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/DuplicateChecking/components/SubjectTable/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/DuplicateChecking/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/FaceReview/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/Redo/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/StatisticsResult/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/components/WorkList/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Detail/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/DragSubject/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/ImagesIcon/index.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/NoData/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/image-preview/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/mediator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Export/components/Head/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/components/CutOffNow.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/components/Publish.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Paperlibrary/Random/PreviewEdit/index.tsx (<- Module is referenced from these modules with unsupported syntax: ./src/.umi-production/core/routes.ts (referenced with import())) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/service/exercise.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/export.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/validate.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/flv.js/src/flv.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/paper/jinshi.svg (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! 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 */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/date-picker/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/date-picker/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/empty/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/empty/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/style/index.js */ +/*! 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/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/progress/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/progress/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/skeleton/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/skeleton/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/switch/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/switch/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tag/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tag/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/echarts-for-react/lib/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/moment/moment.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-infinite-scroller/index.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("Znn+");var r=n("ZTPi"),i=(n("qVdP"),n("jsC+")),a=(n("+L6B"),n("2/Rp")),o=(n("sPJy"),n("bE4q")),s=(n("miYZ"),n("tsqr")),l=(n("lUTK"),n("BvKs")),c=n("9og8"),u=(n("2qtc"),n("kLXV")),d=n("oBTY"),h=n("k1fw"),f=n("tJVT"),p=n("PpiC"),m=n("WmNS"),g=n.n(m),v=n("q1tI"),b=n.n(v),y=n("ErOA"),x=n("Ty5D"),E=n("55Ip"),_=n("9kvl"),k=n("jhfD"),w=n("Llu2"),S=n("0NbB"),C=n("V0Rq"),O=n("1vsH"),A=n("mgmH"),T=(n("7Kak"),n("9yH6")),I=(n("DjyN"),n("NUBc")),D=(n("giR+"),n("fyUT")),L=(n("5NDa"),n("5rEg")),R=(n("sRBo"),n("kaz8")),N=(n("g9YV"),n("wCAj")),j=(n("BoS7"),n("Sdc0")),M=(n("14J3"),n("BMrR")),P=(n("jCWc"),n("kPKH")),B=(n("5Dmo"),n("3S7+")),F=n("jrin"),U=(n("y8nQ"),n("Vl3Y")),H=n("wd/R"),G=n.n(H),z=Object(_.a)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var t=e.shixunHomeworks,n=e.dispatch,r=Object(x.i)();return b.a.createElement(u.a,{centered:!0,title:"提示",visible:"打回重做"===t.actionTabs.key,okText:"确定",cancelText:"取消",onOk:Object(c.a)(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("/api/myshixuns/".concat(t.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"post",body:{course_id:r.coursesId}});case 2:0===e.sent.status&&(s.b.success("删除成功"),n({type:"shixunHomeworks/setActionTabs",payload:{}}),n({type:"shixunHomeworks/getWorkList",payload:Object(h.a)({},t.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){n({type:"shixunHomeworks/setActionTabs",payload:{}})}},b.a.createElement("p",null,"该作业将被打回重做,学生实训记录将被清空!"),b.a.createElement("p",null,"确定打回?"))})),V=Object(_.a)((function(e){return{exercise:e.exercise}}))((function(e){var t,n,r,i,a,o,l,d,p=e.exercise,m=e.dispatch,y=Object(x.i)(),E=Object(v.useState)(!0),_=Object(f.a)(E,2),k=(_[0],_[1],U.a.useForm()),w=Object(f.a)(k,1)[0],S=p.actionTabs;return Object(v.useEffect)((function(){var e,t,n,r;"更改评阅"===p.actionTabs.key&&(w.resetFields(),w.setFieldsValue({subjective_score:null==S||null===(e=S.selectArrs)||void 0===e||null===(t=e.record)||void 0===t?void 0:t.subjective_score,objective_score:null==S||null===(n=S.selectArrs)||void 0===n||null===(r=n.record)||void 0===r?void 0:r.objective_score}))}),[p.actionTabs.key]),b.a.createElement(b.a.Fragment,null,b.a.createElement(u.a,{centered:!0,title:"评阅",visible:"更改评阅"===p.actionTabs.key,okText:"确定",cancelText:"取消",onOk:Object(c.a)(g.a.mark((function e(){var t,n,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.validateFields();case 2:return r=w.getFieldValue(),e.next=5,Object(C.O)(Object(h.a)(Object(h.a)({},r),{},{id:y.categoryId,user_id:null==S||null===(t=S.selectArrs)||void 0===t||null===(n=t.record)||void 0===n?void 0:n.user_id}));case 5:0===e.sent.status&&(s.b.success("评阅成功"),w.resetFields(),m({type:"exercise/setActionTabs",payload:{}}),m({type:"exercise/getExerciseList",payload:Object(h.a)({},p.actionTabs.params)}));case 7:case"end":return e.stop()}}),e)}))),onCancel:function(){m({type:"exercise/setActionTabs",payload:{}})}},b.a.createElement("div",{className:"pl30"},b.a.createElement(U.a,{form:w},b.a.createElement(M.a,null,b.a.createElement(P.a,null,b.a.createElement(U.a.Item,{name:"subjective_score",label:"主观题成绩",rules:[{required:!0,message:"请输入!"}]},b.a.createElement(D.a,{min:0,max:1*(null==S||null===(t=S.selectArrs)||void 0===t||null===(n=t.exercise_types)||void 0===n?void 0:n.subjective_score),style:{width:150},placeholder:"请填写主观题成绩"}))),b.a.createElement(P.a,{flex:1},b.a.createElement("div",null,b.a.createElement("span",{className:"ml10"},"分,总共:",null==S||null===(r=S.selectArrs)||void 0===r||null===(i=r.exercise_types)||void 0===i?void 0:i.subjective_score,"分")))),b.a.createElement(M.a,null,b.a.createElement(P.a,null,b.a.createElement(U.a.Item,{name:"objective_score",label:"客观题成绩",rules:[{required:!0,message:"请输入!"}]},b.a.createElement(D.a,{min:0,max:1*(null==S||null===(a=S.selectArrs)||void 0===a||null===(o=a.exercise_types)||void 0===o?void 0:o.objective_score),style:{width:150},width:150,placeholder:"请填写客观题成绩"}))),b.a.createElement(P.a,{flex:1},b.a.createElement("div",null,b.a.createElement("span",{className:"ml10"},"分,总共:",null==S||null===(l=S.selectArrs)||void 0===l||null===(d=l.exercise_types)||void 0===d?void 0:d.objective_score,"分"))))))))})),W=[{name:"未评阅",id:0,type:"unreview_counts"},{name:"评阅中",id:2,type:"reviewing_counts"},{name:"已评阅",id:1,type:"review_counts"}],K=[{name:"未开始",id:0,type:"unanswer_users"},{name:"考试中",id:1,type:"answering_users"},{name:"已交卷",id:2,type:"answer_users"},{name:"已交卷/未答",id:3,type:"commit_with_no_answers_users"}],q=[{name:"无需补考",id:0,type:"unmake_up_users_count"},{name:"参加补考",id:1,type:"make_up_users_count"}],Y=n("BdwD"),Q=(n("iQDF"),n("+eQT")),J=Object(_.a)((function(e){return{exercise:e.exercise}}))((function(e){var t,n,r=e.exercise,i=e.dispatch,a=Object(x.i)(),o=Object(v.useState)(!0),l=Object(f.a)(o,2),d=(l[0],l[1],U.a.useForm()),p=Object(f.a)(d,1)[0],m=Object(v.useState)(!1),y=Object(f.a)(m,2),E=y[0],_=y[1],k=Object(v.useState)({}),w=Object(f.a)(k,2),S=w[0],O=w[1],A=r.actionTabs;Object(v.useEffect)((function(){var e,t,n,i;"延时"===r.actionTabs.key&&(_(!1),p.resetFields(),p.setFieldsValue({subjective_score:null==A||null===(e=A.selectArrs)||void 0===e||null===(t=e.record)||void 0===t?void 0:t.subjective_score,objective_score:null==A||null===(n=A.selectArrs)||void 0===n||null===(i=n.record)||void 0===i?void 0:i.objective_score}))}),[r.actionTabs.key]);function T(e,t){for(var n=[],r=e;rG()(null==A||null===(n=A.selectArrs)||void 0===n?void 0:n.exercise_end_at).endOf("minute")||e<=G()().startOf("day"))},disabledTime:function(e){var t,n=null==A||null===(t=A.selectArrs)||void 0===t?void 0:t.exercise_end_at,r=G()(e).format("HH");if(G()(e).isSame(G()(n),"day")){var i=G()(n).format("HH"),a=G()(n).format("mm");return{disabledHours:function(){return T(0,24).splice(1*i+1,24-i)},disabledMinutes:function(){return G()(e).isSame(G()(n),"hour")&&r<=i?T(a,60):T(60,60)}}}if(G()(e).isSame(G()(),"day")){var o=G()().format("HH"),s=G()().format("mm");return{disabledHours:function(){return T(0,24).splice(0,o)},disabledMinutes:function(){return r<=o?T(0,s):T(60,60)}}}return!1},getPopupContainer:function(e){return e.parentNode},allowClear:!1,onChange:function(e,t){var n,r;G()(t)>G()(null==A||null===(n=A.selectArrs)||void 0===n?void 0:n.exercise_end_at)&&p.setFieldsValue({time:G()(null==A||null===(r=A.selectArrs)||void 0===r?void 0:r.exercise_end_at).format("YYYY-MM-DD HH:mm")})}})))),b.a.createElement(M.a,{style:{marginLeft:78,marginTop:4}},b.a.createElement(U.a.Item,{name:"is_clear",className:"ml10",initialValue:!1,valuePropName:"checked"},b.a.createElement(R.a,null,"确认清除该学生的已切屏次数")))))))})),X=n("kaH+"),Z=n("dhSg"),$=n("xKgJ"),ee=n("hjlX"),te=n.n(ee),ne=function(e){var t=e.item,n=e.renderText,r=Object(x.i)(),i=Object(v.useState)(),a=Object(f.a)(i,2),o=a[0],s=a[1],l=function(){var e=Object(c.a)(g.a.mark((function e(){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Object(C.B)({id:r.categoryId,user_id:null==t?void 0:t.user_id});case 4:(n=e.sent)&&s(n);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return b.a.createElement(B.a,{onVisibleChange:l,title:b.a.createElement("div",null,"单选题 ",null==o?void 0:o.single_question_score,"分 ",b.a.createElement("br",null),"多选题 ",null==o?void 0:o.multiple_question_score,"分 ",b.a.createElement("br",null),"判断题 ",null==o?void 0:o.judgement_question_score,"分 ",b.a.createElement("br",null),"填空题 ",null==o?void 0:o.completion_question_score,"分 ",b.a.createElement("br",null),"实训题 ",null==o?void 0:o.shixun_question_score,"分")},n)},re=Object(_.a)((function(e){var t=e.exercise,n=e.loading,r=e.globalSetting;return{exercise:t,loading:n.effects,globalSetting:r}}))((function(e){var t,n,r,i,o,l,m,k,w,S,A,H,Q,ee,re,ie,ae,oe,se,le,ce,ue,de,he,fe,pe,me,ge,ve,be,ye,xe,Ee,_e,ke,we,Se=e.exercise,Ce=e.loading,Oe=e.dispatch,Ae=e.globalSetting,Te=e.checkDomainAuthority,Ie=e.getparams,De=(Object(p.a)(e,["exercise","loading","dispatch","globalSetting","checkDomainAuthority","getparams"]),Object(x.h)()),Le=Object(x.i)(),Re=Object(v.useState)(Object(h.a)({},Le)),Ne=Object(f.a)(Re,2),je=Ne[0],Me=Ne[1],Pe=Se.exerciseList,Be=Se.commonHeader,Fe=Object(v.useState)({}),Ue=Object(f.a)(Fe,2),He=Ue[0],Ge=(Ue[1],Object(v.useState)("")),ze=Object(f.a)(Ge,2),Ve=(ze[0],ze[1],Object(v.useState)(0)),We=Object(f.a)(Ve,2),Ke=We[0],qe=We[1],Ye=Object(v.useState)({}),Qe=Object(f.a)(Ye,2),Je=(Qe[0],Qe[1],Object(v.useState)(!1)),Xe=Object(f.a)(Je,2),Ze=Xe[0],$e=Xe[1],et=Object(v.useState)("alert"),tt=Object(f.a)(et,2),nt=tt[0],rt=tt[1],it=Object(v.useState)(0),at=Object(f.a)(it,2),ot=at[0],st=at[1],lt=Object(v.useState)(!1),ct=Object(f.a)(lt,2),ut=(ct[0],ct[1]),dt=Object(v.useState)(!1),ht=Object(f.a)(dt,2),ft=ht[0],pt=ht[1],mt=U.a.useForm(),gt=Object(f.a)(mt,1)[0],vt=Object(v.useState)([]),bt=Object(f.a)(vt,2),yt=bt[0],xt=bt[1],Et=Object(v.useState)(!0),_t=Object(f.a)(Et,2),kt=(_t[0],_t[1],Object(v.useRef)(),Object(v.useState)(1)),wt=Object(f.a)(kt,2),St=wt[0],Ct=wt[1],Ot=Object(v.useState)(""),At=Object(f.a)(Ot,2),Tt=At[0],It=At[1],Dt=Object(v.useState)(),Lt=Object(f.a)(Dt,2),Rt=Lt[0],Nt=Lt[1],jt=Object(v.useState)(!1),Mt=Object(f.a)(jt,2),Pt=Mt[0],Bt=Mt[1];function Ft(){return(Ft=Object(c.a)(g.a.mark((function e(t){var n,r,i,a,o;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Nt(null==t?void 0:t.exercise_user_id),Bt(2===t.commit_status||3===t.commit_status),ut(!0),e.next=5,Object(y.a)("/api/exercises/".concat(je.categoryId,"/student_info.json"),{method:"get",params:{exercise_user_id:null==t?void 0:t.exercise_user_id}});case 5:(null==(o=e.sent)||null===(n=o.data)||void 0===n||null===(r=n.exercise_user_photos)||void 0===r?void 0:r.length)>0?$e(!0):s.b.info("当前暂无照片"),xt(null==o||null===(i=o.data)||void 0===i?void 0:i.exercise_user_photos),st(null==o||null===(a=o.data)||void 0===a?void 0:a.alert_count),ut(!1);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(v.useEffect)((function(){var e,t;if(Object($.c)())qe(null===(t=Pe.exercise_types)||void 0===t?void 0:t.total_users);else if(null!=Pe&&null!==(e=Pe.exercise_types)&&void 0!==e&&e.score_open){var n;qe(null===(n=Pe.exercise_types)||void 0===n?void 0:n.unanswer_users)}}),[Pe]),Object(v.useEffect)((function(){var e,t={};if(null!=De&&null!==(e=De.query)&&void 0!==e&&e.exercise_group_id){var n,r;if(t={review:[0,2],commit_status:[2,3]},"0"!==(null==De||null===(n=De.query)||void 0===n?void 0:n.exercise_group_id))t.exercise_group_id=[Number(null==De||null===(r=De.query)||void 0===r?void 0:r.exercise_group_id)];gt.setFieldsValue(Object(h.a)({},t))}je=Object(h.a)(Object(h.a)({},je),t),Me(Object(h.a)({},je)),Oe({type:"exercise/getExerciseList",payload:je}),Oe({type:"exercise/clearData",payload:{key:"reviewExercise"}})}),[]);var Ut=[{title:"序号",dataIndex:"name",fixed:"left",width:80,align:"center",render:function(e,t,n){return b.a.createElement(B.a,{title:20*((je.page||1)-1)+n+1},b.a.createElement("span",null,20*((je.page||1)-1)+n+1))}},{title:"姓名",dataIndex:"user_name",fixed:"left",width:120,ellipsis:!0,align:"left",render:function(e,t){return b.a.createElement("div",null,e||"--",!(null==t||!t.delayed_at)&&b.a.createElement(B.a,{title:b.a.createElement("div",null,"交卷截止时间调整至",b.a.createElement("span",{className:"ml5"},G()(t.delayed_at).format("YYYY-MM-DD HH:mm")))},b.a.createElement("span",{className:"iconfont icon-shizhong c-blue"})))}},!(null!=Pe&&null!==(t=Pe.exercise_types)&&void 0!==t&&t.is_excellent)&&{title:"学号",ellipsis:!0,dataIndex:"student_id",width:140,align:"left",sorter:!0,render:function(e){return e||"--"}},!(null!=Pe&&null!==(n=Pe.exercise_types)&&void 0!==n&&n.is_excellent)&&0!==(null==Pe||null===(r=Pe.exercise_types)||void 0===r?void 0:r.groups_count)&&{title:"分班",width:220,ellipsis:!0,dataIndex:"user_group_name",align:"left",render:function(e){return e||"--"}},{title:"最终成绩",width:100,dataIndex:"score",align:"center",sorter:!0,render:function(e,t){return!t.open_total_score&&Object($.s)()?"老师审核中":100===(e="number"==typeof e?Number(e):e)?b.a.createElement("span",{className:"c-green"},e||"--"):e>60?b.a.createElement("span",{className:"c-orange"},e||"--"):b.a.createElement("span",null,e||"--")}},!(1!==(null==Pe||null===(i=Pe.exercise_types)||void 0===i?void 0:i.objective)||1===(null==Pe||null===(o=Pe.exercise_types)||void 0===o?void 0:o.objective)&&1!==(null==Pe||null===(l=Pe.exercise_types)||void 0===l?void 0:l.subjective))&&{title:"客观题得分",dataIndex:"objective_score",align:"center",width:100,render:function(e,t){return!t.open_total_score&&Object($.s)()?"老师审核中":(n=(e="number"==typeof e?Number(e):e)>=0&&e<=60?b.a.createElement("span",null,e):100===e?b.a.createElement("span",{className:"c-green"},e):e>60?b.a.createElement("span",{className:"c-orange"},e):"--",b.a.createElement(ne,{renderText:n,item:t}));var n}},!(1!==(null==Pe||null===(m=Pe.exercise_types)||void 0===m?void 0:m.subjective)||1===(null==Pe||null===(k=Pe.exercise_types)||void 0===k?void 0:k.subjective)&&1!==(null==Pe||null===(w=Pe.exercise_types)||void 0===w?void 0:w.objective))&&{title:"主观题得分",width:100,dataIndex:"subjective_score",align:"center",render:function(e,t){return!t.open_total_score&&Object($.s)()?"老师审核中":0===(e="number"==typeof e?Number(e):e)?b.a.createElement("span",null,e," ",b.a.createElement("span",{className:"c-red"}," (待评审)")):e>0&&e<=60?b.a.createElement("span",null,e):100===e?b.a.createElement("span",{className:"c-green"},e):e>60?b.a.createElement("span",{className:"c-orange"},e):"--"}},{title:"提交状态",dataIndex:"commit_status",width:130,align:"left",render:function(e,t){return 0===e?b.a.createElement("span",{style:{color:"#666666"}},"未开始"):1===e?b.a.createElement("span",{style:{color:"#DF3042"}},!t.is_make_up&&"考试中",t.is_make_up&&"考试中 (补考)"):2===e?b.a.createElement("span",{style:{color:"#5AB891"}},!t.is_make_up&&"已交卷",t.is_make_up&&"已交卷 (补考)"):b.a.createElement("span",{style:{color:"#5AB891"}},!t.is_make_up&&"已交卷(未答)",t.is_make_up&&"已交卷/未答(补考)")}},{title:"开始答题时间",dataIndex:"start_at",width:145,ellipsis:!0,align:"left",sorter:!0,render:function(e){return e?G()(e).format("YYYY-MM-DD HH:mm"):"--"}},{title:"提交时间",dataIndex:"end_at",width:145,ellipsis:!0,align:"left",sorter:!0,render:function(e){return e?G()(e).format("YYYY-MM-DD HH:mm"):"--"}},(null==Be?void 0:Be.screen_open)&&{title:b.a.createElement("span",null,"切屏次数 ",b.a.createElement(B.a,{title:"红色代表学生切屏超过规定次数被强制交卷"},b.a.createElement("span",{className:"icon-xiaowenhao"}))),dataIndex:"screen_used_num",width:145,ellipsis:!0,align:"center",render:function(e,t){return b.a.createElement("span",{className:e>(null==t?void 0:t.screen_total_num)&&"c-red"},e,"/",null==t?void 0:t.screen_total_num)}},(null==Be?void 0:Be.exercise_status)>1&&(null==Be?void 0:Be.open_camera)&&Object($.c)()&&!(null!==(S=Ae.setting)&&void 0!==S&&S.is_local)&&{title:"考试照片",dataIndex:"photo_count",align:"center",width:100,render:function(e,t){return t.commit_status>0?b.a.createElement("a",{onClick:function(){!function(e){Ft.apply(this,arguments)}(t)}},"".concat(e||0,"/").concat(null==Be?void 0:Be.photo_count)):"--"}},(null==Be?void 0:Be.ip_bind)&&Object($.d)()&&{title:"考试IP",dataIndex:"last_ip",align:"center",width:100,render:function(e,t){return b.a.createElement(b.a.Fragment,null,e||"--",1===t.commit_status&&Be.ip_bind&&t.last_ip&&b.a.createElement(a.a,{type:"link",onClick:Object(c.a)(g.a.mark((function e(){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=u.a.confirm({title:b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"1"},"解除绑定"),b.a.createElement(P.a,null,b.a.createElement("span",{className:"iconfont icon-yiguanbi1 current c-grey-c",onClick:function(){return n.destroy()}}))),width:500,icon:null,okText:"确定",cancelText:"取消",className:"custom-modal-divider",content:b.a.createElement("div",null,"为学生解除考试IP绑定后,学生可以使用新的IP地址进入考试。",b.a.createElement("span",{className:"c-red"},"如果该学生正在考试中,将无法作答,需要重新进入考试。"),"您确定要解除该学生的考试IP绑定?"),onOk:function(){var e=Object(c.a)(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(C.bb)({id:je.categoryId,exercise_user_id:t.exercise_user_id});case 2:0===e.sent.status&&(s.b.success("解绑成功"),Oe({type:"exercise/getExerciseList",payload:je}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return e.stop()}}),e)})))},"解绑"))}},(null==Be?void 0:Be.open_camera)&&Object($.d)()&&Be.exercise_status<3&&!(null!==(A=Ae.setting)&&void 0!==A&&A.is_local)&&{title:"允许不拍摄",dataIndex:"close_camera",align:"center",width:100,render:function(e,t){return b.a.createElement(j.a,{checked:e,onClick:Object(c.a)(g.a.mark((function n(){return g.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:e?u.a.info({title:"提示",content:b.a.createElement("div",null,"不允许修改"),okText:"确认"}):u.a.confirm({title:"允许不摄像警告",content:b.a.createElement("div",null,"为保证考试公平,本次考试已开启防作弊设置,这需要调用学生的摄像头。如学生硬件设施确有问题,为保证学生考试权利,教师可临时取消限制,允许学生参考。 本操作不可撤回,不可修改。 您确认同意该学生不开启摄像头参加考试吗?"),onOk:function(){var e=Object(c.a)(g.a.mark((function e(){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(C.c)(Object(h.a)(Object(h.a)({},je),{},{exercise_user_id:t.exercise_user_id}));case 2:0===(null==(n=e.sent)?void 0:n.status)&&(s.b.success("操作成功"),Oe({type:"exercise/getExerciseList",payload:Object(h.a)({},je)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return n.stop()}}),n)})))})}},Object($.c)()&&{title:"评阅状态",width:130,dataIndex:"has_comment",align:"center",render:function(e,t){return!e&&t.review_status?"评阅中":e?"已评阅":"未评阅"}},((null==Be?void 0:Be.assistant_auth)||Object($.c)()||Object($.s)())&&Te&&{title:"操作",fixed:"right",dataInex:"action",align:"center",width:236,render:function(e,t){return b.a.createElement("div",null,Object($.c)()&&b.a.createElement(a.a,{ghost:!0,type:"primary",size:"small",disabled:t.commit_status<2},b.a.createElement("a",{className:t.commit_status>1?"c-blue":"c-black",href:t.commit_status>1&&"/classrooms/".concat(je.coursesId,"/exercise/").concat(je.categoryId,"/review/").concat(t.login),onClick:function(e){t.commit_status<2&&e.preventDefault(),3===t.commit_status&&(e.preventDefault(),Oe({type:"exercise/setActionTabs",payload:{key:"更改评阅",selectArrs:{record:Object(h.a)({},t),exercise_types:Object(h.a)({},null==Pe?void 0:Pe.exercise_types)},params:Object(h.a)({},je)}}))}},t.has_comment&&"更改评阅",!t.has_comment&&"评阅")),!Object($.s)()&&["考试中"].includes(O.c[Be.exercise_status])&&b.a.createElement(a.a,{ghost:!0,type:"primary",disabled:(null==t?void 0:t.commit_status)>1,className:"ml10",size:"small",onClick:function(){u.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:null,className:"custom-modal-divider",content:"确认将该学生的考试状态调整为已交卷吗?",onOk:function(){var e;u.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:null,className:"custom-modal-divider",content:"确认将".concat(null==t?void 0:t.user_name,"的考试状态调整为已交卷吗?"),onOk:(e=Object(c.a)(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("/api/exercises/".concat(je.categoryId,"/commit_exercise_force.json"),{method:"post",body:{user_id:null==t?void 0:t.user_id}});case 2:0===e.sent.status&&Oe({type:"exercise/getExerciseList",payload:je});case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})}})}},"强制交卷"),Object($.s)()&&t.commit_status>1&&b.a.createElement("span",{style:{color:"#0152d9",marginRight:"5px",cursor:"pointer"},onClick:function(){var e;null!=Pe&&null!==(e=Pe.exercise_types)&&void 0!==e&&e.answered_open?_.d.push("/classrooms/".concat(je.coursesId,"/exercise/").concat(je.categoryId,"/users/").concat(null==t?void 0:t.login,"?check=true")):s.b.info("老师已设置本试卷在交卷后不可查看")}},"查看"),(null==Be?void 0:Be.exercise_time)>0&&Object($.d)()&&b.a.createElement(B.a,{title:Object($.k)()?"您的权限不足,请联系本课堂管理员":3===Be.exercise_status&&"本试卷已截止,请先修改截止时间使本试卷处于“考试中”"},b.a.createElement(a.a,{danger:!0,className:"c-red ml10",size:"small",disabled:!!Object($.k)()||3===Be.exercise_status,onClick:function(){Object($.i)()&&Oe({type:"exercise/setActionTabs",payload:{key:"延时",selectArrs:t,exercise_time:Be.exercise_time,params:Object(h.a)({},je)}})}},"延时")))}}].filter((function(e){return!!e})),Ht=Object(d.a)(Ut);return Ht[0]=Object(h.a)({},Ht[0]),Ht[(null==Ht?void 0:Ht.length)-1]=Object(h.a)({},Ht[(null==Ht?void 0:Ht.length)-1]),Ht[0].render=function(){return"我"},Ht[(null==Ht?void 0:Ht.length)-1].render=function(){var e;return null!=Pe&&null!==(e=Pe.current_answer_user)&&void 0!==e&&e.login?b.a.createElement("span",{style:{color:"#0152d9",marginRight:"5px",cursor:"pointer"},onClick:function(){var e,t;null!=Pe&&null!==(e=Pe.exercise_types)&&void 0!==e&&e.answered_open?_.d.push("/classrooms/".concat(je.coursesId,"/exercise/").concat(je.categoryId,"/users/").concat(null==Pe||null===(t=Pe.current_answer_user)||void 0===t?void 0:t.login)):s.b.info("老师已设置本试卷在交卷后不可查看")}},"查看"):"--"},b.a.createElement("section",{className:"minH500 bg-white mb50 inline-block w100"},(null==Pe||null===(H=Pe.exercise_types)||void 0===H?void 0:H.score_open)&&Object($.s)()&&b.a.createElement(N.a,{hideOnSinglePage:!0,pagination:!1,showHeader:!1,dataSource:[Object(h.a)({},null==Pe?void 0:Pe.current_answer_user)],columns:Ht,scroll:{x:120*(null==Ut?void 0:Ut.length)}}),!Object($.c)()&&b.a.createElement("div",{className:"bg-white pt10 pl25 mt15"},!(null==Pe||null===(Q=Pe.exercise_types)||void 0===Q||!Q.answer_users)&&b.a.createElement("span",{className:"mr10"},b.a.createElement("span",{style:{color:"#FF954C"}},null==Pe||null===(ee=Pe.exercise_types)||void 0===ee?void 0:ee.answer_users," "),"已交"),!(null==Pe||null===(re=Pe.exercise_types)||void 0===re||!re.unanswer_users)&&b.a.createElement("span",{className:"mr10"},null==Pe||null===(ie=Pe.exercise_types)||void 0===ie?void 0:ie.unanswer_users,"未交"),"--"!==(null==Pe||null===(ae=Pe.exercise_types)||void 0===ae?void 0:ae.exercise_end_time)&&b.a.createElement("span",null,"剩余提交时间:",b.a.createElement("span",{style:{color:"#FF954C"}},null==Pe||null===(oe=Pe.exercise_types)||void 0===oe?void 0:oe.exercise_end_time))),!(null!==(se=Pe.exercise_types)&&void 0!==se&&se.exercise_all_users)&&!Object($.s)()&&b.a.createElement(Y.a,null),(!(null===(le=Pe.exercise_types)||void 0===le||!le.exercise_all_users)||Object($.s)())&&b.a.createElement("aside",null,Object($.c)()&&b.a.createElement("aside",{className:"pt20"},b.a.createElement(U.a,{form:gt,onValuesChange:function(e){je.page=1;var t=Object.assign({},gt.getFieldValue());if(Object.keys(t).map((function(e){"objective_score_gte"!==e&&"objective_score_lte"!==e&&(t[e].includes("all")?(delete je[e],gt.setFieldsValue(Object(F.a)({},e,"all"))):(je[e]=t[e],""!=t[e]&&t[e]?gt.setFieldsValue(Object(F.a)({},e,je[e])):gt.setFieldsValue(Object(F.a)({},e,"all"))))})),e.objective_score_gte||e.objective_score_lte){if(t.objective_score_gte>t.objective_score_lte)return gt.setFieldsValue({objective_score_lte:t.objective_score_gte}),!1;if(""==t.objective_score_gte||""==t.objective_score_lte||!t.objective_score_gte||!t.objective_score_lte)return delete je.objective_score_lte,delete je.objective_score_gte,!1;je.objective_score_lte=t.objective_score_lte,je.objective_score_gte=t.objective_score_gte}Me(Object(h.a)({},je)),Ie(Object(h.a)({},je)),Oe({type:"exercise/getExerciseList",payload:je})},initialValues:(ce={},Object(F.a)(ce,"commit_status","all"),Object(F.a)(ce,"exercise_group_id","all"),Object(F.a)(ce,"review","all"),Object(F.a)(ce,"is_make_up","all"),ce)},b.a.createElement(U.a.Item,{name:"exercise_group_id"},b.a.createElement(R.a.Group,{style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"80px"},"选择班级:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all",checked:!(null!==(ue=He.course_group)&&void 0!==ue&&ue.length)},"全部")),b.a.createElement(P.a,{flex:"1"},Pe.course_groups&&Pe.course_groups.map((function(e,t){return b.a.createElement(R.a,{value:e.exercise_group_id,className:"ml0 mr8"},e.exercise_group_name,"(",e.exercise_group_students,")")})))))),b.a.createElement(U.a.Item,{name:"commit_status"},b.a.createElement(R.a.Group,{value:[],style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"80px"},"提交状态:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all",checked:!(null!==(de=He.commit_status)&&void 0!==de&&de.length)},"全部")),b.a.createElement(P.a,{flex:"1"},K.map((function(e,t){var n;return b.a.createElement(R.a,{name:"commit_status",value:e.id},e.name,"(",null==Pe||null===(n=Pe.exercise_types)||void 0===n?void 0:n[e.type],")")})))))),b.a.createElement(U.a.Item,{name:"review"},b.a.createElement(R.a.Group,{style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"80px"},"评阅状态:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all",checked:!(null!==(he=He.review)&&void 0!==he&&he.length)},"全部")),b.a.createElement(P.a,{flex:"1"},null==W?void 0:W.map((function(e,t){var n;return b.a.createElement(R.a,{value:e.id,key:t},e.name,"(",null==Pe||null===(n=Pe.exercise_types)||void 0===n?void 0:n[e.type],")")})))))),(null==Pe||null===(fe=Pe.exercise_types)||void 0===fe?void 0:fe.open_make_up)&&b.a.createElement(U.a.Item,{name:"is_make_up"},b.a.createElement(R.a.Group,{value:[],style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"80px"},"补考状态:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all",checked:!(null!==(pe=He.is_make_up)&&void 0!==pe&&pe.length)},"全部")),b.a.createElement(P.a,{flex:"1"},q.map((function(e,t){var n;return b.a.createElement(R.a,{name:"is_make_up",value:e.id},e.name,"(",null==Pe||null===(n=Pe.exercise_types)||void 0===n?void 0:n[e.type],")")})))))),b.a.createElement(M.a,{align:"middle"},b.a.createElement(P.a,{flex:"1"},b.a.createElement(M.a,{align:"middle"},b.a.createElement(P.a,null,b.a.createElement(L.a.Search,{allowClear:!0,placeholder:"请输入姓名或者学号搜索",onSearch:function(e){je.search=e,Oe({type:"exercise/getExerciseList",payload:Object(h.a)(Object(h.a)({},je),{},{page:1})})},style:{width:240}})))),!(null!=Be&&Be.is_random)&&b.a.createElement(P.a,{className:["tr",te.a.rightFilter].join(" ")},1===(null===(me=Pe.exercise_types)||void 0===me?void 0:me.objective)&&1===(null===(ge=Pe.exercise_types)||void 0===ge?void 0:ge.subjective)&&b.a.createElement(b.a.Fragment,null,"按客观题得分分组",b.a.createElement("span",null,b.a.createElement(U.a.Item,{name:"objective_score_gte"},b.a.createElement(D.a,{min:0,max:null==Pe||null===(ve=Pe.exercise_types)||void 0===ve?void 0:ve.objective_score,placeholder:"最低"}))),b.a.createElement("span",null,b.a.createElement(U.a.Item,{name:"objective_score_lte"},b.a.createElement(D.a,{min:(null===(be=je)||void 0===be?void 0:be.objective_score_gte)||0,max:null==Pe||null===(ye=Pe.exercise_types)||void 0===ye?void 0:ye.objective_score,placeholder:"最高"})))),1===(null===(xe=Pe.exercise_types)||void 0===xe?void 0:xe.subjective)&&Te&&b.a.createElement(b.a.Fragment,null,b.a.createElement(a.a,{type:"default",disabled:(null==Pe||null===(Ee=Pe.total_exercise_users)||void 0===Ee?void 0:Ee.length)<1},b.a.createElement(E.a,{to:"/classrooms/".concat(je.coursesId,"/exercise/").concat(je.categoryId,"/reviews/group")},b.a.createElement("span",{className:"iconfont icon-tijiaozongjie"}),b.a.createElement("span",null,"集中批量批阅"))),b.a.createElement(a.a,{type:"default",disabled:(null==Pe||null===(_e=Pe.total_exercise_users)||void 0===_e?void 0:_e.length)<1},b.a.createElement(E.a,{to:"/classrooms/".concat(je.coursesId,"/exercise/").concat(je.categoryId,"/review/").concat(null==Pe||null===(ke=Pe.total_exercise_users)||void 0===ke||null===(we=ke[0])||void 0===we?void 0:we.user_login)},b.a.createElement("span",{className:"iconfont icon-filesync3x"}),b.a.createElement("span",null,"组内顺序批阅")))))))),b.a.createElement(N.a,{className:"mt30",loading:Ce["exercise/getExerciseList"],hideOnSinglePage:!0,pagination:!1,dataSource:(null==Pe?void 0:Pe.exercise_users)||[],columns:Ut,scroll:{x:120*(null==Ut?void 0:Ut.length)},size:"large",onChange:function(e,t,n){je.page=1,console.log(n,444),void 0===n.order?(je.order_type=null,je.order=null):(je.order_type="descend"===n.order?"desc":"asc",je.order=n.field),Oe({type:"exercise/getExerciseList",payload:Object(h.a)({},je)})}}),Ke>20&&b.a.createElement("aside",{className:"tc mb50 pb30 mt30"},b.a.createElement(I.a,{onChange:function(e,t){je.page=e,je.limit=20,Oe({type:"exercise/getExerciseList",payload:Object(h.a)({},je)})},current:je.page||1,defaultPageSize:20,total:Ke,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,showTotal:function(e){return b.a.createElement("span",{className:"mr10"},"共",b.a.createElement("span",{className:"c-orange"},e),"条数据")}}))),b.a.createElement(V,null),b.a.createElement(z,null),b.a.createElement(J,null),Ze&&b.a.createElement(u.a,{title:"防作弊头像",visible:Ze,centered:!0,onCancel:function(){Ct(1),$e(!1),xt([]),rt("alert"),It("")},footer:b.a.createElement("div",{style:{display:"flex"}},b.a.createElement("div",{style:{flex:1,textAlign:"left"}}," ",b.a.createElement(a.a,{onClick:Object(c.a)(g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Tt){e.next=3;break}return s.b.info("输入框内容不能为空"),e.abrupt("return");case 3:return pt(!0),e.next=6,Object(y.a)("/api/exercises/".concat(je.categoryId,"/send_alert.json"),{method:"post",body:{content:Tt,clazz:nt,exercise_user_id:Rt}});case 6:0===(null==(t=e.sent)?void 0:t.status)&&(s.b.info("发送成功"),Ct(1),$e(!1),xt([]),rt("alert"),It("")),pt(!1);case 9:case"end":return e.stop()}}),e)}))),disabled:Pt,loading:ft},"发送")),b.a.createElement(a.a,{disabled:0===(null==yt?void 0:yt.length),style:{marginRight:"10px"},onClick:Object(c.a)(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ct(St-1==0?null==yt?void 0:yt.length:St-1);case 2:case"end":return e.stop()}}),e)})))},"上一张"),b.a.createElement(a.a,{disabled:0===(null==yt?void 0:yt.length),type:"primary",onClick:Object(c.a)(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ct(St===(null==yt?void 0:yt.length)?1:St+1);case 2:case"end":return e.stop()}}),e)})))},"下一张"))},b.a.createElement("img",{style:{width:"234px !important",height:"132px",borderRadius:"5px"},src:yt[St-1]}),b.a.createElement("span",{onClick:function(){Z.a.publish("preview-image",yt[St-1]),console.log("src:",yt[St-1],yt,St-1)},style:{background:"#0152d9",color:"#fff",display:"inline-flex",width:"54px",height:"20px",borderRadius:"10px",justifyContent:"center",lineHeight:"20px",alignItems:"center",position:"absolute",top:"70px",left:"190px",zIndex:5,cursor:"pointer"}},"预览"),b.a.createElement("span",{style:{color:"#0152d9",marginTop:"16px",width:"234px",justifyContent:"center",display:"flex"}},St+"/"+(null==yt?void 0:yt.length)),b.a.createElement(T.a,{className:"mt20",checked:"alert"===nt,onChange:function(){return rt("alert")}},"发送警告",b.a.createElement("span",{className:"font14 c-grey-999"},"(如发现学生在考试中的照片存在异常时,可发送消息给学生)")),b.a.createElement(T.a,{className:"mt10",checked:"notice"===nt,onChange:function(){return rt("notice")}},"发送通知",b.a.createElement("span",{className:"font14 c-grey-999"},"(考试中如有消息通知,可发送消息给学生)")),b.a.createElement(L.a.TextArea,{className:"mt20",value:Tt,onChange:function(e){return It(e.target.value)},placeholder:"请输入".concat("alert"===nt?"警告":"通知","内容").concat("alert"===nt?",如:扭头低头大幅度动作检测":"")}),b.a.createElement("div",{style:{color:"#E30000",fontSize:12,margin:"10px 0"}},"已发送",ot,"次警告")),b.a.createElement(X.a,null))})),ie=(n("OaEy"),n("2fM7")),ae=n("8Skl"),oe=n("y3Kf"),se=n("mxOx"),le=n.n(se),ce=n("LvDl"),ue=n.n(ce),de=n("GUcZ"),he=(n("ulZh"),/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i),fe=Object(v.forwardRef)((function(e,t){var n,r=e.src,i=(e.videoId,e.logWatchHistory,e.courseId,e.startTime,e.handlePause,e.handlePlay,e.handlePlayEnded,e.videoSpeed,"flv"===(null==r||null===(n=r.split("."))||void 0===n?void 0:n.pop())),a=Object(v.useRef)(),o=Object(v.useRef)(),s=Object(v.useRef)(0),l=Object(v.useRef)(0),c=Object(v.useState)(0),u=Object(f.a)(c,2),d=u[0],h=u[1],p=navigator.userAgent.toLowerCase().match(he);p&&p[0];Object(v.useImperativeHandle)(t,(function(){return{getLastUpdatedTime:function(){return a.current.currentTime},getDuration:function(){return a.current.duration}}})),Object(v.useEffect)((function(){l.current=void 0;try{de.a.isSupported&&i&&r&&(null==r?void 0:r.indexOf(".m3u8"))<0?(l.current=de.a.createPlayer({type:"flv",volume:.8,cors:!0,url:r+"?t="+Date.now(),muted:!1,isLive:!0}),l.current.on("play",(function(){console.log(21111)})),a.current&&(l.current.detachMediaElement(a.current),l.current.attachMediaElement(a.current),l.current.load(),l.current.play())):a.current.setAttribute("src",r+"?t="+Date.now())}catch(e){setTimeout((function(){h(d+1)}),1e3)}return console.log("src:",r),function(){var e,t,n,r,i,o,s,c;l.current&&(null===(e=l.current)||void 0===e||null===(t=e.unload)||void 0===t||t.call(e),null===(n=l.current)||void 0===n||null===(r=n.pause)||void 0===r||r.call(n),null===(i=l.current)||void 0===i||null===(o=i.destroy)||void 0===o||o.call(i),null===(s=l.current)||void 0===s||null===(c=s.detachMediaElement)||void 0===c||c.call(s,a.current),l.current=void 0,a.current.src="")}}),[a,i,r,d]),Object(v.useEffect)((function(){return o.current=setInterval((function(){s.current>0&&s.current===a.current.currentTime&&(console.log("播放一次"),h(d+1)),s.current=a.current.currentTime}),3e3),function(){clearInterval(o.current)}}),[]);return b.a.createElement("video",{ref:a,onerr:!0,onErrorCapture:function(){h(d+1)},autoPlay:!0,muted:!0})})),pe=Object(_.a)((function(e){return{exercise:e.exercise,user:e.user}}))((function(e){var t,n=e.exercise,r=e.dispatch,i=(e.user,Object(x.i)()),a=Object(v.useState)({page:1,limit:20,sort_by:null,sort_direction:null,state:null,audit:null,name:"",save_name:"",exercise_id:null==i?void 0:i.categoryId}),o=Object(f.a)(a,2),l=o[0],d=o[1],p=U.a.useForm(),m=Object(f.a)(p,1)[0],E=Object(v.useState)(),_=Object(f.a)(E,2),k=_[0],w=_[1],S=Object(v.useState)(!1),C=Object(f.a)(S,2),A=C[0],T=C[1],I=n.exerciseList,D=n.commonHeader,j=Object(v.useState)([]),H=Object(f.a)(j,2),G=H[0],z=H[1],V=Object(v.useState)([]),W=Object(f.a)(V,2),K=W[0],q=W[1],Y=Object(v.useState)(0),Q=Object(f.a)(Y,2),J=Q[0],$=Q[1],ee=Object(v.useState)(!0),te=Object(f.a)(ee,2),ne=te[0],re=te[1],se=Object(v.useState)(!1),ce=Object(f.a)(se,2),de=ce[0],he=ce[1],pe=Object(v.useRef)(null);Object(v.useEffect)((function(){ge(),ve(l)}),[]),Object(v.useEffect)((function(){return clearInterval(pe.current),2===(null==D?void 0:D.exercise_status)&&(pe.current=setInterval((function(){ve(l)}),3e4)),function(){clearInterval(pe.current)}}),[null==D?void 0:D.exercise_status,l]);var ge=function(){r({type:"exercise/getExerciseList",payload:i})},ve=function(){var e=Object(c.a)(g.a.mark((function e(t){var n,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ue.a.cloneDeep(t),console.log(n,"sendData"),re(!0),z([]),e.next=6,Object(y.a)("/api/exercises/".concat(null==t?void 0:t.exercise_id,"/exercise_identity_photos.json"),{method:"get",params:n});case 6:r=e.sent,q([]),re(!1),$(null==r?void 0:r.count),z((null==r?void 0:r.exercise_users)||[]);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),be=function(e,t){l.page=1,l[t]=e,d(Object(h.a)({},l)),ve(l)};Object(v.useEffect)((function(){document.getElementById("divhe")&&(document.getElementById("divhe").scrollHeight>47&&(w(47),T(!0)))}),[document.getElementById("divhe"),I]);var ye=[{title:"序号",dataIndex:"number",width:80,render:function(e,t,n){return l.limit*(l.page-1)+n+1}},{title:"姓名",dataIndex:"user_name",width:110,ellipsis:{showTitle:!1},render:function(e){return b.a.createElement(B.a,{placement:"bottomLeft",title:e},b.a.createElement("span",null,e))}},{title:"学号",dataIndex:"student_id",sorter:!0,width:140,showSorterTooltip:!1,ellipsis:{showTitle:!1},render:function(e){return b.a.createElement(B.a,{placement:"bottomLeft",title:e||"--"},b.a.createElement("span",null,e||"--"))}},{title:"分班",dataIndex:"user_group_name",ellipsis:{showTitle:!1},render:function(e,t){return e?b.a.createElement(B.a,{placement:"bottom",title:e},b.a.createElement("span",{className:le.a.es},e)):"--"}},{title:"人脸照片",dataIndex:"photo_url",width:90,ellipsis:{showTitle:!1},render:function(e,t){return b.a.createElement("img",{width:40,style:{maxHeight:30},src:e,className:"current",onClick:function(){_e(t)}})}},{title:"审核状态",width:100,dataIndex:"exercise_identity_photo_state",ellipsis:{showTitle:!1},render:function(e,t){return b.a.createElement(b.a.Fragment,null,"passed"===e&&b.a.createElement("span",{style:{color:"#44D7B6"}},"审核通过"),"rejected"===e&&b.a.createElement("span",{style:{color:"#E53333"}},"审核不通过"),"submitted"===e&&b.a.createElement("span",{style:{color:"#666666"}},"待审核"))}},{title:"审核时间",dataIndex:"audit_time",width:180,ellipsis:{showTitle:!1},render:function(e){return b.a.createElement("span",null,e||"--")}},{title:"审核类型",dataIndex:"audit_clazz",width:90,ellipsis:{showTitle:!1},render:function(e){return b.a.createElement("span",null,e||"--")}},{title:"操作",dataIndex:"action",width:180,ellipsis:{showTitle:!1},render:function(e,t){var n;return b.a.createElement(b.a.Fragment,null,"submitted"===(null==t?void 0:t.exercise_identity_photo_state)?b.a.createElement("span",{className:"c-light-primary current",onClick:function(){return he(t)}},"审核"):b.a.createElement("span",{className:"c-grey-999 cursorNotAllowed"},"审核"),"submitted"!==(null==t?void 0:t.exercise_identity_photo_state)?b.a.createElement("span",{className:"c-light-primary current ml10 mr10",onClick:function(){return xe(t)}},"审核记录"):b.a.createElement("span",{className:"c-grey-999 ml10 mr10 cursorNotAllowed"},"审核记录"),"passed"===(null==t?void 0:t.exercise_identity_photo_state)&&null!=t&&null!==(n=t.play_url)&&void 0!==n&&n.length?b.a.createElement("span",{className:"c-light-primary current",onClick:function(){return Ee(t)}},"摄像监控"):b.a.createElement("span",{className:"c-grey-999 cursorNotAllowed"},"摄像监控"))}}],xe=function(e){var t=[{title:"审核时间",dataIndex:"audit_time",width:170,render:function(e,t){return b.a.createElement("span",null,e||"--")}},{title:"审核状态",dataIndex:"exercise_identity_photo_state",width:110,render:function(e,t){return b.a.createElement(b.a.Fragment,null,"passed"===e&&b.a.createElement("span",{style:{color:"#44D7B6"}},"审核通过"),"rejected"===e&&b.a.createElement("span",{style:{color:"#E53333"}},"审核不通过"),"submitted"===e&&b.a.createElement("span",{style:{color:"#666666"}},"待审核"))}},{title:"审核意见",dataIndex:"comment",render:function(e,t){return e?b.a.createElement(B.a,{placement:"bottom",title:e},b.a.createElement("span",null,e)):"--"}},{title:"采集照片",dataIndex:"photo_url",width:90,render:function(e,t){return b.a.createElement("span",{className:"current c-light-primary",onClick:function(){Z.a.publish("preview-image",e)}},"查看")}}],n=u.a.confirm({icon:null,width:700,className:"".concat(le.a.cusModal," custom-modal-divider"),centered:!0,title:b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"1"},"审核记录"),b.a.createElement(P.a,null,b.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return n.destroy()}}))),content:b.a.createElement("div",null,b.a.createElement(N.a,{className:le.a.customTable,dataSource:[Object(h.a)({},e)],bordered:!1,columns:t,rowKey:"exercise_identity_photo_id",rowClassName:le.a.row,pagination:!1}))})},Ee=function(e){var t,n,r=u.a.confirm({icon:null,className:"".concat(le.a.cusModal," custom-modal-divider"),centered:!0,width:(null==e||null===(t=e.play_url)||void 0===t?void 0:t.length)<6?724:744,title:b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"1"},"视频"),b.a.createElement(P.a,null,b.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return r.destroy()}}))),content:b.a.createElement("ul",{className:le.a.sys},null==e||null===(n=e.play_url)||void 0===n?void 0:n.map((function(e,t){return b.a.createElement("li",{className:le.a.li,key:t},b.a.createElement("div",{className:le.a.d1},b.a.createElement("div",{className:le.a.img},b.a.createElement(fe,{src:null==e?void 0:e.replace(".m3u8",".flv"),autoPlay:!0})),b.a.createElement("div",{className:le.a.btn},b.a.createElement("div",{className:le.a.b1},"回放视频",t+1))))})))})},_e=function(e){var t=u.a.confirm({icon:null,className:"".concat(le.a.cusModal," custom-modal-divider"),centered:!0,width:710,title:b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"1"},"人脸照片"),b.a.createElement(P.a,null,b.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return t.destroy()}}))),content:b.a.createElement(M.a,null,b.a.createElement("aside",{className:le.a.imgWrap,style:{marginBottom:40}},b.a.createElement("div",{className:le.a.img},b.a.createElement("img",{width:326,src:Object(O.g)(null==e?void 0:e.photo_url)}),b.a.createElement("div",{className:le.a.textP},"采集照片")),b.a.createElement("div",{className:le.a.img,style:{marginLeft:20}},null!=e&&e.identity_url?b.a.createElement("img",{width:326,src:Object(O.g)(null==e?void 0:e.identity_url)}):b.a.createElement("div",{className:le.a.no,style:{width:326}},b.a.createElement("span",null,"暂无证件照片")),b.a.createElement("div",{className:le.a.textP},"证件照片"))))})},ke={selectedRowKeys:K,columnWidth:40,onChange:function(e){q(e)},getCheckboxProps:function(e){return{disabled:!("passed"!==(null==e?void 0:e.exercise_identity_photo_state))}}};return b.a.createElement("section",{className:le.a.wrap},b.a.createElement(U.a,{form:m,onChange:function(){l.page=1;var e=Object.assign({},m.getFieldsValue());Object.keys(e).map((function(t){switch(t){case"exercise_group_id":e[t].includes("all")||!e[t].length?(delete l.course_group,m.setFieldsValue(Object(F.a)({},"exercise_group_id","all"))):(l.course_group=e[t],m.setFieldsValue(Object(F.a)({},"exercise_group_id",l.course_group)))}})),d(Object(h.a)({},l)),ve(l)},initialValues:Object(F.a)({},"exercise_group_id","all")},b.a.createElement(U.a.Item,{name:"exercise_group_id"},b.a.createElement(R.a.Group,{style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{className:"font14",flex:"80px"},"选择分班:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all"},"全部")),b.a.createElement(P.a,{flex:"1",id:"divhe",style:{height:k+"px",overflow:"hidden"}},null===(t=I.course_groups)||void 0===t?void 0:t.map((function(e,t){return b.a.createElement(R.a,{key:t,value:e.exercise_group_id,className:"ml0 mr8"},e.exercise_group_name,"(",e.exercise_group_students,")")}))),A&&b.a.createElement("span",{onClick:function(){var e=document.getElementById("divhe").scrollHeight;w(k>47?47:e)},style:{color:"rgb(76, 172, 255)",cursor:"pointer",alignItems:"flex-end",display:"flex"}},47===k?"展开":"收起",47===k?b.a.createElement(ae.a,{style:{marginBottom:"3px",marginLeft:"2px"}}):b.a.createElement(oe.a,{style:{marginBottom:"3px",marginLeft:"2px"}})))))),b.a.createElement("div",{className:le.a.control},b.a.createElement(L.a.Search,{placeholder:"请输入姓名或者学号搜索",value:null==l?void 0:l.save_name,onChange:function(e){return t=e.target.value,l.page=1,l.save_name=t,void d(Object(h.a)({},l));var t},onSearch:function(){l.page=1,l.name=l.save_name,d(Object(h.a)({},l)),ve(l)}}),b.a.createElement(ie.a,{placeholder:"请选择审核状态",value:null==l?void 0:l.state,onChange:function(e){return be(e,"state")}},b.a.createElement(ie.a.Option,{value:null},"全部"),b.a.createElement(ie.a.Option,{value:"submitted"},"待审核"),b.a.createElement(ie.a.Option,{value:"passed"},"审核通过"),b.a.createElement(ie.a.Option,{value:"rejected"},"审核不通过")),b.a.createElement(ie.a,{placeholder:"请选择审核类型",value:null==l?void 0:l.audit,onChange:function(e){return be(e,"audit")}},b.a.createElement(ie.a.Option,{value:null},"全部"),b.a.createElement(ie.a.Option,{value:1},"自动审核"),b.a.createElement(ie.a.Option,{value:2},"人工审核")),b.a.createElement("span",{className:le.a.btn,style:{cursor:"pointer"},onClick:function(){K.length?he(!0):s.b.warn("请选择学生")}},b.a.createElement("i",{className:"iconfont icon-piliangcaozuo font14 mr5"}),"批量审核")),b.a.createElement("div",{className:le.a.bgH}),b.a.createElement(N.a,{rowSelection:ke,className:le.a.customTable,dataSource:G,bordered:!1,columns:ye,rowKey:"exercise_identity_photo_id",rowClassName:le.a.row,loading:ne,onChange:function(e,t,n){l.page=null==e?void 0:e.current,l.limit=null==e?void 0:e.pageSize,null!=n&&n.order?(l.sort_by=null==n?void 0:n.field,l.sort_direction="ascend"===(null==n?void 0:n.order)?"asc":"desc"):(l.sort_by=null,l.sort_direction=null),d(Object(h.a)({},l)),ve(l)},pagination:{pageSize:l.limit,total:J,current:l.page,showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!1,position:["bottomCenter"],showTotal:function(e){return b.a.createElement("span",{className:"mr10"},"共",b.a.createElement("span",{className:"c-orange"},e),"条数据")}}}),b.a.createElement(me,{selectIds:K,visible:de,onCancel:function(){return he(!1)},onOk:function(){he(!1),ve(l)},params:l}),b.a.createElement(X.a,null))})),me=function(e){var t=e.visible,n=e.onOk,r=e.onCancel,i=e.selectIds,a=e.params,o=Object(v.useState)(!1),s=Object(f.a)(o,2),l=s[0],d=s[1],p=Object(v.useState)({}),m=Object(f.a)(p,2),x=m[0],E=m[1],_=U.a.useForm(),k=Object(f.a)(_,1)[0],w=function(){var e=Object(c.a)(g.a.mark((function e(r){var o,s;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d(!0),!0!==t){e.next=7;break}return e.next=4,Object(y.a)("/api/exercises/".concat(null==a?void 0:a.exercise_id,"/batch_audit_identity_photo.json"),{method:"post",body:Object(h.a)({identity_photo_ids:i},r)});case 4:s=e.sent,e.next=10;break;case 7:return e.next=9,Object(y.a)("/api/exercises/".concat(null==a?void 0:a.exercise_id,"/audit_identity_photo.json"),{method:"post",body:Object(h.a)({identity_photo_id:null==t?void 0:t.exercise_identity_photo_id},r)});case 9:s=e.sent;case 10:0===(null===(o=s)||void 0===o?void 0:o.status)&&n(),d(!1);case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return b.a.createElement(u.a,{title:!0!==t?"人脸身份审核":"批量审核",visible:!!t,centered:!0,width:650,destroyOnClose:!0,onCancel:function(){r()},afterClose:function(){k.resetFields(),E({})},confirmLoading:l,onOk:function(){return k.submit()}},b.a.createElement(U.a,{className:le.a.formWrap,form:k,labelCol:{span:4},wrapperCol:{span:18},onFinish:w,onValuesChange:function(){E(Object(h.a)({},k.getFieldsValue()))}},!0!==t&&b.a.createElement(M.a,{style:{marginLeft:28,marginBottom:38}},b.a.createElement(P.a,null,"采集照片:"),b.a.createElement(P.a,null,b.a.createElement("aside",{className:le.a.imgWrap},b.a.createElement("div",{className:le.a.img},b.a.createElement("img",{width:234,src:Object(O.g)(null==t?void 0:t.photo_url)}),b.a.createElement("div",{onClick:function(){Z.a.publish("preview-image",null==t?void 0:t.photo_url)},className:le.a.iBtn},"预览"),b.a.createElement("div",{className:le.a.text},"采集照片")),b.a.createElement("div",{className:le.a.img,style:{marginLeft:20}},null!=t&&t.identity_url?b.a.createElement("img",{width:234,src:Object(O.g)(null==t?void 0:t.identity_url)}):b.a.createElement("div",{className:le.a.no,style:{width:326}},b.a.createElement("span",null,"暂无证件照片")),!(null==t||!t.identity_url)&&b.a.createElement("div",{onClick:function(){Z.a.publish("preview-image",Object(O.g)(null==t?void 0:t.identity_url))},className:le.a.iBtn},"预览"),b.a.createElement("div",{className:le.a.text},"证件照片"))))),b.a.createElement(U.a.Item,{label:"审核状态",name:"state",rules:[{required:!0,message:"请输入审核状态"}]},b.a.createElement(T.a.Group,null,b.a.createElement(T.a,{value:"passed"},"审核通过"),b.a.createElement(T.a,{value:"rejected"},"审核不通过"))),"rejected"===(null==x?void 0:x.state)&&b.a.createElement(U.a.Item,{label:"审核意见",name:"comment",rules:[{required:!0,message:"请输入审核意见"}]},b.a.createElement(L.a,{placeholder:"如:你的个人信息与照片不一致。",maxLength:30})),b.a.createElement("div",{style:{color:"#FA6400",paddingLeft:32}},"注意:审核通过后,该学生在本场考试的认证状态将更新为“审核通过”,且能够进入考试。")))},ge=(n("cWXX"),n("/ezw")),ve=(n("R9oj"),n("ECub")),be=n("hZbv"),ye=n.n(be),xe=Object(_.a)((function(e){return{exercise:e.exercise,user:e.user}}))((function(e){var t,n,i,o,l,d,p,m,E,_=e.exercise,k=e.dispatch,w=(e.user,Object(x.i)()),S=Object(v.useState)({page:1,limit:10,name:"",save_name:"",exercise_id:null==w?void 0:w.categoryId}),C=Object(f.a)(S,2),A=C[0],D=C[1],j=U.a.useForm(),H=Object(f.a)(j,1)[0],z=Object(v.useState)(),V=Object(f.a)(z,2),W=V[0],K=V[1],q=Object(v.useState)(!1),Y=Object(f.a)(q,2),Q=Y[0],J=Y[1],$=_.exerciseList,ee=Object(v.useState)([]),te=Object(f.a)(ee,2),ne=te[0],re=te[1],se=Object(v.useState)(0),le=Object(f.a)(se,2),ce=le[0],de=le[1],he=Object(v.useState)(!0),fe=Object(f.a)(he,2),pe=fe[0],me=fe[1],be=Object(v.useState)(!1),xe=Object(f.a)(be,2),Ee=xe[0],_e=xe[1],ke=Object(v.useState)("1"),we=Object(f.a)(ke,2),Se=we[0],Ce=we[1],Oe=Object(v.useState)(1),Ae=Object(f.a)(Oe,2),Te=Ae[0],Ie=Ae[1],De=Object(v.useState)("alert"),Le=Object(f.a)(De,2),Re=Le[0],Ne=Le[1],je=Object(v.useState)(1),Me=Object(f.a)(je,2),Pe=Me[0],Be=Me[1],Fe=Object(v.useState)(""),Ue=Object(f.a)(Fe,2),He=Ue[0],Ge=Ue[1],ze=Object(v.useState)(!1),Ve=Object(f.a)(ze,2),We=Ve[0],Ke=Ve[1],qe=Object(v.useState)(!1),Ye=Object(f.a)(qe,2),Qe=Ye[0],Je=Ye[1],Xe=Object(v.useState)([]),Ze=Object(f.a)(Xe,2),$e=Ze[0],et=Ze[1];Object(v.useEffect)((function(){tt(),nt(A)}),[]);var tt=function(){k({type:"exercise/getExerciseList",payload:w})},nt=function(){var e=Object(c.a)(g.a.mark((function e(t){var n,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ue.a.cloneDeep(t),me(!0),re([]),e.next=5,Object(y.a)("/api/exercises/".concat(null==t?void 0:t.exercise_id,"/exercise_videos.json"),{method:"get",params:n});case 5:r=e.sent,me(!1),de(null==r?void 0:r.count),re((null==r?void 0:r.exercise_users)||[]);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();Object(v.useEffect)((function(){document.getElementById("divhe")&&(document.getElementById("divhe").scrollHeight>47&&(K(47),J(!0)))}),[document.getElementById("divhe"),$]);var rt=function(){var e=Object(c.a)(g.a.mark((function e(t){var n,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ke(!0),_e({}),e.next=4,Object(y.a)("/api/exercises/".concat(null==A?void 0:A.exercise_id,"/student_info.json"),{method:"get",params:{exercise_user_id:null==t?void 0:t.exercise_user_id}});case 4:return n=e.sent,e.next=7,Object(y.a)("/api/exercises/".concat(null==A?void 0:A.exercise_id,"/video_push_logs.json"),{method:"get",params:{exercise_user_id:null==t?void 0:t.exercise_user_id}});case 7:null!=(r=e.sent)&&r.data&&et((null==r?void 0:r.data)||[]),null!=n&&n.data&&_e(Object(h.a)(Object(h.a)({},null==n?void 0:n.data),{},{exercise_user_id:null==t?void 0:t.exercise_user_id,datas:t})),Ke(!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),it=function(e){var t,n;"prev"===e?Ie(Te-1==0?null==Ee||null===(t=Ee.exercise_user_photos)||void 0===t?void 0:t.length:Te-1):Ie(Te===(null==Ee||null===(n=Ee.exercise_user_photos)||void 0===n?void 0:n.length)?1:Te+1)},at=function(e){Ne(e),Be(1),Ge("")},ot=[{key:1,value:"手机录像异常,请重新扫描左侧二维码开启手机摄像录制。"},{key:2,value:"请勿离开监控范围!"},{key:3,value:"请不要与其他人交谈!"},{key:4,value:"请不要做与考试无关的行为!"},{key:5,value:"请勿切屏,超过3次将被强制交卷!"},{key:6,value:"请勿遮挡或关闭电脑摄像监控!"},{key:0,value:"其他"}],st=[{key:1,value:"请将手机放置于侧后方45°,离桌面1米左右,保证能拍摄到上半身、电脑屏幕和桌面。"},{key:2,value:"手机录像异常,请重新扫描左侧二维码开启手机摄像录制。"},{key:0,value:"其他"}],lt="alert"===Re?ot:st;return b.a.createElement("section",{className:ye.a.wrap},b.a.createElement(U.a,{form:H,onChange:function(){A.page=1;var e=Object.assign({},H.getFieldsValue());Object.keys(e).map((function(t){switch(t){case"exercise_group_id":e[t].includes("all")||!e[t].length?(delete A.course_group,H.setFieldsValue(Object(F.a)({},"exercise_group_id","all"))):(A.course_group=e[t],H.setFieldsValue(Object(F.a)({},"exercise_group_id",A.course_group)))}})),nt(A)},initialValues:Object(F.a)({},"exercise_group_id","all")},b.a.createElement(U.a.Item,{name:"exercise_group_id"},b.a.createElement(R.a.Group,{style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{className:"font14",flex:"80px"},"选择分班:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all"},"全部")),b.a.createElement(P.a,{flex:"1",id:"divhe",style:{height:W+"px",overflow:"hidden"}},null===(t=$.course_groups)||void 0===t?void 0:t.map((function(e,t){return b.a.createElement(R.a,{key:t,value:e.exercise_group_id,className:"ml0 mr8"},e.exercise_group_name,"(",e.exercise_group_students,")")}))),Q&&b.a.createElement("span",{onClick:function(){var e=document.getElementById("divhe").scrollHeight;K(W>47?47:e)},style:{color:"rgb(76, 172, 255)",cursor:"pointer",alignItems:"flex-end",display:"flex"}},47===W?"展开":"收起",47===W?b.a.createElement(ae.a,{style:{marginBottom:"3px",marginLeft:"2px"}}):b.a.createElement(oe.a,{style:{marginBottom:"3px",marginLeft:"2px"}})))))),b.a.createElement("div",{className:ye.a.control},b.a.createElement(L.a.Search,{placeholder:"请输入姓名或者学号搜索",value:null==A?void 0:A.save_name,onChange:function(e){return t=e.target.value,A.page=1,A.save_name=t,void D(Object(h.a)({},A));var t},onSearch:function(){A.page=1,A.name=A.save_name,D(Object(h.a)({},A)),nt(A)}})),b.a.createElement("div",{className:ye.a.bgH}),b.a.createElement("div",{className:ye.a.warpList},b.a.createElement(ge.a,{loading:pe,active:!0,paragraph:{rows:5}},b.a.createElement("div",{className:"c-grey-666 mb20 mt20"},"共",b.a.createElement("span",{className:"c-orange"},ce),"名学生已开启手机摄影"),ne.length?b.a.createElement("ul",{className:ye.a.sys},ne.map((function(e,t){var n=e.user_name,r=e.user_group_name,i=e.video_url,a=e.login,o=e.student_id;return b.a.createElement("li",{className:ye.a.li,key:t},b.a.createElement("div",{className:ye.a.d1},b.a.createElement("div",{className:ye.a.img},b.a.createElement("iframe",{style:{height:340,width:"100%",border:"none"},src:"/live-play.html?key=".concat(t,"&video_url=").concat(null==i?void 0:i.replace(".m3u8",".flv"))})),b.a.createElement(B.a,{title:"姓名+学号"},b.a.createElement("div",{className:ye.a.btn,onClick:function(){return Object(O.s)("".concat(A.exercise_id,"-").concat(a),!0)}},b.a.createElement("div",{title:n,className:ye.a.b1},n),b.a.createElement("div",{title:r,className:ye.a.b2},"(",o,")"))),b.a.createElement("div",{onClick:function(){return rt(e)},className:ye.a.big},"查看")))}))):b.a.createElement(ve.a,null)),b.a.createElement(I.a,{showTotal:function(e){return b.a.createElement("span",{className:"mr10"},"共",b.a.createElement("span",{className:"c-orange"},e),"条数据")},className:"tc",showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,onChange:function(e,t){A.page=e,A.limit=t,D(Object(h.a)({},A)),nt(A)},pageSize:null==A?void 0:A.limit,current:A.page,total:ce})),b.a.createElement(u.a,{title:"查看详细信息",visible:Ee,centered:!0,width:850,destroyOnClose:!0,onCancel:function(){_e(!1)},afterClose:function(){Ie(1),Ne("alert"),Ge(""),Ce("1"),Be(1)},footer:null},b.a.createElement(ge.a,{loading:We,active:!0,paragraph:{rows:5}},b.a.createElement("div",null,b.a.createElement("span",null,"姓名:",null==Ee||null===(n=Ee.datas)||void 0===n?void 0:n.user_name),b.a.createElement("span",{className:"ml20"},"学号:",null==Ee||null===(i=Ee.datas)||void 0===i?void 0:i.student_id),b.a.createElement("span",{className:"ml20"},"班级:",null==Ee||null===(o=Ee.datas)||void 0===o?void 0:o.user_group_name)),b.a.createElement(r.a,{className:"mt10",defaultActiveKey:Se,onChange:function(e){Ce(e)}},b.a.createElement(r.a.TabPane,{tab:"防作弊头像",key:"1"},b.a.createElement("aside",{className:ye.a.imgWrap},b.a.createElement("div",{className:ye.a.img,style:{width:234,marginLeft:30,textAlign:"center"}},null!=Ee&&null!==(l=Ee.exercise_user_photos)&&void 0!==l&&l.length?b.a.createElement(v.Fragment,null,b.a.createElement("img",{height:131,src:null==Ee||null===(d=Ee.exercise_user_photos)||void 0===d?void 0:d[Te-1]}),b.a.createElement("div",{onClick:function(){var e;Z.a.publish("preview-image",null==Ee||null===(e=Ee.exercise_user_photos)||void 0===e?void 0:e[Te-1])},className:ye.a.iBtn},"预览"),b.a.createElement("div",{className:ye.a.text},"考试中照片",b.a.createElement("span",{className:"c-light-primary"},Te,"/",null==Ee||null===(p=Ee.exercise_user_photos)||void 0===p?void 0:p.length)),1===Te?b.a.createElement("div",{style:{color:"#ccc",cursor:"not-allowed"},className:ye.a.l}," ",b.a.createElement("i",{className:"iconfont icon-fanhui2"})):b.a.createElement("div",{onClick:function(){return it("prev")},className:ye.a.l}," ",b.a.createElement("i",{className:"iconfont icon-fanhui2"})),b.a.createElement("div",{onClick:function(){return it("next")},className:ye.a.r},b.a.createElement("i",{className:"iconfont icon-lujing"}))):b.a.createElement("div",{className:ye.a.no},b.a.createElement("span",null,"暂无考试中照片"))),b.a.createElement("div",{className:ye.a.img,style:{marginLeft:60,width:234,textAlign:"center"}},null!=Ee&&Ee.identity_url?b.a.createElement("img",{height:131,src:Object(O.g)(null==Ee?void 0:Ee.identity_url)}):b.a.createElement("div",{className:ye.a.no},b.a.createElement("span",null,"暂无证件照片")),!(null==Ee||!Ee.identity_url)&&b.a.createElement("div",{onClick:function(){Z.a.publish("preview-image",Object(O.g)(null==Ee?void 0:Ee.identity_url))},className:ye.a.iBtn},"预览"),b.a.createElement("div",{className:ye.a.text},"证件照片")))),b.a.createElement(r.a.TabPane,{tab:"人脸照片",key:"2"},b.a.createElement("aside",{className:ye.a.imgWrap,style:{marginLeft:70}},b.a.createElement("div",{className:ye.a.img},b.a.createElement("img",{width:234,src:null==Ee?void 0:Ee.exercise_identity_photo}),b.a.createElement("div",{onClick:function(){Z.a.publish("preview-image",null==Ee?void 0:Ee.exercise_identity_photo)},className:ye.a.iBtn},"预览"),b.a.createElement("div",{className:ye.a.text},"采集照片")),b.a.createElement("div",{className:ye.a.img,style:{marginLeft:20,width:234,textAlign:"center"}},null!=Ee&&Ee.identity_url?b.a.createElement("img",{height:131,src:Object(O.g)(null==Ee?void 0:Ee.identity_url)}):b.a.createElement("div",{className:ye.a.no},b.a.createElement("span",null,"暂无证件照片")),!(null==Ee||!Ee.identity_url)&&b.a.createElement("div",{onClick:function(){Z.a.publish("preview-image",Object(O.g)(null==Ee?void 0:Ee.identity_url))},className:ye.a.iBtn},"预览"),b.a.createElement("div",{className:ye.a.text},"证件照片")))),b.a.createElement(r.a.TabPane,{tab:"警告和通知",key:"3"},b.a.createElement("div",{className:ye.a.fo},b.a.createElement(T.a,{className:"mt20",checked:"alert"===Re,onChange:function(){return at("alert")}},"发送警告",b.a.createElement("span",{className:"font14 c-grey-999"},"(如发现学生在考试中的照片存在异常时,可发送消息给学生)")),b.a.createElement(T.a,{className:"mt10",checked:"notice"===Re,onChange:function(){return at("notice")}},"发送通知",b.a.createElement("span",{className:"font14 c-grey-999"},"(考试中如有消息通知,可发送消息给学生)")),b.a.createElement("div",{className:"mt20"},b.a.createElement("span",{className:"mr10"},"原因:"),b.a.createElement(ie.a,{getPopupContainer:function(e){return e.parentNode.parentNode},style:{width:570},value:Pe,onChange:function(e){Be(e)}},null==lt?void 0:lt.map((function(e){return b.a.createElement(ie.a.Option,{key:e.key,value:e.key},e.value)})))),0===Pe&&b.a.createElement(L.a.TextArea,{className:"mt20",value:He,onChange:function(e){return Ge(e.target.value)},placeholder:"请填写其他原因"}),b.a.createElement(M.a,{className:"mt10",align:"middle"},b.a.createElement("div",{className:"mr10"},"发送记录"),b.a.createElement("div",{style:{color:"#E30000",fontSize:12,margin:"10px 0"}},"已发送",null==Ee?void 0:Ee.alert_count,"次警告和",(null==Ee||null===(m=Ee.alerts)||void 0===m?void 0:m.length)-(null==Ee?void 0:Ee.alert_count),"次通知")),b.a.createElement(N.a,{dataSource:(null==Ee?void 0:Ee.alerts)||[],bordered:!1,scroll:(null==Ee||null===(E=Ee.alerts)||void 0===E?void 0:E.length)>4?{y:200}:{},columns:[{title:"开始时间",dataIndex:"created_at",width:164},{title:"发送人",dataIndex:"sender",width:100,ellipsis:{showTitle:!1},render:function(e){return e?b.a.createElement("span",{title:e},e):"--"}},{title:"发送类型",dataIndex:"clazz",width:80,render:function(e){return"alert"===e?"警告":"通知"}},{title:"发送内容",dataIndex:"content",ellipsis:!0}],pagination:!1}),b.a.createElement(a.a,{className:ye.a.b,onClick:Object(c.a)(g.a.mark((function e(){var t,n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(He||0!==Pe){e.next=3;break}return s.b.info("请输入其他原因"),e.abrupt("return");case 3:return t=He,Pe&&(t=("alert"===Re?ot:st).find((function(e){return e.key===Pe})).value),Je(!0),e.next=8,Object(y.a)("/api/exercises/".concat(A.exercise_id,"/send_alert.json"),{method:"post",body:{content:t,clazz:Re,exercise_user_id:null==Ee?void 0:Ee.exercise_user_id}});case 8:0===(null==(n=e.sent)?void 0:n.status)&&(s.b.info("发送成功"),_e(!1)),Je(!1);case 11:case"end":return e.stop()}}),e)}))),loading:Qe,type:"primary"},b.a.createElement("i",{className:"iconfont icon-fasongtongzhi mr5"}),"发送"))),b.a.createElement(r.a.TabPane,{tab:"断流记录",key:"4"},b.a.createElement(N.a,{dataSource:$e,bordered:!1,scroll:$e.length>7?{y:300}:{},columns:[{title:"开始时间",dataIndex:"start_time",width:164},{title:"结束时间",dataIndex:"end_time",width:164,render:function(e){return G()(e).format("YYYY-MM-DD HH:mm:ss")||"--"}},{title:"推流时长",dataIndex:"push_duration",ellipsis:!0,width:120,render:function(e){return e&&Object(O.X)(Number(e)/1e3)||0}},{title:"断流原因",dataIndex:"msg",ellipsis:!0}]}))))),b.a.createElement(X.a,null))})),Ee=n("wNxg"),_e=n.n(Ee),ke=n("b6Jr"),we=n.n(ke),Se=function(e){var t=e.index,n=e.bottomLine,r=e.gather,i=e.search,a=Object(v.useState)([]),o=Object(f.a)(a,2),s=o[0],l=o[1],u=Object(v.useState)(!1),d=Object(f.a)(u,2),p=d[0],m=d[1],_=Object(v.useState)(!1),k=Object(f.a)(_,2),w=k[0],S=k[1],C=Object(x.i)(),O=Object(x.h)(),A=Object(v.useState)({page:1,limit:6,total:0}),T=Object(f.a)(A,2),I=T[0],D=T[1];Object(v.useEffect)((function(){console.log(r,"gather"),0===t&&S(!0)}),[]),Object(v.useEffect)((function(){w&&R()}),[w]);var L=[{title:"序号",dataIndex:"index",key:"index",align:"left",ellipsis:!0,render:function(e,t,n){return I.limit*(I.page-1)+n+1}},{title:"姓名",dataIndex:"username",key:"username",align:"left",ellipsis:!0},{title:"班级",dataIndex:"user_group_name",key:"user_group_name",align:"left",render:function(e){return e||"--"}},{title:"学号",dataIndex:"student_id",key:"student_id",align:"left"},{title:"相似度",dataIndex:"code_rate",key:"code_rate",align:"left",render:function(e){return e+"%"}},{title:"操作",dataIndex:"id",key:"id",align:"left",render:function(e){var t,n,r="/classrooms/".concat(null==C?void 0:C.coursesId,"/exercise/").concat(null==C?void 0:C.categoryId,"/detail/").concat(e,"/review_detail");null!=O&&null!==(t=O.query)&&void 0!==t&&t.random&&(r+="?random=".concat(null==O||null===(n=O.query)||void 0===n?void 0:n.random));return b.a.createElement(E.a,{to:r,target:"_blank"},"查看")}}],R=function(){var e=Object(c.a)(g.a.mark((function e(t){var n,a,o;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),n=t||{page:1,limit:10,total:0},a=Object(h.a)({id:null==C?void 0:C.categoryId,question_id:null==r?void 0:r.question_id,search:i},n),e.next=5,Object(y.a)("/api/courses/".concat(null==C?void 0:C.coursesId,"/exercises/code_review_users.json"),{method:"get",params:a});case 5:(o=e.sent)&&(l(null==o?void 0:o.users),m(!1),D(Object(h.a)(Object(h.a)({},n),{},{total:(null==o?void 0:o.count)||0})));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return b.a.createElement("div",{className:we.a.subjectTable},b.a.createElement("aside",{className:we.a.title},b.a.createElement("span",{className:"c-light-primary"},t+1,"、",5===(null==r?void 0:r.question_type)?"实训题":"编程题"),b.a.createElement("span",{className:"c-grey-333"},"(",null==r?void 0:r.score,"分):",null==r?void 0:r.question_title),b.a.createElement("span",{className:"ml40 c-grey-999"},b.a.createElement("b",{className:"c-red-ee4"},null==r?void 0:r.checked_count)," 个疑似抄袭作品(共",null==r?void 0:r.total_count,"个作品)"),b.a.createElement("span",{onClick:function(){S(!w)},style:{marginLeft:"auto",cursor:"pointer",color:"#0152d9"}},w?"收起":"展开",w?b.a.createElement(oe.a,null):b.a.createElement(ae.a,null)),5===(null==r?void 0:r.question_type)&&b.a.createElement("a",{style:{marginLeft:20},target:"_blank",href:"/shixuns/".concat(null==r?void 0:r.shixun_identifier,"/challenges")},"实训详情")),b.a.createElement(N.a,{className:we.a.customTable,style:{display:w?"block":"none"},dataSource:s,bordered:!1,rowKey:function(e){return e.id},rowClassName:we.a.row,columns:L,loading:p,pagination:{pageSize:I.limit,total:I.total,current:I.page,onChange:function(e){var t=Object(h.a)(Object(h.a)({},I),{},{page:e});D(t),R(t)},showQuickJumper:!0,showSizeChanger:!1,hideOnSinglePage:!0,position:["bottomCenter"]}}),b.a.createElement("div",{className:we.a.line,style:{visibility:n?"hidden":"visible"}}))},Ce=n("lzim"),Oe=Object(_.a)((function(e){return{exercise:e.exercise,globalSetting:e.globalSetting}}))((function(e){e.exercise,e.globalSetting,e.dispatch;var t=Object(v.useState)(""),n=Object(f.a)(t,2),r=n[0],i=n[1],a=Object(v.useState)([]),o=Object(f.a)(a,2),s=o[0],l=o[1],u=Object(v.useState)(""),d=Object(f.a)(u,2),h=d[0],p=d[1],m=Object(v.useState)(!1),E=Object(f.a)(m,2),_=E[0],k=E[1],w=Object(x.i)();Object(v.useEffect)((function(){S()}),[]);var S=function(){var e=Object(c.a)(g.a.mark((function e(t){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),e.next=3,Object(y.a)("/api/courses/".concat(null==w?void 0:w.coursesId,"/exercises/code_review_results.json"),{method:"get",params:{id:null==w?void 0:w.categoryId,search:r}});case 3:if(-2!==(null==(n=e.sent)?void 0:n.status)){e.next=7;break}return S(),e.abrupt("return");case 7:n&&(k(!1),l((null==n?void 0:n.exercise_questions)||[]),p(null==n?void 0:n.last_review_time));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),C=function(){S()};return b.a.createElement("section",{className:_e.a.warp},b.a.createElement("aside",{className:_e.a.header},b.a.createElement("div",null,"查重时间:",h||"--"),!!h&&b.a.createElement(L.a,{value:r,onChange:function(e){return i(e.target.value)},suffix:b.a.createElement("i",{onClick:C,className:"iconfont icon-sousuo2 c-grey-c"}),bordered:!1,placeholder:"请输入姓名或学号搜索",onPressEnter:C})),b.a.createElement(ge.a,{loading:_,active:!0,paragraph:{rows:5}},s.length>0?b.a.createElement("aside",{className:_e.a.subject},s.map((function(e,t){return b.a.createElement(Se,{key:t,index:t,bottomLine:t===s.length-1,gather:e,search:r})}))):b.a.createElement("div",{className:_e.a.empty},b.a.createElement("img",{src:Ce.l,width:"258"}),b.a.createElement("span",{className:"c-grey-c"},"暂无数据"))))})),Ae=(n("/zsF"),n("PArb")),Te=n("LYsE"),Ie=n("k5F3"),De=Object(_.a)((function(e){return{exercise:e.exercise,loading:e.loading.effects}}))((function(e){var t=e.exercise,n=(e.loading,e.dispatch),r=e.activeTabs,i=Object(x.i)(),a=Object(v.useState)(Object(h.a)(Object(h.a)({},i),{page:1,per_page:10})),o=Object(f.a)(a,1)[0],s=t.editData;Object(v.useEffect)((function(){"2"===r&&l()}),[i.categoryId,r]);var l=function(){n({type:"exercise/editExercise",payload:Object(h.a)({},o)})};return Object(v.useEffect)((function(){return n({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),n({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1}),function(){n({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),n({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}}),[]),b.a.createElement("section",{className:"minH1050 mb20 pt30 pb30 pl60 bg-white relative"},b.a.createElement(Ie.a,{isPreview:!0,activeTabs:r}),b.a.createElement(Ae.a,null),b.a.createElement(Te.a,{data:null==s?void 0:s.exercise_question_types,isDragDisabled:!0}))})),Le=(n("T2oS"),n("W9HT")),Re=(n("Q9mQ"),n("diRs")),Ne=n("CCdo"),je=n.n(Ne),Me=n("RotF"),Pe=n.n(Me),Be=n("6K3P"),Fe=n.n(Be),Ue=n("0owl"),He=n("ek7X"),Ge=Object(_.a)((function(e){return{exercise:e.exercise,loading:e.loading}}))((function(e){var t,n,r,i=e.exercise,a=(e.loading,e.dispatch),o=e.cb,l=Object(h.a)(Object(h.a)({},Object(x.i)()),{},{page:0,limit:50,one:null,two:null,save_one:null,save_two:null,sort:null,course_group:"",student_id:"",realname:"",save_course_group:"",save_student_id:"",save_realname:""}),p=Object(v.useState)(Object(h.a)({},l)),m=Object(f.a)(p,2),y=m[0],E=m[1],_=Object(v.useState)([]),k=Object(f.a)(_,2),w=k[0],O=k[1],A=Object(v.useState)(!0),T=Object(f.a)(A,2),I=T[0],N=T[1],j=Object(v.useState)(!0),M=Object(f.a)(j,2),P=M[0],B=M[1],F=Object(v.useState)(0),U=Object(f.a)(F,2),H=U[0],G=U[1],z=Object(v.useState)(!1),V=Object(f.a)(z,2),W=V[0],K=(V[1],Object(v.useState)([])),q=Object(f.a)(K,2),Y=q[0],Q=q[1];Object(v.useEffect)((function(){"打回重做"===i.actionTabs.key&&(w=[],J(1))}),[i.actionTabs.key]);var J=function(){var e=Object(c.a)(g.a.mark((function e(t){var n,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return 1==t&&(w=[]),N(!0),y.page=t,B(!0),e.next=6,a({type:"exercise/getRedoModal",payload:Object(h.a)(Object(h.a)({},y),{},{score:((null==y?void 0:y.one)||0)+"".concat(null!=y&&y.two?","+(null==y?void 0:y.two):"")})});case 6:(null==(r=e.sent)||null===(n=r.exercise_users)||void 0===n?void 0:n.length)0?b.a.createElement("p",null,"选择班级:"):b.a.createElement("p",null,"暂无分班"),b.a.createElement(R.a.Group,{value:m,onChange:function(e){E(e),A(e.length===l.length)}},l.map((function(e){return b.a.createElement(R.a,{key:e.id,value:e.id},e.name)})))),b.a.createElement("p",{style:{marginBottom:40},className:"c-grey-999 mt40"},"说明:平台目前仅支持java、python、c、c++语言的实训题和编程题的代码查重。")),b.a.createElement("div",{className:Ke.a.footer},b.a.createElement(R.a,{checked:O,onChange:function(e){var t=e.target.checked?l.map((function(e){return e.id})):[];E(t),A(e.target.checked)}},"全选"),b.a.createElement(a.a,{onClick:I},"取消"),b.a.createElement(a.a,{onClick:function(){r(m)},type:"primary"},"确认"))))})),Ye=n("Fzz4"),Qe=(n("DZo9"),n("8z0m")),Je=n("/MfK"),Xe=n("w5pM"),Ze=n("jN4g"),$e=n("xvlK"),et=n("dfu6"),tt=r.a.TabPane,nt=Object(_.a)((function(e){return{exercise:e.exercise,loading:e.loading}}))((function(e){var t,n=e.exercise,i=(e.loading,e.dispatch),a=(Object(x.i)(),Object(x.h)(),U.a.useForm()),o=Object(f.a)(a,1)[0],l=Object(v.useState)({}),p=Object(f.a)(l,2),m=p[0],y=p[1],E=Object(v.useState)("1"),_=Object(f.a)(E,2),k=_[0],w=_[1];return Object(v.useEffect)((function(){"addIp"===n.actionTabs.key&&(o.resetFields(),w("1"))}),[n.actionTabs]),b.a.createElement(u.a,{centered:!0,title:"添加IP范围",visible:"addIp"===n.actionTabs.key,okText:"确认",cancelText:"取消",width:600,bodyStyle:{minHeight:200},onOk:Object(c.a)(g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.validateFields();case 2:if(m.ip){e.next=7;break}if(t=m.startIP.split(".")[3],!(parseInt(t)>parseInt(m.endIP))){e.next=7;break}return s.b.warn("IP区间段不合法"),e.abrupt("return");case 7:i({type:"exercise/setActionTabs",payload:{key:"insterIp",data:Object(h.a)({},o.getFieldValue()),type:n.actionTabs.type}});case 8:case"end":return e.stop()}}),e)}))),onCancel:function(){i({type:"exercise/setActionTabs",payload:{}})}},b.a.createElement("section",{className:"pl10 pr10"},b.a.createElement(r.a,{activeKey:k,onChange:function(e){w(e),o.resetFields()}},b.a.createElement(tt,{tab:"新增IP地址",key:"1"}),b.a.createElement(tt,{tab:"新增IP范围",key:"2"})),b.a.createElement(U.a,{form:o,className:"pt30",name:"form",layout:"vertical",onValuesChange:function(e,t){y(Object(h.a)({},t))}},"1"===k&&b.a.createElement(U.a.Item,{name:"ip",rules:[{required:!0,message:"请输入IP地址"}],label:"IP地址"},b.a.createElement(ie.a,{open:!1,tokenSeparators:[";",",",";"],size:"large",mode:"tags",style:{width:"100%"},placeholder:"请输入IP地址,可同时添加多个IP地址,中间用英文的分号间隔。",onChange:function(e){o.setFieldsValue({ip:Object(d.a)(e.filter((function(e){return!!Object(et.a)(e)||(s.b.warn("IP不合法,请重新输入"),!1)})))})}})),"2"===k&&b.a.createElement(M.a,{gutter:[20,20]},b.a.createElement(P.a,{flex:"1"},b.a.createElement(U.a.Item,{name:"startIP",rules:[{required:!0,message:"请输入起始IP地址"}],label:"起始IP地址"},b.a.createElement(L.a,{maxLength:15,placeholder:"请输入起始IP地址",onBlur:function(e){var t="";Object(et.a)(e.target.value)?t=e.target.value:(t="",s.b.warn("IP不合法,请重新输入")),o.setFieldsValue({startIP:t})}}))),b.a.createElement(P.a,{flex:"1"},b.a.createElement(U.a.Item,{name:"endIP",rules:[{required:!0,message:"请输入结束IP地址"},{pattern:/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/,message:"请输入0-255的网段"}],label:"结束IP地址"},b.a.createElement(L.a,{onBlur:function(e){},prefix:b.a.createElement("span",{className:"font14"},null===(t=m.startIP)||void 0===t?void 0:t.substring(0,m.startIP.lastIndexOf("."))),maxLength:3,placeholder:"请输入结束IP地址的后三位"})))))))})),rt=n("2JKx"),it=n.n(rt),at=n("Ot1p"),ot=(n("+BJd"),n("mr32")),st=(r.a.TabPane,ie.a.Option),lt=Object(_.a)((function(e){return{exercise:e.exercise,loading:e.loading}}))((function(e){var t,n,r,i=e.exercise,a=(e.loading,e.data),o=e.disabled,l=e.updata,p=(e.dispatch,Object(x.i)()),m=(Object(x.h)(),U.a.useForm()),y=(Object(f.a)(m,1)[0],Object(v.useState)({})),E=Object(f.a)(y,2),_=(E[0],E[1],Object(v.useState)("1")),k=Object(f.a)(_,2),w=(k[0],k[1],i.workSetting),S=i.commonHeader,O=Object(v.useState)(!1),A=Object(f.a)(O,2),I=A[0],L=A[1],j=Object(v.useState)([]),B=Object(f.a)(j,2),F=B[0],H=B[1],G=Object(v.useState)([]),z=Object(f.a)(G,2),V=z[0],W=z[1],K=Object(v.useState)(!1),q=Object(f.a)(K,2),Y=q[0],Q=q[1],J=Object(v.useState)([]),X=Object(f.a)(J,2),Z=X[0],$=X[1],ee=Object(v.useState)([]),te=Object(f.a)(ee,2),ne=te[0],re=te[1],ae=Object(v.useState)({id:p.categoryId,exercise_group_id:[]}),oe=Object(f.a)(ae,2),se=oe[0],le=(oe[1],Object(v.useState)(0)),ce=Object(f.a)(le,2),ue=ce[0],de=ce[1];Object(v.useMemo)((function(){var e,t,n,r;if(null!=w&&null!==(e=w.published_course_groups)&&void 0!==e&&e.length){var i,a=Object(d.a)(null==w||null===(i=w.published_course_groups)||void 0===i?void 0:i.map((function(e){return Object(d.a)(e.course_group_id)})).flat());H(Object(d.a)(a))}else if(null!=w&&w.published_course_groups){var o;H(Object(d.a)(null==w||null===(o=w.course_groups)||void 0===o?void 0:o.map((function(e){return e.course_group_id}))))}if((null!=w&&null!==(t=w.exercise)&&void 0!==t&&t.group_make_ups||null!=w&&null!==(n=w.exercise)&&void 0!==n&&n.unified_make_up)&&(Q(!0),null!=w&&null!==(r=w.exercise)&&void 0!==r&&r.group_make_ups)){var s,l,c=V;null==w||null===(s=w.exercise)||void 0===s||null===(l=s.group_make_ups)||void 0===l||l.map((function(e,t){c[t]=e.course_group_id||[]})),W(Object(d.a)(c))}}),[w]),Object(v.useEffect)((function(){console.log("groupIds:",F)}),[F]),Object(v.useEffect)((function(){console.log("selectGroupIds:",V)}),[V]);var he=function(){var e=Object(c.a)(g.a.mark((function e(t){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(C.K)(Object(h.a)({},se));case 2:n=e.sent,re(Object(d.a)(n.users.map((function(e){return e.key=String(e.id),e})).filter((function(e){var t;return console.log("openKeys",a.group_make_ups[ue].students,ue),null===(t=a.group_make_ups[ue].students)||void 0===t||!t.some((function(t){return t.id===e.id}))}))));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),fe={onChange:function(e,t){$(Object(d.a)(t)),console.log("selectedRowKeys: ".concat(e),"selectedRows: ",t)},getCheckboxProps:function(e){return{disabled:"Disabled User"===e.name,name:e.name}}},pe=function(e){var t,n,r;return!!o||!!(2!==S.exercise_status||null!=w&&null!==(t=w.exercise)&&void 0!==t&&null!==(n=t.group_make_ups)&&void 0!==n&&null!==(r=n[e])&&void 0!==r&&r.course_groups)&&3!==S.exercise_status},me=function(e){return!!o||(2===S.exercise_status?null==w||null===(t=w.exercise)||void 0===t||null===(n=t.group_make_ups)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.is_all:3!==S.exercise_status);var t,n,r};return b.a.createElement(b.a.Fragment,null,b.a.createElement(M.a,null,b.a.createElement(P.a,{span:24},b.a.createElement(M.a,{align:"middle"},b.a.createElement(P.a,{flex:"1"},b.a.createElement("h1",{className:"mt15"},"补考设置 ",b.a.createElement("span",{className:"c-red font14"},"(正式开始补考前,切记修改试卷截止时间大于当前时间)"))))),b.a.createElement(P.a,{span:24,className:"mt10"},b.a.createElement(R.a,{checked:a.unified_make_up||(null===(t=a.group_make_ups)||void 0===t?void 0:t.length),disabled:o,onChange:function(e){e.target.checked?a.unified_make_up=!0:(a.unified_make_up=!1,delete a.group_make_ups),Q(e.target.checked)}},b.a.createElement("strong",null,"开启补考")),b.a.createElement("span",{className:"c-grey-c font12"},"(开启后可针对未答卷的学生设置补考,补考与延长截止时间不可共存)"))),Y&&b.a.createElement("section",{className:"ml40"},b.a.createElement(M.a,{align:"middle",className:"mt10"},b.a.createElement(P.a,null,b.a.createElement(T.a,{checked:a.unified_make_up,disabled:o,onClick:function(){a.unified_make_up=!0,delete a.group_make_ups,l(Object(h.a)({},a))}},"所有分班统一补考")),b.a.createElement(P.a,null,b.a.createElement(M.a,{align:"middle"},b.a.createElement(P.a,{className:"ml50"},"补考扣分"),b.a.createElement(P.a,{className:"ml10 mr10"},b.a.createElement(D.a,{min:0,max:100,placeholder:"为空代表不扣分",disabled:o||3!==S.exercise_status,onChange:function(e){a.make_up_score=e,l(Object(h.a)({},a))},value:a.make_up_score,style:{width:150}})),b.a.createElement(P.a,null,"(分)")))),(null===(n=w.course_groups)||void 0===n?void 0:n.length)>0&&b.a.createElement(M.a,{align:"middle",className:"mt10"},b.a.createElement(P.a,null,b.a.createElement(T.a,{disabled:o||3!==S.exercise_status,checked:a.group_make_ups,onClick:function(){var e;delete a.unified_make_up,a.group_make_ups=(null==w||null===(e=w.exercise)||void 0===e?void 0:e.group_make_ups)||[{students:[],course_group_id:[],score:0}],l(Object(h.a)({},a))}},"各班分别补考"))),null===(r=a.group_make_ups)||void 0===r?void 0:r.map((function(e,t){var n,r;return b.a.createElement("div",{key:t},b.a.createElement(M.a,{align:"middle",className:"mt10"},b.a.createElement(P.a,{flex:"100px"},"补考规则",t+1),b.a.createElement(P.a,{className:"ml10"},b.a.createElement(ie.a,{style:{width:307},value:e.course_group_id,mode:"multiple",placeholder:"请选择分班",disabled:pe(t),onChange:function(e,n,r){V[t]=e,a.group_make_ups[t].course_group_id=e,l(Object(h.a)({},a)),W(Object(d.a)(V))}},null==w||null===(n=w.course_groups)||void 0===n?void 0:n.map((function(e,n){var r=[];if(F.includes(e.course_group_id)&&(V.length&&(r=V.filter((function(n,r){return t!==r&&!!n.includes(e.course_group_id)}))),!r.length))return b.a.createElement(st,{value:e.course_group_id,key:n},e.course_group_name)})))),b.a.createElement(P.a,null,b.a.createElement(M.a,{align:"middle"},b.a.createElement(P.a,{className:"ml50"},"补考扣分"),b.a.createElement(P.a,{className:"ml10 mr10"},b.a.createElement(D.a,{value:e.score,min:0,max:100,style:{width:150},placeholder:"为空代表不扣分",disabled:pe(t),onChange:function(e){a.group_make_ups[t].score=e,l(Object(h.a)({},a))}})),b.a.createElement(P.a,null,"(分)")))),b.a.createElement(M.a,{className:"mt20"},b.a.createElement(P.a,{flex:"220px"},b.a.createElement(T.a.Group,{name:"student",value:e.is_all,disabled:me(t),onChange:function(e){var n,r,i;e.target.value?delete a.group_make_ups[t].students:a.group_make_ups[t].students=(null==w||null===(n=w.exercise)||void 0===n||null===(r=n.group_make_ups)||void 0===r||null===(i=r[t])||void 0===i?void 0:i.students)||[];a.group_make_ups[t].is_all=e.target.value,l(Object(h.a)({},a))}},b.a.createElement(T.a,{value:!0},"全部未答学生"),b.a.createElement(T.a,{value:!1},"指定学生"))),b.a.createElement(P.a,{flex:"1"},!a.group_make_ups[t].is_all&&b.a.createElement("div",{onClick:function(){var e;null!==(e=V[t])&&void 0!==e&&e.length?o||(se.exercise_group_id=V[t],L(!0),$([]),de(t),re([]),he({page:1})):s.b.warn("请先选择补考班级")},className:"".concat(o&&"disabledStyle"),style:{minHeight:28,border:"1px solid #ccc",padding:4}},null===(r=e.students)||void 0===r?void 0:r.map((function(t,n){return b.a.createElement(ot.a,{key:n,closable:t.add||S.exercise_status>2,onClose:function(){e.students.splice(n,1),l(Object(h.a)({},a))}},t.name)})))),b.a.createElement(P.a,{flex:"100px",className:"tr"},t>0&&3===S.exercise_status&&b.a.createElement(Je.a,{onClick:function(){a.group_make_ups.splice(t,1),l(Object(h.a)({},a))}}),b.a.createElement(Xe.a,{className:"c-green ml20",onClick:function(){a.group_make_ups.push({students:[],course_group_id:[],score:0,is_all:!0}),l(Object(h.a)({},a))}}))))})),b.a.createElement(u.a,{title:"指定补考学生",visible:I,onCancel:function(){return L(!1)},destroyOnClose:!0,onOk:function(){a.group_make_ups[ue].students=a.group_make_ups[ue].students.concat(Z.map((function(e){return e.add=!0,e}))),L(!1),console.log("data:",a),l(Object(h.a)({},a))}},b.a.createElement(N.a,{columns:[].concat([,{title:"学生姓名",dataIndex:"name"},{title:"分班",dataIndex:"course_group_name"}]),dataSource:Object(d.a)(ne),rowSelection:Object(h.a)({type:"checkbox"},fe),pagination:{pageSize:10,defaultCurrent:1}}))))})),ct=n("m3rI"),ut=L.a.TextArea,dt=Q.a.RangePicker,ht=ie.a.Option,ft=Object(_.a)((function(e){var t=e.exercise,n=e.loading,r=e.globalSetting;return{exercise:t,loading:n.effects,globalSetting:r}}))((function(e){var t,n,r,i,o,l,p,m,E,_,k=e.exercise,w=(e.globalSetting,e.loading,e.dispatch),S=Object(x.i)(),A=(Object(x.h)(),k.workSetting),T=k.commonHeader,I=Object(v.useState)(!0),L=Object(f.a)(I,2),N=L[0],j=L[1],H=Object(v.useState)([]),z=Object(f.a)(H,2),V=(z[0],z[1]),W=Object(v.useState)({}),K=Object(f.a)(W,2),q=(K[0],K[1],Object(v.useState)([])),Y=Object(f.a)(q,2),J=(Y[0],Y[1],Object(v.useState)()),ee=Object(f.a)(J,2),te=ee[0],ne=ee[1],re=U.a.useForm(),ae=(Object(f.a)(re,1)[0],Object(v.useState)([])),oe=Object(f.a)(ae,2),se=oe[0],le=oe[1],ce=Object(v.useState)({ip_bind:!1,export_page_num:40,ip_limit:null,public_ip:[],inner_ip:[],screen_open:!1,screen_num:3,screen_sec:5,open_camera:!1,identity_verify:!1,open_phone_video_recording:!1,photo_count:5,open_make_up:!1,unified_setting:!1,publish_time:"",end_time:"",group_make_ups:[],unified_make_up:!1,make_up_score:0,time:"",choice_random:!1,question_random:!1,show_statistic:!1,assistant_auth:!1,answer_open:!1,score_open:!1,answered_open:!0,open_score:!0,open_total_score:!0,file_list:[],show_title:!1,show_body:!1,show_info:!1,show_table:!0,show_user:!1,show_no:!1,show_group:!0,show_desc:!1,description:"",attachment_id:"",part_score:!1}),ue=Object(f.a)(ce,2),de=ue[0],he=ue[1];function fe(){return(fe=Object(c.a)(g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("/api/courses/".concat(null==S?void 0:S.coursesId,"/exercises/overload_alert.json"),{method:"get",params:{course_id:null==S?void 0:S.coursesId}});case 2:t=e.sent,ne(null==t?void 0:t.alert);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}S.category=S.categoryId,Object(v.useEffect)((function(){me()}),[A]),Object(v.useEffect)((function(){w({type:"exercise/getWorkSetting",payload:Object(h.a)({},S)}),Object($.s)()||function(){fe.apply(this,arguments)}()}),[]),Object(v.useEffect)((function(){"insterIp"===k.actionTabs.key&&(k.actionTabs.data.ip?de[k.actionTabs.type]=[].concat(Object(d.a)(de[k.actionTabs.type]||[]),Object(d.a)(k.actionTabs.data.ip)):de[k.actionTabs.type]=[].concat(Object(d.a)(de[k.actionTabs.type]||[]),["".concat(k.actionTabs.data.startIP,",").concat(k.actionTabs.data.startIP.substring(0,k.actionTabs.data.startIP.lastIndexOf("."))+"."+k.actionTabs.data.endIP)]),he(Object(h.a)({},de)))}),[k.actionTabs]);var pe,me=function(){var e,t,n,r,i,a,o,s=JSON.parse(JSON.stringify(A));Object.keys(de).map((function(e){var t,n,r,i,a;(de[e]=(null==s||null===(t=s.exercise)||void 0===t?void 0:t[e])||(null==s||null===(n=s.exercise_header)||void 0===n?void 0:n[e]),null!=s&&null!==(r=s.exercise_header)&&void 0!==r&&r[e])?de[e]=null==s||null===(i=s.exercise_header)||void 0===i?void 0:i[e]:de[e]=null==s||null===(a=s.exercise)||void 0===a?void 0:a[e]})),de.file_list=null!=s&&null!==(e=s.exercise_header)&&void 0!==e&&e.attachment_id?[{uid:null==s||null===(t=s.exercise_header)||void 0===t?void 0:t.attachment_id,id:null==s||null===(n=s.exercise_header)||void 0===n?void 0:n.attachment_id,url:null==s||null===(r=s.exercise_header)||void 0===r?void 0:r.photo_url}]:[],se=(null==s||null===(i=s.published_course_groups)||void 0===i?void 0:i.map((function(e){return{course_group_id:e.course_group_id,end_time:e.course_end_time,publish_time:e.course_publish_time}})))||[{}],null==A||null===(a=A.course_groups)||void 0===a||a.map((function(e,t){e.cilckkey="",e.isselect=!1})),null==A||null===(o=A.course_groups)||void 0===o||o.map((function(e,t){var n;null==A||null===(n=A.published_course_groups)||void 0===n||n.map((function(t,n){var r;null!=t&&null!==(r=t.course_group_id)&&void 0!==r&&r.includes(null==e?void 0:e.course_group_id)&&(e.cilckkey=n,e.isselect=!0)}))})),console.log("data:",de,A),he(de),le(se)},ge=function(e){Object(C.db)(Object(h.a)({},e)).then((function(e){0===e.status&&(s.b.success("更新成功"),w({type:"exercise/getCommonHeader",payload:Object(h.a)({},S)}),w({type:"exercise/getWorkSetting",payload:Object(h.a)({},S)}),j(!0))}))},ve=function(e){return e&&e1&&(null==e||!e.new)||!(null==A||null===(n=A.published_course_groups)||void 0===n||!n.some((function(t){return t.course_group_id===e.course_group_id})))&&N},ye={disabled:N,multiple:!1,listType:"picture-card",onPreview:function(e){Z.a.publish("preview-image",e.thumbUrl)},withCredentials:!0,fileList:de.file_list,beforeUpload:function(e){return!(e.size/1024>200)||(s.b.error("该文件无法上传。超过文件大小限制(200KB),建议上传到百度云等其它共享工具里,然后再txt文档里给出链接以及共享密码并上传"),!1)},action:"".concat(ct.a.API_SERVER,"/api/attachments.json"),onChange:function(e){var t=e.fileList.filter((function(e){return!!e.status}));de.file_list=t,he(Object.assign({},de))},onRemove:(pe=Object(c.a)(g.a.mark((function e(t){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return de.file_list=[],he(Object.assign({},de)),e.abrupt("return",!0);case 3:case"end":return e.stop()}}),e)}))),function(e){return pe.apply(this,arguments)})};return b.a.createElement("section",{className:[it.a.form,"mb50 bg-white"].join(" ")},b.a.createElement(M.a,null,b.a.createElement(P.a,{span:24},b.a.createElement(M.a,{align:"middle"},b.a.createElement(P.a,{flex:"1"},b.a.createElement("h1",{className:"mt15"},"发布设置")),b.a.createElement(P.a,null,Object($.c)()&&T.can_edit&&N&&b.a.createElement(a.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return j(!1)}},"编辑设置")))),(null===(t=A.course_groups)||void 0===t?void 0:t.length)>0&&b.a.createElement(P.a,{span:24,className:"mt10"},b.a.createElement(R.a,{checked:de.unified_setting,disabled:N||(null==A||null===(n=A.exercise)||void 0===n?void 0:n.exercise_status)>1,onChange:function(){var e;(null==A||null===(e=A.exercise)||void 0===e?void 0:e.exercise_status)>1?s.b.error("已发布,不能再修改分班统一发布"):(de.unified_setting=!de.unified_setting,!1===de.unified_setting&&""==se&&le(se.concat({})),he(Object.assign({},de)))}},b.a.createElement("strong",null,"分班统一发布")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中则所有分班使用相同的发布设置,仅课堂管理员可修改;否则各个分班允许单独设置)")),b.a.createElement("span",{style:{color:"red"}},(null==A||null===(r=A.exercise)||void 0===r?void 0:r.exercise_status)>1&&te&&"当前课堂中学生人数较多,为提供更好的服务,我们将进行服务器扩容,建议您在30分钟后发起考试。您也可以立即发布。")),de.unified_setting&&b.a.createElement("div",null,b.a.createElement(M.a,{align:"middle",className:"mt25 pl30"},b.a.createElement(P.a,null,"发布时间:"),b.a.createElement(P.a,{className:"ml5"},b.a.createElement(B.a,{placement:"bottom",title:(null==A||null===(i=A.exercise)||void 0===i?void 0:i.exercise_status)>1&&"发布时间已过,不能修改"},b.a.createElement(Q.a,{style:{width:170},placeholder:"请选择发布时间",showTime:{format:"HH:mm",defaultValue:G()(Object(O.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabledDate:ve,disabled:N||(null==A||null===(o=A.exercise)||void 0===o?void 0:o.exercise_status)>1,value:de.publish_time?G()(de.publish_time):"",allowClear:!1,onChange:function(e,t){de.publish_time=t,de.end_time||(de.end_time=G()(e).add(1,"month").format("YYYY-MM-DD HH:mm:ss")),he(Object.assign({},de))}}))),b.a.createElement(P.a,null,b.a.createElement("span",{className:"c-grey-c ml10"},"(学生开始答题时间)"))),b.a.createElement(M.a,{align:"middle",className:"mt25 pl30"},b.a.createElement(P.a,null,"截止时间:"),b.a.createElement(P.a,{className:"ml5"},b.a.createElement(Q.a,{style:{width:170},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:G()(Object(O.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:N,allowClear:!1,value:de.end_time?G()(de.end_time):"",disabledDate:function(e){return de.end_time?e&&(e1?null!=n&&n.new?[!1,!1]:[!0,!1]:null!=A&&null!==(i=A.published_course_groups)&&void 0!==i&&i.some((function(e){return e.course_group_id===n.course_group_id}))&&(N||(null==A||null===(a=A.exercise)||void 0===a?void 0:a.exercise_status)>1)?[!0,!1]:[!1,!1]),disabledDate:ve,style:{width:400},placeholder:["请选择发布时间","请选择截止时间"],showTime:{format:"HH:mm",defaultValue:[G()(Object(O.d)(),"HH:mm"),G()(Object(O.d)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",size:"large",value:e.publish_time&&[G()(e.publish_time),e.end_time&&G()(e.end_time)],onChange:function(n,r){be(e)||(se[t].publish_time=r[0]),se[t].end_time=r[1],le(Object(d.a)(se))}})),!N&&b.a.createElement(P.a,{span:4},t>0&&(null==e?void 0:e.new)&&b.a.createElement(Je.a,{onClick:function(){se=se.filter((function(e,n){return t!==n})),le(Object(d.a)(se))}}),b.a.createElement(Xe.a,{className:"c-green ml20",onClick:function(){le(se.concat({new:!0}))}}))));var n,r,i,a}))),b.a.createElement(Ae.a,null),(3===(null==T?void 0:T.exercise_status)||de.open_make_up)&&b.a.createElement(b.a.Fragment,null,b.a.createElement(lt,{data:de,disabled:N,updata:he}),b.a.createElement(Ae.a,null)),b.a.createElement(M.a,null,b.a.createElement(P.a,null,b.a.createElement("strong",null,"答题设置")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement("span",null,"答题时长:"),b.a.createElement(D.a,{size:"large",disabled:N,min:1,value:-1===de.time?null:de.time,onChange:function(e){de.time=e,he(Object(h.a)({},de))}}),b.a.createElement("span",{className:"ml10"},"分钟"),b.a.createElement("span",{className:"c-grey-c font12 ml10"},"(空值,代表不限时长;非空值,代表限制时长,从学生首次答题开始持续计时)")),!(null!=T&&T.is_random)&&b.a.createElement(b.a.Fragment,null,b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.question_random,disabled:N,onChange:function(e){de.question_random=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"题目顺序随机打乱")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生答题时,题目顺序按照题型随机显示)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.choice_random,disabled:N,onChange:function(e){de.choice_random=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"选项顺序随机打乱")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生答题时,选项顺序随机显示)"))),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.part_score,disabled:N,onChange:function(e){de.part_score=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"多选题部分得分")),b.a.createElement("span",{className:"c-grey-c font12"},"(部分得分=(答对数量/答案总数)*试题分值,存在答错不得分)"))),b.a.createElement(Ae.a,null),b.a.createElement(b.a.Fragment,null,b.a.createElement(M.a,null,b.a.createElement(P.a,null,b.a.createElement("strong",null,"防作弊设置")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.identity_verify,disabled:!Object($.o)()||N,onChange:function(e){de.identity_verify=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"考试前人脸身份核验")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生参加考试前将会要求调用摄像头并完成拍照采集,教师/助教审核通过后学生并开启手机录制视频则可以开始考试)"),b.a.createElement("br",null),b.a.createElement("span",{className:"c-grey-c font12"},"如开启,教师/助教可以在该考试中的详情页中对学生人脸身份进行审核。")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.open_camera,disabled:N,onChange:function(e){de.time?(de.open_camera=e.target.checked,de.photo_count=de.photo_count||5,he(Object.assign({},de))):s.b.error("不限时长的考试不可开启摄像头,请填写考试时长")}},b.a.createElement("strong",null,"考试中启用拍照监考")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生参加考试时将会要求调用摄像头)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement("span",null,"本场考试最多拍摄:"),b.a.createElement(D.a,{size:"large",disabled:N||!de.open_camera,min:1,defaultValue:5,max:Object($.v)()?1e3:10,value:de.photo_count,onChange:function(e){de.photo_count=e,he(Object(h.a)({},de))}}),b.a.createElement("span",{className:"ml10"},"(次)"),b.a.createElement("span",{className:"c-grey-c font12 ml10"},"(请填写不大于10的正整数)")),b.a.createElement(P.a,{className:"c-grey-c font12 pl30 mt10"},"如开启防作弊设置,学生必须同意才可以参加考试。"),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.screen_open,disabled:N,onChange:function(e){de.screen_open=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"切屏后强制交卷"))),de.screen_open&&b.a.createElement(P.a,{span:24,className:"mt15 pl30 font14"},b.a.createElement("span",{className:"c-grey-333 mr10"},"考试过程中切换页面超过"),b.a.createElement(D.a,{size:"large",disabled:N,min:0,defaultValue:3,max:10,value:de.screen_num,onChange:function(e){de.screen_num=e,he(Object(h.a)({},de))}}),b.a.createElement("span",{className:"c-grey-333 mr10"},"(次)后将被强制交卷,切换到其他页面"),b.a.createElement(D.a,{size:"large",disabled:N,min:0,defaultValue:5,max:60,value:de.screen_sec,onChange:function(e){de.screen_sec=e,he(Object(h.a)({},de))}}),b.a.createElement("span",{className:"c-grey-333"},"(秒)后即判定为切屏。")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:"no"!==de.ip_limit,disabled:N,onChange:function(e){"no"===de.ip_limit?de.ip_limit="pub":de.ip_limit="no",he(Object.assign({},de))}},b.a.createElement("strong",null,"限制考试访问IP"),b.a.createElement("span",{className:"font12 c-grey-c"},"(不在IP范围中的将无法参加此考试)"))),"no"!==de.ip_limit&&b.a.createElement(P.a,{className:"mt15 ml50"},b.a.createElement("span",{className:"c-red"},"(只允许在Chrome谷歌浏览器作答,并且要求学生安装WebRTC Leak Prevent插件)"),b.a.createElement("a",{className:"c-blue",target:"_blank",href:"https://www.educoder.net/forums/4478"},"如何安装WebRTC Leak Prevent插件?"))),"no"!==de.ip_limit&&b.a.createElement(b.a.Fragment,null,b.a.createElement(M.a,{className:"mt15 ml50 ".concat(it.a.ipWrp)},b.a.createElement(P.a,null,b.a.createElement("span",null,"公网IP地址范围:")),b.a.createElement(P.a,null,!(null!==(l=de.public_ip)&&void 0!==l&&l.length)&&b.a.createElement("span",null,"当前还未设置IP范围"),null===(p=de.public_ip)||void 0===p?void 0:p.map((function(e,t){return b.a.createElement("span",{className:it.a.ipItem},b.a.createElement("i",null,e," "),!N&&b.a.createElement(Ze.a,{onClick:function(){u.a.confirm({okText:"确定",cancelText:"取消",title:"确定删除该IP吗?",onOk:function(){de.public_ip.splice(t,1),he(Object(h.a)({},de))}})},className:" c-grey-c",size:20}))})),Object($.c)()&&!N&&b.a.createElement("span",{onClick:function(){w({type:"exercise/setActionTabs",payload:{key:"addIp",type:"public_ip"}})},className:"font14 c-blue ml10"}," ",b.a.createElement("i",{className:"iconfont icon-xuanyong font14"})," 添加"))),b.a.createElement(M.a,{className:"mt15 ml50 ".concat(it.a.ipWrp)},b.a.createElement(P.a,null,b.a.createElement("span",null,"内网IP地址范围:")),b.a.createElement(P.a,null,!(null!==(m=de.inner_ip)&&void 0!==m&&m.length)&&b.a.createElement("span",null,"当前还未设置IP范围"),null===(E=de.inner_ip)||void 0===E?void 0:E.map((function(e,t){return b.a.createElement("span",{className:it.a.ipItem},b.a.createElement("i",null,e," "),!N&&b.a.createElement(Ze.a,{onClick:function(){N||u.a.confirm({title:"确定删除该IP吗?",onOk:function(){de.inner_ip.splice(t,1),he(Object(h.a)({},de))}})},className:" c-grey-c",size:20}))})),Object($.c)()&&!N&&b.a.createElement("span",{className:"font14 c-blue ml10",onClick:function(){w({type:"exercise/setActionTabs",payload:{key:"addIp",type:"inner_ip"}})}}," ",b.a.createElement("i",{className:"iconfont icon-xuanyong font14"})," 添加")))),b.a.createElement(M.a,null,b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.ip_bind,disabled:N,onChange:function(e){de.ip_bind=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"IP绑定"),b.a.createElement("span",{className:"font12 c-grey-c"},"(考试开始后,学生的账号将自动与机器IP绑定。如遇特殊情况,教师/助教可以解除学生的IP绑定)")))),b.a.createElement(Ae.a,null)),b.a.createElement(M.a,null,b.a.createElement(P.a,null,b.a.createElement("strong",null,"属性设置")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.score_open,disabled:N,onChange:function(e){de.score_open=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"公开成绩")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则在试卷截止时间之后,已提交答题的学生可以查看其它学生的成绩,否则只能查看自己的成绩;但未选中“查看总成绩”时自己和其他同学成绩均不可见)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.answer_open,disabled:N,onChange:function(e){de.answer_open=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"公开答案")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则在试卷截止时间之后,已提交答题的学生可以查看试卷题目的答案,否则不能查看)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30 "},b.a.createElement(R.a,{checked:de.show_statistic,disabled:N,onChange:function(e){de.show_statistic=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"公开统计")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则在试卷截止时间之后,已提交答题的学生可以查看答题统计,否则不能查看)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.open_total_score,disabled:N,onChange:function(e){de.open_total_score=e.target.checked,!1===e.target.checked&&(de.open_score=e.target.checked),he(Object.assign({},de))}},b.a.createElement("strong",null,"查看总成绩")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生交卷后能看到自己的总成绩及每个小题的得分,否则总成绩和小题得分均不能查看)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.open_score,disabled:!de.open_total_score||N,onChange:function(e){de.open_score=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"查看小题得分")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生交卷后能看到自己每个小题的得分详情,否则不能查看。选中本项前必须先选中“查看总成绩”)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.answered_open,disabled:N,onChange:function(e){de.answered_open=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"查看已答试卷")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生交卷后能查看试卷和成绩;否则只能查看成绩,不能查看试卷)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30 pb40"},b.a.createElement(R.a,{checked:de.assistant_auth,disabled:N,onChange:function(e){de.assistant_auth=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"助教查看答案")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中,则允许助教查看答案)"))),b.a.createElement(Ae.a,null),Object($.c)()&&b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"600px"},b.a.createElement(M.a,null,b.a.createElement(P.a,null,b.a.createElement("strong",null,"试卷导出格式设置")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement("strong",null,"卷头左角标"),b.a.createElement("span",{className:"c-grey-c font12"},"(位于首页左上角,请以图片上传;大小请勿超过200k,尺寸为700x500)")),b.a.createElement("div",{className:"mt15 pl30"},b.a.createElement(Qe.a,ye,!(null!==(_=de.file_list)&&void 0!==_&&_.length)&&b.a.createElement("div",null,b.a.createElement($e.a,null),b.a.createElement("div",{style:{marginTop:8}},"上传")))),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.show_title,disabled:N,onChange:function(e){de.show_title=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"展示试卷标题")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中则在卷头展示试卷标题)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30 "},b.a.createElement(R.a,{checked:de.show_body,disabled:N,onChange:function(e){de.show_body=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"展示考试内容")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中则在卷头展示考试内容,即本试卷所属课程名称)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.show_info,disabled:N,onChange:function(e){de.show_info=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"展示题量、分值、考试时长")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中则在卷头展示题量、分值、考试时长信息)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.show_table,disabled:N,onChange:function(e){de.show_table=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"展示得分、评分表格")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中则给出学生的得分、评分表格)")),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement("strong",null,"密封线区域设置"),b.a.createElement(R.a,{className:"pl8",checked:de.show_user,disabled:N,onChange:function(e){de.show_user=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"姓名")),b.a.createElement(R.a,{checked:de.show_no,disabled:N,onChange:function(e){de.show_no=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"学号")),b.a.createElement(R.a,{checked:de.show_group,disabled:N,onChange:function(e){de.show_group=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"专业班级"))),Object($.o)()&&b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement("span",null,"每页导出最大试题数:"),b.a.createElement(D.a,{size:"large",min:1,value:de.export_page_num?de.export_page_num:40,onChange:function(e){de.export_page_num=e,he(Object(h.a)({},de))}}),b.a.createElement("span",{className:"ml10"},"题")),b.a.createElement("span",{className:"c-grey-c font12 pl30 pt10"},"(勾选项将会出现在首页左侧密封线内,不选则代表不设置密封区)"),b.a.createElement(P.a,{span:24,className:"mt15 pl30"},b.a.createElement(R.a,{checked:de.show_desc,disabled:N,onChange:function(e){de.show_desc=e.target.checked,he(Object.assign({},de))}},b.a.createElement("strong",null,"考试说明")),b.a.createElement("span",{className:"c-grey-c font12"},"(选中开启文本编辑器,可输入500字以内的考试说明)")),de.show_desc&&b.a.createElement("div",{className:"mt15 pl30 pb40"},N?b.a.createElement(ut,{style:{height:150,width:550},disabled:!0,value:de.description}):b.a.createElement(at.a,{width:550,height:150,defaultValue:de.description,id:"exercise-detail-config-exam-description-id",onChange:function(e){de.description=e,he(Object.assign({},de))}})))),b.a.createElement(P.a,{flex:1,className:"pt40 mb20"},b.a.createElement("div",{className:"pb10"},"示例图片预览:"),b.a.createElement("img",{src:Ce.o}))),!N&&b.a.createElement(P.a,{className:"mb50 pb10 btn-w120"},b.a.createElement(a.a,{type:"primary",size:"large",onClick:function(){return function(){var e,t,n,r,i,a=JSON.parse(JSON.stringify(de));if(a.categoryId=S.categoryId,a.publish_time_groups=se,a.attachment_id=(null===(e=a.file_list)||void 0===e||null===(t=e[0])||void 0===t||null===(n=t.response)||void 0===n?void 0:n.id)||null,delete a.file_list,de.unified_setting){if(!de.publish_time||!de.end_time)throw s.b.error("发布截止时间不能为空"),new String("发布截止时间不能为空")}else{if(!se.length)return void s.b.warn("提交失败:分班发布设置不能为空");delete a.publish_time,delete a.end_time,se.map((function(e){var t;if(!e.course_group_id||null===(t=e.course_group_id)||void 0===t||!t.length)throw s.b.error("分班不能为空"),new String("分班不能为空");if(!e.publish_time||!e.end_time)throw s.b.error("发布截止时间不能为空"),new String("发布截止时间不能为空")}))}if(de.open_camera&&de.photo_count<1)throw s.b.error("请填写本场考试最大拍摄次数"),new String("请填写本场考试最大拍摄次数");if(!("no"===de.ip_limit||null!==(r=de.public_ip)&&void 0!==r&&r.length||null!==(i=de.inner_ip)&&void 0!==i&&i.length))throw s.b.error("请填写公网IP或内网IP地址"),new String("请填写内网IP地址");if(de.open_camera||de.screen_open)var o=u.a.confirm({title:"考试说明",className:"custom-modal-divider",icon:null,width:750,content:b.a.createElement("div",{className:"font16 p20"},de.open_camera&&b.a.createElement(M.a,{align:"",justify:"start",className:"mt20"},b.a.createElement(P.a,{flex:"24px"},b.a.createElement("span",{className:"iconfont icon-kaiqishexiangtou c-blue mr20 font24"})),b.a.createElement(P.a,{flex:"1"},"您已开启考试中摄像防作弊功能,",b.a.createElement("span",{className:"c-red"},"这需要调用学生用户的摄像设备"),"。Educoder平台将会严格保护所有学生的照片和视频,并承诺不在本平台以外使用。",b.a.createElement("br",null),"请确认:为严格监督考试以获得公平,您同意并和要求Educoder平台在本次考试中调用学生用户的摄像设备并获取学生的影像信息。")),de.screen_open&&b.a.createElement(M.a,{justify:"start",className:"mt20"},b.a.createElement(P.a,{flex:"24px",className:"mr20"},b.a.createElement("span",{className:"iconfont icon-kaiqifangqieping c-blue font24"})),b.a.createElement(P.a,{flex:"1"},"您已开启考试中防切屏功能,这项功能暂时仅支持谷歌、火狐浏览器。 请确保:在正式开始考试前通知全体学生,使用 ",b.a.createElement("img",{width:"26",src:Ce.g})," ",b.a.createElement("span",{className:"c-red"},"谷歌浏览器"),"或",b.a.createElement("img",{width:"26",src:Ce.p})," ",b.a.createElement("span",{className:"c-red"},"火狐浏览器"),"进行考试。")),b.a.createElement("p",{className:"ml40 mt40"},b.a.createElement(R.a,{onChange:function(e){return o.update({okButtonProps:{disabled:!e.target.checked}})}},"我已阅读"))),onOk:function(){ge(a)},okButtonProps:{disabled:!0}});else ge(a)}()}},"提交"),b.a.createElement(a.a,{onClick:function(){j(!0),me()},type:"primary",size:"large",ghost:!0,className:"ml20"},"取消")),b.a.createElement(X.a,null),b.a.createElement(nt,null))})),pt=(n("MXD1"),n("CFYs")),mt=n("9Bee"),gt=n("51gm"),vt=n.n(gt),bt={0:"单选题",1:"多选题",2:"判断题",3:"填空题",4:"主观题",5:"实训题",7:"组合题"},yt={1:"满分作答",2:"部分得分作答",3:"零分作答",4:"未批"},xt=Object(_.a)((function(e){return{exercise:e.exercise,loading:e.loading.effects}}))((function(e){var t,n,r=e.exercise,i=e.loading,a=e.dispatch,o=Object(x.i)(),s=Object(v.useState)(Object(h.a)(Object(h.a)({},o),{sort:"asc",page:1,limit:10})),l=Object(f.a)(s,2),u=l[0],d=l[1],p=(Object(x.h)(),r.statisticsList),m=Object(v.useState)({}),y=Object(f.a)(m,2),E=y[0],_=(y[1],Object(v.useState)([])),k=Object(f.a)(_,2),w=k[0],S=k[1],C=Object(v.useState)(""),A=Object(f.a)(C,2),T=(A[0],A[1],Object(v.useState)("")),D=Object(f.a)(T,2),L=(D[0],D[1],U.a.useForm()),j=Object(f.a)(L,1)[0],B=[{title:"提交率",dataIndex:"commit_percent",align:"center",render:function(e){return b.a.createElement("span",null,0===e?0:(100*e).toFixed(2),"%")}},{title:"最低分",dataIndex:"min_score",align:"center",render:function(e){return b.a.createElement("span",null,e,"分")}},{title:"最高分",dataIndex:"max_score",align:"center",render:function(e){return b.a.createElement("span",{className:"c-orange"},e,"分")}},{title:"平均分",dataIndex:"average_score",align:"center",render:function(e){return b.a.createElement("span",null,e,"分")}},{title:"不及格(得分 低于60%)",dataIndex:"fail_counts",align:"center",render:function(e){return b.a.createElement("span",null,e,"人")}},{title:"及格(得分60%~70%)",dataIndex:"pass_counts",align:"center",render:function(e){return b.a.createElement("span",null,e,"人")}},{title:"良好(得分70%~90%)",dataIndex:"good_counts",align:"center",render:function(e){return b.a.createElement("span",null,e,"人")}},{title:"优秀(得分90%~100%)",dataIndex:"best_counts",align:"center",render:function(e){return b.a.createElement("span",{className:"c-orange"},e,"人")}}],H=function(){var e=Object(c.a)(g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a({type:"exercise/getExerciseStatistics",payload:Object(h.a)({},u)});case 2:null!=(t=e.sent)&&t.exercise_counts&&S([t.exercise_counts]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(v.useEffect)((function(){H()}),[u.coursesId]),b.a.createElement(b.a.Fragment,null,b.a.createElement("section",{className:"minH500 bg-white"},b.a.createElement("aside",{className:"pt20"},b.a.createElement(U.a,{form:j,onChange:function(){var e=Object.assign({},j.getFieldValue());Object.keys(e).map((function(t){e[t].includes("all")?(delete u[t],j.setFieldsValue(Object(F.a)({},t,"all"))):(u[t]=e[t],j.setFieldsValue(Object(F.a)({},t,u[t])))})),u.page=1,u.limit=10,H()},initialValues:(t={},Object(F.a)(t,"commit_status","all"),Object(F.a)(t,"exercise_group_id","all"),Object(F.a)(t,"review","all"),t)},b.a.createElement(U.a.Item,{name:"exercise_group_id"},b.a.createElement(R.a.Group,{style:{width:"100%"}},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:"80px",className:"font14"},"分班情况:"),b.a.createElement(P.a,{flex:"80px"},b.a.createElement(R.a,{value:"all",checked:!E.course_group},"全部")),b.a.createElement(P.a,{flex:"1",className:vt.a.wrap},p.course_groups&&p.course_groups.map((function(e,t){return b.a.createElement(R.a,{value:e.exercise_group_id,key:t},e.exercise_group_name,"(",e.exercise_group_students,")")})))))))),b.a.createElement(N.a,{className:"mt30",loading:i["exercise/getExerciseStatistics"],pagination:!1,dataSource:w,columns:B}),b.a.createElement("div",{className:vt.a.title},b.a.createElement(M.a,{align:"middle",style:{height:"100%"},className:"ml5 mr5"},b.a.createElement(P.a,{flex:1,className:"font16"},"统计详情"),b.a.createElement(P.a,{className:"font16"},b.a.createElement("span",{className:"current",onClick:function(){u.sort="desc"===u.sort?"asc":"desc",console.log("xx params.sort: ",u.sort),d(Object(h.a)({},u)),H()}},b.a.createElement("span",null,"正确率"),b.a.createElement("p",{className:"edu-sorter current ".concat(u.sort)},b.a.createElement("span",{className:"iconfont icon-sanjiaoxing-up"}),b.a.createElement("span",{className:"iconfont icon-sanjiaoxing-down"})))))),b.a.createElement(Le.a,{spinning:i["exercise/getExerciseStatistics"]},b.a.createElement("div",{className:"minH200"},null==p||null===(n=p.commit_results)||void 0===n?void 0:n.map((function(e,t){var n;return b.a.createElement("aside",{key:t,className:"font14 c-black mt30"},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:1},e.ques_position,".",bt[e.ques_type]),b.a.createElement(P.a,null,"正确率 ",b.a.createElement("span",{className:"c-orange"},e.right_percent,"%"))),b.a.createElement("div",null,b.a.createElement(mt.a,{value:e.ques_title})),b.a.createElement("div",{className:"mt20",style:{display:5===e.ques_type?"none":""}},b.a.createElement(M.a,{className:"c-light-black ",gutter:[24,20]},b.a.createElement(P.a,{flex:1},"选项"),b.a.createElement(P.a,{flex:"60px",className:"tc"},"小计"),b.a.createElement(P.a,{flex:"200px"},"百分比"))),b.a.createElement(Ae.a,{style:{margin:0,marginBottom:20,display:5===e.ques_type?"none":""}}),7===(null==e?void 0:e.ques_type)&&(null==e?void 0:e.sub_exercise_questions.map((function(t,n){var r;return b.a.createElement("div",null,b.a.createElement("div",{style:{marginBottom:10,display:"flex",justifyContent:"space-between"}},b.a.createElement(P.a,null,b.a.createElement("span",null,t.ques_title)),b.a.createElement(P.a,null,"正确率 ",b.a.createElement("span",{className:"c-orange"},t.right_percent,"%"))),null==t||null===(r=t.ques_details)||void 0===r?void 0:r.map((function(t,n){return b.a.createElement(M.a,{key:n,gutter:[24,24],className:"font14 c-black"},b.a.createElement(P.a,{flex:1},b.a.createElement(M.a,{style:{alignItems:"center"}},2===e.ques_type||3===e.ques_type||4===e.ques_type?"":b.a.createElement(P.a,null,O.m[n],". "),4===e.ques_type?b.a.createElement(P.a,{flex:1,className:"ml10"},b.a.createElement(mt.a,{value:yt[t.choice_text]})):b.a.createElement(P.a,{flex:1,className:"ml10"},b.a.createElement(mt.a,{value:"wrong"===t.choice_text?"填写了错误答案":t.choice_text})))),b.a.createElement(P.a,{flex:"60px",className:"tc"},b.a.createElement("span",{className:t.choice_right_boolean&&"c-green"},t.choice_users_count||0)),b.a.createElement(P.a,{flex:"200px"},b.a.createElement(pt.a,{status:"active",strokeColor:"#2abd8b",percent:(100*t.choice_percent).toFixed(),width:200})))})),b.a.createElement(Ae.a,{style:{margin:0,marginBottom:20}}))}))),(null==e?void 0:e.ques_type)<7&&(null==e||null===(n=e.ques_details)||void 0===n?void 0:n.map((function(t,n){return 5===e.ques_type?b.a.createElement("div",{className:"mt20"},b.a.createElement(M.a,{key:n,gutter:[24,24],className:"font14 c-black"},b.a.createElement(P.a,{flex:1},t.challenge_position,".",t.challenge_name),b.a.createElement(P.a,null,"正确率 ",b.a.createElement("span",{className:"c-orange"},t.challenge_percent,"%"))),b.a.createElement("div",null,b.a.createElement(M.a,{className:"c-light-black ",gutter:[24,20]},b.a.createElement(P.a,{flex:1},"选项"),b.a.createElement(P.a,{flex:"60px",className:"tc"},"小计"),b.a.createElement(P.a,{flex:"200px"},"百分比"))),b.a.createElement(Ae.a,{style:{margin:0,marginBottom:20}}),null==t?void 0:t.challenge_details.map((function(e){return b.a.createElement(M.a,{key:n,gutter:[24,24],className:"font14 c-black"},b.a.createElement(P.a,{flex:1},b.a.createElement(M.a,null,b.a.createElement(P.a,{flex:1,className:"ml10"},b.a.createElement(mt.a,{value:yt[e.choice_text]})))),b.a.createElement(P.a,{flex:"60px",className:"tc"},b.a.createElement("span",{className:e.choice_right_boolean&&"c-green"},e.choice_users_count||0)),b.a.createElement(P.a,{flex:"200px"},b.a.createElement(pt.a,{status:"active",strokeColor:"#2abd8b",percent:(100*e.choice_percent).toFixed(),width:200})))})),b.a.createElement(M.a,{className:"",gutter:[24,20]},b.a.createElement(P.a,{className:"ml10",flex:1},"有效填写量"),b.a.createElement(P.a,{flex:"60px",className:"tc"},e.effictive_counts),b.a.createElement(P.a,{flex:"200px"})),b.a.createElement(Ae.a,{style:{margin:0,marginBottom:20}})):b.a.createElement(M.a,{key:n,gutter:[24,24],className:"font14 c-black"},b.a.createElement(P.a,{flex:1},b.a.createElement(M.a,null,2===e.ques_type||3===e.ques_type||4===e.ques_type?"":b.a.createElement(P.a,null,O.m[n],". "),4===e.ques_type?b.a.createElement(P.a,{flex:1,className:"ml10"},b.a.createElement(mt.a,{value:yt[t.choice_text]})):b.a.createElement(P.a,{flex:1,className:"ml10"},b.a.createElement(mt.a,{value:"wrong"===t.choice_text?"填写了错误答案":t.choice_text})))),b.a.createElement(P.a,{flex:"60px",className:"tc"},b.a.createElement("span",{className:t.choice_right_boolean&&"c-green"},t.choice_users_count||0)),b.a.createElement(P.a,{flex:"200px"},b.a.createElement(pt.a,{status:"active",strokeColor:"#2abd8b",percent:(100*t.choice_percent).toFixed(),width:200})))}))),b.a.createElement(M.a,{style:{display:5===e.ques_type?"none":""},className:"",gutter:[24,20]},b.a.createElement(P.a,{className:2===e.ques_type||3===e.ques_type||4===e.ques_type?"ml10":"",flex:1},"有效填写量"),b.a.createElement(P.a,{flex:"60px",className:"tc"},e.effictive_counts),b.a.createElement(P.a,{flex:"200px"})))}))))),b.a.createElement("div",{className:"tc mt30 mb50"},b.a.createElement(I.a,{hideOnSinglePage:!1,total:null==p?void 0:p.questions_count,current:u.page||1,pageSize:u.limit,onChange:function(e,t){u.page=e,u.limit=t,H()}})))})),Et=n("cVA7"),_t=n.n(Et),kt={0:"单选题",1:"多选题",2:"判断题",3:"填空题",4:"简答题",5:"实训题",6:"编程题",7:"组合题"},wt=Object(_.a)((function(e){return{exercise:e.exercise,loading:e.loading.effects}}))((function(e){var t,n=e.exercise,r=e.loading,i=e.dispatch,a=Object(x.i)(),o=(Object(x.h)(),n.statisticsList),s=Object(v.useState)({}),l=Object(f.a)(s,2),u=(l[0],l[1],Object(v.useState)([])),d=Object(f.a)(u,2),p=d[0],m=d[1],y=Object(v.useState)(""),E=Object(f.a)(y,2),_=(E[0],E[1],Object(v.useState)("")),k=Object(f.a)(_,2),w=(k[0],k[1],Object(v.useState)({})),S=Object(f.a)(w,2),C=(S[0],S[1],U.a.useForm());Object(f.a)(C,1)[0];a.sort="asc";var O=function(e){return{title:{text:"『 学生正确率分布图 』",left:"center"},tooltip:{trigger:"item",formatter:"{b} : {c} 人"},legend:{bottom:0,icon:"circle",left:"center",itemWidth:6,itemHeight:6,data:["100%","90%-100%","70%-90%","60%-70%","60%以下"].reverse()},series:[{type:"pie",radius:"55%",minAngle:15,center:["50%","50%"],selectedMode:"single",label:{show:!0,position:"outer",normal:{formatter:"{b} \n {c}人",color:"#5c5c5c",lineHeight:20}},labelLine:{normal:{length:20,length2:20,lineStyle:{color:"rgba(0,0,0,.45)"}}},data:[{value:e.details[0].full_count,name:"100%"},{value:e.details[0].best_count,name:"90%-100%"},{value:e.details[0].good_count,name:"70%-90%"},{value:e.details[0].pass_count,name:"60%-70%"},{value:e.details[0].fails_count,name:"60%以下"}],itemStyle:{emphasis:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},normal:{color:function(e){return["#99B8FB","#80E0B9","#8190AA","#F7C739","#EB7E65"][e.dataIndex]}}},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}},A=[{title:"提交率",dataIndex:"commit_percent",render:function(e){return b.a.createElement("span",null,100*e,"%")}},{title:"最低分",dataIndex:"min_score",render:function(e){return b.a.createElement("span",null,e,"分")}},{title:"最高分",dataIndex:"max_score",render:function(e){return b.a.createElement("span",{className:"c-orange"},e,"分")}},{title:"平均分",dataIndex:"average_score",render:function(e){return b.a.createElement("span",null,e,"分")}},{title:"不及格(得分 低于60%)",dataIndex:"fail_counts",render:function(e){return b.a.createElement("span",null,e,"人")}},{title:"及格(得分60%~70%)",dataIndex:"pass_counts",render:function(e){return b.a.createElement("span",null,e,"人")}},{title:"良好(得分70%~90%)",dataIndex:"good_counts",render:function(e){return b.a.createElement("span",null,e,"人")}},{title:"优秀(得分90%~100%)",dataIndex:"best_counts",render:function(e){return b.a.createElement("span",{className:"c-orange"},e,"人")}}],T=function(){var e=Object(c.a)(g.a.mark((function e(){var t;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/getExerciseStatistics",payload:Object(h.a)({},a)});case 2:null!=(t=e.sent)&&t.exercise_counts&&m([t.exercise_counts]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(v.useEffect)((function(){T()}),[a.coursesId]),b.a.createElement("section",{className:"minH500 ",style:{padding:0}},b.a.createElement("aside",{className:"bg-white inline-block w100 th-bg-white"},b.a.createElement(N.a,{className:"mt10 bg-white",loading:r["exercise/getExerciseStatistics"],pagination:!1,dataSource:p,columns:A})),b.a.createElement("aside",{className:"mt20"},b.a.createElement("span",{className:"bold c-black font16 ml20"},"已交卷学生答题详情")),b.a.createElement("aside",null,null==o||null===(t=o.commit_results)||void 0===t?void 0:t.map((function(e,t){return b.a.createElement("div",{key:t,className:"bg-white pl20 pt20 pr20 pb20 mt20"},b.a.createElement("div",{style:{fontSize:14,color:"#0152d9",fontWeight:500}},t+1,"、",kt[e.question_type],b.a.createElement("span",{style:{color:"#999",paddingLeft:10}},"(共",e.question_count,"小题,",e.question_score,"分)"),b.a.createElement("span",{style:{color:"#000",float:"right"}},"全班正确率:",100*e.right_percent,"%")),b.a.createElement(_t.a,{option:O(e),style:{height:370},opts:{renderer:"svg"}}))}))))})),St=n("tf39"),Ct=n.n(St);t.default=Object(_.a)((function(e){var t=e.exercise,n=e.loading,r=e.user;return{exercise:t,globalSetting:e.globalSetting,user:r,loading:n.effects}}))((function(e){var t,n,m,T,I,D,L,R,N,j,M,P,B=e.exercise,F=(e.globalSetting,e.loading,e.dispatch),U=e.user,H=(e.match,Object(p.a)(e,["exercise","globalSetting","loading","dispatch","user","match"])),z=Object(x.i)(),V=Object(x.h)(),W=Object(v.useState)([]),K=Object(f.a)(W,2),q=(K[0],K[1],B.exerciseList),Y=B.commonHeader,Q=B.checkDomain,J=Object(v.useState)(V.query.tabs||0),X=Object(f.a)(J,2),Z=X[0],ee=X[1],te=Object(v.useState)(G()(new Date).valueOf()),ne=Object(f.a)(te,2),ie=ne[0],ae=ne[1],oe=Object(v.useState)(),se=Object(f.a)(oe,2),le=se[0],ce=se[1],ue=U.userInfo;Object(x.g)();z.category=V.query.category_id;var de=!Q||Q&&(null==ue||null===(t=ue.course)||void 0===t?void 0:t.course_identity)<3;Object(v.useEffect)((function(){F({type:"exercise/getCommonHeader",payload:Object(h.a)({},z)})}),[z.coursesId]);var he=function(){var e;Object(O.W)({inner_ip:Y.inner_ip,public_ip:Y.public_ip,ip_limit:Y.ip_limit,ip_bind:Y.ip_bind,open_camera:Y.open_camera,exercise_tips:[Y.open_camera?"已开启防作弊":""],exerciseId:Y.id,screen_open:Y.screen_open,screen_num:Y.screen_num,coursesId:z.coursesId,login:ue.login,history:H.history,identity_verify:Y.identity_verify,current_status:null==Y||null===(e=Y.user_permission)||void 0===e?void 0:e.current_status,open_phone_video_recording:null==Y?void 0:Y.open_phone_video_recording})},fe=function(){F({type:"exercise/getCommonHeader",payload:Object(h.a)({},z)});var e={0:function(){F({type:"exercise/getExerciseList",payload:Object(h.a)({},z)})},3:function(){F({type:"exercise/getWorkSetting",payload:Object(h.a)({},z)})}};e[Z]&&e[Z]()};var me=[{name:"答题列表",id:0,compontent:b.a.createElement(re,{getparams:function(e){ce(Object(h.a)({},e))},checkDomainAuthority:de})},{name:"试卷预览",id:2,compontent:b.a.createElement(De,{activeTabs:Z})},{name:"统计结果",id:1,compontent:b.a.createElement(xt,null)},{name:"代码查重",id:4,compontent:b.a.createElement(Oe,{key:ie})},{name:"规则设置",id:3,compontent:b.a.createElement(ft,null)},{name:"人脸审核",id:5,compontent:b.a.createElement(pe,null)},{name:"摄像监控",id:6,compontent:b.a.createElement(xe,null)}].filter((function(e){return null!=Y&&Y.is_random&&("统计结果"===e.name&&(e.compontent=b.a.createElement(wt,null)),"试卷预览"===e.name&&(e.compontent=b.a.createElement(Ve.default,null))),!0})).filter((function(e){return!!(Object($.k)()&&null!=Y&&Y.assistant_auth||Object($.c)())||(null!=Y&&Y.show_statistic&&3===(null==Y?void 0:Y.exercise_status)?"试卷预览"!==e.name:"答题列表"===e.name||"规则设置"===e.name)})).filter((function(e){return!(Object($.s)()||1===Y.exercise_status||!Y.exist_program)||"代码查重"!==e.name})).filter((function(e){return!!Y.identity_verify||"人脸审核"!==e.name})).filter((function(e){return!!Y.open_phone_video_recording||"摄像监控"!==e.name})).filter((function(e){return!(Object(O.I)()&&!Object($.o)())||"试卷预览"!==e.name&&"统计结果"!==e.name})).filter((function(e){return!!de||"统计结果"!==e.name&&"试卷预览"!==e.name&&"规则设置"!==e.name})).filter((function(e){return!!e}));console.log(me,"tabsArr"),(null==Y?void 0:Y.exercise_status)&&1===(null==Y?void 0:Y.exercise_status)&&me.splice.apply(me,[0,1].concat(Object(d.a)(me.splice(1,1,me[0])))),Object(v.useEffect)((function(){(null==Y?void 0:Y.exercise_status)&&1===(null==Y?void 0:Y.exercise_status)&&ee("2")}),[null==Y?void 0:Y.exercise_status]);var ge="YYYY-MM-DD",ve=G()("2020-11-15",ge),be=function(){return u.a.info({title:"题库改版告知",content:b.a.createElement(b.a.Fragment,null,"EduCoder已升级题库功能,所有试题均需匹配知识点。 当前试卷所涉及试题均未匹配知识点,无法随机抽取,已不能有效使用。请在试卷库重新组卷后使用。 由此带来的不便,敬请谅解!")})},ye=function(){var e=Object(c.a)(g.a.mark((function e(t){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("/api/courses/".concat(null==z?void 0:z.coursesId,"/exercises/exercise_code_repeat.json"),{method:"post",body:{group_ids:t,id:null==z?void 0:z.categoryId}});case 2:if(0!==(n=e.sent).status){e.next=8;break}return ee(4),ae(G()(new Date).valueOf()),F({type:"exercise/setActionTabs",payload:{}}),e.abrupt("return");case 8:n.status<-2&&s.b.error(null==n?void 0:n.message);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object($.h)()?b.a.createElement("section",{className:Ct.a.bg},b.a.createElement("div",{className:"edu-container"},ue.username&&b.a.createElement("section",{className:"animated fadeIn"},b.a.createElement("aside",{className:"mt10"},b.a.createElement(o.a,{separator:">"},b.a.createElement(o.a.Item,null,b.a.createElement(E.a,{to:"/classrooms/".concat(z.coursesId,"/exercise")},null==U||null===(n=U.userInfo)||void 0===n||null===(m=n.course)||void 0===m?void 0:m.course_name)),b.a.createElement(o.a.Item,null,b.a.createElement(E.a,{to:"/classrooms/".concat(z.coursesId,"/exercise")},"在线考试")),b.a.createElement(o.a.Item,null,"试卷详情"))),b.a.createElement("aside",{className:[Ct.a.title,"mt20"].join(" ")},b.a.createElement(E.a,{to:"/classrooms/".concat(z.coursesId,"/exercise")},b.a.createElement(k.a,{className:"font16 c-black"})),Object(O.y)(null==Y?void 0:Y.exercise_status),b.a.createElement("strong",{className:"font20 ml5"},null==Y?void 0:Y.exercise_name))),b.a.createElement("aside",{className:"mt30 relative"},b.a.createElement("div",{className:Ct.a.export},!Object($.s)()&&de&&Y.exercise_status>1&&Y.exist_program&&b.a.createElement(a.a,{onClick:function(e){e.preventDefault(),F({type:"exercise/setActionTabs",payload:{key:"代码查重",params:z}})}},b.a.createElement("span",{className:"iconfont icon-daimachazhong font14 mr5"}),"代码查重"),Object($.c)()&&de&&(null==Y||null===(T=Y.user_permission)||void 0===T?void 0:T.user_commit_counts)>0&&2===(null==Y?void 0:Y.exercise_status)&&b.a.createElement(a.a,{onClick:function(e){e.preventDefault(),F({type:"exercise/setActionTabs",payload:{key:"打回重做",params:z}})}},b.a.createElement("span",{className:"iconfont icon-dahuizhongzuo3x font14 mr5"}),"打回重做"),Object($.c)()&&de&&(null==Y||null===(I=Y.user_permission)||void 0===I?void 0:I.exercise_unpublish_count)>0&&b.a.createElement(a.a,{onClick:function(e){e.preventDefault();var t=G()(null==Y?void 0:Y.created_at,ge);G()(ve).diff(G()(t),"days")>0&&null!=Y&&Y.is_random?be():F({type:"exercise/setActionTabs",payload:{key:"批量发布",selectArrs:[z.categoryId],params:z,disabled:1!==(null==Y?void 0:Y.exercise_status),type:2,cb:fe}})}},b.a.createElement("span",{className:"iconfont icon-fabuzhiwei font14 mr5"}),"发布考试"),Object($.c)()&&de&&Y.can_edit&&(null==Y||null===(D=Y.user_permission)||void 0===D?void 0:D.exercise_publish_count)>0&&b.a.createElement(a.a,{onClick:function(e){e.preventDefault(),F({type:"exercise/setActionTabs",payload:{key:"批量结束",selectArrs:[z.categoryId],params:z,cb:fe}})}},b.a.createElement("span",{className:"iconfont icon-lijijiezhi mr5 font14"}),"结束考试"),Object($.s)()&&2===(null==Y||null===(L=Y.user_permission)||void 0===L?void 0:L.current_status)&&Y.exercise_status>1&&b.a.createElement(a.a,{style:{color:(null==q||null===(R=q.exercise_types)||void 0===R?void 0:R.is_redo)&&"red"},onClick:he},b.a.createElement("span",{className:"iconfont icon-bianjizuoye mr5 font14"}),null!=q&&null!==(N=q.exercise_types)&&void 0!==N&&N.is_redo?"重新考试":"开始考试"),Object($.s)()&&0===(null==Y||null===(j=Y.user_permission)||void 0===j?void 0:j.current_status)&&Y.exercise_status>1&&b.a.createElement(a.a,{onClick:he},b.a.createElement("span",{className:"iconfont icon-bianjizuoye mr5 font14"}),"继续考试"),Object($.c)()&&de&&(Object($.k)()&&(null==Y?void 0:Y.assistant_auth)||!Object($.k)())&&b.a.createElement(a.a,{onClick:function(){var e=G()(null==Y?void 0:Y.created_at,ge);G()(ve).diff(G()(e),"days")>0&&null!=Y&&Y.is_random?be():_.d.push(null!=Y&&Y.is_random?"/classrooms/".concat(z.coursesId,"/exercise/").concat(z.categoryId,"/random/edit?random=true"):"/classrooms/".concat(z.coursesId,"/exercise/").concat(z.categoryId,"/edit?random=false"))}},b.a.createElement("span",{className:"iconfont icon-bianjizuoye mr5 font14"}),"编辑试卷"),Object($.c)()&&de&&b.a.createElement(i.a,{overlay:function(){return b.a.createElement(l.a,{onClick:function(){var e=Object(c.a)(g.a.mark((function e(t){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.key,e.next="1"===e.t0?3:8;break;case 3:return e.next=5,Object(C.n)(Object(h.a)(Object(h.a)({},z),le));case 5:return 0===e.sent.status&&Object(A.i)(Object(h.a)(Object(h.a)({},z),le)),e.abrupt("break",8);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},b.a.createElement(l.a.Item,{key:"1"},"学生成绩"),b.a.createElement(l.a.Item,{key:"2"},b.a.createElement("a",{target:"_blank",href:"/classrooms/".concat(z.coursesId,"/exercise/").concat(z.categoryId,"/export_blank")},"导出试卷")),b.a.createElement(l.a.Item,{key:"3"},b.a.createElement(E.a,{to:"/classrooms/".concat(z.coursesId,"/exportlist/exercise_score")},"历史导出")))}},b.a.createElement(a.a,null,b.a.createElement(w.a,null),"导出",b.a.createElement(S.a,null)))),b.a.createElement(r.a,{activeKey:String(Z),className:Ct.a.tabs,onChange:function(e){var t=G()(null==Y?void 0:Y.created_at,ge);G()(ve).diff(G()(t),"days")>0&&3===parseInt(e)&&null!=Y&&Y.is_random?be():ee(e)}},me.map((function(e,t){return b.a.createElement(r.a.TabPane,{tab:e.name,key:e.id})}))),b.a.createElement("section",{className:null!=Y&&Y.is_random&&"2"===Z?"":"pl25 pr25 bg-white"},null===(M=me.filter((function(e){return e.id==Z})))||void 0===M||null===(P=M[0])||void 0===P?void 0:P.compontent))),b.a.createElement(ze.a,null),b.a.createElement(qe,{onOk:ye}),b.a.createElement(Ye.a,null),b.a.createElement(Ge,{cb:function(){F({type:"exercise/getExerciseList",payload:Object(h.a)({},z)})}})):""}))},JWDV: +/*!****************************************************!*\ + !*** ./src/assets/images/icons/charpter-white.svg ***! + \****************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/charpter-white.5fa14f93.svg"},JeFH: +/*!********************************************!*\ + !*** ./src/assets/images/icons/blibli.png ***! + \********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAwCAYAAAD9wT87AAAe2UlEQVR4XtVcB5QUVbr+blV1T+ieGWaYBAwgOSgooJLjENeA6a2KCVfZNbum3VXXsG9VdFfc1TXtGlfXLCKgEiRnUAHJWRzAyTl3V9V957vV1dPTM+M4Hn2Pd8/xIHRV9f3vn77/+/9qgVaWlHIggHMB+AA8K4TIbe2ek/FzKWUmgLGw7THQtLlCiBUn4z6j9ySa26SUMg3A+ZDyaljBMTC87mXrAUwSQtT+fxBOSqmbpjnaMIyrYJnToRvtQ/sOAJgihFh1ssvRSEFSysEAroJlXQZdp8VhXUEAS07UYGavBPSIQz10vacQ4vjJLJiUMgPAhZByJoQYyr0erZFYmFOFZK+GK7szGOB3Qoi/nsxycG9KQVLKKyDltbDMbBge5NYD87+twvxjNdhbZiIoJZZMysRpPqsShreXECL/ZBRMSjkAwM2wzIugG2k2gOW59fjgaDU2FNbjRI2Fm/r48eigdtz+TUKIF05GOSL3JKSUDwN4SALYXBRQwqzIrUNBvQ1DAIYm4BHAJxMz0TPOLoJu9BFClJxsglVVVWXGx8d/IYTIOl4rsSCnGvNzarCvIghLAl5NoN6WuKVPAu4dkMjtXyuEeP1kk6NJDpJSHgTQ8+Ht5Xj5UBWoqBhNQAsFP/6dwi2alIlTYq1caEY/IUT5zyGYlLIvgD4AugLIgm0zF3qgaccDgcCbMTExu1v6Xinl6YDc/lWxiWvWF6E04BiYxxUEQK0lcUe/BNx9qlLQFUKIt38mOVIAnA6gG4AugM104Qe0ajo1gA+FEHTwVhc96CoAbzy9txJP7KpAPKWKWFRQrCawZEoHZHnN4yEFVbX65DZeIKW8DVI+DiHimrtVSnlCCDFUCHGihc+TYJl7jwf1DlOW5KHWltCiLqSCfndqIm7vlwDLsi41DOP9Nm6z1cullL0BLATAP1tavxZCvNTqw5iDpJSnwrZ2rC60tKvXFTayOCc/AXGGwNIpHdDRCOZA9/QXQtASfrIlpdQg5TYpxMDXDlVhf7mJ/DoLZQEbNabEnf0TMbVTLL+PCHJZy15kL5EQk6ctK8De8mATWaige09LxC19lYIuMQxj7k8mROhBUsrbAfydOW/pd3XIr7VQXG+jImjjtHYePHlmMmDb7wpdv/yHfDcV5Idt7c0NalmTl+Sh2pTh8OYqiF5FBXXwWEeh6acKIWp+yMPbco2U9icS4pyJSwuwsywQDrM1lsQDA5JwW78EPu4iIcS8lhUkHwfw+1s3l2LesRrE6o2jARV032mJuLlv689qy94bRRwpL2YIe3F/Fe7bVqYiEqMs82CvBAOrpmQA0vpUaAZry1ZXCMXZS22ISVM/L8CBSlPFbnfRg/53FCQfAXD/7VtKMTen4XB5qDf38eO+AUm0+usMw3j1exR0GYB3nttXicd2VSDu/0ZB/WCZuzaU2NqMNYUKZHFRQR3jdKyclgGvZa0XhjGqVe2EYbZlzYGm3fmbjSX47EQtYiIEaxTiPNa3IQ/6SUOc46nyUgDvRh8uFXRlNx+eGKKg8d1CiDktCRYIBM7wGPrW5flBce36IgVuIldkiANwsRDiox9ySG25RkqZEIpInRiRGKKFAGwJtPNqWD4tE8nC3AXNOEMIYbX2bLcOugbA63N2V+CpvZWNLK8RSPCYx6ErFPdzgIRBsK2tn+ebuG5Dw+HWWRLnZsXhxWEERnhMCHH/93hQMqzggaP1RuovPs9TsDpSRZEgAcAvhRAftHZAP+ZzadurLCHGTl5agMNVTkRyz3HxlA7o7LVyoOk/KJe7ChoKyE0Lj9fhpk0ljT0oBLs/m9QBp8SYuSEF/eQwW0oZDyuYc7BWb3/usjyY0qmiA7bEqLQYvD0mlWf1ohDixu9RkICUGwJCDJu4OB/HaixERrn/RZj9NIDbZq4vxvLcOnWeVBBR5fzsTPT3WaXQPb2FEEWtGYBSUHV1dYd4r+fA7hrNf8HyfBCgu5bHB//UhaqUkoVIOoBhAPrRBmzbLtSAWyul1mnSkjzk19nqcIO2xMBkLxZOSCP6eU/oOvNMRI6UQgjBbaolpXwZwHUz1hRhXWF9ozBHBf2UhaqUMgYA+T3Wb8Nh2+2haWUASDBf/PDX5XjpYFU4ItHo3hmThuFJMgiPt4sQIu/7ZOFnrgcZsO3tFdBOzV6Up2BhZKFKzX+cnYFTfXZFdV2gt9/v/1FUjySdBDkLltUVUqbD8BjRFsRYfeGqQmwvCSiYTKG6+XR8PjkDBuQ2CLEItt0NQrSDgAe2TIG0bWh6IYTYzLINwB/u31qG149UNwrXVND1Pf340xlJ/NofTfXU19f39Xq9s2Gb/WHLTjA8ityLXm8crsa928rCe6i3JF4a3h5TM3UJ3fMEbDsTQhB3xwOaH9KKhRAVEPpRAK8KIdaEQ7S07XkQ4oJzlxcqmBtZgfPQPhiXjiGJdn2IizvWmmtGfy6lZFW9RwKxJC4Lak10idPw6M5yFNbb+GXXeFzcNV7ddsvmEnx8rFbBZKKf9FgNi7LTkRLTUHrSy/k3opWgDSRqzt8BnABkp1cPVeOB7eVNFBQBOO4RQjzZVjlCXsrcdUlREDhaaSIzVmDZd3X49EQtuvkN/On0JFU7rs6rw9Xri8NnSQN5cnA7XO6QtY0WQ0CpBcTrjoUBKCAb0aAgKWfT8m7cVIKFx53DcRfDzH9Gp2F0CiQML0HC/rYKpmgcK7hnY4kUV68rUjH53yPb456vSrG33MRV3X145uxk9di/7KrA0/scsELj8BsCn2WnI8unozJo48ZNpThYaeLBgYnYWFiPuTm1qgh8a0wqvJBFsILJK4ulPnNdUSNDI+C4oHMcnh2qAMd/CyEeaqscIQV9CuAXF64sxLqCekUd8bQe31WBjDgNyyZloFO8joMVJs5fUYiAdMAKEd0fByTiJqcOwz8PVOH1w1U4MyUGl54Shxs3l6qQPOesZIzLYItHnBGpoGvpVpGH426ervmv4e0xrRNDrhgshNjWVsEU/LTMfTlBvePUJXmqsv7nsBS8eaQaq/LrMSkzFm+Odto17x2twV1fliojoSKJguaPT0PfJI8SctLnBYoE/duZyYoxeOVQNXonGlg5NQMeKbfBtjKP1GkdiOSCIbDB51KOiR1i8dpI9T1/F0Lc0VY5Qgr6C4B7fr2xRBXE/9UlHqPSY3DP1jL4DIF549JwajuPYkKmLisI51N6ENn0+weoEKsMcfaucozJiFVsyTXrihXyZBg8t5MHEPrASAWNAbD6g6M1uCN0OO7m+WAexi9PUSFoLGPjjxLMNldYQh9PtmBPWQCzB7XDzrIg3jlag8EpHiwYn6YKu/UF9bhibTGMUMyiF707JhVnp3ph2sD0lYX4orgejw9uh5wqCy8erELfRAMrpmRAk3I5YPtroA9lPs0LgQ3ul4hwWGoM3h+bSsDxutB1GmWbl5TySgBv/m1PpTrg4WkxuKG3Hzdsckj+N0elYkxGjArPF6wsxI5SJ2XwHGd08+GvTk2Hlw86bMPZqTGKgmI4DNAZRrTHtEwD0IwBkQrqBjO4f0s5PJeuLmwCTx8+PQmzevn53POFECQD27yklH8D8NvrNhRj/rFaxSxz46y9uvsNLMpOQ5JXw+FKE+etKAzXMTzYV4a3x6SOTnS+bE0RluXW4bFB7VBYZ+Mf+yrRN8nAyikZENL6BEJUAtrl01cUYnvocHgfQzUtm+ESkB8LoV3YZiEcpDgYtvXVkrwgfrWhGF19BmYPSsJvNpWi0rTxzFnJ4XxKL1sUKv7pwdM6xeFfw1WIxYff1uCWLaUYlOzBg6cn4ep1xUqJLzUo6LRIBfnJBp8IGllTluaiNlQB80G86bd9E3DPaYqmv0YI8caPFGwmgNfo2k/srsDlp8Qr6/n91jKkxmjq4Dr79CahgbnjqQYPBhmPD3Nq8OczklAdlHhyTwX6JXlCCpLzIcQOAA+wplsQkU9p0V18uvI0XVqrhWaM+5FyJMMyD3xTr6VOXZoHQwhVSN/5ZamqvR6MyDN/+roc/wpB7UYeDCgjo1JoNGwiXrWuSHGhLSlIwLLWB3R9+ITF+ar76OIEKmhmD5/bibxTCEFPaPOSUp4FaW9ZeCKAK9cWIjszFtf38mPWphIFBOaOS1PJngfJ5LorhCb5/Q8NTMKveysPxj1fluLFA1UqxFF5j+wsR/8kD9ZOy2SIWwCHwnl99s4KPLu/gRlhqGwf49AticLeAaExn7ZKt0QLKqXkWa0L6vqIMZ/l43BVEO+NTsXsXRXYURpU3OEDpzt55pWDVXjwawdN0oO5zwUT0lTk2FJUjwtWFqFPoqFY7l+uLkKVaePVkak4p0NUiOPDpGW9BU2bcdGqQnxV3AC1eQjnd47D8w76mS2EuK/N2nFCQxos8+CROi3pmT3lGJcRi3GZMThQEYTf0NAtwQjDYoaOz79zqnAq6Na+CfiD48F4dl8l3v6mBvcPSFR55aUDVciM1/HyiPZU0GIIQVZ7Fa8hSnRJUwIO/j97W508P5xuaU5WaVkvQdOuZzTgc6/p4VP1I/dDUjQjTle3LT5Ri1kbHXaGhpcVr6tQ7vdoCuUxb9Eo7+yfgPu3laOo3sJ9A5MwJt3DQqIBxSkFSevPgPbHyDqE/67olvQYvD1a0S0vCyFm/UgFMe0vAHBOa/f/cVsZXjvsFJqKMO3uwxODneRKS9SEaJQnSeqSlARAmuVvsM0ja4tsjZ7q1nSN6Ra7HLpBuoX1RpuXlJKMxluhcqzF+1lwX7LaKSu4Rw6tUEHpcboqIUwpm5C6vFYA3wEYFD3Vo6B2dGhwkqsXn2Wn8VsWCE2b3maJQjdIy3oWmnbzoUoTu0sD4J8Mp2VBG+MzY1U9xPX8/ipVxFJBTK6/6BSHf4aSKwWl0tgrMm2pckCiV7iCPsueECwz51Cd3v6cz3PDvB6fy+v/MyYNo5Jhw/D2FUKw5d/mFQgEzvZ4PBtKA7bOsMYocLTKVF6UYGi4f2CiYq+P11j4xfICVAUdVpvjBJ9MSEP3BIdEoWyUg+iNy+fRVLiHo6Ah0QrKZu76z5Fqlbjd0MB7WXitmJoBr5QbhaaNaLNEroKkZKv3+ivWOkhMF05Di0ZwVmqMgtr8+8c5DsJhLUQPJpR9zyFMwVKAwIAWqLwJAt0SdLwxJg0+2NugaUMh7a8qpDYgmrpiuH5uaAqmdyYiFMOEQw+1eUkpR3IqjWiUYcqlxnig3Ne8cakYmhajCutpywuVEfIafv7h2FSckeLF8WoLszYWozhgKzaEi2TJY4OSMaFDDEzTHButIDabdq8sssQ16xoof35hokdg2bQOSBXBQ8Lw9mqzRA0Kuo1h6IHtZSAdE2kEGaR0JqarMECGYMba4jBhyuRKwpR10ltHqnHXV2WID6EY7o/UysppHZCpBQ/C8PRh11IKfdoUNiErzHBNRc8jFUNwYprmVI/Hs+THyCKl7MjWxs4qzXfhinwVwtzD5HfMGZKMy7rFK2WRcXDhPg3qjVGpGJsRg9waC5OXFaAiKMPhmt7E8uFXPX1sUJ4TraBUwsd9NVry+cvyQHjDC9xqfmF2Jnr7ZAU0/WYyF5ZlBXVdZ+uBtHkhgJLWUJGUcjyAFe+G2ILIBO4RAgsmpKJ3ogeHKkyct7IAAduxSCZXwvAEj8CSUOL1hhTkTh4tntwBXY3AMeGN6SKlfB7AjVeuLcaagrpwnHc6tAm4zxm9eoZgIiQiaT1WmoW5ublFHTt2/N62vpTSoJdWSW1g9uI8VY+5XsTvuK1vAn4fAjXXbyjGkhDgoQeTaiLlRDZl2rJCfFcbgZhNiQcGJuGGPgqxXhKtIC9sc0exbfSZuCgX5cGG+QTGblbgrFuaLCtILZZBEzmAthuatgXAJgC7opt7UsosWOb+rytF/EUr8xs11BTnNyoVozNiUFRnYeryQpTUO77PeM7kSnS0pSigilXG9EgD+nRSB/SMDeZB92ax+0p67O4vy/Du0eowt8jDu7RrPJ46y+H9Gi9m7WA9OH+uaQcgxVZo2kYAXzU3TSSl/A/Ht/5rdRE2FzW0NqiECzvH4x9Dne+4f1sZXncBjynxyKAkXNvTr8IzywnSVW5rnB70+9DkkRoNa7LFEB2TvSQfR6ut8HwCFXR1D78q9MgxsQ3AhMeDIyLJ8nnQJUFHsoMunWWrIRNO4XDQYzWngVQNIe2vK0P5gUx2ZL311JBkXNotXiXPc1YUKhDBz0kiMrn2SDAUPD1vRUGYZ6MH8WvnT8xEvzirCIansxr9Bd5+anclntxbEQ6HlKN/Oy+u6BavWHQeJnOyz9CQGqujY7yBLgkecIgozJ1bZiU0fSOEmA/gUyHEtxRPSnkngDkPbCvHq4cb+j7MmUNDlBIP+B97SQk5I200kDv7JeAuZzYPl68pwvqIvlXU5zObKsiy3oCmXXXxKvJdgUYQkBqnYoii3EUrpiAMN0keTYUi4nomyKEZcch05+5tcz804zXCdABPsKl2yaoibClusDxu7u7+ibijv8P2snDbVFQfhslMroNSvMirtVTiLQ84YcWN//MmZGCAzy6F4ekCgHPmq9/5pgZ3R9RCym4kFI0ULQc/Y5jlQTIf9kr04Mz2XgzPiMOApJDlUVm6MS8YDD7r8XiINFa/d7RGuOQun+H2sBiSmRvfP1qjWAYCnqiiHzdvLlG0l9s9iKr5rm+qIOlM1xCZfBLVdmgmJoT/ycX5lnSUyAezah+c4sW5WfGY2iUOPgVx7G+gaXyFZURkrcMHcXNXdPPhLyEy8abNJVgQ2jyN4/WR7RUUJ2SdtrxAQVh6l2svH43PwOl+uxyGh72nNNjmvpWFtrhmXWGTWqM1WYhc6W18NsEIPZdM+PSufvTya4AVtKF7lsK2sr8utz00aNdQ3AERNySvyqvDNaG+ED32vKw4vODMWOCh0ESvm4sV493bj/sHKibixuYUdAOAF6Lbtc0JFIlcmvvchcG8jo2sy06Jx8zeCfCFYke0dTOsTciMxb9HOW0HjiO/dMgJHRTs6RAJGc0Su8Yxd3w6BiXKSuieHirxm8HDe2q0xOlRbfwmYT0CgbUkJ5VFKEwyl3u8oU8CBrRzapnSehtTlxegIMScu6Dq4/FpiiPcWRoE2RlmUxrayLQYvBMqGUj0so8UqaAbeoWpojuaU9D5DOccvPtzqFBsbtOM26xhyoO2StbMEU0eFnEjvYqxmXCZMHdkeoxqa7PKdhc3f1o7L+YTTgsWq5V4dKez+Wg+jiTjyvw6lQe5qDR2fc9MlNUwPD0BFMO29hVYeveJi3OV10VNYYW/l8+vNKkAp6qPGqdrJD4Pn8aSYAjF7nOgkgn+stVF2BgBFKhQth0IeFjvqGLVlGCEcUqGdAX93/3GKRkiFeS25W3bvrc5BZ0NyM3zcupw65aSJtOZ7mEwRr8wNEX1c5Z8V4ttJQGF+qIH1qOVSyUxIb86IgUDkr3IXpoftjx3uI+MBS2VdPxvv2iI3bf2ScAfHHiMO74oxQffNgw48t73xqbj7CS7FoaX7zB9J01zY0DXh41flN8IykbuiV5Lqp9Tn5wJZIf0WLXDn5IiakmpjA40mut6+vDIoHaNvJ33Rno8cyVzZm6t81wW/Qx/CR5NFevkHd0ZPj7zVz39iqlnBGxOQd3ZF9pQCmPGmoIw/IsUyn0Dgl/S1e+4OamOJSfqlJD7Kkz1by1ZIjcxOdTZvDTC8sLt7YnpCmxExu7oZtdjO8rx3IHGEzPvjk3DsCRZF1LQCWnbH0GIC5ubs3DlIay9JwKYENZTSQuP1SqPYK0SPQDp3suQReiwYnK6Ipdd5oOfc78kc2/qk6A8k/0twmlGHRofzy4zTse24gAuWeNEESqD913bw1E6gEeaU1AKK+QDofk0WmZzoYskH2sWkqiRix7yRVFAdQpzqhvPpbnXEUGNSY/BW6NTG1meS2Z+NC4NA5I9qhN58aoiFbvJVU3uGItXRjj5iQz2wzsahkIYUt4Zm47h7WR4sEVKSV7uZhUO8xxmPHrR0i/uEo+nQ/MQkZ/nVJsKIr//bU2TQXxe5+6XHs9zohLckTUe9KyefjzseEIYTtMrvRoUpUWU+E2liXNXFKIuNGTJ+8iMk00g2m1OQSxWdxbZRm8Wq6QhmnNzh85oh8u6NZ5QIXTlLNjf91Y2mex0hWdTikPst/ZLULxaZIs9Eq19W+Vsntczdg9J8aqeEXNeJFfH51JBb49Jx4hkOwAjhm8B5kgp2RZ59M4vStUhRw/T8z4a1NntY/DBuNQmhsgcee/WMhURmosGBA0MjQuz05SXTF3mhDFeq1o0WXF4PoTWIuE0IwV5xbNSvYpc5dyCO+qmFNTdh8cc5v6pZvO6NM11AV0fOWFRPk5E0BCR1sUH3d43Ab8L0Rn8jNwS0R/Hj2itzT2c3tPDb+DDcWmqixqJcHh9ZPeU4YZwmuiI1trDr+PT7HR10Gvz63HVuoa5BSrorTHpGJksAzC8bCN868zhNWXnI+Wg5XcO0Uh+TmiGPOONQ9X4y+4K1cJuLsRxP/Tqv4eQJf9OApjhkddHd08f3F6OV0KIVPWwhrXHlE6xSt5zlheGR4R5rld392G2o6B/NK8g254LIS4i8thd1vQ9G94ZNcKkRlypnCNVZpO3CsKhzZJIi9Xx0vAUDGmvKlirPGjrfJ8nt9ZhFLhB9x0efgeti/PNZKzTYjUsmZiu6ivuiwMZbkihBb/ltBGCIQUdlVKy7/QJhzMeCnU1o0McrZmTOJ9mp6GLz1Dv8/x5RznmH69VRWtz0YP38JDZRAzxbWpMj/ex00tERtRK7yL7QWNlRGEbh0Uw5XpySDtc0d2nDI811JchUoDyX9XNh8edWvCF5hUk5XOcvKRFrA1ZRLRgbmh4dWQKnttXpV6fpBVHDjy691Agbur0ZA/+OiQZpyWzWwjONbAiunJGhOU5yMiP/z4jSVX6v95UonIRn8HD+mBMKrr4DQe6rnD6LG67Qs3uJUsTHhXiqKCz+eotK3WGmOZCHDfCZ88dm6qg9h+3l6mhlehXVyKNjAq9q38iZjkt+BO2bc/RNDw1L6c+jHzpmWkxDjtPg/oop0bVOxSYaeOWvn4FILhmbSjG4ojuccRw5cstKehBAH+6dUsp5kW8qxOpJB4eebgOcbqi0psLaS6lQgqI3NftpybB7zAmfHn3N7ZtX6tp2ov0vGdCg4pU5PSsOLzqzK6pxR81CNJrTaB9aFiY0JXexbEqV0Fvjk7D2BSYMLx80fmIlLIXrODedSVSvzLiXZ1oY6MVD2znwd4KE7Wm3fQtw1CByetGcMhlQJIaEwPkIUCws3oIZvDYvlo9gQM3zE0uA7F0UrpiIbiIbflfre30fZw5WuAPX5XhzW8cQleh1VPinTfxgH+3pKDf8E2C1tgEKoDJO9JruDGGG1oQc8yUjnG4rlcC+iTqpHlKoWlU/nMceJdSjgawhvnk42M1yIo3kBqroXeiF0NTlZftA+R+SMpix4PDj0KvghBZpo0uVNCByqCK+QpcjErD+BRuKIY56JDk/LcZPLCnRk+avjyv0UsB0Uri/Sw4Iw+EMjBSsBgelOLBzB5+nNfZfYXWfh/Q7uJvRvAHMyDlF3UQgx7dXoZYQ1NcXlqsgeyOsTTKenBWAjYhbxxs6YemG3B+EGQY5xo4ekbPZF7j/OEcR0FzW1IQmeCPommI5iyPnkQlURgqhxU26Y3JHeNwXhcfsuL4/p9pQTdIzfP9ngPuc6SU3AU7mo0bgCYrXg/Hi2dETrHyXVa+HS2l5Ft21+6usMBuhMtidE/UECdlDYSggk6oV1psa893Qb3rlCW54ZepouXg37l3d0aAfzL/cNSYZcT0LvEYnuqyvnIrIChHo/dbZYjDbPxslSFLAfGUEIIcZ3gppTpvd6zLqweOVZuI0TUVDRgSOzjVy5yWFKSmTNn6vv2LxlMx7jdEMtiZcbR6h/kdmh7nkIlctlUCiLnQNL7Xs7W5g6mrq+sTExNDg6gM9eE5xFEM4HhLL4pJKYdwvg5msCsgg4AwFceueyptKZ/XNO3pkIdqkPaXVdAGjfwkt1FTzeXveCAN7QYNp/gMDEzxYFhaLAaneaH8xTY5hrvasu1/5ebmzuvcuXOTn8KRUpLZ5sQpWVD+EgvfAKEcBWQ1mjUK554XYFvnw7YEhAhCSr6pYULTv2R6aklBAwC5Y3uJief2VyqtEoHGG5rT/4nVVN+EPaCsBB0pkT0gyyyDpq+HEB8DWNTSa/PNbbgt/yal5NkxyzI90VRVdI3+HSFpmyuk0MeTeGXnkspgrE/0aGgfyxxqoJPPQGe/BxxcDYtiBiQ042to2mfsZwkheGA/ywr9NhJlIBekZBFqOrZ5kgCFhYUJqampbAWzp9LCsgDLrgB/t0foByDkdkB1UrdFv5j0s0j1Ax8qpfxdqP/U8h1mIABN5EEYhyHELgBUBv87IAS98/9utUhA19TUZMXFxc0AcCZbIqG5A+YFvhvEMEQXVm4s6Jon6VKzA053dTI46OH8hMARhbwa5OCbboU/9e8//BRH8j9mLdQoDqqNCwAAAABJRU5ErkJggg=="},Jq4h: +/*!*******************************************!*\ + !*** ./src/assets/images/user/qrcode.png ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/qrcode.54870d9b.png"},K2GJ: +/*!***************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Style.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./helper/fixShadow */"fW2E"),i=n(/*! ./constant */"gut8").ContextCachedBy,a=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],o=function(e){this.extendFrom(e,!1)};function s(e,t,n){var r=null==t.x?0:t.x,i=null==t.x2?1:t.x2,a=null==t.y?0:t.y,o=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),r=isNaN(r)?0:r,i=isNaN(i)?1:i,a=isNaN(a)?0:a,o=isNaN(o)?0:o,e.createLinearGradient(r,a,i,o)}function l(e,t,n){var r=n.width,i=n.height,a=Math.min(r,i),o=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(o=o*r+n.x,s=s*i+n.y,l*=a),e.createRadialGradient(o,s,0,o,s,l)}for(var c=o.prototype={constructor:o,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(e,t,n){var o=n&&n.style,s=!o||e.__attrCachedBy!==i.STYLE_BIND;e.__attrCachedBy=i.STYLE_BIND;for(var l=0;l0},extendFrom:function(e,t){if(e)for(var n in e)!e.hasOwnProperty(n)||!0!==t&&(!1===t?this.hasOwnProperty(n):null==e[n])||(this[n]=e[n])},set:function(e,t){"string"==typeof e?this[e]=t:this.extendFrom(e,!0)},clone:function(){var e=new this.constructor;return e.extendFrom(this,!0),e},getGradient:function(e,t,n){for(var r=("radial"===t.type?l:s)(e,t,n),i=t.colorStops,a=0;a=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return i&&(s?o?u.unshift(s):u.push(s):this.defaultLoader&&(o?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),a.default.createElement(r,c,u)}}]),t}(i.Component);l.propTypes={children:o.default.node.isRequired,element:o.default.node,hasMore:o.default.bool,initialLoad:o.default.bool,isReverse:o.default.bool,loader:o.default.node,loadMore:o.default.func.isRequired,pageStart:o.default.number,ref:o.default.func,getScrollParent:o.default.func,threshold:o.default.number,useCapture:o.default.bool,useWindow:o.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},LYsE: +/*!**********************************************************!*\ + !*** ./src/components/DragSubject/index.tsx + 8 modules ***! + \**********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! 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/DragSubject/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/Exercise/Edit/components/editor.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Editor/NullChildEditor/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Editor/NullMDEditor.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Knowledge/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/service/exercise.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! 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 */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ +/*! 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/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/switch/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/switch/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js */ +/*! 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";var r=n("k1fw"),i=(n("/zsF"),n("PArb")),a=n("0Owb"),o=n("tJVT"),s=n("q1tI"),l=n.n(s),c=(n("5Dmo"),n("3S7+")),u=(n("14J3"),n("BMrR")),d=(n("5NDa"),n("5rEg")),h=(n("jCWc"),n("kPKH")),f=(n("+L6B"),n("2/Rp")),p=(n("BoS7"),n("Sdc0")),m=(n("7Kak"),n("9yH6")),g=(n("giR+"),n("fyUT")),v=(n("sRBo"),n("kaz8")),b=(n("2qtc"),n("kLXV")),y=(n("miYZ"),n("tsqr")),x=n("9og8"),E=n("oBTY"),_=n("PpiC"),k=n("WmNS"),w=n.n(k),S=n("Ty5D"),C=n("9kvl"),O=n("V0Rq"),A=n("kqOp"),T=n("7qnI"),I=n("1vsH"),D=n("YJx+"),L=n.n(D),R=n("9Bee"),N=n("u2Z1"),j=function(e,t){e.problemset,e.globalSetting;var n=e.exercise,i=(e.loading,e.dispatch),a=e.editData,k=e.editKey,C=e.setEditKey,D=void 0===C?function(){}:C,j=e.cancelAdd,M=void 0===j?function(){}:j,P=e.addCallback,B=void 0===P?function(){}:P,F=(e.setIsClaer,Object(_.a)(e,["problemset","globalSetting","exercise","loading","dispatch","editData","editKey","setEditKey","cancelAdd","addCallback","setIsClaer"]),Object(s.useState)("")),U=Object(o.a)(F,2),H=U[0],G=U[1],z=Object(s.useState)(""),V=Object(o.a)(z,2),W=V[0],K=(V[1],Object(s.useState)([])),q=Object(o.a)(K,2),Y=q[0],Q=q[1],J=Object(s.useState)(""),X=Object(o.a)(J,2),Z=X[0],$=X[1],ee=Object(s.useState)(),te=Object(o.a)(ee,2),ne=te[0],re=te[1],ie=Object(s.useState)(!1),ae=Object(o.a)(ie,2),oe=ae[0],se=ae[1],le=Object(s.useState)(),ce=Object(o.a)(le,2),ue=ce[0],de=ce[1],he=Object(s.useState)(0),fe=Object(o.a)(he,2),pe=fe[0],me=fe[1],ge=Object(s.useState)(!1),ve=Object(o.a)(ge,2),be=ve[0],ye=ve[1],xe=Object(s.useState)(!1),Ee=Object(o.a)(xe,2),_e=Ee[0],ke=Ee[1],we=Object(s.useState)([]),Se=Object(o.a)(we,2),Ce=Se[0],Oe=Se[1],Ae=Object(s.useState)(1),Te=Object(o.a)(Ae,2),Ie=Te[0],De=Te[1],Le=Object(s.useState)(!1),Re=Object(o.a)(Le,2),Ne=Re[0],je=Re[1],Me=Object(S.i)(),Pe=Object(s.useState)([]),Be=Object(o.a)(Pe,2),Fe=Be[0],Ue=Be[1],He=function(e){Ue([].concat(Object(E.a)(Fe),[Object(r.a)({},e)]))};Object(s.useEffect)((function(){if(null==a||!a.question_title)return ye(!0),G(""),re(!1),de(2),Q([]),$(""),void se(!1);G(null==a?void 0:a.question_title),re(null==a?void 0:a.is_ordered),De(null==a?void 0:a.difficulty),je(!(null!=a&&a.repeat_answer)),de(ue||(null==a?void 0:a.question_score));var e=null==a?void 0:a.standard_answer.map((function(e){return e.answer_text}));Q(Object(E.a)(e)),Oe(a.tag_discipline_ids)}),[a,be]),Object(s.useEffect)((function(){function e(){return(e=Object(x.a)(w.a.mark((function e(){var t,r,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.H)({sub_discipline_id:null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.sub_discipline_id});case 2:i=e.sent,Ue(i.tag_disciplines);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}se(!1),be&&function(){e.apply(this,arguments)}()}),[be]),Object(s.useImperativeHandle)(t,(function(){return{onSave:Qe,isEdit:be}})),Object(s.useEffect)((function(){var e,t=null!=n&&null!==(e=n.tagDisciplineData)&&void 0!==e&&e.tag_disciplines&&Array.isArray(n.tagDisciplineData.tag_disciplines)?n.tagDisciplineData.tag_disciplines:[];Ue(t)}),[n.tagDisciplineData]);var Ge,ze,Ve,We,Ke,qe,Ye,Qe=function(){var e=Object(x.a)(w.a.mark((function e(){var t,o,s,l,c,u;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=[],o=!1,ke(!0),Y.forEach((function(e,n){t.push({choice_id:n+1,answer_text:[]}),e.forEach((function(e,r){t[n].answer_text.push(e),e&&Object(I.Z)(e,1e4)||($("".concat(n,"-").concat(r)),y.b.info(e?"答案不能超过10000字符":"答案:不能为空"),o=!0)}))})),!o){e.next=7;break}return ke(!1),e.abrupt("return",!1);case 7:if(!a.question_id){e.next=18;break}if(1!==(null==a?void 0:a.is_my)){e.next=12;break}b.a.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",onOk:function(){var e=Object(x.a)(w.a.mark((function e(){var o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:H,question_type:3,question_score:ue,is_ordered:ne,standard_answers:t,tag_discipline_ids:Ce,sub_discipline_id:null===(o=n.editData)||void 0===o||null===(s=o.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:Ie,is_cover:1,repeat_answer:!Ne}});case 2:0===e.sent.status&&(D(-1),y.b.success("保存成功"),ye(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},Me)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){var e=Object(x.a)(w.a.mark((function e(){var o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:H,question_type:3,question_score:ue,is_ordered:ne,standard_answers:t,tag_discipline_ids:Ce,sub_discipline_id:null===(o=n.editData)||void 0===o||null===(s=o.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:Ie,repeat_answer:!Ne}});case 2:0===e.sent.status&&(D(-1),y.b.success("保存成功"),ye(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},Me)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=16;break;case 12:return e.next=14,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:H,question_type:3,question_score:ue,is_ordered:ne,standard_answers:t,tag_discipline_ids:Ce,sub_discipline_id:null===(s=n.editData)||void 0===s||null===(l=s.exercise)||void 0===l?void 0:l.sub_discipline_id,difficulty:Ie,repeat_answer:!Ne}});case 14:0===e.sent.status&&(D(-1),y.b.success("保存成功"),ye(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},Me)}));case 16:e.next=22;break;case 18:return e.next=20,i({type:"exercise/addExerciseQuestion",payload:{insert_id:null==a?void 0:a.insert_id,categoryId:Me.categoryId,question_title:H,question_type:3,question_score:ue,is_ordered:ne,standard_answers:t,tag_discipline_ids:Ce,sub_discipline_id:null===(c=n.editData)||void 0===c||null===(u=c.exercise)||void 0===u?void 0:u.sub_discipline_id,difficulty:Ie,repeat_answer:!Ne}});case 20:0===e.sent.status&&(D(-1),y.b.success("保存成功"),ye(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},Me)}));case 22:return ke(!1),e.abrupt("return",{name:H,analysis:W,standard_answers:t,is_ordered:ne});case 24:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Je=function(e,t,n){var r=Y.slice();if(t&&r.splice(e,t),n&&oe||!a.question_id)for(var i=0;i1&&l.a.createElement("span",null,l.a.createElement(v.a,{checked:ne,onChange:function(e){return re(e.target.checked)},className:"".concat(L.a.color333," font14")},"多个填空的答案有顺序要求"),l.a.createElement("span",{className:"".concat(L.a.color999," font12")},"(选中,每个填空的答案顺序必须与参考答案一致)"))),l.a.createElement("p",{className:""},l.a.createElement("span",{style:{color:"red"}},"*"),"分值:",l.a.createElement(g.a,{value:ue,max:1e4,min:0,onChange:function(e){de(e)}})," 分   ",!!ue&&!!pe&&l.a.createElement("span",{style:{color:"red"}},"(根据均分规则,本题每空",(ue/pe).toFixed(1),"分)"),l.a.createElement("span",{style:{marginLeft:"30px"},className:L.a.difficult},l.a.createElement("label",{style:{color:"red"}},"*")," 难度:",l.a.createElement(m.a.Group,{value:Ie,onChange:function(e){De(e.target.value)}},l.a.createElement(m.a.Button,{value:1},"简单"),l.a.createElement(m.a.Button,{value:2},"适中"),l.a.createElement(m.a.Button,{value:3},"困难")))),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:"".concat(L.a.title)},"知识点:",l.a.createElement("span",{className:L.a.colorGray},"(所有自建知识点仅本人可见,被EduCoder平台审核通过为官方知识点后所有用户可见)")),l.a.createElement("div",{className:"mt5"},l.a.createElement(N.a,{value:Ce,selectvalues:null==a?void 0:a.tag_discipline_ids,onChange:Oe,subId:null===(Ke=n.editData)||void 0===Ke||null===(qe=Ke.exercise)||void 0===qe?void 0:qe.sub_discipline_id,knowledgeOptions:Fe,onAddKnowledgeFinish:He})),l.a.createElement("div",{style:{marginTop:10}},l.a.createElement("span",{style:{marginRight:10}},"不允许学生重复答题"),l.a.createElement(p.a,{checked:Ne,onChange:function(e){je(e)}}))),l.a.createElement("aside",{className:"tr"},(-1!==k||a.question_id)&&l.a.createElement(f.a,{type:"default",onClick:function(){M(),ye(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){Qe()}},"保存")))))},M=Object(C.a)((function(e){var t=e.problemset,n=e.loading,r=e.exercise;return{problemset:t,globalSetting:e.globalSetting,exercise:r,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(j)),P=n("Ot1p"),B=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],F=function(e,t){e.problemset,e.globalSetting;var n=e.exercise,i=(e.loading,e.dispatch),a=(e.onRef,e.editData),u=e.editKey,d=e.setEditKey,h=void 0===d?function(){}:d,v=e.cancelAdd,k=void 0===v?function(){}:v,C=e.addCallback,A=void 0===C?function(){}:C,T=(e.setIsClaer,Object(_.a)(e,["problemset","globalSetting","exercise","loading","dispatch","onRef","editData","editKey","setEditKey","cancelAdd","addCallback","setIsClaer"]),Object(s.useState)()),I=Object(o.a)(T,2),D=I[0],j=I[1],M=Object(s.useState)(""),F=Object(o.a)(M,2),U=F[0],H=F[1],G=Object(s.useState)(!1),z=Object(o.a)(G,2),V=z[0],W=z[1],K=Object(s.useState)(),q=Object(o.a)(K,2),Y=q[0],Q=q[1],J=Object(s.useState)([]),X=Object(o.a)(J,2),Z=X[0],$=X[1],ee=Object(s.useState)([]),te=Object(o.a)(ee,2),ne=te[0],re=te[1],ie=Object(s.useState)(1),ae=Object(o.a)(ie,2),oe=ae[0],se=ae[1],le=Object(s.useState)(!1),ce=Object(o.a)(le,2),ue=ce[0],de=ce[1],he=function(e){re([].concat(Object(E.a)(ne),[Object(r.a)({},e)]))},fe=Object(S.i)();Object(s.useEffect)((function(){if(null==a||!a.question_choices)return W(!0),H(""),Q(2),void j("");de(!(null!=a&&a.repeat_answer)),H(null==a?void 0:a.question_title),Q(Y||(null==a?void 0:a.question_score)),se(null==a?void 0:a.difficulty),j(a.standard_answer[0]+""),$(a.tag_discipline_ids)}),[a,V]),Object(s.useEffect)((function(){function e(){return(e=Object(x.a)(w.a.mark((function e(){var t,r,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.H)({sub_discipline_id:null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.sub_discipline_id});case 2:i=e.sent,re(i.tag_disciplines);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}V&&function(){e.apply(this,arguments)}()}),[V]),Object(s.useImperativeHandle)(t,(function(){return{onSave:ve,isEdit:V}})),Object(s.useEffect)((function(){var e,t=null!=n&&null!==(e=n.tagDisciplineData)&&void 0!==e&&e.tag_disciplines&&Array.isArray(n.tagDisciplineData.tag_disciplines)?n.tagDisciplineData.tag_disciplines:[];re(t)}),[n.tagDisciplineData]);var pe,me,ge,ve=function(){var e=Object(x.a)(w.a.mark((function e(){var t,o,s,l,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(U){e.next=3;break}return y.b.info("请您输入题干"),e.abrupt("return",!1);case 3:if(D){e.next=6;break}return y.b.info("请先点击选择本选择题的正确选项"),e.abrupt("return",!1);case 6:if(t=[{choice_text:"正确",is_answer:"1"===D?1:0},{choice_text:"错误",is_answer:"2"===D?2:0}],!a.question_id){e.next=18;break}if(1!==(null==a?void 0:a.is_my)){e.next=12;break}b.a.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",onOk:function(){var e=Object(x.a)(w.a.mark((function e(){var o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:U,question_type:2,question_score:Y,question_choices:t.map((function(e){return e.choice_text})),standard_answers:t.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:Z,sub_discipline_id:null===(o=n.editData)||void 0===o||null===(s=o.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:oe,is_cover:1,repeat_answer:!ue}});case 2:0===e.sent.status&&(h(-1),y.b.success("保存成功"),W(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},fe)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){var e=Object(x.a)(w.a.mark((function e(){var o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:U,question_type:2,question_score:Y,question_choices:t.map((function(e){return e.choice_text})),standard_answers:t.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:Z,sub_discipline_id:null===(o=n.editData)||void 0===o||null===(s=o.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:oe,repeat_answer:!ue}});case 2:0===e.sent.status&&(h(-1),y.b.success("保存成功"),W(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},fe)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=16;break;case 12:return e.next=14,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:U,question_type:2,question_score:Y,question_choices:t.map((function(e){return e.choice_text})),standard_answers:t.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:Z,sub_discipline_id:null===(o=n.editData)||void 0===o||null===(s=o.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:oe,repeat_answer:!ue}});case 14:0===e.sent.status&&(h(-1),y.b.success("保存成功"),W(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},fe)}));case 16:e.next=22;break;case 18:return e.next=20,i({type:"exercise/addExerciseQuestion",payload:{insert_id:null==a?void 0:a.insert_id,categoryId:fe.categoryId,question_title:U,question_type:2,question_score:Y,question_choices:t.map((function(e){return e.choice_text})),standard_answers:t.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:Z,sub_discipline_id:null===(l=n.editData)||void 0===l||null===(c=l.exercise)||void 0===c?void 0:c.sub_discipline_id,difficulty:oe,repeat_answer:!ue}});case 20:0===e.sent.status&&(h(-1),y.b.success("保存成功"),W(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},fe)}));case 22:return e.abrupt("return",{name:U,choices:t});case 23:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"(向下插入单选题)",icon:"iconfont c-light-primary ml30 icon-tianjia current",id:"add"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,r;return 1===(null==n||null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),ye=function(){var e=Object(x.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===u){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?15:17;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(x.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:a.question_id});case 2:i({type:"exercise/editExercise",payload:Object(r.a)({},fe)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",17);case 8:return e.next=10,i({type:"exercise/exeriseMoveUpDown",payload:{id:a.question_id,opr:t.id}});case 10:return i({type:"exercise/editExercise",payload:Object(r.a)({},fe)}),e.abrupt("break",17);case 12:return h(a.dragKey),W(!0),e.abrupt("break",17);case 15:return A({key:a.key,insert_id:null==a?void 0:a.question_id,question_type:2}),e.abrupt("break",17);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement("section",{className:L.a.wrap},!V&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},!(null!=a&&a.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},a.key,"、判断题"),"(",a.question_score,"分)")),null!=a&&a.isPreview?l.a.createElement("div",{style:{display:"flex"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,"."),l.a.createElement(R.a,{value:a.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",a.question_score,"分)")):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:a.question_title})),l.a.createElement("div",{className:L.a.questionChoices},null==a||null===(ge=a.question_choices)||void 0===ge?void 0:ge.map((function(e,t){return l.a.createElement(m.a,{key:t,checked:a.standard_answer.includes(t+1),disabled:!0},B[t],". ",l.a.createElement("span",{className:"c-black font14"},e.choice_text))}))),l.a.createElement("div",{className:L.a.action},!a.hideAction&&be.map((function(e,t){return"up"===e.id&&1===a.key||"down"===e.id&&a.key===a.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return ye(e)},className:e.icon}))})))),V&&l.a.createElement("aside",null,l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},"判断题"),"(客观题,由系统自动评分,请设置标准答案)"),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"题干:")),l.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:U,onChange:function(e){return H(e)}}),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"答案选项:",l.a.createElement("span",{className:L.a.colorGray},"点击选项可设置正确答案"))),l.a.createElement(m.a.Group,{buttonStyle:"solid",value:D,onChange:function(e){return j(e.target.value)}},l.a.createElement(m.a.Button,{value:"1",className:"".concat(L.a.radio," mr40")},"正确"),l.a.createElement(m.a.Button,{value:"2",className:L.a.radio},"错误")),l.a.createElement("p",{className:"c-orange"},"温馨提示:点击选项,可以直接设置标准答案"),l.a.createElement("p",{className:""},"分值:",l.a.createElement(g.a,{value:Y,max:1e4,min:0,onChange:function(e){Q(e)}})," 分",l.a.createElement("span",{style:{marginLeft:"30px"},className:L.a.difficult},l.a.createElement("label",{style:{color:"red"}},"*")," 难度:",l.a.createElement(m.a.Group,{value:oe,onChange:function(e){se(e.target.value)}},l.a.createElement(m.a.Button,{value:1},"简单"),l.a.createElement(m.a.Button,{value:2},"适中"),l.a.createElement(m.a.Button,{value:3},"困难")))),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:"".concat(L.a.title)},"知识点:",l.a.createElement("span",{className:L.a.colorGray},"(所有自建知识点仅本人可见,被EduCoder平台审核通过为官方知识点后所有用户可见)")),l.a.createElement("div",{className:"mt5"},l.a.createElement(N.a,{value:Z,selectvalues:null==a?void 0:a.tag_discipline_ids,onChange:$,subId:null===(pe=n.editData)||void 0===pe||null===(me=pe.exercise)||void 0===me?void 0:me.sub_discipline_id,knowledgeOptions:ne,onAddKnowledgeFinish:he})),l.a.createElement("div",{style:{marginTop:10}},l.a.createElement("span",{style:{marginRight:10}},"不允许学生重复答题"),l.a.createElement(p.a,{checked:ue,onChange:function(e){de(e)}}))),l.a.createElement("aside",{className:"tr"},(-1!==u||a.question_id)&&l.a.createElement(f.a,{type:"default",onClick:function(){k(),W(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){ve()}},"保存"))))},U=Object(C.a)((function(e){var t=e.problemset,n=e.loading,r=e.exercise;return{problemset:t,globalSetting:e.globalSetting,exercise:r,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(F)),H=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],G=function(e,t){e.problemset,e.globalSetting;var n=e.exercise,i=(e.loading,e.dispatch),a=(e.onRef,e.editData),d=e.cancelAdd,k=void 0===d?function(){}:d,C=e.editKey,A=e.setEditKey,T=void 0===A?function(){}:A,I=(e.setIsClaer,e.addCallback),D=void 0===I?function(e){}:I,j=(Object(_.a)(e,["problemset","globalSetting","exercise","loading","dispatch","onRef","editData","cancelAdd","editKey","setEditKey","setIsClaer","addCallback"]),Object(s.useState)([])),M=Object(o.a)(j,2),B=M[0],F=M[1],U=Object(s.useState)(),G=Object(o.a)(U,2),z=G[0],V=G[1],W=Object(s.useState)([]),K=Object(o.a)(W,2),q=K[0],Y=K[1],Q=Object(s.useState)(""),J=Object(o.a)(Q,2),X=J[0],Z=J[1],$=Object(s.useState)(),ee=Object(o.a)($,2),te=ee[0],ne=ee[1],re=Object(s.useState)(!1),ie=Object(o.a)(re,2),ae=ie[0],oe=ie[1],se=Object(s.useState)([]),le=Object(o.a)(se,2),ce=le[0],ue=le[1],de=Object(s.useState)(1),he=Object(o.a)(de,2),fe=he[0],pe=he[1],me=Object(s.useState)(!1),ge=Object(o.a)(me,2),ve=ge[0],be=ge[1],ye=Object(s.useState)([]),xe=Object(o.a)(ye,2),Ee=xe[0],_e=xe[1],ke=function(e){_e([].concat(Object(E.a)(Ee),[Object(r.a)({},e)]))},we=Object(S.i)();Object(s.useEffect)((function(){F(["","","",""])}),[]),Object(s.useEffect)((function(){if(null==a||!a.question_choices)return oe(!0),Z(""),ne(5),F(["","","",""]),void Y([]);Z(null==a?void 0:a.question_title),ne(te||(null==a?void 0:a.question_score)),be(!(null!=a&&a.repeat_answer)),pe(null==a?void 0:a.difficulty),F(null==a?void 0:a.question_choices.map((function(e){return e.choice_text})));var e=[];null==a||a.standard_answer.map((function(t,n){e.push(t-1)})),Y(e),ue(a.tag_discipline_ids)}),[a,ae]),Object(s.useEffect)((function(){function e(){return(e=Object(x.a)(w.a.mark((function e(){var t,r,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.H)({sub_discipline_id:null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.sub_discipline_id});case 2:i=e.sent,_e(i.tag_disciplines);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}ae&&function(){e.apply(this,arguments)}()}),[ae]),Object(s.useImperativeHandle)(t,(function(){return{onSave:Ae,isEdit:ae}})),Object(s.useEffect)((function(){var e,t=null!=n&&null!==(e=n.tagDisciplineData)&&void 0!==e&&e.tag_disciplines&&Array.isArray(n.tagDisciplineData.tag_disciplines)?n.tagDisciplineData.tag_disciplines:[];_e(t)}),[n.tagDisciplineData]);var Se,Ce,Oe,Ae=function(){var e=Object(x.a)(w.a.mark((function e(){var t,o,s,l,c,u;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(X){e.next=3;break}return y.b.info("请您输入题目"),e.abrupt("return",!1);case 3:if(!((t=B.findIndex((function(e){return!e})))>-1)){e.next=7;break}return y.b.info("请先输入 ".concat(H[t]," 选项的内容")),e.abrupt("return",!1);case 7:if(q.length){e.next=10;break}return y.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),e.abrupt("return",!1);case 10:if(!(q.length<1)){e.next=13;break}return y.b.info("请选择答案"),e.abrupt("return",!1);case 13:if(o=B.map((function(e,t){return{choice_text:e,is_answer:q.includes(t)?t+1:0}})),!a.question_id){e.next=25;break}if(1!==(null==a?void 0:a.is_my)){e.next=19;break}b.a.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",onOk:function(){var e=Object(x.a)(w.a.mark((function e(){var t,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:X,question_type:1,question_score:te,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ce,sub_discipline_id:null===(t=n.editData)||void 0===t||null===(s=t.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:fe,is_cover:1,repeat_answer:!ve}});case 2:0===e.sent.status&&(T(-1),y.b.success("保存成功"),oe(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},we)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){var e=Object(x.a)(w.a.mark((function e(){var t,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:X,question_type:1,question_score:te,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ce,sub_discipline_id:null===(t=n.editData)||void 0===t||null===(s=t.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:fe,repeat_answer:!ve}});case 2:0===e.sent.status&&(T(-1),y.b.success("保存成功"),oe(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},we)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=23;break;case 19:return e.next=21,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:X,question_type:1,question_score:te,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ce,sub_discipline_id:null===(s=n.editData)||void 0===s||null===(l=s.exercise)||void 0===l?void 0:l.sub_discipline_id,difficulty:fe,repeat_answer:!ve}});case 21:0===e.sent.status&&(T(-1),y.b.success("保存成功"),oe(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},we)}));case 23:e.next=29;break;case 25:return e.next=27,i({type:"exercise/addExerciseQuestion",payload:{insert_id:null==a?void 0:a.insert_id,categoryId:we.categoryId,question_title:X,question_type:1,question_score:te,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ce,sub_discipline_id:null===(c=n.editData)||void 0===c||null===(u=c.exercise)||void 0===u?void 0:u.sub_discipline_id,difficulty:fe,repeat_answer:!ve}});case 27:0===e.sent.status&&(T(-1),y.b.success("保存成功"),oe(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},we)}));case 29:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Te=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"(向下插入单选题)",icon:"iconfont c-light-primary ml30 icon-tianjia current",id:"add"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,r;return 1===(null==n||null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),Ie=function(){var e=Object(x.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===C){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?15:17;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(x.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:a.question_id});case 2:i({type:"exercise/editExercise",payload:Object(r.a)({},we)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",17);case 8:return e.next=10,i({type:"exercise/exeriseMoveUpDown",payload:{id:a.question_id,opr:t.id}});case 10:return i({type:"exercise/editExercise",payload:Object(r.a)({},we)}),e.abrupt("break",17);case 12:return T(a.dragKey),oe(!0),e.abrupt("break",17);case 15:return D({key:a.key,insert_id:null==a?void 0:a.question_id,question_type:1}),e.abrupt("break",17);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement("section",{className:L.a.wrap},!ae&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},!(null!=a&&a.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},a.key,"、多选题"),"(",a.question_score,"分)")),null!=a&&a.isPreview?l.a.createElement("div",{style:{display:"flex"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,"."),l.a.createElement(R.a,{value:a.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",a.question_score,"分)")):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:a.question_title})),l.a.createElement("div",{className:L.a.questionChoices},null==a||null===(Oe=a.question_choices)||void 0===Oe?void 0:Oe.map((function(e,t){return l.a.createElement(u.a,null,l.a.createElement(h.a,null,l.a.createElement(v.a,{key:t,checked:a.standard_answer.includes(t+1),disabled:!0},H[t],".")),l.a.createElement(h.a,{flex:"1"},l.a.createElement("span",{className:"c-black font14"},l.a.createElement(R.a,{value:e.choice_text}))))}))),l.a.createElement("div",{className:L.a.action},!a.hideAction&&Te.map((function(e,t){return"up"===e.id&&1===a.key||"down"===e.id&&a.key===a.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return Ie(e)},className:e.icon}))})))),ae&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},"选择题"),"(客观题,由系统自动评分,请设置标准答案)")),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"题干:")),l.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:X,onChange:function(e){return Z(e)}}),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"答案选项:",l.a.createElement("span",{className:L.a.colorGray},"点击选项可设置正确答案"))),B.map((function(e,t){var r,i;return l.a.createElement("div",{className:L.a.choiceWrap,key:t},l.a.createElement(c.a,{title:"点击设置为标准答案",placement:"left"},l.a.createElement("div",{className:"".concat(L.a.answer," ").concat(q.includes(t)?L.a.activeAnswer:""),onClick:function(){q.includes(t)?Y(q.filter((function(e){return e!==t}))):Y([].concat(Object(E.a)(q),[t]))}},H[t])),l.a.createElement("div",{className:L.a.editorWrap},z===t?l.a.createElement(P.a,{id:"single-question-option-".concat(t),watch:!0,isFocus:!0,height:155,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){B[t]=e,F(B)}}):l.a.createElement("div",{className:L.a.htmlWrap,onClick:function(){return V(t)}},l.a.createElement(R.a,{value:e}))),1===(null===(r=n.editData)||void 0===r||null===(i=r.exercise)||void 0===i?void 0:i.exercise_status)&&l.a.createElement(l.a.Fragment,null,t>1&&l.a.createElement(c.a,{title:"删除"},l.a.createElement("i",{className:"".concat(L.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return F(B.filter((function(e,n){return n!==t})))}})),t<7&&t===B.length-1&&l.a.createElement(c.a,{title:"新增参考答案"},l.a.createElement("i",{className:"".concat(L.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return F([].concat(Object(E.a)(B),[""]))}}))))})),l.a.createElement("p",{className:"c-orange"},"温馨提示:点击选项输入框可设置答案;选中的选项即为正确答案,选择多个答案即为多选题"),l.a.createElement("p",{className:""},"分值:",l.a.createElement(g.a,{value:te,max:1e4,min:0,onChange:function(e){ne(e)}})," 分",l.a.createElement("span",{style:{marginLeft:"30px"},className:L.a.difficult},l.a.createElement("label",{style:{color:"red"}},"*")," 难度:",l.a.createElement(m.a.Group,{value:fe,onChange:function(e){pe(e.target.value)}},l.a.createElement(m.a.Button,{value:1},"简单"),l.a.createElement(m.a.Button,{value:2},"适中"),l.a.createElement(m.a.Button,{value:3},"困难")))),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:"".concat(L.a.title)},"知识点:",l.a.createElement("span",{className:L.a.colorGray},"(所有自建知识点仅本人可见,被EduCoder平台审核通过为官方知识点后所有用户可见)")),l.a.createElement("div",{className:"mt5"},l.a.createElement(N.a,{value:ce,selectvalues:null==a?void 0:a.tag_discipline_ids,onChange:ue,subId:null===(Se=n.editData)||void 0===Se||null===(Ce=Se.exercise)||void 0===Ce?void 0:Ce.sub_discipline_id,knowledgeOptions:Ee,onAddKnowledgeFinish:ke})),l.a.createElement("div",{style:{marginTop:10}},l.a.createElement("span",{style:{marginRight:10}},"不允许学生重复答题"),l.a.createElement(p.a,{checked:ve,onChange:function(e){be(e)}}))),l.a.createElement("aside",{className:"tr"},(-1!==C||a.question_id)&&l.a.createElement(f.a,{type:"default",onClick:function(){k(),oe(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){Ae()}},"保存"))))},z=Object(C.a)((function(e){var t=e.problemset,n=e.loading,r=e.exercise;return{problemset:t,globalSetting:e.globalSetting,exercise:r,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(G)),V=n("55Ip"),W=function(e,t){e.problemset,e.globalSetting;var n=e.exercise,i=(e.loading,e.dispatch),a=e.editData,p=e.cancelAdd,m=void 0===p?function(){}:p,E=e.editKey,k=e.setEditKey,C=void 0===k?function(){}:k,A=(e.addCallback,e.setIsClaer,Object(_.a)(e,["problemset","globalSetting","exercise","loading","dispatch","editData","cancelAdd","editKey","setEditKey","addCallback","setIsClaer"]),Object(s.useState)("")),T=Object(o.a)(A,2),I=T[0],D=T[1],N=Object(s.useState)(""),j=Object(o.a)(N,2),M=j[0],B=j[1],F=Object(s.useState)(""),U=Object(o.a)(F,2),H=U[0],G=(U[1],Object(s.useState)([])),z=Object(o.a)(G,2),W=z[0],K=(z[1],Object(s.useState)("")),q=Object(o.a)(K,2),Y=(q[0],q[1],Object(s.useState)()),Q=Object(o.a)(Y,2),J=Q[0],X=Q[1],Z=Object(s.useState)(!1),$=Object(o.a)(Z,2),ee=($[0],$[1]),te=Object(s.useState)([]),ne=Object(o.a)(te,2),re=ne[0],ie=ne[1],ae=Object(s.useState)(!1),oe=Object(o.a)(ae,2),se=oe[0],le=oe[1],ce=Object(S.i)();Object(s.useEffect)((function(){var e;a.edit&&(le(!0),B(""),D(""),ie([])),D(a.shixun_name),B(a.question_title);var t=[];null===(e=a.shixun)||void 0===e||e.map((function(e){t.push(e.challenge_score)})),ie(t)}),[a]),Object(s.useEffect)((function(){ee(!1)}),[se]),Object(s.useImperativeHandle)(t,(function(){return{onSave:fe,isEdit:se}}));var ue,de,he,fe=function(){var e=Object(x.a)(w.a.mark((function e(){var t,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],!1,e.next=4;break;case 4:if(!a.question_id){e.next=10;break}return e.next=7,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:M,shixun_name:I,shixun_id:a.shixun_id,question_type:5,question_scores:re}});case 7:n=e.sent,e.next=13;break;case 10:return e.next=12,i({type:"exercise/addExerciseQuestion",payload:{insert_id:null==a?void 0:a.insert_id,categoryId:ce.categoryId,question_title:M,shixun_name:I,shixun_id:a.shixun_id,question_type:5,question_scores:re}});case 12:n=e.sent;case 13:return 0===n.status&&(C(-1),y.b.success("保存成功"),le(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},ce)})),e.abrupt("return",{name:M,analysis:H,standard_answers:t,is_ordered:J});case 15:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),pe=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"(向下插入实训题)",icon:"iconfont c-light-primary ml30 icon-tianjia current",id:"add"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,r;return 1===(null==n||null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),me=function(){var e=Object(x.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===E){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?15:17;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(x.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:a.question_id});case 2:i({type:"exercise/editExercise",payload:Object(r.a)({},ce)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",17);case 8:return e.next=10,i({type:"exercise/exeriseMoveUpDown",payload:{id:a.question_id,opr:t.id}});case 10:return i({type:"exercise/editExercise",payload:Object(r.a)({},ce)}),e.abrupt("break",17);case 12:return C(a.dragKey),le(!0),e.abrupt("break",17);case 15:return i({type:"classroomList/setActionTabs",payload:{key:"选用实践项目",editData:{key:a.key,insert_id:null==a?void 0:a.question_id,question_type:5}}}),e.abrupt("break",17);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement("section",{className:L.a.wrap},!se&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},!(null!=a&&a.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},a.key,"、实训题"),"(",a.question_score,"分)")),null!=a&&a.isPreview?l.a.createElement("div",{style:{display:"flex"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,"."),l.a.createElement(R.a,{value:a.shixun_name}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",a.question_score,"分)"),!(null===(de=a.schools)||void 0===de||!de.length)&&l.a.createElement(c.a,{title:"该实训题面向指定单位开放"},l.a.createElement("i",{className:"iconfont icon-zhidinggongkai1 font18 line24 c-orange"}))):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:a.shixun_name})),l.a.createElement("div",{className:"mt30"}),null===(he=a.shixun)||void 0===he?void 0:he.map((function(e,t){return l.a.createElement("div",{key:t},"第",t+1,"关 ",l.a.createElement("span",{className:"ml10"},e.challenge_name)," ",l.a.createElement("span",{className:"ml10"},e.challenge_score," 分"))})),l.a.createElement("div",{className:L.a.action},l.a.createElement(V.a,{target:"_blank",to:"/shixuns/".concat(a.shixun_identifier,"/challenges?exercise=true")},"实训详情"),!a.hideAction&&pe.map((function(e,t){return"up"===e.id&&1===a.key||"down"===e.id&&a.key===a.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return me(e)},className:e.icon}))})))),se&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},"实训题"),"(客观题,由系统自动评分,允许手动调分)")),l.a.createElement("div",{className:"mt10"},l.a.createElement(d.a,{defaultValue:I,onChange:function(e){D(e.target.value)}})),l.a.createElement("div",{className:"mt10"},l.a.createElement(P.a,{id:"single-question-option-0",height:155,placeholder:"请输入实训题完成要求",defaultValue:M,onChange:function(e){B(e)}})),l.a.createElement("div",{className:"mt20"},null===(ue=a.shixun)||void 0===ue?void 0:ue.map((function(e,t){return l.a.createElement(u.a,{gutter:[20,20]},l.a.createElement(h.a,{flex:"1"},t+1,".",e.challenge_name),l.a.createElement(h.a,null,l.a.createElement(g.a,{defaultValue:re[t],onChange:function(e){re[t]=e,ie(re),console.log("srore:L",re[t])}})," 分"))}))),l.a.createElement("div",{className:"mt20"},W.length>1&&l.a.createElement("span",null,l.a.createElement(v.a,{checked:J,onChange:function(e){return X(e.target.checked)},className:"".concat(L.a.color333," font14")},"多个填空的答案有顺序要求"),l.a.createElement("span",{className:"".concat(L.a.color999," font12")},"(选中,每个填空的答案顺序必须与参考答案一致)"))),l.a.createElement("aside",{className:"tr"},(-1!==E||!(null!=a&&a.edit))&&l.a.createElement(f.a,{type:"default",onClick:function(){m(),le(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){fe()}},"保存"))))},K=Object(C.a)((function(e){var t=e.problemset,n=e.loading;return{problemset:t,globalSetting:e.globalSetting,exercise:e.exercise,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(W)),q=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Y=function(e,t){e.problemset;var n=e.exercise,i=(e.globalSetting,e.loading,e.dispatch),a=(e.onRef,e.editData),d=e.cancelAdd,v=void 0===d?function(){}:d,k=e.editKey,C=e.setEditKey,A=void 0===C?function(){}:C,T=(e.setIsClaer,e.addCallback),I=void 0===T?function(e){}:T,D=(Object(_.a)(e,["problemset","exercise","globalSetting","loading","dispatch","onRef","editData","cancelAdd","editKey","setEditKey","setIsClaer","addCallback"]),Object(s.useState)([])),j=Object(o.a)(D,2),M=j[0],B=j[1],F=Object(s.useState)(),U=Object(o.a)(F,2),H=U[0],G=U[1],z=Object(s.useState)([]),V=Object(o.a)(z,2),W=V[0],K=V[1],Y=Object(s.useState)(""),Q=Object(o.a)(Y,2),J=Q[0],X=Q[1],Z=Object(s.useState)(),$=Object(o.a)(Z,2),ee=$[0],te=$[1],ne=Object(s.useState)([]),re=Object(o.a)(ne,2),ie=re[0],ae=re[1],oe=Object(s.useState)(!1),se=Object(o.a)(oe,2),le=se[0],ce=se[1],ue=Object(s.useState)(1),de=Object(o.a)(ue,2),he=de[0],fe=de[1],pe=Object(s.useState)(!1),me=Object(o.a)(pe,2),ge=me[0],ve=me[1],be=Object(S.i)(),ye=Object(s.useRef)(null),xe=Object(s.useState)([]),Ee=Object(o.a)(xe,2),_e=Ee[0],ke=Ee[1],we=function(e){ke([].concat(Object(E.a)(_e),[Object(r.a)({},e)]))};Object(s.useEffect)((function(){B(["","","",""])}),[]),Object(s.useEffect)((function(){if(null==a||!a.question_choices)return ce(!0),X(""),te(5),B(["","","",""]),void K([]);X(null==a?void 0:a.question_title),te(ee||(null==a?void 0:a.question_score)),ve(!(null!=a&&a.repeat_answer)),fe(null==a?void 0:a.difficulty),B(null==a?void 0:a.question_choices.map((function(e){return e.choice_text})));var e=[];null==a||a.standard_answer.map((function(t,n){e.push(t-1)})),ae(a.tag_discipline_ids),K(e)}),[a,le]),Object(s.useEffect)((function(){function e(){return(e=Object(x.a)(w.a.mark((function e(){var t,r,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.H)({sub_discipline_id:null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.sub_discipline_id});case 2:i=e.sent,ke(i.tag_disciplines);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}le&&function(){e.apply(this,arguments)}()}),[le]),Object(s.useEffect)((function(){var e,t=null!=n&&null!==(e=n.tagDisciplineData)&&void 0!==e&&e.tag_disciplines&&Array.isArray(n.tagDisciplineData.tag_disciplines)?n.tagDisciplineData.tag_disciplines:[];ke(t)}),[n.tagDisciplineData]),Object(s.useImperativeHandle)(t,(function(){return{onSave:Ae,isEdit:le}}));var Se,Ce,Oe,Ae=function(){var e=Object(x.a)(w.a.mark((function e(){var t,o,s,l,c,u,d,h,f;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(J){e.next=3;break}return y.b.info("请您输入题目"),e.abrupt("return",!1);case 3:if(!((t=M.findIndex((function(e){return!e})))>-1)){e.next=7;break}return y.b.info("请先输入 ".concat(q[t]," 选项的内容")),e.abrupt("return",!1);case 7:if(W.length){e.next=10;break}return y.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),e.abrupt("return",!1);case 10:if(!(W.length<1)){e.next=13;break}return y.b.info("请选择答案"),e.abrupt("return",!1);case 13:if(o=M.map((function(e,t){return{choice_text:e,is_answer:W.includes(t)?t+1:0}})),!a.question_id){e.next=25;break}if(1!==(null==a?void 0:a.is_my)){e.next=19;break}b.a.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",onOk:function(){var e=Object(x.a)(w.a.mark((function e(){var t,l,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:J,question_type:1,question_score:ee,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ie,sub_discipline_id:null===(t=n.editData)||void 0===t||null===(l=t.exercise)||void 0===l?void 0:l.sub_discipline_id,difficulty:he,is_cover:1,repeat_answer:!ge}});case 2:s=e.sent,0===(null===(c=s)||void 0===c?void 0:c.status)&&(A(-1),y.b.success("保存成功"),ce(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},be)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){var e=Object(x.a)(w.a.mark((function e(){var t,l,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:J,question_type:1,question_score:ee,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ie,sub_discipline_id:null===(t=n.editData)||void 0===t||null===(l=t.exercise)||void 0===l?void 0:l.sub_discipline_id,difficulty:he,repeat_answer:!ge}});case 2:s=e.sent,0===(null===(c=s)||void 0===c?void 0:c.status)&&(A(-1),y.b.success("保存成功"),ce(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},be)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=23;break;case 19:return e.next=21,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:J,question_type:1,question_score:ee,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ie,sub_discipline_id:null===(l=n.editData)||void 0===l||null===(c=l.exercise)||void 0===c?void 0:c.sub_discipline_id,difficulty:he,repeat_answer:!ge}});case 21:s=e.sent,0===(null===(u=s)||void 0===u?void 0:u.status)&&(A(-1),y.b.success("保存成功"),ce(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},be)}));case 23:e.next=29;break;case 25:return e.next=27,i({type:"exercise/addExerciseQuestion",payload:{insert_id:null==a?void 0:a.insert_id,categoryId:be.categoryId,question_title:J,question_type:1,question_score:ee,question_choices:o.map((function(e){return e.choice_text})),standard_answers:o.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer})),tag_discipline_ids:ie,sub_discipline_id:null===(d=n.editData)||void 0===d||null===(h=d.exercise)||void 0===h?void 0:h.sub_discipline_id,difficulty:he,repeat_answer:!ge}});case 27:s=e.sent,0===(null===(f=s)||void 0===f?void 0:f.status)&&(A(-1),y.b.success("保存成功"),ce(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},be)}));case 29:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Te=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"(向下插入单选题)",icon:"iconfont c-light-primary ml30 icon-tianjia current",id:"add"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,r;return 1===(null==n||null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),Ie=function(){var e=Object(x.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===k){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?15:17;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(x.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:a.question_id});case 2:i({type:"exercise/editExercise",payload:Object(r.a)({},be)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",17);case 8:return e.next=10,i({type:"exercise/exeriseMoveUpDown",payload:{id:a.question_id,opr:t.id}});case 10:return i({type:"exercise/editExercise",payload:Object(r.a)({},be)}),e.abrupt("break",17);case 12:return A(a.dragKey),ce(!0),e.abrupt("break",17);case 15:return I({key:a.key,insert_id:null==a?void 0:a.question_id,question_type:0}),e.abrupt("break",17);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement("section",{className:L.a.wrap},!le&&l.a.createElement("aside",{ref:ye},l.a.createElement("div",{className:L.a.questionType},!(null!=a&&a.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},a.key,"、单选题"),"(",a.question_score,"分)")),null!=a&&a.isPreview?l.a.createElement("div",{style:{display:"flex",alignItems:"flex-start"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,"."),l.a.createElement(R.a,{value:a.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",a.question_score,"分)")):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:a.question_title})),l.a.createElement("div",{className:L.a.questionChoices},null==a||null===(Oe=a.question_choices)||void 0===Oe?void 0:Oe.map((function(e,t){return l.a.createElement(u.a,{key:t},l.a.createElement(h.a,null,l.a.createElement(m.a,{key:t,checked:a.standard_answer.includes(t+1),disabled:!0},q[t],".")),l.a.createElement(h.a,{flex:"1"},l.a.createElement("span",{className:"c-black font14"},l.a.createElement(R.a,{value:e.choice_text}))))}))),l.a.createElement("div",{className:L.a.action},!a.hideAction&&Te.map((function(e,t){return"up"===e.id&&1===a.key||"down"===e.id&&a.key===a.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return Ie(e)},className:e.icon}))})))),le&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},"选择题"),"(客观题,由系统自动评分,请设置标准答案)")),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"题干:")),l.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:J,onChange:function(e){return X(e)}}),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"答案选项:",l.a.createElement("span",{className:L.a.colorGray},"点击选项可设置正确答案"))),M.map((function(e,t){var r,i;return l.a.createElement("div",{className:L.a.choiceWrap,key:t},l.a.createElement(c.a,{title:"点击设置为标准答案",placement:"left"},l.a.createElement("div",{className:"".concat(L.a.answer," ").concat(W.includes(t)?L.a.activeAnswer:""),onClick:function(){W.includes(t)?K(W.filter((function(e){return e!==t}))):K([].concat(Object(E.a)(W),[t]))}},q[t])),l.a.createElement("div",{className:L.a.editorWrap},H===t?l.a.createElement(P.a,{id:"single-question-option-".concat(t),watch:!0,isFocus:!0,height:155,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){M[t]=e,B(M)}}):l.a.createElement("div",{className:L.a.htmlWrap,onClick:function(){return G(t)}},l.a.createElement(R.a,{value:e}))),1===(null===(r=n.editData)||void 0===r||null===(i=r.exercise)||void 0===i?void 0:i.exercise_status)&&l.a.createElement(l.a.Fragment,null,t>1&&l.a.createElement(c.a,{title:"删除"},l.a.createElement("i",{className:"".concat(L.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return B(M.filter((function(e,n){return n!==t})))}})),t<7&&t===M.length-1&&l.a.createElement(c.a,{title:"新增参考答案"},l.a.createElement("i",{className:"".concat(L.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return B([].concat(Object(E.a)(M),[""]))}}))))})),l.a.createElement("p",{className:"c-orange"},"温馨提示:点击选项输入框可设置答案;选中的选项即为正确答案,选择多个答案即为多选题"),l.a.createElement("p",{className:""},"分值:",l.a.createElement(g.a,{value:ee,max:1e4,min:0,onChange:function(e){te(e)}})," 分",l.a.createElement("span",{style:{marginLeft:"30px"},className:L.a.difficult},l.a.createElement("label",{style:{color:"red"}},"*")," 难度:",l.a.createElement(m.a.Group,{value:he,onChange:function(e){fe(e.target.value)}},l.a.createElement(m.a.Button,{value:1},"简单"),l.a.createElement(m.a.Button,{value:2},"适中"),l.a.createElement(m.a.Button,{value:3},"困难")))),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:"".concat(L.a.title)},"知识点:",l.a.createElement("span",{className:L.a.colorGray},"(所有自建知识点仅本人可见,被EduCoder平台审核通过为官方知识点后所有用户可见)")),l.a.createElement("div",{className:"mt5"},l.a.createElement(N.a,{selectvalues:null==a?void 0:a.tag_discipline_ids,value:ie,onChange:ae,subId:null===(Se=n.editData)||void 0===Se||null===(Ce=Se.exercise)||void 0===Ce?void 0:Ce.sub_discipline_id,knowledgeOptions:_e,onAddKnowledgeFinish:we})),l.a.createElement("div",{style:{marginTop:10}},l.a.createElement("span",{style:{marginRight:10}},"不允许学生重复答题"),l.a.createElement(p.a,{checked:ge,onChange:function(e){ve(e)}}))),l.a.createElement("aside",{className:"tr"},(-1!==k||a.question_id)&&l.a.createElement(f.a,{type:"default",onClick:function(){v(),ce(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){Ae()}},"保存"))))},Q=Object(C.a)((function(e){var t=e.problemset,n=e.loading;return{problemset:t,globalSetting:e.globalSetting,exercise:e.exercise,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(Y)),J=function(e,t){var n=e.problemset,i=e.exercise,a=(e.globalSetting,e.loading,e.dispatch),u=(e.onRef,e.editData),d=e.cancelAdd,h=void 0===d?function(){}:d,v=e.editKey,k=e.setEditKey,C=void 0===k?function(){}:k,A=e.addCallback,T=void 0===A?function(){}:A,I=(e.setIsClaer,Object(_.a)(e,["problemset","exercise","globalSetting","loading","dispatch","onRef","editData","cancelAdd","editKey","setEditKey","addCallback","setIsClaer"]),Object(s.useState)("")),D=Object(o.a)(I,2),j=D[0],M=D[1],B=Object(s.useState)(""),F=Object(o.a)(B,2),U=F[0],H=(F[1],Object(s.useState)("")),G=Object(o.a)(H,2),z=G[0],V=G[1],W=Object(s.useState)(),K=Object(o.a)(W,2),q=K[0],Y=K[1],Q=Object(s.useState)(!1),J=Object(o.a)(Q,2),X=J[0],Z=J[1],$=Object(s.useState)([]),ee=Object(o.a)($,2),te=ee[0],ne=ee[1],re=Object(s.useState)(1),ie=Object(o.a)(re,2),ae=ie[0],oe=ie[1],se=Object(s.useState)(!1),le=Object(o.a)(se,2),ce=le[0],ue=le[1],de=Object(S.i)(),he=Object(s.useState)([]),fe=Object(o.a)(he,2),pe=fe[0],me=fe[1],ge=function(e){me([].concat(Object(E.a)(pe),[Object(r.a)({},e)]))};Object(s.useEffect)((function(){var e;if(null==u||!u.question_title)return Z(!0),M(""),V(""),void Y(10);ue(!(null!=u&&u.repeat_answer)),M(null==u?void 0:u.question_title),V(null==u||null===(e=u.standard_answer)||void 0===e?void 0:e[0]),Y(q||(null==u?void 0:u.question_score)),ne(u.tag_discipline_ids),oe(null==u?void 0:u.difficulty)}),[n.editData,X]),Object(s.useEffect)((function(){var e,t=null!=i&&null!==(e=i.tagDisciplineData)&&void 0!==e&&e.tag_disciplines&&Array.isArray(i.tagDisciplineData.tag_disciplines)?i.tagDisciplineData.tag_disciplines:[];me(t)}),[i.tagDisciplineData]),Object(s.useEffect)((function(){function e(){return(e=Object(x.a)(w.a.mark((function e(){var t,n,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.H)({sub_discipline_id:null===(t=i.editData)||void 0===t||null===(n=t.exercise)||void 0===n?void 0:n.sub_discipline_id});case 2:r=e.sent,me(r.tag_disciplines);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}X&&function(){e.apply(this,arguments)}()}),[X]),Object(s.useImperativeHandle)(t,(function(){return{onSave:ye,isEdit:X}}));var ve,be,ye=function(){var e=Object(x.a)(w.a.mark((function e(){var t,n,o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(j){e.next=3;break}return y.b.info("请您输入题干"),e.abrupt("return",!1);case 3:if(!u.question_id){e.next=14;break}if(1!==(null==u?void 0:u.is_my)){e.next=8;break}b.a.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",onOk:function(){var e=Object(x.a)(w.a.mark((function e(){var t,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a({type:"exercise/editExerciseQuestion",payload:{id:u.question_id,question_title:j,question_type:4,question_score:q,standard_answers:[z],tag_discipline_ids:te,sub_discipline_id:null===(t=i.editData)||void 0===t||null===(n=t.exercise)||void 0===n?void 0:n.sub_discipline_id,difficulty:ae,is_cover:1,repeat_answer:!ce}});case 2:0===e.sent.status&&(C(-1),y.b.success("保存成功"),Z(!1),a({type:"exercise/editExercise",payload:Object(r.a)({},de)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){var e=Object(x.a)(w.a.mark((function e(){var t,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a({type:"exercise/editExerciseQuestion",payload:{id:u.question_id,question_title:j,question_type:4,question_score:q,standard_answers:[z],tag_discipline_ids:te,sub_discipline_id:null===(t=i.editData)||void 0===t||null===(n=t.exercise)||void 0===n?void 0:n.sub_discipline_id,difficulty:ae,repeat_answer:!ce}});case 2:0===e.sent.status&&(C(-1),y.b.success("保存成功"),Z(!1),a({type:"exercise/editExercise",payload:Object(r.a)({},de)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=12;break;case 8:return e.next=10,a({type:"exercise/editExerciseQuestion",payload:{id:u.question_id,question_title:j,question_type:4,question_score:q,standard_answers:[z],tag_discipline_ids:te,sub_discipline_id:null===(t=i.editData)||void 0===t||null===(n=t.exercise)||void 0===n?void 0:n.sub_discipline_id,difficulty:ae,repeat_answer:!ce}});case 10:0===e.sent.status&&(C(-1),y.b.success("保存成功"),Z(!1),a({type:"exercise/editExercise",payload:Object(r.a)({},de)}));case 12:e.next=18;break;case 14:return e.next=16,a({type:"exercise/addExerciseQuestion",payload:{insert_id:null==u?void 0:u.insert_id,categoryId:de.categoryId,exercise_bank_id:de.categoryId,question_title:j,question_type:4,question_score:q,standard_answers:[z],tag_discipline_ids:te,sub_discipline_id:null===(o=i.editData)||void 0===o||null===(s=o.exercise)||void 0===s?void 0:s.sub_discipline_id,difficulty:ae,repeat_answer:!ce}});case 16:0===e.sent.status&&(C(-1),y.b.success("保存成功"),Z(!1),a({type:"exercise/editExercise",payload:Object(r.a)({},de)}));case 18:return e.abrupt("return",{name:j,answer_texts:[z],analysis:U});case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),xe=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"(向下插入单选题)",icon:"iconfont c-light-primary ml30 icon-tianjia current",id:"add"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,n;return 1===(null==i||null===(t=i.editData)||void 0===t||null===(n=t.exercise)||void 0===n?void 0:n.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),Ee=function(){var e=Object(x.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===v){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?15:17;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(x.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:u.question_id});case 2:a({type:"exercise/editExercise",payload:Object(r.a)({},de)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",17);case 8:return e.next=10,a({type:"exercise/exeriseMoveUpDown",payload:{id:u.question_id,opr:t.id}});case 10:return a({type:"exercise/editExercise",payload:Object(r.a)({},de)}),e.abrupt("break",17);case 12:return C(u.dragKey),Z(!0),e.abrupt("break",17);case 15:return T({key:u.key,insert_id:null==u?void 0:u.question_id,question_type:4}),e.abrupt("break",17);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement("section",{className:L.a.wrap},!X&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},!(null!=u&&u.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},u.key,"、简答题"),"(",u.question_score,"分)")),null!=u&&u.isPreview?l.a.createElement("div",{style:{display:"flex"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},u.key,"."),l.a.createElement(R.a,{value:u.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",u.question_score,"分)")):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:u.question_title})),l.a.createElement("div",{className:L.a.questionChoices},l.a.createElement("p",null,l.a.createElement("strong",null,"参考答案:")),l.a.createElement(R.a,{value:z||""})),l.a.createElement("div",{className:L.a.action},!u.hideAction&&xe.map((function(e,t){return"up"===e.id&&1===u.key||"down"===e.id&&u.key===u.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return Ee(e)},className:e.icon}))})))),X&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},"主观题"),"(主观题,未作答的情况下自动评为零分)")),l.a.createElement(P.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:j,onChange:function(e){return M(e)}}),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.title},"参考答案:")),l.a.createElement(P.a,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"请您输入参考答案",defaultValue:z,onChange:function(e){return V(e)}}),l.a.createElement("p",{className:""},"分值:",l.a.createElement(g.a,{value:q,max:1e4,min:0,onChange:function(e){Y(e)}})," 分",l.a.createElement("span",{style:{marginLeft:"30px"},className:L.a.difficult},l.a.createElement("label",{style:{color:"red"}},"*")," 难度:",l.a.createElement(m.a.Group,{value:ae,onChange:function(e){oe(e.target.value)}},l.a.createElement(m.a.Button,{value:1},"简单"),l.a.createElement(m.a.Button,{value:2},"适中"),l.a.createElement(m.a.Button,{value:3},"困难")))),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:"".concat(L.a.title)},"知识点:",l.a.createElement("span",{className:L.a.colorGray},"(所有自建知识点仅本人可见,被EduCoder平台审核通过为官方知识点后所有用户可见)")),l.a.createElement("div",{className:"mt5"},l.a.createElement(N.a,{value:te,selectvalues:null==u?void 0:u.tag_discipline_ids,onChange:ne,subId:null===(ve=i.editData)||void 0===ve||null===(be=ve.exercise)||void 0===be?void 0:be.sub_discipline_id,knowledgeOptions:pe,onAddKnowledgeFinish:ge})),l.a.createElement("div",{style:{marginTop:10}},l.a.createElement("span",{style:{marginRight:10}},"不允许学生重复答题"),l.a.createElement(p.a,{checked:ce,onChange:function(e){ue(e)}}))),l.a.createElement("aside",{className:"tr"},(-1!==v||u.question_id)&&l.a.createElement(f.a,{type:"default",onClick:function(){h(),Z(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){ye()}},"保存"))))},X=Object(C.a)((function(e){var t=e.problemset,n=e.loading,r=e.exercise;return{problemset:t,globalSetting:e.globalSetting,exercise:r,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(J)),Z=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],$=function(e,t){e.problemset;var n=e.exercise,i=(e.globalSetting,e.loading,e.dispatch),a=(e.onRef,e.editData),u=(e.cancelAdd,e.editKey),d=(e.setEditKey,e.addCallback),h=void 0===d?function(){}:d,f=(e.setIsClaer,Object(_.a)(e,["problemset","exercise","globalSetting","loading","dispatch","onRef","editData","cancelAdd","editKey","setEditKey","addCallback","setIsClaer"]),Object(s.useState)([])),p=Object(o.a)(f,2),m=p[0],g=p[1],v=Object(s.useState)(),E=Object(o.a)(v,2),k=(E[0],E[1],Object(s.useState)([])),C=Object(o.a)(k,2),A=C[0],T=C[1],I=Object(s.useState)(""),D=Object(o.a)(I,2),N=D[0],j=D[1],M=Object(s.useState)(5),P=Object(o.a)(M,2),B=P[0],F=P[1],U=Object(s.useState)(!1),H=Object(o.a)(U,2),G=H[0],z=H[1],V=Object(S.g)(),W=Object(S.i)();Object(s.useEffect)((function(){g(["","","",""])}),[]),Object(s.useEffect)((function(){if(null==a||!a.question_choices)return z(!0),j(""),F(5),g(["","","",""]),void T([]);j(null==a?void 0:a.question_title),F(null==a?void 0:a.question_score),g(null==a?void 0:a.question_choices.map((function(e){return e.choice_text})));var e=[];null==a||a.standard_answer.map((function(t,n){e.push(t-1)})),T(e)}),[a]),Object(s.useImperativeHandle)(t,(function(){return{onSave:K,isEdit:G}}));var K=function(){var e=Object(x.a)(w.a.mark((function e(){var t,n,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N){e.next=3;break}return y.b.info("请您输入题目"),e.abrupt("return",!1);case 3:if(!((t=m.findIndex((function(e){return!e})))>-1)){e.next=7;break}return y.b.info("请先输入 ".concat(Z[t]," 选项的内容")),e.abrupt("return",!1);case 7:if(A.length){e.next=10;break}return y.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),e.abrupt("return",!1);case 10:if(!(A.length<1)){e.next=13;break}return y.b.info("请选择答案"),e.abrupt("return",!1);case 13:if(n=m.map((function(e,t){return{choice_text:e,is_answer:A.includes(t)?t+1:0}})),!a.question_id){e.next=20;break}return e.next=17,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:N,question_type:1,question_score:B,question_choices:n.map((function(e){return e.choice_text})),standard_answers:n.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer}))}});case 17:o=e.sent,e.next=23;break;case 20:return e.next=22,i({type:"exercise/addExerciseQuestion",payload:{insert_id:null==a?void 0:a.insert_id,categoryId:W.categoryId,question_title:N,question_type:1,question_score:"5.0",question_choices:n.map((function(e){return e.choice_text})),standard_answers:n.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer}))}});case 22:o=e.sent;case 23:0===o.status&&(y.b.success("保存成功"),z(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},W)}));case 24:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"(向下插入单选题)",icon:"iconfont c-light-primary ml30 icon-tianjia current",id:"add"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,r;return 1===(null==n||null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),Y=function(){var e=Object(x.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===u){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?14:16;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(x.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:a.question_id});case 2:i({type:"exercise/editExercise",payload:Object(r.a)({},W)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",16);case 8:return e.next=10,i({type:"exercise/exeriseMoveUpDown",payload:{id:a.question_id,opr:t.id}});case 10:return i({type:"exercise/editExercise",payload:Object(r.a)({},W)}),e.abrupt("break",16);case 12:return V.push("/problems/".concat(null==a?void 0:a.hack_identifier,"/edit?type=exercises&express_id=").concat(W.categoryId,"&question_id=").concat(null==a?void 0:a.question_id,"&score=").concat(null==a?void 0:a.question_score,"&exercise=true&callback_url=").concat(location.pathname)),e.abrupt("break",16);case 14:return h({key:a.key,insert_id:null==a?void 0:a.question_id,question_type:6}),e.abrupt("break",16);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement("section",{className:L.a.wrap},l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},!(null!=a&&a.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},a.key,"、编程题"),"(",a.question_score,"分)")),null!=a&&a.isPreview?l.a.createElement("div",{style:{display:"flex"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,"."),l.a.createElement(R.a,{value:a.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",a.question_score,"分)")):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:a.question_title})),l.a.createElement("div",{className:L.a.questionChoices},l.a.createElement(R.a,{value:a.description||""})),l.a.createElement("div",{className:L.a.action},!a.hideAction&&q.map((function(e,t){return"up"===e.id&&1===a.key||"down"===e.id&&a.key===a.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return Y(e)},className:e.icon}))})))))},ee=Object(C.a)((function(e){var t=e.problemset,n=e.loading;return{problemset:t,globalSetting:e.globalSetting,exercise:e.exercise,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)($)),te=n("LvDl"),ne=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],re=function(e,t){e.problemset;var n=e.exercise,i=(e.globalSetting,e.loading,e.dispatch),a=(e.onRef,e.editData),d=e.cancelAdd,p=void 0===d?function(){}:d,v=e.editKey,k=e.setEditKey,C=void 0===k?function(){}:k,A=(e.setIsClaer,e.addCallback),T=void 0===A?function(e){}:A,I=(Object(_.a)(e,["problemset","exercise","globalSetting","loading","dispatch","onRef","editData","cancelAdd","editKey","setEditKey","setIsClaer","addCallback"]),Object(s.useState)([])),D=Object(o.a)(I,2),j=D[0],M=D[1],B=Object(s.useState)(!1),F=Object(o.a)(B,2),U=F[0],H=F[1],G=Object(s.useState)(!0),z=Object(o.a)(G,2),V=z[0],W=z[1],K=Object(s.useState)(1),q=Object(o.a)(K,2),Y=q[0],Q=q[1],J=Object(s.useState)(!1),X=Object(o.a)(J,2),Z=X[0],$=X[1],ee=Object(s.useState)([]),re=Object(o.a)(ee,2),ie=re[0],ae=re[1],oe=Object(S.i)(),se=Object(s.useRef)(null),le=Object(s.useState)(""),ce=Object(o.a)(le,2),ue=ce[0],de=ce[1],he=Object(s.useState)([]),fe=Object(o.a)(he,2),pe=fe[0],me=fe[1],ge=function(e){ae([].concat(Object(E.a)(ie),[Object(r.a)({},e)]))};Object(s.useEffect)((function(){var e;if(null==a||!a.question_title)return H(!0),void de("");de(null==a?void 0:a.question_title),$(!(null!=a&&a.repeat_answer)),Q(null==a?void 0:a.difficulty),M(a.tag_discipline_ids);var t=null==a||null===(e=a.sub_exercise_questions)||void 0===e?void 0:e.map((function(e){var t,n,i;return Object(r.a)(Object(r.a)({},e),{},{id:e.question_id,name:e.question_title,open:!1,score:e.question_score,qusList:null==e||null===(t=e.question_choices)||void 0===t?void 0:t.map((function(e){return e.choice_text})),activeQusEditor:null,qusAnswer:null===(n=[null==e||null===(i=e.question_choices)||void 0===i?void 0:i.findIndex((function(e){return e.standard_boolean}))])||void 0===n?void 0:n.filter((function(e){return-1!==e}))})}));me(t)}),[a,U]),Object(s.useEffect)((function(){function e(){return(e=Object(x.a)(w.a.mark((function e(){var t,r,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.H)({sub_discipline_id:null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.sub_discipline_id});case 2:i=e.sent,ae(i.tag_disciplines);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}U&&function(){e.apply(this,arguments)}()}),[U]),Object(s.useEffect)((function(){var e,t=null!=n&&null!==(e=n.tagDisciplineData)&&void 0!==e&&e.tag_disciplines&&Array.isArray(n.tagDisciplineData.tag_disciplines)?n.tagDisciplineData.tag_disciplines:[];ae(t)}),[n.tagDisciplineData]),Object(s.useImperativeHandle)(t,(function(){return{onSave:xe,isEdit:U}}));var ve,be,ye,xe=function(){var e=Object(x.a)(w.a.mark((function e(){var t,o,s,l,c,u,d,h,f;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ue){e.next=3;break}return y.b.info("请您输入题干"),e.abrupt("return",!1);case 3:if(0!==pe.length){e.next=6;break}return y.b.info("请您添加小题"),e.abrupt("return",!1);case 6:t=0;case 7:if(!(t-1)){e.next=19;break}return y.b.info("请先输入第".concat(t+1,"小题").concat(ne[l],"选项的内容")),e.abrupt("return",!1);case 19:if(null!=s&&s.qusAnswer.length){e.next=22;break}return y.b.info("请设置第".concat(t+1,"小题的正确答案,点击选项A/B...即可完成设置")),e.abrupt("return",!1);case 22:t++,e.next=7;break;case 25:if(c=pe.map((function(e){var t;return{id:e.id>1?e.id:null,question_title:e.name,question_type:1,question_choices:e.qusList,question_score:e.score,standard_answers:[(null===(t=e.qusAnswer)||void 0===t?void 0:t[0])+1]}})),!a.question_id){e.next=35;break}if(1!==(null==a?void 0:a.is_my)){e.next=31;break}b.a.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",onOk:function(){var e=Object(x.a)(w.a.mark((function e(){var t,o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:ue,question_type:7,sub_questions:c,tag_discipline_ids:j,sub_discipline_id:null===(t=n.editData)||void 0===t||null===(o=t.exercise)||void 0===o?void 0:o.sub_discipline_id,difficulty:Y,is_cover:1,repeat_answer:!Z}});case 2:u=e.sent,0===(null===(s=u)||void 0===s?void 0:s.status)&&(C(-1),y.b.success("保存成功"),H(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},oe)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){var e=Object(x.a)(w.a.mark((function e(){var t,o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:ue,question_type:7,sub_questions:c,tag_discipline_ids:j,sub_discipline_id:null===(t=n.editData)||void 0===t||null===(o=t.exercise)||void 0===o?void 0:o.sub_discipline_id,difficulty:Y,repeat_answer:!Z}});case 2:u=e.sent,0===(null===(s=u)||void 0===s?void 0:s.status)&&(C(-1),y.b.success("保存成功"),H(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},oe)}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=35;break;case 31:return e.next=33,i({type:"exercise/editExerciseQuestion",payload:{id:a.question_id,question_title:ue,question_type:7,sub_questions:c,tag_discipline_ids:j,sub_discipline_id:null===(d=n.editData)||void 0===d||null===(h=d.exercise)||void 0===h?void 0:h.sub_discipline_id,difficulty:Y,repeat_answer:!Z}});case 33:u=e.sent,0===(null===(f=u)||void 0===f?void 0:f.status)&&(C(-1),y.b.success("保存成功"),H(!1),i({type:"exercise/editExercise",payload:Object(r.a)({},oe)}));case 35:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ee=[{name:"删除",icon:"iconfont c-light-black ml30 icon-shanchu current",id:"del"},{name:"编辑",icon:"iconfont c-light-primary ml30 icon-bianjishijuan3x current",id:"edit"}].filter((function(e){var t,r;return 1===(null==n||null===(t=n.editData)||void 0===t||null===(r=t.exercise)||void 0===r?void 0:r.exercise_status)?e:"del"!==e.id&&"add"!==e.id})),_e=function(){var e=Object(x.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===v){e.next=3;break}return y.b.error("请先保存或取消当前正在编辑的问题。"),e.abrupt("return");case 3:e.t0=t.id,e.next="del"===e.t0?6:"up"===e.t0||"down"===e.t0?8:"edit"===e.t0?12:"add"===e.t0?15:17;break;case 6:return b.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"确认要删除这个试题吗?",onOk:function(){return Object(x.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(O.m)({id:a.question_id});case 2:i({type:"exercise/editExercise",payload:Object(r.a)({},oe)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",17);case 8:return e.next=10,i({type:"exercise/exeriseMoveUpDown",payload:{id:a.question_id,opr:t.id}});case 10:return i({type:"exercise/editExercise",payload:Object(r.a)({},oe)}),e.abrupt("break",17);case 12:return C(a.dragKey),H(!0),e.abrupt("break",17);case 15:return T({key:a.key,insert_id:null==a?void 0:a.question_id,question_type:0}),e.abrupt("break",17);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ke=function(){var e={id:Math.random(),item_type:"SINGLE",open:!1,name:"",qusList:["","","",""],activeQusEditor:null,qusAnswer:[],analysis:""};me(pe.concat(e))},we=function(e,t,n){var r,i=Object(te.cloneDeep)(pe);("open"===e&&(i[t].open=!i[t].open),"delete"===e&&i.splice(t,1),"value"===e&&(i[t].name=n),"answer"===e&&(i[t].qusAnswer=[n]),"edit"===e&&(i[t].activeQusEditor=n),"details"===e&&(i[t].qusList[i[t].activeQusEditor]=n),"addQus"===e&&(i[t].qusList=i[t].qusList.concat("")),"deleteQus"===e)&&(i[t].qusList=i[t].qusList.filter((function(e,t){return t!==n})),i[t].qusAnswer=null===(r=i[t].qusAnswer)||void 0===r?void 0:r.filter((function(e){return e!==n})));"analysis"===e&&(i[t].analysis=n),"score"===e&&(i[t].score=n),me(i)};return l.a.createElement("section",{className:L.a.wrap},!U&&l.a.createElement("aside",{ref:se},l.a.createElement("div",{className:L.a.questionType},!(null!=a&&a.isPreview)&&l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},a.key,"、组合题"),"(",a.question_score,"分)")),null!=a&&a.isPreview?l.a.createElement("div",{style:{display:"flex",alignItems:"flex-start"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,"."),l.a.createElement(R.a,{value:a.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(共",null==a?void 0:a.sub_q_count,"小题,",a.question_score,"分)")):l.a.createElement("div",{className:"mt5"},l.a.createElement(R.a,{value:a.question_title})),l.a.createElement("div",{style:{display:V?"block":"none"},className:L.a.questionChoices},null==a||null===(ye=a.sub_exercise_questions)||void 0===ye?void 0:ye.map((function(e,t){var n;return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{style:{display:"flex",alignItems:"flex-start"}},l.a.createElement("span",{style:{flexShrink:0},className:"font18"},a.key,".",t+1,"(单选题)"),l.a.createElement(R.a,{value:e.question_title}),l.a.createElement("span",{style:{flexShrink:0},className:"font16"},"(",e.question_score,"分)")),null==e||null===(n=e.question_choices)||void 0===n?void 0:n.map((function(t,n){return l.a.createElement(u.a,{key:n},l.a.createElement(h.a,null,l.a.createElement(m.a,{key:n,checked:e.standard_answer.includes(n+1),disabled:!0},ne[n],".")),l.a.createElement(h.a,{flex:"1"},l.a.createElement("span",{className:"c-black font14"},l.a.createElement(R.a,{value:t.choice_text}))))})))}))),l.a.createElement("div",{className:L.a.action},l.a.createElement("span",{className:"c-light-primary current",onClick:function(){return W(!V)},style:{}},V?"收起":"展开"),!a.hideAction&&Ee.map((function(e,t){return"up"===e.id&&1===a.key||"down"===e.id&&a.key===a.len?null:l.a.createElement(c.a,{key:t,placement:"bottom",title:e.name},l.a.createElement("span",{onClick:function(){return _e(e)},className:e.icon}))})))),U&&l.a.createElement("aside",null,l.a.createElement("div",{className:L.a.questionType},l.a.createElement("div",null,l.a.createElement("span",{className:"font16 c-blue"},"选择题"),"(客观题,由系统自动评分,请设置标准答案)")),l.a.createElement("section",{className:L.a.wrap,style:{padding:0}},l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"题干:")),l.a.createElement(P.a,{id:"combination-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:ue,onChange:function(e){return de(e)}}),l.a.createElement("p",null,"小题数:",null==pe?void 0:pe.length),null==pe?void 0:pe.map((function(e,t){var n;return l.a.createElement("div",{className:L.a.fold,key:e.id},l.a.createElement("div",{onClick:function(){return we("open",t)},className:L.a.head},l.a.createElement("i",{className:"iconfont icon-sanjiaoxing",style:{transform:e.open?"initial":"rotate(270deg) translate(2px, 4px)"}}),l.a.createElement("span",null,"第",t+1,"小题(单选题)"),l.a.createElement("b",{onClick:function(e){e.stopPropagation(),we("delete",t)},className:"iconfont icon-shanchu8"})),l.a.createElement("div",{className:"mb10",style:{display:e.open?"block":"none"}},l.a.createElement(P.a,{watch:!0,height:155,placeholder:"请您输入题干",defaultValue:null==e?void 0:e.name,onChange:function(e){return we("value",t,e)}}),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:L.a.required},"*"),l.a.createElement("span",{className:L.a.title},"答案选项:",l.a.createElement("span",{className:L.a.colorGray},"点击选项可设置正确答案"))),null==e||null===(n=e.qusList)||void 0===n?void 0:n.map((function(n,r){var i,a;return l.a.createElement("div",{className:L.a.choiceWrap,key:r},l.a.createElement(c.a,{title:"点击设置为标准答案",placement:"left"},l.a.createElement("div",{className:"".concat(L.a.answer," ").concat(null!=e&&null!==(i=e.qusAnswer)&&void 0!==i&&i.includes(r)?L.a.activeAnswer:""),onClick:function(){return we("answer",t,r)}},ne[r])),l.a.createElement("div",{className:L.a.editorWrap},(null==e?void 0:e.activeQusEditor)===r?l.a.createElement(P.a,{id:"single-question-option-".concat(r),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:n,onChange:function(e){return we("details",t,e)}}):l.a.createElement("div",{className:L.a.htmlWrap,onClick:function(){return we("edit",t,r)}},l.a.createElement(R.a,{value:n}))),r>1&&l.a.createElement(c.a,{title:"删除"},l.a.createElement("i",{className:"".concat(L.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return we("deleteQus",t,r)}})),r<7&&r===(null==e||null===(a=e.qusList)||void 0===a?void 0:a.length)-1&&l.a.createElement(c.a,{title:"新增参考答案"},l.a.createElement("i",{className:"".concat(L.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return we("addQus",t)}})))})),l.a.createElement("p",{className:"mt10"},"分值:",l.a.createElement(g.a,{value:e.score,max:1e4,min:0,onChange:function(e){return we("score",t,e)}})," 分")))})),pe.length<20&&l.a.createElement(f.a,{type:"primary",onClick:ke},l.a.createElement("i",{className:"iconfont icon-tianjiatimu mr5 font14"}),"添加小题")),l.a.createElement("p",{className:"mt10"},l.a.createElement("span",{className:L.a.difficult},l.a.createElement("label",{style:{color:"red"}},"*")," 难度:",l.a.createElement(m.a.Group,{value:Y,onChange:function(e){Q(e.target.value)}},l.a.createElement(m.a.Button,{value:1},"简单"),l.a.createElement(m.a.Button,{value:2},"适中"),l.a.createElement(m.a.Button,{value:3},"困难")))),l.a.createElement("p",{className:L.a.titleWrap},l.a.createElement("span",{className:"".concat(L.a.title)},"知识点:",l.a.createElement("span",{className:L.a.colorGray},"(所有自建知识点仅本人可见,被EduCoder平台审核通过为官方知识点后所有用户可见)")),l.a.createElement("div",{className:"mt5"},l.a.createElement(N.a,{selectvalues:null==a?void 0:a.tag_discipline_ids,value:j,onChange:M,subId:null===(ve=n.editData)||void 0===ve||null===(be=ve.exercise)||void 0===be?void 0:be.sub_discipline_id,knowledgeOptions:ie,onAddKnowledgeFinish:ge}))),l.a.createElement("aside",{className:"tr"},(-1!==v||a.question_id)&&l.a.createElement(f.a,{type:"default",onClick:function(){p(),H(!1)}},"取消"),l.a.createElement(f.a,{className:"ml20",type:"primary",onClick:function(){xe()}},"保存"))))},ie=Object(C.a)((function(e){var t=e.problemset,n=e.loading;return{problemset:t,globalSetting:e.globalSetting,exercise:e.exercise,loading:n.effects}}),null,null,{forwardRef:!0})(Object(s.forwardRef)(re)),ae=n("ngQI"),oe=n("loLm"),se=n.n(oe);t.a=function(e){var t,n,s,c,u,d,h,f,p,m,g,v,b,y,x,E,_,k,w=e.data,S=e.isDragDisabled,C=void 0!==S&&S,O=e.editorProps,A=void 0===O?{}:O,T=e.onDragEnd,I=void 0===T?function(){}:T,D=function(e,t,n){if(e.destination){var r=function(e,t,n){var r=Array.from(e),i=r.splice(t,1),a=Object(o.a)(i,1)[0];return r.splice(n,0,a),r}(t,e.source.index,e.destination.index);I(r,n)}},L=function(e,t,n){return l.a.createElement(ae.a,{onDragEnd:function(n){return D(n,e,t)}},l.a.createElement(ae.c,{droppableId:"droppable"},(function(n,o){return l.a.createElement("div",Object(a.a)({ref:n.innerRef},n.droppableProps,{style:{width:"100%"}}),null==e?void 0:e.map((function(e,n){var o,s=Object(r.a)(Object(r.a)({},e),{},{key:n+1,hideAction:!0,isPreview:!0,dragKey:t+"-"+n},A);return l.a.createElement(ae.b,{key:null==s?void 0:s.question_id,draggableId:null==s||null===(o=s.question_id)||void 0===o?void 0:o.toString(),index:n,isDragDisabled:C},(function(e,n){return l.a.createElement("aside",Object(a.a)({ref:e.innerRef},e.draggableProps,e.dragHandleProps),l.a.createElement("div",{className:se.a.posWarp,id:s.dragKey},function(e,t){return 0===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(Q,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):1===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(z,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):2===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(U,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):3===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(M,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):4===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(X,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):5===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(K,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):6===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(ee,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):7===t?l.a.createElement(l.a.Fragment,null,l.a.createElement(ie,Object(a.a)({editData:e},e)),l.a.createElement(i.a,null)):void 0}(s,t),!C&&l.a.createElement("div",{className:se.a.pos},l.a.createElement("div",{className:se.a.tips},"拖动可以改变试题显示顺序"))))}))})))})))};return l.a.createElement("div",null," ",(k=[{name:"单选题",type:0,count:null==w||null===(n=w.exercise_types)||void 0===n?void 0:n.q_singles,score:null==w||null===(s=w.exercise_types)||void 0===s?void 0:s.q_singles_scores,items:[]},{name:"多选题",type:1,count:null==w||null===(c=w.exercise_types)||void 0===c?void 0:c.q_doubles,score:null==w||null===(u=w.exercise_types)||void 0===u?void 0:u.q_doubles_scores,items:[]},{name:"判断题",type:2,count:null==w||null===(d=w.exercise_types)||void 0===d?void 0:d.q_judges,score:null==w||null===(h=w.exercise_types)||void 0===h?void 0:h.q_judges_scores,items:[]},{name:"填空题",type:3,count:null==w||null===(f=w.exercise_types)||void 0===f?void 0:f.q_nulls,score:null==w||null===(p=w.exercise_types)||void 0===p?void 0:p.q_nulls_scores,items:[]},{name:"简答题",type:4,count:null==w||null===(m=w.exercise_types)||void 0===m?void 0:m.q_mains,score:null==w||null===(g=w.exercise_types)||void 0===g?void 0:g.q_mains_scores,items:[]},{name:"实训题",type:5,count:null==w||null===(v=w.exercise_types)||void 0===v?void 0:v.q_shixuns,score:null==w||null===(b=w.exercise_types)||void 0===b?void 0:b.q_shixuns_scores,items:[]},{name:"编程题",type:6,count:null==w||null===(y=w.exercise_types)||void 0===y?void 0:y.q_pros,score:null==w||null===(x=w.exercise_types)||void 0===x?void 0:x.q_pros_scores,items:[]},{name:"组合题",type:7,count:null==w||null===(E=w.exercise_types)||void 0===E?void 0:E.q_combinations,score:null==w||null===(_=w.exercise_types)||void 0===_?void 0:_.q_combination_scores,items:[]}],null==w||null===(t=w.exercise_questions)||void 0===t||t.forEach((function(e,t){var n,r,i,a,o,s,l,c,u,d,h,f,p,m,g,v;0===e.question_type&&(null===(n=k[e.question_type])||void 0===n||null===(r=n.items)||void 0===r||r.push(e)),1===e.question_type&&(null===(i=k[e.question_type])||void 0===i||null===(a=i.items)||void 0===a||a.push(e)),2===e.question_type&&(null===(o=k[e.question_type])||void 0===o||null===(s=o.items)||void 0===s||s.push(e)),3===e.question_type&&(null===(l=k[e.question_type])||void 0===l||null===(c=l.items)||void 0===c||c.push(e)),4===e.question_type&&(null===(u=k[e.question_type])||void 0===u||null===(d=u.items)||void 0===d||d.push(e)),5===e.question_type&&(null===(h=k[e.question_type])||void 0===h||null===(f=h.items)||void 0===f||f.push(e)),6===e.question_type&&(null===(p=k[e.question_type])||void 0===p||null===(m=p.items)||void 0===m||m.push(e)),7===e.question_type&&(null===(g=k[e.question_type])||void 0===g||null===(v=g.items)||void 0===v||v.push(e))})),null==w?void 0:w.map((function(e,t){return l.a.createElement(l.a.Fragment,{key:t},l.a.createElement("div",{className:"pl20"},l.a.createElement("span",{className:"font16 c-light-primary"},function(e){var t=["零","一","二","三","四","五","六","七","八","九"],n=["","十","百","千","万"];e=parseInt(e);var r=function(e){for(var r=e.toString().split("").reverse(),i="",a=0;a0&&0==r[a]&&0==r[a-1]?"":t[r[a]]+(0==r[a]?n[0]:n[a]))+i;return i},i=Math.floor(e/1e4),a=e%1e4;return a.toString().length<4&&(a="0"+a),i?r(i)+"万"+r(a):r(e)}(t+1),"、",e.name),l.a.createElement("span",{className:"c-grey-999"},"(共",e.count,"题",7===(null==e?void 0:e.question_type)?",包含".concat(e.sub_count,"小题"):"",";共",e.score,"分)")),L(e.items,null==e?void 0:e.question_type,null==e||e.name))})))," ")}},LdHM: +/*!********************************************************!*\ + !*** ./node_modules/rc-select/es/index.js + 6 modules ***! + \********************************************************/ +/*! exports provided: Option, OptGroup, default */ +/*! exports used: OptGroup, Option, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.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-select/es/TransBtn.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/pickAttrs.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/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";n.d(t,"b",(function(){return E})),n.d(t,"a",(function(){return k}));var r=n("1OyB"),i=n("vuIU"),a=n("Ji7U"),o=n("LK+K"),s=n("q1tI"),l=n("rePB"),c=n("Ff2n"),u=n("ODXe"),d=n("4IlW"),h=n("bX4T"),f=n("YrtM"),p=n("TSYQ"),m=n.n(p),g=n("+nKL"),v=n("8OUc"),b=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,i=e.flattenOptions,a=e.childrenAsData,o=e.values,p=e.searchValue,b=e.multiple,y=e.defaultActiveFirstOption,x=e.height,E=e.itemHeight,_=e.notFoundContent,k=e.open,w=e.menuItemSelectedIcon,S=e.virtual,C=e.onSelect,O=e.onToggleOpen,A=e.onActiveValue,T=e.onScroll,I=e.onMouseEnter,D="".concat(n,"-item"),L=Object(f.a)((function(){return i}),[k,i],(function(e,t){return t[0]&&e[1]!==t[1]})),R=s.useRef(null),N=function(e){e.preventDefault()},j=function(e){R.current&&R.current.scrollTo({index:e})},M=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=L.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];return Object(S.a)(e).map((function(e,n){if(!s.isValidElement(e)||!e.type)return null;var r=e.type.isSelectOptGroup,i=e.key,a=e.props,o=a.children,l=Object(c.a)(a,["children"]);return t||!r?C(e):Object(w.a)(Object(w.a)({key:"__RC_SELECT_GRP__".concat(null===i?n:i,"__"),label:i},l),{},{options:O(o)})})).filter((function(e){return e}))}var A=n("2Qr1"),T=n("qNPg"),I=n("U8pU"),D=n("Kwbf"),L=n("WKfj");var R=function(e){var t=e.mode,n=e.options,r=e.children,i=e.backfill,a=e.allowClear,o=e.placeholder,l=e.getInputElement,c=e.showSearch,u=e.onSearch,d=e.defaultOpen,h=e.autoFocus,f=e.labelInValue,p=e.value,m=e.inputValue,g=e.optionLabelProp,v="multiple"===t||"tags"===t,b=void 0!==c?c:v||"combobox"===t,y=n||O(r);if(Object(D.a)("tags"!==t||y.every((function(e){return!e.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===t||"combobox"===t){var x=y.some((function(e){return e.options?e.options.some((function(e){return"number"==typeof("value"in e?e.value:e.key)})):"number"==typeof("value"in e?e.value:e.key)}));Object(D.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(D.a)("combobox"!==t||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(D.a)("combobox"===t||!i,"`backfill` only works with `combobox` mode."),Object(D.a)("combobox"===t||!l,"`getInputElement` only work with `combobox` mode."),Object(D.b)("combobox"!==t||!l||!a||!o,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!b&&"combobox"!==t&&"tags"!==t&&Object(D.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(D.b)(!d||h,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=p){var E=Object(L.d)(p);Object(D.a)(!f||E.every((function(e){return"object"===Object(I.a)(e)&&("key"in e||"value"in e)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(D.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var _=null;Object(S.a)(r).some((function(e){if(!s.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(S.a)(e.props.children).every((function(t){return!(s.isValidElement(t)&&e.type&&!t.type.isSelectOption)||(_=t.type,!1)})):(_=t,!0))})),_&&Object(D.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(_.displayName||_.name||_,"`.")),Object(D.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},N=Object(T.a)({prefixCls:"rc-select",components:{optionList:y},convertChildrenToData:O,flattenOptions:A.d,getLabeledValue:A.e,filterOptions:A.b,isValueDisabled:A.g,findValueOption:A.c,warningProps:R,fillOptionsWithMissingValue:A.a}),j=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).selectRef=s.createRef(),e.focus=function(){e.selectRef.current.focus()},e.blur=function(){e.selectRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return s.createElement(N,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);j.Option=E,j.OptGroup=k;var M=j;t.c=M},M8RZ: +/*!**********************************!*\ + !*** ./src/components/modal.tsx ***! + \**********************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! react-dom */"i8i4"),u=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;Object(r.a)(this,n),i=t.call(this,e);var a=window.document;return i.node=a.createElement("div"),a.body.appendChild(i.node),i}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props.children;return Object(c.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(l.a.Component)},MEGo: +/*!***************************************************!*\ + !*** ./node_modules/zrender/lib/tool/parseSVG.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../container/Group */"4fz+"),i=n(/*! ../graphic/Image */"Dagg"),a=n(/*! ../graphic/Text */"dqUG"),o=n(/*! ../graphic/shape/Circle */"2fw6"),s=n(/*! ../graphic/shape/Rect */"x6Kt"),l=n(/*! ../graphic/shape/Ellipse */"rmlV"),c=n(/*! ../graphic/shape/Line */"yxFR"),u=n(/*! ../graphic/Path */"y+Vt"),d=n(/*! ../graphic/shape/Polygon */"h7HQ"),h=n(/*! ../graphic/shape/Polyline */"1Jh7"),f=n(/*! ../graphic/LinearGradient */"SKnc"),p=n(/*! ../graphic/Style */"K2GJ"),m=n(/*! ../core/matrix */"Fofx"),g=n(/*! ./path */"NC18").createFromString,v=n(/*! ../core/util */"bYtY"),b=v.isString,y=v.extend,x=v.defaults,E=v.trim,_=v.each,k=/[\s,]+/;function w(e){b(e)&&(e=(new DOMParser).parseFromString(e,"text/xml"));for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}function S(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}S.prototype.parse=function(e,t){t=t||{};var n=w(e);if(!n)throw new Error("Illegal svg");var i=new r;this._root=i;var a=n.getAttribute("viewBox")||"",o=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(o)&&(o=null),isNaN(l)&&(l=null),D(n,i,null,!0);for(var c,u,d=n.firstChild;d;)this._parseNode(d,i),d=d.nextSibling;if(a){var h=E(a).split(k);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&null!=o&&null!=l&&(u=M(c,o,l),!t.ignoreViewBox)){var f=i;(i=new r).add(f),f.scale=u.scale.slice(),f.position=u.position.slice()}return t.ignoreRootClip||null==o||null==l||i.setClipPath(new s({shape:{x:0,y:0,width:o,height:l}})),{root:i,width:o,height:l,viewBoxRect:c,viewBoxTransform:u}},S.prototype._parseNode=function(e,t){var n,r,i=e.nodeName.toLowerCase();if("defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0),this._isDefine){if(r=O[i]){var a=r.call(this,e),o=e.getAttribute("id");o&&(this._defs[o]=a)}}else(r=C[i])&&(n=r.call(this,e,t),t.add(n));for(var s=e.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},S.prototype._parseText=function(e,t){if(1===e.nodeType){var n=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(r)}var i=new a({style:{text:e.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});A(t,i),D(e,i,this._defs);var o=i.style.fontSize;o&&o<9&&(i.style.fontSize=9,i.scale=i.scale||[1,1],i.scale[0]*=o/9,i.scale[1]*=o/9);var s=i.getBoundingRect();return this._textX+=s.width,t.add(i),i};var C={g:function(e,t){var n=new r;return A(t,n),D(e,n,this._defs),n},rect:function(e,t){var n=new s;return A(t,n),D(e,n,this._defs),n.setShape({x:parseFloat(e.getAttribute("x")||0),y:parseFloat(e.getAttribute("y")||0),width:parseFloat(e.getAttribute("width")||0),height:parseFloat(e.getAttribute("height")||0)}),n},circle:function(e,t){var n=new o;return A(t,n),D(e,n,this._defs),n.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),r:parseFloat(e.getAttribute("r")||0)}),n},line:function(e,t){var n=new c;return A(t,n),D(e,n,this._defs),n.setShape({x1:parseFloat(e.getAttribute("x1")||0),y1:parseFloat(e.getAttribute("y1")||0),x2:parseFloat(e.getAttribute("x2")||0),y2:parseFloat(e.getAttribute("y2")||0)}),n},ellipse:function(e,t){var n=new l;return A(t,n),D(e,n,this._defs),n.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),rx:parseFloat(e.getAttribute("rx")||0),ry:parseFloat(e.getAttribute("ry")||0)}),n},polygon:function(e,t){var n=e.getAttribute("points");n&&(n=T(n));var r=new d({shape:{points:n||[]}});return A(t,r),D(e,r,this._defs),r},polyline:function(e,t){var n=new u;A(t,n),D(e,n,this._defs);var r=e.getAttribute("points");return r&&(r=T(r)),new h({shape:{points:r||[]}})},image:function(e,t){var n=new i;return A(t,n),D(e,n,this._defs),n.setStyle({image:e.getAttribute("xlink:href"),x:e.getAttribute("x"),y:e.getAttribute("y"),width:e.getAttribute("width"),height:e.getAttribute("height")}),n},text:function(e,t){var n=e.getAttribute("x")||0,i=e.getAttribute("y")||0,a=e.getAttribute("dx")||0,o=e.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new r;return A(t,s),D(e,s,this._defs),s},tspan:function(e,t){var n=e.getAttribute("x"),i=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||0,o=e.getAttribute("dy")||0,s=new r;return A(t,s),D(e,s,this._defs),this._textX+=a,this._textY+=o,s},path:function(e,t){var n=e.getAttribute("d")||"",r=g(n);return A(t,r),D(e,r,this._defs),r}},O={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||0,10),n=parseInt(e.getAttribute("y1")||0,10),r=parseInt(e.getAttribute("x2")||10,10),i=parseInt(e.getAttribute("y2")||0,10),a=new f(t,n,r,i);return function(e,t){var n=e.firstChild;for(;n;){if(1===n.nodeType){var r=n.getAttribute("offset");r=r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var i=n.getAttribute("stop-color")||"#000000";t.addColorStop(r,i)}n=n.nextSibling}}(e,a),a},radialgradient:function(e){}};function A(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),x(t.__inheritedStyle,e.__inheritedStyle))}function T(e){for(var t=E(e).split(k),n=[],r=0;r0;a-=2){var o=i[a],s=i[a-1];switch(r=r||m.create(),s){case"translate":o=E(o).split(k),m.translate(r,r,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=E(o).split(k),m.scale(r,r,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=E(o).split(k),m.rotate(r,r,parseFloat(o[0]));break;case"skew":o=E(o).split(k),console.warn("Skew transform is not supported yet");break;case"matrix":o=E(o).split(k);r[0]=parseFloat(o[0]),r[1]=parseFloat(o[1]),r[2]=parseFloat(o[2]),r[3]=parseFloat(o[3]),r[4]=parseFloat(o[4]),r[5]=parseFloat(o[5])}}t.setLocalTransform(r)}}(e,t),y(i,function(e){var t=e.getAttribute("style"),n={};if(!t)return n;var r,i={};j.lastIndex=0;for(;null!=(r=j.exec(t));)i[r[1]]=r[2];for(var a in I)I.hasOwnProperty(a)&&null!=i[a]&&(n[I[a]]=i[a]);return n}(e)),!r))for(var o in I)if(I.hasOwnProperty(o)){var s=e.getAttribute(o);null!=s&&(i[I[o]]=s)}var l=a?"textFill":"fill",c=a?"textStroke":"stroke";t.style=t.style||new p;var u=t.style;null!=i.fill&&u.set(l,R(i.fill,n)),null!=i.stroke&&u.set(c,R(i.stroke,n)),_(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){var t="lineWidth"===e&&a?"textStrokeWidth":e;null!=i[e]&&u.set(t,parseFloat(i[e]))})),i.textBaseline&&"auto"!==i.textBaseline||(i.textBaseline="alphabetic"),"alphabetic"===i.textBaseline&&(i.textBaseline="bottom"),"start"===i.textAlign&&(i.textAlign="left"),"end"===i.textAlign&&(i.textAlign="right"),_(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(e){null!=i[e]&&u.set(e,i[e])})),i.lineDash&&(t.style.lineDash=E(i.lineDash).split(k)),u[c]&&"none"!==u[c]&&(t[c]=!0),t.__inheritedStyle=i}var L=/url\(\s*#(.*?)\)/;function R(e,t){var n=t&&e&&e.match(L);return n?t[E(n[1])]:e}var N=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var j=/([^\s:;]+)\s*:\s*([^:;]+)/g;function M(e,t,n){var r=t/e.width,i=n/e.height,a=Math.min(r,i);return{scale:[a,a],position:[-(e.x+e.width/2)*a+t/2,-(e.y+e.height/2)*a+n/2]}}t.parseXML=w,t.makeViewBoxTransform=M,t.parseSVG=function(e,t){return(new S).parse(e,t)}},MKOG: +/*!*********************************************************!*\ + !*** ./node_modules/zrender/lib/animation/Animation.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ../core/event */"YH21").Dispatcher,a=n(/*! ./requestAnimationFrame */"mLcG"),o=n(/*! ./Animator */"Bq2U"),s=function(e){e=e||{},this.stage=e.stage||{},this.onframe=e.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,i.call(this)};s.prototype={constructor:s,addClip:function(e){this._clips.push(e)},addAnimator:function(e){e.animation=this;for(var t=e.getClips(),n=0;n=0&&this._clips.splice(t,1)},removeAnimator:function(e){for(var t=e.getClips(),n=0;n1&&(u*=o(x),f*=o(x));var E=(i===a?-1:1)*o((u*u*(f*f)-u*u*(y*y)-f*f*(b*b))/(u*u*(y*y)+f*f*(b*b)))||0,_=E*u*y/f,k=E*-f*b/u,w=(e+n)/2+l(v)*_-s(v)*k,S=(t+r)/2+s(v)*_+l(v)*k,C=h([1,0],[(b-_)/u,(y-k)/f]),O=[(b-_)/u,(y-k)/f],A=[(-1*b-_)/u,(-1*y-k)/f],T=h(O,A);d(O,A)<=-1&&(T=c),d(O,A)>=1&&(T=0),0===a&&T>0&&(T-=2*c),1===a&&T<0&&(T+=2*c),g.addData(m,w,S,u,f,C,T,v,a)}var p=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,m=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function g(e,t){var n=function(e){if(!e)return new i;for(var t,n=0,r=0,a=n,o=r,s=new i,l=i.CMD,c=e.match(p),u=0;u1&&void 0!==arguments[1]?arguments[1]:60,n=null;return function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o=0;c-=1){(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var i=!0,s=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);i&&!n&&(i=!1),s||!n&&!o.has(t)||(s=!0)})),i&&a.add(t.key),s&&o.add(t.key),l.add(t.key)}}))}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(i(o,a))}}(c,u,d,s):function(e,t,n,r,a){for(var o=new Set(e),s=new Set(t),l=0;l<=r;l+=1){(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,i=void 0===r?[]:r;o.has(t)||s.has(t)||a(n)||i.filter((function(e){return!a(e.node)})).forEach((function(e){o.delete(e.key)}))}))}s=new Set;for(var c=new Set,u=r;u>=0;u-=1){(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!a(n)&&e.parent&&!c.has(e.parent.key))if(a(e.parent.node))c.add(t.key);else{var r=!0,i=!1;(t.children||[]).filter((function(e){return!a(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);r&&!n&&(r=!1),i||!n&&!s.has(t)||(i=!0)})),r||o.delete(t.key),i&&s.add(t.key),c.add(t.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(i(s,o))}}(c,t.halfCheckedKeys,u,d,s)}},O2Wb: +/*!******************************************************************!*\ + !*** ./src/components/Editor/NullChildEditor/index.less?modules ***! + \******************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex:"flex___2gmSR",flex1:"flex1___3Tu1g",color666:"color666___2uyGL",error:"error___yJ86W",deleteIcon:"deleteIcon___1D2tg",addIcon:"addIcon___2VIYB"}},OLES: +/*!*********************************************************!*\ + !*** ./node_modules/rc-tooltip/es/index.js + 2 modules ***! + \*********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tooltip/es/placements.js because of ./node_modules/antd/es/tooltip/placements.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/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("U8pU"),i=n("VTBJ"),a=n("Ff2n"),o=n("q1tI"),s=n("uciX"),l=n("7ixt"),c=function(e){var t=e.overlay,n=e.prefixCls,r=e.id,i=e.overlayInnerStyle;return o.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:i},"function"==typeof t?t():t)},u=Object(o.forwardRef)((function(e,t){var n=e.overlayClassName,u=e.trigger,d=void 0===u?["hover"]:u,h=e.mouseEnterDelay,f=void 0===h?0:h,p=e.mouseLeaveDelay,m=void 0===p?.1:p,g=e.overlayStyle,v=e.prefixCls,b=void 0===v?"rc-tooltip":v,y=e.children,x=e.onVisibleChange,E=e.afterVisibleChange,_=e.transitionName,k=e.animation,w=e.placement,S=void 0===w?"right":w,C=e.align,O=void 0===C?{}:C,A=e.destroyTooltipOnHide,T=void 0!==A&&A,I=e.defaultVisible,D=e.getTooltipContainer,L=e.overlayInnerStyle,R=Object(a.a)(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),N=Object(o.useRef)(null);Object(o.useImperativeHandle)(t,(function(){return N.current}));var j=Object(i.a)({},R);"visible"in e&&(j.popupVisible=e.visible);var M=!1,P=!1;if("boolean"==typeof T)M=T;else if(T&&"object"===Object(r.a)(T)){var B=T.keepParent;M=!0===B,P=!1===B}return o.createElement(s.a,Object.assign({popupClassName:n,prefixCls:b,popup:function(){var t=e.arrowContent,n=void 0===t?null:t,r=e.overlay,i=e.id;return[o.createElement("div",{className:"".concat(b,"-arrow"),key:"arrow"},n),o.createElement(c,{key:"content",prefixCls:b,id:i,overlay:r,overlayInnerStyle:L})]},action:d,builtinPlacements:l.a,popupPlacement:S,ref:N,popupAlign:O,getPopupContainer:D,onPopupVisibleChange:x,afterPopupVisibleChange:E,popupTransitionName:_,popupAnimation:k,defaultPopupVisible:I,destroyPopupOnHide:M,autoDestroy:P,mouseLeaveDelay:m,popupStyle:g,mouseEnterDelay:f},j),y)}));t.a=u},OS9S: +/*!********************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/IncrementalDisplayable.js ***! + \********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY").inherits,i=n(/*! ./Displayable */"Gev7"),a=n(/*! ../core/BoundingRect */"mFDi");function o(e){i.call(this,e),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}o.prototype.incremental=!0,o.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},o.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.dirty()},o.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n=0&&n.splice(r,1),n}function s(e,t){var n=e.slice();return-1===n.indexOf(t)&&n.push(t),n}function l(e){return e.split("-")}function c(e,t){return"".concat(e,"-").concat(t)}function u(e){return e&&e.type&&e.type.isTreeNode}function d(e,t){var n=[e];return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var r=t.key,i=t.children;n.push(r),e(i)}))}(t[e].children),n}function h(e,t){var n=e.clientY,r=t.selectHandle.getBoundingClientRect(),i=r.top,a=r.bottom,o=r.height,s=Math.max(.25*o,2);return n<=i+s?-1:n>=a-s?1:0}function f(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function p(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==Object(i.a)(e))return Object(a.a)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function m(e,t){var n=new Set;return(e||[]).forEach((function(e){!function e(r){if(!n.has(r)){var i=t[r];if(i){n.add(r);var a=i.parent;i.node.disabled||a&&e(a.key)}}}(e)})),Object(r.a)(n)}function g(e){var t={};return Object.keys(e).forEach((function(n){(n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n])})),t}},Ohmc: +/*!*******************************************!*\ + !*** ./src/assets/images/certificate.jpg ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/certificate.fc32dc1b.jpg"},Ot1p: +/*!**************************************************************!*\ + !*** ./src/components/markdown-editor/index.tsx + 6 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./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/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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/RenderHtml/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ +/*! 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/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ +/*! 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(e,t,n){"use strict";n("2qtc");var r=n("kLXV"),i=n("rAM+"),a=(n("miYZ"),n("tsqr")),o=n("9og8"),s=n("tJVT"),l=n("jrin"),c=n("WmNS"),u=n.n(c),d=n("q1tI"),h=n.n(d),f=n("VrN/"),p=n.n(f),m=n("bdgK"),g=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),v=function(e){var t=e.value,n=void 0===t?"":t,r=(e.className,e.showTextOnly,e.showLines,e.style,Object(d.useMemo)((function(){return""}),[n]));return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},b=n("0Owb"),y=(n("dejd"),n("C+DQ"),n("1vsH")),x=n("m3rI"),E=[{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 _(e){var t=e.onActionCallback,n=e.title,r=e.icon,i=e.actionName,a=e.className,o=void 0===a?"":a,s=e.children;return h.a.createElement("a",{title:n,className:o,onClick:function(){t(i)}},h.a.createElement("i",{className:"md-iconfont ".concat(r)}),s)}var k=function(e){var t=e.watch,n=e.showNullButton,r=e.onActionCallback,i=e.fullScreen,a=e.insertTemp,o=e.hidetoolBar,s=e.uuid;e.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(y.D)("_educoder_session_login"),"&_educoder_session=").concat(Object(y.D)("_educoder_session"),"&key=").concat(s,"&api=").concat(encodeURIComponent(x.a.PROXY_SERVER)));var l=[].concat(E,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return h.a.createElement("ul",{className:"markdown-toolbar-container"},!o&&l.map((function(e,t){return h.a.createElement("li",{key:t},e.actionName?h.a.createElement(_,Object(b.a)({},e,{onActionCallback:r})):h.a.createElement("span",{className:"v-line"}))})),n?h.a.createElement("li",null,h.a.createElement(_,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r},h.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,a&&h.a.createElement("li",null,h.a.createElement(_,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:r},h.a.createElement("span",{className:"fill-tip"},"插入模板"))),h.a.createElement("li",{className:"btn-full-screen"},h.a.createElement(_,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},w=n("M8RZ"),S=(n("+L6B"),n("2/Rp")),C=(n("y8nQ"),n("Vl3Y")),O=(n("5NDa"),n("5rEg")),A={labelCol:{span:4},wrapperCol:{span:20}},T=function(e){var t=e.callback,n=e.onCancel;return h.a.createElement(C.a,Object(b.a)({},A,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)}}),h.a.createElement(C.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},h.a.createElement(O.a,null)),h.a.createElement(C.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},h.a.createElement(O.a,null)),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),h.a.createElement(S.a,{type:"ghost",onClick:n},"取消")))},I=n("7ahc"),D=n("k1fw"),L=(n("HmJG"),n("BjJ7")),R=C.a.useForm,N={width:280,marginRight:10},j={labelCol:{span:5},wrapperCol:{span:19}},M=function(e){var t=e.callback,n=e.onCancel,r=R(),i=Object(s.a)(r,1)[0],a=Object(d.useRef)();function o(e,t){i.setFieldsValue({src:"/api/attachments/".concat(e.id,"?type=").concat(e.content_type),type:t.type})}return h.a.createElement(C.a,Object(b.a)({form:i},j,{className:"upload-image-panel",onFinish:function(e){t(Object(D.a)(Object(D.a)({},e),{},{name:a.current}))}}),h.a.createElement(C.a.Item,{label:"文件地址",required:!0},h.a.createElement("div",{className:"flex-container"},h.a.createElement(C.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},h.a.createElement(O.a,{style:N})),h.a.createElement(P,{onFileChange:function(e){var t=e.target.files[0];a.current=t.name,B(t,o)}}))),h.a.createElement(C.a.Item,{label:"文件描述",name:"alt"},h.a.createElement(O.a,{style:{width:264}})),h.a.createElement(C.a.Item,{style:{textAlign:"right"}},h.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),h.a.createElement(S.a,{type:"ghost",onClick:n},"取消")))};function P(e){var t=e.onFileChange;return h.a.createElement("a",{className:"upload-button"},"本地上传",h.a.createElement("input",{type:"file",onChange:t}))}function B(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),r.addEventListener("error",(function(e){console.error(e)}),!1),r.open("POST","".concat(L.a,"/api/attachments.json")),r.send(n)}n("giR+");var F,U,H=n("fyUT"),G=(n("7Kak"),n("9yH6")),z=G.a.Group,V={margin:"0 8px"},W=function(e){var t=e.callback,n=e.onCancel;return h.a.createElement(C.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)}},h.a.createElement("div",{className:"flex-container"},h.a.createElement("span",{style:V},"单元格数:"),h.a.createElement("span",{style:V},"行数"),h.a.createElement(C.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},h.a.createElement(H.a,null)),h.a.createElement("span",{style:V},"列数"),h.a.createElement(C.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},h.a.createElement(H.a,null))),h.a.createElement("div",{className:"flex-container",style:{marginTop:12}},h.a.createElement("span",{style:V},"对齐方式:"),h.a.createElement(C.a.Item,{name:"align"},h.a.createElement(z,null,h.a.createElement(G.a,{value:"default"},h.a.createElement("i",{className:"fa fa-align-justify"})),h.a.createElement(G.a,{value:"left"},h.a.createElement("i",{className:"fa fa-align-left"})),h.a.createElement(G.a,{value:"center"},h.a.createElement("i",{className:"fa fa-align-center"})),h.a.createElement(G.a,{value:"right"},h.a.createElement("i",{className:"fa fa-align-right"}))))),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),h.a.createElement(S.a,{type:"ghost",onClick:n},"取消")))},K=n("ErOA"),q=n("7Cbv"),Y="------------",Q={default:Y,left:":".concat(Y),center:":".concat(Y,":"),right:"".concat(Y,":")},J=n("9VGf");function X(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var Z=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",$=["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"],ee=(F={},Object(l.a)(F,Z+"-B","bold"),Object(l.a)(F,Z+"-I","italic"),F),te=(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);t.a=function(e){var t=e.defaultValue,n=void 0===t?"":t,c=e.onChange,f=e.width,b=void 0===f?"100%":f,y=e.height,E=void 0===y?400:y,_=e.miniToolbar,S=void 0!==_&&_,C=e.isFocus,O=void 0!==C&&C,A=e.watch,D=e.insertTemp,L=e.mode,R=void 0===L?"markdown":L,N=e.id,j=void 0===N?"markdown-editor-id":N,P=e.showResizeBar,F=void 0!==P&&P,U=e.noStorage,H=void 0!==U&&U,G=e.showNullButton,z=void 0!==G&&G,V=e.hidetoolBar,Y=void 0!==V&&V,Z=e.fullScreen,ne=void 0!==Z&&Z,re=e.onBlur,ie=e.onCMBeforeChange,ae=e.onFullScreen,oe=e.className,se=void 0===oe?"":oe,le=e.disablePaste,ce=void 0!==le&&le,ue=e.placeholder,de=void 0===ue?"":ue,he=e.values,fe=void 0===he?"":he,pe=Object(d.useState)(null),me=Object(s.a)(pe,2),ge=me[0],ve=me[1],be=Object(d.useState)(n),ye=Object(s.a)(be,2),xe=ye[0],Ee=ye[1],_e=Object(d.useState)(A),ke=Object(s.a)(_e,2),we=ke[0],Se=ke[1],Ce=Object(d.useState)(ne),Oe=Object(s.a)(Ce,2),Ae=Oe[0],Te=Oe[1],Ie=Object(d.useState)(""),De=Object(s.a)(Ie,2),Le=De[0],Re=De[1],Ne=Object(d.useState)(0),je=Object(s.a)(Ne,2),Me=je[0],Pe=je[1],Be=Object(d.useState)(E),Fe=Object(s.a)(Be,2),Ue=Fe[0],He=Fe[1],Ge=Object(d.useState)(!1),ze=Object(s.a)(Ge,2),Ve=(ze[0],ze[1]),We=Object(d.useRef)(Object(q.a)()),Ke=Object(d.useRef)(!1),qe=Object(d.useRef)(),Ye=Object(d.useRef)(),Qe=Object(d.useRef)(),Je=Object(d.useRef)(),Xe=Object(d.useRef)(),Ze=function(){var e=Object(o.a)(u.a.mark((function e(){var t,n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(K.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:We.current}});case 2:null!=(n=e.sent)&&null!==(t=n.attachments)&&void 0!==t&&t.length&&(console.log("cm:",ge,Ye),n.attachments.map((function(e){e.content_type.indexOf("image")>-1?ge.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):e.content_type.indexOf("video")>-1?ge.replaceSelection('')):e.content_type.indexOf("pdf")>-1?ge.replaceSelection('
      ').concat(e.name,"")):ge.replaceSelection("[".concat(e.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")"))})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(d.useEffect)((function(){Ee(fe),null==ge||ge.setValue(fe)}),[fe]),Object(d.useEffect)((function(){null==ae||ae(Ae)}),[Ae]),Object(d.useEffect)((function(){if(Ye.current){var e=p.a.fromTextArea(Ye.current,{mode:R,lineNumbers:!S,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function t(t,n){if(!ce){var r=n.clipboardData;if(r){var i=r.types.toString(),o=r.items;if("Files"===i||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==R)return;try{var s,l=o[1];"file"===(null===(s=o[0])||void 0===s?void 0:s.kind)&&(l=o[0]);var c=l.getAsFile(),u=c.name.split(".").pop();B(c,(function(t){var n,r,i;t.id?(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?e.replaceSelection('')):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?e.replaceSelection('').concat(c.name,"")):$.includes(u)?e.replaceSelection('').concat(c.name,"")):e.replaceSelection("[".concat(c.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))}catch(n){a.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return O&&e.focus(),e.on("paste",t),e.on("dragleave",(function(e,t){Qe.current.classList.remove("mouse-hover-md")})),e.on("dragover",(function(e,t){Qe.current.classList.add("mouse-hover-md")})),e.on("drop",(function(t,n){var r;if(Qe.current.classList.add("mouse-hover-md"),(r=n.dataTransfer.files).length>0){n.preventDefault(),n.stopPropagation();for(var i=function(t){var n=r[t],i=n.name.split(".").pop();B(n,(function(t){var r,a,o;t.id?(null==n||null===(r=n.type)||void 0===r?void 0:r.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==n||null===(a=n.type)||void 0===a?void 0:a.indexOf("video"))>-1?e.replaceSelection('')):(null==n||null===(o=n.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?e.replaceSelection('').concat(n.name,"")):$.includes(i)?e.replaceSelection('').concat(n.name,"")):e.replaceSelection("[".concat(n.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))},a=0;a0||r.target.offsetWidth>0)&&($e(),ge.setSize("100%","100%"),ge.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(Ye.current.parentElement),e}();return function(){e.unobserve(Ye.current.parentElement)}}}),[ge,$e]),Object(d.useEffect)((function(){if(ge){for(var e=[],t=function(){var t=r[n],i=(a=Object(s.a)(t,2))[0],o=a[1],c=Object(l.a)({},i,(function(){et(o)}));e.push(c),ge.addKeyMap(c)},n=0,r=Object.entries(ee);n0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(j);e>=Me+1e4&&(!t||t!==xe)&&(window.sessionStorage.setItem(j,xe),Ve(!0))}}),1e4),Object(d.useEffect)((function(){Se(A)}),[ge,A]),Object(d.useEffect)((function(){ge&&O&&ge.focus()}),[ge,O]),Object(d.useEffect)((function(){if(we&&ge){var e=ge.getScrollerElement();function t(e){var t=e.target;if(Xe.current){var n=t.scrollTop/t.scrollHeight;Xe.current.scrollTop=Xe.current.scrollHeight*n}}return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[ge,we]),Object(d.useEffect)((function(){if(ge&&ie){function e(e,t){ie(e,t)}return ge.on("beforeChange",e),function(){ge.off("beforeChange",e)}}}),[ge,ie]),Object(d.useEffect)((function(){if(ge&&re){function e(){re(ge.getValue())}return ge.on("blur",e),function(){ge.off("blur",e)}}}),[ge,re]),Object(d.useEffect)((function(){if(ge){function e(e){var t=e.getValue();Ee(t),Pe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(t)}return ge.on("change",e),function(){ge.off("change",e)}}}),[ge,c]),Object(d.useEffect)((function(){ge&&(null==n?(ge.setValue(""),Ee("")):n!==ge.getValue()&&(ge.setValue(n),Ee(n),ge.setCursor(ge.lineCount(),0)))}),[ge,n]);var et=Object(d.useCallback)((function(e){var t=ge.getCursor(),n=ge.getSelection(),r=n.split("\n");switch(e){case"bold":return ge.replaceSelection("**"+n+"**"),""===n&&ge.setCursor(t.line,t.ch+2),ge.focus();case"italic":return ge.replaceSelection("*"+n+"*"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"code":return ge.replaceSelection("`"+n+"`"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"inline-latex":return ge.replaceSelection("`$$"+n+"$$`"),""===n&&ge.setCursor(t.line,t.ch+3),ge.focus();case"latex":return ge.replaceSelection("```latex\n"+n+"\n```"),ge.setCursor(t.line+1,n.length+1),ge.focus();case"line-break":return ge.replaceSelection("
      \n"),ge.focus();case"list-ul":return""===n?ge.replaceSelection("- "+n):ge.replaceSelection(r.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),ge.focus();case"list-ol":return""===n?ge.replaceSelection("1. "+n):ge.replaceSelection(r.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),ge.focus();case"add-null-ch":return""===n&&ge.setCursor(t.line,t.ch+1),ge.replaceSelection("▁"),ge.focus();case"inster-template-1":return""===n&&ge.setCursor(t.line,t.ch),ge.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),ge.focus();case"eraser":return ge.setValue(""),ge.focus();case"trigger-watch":return Se(!we),ge.focus();case"trigger-full-screen":return Te(!Ae),ge.focus();case"link":return void Re("link");case"code-block":return void Re("code-block");case"upload-image":return void Re("upload-image");case"add-table":return void Re("add-table");default:throw new Error}}),[ge,we,Ae]),tt=Object(d.useCallback)((function(e){switch(Re(""),Le){case"link":var t=e.title,n=e.link;return ge.replaceSelection("[".concat(t,"](").concat(n,")")),ge.focus();case"code-block":var r=e.language,i=e.content;return ge.replaceSelection(["```"+r,i,"```"].join("\n")),ge.focus();case"upload-image":var a=e.src,o=e.alt,s=e.name;return a.indexOf("type=image")>-1?ge.replaceSelection("![ ".concat(o||""," ]( ").concat(a,' "').concat(o||"",'" )')):a.indexOf("type=application/pdf")>-1?ge.replaceSelection('').concat(s,"")):ge.replaceSelection('').concat(s,"")),ge.focus();case"add-table":for(var l=e.row,c=e.col,u=e.align,d="\n",h=0;h300&&(r=300),He(E+r+"px")}}return e.addEventListener("mousedown",r),document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),function(){e.removeEventListener("mousedown",r),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i)}}}),[ge,Je]),Object(d.useEffect)((function(){He(E)}),[E]);var it={width:X(b),height:X(Ue)};Object(d.useMemo)((function(){if(Me){var e=new Date(Me),t=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(r)}return 0}),[Me]);return h.a.createElement(d.Fragment,null,h.a.createElement("div",{className:"markdown-editor-wrapper",ref:Qe},h.a.createElement("div",{className:"markdown-editor-container ".concat(se," ").concat(we?"on-preview":""," ").concat(S?"mini":""," ").concat(Ae?"full-screen":""),style:it},h.a.createElement(k,{insertTemp:D,watch:we,fullScreen:Ae,showNullButton:z,onActionCallback:et,hidetoolBar:Y,uuid:We.current,setOpenPhones:function(){Ke.current=!0}}),h.a.createElement("div",{className:"markdown-editor-body"},h.a.createElement("div",{className:"codemirror-container"},h.a.createElement("textarea",{ref:Ye,placeholder:de})),we?h.a.createElement("div",{ref:Xe,className:"preview-container"},"stex"===R&&h.a.createElement(v,{value:xe}),"stex"!==R&&h.a.createElement(g.a,{edit:!0,value:xe,replaces:function(e,t){var n=ge.getValue();n=n.replace(e,t),Ee(n),null==ge||ge.setValue(n)}})):null))),F?h.a.createElement("a",{ref:Je,className:"editor-resize"}):null,h.a.createElement(w.a,null,te[Le]?h.a.createElement(r.a,{centered:!0,title:te[Le],visible:!0,onCancel:rt,footer:null},nt):null))}},P47w: +/*!*************************************************!*\ + !*** ./node_modules/zrender/lib/svg/graphic.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core */"hydK").createElement,i=n(/*! ../core/PathProxy */"IMiH"),a=n(/*! ../core/BoundingRect */"mFDi"),o=n(/*! ../core/matrix */"Fofx"),s=n(/*! ../contain/text */"6GrX"),l=n(/*! ../graphic/helper/text */"pzxd"),c=n(/*! ../graphic/Text */"dqUG"),u=i.CMD,d=Array.prototype.join,h=Math.round,f=Math.sin,p=Math.cos,m=Math.PI,g=2*Math.PI,v=180/m;function b(e){return h(1e4*e)/1e4}function y(e){return e<1e-4&&e>-1e-4}function x(e,t){t&&E(e,"transform","matrix("+d.call(t,",")+")")}function E(e,t,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&e.setAttribute(t,n)}function _(e,t,n,r){if(function(e,t){var n=t?e.textFill:e.fill;return null!=n&&"none"!==n}(t,n)){var i=n?t.textFill:t.fill;E(e,"fill",i="transparent"===i?"none":i),E(e,"fill-opacity",null!=t.fillOpacity?t.fillOpacity*t.opacity:t.opacity)}else E(e,"fill","none");if(function(e,t){var n=t?e.textStroke:e.stroke;return null!=n&&"none"!==n}(t,n)){var a=n?t.textStroke:t.stroke;E(e,"stroke",a="transparent"===a?"none":a),E(e,"stroke-width",(n?t.textStrokeWidth:t.lineWidth)/(!n&&t.strokeNoScale?r.getLineScale():1)),E(e,"paint-order",n?"stroke":"fill"),E(e,"stroke-opacity",null!=t.strokeOpacity?t.strokeOpacity:t.opacity),t.lineDash?(E(e,"stroke-dasharray",t.lineDash.join(",")),E(e,"stroke-dashoffset",h(t.lineDashOffset||0))):E(e,"stroke-dasharray",""),t.lineCap&&E(e,"stroke-linecap",t.lineCap),t.lineJoin&&E(e,"stroke-linejoin",t.lineJoin),t.miterLimit&&E(e,"stroke-miterlimit",t.miterLimit)}else E(e,"stroke","none")}var k={};k.brush=function(e){var t=e.style,n=e.__svgEl;n||(n=r("path"),e.__svgEl=n),e.path||e.createPathProxy();var i=e.path;if(e.__dirtyPath){i.beginPath(),i.subPixelOptimize=!1,e.buildPath(i,e.shape),e.__dirtyPath=!1;var a=function(e){for(var t=[],n=e.data,r=e.len(),i=0;i=g:-E>=g),C=E>0?E%g:E%g+g,O=!1;O=!!S||!y(w)&&C>=m==!!k;var A=b(s+c*p(x)),T=b(l+d*f(x));S&&(E=k?g-1e-4:1e-4-g,O=!0,9===i&&t.push("M",A,T));var I=b(s+c*p(x+E)),D=b(l+d*f(x+E));t.push("A",b(c),b(d),h(_*v),+O,+k,I,D);break;case u.Z:a="Z";break;case u.R:I=b(n[i++]),D=b(n[i++]);var L=b(n[i++]),R=b(n[i++]);t.push("M",I,D,"L",I+L,D,"L",I+L,D+R,"L",I,D+R,"L",I,D)}a&&t.push(a);for(var N=0;NP){for(;j255?255:e}function o(e){return e<0?0:e>1?1:e}function s(e){return e.length&&"%"===e.charAt(e.length-1)?a(parseFloat(e)/100*255):a(parseInt(e,10))}function l(e){return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100):o(parseFloat(e))}function c(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function u(e,t,n){return e+(t-e)*n}function d(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var f=new r(20),p=null;function m(e,t){p&&h(p,t),p=f.put(e,p||t.slice())}function g(e,t){if(e){t=t||[];var n=f.get(e);if(n)return h(t,n);var r,a=(e+="").replace(/ /g,"").toLowerCase();if(a in i)return h(t,i[a]),m(e,t),t;if("#"===a.charAt(0))return 4===a.length?(r=parseInt(a.substr(1),16))>=0&&r<=4095?(d(t,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1),m(e,t),t):void d(t,0,0,0,1):7===a.length?(r=parseInt(a.substr(1),16))>=0&&r<=16777215?(d(t,(16711680&r)>>16,(65280&r)>>8,255&r,1),m(e,t),t):void d(t,0,0,0,1):void 0;var o=a.indexOf("("),c=a.indexOf(")");if(-1!==o&&c+1===a.length){var u=a.substr(0,o),p=a.substr(o+1,c-(o+1)).split(","),g=1;switch(u){case"rgba":if(4!==p.length)return void d(t,0,0,0,1);g=l(p.pop());case"rgb":return 3!==p.length?void d(t,0,0,0,1):(d(t,s(p[0]),s(p[1]),s(p[2]),g),m(e,t),t);case"hsla":return 4!==p.length?void d(t,0,0,0,1):(p[3]=l(p[3]),v(p,t),m(e,t),t);case"hsl":return 3!==p.length?void d(t,0,0,0,1):(v(p,t),m(e,t),t);default:return}}d(t,0,0,0,1)}}function v(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=l(e[1]),i=l(e[2]),o=i<=.5?i*(r+1):i+r-i*r,s=2*i-o;return d(t=t||[],a(255*c(s,o,n+1/3)),a(255*c(s,o,n)),a(255*c(s,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function b(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),i=Math.floor(r),s=Math.ceil(r),l=t[i],c=t[s],d=r-i;return n[0]=a(u(l[0],c[0],d)),n[1]=a(u(l[1],c[1],d)),n[2]=a(u(l[2],c[2],d)),n[3]=o(u(l[3],c[3],d)),n}}var y=b;function x(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),s=Math.ceil(r),l=g(t[i]),c=g(t[s]),d=r-i,h=_([a(u(l[0],c[0],d)),a(u(l[1],c[1],d)),a(u(l[2],c[2],d)),o(u(l[3],c[3],d))],"rgba");return n?{color:h,leftIndex:i,rightIndex:s,value:r}:h}}var E=x;function _(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}t.parse=g,t.lift=function(e,t){var n=g(e);if(n){for(var r=0;r<3;r++)n[r]=t<0?n[r]*(1-t)|0:(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:e[r]<0&&(n[r]=0);return _(n,4===n.length?"rgba":"rgb")}},t.toHex=function(e){var t=g(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},t.fastLerp=b,t.fastMapToColor=y,t.lerp=x,t.mapToColor=E,t.modifyHSL=function(e,t,n,r){if(e=g(e))return e=function(e){if(e){var t,n,r=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(r,i,a),s=Math.max(r,i,a),l=s-o,c=(s+o)/2;if(0===l)t=0,n=0;else{n=c<.5?l/(s+o):l/(2-s-o);var u=((s-r)/6+l/2)/l,d=((s-i)/6+l/2)/l,h=((s-a)/6+l/2)/l;r===s?t=h-d:i===s?t=1/3+u-h:a===s&&(t=2/3+d-u),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,n,c];return null!=e[3]&&f.push(e[3]),f}}(e),null!=t&&(e[0]=(i=t,(i=Math.round(i))<0?0:i>360?360:i)),null!=n&&(e[1]=l(n)),null!=r&&(e[2]=l(r)),_(v(e),"rgba");var i},t.modifyAlpha=function(e,t){if((e=g(e))&&null!=t)return e[3]=o(t),_(e,"rgba")},t.stringify=_},QuXc: +/*!******************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Gradient.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=function(e){this.colorStops=e||[]};n.prototype={constructor:n,addColorStop:function(e,t){this.colorStops.push({offset:e,color:t})}};var r=n;e.exports=r},RDYZ: +/*!****************************************************!*\ + !*** ./node_modules/zrender/lib/animation/Clip.js ***! + \****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./easing */"dMvE");function i(e){this._target=e.target,this._life=e.life||1e3,this._delay=e.delay||0,this._initialized=!1,this.loop=null!=e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this._pausedTime=0,this._paused=!1}i.prototype={constructor:i,step:function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)this._pausedTime+=t;else{var n=(e-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,a="string"==typeof i?r[i]:i,o="function"==typeof a?a(n):n;return this.fire("frame",o),1===n?this.loop?(this.restart(e),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(e){var t=(e-this._startTime-this._pausedTime)%this._life;this._startTime=e-t+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(e,t){this[e="on"+e]&&this[e](this._target,t)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var a=i;e.exports=a},RMFE: +/*!**********************************!*\ + !*** ./src/assets/images/hb.png ***! + \**********************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA+BAAECUQGBjh7GWgQIEBBo3wABAgSiAgIdPYy1CBAgINC+AQIECEQFBDp6GGsRIEBAoH0DBAgQiAoIdPQw1iJAgIBA+wYIECAQFRDo6GGsRYAAAYH2DRAgQCAqINDRw1iLAAECAu0bIECAQFRAoKOHsRYBAgQE2jdAgACBqIBARw9jLQIECAi0b4AAAQJRAYGOHsZaBAgQEGjfAAECBKICAh09jLUIECAg0L4BAgQIRAUEOnoYaxEgQECgfQMECBCICgh09DDWIkCAgED7BggQIBAVEOjoYaxFgAABgfYNECBAICog0NHDWIsAAQIC7RsgQIBAVECgo4exFgECBATaN0CAAIGogEBHD2MtAgQICLRvgAABAlEBgY4exloECBAQaN8AAQIEogICHT2MtQgQICDQvgECBAhEBQQ6ehhrESBAQKB9AwQIEIgKCHT0MNYiQICAQPsGCBAgEBUQ6OhhrEWAAAGB9g0QIEAgKiDQ0cNYiwABAgLtGyBAgEBUQKCjh7EWAQIEBNo3QIAAgaiAQEcPYy0CBAh8/5Tg6+vrp3/q7wgQIEDgPwKfz+c/v92v/Ac9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICXz/dJvP5/PTP/V3BAgQIHAg4D/oA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},RXMa: +/*!********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/Ring.js ***! + \********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt").extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)}});e.exports=r},"RZ/O": +/*!****************************************!*\ + !*** ./src/assets/images/paper/bi.svg ***! + \****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/bi.c00a7d71.svg"},RotF: +/*!*******************************************************!*\ + !*** ./node_modules/react-infinite-scroller/index.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n(/*! ./dist/InfiniteScroll */"LSTS")},"SA+Z": +/*!********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/toArray.js ***! + \********************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./arrayWithHoles.js */"wTVA"),i=n(/*! ./iterableToArray.js */"EbDI"),a=n(/*! ./unsupportedIterableToArray.js */"ZhPi"),o=n(/*! ./nonIterableRest.js */"wkBT");e.exports=function(e){return r(e)||i(e)||a(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},SJMd: +/*!****************************************************!*\ + !*** ./node_modules/code-prettify/src/prettify.js ***! + \****************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var e=window,t=["break,continue,do,else,for,if,return,while"],n=[[t,"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=[n,"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"],i=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[n,"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=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",l=[t,"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=[t,"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=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],d=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;function h(e,t,n,r,i){if(n){var a={sourceNode:e,pre:1,langExtension:null,numberLines:null,sourceCode:n,spans:null,basePos:t,decorations:null};r(a),i.push.apply(i,a.decorations)}}var f=/\S/;function p(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling){var r=n.nodeType;t=1===r?t?e:n:3===r&&f.test(n.nodeValue)?e:t}return t===e?void 0:t}function m(e,t){var n,r={};!function(){for(var i=e.concat(t),a=[],o={},s=0,l=i.length;s=0;)r[u.charAt(d)]=c;var h=c[1],f=""+h;o.hasOwnProperty(f)||(a.push(h),o[f]=null)}a.push(/[\0-\uffff]/),n=function(e){for(var t=0,n=!1,r=!1,i=0,a=e.length;i122||(u<65||d>90||n.push([32|Math.max(65,d),32|Math.min(u,90)]),u<97||d>122||n.push([-33&Math.max(97,d),-33&Math.min(u,122)]))}}n.sort((function(e,t){return e[0]-t[0]||t[1]-e[1]}));var h=[],f=[];for(a=0;ap[0]&&(p[1]+1>p[0]&&i.push("-"),i.push(l(p[1])))}return i.push("]"),i.join("")}function u(e){for(var r=e.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")),i=r.length,a=[],o=0,s=0;o=2&&"["===h?r[o]=c(d):"\\"!==h&&(r[o]=d.replace(/[a-zA-Z]/g,(function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"})))}return r.join("")}var d=[];for(i=0,a=e.length;i=5&&"lang-"===b.substring(0,5))||y&&"string"==typeof y[1]||(g=!1,b="src"),g||(f[v]=b)}var k=u;if(u+=v.length,g){var w=y[1],S=v.indexOf(w),C=S+w.length;y[2]&&(S=(C=v.length-y[2].length)-w.length);var O=b.substring(5);h(l,s+k,v.substring(0,S),a,c),h(l,s+k+S,w,E(O,w),c),h(l,s+k+C,v.substring(C),a,c)}else c.push(s+k,b)}e.decorations=c};return a}function g(e){var t=[],n=[];e.tripleQuotedStrings?t.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=e.hashComments;r&&(e.cStyleComments?(r>1?t.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push(["com",/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var i=e.regexLiterals;if(i){var a=i>1?"":"\n\r",o=a?".":"[\\S\\s]",s="/(?=[^/*"+a+"])(?:[^/\\x5B\\x5C"+a+"]|\\x5C"+o+"|\\x5B(?:[^\\x5C\\x5D"+a+"]|\\x5C"+o+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+s+")")])}var l=e.types;l&&n.push(["typ",l]);var c=(""+e.keywords).replace(/^ | $/g,"");c.length&&n.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return e.regexLiterals&&(u+="(?!s*/)"),n.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]),m(t,n)}var v=g({keywords:[r,a,i,o,s,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function b(e,t,n){for(var r=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,a=e.ownerDocument,o=a.createElement("li");e.firstChild;)o.appendChild(e.firstChild);var s=[o];function l(e){var t=e.nodeType;if(1!=t||r.test(e.className)){if((3==t||4==t)&&n){var o=e.nodeValue,s=o.match(i);if(s){var u=o.substring(0,s.index);e.nodeValue=u;var d=o.substring(s.index+s[0].length);if(d)e.parentNode.insertBefore(a.createTextNode(d),e.nextSibling);c(e),u||e.parentNode.removeChild(e)}}}else if("br"===e.nodeName)c(e),e.parentNode&&e.parentNode.removeChild(e);else for(var h=e.firstChild;h;h=h.nextSibling)l(h)}function c(e){for(;!e.nextSibling;)if(!(e=e.parentNode))return;for(var t,n=function e(t,n){var r=n?t.cloneNode(!1):t,i=t.parentNode;if(i){var a=e(i,1),o=t.nextSibling;a.appendChild(r);for(var s=o;s;s=o)o=s.nextSibling,a.appendChild(s)}return r}(e.nextSibling,0);(t=n.parentNode)&&1===t.nodeType;)n=t;s.push(n)}for(var u=0;u=0;){var i=n[r];y.hasOwnProperty(i)?e.console&&console.warn("cannot override language handler %s",i):y[i]=t}}function E(e,t){return e&&y.hasOwnProperty(e)||(e=/^\s*=x&&(u+=2),s>=E&&(f+=2)}}finally{v&&(v.style.display=b)}}(t)}catch(t){e.console&&console.log(t&&t.stack||t)}}function k(e,t,n){var r=n||!1,i=t||null,a=document.createElement("div");return a.innerHTML="
      "+e+"
      ",a=a.firstChild,r&&b(a,r,!0),_({langExtension:i,numberLines:r,sourceNode:a,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),a.innerHTML}function w(t,n){var r=n||document.body,i=r.ownerDocument||document;function a(e){return r.getElementsByTagName(e)}for(var o=[a("pre"),a("code"),a("xmp")],s=[],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(m([["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(m([],[["atv",/^[\s\S]+/]]),["uq.val"]),x(g({keywords:r,hashComments:!0,cStyleComments:!0,types:d}),["c","cc","cpp","cxx","cyc","m"]),x(g({keywords:"null,true,false"}),["json"]),x(g({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:d}),["cs"]),x(g({keywords:i,cStyleComments:!0}),["java"]),x(g({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(g({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(g({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(g({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(g({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),x(g({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(m([],[["str",/^[\s\S]+/]]),["regex"]);var S=e.PR={createSimpleLexer:m,registerLangHandler:x,sourceDecorator:g,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:k,prettyPrint:w},C=e.define;"function"==typeof C&&C.amd&&C("google-code-prettify",[],(function(){return S}))}()},SKnc: +/*!************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/LinearGradient.js ***! + \************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ./Gradient */"QuXc"),a=function(e,t,n,r,a,o){this.x=null==e?0:e,this.y=null==t?0:t,this.x2=null==n?1:n,this.y2=null==r?0:r,this.type="linear",this.global=o||!1,i.call(this,a)};a.prototype={constructor:a},r.inherits(a,i);var o=a;e.exports=o},SMhR: +/*!*****************************************!*\ + !*** ./src/assets/images/teacherQQ.png ***! + \*****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcYAAAHGCAYAAADuYispAAAAAklEQVR4AewaftIAABHTSURBVO3BQY4cy5IEQdNA3//KNo2/8NU8XzCQyCpSReivSJKk/zmRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7yMiB/s7a5AWTTNhsgN9pmA2TTNp8MyI22uQHkv7TNDSCbttkAudE2bwJyo22eBGTTNhsgf7O2ecuJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpPGTD9c2nwzIk9pmA2TTNjeAPAnIpm1uANm0zQbIDSBPAXIDyKZtPhmQG22zAfLN2uaTAflUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGT74ckCe1zZOAbNpm0zYbIDfaZgPkRts8qW1utM0GyKZtntI2GyBPArJpmw2QTds8CcimbW4A+WRAntQ23+pEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0viJXtU2T2qbDZA3Adm0zZOAbNpm0zYbIJu2+VZtswGyaZsbbbMBsmmbDZBN29xoG32mE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJ3oVkCe1zZPaZgNk0zYbIJu2eRKQJwF5S9vcAPIkIJu2uQFk0zY32kbf6USSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnS+MmXa5t/WdtsgGza5psB+WRt8xQgN4DcaJtv1jYbIDfa5pO1jf5/J5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGTz4ckH9Z22yAbNpmA2TTNhsgm7bZANm0zQbIpm02QDZtswFyA8h/aZsbbbMBsmmbDZBN22yAbNpmA2TTNhsgm7bZALkBZNM2N4Doz5xIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGiSRJGvRX9LGAvKltNkA2bXMDyJvaZgNk0zZPAfLN2mYD5EbbPAnIk9pG7ziRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7y4YBs2uYGkE3bbIBs2mYD5Ebb/Mva5klAbgB5S9tsgGza5gaQDZBN2zwJyJPaZgNkA2TTNhsgN9pmA2TTNt/qRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdKgv/IPA3KjbW4AeVLb3ADyzdrmBpAntc2nAnKjbTZANm1zA8gna5sNkH9Z27zlRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4yZcDcqNtbgDZtM2mbTZANm1zA8imbTZANm1zA8iTgGza5gaQpwDZtM2NttkAudE2b2qbDZAbbbMB8qa20f/vRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4ycuA3GibDZANkBttswHyJCA32uZJQDZt8yQgTwKyaZsNkD/VNk8CsmmbDZA3tc0GyI222QDZtM0NIJu2eRKQTdt8qxNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4yf/uLbZANkA2bTNDSBPAnKjbd7UNhsgN4Bs2uZG27wFyKZtbrTNBsimbW4AudE2N9pmA+RG29wAsmmbJwHZtM1bTiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNn3w5IJu2udE2N4DcaJsbQDZtswGyAfIvA7Jpmz8F5EbbPAnIpm1uANm0zZuAbNpm0zYbIBsgm7a5AeRJbfOpTiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNn3y4ttkAuQFk0zYbIDfa5gaQN7XNk4A8qW02QG4A+VNtswHyzdpmA+RJbfMkIJu2eVPbbIBs2uZvdSJJksaJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRp/ERX2kb/DcimbW4AuQFk0zYbIDfa5i1t8yYgm7a50TYbIN+sbW4A2bTNk4Bs2uYtJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGT/5yQDZtswHypLbZAHlT29xomw2QTdvcAHIDyKdqmze1zZuAvKltNkCeBOSTAflWJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZIG/ZUPBuRG22yAbNrmBpAbbbMBcqNtNkA2bbMBsmmbDZBN2zwJyFvaZgNk0zYbIDfaZgNk0zYbIG9qm08GZNM2GyCbttkA2bTNtzqRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7yMiBPAvIkIN8MyA0gm7bZALkB5Elt8yQgf6pt9N/aZgPkTUA2bbNpmycB+VedSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSxokkSRr0V/5iQDZt882AbNrmBpBN22yAbNpmA+RG2zwJyKZt/hSQTds8CcimbW4A2bTNk4B8s7bZALnRNhsgm7bZANm0zVtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2ffDggm7bZtM0GyJvaZgPkBpBN2zypbTZAbrTNBsimbZ4E5ClAbrTNNwOyaZsbbXMDyI222QDZtM0GyAbIDSCbtvlUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZIG/ZV/GJAbbbMB8qa22QDZtM0GyKZtbgDZtM0NIJu22QC50Tb/BciNttkAeVLbbIDcaJsNkE3bbIA8qW02QN7UNv+qE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJy8DcqNt3gTkkwH5ZECeBOSTAXkKkE3bbIA8qW2e1DY32mYDZNM2GyD6TCeSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSxk++HJBN29xomycB2bTNm4Bs2mYD5JsBudE2TwGyaZsNkCcBudE2N4C8CciNtnkSkBtAbrTNpzqRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7ysrb5ZkA2bXMDyI22eRKQTds8CcimbTZANm2zAXIDyH9pmye1zQbIpm02QG4A+WRtswHyJCCbtnlT23yrE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0vjJy4A8qW2e1DZvapsbQDZtswFyA8imbTZtc6Nt3tQ2TwGyaZtN22yA3GibDZBN22yAPAnIm9rmSUA2bbMBcqNt3nIiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkadBf+WBANm2zAfLN2mYD5Ebb3AByo202QPSOttkA2bTNm4Bs2uYGEP25tvlUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZIG/ZUXAbnRNjeA3GibG0ButM03A/LJ2mYDZNM2fwrIJ2ubG0A2bXMDyI22uQFk0zY3gNxomxtANm3zrU4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkDforLwKyaZsNkE3bPAnIpm02QJ7UNk8CcqNtNkButM0GyJPaZgPkT7XNBsiNttkA+Ze1zQ0gN9pmA+RNbbMBsmmbt5xIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGiSRJGvRX/mJANm3zzYDcaJsbQG60zQ0gm7a5AeRJbfMWIE9qmw2QG22zAXKjbTZANm2zAfKktrkB5E1t85YTSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeMnLwOyaZsbbbMB8qa2udE2GyBvapsNkE3bbNrmTW2zAbIB8l/a5kltswHypLZ5U9s8CciNtnkSkE3b/KtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2fvKxtbgDZtM2NtvlmbbMB8iQgTwKyaZsNkG8F5Elt8yYgm7Z5EpBN2zwJyCcDcqNtPtWJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpPGTDwdk0zY32uYGkE3b3ACyaZtP1jZvArJpmw2QDZBN22yA/Bcgm7bZALkB5Ebb6L8B2bTNDSCbttkAudE2GyCbtnnLiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRBf+UvBmTTNhsgm7a5AeSTtc2TgNxomw2QG22zAbJpmz8F5EbbbIC8qW2+GZBN2zwJyKZtNkButM0GyI22ecuJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpEF/5UVAbrTNk4DcaJsNkG/WNk8C8qS22QDZtM0GyKZtPhWQN7XNk4Bs2mYD5Elt8yQgN9rmb3UiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkadBfeRGQN7XNk4Bs2uabAdm0zQbIm9rmUwHZtM0GyI222QB5U9tsgDypbZ4EZNM2bwKyaZtvdSJJksaJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRp/OTDtc0GyJOA3GibDZAbbXMDyKZtntQ23wzIjbb5L21zo21uALnRNhsgn6xtNkA2bfMmIG8CsmmbT3UiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkadBf+WBANm2zAbJpmw2QTdv8y4DcaJsbQDZtswFyo202QDZt8xQgm7a5AeRG23wzIDfa5k1ANm1zA8iNtnnLiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqTxk79c2zwJyI222QDZtM2TgGzaZgNkA+RNbbMBcqNtNkD+VNvcALJpmzcB2bTNBsimbT4ZkE3bvAnIpm2+1YkkSRonkiRpnEiSpHEiSZLGiSRJGieSJGmcSJKkQX/lgwF5Uts8CciNtrkB5EltcwPIjbbZANm0zQbIp2qbJwHZtM0NIG9qmzcB2bTNBsiNttkAeVLbfKoTSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSYP+youAPKltngRk0zY3gGza5klAntQ2N4A8qW02QL5V22yAfLK22QC50TYbIJu22QD5Zm2zAXKjbd5yIkmSxokkSRonkiRpnEiSpHEiSZLGiSRJGieSJGnQX9FrgGzaZgNk0zYbIDfaZgNk0zYbIJu22QDZtM0NIJu2eQqQG21zA8imbTZANm3zJiBvapsnAbnRNn+rE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJy8D8jdrm03b3GibDZA3tc2NtnkSkDcB+S9tc6NtntQ2N9rmBpAbbXOjbW4AuQFk0zZPAnKjbT7ViSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqTxkw/XNp8MyJOAbNrmRts8CcimbT5Z22yA3GibpwDZtM0NIJ+sbTZAbgB5U9s8qW02QDZt861OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2ffDkgT2qbJwF5UttsgLwJyJPa5gaQG0De0jY3gGza5gaQG22zAXKjbZ4EZAPkTUBuANm0zac6kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjR+ole1zZvaZgPkRtvcAPIkIJu22QDZtM3fCsiNttkAudE2TwKyaZtN22yAbNrmBpAbbbMBsgGyaZu3nEiSpHEiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaP9FHA3KjbTZAngRk0zafDMiTgPyptrkB5Eltc6Nt3gTkTW1zA8imbZ7UNt/qRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4yZdrm28G5JO1zQ0gN9pmA2QDZNM2GyCbtrnRNk8BcqNtNkA2QN7UNhsgTwKyaZsNkE3bvAnIjbb5VCeSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSBv2VFwH5m7XNk4Bs2uZJQJ7UNjeA3GibTwXkRttsgNxomw2QG22zAXKjbW4AeVLbbIDcaJsNkCe1zVtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJA36K5Ik6X9OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4/8ATrCgy9kbxW8AAAAASUVORK5CYII="},SUKs: +/*!**********************************************!*\ + !*** ./node_modules/zrender/lib/core/log.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=function(){};1===n(/*! ../config */"LPTA").debugMode&&(r=console.error);var i=r;e.exports=i},Sj9i: +/*!************************************************!*\ + !*** ./node_modules/zrender/lib/core/curve.js ***! + \************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./vector */"QBsz"),i=r.create,a=r.distSquare,o=Math.pow,s=Math.sqrt,l=s(3),c=i(),u=i(),d=i();function h(e){return e>-1e-8&&e<1e-8}function f(e){return e>1e-8||e<-1e-8}function p(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function m(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}t.cubicAt=p,t.cubicDerivativeAt=function(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)},t.cubicRootAt=function(e,t,n,r,i,a){var c=r+3*(t-n)-e,u=3*(n-2*t+e),d=3*(t-e),f=e-i,p=u*u-3*c*d,m=u*d-9*c*f,g=d*d-3*u*f,v=0;if(h(p)&&h(m)){if(h(u))a[0]=0;else(A=-d/u)>=0&&A<=1&&(a[v++]=A)}else{var b=m*m-4*p*g;if(h(b)){var y=m/p,x=-y/2;(A=-u/c+y)>=0&&A<=1&&(a[v++]=A),x>=0&&x<=1&&(a[v++]=x)}else if(b>0){var E=s(b),_=p*u+1.5*c*(-m+E),k=p*u+1.5*c*(-m-E);(A=(-u-((_=_<0?-o(-_,1/3):o(_,1/3))+(k=k<0?-o(-k,1/3):o(k,1/3))))/(3*c))>=0&&A<=1&&(a[v++]=A)}else{var w=(2*p*u-3*c*m)/(2*s(p*p*p)),S=Math.acos(w)/3,C=s(p),O=Math.cos(S),A=(-u-2*C*O)/(3*c),T=(x=(-u+C*(O+l*Math.sin(S)))/(3*c),(-u+C*(O-l*Math.sin(S)))/(3*c));A>=0&&A<=1&&(a[v++]=A),x>=0&&x<=1&&(a[v++]=x),T>=0&&T<=1&&(a[v++]=T)}}return v},t.cubicExtrema=function(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,l=3*t-3*e,c=0;if(h(o)){if(f(a))(d=-l/a)>=0&&d<=1&&(i[c++]=d)}else{var u=a*a-4*o*l;if(h(u))i[0]=-a/(2*o);else if(u>0){var d,p=s(u),m=(-a-p)/(2*o);(d=(-a+p)/(2*o))>=0&&d<=1&&(i[c++]=d),m>=0&&m<=1&&(i[c++]=m)}}return c},t.cubicSubdivide=function(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,l=(r-n)*i+n,c=(s-o)*i+o,u=(l-s)*i+s,d=(u-c)*i+c;a[0]=e,a[1]=o,a[2]=c,a[3]=d,a[4]=d,a[5]=u,a[6]=l,a[7]=r},t.cubicProjectPoint=function(e,t,n,r,i,o,l,h,f,m,g){var v,b,y,x,E,_=.005,k=1/0;c[0]=f,c[1]=m;for(var w=0;w<1;w+=.05)u[0]=p(e,n,i,l,w),u[1]=p(t,r,o,h,w),(x=a(c,u))=0&&x=0&&d<=1&&(i[c++]=d)}else{var u=o*o-4*a*l;if(h(u))(d=-o/(2*a))>=0&&d<=1&&(i[c++]=d);else if(u>0){var d,p=s(u),m=(-o-p)/(2*a);(d=(-o+p)/(2*a))>=0&&d<=1&&(i[c++]=d),m>=0&&m<=1&&(i[c++]=m)}}return c},t.quadraticExtremum=function(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r},t.quadraticSubdivide=function(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n},t.quadraticProjectPoint=function(e,t,n,r,i,o,l,h,f){var p,g=.005,v=1/0;c[0]=l,c[1]=h;for(var b=0;b<1;b+=.05){u[0]=m(e,n,i,b),u[1]=m(t,r,o,b),(_=a(c,u))=0&&_=0;--r)if(t[r]===e)return!0;return!1}),n):null:n[0]},h.prototype.update=function(e,t){if(e){var n=this.getDefs(!1);if(e[this._domName]&&n.contains(e[this._domName]))"function"==typeof t&&t(e);else{var r=this.add(e);r&&(e[this._domName]=r)}}},h.prototype.addDom=function(e){this.getDefs(!0).appendChild(e)},h.prototype.removeDom=function(e){var t=this.getDefs(!1);t&&e[this._domName]&&(t.removeChild(e[this._domName]),e[this._domName]=null)},h.prototype.getDoms=function(){var e=this.getDefs(!1);if(!e)return[];var t=[];return i.each(this._tagNames,(function(n){var r=e.getElementsByTagName(n);t=t.concat([].slice.call(r))})),t},h.prototype.markAllUnused=function(){var e=this.getDoms(),t=this;i.each(e,(function(e){e[t._markLabel]="0"}))},h.prototype.markUsed=function(e){e&&(e[this._markLabel]="1")},h.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),n=this;i.each(t,(function(t){"1"!==t[n._markLabel]&&e.removeChild(t)}))}},h.prototype.getSvgProxy=function(e){return e instanceof a?c:e instanceof o?u:e instanceof s?d:c},h.prototype.getTextSvgElement=function(e){return e.__textSvgEl},h.prototype.getSvgElement=function(e){return e.__svgEl};var f=h;e.exports=f},T1X5: +/*!*******************************************!*\ + !*** ./src/components/Knowledge/icon.png ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAABsCAYAAACPZlfNAAALdklEQVR4Xu2dC2wc1RVAzx1nDXFiO4SEhqxtxS0JHzX94TS0FEKLALX8WkKbqrRVKQrh15Zfq0IqIaSGSOXb8ktANFJbKqUFWigEAUohfFRQDC1KxS8UR/7wDbZ3TRxix3urN951No7Xnt15M7Mbz0hRImXevffds/PmzXv33StU0KWqTlcfh6mwkCHmq8M8B5oUZosyS6EeOCD7x/Rsl/kjkFJhu8AHGWiXDNuoYqsoW5K1vCkimUpxg5SzoW+r1gylOUGErygci9IC1Fi2uR+hVeA5VZ6tquOpuSL9lnVYE1d2wNo+0jnVylLNcKYKx6EcaK23XgQJH4vyjDg8OCDc3zxd3vXSLKx7ygJYW5seOGUmZ6GcJ8IShaqwHDCeHoEhVTYh3LO7mweam+XjqO2KFNjWPp09VblUlQuAmVE7YwL93SKs2SncMr9WPojK1kiAdWzXpCa40oHlCtOi6nwpegV2ZOBuGeSGxlnSVYoMP21CBfZmnx5SneFagXPzZnJ+7I+y7S6FdQMO1xxWK++HZUgowNzpeIoVKqwCDgqrcyHp6RFlZbKetWF8HgQOrD2liwTuAHdKvj9frVVTuHDuNGkNspOBAWtt1cShC1ilcLlqecz6gnSkkS3CkMBN77zBypYWGQxCXyDAuvq1KTPIeuCYIIyuAJnPOwmWJWuk3bat1oF1pfWMjLKuAqbptn05Wl63I5ybrJOHbCqyCqw9ratEucqMDjaNrGBZqsLqpjpZaasPVhyrqlVdKe5Wcafr8TXKA6KsS9azXESG/DrHN7CODp0qdaxXON2vMftze4F/aJpljY2y008/fQFr69EZCYeH3ZX0+JrQA2ZHYDDDac0HSe+ENxe4oWRg2SfriRhWca53t3HSnFTqk1YSMPedleZv8TBYHKzc3WZ4TNbxrVLeaSUB6+zV38cTjNJgjUBT1jXMkB8XK6VoYNmp+9XFKorv39cDKlxX7JS/KGDZj+K/x99Z1n5+6gjfLObj2jOw7HLTv+MVDGuwcoK6nQSf97qM5QmYWcj9xHyensRrg9YpjRL4/HtbOd7LgrEnYF1p/U1G+XnQVk9m+Y5wfbJOfjGRDyYEZvazHOFfk2WLZCKHBfX/Zmsmo3ypqV42j6djXGBmp7gzzQuTYPMxKA7Fym1tqGPxeDvX4wLr7NULVdzd4vgKyQOiXNQwQ+4spK4gMBMwc0CG1/bDGIyQXF+ymp5dDkcUCuwpCKwzpXcqbrxgfIXsAYU1TfVy4VhqxwRm4gZJ8L/9IBQtZFdbU7eLQT41VtzjmMDaU3qzwKXW1MeCivaAwi1N9XLZ6Ib7AHPDpzO0hRmR+/L78Ict8J93IT1QdN+sN6irhs/NgR8uhM8eYl28J4EmwninQ/PosPB9gHWmdZUqoS3u/uUVuPEFKMcDWg5wxWL4zlGefGz9JhGuaxgVD7IXsOwpEhMvHsrBBPNknf9IecLKed9Au+vUyJ607t3dJPNPzewFrCOl3wPutf5TKSDwio3wdF7k3imfhMNnugGZkV2q8Ho3PPbWHhOOb4IbT4zMpHMa6+XPOe17A+vVjQhfC8u0E+/d884ysH69JCzNE+v51aY90Mw7beM5E7cJ5A7ln40zZOTnMgLMnHxMDNEZ5mG6RSbcNHv9tAV+sDCQLpck9I9b4Hd5UfKbIwrgM4cKB6toyJ0EHQHWkdJLgFtL6l2JjfKB/WwRfP/TJQoKoNmf/gu/zVuGjQqY6ZrjcEmyVm43/x4B1pnSxxVOCqDvBUXGwLx5W+CJhno5eQSYe1q/jw/DPgAeA/MGDOHjqloONtkN3CesI6XfAB7x2NzabV6B3fca3LoZ+ndbU+0KmpaAn7TA0iP2lVtOQ2LWulMb62WDC6wzrdfp8CGGUC+vwL56L3wU0ArI9Gp4cowZYLkBE2F1Q51cPfyEpXUTyvGh0gK8ArvgUXgxoGwZX5gDa79eAU+Y8HRjnSyR7K5yXwAZZibk7xXYjkHY2Abmb5uXGRJPnAfTqisAGPQ31FErnWldoMrrNh3hVZZXYF7l2byv3IZEd4YoHC4dfbqUDPfZ7KxXWTEwr57K3udwtnT06i8RVhfZ1MrtMbAi3ahcJe1pXSPKiiKbWrk9BlacG1VYa95hG1QZY55UnLBS7vYK7JXtwxuc/ZYnHTWJ4U3Ko2ZVxKTDvMMelY60bs7mISzF577aeAV25l/h7Y98qSrYeO50ePDblQHMzevYmVITDjAvGHeMLzUGVpzXBbZJR0p7gBnFNbVzt1dgr+aGRMtLUzVThofEI8cYEh9/C1ZuGu7n7BrYsMxOn31K6TXAdkTx0WwM9wrMZydLaj6UgTtegje64UefgaPnlCTGdqN+A8z8biPJAFrOwGx72pK8oRiYJU+GJMYFFg+JIXnbghp3SOyO6sCD1yFxxwBs3BbA4m91dvE3YcGV4YjoqYhp/YpH4aWAtlfMZGJNJMsGxRMentZXwIdzFBuYxbszhBbuh3MFLE25IQKtwSxNmRCBs8cIEQjB/UWrcJem4sXfvf32Qhdc8jjcdjIsThbt00AbuIu/8fZK5QDDbK/EG5gVBMxsYMYhApUDzA0RqIQgnEBfDKOEl/E7bDgIx9hb7mFuMTA3qH44zM04o9wDSWNgbsRUXiBpmYdq2wZmhr1C16sfwu0vwsVHw5EHF74vgin/nlDtcjgMEeb5sPw1zFJ/DKEePxp9GMIdFiM4bhTVCUyvT9gR4zxhx4T4Ub3PcSMDrKtPL85kuK3UX1wp7fyccTaHGE5uBhP5ZPMqx1nimAf6ojgy+/J7cP6G0rMILJ4Lt51iExeUG7CCR2bd6X3Ih9KNTj95OmZOhce+u38Do9ChdBdYyGkfcq4uJRPO9ARc9kU4Y8F+DgwKp30IO7GKXVfbkVZmQ+L4iVWyH9Ghpi6y42Z7UsoJ2ISpi0y3o0gOZs/d/iWVCzDPycFMl+P0e/7B+5XgOf2eO/mIE1z69bff9sUluMw+ZXdKnELWr+NLal90ClmjJU7SXJKvbTQqLUmzO2OM06DbAFCUjJLToBstcaGBonxt42Z/hQay77K4lIcNFBPIsFLKI6cjLpYTBjGub7RRLMeYGpejChyY3XJUxty44Ftg0OwXfMsbGs/IKHFJRXvsgiupmLMxLlpqkVbQRUtzpsZlgf1Dk7DKAme/z+LC2z6YhV54210g7tCpUkdc2r5IcJGUts/Z2NajMxIODyscW6Tdk/J2A2sww2nNB0lvqQ7wXTQj+6StVzi9VCMmQzszDGqaZY2NstNPf30DM8qfVJ0yP8VdKkRUP8GPC4JvayYYyXqWi8iQX21WgI2a8pvs3Fbl+u1khO1VhdVNo0pK+bHHumO70mo+rk1VlVBKWvnpfMBtux3h3GSdPGRTj3VgectY64FjbBpbQbKedxIsS9ZIXrEtO9YHAsyYZhaMD13AKoXLJ0uVdbNFInDTO2+wsqVFLOdPHQYeGLCR91pKFwlu8e4WO7+xspXSqnDRRKXp/VofODBjoNm57kqxQoVVUeW18uuocdr3iLIyWc/a8UrS29IfCrCcsSawpzrDtYI7/T/AVicikrNLYd2AwzWFqpoHYVeowHIdMHGPmuBKB5aHWX7YhgNNRG4G7pZBbhirMLYNHePJiARYziA3LFy5VJULKuAzoFuENTuFW0bXVg4aUr78SIHlDMmemjkL5TwRloRZh3OCX/OQKpsQ7tndzQP55XnDhFR2wPINMidBq5WlmuFMFY4Lu2qgqYYnyjPi8OCAcH+uWGhUgEbrLYsnrJAz3OwGaU5AOQ6HL2cLItRYdl6/m8AfnlPl2ao6njKlCy3rsCaurIGN7qX7edDHYSosZIj56jDPgSaF2aLM0uH8+6YaWG4GugsYEOhVYbvABxlolwzbqGKrKFuStbwZxnTcFrH/A8wNv8JI/KKJAAAAAElFTkSuQmCC"},T6xi: +/*!*********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/helper/poly.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./smoothSpline */"YgsL"),i=n(/*! ./smoothBezier */"nCxF");t.buildPath=function(e,t,n){var a=t.points,o=t.smooth;if(a&&a.length>=2){if(o&&"spline"!==o){var s=i(a,o,n,t.smoothConstraint);e.moveTo(a[0][0],a[0][1]);for(var l=a.length,c=0;c<(n?l:l-1);c++){var u=s[2*c],d=s[2*c+1],h=a[(c+1)%l];e.bezierCurveTo(u[0],u[1],d[0],d[1],h[0],h[1])}}else{"spline"===o&&(a=r(a,n)),e.moveTo(a[0][0],a[0][1]);c=1;for(var f=a.length;cc&&(n*=c/(o=n+r),r*=c/o),i+a>c&&(i*=c/(o=i+a),a*=c/o),r+i>u&&(r*=u/(o=r+i),i*=u/o),n+a>u&&(n*=u/(o=n+a),a*=u/o),e.moveTo(s+n,l),e.lineTo(s+c-r,l),0!==r&&e.arc(s+c-r,l+r,r,-Math.PI/2,0),e.lineTo(s+c,l+u-i),0!==i&&e.arc(s+c-i,l+u-i,i,0,Math.PI/2),e.lineTo(s+a,l+u),0!==a&&e.arc(s+a,l+u-a,a,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}},"VrN/": +/*!***************************************************!*\ + !*** ./node_modules/codemirror/lib/codemirror.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),l=!a&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!a&&/Chrome\//.test(e),d=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),m=!a&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=m||/Mac/.test(t),y=/\bCrOS\b/.test(e),x=/win/i.test(t),E=d&&e.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(d=!1,l=!0);var _=b&&(c||d&&(null==E||E<12.11)),k=n||o&&s>=9;function w(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,C=function(e,t){var n=e.className,r=w(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function O(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return O(e).appendChild(t)}function T(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a=t)return o+(t-a);o+=s-a,o+=n-o%n,a=s+1}}m?j=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(j=function(e){try{e.select()}catch(e){}});var F=function(){this.id=null,this.f=null,this.time=0,this.handler=M(this.onTimeout,this)};function U(e,t){for(var n=0;n=t)return r+Math.min(o,t-i);if(i+=a-r,r=a+1,(i+=n-i%n)>=t)return r}}var K=[""];function q(e){for(;K.length<=e;)K.push(Y(K)+" ");return K[e]}function Y(e){return e[e.length-1]}function Q(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&$(e))||t.test(e):$(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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 re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}var oe=null;function se(e,t,n){var r;oe=null;for(var i=0;it)return i;a.to==t&&(a.from!=a.to&&"before"==n?r=i:oe=i),a.from==t&&(a.from!=a.to&&"before"!=n?r=i:oe=i)}return null!=r?r:oe}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function a(e,t,n){this.level=e,this.from=t,this.to=n}return function(o,s){var l="ltr"==s?"L":"R";if(0==o.length||"ltr"==s&&!e.test(o))return!1;for(var c,u=o.length,d=[],h=0;h-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function pe(e,t){var n=he(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function be(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){fe(this,e,t)}}function ye(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function _e(e){ye(e),xe(e)}function ke(e){return e.target||e.srcElement}function we(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Se,Ce,Oe=function(){if(o&&s<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}();function Ae(e){if(null==Se){var t=T("span","​");A(e,T("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=Se?T("span","​"):T("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Te(e){if(null!=Ce)return Ce;var t=A(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return O(e),!(!n||n.left==n.right)&&(Ce=r.right-n.right<3)}var Ie,De=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var a=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),o=a.indexOf("\r");-1!=o?(n.push(a.slice(0,o)),t+=o+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Le=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re="oncopy"in(Ie=T("div"))||(Ie.setAttribute("oncopy","return;"),"function"==typeof Ie.oncopy),Ne=null,je={},Me={};function Pe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function Be(e){if("string"==typeof e&&Me.hasOwnProperty(e))e=Me[e];else if(e&&"string"==typeof e.name&&Me.hasOwnProperty(e.name)){var t=Me[e.name];"string"==typeof t&&(t={name:t}),(e=X(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Be("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Be("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Fe(e,t){t=Be(t);var n=je[t.name];if(!n)return Fe(e,"text/plain");var r=n(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var Ue={};function He(e,t){P(t,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function Ge(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function ze(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ve(e,t,n){return!e.startState||e.startState(t,n)}var We=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ke(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t=e.first&&tn?et(n,Ke(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ke(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r=this.string.length},We.prototype.sol=function(){return this.pos==this.lineStart},We.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},We.prototype.next=function(){if(this.post},We.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},We.prototype.skipToEnd=function(){this.pos=this.string.length},We.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},We.prototype.backUp=function(e){this.pos-=e},We.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},We.prototype.current=function(){return this.string.slice(this.start,this.pos)},We.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},We.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},We.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,n,r){var i=[e.state.modeGen],a={};xt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),a,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,xt(e,t.text,s.mode,n,(function(e,t){for(var n=l;ce&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Ge(e.doc.mode,r.state),a=dt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ft(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ut(r,!0,t);var a=function(e,t,n){for(var r,i,a=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var l=Ke(a,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=a.modeFrontier))return s;var u=B(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),o=a>r.first&&Ke(r,a-1).stateAfter,s=o?ut.fromSaved(r,o,a):new ut(r,Ve(r.mode),a);return r.iter(a,t,(function(n){pt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,Ge(e.mode,t.state),n,t.lookAhead):new ut(e,Ge(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?Ge(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function bt(e,t,n,r){var i,a,o=e.doc,s=o.mode,l=Ke(o,(t=st(o,t)).line),c=ft(e,t.line,n),u=new We(l.text,e.options.tabSize,c);for(r&&(a=[]);(r||u.pose.options.maxHighlightLength?(s=!1,o&&pt(e,t,r,d.pos),d.pos=t.length,l=null):l=yt(gt(n,d,r.state,h),a),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c=t:a.to>t);(r||(r=[])).push(new kt(o,a.from,s?null:a.to))}}return r}(n,i,o),l=function(e,t,n){var r;if(e)for(var i=0;i=t:a.to>t)||a.from==t&&"bookmark"==o.type&&(!n||a.marker.insertLeft)){var s=null==a.from||(o.inclusiveLeft?a.from<=t:a.from0&&s)for(var y=0;yt)&&(!n||Lt(n,a.marker)<0)&&(n=a.marker)}return n}function Pt(e,t,n,r,i){var a=Ke(e,t),o=_t&&a.markedSpans;if(o)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Bt(e){for(var t;t=Nt(e);)e=t.find(-1,!0).line;return e}function Ft(e,t){var n=Ke(e,t),r=Bt(n);return n==r?t:Je(r)}function Ut(e,t){if(t>e.lastLine())return t;var n,r=Ke(e,t);if(!Ht(e,r))return t;for(;n=jt(r);)r=n.find(1,!0).line;return Je(r)+1}function Ht(e,t){var n=_t&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Kt=function(e,t,n){this.text=e,Tt(this,t),this.height=n?n(this):1};function qt(e){e.parent=null,At(e)}Kt.prototype.lineNo=function(){return Je(this)},be(Kt);var Yt={},Qt={};function Jt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Qt:Yt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Xt(e,t){var n=I("span",null,null,l?"padding-right: .1px":null),r={pre:I("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=$t,Te(e.display.measure)&&(o=ce(a,e.doc.direction))&&(r.addToken=en(r.addToken,o)),r.map=[],nn(a,r,ht(e,a,t!=e.display.externalMeasured&&Je(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=N(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=N(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ae(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=N(r.pre.className,r.textClass||"")),r}function Zt(e){var t=T("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function $t(e,t,n,r,i,a,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&d.from<=c);h++);if(d.to>=u)return e(n,r,i,a,o,s,l);e(n,r.slice(0,d.to-c),i,a,null,s,l),a=null,r=r.slice(d.to-c),c=d.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(r)for(var o,s,l,c,u,d,h,f=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=u=s="",h=null,d=null,v=1/0;for(var b=[],y=void 0,x=0;xp||_.collapsed&&E.to==p&&E.from==p)){if(null!=E.to&&E.to!=p&&v>E.to&&(v=E.to,c=""),_.className&&(l+=" "+_.className),_.css&&(s=(s?s+";":"")+_.css),_.startStyle&&E.from==p&&(u+=" "+_.startStyle),_.endStyle&&E.to==v&&(y||(y=[])).push(_.endStyle,E.to),_.title&&((h||(h={})).title=_.title),_.attributes)for(var k in _.attributes)(h||(h={}))[k]=_.attributes[k];_.collapsed&&(!d||Lt(d.marker,_)<0)&&(d=E)}else E.from>p&&v>E.from&&(v=E.from)}if(y)for(var w=0;w=f)break;for(var C=Math.min(f,v);;){if(g){var O=p+g.length;if(!d){var A=O>C?g.slice(0,C-p):g;t.addToken(t,A,o?o+l:l,u,p+A.length==v?c:"",s,h)}if(O>=C){g=g.slice(C-p),p=C;break}p=O,u=""}g=i.slice(a,a=n[m++]),o=Jt(n[m++],t.cm.options)}}else for(var T=1;Tn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function In(e,t,n,r){return Rn(e,Ln(e,t),n,r)}function Dn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&a.push((l.bottom+c.top)/2-n.top)}}a.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(a=function(e,t,n,r){var i,a=Mn(t.map,n,r),l=a.node,c=a.start,u=a.end,d=a.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){for(;c&&re(t.line.text.charAt(a.coverStart+c));)--c;for(;a.coverStart+u1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var f;c>0&&(d=r="right"),i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+ir(e.display),top:p.top,bottom:p.bottom}:jn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,b=t.view.measure.heights,y=0;yt)&&(i=(a=l-s)-1,t>=l&&(o="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],o="left";if("right"==n&&i==l-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function Bn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return o("before"==c?l-1:l,"before"==c);function u(e,t,n){return o(n?e-1:e,1==s[t].level!=n)}var d=se(s,l,c),h=oe,f=u(l,d,"before"==c);return null!=h&&(f.other=u(l,h,"before"!=c)),f}function Yn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ke(e.doc,t.line),i=zt(r)+kn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Qn(e,t,n,r,i){var a=et(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function Jn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Qn(r.first,0,null,-1,-1);var i=Xe(r,n),a=r.first+r.size-1;if(i>a)return Qn(r.first+r.size-1,Ke(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=Ke(r,i);;){var s=er(e,o,i,t,n),l=Mt(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;o=Ke(r,i=c.line)}}function Xn(e,t,n,r){r-=zn(t);var i=t.text.length,a=ae((function(t){return Rn(e,n,t-1).bottom<=r}),i,0);return{begin:a,end:i=ae((function(t){return Rn(e,n,t).top>r}),a,i)}}function Zn(e,t,n,r){return n||(n=Ln(e,t)),Xn(e,t,n,Vn(e,t,Rn(e,n,r),"line").top)}function $n(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=zt(t);var a=Ln(e,t),o=zn(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?nr:tr)(e,t,n,a,u,r,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var h,f,p=null,m=null,g=ae((function(t){var n=Rn(e,a,t);return n.top+=o,n.bottom+=o,!!$n(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)}),s,l),v=!1;if(m){var b=r-m.left=x.bottom?1:0}return Qn(n,g=ie(t.text,g,1),f,v,r-h)}function tr(e,t,n,r,i,a,o){var s=ae((function(s){var l=i[s],c=1!=l.level;return $n(qn(e,et(n,c?l.to:l.from,c?"before":"after"),"line",t,r),a,o,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=qn(e,et(n,c?l.from:l.to,c?"after":"before"),"line",t,r);$n(u,a,o,!0)&&u.top>o&&(l=i[s-1])}return l}function nr(e,t,n,r,i,a,o){var s=Xn(e,t,r,o),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h=c||f.to<=l)){var p=Rn(e,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,m=pm)&&(u=f,d=m)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Nn){Nn=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(T("br"));Nn.appendChild(document.createTextNode("x"))}A(e.measure,Nn);var n=Nn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),O(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=T("span","xxxxxxxxxx"),n=T("pre",[t],"CodeMirror-line-like");A(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ar(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:or(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function or(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(Ht(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o0&&(l=Ke(e.doc,c.line).text).length==c.ch){var u=B(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((a-Sn(e.display).left)/ir(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)_t&&Ft(e.doc,t)i.viewFrom?fr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)fr(e);else if(t<=i.viewFrom){var a=pr(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):fr(e)}else if(n>=i.viewTo){var o=pr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):fr(e)}else{var s=pr(e,t,t,-1),l=pr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(an(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):fr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var a=r.view[ur(e,t)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==U(o,n)&&o.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,a=ur(e,t),o=e.display.view;if(!_t||n==e.doc.first+e.doc.size)return{index:a,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(a==o.length-1)return null;i=s+o[a].size-t,a++}else i=s-t;t+=i,n+=i}for(;Ft(e.doc,n)!=n;){if(a==(r<0?0:o.length-1))return null;n+=r*o[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:n}}function mr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().linet||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),1==o.level?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?h:r,(function(e,t,i,d){var g="ltr"==i,v=f(e,g?"left":"right"),b=f(t-1,g?"right":"left"),y=null==n&&0==e,x=null==r&&t==h,E=0==d,_=!m||d==m.length-1;if(b.top-v.top<=3){var k=(c?x:y)&&_,w=(c?y:x)&&E?s:(g?v:b).left,S=k?l:(g?b:v).right;u(w,v.top,S-w,v.bottom)}else{var C,O,A,T;g?(C=c&&y&&E?s:v.left,O=c?l:p(e,i,"before"),A=c?s:p(t,i,"after"),T=c&&x&&_?l:b.right):(C=c?p(e,i,"before"):s,O=!c&&y&&E?l:v.right,A=!c&&x&&_?s:b.left,T=c?p(t,i,"after"):l),u(C,v.top,O-C,v.bottom),v.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Sr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function _r(e){e.state.focused||(e.display.input.focus(),wr(e))}function kr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Sr(e))}),100)}function wr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(pe(e,"focus",e,t),e.state.focused=!0,R(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Er(e))}function Sr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,C(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Cr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||h<-.005)&&(Qe(i.line,l),Or(i.line),i.rest))for(var f=0;fe.display.sizerWidth){var p=Math.ceil(c/ir(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Or(e){if(e.widgets)for(var t=0;t=o&&(a=Xe(t,zt(Ke(t,l))-e.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function Tr(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,a=An(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+wn(n),l=t.tops-r;if(t.topi+a){var u=Math.min(t.top,(c?s:t.bottom)-a);u!=i&&(o.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,f=On(e)-n.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?o.scrollLeft=0:t.leftf+h-3&&(o.scrollLeft=t.right+(p?0:10)-f),o}function Ir(e,t){null!=t&&(Rr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Dr(e){Rr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Lr(e,t,n){null==t&&null==n||Rr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Rr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Nr(e,Yn(e,t.from),Yn(e,t.to),t.margin))}function Nr(e,t,n,r){var i=Tr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Lr(e,i.scrollLeft,i.scrollTop)}function jr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||li(e,{top:t}),Mr(e,t,!0),n&&li(e),ri(e,100))}function Mr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Pr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,di(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Br(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+wn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Cn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Fr=function(e,t,n){this.cm=n;var r=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),de(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),de(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Fr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var e=b&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new F,this.disableVert=new F},Fr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Fr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ur=function(){};function Hr(e,t){t||(t=Br(e));var n=e.display.barWidth,r=e.display.barHeight;Gr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Cr(e),Gr(e,Br(e)),n=e.display.barWidth,r=e.display.barHeight}function Gr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var zr={native:Fr,null:Ur};function Vr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&C(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new zr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Pr(e,t):jr(e,t)}),e),e.display.scrollbars.addClass&&R(e.display.wrapper,e.display.scrollbars.addClass)}var Wr=0;function Kr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.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},t=e.curOp,on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}function qr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ai(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qr(e){e.updatedDisplay=e.mustUpdate&&oi(e.cm,e.update)}function Jr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Cr(t),e.barMeasure=Br(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=In(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Cn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-On(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Xr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var a=T("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-kn(e.display))+"px;\n height: "+(t.bottom-t.top+Cn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=qn(e,t),l=n&&n!=t?qn(e,n):s,c=Tr(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(jr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(Pr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var o=0;o=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ft(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(a){if(r.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?Ge(t.mode,r.state):null,l=dt(e,a,r,!0);s&&(r.state=s),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var d=!o||o.length!=a.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&hn)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&$r(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;hi(e)&&(fr(e),t.dims=ar(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFromo&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),_t&&(a=Ft(e.doc,a),o=Ut(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=an(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=an(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n}(e,a,o),n.viewOffset=zt(Ke(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=mr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=L();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function s(t){var n=t.nextSibling;return l&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d-1&&(f=!1),un(e,h,u,n)),f&&(O(h.lineNumber),h.lineNumber.appendChild(document.createTextNode($e(e.options,u)))),o=h.node.nextSibling}else{var p=vn(e,h,u,n);a.insertBefore(p,o)}u+=h.size}for(;o;)o=s(o)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=L()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),O(n.cursorDiv),O(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=On(e))r&&(t.visible=Ar(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+wn(e.display)-An(e),n.top)}),t.visible=Ar(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!oi(e,t))break;Cr(e);var i=Br(e);gr(e),Hr(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var n=new ai(e,t);if(oi(e,n)){Cr(e),si(e,n);var r=Br(e);gr(e),Hr(e,r),ui(e,r),n.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Cn(e)+"px"}function di(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=or(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",o=0;os.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||a&&u){if(a&&b&&l)e:for(var h=t.target,f=o.view;h!=s;h=h.parentNode)for(var p=0;p=0&&tt(e,r.to())<=0)return n}return-1};var ki=function(e,t){this.anchor=e,this.head=t};function wi(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=U(t,i);for(var a=1;a0:l>=0){var c=at(s.from(),o.from()),u=it(s.to(),o.to()),d=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,t.splice(--a,2,new ki(d?u:c,d?c:u))}}return new _i(t,n)}function Si(e,t){return new _i([new ki(e,t||e)],0)}function Ci(e){return e.text?et(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Oi(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Ci(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ci(t).ch-t.to.ch),et(n,r)}function Ai(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Ni(e,t,n){!function e(r,i,a){if(r.linked)for(var o=0;os-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(a=function(e,t){return t?(Fi(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}(i,i.lastOp==r)))o=Y(a.changes),0==tt(t.from,t.to)&&0==tt(t.from,o.to)?o.to=Ci(t):a.changes.push(Bi(e,t));else{var l=Y(i.done);for(l&&l.ranges||Gi(e.sel,i.done),a={changes:[Bi(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,o||pe(e,"historyAdded")}function Hi(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,a,Y(i.done),t))?i.done[i.done.length-1]=t:Gi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&!1!==r.clearRedo&&Fi(i.undone)}function Gi(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function zi(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=n.markedSpans),++a}))}function Vi(e){if(!e)return null;for(var t,n=0;n-1&&(Y(s)[d]=c[d],delete c[d])}}}return r}function qi(e,t,n,r){if(r){var i=e.anchor;if(n){var a=tt(t,i)<0;a!=tt(n,i)<0?(i=t,t=n):a!=tt(t,n)<0&&(t=n)}return new ki(i,t)}return new ki(n||t,t)}function Yi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),$i(e,new _i([qi(e.sel.primary(),t,n,i)],0),r)}function Qi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:s.to>t.ch))){if(i&&(pe(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),h=void 0;if((r<0?u:c)&&(d=oa(e,d,-r,d&&d.line==t.line?a:null)),d&&d.line==t.line&&(h=tt(d,n))&&(r<0?h<0:h>0))return ia(e,d,t,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=oa(e,f,r,f.line==t.line?a:null)),f?ia(e,f,t,r,i):null}}return t}function aa(e,t,n,r,i){var a=r||1,o=ia(e,t,n,a,i)||!i&&ia(e,t,n,a,!0)||ia(e,t,n,-a,i)||!i&&ia(e,t,n,-a,!0);return o||(e.cantEdit=!0,et(e.first,0))}function oa(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ke(e,t.line)).text.length?t.line0)){var u=[l,1],d=tt(c.from,s.from),h=tt(c.to,s.to);(d<0||!o.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(h>0||!o.inclusiveRight&&!h)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)ua(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else ua(e,t)}}function ua(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Ai(e,t);Ui(e,t,n,e.cm?e.cm.curOp.id:NaN),fa(e,t,n,Ct(e,t));var r=[];Ni(e,(function(e,n){n||-1!=U(r,e.history)||(va(e.history,t),r.push(e.history)),fa(e,t,null,Ct(e,t))}))}}function da(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,a=e.history,o=e.sel,s="undo"==t?a.done:a.undone,l="undo"==t?a.undone:a.done,c=0;c=0;--f){var p=h(f);if(p)return p.v}}}}function ha(e,t){if(0!=t&&(e.first+=t,e.sel=new _i(Q(e.sel.ranges,(function(e){return new ki(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){dr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linea&&(t={from:t.from,to:et(a,Ke(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=qe(e,t.from,t.to),n||(n=Ai(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,s=!1,l=a.line;e.options.lineWrapping||(l=Je(Bt(Ke(r,a.line))),r.iter(l,o.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Ri(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,a.line+t.text.length,(function(e){var t=Vt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ke(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead1||!(this.children[0]instanceof ya))){var s=[];this.collapse(s),this.children=[new ya(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var o=i.lines.length%25+25,s=o;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=I("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Pt(e,t.line,t,n,a)||t.line!=n.line&&Pt(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");_t=!0}a.addToHistory&&Ui(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(e){c&&a.collapsed&&!c.options.lineWrapping&&Bt(e)==c.display.maxLine&&(s=!0),a.collapsed&&l!=t.line&&Qe(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new kt(a,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),a.collapsed&&e.iter(t.line,n.line+1,(function(t){Ht(e,t)&&Qe(t,0)})),a.clearOnEnter&&de(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(Et=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ka,a.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),a.collapsed)dr(c,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=t.line;u<=n.line;u++)hr(c,u,"text");a.atomic&&na(c.doc),ln(c,"markerAdded",c,a)}return a}wa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kr(e),ve(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;ae.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&dr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&na(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&qr(e),this.parent&&this.parent.clear()}},wa.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)ca(this,r[l]);s?Zi(this,s):this.cm&&Dr(this.cm)})),undo:ni((function(){da(this,"undo")})),redo:ni((function(){da(this,"redo")})),undoSelection:ni((function(){da(this,"undo",!0)})),redoSelection:ni((function(){da(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(a){var o=a.markedSpans;if(o)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=a,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),ea(t.doc,Si(n,n)),h)for(var f=0;f=0;t--)pa(e.doc,"",r[t].from,r[t].to,"+delete");Dr(e)}))}function Xa(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Za(e,t,n){var r=Xa(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function $a(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var a=ce(n,t.doc.direction);if(a){var o,s=i<0?Y(a):a[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Ln(t,n);o=i<0?n.text.length-1:0;var u=Rn(t,c,o).top;o=ae((function(e){return Rn(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,o),"before"==l&&(o=Xa(n,o,1))}else o=i<0?s.to:s.from;return new et(r,o,l)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}Ga.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"},Ga.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"},Ga.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"},Ga.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"]},Ga.default=b?Ga.macDefault:Ga.pcDefault;var eo={selectAll:sa,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),G)},killLine:function(e){return Ja(e,(function(t){if(t.empty()){var n=Ke(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Ke(e.doc,i.line-1).text;o&&(i=new et(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),et(i.line-1,o.length-1),i,"+transpose"))}n.push(new ki(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return $r(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,a=!1,c=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,fe(i.wrapper.ownerDocument,"mouseup",c),fe(i.wrapper.ownerDocument,"mousemove",u),fe(i.scroller,"dragstart",d),fe(i.scroller,"drop",c),a||(ye(t),r.addNew||Yi(e.doc,n,null,null,r.extend),l&&!h||o&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){a=a||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return a=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),de(i.wrapper.ownerDocument,"mouseup",c),de(i.wrapper.ownerDocument,"mousemove",u),de(i.scroller,"dragstart",d),de(i.scroller,"drop",c),kr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,a):function(e,t,n,r){var i=e.display,a=e.doc;ye(t);var o,s,l=a.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=a.sel.contains(n),o=s>-1?c[s]:new ki(n,n)):(o=a.sel.primary(),s=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new ki(n,n)),n=cr(e,t,!0,!0),s=-1;else{var u=vo(e,n,r.unit);o=r.extend?qi(o,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,$i(a,wi(e,c.concat([o]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?($i(a,wi(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):Ji(a,s,o,z):(s=0,$i(a,new _i([o],0),z),l=a.sel);var d=n;function h(t){if(0!=tt(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=B(Ke(a,n.line).text,n.ch,c),h=B(Ke(a,t.line).text,t.ch,c),f=Math.min(u,h),p=Math.max(u,h),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ke(a,m).text,b=W(v,f,c);f==p?i.push(new ki(et(m,b),et(m,b))):v.length>b&&i.push(new ki(et(m,b),et(m,W(v,p,c))))}i.length||i.push(new ki(n,n)),$i(a,wi(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,x=o,E=vo(e,t,r.unit),_=x.anchor;tt(E.anchor,_)>0?(y=E.head,_=at(x.from(),E.anchor)):(y=E.anchor,_=it(x.to(),E.head));var k=l.ranges.slice(0);k[s]=function(e,t){var n=t.anchor,r=t.head,i=Ke(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var a=ce(i);if(!a)return t;var o=se(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=o+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==a.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(a,r.ch,r.sticky),d=u-o||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=a[c+(l?-1:0)],f=l==(1==h.level),p=f?h.from:h.to,m=f?"after":"before";return n.ch==p&&n.sticky==m?t:new ki(new et(n.line,p,m),r)}(e,new ki(st(a,_),y)),$i(a,wi(e,k,s),z)}}var f=i.wrapper.getBoundingClientRect(),p=0;function m(t){e.state.selectingText=!1,p=1/0,t&&(ye(t),i.input.focus()),fe(i.wrapper.ownerDocument,"mousemove",g),fe(i.wrapper.ownerDocument,"mouseup",v),a.history.lastSelOrigin=null}var g=ei(e,(function(t){0!==t.buttons&&we(t)?function t(n){var o=++p,s=cr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,d)){e.curOp.focus=L(),h(s);var l=Ar(i,a);(s.line>=l.to||s.linef.bottom?20:0;c&&setTimeout(ei(e,(function(){p==o&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),v=ei(e,m);e.state.selectingText=v,de(i.wrapper.ownerDocument,"mousemove",g),de(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,a)}(t,r,a,e):ke(e)==n.scroller&&ye(e):2==i?(r&&Yi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(k?t.display.input.onContextMenu(e):kr(t)))}}function vo(e,t,n){if("char"==n)return new ki(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new ki(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new ki(r.from,r.to)}function bo(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ye(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!ve(e,n))return Ee(t);a-=s.top-o.viewOffset;for(var l=0;l=i)return pe(e,n,e,Xe(e.doc,a),e.display.gutterSpecs[l].className,t),Ee(t)}}function yo(e,t){return bo(e,t,"gutterClick",!0)}function xo(e,t){_n(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&bo(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Eo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(e)}mo.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var _o={toString:function(){return"CodeMirror.Init"}},ko={},wo={};function So(e,t,n){if(!t!=!(n&&n!=_o)){var r=e.display.dragFunctions,i=t?de:fe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Co(e){e.options.lineWrapping?(R(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(C(e.display.wrapper,"CodeMirror-wrap"),Wt(e)),lr(e),dr(e),Un(e),setTimeout((function(){return Hr(e)}),100)}function Oo(e,t){var n=this;if(!(this instanceof Oo))return new Oo(e,t);this.options=t=t?P(t):{},P(ko,t,!1);var r=t.value;"string"==typeof r?r=new Ia(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Oo.inputStyles[t.inputStyle](this),a=this.display=new gi(e,r,i,t);for(var c in a.wrapper.CodeMirror=this,Eo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vr(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 F,keySeq:null,specialChars:null},t.autofocus&&!v&&a.input.focus(),o&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;de(t.scroller,"mousedown",ei(e,go)),de(t.scroller,"dblclick",o&&s<11?ei(e,(function(t){if(!me(e,t)){var n=cr(e,t);if(n&&!yo(e,t)&&!_n(e.display,t)){ye(t);var r=e.findWordAt(n);Yi(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||ye(t)}),de(t.scroller,"contextmenu",(function(t){return xo(e,t)})),de(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||xo(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function a(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}de(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!yo(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),de(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),de(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!_n(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,s=e.coordsChar(t.activeTouch,"page");o=!r.prev||a(r,r.prev)?new ki(s,s):!r.prev.prev||a(r,r.prev.prev)?e.findWordAt(s):new ki(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),ye(n)}i()})),de(t.scroller,"touchcancel",i),de(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(jr(e,t.scroller.scrollTop),Pr(e,t.scroller.scrollLeft,!0),pe(e,"scroll",e))})),de(t.scroller,"mousewheel",(function(t){return Ei(e,t)})),de(t.scroller,"DOMMouseScroll",(function(t){return Ei(e,t)})),de(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||_e(t)},over:function(t){me(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();br(e,n,r),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),A(e.display.dragCursor,r)}}(e,t),_e(t))},start:function(t){return function(e,t){if(o&&(!e.state.draggingText||+new Date-Da<100))_e(t);else if(!me(e,t)&&!_n(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var n=T("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,La),leave:function(t){me(e,t)||Ra(e)}};var l=t.input.getField();de(l,"keyup",(function(t){return uo.call(e,t)})),de(l,"keydown",ei(e,co)),de(l,"keypress",ei(e,ho)),de(l,"focus",(function(t){return wr(e,t)})),de(l,"blur",(function(t){return Sr(e,t)}))}(this),Ma(),Kr(this),this.curOp.forceUpdate=!0,ji(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&wr(n)}),20):Sr(this),wo)wo.hasOwnProperty(c)&&wo[c](this,t[c],_o);hi(this),t.finishInit&&t.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>a.first?B(Ke(a,t-1).text,null,o):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/o);f;--f)h+=o,d+="\t";if(ho,l=De(t),c=null;if(s&&r.ranges.length>1)if(Io&&Io.text.join("\n")==t){if(r.ranges.length%Io.text.length==0){c=[];for(var u=0;u=0;h--){var f=r.ranges[h],p=f.from(),m=f.to();f.empty()&&(n&&n>0?p=et(p.line,p.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ke(a,m.line).text.length,m.ch+Y(l).length)):s&&Io&&Io.lineWise&&Io.text.join("\n")==l.join("\n")&&(p=m=et(p.line,0)));var g={from:p,to:m,text:c?c[h%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};ca(e.doc,g),ln(e,"inputRead",e,g)}t&&!s&&No(e,t),Dr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ro(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||$r(t,(function(){return Lo(t,n,0,null,"paste")})),!0}function No(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s-1){o=To(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ke(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=To(e,i.head.line,"smart"));o&&ln(e,"electricInput",e,i.head.line)}}}function jo(e){for(var t=[],n=[],r=0;r0?0:-1));o=isNaN(u)?null:new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else o=i?function(e,t,n,r){var i=ce(t,e.doc.direction);if(!i)return Za(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=se(i,n.ch,n.sticky),o=i[a];if("ltr"==e.doc.direction&&o.level%2==0&&(r>0?o.to>n.ch:o.from=o.from&&h>=u.begin)){var f=d?"before":"after";return new et(n.line,h,f)}}var p=function(e,t,r){for(var a=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e0==(1!=o.level),c=s?r.begin:l(r.end,-1);if(o.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=p(r>0?0:i.length-1,r,c(g)))?null:m}(e.cm,s,t,n):Za(s,t,n);if(null==o){if(a||(c=t.line+l)=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=Ke(e,c))))return!1;t=$a(i,e.cm,s,t.line,l)}else t=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,d="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var p=s.text.charAt(t.ch)||"\n",m=ee(p,h)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||f||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(u=m),n>0&&!c(!f))break}var g=aa(e,t,a,o,!0);return nt(a,g)&&(g.hitSide=!0),g}function Fo(e,t,n,r){var i,a,o=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(a=Jn(e,s,i)).outside;){if(n<0?i<=0:i>=o.height){a.hitSide=!0;break}i+=5*n}return a}var Uo=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new F,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ho(e,t){var n=Dn(e,t.line);if(!n||n.hidden)return null;var r=Ke(e.doc,t.line),i=Tn(n,r,t.line),a=ce(r,e.doc.direction),o="left";a&&(o=se(a,t.ch)%2?"right":"left");var s=Mn(i.map,t.ch,o);return s.offset="right"==s.collapse?s.end:s.start,s}function Go(e,t){return t&&(e.bad=!0),e}function zo(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Go(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||a.line=t.display.viewFrom&&Ho(t,i)||{node:l[0].measure.map[2],offset:0},u=a.liner.firstLine()&&(o=et(o.line-1,Ke(r.doc,o.line-1).length)),s.ch==Ke(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;o.line==i.viewFrom||0==(e=ur(r,o.line))?(t=Je(i.view[0].line),n=i.view[0].node):(t=Je(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=Je(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,i){var a="",o=!1,s=e.doc.lineSeparator(),l=!1;function c(){o&&(a+=s,l&&(a+=s),o=l=!1)}function u(e){e&&(c(),a+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var a,h=t.getAttribute("cm-marker");if(h){var f=e.findMarks(et(r,0),et(i+1,0),(g=+h,function(e){return e.id==g}));return void(f.length&&(a=f[0].find(0))&&u(qe(e.doc,a.from,a.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&c();for(var m=0;m1&&h.length>1;)if(Y(d)==Y(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var f=0,p=0,m=d[0],g=h[0],v=Math.min(m.length,g.length);fo.ch&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)f--,p++;d[d.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var E=et(t,f),_=et(l,h.length?Y(h).length-p:0);return d.length>1||d[0]||tt(E,_)?(pa(r.doc,d,E,_,"+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 e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Uo.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||$r(this.cm,(function(){return dr(e.cm)}))},Uo.prototype.setUneditable=function(e){e.contentEditable="false"},Uo.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Lo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Uo.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Uo.prototype.onContextMenu=function(){},Uo.prototype.resetPosition=function(){},Uo.prototype.needsContentAttribute=!0;var Wo=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new F,this.hasSelection=!1,this.composing=null};Wo.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function a(e){if(!me(r,e)){if(r.somethingSelected())Do({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=jo(r);Do({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,G):(n.prevInput="",i.value=t.text.join("\n"),j(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),de(i,"input",(function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),de(i,"paste",(function(e){me(r,e)||Ro(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),de(i,"cut",a),de(i,"copy",a),de(e.scroller,"paste",(function(t){if(!_n(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var a=new Event("paste");a.clipboardData=t.clipboardData,i.dispatchEvent(a)}})),de(e.lineSpace,"selectstart",(function(t){_n(e,t)||ye(t)})),de(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),de(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Wo.prototype.createField=function(e){this.wrapper=Po(),this.textarea=this.wrapper.firstChild},Wo.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Wo.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=qn(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},Wo.prototype.showSelection=function(e){var t=this.cm.display;A(t.cursorDiv,e.cursors),A(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Wo.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&j(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null))}},Wo.prototype.getField=function(){return this.textarea},Wo.prototype.supportsTouch=function(){return!1},Wo.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||L()!=this.textarea))try{this.textarea.focus()}catch(e){}},Wo.prototype.blur=function(){this.textarea.blur()},Wo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Wo.prototype.receivedFocus=function(){this.slowPoll()},Wo.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Wo.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Wo.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Le(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(8203!=a||r||(r="​"),8666==a)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Wo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Wo.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},Wo.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=cr(n,e),c=r.scroller.scrollTop;if(a&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(a)&&ei(n,$i)(n.doc,Si(a),G);var u,h=i.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.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(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&s>=9&&g(),k){_e(e);var m=function(){fe(window,"mouseup",m),setTimeout(v,20)};de(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),a="​"+(e?i.value:"");i.value="⇚",i.value=a,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=h,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!o||o&&s<9)&&g();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ei(n,sa)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},Wo.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Wo.prototype.setUneditable=function(){},Wo.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=_o&&i(e,t,n)}:i)}e.defineOption=n,e.Init=_o,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Ii(e)}),!0),n("indentUnit",2,Ii,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Di(e),Un(e),dr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(-1==a)break;i=a+t.length,n.push(et(r,a))}r++}));for(var i=n.length-1;i>=0;i--)pa(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=_o&&e.refresh()})),n("specialCharPlaceholder",Zt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Eo(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Qa(t),i=n!=_o&&Qa(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Co,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=fi(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?or(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Hr(e)}),!0),n("scrollbarStyle","native",(function(e){Vr(e),Hr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=fi(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Sr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,So),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Di,!0),n("addModeClass",!1,Di,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Di,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Oo),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),pe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Qa(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(To(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Dr(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;l0&&Ji(this.doc,r,new ki(a,c[r].to()),G)}}})),getTokenAt:function(e,t){return bt(this,e,t)},getLineTokens:function(e,t){return bt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=ht(this,Ke(this.doc,e.line)),r=0,i=(n.length-1)/2,a=e.ch;if(0==a)t=n[2];else for(;;){var o=r+i>>1;if((o?n[2*o-1]:0)>=a)i=o;else{if(!(n[2*o+1]a&&(e=a,i=!0),r=Ke(this.doc,e)}else r=e;return Vn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-zt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a,o,s,l=this.display,c=(e=qn(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),h=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>h&&(u=h-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(a=this,o={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Tr(a,o)).scrollTop&&jr(a,s.scrollTop),null!=s.scrollLeft&&Pr(a,s.scrollLeft))},triggerOnKeyDown:ti(co),triggerOnKeyPress:ti(ho),triggerOnKeyUp:uo,triggerOnMouseDown:ti(go),execCommand:function(e){if(eo.hasOwnProperty(e))return eo[e].call(null,this)},triggerElectric:ti((function(e){No(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=st(this.doc,e),o=0;o0&&o(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&lr(this),pe(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),ji(this,e),Un(this),this.display.input.reset(),Lr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},be(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,a){e.registerHelper(t,r,a),n[t]._global.push({pred:i,val:a})}}(Oo);var Ko="iter insert remove copy getEditor constructor".split(" ");for(var qo in Ia.prototype)Ia.prototype.hasOwnProperty(qo)&&U(Ko,qo)<0&&(Oo.prototype[qo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ia.prototype[qo]));return be(Ia),Oo.inputStyles={textarea:Wo,contenteditable:Uo},Oo.defineMode=function(e){Oo.defaults.mode||"null"==e||(Oo.defaults.mode=e),Pe.apply(this,arguments)},Oo.defineMIME=function(e,t){Me[e]=t},Oo.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Oo.defineMIME("text/plain","null"),Oo.defineExtension=function(e,t){Oo.prototype[e]=t},Oo.defineDocExtension=function(e,t){Ia.prototype[e]=t},Oo.fromTextArea=function(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=L();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(de(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(fe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Oo((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=fe,e.on=de,e.wheelEventPixels=xi,e.Doc=Ia,e.splitLines=De,e.countColumn=B,e.findColumn=W,e.isWordChar=$,e.Pass=H,e.signal=pe,e.Line=Kt,e.changeEnd=Ci,e.scrollbarModel=zr,e.Pos=et,e.cmpPos=tt,e.modes=je,e.mimeModes=Me,e.resolveMode=Be,e.getMode=Fe,e.modeExtensions=Ue,e.extendMode=He,e.copyState=Ge,e.startState=Ve,e.innerMode=ze,e.commands=eo,e.keyMap=Ga,e.keyName=Ya,e.isModifierKey=Ka,e.lookupKey=Wa,e.normalizeKeyMap=Va,e.StringStream=We,e.SharedTextMarker=Ca,e.TextMarker=wa,e.LineWidget=Ea,e.e_preventDefault=ye,e.e_stopPropagation=xe,e.e_stop=_e,e.addClass=R,e.contains=D,e.rmClass=C,e.keyNames=Ba}(Oo),Oo.version="5.58.2",Oo}()},W6BS: +/*!************************************************!*\ + !*** ./src/assets/images/icons/weibaitong.png ***! + \************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAVs0lEQVRoQ+2aa6xlZ3nff++677Xv+9zPHM/YHo+xwQ4E14GKKESkiFsSM8bYQBIEkaBEAkqbRmo/9FulSoX2Qz9GVVQJqUJBhKKA1KRJCIlowwdDDDa+jOd65syc275f1v1d1fOufYYE2ZhJZKRWXjOjvffaa6/1/p//8/yfyzuqLMuS/48P9RrA/8fZfY3B2yXQBHQpf185tBUK+SvH8uV2H/eK1/+jGfwRIBC5ks/Vq/yplq2Wqz+B/ONg5LNlrlz+Qhnot373iih+wgX/YIAivrJgjTKA9BKcYa/Uy/MnUEpD0S2AyzdKkMslZYklbwVYWZpXQSygrSVoc+4fcPzUAKtsom4xpIGiLCkMZbJGs1LkvOHPfJbrhRX5/CM/NDwJZlXiqBKlc7AEjg1aI2iVDXZpoeS9AFXlkmV1W8z+VACLE7dbMiWLE2CFADLgqig6SakCSs4jizcvAvBHMVkqxxhKkePqAs8S1mxyLUxqw6AYKLdtbMtGINpiKKUM07bc96dk9BUBykIFoNYVC/JewMkCDDh18p0so6w+GzfT+FoWC7Yl11curQpFVCoyJQsvDThP6crNdVldi0KLcwogyzJGssVrxYWXAOWzwWg84eXd92UByoK0WHEJqBCA4oC6ChstYHRJIW6lZHWQlsoYQH6rypyOLZ5Xuahx3NIi1TAvLBIcHIlUw8rfcWFLFmzhmPBUxi0NKIRdAVi5qmPAL88LrS9z/AigmHBpCcOaCIUA1BVj4ma6LCi1FkjLBZRoVRrLR9piXjhkysI2mqJxhY2lQUrDjG3iVv5k5YmgyHI1ngLPBqfUxg21nC5LbGUhHJbGUPKu8hTbUthKGcZP3Palks3fY/BECQVQLoDk0QWURYFVFuTaNudtS+Pb8mCNZcQEYmMQi8KymCSQGLJLIx7zKCFKi1uuJNZvNXxDvLBVszUtW5xSm0WL8Mh9hV0xoGFfKRItVzjYJmaFSQtHAFqVwY3i/pi7Kl2e6N9SOJaxkJk4q0CmqcZVBaGtybFY5OIaCscqKqsaUYBE6LYU08Jimi/dxrIYjudM5ynCohzCyvZaw3iCLEviqW3ntDxR1SreTDCbQ1OI65c2qZKQsY0RKlUVFoVxWcsS5DLdnHisKk6iX1iTeBOXlNgqK4kXxmTdgapAVlWKYpKLsuVYykSJictxVtKPNMq1K0saFiym8wWzKKkiSnKeDSud9i1llOe0XE3PrUTMLEmerys1zpVEYCVWIjqVS1aGEjYlJKrvKvYrAVoWGcKgxIkBYmKuurlRTuOqmkIrdCEOJ8qpyIuc/iInL7R5oAEoOVEXRv0cx8HyHBZxZAySJilplqFE8i3bGLHXqZvFlEp4qOJOKM6zrJKkUuN7Lp6t8GxxxcqIEtfCsnFNw1yViuQuxlVNbJ6AFNUuSjEUmbFWBfJEZITF6rywalW5ryyJc21czpSSy/RmErpSFIU2bJWWRRTFVcqwHPOdo3I8HbO60mVi1Y31qwqmYkN+Ox5Nl/Kv2V7t4DhWJWoSfZZFzy3whTUJCxNA4m02meVWgAWcASr31Kgk1+XJwitfl3ykDaPyWdzTiIeW9xKDBWlREkkgVmloWTdWorBIcwajiTlryZOkJClSVDRARUN0HvPut7+NuarxbD8hKqrEbcJTjDePTfiJiKy267iOu8yBot6KrgC0xWMkHiUMSiNsri2GqAoCCYETJlWU6VJcRpiTxUp6yMU1JQ7lPMJKFZvGXUXic4ijtKodxY7KIs8LFlFElC4rEbFwFsGsTzk74sbNI/70UsQDd67zyXe9mSKes3XnnVxZKK7sz8yzxcWWkWMW3mk3cB1xzyqXmtRg2LRMvMn13tItxXVFeBwJF0kfAlIqHgEoYPJSJFjyU0kugITJQlVgTYo4UVlFlmvyRFxUtNliMl2wWLqlZTuUyZxkvE/Wv8rFG2P+aq/g/yR1Um+dT53L+MyvvoUXD2esFGPO7qyhWqs8f3PGMMEsrCpQFM1miOvYOLbCtW2U5EgKE2+uFANWWamnI6AroTEKWyocAxDULClKEXsBUrEkqlm5ZxQXZLkIx7INEoYtG5NC4qxSYsthOJ+RZZp8MSUeXGF84wYv7A74q8OSZ4Yp+dadnGpYvKkW88vr8L5feQffGyo8yyU/usIDpwJ2du7gRuJyaRBRaI1rKxqdLkVekC5mzIaHnFnv4DRWsFWBrWxciTeTSKRIKAlcSTlV2hG3NwAnaVFKjFUsanItLiklmMUsTsky0dOTvk5R2DapUaXCKKhtW+xd36W/+zyH13Z5+uox3+6XXKWH17D4OTfi/tWQerLg2qjgvtNNPvbrv8K1m4c49R5Huk6jHtCY3eTcVkh9ZZtn+xnXb+4zH+9x/cJFJkf7BI7iNz78OO3tc9xc5NSEIaEsLxhNMpo1m9W2Z0SryqXiriVqnIjICIPaMJMLuKIqdhdJsgQoNQMMo4RUa0rbMbknGRxwcOUZLj73It/dnfA3U8U4Vpzq+Lxho8YOBcPpnCuJy1z5lG6Dd52Gjzx+nmf6BSvJDWppjFrZ5jj2qLs5O/6cuzZX+fZ3nuS//+GXTBz11k/R7K7yofe/lzu21om8JoeLAlvUM8lJC00YWKw0PcNelUbEVUvUKClLkf7MKKcxyDIdWEQnDJYWgac4mMdEGYz3d7n5/JNcuHCZJ/cWPD0u0Y7L2Y0G9wXgZDHXJhl7sUWSlnTXemzVYcsvOde1eeyD57kwUEROm3h0zE4zJcgXxO0dJrGibo24by0kmy/4ytf+mJuHx3RX1njiA49gez5NV+H1Nrl0nOFIzyhdia/otURxJVVonGUNqwaxLiVXSb4TIalctYrJJMlMvSe+/fyFF/iDL/1PvLCGH+3zv184Znde0Gp1eF3PYtWF/qzg4njBOLOot2qcabqc8nNCzyaKNLtzhwd26nzqo49xae+ItZpN4nWIW6tMR2N27DmBnTMPegwjm1P1jJ265vf/4IvYrsfjH3iUYPUU2XxA09J47TVujIQQi1oAnaazLCGlIKjKctWP88pFDbglwEK0o2oFnn3+Al/6+p/x7aeukRSKaf8Kd6+vMCngbCekKHN2+ykHixw3CNgRUC2bhl0yTkpuTguGqkFpe4jCvn1b87GPfYQfzBp0VETQ32WzV6OwA7LmNkk8o82Y0C4ZuqvU0hHf/PrXSCn5zQ9+AK97iv7xDVp1H0+VtFpdrs5sfNun2zzpMERdq/e3AIqWSCKXMksi8LtPP88Xv/a/+NZTV8nckE5vlWQ8ZHF4kbee7nF5EHMwzU2SXW/4nGo51FyYRQV7EfQz1whVqFLarQYbtYL1oGDdhw9/8AOo+ip7WY3RPKPXaaCm+3TtCK/WQNfXiZKYlrWg6RR8+ctfQyv40KPncbobFOni1vjEL2Ka7R6TMsCWErEs8BwIPZMt/w5AuUNZ8L3v/5D/9kd/yp8/dY1ZaRHW5IeKmhdiJxGL4R4bjYBpUrDTklbHYZzAzUXJsLDNA9qBzXrDZTVMWbczPJWT5jAvA+qBy71ntui26txz5gy9nTNE3gr9eY5da6KSEV0VmfxXNnqo6JBvfPUbaKX4yGOP0tjc4ehgn3araepbycV2HtNqNJmoJnkSUQsCVpoOlkwNbrmoFMXzOe/55L/nuVFCKwywpf6TYrdWJ2h2SKcT5jee5+c26xzNcg4XmrEWkCVrocVGqFi1clyVkOUpi8Iz8ZSqOkVjg6y+wYP+DX73n3+YZy5cZTE6IjoesNkOWNvcpLW6Req0SLyAdD6l5cQ0SPnDr3wdbdt86PwjWO0ViiTC93ziNMb1fMosMa+DhUWjXqfmO6w07R8HqEgWc9772f/M1cEY31Km0pdaUqoL16uhkgXp+AYrgccwKdgKNWtuQSiAsoJRDlOrSeT2SFtr0tNj1+u4cUJYU0S5zZnkAr/z6c8xi2BnewWdxswnxyz6+4wPbtDwLLa3t2msbuGvbZH29/jjr3wV7Xg88egjhJtnGPf3qbmeSc8iMKpIsL0ax4uSXqtJ4Dn0mnZVthkGpZBGkUYR7/7MF7g6nOJL3yWjBNfFDgLCRodiPjYJ/RdWC/L5hJG2megaU7tDFrSw7Rp23aNt2fRaHuuhzXY7pBfa3H/XFg/9k7dw/dJz2BtneXFvhvbq6DwhsApWuy08pyAeDTjcvUg02SdUDmfvOcuf/OW3cJ2Ax87/GrG3SjQfs73eIY1j07WUeY7teAwSixWpX215vsx8LNQgLpbdBESLiPd++j9ydTjDcaW6kxYILFtUyiFfLJiOD+gGAX4yZNy+h17DpRf6bPd8tkOHjW6dhqcME4WCRZwxj1LuP3c373/fO43r1ms1U8DPEs3hLGV3MKe/kM8JUvkHrk27XuNo90W+9T++SKfbpdXu8eivvYeodZpo2qfu26gix5f8kEZYtscwdel1mqau3Oh4+I6NGsZSqkFSwmgScf53/xPX+hPDoJQ7ruPg+QFOo0OnXKDGN7h7Z53NsKTVWaHpS5uSsUil77N5dnfI6TWfb//wiMZaB3824Wri8W/Pv4kHf+k9PHPtJg+tWBzqBmE559RaD6U1YehXRUSiORhF9Oea4+Njvvnl368YWVvn8fe/jwNrnWgyYLXbrCZudombx3h+jWHqGE+QY7O9BDgyAEtSA3DB+c99gWujObbkQXFyS4avVWvyxBtabDUcRrOUSVS1TtcOI06thTy1N+EX7+rx/Rsj3nhmhfF0SiMMaDnC4oI3PvB6nnjsPP3RhHbD5zD2IBkztQLy+QisOg07QzkO6w1PujrT9gyPjti7ecizL77Im99wP/vuafJkTCusUeYyJbDwSHFdj1R5rHVbpszcarumWVaTWGpRTYZiNIt55LNf4NJghGu7ph0x/ZhfpxO43FeLqXslea6o+VIO2SRFSTdUHExj1kOPZ/s59/U8vrM7YbXXppgOuZGF/Kt338tb3/M437uyyy+s+xxlLr4V0wzqFDqiXu9CnphFinpHmSbRBTXXIQzrXHnuaXScct2/h2S+T7veQBUpjhuaKYHjunhByEq3bXjZ7Mj9S9Q0LctqyFRw4dI1/sV/+K8cLyK6niKwLZM0m3aKVh5d1yJzfKJE5iZVz9Wf5ex0PK4Mc16/6nBtmnNn1zV5re471FTGPNE8/MbX8Vsf/U1GozHtekA/d3CKiKT0ydMZuRXg6oyFVrQ8mftUfZ909rWgxqXnnyXPUi6rM+hE7tEwY/6isPDLBa4XENbrZqxhpgwWPHimi5qnupQkOhsN+czv/TuSLEZJ01qYmbXpEeVGMq5r1VxKp40uJcFKV20xiXN6fsneXHNHy+IHfYsHVkue2Yuot+t48Zy9LOR33nGGdz72cf724lUe2nA50CENEiyvgU6m1MI6vjTctk3o2qSZNN/g26IZFrsXLpDGC75nvw4VjWj5MrbQxvA15vhuwFqnUc1mtAzKSt567ypqkelSW4pR/5hPfvbfEEuBbfYKSjKkMpFZSEGuLDphCH6DPNfVwMjCjCg6gc0gUWzVUo5ih9VAM4+1WV1YZIzTkrf9/Dk+8clPMZjO6dUcxri42YKs9CjSOTpo4Ocps1yKe5uiyMhKaXxdiiJl/9JFoijiyDmFThY4gWcmfalWODrFdXy2N1bJZcBVajNyfMu5VVSSlbJlwHH/iI9/4tNMU/BktKRcclVgaRtLi2UVnaAOQYM0l8FrhrJtJqliJdDsRTZ3hylPj33e0Em51M+pd3uEi0P2dIPf/qen+PWPfoKnL+/x4JrPXuYTFlMIOuTRGK/eoVbGLAqLRijViSbTOTU3QArR65dfZL6IcdbvIs1TdocF3bpPJ3RMzGWzASvr22C7ZpIn/x6+W+LUzPXgsN/nN574CEmSUtrVjo4lvaFTYDlSiSt6Gx1Cv0vhxliJTe6UlEnN7CRpw7QiLmVvopoOoF0sO2MclfzSm+/hM//y95guUtpShARtnCJmEeUoFeM1mziZJo4WeEHN7EUUSUpk73P95vfZvTYAvUa+ukGez9g7njPqF7Rd6RwKiugKi/llHMfHsnwzZG76ddTBwWGZZinD4YjPfvpzTGYzijwxsxBJxt07MlpnE1RmYbuKQG+iuhP0wEe1c+ILr8d2UhOrWldjDKu7TznaJFjbZX58Cqt2mTfd+y5+6+Nv53jyIr3mvYRunX5ymZ71MK6q4Qc+cVYwi2IaNR/PtdGpx7Xoqzx3+CeE84d54NR5IYhWo8Zf/s03+Oo3/wtrvW1Ct0PgrhA6K9TcDqV2jSAJc+rzn/98OZ1Ol/MVl7IsiOOINM0YTw4ZRJeJ9ZDpZEzQ9fGKDexmRJkVqMBn+twOyo5pNJsEYcjx8QG9h55kcel1hGcvMnvhHGrlBR66/1f55X+2zQvX/5q13r2QOQzzH/Lz7X/NYfEAvaZiePOQsrfOSnJIOwiNmz23+xccHr3AweGc8RjCIOD05lksakyjIzrBnRRimNmYXGdmHTs7pzh37pypadW1a9dKqRgODg7Y399nMhmTZZm5ecIxUTpgkR4yiQ+IFhPiLCeOZpSFB3GTXDdwdIv17hmarR4//MGT3PGL+1z/bo/em6/S/84pmg89zwPrj/COd55mMDkirNWwkx3G0QsUB2/Ba57jjq0OZTxGOS46ryYJ82jApetPcTDYJ6yt4tshtVoIuUMz7NI/HqJ1SthscMfOHZy9+y62trbwPO/WbuHf3z7TmvlcLDVmMBgwHIwYjSbMJ3Nm0ZxI5p3JjHk6RkbCgVfDsgN8ArP3N5juM5jdJD26xrOjq9TzCcfzkGYYcXrrbTz6xDs5OrrMeHzIjck+2eiA65OYdrjOPace5NzOw/hO10zW5ZDm27VDUxdLnMtwOctSk+NqtYDNzU3W1tfpdbvm2pc6bgE0u7IvsRUs56M4Yj6dmfJrOhwyGE8YjkaMxkNmszlpLDGbkeUx02RAlC2Y5UeUSZ+pdYyaz1k4Y9OdhE4D5dVoB6dZWbuLlneaXm2DPC1NR5BGCbF0CWVJEAQ0GnXanTb1sE69Xmdzc4uNjQ1ardZy4+dlN3fNF6+4R/9SP5eHJ0nMYhEh8TscDun3+0aoJuMJi8WCJMnRZgRZkJOR5FMKvWBz/QyN2gqqsEjTBE1q7iU5znZsfN83i2+32zSbTXq9HisrK6yurtJoNH4ympf49rYAvhzL1b5JSZqmZqGTyZT+4Jj+cd+4+mg4Yh7F5Kk0xqK4Jb7rVP87w1KGpU6nR6vVNMAEkPzrdDqGxX/McVsAb/dBsh0mKWgxnzMajxgOhhwf9+n3j5nNZ7RbbbrdrgElYE5Aua57u4962etfNYAvx7YISJIkxrXFxdvtlnFJW+Yiy+MnecrtIn/VAN7uQl6t618D+GpZ9md139cY/FlZ+tV6zmsMvlqW/Vnd9/8CAe3hZpCQX/4AAAAASUVORK5CYII="},WaYH: +/*!*********************************************************!*\ + !*** ./node_modules/rc-tree/es/TreeNode.js + 1 modules ***! + \*********************************************************/ +/*! exports provided: InternalTreeNode, default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.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-tree/es/contextTypes.js because of ./node_modules/rc-tree/es/Tree.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/util.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.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"),i=n("Ff2n"),a=n("VTBJ"),o=n("1OyB"),s=n("vuIU"),l=n("JX7q"),c=n("Ji7U"),u=n("LK+K"),d=n("q1tI"),h=n("TSYQ"),f=n.n(h),p=n("sboe"),m=n("OZM5"),g=function(e){var t=e.prefixCls,n=e.level,i=e.isStart,a=e.isEnd;if(!n)return null;for(var o="".concat(t,"-indent-unit"),s=[],l=0;l1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&A[n])return A[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),a=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=O.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),l={sizingStyle:s,paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(A[n]=l),l}var I,D=n("Gytx"),L=n.n(D);!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(I||(I={}));var R=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,e)).nextFrameActionId=void 0,a.resizeFrameId=void 0,a.textArea=void 0,a.saveTextArea=function(e){a.textArea=e},a.handleResize=function(e){var t=a.state.resizeStatus,n=a.props,r=n.autoSize,i=n.onResize;t===I.NONE&&("function"==typeof i&&i(e),r&&a.resizeOnNextFrame())},a.resizeOnNextFrame=function(){cancelAnimationFrame(a.nextFrameActionId),a.nextFrameActionId=requestAnimationFrame(a.resizeTextarea)},a.resizeTextarea=function(){var e=a.props.autoSize;if(e&&a.textArea){var t=e.minRows,n=e.maxRows,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;E||((E=document.createElement("textarea")).setAttribute("tab-index","-1"),E.setAttribute("aria-hidden","true"),document.body.appendChild(E)),e.getAttribute("wrap")?E.setAttribute("wrap",e.getAttribute("wrap")):E.removeAttribute("wrap");var i=T(e,t),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,l=i.sizingStyle;E.setAttribute("style","".concat(l,";").concat(C)),E.value=e.value||e.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,d=Number.MAX_SAFE_INTEGER,h=E.scrollHeight;if("border-box"===s?h+=o:"content-box"===s&&(h-=a),null!==n||null!==r){E.value=" ";var f=E.scrollHeight-a;null!==n&&(u=f*n,"border-box"===s&&(u=u+a+o),h=Math.max(u,h)),null!==r&&(d=f*r,"border-box"===s&&(d=d+a+o),c=h>d?"":"hidden",h=Math.min(d,h))}return{height:h,minHeight:u,maxHeight:d,overflowY:c,resize:"none"}}(a.textArea,!1,t,n);a.setState({textareaStyles:r,resizeStatus:I.RESIZING},(function(){cancelAnimationFrame(a.resizeFrameId),a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:I.RESIZED},(function(){a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:I.NONE}),a.fixFirefoxAutoScroll()}))}))}))}))}},a.renderTextArea=function(){var e=a.props,t=e.prefixCls,n=void 0===t?"rc-textarea":t,i=e.autoSize,o=e.onResize,s=e.className,d=e.disabled,h=a.state,f=h.textareaStyles,p=h.resizeStatus,m=Object(k.a)(a.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),g=S()(n,s,Object(u.a)({},"".concat(n,"-disabled"),d));"value"in m&&(m.value=m.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},a.props.style),f),p===I.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(_,{onResize:a.handleResize,disabled:!(i||o)},l.createElement("textarea",Object(r.a)({},m,{className:g,style:v,ref:a.saveTextArea})))},a.state={textareaStyles:{},resizeStatus:I.NONE},a}return Object(a.a)(n,[{key:"componentDidUpdate",value:function(e){e.value===this.props.value&&L()(e.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 e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.textArea.setSelectionRange(e,t)}}catch(e){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(l.Component),N=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;Object(i.a)(this,n),(r=t.call(this,e)).resizableTextArea=void 0,r.focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(e){r.resizableTextArea=e},r.handleChange=function(e){var t=r.props.onChange;r.setValue(e.target.value,(function(){r.resizableTextArea.resizeTextarea()})),t&&t(e)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,i=t.onKeyDown;13===e.keyCode&&n&&n(e),i&&i(e)};var a=void 0===e.value||null===e.value?e.defaultValue:e.value;return r.state={value:a},r}return Object(a.a)(n,[{key:"setValue",value:function(e,t){"value"in this.props||this.setState({value:e},t)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(R,Object(r.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value}:null}}]),n}(l.Component);t.default=N},YH21: +/*!************************************************!*\ + !*** ./node_modules/zrender/lib/core/event.js ***! + \************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../mixin/Eventful */"H6uX");t.Dispatcher=r;var i=n(/*! ./env */"ItGF"),a=n(/*! ./dom */"Ze12"),o=a.isCanvasEl,s=a.transformCoordWithViewport,l="undefined"!=typeof window&&!!window.addEventListener,c=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,u=[];function d(e,t,n,r){return n=n||{},r||!i.canvasSupported?h(e,t,n):i.browser.firefox&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):h(e,t,n),n}function h(e,t,n){if(i.domSupported&&e.getBoundingClientRect){var r=t.clientX,a=t.clientY;if(o(e)){var l=e.getBoundingClientRect();return n.zrX=r-l.left,void(n.zrY=a-l.top)}if(s(u,e,r,a))return n.zrX=u[0],void(n.zrY=u[1])}n.zrX=n.zrY=0}function f(e){return e||window.event}var p=l?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0};t.clientToLocal=d,t.getNativeEvent=f,t.normalizeEvent=function(e,t,n){if(null!=(t=f(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];i&&d(e,i,t,n)}else d(e,t,t,n),t.zrDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3;var a=t.button;return null==t.which&&void 0!==a&&c.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t},t.addEventListener=function(e,t,n,r){l?e.addEventListener(t,n,r):e.attachEvent("on"+t,n)},t.removeEventListener=function(e,t,n,r){l?e.removeEventListener(t,n,r):e.detachEvent("on"+t,n)},t.stop=p,t.isMiddleOrRightButtonOnMouseUpDown=function(e){return 2===e.which||3===e.which},t.notLeftMouse=function(e){return e.which>1}},"YJx+": +/*!*********************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/Exercise/Edit/components/editor.less?modules ***! + \*********************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___TKIS5",flex_space_between:"flex_space_between___3ITJg",flex_box_vertical_center:"flex_box_vertical_center___pGLbk",flex_box_center_end:"flex_box_center_end___3-z2A",flex_box_column:"flex_box_column___1SlIq",wrap:"wrap___2TxDh",modal:"modal___jkvmI",titleWrap:"titleWrap___386Y5",required:"required___3ddar",title:"title___2scfU",colorGray:"colorGray___10JDh",choiceWrap:"choiceWrap___3UMox",answer:"answer___1kvCr",activeAnswer:"activeAnswer___1tun2",deleteIcon:"deleteIcon___2_EJk",addIcon:"addIcon___b404_",editorWrap:"editorWrap___1qDS7",htmlWrap:"htmlWrap___2ear6",radio:"radio___3EFAB",color333:"color333___lt3ql",color999:"color999___11Mt_",questionType:"questionType___1yIj7",questionChoices:"questionChoices___1n3A7",action:"action___3PqBm",difficult:"difficult___1L4Zj",fold:"fold___3zBy6",head:"head___1dsW5"}},YgsL: +/*!*****************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/helper/smoothSpline.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../../core/vector */"QBsz").distance;function i(e,t,n,r,i,a,o){var s=.5*(n-e),l=.5*(r-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*a+s*i+t}e.exports=function(e,t){for(var n=e.length,a=[],o=0,s=1;sn-2?n-1:f+1],d=e[f>n-3?n-1:f+2]);var g=p*p,v=p*g;a.push([i(c[0],m[0],u[0],d[0],p,g,v),i(c[1],m[1],u[1],d[1],p,g,v)])}return a}},ZW9T: +/*!************************************************************!*\ + !*** ./src/components/monaco-editor/index.jsx + 1 modules ***! + \************************************************************/ +/*! exports provided: getLanguageByMirrorName, default, DiffEditor */ +/*! exports used: DiffEditor, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./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/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n("k1fw"),i=(n("miYZ"),n("tsqr")),a=n("rAM+"),o=n("tJVT"),s=n("PpiC"),l=n("q1tI"),c=n.n(l),u=n("bdgK");function d(e,t,n,i,a){var o=t.getWordUntilPosition(n),s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=i.map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Keyword,insertText:t,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}));return a.map((function(e){l.push(Object(r.a)(Object(r.a)({},e),{},{range:s}))})),l}n("LvDl");function h(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}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 m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e;if(Array.isArray(e)){for(var n=0;n0||r.target.offsetWidth>0)&&W.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(V.current),e}();return Z(!0),function(){var e=W.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),W.current.subscription&&W.current.subscription.dispose(),j&&window.removeEventListener("paste",ee),n.unobserve(V.current)}}catch(e){}}))}),[]),Object(l.useEffect)((function(){if(W.current.instance&&X)return document.addEventListener("keydown",te,!1),function(){document.removeEventListener("keydown",te)}}),[D,X]),Object(l.useEffect)((function(){var e=W.current.instance;if(e&&X){var t=m(E);g.editor.setModelLanguage(e.getModel(),t),console.log("language:",E,e.getModel(),t)}}),[E,X]),Object(l.useEffect)((function(){W.current.instance&&X&&g.editor.setTheme(T)}),[T,X]),Object(l.useEffect)((function(){var e=W.current.instance;e&&X&&(e.updateOptions(Object(r.a)({},S)),setTimeout((function(){e.getModel().updateOptions(Object(r.a)({},S))}),200))}),[JSON.stringify(S),X]),Object(l.useEffect)((function(){var e=W.current.instance;e&&X&&e.layout()}),[p,b,X]);var ie=Object(l.useState)(h(p)),ae=Object(o.a)(ie,2),oe=ae[0],se=(ae[1],Object(l.useState)(h(b))),le=Object(o.a)(se,2),ce=le[0],ue=le[1],de=Object(r.a)(Object(r.a)({},k),{},{width:oe,height:ce});return c.a.createElement("div",{className:"my-monaco-editor",ref:V,style:de})};function v(e){var t=e.width,i=void 0===t?"100%":t,s=e.height,d=void 0===s?"100%":s,f=e.original,p=e.modified,m=e.language,v=e.options,b=void 0===v?{}:v,y=Object(l.useRef)(),x=Object(l.useState)(null),E=Object(o.a)(x,2),_=E[0],k=E[1];Object(l.useEffect)((function(){y.current&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){var t=(g=e).editor.createDiffEditor(y.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},b),{},{wordWrap:!0}));k(t);var n=function(e){var t;return y.current&&(t=new u.default((function(t){var n,r=Object(a.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&e.layout()}}catch(e){r.e(e)}finally{r.f()}}))).observe(y.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),n.unobserve(y.current)}}))}),[]),Object(l.useEffect)((function(){_&&_.setModel({original:g.editor.createModel(f,m),modified:g.editor.createModel(p,m)})}),[f,p,m,_]);var w={width:h(i),height:h(d)};return c.a.createElement("div",{className:"my-diff-editor",ref:y,style:w})}},Ze12: +/*!**********************************************!*\ + !*** ./node_modules/zrender/lib/core/dom.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./env */"ItGF"),i=n(/*! ./fourPointsTransform */"hOwI").buildTransformer,a=[];function o(e,t,n,a,o){if(t.getBoundingClientRect&&r.domSupported&&!s(t)){var l=t.___zrEVENTSAVED||(t.___zrEVENTSAVED={}),c=function(e,t,n){for(var r=n?"invTrans":"trans",a=t[r],o=t.srcCoords,s=!0,l=[],c=[],u=0;u<4;u++){var d=e[u].getBoundingClientRect(),h=2*u,f=d.left,p=d.top;l.push(f,p),s=s&&o&&f===o[h]&&p===o[h+1],c.push(e[u].offsetLeft,e[u].offsetTop)}return s&&a?a:(t.srcCoords=l,t[r]=n?i(c,l):i(l,c))}(function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,c=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[l]+":0",i[c]+":0",r[1-l]+":auto",i[1-c]+":auto",""].join("!important;"),e.appendChild(o),n.push(o)}return n}(t,l),l,o);if(c)return c(e,n,a),!0}return!1}function s(e){return"CANVAS"===e.nodeName.toUpperCase()}t.transformLocalCoord=function(e,t,n,r,i){return o(a,t,r,i,!0)&&o(e,n,a[0],a[1])},t.transformCoordWithViewport=o,t.isCanvasEl=s},ZpRC: +/*!*************************************************************************!*\ + !*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***! + \*************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function i(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function a(e,t){if(e.clientHeightt||a>e&&o=t&&s>=n?a-e-r:o>t&&sn?o-t+i:0}var s=function(e,t){var n=window,i=t.scrollMode,s=t.block,l=t.inline,c=t.boundary,u=t.skipOverflowHiddenElements,d="function"==typeof c?c:function(e){return e!==c};if(!r(e))throw new TypeError("Invalid target");for(var h=document.scrollingElement||document.documentElement,f=[],p=e;r(p)&&d(p);){if((p=p.parentElement)===h){f.push(p);break}null!=p&&p===document.body&&a(p)&&!a(document.documentElement)||null!=p&&a(p,u)&&f.push(p)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),x=y.height,E=y.width,_=y.top,k=y.right,w=y.bottom,S=y.left,C="start"===s||"nearest"===s?_:"end"===s?w:_+x/2,O="center"===l?S+E/2:"end"===l?k:S,A=[],T=0;T=0&&S>=0&&w<=g&&k<=m&&_>=N&&w<=M&&S>=P&&k<=j)return A;var B=getComputedStyle(I),F=parseInt(B.borderLeftWidth,10),U=parseInt(B.borderTopWidth,10),H=parseInt(B.borderRightWidth,10),G=parseInt(B.borderBottomWidth,10),z=0,V=0,W="offsetWidth"in I?I.offsetWidth-I.clientWidth-F-H:0,K="offsetHeight"in I?I.offsetHeight-I.clientHeight-U-G:0;if(h===I)z="start"===s?C:"end"===s?C-g:"nearest"===s?o(b,b+g,g,U,G,b+C,b+C+x,x):C-g/2,V="start"===l?O:"center"===l?O-m/2:"end"===l?O-m:o(v,v+m,m,F,H,v+O,v+O+E,E),z=Math.max(0,z+b),V=Math.max(0,V+v);else{z="start"===s?C-N-U:"end"===s?C-M+G+K:"nearest"===s?o(N,M,L,U,G+K,C,C+x,x):C-(N+L/2)+K/2,V="start"===l?O-P-F:"center"===l?O-(P+R/2)+W/2:"end"===l?O-j+H+W:o(P,j,R,F,H+W,O,O+E,E);var q=I.scrollLeft,Y=I.scrollTop;C+=Y-(z=Math.max(0,Math.min(Y+z,I.scrollHeight-L+K))),O+=q-(V=Math.max(0,Math.min(q+V,I.scrollWidth-R+W)))}A.push({el:I,top:z,left:V})}return A};function l(e){return e===Object(e)&&0!==Object.keys(e).length}t.a=function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(l(t)&&"function"==typeof t.behavior)return t.behavior(n?[]:s(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:l(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,i=e.top,a=e.left;r.scroll&&n?r.scroll({top:i,left:a,behavior:t}):(r.scrollTop=i,r.scrollLeft=a)}))}(s(e,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(e,t,n){var r;!function(i){var a=/^\s+/,o=/\s+$/,s=0,l=i.round,c=i.min,u=i.max,d=i.random;function h(e,t){if(t=t||{},(e=e||"")instanceof h)return e;if(!(this instanceof h))return new h(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,l=null,d=!1,h=!1;"string"==typeof e&&(e=function(e){e=e.replace(a,"").replace(o,"").toLowerCase();var t,n=!1;if(I[e])e=I[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=z.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=z.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=z.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=z.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=z.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=z.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=z.hex8.exec(e))return{r:j(t[1]),g:j(t[2]),b:j(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=z.hex6.exec(e))return{r:j(t[1]),g:j(t[2]),b:j(t[3]),format:n?"name":"hex"};if(t=z.hex4.exec(e))return{r:j(t[1]+""+t[1]),g:j(t[2]+""+t[2]),b:j(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=z.hex3.exec(e))return{r:j(t[1]+""+t[1]),g:j(t[2]+""+t[2]),b:j(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(V(e.r)&&V(e.g)&&V(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*R(f,255),g:255*R(p,255),b:255*R(m,255)},d=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):V(e.h)&&V(e.s)&&V(e.v)?(r=P(e.s),s=P(e.v),t=function(e,t,n){e=6*R(e,360),t=R(t,100),n=R(n,100);var r=i.floor(e),a=e-r,o=n*(1-t),s=n*(1-a*t),l=n*(1-(1-a)*t),c=r%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(e.h,r,s),d=!0,h="hsv"):V(e.h)&&V(e.s)&&V(e.l)&&(r=P(e.s),l=P(e.l),t=function(e,t,n){var r,i,a;function o(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=R(e,360),t=R(t,100),n=R(n,100),0===t)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=o(l,s,e+1/3),i=o(l,s,e),a=o(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*a}}(e.h,r,l),d=!0,h="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=L(n),{ok:d,format:e.format||h,r:c(255,u(t.r,0)),g:c(255,u(t.g,0)),b:c(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.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=n.ok,this._tc_id=s++}function f(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var r,i,a=u(e,t,n),o=c(e,t,n),s=(a+o)/2;if(a==o)r=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case e:r=(t-n)/l+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(h(r));return a}function T(e,t){t=t||6;for(var n=h(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(h({h:r,s:i,v:a})),a=(a+s)%1;return o}h.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 e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=L(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var a=[M(l(e).toString(16)),M(l(t).toString(16)),M(l(n).toString(16)),M(B(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},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*R(this._r,255))+"%",g:l(100*R(this._g,255))+"%",b:l(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*R(this._r,255))+"%, "+l(100*R(this._g,255))+"%, "+l(100*R(this._b,255))+"%)":"rgba("+l(100*R(this._r,255))+"%, "+l(100*R(this._g,255))+"%, "+l(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(D[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=h(e);n="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(k,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},h.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:P(e[r]));e=n}return h(e,t)},h.equals=function(e,t){return!(!e||!t)&&h(e).toRgbString()==h(t).toRgbString()},h.random=function(){return h.fromRatio({r:d(),g:d(),b:d()})},h.mix=function(e,t,n){n=0===n?0:n||50;var r=h(e).toRgb(),i=h(t).toRgb(),a=n/100;return h({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},h.readability=function(e,t){var n=h(e),r=h(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},h.isReadable=function(e,t,n){var r,i,a=h.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},h.mostReadable=function(e,t,n){var r,i,a,o,s=null,l=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var c=0;cl&&(l=r,s=h(t[c]));return h.isReadable(e,s,{level:a,size:o})||!i?s:(n.includeFallbackColors=!1,h.mostReadable(e,["#fff","#000"],n))};var I=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D=h.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(I);function L(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function R(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function N(e){return c(1,u(0,e))}function j(e){return parseInt(e,16)}function M(e){return 1==e.length?"0"+e:""+e}function P(e){return e<=1&&(e=100*e+"%"),e}function B(e){return i.round(255*parseFloat(e)).toString(16)}function F(e){return j(e)/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 V(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=h:void 0===(r=function(){return h}.call(t,n,t,e))||(e.exports=r)}(Math)},aKvl: +/*!*******************************************************!*\ + !*** ./node_modules/zrender/lib/contain/quadratic.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/curve */"Sj9i").quadraticProjectPoint;t.containStroke=function(e,t,n,i,a,o,s,l,c){if(0===s)return!1;var u=s;return!(c>t+u&&c>i+u&&c>o+u||ce+u&&l>n+u&&l>a+u||l1?s-1:0),c=1;c1?n-1:0),a=1;a=0)return parseInt(t.slice(t.indexOf("e-")+2),10);var n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n},r.getInputDisplayValue=function(e){var t,n=e||r.state,i=n.focused,a=n.inputValue,o=n.value;null==(t=i?a:r.toPrecisionAsStep(o))&&(t="");var s=r.formatWrapper(t);return E(r.props.decimalSeparator)&&(s=s.toString().replace(".",r.props.decimalSeparator)),s},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(e){}},r.restoreByAfter=function(e){if(void 0===e)return!1;var t=r.input.value,n=t.lastIndexOf(e);if(-1===n)return!1;var i=r.cursorBefore.length;return r.lastKeyCode===p.a.DELETE&&r.cursorBefore.charAt(i-1)===e[0]?(r.fixCaret(i,i),!0):n+e.length===t.length&&(r.fixCaret(n,n),!0)},r.partRestoreByAfter=function(e){return void 0!==e&&Array.prototype.some.call(e,(function(t,n){var i=e.substring(n);return r.restoreByAfter(i)}))},r.isNotCompleteNumber=function(e){return isNaN(e)||""===e||null===e||e&&e.toString().indexOf(".")===e.toString().length-1},r.stop=function(){r.autoStepTimer&&clearTimeout(r.autoStepTimer)},r.down=function(e,t,n){r.pressingUpOrDown=!0,r.step("down",e,t,n)},r.up=function(e,t,n){r.pressingUpOrDown=!0,r.step("up",e,t,n)},r.saveInput=function(e){r.input=e};var i=e.value;void 0===i&&(i=e.defaultValue),r.state={focused:e.autoFocus};var o=r.getValidValue(r.toNumber(i));return r.state=g(g({},r.state),{},{inputValue:r.toPrecisionAsStep(o),value:o}),r}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.value,r=t.onChange,i=t.max,a=t.min,o=this.state.focused;if(e){if(!_(e.value,n)||!_(e.max,i)||!_(e.min,a)){var s,l=o?n:this.getValidValue(n);s=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:s})}var c="value"in this.props?n:this.state.value;"max"in this.props&&e.max!==i&&"number"==typeof c&&c>i&&r&&r(i),"min"in this.props&&e.min!==a&&"number"==typeof c&&c1&&void 0!==arguments[1]?arguments[1]:this.props.min,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,r=parseFloat(e);return isNaN(r)?e:(rn&&(r=n),r)}},{key:"setValue",value:function(e,t){var n=this.props.precision,r=this.isNotCompleteNumber(parseFloat(e))?null:parseFloat(e),i=this.state.value,a=void 0===i?null:i,o=this.state.inputValue,s=void 0===o?null:o,l="number"==typeof r?r.toFixed(n):"".concat(r),c=r!==a||l!=="".concat(s);return"value"in this.props?(s=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:s},t)):this.setState({value:r,inputValue:this.toPrecisionAsStep(e)},t),c&&this.props.onChange(r),r}},{key:"getMaxPrecision",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.props,r=n.precision,i=n.step;if(E(r))return r;var a=this.getPrecision(t),o=this.getPrecision(i),s=this.getPrecision(e);return e?Math.max(s,a+o):a+o}},{key:"getPrecisionFactor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getMaxPrecision(e,t);return Math.pow(10,n)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(e){return this.props.formatter?this.props.formatter(e):e}},{key:"toPrecisionAsStep",value:function(e){if(this.isNotCompleteNumber(e)||""===e)return e;var t=Math.abs(this.getMaxPrecision(e));return isNaN(t)?e.toString():Number(e).toFixed(t)}},{key:"toNumber",value:function(e){var t=this.props.precision,n=this.state.focused,r=e&&e.length>16&&n;return this.isNotCompleteNumber(e)||r?e:E(t)?Math.round(e*Math.pow(10,t))/Math.pow(10,t):Number(e)}},{key:"upStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),a=((r*e+r*n*t)/r).toFixed(i);return this.toNumber(a)}},{key:"downStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),a=((r*e-r*n*t)/r).toFixed(i);return this.toNumber(a)}},{key:"step",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0;this.stop(),t&&(t.persist(),t.preventDefault());var a=this.props;if(!a.disabled){var o=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(o)){var s=this["".concat(e,"Step")](o,r),l=s>a.max||sa.max?s=a.max:s=p)||a||o,q=(U||0===U)&&(isNaN(U)||Number(U)<=m)||a||o,Y=f()("".concat(n,"-handler"),"".concat(n,"-handler-up"),Object(i.a)({},"".concat(n,"-handler-up-disabled"),K)),Q=f()("".concat(n,"-handler"),"".concat(n,"-handler-down"),Object(i.a)({},"".concat(n,"-handler-down-disabled"),q)),J=s?{onTouchStart:K?b:this.up,onTouchEnd:this.stop}:{onMouseDown:K?b:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},X=s?{onTouchStart:q?b:this.down,onTouchEnd:this.stop}:{onMouseDown:q?b:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return d.a.createElement("div",{className:G,style:g,title:v,onMouseEnter:x,onMouseLeave:E,onMouseOver:_,onMouseOut:k,onFocus:function(){return null},onBlur:function(){return null}},d.a.createElement("div",{className:"".concat(n,"-handler-wrap")},d.a.createElement("span",Object.assign({unselectable:"on"},J,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:Y}),c||d.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner"),onClick:y})),d.a.createElement("span",Object.assign({unselectable:"on"},X,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:Q}),u||d.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner"),onClick:y}))),d.a.createElement("div",{className:"".concat(n,"-input-wrap")},d.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":m,"aria-valuemax":p,"aria-valuenow":U,required:w,type:O,placeholder:A,onPaste:M,onClick:S,onMouseUp:this.onMouseUp,className:"".concat(n,"-input"),tabIndex:C,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:V?this.onKeyDown:b,onKeyUp:V?this.onKeyUp:b,autoFocus:N,maxLength:R,readOnly:o,disabled:a,max:p,min:m,step:L,name:j,title:v,id:T,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(W),pattern:D,inputMode:I,onInput:P},z))))}}]),n}(d.a.Component);k.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:b,onKeyDown:b,onPressEnter:b,onFocus:b,onBlur:b,parser:function(e){return e.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var w=k;t.a=w},dqUG: +/*!**************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Text.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Displayable */"Gev7"),i=n(/*! ../core/util */"bYtY"),a=n(/*! ../contain/text */"6GrX"),o=n(/*! ./helper/text */"pzxd"),s=n(/*! ./constant */"gut8").ContextCachedBy,l=function(e){r.call(this,e)};l.prototype={constructor:l,type:"text",brush:function(e,t){var n=this.style;this.__dirty&&o.normalizeTextStyle(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var r=n.text;null!=r&&(r+=""),o.needDrawText(r,n)?(this.setTransform(e),o.renderText(this,e,r,n,null,t),this.restoreTransform(e)):e.__attrCachedBy=s.NONE},getBoundingRect:function(){var e=this.style;if(this.__dirty&&o.normalizeTextStyle(e,!0),!this._rect){var t=e.text;null!=t?t+="":t="";var n=a.getBoundingRect(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich);if(n.x+=e.x||0,n.y+=e.y||0,o.getStroke(e.textStroke,e.textStrokeWidth)){var r=e.textStrokeWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect}},i.inherits(l,r);var c=l;e.exports=c},fW2E: +/*!**************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/helper/fixShadow.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};e.exports=function(e,t,r){return n.hasOwnProperty(t)?r*e.dpr:r}},fyJ8: +/*!************************************************!*\ + !*** ./node_modules/rc-table/es/Cell/index.js ***! + \************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),s=n(/*! react */"q1tI"),l=n(/*! classnames */"TSYQ"),c=n.n(l),u=n(/*! rc-util/es/ref */"c+Xe"),d=n(/*! ../utils/valueUtil */"sR1s");var h=s.forwardRef((function(e,t){var n,l,h,f=e.prefixCls,p=e.className,m=e.record,g=e.index,v=e.dataIndex,b=e.render,y=e.children,x=e.component,E=void 0===x?"td":x,_=e.colSpan,k=e.rowSpan,w=e.fixLeft,S=e.fixRight,C=e.firstFixLeft,O=e.lastFixLeft,A=e.firstFixRight,T=e.lastFixRight,I=e.appendNode,D=e.additionalProps,L=void 0===D?{}:D,R=e.ellipsis,N=e.align,j=e.rowType,M=e.isSticky,P="".concat(f,"-cell");if(y)h=y;else{var B=Object(d.b)(m,v);if(h=B,b){var F=b(B,m,g);!function(e){return e&&"object"===Object(o.a)(e)&&!Array.isArray(e)&&!s.isValidElement(e)}(F)?h=F:(h=F.children,l=F.props)}}"object"!==Object(o.a)(h)||Array.isArray(h)||s.isValidElement(h)||(h=null),R&&(O||A)&&(h=s.createElement("span",{className:"".concat(P,"-content")},h));var U=l||{},H=U.colSpan,G=U.rowSpan,z=U.style,V=U.className,W=Object(a.a)(U,["colSpan","rowSpan","style","className"]),K=void 0!==H?H:_,q=void 0!==G?G:k;if(0===K||0===q)return null;var Y={},Q="number"==typeof w,J="number"==typeof S;Q&&(Y.position="sticky",Y.left=w),J&&(Y.position="sticky",Y.right=S);var X,Z={};N&&(Z.textAlign=N);var $=!0===R?{showTitle:!0}:R;$&&($.showTitle||"header"===j)&&("string"==typeof h||"number"==typeof h?X=h.toString():s.isValidElement(h)&&"string"==typeof h.props.children&&(X=h.props.children));var ee,te=Object(i.a)(Object(i.a)(Object(i.a)({title:X},W),L),{},{colSpan:K&&1!==K?K:null,rowSpan:q&&1!==q?q:null,className:c()(P,p,(n={},Object(r.a)(n,"".concat(P,"-fix-left"),Q),Object(r.a)(n,"".concat(P,"-fix-left-first"),C),Object(r.a)(n,"".concat(P,"-fix-left-last"),O),Object(r.a)(n,"".concat(P,"-fix-right"),J),Object(r.a)(n,"".concat(P,"-fix-right-first"),A),Object(r.a)(n,"".concat(P,"-fix-right-last"),T),Object(r.a)(n,"".concat(P,"-ellipsis"),R),Object(r.a)(n,"".concat(P,"-with-append"),I),Object(r.a)(n,"".concat(P,"-fix-sticky"),(Q||J)&&M),n),L.className,V),style:Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},L.style),Z),Y),z),ref:(ee=E,"string"==typeof ee||Object(u.c)(ee)?t:null)});return s.createElement(E,Object.assign({},te),I,h)}));h.displayName="Cell";var f=s.memo(h,(function(e,t){return!!t.shouldCellUpdate&&!t.shouldCellUpdate(t.record,e.record)}));t.a=f},gut8: +/*!******************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/constant.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){t.ContextCachedBy={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},t.WILL_BE_RESTORED=9},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(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n("q1tI"),i=n.n(r),a=n("TSYQ"),o=n.n(a),s={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},l=function(e){var t=e.map((function(){return Object(r.useRef)()})),n=Object(r.useRef)();return Object(r.useEffect)((function(){var e=Date.now(),r=!1;Object.keys(t).forEach((function(i){var a=t[i].current;if(a){r=!0;var o=a.style;o.transitionDuration=".3s, .3s, .3s, .06s",n.current&&e-n.current<100&&(o.transitionDuration="0s, 0s")}})),r&&(n.current=Date.now())})),[t]};function c(){return(c=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var f=function(e){var t=e.className,n=e.percent,r=e.prefixCls,a=e.strokeColor,s=e.strokeLinecap,d=e.strokeWidth,f=e.style,p=e.trailColor,m=e.trailWidth,g=e.transition,v=h(e,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete v.gapPosition;var b=Array.isArray(n)?n:[n],y=Array.isArray(a)?a:[a],x=u(l(b),1)[0],E=d/2,_=100-d/2,k="M ".concat("round"===s?E:0,",").concat(E,"\n L ").concat("round"===s?_:100,",").concat(E),w="0 0 100 ".concat(d),S=0;return i.a.createElement("svg",c({className:o()("".concat(r,"-line"),t),viewBox:w,preserveAspectRatio:"none",style:f},v),i.a.createElement("path",{className:"".concat(r,"-line-trail"),d:k,strokeLinecap:s,stroke:p,strokeWidth:m||d,fillOpacity:"0"}),b.map((function(e,t){var n={strokeDasharray:"".concat(e,"px, 100px"),strokeDashoffset:"-".concat(S,"px"),transition:g||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},a=y[t]||y[y.length-1];return S+=e,i.a.createElement("path",{key:t,className:"".concat(r,"-line-path"),d:k,strokeLinecap:s,stroke:a,strokeWidth:d,fillOpacity:"0",ref:x[t],style:n})})))};f.defaultProps=s;function p(){return(p=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var b=0;function y(e){return+e.replace("%","")}function x(e){return Array.isArray(e)?e:[e]}function E(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,o=50-r/2,s=0,l=-o,c=0,u=-2*o;switch(a){case"left":s=-o,l=0,c=2*o,u=0;break;case"right":s=o,l=0,c=-2*o,u=0;break;case"bottom":l=o,u=2*o}var d="M 50,50 m ".concat(s,",").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),h=2*Math.PI*o,f={stroke:n,strokeDasharray:"".concat(t/100*(h-i),"px ").concat(h,"px"),strokeDashoffset:"-".concat(i/2+e/100*(h-i),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:d,pathStyle:f}}var _=function(e){var t,n=e.prefixCls,a=e.strokeWidth,s=e.trailWidth,c=e.gapDegree,u=e.gapPosition,d=e.trailColor,h=e.strokeLinecap,f=e.style,g=e.className,_=e.strokeColor,k=e.percent,w=v(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),S=Object(r.useMemo)((function(){return b+=1}),[]),C=E(0,100,d,a,c,u),O=C.pathString,A=C.pathStyle,T=x(k),I=x(_),D=I.find((function(e){return"[object Object]"===Object.prototype.toString.call(e)})),L=m(l(T),1)[0];return i.a.createElement("svg",p({className:o()("".concat(n,"-circle"),g),viewBox:"0 0 100 100",style:f},w),D&&i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"".concat(n,"-gradient-").concat(S),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(D).sort((function(e,t){return y(e)-y(t)})).map((function(e,t){return i.a.createElement("stop",{key:t,offset:e,stopColor:D[e]})})))),i.a.createElement("path",{className:"".concat(n,"-circle-trail"),d:O,stroke:d,strokeLinecap:h,strokeWidth:s||a,fillOpacity:"0",style:A}),(t=0,T.map((function(e,r){var o=I[r]||I[I.length-1],s="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(n,"-gradient-").concat(S,")"):"",l=E(t,e,o,a,c,u);return t+=e,i.a.createElement("path",{key:r,className:"".concat(n,"-circle-path"),d:l.pathString,stroke:s,strokeLinecap:h,strokeWidth:a,opacity:0===e?0:1,fillOpacity:"0",style:l.pathStyle,ref:L[r]})}))).reverse())};_.defaultProps=s;var k=_},h7HQ: +/*!***********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/Polygon.js ***! + \***********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../helper/poly */"T6xi"),a=r.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(e,t){i.buildPath(e,t,!0)}});e.exports=a},hOwI: +/*!**************************************************************!*\ + !*** ./node_modules/zrender/lib/core/fourPointsTransform.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=Math.log(2);function r(e,t,i,a,o,s){var l=a+"-"+o,c=e.length;if(s.hasOwnProperty(l))return s[l];if(1===t){var u=Math.round(Math.log((1<t&&a>r||ai?o:0}},i58Z: +/*!*****************************************************!*\ + !*** ./src/components/Knowledge/index.less?modules ***! + \*****************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={wrap:"wrap___Yg2Z9",addKnowledge:"addKnowledge___2FlI0",disabled:"disabled___1_wxN"}},iXp4: +/*!**********************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/helper/fixClipWithShadow.js ***! + \**********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../../core/env */"ItGF"),i=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];e.exports=function(e){return r.browser.ie&&r.browser.version>=11?function(){var t,n=this.__clipPaths,r=this.style;if(n)for(var a=0;a0&&d.a.createElement("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"}},d.a.createElement("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0}},S.map((function(e,t){return d.a.createElement(r.a,{justify:"space-between",style:{marginTop:"10px"},key:e.course_group_id},d.a.createElement("div",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:"5px",marginLeft:"5px",width:"75%"}},e.name),d.a.createElement("img",{src:m.a,style:{cursor:"pointer",height:"16px",marginRight:17},onClick:function(){n(E.filter((function(t){return"".concat(t.course_group_name)!="".concat(e.course_group_name)})))}}))}))))))}},juDX: +/*!*********************************************!*\ + !*** ./node_modules/zrender/lib/svg/svg.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ./graphic */"P47w"),(0,n(/*! ../zrender */"aX58").registerPainter)("svg",n(/*! ./Painter */"3CBa"))},k3GJ: +/*!*******************************************************!*\ + !*** ./node_modules/rc-tabs/es/index.js + 50 modules ***! + \*******************************************************/ +/*! exports provided: TabPane, default */ +/*! exports used: TabPane, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.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/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-align/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-dropdown/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.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/canUseDom.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Portal.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/raf.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.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/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return Wt}));var r=n("rePB"),i=n("ODXe"),a=n("Ff2n"),o=n("VTBJ"),s=n("q1tI"),l=n("TSYQ"),c=n.n(l),u=n("Zm9Q"),d=n("6cGi"),h=n("KQm4"),f=n("xEkU"),p=n.n(f),m=n("t23M");function g(e){var t=Object(s.useRef)(),n=Object(s.useRef)(!1);return Object(s.useEffect)((function(){return function(){n.current=!0,p.a.cancel(t.current)}}),[]),function(){for(var r=arguments.length,i=new Array(r),a=0;a1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),i=r.marginLeft,a=r.marginRight;n+=+i.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},ne=function(e,t,n){e&&"object"===Object(L.a)(e.style)&&(e.style[t]=n)},re=n("bdgK"),ie=n("i8i4"),ae=n.n(ie),oe=n("wgJM"),se=n("l4aY"),le=n("m+aA"),ce=n("c+Xe"),ue=n("zT1h"),de=n("QC+M");function he(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var fe=n("MNnm");function pe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var me,ge,ve,be=(me=Object(fe.a)(),ge="undefined"!=typeof window?window:{},ve={animationend:pe("Animation","AnimationEnd"),transitionend:pe("Transition","TransitionEnd")},me&&("AnimationEvent"in ge||delete ve.animationend.animation,"TransitionEvent"in ge||delete ve.transitionend.transition),ve),ye={};if(Object(fe.a)()){var xe=document.createElement("div");ye=xe.style}var Ee={};function _e(e){if(Ee[e])return Ee[e];var t=be[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i1&&void 0!==arguments[1]?arguments[1]:2;t();var a=Object(oe.a)((function(){i<=1?r({isCanceled:function(){return a!==e.current}}):n(r,i-1)}));e.current=a},t]}(),c=Object(i.a)(l,2),u=c[0],d=c[1];return Ie((function(){if("none"!==a&&"end"!==a){var e=De.indexOf(a),n=De[e+1],r=t(a);!1===r?o(n):u((function(e){function t(){e.isCanceled()||o(n)}!0===r?t():Promise.resolve(r).then(t)}))}}),[e,a]),s.useEffect((function(){return function(){d()}}),[]),[function(){o("prepare")},a]};function Ne(e,t,n,a){var l=a.motionEnter,c=void 0===l||l,u=a.motionAppear,d=void 0===u||u,h=a.motionLeave,f=void 0===h||h,p=a.motionDeadline,m=a.motionLeaveImmediately,g=a.onAppearPrepare,v=a.onEnterPrepare,b=a.onLeavePrepare,y=a.onAppearStart,x=a.onEnterStart,E=a.onLeaveStart,_=a.onAppearActive,k=a.onEnterActive,w=a.onLeaveActive,S=a.onAppearEnd,C=a.onEnterEnd,O=a.onLeaveEnd,A=a.onVisibleChanged,T=Te(),I=Object(i.a)(T,2),D=I[0],L=I[1],R=Te("none"),N=Object(i.a)(R,2),j=N[0],M=N[1],P=Te(null),B=Object(i.a)(P,2),F=B[0],U=B[1],H=Object(s.useRef)(!1),G=Object(s.useRef)(null),z=Object(s.useRef)(!1),V=Object(s.useRef)(null);function W(){return n()||V.current}var K=Object(s.useRef)(!1);function q(e){var t,n=W();e&&!e.deadline&&e.target!==n||("appear"===j&&K.current?t=null==S?void 0:S(n,e):"enter"===j&&K.current?t=null==C?void 0:C(n,e):"leave"===j&&K.current&&(t=null==O?void 0:O(n,e)),!1===t||z.current||(M("none"),U(null)))}var Y=function(e){var t=Object(s.useRef)(),n=Object(s.useRef)(e);n.current=e;var r=s.useCallback((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(Oe,r),e.removeEventListener(Ce,r))}return s.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(Oe,r),e.addEventListener(Ce,r),t.current=e)},i]}(q),Q=Object(i.a)(Y,1)[0],J=s.useMemo((function(){var e,t,n;switch(j){case"appear":return e={},Object(r.a)(e,"prepare",g),Object(r.a)(e,"start",y),Object(r.a)(e,"active",_),e;case"enter":return t={},Object(r.a)(t,"prepare",v),Object(r.a)(t,"start",x),Object(r.a)(t,"active",k),t;case"leave":return n={},Object(r.a)(n,"prepare",b),Object(r.a)(n,"start",E),Object(r.a)(n,"active",w),n;default:return{}}}),[j]),X=Re(j,(function(e){if("prepare"===e){var t=J.prepare;return!!t&&t(W())}var n;ee in J&&U((null===(n=J[ee])||void 0===n?void 0:n.call(J,W(),null))||null);return"active"===ee&&(Q(W()),p>0&&(clearTimeout(G.current),G.current=setTimeout((function(){q({deadline:!0})}),p))),!0})),Z=Object(i.a)(X,2),$=Z[0],ee=Z[1],te=Le(ee);K.current=te,Ie((function(){L(t);var n,r=H.current;(H.current=!0,e)&&(!r&&t&&d&&(n="appear"),r&&t&&c&&(n="enter"),(r&&!t&&f||!r&&m&&!t&&f)&&(n="leave"),n&&(M(n),$()))}),[t]),Object(s.useEffect)((function(){("appear"===j&&!d||"enter"===j&&!c||"leave"===j&&!f)&&M("none")}),[d,c,f]),Object(s.useEffect)((function(){return function(){clearTimeout(G.current),z.current=!0}}),[]),Object(s.useEffect)((function(){void 0!==D&&"none"===j&&(null==A||A(D))}),[D,j]);var ne=F;return J.prepare&&"start"===ee&&(ne=Object(o.a)({transition:"none"},ne)),[j,ee,ne,null!=D?D:t]}var je=function(e){Object(S.a)(n,e);var t=Object(C.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(k.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(s.Component);var Me=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===Object(L.a)(e)&&(t=e.transitionSupport);var a=s.forwardRef((function(e,t){var a=e.visible,l=void 0===a||a,u=e.removeOnLeave,d=void 0===u||u,h=e.forceRender,f=e.children,p=e.motionName,m=e.leavedClassName,g=e.eventProps,v=n(e),b=Object(s.useRef)(),y=Object(s.useRef)();var x=Ne(v,l,(function(){try{return Object(le.a)(b.current||y.current)}catch(e){return null}}),e),E=Object(i.a)(x,4),_=E[0],k=E[1],w=E[2],S=E[3],C=s.useRef(S);S&&(C.current=!0);var O=Object(s.useRef)(t);O.current=t;var A,T=s.useCallback((function(e){b.current=e,Object(ce.b)(O.current,e)}),[]),I=Object(o.a)(Object(o.a)({},g),{},{visible:l});if(f)if("none"!==_&&n(e)){var D,L;"prepare"===k?L="prepare":Le(k)?L="active":"start"===k&&(L="start"),A=f(Object(o.a)(Object(o.a)({},I),{},{className:c()(Ae(p,_),(D={},Object(r.a)(D,Ae(p,"".concat(_,"-").concat(L)),L),Object(r.a)(D,p,"string"==typeof p),D)),style:w}),T)}else A=S?f(Object(o.a)({},I),T):!d&&C.current?f(Object(o.a)(Object(o.a)({},I),{},{className:m}),T):h?f(Object(o.a)(Object(o.a)({},I),{},{style:{display:"none"}}),T):null;else A=null;return s.createElement(je,{ref:y},A)}));return a.displayName="CSSMotion",a}(Se);function Pe(e){var t;return t=e&&"object"===Object(L.a)(e)&&"key"in e?e:{key:e},Object(o.a)(Object(o.a)({},t),{},{key:String(t.key)})}function Be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Pe)}function Fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,a=Be(e),s=Be(t);a.forEach((function(e){for(var t=!1,a=r;a1}));return c.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 Ue=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Me,n=function(e){Object(S.a)(r,e);var n=Object(C.a)(r);function r(){var e;return Object(_.a)(this,r),(e=n.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(o.a)(Object(o.a)({},e),{},{status:"removed"})}))}}))},e}return Object(k.a)(r,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,r=this.props,i=r.component,o=r.children,l=r.onVisibleChanged,c=Object(a.a)(r,["component","children","onVisibleChanged"]),u=i||s.Fragment,d={};return Ue.forEach((function(e){d[e]=c[e],delete c[e]})),delete c.keys,s.createElement(u,c,n.map((function(n){var r=n.status,i=Object(a.a)(n,["status"]),c="add"===r||"keep"===r;return s.createElement(t,Object(E.a)({},d,{key:i.key,visible:c,eventProps:i,onVisibleChanged:function(t){null==l||l(t,{key:i.key}),t||e.removeKey(i.key)}}),o)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,i=Be(n);return{keyEntities:Fe(r,i).filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||"removed"!==t.status||"remove"!==e.status}))}}}]),r}(s.Component);n.defaultProps={component:"div"}}(Se);var He=Me;function Ge(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function ze(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,i=e.mask,a=e.maskMotion,l=e.maskAnimation,u=e.maskTransitionName;if(!i)return null;var d={};return(a||u||l)&&(d=Object(o.a)({motionAppear:!0},Ge({motion:a,prefixCls:t,transitionName:u,animation:l}))),s.createElement(He,Object(E.a)({},d,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return s.createElement("div",{style:{zIndex:r},className:c()("".concat(t,"-mask"),n)})}))}var Ve=n("9mu1"),We=n("o0o1"),Ke=n.n(We),qe=n("HaE+"),Ye=["measure","align",null,"motion"],Qe=s.forwardRef((function(e,t){var n=e.visible,r=e.prefixCls,a=e.className,l=e.style,u=e.children,d=e.zIndex,h=e.stretch,f=e.destroyPopupOnHide,p=e.forceRender,m=e.align,g=e.point,v=e.getRootDomNode,b=e.getClassNameFromAlign,y=e.onAlign,x=e.onMouseEnter,_=e.onMouseLeave,k=e.onMouseDown,w=e.onTouchStart,S=Object(s.useRef)(),C=Object(s.useRef)(),O=Object(s.useState)(),A=Object(i.a)(O,2),T=A[0],I=A[1],D=function(e){var t=s.useState({width:0,height:0}),n=Object(i.a)(t,2),r=n[0],a=n[1];return[s.useMemo((function(){var t={};if(e){var n=r.width,i=r.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,r]),function(e){a({width:e.offsetWidth,height:e.offsetHeight})}]}(h),L=Object(i.a)(D,2),R=L[0],N=L[1];var j=function(e,t){var n=Object(s.useState)(null),r=Object(i.a)(n,2),a=r[0],o=r[1],l=Object(s.useRef)(),c=Object(s.useRef)(!1);function u(e){c.current||o(e)}function d(){oe.a.cancel(l.current)}return Object(s.useEffect)((function(){u("measure")}),[e]),Object(s.useEffect)((function(){switch(a){case"measure":t()}a&&(l.current=Object(oe.a)(Object(qe.a)(Ke.a.mark((function e(){var t,n;return Ke.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ye.indexOf(a),(n=Ye[t+1])&&-1!==t&&u(n);case 3:case"end":return e.stop()}}),e)})))))}),[a]),Object(s.useEffect)((function(){return function(){c.current=!0,d()}}),[]),[a,function(e){d(),l.current=Object(oe.a)((function(){u((function(e){switch(a){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){h&&N(v())})),M=Object(i.a)(j,2),P=M[0],B=M[1],F=Object(s.useRef)();function U(){var e;null===(e=S.current)||void 0===e||e.forceAlign()}function H(e,t){var n=b(t);T!==n&&I(n),"align"===P&&(T!==n?Promise.resolve().then((function(){U()})):B((function(){var e;null===(e=F.current)||void 0===e||e.call(F)})),null==y||y(e,t))}var G=Object(o.a)({},Ge(e));function z(){return new Promise((function(e){F.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=G[e];G[e]=function(e,n){return B(),null==t?void 0:t(e,n)}})),s.useEffect((function(){G.motionName||"motion"!==P||B()}),[G.motionName,P]),s.useImperativeHandle(t,(function(){return{forceAlign:U,getElement:function(){return C.current}}}));var V=Object(o.a)(Object(o.a)({},R),{},{zIndex:d,opacity:"motion"!==P&&"stable"!==P&&n?0:void 0,pointerEvents:"stable"===P?void 0:"none"},l),W=!0;!(null==m?void 0:m.points)||"align"!==P&&"stable"!==P||(W=!1);var K=u;return s.Children.count(u)>1&&(K=s.createElement("div",{className:"".concat(r,"-content")},u)),s.createElement(He,Object(E.a)({visible:n,ref:C,leavedClassName:"".concat(r,"-hidden")},G,{onAppearPrepare:z,onEnterPrepare:z,removeOnLeave:f,forceRender:p}),(function(e,t){var n=e.className,i=e.style,l=c()(r,a,T,n);return s.createElement(Ve.a,{target:g||v,key:"popup",ref:S,monitorWindowResize:!0,disabled:W,align:m,onAlign:H},s.createElement("div",{ref:t,className:l,onMouseEnter:x,onMouseLeave:_,onMouseDownCapture:k,onTouchStartCapture:w,style:Object(o.a)(Object(o.a)({},i),V)},K))}))}));Qe.displayName="PopupInner";var Je=Qe,Xe=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.visible,i=e.zIndex,a=e.children,l=e.mobile,u=(l=void 0===l?{}:l).popupClassName,d=l.popupStyle,h=l.popupMotion,f=void 0===h?{}:h,p=l.popupRender,m=s.useRef();s.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return m.current}}}));var g=Object(o.a)({zIndex:i},d),v=a;return s.Children.count(a)>1&&(v=s.createElement("div",{className:"".concat(n,"-content")},a)),p&&(v=p(v)),s.createElement(He,Object(E.a)({visible:r,ref:m,removeOnLeave:!0},f),(function(e,t){var r=e.className,i=e.style,a=c()(n,u,r);return s.createElement("div",{ref:t,className:a,style:Object(o.a)(Object(o.a)({},i),g)},v)}))}));Xe.displayName="MobilePopupInner";var Ze=Xe,$e=["visible","mobile"],et=s.forwardRef((function(e,t){var n=e.visible,r=e.mobile,l=Object(a.a)(e,$e),c=Object(s.useState)(n),u=Object(i.a)(c,2),d=u[0],h=u[1],f=Object(s.useState)(!1),p=Object(i.a)(f,2),m=p[0],g=p[1],v=Object(o.a)(Object(o.a)({},l),{},{visible:d});Object(s.useEffect)((function(){h(n),n&&r&&g(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4)))}())}),[n,r]);var b=m?s.createElement(Ze,Object(E.a)({},v,{mobile:r,ref:t})):s.createElement(Je,Object(E.a)({},v,{ref:t}));return s.createElement("div",null,s.createElement(ze,v),b)}));et.displayName="Popup";var tt=et,nt=s.createContext(null);function rt(){}function it(){return""}function at(e){return e?e.ownerDocument:window.document}var ot=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var st,lt,ct=(st=de.a,(lt=function(e){Object(S.a)(n,e);var t=Object(C.a)(n);function n(e){var r,i;return Object(_.a)(this,n),(r=t.call(this,e)).popupRef=s.createRef(),r.triggerRef=s.createRef(),r.attachId=void 0,r.clickOutsideHandler=void 0,r.touchOutsideHandler=void 0,r.contextMenuOutsideHandler1=void 0,r.contextMenuOutsideHandler2=void 0,r.mouseDownTimeout=void 0,r.focusTime=void 0,r.preClickTime=void 0,r.preTouchTime=void 0,r.delayTimer=void 0,r.hasPopupMouseDown=void 0,r.onMouseEnter=function(e){var t=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",e),r.delaySetPopupVisible(!0,t,t?null:e)},r.onMouseMove=function(e){r.fireEvents("onMouseMove",e),r.setPoint(e)},r.onMouseLeave=function(e){r.fireEvents("onMouseLeave",e),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onPopupMouseEnter=function(){r.clearDelayTimer()},r.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Object(se.a)(null===(t=r.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onFocus=function(e){r.fireEvents("onFocus",e),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))},r.onMouseDown=function(e){r.fireEvents("onMouseDown",e),r.preClickTime=Date.now()},r.onTouchStart=function(e){r.fireEvents("onTouchStart",e),r.preTouchTime=Date.now()},r.onBlur=function(e){r.fireEvents("onBlur",e),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)},r.onContextMenu=function(e){e.preventDefault(),r.fireEvents("onContextMenu",e),r.setPopupVisible(!0,e)},r.onContextMenuClose=function(){r.isContextMenuToShow()&&r.close()},r.onClick=function(e){if(r.fireEvents("onClick",e),r.focusTime){var t;if(r.preClickTime&&r.preTouchTime?t=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?t=r.preClickTime:r.preTouchTime&&(t=r.preTouchTime),Math.abs(t-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,e)},r.onPopupMouseDown=function(){var e;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(e=r.context).onPopupMouseDown.apply(e,arguments)},r.onDocumentClick=function(e){if(!r.props.mask||r.props.maskClosable){var t=e.target,n=r.getRootDomNode(),i=r.getPopupDomNode();Object(se.a)(n,t)&&!r.isContextMenuOnly()||Object(se.a)(i,t)||r.hasPopupMouseDown||r.close()}},r.getRootDomNode=function(){var e=r.props.getTriggerDOMNode;if(e)return e(r.triggerRef.current);try{var t=Object(le.a)(r.triggerRef.current);if(t)return t}catch(e){}return ae.a.findDOMNode(Object(w.a)(r))},r.getPopupClassNameFromAlign=function(e){var t=[],n=r.props,i=n.popupPlacement,a=n.builtinPlacements,o=n.prefixCls,s=n.alignPoint,l=n.getPopupClassNameFromAlign;return i&&a&&t.push(function(e,t,n,r){for(var i=n.points,a=Object.keys(e),o=0;o=r.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(r.subMenuTitle.offsetWidth,"px"))}},r.saveSubMenuTitle=function(e){r.subMenuTitle=e},r.getBaseProps=function(){var e=Object(w.a)(r).props,t=r.getMode();return{mode:"horizontal"===t?"vertical":t,visible:r.getVisible(),level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:r.onSubMenuClick,onSelect:r.onSelect,onDeselect:r.onDeselect,onDestroy:r.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:r.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(w.a)(r),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[Z(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:r.internalMenuId,manualRef:r.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},r.getMotion=function(e,t){var n=Object(w.a)(r).haveRendered,i=r.props,a=i.motion,s=i.rootPrefixCls;return Object(o.a)(Object(o.a)({},a),{},{leavedClassName:"".concat(s,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var i=e.store,a=e.eventKey,l=i.getState().defaultActiveFirst;r.isRootMenu=!1;var c=!1;return l&&(c=l[a]),mt(i,a,c),r.state={mode:e.mode,isOpen:e.isOpen},r}return Object(k.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,i=t.manualRef,a=t.isOpen,o=function(){e.setState({mode:n,isOpen:a})},s=a!==this.state.isOpen,l=n!==this.state.mode;(l||s)&&(oe.a.cancel(this.updateStateRaf),l?this.updateStateRaf=Object(oe.a)(o):o()),i&&i(this),"horizontal"===n&&(null==r?void 0:r.isRootMenu)&&a&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),oe.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(e,t){var n=this.getBaseProps();return s.createElement(Ct,Object(E.a)({},n,{id:this.internalMenuId,className:e,style:t}),this.props.children)}},{key:"renderChildren",value:function(){var e=this,t=this.getBaseProps(),n=t.mode,i=t.visible,a=t.forceSubMenuRender,o=t.direction,l=this.getMotion(n,i);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||i||a,!this.haveOpened)return s.createElement("div",null);var u=c()("".concat(t.prefixCls,"-sub"),Object(r.a)({},"".concat(t.prefixCls,"-rtl"),"rtl"===o));return this.isInlineMode()?s.createElement(He,Object(E.a)({visible:t.visible,forceRender:a},l),(function(t){var n=t.className,r=t.style,i=c()(u,n);return e.renderPopupMenu(i,r)})):this.renderPopupMenu(u)}},{key:"render",value:function(){var e,t,n,i=Object(o.a)({},this.props),a=this.getVisible(),l=this.getPrefixCls(),u=this.isInlineMode(),d=this.getMode(),h=c()(l,"".concat(l,"-").concat(d),(e={},Object(r.a)(e,i.className,!!i.className),Object(r.a)(e,this.getOpenClassName(),a),Object(r.a)(e,this.getActiveClassName(),i.active||a&&!u),Object(r.a)(e,this.getDisabledClassName(),i.disabled),Object(r.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(i.eventKey?this.internalMenuId="".concat(i.eventKey,"$Menu"):(ft+=1,this.internalMenuId="$__$".concat(ft,"$Menu")));var f={},p={},m={};i.disabled||(f={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},p={onClick:this.onTitleClick},m={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var g={},v="rtl"===i.direction;u&&(v?g.paddingRight=i.inlineIndent*i.level:g.paddingLeft=i.inlineIndent*i.level);var b={};this.getVisible()&&(b={"aria-owns":this.internalMenuId});var y=null;"horizontal"!==d&&(y=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(y=s.createElement(this.props.expandIcon,Object(o.a)({},this.props))));var x=s.createElement("div",Object(E.a)({ref:this.saveSubMenuTitle,style:g,className:"".concat(l,"-title"),role:"button"},m,p,{"aria-expanded":a},b,{"aria-haspopup":"true",title:"string"==typeof i.title?i.title:void 0}),i.title,y||s.createElement("i",{className:"".concat(l,"-arrow")})),_=this.renderChildren(),k=(null===(t=i.parentMenu)||void 0===t?void 0:t.isRootMenu)?i.parentMenu.props.getPopupContainer:function(e){return e.parentNode},w=pt[d],S=i.popupOffset?{offset:i.popupOffset}:{},C=c()((n={},Object(r.a)(n,i.popupClassName,i.popupClassName&&!u),Object(r.a)(n,"".concat(l,"-rtl"),v),n)),O=i.disabled,A=i.triggerSubMenuAction,T=i.subMenuOpenDelay,I=i.forceSubMenuRender,D=i.subMenuCloseDelay,L=i.builtinPlacements;ee.forEach((function(e){return delete i[e]})),delete i.onClick;var R=v?Object(o.a)(Object(o.a)({},ht),L):Object(o.a)(Object(o.a)({},dt),L);delete i.direction;var N=this.getBaseProps(),j=u?null:this.getMotion(N.mode,N.visible);return s.createElement("li",Object(E.a)({},i,f,{className:h,role:"menuitem"}),s.createElement(ct,{prefixCls:l,popupClassName:c()("".concat(l,"-popup"),C),getPopupContainer:k,builtinPlacements:R,popupPlacement:w,popupVisible:!u&&a,popupAlign:S,popup:u?null:_,action:O||u?[]:[A],mouseEnterDelay:T,mouseLeaveDelay:D,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:I,popupMotion:j},x),u?_:null)}}]),n}(s.Component);gt.defaultProps={onMouseEnter:J,onMouseLeave:J,onTitleMouseEnter:J,onTitleMouseLeave:J,onTitleClick:J,manualRef:J,mode:"vertical",title:""};var vt=Object(O.b)((function(e,t){var n=e.openKeys,r=e.activeKey,i=e.selectedKeys,a=t.eventKey,o=t.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[o]===a,selectedKeys:i}}))(gt);vt.isSubMenu=!0;var bt=vt,yt=function(e){Object(S.a)(n,e);var t=Object(C.a)(n);function n(){var e;return Object(_.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.childRef=s.createRef(),e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=e.childRef.current;return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,r){var i=e.props,l=i.overflowedIndicator,c=i.level,u=i.mode,d=i.prefixCls,h=i.theme;if(1!==c||"horizontal"!==u)return null;var f=e.props.children[0].props,p=(f.children,f.title,f.style),m=Object(a.a)(f,["children","title","style"]),g=Object(o.a)({},p),v="".concat(t,"-overflowed-indicator"),b="".concat(t,"-overflowed-indicator");0===n.length&&!0!==r?g=Object(o.a)(Object(o.a)({},g),{},{display:"none"}):r&&(g=Object(o.a)(Object(o.a)({},g),{},{visibility:"hidden",position:"absolute"}),v="".concat(v,"-placeholder"),b="".concat(b,"-placeholder"));var y=h?"".concat(d,"-").concat(h):"",x={};return ee.forEach((function(e){void 0!==m[e]&&(x[e]=m[e])})),s.createElement(bt,Object(E.a)({title:l,className:"".concat(d,"-overflowed-submenu"),popupClassName:y},x,{key:v,eventKey:b,disabled:!1,style:g}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];ne(r,"display","inline-block");var i=e.getMenuItemNodes(),a=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(e){ne(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return te(e,!0)})),a.forEach((function(e){ne(e,"display","none")})),e.overflowedIndicatorWidth=te(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),ne(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=te(t);e.overflowedItems=[];var r,i=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(k.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=this.childRef.current;if(!t)return;this.resizeObserver=new re.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,i,a){var o=i;if("horizontal"===t.props.mode){var l=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(a>n&&(o=s.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),a===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return s.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),l=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var c=[].concat(Object(h.a)(r),[l,o]);return a===e.length-1&&c.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),c}return[].concat(Object(h.a)(r),[o])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(a.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return s.createElement(i,Object(E.a)({ref:this.childRef},r),this.renderChildren(n))}}]),n}(s.Component);yt.defaultProps={tag:"div",className:""};var xt=yt;function Et(e,t,n){var i=e.getState();e.setState({activeKey:Object(o.a)(Object(o.a)({},i.activeKey),{},Object(r.a)({},t,n))})}function _t(e){return e.eventKey||"0-menu-"}function kt(e,t){var n,r=t,i=e.children,a=e.eventKey;if(r&&($(i,(function(e,t){e&&e.props&&!e.props.disabled&&r===X(e,a,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?($(i,(function(e,t){r||!e||e.props.disabled||(r=X(e,a,t))})),r):r}function wt(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var St=function(e){Object(S.a)(n,e);var t=Object(C.a)(n);function n(e){var i;return Object(_.a)(this,n),(i=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(i.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var a=null;return r!==v.a.UP&&r!==v.a.DOWN||(a=i.step(r===v.a.UP?-1:1)),a?(e.preventDefault(),Et(i.props.store,_t(i.props),a.props.eventKey),"function"==typeof t&&t(a),1):void 0},i.onItemHover=function(e){var t=e.key,n=e.hover;Et(i.props.store,_t(i.props),n?t:null)},i.onDeselect=function(e){i.props.onDeselect(e)},i.onSelect=function(e){i.props.onSelect(e)},i.onClick=function(e){i.props.onClick(e)},i.onOpenChange=function(e){i.props.onOpenChange(e)},i.onDestroy=function(e){i.props.onDestroy(e)},i.getFlatInstanceArray=function(){return i.instanceArray},i.step=function(e){var t=i.getFlatInstanceArray(),n=i.props.store.getState().activeKey[_t(i.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var a=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(a=t,!1)})),i.props.defaultActiveFirst||-1===a||(o=t.slice(a,r-1)).length&&!o.every((function(e){return!!e.props.disabled}))){var o,s=(a+1)%r,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},i.renderCommonMenuItem=function(e,t,n){var r=i.props.store.getState(),a=Object(w.a)(i).props,l=X(e,a.eventKey,t),c=e.props;if(!c||"string"==typeof e.type)return e;var u=l===r.activeKey,d=Object(o.a)(Object(o.a)({mode:c.mode||a.mode,level:a.level,inlineIndent:a.inlineIndent,renderMenuItem:i.renderMenuItem,rootPrefixCls:a.prefixCls,index:t,parentMenu:a.parentMenu,manualRef:c.disabled?void 0:Object(T.a)(e.ref,wt.bind(Object(w.a)(i))),eventKey:l,active:!c.disabled&&u,multiple:a.multiple,onClick:function(e){(c.onClick||J)(e),i.onClick(e)},onItemHover:i.onItemHover,motion:a.motion,subMenuOpenDelay:a.subMenuOpenDelay,subMenuCloseDelay:a.subMenuCloseDelay,forceSubMenuRender:a.forceSubMenuRender,onOpenChange:i.onOpenChange,onDeselect:i.onDeselect,onSelect:i.onSelect,builtinPlacements:a.builtinPlacements,itemIcon:c.itemIcon||i.props.itemIcon,expandIcon:c.expandIcon||i.props.expandIcon},n),{},{direction:a.direction});return("inline"===a.mode||Q.any)&&(d.triggerSubMenuAction="click"),s.cloneElement(e,Object(o.a)(Object(o.a)({},d),{},{key:l||t}))},i.renderMenuItem=function(e,t,n){if(!e)return null;var r=i.props.store.getState(),a={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:i.props.triggerSubMenuAction,subMenuKey:n};return i.renderCommonMenuItem(e,t,a)},e.store.setState({activeKey:Object(o.a)(Object(o.a)({},e.store.getState().activeKey),{},Object(r.a)({},e.eventKey,kt(e,e.activeKey)))}),i.instanceArray=[],i}return Object(k.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!D()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[_t(t)],r=kt(t,n);if(r!==n)Et(t.store,_t(t),r);else if("activeKey"in e){r!==kt(e,e.activeKey)&&Et(t.store,_t(t),r)}}},{key:"render",value:function(){var e=this,t=Object(E.a)({},this.props);this.instanceArray=[];var n={className:c()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,a=t.visible,o=t.level,l=t.mode,d=t.overflowedIndicator,h=t.theme;return ee.forEach((function(e){return delete t[e]})),delete t.onClick,s.createElement(xt,Object(E.a)({},t,{prefixCls:r,mode:l,tag:"ul",level:o,theme:h,visible:a,overflowedIndicator:d},n),Object(u.a)(t.children).map((function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")})))}}]),n}(s.Component);St.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:J};var Ct=Object(O.b)()(St),Ot=n("Kwbf");function At(e,t,n){var r=e.prefixCls,i=e.motion,a=e.defaultMotions,o=void 0===a?{}:a,s=e.openAnimation,l=e.openTransitionName,c=t.switchingModeFromInline;if(i)return i;if("object"===Object(L.a)(s)&&s)Object(Ot.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=o[n];return u||(c?null:o.other)}var Tt=function(e){Object(S.a)(n,e);var t=Object(C.a)(n);function n(e){var r;Object(_.a)(this,n),(r=t.call(this,e)).onSelect=function(e){var t=Object(w.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys,i=e.key;n=t.multiple?n.concat([i]):[i],"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onSelect(Object(o.a)(Object(o.a)({},e),{},{selectedKeys:n}))}},r.onClick=function(e){var t=r.getRealMenuMode(),n=Object(w.a)(r),i=n.store,a=n.props.onOpenChange;"inline"===t||"openKeys"in r.props||(i.setState({openKeys:[]}),a([])),r.props.onClick(e)},r.onKeyDown=function(e,t){r.innerMenu.getWrappedInstance().onKeyDown(e,t)},r.onOpenChange=function(e){var t=Object(w.a)(r).props,n=r.store.getState().openKeys.concat(),i=!1,a=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var r=n.indexOf(e.key);(t=-1!==r)&&n.splice(r,1)}i=i||t};Array.isArray(e)?e.forEach(a):a(e),i&&("openKeys"in r.props||r.store.setState({openKeys:n}),t.onOpenChange(n))},r.onDeselect=function(e){var t=Object(w.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys.concat(),i=e.key,a=n.indexOf(i);-1!==a&&n.splice(a,1),"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onDeselect(Object(o.a)(Object(o.a)({},e),{},{selectedKeys:n}))}},r.onMouseEnter=function(e){r.restoreModeVerticalFromInline();var t=r.props.onMouseEnter;t&&t(e)},r.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,i="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,a="font-size"===e.propertyName&&i.indexOf("anticon")>=0;(t||a)&&r.restoreModeVerticalFromInline()},r.setInnerMenu=function(e){r.innerMenu=e},r.isRootMenu=!0;var i=e.defaultSelectedKeys,a=e.defaultOpenKeys;return"selectedKeys"in e&&(i=e.selectedKeys||[]),"openKeys"in e&&(a=e.openKeys||[]),r.store=Object(O.c)({selectedKeys:i,openKeys:a,activeKey:{"0-menu-":kt(e,e.activeKey)}}),r.state={switchingModeFromInline:!1,prevProps:e,inlineOpenKeys:[],store:r.store},r}return Object(k.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&i([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(o.a)({},Object(A.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(o.a)(Object(o.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:At(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,s.createElement(O.a,{store:this.store},s.createElement(Ct,Object(E.a)({},e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.store,i=r.getState(),a={},o={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(o.switchingModeFromInline=!0),"openKeys"in e?a.openKeys=e.openKeys||[]:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(o.switchingModeFromInline=!0,o.inlineOpenKeys=i.openKeys,a.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(a.openKeys=t.inlineOpenKeys,o.inlineOpenKeys=[])),Object.keys(a).length&&r.setState(a),o}}]),n}(s.Component);Tt.defaultProps={selectable:!0,onClick:J,onSelect:J,onOpenChange:J,onDeselect:J,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:s.createElement("span",null,"···")};var It=Tt,Dt=function(e){Object(S.a)(n,e);var t=Object(C.a)(n);function n(){var e;return Object(_.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===v.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseLeave;i({key:r,hover:!1}),a({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseEnter;i({key:r,hover:!0}),a({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,i=n.multiple,a=n.onClick,o=n.onSelect,s=n.onDeselect,l=n.isSelected,c={key:r,keyPath:[r],item:Object(w.a)(e),domEvent:t};a(c),i?l?s(c):o(c):l||o(c)},e.saveNode=function(t){e.node=t},e}return Object(k.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(o.a)({},this.props),n=c()(this.getPrefixCls(),t.className,(e={},Object(r.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(r.a)(e,this.getSelectedClassName(),t.isSelected),Object(r.a)(e,this.getDisabledClassName(),t.disabled),e)),i=Object(o.a)(Object(o.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?i=Object(o.a)(Object(o.a)({},i),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(i.role="none");var a={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},l=Object(o.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?l.paddingRight=t.inlineIndent*t.level:l.paddingLeft=t.inlineIndent*t.level),ee.forEach((function(e){return delete t[e]})),delete t.direction;var u=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(u=s.createElement(this.props.itemIcon,this.props)),s.createElement("li",Object(E.a)({},Object(A.a)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,a,{style:l,ref:this.saveNode}),t.children,u)}}]),n}(s.Component);Dt.isMenuItem=!0,Dt.defaultProps={onSelect:J,onMouseEnter:J,onMouseLeave:J,manualRef:J};var Lt=Object(O.b)((function(e,t){var n=e.activeKey,r=e.selectedKeys,i=t.eventKey;return{active:n[t.subMenuKey]===i,isSelected:Array.isArray(r)?-1!==r.indexOf(i):r===i}}))(Dt),Rt=function(e){Object(S.a)(n,e);var t=Object(C.a)(n);function n(){var e;return Object(_.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(k.a)(n,[{key:"render",value:function(){var e=Object(E.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,i="".concat(r,"-item-group-title"),a="".concat(r,"-item-group-list"),o=e.title,l=e.children;return ee.forEach((function(t){return delete e[t]})),delete e.direction,s.createElement("li",Object(E.a)({},e,{onClick:function(e){return e.stopPropagation()},className:"".concat(n," ").concat(r,"-item-group")}),s.createElement("div",{className:i,title:"string"==typeof o?o:void 0},o),s.createElement("ul",{className:a},s.Children.map(l,this.renderInnerMenuItem)))}}]),n}(s.Component);Rt.isMenuItemGroup=!0,Rt.defaultProps={disabled:!0};var Nt=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return s.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};Nt.defaultProps={disabled:!0,className:"",style:{}};var jt=It,Mt=n("eDIo");var Pt=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,a=e.style;return r&&!1!==r.showAdd?s.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:a,"aria-label":(null==i?void 0:i.addAriaLabel)||"Add tab",onClick:function(e){r.onEdit("add",{event:e})}},r.addIcon||"+"):null}));var Bt=s.forwardRef((function(e,t){var n=e.prefixCls,a=e.id,o=e.tabs,l=e.locale,u=e.mobile,d=e.moreIcon,h=void 0===d?"More":d,f=e.moreTransitionName,p=e.style,m=e.className,g=e.editable,b=e.tabBarGutter,y=e.rtl,x=e.onTabClick,E=Object(s.useState)(!1),_=Object(i.a)(E,2),k=_[0],w=_[1],S=Object(s.useState)(null),C=Object(i.a)(S,2),O=C[0],A=C[1],T="".concat(a,"-more-popup"),I="".concat(n,"-dropdown"),D=null!==O?"".concat(T,"-").concat(O):null,L=null==l?void 0:l.dropdownAriaLabel,R=s.createElement(jt,{onClick:function(e){var t=e.key,n=e.domEvent;x(t,n),w(!1)},id:T,tabIndex:-1,role:"listbox","aria-activedescendant":D,selectedKeys:[O],"aria-label":void 0!==L?L:"expanded dropdown"},o.map((function(e){return s.createElement(Lt,{key:e.key,id:"".concat(T,"-").concat(e.key),role:"option","aria-controls":a&&"".concat(a,"-panel-").concat(e.key),disabled:e.disabled},e.tab)})));function N(e){for(var t=o.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===O}))||0,r=t.length,i=0;it?"left":"right"})})),z=Object(i.a)(G,2),V=z[0],W=z[1],K=Ht(0,(function(e,t){!H&&L&&L({direction:e>t?"top":"bottom"})})),q=Object(i.a)(K,2),Y=q[0],Q=q[1],J=Object(s.useState)(0),X=Object(i.a)(J,2),Z=X[0],$=X[1],ee=Object(s.useState)(0),te=Object(i.a)(ee,2),ne=te[0],re=te[1],ie=Object(s.useState)(0),ae=Object(i.a)(ie,2),oe=ae[0],se=ae[1],le=Object(s.useState)(0),ce=Object(i.a)(le,2),ue=ce[0],de=ce[1],he=Object(s.useState)(null),fe=Object(i.a)(he,2),pe=fe[0],me=fe[1],ge=Object(s.useState)(null),ve=Object(i.a)(ge,2),be=ve[0],ye=ve[1],xe=Object(s.useState)(0),Ee=Object(i.a)(xe,2),_e=Ee[0],ke=Ee[1],we=Object(s.useState)(0),Se=Object(i.a)(we,2),Ce=Se[0],Oe=Se[1],Ae=function(e){var t=Object(s.useRef)([]),n=Object(s.useState)({}),r=Object(i.a)(n,2)[1],a=Object(s.useRef)("function"==typeof e?e():e),o=g((function(){var e=a.current;t.current.forEach((function(t){e=t(e)})),t.current=[],a.current=e,r({})}));return[a.current,function(e){t.current.push(e),o()}]}(new Map),Te=Object(i.a)(Ae,2),Ie=Te[0],De=Te[1],Le=function(e,t,n){return Object(s.useMemo)((function(){for(var n,r=new Map,i=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||y,a=i.left+i.width,s=0;sje?[je,!1]:[e,!0]}H?w?(Ne=0,je=Math.max(0,Z-pe)):(Ne=Math.min(0,pe-Z),je=0):(Ne=Math.min(0,be-ne),je=0);var Pe=Object(s.useRef)(),Be=Object(s.useState)(),Fe=Object(i.a)(Be,2),Ue=Fe[0],He=Fe[1];function Ge(){He(Date.now())}function ze(){window.clearTimeout(Pe.current)}function Ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,t=Le.get(e);if(t)if(H){var n=V;w?t.rightV+pe&&(n=t.right+t.width-pe):t.left<-V?n=-t.left:t.left+t.width>-V+pe&&(n=-(t.left+t.width-pe)),Q(0),W(Me(n)[0])}else{var r=Y;t.top<-Y?r=-t.top:t.top+t.height>-Y+be&&(r=-(t.top+t.height-be)),W(0),Q(Me(r)[0])}}!function(e,t){var n=Object(s.useState)(),r=Object(i.a)(n,2),a=r[0],o=r[1],l=Object(s.useState)(0),c=Object(i.a)(l,2),u=c[0],d=c[1],h=Object(s.useState)(0),f=Object(i.a)(h,2),p=f[0],m=f[1],g=Object(s.useState)(),v=Object(i.a)(g,2),b=v[0],y=v[1],x=Object(s.useRef)(),E=Object(s.useRef)(0),_=Object(s.useRef)(!1),k=Object(s.useRef)(),w=Object(s.useRef)(null);w.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;o({x:n,y:r}),window.clearInterval(x.current)},onTouchMove:function(e){if(a){e.preventDefault();var n=e.touches[0],r=n.screenX,i=n.screenY;o({x:r,y:i});var s=r-a.x,l=i-a.y;t(s,l);var c=Date.now();d(c),m(c-u),y({x:s,y:l})}},onTouchEnd:function(){if(a&&(o(null),y(null),b)){var e=b.x/p,n=b.y/p,r=Math.abs(e),i=Math.abs(n);if(Math.max(r,i)<.1)return;var s=e,l=n;x.current=window.setInterval((function(){Math.abs(s)<.01&&Math.abs(l)<.01?window.clearInterval(x.current):t(20*(s*=Ut),20*(l*=Ut))}),20)}},onWheel:function(e){var n=e.deltaX,r=e.deltaY,i=0,a=Math.abs(n),o=Math.abs(r);a===o?i="x"===k.current?n:r:a>o?(i=n,k.current="x"):(i=r,k.current="y");var s=Date.now();s-E.current>100&&(_.current=!1),(t(-i,-i)||_.current)&&(e.preventDefault(),_.current=!0),E.current=s}},s.useEffect((function(){function t(e){w.current.onTouchMove(e)}function n(e){w.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){w.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){w.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(R,(function(e,t){var n=!1;function r(e,t){e((function(e){var r=Me(e+t),a=Object(i.a)(r,2),o=a[0],s=a[1];return n=s,o}))}if(H){if(pe>=Z)return n;r(W,e)}else{if(be>=ne)return n;r(Q,t)}return ze(),Ge(),n})),Object(s.useEffect)((function(){return ze(),Ue&&(Pe.current=window.setTimeout((function(){He(0)}),100)),ze}),[Ue]);var We=function(e,t,n,r,i){var a,o,l,c=i.tabs,u=i.tabPosition,d=i.rtl;["top","bottom"].includes(u)?(a="width",o=d?"right":"left",l=Math.abs(t.left)):(a="height",o="top",l=-t.top);var h=t[a],f=n[a],p=r[a],m=h;return f+p>h&&(m=h-p),Object(s.useMemo)((function(){if(!c.length)return[0,0];for(var t=c.length,n=t,r=0;rl+m){n=r-1;break}}for(var s=0,u=t-1;u>=0;u-=1){if((e.get(c[u].key)||x)[o]0,st=V+pe-1?"".concat(null==T?void 0:T.time,"分钟"):"不限","】"),(null==G?void 0:G.show_desc)&&d.a.createElement("div",{className:"mt10"},d.a.createElement("p",{className:"font16"},"考试说明:"),d.a.createElement(v.a,{value:null==T?void 0:T.description})),(null==G?void 0:G.show_table)&&d.a.createElement("div",{className:"mt10"},d.a.createElement(r.a,{className:m.a.table,columns:H,dataSource:Object(a.a)(R||[]),bordered:!0,pagination:!1}))))}))},kPWJ: +/*!****************************************!*\ + !*** ./src/assets/images/question.gif ***! + \****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/question.cb52bef9.gif"},kPYp: +/*!******************************************!*\ + !*** ./src/assets/images/icons/zoom.png ***! + \******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF8AAAAUCAYAAADr0+FaAAANEklEQVRYR8WZe5RX1XXHP/vce3/zHoaXgFp5DQyOQLRgUTEtDW1qYyVmZUGNklRdiRpKE3lHfPyc4TngIBgfC0wx1ixt1NRWal2kotbE2lbRiCIISBCGhzDAvGd+87v37K5z5zfDzMCM46pr9fw1a+45+5zz3fvs/d3fn4yr1F8Do0UIUb74UFR8Gm3IO/Wf8MThat7mOYnaDZUmNUF/htpWLlePK4xwCcoQICHQbOGoKDuM4U1p5r0Px1DNrDPrezzQs+qNPUh/o4xXj6tRJhlhGEqeQNrCCYXdGvGfFt5JNHLoozJp7WyvdI0OtR4LEK7CstUIWyJLTSRcLfCnvlAiUKSgCEfV8o6NeMVE/G53itOUiXX3Sxcx2ov4qhG+qjBWoFChWYUqIt6VgFeblR0H5lEL0oGyjKvU1yHezPviyHdZ0Ro180basvD398n77svIFTokK5vrgW8LTELJRwgA6bTSHcaBckot/yWGX2YZtv5untT0dJ7SpOZrAX9mLTeIYarAIIQEYLrZTQNNFj7A8rx6/GrPfDncPmdihV6Y9nkA+Ot4nrIXaDSGElH6KfjdzpBSpVo8ttVU8Xitx/7hw/imWmYD4wXy6Iqjje9mOGYj/uX0bjYf/5nsaLcpY9fqDZ5hNTD8/wi+27bB+CzfOVcqSiq0BMPdRpiBUNANmHNvJUQo1ZFls0lTuXupnOw+0UVamMsCz+eHCuf3MWgUjZ3w76kUZQeW8j4iOnadXmCUNQI3xvsIbl7bX70MEdKpFLutcCA7iz/BxvfrfY2hNVXDb2v2s/TkU/Lf8SZXrtOcUxFfF8P1AiNVSYj0aihUGOoCu/vFFVpQlpmQX1iflQg3dMxxR1OaVHERfUIglXFKf6AIIbs97SnUq7I5VFZ+skiOt+NwSVIHpAu4wwgLBAZ04COkUGoytusEAhUGi9APyO+UTlWVfyPkrt0/kQ8y4FcI3NQF6zYnNAEn1VKtQuAJg1XiPRPOnnggFmwmicTIC/VqOa5wCiFHhCFGGGAtnkNUBGyaLVGKJXvvZXe8ZlpS/UP5DAh8cgPt8nTP8n+LZbS7vIHpdH2WzcBzUZp1njCTgB/HacYNQxS1sluFF4zwmgpHEpa09ckOleGkuUaEa70sRmrU4fgGG7L8VBOPnCiThgvXaU5ByE14rAGcwxA/vsxha3lJPF4ylv0mpCVKYBCGRRFXm5BvedlMcEEVgyY0hSHP+nn8XZiin1G6gu+At3watfC0l8MWIk5GBs+0UhxZbvSyuM545Gvn+ijYsIU9GvKkyeLVIOBUypIwKSbSyt94RUxHCeIgMNRFEauaDBt6fSrdkS+p0MnisUpgGtIlH7rc9nOU8pQyPmF4XGBY5v2G6RRvtp7irkFjeGf7bYTuyXfYVpUhi8gtLOCaoJA1KKPaL2aVHXjM+XievFm6Ti+JlE0GrupIDMqRps+4z6vh+f3DqHcF8MyZVSbdhl9lKCm8gBVBPn+pNq43qHBSlTujgNeDkJUo3+3Iw9BYF3F3i7K5eonUd9hLqhm2lz/IG8OaYADflgjPndMBGHkcqD3B4mMn+Gc2iaszbSOpZtDbFBdN4uFgINOJMAqOjGxLW77bJ/BHJDU7kcfXjOEeEa7s9NzdM65WeNK0sC5dQGjSrPDgB+1zVNiRqmbh7wO2dQWnm2tv0+C8Zq7rfxkbjOEC3AsQmtSyYnc9q8cW8kMDSYHB7saqHGs+xvLgQ36272VJ9Zajh92ukwtH8JCXxxWajvFSC1sjZYEPC0W4pT3RG3jj0xQ/qF8qe86ymVRTbLg2KOQxLBdkvkdWeLoR7qyaL6fOWqMqI+9jZvYAHsEyKP7eVtj//HPBn5bU7CP9uN4oi4GvSFdGcRhhgybYvHuunByzXqd4IZtEmNi2BzZSklrPQ/vKpK43gOJvEzWvZDZrvYCb1ZIDhBZeyE3xt01ZrDRwc5zqhCiyPNtaxZwD63tmRe37jbhZs/1i5iQKSGpIYeZs+7HcKYYZwPfb50bwSK2l/LNOtabzuUet0TGB4VdGmJD5f0qFiro6Ko7cL65OnDVcxjA+zwDFmY9H/TY62/OYuFbzQphthXIRzus8U4kLy10DhGfemi8u3zOuUv9K4Km4gLaF14kIbty7SF75XOAzE0rW6iwxPBxHOFiUt0Plx77HvSjXZiLntI0o/3iJrO+bXZWSCibh8QsjlMRnE06IZYWjiEgb+CLo6RQrm1t4oKbs3E4dnNSh/fLYkvCZHNtRmppDysOAh6oyOHQ/0+i1Ot6HZzyPS1TjunvcRFzVI/gZjn6rKPORzHNps+ro4A6F5aaef+1oXFSl9EFmqvIEkBunBstea5i9Z778T99AgnFr1dWTp0S4sO1u7ETj1LCItiLvEu1RQn6ya7H8Q5/tJnWEzecFz+PSDPtxKWIdMMJFvkNEDHq4iuU1dVSySWrPZXvkeh2SHfEi8EfGQBTRWFdLecLw0IEyaTnXmovX6ng1PC3CeNeuifCZCeP+5OxRXKEXGp95hrgouAjsGBZ+KxHLTCOvd+0YVUrXMUMVB0j70z4cRty0b7H8R19BKqnUGQY20kZnXU1511rm+R5LFa7J2KmOQpJ7lsijfbU7brVOwOcfRSiNIxaqjbBaLeNc5HeAf5DlNQ1fAPyQxoY6yv0vA/xxq3QEAcvFMCumR2eG476vRsKCPQvY0blNbp9y8Xr9YxvyhBFGZS4YRSFzCot4YvvtnVhAT4hN0mDsDSz1PRaoUuCYgcLWAO4IYbXAdzLNTGgtmz5exNxzneMs80n1i7P4TpDLOokY5KiWKlXAYhG+1iXyPw/8FTokO7tT5H8p4CfVlBbyFassFeE6IKvTJRqt5QVfWLVzoXzUE3bOcZpgjYGZmfTgmpBt0UkW71vJe70CNVO9QZbLBl7J3xufCY7tZJq29UPrufdIAYtNG1j9XEqzyq7mwyw+eIiXO2tJ5zrbebfoqKIxVPr5zNB03AOoVd6KWpkbJJwDubXPkf9lgz9powaNdUw1HveqMrUz8Erc6W0OI9bvW8T+Lhy9+003alDcyPd8pVKIu0uHU2O6medaPmP5oZ/KJ+d03DT1i6cy2eSzzE8wTV0P4agS7DeWH+1aJC+VPKhTRXlUNMOkhEhb2d58jLsPHuYNnusqmrXvM2i2DisazeKgkFsRCp1dFRpUWGYifolQDnzv/wV8p5XYfP5CPMpRLu0GzlGrrB9g+Gltbdwc9Dhyzke3HyEqzmKgn2CDSCxWuShzmk86XcvrErDR+vxGsqhNnESbwHiFDJYGvi4+3w8KmEK6Q/azqjzWYLjP8efipBb6eSwQj6XtnbVJQNTEzqiVjZ7PlpYWjuWCbR2ImFYKwkamGMstWf3jBivXVW91+lHIG4W5zKxpJbu9w+0r+CPW6NBcjxcVLo8Lbl/TjvCMmFjRPVNwix/Q0kDiAuc6xy6qoAqHULaKpVGlZ9WzLQtwysLbrR5vZaco1SDO0a6ixzbFgLUcUdhllE+d5OpSiIXhpq0IDnShHrMkSClsM5YluxbJh7HHVWXCaka2BpQb4Vsxo2pr192C084uzq5y2mk7GEaIk4SFi1xHlUmDroC/Z5V79iyUlztrOw58l45OVbMsFbLudEUPbGeFDsnJjsFvYzt9Bf9cbKe0Ui8DnlYY1z2sXcETzfSavdMKB0OI4/7C42EtD5tcLhef+w1c0U0DcpYcXXUauYOus8Mdns1W2eIpy3Y18FGXrjipZmzAMLIoM4ZZQqwmdh7Oaltv3E0id1lMlR1hRJnk8PK+H0mqu7DmHBDB4vw6HtneQ8N06YNalIp4HmF6X8EfV6ljRfk5EmNxJvIdn09ksdYIs7oV2d7h7uGrhUOEzP14ibzoNgXmC3wjQx3dbwZdwM6YcbHpNJFDKjxr4dHOunv3rcY9rANNC7dbR4WFkbhIP7ddFxSxTK3Cr0nzgFMz2+05Su37saTsWJRVS5VnuHnnAnmtp8vPnKne+1NY4jlZwtDfWpob6ijzhQ098fyLVmn/bJ97PMPtQJ5r8Dxck5VUMyqXP0wEzEHjNFHQR438rPPZtuyiKpTtmsdjrji7SGmJmBJrGYZSlIsyfYD7oaJVlVqEAwbejSJeafR5t6dOsfOGTuXMTTHeBExHmCzCaDTurLPEFWOlXqFKlI+s8prfwG92lnXVXkoq9HwTcD/KdSp8mGrmyVSaf+pJJmjff/gKHZaTxR3G8E1rKWyoY4MvbOwJfIdIcSUX+8Ic1yg6yT6Eb7Q1Wc4BORRk+RQZQ2DD3n8Y+Lwn4edT/cEcOd0xL6nmyn5knWghPzuL7JQQJMC0umjzafUbaG5J0XigjFSfeHuHYZXSJIH0Iz+VJtczBL6H58pLZAhTaVqKCmnYfoSWc4l6Tko/nscg8clvMtQPyOFUn/oRVCauJZcs+jeHJFLHOX1wFTW9MkEnyg0kP2EpitJ4+YVU/S8v1xqrW4H9MAAAAABJRU5ErkJggg=="},kSUc: +/*!***************************************************!*\ + !*** ./src/components/markdown-editor/index.less ***! + \***************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},"kaH+": +/*!************************************************!*\ + !*** ./src/components/image-preview/index.tsx ***! + \************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),a=n(/*! react */"q1tI"),o=n.n(a),s=n(/*! ./index.less?modules */"XFxt"),l=n.n(s),c=n(/*! @/components/mediator */"dhSg"),u=n(/*! @ant-design/icons */"rLCj"),d=n(/*! @ant-design/icons */"dF/Y"),h=n(/*! @ant-design/icons */"4i/N");t.a=function(){var e=Object(a.useState)(""),t=Object(i.a)(e,2),n=t[0],s=t[1],f=Object(a.useState)(0),p=Object(i.a)(f,2),m=p[0],g=p[1],v=Object(a.useRef)("");function b(e){27==e.keyCode&&v.current&&y()}function y(){document.body.style.overflow="auto",s("")}return Object(a.useEffect)((function(){return c.a.subscribe("preview-image",(function(e){s(e),document.body.style.overflow="hidden"}))}),[]),Object(a.useEffect)((function(){return document.addEventListener("keydown",b),function(){document.removeEventListener("keydown",b)}}),[]),Object(a.useEffect)((function(){v.current=n}),[n]),o.a.createElement(a.Fragment,null,n?o.a.createElement("div",{className:l.a["image-preview-container"]},o.a.createElement("div",{className:l.a["button-group"]},o.a.createElement(r.a,{onClick:function(){g(m+90)}},"旋转",o.a.createElement(u.a,null)),o.a.createElement(r.a,{href:n},"下载",o.a.createElement(d.a,null)),o.a.createElement(r.a,{onClick:y},"关闭",o.a.createElement(h.a,null))),o.a.createElement("div",{className:l.a["preview-wrp-group"]},o.a.createElement("img",{className:l.a["image-preview"],src:n,alt:"预览大图",style:{transform:"rotate(".concat(m,"deg)")}}))):null)}},kqOp: +/*!***********************************************!*\ + !*** ./src/components/Editor/NullMDEditor.js ***! + \***********************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),l=n(/*! react */"q1tI"),c=n.n(l),u=n(/*! ../markdown-editor */"Ot1p"),d=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 g(e,t,n){return t.f=t.inline=n,n(e,t)}function v(e,t,n){return t.f=t.block=n,n(e,t)}function b(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==x){var n=i;if(!n){var a=e.innerMode(r,t.htmlState);n="xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText}n&&(t.f=w,t.block=y,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function y(r,i){var o,h=r.column()===i.indentation,m=!(o=i.prevLine.stream)||!/\S/.test(o.string),v=i.indentedCode,b=i.prevLine.hr,y=!1!==i.list,x=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var k=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,y)){for(i.list=null;k=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return r.skipToEnd(),i.indentedCode=!0,a.code;if(r.eatSpace())return null;if(h&&i.indentation<=x&&(C=r.match(u))&&C[1].length<=6)return i.quote=0,i.header=C[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,_(i);if(i.indentation<=x&&r.eat(">"))return i.quote=h?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),r.eatSpace(),_(i);if(!S&&!i.setext&&h&&i.indentation<=x&&(C=r.match(l))){var O=C[1]?"ol":"ul";return i.indentation=k+r.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&r.match(c,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+O]),_(i)}return h&&i.indentation<=x&&(C=r.match(f,!0))?(i.quote=0,i.fencedEndRE=new RegExp(C[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&function(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}(C[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=E,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,_(i)):i.setext||!(w&&y||i.quote||!1!==i.list||i.code||S||p.test(r.string))&&(C=r.lookAhead(1))&&(C=C.match(d))?(i.setext?(i.header=i.setext,i.setext=0,r.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==C[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,_(i)):S?(r.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,a.hr):"["===r.peek()?g(r,i,A):g(r,i,i.inline)}function x(t,n){var a=r.token(t,n.htmlState);if(!i){var o=e.innerMode(r,n.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=w,n.block=y,n.htmlState=null)}return a}function E(e,t){var r,i=t.listStack[t.listStack.length-1]||0,o=t.indentation=e.quote?t.push(a.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function k(e,t){if(e.match(h,!0))return _(t)}function w(t,i){var o=i.text(t,i);if(void 0!==o)return o;if(i.list)return i.list=null,_(i);if(i.taskList)return" "===t.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,_(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),_(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(u),!0))return a.linkHref}if("`"===s){var d=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var h=t.current().length;if(0!=i.code||i.quote&&1!=h){if(h==i.code){var f=_(i);return i.code=0,f}return i.formatting=d,_(i)}return i.code=h,_(i)}if(i.code)return _(i);if("\\"===s&&(t.next(),n.highlightFormatting)){var p=_(i),g=a.formatting+"-escape";return p?p+" "+g:g}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),_(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),_(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var p=_(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=C,p}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),_(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var p=_(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?C:w,p}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link"),(p=_(i))?p+=" ":p="",p+a.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link"),(p=_(i))?p+=" ":p="",p+a.linkEmail;if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var b=t.string.indexOf(">",t.pos);if(-1!=b){var y=t.string.substring(t.start,b);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),v(t,i,x)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var E=1,k=1==t.pos?" ":t.string.charAt(t.pos-2);E<3&&t.eat(s);)E++;var O=t.peek()||" ",A=!/\s/.test(O)&&(!m.test(O)||/\s/.test(k)||m.test(k)),T=!/\s/.test(k)&&(!m.test(k)||/\s/.test(O)||m.test(O)),I=null,D=null;if(E%2&&(i.em||!A||"*"!==s&&T&&!m.test(k)?i.em!=s||!T||"*"!==s&&A&&!m.test(O)||(I=!1):I=!0),E>1&&(i.strong||!A||"*"!==s&&T&&!m.test(k)?i.strong!=s||!T||"*"!==s&&A&&!m.test(O)||(D=!1):D=!0),null!=D||null!=I)return n.highlightFormatting&&(i.formatting=null==I?"strong":null==D?"em":"strong em"),!0===I&&(i.em=s),!0===D&&(i.strong=s),f=_(i),!1===I&&(i.em=!1),!1===D&&(i.strong=!1),f}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return _(i);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),f=_(i),i.strikethrough=!1,f;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),_(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return _(i);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var L=_(i);return i.emoji=!1,L}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),_(i)}function S(e,t){if(">"===e.next()){t.f=t.inline=w,n.highlightFormatting&&(t.formatting="link");var r=_(t);return r?r+=" ":r="",r+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function C(e,t){if(e.eatSpace())return null;var r,i=e.next();return"("===i||"["===i?(t.f=t.inline=(r="("===i?")":"]",function(e,t){if(e.next()===r){t.f=t.inline=w,n.highlightFormatting&&(t.formatting="link-string");var i=_(t);return t.linkHref=!1,i}return e.match(O[r]),t.linkHref=!0,_(t)}),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,_(t)):"error"}var O={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function A(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=T,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,_(t)):g(e,t,w)}function T(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=I,n.highlightFormatting&&(t.formatting="link");var r=_(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function I(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=w,a.linkHref+" url")}var D={startState:function(){return{f:y,prevLine:{stream:null},thisLine:{stream:null},block:y,htmlState:null,indentation:0,inline:w,text:k,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(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return b(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=x)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==x?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:D}},indent:function(t,n,i){return t.block==x&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:b,getType:_,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return D}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../xml/xml */"1eCo"),n(/*! ../meta */"8EBN"))},loD1: +/*!**************************************************!*\ + !*** ./node_modules/zrender/lib/contain/line.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){t.containStroke=function(e,t,n,r,i,a,o){if(0===i)return!1;var s=i,l=0;if(o>t+s&&o>r+s||oe+s&&a>n+s||a=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height},clone:function(){return new h(this.x,this.y,this.width,this.height)},copy:function(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},h.create=function(e){return new h(e.x,e.y,e.width,e.height)};var f=h;e.exports=f},mLcG: +/*!*********************************************************************!*\ + !*** ./node_modules/zrender/lib/animation/requestAnimationFrame.js ***! + \*********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)};e.exports=n},mgmH: +/*!*****************************!*\ + !*** ./src/utils/export.ts ***! + \*****************************/ +/*! exports provided: ExportCourseInfo, ExportCourseActScore, ExportCourseMemberScores, ExportCourseAndOther, exportMoocrecord, ExportCourseTotalScore, ExportCourseWorkListScores, ExportCourseWorkListAppendix, ExportPollsScores, ExportAttendance, ExportVideoStudent, ExportCourseStudentsInfo, ExportProblemset, Exportcompetitions, ExportExerciseStudentScores, getDownFile, getecyears, getec_training_objectives, getec_graduation_requirements */ +/*! exports used: ExportAttendance, ExportCourseActScore, ExportCourseAndOther, ExportCourseInfo, ExportCourseMemberScores, ExportCourseStudentsInfo, ExportCourseTotalScore, ExportCourseWorkListScores, ExportExerciseStudentScores, ExportPollsScores, ExportProblemset, ExportVideoStudent, Exportcompetitions, exportMoocrecord, getDownFile, getec_graduation_requirements, getec_training_objectives, getecyears */function(e,t,n){"use strict";n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"e",(function(){return g})),n.d(t,"c",(function(){return v})),n.d(t,"n",(function(){return b})),n.d(t,"g",(function(){return y})),n.d(t,"h",(function(){return x})),n.d(t,"j",(function(){return E})),n.d(t,"a",(function(){return _})),n.d(t,"l",(function(){return k})),n.d(t,"f",(function(){return w})),n.d(t,"k",(function(){return S})),n.d(t,"m",(function(){return C})),n.d(t,"i",(function(){return O})),n.d(t,"o",(function(){return A})),n.d(t,"r",(function(){return T})),n.d(t,"q",(function(){return I})),n.d(t,"p",(function(){return D}));n(/*! antd/es/message/style */"miYZ");var r=n(/*! antd/es/message */"tsqr"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),s=n.n(o),l=n(/*! @/service/classrooms */"oUNq"),c=n(/*! umi */"9kvl"),u=n(/*! ./util */"1vsH"),d=n(/*! ./env */"m3rI"),h=function(){Object(c.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在生成文件,请稍后..."}})},f=function(){Object(c.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},p=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(),e.next=3,Object(l.s)(Object(i.a)({},t));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,Object(u.u)("",Object(u.U)({url:d.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/export_couser_info.json"),query:t}));case 7:f();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.q)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_member_act_score")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_member_act_score")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.t)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_score")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_score")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.r)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.y)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.u)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_homework")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_homework")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=Object(a.a)(s.a.mark((function e(t,n){var a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.w)(Object(i.a)({},t));case 2:0===(a=e.sent).status?(r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/").concat(n))):-3===a.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/").concat(n)));case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),E=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(),e.next=3,Object(l.z)(Object(i.a)({},t));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,Object(u.u)("",Object(u.U)({url:d.a.API_SERVER+"/api/polls/".concat(t.categoryId,"/commit_result.xlsx"),query:t}));case 7:f();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:d.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/attendances/export_xlsx_data.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:d.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/video_study_statics.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:d.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/export_course_students_info.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:d.a.API_SERVER+"/api/item_banks/export.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),C=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:d.a.API_SERVER+"/api/competitions/region_reports.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.x)(Object(i.a)({},t));case 2:0===(n=e.sent).status?(r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/exercise_score"))):-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/exercise_score")));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("----------","调用下载"),e.next=3,Object(u.t)("",Object(u.U)({url:d.a.API_SERVER+"/api/export_records/".concat(t.id,".xlsx"),query:t}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:d.a.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:d.a.API_SERVER+"/api/ec_years/".concat(null==t?void 0:t.ec_year_id,"/ec_training_objectives.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:d.a.API_SERVER+"/api/ec_years/".concat(null==t?void 0:t.ec_year_id,"/ec_graduation_requirements.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},mxOx: +/*!*********************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/FaceReview/index.less?modules ***! + \*********************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___1OKqY",flex_space_between:"flex_space_between___9LtA4",flex_box_vertical_center:"flex_box_vertical_center___1eoO3",flex_box_center_end:"flex_box_center_end___2z5cA",flex_box_column:"flex_box_column___EmE-R",wrap:"wrap___1KKiW",control:"control___1QLLH",btn:"btn___2uv5p",customTable:"customTable___1j8g4",bgH:"bgH___38VTN",cusModal:"cusModal___3m_hn",imgWrap:"imgWrap___1V_Vd",img:"img___3YaEG",iBtn:"iBtn___2kloF",text:"text___3R4ja",no:"no___1ION1",textP:"textP___1nOEX",video:"video___TW5nF",sys:"sys___lyOTD",li:"li___1BzVB",d1:"d1___fIaVJ",b1:"b1____gBjv",es:"es___2kUwZ"}},n1HI: +/*!*************************************************!*\ + !*** ./node_modules/zrender/lib/contain/arc.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./util */"hX1E").normalizeRadian,i=2*Math.PI;t.containStroke=function(e,t,n,a,o,s,l,c,u){if(0===l)return!1;var d=l;c-=e,u-=t;var h=Math.sqrt(c*c+u*u);if(h-d>n||h+do&&(o+=i);var p=Math.atan2(u,c);return p<0&&(p+=i),p>=a&&p<=o||p+i>=a&&p+i<=o}},n6Mw: +/*!****************************************************************!*\ + !*** ./node_modules/zrender/lib/svg/helper/ClippathManager.js ***! + \****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Definable */"SrGk"),i=n(/*! ../../core/util */"bYtY"),a=n(/*! ../../core/matrix */"Fofx");function o(e,t){r.call(this,e,t,"clipPath","__clippath_in_use__")}i.inherits(o,r),o.prototype.update=function(e){var t=this.getSvgElement(e);t&&this.updateDom(t,e.__clipPaths,!1);var n=this.getTextSvgElement(e);n&&this.updateDom(n,e.__clipPaths,!0),this.markUsed(e)},o.prototype.updateDom=function(e,t,n){if(t&&t.length>0){var r,i,o=this.getDefs(!0),s=t[0],l=n?"_textDom":"_dom";s[l]?(i=s[l].getAttribute("id"),r=s[l],o.contains(r)||o.appendChild(r)):(i="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",i),o.appendChild(r),s[l]=r);var c=this.getSvgProxy(s);if(s.transform&&s.parent.invTransform&&!n){var u=Array.prototype.slice.call(s.transform);a.mul(s.transform,s.parent.invTransform,s.transform),c.brush(s),s.transform=u}else c.brush(s);var d=this.getSvgElement(s);r.innerHTML="",r.appendChild(d.cloneNode()),e.setAttribute("clip-path","url(#"+i+")"),t.length>1&&this.updateDom(r,t.slice(1),n)}else e&&e.setAttribute("clip-path","none")},o.prototype.markUsed=function(e){var t=this;e.__clipPaths&&i.each(e.__clipPaths,(function(e){e._dom&&r.prototype.markUsed.call(t,e._dom),e._textDom&&r.prototype.markUsed.call(t,e._textDom)}))};var s=o;e.exports=s},n6Qo: +/*!**************************************************************!*\ + !*** ./node_modules/rc-table/es/Footer/index.js + 2 modules ***! + \**************************************************************/ +/*! exports provided: default, FooterComponents */ +/*! exports used: FooterComponents, default */ +/*! 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/context/TableContext.js because of ./node_modules/antd/es/table/Table.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 o}));var r=n("q1tI"),i=n("biw7"),a=n("fyJ8");t.b=function(e){var t=e.children,n=r.useContext(i.a).prefixCls;return r.createElement("tfoot",{className:"".concat(n,"-summary")},t)};var o={Cell:function(e){var t=e.className,n=e.index,o=e.children,s=e.colSpan,l=e.rowSpan,c=r.useContext(i.a),u=c.prefixCls,d=c.fixedInfoList[n];return r.createElement(a.a,Object.assign({className:t,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,render:function(){return{children:o,props:{colSpan:s,rowSpan:l}}}},d))},Row:function(e){return r.createElement("tr",Object.assign({},e))}}},nCxF: +/*!*****************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/helper/smoothBezier.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../../core/vector */"QBsz"),i=r.min,a=r.max,o=r.scale,s=r.distance,l=r.add,c=r.clone,u=r.sub;e.exports=function(e,t,n,r){var d,h,f,p,m=[],g=[],v=[],b=[];if(r){f=[1/0,1/0],p=[-1/0,-1/0];for(var y=0,x=e.length;y");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}Object(a.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=D(window,[{eventName:"error",fn:this.onWindowError}])},n.componentWillUnmount=function(){this.unbind()},n.componentDidCatch=function(e){if(!(e instanceof L))throw e;this.setState({})},n.render=function(){return this.props.children(this.setCallbacks)},t}(i.a.Component),j=function(e){return e+1},M=function(e,t){var n=e.droppableId===t.droppableId,r=j(e.index),i=j(t.index);return n?"\n You have moved the item from position "+r+"\n to position "+i+"\n ":"\n You have moved the item from position "+r+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+i+"\n "},P=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},B=function(e){return"\n The item has returned to its starting position\n of "+j(e.index)+"\n"},F="\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",U=function(e){return"\n You have lifted an item in position "+j(e.source.index)+"\n"},H=function(e){var t=e.destination;if(t)return M(e.source,t);var n=e.combine;return n?P(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},G=function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+B(e.source)+"\n ";var t=e.destination,n=e.combine;return t?"\n You have dropped the item.\n "+M(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+P(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+B(e.source)+"\n "},z={x:0,y:0},V=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},W=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},K=function(e,t){return e.x===t.x&&e.y===t.y},q=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},Y=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},Q=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},J=function(e,t){return Math.min.apply(Math,t.map((function(t){return Q(e,t)})))},X=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},Z=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},$=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},ee=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=f({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):f(e)},te=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,a=function(e,t,n){var r;return n&&n.increasedBy?Object(o.a)({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(function(e,t){return t?Z(e,t.scroll.diff.displacement):e}(t.marginBox,i),r,n);return{page:t,withPlaceholder:n,active:ee(a,i)}},ne=function(e,t){e.frame||R(!1);var n=e.frame,r=W(t,n.scroll.initial),i=q(r),a=Object(o.a)({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=te({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:a});return Object(o.a)({},e,{frame:a,subject:s})};function re(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function ie(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;ne.bottom,s=r.lefte.right;return!(!o||!s)||(o&&a||s&&i)}},Ee=function(e){var t=ye(e.top,e.bottom),n=ye(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},_e={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},ke={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},we=function(e){var t=e.target,n=e.destination,r=e.viewport,i=e.withDroppableDisplacement,a=e.isVisibleThroughFrameFn,o=i?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:z;return Z(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(o,n,a)&&function(e,t,n){return n(t)(e)}(o,r,a)},Se=function(e){return we(Object(o.a)({},e,{isVisibleThroughFrameFn:xe}))},Ce=function(e){return we(Object(o.a)({},e,{isVisibleThroughFrameFn:Ee}))};function Oe(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,a=e.forceShouldAnimate,o=e.last;return t.reduce((function(e,t){var s=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return f(p(n,r))}(t,r),l=t.descriptor.id;if(e.all.push(l),!Se({target:s,destination:n,viewport:i,withDroppableDisplacement:!0}))return e.invisible[t.descriptor.id]=!0,e;var c={draggableId:l,shouldAnimate:function(e,t,n){if("boolean"==typeof n)return n;if(!t)return!0;var r=t.invisible,i=t.visible;if(r[e])return!1;var a=i[e];return!a||a.shouldAnimate}(l,o,a)};return e.visible[l]=c,e}),{all:[],visible:{},invisible:{}})}function Ae(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,a=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:ve,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:a}}}}function Te(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,a=e.displacedBy,o=e.last,s=e.index,l=e.forceShouldAnimate,c=me(t,r);if(null==s)return Ae({insideDestination:n,inHomeList:c,displacedBy:a,destination:r});var u=ae(n,(function(e){return e.descriptor.index===s}));if(!u)return Ae({insideDestination:n,inHomeList:c,displacedBy:a,destination:r});var d=pe(t,n),h=n.indexOf(u);return{displaced:Oe({afterDragging:d.slice(h),destination:r,displacedBy:a,last:o,viewport:i.frame,forceShouldAnimate:l}),displacedBy:a,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:s}}}}function Ie(e,t){return Boolean(t.effected[e])}var De=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,a=e.destination,o=e.insideDestination,s=e.previousImpact,l=e.viewport,c=e.afterCritical,u=s.at;if(u||R(!1),"REORDER"===u.type){var d=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var a=i.index,o=t?a+1:a-1,s=r[0].descriptor.index,l=r[r.length-1].descriptor.index;return o(n?l:l+1)?null:o}({isMovingForward:t,isInHomeList:n,location:u.destination,insideDestination:o});return null==d?null:Te({draggable:r,insideDestination:o,destination:a,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:d})}var h=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,a=e.afterCritical;if(!n.isCombineEnabled)return null;var o=i.draggableId,s=r[o].descriptor.index;return Ie(o,a)?t?s:s-1:t?s+1:s}({isMovingForward:t,destination:a,displaced:s.displaced,draggables:i,combine:u.combine,afterCritical:c});return null==h?null:Te({draggable:r,insideDestination:o,destination:a,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:h})},Le=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=fe(n);i||R(!1);var a=i.draggableId,o=r[a].page.borderBox.center,s=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,a=Boolean(t.visible[r]||t.invisible[r]);return Ie(r,n)?a?z:q(i.point):a?i.point:z}({displaced:n.displaced,afterCritical:t,combineWith:a,displacedBy:n.displacedBy});return V(o,s)},Re=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},Ne=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},je=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Y(t.line,n.marginBox[t.end]+Re(t,r),Ne(t,n.marginBox,r))},Me=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return Y(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),Ne(t,n.marginBox,r))},Pe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,a=e.afterCritical,o=de(i.descriptor.id,r),s=n.page,l=i.axis;if(!o.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return Y(t.line,n.contentBox[t.start]+Re(t,r),Ne(t,n.contentBox,r))}({axis:l,moveInto:i.page,isMoving:s});var c=t.displaced,u=t.displacedBy,d=c.all[0];if(d){var h=r[d];if(Ie(d,a))return Me({axis:l,moveRelativeTo:h.page,isMoving:s});var f=y(h.page,u.point);return Me({axis:l,moveRelativeTo:f,isMoving:s})}var p=o[o.length-1];if(p.descriptor.id===n.descriptor.id)return s.borderBox.center;if(Ie(p.descriptor.id,a)){var m=y(p.page,q(a.displacedBy.point));return je({axis:l,moveRelativeTo:m,isMoving:s})}return je({axis:l,moveRelativeTo:p.page,isMoving:s})},Be=function(e,t){var n=e.frame;return n?V(t,n.scroll.diff.displacement):t},Fe=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,a=e.afterCritical,o=n.page.borderBox.center,s=t.at;return r&&s?"REORDER"===s.type?Pe({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:a}):Le({impact:t,draggables:i,afterCritical:a}):o}(e),n=e.droppable;return n?Be(n,t):t},Ue=function(e,t){var n=W(t,e.scroll.initial),r=q(n);return{frame:f({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function He(e,t){return e.map((function(e){return t[e]}))}var Ge=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=function(e,t){return V(e.scroll.diff.displacement,t)}(e.viewport,t),i=W(r,n.page.borderBox.center);return V(n.client.borderBox.center,i)},ze=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,a=e.withDroppableDisplacement,s=e.onlyOnMainAxis,l=void 0!==s&&s,c=W(r,t.page.borderBox.center),u={target:Z(t.page.borderBox,c),destination:n,withDroppableDisplacement:a,viewport:i};return l?function(e){return we(Object(o.a)({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=ye(e.top,e.bottom),r=ye(e.left,e.right);return function(e){return t===_e?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(u):Ce(u)},Ve=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.draggables,a=e.previousImpact,s=e.viewport,l=e.previousPageBorderBoxCenter,c=e.previousClientSelection,u=e.afterCritical;if(!r.isEnabled)return null;var d=de(r.descriptor.id,i),h=me(n,r),f=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.insideDestination,a=e.previousImpact;if(!r.isCombineEnabled)return null;if(!he(a))return null;function s(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return Object(o.a)({},a,{at:t})}var l=a.displaced.all,c=l.length?l[0]:null;if(t)return c?s(c):null;var u=pe(n,i);if(!c)return u.length?s(u[u.length-1].descriptor.id):null;var d=ie(u,(function(e){return e.descriptor.id===c}));-1===d&&R(!1);var h=d-1;return h<0?null:s(u[h].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:d,previousImpact:a})||De({isMovingForward:t,isInHomeList:h,draggable:n,draggables:i,destination:r,insideDestination:d,previousImpact:a,viewport:s,afterCritical:u});if(!f)return null;var p=Fe({impact:f,draggable:n,droppable:r,draggables:i,afterCritical:u});if(ze({draggable:n,destination:r,newPageBorderBoxCenter:p,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Ge({pageBorderBoxCenter:p,draggable:n,viewport:s}),impact:f,scrollJumpRequest:null};var m=W(p,l);return{clientSelection:c,impact:function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,a=e.maxScrollChange,s=Ue(n,V(n.scroll.current,a)),l=r.frame?ne(r,V(r.frame.scroll.current,a)):r,c=t.displaced,u=Oe({afterDragging:He(c.all,i),destination:r,displacedBy:t.displacedBy,viewport:s.frame,last:c,forceShouldAnimate:!1}),d=Oe({afterDragging:He(c.all,i),destination:l,displacedBy:t.displacedBy,viewport:n.frame,last:c,forceShouldAnimate:!1}),h={},f={},p=[c,u,d];return c.all.forEach((function(e){var t=function(e,t){for(var n=0;n1?u.sort((function(e,t){return We(e)[s.start]-We(t)[s.start]}))[0]:c.sort((function(e,t){var r=J(n,$(We(e))),i=J(n,$(We(t)));return r!==i?r-i:We(e)[s.start]-We(t)[s.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:o,viewport:s});if(!c)return null;var u=de(c.descriptor.id,a),d=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,i=e.draggable,a=e.draggables,o=e.destination,s=e.viewport,l=e.afterCritical;if(!n){if(r.length)return null;var c={displaced:ve,displacedBy:ge,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:0}}},u=Fe({impact:c,draggable:i,droppable:o,draggables:a,afterCritical:l}),d=me(i,o)?o:Je(o,i,a);return ze({draggable:i,destination:d,newPageBorderBoxCenter:u,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?c:null}var h,f=Boolean(t[o.axis.line]<=n.page.borderBox.center[o.axis.line]),p=(h=n.descriptor.index,n.descriptor.id===i.descriptor.id||f?h:h+1),m=Ye(o.axis,i.displaceBy);return Te({draggable:i,insideDestination:r,destination:o,viewport:s,displacedBy:m,last:ve,index:p})}({previousPageBorderBoxCenter:n,destination:c,draggable:r,draggables:a,moveRelativeTo:function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,a=e.afterCritical;return i.filter((function(e){return Ce({target:qe(e,a),destination:r,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(e,n){var i=Q(t,Be(r,Ke(e,a))),o=Q(t,Be(r,Ke(n,a)));return ir.left&&n.topr.top))return!1;if(tt(i)(t.center))return!0;var a=e.axis,o=i.center[a.crossAxisLine],s=t[a.crossAxisStart],l=t[a.crossAxisEnd],c=ye(i[a.crossAxisStart],i[a.crossAxisEnd]),u=c(s),d=c(l);return!u&&!d||(u?so)}));return i.length?1===i.length?i[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,a=r.map((function(e){var n=e.axis,r=Y(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:Q(i,r)}})).sort((function(e,t){return t.distance-e.distance}));return a[0]?a[0].id:null}({pageBorderBox:t,draggable:n,candidates:i}):null}var rt=function(e,t){return f(Z(e,t))};function it(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var at=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,a=e.previousImpact,o=e.viewport,s=e.afterCritical,l=rt(n.page.borderBox,t),c=nt({pageBorderBox:l,draggable:n,droppables:i});if(!c)return be;var u,d,h=i[c],f=de(h.descriptor.id,r),p=(u=l,(d=h.frame)?rt(u,d.scroll.diff.value):u);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,i=e.destination,a=e.insideDestination,o=e.afterCritical;if(!i.isCombineEnabled)return null;var s=i.axis,l=Ye(i.axis,t.displaceBy),c=l.value,u=n[s.start],d=n[s.end],h=ae(pe(t,a),(function(e){var t=e.descriptor.id,n=e.page.borderBox,i=n[s.size]/4,a=Ie(t,o),l=it({displaced:r.displaced,id:t});return a?l?d>n[s.start]+i&&dn[s.start]-c+i&&un[s.start]+c+i&&dn[s.start]+i&&ut.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:ae(pe(n,i),(function(e){var t=e.descriptor.id,n=e.page.borderBox.center[l.line],r=Ie(t,s),i=it({displaced:a,id:t});return r?i?h<=n:d=1500)return zt;var a=Gt+Vt*(i/1500);return Number(("CANCEL"===r?.6*a:a).toFixed(2))}({current:i.current.client.offset,destination:v,reason:a});n(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:v,dropDuration:y,completed:b}))}else n(Dt({completed:b}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:a}))}else e(r)}}},Kt=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function qt(e){var t=e.onWindowScroll;var n,r=C((function(){t(Kt())})),i=(n=r,{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(e){e.target!==window&&e.target!==window.document||n()}}),a=I;function o(){return a!==I}return{start:function(){o()&&R(!1),a=D(window,[i])},stop:function(){o()||R(!1),r.cancel(),a(),a=I},isActive:o}}var Yt=function(e){var t=qt({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},Qt=function(){var e=[];return{add:function(t){var n=setTimeout((function(){return function(t){var n=ie(e,(function(e){return e.timerId===t}));-1===n&&R(!1),e.splice(n,1)[0].callback()}(n)})),r={timerId:n,callback:t};e.push(r)},flush:function(){if(e.length){var t=[].concat(e);e.length=0,t.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}},Jt=function(e,t){ft(),t(),pt()},Xt=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},Zt=function(e,t,n,r){if(e){var i=function(e){var t=!1,n=!1,r=setTimeout((function(){n=!0})),i=function(i){t||n||(t=!0,e(i),clearTimeout(r))};return i.wasCalled=function(){return t},i}(n);e(t,{announce:i}),i.wasCalled()||n(r(t))}else n(r(t))},$t=function(e,t){var n=function(e,t){var n=Qt(),r=null,i=function(n){r||R(!1),r=null,Jt(0,(function(){return Zt(e().onDragEnd,n,t,G)}))};return{beforeCapture:function(t,n){r&&R(!1),Jt(0,(function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})}))},beforeStart:function(t,n){r&&R(!1),Jt(0,(function(){var r=e().onBeforeDragStart;r&&r(Xt(t,n))}))},start:function(i,a){r&&R(!1);var o=Xt(i,a);r={mode:a,lastCritical:i,lastLocation:o.source,lastCombine:null},n.add((function(){Jt(0,(function(){return Zt(e().onDragStart,o,t,U)}))}))},update:function(i,a){var s=he(a),l=fe(a);r||R(!1);var c=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(i,r.lastCritical);c&&(r.lastCritical=i);var u,d,h=(u=r.lastLocation,d=s,!(null==u&&null==d||null!=u&&null!=d&&u.droppableId===d.droppableId&&u.index===d.index));h&&(r.lastLocation=s);var f=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&(e.draggableId===t.draggableId&&e.droppableId===t.droppableId)}(r.lastCombine,l);if(f&&(r.lastCombine=l),c||h||f){var p=Object(o.a)({},Xt(i,r.mode),{combine:l,destination:s});n.add((function(){Jt(0,(function(){return Zt(e().onDragUpdate,p,t,H)}))}))}},flush:function(){r||R(!1),n.flush()},drop:i,abort:function(){if(r){var e=Object(o.a)({},Xt(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var i=r.payload.critical;return n.beforeStart(i,r.payload.movementMode),t(r),void n.start(i,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var a=r.payload.completed.result;return n.flush(),t(r),void n.drop(a)}if(t(r),"FLUSH"!==r.type){var o=e.getState();"DRAGGING"===o.phase&&n.update(o.critical,o.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},en=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&R(!1),e.dispatch(Dt({completed:r.completed}))}else t(n)}}},tn=function(e){var t=null,n=null;return function(r){return function(i){if("FLUSH"!==i.type&&"DROP_COMPLETE"!==i.type&&"DROP_ANIMATION_FINISHED"!==i.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(i),"DROP_ANIMATE"===i.type){var a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((function(){n=null,t=D(window,[a])}))}}}},nn=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(Lt({reason:r.reason})))}}}},rn=s.d,an=function(e){var t,n=e.dimensionMarshal,r=e.focusMarshal,i=e.styleMarshal,a=e.getResponders,o=e.announce,l=e.autoScroller;return Object(s.e)(xt,rn(Object(s.a)((t=i,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),"FLUSH"!==n.type&&"DROP_COMPLETE"!==n.type||t.resting(),e(n)}}}),function(e){return function(){return function(t){return function(n){"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)}}}}(n),function(e){return function(t){var n=t.getState,r=t.dispatch;return function(t){return function(i){if("LIFT"===i.type){var a=i.payload,o=a.id,s=a.clientSelection,l=a.movementMode,c=n();"DROP_ANIMATING"===c.phase&&r(Dt({completed:c.completed})),"IDLE"!==n().phase&&R(!1),r({type:"FLUSH",payload:null}),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:o,movementMode:l}});var u={draggableId:o,scrollOptions:{shouldPublishImmediately:"SNAP"===l}},d=e.startPublishing(u),h=d.critical,f=d.dimensions,p=d.viewport;r(function(e){return{type:"INITIAL_PUBLISH",payload:e}}({critical:h,dimensions:f,clientSelection:s,movementMode:l,viewport:p}))}else t(i)}}}}(n),Wt,en,tn,nn,function(e){return function(t){return function(n){return function(r){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);var i=t.getState();return"DRAGGING"!==i.phase&&R(!1),void e.start(i)}n(r),e.scroll(t.getState())}}}}(l),Yt,function(e){var t=!1;return function(){return function(n){return function(r){if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(r),$t(a,o))))};var on=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,a=W({x:n,y:t},{x:i,y:r});return{x:Math.max(0,a.x),y:Math.max(0,a.y)}},sn=function(){var e=document.documentElement;return e||R(!1),e},ln=function(){var e=sn();return on({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},cn=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry;ft();var i,a,o,s,l,c,u,d=(i=Kt(),a=ln(),o=i.y,s=i.x,l=sn(),c=l.clientWidth,u=l.clientHeight,{frame:f({top:o,left:s,right:s+c,bottom:o+u}),scroll:{initial:i,current:i,max:a,diff:{value:z,displacement:z}}}),h=d.scroll.current,p=t.droppable,m=r.droppable.getAllByType(p.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(h,n)})),g=r.draggable.getAllByType(t.draggable.type).map((function(e){return e.getDimension(h)})),v={draggables:le(g),droppables:se(m)};return pt(),{dimensions:v,critical:t,viewport:d}};function un(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var dn,hn,fn=function(e,t){var n=null,r=function(e){var t=e.registry,n=e.callbacks,r={additions:{},removals:{},modified:{}},i=null,a=function(){i||(n.collectionStarting(),i=requestAnimationFrame((function(){i=null,ft();var e=r,a=e.additions,o=e.removals,s=e.modified,l=Object.keys(a).map((function(e){return t.draggable.getById(e).getDimension(z)})).sort((function(e,t){return e.descriptor.index-t.descriptor.index})),c=Object.keys(s).map((function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}})),u={additions:l,removals:Object.keys(o),modified:c};r={additions:{},removals:{},modified:{}},pt(),n.publish(u)})))};return{add:function(e){var t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],a()},remove:function(e){var t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],a()},stop:function(){i&&(cancelAnimationFrame(i),i=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(t){n||R(!1);var i=n.critical.draggable;"ADDITION"===t.type&&un(e,i,t.value)&&r.add(t.value),"REMOVAL"===t.type&&un(e,i,t.value)&&r.remove(t.value)};return{updateDroppableIsEnabled:function(r,i){e.droppable.exists(r)||R(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:i})},updateDroppableIsCombineEnabled:function(r,i){n&&(e.droppable.exists(r)||R(!1),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:i}))},scrollDroppable:function(t,r){n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:function(r,i){n&&(e.droppable.exists(r)||R(!1),t.updateDroppableScroll({id:r,newScroll:i}))},startPublishing:function(t){n&&R(!1);var r=e.draggable.getById(t.draggableId),a=e.droppable.getById(r.descriptor.droppableId),o={draggable:r.descriptor,droppable:a.descriptor},s=e.subscribe(i);return n={critical:o,unsubscribe:s},cn({critical:o,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){r.stop();var t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((function(e){return e.callbacks.dragStopped()})),n.unsubscribe(),n=null}}}},pn=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason)},mn=function(e){window.scrollBy(e.x,e.y)},gn=S((function(e){return ce(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),vn=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}return function(e,t){return ae(gn(t),(function(t){return t.frame||R(!1),tt(t.frame.pageMarginBox)(e)}))}(t,r)},bn=.25,yn=.05,xn=28,En=function(e){return Math.pow(e,2)},_n={stopDampeningAt:1200,accelerateAt:360},kn=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;return 0===i?0:(r-t)/i},wn=_n.accelerateAt,Sn=_n.stopDampeningAt,Cn=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,i=e.shouldUseTimeDampening,a=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return xn;if(e===t.startScrollingFrom)return 1;var n=kn({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=xn*En(1-n);return Math.ceil(r)}(t,n);return 0===a?0:i?Math.max(function(e,t){var n=t,r=Sn,i=Date.now()-n;if(i>=Sn)return e;if(it.height,a=n.width>t.width;return a||i?a&&i?null:{x:a?0:r.x,y:i?0:r.y}:r}({container:n,subject:r,proposedScroll:c});return u?K(u,z)?null:u:null},In=X((function(e){return 0===e?0:e>0?1:-1})),Dn=(dn=function(e,t){return e<0?e:e>t?e-t:0},function(e){var t=e.current,n=e.max,r=e.change,i=V(t,r),a={x:dn(i.x,n.x),y:dn(i.y,n.y)};return K(a,z)?null:a}),Ln=function(e){var t=e.max,n=e.current,r=e.change,i={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},a=In(r),o=Dn({max:i,current:n,change:a});return!o||(0!==a.x&&0===o.x||0!==a.y&&0===o.y)},Rn=function(e,t){return Ln({current:e.scroll.current,max:e.scroll.max,change:t})},Nn=function(e,t){var n=e.frame;return!!n&&Ln({current:n.scroll.current,max:n.scroll.max,change:t})},jn=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,a=e.scrollDroppable,o=t.current.page.borderBoxCenter,s=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var l=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,a=e.shouldUseTimeDampening,o=Tn({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:a});return o&&Rn(t,o)?o:null}({dragStartTime:n,viewport:t.viewport,subject:s,center:o,shouldUseTimeDampening:r});if(l)return void i(l)}var c=vn({center:o,destination:Ze(t.impact),droppables:t.dimensions.droppables});if(c){var u=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,a=e.shouldUseTimeDampening,o=t.frame;if(!o)return null;var s=Tn({dragStartTime:i,container:o.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:a});return s&&Nn(t,s)?s:null}({dragStartTime:n,droppable:c,subject:s,center:o,shouldUseTimeDampening:r});u&&a(c.descriptor.id,u)}},Mn=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(e,t){if(!Nn(e,t))return t;var r=function(e,t){var n=e.frame;return n&&Nn(e,t)?Dn({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var i=W(t,r);return n(e.descriptor.id,i),W(t,i)},a=function(e,t,n){if(!e)return n;if(!Rn(t,n))return n;var i=function(e,t){if(!Rn(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return Dn({current:r,max:n,change:t})}(t,n);if(!i)return r(n),null;var a=W(n,i);return r(a),W(n,a)};return function(e){var n=e.scrollJumpRequest;if(n){var r=Ze(e.impact);r||R(!1);var o=i(e.dimensions.droppables[r],n);if(o){var s=e.viewport,l=a(e.isWindowScrollAllowed,s,o);l&&function(e,n){var r=V(e.current.client.selection,n);t({client:r})}(e,l)}}}},Pn=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=C(t),i=C(n),a=null,o=function(e){a||R(!1);var t=a,n=t.shouldUseTimeDampening,o=t.dragStartTime;jn({state:e,scrollWindow:r,scrollDroppable:i,dragStartTime:o,shouldUseTimeDampening:n})};return{start:function(e){ft(),a&&R(!1);var t=Date.now(),n=!1,r=function(){n=!0};jn({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),a={dragStartTime:t,shouldUseTimeDampening:n},pt(),n&&o(e)},stop:function(){a&&(r.cancel(),i.cancel(),a=null)},scroll:o}}({scrollWindow:n,scrollDroppable:t}),a=Mn({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&a(e):i.scroll(e))},start:i.start,stop:i.stop}},Bn={base:hn="data-rbd-drag-handle",draggableId:hn+"-draggable-id",contextId:hn+"-context-id"},Fn=function(){var e="data-rbd-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Un=function(){var e="data-rbd-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Hn={contextId:"data-rbd-scroll-container-context-id"},Gn=function(e,t){return e.map((function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""})).join(" ")},zn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,Vn=function(){var e=document.querySelector("head");return e||R(!1),e},Wn=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Kn(e,t){var n=u((function(){return function(e){var t,n,r,i=(t=e,function(e){return"["+e+'="'+t+'"]'}),a=(n="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:i(Bn.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:n,dragging:"pointer-events: none;",dropAnimating:n}}),o=[(r="\n transition: "+Bt.outOfTheWay+";\n ",{selector:i(Fn.contextId),styles:{dragging:r,dropAnimating:r,userCancel:r}}),a,{selector:i(Un.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:Gn(o,"always"),resting:Gn(o,"resting"),dragging:Gn(o,"dragging"),dropAnimating:Gn(o,"dropAnimating"),userCancel:Gn(o,"userCancel")}}(e)}),[e]),i=Object(r.useRef)(null),a=Object(r.useRef)(null),o=d(S((function(e){var t=a.current;t||R(!1),t.textContent=e})),[]),s=d((function(e){var t=i.current;t||R(!1),t.textContent=e}),[]);zn((function(){(i.current||a.current)&&R(!1);var r=Wn(t),l=Wn(t);return i.current=r,a.current=l,r.setAttribute("data-rbd-always",e),l.setAttribute("data-rbd-dynamic",e),Vn().appendChild(r),Vn().appendChild(l),s(n.always),o(n.resting),function(){var e=function(e){var t=e.current;t||R(!1),Vn().removeChild(t),e.current=null};e(i),e(a)}}),[t,s,o,n.always,n.resting,e]);var l=d((function(){return o(n.dragging)}),[o,n.dragging]),c=d((function(e){o("DROP"!==e?n.userCancel:n.dropAnimating)}),[o,n.dropAnimating,n.userCancel]),h=d((function(){a.current&&o(n.resting)}),[o,n.resting]);return u((function(){return{dragging:l,dropping:c,resting:h}}),[l,c,h])}var qn=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Yn(e){return e instanceof qn(e).HTMLElement}function Qn(e,t){var n="["+Bn.contextId+'="'+e+'"]',r=oe(document.querySelectorAll(n));if(!r.length)return null;var i=ae(r,(function(e){return e.getAttribute(Bn.draggableId)===t}));return i&&Yn(i)?i:null}function Jn(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((function(t){return t(e)}))}function r(t){return e.draggables[t]||null}function i(t){return e.droppables[t]||null}return{draggable:{register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var i=t.descriptor.id,a=r(i);a&&t.uniqueId===a.uniqueId&&(delete e.draggables[i],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||R(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return re(e.draggables).filter((function(e){return e.descriptor.type===t}))}},droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=i(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=i(e);return t||R(!1),t},findById:i,exists:function(e){return Boolean(i(e))},getAllByType:function(t){return re(e.droppables).filter((function(e){return e.descriptor.type===t}))}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Xn=i.a.createContext(null),Zn=function(){var e=document.body;return e||R(!1),e},$n={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var er=0,tr={separator:"::"};function nr(e,t){return void 0===t&&(t=tr),u((function(){return""+e+t.separator+er++}),[t.separator,e])}var rr=i.a.createContext(null);function ir(e){0}function ar(e,t){ir()}function or(){ar()}function sr(e){var t=Object(r.useRef)(e);return Object(r.useEffect)((function(){t.current=e})),t}var lr,cr=((lr={})[13]=!0,lr[9]=!0,lr),ur=function(e){cr[e.keyCode]&&e.preventDefault()},dr=function(){var e="visibilitychange";return"undefined"==typeof document?e:ae([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}();var hr,fr={type:"IDLE"};function pr(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,a=e.clientY;if(0===t){var o={x:n,y:a},s=r();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(o);"PENDING"!==s.type&&R(!1);var l=s.point;if(c=l,u=o,Math.abs(u.x-c.x)>=5||Math.abs(u.y-c.y)>=5){var c,u;e.preventDefault();var d=s.actions.fluidLift(o);i({type:"DRAGGING",actions:d})}}}},{eventName:"mouseup",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return 27===e.keyCode?(e.preventDefault(),void t()):void ur(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&R(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:dr,fn:t}]}function mr(){}var gr=((hr={})[34]=!0,hr[33]=!0,hr[36]=!0,hr[35]=!0,hr);function vr(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return 27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(gr[r.keyCode]?r.preventDefault():ur(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:dr,fn:n}]}var br={type:"IDLE"};var yr={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function xr(e,t){var n=t.target;return!!Yn(n)&&function e(t,n){if(null==n)return!1;if(Boolean(yr[n.tagName.toLowerCase()]))return!0;var r=n.getAttribute("contenteditable");return"true"===r||""===r||n!==t&&e(t,n.parentElement)}(e,n)}var Er=function(e){return f(e.getBoundingClientRect()).center};var _r="undefined"==typeof document?"matches":ae(["matches","msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||"matches";function kr(e,t){return e.closest?e.closest(t):function e(t,n){return null==t?null:t[_r](n)?t:e(t.parentElement,n)}(e,t)}function wr(e,t){var n,r=t.target;if(!((n=r)instanceof qn(n).Element))return null;var i=kr(r,function(e){return"["+Bn.contextId+'="'+e+'"]'}(e));return i&&Yn(i)?i:null}function Sr(e){e.preventDefault()}function Cr(e){var t=e.expected,n=e.phase,r=e.isLockActive;e.shouldWarn;return!!r()&&t===n}function Or(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var a=r.draggable.findById(i);return!!a&&(!!a.options.isEnabled&&!!pn(n.getState(),i))}function Ar(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,a=e.draggableId,s=e.forceSensorStop,l=e.sourceEvent;if(!Or({lockAPI:t,store:r,registry:i,draggableId:a}))return null;var c=i.draggable.getById(a),u=function(e,t){var n="["+Fn.contextId+'="'+e+'"]',r=ae(oe(document.querySelectorAll(n)),(function(e){return e.getAttribute(Fn.id)===t}));return r&&Yn(r)?r:null}(n,c.descriptor.id);if(!u)return null;if(l&&!c.options.canDragInteractiveElements&&xr(u,l))return null;var d=t.claim(s||I),h="PRE_DRAG";function f(){return c.options.shouldRespectForcePress}function p(){return t.isActive(d)}var m=function(e,t){Cr({expected:e,phase:h,isLockActive:p,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function g(e){function n(){t.release(),h="COMPLETED"}function i(t,i){if(void 0===i&&(i={shouldBlockNextClick:!1}),e.cleanup(),i.shouldBlockNextClick){var a=D(window,[{eventName:"click",fn:Sr,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(a)}n(),r.dispatch(Lt({reason:t}))}return"PRE_DRAG"!==h&&(n(),"PRE_DRAG"!==h&&R(!1)),r.dispatch(function(e){return{type:"LIFT",payload:e}}(e.liftActionArgs)),h="DRAGGING",Object(o.a)({isActive:function(){return Cr({expected:"DRAGGING",phase:h,isLockActive:p,shouldWarn:!1})},shouldRespectForcePress:f,drop:function(e){return i("DROP",e)},cancel:function(e){return i("CANCEL",e)}},e.actions)}return{isActive:function(){return Cr({expected:"PRE_DRAG",phase:h,isLockActive:p,shouldWarn:!1})},shouldRespectForcePress:f,fluidLift:function(e){var t=C((function(e){m((function(){return Ct({client:e})}))})),n=g({liftActionArgs:{id:a,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}});return Object(o.a)({},n,{move:t})},snapLift:function(){var e={moveUp:function(){return m(Ot)},moveRight:function(){return m(Tt)},moveDown:function(){return m(At)},moveLeft:function(){return m(It)}};return g({liftActionArgs:{id:a,clientSelection:Er(u),movementMode:"SNAP"},cleanup:I,actions:e})},abort:function(){Cr({expected:"PRE_DRAG",phase:h,isLockActive:p,shouldWarn:!0})&&t.release()}}}var Tr=[function(e){var t=Object(r.useRef)(fr),n=Object(r.useRef)(I),i=u((function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&0===t.button&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var r=e.findClosestDraggableId(t);if(r){var i=e.tryGetLock(r,s,{sourceEvent:t});if(i){t.preventDefault();var a={x:t.clientX,y:t.clientY};n.current(),h(i,a)}}}}}}),[e]),a=u((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}}),[e]),o=d((function(){n.current=D(window,[a,i],{passive:!1,capture:!0})}),[a,i]),s=d((function(){"IDLE"!==t.current.type&&(t.current=fr,n.current(),o())}),[o]),l=d((function(){var e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[s]),c=d((function(){var e=pr({cancel:l,completed:s,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=D(window,e,{capture:!0,passive:!1})}),[l,s]),h=d((function(e,n){"IDLE"!==t.current.type&&R(!1),t.current={type:"PENDING",point:n,actions:e},c()}),[c]);zn((function(){return o(),function(){n.current()}}),[o])},function(e){var t=Object(r.useRef)(mr),n=u((function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&32===n.keyCode){var r=e.findClosestDraggableId(n);if(r){var a=e.tryGetLock(r,l,{sourceEvent:n});if(a){n.preventDefault();var o=!0,s=a.snapLift();t.current(),t.current=D(window,vr(s,l),{capture:!0,passive:!1})}}}function l(){o||R(!1),o=!1,t.current(),i()}}}}),[e]),i=d((function(){t.current=D(window,[n],{passive:!1,capture:!0})}),[n]);zn((function(){return i(),function(){t.current()}}),[i])},function(e){var t=Object(r.useRef)(br),n=Object(r.useRef)(I),i=d((function(){return t.current}),[]),a=d((function(e){t.current=e}),[]),o=u((function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var r=e.findClosestDraggableId(t);if(r){var i=e.tryGetLock(r,l,{sourceEvent:t});if(i){var a=t.touches[0],o={x:a.clientX,y:a.clientY};n.current(),p(i,o)}}}}}}),[e]),s=d((function(){n.current=D(window,[o],{capture:!0,passive:!1})}),[o]),l=d((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),a(br),n.current(),s())}),[s,a]),c=d((function(){var e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[l]),h=d((function(){var e={capture:!0,passive:!1},t={cancel:c,completed:l,getPhase:i},r=D(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var i=e.touches[0],a={x:i.clientX,y:i.clientY};e.preventDefault(),n.actions.move(a)}else t()}},{eventName:"touchend",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&R(!1);var i=e.touches[0];if(i&&i.force>=.15){var a=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return a?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();a&&t()}}},{eventName:dr,fn:t}]}(t),e),a=D(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:dr,fn:t}]}(t),e);n.current=function(){r(),a()}}),[c,i,l]),f=d((function(){var e=i();"PENDING"!==e.type&&R(!1);var t=e.actions.fluidLift(e.point);a({type:"DRAGGING",actions:t,hasMoved:!1})}),[i,a]),p=d((function(e,t){"IDLE"!==i().type&&R(!1);var n=setTimeout(f,120);a({type:"PENDING",point:t,actions:e,longPressTimerId:n}),h()}),[h,i,a,f]);zn((function(){return s(),function(){n.current();var e=i();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),a(br))}}),[i,s,a]),zn((function(){return D(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}];function Ir(e){var t=e.contextId,n=e.store,i=e.registry,a=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?Tr:[],a||[]),l=Object(r.useState)((function(){return function(){var e=null;function t(){e||R(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&R(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],c=d((function(e,t){e.isDragging&&!t.isDragging&&l.tryAbandon()}),[l]);zn((function(){var e=n.getState();return n.subscribe((function(){var t=n.getState();c(e,t),e=t}))}),[l,n,c]),zn((function(){return l.tryAbandon}),[l.tryAbandon]);var h=d((function(e){return Or({lockAPI:l,registry:i,store:n,draggableId:e})}),[l,i,n]),f=d((function(e,r,a){return Ar({lockAPI:l,registry:i,contextId:t,store:n,draggableId:e,forceSensorStop:r,sourceEvent:a&&a.sourceEvent?a.sourceEvent:null})}),[t,l,i,n]),p=d((function(e){return function(e,t){var n=wr(e,t);return n?n.getAttribute(Bn.draggableId):null}(t,e)}),[t]),m=d((function(e){var t=i.draggable.findById(e);return t?t.options:null}),[i.draggable]),g=d((function(){l.isClaimed()&&(l.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))}),[l,n]),v=d(l.isClaimed,[l]),b=u((function(){return{canGetLock:h,tryGetLock:f,findClosestDraggableId:p,findOptionsForDraggable:m,tryReleaseLock:g,isLockClaimed:v}}),[h,f,p,m,g,v]);ir();for(var y=0;y2&&void 0!==arguments[2]?arguments[2]:"0",r=String(e);r.length=12,T%=12);var P=u.useMemo((function(){if(!f)return[!1,!1];var e=[!0,!0];return M.forEach((function(t){var n=t.disabled,r=t.value;n||(r>=12?e[1]=!1:e[0]=!1)})),e}),[f,M]),H=Object(c.a)(P,2),G=H[0],z=H[1],V=u.useMemo((function(){return f?M.filter(t?function(e){return e.value>=12}:function(e){return e.value<12}).map((function(e){var t=e.value%12,n=0===t?"12":R(t,2);return Object(l.a)(Object(l.a)({},e),{},{label:n,value:t})})):M}),[f,M]),W=U(0,59,v,_&&_(T)),K=U(0,59,y,k&&k(T,I));function q(e,t,n,r,i){!1!==e&&C.push({node:u.cloneElement(t,{prefixCls:A,value:n,active:a===C.length,onSelect:i,units:r,hideDisabledOptions:w}),onSelect:i,value:n,units:r})}i.current={onUpDown:function(e){var t=C[a];if(t)for(var n=t.units.findIndex((function(e){return e.value===t.value})),r=t.units.length,i=1;i3&&void 0!==arguments[3]?arguments[3]:1;switch(t){case"year":return n.addYear(e,10*r);case"quarter":case"month":return n.addYear(e,r);default:return n.addMonth(e,r)}}var $=u.createContext({});function ee(e){var t=e.cellPrefixCls,n=e.generateConfig,r=e.rangedValue,i=e.hoverRangedValue,a=e.isInView,o=e.isSameCell,l=e.offsetCell,c=e.today,u=e.value;return function(e){var d,h=l(e,-1),f=l(e,1),p=M(r,0),m=M(r,1),g=M(i,0),v=M(i,1),b=X(n,g,v,e);function y(e){return o(p,e)}function x(e){return o(m,e)}var E=o(g,e),_=o(v,e),k=(b||_)&&(!a(h)||x(h)),w=(b||E)&&(!a(f)||y(f));return d={},Object(s.a)(d,"".concat(t,"-in-view"),a(e)),Object(s.a)(d,"".concat(t,"-in-range"),X(n,p,m,e)),Object(s.a)(d,"".concat(t,"-range-start"),y(e)),Object(s.a)(d,"".concat(t,"-range-end"),x(e)),Object(s.a)(d,"".concat(t,"-range-start-single"),y(e)&&!m),Object(s.a)(d,"".concat(t,"-range-end-single"),x(e)&&!p),Object(s.a)(d,"".concat(t,"-range-start-near-hover"),y(e)&&(o(h,g)||X(n,g,v,h))),Object(s.a)(d,"".concat(t,"-range-end-near-hover"),x(e)&&(o(f,v)||X(n,g,v,f))),Object(s.a)(d,"".concat(t,"-range-hover"),b),Object(s.a)(d,"".concat(t,"-range-hover-start"),E),Object(s.a)(d,"".concat(t,"-range-hover-end"),_),Object(s.a)(d,"".concat(t,"-range-hover-edge-start"),k),Object(s.a)(d,"".concat(t,"-range-hover-edge-end"),w),Object(s.a)(d,"".concat(t,"-range-hover-edge-start-near-range"),k&&o(h,m)),Object(s.a)(d,"".concat(t,"-range-hover-edge-end-near-range"),w&&o(f,p)),Object(s.a)(d,"".concat(t,"-today"),o(c,e)),Object(s.a)(d,"".concat(t,"-selected"),o(u,e)),d}}function te(e){for(var t=e.prefixCls,n=e.disabledDate,r=e.onSelect,i=e.rowNum,a=e.colNum,o=e.prefixColumn,c=e.rowClassName,d=e.baseDate,f=e.getCellClassName,p=e.getCellText,m=e.getCellNode,g=e.getCellDate,b=e.titleCell,y=e.headerCells,x=u.useContext(v),E=x.onDateMouseEnter,_=x.onDateMouseLeave,k="".concat(t,"-cell"),w=[],S=0;S1&&(o=t.addDate(o,-7)),o}(i.locale,n,o),p="".concat(t,"-cell"),m=n.locale.getWeekFirstDay(i.locale),g=n.getNow(),v=[],b=i.shortWeekDays||(n.locale.getShortWeekDays?n.locale.getShortWeekDays(i.locale):[]);r&&v.push(u.createElement("th",{key:"empty","aria-label":"empty cell"}));for(var y=0;y<7;y+=1)v.push(u.createElement("th",{key:y},b[(y+m)%7]));var x=ee({cellPrefixCls:p,today:g,value:s,generateConfig:n,rangedValue:r?null:d,hoverRangedValue:r?null:h,isSameCell:function(e,t){return Y(n,e,t)},isInView:function(e){return q(n,e,o)},offsetCell:function(e,t){return n.addDate(e,t)}}),E=l?function(e){return l(e,g)}:void 0;return u.createElement(te,Object.assign({},e,{rowNum:a,colNum:7,baseDate:f,getCellNode:E,getCellText:n.getDate,getCellClassName:x,getCellDate:n.addDate,titleCell:function(e){return n.locale.format(i.locale,e,"YYYY-MM-DD")},headerCells:v}))};var re=function(e){var t=e.prefixCls,n=e.generateConfig,r=e.locale,i=e.viewDate,a=e.onNextMonth,o=e.onPrevMonth,s=e.onNextYear,l=e.onPrevYear,c=e.onYearClick,d=e.onMonthClick;if(u.useContext(v).hideHeader)return null;var h="".concat(t,"-header"),f=r.shortMonths||(n.locale.getShortMonths?n.locale.getShortMonths(r.locale):[]),p=n.getMonth(i),m=u.createElement("button",{type:"button",key:"year",onClick:c,tabIndex:-1,className:"".concat(t,"-year-btn")},n.locale.format(r.locale,i,r.yearFormat)),g=u.createElement("button",{type:"button",key:"month",onClick:d,tabIndex:-1,className:"".concat(t,"-month-btn")},r.monthFormat?n.locale.format(r.locale,i,r.monthFormat):f[p]),b=r.monthBeforeYear?[g,m]:[m,g];return u.createElement(y,Object.assign({},e,{prefixCls:h,onSuperPrev:l,onPrev:o,onNext:a,onSuperNext:s}),b)};var ie=function(e){var t=e.prefixCls,n=e.panelName,r=void 0===n?"date":n,i=e.keyboardConfig,a=e.active,o=e.operationRef,c=e.generateConfig,d=e.value,f=e.viewDate,p=e.onViewDateChange,m=e.onPanelChange,g=e.onSelect,v="".concat(t,"-").concat(r,"-panel");o.current={onKeyDown:function(e){return S(e,Object(l.a)({onLeftRight:function(e){g(c.addDate(d||f,e),"key")},onCtrlLeftRight:function(e){g(c.addYear(d||f,e),"key")},onUpDown:function(e){g(c.addDate(d||f,7*e),"key")},onPageUpDown:function(e){g(c.addMonth(d||f,e),"key")}},i))}};var b=function(e){var t=c.addYear(f,e);p(t),m(null,t)},y=function(e){var t=c.addMonth(f,e);p(t),m(null,t)};return u.createElement("div",{className:h()(v,Object(s.a)({},"".concat(v,"-active"),a))},u.createElement(re,Object.assign({},e,{prefixCls:t,value:d,viewDate:f,onPrevYear:function(){b(-1)},onNextYear:function(){b(1)},onPrevMonth:function(){y(-1)},onNextMonth:function(){y(1)},onMonthClick:function(){m("month",f)},onYearClick:function(){m("year",f)}})),u.createElement(ne,Object.assign({},e,{onSelect:function(e){return g(e,"mouse")},prefixCls:t,value:d,viewDate:f,rowCount:6})))};var ae=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]&&arguments[2];(Me===S||n)&&(Oe(e),N&&N(e),le&&le(e,t),j&&!J(d,e,Ce)&&j(e))},Ve=function(e){return ye.current&&ye.current.onKeyDown?([g.a.LEFT,g.a.RIGHT,g.a.UP,g.a.DOWN,g.a.PAGE_UP,g.a.PAGE_DOWN,g.a.ENTER].includes(e.which)&&e.preventDefault(),ye.current.onKeyDown(e)):(Object(f.a)(!1,"Panel not correct handle keyDown event. Please help to fire issue about this."),!1)};re&&"right"!==me&&(re.current={onKeyDown:Ve,onClose:function(){ye.current&&ye.current.onClose&&ye.current.onClose()}}),u.useEffect((function(){b&&!xe.current&&De(b)}),[b]),u.useEffect((function(){xe.current=!1}),[]);var We,Ke,qe,Ye=Object(l.a)(Object(l.a)({},e),{},{operationRef:ye,prefixCls:r,viewDate:Ie,value:Ce,onViewDateChange:Le,sourceMode:He,onPanelChange:function(e,t){var n=Re(e||Me);Ge(Me),Pe(n),M&&(Me!==n||J(d,Ie,Ie))&&M(t,n)},disabledDate:"decade"!==Me?_:void 0});switch(delete Ye.onChange,delete Ye.onSelect,Me){case"decade":Be=u.createElement(_e,Object.assign({},Ye,{onSelect:function(e,t){Le(e),ze(e,t)}}));break;case"year":Be=u.createElement(ve,Object.assign({},Ye,{onSelect:function(e,t){Le(e),ze(e,t)}}));break;case"month":Be=u.createElement(ue,Object.assign({},Ye,{onSelect:function(e,t){Le(e),ze(e,t)}}));break;case"quarter":Be=u.createElement(fe,Object.assign({},Ye,{onSelect:function(e,t){Le(e),ze(e,t)}}));break;case"week":Be=u.createElement(se,Object.assign({},Ye,{onSelect:function(e,t){Le(e),ze(e,t)}}));break;case"time":delete Ye.showTime,Be=u.createElement(G,Object.assign({},Ye,"object"===Object(m.a)(T)?T:null,{onSelect:function(e,t){Le(e),ze(e,t)}}));break;default:Be=T?u.createElement(oe,Object.assign({},Ye,{onSelect:function(e,t){Le(e),ze(e,t)}})):u.createElement(ie,Object.assign({},Ye,{onSelect:function(e,t){Le(e),ze(e,t)}}))}if(ce||(We=ke(r,Me,L),Ke=we({prefixCls:r,components:H,needConfirmButton:X,okDisabled:!Ce||_&&_(Ce),locale:o,showNow:A,onNow:X&&function(){var e=d.getNow(),t=function(e,t,n,r,i,a){var o=Math.floor(e/r)*r;if(o1&&void 0!==arguments[1]&&arguments[1];cancelAnimationFrame(d.current),t?l(e):d.current=requestAnimationFrame((function(){l(e)}))}var f=Re(s,{formatList:n,generateConfig:r,locale:i}),p=Object(c.a)(f,2)[1];function m(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];h(null,e)}return Object(u.useEffect)((function(){m(!0)}),[e]),Object(u.useEffect)((function(){return function(){return cancelAnimationFrame(d.current)}}),[]),[p,function(e){h(e)},m]}function je(e){var t,n=e.prefixCls,r=void 0===n?"rc-picker":n,i=e.id,a=e.tabIndex,o=e.style,d=e.className,m=e.dropdownClassName,g=e.dropdownAlign,b=e.popupStyle,y=e.transitionName,x=e.generateConfig,E=e.locale,_=e.inputReadOnly,k=e.allowClear,w=e.autoFocus,S=e.showTime,A=e.picker,T=void 0===A?"date":A,I=e.format,L=e.use12Hours,R=e.value,M=e.defaultValue,P=e.open,B=e.defaultOpen,F=e.defaultOpenValue,U=e.suffixIcon,H=e.clearIcon,G=e.disabled,z=e.disabledDate,V=e.placeholder,W=e.getPopupContainer,K=e.pickerRef,q=e.panelRender,Y=e.onChange,Q=e.onOpenChange,X=e.onFocus,Z=e.onBlur,$=e.onMouseDown,ee=e.onMouseUp,te=e.onMouseEnter,ne=e.onMouseLeave,re=e.onContextMenu,ie=e.onClick,ae=e.direction,oe=e.autoComplete,se=void 0===oe?"off":oe,le=u.useRef(null),ce="date"===T&&!!S||"time"===T,ue=N(C(I,T,S,L)),de=u.useRef(null),he=u.useRef(null),fe=Object(p.a)(null,{value:R,defaultValue:M}),pe=Object(c.a)(fe,2),me=pe[0],ge=pe[1],ve=u.useState(me),be=Object(c.a)(ve,2),ye=be[0],xe=be[1],Ee=u.useRef(null),_e=Object(p.a)(!1,{value:P,defaultValue:B,postState:function(e){return!G&&e},onChange:function(e){Q&&Q(e),!e&&Ee.current&&Ee.current.onClose&&Ee.current.onClose()}}),ke=Object(c.a)(_e,2),we=ke[0],Ce=ke[1],Oe=Re(ye,{formatList:ue,generateConfig:x,locale:E}),De=Object(c.a)(Oe,2),Le=De[0],je=De[1],Me=Ie({valueTexts:Le,onTextChange:function(e){var t=x.locale.parse(E.locale,e,ue);!t||z&&z(t)||xe(t)}}),Pe=Object(c.a)(Me,3),Be=Pe[0],Fe=Pe[1],Ue=Pe[2],He=function(e){xe(e),ge(e),Y&&!J(x,me,e)&&Y(e,e?x.locale.format(E.locale,e,ue[0]):"")},Ge=function(e){G&&e||Ce(e)},ze=Te({blurToCancel:ce,open:we,value:Be,triggerOpen:Ge,forwardKeyDown:function(e){return we&&Ee.current&&Ee.current.onKeyDown?Ee.current.onKeyDown(e):(Object(f.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},isClickOutside:function(e){return!D([de.current,he.current],e)},onSubmit:function(){return(!z||!z(ye))&&(He(ye),Ge(!1),Ue(),!0)},onCancel:function(){Ge(!1),xe(me),Ue()},onFocus:X,onBlur:Z}),Ve=Object(c.a)(ze,2),We=Ve[0],Ke=Ve[1],qe=Ke.focused,Ye=Ke.typing;u.useEffect((function(){we||(xe(me),Le.length&&""!==Le[0]?je!==Be&&Ue():Fe(""))}),[we,Le]),u.useEffect((function(){we||Ue()}),[T]),u.useEffect((function(){xe(me)}),[me]),K&&(K.current={focus:function(){le.current&&le.current.focus()},blur:function(){le.current&&le.current.blur()}});var Qe=Object(l.a)(Object(l.a)({},e),{},{className:void 0,style:void 0,pickerValue:void 0,onPickerValueChange:void 0}),Je=u.createElement(Se,Object.assign({},Qe,{generateConfig:x,className:h()(Object(s.a)({},"".concat(r,"-panel-focused"),!Ye)),value:ye,locale:E,tabIndex:-1,onChange:xe,direction:ae}));q&&(Je=q(Je));var Xe,Ze,$e=u.createElement("div",{className:"".concat(r,"-panel-container"),onMouseDown:function(e){e.preventDefault()}},Je);U&&(Xe=u.createElement("span",{className:"".concat(r,"-suffix")},U)),k&&me&&!G&&(Ze=u.createElement("span",{onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},onMouseUp:function(e){e.preventDefault(),e.stopPropagation(),He(null),Ge(!1)},className:"".concat(r,"-clear")},H||u.createElement("span",{className:"".concat(r,"-clear-btn")})));var et="rtl"===ae?"bottomRight":"bottomLeft",tt=Ne(Be,{formatList:ue,generateConfig:x,locale:E}),nt=Object(c.a)(tt,3),rt=nt[0],it=nt[1],at=nt[2];return u.createElement(v.Provider,{value:{operationRef:Ee,hideHeader:"time"===T,panelRef:de,onSelect:function(e,t){("submit"===t||"key"!==t&&!ce)&&(He(e),Ge(!1))},open:we,defaultOpenValue:F,onDateMouseEnter:it,onDateMouseLeave:at}},u.createElement(Ae,{visible:we,popupElement:$e,popupStyle:b,prefixCls:r,dropdownClassName:m,dropdownAlign:g,getPopupContainer:W,transitionName:y,popupPlacement:et,direction:ae},u.createElement("div",{className:h()(r,d,(t={},Object(s.a)(t,"".concat(r,"-disabled"),G),Object(s.a)(t,"".concat(r,"-focused"),qe),Object(s.a)(t,"".concat(r,"-rtl"),"rtl"===ae),t)),style:o,onMouseDown:$,onMouseUp:function(){ee&&ee.apply(void 0,arguments),le.current&&(le.current.focus(),Ge(!0))},onMouseEnter:te,onMouseLeave:ne,onContextMenu:re,onClick:ie},u.createElement("div",{className:h()("".concat(r,"-input"),Object(s.a)({},"".concat(r,"-input-placeholder"),!!rt)),ref:he},u.createElement("input",Object.assign({id:i,tabIndex:a,disabled:G,readOnly:_||!Ye,value:rt||Be,onChange:function(e){Fe(e.target.value)},autoFocus:w,placeholder:V,ref:le,title:Be},We,{size:O(T,ue[0])},j(e),{autoComplete:se})),Xe,Ze))))}var Me=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).pickerRef=u.createRef(),e.focus=function(){e.pickerRef.current&&e.pickerRef.current.focus()},e.blur=function(){e.pickerRef.current&&e.pickerRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return u.createElement(je,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),n}(u.Component);function Pe(e,t,n,r){var i=Z(e,n,r,1);function a(n){return n(e,t)?"same":n(i,t)?"closing":"far"}switch(n){case"year":return a((function(e,t){return function(e,t,n){var r=z(t,n);return"boolean"==typeof r?r:Math.floor(e.getYear(t)/10)===Math.floor(e.getYear(n)/10)}(r,e,t)}));case"quarter":case"month":return a((function(e,t){return V(r,e,t)}));default:return a((function(e,t){return q(r,e,t)}))}}function Be(e){var t=e.values,n=e.picker,r=e.defaultDates,i=e.generateConfig,a=u.useState((function(){return[M(r,0),M(r,1)]})),o=Object(c.a)(a,2),s=o[0],l=o[1],d=u.useState(null),h=Object(c.a)(d,2),f=h[0],p=h[1],m=M(t,0),g=M(t,1);return[function(e){return s[e]?s[e]:M(f,e)||function(e,t,n,r){var i=M(e,0),a=M(e,1);if(0===t)return i;if(i&&a)switch(Pe(i,a,n,r)){case"same":case"closing":return i;default:return Z(a,n,r,-1)}return i}(t,e,n,i)||m||g||i.getNow()},function(e,n){if(e){var r=P(f,e,n);l(P(s,null,n)||[null,null]);var i=(n+1)%2;M(t,i)||(r=P(r,e,i)),p(r)}else(m||g)&&p(null)}]}function Fe(e,t){return e&&e[0]&&e[1]&&t.isAfter(e[0],e[1])?[e[1],e[0]]:e}function Ue(e,t,n,r){return!!e||(!(!r||!r[t])||!!n[(t+1)%2])}function He(e){var t,n,r,i=e.prefixCls,a=void 0===i?"rc-picker":i,o=e.id,d=e.style,g=e.className,b=e.popupStyle,y=e.dropdownClassName,x=e.transitionName,E=e.dropdownAlign,_=e.getPopupContainer,k=e.generateConfig,w=e.locale,S=e.placeholder,A=e.autoFocus,T=e.disabled,I=e.format,L=e.picker,R=void 0===L?"date":L,B=e.showTime,F=e.use12Hours,U=e.separator,H=void 0===U?"~":U,G=e.value,z=e.defaultValue,V=e.defaultPickerValue,q=e.open,X=e.defaultOpen,ee=e.disabledDate,te=e.disabledTime,ne=e.dateRender,re=e.panelRender,ie=e.ranges,ae=e.allowEmpty,oe=e.allowClear,se=e.suffixIcon,le=e.clearIcon,ce=e.pickerRef,ue=e.inputReadOnly,de=e.mode,he=e.renderExtraFooter,fe=e.onChange,pe=e.onOpenChange,me=e.onPanelChange,ge=e.onCalendarChange,ve=e.onFocus,be=e.onBlur,ye=e.onOk,xe=e.components,Ee=e.order,_e=e.direction,Ce=e.activePickerIndex,Oe=e.autoComplete,De=void 0===Oe?"off":Oe,Le="date"===R&&!!B||"time"===R,je=Object(u.useRef)({}),Me=Object(u.useRef)(null),Pe=Object(u.useRef)(null),He=Object(u.useRef)(null),Ge=Object(u.useRef)(null),ze=Object(u.useRef)(null),Ve=Object(u.useRef)(null),We=Object(u.useRef)(null),Ke=N(C(I,R,B,F)),qe=Object(p.a)(0,{value:Ce}),Ye=Object(c.a)(qe,2),Qe=Ye[0],Je=Ye[1],Xe=Object(u.useRef)(null),Ze=u.useMemo((function(){return Array.isArray(T)?T:[T||!1,T||!1]}),[T]),$e=Object(p.a)(null,{value:G,defaultValue:z,postState:function(e){return"time"!==R||Ee?Fe(e,k):e}}),et=Object(c.a)($e,2),tt=et[0],nt=et[1],rt=Be({values:tt,picker:R,defaultDates:V,generateConfig:k}),it=Object(c.a)(rt,2),at=it[0],ot=it[1],st=Object(p.a)(tt,{postState:function(e){var t=e;if(Ze[0]&&Ze[1])return t;for(var n=0;n<2;n+=1)!Ze[n]||M(t,n)||M(ae,n)||(t=P(t,k.getNow(),n));return t}}),lt=Object(c.a)(st,2),ct=lt[0],ut=lt[1],dt=Object(p.a)([R,R],{value:de}),ht=Object(c.a)(dt,2),ft=ht[0],pt=ht[1];Object(u.useEffect)((function(){pt([R,R])}),[R]);var mt=function(e,t){pt(e),me&&me(t,e)},gt=function(e,t,n){var r=e.picker,i=e.locale,a=e.selectedValue,o=e.disabledDate,s=e.disabled,l=e.generateConfig,c=M(a,0),d=M(a,1);function h(e){return 100*l.getYear(e)+l.locale.getWeek(i.locale,e)}function f(e){return 100*l.getYear(e)+l.getMonth(e)}function p(e){return 10*l.getYear(e)+W(l,e)}return[u.useCallback((function(e){if(o&&o(e))return!0;if(s[1]&&d)return!Y(l,e,d)&&l.isAfter(e,d);if(t&&d)switch(r){case"quarter":return p(e)>p(d);case"month":return f(e)>f(d);case"week":return h(e)>h(d);default:return!Y(l,e,d)&&l.isAfter(e,d)}return!1}),[o,s[1],d,t]),u.useCallback((function(e){if(o&&o(e))return!0;if(s[0]&&c)return!Y(l,e,d)&&l.isAfter(c,e);if(n&&c)switch(r){case"quarter":return p(e)0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;_t&&ln&&ln[0]&&ln[1]&&k.isAfter(ln[1],ln[0])&&(r=ln);var i=B;if(B&&"object"===Object(m.a)(B)&&B.defaultValue){var o=B.defaultValue;i=Object(l.a)(Object(l.a)({},B),{},{defaultValue:M(o,Qe)||void 0})}var c=null;return ne&&(c=function(e,t){return ne(e,t,{range:Qe?"end":"start"})}),u.createElement($.Provider,{value:{inRange:!0,panelPosition:t,rangedValue:rn||ct,hoverRangedValue:r}},u.createElement(Se,Object.assign({},e,n,{dateRender:c,showTime:i,mode:ft[Qe],generateConfig:k,style:void 0,direction:_e,disabledDate:0===Qe?bt:yt,disabledTime:function(e){return!!te&&te(e,0===Qe?"start":"end")},className:h()(Object(s.a)({},"".concat(a,"-panel-focused"),0===Qe?!Cn:!Ln)),value:M(ct,Qe),locale:w,tabIndex:-1,onPanelChange:function(e,n){mt(P(ft,n,Qe),P(ct,e,Qe));var r=e;"right"===t&&ft[Qe]===n&&(r=Z(r,n,k,-1)),ot(r,Qe)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:void 0,defaultPickerValue:void 0})))}var Pn=0,Bn=0;Qe&&He.current&&ze.current&&Pe.current&&(Pn=He.current.offsetWidth+ze.current.offsetWidth,Pe.current.offsetWidth&&Pn>Pe.current.offsetWidth&&(Bn=Pn));var Fn="rtl"===_e?{right:Pn}:{left:Pn};var Un,Hn,Gn=u.createElement("div",{className:h()("".concat(a,"-range-wrapper"),"".concat(a,"-").concat(R,"-range-wrapper")),style:{minWidth:At}},u.createElement("div",{className:"".concat(a,"-range-arrow"),style:Fn}),function(){var e,t=ke(a,ft[Qe],he),n=we({prefixCls:a,components:xe,needConfirmButton:Le,okDisabled:!M(ct,Qe)||ee&&ee(ct[Qe]),locale:w,rangeList:jn,onOk:function(){M(ct,Qe)&&(Rt(ct,Qe),ye&&ye(ct))}});if("time"===R||B)e=Mn();else{var r=at(Qe),i=Z(r,R,k),o=ft[Qe]===R,s=Mn(!!o&&"left",{pickerValue:r,onPickerValueChange:function(e){ot(e,Qe)}}),l=Mn("right",{pickerValue:i,onPickerValueChange:function(e){ot(Z(e,R,k,-1),Qe)}});e="rtl"===_e?u.createElement(u.Fragment,null,l,o&&s):u.createElement(u.Fragment,null,s,o&&l)}var c=u.createElement(u.Fragment,null,u.createElement("div",{className:"".concat(a,"-panels")},e),(t||n)&&u.createElement("div",{className:"".concat(a,"-footer")},t,n));return re&&(c=re(c)),u.createElement("div",{className:"".concat(a,"-panel-container"),style:{marginLeft:Bn},ref:Pe,onMouseDown:function(e){e.preventDefault()}},c)}());se&&(Un=u.createElement("span",{className:"".concat(a,"-suffix")},se)),oe&&(M(tt,0)&&!Ze[0]||M(tt,1)&&!Ze[1])&&(Hn=u.createElement("span",{onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},onMouseUp:function(e){e.preventDefault(),e.stopPropagation();var t=tt;Ze[0]||(t=P(t,null,0)),Ze[1]||(t=P(t,null,1)),Rt(t,null),Dt(!1,Qe)},className:"".concat(a,"-clear")},le||u.createElement("span",{className:"".concat(a,"-clear-btn")})));var zn={size:O(R,Ke[0])},Vn=0,Wn=0;He.current&&Ge.current&&ze.current&&(0===Qe?Wn=He.current.offsetWidth:(Vn=Pn,Wn=Ge.current.offsetWidth));var Kn="rtl"===_e?{right:Vn}:{left:Vn};return u.createElement(v.Provider,{value:{operationRef:Xe,hideHeader:"time"===R,onDateMouseEnter:function(e){cn(P(ct,e,Qe)),0===Qe?fn(e):bn(e)},onDateMouseLeave:function(){cn(P(ct,null,Qe)),0===Qe?pn():yn()},hideRanges:!0,onSelect:function(e,t){var n=P(ct,e,Qe);"submit"===t||"key"!==t&&!Le?(Rt(n,Qe),0===Qe?pn():yn()):ut(n)},open:_t}},u.createElement(Ae,{visible:_t,popupElement:Gn,popupStyle:b,prefixCls:a,dropdownClassName:y,dropdownAlign:E,getPopupContainer:_,transitionName:x,range:!0,direction:_e},u.createElement("div",Object.assign({ref:Me,className:h()(a,"".concat(a,"-range"),g,(t={},Object(s.a)(t,"".concat(a,"-disabled"),Ze[0]&&Ze[1]),Object(s.a)(t,"".concat(a,"-focused"),0===Qe?Sn:Dn),Object(s.a)(t,"".concat(a,"-rtl"),"rtl"===_e),t)),style:d,onClick:function(e){_t||Ve.current.contains(e.target)||We.current.contains(e.target)||(Ze[0]?Ze[1]||Lt(1):Lt(0))},onMouseDown:function(e){!_t||!Sn&&!Dn||Ve.current.contains(e.target)||We.current.contains(e.target)||e.preventDefault()}},j(e)),u.createElement("div",{className:h()("".concat(a,"-input"),(n={},Object(s.a)(n,"".concat(a,"-input-active"),0===Qe),Object(s.a)(n,"".concat(a,"-input-placeholder"),!!hn),n)),ref:He},u.createElement("input",Object.assign({id:o,disabled:Ze[0],readOnly:ue||!Cn,value:hn||qt,onChange:function(e){Yt(e.target.value)},autoFocus:A,placeholder:M(S,0)||"",ref:Ve},kn,zn,{autoComplete:De}))),u.createElement("div",{className:"".concat(a,"-range-separator"),ref:ze},H),u.createElement("div",{className:h()("".concat(a,"-input"),(r={},Object(s.a)(r,"".concat(a,"-input-active"),1===Qe),Object(s.a)(r,"".concat(a,"-input-placeholder"),!!vn),r)),ref:Ge},u.createElement("input",Object.assign({disabled:Ze[1],readOnly:ue||!Ln,value:vn||Zt,onChange:function(e){$t(e.target.value)},placeholder:M(S,1)||"",ref:We},Tn,zn,{autoComplete:De}))),u.createElement("div",{className:"".concat(a,"-active-bar"),style:Object(l.a)(Object(l.a)({},Kn),{},{width:Wn,position:"absolute"})}),Un,Hn)))}var Ge=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).pickerRef=u.createRef(),e.focus=function(){e.pickerRef.current&&e.pickerRef.current.focus()},e.blur=function(){e.pickerRef.current&&e.pickerRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return u.createElement(He,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),n}(u.Component);t.b=Me},onxn: +/*!*********************************************!*\ + !*** ./src/assets/images/icons/firefox.png ***! + \*********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAQFElEQVRoQ71aCXRUVZr+7ttqr6yVPSRASCBIVFBUWgUURZFW7FYa9Xhc2lHWGdM9bYszaqa1tcUFV9RRu3V6etw4DQJqY4MDLUJQEQIYEsieqspW2Wp/9ZY7570ia1VIRXH+cyo59e6/3O/+//3vf/9XBGeR8sr/lipS6QpKyMUApoOiGISmgBIbJZSAwkdA+ihQB0JqCPAVy3K7Op5Z3Hm2pkF+qKKiik/sfV7lF5SSOwF6MSiYiekklBAcIqDvmAzkLy1/WNo7MfmR3N8bUF75fpOInnIK+iClsP2QSQzIEiAIBk8L9uwN7ooLgt9H54QBUUqJo3zHrZTgSVDkfx+jY8lcaqgDJ0awl5S6KGXWezYu+W9CCJ2IjQkByvzXnZNlRXoPlM4dywghBJRhwBACkNPRp1nRpqX/p6CqJq2Cqqr+XSdFgVGg2DRlG85FE7Y6i/Bs6NqvZdZwc9uz1zUnCiouIPrBzaxr9+Eb816v2zygKONXO+apKrZSUEeMcg0AwwAMB8JMaI2iABUFqihC7e0HMQr43YwDuGvqd/B2yni0bn7/X6W5i47J5aUC1K1pL9V5zwQurnXXqmnrKMX8vNdO3aQJp//641ug0D9RUMOgMs0BLBf9aN44C0RlGbKrHVSW8OCsY1hXVg0qq6issStfdOQ+ssrw+VKVKtfnPHvSM2aEjB6gFQuMzjaXi4AazclJOcWR391LqbphiI+AcGwMkDsNO7DCvBNFllYc8J6L273/8b0gamEot7WDhsJ4+JxDWHleva6ntQl0c2PRK/fYv1zESOwjjicPb463v2KW1rWyeIVK1Xc1JSeZ3E+XG35zDUB1PsKwYHgeGOaROVw13nI8jmxr9Chp6MvHPM9boDTB7K1SqH4/wLIgRgMIy4JTJZCudgR8Et77yW5cNrlb193WotLaOn7TvOn9a8KuwIbs3x/77ehViwHkXDntY0rpEo1RDPF0m3AB+b11OViOxSS2B4WcGy7GgXopH4u5SryVXwGek3W9vrAVs5zvIUSNCXtH6eiE4vNH+QkBa7fBEvRg2/kfoaOHxfrm+dh67R6k2RWdpaNeUpSWnu0ZZUk3BI93Xpy98eRXw43FAGpdWdQDihRR5CAGObCciu6kZGSrPeAhg+EU8FYRooVBRnonBENkUN8jrlV4PfjzhMFojHJ7Z9RDo6jQ7MOuqz8GI0r4pCEHN14Y9ZJGx48xvpIMP1V8kj91UuEksvzDKNrTiXSQsW3l9EKZyo2yxCDoF8ALCkxmKZpu4xBhVKQVt8FoD8EXtmCac0vioTagT8twEUlP21pSoOEwVH9AH51u7cFn132mlx5UoWCMrP5cSxQNDcQ9dQrNDhxsvzvj6eq34wNaVTRfVrEn4DOA52UIxkHgY656xsxWCBYR3zpn4drQxgl5ZyxmLQw1kMQg4IXCHfhZWUcMq9QnUc7MyqLb70m7/6ucuIDcq4uuFsPMTm2Q4/XT78zEqMid06DnCNfRPDyl3In3rQvGk5rQON/pxndXvQPeFCdMFJVSFaR/f9tVuRtP7IoJuTdWL69YLH/7aKLHCmeKIGtWiz7BhsqpCPeb4DVYEGSMCDEGeIkZzX6CPRkLcdhaOiEgA8xUkvGY5V3cPts1pnyoumdn+kPfXhMD6G+rrvDOVFsSLjQNSUE4Sty6obovihEJCjFGWwMEp4QcPFbym9gJaftGkvVUDZ4bO6z7G3Fw8fsjxhm5DyqXrD+TOoL9yfft178M+nHL6ut+eYFS++ZEltGYHEB6cZsu0vR1IYI91hhxr92B59hF2Jty0YgxqlJIzS16MtCJZSEUThpxxg0IqIEgjs99EbZhS82Fm6EIGaCMCUpARvCLnsys1452DgL6ZtUFTZlqX8FEAAmWMDJmOnWR9upcBKRS8JmZYA0GRDo7YJ5RisaICTc0XhajVnK69Yw2nBizGVx2ZiwoSvGu4xVcXDSU3tlIGxjZC8lcohe+3kr3kuynqj/VAblWlZSoqlIzETAaLyPIyDmvSRfz+yZDmXH/CBWHGv24o+VCRNSRVYMWZrp34hCbngY2OWlohFJI7jaszjqIh35SO/ickXog+I4jnKotFkH4uKc87d+PPK8DqrnvnA0WhOME+fgQM85pgWCOQFUIvBkPg5jSIPZ78W8n87HNnxdXgVavqZ5uqMEgqBx7NLBJdrCOdF02V2xFyN2LkqR+/M+SL4cB6oPR+w3CyXOhsnaEjvc+rnSJL+uAjq46vzZF9RWPP/1YDrPDi9TJ0TouJBbgSPhnuKlrCeRo+TcuKX1eKJ7Y4pmxmEFMZsy2tOH53C245dvFOHCTfqLoxEQ8MPqOIGKeAtk0Be3HfO8a3L07CS2/xNQa9PgIaPQYTpQIhS27V/8wbPSSpv3NOvX30QVIjEbZ5dYvd2xaKrR9IzW3gkpSDB9jEFCcKWP35e/huf8twK8WDt3zWLEdBv9xyIIDEdu5qK0UD2T2dewl7lXT57QR2xcZSq8pUSysICFtWrteIYym0rrN6KbRdBqPNCBSQ3TfaZlNSwKyM5r6RxPhOORmCTi44G30dipISWcx0IJhRRcM/hNQWTPCyfPwx12Oqhulb+qJc/W08/YyZQcul6oSKpEZXkZGqROsQUbEZ0QkJKCLSQHHS8g2dyGv6dMzrou2Z6SmxG7UhGFgNhOcXKbfZoau8QD4QA34sFO/2ASs83Hb3690bmL+XKUH+r7VlyoFSntCF5i0Ei1cAPexPB2MxHBYWvAHRAiHEtKMWnrmzK8VoFJT/AwXbyVYQtFy24cxQ8a+A2CUaBHbTS/BVftWeLcbX9pD+stnpvqCooeOWVMP6RKsISQVeNBwYCqoEsVfaSvFese9iUarvsqRxkZApYB2WYyzd4YrM3MyTq34a/SRKgKMAVAjMPf+Y5DtSM9CPHBsofQn05+3E+fKaUsppdsTmVFSvgc+jxV97uge0arxzcnzsdGstx4SJqXfCzAMWLMJES38ztCoKrL3Y+/1OwFVAhvphGLMBRd2QggMHZsvVK8A2yurNwpVbxDXyuInVao+mMhsUqe1oeXbfKgyp4MxmiRECI8Pci7BxuAt42a3eDbktg6ogWjoxKOrspx4e9F+ECUAPliPiPUcGPv2g1GjVYa2Fk/sW4E7hEOUIeSfNQ99Fqb8IgMi4x4cyYWdaDk8CRyvwGwdSrPZcxrwlW8WVnieQHhYY2hgggKVcD5biwuEE+hV7NitXIgONTUaRYEANFDxaEnqCUxNjuDBebVgpG4I/mrI5skQ/EPeURQWbYcmR8UJt5A4VxY9U8vm/0ux3Dp2uXvamjW7D+01mbDYIiDMUJzY87phz+lFQDThma478Mfg9RBIBD/lvsQ91q0oSWkAyw1VBIrCYFPHL/B44Jd6X05u17wUBGuzQfH5BrEdvHQjZJKEwgIruHArhEAtVNYIRhmqASNBAzqP50MFQ+0mcyrpXD2zaC+Zcvhi+URsqTxq2QzJAfg67BAMCiglGN6ltWT0w57bA5ZXoltCyzKnfa7IDJQID6oS/TkryPrnmuZXcEQqiXrqdJNRckWrd42ci9dDMJoh2UrAB2rBh1tjHBnw2NDbkIlDaqG47I1dRt3kf629uW6hdHjqePtIO4PkCA+GUIRD2gQBg0kGM8xbnEkEZ5T0LKh95AgHVeJ0MLLM6DIKyyJgMeAJ2y3Yq84eMkspIvWN+neWKOi6dh1UzgbRPgeC5yA4MuS9AaGexgwEu+x4UVlU8/Sbr83QAf1l3c+3XB6pWjYeoBHjFAj4DVBkogPSukMsR4e8RgFF1QAQKArRi1eNGq3ZeCr5VtQKsX1+rfzRyiCN1k/ZhQdKPoDC2NDdkA9HQfXwduDgVNqqChAOG7EC5U9/9Z8rH9CtfLL2p8tmSSe2TAiQ3ncnCAd5SJHxz2TKMnjVcQM+NM8f04zS3QOlt08fPzr/CeSbmxAJGOBzp+il1miSRQ7tVYXYJp5DH7Xeled5+Qa3Dkhrztd+XiNaaGhiBeppC5LEIBLmdW+NJonlsN86E8+lrICXGbtcVMPhwZou19iDo/PXQxF5hPvM0K762hVlNPW7UuF1pWFdeEXfR+88lqKND85g59orj5RKzedO1EvD+ZtIJt4WFiNV9qGdS8XXxhL0MPaEVMqdXVC90T2yvWwj5mXVwHMqG9aMfphTY88pLfG0VxVgu68MIc5Sef8b710yAtDna69cPU1qfiUh62dgOspNwUOWe9DGRM+ZRGmKtw62Xieuzq5Ceckn6D6ZCXNaAAZ7CLwp1jthrwnHvpuBfXIRvcZY+3Tpa1V6n3vQQ7RiAXe409/nUPosiU5iLL4QMaCeycFxbjK+4Gehkp8xpkoGKubKNdjgfwP9ioA8iweqyMKW1acDMaX64yaDzpocrHbdhg227YqBKMvyXju1YwQg7cvuNVfcXyy3nJ32J4AAMeFz4Tzs4mejgclBO5sCCoJ0tR9TVTeWipXIUz2YLrfoffMBsmb1InlSNwLdVljSYvveWqJ49OtbYGZlepehMpyXnZdKKvbop+2IXUwrKpjDHR93OdTeicVLgi6VwUJ7t89ijK4sQ2HP6dGrDm2PhLotetiNpgPVZXi741I8aN0t80R9Pv/VU4P9kJi0VLnm8iU5cvsOAu1Y//8jLZMlF3SBN0ZrRNFnBG8RRxza2utYf3syDjWVoIjV30Z8kzc7aR6579BgYRl30tvXLH7rPLn+7h8bjlZ5mFP9MDt8EMxD13lt4lpb2ZQc0qegnTeyyKOv2QE5FO3OSgzvFjjporyX6qKNwdMU/6UxpWTfmsuOFCrtZT8WKMKqyJkdbfSPpn5nql4XamMamN5GB0TvUK4KE6HbTqS5ma+eahgtO2ZY9fx2TlKtVziZp3Zl/FigUiZ3wOIYWZ/52pLR35oOU6oPtuw+dNdl6QfsAHmYlMZcEpiXsak6tnQY70bWubrUepjkNJTKTbGv8s8SSlOaD5Z0LwhL4XWmQvSa42rWrgf7+Fn7byVVV5KX6mLbTWcKueEa6etz+M+OphwqlZtmnSUME1bjJyb6vOmm8tc3PvrCeMIJZTLt5zBb1i59tUxuvDeRm+14RscbD1IB9Uo6ZnHRfp2XsX4489Ujy8eT08YTAjSg6Plf333p9HDLpzPlpnEvg4kYH83TrZrxcugy7IkU4SnrdszlW6AS5iOzndzu2FAbexmKY2RCgDR5zVsfrFm2YSrc92cqveNe2xMF9pk4HZvFMmQwflxrqMZFXKub49R1+ZtOne5hJaZpwoAG1GpXjhf/YXuxTK37pyLFPZSGErM7JleYCPVGRN7kreaXsp45OnY7aAwN3xvQcH1b1y65VabMwzMU5zQ79bMKmLHLm2GCEXC0jUkVRSLUF6hdW62c8n7WyzXHfsianBVAg16rqGCOerYt+E4tuOIbviR3suK+cBp1Zdpp0GRVRfZl4/XHD7AzTpnYSFWB0vHlzS2TDiz/cPn4vx2YAML/AxiD3K8wfl5pAAAAAElFTkSuQmCC"},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(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.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",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function a(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function o(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(o(e,t+1)){i.lastIndex=t,e.ch=t;var n=i.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function d(e){for(;;){i.lastIndex=e.ch;var t=i.exec(e.text);if(!t){if(s(e))continue;return}if(o(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function h(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function f(e,n){for(var r=[];;){var i,a=d(e),o=e.line,s=e.ch-(a?a[0].length:0);if(!a||!(i=c(e)))return;if("selfClose"!=i)if(a[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==a[2]){r.length=l;break}if(l<0&&(!n||n==a[2]))return{tag:a[2],from:t(o,s),to:t(e.line,e.ch)}}else r.push(a[2])}}function p(e,n){for(var r=[];;){var i=h(e);if(!i)return;if("selfClose"!=i){var a=e.line,o=e.ch,s=u(e);if(!s)return;if(s[1])r.push(s[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(a,o)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,r){for(var i=new a(e,r.line,0);;){var o=d(i);if(!o||i.line!=r.line)return;var s=c(i);if(!s)return;if(!o[1]&&"selfClose"!=s){var l=t(i.line,i.ch),u=f(i,o[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),e.findMatchingTag=function(e,r,i){var o=new a(e,r.line,r.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=c(o),l=s&&t(o.line,o.ch),d=s&&u(o);if(s&&d&&!(n(o,r)>0)){var h={from:t(o.line,o.ch),to:l,tag:d[2]};return"selfClose"==s?{open:h,close:null,at:"open"}:d[1]?{open:p(o,d[2]),close:h,at:"close"}:{open:h,close:f(o=new a(e,l.line,l.ch,i),d[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new a(e,t.line,t.ch,n);;){var o=p(i,r);if(!o)break;var s=f(new a(e,t.line,t.ch,n),o.tag);if(s)return{open:o,close:s}}},e.scanForClosingTag=function(e,t,n,r){return f(new a(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(/*! ../../lib/codemirror */"VrN/"))},p5ED: +/*!*********************************************!*\ + !*** ./src/components/PreviewAll/index.tsx ***! + \*********************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=(n(/*! antd/es/tooltip/style */"5Dmo"),n(/*! antd/es/tooltip */"3S7+")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=n.n(l),u=n(/*! react */"q1tI"),d=n.n(u),h=n(/*! ./index.less?modules */"vHTk"),f=n.n(h),p=n(/*! @ant-design/icons */"yEEn"),m=n(/*! @/components/monaco-editor */"ZW9T"),g=n(/*! @/utils/util */"1vsH"),v=n(/*! @/service/exercise */"V0Rq"),b=n(/*! @/utils/env */"m3rI");t.a=function(e){var t,n,l,h,y,x,E=e.editOffice,_=void 0===E?"view":E,k=(e.name,e.data),w=(e.theme,e.type),S=e.filename,C=e.monacoEditor,O=e.className,A=e.style,T=e.close,I=e.onClose,D=e.hasMask,L=e.disabledDownload,R=e.onImgDimensions,N=e.otherData,j=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),M=Object(s.a)(j,2),P=(M[0],M[1],Object(u.useState)("")),B=Object(s.a)(P,2),F=(B[0],B[1]),U=Object(u.useState)(),H=Object(s.a)(U,2),G=H[0],z=H[1],V="build"===window.ENV?"/react/build":"",W=location.host.startsWith("localhost")?b.a.PROXY_SERVER:b.a.API_SERVER,K=Object(u.useRef)();null!==(t=k)&&void 0!==t&&t.startsWith("/api")&&"txt"!==w&&(k=b.a.API_SERVER+k),"office"===w&&Object(g.P)(k).filesize>10485760&&(w="other"),S&&(C.filename=S),Object(u.useEffect)((function(){var e,t,n=null===(e=document.cookie)||void 0===e||null===(t=e.replace(/\s/g,""))||void 0===t?void 0:t.split(";");null==n||n.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&F(t[1])}))}),[]),Object(u.useEffect)((function(){"office"===w&&q()}),[w,k]);var q=function(){var e=Object(o.a)(c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",k),t=k,k.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,Object(v.U)({attachment_id:n});case 6:r=e.sent,z(r);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=function(){k.startsWith("http")||k.startsWith("blob:")?Q():Object(g.x)(S||"educoder",k,S)},Q=function(){Object(g.v)(S||"educoder",decodeURIComponent(k))};return d.a.createElement("div",{style:Object(a.a)({},A||{}),className:"".concat(D&&f.a.bgBlack," ").concat(w?f.a.wrp:"hide")},T&&d.a.createElement("div",{className:f.a.close,ref:K},!!R&&d.a.createElement(i.a,{title:"点击对图片进行批注",getPopupContainer:function(){return K.current}},d.a.createElement("span",{onClick:function(){I(),R()}},d.a.createElement("i",{className:"icon-yulanpizhu"}))),!L&&d.a.createElement(i.a,{title:"点击下载此文件",getPopupContainer:function(){return K.current}},d.a.createElement("span",{onClick:Q},d.a.createElement("i",{className:"icon-quxiaozhiding"}))),d.a.createElement(i.a,{title:"关闭",getPopupContainer:function(){return K.current}},d.a.createElement("span",{className:"",onClick:I},d.a.createElement("i",{className:"icon-guanbi1"})))),d.a.createElement("div",{className:"".concat(f.a[O]," ").concat(O," ").concat(f.a.monaco," ").concat("txt"===w?"show":"hide")},"txt"===w&&d.a.createElement(m.b,C)),"audio"===w&&d.a.createElement("audio",{src:"".concat((null===(n=k)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(l=k)||void 0===l?void 0:l.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(k),autoPlay:!0}),"video"===w&&d.a.createElement(d.a.Fragment,null,(null===(h=k)||void 0===h?void 0:h.indexOf("http"))>-1?d.a.createElement("video",{controls:!0,src:"".concat(k),autoPlay:!0}):d.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(k),autoPlay:!0})),"office"===w&&G&&d.a.createElement("iframe",{src:"".concat(V,"/office.html?key=").concat(G.key,"&url=").concat(W+G.url,"&callbackUrl=").concat(W+G.callbackUrl,"&fileType=").concat(G.fileType,"&title=").concat(G.title,"&model=").concat(_,"&officeServer=").concat(b.a.OFFICE_SERVER,"&disabledDownload=").concat(!!L)}),("xlsx"===w||"doc"===w||"pptx"===w||"docx"===w)&&d.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(N.key,"&url=").concat(b.a.API_SERVER+N.url,"&callbackUrl=").concat(b.a.API_SERVER+N.callbackUrl,"&fileType=").concat(N.fileType,"&title=").concat(N.title,"&model=").concat(N.model)}),"html"===w&&d.a.createElement("iframe",{src:k+"&disposition=inline"}),"pdf"===w&&d.a.createElement("embed",{className:f.a.embed,src:k}),"image"===w&&d.a.createElement("img",{src:"".concat((null===(y=k)||void 0===y?void 0:y.indexOf("http://"))>-1||(null===(x=k)||void 0===x?void 0:x.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(k)}),"other"===w&&d.a.createElement("div",null,d.a.createElement(r.a,{type:"primary",size:"large",onClick:Y},d.a.createElement(p.a,null),"点击下载")),"download"===w&&d.a.createElement(r.a,{type:"primary",size:"large",onClick:Y},d.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(e,t,n){},pzxd: +/*!*********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/helper/text.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../../core/util */"bYtY"),i=r.retrieve2,a=r.retrieve3,o=r.each,s=r.normalizeCssArray,l=r.isString,c=r.isObject,u=n(/*! ../../contain/text */"6GrX"),d=n(/*! ./roundRect */"VpOo"),h=n(/*! ./image */"Xnb7"),f=n(/*! ./fixShadow */"fW2E"),p=n(/*! ../constant */"gut8"),m=p.ContextCachedBy,g=p.WILL_BE_RESTORED,v=u.DEFAULT_FONT,b={left:1,right:1,center:1},y={top:1,bottom:1,middle:1},x=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],E={},_={};function k(e){if(e){e.font=u.makeFont(e);var t=e.textAlign;"middle"===t&&(t="center"),e.textAlign=null==t||b[t]?t:"left";var n=e.textVerticalAlign||e.textBaseline;"center"===n&&(n="middle"),e.textVerticalAlign=null==n||y[n]?n:"top",e.textPadding&&(e.textPadding=s(e.textPadding))}}function w(e,t,n,r,i){if(n&&t.textRotation){var a=t.textOrigin;"center"===a?(r=n.width/2+n.x,i=n.height/2+n.y):a&&(r=a[0]+n.x,i=a[1]+n.y),e.translate(r,i),e.rotate(-t.textRotation),e.translate(-r,-i)}}function S(e,t,n,r,o,s,l,c){var u=r.rich[n.styleName]||{};u.text=n.text;var d=n.textVerticalAlign,h=s+o/2;"top"===d?h=s+n.height/2:"bottom"===d&&(h=s+o-n.height/2),!n.isLineHolder&&C(u)&&O(e,t,u,"right"===c?l-n.width:"center"===c?l-n.width/2:l,h-n.height/2,n.width,n.height);var f=n.textPadding;f&&(l=N(l,c,f),h-=n.height/2-f[2]-n.textHeight/2),I(t,"shadowBlur",a(u.textShadowBlur,r.textShadowBlur,0)),I(t,"shadowColor",u.textShadowColor||r.textShadowColor||"transparent"),I(t,"shadowOffsetX",a(u.textShadowOffsetX,r.textShadowOffsetX,0)),I(t,"shadowOffsetY",a(u.textShadowOffsetY,r.textShadowOffsetY,0)),I(t,"textAlign",c),I(t,"textBaseline","middle"),I(t,"font",n.font||v);var p=D(u.textStroke||r.textStroke,g),m=L(u.textFill||r.textFill),g=i(u.textStrokeWidth,r.textStrokeWidth);p&&(I(t,"lineWidth",g),I(t,"strokeStyle",p),t.strokeText(n.text,l,h)),m&&(I(t,"fillStyle",m),t.fillText(n.text,l,h))}function C(e){return!!(e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor)}function O(e,t,n,r,i,a,o){var s=n.textBackgroundColor,u=n.textBorderWidth,f=n.textBorderColor,p=l(s);if(I(t,"shadowBlur",n.textBoxShadowBlur||0),I(t,"shadowColor",n.textBoxShadowColor||"transparent"),I(t,"shadowOffsetX",n.textBoxShadowOffsetX||0),I(t,"shadowOffsetY",n.textBoxShadowOffsetY||0),p||u&&f){t.beginPath();var m=n.textBorderRadius;m?d.buildPath(t,{x:r,y:i,width:a,height:o,r:m}):t.rect(r,i,a,o),t.closePath()}if(p)if(I(t,"fillStyle",s),null!=n.fillOpacity){var g=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,t.fill(),t.globalAlpha=g}else t.fill();else if(c(s)){var v=s.image;(v=h.createOrUpdateImage(v,null,e,A,s))&&h.isImageReady(v)&&t.drawImage(v,r,i,a,o)}if(u&&f)if(I(t,"lineWidth",u),I(t,"strokeStyle",f),null!=n.strokeOpacity){g=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,t.stroke(),t.globalAlpha=g}else t.stroke()}function A(e,t){t.image=e}function T(e,t,n,r){var i=n.x||0,a=n.y||0,o=n.textAlign,s=n.textVerticalAlign;if(r){var l=n.textPosition;if(l instanceof Array)i=r.x+R(l[0],r.width),a=r.y+R(l[1],r.height);else{var c=t&&t.calculateTextPosition?t.calculateTextPosition(E,n,r):u.calculateTextPosition(E,n,r);i=c.x,a=c.y,o=o||c.textAlign,s=s||c.textVerticalAlign}var d=n.textOffset;d&&(i+=d[0],a+=d[1])}return(e=e||{}).baseX=i,e.baseY=a,e.textAlign=o,e.textVerticalAlign=s,e}function I(e,t,n){return e[t]=f(e,t,n),e[t]}function D(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function L(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function R(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function N(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}t.normalizeTextStyle=function(e){return k(e),o(e.rich,k),e},t.renderText=function(e,t,n,r,i,a){r.rich?function(e,t,n,r,i,a){a!==g&&(t.__attrCachedBy=m.NONE);var o=e.__textCotentBlock;o&&!e.__dirtyText||(o=e.__textCotentBlock=u.parseRichText(n,r));!function(e,t,n,r,i){var a=n.width,o=n.outerWidth,s=n.outerHeight,l=r.textPadding,c=T(_,e,r,i),d=c.baseX,h=c.baseY,f=c.textAlign,p=c.textVerticalAlign;w(t,r,i,d,h);var m=u.adjustTextX(d,o,f),g=u.adjustTextY(h,s,p),v=m,b=g;l&&(v+=l[3],b+=l[0]);var y=v+a;C(r)&&O(e,t,r,m,g,o,s);for(var x=0;x=0&&"right"===(E=A[M]).textAlign;)S(e,t,E,r,D,b,j,"right"),L-=E.width,j-=E.width,M--;for(N+=(a-(N-v)-(y-j)-L)/2;R<=M;)E=A[R],S(e,t,E,r,D,b,N+E.width/2,"center"),N+=E.width,R++;b+=D}}(e,t,o,r,i)}(e,t,n,r,i,a):function(e,t,n,r,i,a){"use strict";var o,s=C(r),l=!1,c=t.__attrCachedBy===m.PLAIN_TEXT;a!==g?(a&&(o=a.style,l=!s&&c&&o),t.__attrCachedBy=s?m.NONE:m.PLAIN_TEXT):c&&(t.__attrCachedBy=m.NONE);var d=r.font||v;l&&d===(o.font||v)||(t.font=d);var h=e.__computedFont;e.__styleFont!==d&&(e.__styleFont=d,h=e.__computedFont=t.font);var p=r.textPadding,b=r.textLineHeight,y=e.__textCotentBlock;y&&!e.__dirtyText||(y=e.__textCotentBlock=u.parsePlainText(n,h,p,b,r.truncate));var E=y.outerHeight,k=y.lines,S=y.lineHeight,A=T(_,e,r,i),I=A.baseX,R=A.baseY,j=A.textAlign||"left",M=A.textVerticalAlign;w(t,r,i,I,R);var P=u.adjustTextY(R,E,M),B=I,F=P;if(s||p){var U=u.getWidth(n,h);p&&(U+=p[1]+p[3]);var H=u.adjustTextX(I,U,j);s&&O(e,t,r,H,P,U,E),p&&(B=N(I,j,p),F+=p[0])}t.textAlign=j,t.textBaseline="middle",t.globalAlpha=r.opacity||1;for(var G=0;G=2){var P=D[0][0],B=D[1][0],F=D[0][1]*t.opacity,U=D[1][1]*t.opacity;e.type=l,e.method="none",e.focus="100%",e.angle=c,e.color=P,e.color2=B,e.colors=R.join(","),e.opacity=U,e.opacity2=F}"radial"===l&&(e.focusposition=u.join(","))}else L(e,s,t.opacity)}(s,n,r):function(e,t){t.lineDash&&(e.dashstyle=t.lineDash.join(" ")),null==t.stroke||t.stroke instanceof m||L(e,t.stroke,t.opacity)}(s,n),A(e,s)):(e[a?"filled":"stroked"]="false",T(e,s))},N=[[],[],[]];f.prototype.brushVML=function(e){var t=this.style,n=this._vmlEl;n||(n=g.createNode("shape"),C(n),this._vmlEl=n),R(n,"fill",t,this),R(n,"stroke",t,this);var r=this.transform,a=null!=r,o=n.getElementsByTagName("stroke")[0];if(o){var s=t.lineWidth;if(a&&!t.strokeNoScale){var l=r[0]*r[3]-r[1]*r[2];s*=y(x(l))}o.weight=s+"px"}var c=this.path||(this.path=new p);this.__dirtyPath&&(c.beginPath(),c.subPixelOptimize=!1,this.buildPath(c,this.shape),c.toStatic(),this.__dirtyPath=!1),n.path=function(e,t){var n,r,a,o,s,l,c=v.M,u=v.C,d=v.L,h=v.A,f=v.Q,p=[],m=e.data,g=e.len();for(o=0;o.01?G&&(z+=.0125):Math.abs(V-P)<1e-4?G&&zM?O-=.0125:O+=.0125:G&&VP?C+=.0125:C-=.0125),p.push(W,b(((M-B)*L+I)*w-S),",",b(((P-F)*R+D)*w-S),",",b(((M+B)*L+I)*w-S),",",b(((P+F)*R+D)*w-S),",",b((z*L+I)*w-S),",",b((V*R+D)*w-S),",",b((C*L+I)*w-S),",",b((O*R+D)*w-S)),s=C,l=O;break;case v.R:var K=N[0],q=N[1];K[0]=m[o++],K[1]=m[o++],q[0]=K[0]+m[o++],q[1]=K[1]+m[o++],t&&(i(K,K,t),i(q,q,t)),K[0]=b(K[0]*w-S),q[0]=b(q[0]*w-S),K[1]=b(K[1]*w-S),q[1]=b(q[1]*w-S),p.push(" m ",K[0],",",K[1]," l ",q[0],",",K[1]," l ",q[0],",",q[1]," l ",K[0],",",q[1]);break;case v.Z:p.push(" x ")}if(n>0){p.push(r);for(var Y=0;Y100&&(P=0,M={});var n,r=B.style;try{r.font=e,n=r.fontFamily.split(",")[0]}catch(e){}t={style:r.fontStyle||"normal",variant:r.fontVariant||"normal",weight:r.fontWeight||"normal",size:0|parseFloat(r.fontSize||12),family:n||"Microsoft YaHei"},M[e]=t,P++}return t}(a.font),E=x.style+" "+x.variant+" "+x.weight+" "+x.size+'px "'+x.family+'"';n=n||s.getBoundingRect(o,E,v,y,a.textPadding,a.textLineHeight);var _=this.transform;if(_&&!r&&(F.copy(t),F.applyTransform(_),t=F),r)p=t.x,m=t.y;else{var k=a.textPosition;if(k instanceof Array)p=t.x+D(k[0],t.width),m=t.y+D(k[1],t.height),v=v||"left";else{var w=this.calculateTextPosition?this.calculateTextPosition({},a,t):s.calculateTextPosition({},a,t);p=w.x,m=w.y,v=v||w.textAlign,y=y||w.textVerticalAlign}}p=s.adjustTextX(p,n.width,v),m=s.adjustTextY(m,n.height,y),m+=n.height/2;var S,O,T,L=g.createNode,N=this._textVmlEl;N?O=(S=(T=N.firstChild).nextSibling).nextSibling:(N=L("line"),S=L("path"),O=L("textpath"),T=L("skew"),O.style["v-text-align"]="left",C(N),S.textpathok=!0,O.on=!0,N.from="0 0",N.to="1000 0.05",A(N,T),A(N,S),A(N,O),this._textVmlEl=N);var j=[p,m],U=N.style;_&&r?(i(j,j,_),T.on=!0,T.matrix=_[0].toFixed(3)+","+_[2].toFixed(3)+","+_[1].toFixed(3)+","+_[3].toFixed(3)+",0,0",T.offset=(b(j[0])||0)+","+(b(j[1])||0),T.origin="0 0",U.left="0px",U.top="0px"):(T.on=!1,U.left=b(p)+"px",U.top=b(m)+"px"),O.string=String(o).replace(/&/g,"&").replace(/"/g,""");try{O.style.font=E}catch(e){}R(N,"fill",{fill:a.textFill,opacity:a.opacity},this),R(N,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash||null},this),N.style.zIndex=I(this.zlevel,this.z,this.z2),A(e,N)}},H=function(e){T(e,this._textVmlEl),this._textVmlEl=null},G=function(e){A(e,this._textVmlEl)},z=[c,u,d,f,h],V=0;V=0&&(this.delFromStorage(e),this._roots.splice(o,1),e instanceof a&&e.delChildrenFromStorage(this))}},addToStorage:function(e){return e&&(e.__storage=this,e.dirty(!1)),this},delFromStorage:function(e){return e&&(e.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:s};var c=l;e.exports=c},rA99: +/*!***************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/BezierCurve.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../../core/vector */"QBsz"),a=n(/*! ../../core/curve */"Sj9i"),o=a.quadraticSubdivide,s=a.cubicSubdivide,l=a.quadraticAt,c=a.cubicAt,u=a.quadraticDerivativeAt,d=a.cubicDerivativeAt,h=[];function f(e,t,n){var r=e.cpx2,i=e.cpy2;return null===r||null===i?[(n?d:c)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?d:c)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?u:l)(e.x1,e.cpx1,e.x2,t),(n?u:l)(e.y1,e.cpy1,e.y2,t)]}var p=r.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2,l=t.cpx1,c=t.cpy1,u=t.cpx2,d=t.cpy2,f=t.percent;0!==f&&(e.moveTo(n,r),null==u||null==d?(f<1&&(o(n,l,i,f,h),l=h[1],i=h[2],o(r,c,a,f,h),c=h[1],a=h[2]),e.quadraticCurveTo(l,c,i,a)):(f<1&&(s(n,l,u,i,f,h),l=h[1],u=h[2],i=h[3],s(r,c,d,a,f,h),c=h[1],d=h[2],a=h[3]),e.bezierCurveTo(l,c,u,d,i,a)))},pointAt:function(e){return f(this.shape,e,!1)},tangentAt:function(e){var t=f(this.shape,e,!0);return i.normalize(t,t)}});e.exports=p},"rAM+": +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***! + \*******************************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}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,s=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==n.return||n.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(e,t){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},s=e=>o[e];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(e){return e.replace(l,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const u=/(^|[^\[])\^/g;const d=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const f={},p=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(e,t){f[" "+e]||(p.test(e)?f[" "+e]=e+"/":f[" "+e]=b(e,"/",!0));const n=-1===(e=f[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(g,"$1")+t:e+t}function b(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i(r=(r=r.source||r).replace(u,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(c(n)).replace(d,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!h.test(n)&&(n=v(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:v,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length0&&void 0!==r[0]?r[0]:0,console.log(P),e.next=4,Object(g.a)("/api/exercises/".concat(P.categoryId,"/preview_random_exercise.json"),{method:"get",params:{num:t}});case 4:n=e.sent,A(!1),M(U(n));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(e){var t={1:"一",2:"二",3:"三",4:"四",5:"五",6:"六",7:"七"};if(e){var n=e||{},r=n.exam,a=n.single_questions,o=n.multiple_questions,s=n.judgement_questions,l=n.program_questions,c=n.completion_questions,u=n.subjective_questions,d=n.practical_questions,h=n.combination_questions,f=[Object(i.a)({type:"SINGLE",name:"单选题"},a),Object(i.a)({type:"MULTIPLE",name:"多选题"},o),Object(i.a)({type:"COMPLETION",name:"填空题"},c),Object(i.a)({type:"JUDGMENT",name:"判断题"},s),Object(i.a)({type:"SUBJECTIVE",name:"简答题"},u),Object(i.a)({type:"PROGRAM",name:"编程题"},l),Object(i.a)({type:"PRACTICAL",name:"实训题"},d),Object(i.a)({type:"COMBINATION",name:"组合题"},h)],p=[],m=0,g=0,v=f.filter((function(e){return e.questions_count>0})).map((function(e,n){var r;return null===(r=e.questions)||void 0===r||r.forEach((function(e){p.push(e.id),m+=e.score,g+=1})),Object(i.a)(Object(i.a)({},e),{number:t[n+1]})}));return{all_questions_count:g,all_score:m,questionList:v,ids:p,exam:r}}},H=function(){var e=Object(a.a)(l.a.mark((function e(t,n){var r,a,o;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(g.a)("/api/exercises/".concat(P.categoryId,"/toggle_random_question.json"),{method:"post",body:{question_id:null==t?void 0:t.single_question_id}});case 2:null!=(r=e.sent)&&r.question&&((o=Object(v.cloneDeep)(j)).questionList=null==o||null===(a=o.questionList)||void 0===a?void 0:a.map((function(e){if(e.type===n.type){var t=Object(v.cloneDeep)(null==e?void 0:e.questions);return t.splice(n.index,1,null==r?void 0:r.question),Object(i.a)(Object(i.a)({},e),{},{questions:t})}return e})),M(o));case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),G=function(){var e=Object(a.a)(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:document.body.scrollIntoView(),F(t),L(t);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return console.log(Object(d.h)(),"location333"),u.a.createElement("section",{className:p.a.wrap},u.a.createElement(r.a,{loading:O,active:!0,paragraph:{rows:5}},(null===(n=Object(d.h)())||void 0===n||null===(s=n.pathname)||void 0===s?void 0:s.includes("preview"))&&u.a.createElement("div",{className:p.a.crumbs},u.a.createElement("b",null),u.a.createElement("span",{className:"current",onClick:function(){return h.d.push("/classrooms/".concat(P.coursesId,"/exercise"))}},"".concat(null==B||null===(f=B.course)||void 0===f?void 0:f.course_name,">")),u.a.createElement("span",{className:"current",onClick:function(){return h.d.push("/classrooms/".concat(P.coursesId,"/exercise"))}},"试卷列表>"),u.a.createElement("span",{style:{color:"#bebebe"}},"预览")),u.a.createElement(m.a,{loading:w,submit:function(){alert("保存")},goBack:function(){h.d.push("/classrooms/".concat(P.coursesId,"/exercise"))},data:j,selectValue:D,editPreview:!0,onExchange:H,onSkipExamination:G})))}))},sR1s: +/*!*****************************************************!*\ + !*** ./node_modules/rc-table/es/utils/valueUtil.js ***! + \*****************************************************/ +/*! exports provided: getPathValue, getColumnsKey, mergeObject, validateValue */ +/*! exports used: getColumnsKey, getPathValue, mergeObject, validateValue */function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l}));var r=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU");function i(e){return null==e?[]:Array.isArray(e)?e:[e]}function a(e,t){if(!t&&"number"!=typeof t)return e;for(var n=i(t),r=e,a=0;a20?(c.b.warn("填空题标准答案不能为空/不能超过20个!"),!1):{name:o,analysis:d,standard_answers:e,is_ordered:O})):(c.b.info("请您输入题干"),!1)},G=function(){s(""),p(""),x([]),A(!1)},z=function(e,t,n){w("");var r=y.slice();r[e][t]=n,x(r)},V=function(e){var t=y.slice();t[e]=[].concat(Object(N.a)(t[e]),[""]),x(t)},W=function(e,t){var n=y.slice();if(!n[e][t])return n[e]=n[e].filter((function(e,n){return n!==t})),void x(n);h.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:H.a.modal,onOk:function(){n[e]=n[e].filter((function(e,n){return n!==t})),x(n)}})},K=function(e){h.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:H.a.modal,onOk:function(){var t=y.slice();t=y.filter((function(t,n){return e!==n})),x(t)}})};return v.a.createElement("section",{className:H.a.wrap},v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"题干:")),v.a.createElement("div",null,v.a.createElement(P.a,{id:"completion-question-tittle",placeholder:"请您输入题目",height:155,defaultValue:o,onChange:function(e){return s(e)},showNullButton:!0,onPlaceholderChange:function(e,t,n){var r=y.slice();if(t&&r.splice(e,t),n)for(var i=0;i1&&v.a.createElement("span",null,v.a.createElement(R.a,{checked:O,onChange:function(e){return A(e.target.checked)},className:"".concat(H.a.color333," font14")},"多个填空的答案有顺序要求"),v.a.createElement("span",{className:"".concat(H.a.color999," font12")},"(选中,每个填空的答案顺序必须与参考答案一致)"))),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.title},"题目解析:")),v.a.createElement(M.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:d,onChange:function(e){return p(e)}}))},z=Object(w.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(G)),V=(n("7Kak"),n("9yH6")),W=function(e,t){e.globalSetting,e.loading;var n=e.editData,r=(e.dispatch,e.onRef,e.isEdit),i=(Object(j.a)(e,["globalSetting","loading","editData","dispatch","onRef","isEdit"]),Object(g.useState)()),a=Object(f.a)(i,2),o=a[0],s=a[1],l=Object(g.useState)(""),u=Object(f.a)(l,2),d=u[0],h=u[1],p=Object(g.useState)(""),m=Object(f.a)(p,2),b=m[0],y=m[1];Object(g.useEffect)((function(){if(n&&r){h(null==n?void 0:n.name),y(null==n?void 0:n.analysis);var e=null==n?void 0:n.choices.find((function(e){return e.is_answer}));s("正确"===e.choice_text?"0":"1")}}),[n]),Object(g.useImperativeHandle)(t,(function(){return{onSave:x,Clear:E}}));var x=function(){return d?o?{name:d,choices:[{choice_text:"正确",is_answer:"0"===o?1:0},{choice_text:"错误",is_answer:"1"===o?1:0}],analysis:b}:(c.b.info("请先点击选择本选择题的正确选项"),!1):(c.b.info("请您输入题干"),!1)},E=function(){h(""),y(""),s("")};return v.a.createElement("section",{className:H.a.wrap},v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"题干:")),v.a.createElement(M.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:d,onChange:function(e){return h(e)}}),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"答案选项:",v.a.createElement("span",{className:H.a.colorGray},"点击选项可设置正确答案"))),v.a.createElement(V.a.Group,{buttonStyle:"solid",value:o,onChange:function(e){return s(e.target.value)}},v.a.createElement(V.a.Button,{value:"0",className:"".concat(H.a.radio," mr40")},"正确"),v.a.createElement(V.a.Button,{value:"1",className:H.a.radio},"错误")),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.title},"题目解析:")),v.a.createElement(M.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:b,onChange:function(e){return y(e)}}))},K=Object(w.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(W)),q=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Y=function(e,t){var n=e.editData,r=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),a=(Object(j.a)(e,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Object(g.useState)([])),o=Object(f.a)(a,2),s=o[0],l=o[1],u=Object(g.useState)(),d=Object(f.a)(u,2),h=d[0],p=d[1],m=Object(g.useState)([]),b=Object(f.a)(m,2),y=b[0],x=b[1],E=Object(g.useState)(""),k=Object(f.a)(E,2),w=k[0],S=k[1],C=Object(g.useState)(""),O=Object(f.a)(C,2),A=O[0],T=O[1];Object(g.useEffect)((function(){l(["","","",""])}),[]),Object(g.useEffect)((function(){if(n&&r){S(null==n?void 0:n.name),T(null==n?void 0:n.analysis),l(null==n?void 0:n.choices.map((function(e){return e.choice_text})));var e=[];null==n||n.choices.map((function(t,n){t.is_answer&&e.push(n)})),x(e)}}),[n]),Object(g.useImperativeHandle)(t,(function(){return{onSave:I,Clear:D}}));var I=function(){if(!w)return c.b.info("请您输入题干"),!1;var e=s.findIndex((function(e){return!e}));if(e>-1)return c.b.info("请先输入 ".concat(q[e]," 选项的内容")),!1;if(!y.length)return c.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),!1;if(y.length<2)return c.b.info("多选题最小正确选项为2个"),!1;var t=s.map((function(e,t){return{choice_text:e,is_answer:y.includes(t)?1:0}}));return{name:w,choices:t,analysis:A}},D=function(){l(["","","",""]),S(""),T(""),x("")};return v.a.createElement("section",{className:H.a.wrap},v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"题干:")),v.a.createElement(M.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:w,onChange:function(e){return S(e)}}),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"答案选项:",v.a.createElement("span",{className:H.a.colorGray},"点击选项可设置正确答案"))),s.map((function(e,t){return v.a.createElement("div",{className:H.a.choiceWrap,key:t},v.a.createElement(i.a,{title:"点击设置为标准答案",placement:"left"},v.a.createElement("div",{className:"".concat(H.a.answer," ").concat(y.includes(t)?H.a.activeAnswer:""),onClick:function(){y.includes(t)?x(y.filter((function(e){return e!==t}))):x([].concat(Object(N.a)(y),[t]))}},q[t])),v.a.createElement("div",{className:H.a.editorWrap},h===t?v.a.createElement(M.a,{id:"single-question-option-".concat(t),watch:!0,height:155,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){s[t]=e,l(s)}}):v.a.createElement("div",{className:H.a.htmlWrap,onClick:function(){return p(t)}},v.a.createElement(_.a,{value:e}))),t>1&&v.a.createElement(i.a,{title:"删除"},v.a.createElement("i",{className:"".concat(H.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){l(s.filter((function(e,n){return n!==t}))),y.includes(t)?x(y.filter((function(e){return e!==t}))):x([].concat(Object(N.a)(y),[t]))}})),t<7&&t===s.length-1&&v.a.createElement(i.a,{title:"新增参考答案"},v.a.createElement("i",{className:"".concat(H.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return l([].concat(Object(N.a)(s),[""]))}})))})),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.title},"题目解析:")),v.a.createElement(M.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:A,onChange:function(e){return T(e)}}))},Q=Object(w.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(Y)),J=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],X=function(e,t){var n=e.editData,r=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),a=(Object(j.a)(e,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Object(g.useState)([])),o=Object(f.a)(a,2),s=o[0],l=o[1],u=Object(g.useState)(),d=Object(f.a)(u,2),h=d[0],p=d[1],m=Object(g.useState)(),b=Object(f.a)(m,2),y=b[0],x=b[1],E=Object(g.useState)(""),k=Object(f.a)(E,2),w=k[0],S=k[1],C=Object(g.useState)(""),O=Object(f.a)(C,2),A=O[0],T=O[1];Object(g.useEffect)((function(){l(["","","",""])}),[]),Object(g.useEffect)((function(){n&&r&&(S(null==n?void 0:n.name),T(null==n?void 0:n.analysis),l(null==n?void 0:n.choices.map((function(e){return e.choice_text}))),x(null==n?void 0:n.choices.findIndex((function(e){return e.is_answer}))))}),[n]),Object(g.useImperativeHandle)(t,(function(){return{onSave:I,Clear:D}}));var I=function(){if(!w)return c.b.info("请您输入题干"),!1;var e=s.findIndex((function(e){return!e}));if(e>-1)return c.b.info("请先输入 ".concat(J[e]," 选项的内容")),!1;if(console.log("activeAnswer: ",y),"number"!=typeof y)return c.b.info("请设置本题的正确答案,点击选项A/B...即可完成设置"),!1;var t=s.map((function(e,t){return{choice_text:e,is_answer:y===t?1:0}}));return{name:w,choices:t,analysis:A}},D=function(){l(["","","",""]),S(""),T(""),x("")};return v.a.createElement("section",{className:H.a.wrap},v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"题干:")),v.a.createElement(M.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:w,onChange:function(e){return S(e)}}),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"答案选项:",v.a.createElement("span",{className:H.a.colorGray},"点击选项可设置正确答案"))),s.map((function(e,t){return v.a.createElement("div",{className:H.a.choiceWrap,key:t},v.a.createElement(i.a,{title:"点击设置为标准答案",placement:"left"},v.a.createElement("div",{className:"".concat(H.a.answer," ").concat(y===t?H.a.activeAnswer:""),onClick:function(){return x(t)}},J[t])),v.a.createElement("div",{className:H.a.editorWrap},h===t?v.a.createElement(M.a,{id:"single-question-option-".concat(t),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){s[t]=e,l(s)}}):v.a.createElement("div",{className:H.a.htmlWrap,onClick:function(){return p(t)}},v.a.createElement(_.a,{value:e}))),t>1&&v.a.createElement(i.a,{title:"删除"},v.a.createElement("i",{className:"".concat(H.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){l(s.filter((function(e,n){return n!==t}))),t===y&&x(null)}})),t<7&&t===s.length-1&&v.a.createElement(i.a,{title:"新增参考答案"},v.a.createElement("i",{className:"".concat(H.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return l([].concat(Object(N.a)(s),[""]))}})))})),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.title},"题目解析:")),v.a.createElement(M.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:A,onChange:function(e){return T(e)}}))},Z=Object(w.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(X)),$=function(e,t){var n=e.editData,r=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),i=(Object(j.a)(e,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Object(g.useState)("")),a=Object(f.a)(i,2),o=a[0],s=a[1],l=Object(g.useState)(""),u=Object(f.a)(l,2),d=u[0],h=u[1],p=Object(g.useState)(""),m=Object(f.a)(p,2),b=m[0],y=m[1];Object(g.useEffect)((function(){var e;n&&r&&(s(null==n?void 0:n.name),h(null==n?void 0:n.analysis),y(null==n||null===(e=n.answer_texts)||void 0===e?void 0:e[0]))}),[n]),Object(g.useImperativeHandle)(t,(function(){return{onSave:x,Clear:E}}));var x=function(){return o?b?{name:o,answer_texts:[b],analysis:d}:(c.b.info("请您输入参考答案"),!1):(c.b.info("请您输入题干"),!1)},E=function(){s(""),h(""),y("")};return v.a.createElement("section",{className:H.a.wrap},v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"题干:")),v.a.createElement(M.a,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:o,onChange:function(e){return s(e)}}),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.title},"参考答案:")),v.a.createElement(M.a,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"请您输入参考答案",defaultValue:b,onChange:function(e){return y(e)}}),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.title},"题目解析:")),v.a.createElement(M.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:d,onChange:function(e){return h(e)}}))},ee=Object(w.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)($)),te=n("k1fw"),ne=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],re=function(e,t){e.globalSetting,e.loading,e.dispatch;var n=e.editData,r=(e.onRef,e.isEdit),a=(Object(j.a)(e,["globalSetting","loading","dispatch","editData","onRef","isEdit"]),Object(g.useState)("")),o=Object(f.a)(a,2),s=o[0],l=o[1],u=Object(g.useState)([]),d=Object(f.a)(u,2),h=d[0],p=d[1];console.log(h),Object(g.useEffect)((function(){var e;if(n&&r){l(null==n?void 0:n.name);var t=null==n||null===(e=n.sub_item_banks)||void 0===e?void 0:e.map((function(e){var t,n,r;return Object(te.a)(Object(te.a)({},e),{},{id:e.id,open:!1,qusList:null==e||null===(t=e.choices)||void 0===t?void 0:t.map((function(e){return e.choice_text})),activeQusEditor:null,qusAnswer:null===(n=[null==e||null===(r=e.choices)||void 0===r?void 0:r.findIndex((function(e){return e.is_answer}))])||void 0===n?void 0:n.filter((function(e){return-1!==e}))})}));p(t)}}),[n]),Object(g.useImperativeHandle)(t,(function(){return{onSave:m,Clear:b}}));var m=function(){if(!s)return c.b.info("请您输入题干"),!1;if(0===h.length)return c.b.info("请您添加小题"),!1;for(var e=0;e-1)return c.b.info("请先输入第".concat(e+1,"小题").concat(ne[r],"选项的内容")),!1;if(null==n||!n.qusAnswer.length)return c.b.info("请设置第".concat(e+1,"小题的正确答案,点击选项A/B...即可完成设置")),!1}var i=h.map((function(e){return{id:e.id>1?e.id:null,name:e.name,item_type:e.item_type,analysis:e.analysis,choices:e.qusList.map((function(t,n){return{choice_text:t,is_answer:e.qusAnswer[0]===n?1:0}}))}}));return{name:s,sub_item_banks:i}},b=function(){l(""),p([])},y=function(e,t,n){var r,i=Object(I.cloneDeep)(h);("open"===e&&(i[t].open=!i[t].open),"delete"===e&&i.splice(t,1),"value"===e&&(i[t].name=n),"answer"===e&&(i[t].qusAnswer=[n]),"edit"===e&&(i[t].activeQusEditor=n),"details"===e&&(i[t].qusList[i[t].activeQusEditor]=n),"addQus"===e&&(i[t].qusList=i[t].qusList.concat("")),"deleteQus"===e)&&(i[t].qusList=i[t].qusList.filter((function(e,t){return t!==n})),i[t].qusAnswer=null===(r=i[t].qusAnswer)||void 0===r?void 0:r.filter((function(e){return e!==n})));"analysis"===e&&(i[t].analysis=n),p(i)};return v.a.createElement("section",{className:H.a.wrap},v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"题干:")),v.a.createElement(M.a,{id:"combination-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:s,onChange:function(e){return l(e)}}),null==h?void 0:h.map((function(e,t){var n;return v.a.createElement("div",{className:H.a.fold,key:e.id},v.a.createElement("div",{onClick:function(){return y("open",t)},className:H.a.head},v.a.createElement("i",{className:"iconfont icon-sanjiaoxing",style:{transform:e.open?"initial":"rotate(270deg) translate(2px, 4px)"}}),v.a.createElement("span",null,"第",t+1,"小题(单选题)"),v.a.createElement("b",{style:{visibility:"hidden"},onClick:function(e){e.stopPropagation(),y("delete",t)},className:"iconfont icon-shanchu8"})),v.a.createElement("div",{className:"mb10",style:{display:e.open?"block":"none"}},v.a.createElement(M.a,{watch:!0,height:155,placeholder:"请您输入题干",defaultValue:null==e?void 0:e.name,onChange:function(e){return y("value",t,e)}}),v.a.createElement("p",{className:H.a.titleWrap},v.a.createElement("span",{className:H.a.required},"*"),v.a.createElement("span",{className:H.a.title},"答案选项:",v.a.createElement("span",{className:H.a.colorGray},"点击选项可设置正确答案"))),null==e||null===(n=e.qusList)||void 0===n?void 0:n.map((function(n,r){var a,o;return v.a.createElement("div",{className:H.a.choiceWrap,key:r},v.a.createElement(i.a,{title:"点击设置为标准答案",placement:"left"},v.a.createElement("div",{className:"".concat(H.a.answer," ").concat(null!=e&&null!==(a=e.qusAnswer)&&void 0!==a&&a.includes(r)?H.a.activeAnswer:""),onClick:function(){return y("answer",t,r)}},ne[r])),v.a.createElement("div",{className:H.a.editorWrap},(null==e?void 0:e.activeQusEditor)===r?v.a.createElement(M.a,{id:"single-question-option-".concat(r),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:n,onChange:function(e){return y("details",t,e)}}):v.a.createElement("div",{className:H.a.htmlWrap,onClick:function(){return y("edit",t,r)}},v.a.createElement(_.a,{value:n}))),r>1&&v.a.createElement(i.a,{title:"删除"},v.a.createElement("i",{className:"".concat(H.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return y("deleteQus",t,r)}})),r<7&&r===(null==e||null===(o=e.qusList)||void 0===o?void 0:o.length)-1&&v.a.createElement(i.a,{title:"新增参考答案"},v.a.createElement("i",{className:"".concat(H.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return y("addQus",t)}})))})),v.a.createElement("p",{className:"mb10 mt10"},v.a.createElement("span",{className:H.a.title},"题目解析:")),v.a.createElement(M.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:e.analysis,onChange:function(e){return y("analysis",t,e)}})))})))},ie=Object(w.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})(Object(g.forwardRef)(re));t.a=function(e){var t,n,p,b,x,C,A,D,R=e.data,N=e.submit,j=e.goBack,M=e.loading,P=e.onTypeScore,B=e.editPreview,F=void 0!==B&&B,U=e.onSkipExamination,H=e.selectValue,G=e.onExchange,V=Object(g.useRef)(),W=Object(g.useRef)(Object(I.debounce)((function(){return se()}),100,{leading:!0,trailing:!0})),q=Object(g.useState)(null),Y=Object(f.a)(q,2),J=Y[0],X=Y[1],$=Object(g.useState)(!1),te=Object(f.a)($,2),ne=te[0],re=te[1],ae=Object(k.i)();Object(g.useEffect)((function(){return window.addEventListener("scroll",null==W?void 0:W.current),function(){window.removeEventListener("scroll",null==W?void 0:W.current)}}),[]),Object(g.useEffect)((function(){re(!0)}),[]),Object(g.useEffect)((function(){var e,t,n,r,i=null===(e=document.getElementById("examName"))||void 0===e||null===(t=e.getElementsByClassName("ant-pagination-options-quick-jumper"))||void 0===t||null===(n=t[0])||void 0===n||null===(r=n.childNodes)||void 0===r?void 0:r[2];i&&(i.nodeValue="份")}),[R]);var oe=function(e){var t=parseInt(e);return isNaN(t)?"":t};var se=function(){var e,t,n,r,i=document.getElementById("preview_btns"),a=document.getElementById("preview_btns_else");n=0,r=0,document.body&&(n=document.body.scrollTop),document.documentElement&&(r=document.documentElement.scrollTop),(n-r>0?n:r)+("CSS1Compat"==document.compatMode?document.documentElement.clientHeight:document.body.clientHeight)>=(e=0,t=0,document.body&&(e=document.body.scrollHeight),document.documentElement&&(t=document.documentElement.scrollHeight),(e-t>0?e:t)-68)?(i.style.visibility="hidden",a.style.visibility="visible"):(i.style.visibility="visible",a.style.visibility="hidden")},le=["容易","简单","适中","困难"],ce=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ue=function(e){console.log(e,"key"),U(e-1)},de=function(){return v.a.createElement(v.a.Fragment,null,v.a.createElement(o.a,{color:"#55575D",overlayClassName:y.a.popover,visible:ne,getPopupContainer:function(e){return null==e?void 0:e.parentNode},content:"如您对此份试题满意,可将此份试题保存为固定试卷"},v.a.createElement(s.a,{onMouseEnter:function(){return re(!0)},onMouseLeave:function(){return re(!1)},onClick:function(){var e,t;t="",h.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"保存试卷",content:v.a.createElement("div",{className:y.a.modalColumn},v.a.createElement("div",{style:{color:"#676A6C",display:"flex"},className:"font14 mt20"},v.a.createElement("img",{style:{marginRight:5},src:L.a}),"保存后单独生成一份人工组卷类型的固定试卷。"),v.a.createElement("div",{className:y.a.modalRow,style:{marginTop:20}},v.a.createElement("sup",{className:y.a.sup},"*"),v.a.createElement("span",{style:{flexShrink:0}},"试卷名称:"),v.a.createElement(l.a,{placeholder:"请输入试卷名称",min:0,maxLength:60,defaultValue:t,onChange:function(e){t=e.target.value}}))),okText:"确认",cancelText:"取消",onOk:(e=Object(u.a)(m.a.mark((function e(){var n,r,i,a,o;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return c.b.warn("试卷名称不能为空"),e.abrupt("return",Promise.reject());case 3:return r=[],i=[],a=[],null==R||null===(n=R.questionList)||void 0===n||n.forEach((function(e){var t;null===(t=e.questions)||void 0===t||t.forEach((function(t){r.push(t.id),i.push(e.questions_score/e.questions_count),"COMBINATION"===e.type&&a.push({id:t.id,sub_item_bank_ids:t.sub_item_banks.map((function(e){return e.id}))})}))})),console.log("-----",a),o={item_bank_ids:r,item_bank_scores:i,name:t,combination_item_banks:a},e.next=11,N(o);case 11:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})}},"保存")),v.a.createElement(s.a,{onClick:function(){document.body.scrollIntoView(),j()}},"返回"),v.a.createElement(s.a,{loading:M,onClick:function(){return N()},type:"primary"},"提交"))},he=function(){var e;return v.a.createElement(v.a.Fragment,null,v.a.createElement(s.a,{onClick:j},"返回"),H>0&&v.a.createElement(s.a,{onClick:function(){return ue(H)},type:"primary"},"上一份"),H<(null==R||null===(e=R.exam)||void 0===e?void 0:e.total_num)-1&&v.a.createElement(s.a,{onClick:function(){return ue(H+2)}},"下一份"))},fe=function(){var e=Object(u.a)(m.a.mark((function e(t,n){var r,i,a,o,s,l,u,d,h,f;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(r=V.current)||void 0===r?void 0:r.onSave();case 2:if(i=e.sent){e.next=5;break}return e.abrupt("return");case 5:return a={question_score:n.score,analysis:i.analysis},console.log(i,"editorData"),"SINGLE"!==t&&"MULTIPLE"!==t&&"JUDGMENT"!==t||(s=[],l=[],a.question_type="JUDGMENT"===t?2:1,a.question_title=null==i?void 0:i.name,null==i||null===(o=i.choices)||void 0===o||o.forEach((function(e,t){s.push(e.choice_text),null!=e&&e.is_answer&&l.push(t+1)})),a.question_choices=s,a.standard_answers=l),"COMPLETION"===t&&(a.is_ordered=i.is_ordered,a.question_title=null==i?void 0:i.name,a.question_type=3,d=[],null==i||null===(u=i.standard_answers)||void 0===u||u.forEach((function(e,t){d.push({choice_id:e.position,answer_text:e.answer_text})})),a.standard_answers=d),"SUBJECTIVE"===t&&(a.question_title=null==i?void 0:i.name,a.question_type=3,a.standard_answers=null==i?void 0:i.answer_texts),"COMBINATION"===t&&(a.question_title=null==i?void 0:i.name,a.question_type=7,a.sub_questions=null==i||null===(h=i.sub_item_banks)||void 0===h?void 0:h.map((function(e,t){return{id:e.id,question_title:e.name,question_type:1,question_choices:e.choices.map((function(e){return e.choice_text})),standard_answers:[e.choices.findIndex((function(e){return e.is_answer}))+1],analysis:e.analysis}})),delete a.analysis),e.next=13,Object(S.a)("/api/exercise_questions/".concat(n.id,".json"),{method:"put",body:a});case 13:0===(null==(f=e.sent)?void 0:f.status)&&(c.b.success("编辑成功"),ue(H+1)),X(null);case 16:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();console.log(function(){for(var e=[],t=0;t<(null==R||null===(n=R.exam)||void 0===n?void 0:n.total_num);t++){var n;e.push({})}return e}(),"data");var pe=null==R||null===(t=R.questionList)||void 0===t?void 0:t.reduce((function(e,t){return e+t.questions_score}),0),me=F&&1!==(null==R||null===(n=R.exam)||void 0===n?void 0:n.exercise_status);return v.a.createElement("section",{className:y.a.wrap},v.a.createElement("div",{id:"id_left_preview",className:y.a.left,onMouseEnter:function(e){document.getElementById("id_left_preview").style.overflowY="auto"},onMouseLeave:function(e){document.getElementById("id_left_preview").style.overflowY="hidden"}},v.a.createElement("div",{className:y.a.title},v.a.createElement("div",null,v.a.createElement("b",null),v.a.createElement("span",null,"答题卡"))),v.a.createElement("div",{className:y.a.total},v.a.createElement("div",null,v.a.createElement("img",{src:O.a}),v.a.createElement("span",null,"题数(道)"),v.a.createElement("aside",null,null==R?void 0:R.all_questions_count)),v.a.createElement("div",{className:"mr30 ml30"},v.a.createElement("img",{src:T.a}),v.a.createElement("span",null,"总分(分)"),v.a.createElement("aside",null,pe)),v.a.createElement("div",null,v.a.createElement("img",{src:E.a}),v.a.createElement("span",null,"时长(分)"),v.a.createElement("aside",null,null==R||null===(p=R.exam)||void 0===p?void 0:p.time))),null==R||null===(b=R.questionList)||void 0===b?void 0:b.map((function(e,t){var n;return v.a.createElement("div",{className:y.a.list,key:t},v.a.createElement("div",{className:y.a.name},v.a.createElement("b",null),v.a.createElement("span",null,e.name)),v.a.createElement("aside",null,v.a.createElement("div",null,"共",v.a.createElement("span",{className:y.a.b},e.questions_count),"题 ",v.a.createElement("span",{className:y.a.l},"|"),"共",v.a.createElement("span",{className:y.a.r},e.questions_score),"分"),v.a.createElement("div",{className:y.a.answerSheet},null==e||null===(n=e.questions)||void 0===n?void 0:n.map((function(e,t){return v.a.createElement("div",{onClick:function(){var t="Anchor_".concat(e.id),n=document.getElementById(t);n&&setTimeout((function(){return n.scrollIntoView({block:"center",behavior:"smooth"})}))},key:e.id,className:y.a.tag},t+1)})))))}))),v.a.createElement("div",{className:y.a.right},v.a.createElement("div",{className:y.a.examName,id:"examName"},v.a.createElement("div",{className:y.a.name},v.a.createElement(i.a,{title:null==R||null===(x=R.exam)||void 0===x?void 0:x.name,getPopupContainer:function(e){return e.parentNode}},v.a.createElement("span",{className:y.a.t},null==R||null===(C=R.exam)||void 0===C?void 0:C.name))),F?v.a.createElement(r.a,{showTotal:function(e){return v.a.createElement("span",{style:{color:"#656F87",fontSize:14}},"共计",v.a.createElement("span",{className:"c-light-primary"},e),"份试卷")},total:null==R||null===(A=R.exam)||void 0===A?void 0:A.total_num,pageSize:1,current:H+1,showSizeChanger:!1,onChange:ue,showQuickJumper:!0,hideOnSinglePage:!1}):v.a.createElement(s.a,{onClick:function(){var e,t=h.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"温馨提示",content:"确认更换预览中的所有试题吗?",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(e=Object(u.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.update({cancelButtonProps:{disabled:!0}}),e.next=3,G();case 3:t.update({cancelButtonProps:{disabled:!1}}),c.b.success("已重新随机生成整张试题");case 5:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},type:"primary"},"随机更换")),v.a.createElement("div",{className:y.a.topWarp},null==R||null===(D=R.questionList)||void 0===D?void 0:D.map((function(e,t){var n,r;return v.a.createElement(v.a.Fragment,{key:t},v.a.createElement("div",{className:y.a.head,style:0===t?{border:0,marginTop:-16}:{}},v.a.createElement("div",{className:y.a.name},v.a.createElement("b",null),v.a.createElement("span",null,e.name)),v.a.createElement("div",{className:y.a.so},"共",v.a.createElement("span",{className:y.a.b},e.questions_count," "),"题 ","COMBINATION"===e.type&&"(包含".concat(null==e||null===(n=e.questions)||void 0===n?void 0:n.map((function(e){var t;return null==e||null===(t=e.sub_item_banks)||void 0===t?void 0:t.length})).reduce((function(e,t){return e+t})),"小题)"),v.a.createElement("span",{className:y.a.l},"|"),"共",v.a.createElement("span",{className:y.a.r},e.questions_score),"分"),!F&&v.a.createElement("div",{className:y.a.btn},v.a.createElement(s.a,{onClick:function(){!function(e){console.log("---",e);var t=[];e.questions.map((function(e){return null==e?void 0:e.sub_item_banks.map((function(e){t.push(e)}))}));var n,r=0;r="COMBINATION"===e.type?e.questions_score/t.length:e.questions_score/e.questions_count,h.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"分数设置",content:v.a.createElement("div",{className:y.a.modalColumn},v.a.createElement("div",{className:y.a.modalRow,style:{justifyContent:"flex-start"}},v.a.createElement("sup",{className:y.a.sup},"*"),v.a.createElement("span",null,null==e?void 0:e.name,"COMBINATION"===(null==e?void 0:e.type)&&"中的每小题",":"),v.a.createElement(d.a,{min:1,parser:oe,defaultValue:r,onChange:function(e){r=e}}),v.a.createElement("span",{className:"ml5"},"分/题"))),okText:"确认",cancelText:"取消",onOk:(n=Object(u.a)(m.a.mark((function n(){var i,a;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r){n.next=3;break}return c.b.warn("分数不能为空或为0"),n.abrupt("return",Promise.reject());case 3:"COMBINATION"===e.type?(i={type:null==e?void 0:e.type,score:r,scoreTotal:r*(null==t?void 0:t.length)},P(i)):(a={type:null==e?void 0:e.type,score:r,scoreTotal:r*e.questions_count},P(a));case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})}(e)},type:"primary",ghost:!0,className:"mr20"},"设置得分"),v.a.createElement(s.a,{onClick:function(){return i=null===(n=(t=e).questions)||void 0===n?void 0:n.map((function(e){return e.id})),a=t.name,void(o=h.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"温馨提示",content:"确认更换".concat(a,"中的所有试题吗?"),cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(r=Object(u.a)(m.a.mark((function e(){return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.update({cancelButtonProps:{disabled:!0}}),e.next=3,G({seleted_item_bank_ids:i},{type:t.type});case 3:o.update({cancelButtonProps:{disabled:!1}}),c.b.success("已重新随机生成".concat(a,"试题"));case 5:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})}));var t,n,r,i,a,o},type:"primary",ghost:!0},"随机更换"))),null==e||null===(r=e.questions)||void 0===r?void 0:r.map((function(t,n){return J===t.id?v.a.createElement("div",{id:"Anchor_".concat(t.id),className:y.a.content,style:{padding:0,marginTop:10},key:t.id},v.a.createElement("div",{style:{float:"right",marginTop:-6}},v.a.createElement(s.a,{onClick:function(){return X(null)},className:"mr20",type:"primary",ghost:!0},"取消"),v.a.createElement(s.a,{onClick:function(){return fe(null==e?void 0:e.type,t)},type:"primary"},"保存")),function(e,t){if(console.log(e,222),"SINGLE"===t)return v.a.createElement(v.a.Fragment,null,v.a.createElement(Z,{ref:V,editData:e,isEdit:!0}),v.a.createElement(a.a,null));if("MULTIPLE"===t)return v.a.createElement(v.a.Fragment,null,v.a.createElement(Q,{ref:V,editData:e,isEdit:!0}),v.a.createElement(a.a,null));if("JUDGMENT"===t)return v.a.createElement(v.a.Fragment,null,v.a.createElement(K,{ref:V,editData:e,isEdit:!0}),v.a.createElement(a.a,null));if("COMPLETION"===t)return v.a.createElement(v.a.Fragment,null,v.a.createElement(z,{ref:V,editData:e,isEdit:!0}),v.a.createElement(a.a,null));if("SUBJECTIVE"===t)return v.a.createElement(v.a.Fragment,null,v.a.createElement(ee,{ref:V,editData:e,isEdit:!0}),v.a.createElement(a.a,null));if("COMBINATION"===t)return v.a.createElement(v.a.Fragment,null,v.a.createElement(ie,{ref:V,editData:e,isEdit:!0}),v.a.createElement(a.a,null));var n;"PROGRAM"===t&&w.d.push("/problems/".concat(null==e||null===(n=e.program_attr)||void 0===n?void 0:n.identifier,"/edit?type=exercises&express_id=").concat(ae.categoryId,"&question_id=").concat(null==e?void 0:e.id,"&score=").concat(null==e?void 0:e.score,"&callback_url=").concat(location.pathname,"&select=").concat(H,"&exercise=true"))}(t,e.type)):v.a.createElement("div",{id:"Anchor_".concat(t.id),className:y.a.content,key:t.id},v.a.createElement("div",{className:y.a.titleWrap},v.a.createElement(_.a,{style:{paddingRight:10},className:y.a.titleHtml,value:n+1+"、"+"".concat("combination"===(null==t?void 0:t.item_type)?"(题干)":"")+t.name}),F&&v.a.createElement(s.a,{disabled:me,onClick:function(){J?c.b.warn("先保存或取消当前正在编辑的试题"):X(t.id)},type:"primary",className:"mr20",style:{marginLeft:"auto"},ghost:!0},"编辑"),v.a.createElement(s.a,{disabled:me,onClick:function(){return function(e,t,n,r){var i,a,o=null===(i=r.questions)||void 0===i?void 0:i.map((function(e){return e.id})),s=h.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"温馨提示",content:"确认要更换该试题吗?",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(a=Object(u.a)(m.a.mark((function r(){return m.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return s.update({cancelButtonProps:{disabled:!0}}),r.next=3,G({single_question_id:e,seleted_item_bank_ids:o},{type:t,index:n});case 3:s.update({cancelButtonProps:{disabled:!1}}),c.b.success("已重新随机生成试题");case 5:case"end":return r.stop()}}),r)}))),function(){return a.apply(this,arguments)})})}(t.id,e.type,n,e)},type:"primary",ghost:!0},"换一题")),("SINGLE"===e.type||"JUDGMENT"===e.type||"MULTIPLE"===e.type)&&(l=t,f=[],v.a.createElement(v.a.Fragment,null,v.a.createElement("aside",{className:y.a.single},null==l||null===(d=l.choices)||void 0===d?void 0:d.map((function(e,t){return e.is_answer&&f.push(ce[t]),v.a.createElement("ul",{key:t},v.a.createElement("li",null,ce[t],"、"),v.a.createElement("li",null,v.a.createElement(_.a,{value:e.choice_text})))}))),v.a.createElement("div",{className:y.a.analysis},v.a.createElement("div",null,"正确答案:",f.join(""),v.a.createElement("span",{className:"ml30"},"难度:",le[l.difficulty])),v.a.createElement("aside",null,v.a.createElement("span",{className:y.a.text},"解析:"),v.a.createElement(_.a,{value:l.analysis?l.analysis:"暂无解析"})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==l?void 0:l.discipline_name,"/").concat(null==l?void 0:l.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==l?void 0:l.tag_discipline_name))))),"COMPLETION"===e.type&&function(e){var t,n=null==e||null===(t=e.standard_answer)||void 0===t?void 0:t.map((function(e){var t;return"答案(填空".concat(e.position,"):").concat(null==e||null===(t=e.answer_text)||void 0===t?void 0:t.join("、"))}));return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:y.a.analysis},v.a.createElement("div",null,"正确答案:",n),v.a.createElement("aside",null,v.a.createElement("span",{className:y.a.text},"解析:"),v.a.createElement(_.a,{value:e.analysis?e.analysis:"暂无解析"})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==e?void 0:e.discipline_name,"/").concat(null==e?void 0:e.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==e?void 0:e.tag_discipline_name))))}(t),"SUBJECTIVE"===e.type&&function(e){var t;return v.a.createElement("div",{className:y.a.analysis},v.a.createElement("div",null,"正确答案:",null==e||null===(t=e.answer_texts)||void 0===t?void 0:t[0]),v.a.createElement("aside",null,v.a.createElement("span",{className:y.a.text},"解析:"),v.a.createElement(_.a,{value:e.analysis?e.analysis:"暂无解析"})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==e?void 0:e.discipline_name,"/").concat(null==e?void 0:e.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==e?void 0:e.tag_discipline_name)))}(t),"PROGRAM"===e.type&&function(e){var t;return v.a.createElement("div",{className:y.a.analysis},v.a.createElement("aside",null,v.a.createElement("span",{className:y.a.text},"预期输出:"),v.a.createElement(_.a,{value:null==e||null===(t=e.program_attr)||void 0===t?void 0:t.description})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==e?void 0:e.discipline_name,"/").concat(null==e?void 0:e.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==e?void 0:e.tag_discipline_name)))}(t),"COMBINATION"===e.type&&(r=t,i=n,v.a.createElement("div",null,null==r||null===(o=r.sub_item_banks)||void 0===o?void 0:o.map((function(e,t){var n,a=[];return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333"}},i+1+"."+(t+1),"(单选题)",e.name),v.a.createElement("aside",{className:y.a.single},null==e||null===(n=e.choices)||void 0===n?void 0:n.map((function(e,t){return e.is_answer&&a.push(ce[t]),v.a.createElement("ul",{key:t},v.a.createElement("li",null,ce[t],"、"),v.a.createElement("li",null,v.a.createElement(_.a,{value:e.choice_text})))}))),v.a.createElement("div",{className:y.a.analysis},v.a.createElement("div",null,"正确答案:",a.join(""),v.a.createElement("span",{className:"ml30"},"难度:",le[e.difficulty])),v.a.createElement("aside",null,v.a.createElement("span",{className:y.a.text},"解析:"),v.a.createElement(_.a,{value:e.analysis?e.analysis:"暂无解析"})),v.a.createElement("ul",null,v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"方向&课程:"),"".concat(null==r?void 0:r.discipline_name,"/").concat(null==r?void 0:r.sub_discipline_name)),v.a.createElement("li",null,v.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"知识点:"),null==r?void 0:r.tag_discipline_name))))})))),v.a.createElement("div",null));var r,i,o,l,d,f})))}))),v.a.createElement("div",{className:y.a.btnsElse,id:"preview_btns_else"},F?he():de()),v.a.createElement("div",{className:y.a.btnsWrap,id:"preview_btns"},v.a.createElement("div",{className:y.a.btns},F?he():de()))))}},sboe: +/*!*************************************************!*\ + !*** ./node_modules/rc-tree/es/contextTypes.js ***! + \*************************************************/ +/*! exports provided: TreeContext */ +/*! exports used: TreeContext */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! react */"q1tI"),i=r.createContext(null)},t23M: +/*!*****************************************************!*\ + !*** ./node_modules/rc-resize-observer/es/index.js ***! + \*****************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/classCallCheck */"1OyB"),a=n(/*! @babel/runtime/helpers/esm/createClass */"vuIU"),o=n(/*! @babel/runtime/helpers/esm/inherits */"Ji7U"),s=n(/*! @babel/runtime/helpers/esm/createSuper */"LK+K"),l=n(/*! react */"q1tI"),c=n(/*! rc-util/es/Dom/findDOMNode */"m+aA"),u=n(/*! rc-util/es/Children/toArray */"Zm9Q"),d=n(/*! rc-util/es/warning */"Kwbf"),h=n(/*! rc-util/es/ref */"c+Xe"),f=n(/*! resize-observer-polyfill */"bdgK"),p=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.childNode=null,e.currentElement=null,e.state={width:0,height:0,offsetHeight:0,offsetWidth:0},e.onResize=function(t){var n=e.props.onResize,i=t[0].target,a=i.getBoundingClientRect(),o=a.width,s=a.height,l=i.offsetWidth,c=i.offsetHeight,u=Math.floor(o),d=Math.floor(s);if(e.state.width!==u||e.state.height!==d||e.state.offsetWidth!==l||e.state.offsetHeight!==c){var h={width:u,height:d,offsetWidth:l,offsetHeight:c};e.setState(h),n&&Promise.resolve().then((function(){n(Object(r.a)(Object(r.a)({},h),{},{offsetWidth:l,offsetHeight:c}))}))}},e.setChildNode=function(t){e.childNode=t},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){if(this.props.disabled)this.destroyObserver();else{var e=Object(c.a)(this.childNode||this);e!==this.currentElement&&(this.destroyObserver(),this.currentElement=e),!this.resizeObserver&&e&&(this.resizeObserver=new f.default(this.onResize),this.resizeObserver.observe(e))}}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var e=this.props.children,t=Object(u.a)(e);if(t.length>1)Object(d.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===t.length)return Object(d.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var n=t[0];if(l.isValidElement(n)&&Object(h.c)(n)){var r=n.ref;t[0]=l.cloneElement(n,{ref:Object(h.a)(r,this.setChildNode)})}return 1===t.length?t[0]:t.map((function(e,t){return!l.isValidElement(e)||"key"in e&&null!==e.key?e:l.cloneElement(e,{key:"".concat("rc-observer-key","-").concat(t)})}))}}]),n}(l.Component);p.displayName="ResizeObserver",t.a=p},tWlo: +/*!*******************************************!*\ + !*** ./src/assets/images/icons/anony.png ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkVCNENBMTM0OENGMTExRTk4NzNCRkMxMzdBMjc5MEY5IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkVCNENBMTM1OENGMTExRTk4NzNCRkMxMzdBMjc5MEY5Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RUI0Q0ExMzI4Q0YxMTFFOTg3M0JGQzEzN0EyNzkwRjkiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RUI0Q0ExMzM4Q0YxMTFFOTg3M0JGQzEzN0EyNzkwRjkiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7p3KzkAAAFvElEQVR42sRae0ybVRQ/peVRaFce8pwgj1Je5TFsEHGbMAkzmqiJyba4hYh/LJlxiRr9Z0aNGv8xvhKTGckM2zKWmGEgU7MsPnCZIrKBjMcKY9BCBMqjjEcLtFDwHPZVC12h934f8yS/P6Dfud/5nXvvueec+8neOPEuSCAxiDJEMSITkYKIRoQJv9sREwgTogfRjGhEjIt9sUKEbhSiEvEC4mGEbJNngxGRiAzEk8L/VhGtiPOIswgrjxEBHDrxiE8Qg4hPEYYtjPclMkGXxhhCfIFI2E4CNFtvIm4hXvdYHlJIKOIVRK/wjkCpCaQjWhAfIVSwfaIS3kHvypaKwLOI64hdcP+kAPEn4jmxBI4ivkXsgPsvNBt1gg1cBI4hvkLI4f8TuWDDMdYw+owQFdh3Y6gSCnL1oNOmQnxcHAQHB8HCwiLMzM7C8KgFjD23oN9khtXVVZZhyZZhxEV/CGQhalk9r1AoYO9jxfBokQGCgoK8SBHi42LBsCsfJq1TcOnHn+F2v4llJsimIoRx3Q8le0o9/6bwdRmRxGJ8ZEQ4vHjkEORkZYBcLvdrlvL0OeBwOuDv4RF/X0Ne2Y34GrHiaw+8ishnMT4tNRmOVlVCTPQDzKfY/vJ9kJWpY1Ej217ztYnpFHyH6UjGJXH4wPOgVIZw7VAi8XRFOSjkTKv1bc8T25PACdZDan95mV9LZjNRq1Wg02lZw+tbGwnQ/L/EMooyJASSkxIliZUp7ONUCTb/S+AI2cTqOZlMJgmBcI2GVUUp2LyOAJMwxvHN04EAnqQYDrsJUDFSyKrtdC5JRmDR4eBRoxokgQjs48nn5+fnJSNgt3ONRTaXEYFHeLSXlpd5Peclk1Yrr6ohQKhhuWR6ekYSAiOWMV7VDCKg5Z0/uwTLaNnlAssYd22fTgRieTRz9dmQlpIsmgCdwuWle3nVY4mAmkczLCxUsk0cEaHhVVUH8GqOT0xKRmB6ZpZX1UkE5ng0zeYhsNntkhBgqAs2yhwR4AoBrpUVaO/oEm38nelp6B/gJnCHCNzm1f79jxaWgsRLbDY7XKj/Dlb405I+ItDDqz2/sACnTp9DEqNc+qfO1MLwyKiYCewNEPov3EK+G59k39BOp3Nt+YiUViLQKNjBH8sV7EXNivhslgb4xb2J28SMtMSRmbrwBBYpZPOI+xw4J2aka23tzB4VETrdct6zoCECC7wjjWIy1tbewZT//9R4RYzxZOtZTwK0C2vEjHjT2Ov3sx2d3TA7ZxPzuhrB5nVdiQ8pNPPvKP+XkEjjbYKtXm0VOpHe5x01KDDI72dFtmI+EGz1IkDyOeIvnlETH/T/digqKoLXeLLts3UNgY0REXGQZpmpqtCmrjV1/ZWcrEzIzEhnTtwQhwQb/5vNDc1dkinak4gDsMUFSEhwMJQ9vhueqihnWhYBMhnokYRGowGLZRwcW9fWLsGxTV6HqA8F6sMfR5z0qiDUKsjQpoEuPQ1SsSILVPDd1FJTrDA/Fwry9NDX1w9dxh7MSs2+ytTjcI+7gc0IkHwpMD+JnpbnZGdCXk4WPJSUKFlHzj0bGTrtGqhZNjJqgQHzIHRjWMbzhd7/MqLaZxqzxfjVFU+UjhcZCs+gp7f9nowcszMhfg17SoptSKDyym9N9cbePt8O2GrQ5pbrDRMTkwbe6MQpN6hfFRUVWa+Qb+7je23ideLAtPdGZ/cUZpw1iTsTFtFLJcBwEc2RIryHqELvW2q/qQPT4JA4AmupL5aP/Saza8A0eDU2Jvr0DrWaNkEe3L32kULmhXV+cHHR8cOvV5tcDd9f8qvm9ouAW2Zm5yhpm5uwWi9HRoRXq1UqC9zt08cDe391VUiJPyaPo+F1zddaZy80XFyLRv52v2ViPrehiJSvz6Z7rthQpZI+t6E+K91yuj+3UXnkL+7PbYxCFdiIKfgYdTcohHZ23QTnEntd8Y8AAwCTubpzlq2wWAAAAABJRU5ErkJggg=="},tf39: +/*!***********************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/Exercise/Detail/index.less?modules ***! + \***********************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___15tXk",flex_space_between:"flex_space_between___2JIaf",flex_box_vertical_center:"flex_box_vertical_center___3168W",flex_box_center_end:"flex_box_center_end___16myc",flex_box_column:"flex_box_column___Ye8vh",title:"title___z0esv",export:"export___1cim9",bg:"bg___1nEgJ",tabs:"tabs___1HwEE"}},u2Z1: +/*!********************************************!*\ + !*** ./src/components/Knowledge/index.tsx ***! + \********************************************/ +/*! exports provided: Knowledge */ +/*! exports used: Knowledge */function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));n(/*! antd/es/message/style */"miYZ");var r=n(/*! antd/es/message */"tsqr"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),a=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),o=(n(/*! antd/es/modal/style */"2qtc"),n(/*! antd/es/modal */"kLXV")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),c=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),u=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),d=n.n(u),h=n(/*! react */"q1tI"),f=n.n(h),p=n(/*! @/utils/fetch */"ErOA"),m=n(/*! ./index.less?modules */"i58Z"),g=n.n(m),v=n(/*! ./icon.png */"T1X5"),b=n.n(v),y=c.a.Option,x=function(e){var t=e.subId,n=e.value,u=e.selectvalues,m=e.disabled,v=e.knowledgeOptions,x=void 0===v?[]:v,E=e.onChange,_=void 0===E?function(){}:E,k=e.onAddKnowledgeFinish,w=void 0===k?function(){}:k,S=Object(h.useRef)(),C=Object(h.useState)([]),O=Object(l.a)(C,2),A=O[0],T=O[1];n=n||[];Object(h.useEffect)((function(){(null==u?void 0:u.length)>0&&(T(Object(s.a)(u)),_(Object(s.a)(u)))}),[x]),Object(h.useEffect)((function(){var e;(null===(e=n)||void 0===e?void 0:e.length)>0&&_(Object(s.a)(n))}),[x]);return f.a.createElement("div",{className:g.a.wrap},f.a.createElement(c.a,{disabled:!t||m,className:"mr5",style:{width:"242px"},onChange:function(e,t){e?(T([t.key]),_([t.key])):(T([]),_([]))},showSearch:!0,allowClear:!0,value:null==x?void 0:x.filter((function(e){return(null==A?void 0:A.includes(null==e?void 0:e.id))||(null==A?void 0:A.includes((null==e?void 0:e.id)+""))})).map((function(e){return e.name}))},null==x?void 0:x.map((function(e){return f.a.createElement(y,{key:e.id,value:e.name},f.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},f.a.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},e.name),f.a.createElement("span",null,"personal"===e.type?"(自用)":"")))}))),f.a.createElement("button",{disabled:!t,className:"".concat(g.a.addKnowledge," ").concat(t?"":g.a.disabled),onClick:function(e){e.preventDefault(),S.current="",o.a.confirm({centered:!0,width:700,okText:"确定",cancelText:"取消",icon:null,title:"新建知识点",className:"custom-modal-divider",content:f.a.createElement("div",{className:"font14"},f.a.createElement("div",{style:{display:"flex",marginTop:"48px",marginBottom:"36px"}},f.a.createElement("img",{src:b.a,style:{width:"108px",height:"108px",marginRight:"29px"}}),"您填写的知识点暂时仅对本人可见,平台审核通过后将列入公开知识点,对所有用户可见;",f.a.createElement("br",null),"平台审核过程中有权删除不合适的知识点(包括但不限于错误、非法、不雅、不匹配当前课程等情形),删除后可能影响您的试题的正常使用。",f.a.createElement("br",null),"请认真填写与教学内容相关的真实知识点 ",f.a.createElement("br",null)),f.a.createElement(a.a,{className:"mt5",maxLength:20,style:{marginBottom:"42px"},placeholder:"请输入不超过20字的知识点名称",defaultValue:S.current,onChange:function(e){S.current=e.target.value}})),onOk:function(){return new Promise(function(){var e=Object(i.a)(d.a.mark((function e(n,i){var a,o;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S.current){e.next=3;break}return r.b.warn("请输入知识点名称"),e.abrupt("return",i());case 3:if(!(S.current.length>20)){e.next=6;break}return r.b.warn("请输入不超过20字的知识点名称"),e.abrupt("return",i());case 6:return e.next=8,Object(p.a)("/api/tag_disciplines.json",{method:"post",body:{name:S.current,sub_discipline_id:t}});case 8:return 0===(null==(a=e.sent)?void 0:a.status)&&(w({id:a.tag_discipline_id,name:S.current,type:"personal"}),(o=[]).push(a.tag_discipline_id),_([].concat(o)),T([a.tag_discipline_id]),_([].concat(o))),e.abrupt("return",n());case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}())}})}},"新建知识点"))}},u3os: +/*!***********************************************!*\ + !*** ./node_modules/size-sensor/lib/index.js ***! + \***********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ver=t.clear=t.bind=void 0;var r=n(/*! ./sensorPool */"P4Qj");t.bind=function(e,t){var n=(0,r.getSensor)(e);return n.bind(t),function(){n.unbind(t)}};t.clear=function(e){var t=(0,r.getSensor)(e);(0,r.removeSensor)(t)};t.ver="1.0.1"},uJ6K: +/*!***************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/Exercise/Export/components/Head/index.less?modules ***! + \***************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={wrap:"wrap___1AALq",img:"img___20GEO",table:"table___26NT5",totalScore:"totalScore___1t1Bx",people:"people___BMR7K",glassSeal:"glassSeal___2woZ-"}},ueOF: +/*!*******************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/Exercise/Detail/components/Checking/index.less?modules ***! + \*******************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___3u1kD",flex_space_between:"flex_space_between___1iSrL",flex_box_vertical_center:"flex_box_vertical_center___18buA",flex_box_center_end:"flex_box_center_end___35UIs",flex_box_column:"flex_box_column___2UKLk",customModal:"customModal___ppNnJ",checking:"checking___3Jkqo",content:"content___1lP2Z",group:"group___29dCl",footer:"footer___3jXcc"}},ulZh: +/*!*****************************************!*\ + !*** ./node_modules/hls.js/dist/hls.js ***! + \*****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;"undefined"!=typeof window&&(r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js": +/*!*********************************************!*\ + !*** ./node_modules/eventemitter3/index.js ***! + \*********************************************/ +/*! no static exports found */function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function a(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,r,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,r||e,a),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new a:delete e._events[t]}function c(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(i=!1)),c.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},c.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,o=new Array(a);r0}),!1)}e.exports=function(e,t){t=t||{};var i={main:n.m},s=t.all?{main:Object.keys(i.main)}:function(e,t){for(var n={main:[t]},r={main:[]},i={main:{}};o(n);)for(var s=Object.keys(n),l=0;l=2*d/f||y<=E)){var _,k=Number.POSITIVE_INFINITY;for(_=e.level-1;_>m&&!((k=d*p[_].maxBitrate/(6.4*b))=y)){var w=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+_+"\n Current BW estimate: "+(Object(r.isFiniteNumber)(w)?(w/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+y.toFixed(3)+" s\n Estimated load time for the next fragment: "+k.toFixed(3)+" s\n Time to underbuffer: "+E.toFixed(3)+" s"),n.nextLoadLevel=_,this.bwEstimator.sample(h,u.loaded),this.clearTimer(),e.loader&&(this.fragCurrent=this.partCurrent=null,e.loader.abort()),n.trigger(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:u})}}}}}},h.onFragLoaded=function(e,t){var n=t.frag,i=t.part;if(n.type===l.PlaylistLevelType.MAIN&&Object(r.isFiniteNumber)(n.sn)){var o=i?i.stats:n.stats,s=i?i.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[n.level],u=(c.loaded?c.loaded.bytes:0)+o.loaded,d=(c.loaded?c.loaded.duration:0)+s;c.loaded={bytes:u,duration:d},c.realBitrate=Math.round(8*u/d)}if(n.bitrateTest){var h={stats:o,frag:n,part:i,id:n.type};this.onFragBuffered(a.Events.FRAG_BUFFERED,h),n.bitrateTest=!1}}},h.onFragBuffered=function(e,t){var n=t.frag,r=t.part,i=r?r.stats:n.stats;if(!i.aborted&&n.type===l.PlaylistLevelType.MAIN&&"initSegment"!==n.sn){var a=i.parsing.end-i.loading.start;this.bwEstimator.sample(a,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},h.onError=function(e,t){switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},h.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},h.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,a=n.minAutoLevel,s=n.media,l=t?t.duration:e?e.duration:0,u=s?s.currentTime:0,d=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,h=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,f=(o.BufferHelper.bufferInfo(s,u,i.maxBufferHole).end-u)/d,p=this.findBestLevel(h,a,r,f,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var m=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(!f){var b=this.bitrateTestDelay;b&&(m=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-b,c.logger.trace("bitrate test took "+Math.round(1e3*b)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*m)+" ms"),g=v=1)}return p=this.findBestLevel(h,a,r,f+m,g,v),Math.max(p,0)},h.findBestLevel=function(e,t,n,r,i,a){for(var o,s=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,d=this.hls.levels,h=d[u],f=!(null==h||null===(o=h.details)||void 0===o||!o.live),p=null==h?void 0:h.codecSet,m=l?l.duration:s?s.duration:0,g=n;g>=t;g--){var v=d[g];if(v&&(!p||v.codecSet===p)){var b=v.details,y=(l?null==b?void 0:b.partTarget:null==b?void 0:b.averagetargetduration)||m,x=void 0;x=g<=u?i*e:a*e;var E=d[g].maxBitrate,_=E*y/x;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(x)+"/"+E+"/"+y+"/"+r+"/"+_),x>E&&(!_||f&&!this.bitrateTestDelay||_0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=i.State.IDLE):(this.loadedmetadata=!1,this.state=i.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},E.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_TRACK:var t,n=this.levels,r=this.trackId,a=null==n||null===(t=n[r])||void 0===t?void 0:t.details;if(a){if(this.waitForCdnTuneIn(a))break;this.state=i.State.WAITING_INIT_PTS}break;case i.State.FRAG_LOADING_WAITING_RETRY:var s,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=i.State.IDLE);break;case i.State.WAITING_INIT_PTS:var u=this.waitingData;if(u){var d=u.frag,h=u.part,f=u.cache,m=u.complete;if(void 0!==this.initPTS[d.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.FRAG_LOADING;var g={frag:d,part:h,payload:f.flush(),networkDetails:null};this._handleFragmentLoadProgress(g),m&&e.prototype._handleFragmentLoadComplete.call(this,g)}else if(this.videoTrackCC!==this.waitingVideoCC)v.logger.log("Waiting fragment cc ("+d.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var b=this.getLoadPosition(),y=o.BufferHelper.bufferInfo(this.mediaBuffer,b,this.config.maxBufferHole);Object(p.fragmentWithinToleranceTest)(y.end,this.config.maxFragLookUpTolerance,d)<0&&(v.logger.log("Waiting fragment cc ("+d.cc+") @ "+d.start+" cancelled because another fragment at "+y.end+" is needed"),this.clearWaitingFragment())}}else this.state=i.State.IDLE}this.onTickEnd()},E.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.IDLE)},E.onTickEnd=function(){var e=this.media;if(e&&e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length&&(this.loadedmetadata=!0),this.lastCurrentTime=e.currentTime}},E.doTickIdle=function(){var e,t,n=this.hls,r=this.levels,o=this.media,s=this.trackId,l=n.config;if(r&&r[s]&&(o||!this.startFragRequested&&l.startFragPrefetch)){var d=r[s].details;if(!d||d.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(d))this.state=i.State.WAITING_TRACK;else{this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,u.ElementaryStreamTypes.AUDIO,c.PlaylistLevelType.AUDIO));var h=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,c.PlaylistLevelType.AUDIO);if(null!==h){var f=h.len,p=this.getMaxBufferLength(),m=this.audioSwitch;if(!(f>=p)||m){if(!m&&this._streamEnded(h,d))return n.trigger(a.Events.BUFFER_EOS,{type:"audio"}),void(this.state=i.State.ENDED);var g=d.fragments[0].start,v=h.end;if(m){var b=this.getLoadPosition();v=b,d.PTSKnown&&bg||h.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),o.currentTime=g+.05)}var y=this.getNextFragment(v,d);y?"identity"!==(null===(e=y.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=y.decryptdata)&&void 0!==t&&t.key?this.loadFragment(y,d,v):this.loadKey(y,d):this.bufferFlushed=!0}}}}},E.getMaxBufferLength=function(){var t=e.prototype.getMaxBufferLength.call(this),n=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===n?t:Math.max(t,n.len)},E.onMediaDetaching=function(){this.videoBuffer=null,e.prototype.onMediaDetaching.call(this)},E.onAudioTracksUpdated=function(e,t){var n=t.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(e){return new l.Level(e)}))},E.onAudioTrackSwitching=function(e,t){var n=!!t.url;this.trackId=t.id;var r=this.fragCurrent;null!=r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.audioSwitch=!0,this.state=i.State.IDLE):this.state=i.State.STOPPED,this.tick()},E.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},E.onLevelLoaded=function(e,t){this.mainDetails=t.details},E.onAudioTrackLoaded=function(e,t){var n,r=this.levels,a=t.details,o=t.id;if(r){this.log("Track "+o+" loaded ["+a.startSN+","+a.endSN+"],duration:"+a.totalduration);var s=r[o],l=0;if(a.live||null!==(n=s.details)&&void 0!==n&&n.live){var c=this.mainDetails;if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed||!c)return;!s.details&&a.hasProgramDateTime&&c.hasProgramDateTime?(Object(m.alignMediaPlaylistByPDT)(a,c),l=a.fragments[0].start):l=this.alignPlaylists(a,s.details)}s.details=a,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(s.details,l),this.state!==i.State.WAITING_TRACK||this.waitForCdnTuneIn(a)||(this.state=i.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+o)},E._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,a=e.payload,o=this.config,s=this.trackId,l=this.levels;if(l){var u=l[s];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 m=o.defaultAudioCodec||u.audioCodec||"mp4a.40.2",g=this.transmuxer;g||(g=this.transmuxer=new h.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var b=this.initPTS[n.cc],y=null===(t=n.initSegment)||void 0===t?void 0:t.data;if(void 0!==b){var x=r?r.index:-1,E=-1!==x,_=new f.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,a.byteLength,x,E);g.push(a,y,m,"",n,r,p.totalduration,!1,_,b)}else v.logger.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+s),(this.waitingData=this.waitingData||{frag:n,part:r,cache:new d.default,complete:!1}).cache.push(new Uint8Array(a)),this.waitingVideoCC=this.videoTrackCC,this.state=i.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},E._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},E.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},E.onBufferCreated=function(e,t){var n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},E.onFragBuffered=function(e,t){var n=t.frag,r=t.part;n.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(n)?this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==n.sn&&(this.fragPrevious=n,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(n,r)))},E.onError=function(t,n){switch(n.details){case g.ErrorDetails.FRAG_LOAD_ERROR:case g.ErrorDetails.FRAG_LOAD_TIMEOUT:case g.ErrorDetails.KEY_LOAD_ERROR:case g.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,n);break;case g.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case g.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==i.State.ERROR&&this.state!==i.State.STOPPED&&(this.state=n.fatal?i.State.ERROR:i.State.IDLE,this.warn(n.details+" while loading frag, switching to "+this.state+" state"));break;case g.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===n.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var r=!0,a=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);a&&a.len>.5&&(r=!this.reduceMaxBufferLength(a.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},E.onBufferFlushed=function(e,t){t.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},E._handleTransmuxComplete=function(e){var t,n="audio",r=this.hls,o=e.remuxResult,s=e.chunkMeta,l=this.getCurrentContext(s);if(!l)return this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(s.level);var c=l.frag,d=l.part,h=o.audio,f=o.text,p=o.id3,m=o.initSegment;if(!this.fragContextChanged(c)){if(this.state=i.State.PARSING,this.audioSwitch&&h&&this.completeAudioSwitch(),null!=m&&m.tracks&&(this._bufferInitSegment(m.tracks,c,s),r.trigger(a.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:n,tracks:m.tracks})),h){var g=h.startPTS,v=h.endPTS,y=h.startDTS,x=h.endDTS;d&&(d.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:g,endPTS:v,startDTS:y,endDTS:x}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,g,v,y,x),this.bufferFragmentData(h,c,d,s)}if(null!=p&&null!==(t=p.samples)&&void 0!==t&&t.length){var E=b({frag:c,id:n},p);r.trigger(a.Events.FRAG_PARSING_METADATA,E)}if(f){var _=b({frag:c,id:n},f);r.trigger(a.Events.FRAG_PARSING_USERDATA,_)}}},E._bufferInitSegment=function(e,t,n){if(this.state===i.State.PARSING){e.video&&delete e.video;var r=e.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(a.Events.BUFFER_CODECS,e);var o=r.initSegment;if(null!=o&&o.byteLength){var s={type:"audio",frag:t,part:null,chunkMeta:n,parent:t.type,data:o};this.hls.trigger(a.Events.BUFFER_APPENDING,s)}this.tick()}}},E.loadFragment=function(t,n,a){var o=this.fragmentTracker.getState(t);this.fragCurrent=t,(this.audioSwitch||o===s.FragmentState.NOT_LOADED||o===s.FragmentState.PARTIAL)&&("initSegment"===t.sn?this._loadInitSegment(t):n.live&&!Object(r.isFiniteNumber)(this.initPTS[t.cc])?(this.log("Waiting for video PTS in continuity counter "+t.cc+" of live stream before loading audio fragment "+t.sn+" of level "+this.trackId),this.state=i.State.WAITING_INIT_PTS):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,a)))},E.completeAudioSwitch=function(){var t=this.hls,n=this.media,r=this.trackId;n&&(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,t.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:r})},x}(i.default);t.default=x},"./src/controller/audio-track-controller.ts": +/*!**************************************************!*\ + !*** ./src/controller/audio-track-controller.ts ***! + \**************************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),o=n(/*! ../types/loader */"./src/types/loader.ts");function s(e,t){for(var n=0;n=t.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var n=t[this.trackId];this.log("Now switching to audio-track index "+e);var i=t[e],a=i.id,o=i.groupId,s=void 0===o?"":o,l=i.name,c=i.type,u=i.url;if(this.trackId=e,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(r.Events.AUDIO_TRACK_SWITCHING,{id:a,groupId:s,name:l,type:c,url:u}),!i.details||i.details.live){var d=this.switchParams(i.url,null==n?void 0:n.details);this.loadPlaylist(d)}}},h.selectInitialTrack=function(){var e=this.tracksInGroup;console.assert(e.length,"Initial audio track should be selected when tracks are known");var t=this.trackName,n=this.findTrackId(t)||this.findTrackId();-1!==n?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},h.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;nt.partTarget&&(c+=1)}if(Object(r.isFiniteNumber)(l))return new i.HlsUrlParameters(l,Object(r.isFiniteNumber)(c)?c:void 0,i.HlsSkip.No)}}},t.loadPlaylist=function(e){},t.shouldLoadTrack=function(e){return this.canLoad&&e&&!!e.url&&(!e.details||e.details.live)},t.playlistLoaded=function(e,t,n){var r=this,i=t.details,o=t.stats,s=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(i.advancedDateTime=Date.now()-s,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&Object(a.mergeDetails)(n,i),!this.canLoad||!i.live)return;var l,c=void 0,u=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var d=this.hls.config.lowLatencyMode,h=i.lastPartSn,f=i.endSN,p=i.lastPartIndex,m=h===f;-1!==p?(c=m?f+1:h,u=m?d?0:p:p+1):c=f+1;var g=i.age,v=g+i.ageHeader,b=Math.min(v-i.partTarget,1.5*i.targetduration);if(b>0){if(n&&b>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+b+" with playlist age: "+i.age),b=0;else{var y=Math.floor(b/i.targetduration);c+=y,void 0!==u&&(u+=Math.round(b%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+b+" skip sn "+y+" to part "+u)}i.tuneInGoal=b}if(l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u),d||!m)return void this.loadPlaylist(l)}else l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u);var x=Object(a.computeReloadInterval)(i,o);void 0!==c&&i.canBlockReload&&(x-=i.partTarget||1),this.log("reload live playlist "+e+" in "+Math.round(x)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),x)}else this.clearTimer()},t.getDeliveryDirectives=function(e,t,n,r){var a=Object(i.getSkipValue)(e,n);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,a=i.HlsSkip.No),new i.HlsUrlParameters(n,r,a)},t.retryLoadingOrFail=function(e){var t,n=this,r=this.hls.config,i=this.retryCount-1&&null!==(t=e.context)&&void 0!==t&&t.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+e.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return n.loadPlaylist()}),a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+e.details+'"')}else this.warn('cannot recover from error "'+e.details+'"'),this.clearTimer(),e.fatal=!0;return i},e}()},"./src/controller/base-stream-controller.ts": +/*!**************************************************!*\ + !*** ./src/controller/base-stream-controller.ts ***! + \**************************************************/ +/*! exports provided: State, default */function(e,t,n){"use strict";n.r(t),n.d(t,"State",(function(){return E})),n.d(t,"default",(function(){return _}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../task-loop */"./src/task-loop.ts"),a=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ../utils/logger */"./src/utils/logger.ts"),l=n(/*! ../events */"./src/events.ts"),c=n(/*! ../errors */"./src/errors.ts"),u=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),d=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),h=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),f=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=n(/*! ./level-helper */"./src/controller/level-helper.ts"),m=n(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),g=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),v=n(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),b=n(/*! ../types/loader */"./src/types/loader.ts");function y(e,t){for(var n=0;nt.start+t.duration+c;(s0&&a&&a.key&&a.iv&&"AES-128"===a.method){var o=self.performance.now();return t.decrypter.webCryptoDecrypt(new Uint8Array(i),a.key.buffer,a.iv.buffer).then((function(t){var i=self.performance.now();return r.trigger(l.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:o,tdecrypt:i}}),n.payload=t,n}))}return n})).then((function(n){var r=t.fragCurrent,i=t.hls,a=t.levels;if(!a)throw new Error("init load aborted, missing levels");var o=a[e.level].details;console.assert(o,"Level details are defined when init segment is loaded");var s=e.stats;t.state=E.IDLE,t.fragLoadError=0,e.data=new Uint8Array(n.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),n.frag===r&&i.trigger(l.Events.FRAG_BUFFERED,{stats:s,frag:r,part:null,id:e.type}),t.tick()})).catch((function(n){t.warn(n),t.resetFragmentLoading(e)}))},S.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},S.fragBufferedComplete=function(e,t){var n=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level+" "+v.default.toString(o.BufferHelper.getBuffered(n))),this.state=E.IDLE,this.tick()},S._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var n=e.frag,r=e.part,i=e.partsLoaded,a=!i||0===i.length||i.some((function(e){return!e})),o=new u.ChunkMetadata(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!a);t.flush(o)}},S._handleFragmentLoadProgress=function(e){},S._doFragLoad=function(e,t,n,i){var a=this;if(void 0===n&&(n=null),!this.levels)throw new Error("frag load aborted, missing levels");if(n=Math.max(e.start,n||0),this.config.lowLatencyMode&&t){var o=t.partList;if(o&&i){n>e.end&&t.fragmentHint&&(e=t.fragmentHint);var s=this.getNextPart(o,e,n);if(s>-1){var c=o[s];return this.log("Loading part sn: "+e.sn+" p: "+c.index+" cc: "+e.cc+" of playlist ["+t.startSN+"-"+t.endSN+"] parts [0-"+s+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=E.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,part:o[s],targetBufferTime:n}),this.doFragPartsLoad(e,o,s,i).catch((function(e){return a.handleFragLoadError(e)}))}if(!e.url||this.loadedEndOfParts(o,n))return Promise.resolve(null)}}return this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(t?"of ["+t.startSN+"-"+t.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),Object(r.isFiniteNumber)(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=E.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragmentLoader.load(e,i).catch((function(e){return a.handleFragLoadError(e)}))},S.doFragPartsLoad=function(e,t,n,r){var i=this;return new Promise((function(a,o){var s=[];!function n(c){var u=t[c];i.fragmentLoader.loadPart(e,u,r).then((function(r){s[u.index]=r;var o=r.part;i.hls.trigger(l.Events.FRAG_LOADED,r);var d=t[c+1];if(!d||d.fragment!==e)return a({frag:e,part:o,partsLoaded:s});n(c+1)})).catch(o)}(n)}))},S.handleFragLoadError=function(e){var t=e.data;return t&&t.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(l.Events.ERROR,t),null},S._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===E.PARSING){var n=t.frag,r=t.part,i=t.level,a=self.performance.now();n.stats.parsing.end=a,r&&(r.stats.parsing.end=a),this.updateLevelTiming(n,r,i,e.partial)}else this.fragCurrent||(this.state=E.IDLE)},S.getCurrentContext=function(e){var t=this.levels,n=e.level,r=e.sn,i=e.part;if(!t||!t[n])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+n+". The current chunk will not be buffered."),null;var a=t[n],o=i>-1?Object(p.getPartWith)(a,r,i):null,s=o?o.fragment:Object(p.getFragmentWithSN)(a,r,this.fragCurrent);return s?{frag:s,part:o,level:a}:null},S.bufferFragmentData=function(e,t,n,r){if(e&&this.state===E.PARSING){var i=e.data1,a=e.data2,o=i;if(i&&a&&(o=Object(d.appendUint8Array)(i,a)),o&&o.length){var s={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:o};this.hls.trigger(l.Events.BUFFER_APPENDING,s),e.dropped&&e.independent&&!n&&this.flushBufferGap(t)}}},S.flushBufferGap=function(e){var t=this.media;if(t)if(o.BufferHelper.isBuffered(t,t.currentTime)){var n=t.currentTime,r=o.BufferHelper.bufferInfo(t,n,0),i=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),s=Math.max(Math.min(e.start-a,r.end-a),n+a);e.start-s>a&&this.flushMainBuffer(s,e.start)}else this.flushMainBuffer(0,e.start)},S.getFwdBufferInfo=function(e,t){var n=this.config,i=this.getLoadPosition();if(!Object(r.isFiniteNumber)(i))return null;var a=o.BufferHelper.bufferInfo(e,i,n.maxBufferHole);if(0===a.len&&void 0!==a.nextStart){var s=this.fragmentTracker.getBufferedFrag(i,t);if(s&&a.nextStart=n&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},S.getNextFragment=function(e,t){var n,r,i=t.fragments,a=i.length;if(!a)return null;var o,s=this.config,l=i[0].start;if(t.live){var c=s.initialLiveManifestSize;if(a-1&&nn.start&&n.loaded},S.getInitialLiveFragment=function(e,t){var n=this.fragPrevious,r=null;if(n){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=Object(f.findFragmentByPDT)(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){var a=t[i-e.startSN];n.cc===a.cc&&(r=a,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=Object(f.findFragWithCC)(t,n.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?e.fragmentEnd:e.edge,e))}return r},S.getFragmentAtPosition=function(e,t,n){var r,i=this.config,o=this.fragPrevious,s=n.fragments,l=n.endSN,c=n.fragmentHint,u=i.maxFragLookUpTolerance,d=!!(i.lowLatencyMode&&n.partList&&c);if(d&&c&&!this.bitrateTest&&(s=s.concat(c),l=c.sn),et-u?0:u;r=Object(f.findFragmentByPTS)(o,s,e,h)}else r=s[s.length-1];if(r){var p=r.sn-n.startSN,m=o&&r.level===o.level,g=s[p+1];if(this.fragmentTracker.getState(r)===a.FragmentState.BACKTRACKED){r=null;for(var v=p;s[v]&&this.fragmentTracker.getState(s[v])===a.FragmentState.BACKTRACKED;)r=o?s[v--]:s[--v];r||(r=g)}else o&&r.sn===o.sn&&!d&&m&&(r.sn=a-t.maxFragLookUpTolerance&&i<=o;if(null!==r&&n.duration>r&&(i"+e.startSN+" prev-sn: "+(a?a.sn:"na")+" fragments: "+s),d}return l},S.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},S.setStartPosition=function(e,t){var n=this.startPosition;if(n"+e))}}])&&y(_.prototype,k),w&&y(_,w),i}(i.default)},"./src/controller/buffer-controller.ts": +/*!*********************************************!*\ + !*** ./src/controller/buffer-controller.ts ***! + \*********************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ../errors */"./src/errors.ts"),s=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=n(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),d=Object(l.getMediaSource)(),h=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function e(e){var t=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 e=t.hls,n=t.media,r=t.mediaSource;a.logger.log("[buffer-controller]: Media source opened"),n&&(t.updateMediaElementDuration(),e.trigger(i.Events.MEDIA_ATTACHED,{media:n})),r&&r.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){a.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){a.logger.log("[buffer-controller]: Media source ended")},this.hls=e,this._initSourceBuffer(),this.registerListeners()}var t=e.prototype;return t.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},t.destroy=function(){this.unregisterListeners(),this.details=null},t.registerListeners=function(){var e=this.hls;e.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(i.Events.BUFFER_RESET,this.onBufferReset,this),e.on(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.on(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(i.Events.BUFFER_EOS,this.onBufferEos,this),e.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(i.Events.FRAG_PARSED,this.onFragParsed,this),e.on(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(i.Events.BUFFER_RESET,this.onBufferReset,this),e.off(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.off(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(i.Events.BUFFER_EOS,this.onBufferEos,this),e.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(i.Events.FRAG_PARSED,this.onFragParsed,this),e.off(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},t.onManifestParsed=function(e,t){var n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.details=null,a.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var n=this.media=t.media;if(n&&d){var r=this.mediaSource=new d;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(r),this._objectUrl=n.src}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,n=this._objectUrl;if(t){if(a.logger.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){a.logger.warn("[buffer-controller]: onMediaDetaching: "+e.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(n&&self.URL.revokeObjectURL(n),e.src===n?(e.removeAttribute("src"),e.load()):a.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(i.Events.MEDIA_DETACHED,void 0)},t.onBufferReset=function(){var e=this;this.getSourceBufferTypes().forEach((function(t){var n=e.sourceBuffer[t];try{n&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(n),e.sourceBuffer[t]=void 0)}catch(e){a.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",e)}})),this._initSourceBuffer()},t.onBufferCodecs=function(e,t){var n=this,r=this.getSourceBufferTypes().length;Object.keys(t).forEach((function(e){if(r){var i=n.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var a=t[e],o=a.codec,s=a.levelCodec,l=a.container;if((i.levelCodec||i.codec).replace(h,"$1")!==(s||o).replace(h,"$1")){var c=l+";codecs="+(s||o);n.appendChangeType(e,c)}}}else n.pendingTracks[e]=t[e]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},t.appendChangeType=function(e,t){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[e];i&&(a.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){a.logger.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",t)}};r.append(i,e)},t.onBufferAppending=function(e,t){var n=this,r=this.hls,l=this.operationQueue,c=this.tracks,u=t.data,d=t.type,h=t.frag,f=t.part,p=t.chunkMeta,m=p.buffering[d],g=self.performance.now();m.start=g;var v=h.stats.buffering,b=f?f.stats.buffering:null;0===v.start&&(v.start=g),b&&0===b.start&&(b.start=g);var y=c.audio,x="audio"===d&&1===p.id&&"audio/mpeg"===(null==y?void 0:y.container),E={execute:function(){if(m.executeStart=self.performance.now(),x){var e=n.sourceBuffer[d];if(e){var t=h.start-e.timestampOffset;Math.abs(t)>=.1&&(a.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+h.start+" (delta: "+t+") sn: "+h.sn+")"),e.timestampOffset=h.start)}}n.appendExecutor(u,d)},onStart:function(){},onComplete:function(){var e=self.performance.now();m.executeEnd=m.end=e,0===v.first&&(v.first=e),b&&0===b.first&&(b.first=e);var t=n.sourceBuffer,r={};for(var a in t)r[a]=s.BufferHelper.getBuffered(t[a]);n.appendError=0,n.hls.trigger(i.Events.BUFFER_APPENDED,{type:d,frag:h,part:f,chunkMeta:p,parent:h.type,timeRanges:r})},onError:function(e){a.logger.error("[buffer-controller]: Error encountered while trying to append to the "+d+" SourceBuffer",e);var t={type:o.ErrorTypes.MEDIA_ERROR,parent:h.type,details:o.ErrorDetails.BUFFER_APPEND_ERROR,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=o.ErrorDetails.BUFFER_FULL_ERROR:(n.appendError++,t.details=o.ErrorDetails.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(a.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0)),r.trigger(i.Events.ERROR,t)}};l.append(E,d)},t.onBufferFlushing=function(e,t){var n=this,r=this.operationQueue,o=function(e){return{execute:n.removeExecutor.bind(n,e,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(i.Events.BUFFER_FLUSHED,{type:e})},onError:function(t){a.logger.warn("[buffer-controller]: Failed to remove from "+e+" SourceBuffer",t)}}};t.type?r.append(o(t.type),t.type):this.getSourceBufferTypes().forEach((function(e){r.append(o(e),e)}))},t.onFragParsed=function(e,t){var n=this,r=t.frag,o=t.part,s=[],l=o?o.elementaryStreams:r.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&s.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&s.push("video")),0===s.length&&a.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var e=self.performance.now();r.stats.buffering.end=e,o&&(o.stats.buffering.end=e);var t=o?o.stats:r.stats;n.hls.trigger(i.Events.FRAG_BUFFERED,{frag:r,part:o,stats:t,id:r.type})}),s)},t.onFragChanged=function(e,t){this.flushBackBuffer()},t.onBufferEos=function(e,t){var n=this;this.getSourceBufferTypes().reduce((function(e,r){var i=n.sourceBuffer[r];return t.type&&t.type!==r||i&&!i.ended&&(i.ended=!0,a.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS")),e&&!(i&&!i.ended)}),!0)&&this.blockBuffers((function(){var e=n.mediaSource;e&&"open"===e.readyState&&e.endOfStream()}))},t.onLevelUpdated=function(e,t){var n=t.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.flushBackBuffer=function(){var e=this.hls,t=this.details,n=this.media,a=this.sourceBuffer;if(n&&null!==t){var o=this.getSourceBufferTypes();if(o.length){var l=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if(Object(r.isFiniteNumber)(l)&&!(l<0)){var c=n.currentTime,u=t.levelTargetDuration,d=Math.max(l,u),h=Math.floor(c/u)*u-d;o.forEach((function(n){var r=a[n];if(r){var o=s.BufferHelper.getBuffered(r);o.length>0&&h>o.start(0)&&(e.trigger(i.Events.BACK_BUFFER_REACHED,{bufferEnd:h}),t.live&&e.trigger(i.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:h}),e.trigger(i.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:h,type:n}))}}))}}}},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var e=this.details,t=this.hls,n=this.media,i=this.mediaSource,o=e.fragments[0].start+e.totalduration,s=n.duration,l=Object(r.isFiniteNumber)(i.duration)?i.duration:0;e.live&&t.config.liveDurationInfinity?(a.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),i.duration=1/0,this.updateSeekableRange(e)):(o>l&&o>s||!Object(r.isFiniteNumber)(s))&&(a.logger.log("[buffer-controller]: Updating Media Source duration to "+o.toFixed(3)),i.duration=o)}},t.updateSeekableRange=function(e){var t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&null!=t&&t.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+e.totalduration);t.setLiveSeekableRange(r,i)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&!e||2===r){this.createSourceBuffers(n),this.pendingTracks={};var a=this.getSourceBufferTypes();if(0===a.length)return void this.hls.trigger(i.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)"});a.forEach((function(e){t.executeNext(e)}))}},t.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var s in e)if(!t[s]){var l=e[s];if(!l)throw Error("source buffer exists for track "+s+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;a.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var d=t[s]=n.addSourceBuffer(u),h=s;this.addBufferListener(h,"updatestart",this._onSBUpdateStart),this.addBufferListener(h,"updateend",this._onSBUpdateEnd),this.addBufferListener(h,"error",this._onSBUpdateError),this.tracks[s]={buffer:d,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},r++}catch(e){a.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+e.message),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:u})}}r&&this.hls.trigger(i.Events.BUFFER_CREATED,{tracks:this.tracks})},t._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},t._onSBUpdateEnd=function(e){var t=this.operationQueue;t.current(e).onComplete(),t.shiftAndExecuteNext(e)},t._onSBUpdateError=function(e,t){a.logger.error("[buffer-controller]: "+e+" SourceBuffer error",t),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var n=this.operationQueue.current(e);n&&n.onError(t)},t.removeExecutor=function(e,t,n){var i=this.media,o=this.mediaSource,s=this.operationQueue,l=this.sourceBuffer[e];if(!i||!o||!l)return a.logger.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void s.shiftAndExecuteNext(e);var c=Object(r.isFiniteNumber)(i.duration)?i.duration:1/0,u=Object(r.isFiniteNumber)(o.duration)?o.duration:1/0,d=Math.max(0,t),h=Math.min(n,c,u);h>d?(a.logger.log("[buffer-controller]: Removing ["+d+","+h+"] from the "+e+" SourceBuffer"),console.assert(!l.updating,e+" sourceBuffer must not be updating"),l.remove(d,h)):s.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var n=this.operationQueue,r=this.sourceBuffer[t];if(!r)return a.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),void n.shiftAndExecuteNext(t);r.ended=!1,console.assert(!r.updating,t+" sourceBuffer must not be updating"),r.appendBuffer(e)},t.blockBuffers=function(e,t){var n=this;if(void 0===t&&(t=this.getSourceBufferTypes()),!t.length)return a.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(e);var r=this.operationQueue,i=t.map((function(e){return r.appendBlocker(e)}));Promise.all(i).then((function(){e(),t.forEach((function(e){var t=n.sourceBuffer[e];t&&t.updating||r.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,n){var r=this.sourceBuffer[e];if(r){var i=n.bind(this,e);this.listeners[e].push({event:t,listener:i}),r.addEventListener(t,i)}},t.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach((function(e){t.removeEventListener(e.event,e.listener)}))},e}()},"./src/controller/buffer-operation-queue.ts": +/*!**************************************************!*\ + !*** ./src/controller/buffer-operation-queue.ts ***! + \**************************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=function(){function e(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}var t=e.prototype;return t.append=function(e,t){var n=this.queues[t];n.push(e),1===n.length&&this.buffers[t]&&this.executeNext(t)},t.insertAbort=function(e,t){this.queues[t].unshift(e),this.executeNext(t)},t.appendBlocker=function(e){var t,n=new Promise((function(e){t=e})),r={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,e),n},t.executeNext=function(e){var t=this.buffers,n=this.queues,i=t[e],a=n[e];if(a.length){var o=a[0];try{o.execute()}catch(t){r.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(t),i&&i.updating||(a.shift(),this.executeNext(e))}}},t.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},t.current=function(e){return this.queues[e][0]},e}()},"./src/controller/cap-level-controller.ts": +/*!************************************************!*\ + !*** ./src/controller/cap-level-controller.ts ***! + \************************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts");function i(e,t){for(var n=0;n0&&this.mediaWidth>0){var e=this.hls.levels;if(e.length){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},o.getMaxLevel=function(t){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(r,i){return e.isLevelAllowed(i,n.restrictedLevels)&&i<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(i,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 e=this.media,t={width:0,height:0};if(e){var n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t},e.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},e.getMaxLevelByMediaSize=function(e,t,n){if(!e||!e.length)return-1;for(var r,i,a=e.length-1,o=0;o=t||s.height>=n)&&(r=s,!(i=e[o+1])||r.width!==i.width||r.height!==i.height)){a=o;break}}return a},t=e,a=[{key:"contentScaleFactor",get:function(){var e=1;try{e=self.devicePixelRatio}catch(e){}return e}}],(n=[{key:"mediaWidth",get:function(){return this.getDimensions().width*e.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*e.contentScaleFactor}}])&&i(t.prototype,n),a&&i(t,a),e}();t.default=a},"./src/controller/cmcd-controller.ts": +/*!*******************************************!*\ + !*** ./src/controller/cmcd-controller.ts ***! + \*******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../types/cmcd */"./src/types/cmcd.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts");function s(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nn&&(n=a.bitrate)}return n>0?n:NaN},t.getBufferLength=function(e){var t=this.hls.media,n=e===i.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return n&&t?1e3*a.BufferHelper.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},t.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},e.uuid=function(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)},e.serialize=function(e){for(var t,n=[],r=function(e){return!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e},i=function(e){return Math.round(e)},a=function(e){return 100*i(e/100)},o={br:i,d:i,bl:a,dl:a,mtp:a,nor:function(e){return encodeURIComponent(e)},rtp:a,tb:i},s=c(Object.keys(e||{}).sort());!(t=s()).done;){var l=t.value,u=e[l];if(r(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var d=o[l];d&&(u=d(u));var h=typeof u,f=void 0;f="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===h?l:"number"===h?l+"="+u:l+"="+JSON.stringify(u),n.push(f)}}return n.join(",")},e.toHeaders=function(t){for(var n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={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,s=Object.keys(t);o3)return void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;a.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(n,o)}}},c._generateLicenseRequestChallenge=function(e,t){switch(e.mediaKeySystemDomain){case o.KeySystems.WIDEVINE:return t}throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},c._requestLicense=function(e,t){a.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return a.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var o=this.getLicenseServerUrl(n.mediaKeySystemDomain),s=this._createLicenseXhr(o,e,t);a.logger.log("Sending license request to URL: "+o);var l=this._generateLicenseRequestChallenge(n,e);s.send(l)}catch(e){a.logger.error("Failure requesting DRM license: "+e),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(e,t){if(this._emeEnabled){var n=t.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)}},c.onMediaDetached=function(){var e=this._media,t=this._mediaKeysList;e&&(e.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map((function(e){if(e.mediaKeysSession)return e.mediaKeysSession.close().catch((function(){}))}))).then((function(){return e.setMediaKeys(null)})).catch((function(){})))},c.onManifestParsed=function(e,t){if(this._emeEnabled){var n=t.levels.map((function(e){return e.audioCodec})).filter((function(e){return!!e})),r=t.levels.map((function(e){return e.videoCodec})).filter((function(e){return!!e}));this._attemptKeySystemAccess(o.KeySystems.WIDEVINE,n,r)}},t=e,(n=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&s(t.prototype,n),l&&s(t,l),e}();t.default=l},"./src/controller/fps-controller.ts": +/*!******************************************!*\ + !*** ./src/controller/fps-controller.ts ***! + \******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=function(){function e(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching)},t.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},t.onMediaAttaching=function(e,t){var n=this.hls.config;if(n.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.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),n.fpsDroppedMonitoringPeriod)}},t.checkFPS=function(e,t,n){var a=performance.now();if(t){if(this.lastTime){var o=a-this.lastTime,s=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,c=1e3*s/o,u=this.hls;if(u.trigger(r.Events.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),c>0&&s>u.config.fpsDroppedMonitoringThreshold*l){var d=u.currentLevel;i.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=d)&&(d-=1,u.trigger(r.Events.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:u.currentLevel}),u.autoLevelCapping=d,this.streamController.nextLevelSwitch())}}this.lastTime=a,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.checkFPSInterval=function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},e}();t.default=a},"./src/controller/fragment-finders.ts": +/*!********************************************!*\ + !*** ./src/controller/fragment-finders.ts ***! + \********************************************/ +/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(e,t,n){"use strict";n.r(t),n.d(t,"findFragmentByPDT",(function(){return a})),n.d(t,"findFragmentByPTS",(function(){return o})),n.d(t,"fragmentWithinToleranceTest",(function(){return s})),n.d(t,"pdtWithinToleranceTest",(function(){return l})),n.d(t,"findFragWithCC",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function a(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!Object(r.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var i=0;ie&&n.start?-1:0}function l(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}function c(e,t){return i.default.search(e,(function(e){return e.cct?-1:0}))}},"./src/controller/fragment-tracker.ts": +/*!********************************************!*\ + !*** ./src/controller/fragment-tracker.ts ***! + \********************************************/ +/*! exports provided: FragmentState, FragmentTracker */function(e,t,n){"use strict";n.r(t),n.d(t,"FragmentState",(function(){return r})),n.d(t,"FragmentTracker",(function(){return o}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../types/loader */"./src/types/loader.ts");!function(e){e.NOT_LOADED="NOT_LOADED",e.BACKTRACKED="BACKTRACKED",e.APPENDING="APPENDING",e.PARTIAL="PARTIAL",e.OK="OK"}(r||(r={}));var o=function(){function e(e){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=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.on(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.off(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},t.getAppendedFrag=function(e,t){if(t===a.PlaylistLevelType.MAIN){var n=this.activeFragment,r=this.activeParts;if(!n)return null;if(r)for(var i=r.length;i--;){var o=r[i],s=o?o.end:n.appendedPTS;if(o.start<=e&&void 0!==s&&e<=s)return i>9&&(this.activeParts=r.slice(i-9)),o}else if(n.start<=e&&void 0!==n.appendedPTS&&e<=n.appendedPTS)return n}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var a=n[r[i]];if((null==a?void 0:a.body.type)===t&&a.buffered){var o=a.body;if(o.start<=e&&e<=o.end)return o}}return null},t.detectEvictedFragments=function(e,t,n){var r=this;Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a)if(a.buffered){var o=a.range[e];o&&o.time.some((function(e){var n=!r.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&r.removeFragment(a.body),n}))}else a.body.type===n&&r.removeFragment(a.body)}))},t.detectPartialFragments=function(e){var t=this,n=this.timeRanges,r=e.frag,i=e.part;if(n&&"initSegment"!==r.sn){var a=l(r),o=this.fragments[a];o&&(Object.keys(n).forEach((function(e){var a=r.elementaryStreams[e];if(a){var s=n[e],l=null!==i||!0===a.partial;o.range[e]=t.getBufferedTimes(r,i,l,s)}})),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body))}},t.fragBuffered=function(e){var t=l(e),n=this.fragments[t];n&&(n.backtrack=n.loaded=null,n.buffered=!0)},t.getBufferedTimes=function(e,t,n,r){for(var i={time:[],partial:n},a=t?t.start:e.start,o=t?t.end:e.end,s=e.minEndPTS||o,l=e.maxStartPTS||a,c=0;c=u&&s<=d){i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});break}if(au)i.partial=!0,i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});else if(o<=u)break}return i},t.getPartialFragment=function(e){var t,n,r,i=null,a=0,o=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&s(u)&&(n=u.body.start-o,r=u.body.end+o,e>=n&&e<=r&&(t=Math.min(e-n,r-e),a<=t&&(i=u.body,a=t)))})),i},t.getState=function(e){var t=l(e),n=this.fragments[t];return n?n.buffered?s(n)?r.PARTIAL:r.OK:n.backtrack?r.BACKTRACKED:r.APPENDING:r.NOT_LOADED},t.backtrack=function(e,t){var n=l(e),r=this.fragments[n];if(!r||r.backtrack)return null;var i=r.backtrack=t||r.loaded;return r.loaded=null,i},t.getBacktrackData=function(e){var t=l(e),n=this.fragments[t];if(n){var r,i=n.backtrack;if(null!=i&&null!==(r=i.payload)&&void 0!==r&&r.byteLength)return i;this.removeFragment(e)}return null},t.isTimeBuffered=function(e,t,n){for(var r,i,a=0;a=r&&t<=i)return!0;if(t<=r)return!1}return!1},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if("initSegment"!==n.sn&&!n.bitrateTest&&!r){var i=l(n);this.fragments[i]={body:n,loaded:t,backtrack:null,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var n=this,r=t.frag,i=t.part,o=t.timeRanges;if(r.type===a.PlaylistLevelType.MAIN)if(this.activeFragment=r,i){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(i)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach((function(e){var t=o[e];if(n.detectEvictedFragments(e,t),!i)for(var a=0;ae&&r.removeFragment(o)}}))},t.removeFragment=function(e){var t=l(e);e.stats.loaded=0,e.clearElementaryStreamInfo(),delete this.fragments[t]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},e}();function s(e){var t,n;return e.buffered&&((null===(t=e.range.video)||void 0===t?void 0:t.partial)||(null===(n=e.range.audio)||void 0===n?void 0:n.partial))}function l(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.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(e,t,n){"use strict";n.r(t),n.d(t,"STALL_MINIMUM_DURATION_MS",(function(){return s})),n.d(t,"MAX_START_GAP_JUMP",(function(){return l})),n.d(t,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),n.d(t,"SKIP_BUFFER_RANGE_START",(function(){return u})),n.d(t,"default",(function(){return d}));var r=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=250,l=2,c=.1,u=.05,d=function(){function e(e,t,n,r){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=e,this.media=t,this.fragmentTracker=n,this.hls=r}var t=e.prototype;return t.destroy=function(){this.hls=this.fragmentTracker=this.media=null},t.poll=function(e){var t=this.config,n=this.media,i=this.stalled,a=n.currentTime,c=n.seeking,u=this.seeking&&!c,d=!this.seeking&&c;if(this.seeking=c,a===e){if((d||u)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&r.BufferHelper.getBuffered(n).length){var h=r.BufferHelper.bufferInfo(n,a,0),f=h.len>0,p=h.nextStart||0;if(f||p){if(c){var m=h.len>l,g=!p||p-a>l&&!this.fragmentTracker.getPartialFragment(a);if(m||g)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,b=Math.max(p,h.start||0)-a,y=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,x=(null==y||null===(v=y.details)||void 0===v?void 0:v.live)?2*y.details.targetduration:l;if(b>0&&b<=x)return void this._trySkipBufferHole(null)}var E=self.performance.now();if(null!==i){var _=E-i;!c&&_>=s&&this._reportStall(h.len);var k=r.BufferHelper.bufferInfo(n,a,t.maxBufferHole);this._tryFixBufferStall(k,_)}else this.stalled=E}}}else if(this.moved=!0,null!==i){if(this.stallReported){var w=self.performance.now()-i;o.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(w)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media.currentTime,a=r.getPartialFragment(i);a&&this._trySkipBufferHole(a)||e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(o.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,o.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+e+")"),t.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},t._trySkipBufferHole=function(e){for(var t=this.config,n=this.hls,s=this.media,l=s.currentTime,d=0,h=r.BufferHelper.getBuffered(s),f=0;f=d&&l.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,a)),u=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;e.playbackRate=Math.min(c,Math.max(1,u))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}}}}},l.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},l.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},t=e,(n=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e)return null;var t=e.holdBack,n=e.partHoldBack,r=e.targetduration,i=this.config,a=i.liveSyncDuration,o=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,c=s&&n||t;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==a?a:o*r);var u=r;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(null===e||null===t||null===n)return null;var r=n.edge,i=e-t-this.edgeStalled,a=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,i),o)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var n=e.buffered.length;return n?e.buffered.end(n-1):t.edge-this.currentTime}}])&&o(t.prototype,n),s&&o(t,s),e}()},"./src/controller/level-controller.ts": +/*!********************************************!*\ + !*** ./src/controller/level-controller.ts ***! + \********************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return p}));var r=n(/*! ../types/level */"./src/types/level.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/codecs */"./src/utils/codecs.ts"),s=n(/*! ./level-helper */"./src/controller/level-helper.ts"),l=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(e){for(var t=1;t0){n=c[0].bitrate,c.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=c;for(var v=0;vthis.hls.config.fragLoadingMaxRetry&&(o=n.frag.level)):o=n.frag.level}break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(l=!1),o=r.level),s=!0;break;case a.ErrorDetails.REMUX_ALLOC_ERROR:o=n.level,s=!0}void 0!==o&&this.recoverLevel(n,o,s,l)}}},v.recoverLevel=function(e,t,n,r){var i=e.details,a=this._levels[t];if(a.loadError++,n){if(!this.retryLoadingOrFail(e))return void(this.currentLevelIndex=-1);e.levelRetry=!0}if(r){var o=a.url.length;if(o>1&&a.loadError1){var r=(t.urlId+1)%n;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(e){e.urlId=r})),this.level=e}},v.onFragLoaded=function(e,t){var n=t.frag;if(void 0!==n&&n.type===c.PlaylistLevelType.MAIN){var r=this._levels[n.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},v.onLevelLoaded=function(e,t){var n,r,i=t.level,a=t.details,o=this._levels[i];if(!o)return this.warn("Invalid level index "+i),void(null!==(r=t.deliveryDirectives)&&void 0!==r&&r.skip&&(a.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(i,t,o.details)):null!==(n=t.deliveryDirectives)&&void 0!==n&&n.skip&&(a.deltaUpdateFailed=!0)},v.onAudioTrackSwitched=function(e,t){var n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=this.hls.audioTracks[t.id].groupId,a=0;a0){var r=n.urlId,a=n.url[r];if(e)try{a=e.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Attempt loading level index "+t+(e?" at sn "+e.msn+" part "+e.part:"")+" with URL-id "+r+" "+a),this.clearTimer(),this.hls.trigger(i.Events.LEVEL_LOADING,{url:a,level:t,id:r,deliveryDirectives:e||null})}},v.removeLevel=function(e,t){var n=function(e,n){return n!==t},r=this._levels.filter((function(r,i){return i!==e||r.url.length>1&&void 0!==t&&(r.url=r.url.filter(n),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(n)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(n)),r.urlId=0,!0)})).map((function(e,t){var n=e.details;return null!=n&&n.fragments&&n.fragments.forEach((function(e){e.level=t})),e}));this._levels=r,this.hls.trigger(i.Events.LEVELS_UPDATED,{levels:r})},p=l,(m=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t,n=this._levels;if(0!==n.length&&(this.currentLevelIndex!==e||null===(t=n[e])||void 0===t||!t.details)){if(e<0||e>=n.length){var r=e<0;if(this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:r,reason:"invalid level idx"}),r)return;e=Math.min(e,n.length-1)}this.clearTimer();var o=this.currentLevelIndex,s=n[o],l=n[e];this.log("switching to level "+e+" from "+o),this.currentLevelIndex=e;var c=u({},l,{level:e,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(i.Events.LEVEL_SWITCHING,c);var d=l.details;if(!d||d.live){var h=this.switchParams(l.uri,null==s?void 0:s.details);this.loadPlaylist(h)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&d(p.prototype,m),g&&d(p,g),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(e,t,n){"use strict";n.r(t),n.d(t,"addGroupId",(function(){return a})),n.d(t,"assignTrackIdsByGroup",(function(){return o})),n.d(t,"updatePTS",(function(){return s})),n.d(t,"updateFragPTSDTS",(function(){return c})),n.d(t,"mergeDetails",(function(){return u})),n.d(t,"mapPartIntersection",(function(){return d})),n.d(t,"mapFragmentIntersection",(function(){return h})),n.d(t,"adjustSliding",(function(){return f})),n.d(t,"addSliding",(function(){return p})),n.d(t,"computeReloadInterval",(function(){return m})),n.d(t,"getFragmentWithSN",(function(){return g})),n.d(t,"getPartWith",(function(){return v}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts");function a(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function o(e){var t={};e.forEach((function(e){var n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}function s(e,t,n){l(e[t],e[n])}function l(e,t){var n=t.startPTS;if(Object(r.isFiniteNumber)(n)){var i,a=0;t.sn>e.sn?(a=n-e.start,i=e):(a=e.start-n,i=t),i.duration!==a&&(i.duration=a)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}function c(e,t,n,a,o,s){a-n<=0&&(i.logger.warn("Fragment should have a positive duration",t),a=n+t.duration,s=o+t.duration);var c=n,u=a,d=t.startPTS,h=t.endPTS;if(Object(r.isFiniteNumber)(d)){var f=Math.abs(d-n);Object(r.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(f,t.deltaPTS):t.deltaPTS=f,c=Math.max(n,d),n=Math.min(n,d),o=Math.min(o,t.startDTS),u=Math.min(a,h),a=Math.max(a,h),s=Math.max(s,t.endDTS)}t.duration=a-n;var p=n-t.start;t.appendedPTS=a,t.start=t.startPTS=n,t.maxStartPTS=c,t.startDTS=o,t.endPTS=a,t.minEndPTS=u,t.endDTS=s;var m,g=t.sn;if(!e||ge.endSN)return 0;var v=g-e.startSN,b=e.fragments;for(b[v]=t,m=v;m>0;m--)l(b[m],b[m-1]);for(m=v;m=0;o--){var s=a[o].initSegment;if(s){n=s;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var l,u=0;if(h(e,t,(function(e,i){e.relurl&&(u=e.cc-i.cc),Object(r.isFiniteNumber)(e.startPTS)&&Object(r.isFiniteNumber)(e.endPTS)&&(i.start=i.startPTS=e.startPTS,i.startDTS=e.startDTS,i.appendedPTS=e.appendedPTS,i.maxStartPTS=e.maxStartPTS,i.endPTS=e.endPTS,i.endDTS=e.endDTS,i.minEndPTS=e.minEndPTS,i.duration=e.endPTS-e.startPTS,i.duration&&(l=i),t.PTSKnown=t.alignedSliding=!0),i.elementaryStreams=e.elementaryStreams,i.loader=e.loader,i.stats=e.stats,i.urlId=e.urlId,e.initSegment&&(i.initSegment=e.initSegment,n=e.initSegment)})),n&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((function(e){var t;e.initSegment&&e.initSegment.relurl!==(null===(t=n)||void 0===t?void 0:t.relurl)||(e.initSegment=n)})),t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some((function(e){return!e})),t.deltaUpdateFailed)){i.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=t.skippedSegments;p--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var m=t.fragments;if(u){i.logger.warn("discontinuity sliding from playlist, take drift into account");for(var g=0;g=r.length||p(t,r[n].start)}function p(e,t){if(t){for(var n=e.fragments,r=e.skippedSegments;r0&&a<3*r,s=t.loading.end-t.loading.start,l=e.availabilityDelay;if(!1===e.updated)if(o){var c=333*e.misses;n=Math.max(Math.min(i,2*s),c),e.availabilityDelay=(e.availabilityDelay||0)+n}else n=i;else o?(l=Math.min(l||r/2,a),e.availabilityDelay=l,n=l+r-a):n=r-s;return Math.round(n)}function g(e,t,n){if(!e||!e.details)return null;var r=e.details,i=r.fragments[t-r.startSN];return i||((i=r.fragmentHint)&&i.sn===t?i:t0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=i.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=i.State.STOPPED},_.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},_.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_LEVEL:var e,t=this.levels,n=this.level,r=null==t||null===(e=t[n])||void 0===e?void 0:e.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=i.State.IDLE;break}break;case i.State.FRAG_LOADING_WAITING_RETRY:var a,o=self.performance.now(),s=this.retryDate;(!s||o>=s||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=i.State.IDLE)}this.onTickEnd()},_.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},_.doTickIdle=function(){var e,t,n=this.hls,r=this.levelLastLoaded,a=this.levels,s=this.media,d=n.config,h=n.nextLoadLevel;if(null!==r&&(s||!this.startFragRequested&&d.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&a&&a[h]){var f=a[h];this.level=n.nextLoadLevel=h;var p=f.details;if(!p||this.state===i.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==h)this.state=i.State.WAITING_LEVEL;else{var m=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:s,c.PlaylistLevelType.MAIN);if(null!==m&&!(m.len>=this.getMaxBufferLength(f.maxBitrate))){if(this._streamEnded(m,p)){var g={};return this.altAudio&&(g.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,g),void(this.state=i.State.ENDED)}var v=m.end,b=this.getNextFragment(v,p);if(this.couldBacktrack&&!this.fragPrevious&&b&&"initSegment"!==b.sn){var y=b.sn-p.startSN;y>1&&(b=p.fragments[y-1],this.fragmentTracker.removeFragment(b))}if(b&&this.fragmentTracker.getState(b)===l.FragmentState.OK&&this.nextLoadPosition>v){var x=this.audioOnly&&!this.altAudio?u.ElementaryStreamTypes.AUDIO:u.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(s,x,c.PlaylistLevelType.MAIN),b=this.getNextFragment(this.nextLoadPosition,p)}b&&(!b.initSegment||b.initSegment.data||this.bitrateTest||(b=b.initSegment),"identity"!==(null===(e=b.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=b.decryptdata)&&void 0!==t&&t.key?this.loadFragment(b,p,v):this.loadKey(b,p))}}}},_.loadFragment=function(t,n,r){var i,a=this.fragmentTracker.getState(t);if(this.fragCurrent=t,a===l.FragmentState.BACKTRACKED){var o=this.fragmentTracker.getBacktrackData(t);if(o)return this._handleFragmentLoadProgress(o),void this._handleFragmentLoadComplete(o);a=l.FragmentState.NOT_LOADED}a===l.FragmentState.NOT_LOADED||a===l.FragmentState.PARTIAL?"initSegment"===t.sn?this._loadInitSegment(t):this.bitrateTest?(t.bitrateTest=!0,this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t)):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)):a===l.FragmentState.APPENDING?this.reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t):0===(null===(i=this.media)||void 0===i?void 0:i.buffered.length)&&this.fragmentTracker.removeAllFragments()},_.getAppendedFrag=function(e){var t=this.fragmentTracker.getAppendedFrag(e,c.PlaylistLevelType.MAIN);return t&&"fragment"in t?t.fragment:t},_.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,c.PlaylistLevelType.MAIN)},_.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},_.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},_.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var n,r=this.getAppendedFrag(t.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!t.paused&&e){var i=e[this.hls.nextLoadLevel],a=this.fragLastKbps;n=a&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*a)+1:0}else n=0;var o=this.getBufferedFrag(t.currentTime+n);if(o){var s=this.followingBufferedFrag(o);if(s){this.abortCurrentFrag();var l=s.maxStartPTS?s.maxStartPTS:s.start,c=s.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)}}}},_.abortCurrentFrag=function(){var e=this.fragCurrent;this.fragCurrent=null,null!=e&&e.loader&&e.loader.abort(),this.state===i.State.KEY_LOADING&&(this.state=i.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},_.flushMainBuffer=function(t,n){e.prototype.flushMainBuffer.call(this,t,n,this.altAudio?"video":null)},_.onMediaAttached=function(t,n){e.prototype.onMediaAttached.call(this,t,n);var r=n.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)},_.onMediaDetaching=function(){var t=this.media;t&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),e.prototype.onMediaDetaching.call(this)},_.onMediaPlaying=function(){this.tick()},_.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;Object(r.isFiniteNumber)(t)&&this.log("Media seeked to "+t.toFixed(3)),this.tick()},_.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},_.onManifestParsed=function(e,t){var n,r=!1,i=!1;t.levels.forEach((function(e){(n=e.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(r=!0),-1!==n.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=r&&i&&!Object(a.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},_.onLevelLoading=function(e,t){var n=this.levels;if(n&&this.state===i.State.IDLE){var r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(r.details))&&(this.state=i.State.WAITING_LEVEL)}},_.onLevelLoaded=function(e,t){var n,r=this.levels,a=t.level,s=t.details,l=s.totalduration;if(r){this.log("Level "+a+" loaded ["+s.startSN+","+s.endSN+"], cc ["+s.startCC+", "+s.endCC+"] duration:"+l);var c=this.fragCurrent;!c||this.state!==i.State.FRAG_LOADING&&this.state!==i.State.FRAG_LOADING_WAITING_RETRY||c.level!==t.level&&c.loader&&(this.state=i.State.IDLE,c.loader.abort());var u=r[a],d=0;if(s.live||null!==(n=u.details)&&void 0!==n&&n.live){if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed)return;d=this.alignPlaylists(s,u.details)}if(u.details=s,this.levelLastLoaded=a,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:s,level:a}),this.state===i.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=i.State.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,d),this.tick()}else this.warn("Levels were reset while loading level "+a)},_._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.levels;if(a){var o=a[n.level],s=o.details;if(s){var l=o.videoCodec,u=s.PTSKnown||!s.live,f=null===(t=n.initSegment)||void 0===t?void 0:t.data,p=this._getAudioCodec(o),m=this.transmuxer=this.transmuxer||new d.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),g=r?r.index:-1,v=-1!==g,b=new h.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,i.byteLength,g,v),y=this.initPTS[n.cc];m.push(i,f,p,l,n,r,s.totalduration,u,b,y)}else this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},_.onAudioTrackSwitching=function(e,t){var n=this.altAudio,r=!!t.url,i=t.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 a=this.fragCurrent;null!=a&&a.loader&&(this.log("Switching to main audio track, cancel main fragment load"),a.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var s=this.hls;n&&s.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:i})}},_.onAudioTrackSwitched=function(e,t){var n=t.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},_.onBufferCreated=function(e,t){var n,r,i=t.tracks,a=!1;for(var o in i){var s=i[o];if("main"===s.id){if(r=o,n=s,"video"===o){var l=i[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},_.onFragBuffered=function(e,t){var n=t.frag,r=t.part;if(!n||n.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===i.State.PARSED&&(this.state=i.State.IDLE));var a=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},_.onError=function(e,t){switch(t.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,t);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==i.State.ERROR&&(t.fatal?(this.warn(""+t.details),this.state=i.State.ERROR):t.levelRetry||this.state!==i.State.WAITING_LEVEL||(this.state=i.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:if("main"===t.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var n=!0,r=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);r&&r.len>.5&&(n=!this.reduceMaxBufferLength(r.len)),n&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},_.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){var n=s.BufferHelper.getBuffered(e);!this.loadedmetadata&&n.length?(this.loadedmetadata=!0,this.seekToStartPos()):t.poll(this.lastCurrentTime),this.lastCurrentTime=e.currentTime}},_.onFragLoadEmergencyAborted=function(){this.state=i.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},_.onBufferFlushed=function(e,t){var n=t.type;if(n!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(n===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,c.PlaylistLevelType.MAIN)}},_.onLevelsUpdated=function(e,t){this.levels=t.levels},_.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},_.seekToStartPos=function(){var e=this.media,t=e.currentTime,n=this.startPosition;if(n>=0&&t0&&(i1&&!1===e.seeking){var n=e.currentTime;if(s.BufferHelper.isBuffered(e,n)?t=this.getAppendedFrag(n):s.BufferHelper.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){var r=this.fragPlaying,i=t.level;r&&t.sn===r.sn&&r.level===i&&t.urlId===r.urlId||(this.hls.trigger(o.Events.FRAG_CHANGED,{frag:t}),r&&r.level===i||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:i}),this.fragPlaying=t)}}},y=b,(x=[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);return this.followingBufferedFrag(t)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&g(y.prototype,x),E&&g(y,E),b}(i.default)},"./src/controller/subtitle-stream-controller.ts": +/*!******************************************************!*\ + !*** ./src/controller/subtitle-stream-controller.ts ***! + \******************************************************/ +/*! exports provided: SubtitleStreamController */function(e,t,n){"use strict";n.r(t),n.d(t,"SubtitleStreamController",(function(){return m}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),s=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),l=n(/*! ./level-helper */"./src/controller/level-helper.ts"),c=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),u=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),d=n(/*! ../types/loader */"./src/types/loader.ts"),h=n(/*! ../types/level */"./src/types/level.ts");function f(e,t){for(var n=0;n=i[s].start&&o<=i[s].end){a=i[s];break}var l=n.start+n.duration;a?a.end=l:(a={start:o,end:l},i.push(a)),this.fragmentTracker.fragBuffered(n)}}},y.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=this.currentTrackId,a=this.levels;if(!a.length||!a[i]||!a[i].details)return;var o=r-a[i].details.targetduration;if(o<=0)return;t.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(e){for(var t=0;t=c.length||i!==a)&&d){if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||null!==(n=d.details)&&void 0!==n&&n.live){var h=this.mainDetails;if(r.deltaUpdateFailed||!h)return;var f=h.fragments[0];d.details?0===this.alignPlaylists(r,d.details)&&f&&Object(l.addSliding)(r,f.start):r.hasProgramDateTime&&h.hasProgramDateTime?Object(s.alignMediaPlaylistByPDT)(r,h):f&&Object(l.addSliding)(r,f.start)}d.details=r,this.levelLastLoaded=i,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"),d.details=void 0))}}},y._handleFragmentLoadComplete=function(e){var t=e.frag,n=e.payload,i=t.decryptdata,a=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var o=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(n),i.key.buffer,i.iv.buffer).then((function(e){var n=performance.now();a.trigger(r.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:o,tdecrypt:n}})}))}},y.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var e,t=this.currentTrackId,n=this.levels;if(!n.length||!n[t]||!n[t].details)return;var s=n[t].details,l=s.targetduration,d=this.config,h=this.media,f=a.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,h.currentTime-l,d.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(s,"Subtitle track details are defined on idle subtitle stream controller tick");var m,g=s.fragments,v=g.length,b=s.edge,y=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(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},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(e){Object(i.clearCurrentCues)(e)})),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(e,t){this.tracks=t.subtitleTracks},f.onSubtitleTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.trackId,a=this.tracksInGroup[i];if(a){var o=a.details;a.details=t.details,this.log("subtitle track "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,o))}else this.warn("Invalid subtitle track id "+n)},f.onLevelLoading=function(e,t){this.switchLevel(t.level)},f.onLevelSwitching=function(e,t){this.switchLevel(t.level)},f.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.textGroupIds){var n=t.textGroupIds[t.urlId];if(this.groupId!==n){var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,a=this.tracks.filter((function(e){return!n||e.groupId===n}));this.tracksInGroup=a;var o=this.findTrackId(null==i?void 0:i.name)||this.findTrackId();this.groupId=n;var s={subtitleTracks:a};this.log("Updating subtitle tracks, "+a.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(r.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==o&&this.setSubtitleTrack(o,i)}}},f.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n=i.length)){this.clearTimer();var a=i[e];if(this.log("Switching to subtitle track "+e),this.trackId=e,a){var o=a.id,s=a.groupId,l=void 0===s?"":s,c=a.name,u=a.type,d=a.url;this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:l,name:c,type:u,url:d});var h=this.switchParams(a.url,null==t?void 0:t.details);this.loadPlaylist(h)}else this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:e})}}else this.queuedDefaultTrack=e},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=u(this.media.textTracks),n=0;n=0&&(h[0]=Math.min(h[0],t),h[1]=Math.max(h[1],n),u=!0,f/(n-t)>.5))return}if(u||a.push([t,n]),this.config.renderTextTracksNatively){var p=this.captionsTracks[e];this.Cues.newCue(p,t,n,r)}else{var m=this.Cues.newCue(null,t,n,r);this.hls.trigger(i.Events.CUES_PARSED,{type:"captions",cues:m,track:e})}},t.onInitPtsFound=function(e,t){var n=this,r=t.frag,a=t.id,o=t.initPTS,s=t.timescale,l=this.unparsedVttFrags;"main"===a&&(this.initPTS[r.cc]=o,this.timescale[r.cc]=s),l.length&&(this.unparsedVttFrags=[],l.forEach((function(e){n.onFragLoaded(i.Events.FRAG_LOADED,e)})))},t.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n>>8^255&g^99,e[f]=g,t[g]=f;var v=h[f],b=h[v],y=h[b],x=257*h[g]^16843008*g;r[f]=x<<24|x>>>8,i[f]=x<<16|x>>>16,a[f]=x<<8|x>>>24,o[f]=x,x=16843009*y^65537*b^257*v^16843008*f,l[g]=x<<24|x>>>8,c[g]=x<<16|x>>>16,u[g]=x<<8|x>>>24,d[g]=x,f?(f=v^h[h[h[y^v]]],p^=h[h[p]]):f=p=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r>>6);var p=(60&t[n+2])>>>2;if(!(p>f.length-1))return c=(1&t[n+2])<<2,c|=(192&t[n+3])>>>6,r.logger.log("manifest codec:"+o+", ADTS type:"+s+", samplingIndex:"+p),/firefox/i.test(d)?p>=6?(s=5,u=new Array(4),l=p-3):(s=2,u=new Array(2),l=p):-1!==d.indexOf("android")?(s=2,u=new Array(2),l=p):(s=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(d))||!o&&1===c)&&(s=2,u=new Array(2)),l=p)),u[0]=s<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===s&&(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."+s,manifestCodec:h};e.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function s(e,t){return 255===e[t]&&240==(246&e[t+1])}function l(e,t){return 1&e[t+1]?7:9}function c(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function u(e,t){return t+5=e.length)return!1;var r=c(e,t);if(r<=n)return!1;var i=t+r;return i===e.length||d(e,i)}return!1}function p(e,t,n,i,a){if(!e.samplerate){var s=o(t,n,i,a);if(!s)return;e.config=s.config,e.samplerate=s.samplerate,e.channelCount=s.channelCount,e.codec=s.codec,e.manifestCodec=s.manifestCodec,r.logger.log("parsed codec:"+e.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function m(e){return 9216e4/e}function g(e,t,n,r,i){var a=l(e,t),o=c(e,t);if((o-=a)>0)return{headerLength:a,frameLength:o,stamp:n+r*i}}function v(e,t,n,r,i){var a=g(t,n,r,i,m(e.samplerate));if(a){var o,s=a.frameLength,l=a.headerLength,c=a.stamp,u=l+s,d=Math.max(0,n+u-t.length);d?(o=new Uint8Array(u-l)).set(t.subarray(n+l,t.length),0):o=t.subarray(n+l,n+u);var h={unit:o,pts:c};return d||e.samples.push(h),{sample:h,length:u,missing:d}}}},"./src/demux/base-audio-demuxer.ts": +/*!*****************************************!*\ + !*** ./src/demux/base-audio-demuxer.ts ***! + \*****************************************/ +/*! exports provided: initPTSFn, default */function(e,t,n){"use strict";n.r(t),n.d(t,"initPTSFn",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),o=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),l=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(){},t.resetContiguity=function(){},t.canParse=function(e,t){return!1},t.appendFrame=function(e,t,n){},t.demux=function(e,t){this.cachedData&&(e=Object(o.appendUint8Array)(this.cachedData,e),this.cachedData=null);var n,r,l=i.getID3Data(e,0),u=l?l.length:0,d=this._audioTrack,h=this._id3Track,f=l?i.getTimeStamp(l):void 0,p=e.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=c(f,t)),l&&l.length>0&&h.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),r=this.initPTS;ue?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&r.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){for(var t=8,n=8,r=0;r0)return e.subarray(n,n+r)},s=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3]},l=function(e,t){return i(e,t)&&s(e,t+6)+10<=e.length-t},c=function(e){for(var t=h(e),n=0;n>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(a);break;case 12:case 13:o=e[u++],c+=String.fromCharCode((31&a)<<6|63&o);break;case 14:o=e[u++],s=e[u++],c+=String.fromCharCode((15&a)<<12|(63&o)<<6|(63&s)<<0)}}return c},y={decodeTextFrame:m};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(e,t,n){"use strict";n.r(t);var r=n(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ./mpegaudio */"./src/demux/mpegaudio.ts");function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var l=r.prototype;return l.resetInitSegment=function(t,n,r){e.prototype.resetInitSegment.call(this,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(i.getID3Data(e,0)||[]).length,n=e.length;t0},t.demux=function(e){var t=e,n=Object(i.dummyTrack)();if(this.config.progressive){this.remainderData&&(t=Object(r.appendUint8Array)(this.remainderData,e));var a=Object(r.segmentValidRange)(t);this.remainderData=a.remainder,n.samples=a.valid||new Uint8Array}else n.samples=t;return{audioTrack:Object(i.dummyTrack)(),avcTrack:n,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.flush=function(){var e=Object(i.dummyTrack)();return e.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(i.dummyTrack)(),avcTrack:e,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){},e}();a.minProbeByteLength=1024,t.default=a},"./src/demux/mpegaudio.ts": +/*!********************************!*\ + !*** ./src/demux/mpegaudio.ts ***! + \********************************/ +/*! exports provided: appendFrame, parseHeader, isHeaderPattern, isHeader, canParse, probe */function(e,t,n){"use strict";n.r(t),n.d(t,"appendFrame",(function(){return l})),n.d(t,"parseHeader",(function(){return c})),n.d(t,"isHeaderPattern",(function(){return u})),n.d(t,"isHeader",(function(){return d})),n.d(t,"canParse",(function(){return h})),n.d(t,"probe",(function(){return f}));var r=null,i=[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],a=[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]],s=[0,1,1,4];function l(e,t,n,r,i){if(!(n+24>t.length)){var a=c(t,n);if(a&&n+a.frameLength<=t.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength,missing:0}}}}function c(e,t){var n=e[t+1]>>3&3,l=e[t+1]>>1&3,c=e[t+2]>>4&15,u=e[t+2]>>2&3;if(1!==n&&0!==c&&15!==c&&3!==u){var d=e[t+2]>>1&1,h=e[t+3]>>6,f=1e3*i[14*(3===n?3-l:3===l?3:4)+c-1],p=a[3*(3===n?0:2===n?1:2)+u],m=3===h?1:2,g=o[n][l],v=s[l],b=8*g*v,y=Math.floor(g*f/p+d)*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===h&&(e[t+3]=128|e[t+3]),{sampleRate:p,channelCount:m,frameLength:y,samplesPerFrame:b}}}function u(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function d(e,t){return t+1=e.length)return void n();if(!(e[t].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,r),!r)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n},t.getAvcDecryptedUnit=function(e,t){for(var n=new Uint8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e},t.decryptAvcSample=function(e,t,n,r,a,o){var s=Object(i.discardEPB)(a.data),l=this.getAvcEncryptedData(s),c=this;this.decryptBuffer(l.buffer,(function(i){a.data=c.getAvcDecryptedUnit(s,i),o||c.decryptAvcSamples(e,t,n+1,r)}))},t.decryptAvcSamples=function(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var a=i[n];if(!(a.data.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,r,a,o),!o)return}}}},e}();t.default=a},"./src/demux/transmuxer-interface.ts": +/*!*******************************************!*\ + !*** ./src/demux/transmuxer-interface.ts ***! + \*******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return d}));var r=n(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},d=function(){function e(e,t,n,l){var d=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=e,this.id=t,this.onTransmuxComplete=n,this.onFlush=l;var h=e.config,f=function(t,n){(n=n||{}).frag=d.frag,n.id=d.id,e.trigger(t,n)};this.observer=new c.EventEmitter,this.observer.on(i.Events.FRAG_DECRYPTED,f),this.observer.on(i.Events.ERROR,f);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(h.enableWorker&&"undefined"!=typeof Worker){var g;o.logger.log("demuxing in webworker");try{g=this.worker=r(/*! ../demux/transmuxer-worker.ts */"./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(t){e.trigger(i.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(t.message+" ("+t.filename+":"+t.lineno+")")})},g.postMessage({cmd:"init",typeSupported:p,vendor:m,id:t,config:JSON.stringify(h)})}catch(e){o.logger.warn("Error in worker:",e),o.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new a.default(this.observer,p,h,m,t),this.worker=null}}else this.transmuxer=new a.default(this.observer,p,h,m,t)}var t=e.prototype;return t.destroy=function(){var e=this.worker;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.worker=null;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var n=this.observer;n&&n.removeAllListeners(),this.observer=null},t.push=function(e,t,n,r,i,s,l,c,u,d){var h=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,m=s?s.start:i.start,g=i.decryptdata,v=this.frag,b=!(v&&i.cc===v.cc),y=!(v&&u.level===v.level),x=v?u.sn-v.sn:-1,E=this.part?u.part-this.part.index:1,_=!y&&(1===x||0===x&&1===E),k=self.performance.now();(y||x||0===i.stats.parsing.start)&&(i.stats.parsing.start=k),!s||!E&&_||(s.stats.parsing.start=k);var w=new a.TransmuxState(b,_,c,y,m);if(!_||b){o.logger.log("[transmuxer-interface, "+i.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+b+"\n trackSwitch: "+y+"\n contiguous: "+_+"\n accurateTimeOffset: "+c+"\n timeOffset: "+m);var S=new a.TransmuxConfig(n,r,t,l,d);this.configureTransmuxer(S)}if(this.frag=i,this.part=s,p)p.postMessage({cmd:"demux",data:e,decryptdata:g,chunkMeta:u,state:w},e instanceof ArrayBuffer?[e]:[]);else if(f){var C=f.push(e,g,u,w);Object(a.isPromise)(C)?C.then((function(e){h.handleTransmuxComplete(e)})):this.handleTransmuxComplete(C)}},t.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:e});else if(n){var i=n.flush(e);Object(a.isPromise)(i)?i.then((function(n){t.handleFlushResult(n,e)})):this.handleFlushResult(i,e)}},t.handleFlushResult=function(e,t){var n=this;e.forEach((function(e){n.handleTransmuxComplete(e)})),this.onFlush(t)},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},t.configureTransmuxer=function(e){var t=this.worker,n=this.transmuxer;t?t.postMessage({cmd:"configure",config:e}):n&&n.configure(e)},t.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},e}()},"./src/demux/transmuxer-worker.ts": +/*!****************************************!*\ + !*** ./src/demux/transmuxer-worker.ts ***! + \****************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return s}));var r=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function s(e){var t=new o.EventEmitter,n=function(t,n){e.postMessage({event:t,data:n})};t.on(i.Events.FRAG_DECRYPTED,n),t.on(i.Events.ERROR,n),e.addEventListener("message",(function(i){var o=i.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);e.transmuxer=new r.default(t,o.typeSupported,s,o.vendor,o.id),Object(a.enableLogs)(s.debug),n("init",null);break;case"configure":e.transmuxer.configure(o.config);break;case"demux":var c=e.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(r.isPromise)(c)?c.then((function(t){l(e,t)})):l(e,c);break;case"flush":var d=o.chunkMeta,h=e.transmuxer.flush(d);Object(r.isPromise)(h)?h.then((function(t){u(e,t,d)})):u(e,h,d)}}))}function l(e,t){if((n=t.remuxResult).audio||n.video||n.text||n.id3||n.initSegment){var n,r=[],i=t.remuxResult,a=i.audio,o=i.video;a&&c(r,a),o&&c(r,o),e.postMessage({event:"transmuxComplete",data:t},r)}}function c(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function u(e,t,n){t.forEach((function(t){l(e,t)})),e.postMessage({event:"flush",data:n})}},"./src/demux/transmuxer.ts": +/*!*********************************!*\ + !*** ./src/demux/transmuxer.ts ***! + \*********************************/ +/*! exports provided: default, isPromise, TransmuxConfig, TransmuxState */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return b})),n.d(t,"isPromise",(function(){return x})),n.d(t,"TransmuxConfig",(function(){return E})),n.d(t,"TransmuxState",(function(){return _}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),s=n(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.ts"),l=n(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.ts"),c=n(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.ts"),u=n(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.ts"),d=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),h=n(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.ts"),f=n(/*! ./chunk-cache */"./src/demux/chunk-cache.ts"),p=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),m=n(/*! ../utils/logger */"./src/utils/logger.ts");try{r=self.performance.now.bind(self.performance)}catch(e){m.logger.debug("Unable to use Performance API on this environment"),r=self.Date.now}var g=[{demux:c.default,remux:d.default},{demux:l.default,remux:h.default},{demux:s.default,remux:d.default},{demux:u.default,remux:d.default}],v=1024;g.forEach((function(e){var t=e.demux;v=Math.max(v,t.minProbeByteLength)}));var b=function(){function e(e,t,n,r,i){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=e,this.typeSupported=t,this.config=n,this.vendor=r,this.id=i}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(e,t,n,i){var a=this,o=n.transmuxing;o.executeStart=r();var s=new Uint8Array(e),l=this.cache,c=this.config,u=this.currentTransmuxState,d=this.transmuxConfig;i&&(this.currentTransmuxState=i);var h=function(e,t){var n=null;return e.byteLength>0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(n=t),n}(s,t);if(h&&"AES-128"===h.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(s,h.key.buffer,h.iv.buffer).then((function(e){var t=a.push(e,null,n);return a.decryptionPromise=null,t})),this.decryptionPromise;var m=f.softwareDecrypt(s,h.key.buffer,h.iv.buffer);if(!m)return o.executeEnd=r(),y(n);s=new Uint8Array(m)}var g=i||u,v=g.contiguous,b=g.discontinuity,x=g.trackSwitch,E=g.accurateTimeOffset,_=g.timeOffset,k=d.audioCodec,w=d.videoCodec,S=d.defaultInitPts,C=d.duration,O=d.initSegmentData;if((b||x)&&this.resetInitSegment(O,k,w,C),b&&this.resetInitialTimestamp(S),v||this.resetContiguity(),this.needsProbing(s,b,x)){if(l.dataLength){var A=l.flush();s=Object(p.appendUint8Array)(A,s)}this.configureTransmuxer(s,d)}var T=this.transmux(s,h,_,E,n),I=this.currentTransmuxState;return I.contiguous=!0,I.discontinuity=!1,I.trackSwitch=!1,o.executeEnd=r(),T},t.flush=function(e){var t=this,n=e.transmuxing;n.executeStart=r();var o=this.decrypter,s=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return t.flush(e)}));var u=[],d=l.timeOffset;if(o){var h=o.flush();h&&u.push(this.push(h,null,e))}var f=s.dataLength;s.reset();var p=this.demuxer,m=this.remuxer;if(!p||!m)return f>=v&&this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),n.executeEnd=r(),[y(e)];var g=p.flush(d);return x(g)?g.then((function(n){return t.flushRemux(u,n,e),u})):(this.flushRemux(u,g,e),u)},t.flushRemux=function(e,t,n){var i=t.audioTrack,a=t.avcTrack,o=t.id3Track,s=t.textTrack,l=this.currentTransmuxState,c=l.accurateTimeOffset,u=l.timeOffset;m.logger.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var d=this.remuxer.remux(i,a,o,s,u,c,!0,this.id);e.push({remuxResult:d,chunkMeta:n}),n.transmuxing.executeEnd=r()},t.resetInitialTimestamp=function(e){var t=this.demuxer,n=this.remuxer;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,n,r){var i=this.demuxer,a=this.remuxer;i&&a&&(i.resetInitSegment(t,n,r),a.resetInitSegment(e,t,n))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(e,t,n,r,i){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,r,i):this.transmuxUnencrypted(e,n,r,i)},t.transmuxUnencrypted=function(e,t,n,r){var i=this.demuxer.demux(e,t,!1,!this.config.progressive),a=i.audioTrack,o=i.avcTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(a,o,s,l,t,n,!1,this.id),chunkMeta:r}},t.transmuxSampleAes=function(e,t,n,r,i){var a=this;return this.demuxer.demuxSampleAes(e,t,n).then((function(e){return{remuxResult:a.remuxer.remux(e.audioTrack,e.avcTrack,e.id3Track,e.textTrack,n,r,!1,a.id),chunkMeta:i}}))},t.configureTransmuxer=function(e,t){for(var n,r=this.config,i=this.observer,a=this.typeSupported,o=this.vendor,s=t.audioCodec,c=t.defaultInitPts,u=t.duration,d=t.initSegmentData,f=t.videoCodec,p=0,v=g.length;p>4>1){if((I=O+5+t[O+4])===O+188)continue}else I=O+4;switch(T){case f:A&&(p&&(a=v(p))&&this.parseAVCPES(a,!1),p={data:[],size:0}),p&&(p.data.push(t.subarray(I,O+188)),p.size+=O+188-I);break;case b:A&&(x&&(a=v(x))&&(s.isAAC?this.parseAACPES(a):this.parseMPEGPES(a)),x={data:[],size:0}),x&&(x.data.push(t.subarray(I,O+188)),x.size+=O+188-I);break;case y:A&&(E&&(a=v(E))&&this.parseID3PES(a),E={data:[],size:0}),E&&(E.data.push(t.subarray(I,O+188)),E.size+=O+188-I);break;case 0:A&&(I+=t[I]+1),w=this._pmtId=m(t,I);break;case w:A&&(I+=t[I]+1);var D=g(t,I,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,r);(f=D.avc)>0&&(o.pid=f),(b=D.audio)>0&&(s.pid=b,s.isAAC=D.isAAC),(y=D.id3)>0&&(h.pid=y),_&&!k&&(u.logger.log("reparse from beginning"),_=!1,O=C-188),k=this.pmtParsed=!0;break;case 17:case 8191:break;default:_=!0}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});o.pesData=p,s.pesData=x,h.pesData=E;var L={audioTrack:s,avcTrack:o,id3Track:h,textTrack:this._txtTrack};return i&&this.extractRemainingSamples(L),L},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,n=e.audioTrack,r=e.avcTrack,i=e.id3Track,a=r.pesData,o=n.pesData,s=i.pesData;a&&(t=v(a))?(this.parseAVCPES(t,!0),r.pesData=null):r.pesData=a,o&&(t=v(o))?(n.isAAC?this.parseAACPES(t):this.parseMPEGPES(t),n.pesData=null):(null!=o&&o.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=o),s&&(t=v(s))?(this.parseID3PES(t),i.pesData=null):i.pesData=s},t.demuxSampleAes=function(e,t,n){var r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new s.default(this.observer,this.config,t);return this.decrypt(r,i)},t.decrypt=function(e,t){return new Promise((function(n){var r=e.audioTrack,i=e.avcTrack;r.samples&&r.isAAC?t.decryptAacSamples(r.samples,0,(function(){i.samples?t.decryptAvcSamples(i.samples,0,0,(function(){n(e)})):n(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(function(){n(e)}))}))},t.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},t.parseAVCPES=function(e,t){var n,r=this,i=this._avcTrack,s=this.parseAVCNALu(e.data),l=this.avcSample,c=!1;e.data=null,l&&s.length&&!i.audFound&&(b(l,i),l=this.avcSample=p(!1,e.pts,e.dts,"")),s.forEach((function(t){switch(t.type){case 1:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.frame=!0;var s=t.data;if(c&&s.length>4){var u=new a.default(s).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(l.key=!0)}break;case 5:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:n=!0;var d=new a.default(x(t.data));d.readUByte();for(var h=0,f=0,m=!1,g=0;!m&&d.bytesAvailable>1;){h=0;do{h+=g=d.readUByte()}while(255===g);f=0;do{f+=g=d.readUByte()}while(255===g);if(4===h&&0!==d.bytesAvailable){if(m=!0,181===d.readUByte()&&49===d.readUShort()&&1195456820===d.readUInt()&&3===d.readUByte()){for(var v=d.readUByte(),E=31&v,_=[v,d.readUByte()],k=0;k16){for(var w=[],S=0;S<16;S++)w.push(d.readUByte().toString(16)),3!==S&&5!==S&&7!==S&&9!==S||w.push("-");for(var C=f-16,O=new Uint8Array(C),A=0;A=0){var d={data:e.subarray(c,l-a-1),type:u};s.push(d)}else{var h=this.getLastNalUnit();if(h&&(o&&l<=4-o&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-o)),(n=l-a-1)>0)){var f=new Uint8Array(h.data.byteLength+n);f.set(h.data,0),f.set(e.subarray(0,n),h.data.byteLength),h.data=f,h.state=0}}l=0&&a>=0){var p={data:e.subarray(c,r),type:u,state:a};s.push(p)}if(0===s.length){var m=this.getLastNalUnit();if(m){var g=new Uint8Array(m.data.byteLength+e.byteLength);g.set(m.data,0),g.set(e,m.data.byteLength),m.data=g}}return i.naluState=a,s},t.parseAACPES=function(e){var t,n,i,a,o,s=0,c=this._audioTrack,h=this.aacOverFlow,f=e.data;if(h){this.aacOverFlow=null;var p=h.sample.unit.byteLength,m=Math.min(h.missing,p),g=p-m;h.sample.unit.set(f.subarray(0,m),g),c.samples.push(h.sample),s=h.missing}for(t=s,n=f.length;t1;){var l=new Uint8Array(s[0].length+s[1].length);l.set(s[0]),l.set(s[1],s[0].length),s[0]=l,s.splice(1,1)}if(1===((t=s[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;var c=t[7];192&c&&(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&c?i-(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(u.logger.warn(Math.round((i-a)/9e4)+"s delta between PTS and DTS, align them"),i=a):a=i);var d=(r=t[8])+9;if(e.size<=d)return null;e.size-=d;for(var h=new Uint8Array(e.size),f=0,p=s.length;fm){d-=m;continue}t=t.subarray(d),m-=d,d=0}h.set(t,o),o+=m}return n&&(n-=r+3),{data:h,pts:i,dts:a,len:n}}return null}function b(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var n=t.samples,r=n.length;if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}t.samples.push(e)}e.debug.length&&u.logger.log(e.pts+"/"+e.dts+":"+e.debug)}function y(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var r=n-1;r>=0;r--)if(t.ptst)return r;return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{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(t.prototype,n),b&&v(t,b),e}();b.defaultConfig=void 0},"./src/is-supported.ts": +/*!*****************************!*\ + !*** ./src/is-supported.ts ***! + \*****************************/ +/*! exports provided: isSupported, changeTypeSupported */function(e,t,n){"use strict";n.r(t),n.d(t,"isSupported",(function(){return a})),n.d(t,"changeTypeSupported",(function(){return o}));var r=n(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function i(){return self.SourceBuffer||self.WebKitSourceBuffer}function a(){var e=Object(r.getMediaSource)();if(!e)return!1;var t=i(),n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),a=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!a}function o(){var e,t=i();return"function"==typeof(null==t||null===(e=t.prototype)||void 0===e?void 0:e.changeType)}},"./src/loader/fragment-loader.ts": +/*!***************************************!*\ + !*** ./src/loader/fragment-loader.ts ***! + \***************************************/ +/*! exports provided: default, LoadError */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return d})),n.d(t,"LoadError",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../errors */"./src/errors.ts");function a(e){var t="function"==typeof Map?new Map:void 0;return(a=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return o(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,e)})(e)}function o(e,t,n){return(o=s()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&l(i,n.prototype),i}).apply(null,arguments)}function s(){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}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=Math.pow(2,17),d=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var n=this,r=e.url;if(!r)return Promise.reject(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(r?"part list":"url")));this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(r,l){n.loader&&n.loader.destroy();var c=n.loader=e.loader=o?new o(a):new s(a),d=h(e),p={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=c.stats,c.load(d,p,{onSuccess:function(t,i,a,o){n.resetLoader(e,c),r({frag:e,part:null,payload:t.data,networkDetails:o})},onError:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:a}))},onAbort:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:a}))},onTimeout:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:a}))},onProgress:function(n,r,i,a){t&&t({frag:e,part:null,payload:i,networkDetails:a})}})}))},t.loadPart=function(e,t,n){var r=this;this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(l,c){r.loader&&r.loader.destroy();var d=r.loader=e.loader=o?new o(a):new s(a),p=h(e,t),m={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=d.stats,d.load(p,m,{onSuccess:function(i,a,o,s){r.resetLoader(e,d),r.updateStatsFromPart(e,t);var c={frag:e,part:t,payload:i.data,networkDetails:s};n(c),l(c)},onError:function(n,a,o){r.resetLoader(e,d),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:n,networkDetails:o}))},onAbort:function(n,a,o){e.stats.aborted=t.stats.aborted,r.resetLoader(e,d),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:o}))},onTimeout:function(n,a,o){r.resetLoader(e,d),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,networkDetails:o}))}})}))},t.updateStatsFromPart=function(e,t){var n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){var a=Math.round(e.duration/t.duration),o=Math.min(Math.round(n.loaded/i),a),s=(a-o)*Math.round(n.loaded/o);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,c=r.loading;l.start?l.first+=c.first-c.start:(l.start=c.start,l.first=c.first),l.end=c.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function h(e,t){void 0===t&&(t=null);var n=t||e,i={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},a=n.byteRangeStartOffset,o=n.byteRangeEndOffset;return Object(r.isFiniteNumber)(a)&&Object(r.isFiniteNumber)(o)&&(i.rangeStart=a,i.rangeEnd=o),i}var f=function(e){var t,n;function r(t){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a>8*(15-n)&255;return t},n.setDecryptDataFromLevelKey=function(e,t){var n=e;return"AES-128"===(null==e?void 0:e.method)&&e.uri&&!e.iv&&((n=s.LevelKey.fromURI(e.uri)).method=e.method,n.iv=this.createInitializationVector(t),n.keyFormat="identity"),n},n.setElementaryStreamInfo=function(e,t,n,r,i,a){void 0===a&&(a=!1);var o=this.elementaryStreams,s=o[e];s?(s.startPTS=Math.min(s.startPTS,t),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,r),s.endDTS=Math.max(s.endDTS,i)):o[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:a}},n.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[r.AUDIO]=null,e[r.VIDEO]=null,e[r.AUDIOVIDEO]=null},h(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(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'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(i.isFiniteNumber)(this.programDateTime))return null;var e=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;return!(null===(e=this.decryptdata)||void 0===e||!e.keyFormat||!this.decryptdata.uri)}}]),t}(f),m=function(e){function t(t,n,r,i,a){var o;(o=e.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=t.decimalFloatingPoint("DURATION"),o.gap=t.bool("GAP"),o.independent=t.bool("INDEPENDENT"),o.relurl=t.enumeratedString("URI"),o.fragment=n,o.index=i;var s=t.enumeratedString("BYTERANGE");return s&&o.setByteRange(s,a),a&&(o.fragOffset=a.fragOffset+a.duration),o}return c(t,e),h(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(f)},"./src/loader/key-loader.ts": +/*!**********************************!*\ + !*** ./src/loader/key-loader.ts ***! + \**********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=function(){function e(e){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){this.hls.on(r.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(r.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){for(var e in this._unregisterListeners(),this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={}},t.onKeyLoading=function(e,t){var n=t.frag,i=n.type,o=this.loaders[i];if(n.decryptdata){var s=n.decryptdata.uri;if(s!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(o&&(a.logger.warn("abort previous key loader for type:"+i),o.abort()),!s)return void a.logger.warn("key uri is falsy");var c=l.loader,u=n.loader=this.loaders[i]=new c(l);this.decrypturl=s,this.decryptkey=null;var d={url:s,frag:n,responseType:"arraybuffer"},h={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(d,h,f)}else this.decryptkey&&(n.decryptdata.key=this.decryptkey,this.hls.trigger(r.Events.KEY_LOADED,{frag:n}))}else a.logger.warn("Missing decryption data on fragment in onKeyLoading")},t.loadsuccess=function(e,t,n){var i=n.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(r.Events.KEY_LOADED,{frag:i})):a.logger.error("after key load, decryptdata unset")},t.loaderror=function(e,t){var n=t.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})},t.loadtimeout=function(e,t){var n=t.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},e}()},"./src/loader/level-details.ts": +/*!*************************************!*\ + !*** ./src/loader/level-details.ts ***! + \*************************************/ +/*! exports provided: LevelDetails */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelDetails",(function(){return a}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function i(e,t){for(var n=0;ne.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},t=e,(n=[{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 e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!==(e=this.fragments)&&void 0!==e&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&i(t.prototype,n),a&&i(t,a),e}()},"./src/loader/level-key.ts": +/*!*********************************!*\ + !*** ./src/loader/level-key.ts ***! + \*********************************/ +/*! exports provided: LevelKey */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelKey",(function(){return a}));var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js");function i(e,t){for(var n=0;n2){var n=t.shift()+".";return n+=parseInt(t.shift()).toString(16),n+=("000"+parseInt(t.shift()).toString(16)).substr(-4)}return e},e.resolve=function(e,t){return i.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var r,i=[],a={},o=!1;for(d.lastIndex=0;null!=(r=d.exec(t));)if(r[1]){var s=new l.AttrList(r[1]),c={attrs:s,bitrate:s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),name:s.NAME,url:e.resolve(r[2],n)},u=s.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((s.CODECS||"").split(/[ ,]+/).filter((function(e){return e})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=e.convertAVC1ToAVCOTI(c.videoCodec)),i.push(c)}else if(r[3]){var h=new l.AttrList(r[3]);h["DATA-ID"]&&(o=!0,a[h["DATA-ID"]]=h)}return{levels:i,sessionData:o?a:null}},e.parseMasterPlaylistMedia=function(t,n,r,i){var a;void 0===i&&(i=[]);var o=[],s=0;for(h.lastIndex=0;null!==(a=h.exec(t));){var c=new l.AttrList(a[1]);if(c.TYPE===r){var u={attrs:c,bitrate:0,id:s++,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?e.resolve(c.URI,n):""};if(i.length){var d=e.findGroup(i,u.groupId)||i[0];b(u,d,"audioCodec"),b(u,d,"textCodec")}o.push(u)}}return o},e.parseLevelPlaylist=function(e,t,n,u,d){var h,g,v,b=new o.LevelDetails(t),x=b.fragments,E=null,_=0,k=0,w=0,S=0,C=null,O=new a.Fragment(u,t),A=-1,T=!1;for(f.lastIndex=0,b.m3u8=e;null!==(h=f.exec(e));){T&&(T=!1,(O=new a.Fragment(u,t)).start=w,O.sn=_,O.cc=S,O.level=n,E&&(O.initSegment=E,O.rawProgramDateTime=E.rawProgramDateTime));var I=h[1];if(I){O.duration=parseFloat(I);var D=(" "+h[2]).slice(1);O.title=D||null,O.tagList.push(D?["INF",I,D]:["INF",I])}else if(h[3])Object(r.isFiniteNumber)(O.duration)&&(O.start=w,v&&(O.levelkey=v),O.sn=_,O.level=n,O.cc=S,O.urlId=d,x.push(O),O.relurl=(" "+h[3]).slice(1),y(O,C),C=O,w+=O.duration,_++,k=0,T=!0);else if(h[4]){var L=(" "+h[4]).slice(1);C?O.setByteRange(L,C):O.setByteRange(L)}else if(h[5])O.rawProgramDateTime=(" "+h[5]).slice(1),O.tagList.push(["PROGRAM-DATE-TIME",O.rawProgramDateTime]),-1===A&&(A=x.length);else{if(!(h=h[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(g=1;g-1){c.logger.warn("Keyformat "+q+" is not supported from the manifest");continue}if("identity"!==q)continue;G&&(v=s.LevelKey.fromURL(t,z),z&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(G)>=0&&(v.method=G,v.keyFormat=q,K&&(v.keyID=K),W&&(v.keyFormatVersions=W),v.iv=V));break;case"START":var Y=new l.AttrList(N).decimalFloatingPoint("TIME-OFFSET");Object(r.isFiniteNumber)(Y)&&(b.startTimeOffset=Y);break;case"MAP":var Q=new l.AttrList(N);O.relurl=Q.URI,Q.BYTERANGE&&O.setByteRange(Q.BYTERANGE),O.level=n,O.sn="initSegment",v&&(O.levelkey=v),O.initSegment=null,E=O,T=!0;break;case"SERVER-CONTROL":var J=new l.AttrList(N);b.canBlockReload=J.bool("CAN-BLOCK-RELOAD"),b.canSkipUntil=J.optionalFloat("CAN-SKIP-UNTIL",0),b.canSkipDateRanges=b.canSkipUntil>0&&J.bool("CAN-SKIP-DATERANGES"),b.partHoldBack=J.optionalFloat("PART-HOLD-BACK",0),b.holdBack=J.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var X=new l.AttrList(N);b.partTarget=X.decimalFloatingPoint("PART-TARGET");break;case"PART":var Z=b.partList;Z||(Z=b.partList=[]);var $=k>0?Z[Z.length-1]:void 0,ee=k++,te=new a.Part(new l.AttrList(N),O,t,ee,$);Z.push(te),O.duration+=te.duration;break;case"PRELOAD-HINT":var ne=new l.AttrList(N);b.preloadHint=ne;break;case"RENDITION-REPORT":var re=new l.AttrList(N);b.renditionReports=b.renditionReports||[],b.renditionReports.push(re);break;default:c.logger.warn("line parsed but not handled: "+h)}}}C&&!C.relurl?(x.pop(),w-=C.duration,b.partList&&(b.fragmentHint=C)):b.partList&&(y(O,C),O.cc=S,b.fragmentHint=O);var ie=x.length,ae=x[0],oe=x[ie-1];if((w+=b.skippedSegments*b.targetduration)>0&&ie&&oe){b.averagetargetduration=w/ie;var se=oe.sn;b.endSN="initSegment"!==se?se:0,ae&&(b.startCC=ae.cc,ae.initSegment||b.fragments.every((function(e){return e.relurl&&(t=e.relurl,m.test(null!=(n=null===(r=i.parseURL(t))||void 0===r?void 0:r.path)?n:""));var t,n,r}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(O=new a.Fragment(u,t)).relurl=oe.relurl,O.level=n,O.sn="initSegment",ae.initSegment=O,b.needSidxRanges=!0))}else b.endSN=0,b.startCC=0;return b.fragmentHint&&(w+=b.fragmentHint.duration),b.totalduration=w,b.endCC=S,A>0&&function(e,t){for(var n=e[t],r=t;r--;){var i=e[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(x,A),b},e}();function v(e,t){["video","audio","text"].forEach((function(n){var r=e.filter((function(e){return Object(u.isCodecType)(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}function b(e,t,n){var r=t[n];r&&(e[n]=r)}function y(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Object(r.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts": +/*!***************************************!*\ + !*** ./src/loader/playlist-loader.ts ***! + \***************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=n(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function d(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}var h=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.hls=e,this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return e.loader=i,this.loaders[e.type]=i,i},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var n=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:n,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var n=t.id,r=t.level,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:null,level:r,responseType:"text",type:c.PlaylistContextType.LEVEL,url:i,deliveryDirectives:a})},t.onAudioTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:a})},t.onSubtitleTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:a})},t.load=function(e){var t,n,r,i,a,s,l=this.hls.config,u=this.getInternalLoader(e);if(u){var d=u.context;if(d&&d.url===e.url)return void o.logger.trace("[playlist-loader]: playlist request ongoing");o.logger.log("[playlist-loader]: aborting previous loader for type: "+e.type),u.abort()}switch(e.type){case c.PlaylistContextType.MANIFEST:n=l.manifestLoadingMaxRetry,r=l.manifestLoadingTimeOut,i=l.manifestLoadingRetryDelay,a=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:n=0,r=l.levelLoadingTimeOut;break;default:n=l.levelLoadingMaxRetry,r=l.levelLoadingTimeOut,i=l.levelLoadingRetryDelay,a=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(e),null!==(t=e.deliveryDirectives)&&void 0!==t&&t.part&&(e.type===c.PlaylistContextType.LEVEL&&null!==e.level?s=this.hls.levels[e.level].details:e.type===c.PlaylistContextType.AUDIO_TRACK&&null!==e.id?s=this.hls.audioTracks[e.id].details:e.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==e.id&&(s=this.hls.subtitleTracks[e.id].details),s)){var h=s.partTarget,f=s.targetduration;h&&f&&(r=Math.min(1e3*Math.max(3*h,.8*f),r))}var p={timeout:r,maxRetry:n,retryDelay:i,maxRetryDelay:a,highWaterMark:0},m={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(e,p,m)},t.loadsuccess=function(e,t,n,r){if(void 0===r&&(r=null),n.isSidxRequest)return this.handleSidxRequest(e,n),void this.handlePlaylistLoaded(e,t,n,r);this.resetInternalLoader(n.type);var i=e.data;0===i.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(e,t,n,r):this.handleMasterPlaylist(e,t,n,r)):this.handleManifestParsingError(e,n,"no EXTM3U delimiter",r)},t.loaderror=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!1,e)},t.loadtimeout=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!0)},t.handleMasterPlaylist=function(e,t,n,r){var a=this.hls,s=e.data,c=d(e,n),h=l.default.parseMasterPlaylist(s,c),f=h.levels,p=h.sessionData;if(f.length){var m=f.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),g=f.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),v=l.default.parseMasterPlaylistMedia(s,c,"AUDIO",m),b=l.default.parseMasterPlaylistMedia(s,c,"SUBTITLES",g),y=l.default.parseMasterPlaylistMedia(s,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(e){return!e.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:""}))),a.trigger(i.Events.MANIFEST_LOADED,{levels:f,audioTracks:v,subtitles:b,captions:y,url:c,stats:t,networkDetails:r,sessionData:p})}else this.handleManifestParsingError(e,n,"no level found in manifest",r)},t.handleTrackOrLevelPlaylist=function(e,t,n,o){var s=this.hls,h=n.id,f=n.level,p=n.type,m=d(e,n),g=Object(r.isFiniteNumber)(h)?h:0,v=Object(r.isFiniteNumber)(f)?f:g,b=function(e){switch(e.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(n),y=l.default.parseLevelPlaylist(e.data,m,v,b,g);if(y.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var x={attrs:new u.AttrList({}),bitrate:0,details:y,name:"",url:m};s.trigger(i.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:m,stats:t,networkDetails:o,sessionData:null})}if(t.parsing.end=performance.now(),y.needSidxRanges){var E,_=null===(E=y.fragments[0].initSegment)||void 0===E?void 0:E.url;this.load({url:_,isSidxRequest:!0,type:p,level:f,levelDetails:y,id:h,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else n.levelDetails=y,this.handlePlaylistLoaded(e,t,n,o)}else s.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:m,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},t.handleSidxRequest=function(e,t){var n=Object(s.parseSegmentIndex)(new Uint8Array(e.data));if(n){var r=n.references,i=t.levelDetails;r.forEach((function(e,t){var r=e.info,a=i.fragments[t];0===a.byteRange.length&&a.setByteRange(String(1+r.end-r.start)+"@"+String(r.start)),a.initSegment&&a.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}))}},t.handleManifestParsingError=function(e,t,n,r){this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===c.PlaylistContextType.MANIFEST,url:e.url,reason:n,response:e,context:t,networkDetails:r})},t.handleNetworkError=function(e,t,n,r){void 0===n&&(n=!1),o.logger.warn("[playlist-loader]: A network "+(n?"timeout":"error")+" occurred while loading "+e.type+" level: "+e.level+" id: "+e.id+' group-id: "'+e.groupId+'"');var s=a.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(e);switch(e.type){case c.PlaylistContextType.MANIFEST:s=n?a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:a.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:s=n?a.ErrorDetails.LEVEL_LOAD_TIMEOUT:a.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:s=n?a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:s=n?a.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:a.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(e.type);var d={type:a.ErrorTypes.NETWORK_ERROR,details:s,fatal:l,url:e.url,loader:u,context:e,networkDetails:t};r&&(d.response=r),this.hls.trigger(i.Events.ERROR,d)},t.handlePlaylistLoaded=function(e,t,n,r){var a=n.type,o=n.level,s=n.id,l=n.groupId,u=n.loader,d=n.levelDetails,h=n.deliveryDirectives;if(null!=d&&d.targetduration){if(u)switch(d.live&&(u.getCacheAge&&(d.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(d.ageHeader)||(d.ageHeader=0)),a){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(i.Events.LEVEL_LOADED,{details:d,level:o||0,id:s||0,stats:t,networkDetails:r,deliveryDirectives:h});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(i.Events.AUDIO_TRACK_LOADED,{details:d,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:h});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(i.Events.SUBTITLE_TRACK_LOADED,{details:d,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:h})}}else this.handleManifestParsingError(e,n,"invalid target duration",r)},e}();t.default=h},"./src/polyfills/number.ts": +/*!*********************************!*\ + !*** ./src/polyfills/number.ts ***! + \*********************************/ +/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(e,t,n){"use strict";n.r(t),n.d(t,"isFiniteNumber",(function(){return r})),n.d(t,"MAX_SAFE_INTEGER",(function(){return i}));var r=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},i=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts": +/*!*********************************!*\ + !*** ./src/remux/aac-helper.ts ***! + \*********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(){}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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===t)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===t)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===t)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===t)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])}},e}();t.default=r},"./src/remux/mp4-generator.ts": +/*!************************************!*\ + !*** ./src/remux/mp4-generator.ts ***! + \************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=Math.pow(2,32)-1,i=function(){function e(){}return e.init=function(){var t;for(t in e.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:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=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]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t=8,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=255&t,s.set(e,4),a=0,t=8;a>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var i=Math.floor(n/(r+1)),a=Math.floor(n%(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,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,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 e.box(e.types.mvhd,o)},e.sdtp=function(t){var n,r,i=t.samples||[],a=new Uint8Array(4+i.length);for(n=0;n>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,c=t.height,u=t.pixelRatio[0],d=t.pixelRatio[1];return e.box(e.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]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,d>>24,d>>16&255,d>>8&255,255&d])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,i=t.duration*t.timescale,a=t.width,o=t.height,s=Math.floor(i/(r+1)),l=Math.floor(i%(r+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,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,a>>8&255,255&a,0,0,o>>8&255,255&o,0,0]))},e.traf=function(t,n){var i=e.sdtp(t),a=t.id,o=Math.floor(n/(r+1)),s=Math.floor(n%(r+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,i.length+16+20+8+16+8+8),i)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,a,o,s,l,c=t.samples||[],u=c.length,d=12+16*u,h=new Uint8Array(d);for(n+=8+d,h.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,h)},e.initSegment=function(t){e.types||e.init();var n=e.moov(t),r=new Uint8Array(e.FTYP.byteLength+n.byteLength);return r.set(e.FTYP),r.set(n,e.FTYP.byteLength),r},e}();i.types=void 0,i.HDLR_TYPES=void 0,i.STTS=void 0,i.STSC=void 0,i.STCO=void 0,i.STSZ=void 0,i.VMHD=void 0,i.SMHD=void 0,i.STSD=void 0,i.FTYP=void 0,i.DINF=void 0,t.default=i},"./src/remux/mp4-remuxer.ts": +/*!**********************************!*\ + !*** ./src/remux/mp4-remuxer.ts ***! + \**********************************/ +/*! exports provided: default, normalizePts */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return m})),n.d(t,"normalizePts",(function(){return g}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./aac-helper */"./src/remux/aac-helper.ts"),a=n(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),o=n(/*! ../events */"./src/events.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/logger */"./src/utils/logger.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function d(){return(d=Object.assign||function(e){for(var t=1;t0?e:n.pts}),e[0].pts);return t&&l.logger.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,i,a,o,s){var u,d,h,f,p,m,v=i,b=i,y=e.pid>-1,x=t.pid>-1,E=t.samples.length,_=e.samples.length>0,k=E>1;if((!y||_)&&(!x||k)||this.ISGenerated||o){this.ISGenerated||(h=this.generateIS(e,t,i));var w=this.isVideoContiguous,S=-1;if(k&&(S=function(e){for(var t=0;t0){l.logger.warn("[mp4-remuxer]: Dropped "+S+" out of "+E+" video samples due to a missing keyframe");var C=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(S),t.dropped+=S,b+=(t.samples[0].pts-C)/(t.timescale||9e4)}else-1===S&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+E+" video samples"),m=!1);if(this.ISGenerated){if(_&&k){var O=this.getVideoStartPts(t.samples),A=(g(e.samples[0].pts,O)-O)/t.inputTimeScale;v+=Math.max(0,A),b+=Math.max(0,-A)}if(_){if(e.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),h=this.generateIS(e,t,i)),d=this.remuxAudio(e,v,this.isAudioContiguous,a,x||k||s===c.PlaylistLevelType.AUDIO?b:void 0),k){var T=d?d.endPTS-d.startPTS:0;t.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),h=this.generateIS(e,t,i)),u=this.remuxVideo(t,b,w,T)}}else k&&(u=this.remuxVideo(t,b,w,0));u&&(u.firstKeyFrame=S,u.independent=-1!==S)}}return this.ISGenerated&&(n.samples.length&&(p=this.remuxID3(n,i)),r.samples.length&&(f=this.remuxText(r,i))),{audio:d,video:u,initSegment:h,independent:m,text:f,id3:p}},t.generateIS=function(e,t,n){var i,o,s,l=e.samples,c=t.samples,u=this.typeSupported,d={},h=!Object(r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(h&&(i=o=1/0),e.config&&l.length&&(e.timescale=e.samplerate,e.isAAC||(u.mpeg?(f="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3")),d.audio={id:"audio",container:f,codec:e.codec,initSegment:!e.isAAC&&u.mpeg?new Uint8Array(0):a.default.initSegment([e]),metadata:{channelCount:e.channelCount}},h&&(s=e.inputTimeScale,i=o=l[0].pts-Math.round(s*n))),t.sps&&t.pps&&c.length&&(t.timescale=t.inputTimeScale,d.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:a.default.initSegment([t]),metadata:{width:t.width,height:t.height}},h)){s=t.inputTimeScale;var p=this.getVideoStartPts(c),m=Math.round(s*n);o=Math.min(o,g(c[0].dts,p)-m),i=Math.min(i,p-m)}if(Object.keys(d).length)return this.ISGenerated=!0,h&&(this._initPTS=i,this._initDTS=o),{tracks:d,initPTS:i,timescale:s}},t.remuxVideo=function(e,t,n,r){var i,c,f,m=e.inputTimeScale,b=e.samples,y=[],x=b.length,E=this._initPTS,_=this.nextAvcDts,k=8,w=Number.POSITIVE_INFINITY,S=Number.NEGATIVE_INFINITY,C=0,O=!1;n&&null!==_||(_=t*m-(b[0].pts-g(b[0].dts,b[0].pts)));for(var A=0;AT.pts&&(C=Math.max(Math.min(C,T.pts-T.dts),-18e3)),T.dts0?A-1:A].dts&&(O=!0)}O&&b.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),c=b[0].dts,f=b[b.length-1].dts;var I=Math.round((f-c)/(x-1));if(C<0){if(C<-2*I){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-I,!0)+" ms");for(var D=C,L=0;LI;if(j||N<-1){j?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(N,!0)+" ms ("+N+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-N,!0)+" ms ("+N+"dts) overlapping between fragments detected"),c=_;var M=b[0].pts-N;b[0].dts=c,b[0].pts=M,l.logger.log("Video: First PTS/DTS adjusted: "+Object(u.toMsFromMpegTsClock)(M,!0)+"/"+Object(u.toMsFromMpegTsClock)(c,!0)+", delta: "+Object(u.toMsFromMpegTsClock)(N,!0)+" ms")}}p&&(c=Math.max(0,c));for(var P=0,B=0,F=0;F0?Y-1:Y].dts;if(re.stretchShortVideoTrack&&null!==this.nextAudioPts){var ae=Math.floor(re.maxBufferHole*m),oe=(r?w+r*m:this.nextAudioPts)-Q.pts;oe>ae?((i=oe-ie)<0&&(i=ie),l.logger.log("[mp4-remuxer]: It is approximately "+oe/90+" ms to the next segment; using duration "+i/90+" ms for the last video frame.")):i=ie}else i=ie}var se=Math.round(Q.pts-Q.dts);y.push(new v(Q.key,i,X,se))}if(y.length&&h&&h<70){var le=y[0].flags;le.dependsOn=2,le.isNonSync=0}console.assert(void 0!==i,"mp4SampleDuration must be computed"),this.nextAvcDts=_=f+i,this.isVideoContiguous=!0;var ce={data1:a.default.moof(e.sequenceNumber++,c,d({},e,{samples:y})),data2:W,startPTS:w/m,endPTS:(S+i)/m,startDTS:c/m,endDTS:_/m,type:"video",hasAudio:!1,hasVideo:!0,nb:y.length,dropped:e.dropped};return e.samples=[],e.dropped=0,console.assert(W.length,"MDAT length must not be zero"),ce},t.remuxAudio=function(e,t,n,r,c){var u=e.inputTimeScale,h=u/(e.samplerate?e.samplerate:u),f=e.isAAC?1024:1152,p=f*h,m=this._initPTS,b=!e.isAAC&&this.typeSupported.mpeg,y=[],x=e.samples,E=b?0:8,_=this.nextAudioPts||-1,k=t*u;if(this.isAudioContiguous=n=n||x.length&&_>0&&(r&&Math.abs(k-_)<9e3||Math.abs(g(x[0].pts-m,k)-_)<20*p),x.forEach((function(e){e.pts=g(e.pts-m,k)})),!n||_<0){if(!(x=x.filter((function(e){return e.pts>=0}))).length)return;_=0===c?0:r?Math.max(0,k):x[0].pts}if(e.isAAC)for(var w=void 0!==c,S=this.config.maxAudioFramesDrift,C=0,O=_;C=S*p&&D<1e4&&w){var L=Math.round(I/p);(O=T-L*p)<0&&(L--,O+=p),0===C&&(this.nextAudioPts=_=O),l.logger.warn("[mp4-remuxer]: Injecting "+L+" audio frame @ "+(O/u).toFixed(3)+"s due to "+Math.round(1e3*I/u)+" ms gap.");for(var R=0;R0))return;F+=E;try{M=new Uint8Array(F)}catch(e){return void this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:F,reason:"fail allocating audio mdat "+F})}b||(new DataView(M.buffer).setUint32(0,F),M.set(a.default.types.mdat,4))}M.set(V,E);var K=V.byteLength;E+=K,y.push(new v(!0,f,K,0)),B=W}var q=y.length;if(q){var Y=y[y.length-1];this.nextAudioPts=_=B+h*Y.duration;var Q=b?new Uint8Array(0):a.default.moof(e.sequenceNumber++,P/h,d({},e,{samples:y}));e.samples=[];var J=P/u,X=_/u,Z={data1:Q,data2:M,startPTS:J,endPTS:X,startDTS:J,endDTS:X,type:"audio",hasAudio:!0,hasVideo:!1,nb:q};return this.isAudioContiguous=!0,console.assert(M.length,"MDAT length must not be zero"),Z}},t.remuxEmptyAudio=function(e,t,n,r){var a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),s=this.nextAudioPts,c=(null!==s?s:r.startDTS*a)+this._initDTS,u=r.endDTS*a+this._initDTS,d=1024*o,h=Math.ceil((u-c)/d),f=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var p=[],m=0;m4294967296;)e+=n;return e}var v=function(e,t,n,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=n,this.cts=r,this.flags=new b(e)},b=function(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}},"./src/remux/passthrough-remuxer.ts": +/*!******************************************!*\ + !*** ./src/remux/passthrough-remuxer.ts ***! + \******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),a=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=function(){function e(){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 t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this.initPTS=e,this.lastEndDTS=null},t.resetNextTimestamp=function(){this.lastEndDTS=null},t.resetInitSegment=function(e,t,n){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(e),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,n=this.videoCodec;if(!e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=Object(i.parseInitSegment)(e);t||(t=c(r.audio,a.ElementaryStreamTypes.AUDIO)),n||(n=c(r.video,a.ElementaryStreamTypes.VIDEO));var s={};r.audio&&r.video?s.audiovideo={container:"video/mp4",codec:t+","+n,initSegment:e,id:"main"}:r.audio?s.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?s.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:o.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s},t.remux=function(e,t,n,a,s){var c=this.initPTS,u=this.lastEndDTS,d={audio:void 0,video:void 0,text:a,id3:n,initSegment:void 0};Object(r.isFiniteNumber)(u)||(u=this.lastEndDTS=s||0);var h=t.samples;if(!h||!h.length)return d;var f={initPTS:void 0,timescale:1},p=this.initData;if(p&&p.length||(this.generateInitSegment(h),p=this.initData),!p||!p.length)return o.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),d;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1),Object(r.isFiniteNumber)(c)||(this.initPTS=f.initPTS=c=l(p,h,u));var m=Object(i.getDuration)(h,p),g=u,v=m+g;Object(i.offsetStartDTS)(p,h,c),m>0?this.lastEndDTS=v:(o.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var b=!!p.audio,y=!!p.video,x="";b&&(x+="audio"),y&&(x+="video");var E={data1:h,startPTS:g,startDTS:g,endPTS:v,endDTS:v,type:x,hasAudio:b,hasVideo:y,nb:1,dropped:0};return d.audio="audio"===E.type?E:void 0,d.video="audio"!==E.type?E:void 0,d.text=a,d.id3=n,d.initSegment=f,d},e}(),l=function(e,t,n){return Object(i.getStartDTS)(e,t)-n};function c(e,t){var n=null==e?void 0:e.codec;return n&&n.length>4?n:"hvc1"===n?"hvc1.1.c.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||t===a.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}t.default=s},"./src/task-loop.ts": +/*!**************************!*\ + !*** ./src/task-loop.ts ***! + \**************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},t.onHandlerDestroyed=function(){},t.hasInterval=function(){return!!this._tickInterval},t.hasNextTick=function(){return!!this._tickTimer},t.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},t.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},t.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},t.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},t.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},t.doTick=function(){},e}()},"./src/types/cmcd.ts": +/*!***************************!*\ + !*** ./src/types/cmcd.ts ***! + \***************************/ +/*! exports provided: CMCDVersion, CMCDObjectType, CMCDStreamingFormat, CMCDStreamType */function(e,t,n){"use strict";n.r(t),n.d(t,"CMCDVersion",(function(){return o})),n.d(t,"CMCDObjectType",(function(){return r})),n.d(t,"CMCDStreamingFormat",(function(){return i})),n.d(t,"CMCDStreamType",(function(){return a}));var r,i,a,o=1;!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(r||(r={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(i||(i={})),function(e){e.VOD="v",e.LIVE="l"}(a||(a={}))},"./src/types/level.ts": +/*!****************************!*\ + !*** ./src/types/level.ts ***! + \****************************/ +/*! exports provided: HlsSkip, getSkipValue, HlsUrlParameters, Level */function(e,t,n){"use strict";function r(e,t){for(var n=0;nNumber.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;rNumber.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var n=this[e];return n?parseFloat(n):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=r.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(i.lastIndex=0;null!==(t=i.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n},e}()},"./src/utils/binary-search.ts": +/*!************************************!*\ + !*** ./src/utils/binary-search.ts ***! + \************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={search:function(e,t){for(var n=0,r=e.length-1,i=null,a=null;n<=r;){var o=t(a=e[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null}}},"./src/utils/buffer-helper.ts": +/*!************************************!*\ + !*** ./src/utils/buffer-helper.ts ***! + \************************************/ +/*! exports provided: BufferHelper */function(e,t,n){"use strict";n.r(t),n.d(t,"BufferHelper",(function(){return a}));var r=n(/*! ./logger */"./src/utils/logger.ts"),i={length:0,start:function(){return 0},end:function(){return 0}},a=function(){function e(){}return e.isBuffered=function(t,n){try{if(t)for(var r=e.getBuffered(t),i=0;i=r.start(i)&&n<=r.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(t,n,r){try{if(t){var i,a=e.getBuffered(t),o=[];for(i=0;io&&(r[a-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,c=t,u=t,d=0;d=h&&t=e&&i.logger.log(this.time+" ["+e+"] "+t)},e}(),f=function(e){for(var t=[],n=0;n100&&(this.logger.log(r.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n=144&&this.backSpace();var t=o(e);this.pos>=100?this.logger.log(r.ERROR,"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<100;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<100;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),v=function(){function e(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var t=0;t<15;t++)this.rows.push(new g(e));this.logger=e,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<15;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(r.INFO,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(r.INFO,"pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),b=function(){function e(e,t,n){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=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new v(n),this.nonDisplayedMemory=new v(n),this.lastOutputScreen=new v(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var t=e.prototype;return t.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},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(r.INFO,"MODE="+e),"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=e)},t.insertChars=function(e){for(var t=0;t=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(r.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),y=function(){function e(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new h;this.channels=[null,new b(e,t,r),new b(e+1,n,r)],this.cmdHistory={a:null,b:null},this.logger=r}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,i,a,o=!1;this.logger.time=e;for(var s=0;s ("+f([i,a])+")"),(n=this.parseCmd(i,a))||(n=this.parseMidrow(i,a)),n||(n=this.parsePAC(i,a)),n||(n=this.parseBackgroundAttributes(i,a)),!n&&(o=this.parseChars(i,a))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(o):this.logger.log(r.WARNING,"No channel found yet. TEXT-MODE?")}n||o||this.logger.log(r.WARNING,"Couldn't parse cleaned data "+f([i,a])+" orig: "+f([t[s],t[s+1]]))}},t.parseCmd=function(e,t){var n=this.cmdHistory;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(E(e,t,n))return x(null,null,n),this.logger.log(r.DEBUG,"Repeated command ("+f([e,t])+") is dropped"),!0;var i=20===e||21===e||23===e?1:2,a=this.channels[i];return 20===e||21===e||28===e||29===e?32===t?a.ccRCL():33===t?a.ccBS():34===t?a.ccAOF():35===t?a.ccAON():36===t?a.ccDER():37===t?a.ccRU(2):38===t?a.ccRU(3):39===t?a.ccRU(4):40===t?a.ccFON():41===t?a.ccRDC():42===t?a.ccTR():43===t?a.ccRTD():44===t?a.ccEDM():45===t?a.ccCR():46===t?a.ccENM():47===t&&a.ccEOC():a.ccTO(t-32),x(e,t,n),this.currentChannel=i,!0},t.parseMidrow=function(e,t){var n=0;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currentChannel)return this.logger.log(r.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[n];return!!i&&(i.ccMIDROW(t),this.logger.log(r.DEBUG,"MIDROW ("+f([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var n,r=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(E(e,t,r))return x(null,null,r),!0;var i=e<=23?1:2;n=t>=64&&t<=95?1===i?s[e]:c[e]:1===i?l[e]:u[e];var a=this.channels[i];return!!a&&(a.setPAC(this.interpretPAC(n,t)),x(e,t,r),this.currentChannel=i,!0)},t.interpretPAC=function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.parseChars=function(e,t){var n,i,a=null,s=null;if(e>=25?(n=2,s=e-8):(n=1,s=e),s>=17&&s<=19?(i=17===s?t+80:18===s?t+112:t+144,this.logger.log(r.INFO,"Special char '"+o(i)+"' in channel "+n),a=[i]):e>=32&&e<=127&&(a=0===t?[e]:[e,t]),a){var l=f(a);this.logger.log(r.DEBUG,"Char codes = "+l.join(",")),x(e,t,this.cmdHistory)}return a},t.parseBackgroundAttributes=function(e,t){var n;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=d[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));var i=e<=23?1:2;return this.channels[i].setBkgData(r),x(e,t,this.cmdHistory),!0},t.reset=function(){for(var e=0;e=16?d--:d++;var v=Object(r.fixLineBreaks)(h.trim()),b=Object(i.generateCueId)(t,n,v);e&&e.cues&&e.cues.getCueById(b)||((c=new p(t,n,v)).id=b,c.line=m+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*d/32)),f.push(c))}return e&&f.length&&(f.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),f.forEach((function(t){return Object(a.addCueToTrack)(e,t)}))),f}};t.default=s},"./src/utils/discontinuities.ts": +/*!**************************************!*\ + !*** ./src/utils/discontinuities.ts ***! + \**************************************/ +/*! exports provided: findFirstFragWithCC, shouldAlignOnDiscontinuities, findDiscontinuousReferenceFrag, adjustSlidingStart, alignStream, alignPDT, alignFragmentByPDTDelta, alignMediaPlaylistByPDT */function(e,t,n){"use strict";n.r(t),n.d(t,"findFirstFragWithCC",(function(){return o})),n.d(t,"shouldAlignOnDiscontinuities",(function(){return s})),n.d(t,"findDiscontinuousReferenceFrag",(function(){return l})),n.d(t,"adjustSlidingStart",(function(){return u})),n.d(t,"alignStream",(function(){return d})),n.d(t,"alignPDT",(function(){return h})),n.d(t,"alignFragmentByPDTDelta",(function(){return f})),n.d(t,"alignMediaPlaylistByPDT",(function(){return p}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./logger */"./src/utils/logger.ts"),a=n(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function o(e,t){for(var n=null,r=0,i=e.length;rn.startCC||e&&e.cc=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();t.default=i},"./src/utils/ewma.ts": +/*!***************************!*\ + !*** ./src/utils/ewma.ts ***! + \***************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}();t.default=r},"./src/utils/fetch-loader.ts": +/*!***********************************!*\ + !*** ./src/utils/fetch-loader.ts ***! + \***********************************/ +/*! exports provided: fetchSupported, default */function(e,t,n){"use strict";n.r(t),n.d(t,"fetchSupported",(function(){return h}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=n(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function o(e){var t="function"==typeof Map?new Map:void 0;return(o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)})(e)}function s(e,t,n){return(s=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&c(i,n.prototype),i}).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(e){return!1}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(){return(d=Object.assign||function(e){for(var t=1;t=r&&i(t,n,o.flush(),e)):i(t,n,l,e),a()})).catch((function(){return Promise.reject()}))}()},e}();function p(e,t){return new self.Request(e.url,t)}var m=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r}(o(Error));t.default=f},"./src/utils/imsc1-ttml-parser.ts": +/*!****************************************!*\ + !*** ./src/utils/imsc1-ttml-parser.ts ***! + \****************************************/ +/*! exports provided: IMSC1_CODEC, parseIMSC1 */function(e,t,n){"use strict";n.r(t),n.d(t,"IMSC1_CODEC",(function(){return u})),n.d(t,"parseIMSC1",(function(){return p}));var r=n(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),i=n(/*! ./vttparser */"./src/utils/vttparser.ts"),a=n(/*! ./vttcue */"./src/utils/vttcue.ts"),o=n(/*! ../demux/id3 */"./src/demux/id3.ts"),s=n(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=n(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function c(){return(c=Object.assign||function(e){for(var t=1;t"):r}function s(e){if(self.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function d(e,t){var n,r,i,a=[];if(!t.length)return a;"data"in e?(n=e.data,r=e.start,i=e.end):(r=0,i=(n=e).byteLength);for(var l=r;l1?l+u:i;if(s(n.subarray(l+4,l+8))===t[0])if(1===t.length)a.push({data:n,start:l+8,end:h});else{var f=d({data:n,start:l+8,end:h},t.slice(1));f.length&&o.apply(a,f)}l=h}return a}function h(e){var t=d(e,["moov"])[0],n=t?t.end:null,r=d(e,["sidx"]);if(!r||!r[0])return null;var i=[],a=r[0],o=a.data[0],s=0===o?8:16,u=c(a,s);s+=4,s+=0===o?8:16,s+=2;var h=a.end+0,f=l(a,s);s+=2;for(var p=0;p>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var b=c(a,m);m+=4,i.push({referenceSize:v,subsegmentDuration:b,info:{duration:b/u,start:h,end:h+v-1}}),h+=v,s=m+=4}return{earliestPresentationTime:0,timescale:u,version:o,referencesCount:f,references:i,moovEndOffset:n}}function f(e){for(var t=[],n=d(e,["moov","trak"]),r=0;re)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[]},e}()},"./src/utils/texttrack-utils.ts": +/*!**************************************!*\ + !*** ./src/utils/texttrack-utils.ts ***! + \**************************************/ +/*! exports provided: sendAddTrackEvent, addCueToTrack, clearCurrentCues, removeCuesInRange, getCuesInRange */function(e,t,n){"use strict";n.r(t),n.d(t,"sendAddTrackEvent",(function(){return i})),n.d(t,"addCueToTrack",(function(){return a})),n.d(t,"clearCurrentCues",(function(){return o})),n.d(t,"removeCuesInRange",(function(){return s})),n.d(t,"getCuesInRange",(function(){return l}));var r=n(/*! ./logger */"./src/utils/logger.ts");function i(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function a(e,t){var n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(n){r.logger.debug("[texttrack-utils]: "+n);var i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}"disabled"===n&&(e.mode=n)}function o(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var n=e.cues.length;n--;)e.removeCue(e.cues[n]);"disabled"===t&&(e.mode=t)}function s(e,t,n){var r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var i=l(e.cues,t,n),a=0;ae[n].endTime)return-1;for(var r=0,i=n;r<=i;){var a=Math.floor((i+r)/2);if(te[a].startTime&&r-1)for(var a=i,o=e.length;a=t&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}},"./src/utils/time-ranges.ts": +/*!**********************************!*\ + !*** ./src/utils/time-ranges.ts ***! + \**********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={toString:function(e){for(var t="",n=e.length,r=0;r1?t-1:0),r=1;r100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return x},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");x=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},l,{get:function(){return E},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");E=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},l,{get:function(){return _},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),s.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}()},"./src/utils/vttparser.ts": +/*!********************************!*\ + !*** ./src/utils/vttparser.ts ***! + \********************************/ +/*! exports provided: parseTimeStamp, fixLineBreaks, VTTParser */function(e,t,n){"use strict";n.r(t),n.d(t,"parseTimeStamp",(function(){return a})),n.d(t,"fixLineBreaks",(function(){return d})),n.d(t,"VTTParser",(function(){return h}));var r=n(/*! ./vttcue */"./src/utils/vttcue.ts"),i=function(){function e(){}return e.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},e}();function a(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+parseFloat(r||0)}var n=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?t(n[2],n[3],0,n[4]):t(n[1],n[2],n[3],n[4]):null}var o=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,n){for(var r=0;r=0&&n<=100)return this.set(e,n),!0}return!1},e}();function s(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}var l=new r.default(0,0,""),c="middle"===l.align?"middle":"center";function u(e,t,n){var r=e;function i(){var t=a(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=i(),u(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),u(),t.endTime=i(),u(),function(e,t){var r=new o;s(e,(function(e,t){var i;switch(e){case"region":for(var a=n.length-1;a>=0;a--)if(n[a].id===t){r.set(e,n[a].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),r.integer(e,i[0]),r.percent(e,i[0])&&r.set("snapToLines",!1),r.alt(e,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",c,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",c,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===l.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",c);var a=r.get("position","auto");"auto"===a&&50===l.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function d(e){return e.replace(//gi,"\n")}var h=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new i,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=d(e);n>>0).toString()};function d(e,t,n){return u(e.toString())+u(t.toString())+u(n)}function h(e,t,n,u,h,f,p,m){var g,v=new i.VTTParser,b=Object(a.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(l,"\n").split("\n"),y=[],x=Object(o.toMpegTsClockFromTimescale)(t,n),E="00:00.000",_=0,k=0,w=!0,S=!1;v.oncue=function(e){var t=u[h],n=u.ccOffset,r=(_-x)/9e4;if(null!=t&&t.new&&(void 0!==k?n=u.ccOffset=t.start:function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;null!==(a=i)&&void 0!==a&&a.new;){var a;e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC]}e.presentationOffset=n}(u,h,r)),r&&(n=r-u.presentationOffset),S){var i=e.endTime-e.startTime,a=Object(s.normalizePts)(9e4*(e.startTime+n-k),9e4*f)/9e4;e.startTime=a,e.endTime=a+i}var o=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(o)),e.id||(e.id=d(e.startTime,e.endTime,o)),e.endTime>0&&y.push(e)},v.onparsingerror=function(e){g=e},v.onflush=function(){g?m(g):p(y)},b.forEach((function(e){if(w){if(c(e,"X-TIMESTAMP-MAP=")){w=!1,S=!0,e.substr(16).split(",").forEach((function(e){c(e,"LOCAL:")?E=e.substr(6):c(e,"MPEGTS:")&&(_=parseInt(e.substr(7)))}));try{k=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),i=parseInt(e.substr(-9,2)),a=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(r.isFiniteNumber)(t)&&Object(r.isFiniteNumber)(n)&&Object(r.isFiniteNumber)(i)&&Object(r.isFiniteNumber)(a)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,t+=6e4*i,t+=36e5*a}(E)/1e3}catch(e){S=!1,g=e}return}""===e&&(w=!1)}v.parse(e+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts": +/*!*********************************!*\ + !*** ./src/utils/xhr-loader.ts ***! + \*********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=/^age:\s*[\d.]+\s*$/m,o=function(){function e(e){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=e?e.xhrSetup:null,this.stats=new i.LoadStats,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e=this.config,t=this.context;if(e){var n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(n,t.url)}catch(e){n.open("GET",t.url,!0),i(n,t.url)}n.readyState||n.open("GET",t.url,!0);var a=this.context.headers;if(a)for(var o in a)n.setRequestHeader(o,a[o])}catch(e){return void this.callbacks.onError({code:n.status,text:e.message},t,n)}t.rangeEnd&&n.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),n.onreadystatechange=this.readystatechange.bind(this),n.onprogress=this.loadprogress.bind(this),n.responseType=t.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.timeout),n.send()}},t.readystatechange=function(){var e=this.context,t=this.loader,n=this.stats;if(e&&t){var i=t.readyState,a=this.config;if(!n.aborted&&i>=2)if(self.clearTimeout(this.requestTimeout),0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start)),4===i){t.onreadystatechange=null,t.onprogress=null;var o=t.status;if(o>=200&&o<300){var s,l;if(n.loading.end=Math.max(self.performance.now(),n.loading.first),l="arraybuffer"===e.responseType?(s=t.response).byteLength:(s=t.responseText).length,n.loaded=n.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(n,e,s,t),!this.callbacks)return;var u={url:t.responseURL,data:s};this.callbacks.onSuccess(u,n,e,t)}else n.retry>=a.maxRetry||o>=400&&o<499?(r.logger.error(o+" while loading "+e.url),this.callbacks.onError({code:o,text:t.statusText},e,t)):(r.logger.warn(o+" while loading "+e.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),n.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)}},t.loadtimeout=function(){r.logger.warn("timeout while loading "+this.context.url);var e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&a.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},e}();t.default=o}}).default},e.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(e,t,n){e.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKoX: +/*!**************************************************************!*\ + !*** ./node_modules/zrender/lib/svg/helper/ShadowManager.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Definable */"SrGk");function i(e,t){r.call(this,e,t,["filter"],"__filter_in_use__","_shadowDom")}function a(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY||e.textShadowBlur||e.textShadowOffsetX||e.textShadowOffsetY)}n(/*! ../../core/util */"bYtY").inherits(i,r),i.prototype.addWithoutUpdate=function(e,t){if(t&&a(t.style)){var n;if(t._shadowDom)n=t._shadowDom,this.getDefs(!0).contains(t._shadowDom)||this.addDom(n);else n=this.add(t);this.markUsed(t);var r=n.getAttribute("id");e.style.filter="url(#"+r+")"}},i.prototype.add=function(e){var t=this.createElement("filter");return e._shadowDomId=e._shadowDomId||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-shadow-"+e._shadowDomId),this.updateDom(e,t),this.addDom(t),t},i.prototype.update=function(e,t){if(a(t.style)){var n=this;r.prototype.update.call(this,t,(function(){n.updateDom(t,t._shadowDom)}))}else this.remove(e,t)},i.prototype.remove=function(e,t){null!=t._shadowDomId&&(this.removeDom(e),e.style.filter="")},i.prototype.updateDom=function(e,t){var n=t.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var r,i,a,o,s=e.style,l=e.scale&&e.scale[0]||1,c=e.scale&&e.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)r=s.shadowOffsetX||0,i=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(t,s);r=s.textShadowOffsetX||0,i=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}n.setAttribute("dx",r/l),n.setAttribute("dy",i/c),n.setAttribute("flood-color",o);var u=a/2/l+" "+a/2/c;n.setAttribute("stdDeviation",u),t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width",Math.ceil(a/2*200)+"%"),t.setAttribute("height",Math.ceil(a/2*200)+"%"),t.appendChild(n),e._shadowDom=t},i.prototype.markUsed=function(e){e._shadowDom&&r.prototype.markUsed.call(this,e._shadowDom)};var o=i;e.exports=o},vWvF: +/*!******************************************************!*\ + !*** ./node_modules/zrender/lib/mixin/Animatable.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../animation/Animator */"Bq2U"),i=n(/*! ../core/log */"SUKs"),a=n(/*! ../core/util */"bYtY"),o=a.isString,s=a.isFunction,l=a.isObject,c=a.isArrayLike,u=a.indexOf,d=function(){this.animators=[]};function h(e,t,n,r,i,a,u,d){o(r)?(a=i,i=r,r=0):s(i)?(a=i,i="linear",r=0):s(r)?(a=r,r=0):s(n)?(a=n,n=500):n||(n=500),e.stopAnimation(),function e(t,n,r,i,a,o,s){var u={},d=0;for(var h in i)i.hasOwnProperty(h)&&(null!=r[h]?l(i[h])&&!c(i[h])?e(t,n?n+"."+h:h,r[h],i[h],a,o,s):(s?(u[h]=r[h],f(t,n,h,i[h])):u[h]=i[h],d++):null==i[h]||s||f(t,n,h,i[h]));d>0&&t.animate(n,!1).when(null==a?500:a,u).delay(o||0)}(e,"",e,t,n,r,d);var h=e.animators.slice(),p=h.length;function m(){--p||a&&a()}p||a&&a();for(var g=0;g2&&void 0!==arguments[2]?arguments[2]:0;t[i]=t[i]||[];var a=r,o=n.filter(Boolean).map((function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:a},o=1,s=n.children;return s&&s.length>0&&(o=e(s,a,i+1).reduce((function(e,t){return e+t}),0),r.hasSubColumns=!0),"colSpan"in n&&(o=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=o,r.colEnd=r.colStart+o-1,t[i].push(r),a+=o,o}));return o}(e,0);for(var n=t.length,r=function(e){t[e].forEach((function(t){"rowSpan"in t||t.hasSubColumns||(t.rowSpan=n-e)}))},i=0;i=0;a-=1){var o=t[a],s=n&&n[a],c=s&&s[O.a];(o||c||i)&&(r.unshift(l.createElement("col",Object.assign({key:a,style:{width:o,minWidth:o}},c))),i=!0)}return l.createElement("colgroup",null,r)};var T=l.forwardRef((function(e,t){var n=e.noData,o=e.columns,s=e.flattenColumns,c=e.colWidths,d=e.columCount,h=e.stickyOffsets,f=e.direction,p=e.fixHeader,m=e.offsetHeader,g=e.stickyClassName,v=e.onScroll,x=Object(b.a)(e,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),_=l.useContext(E.a),k=_.prefixCls,w=_.scrollbarSize,S=_.isSticky,O=S&&!p?0:w,T=l.useRef(null),I=l.useCallback((function(e){Object(y.b)(t,e),Object(y.b)(T,e)}),[]);l.useEffect((function(){var e;function t(e){var t=e.currentTarget,n=e.deltaX;n&&(v({currentTarget:t,scrollLeft:t.scrollLeft+n}),e.preventDefault())}return null===(e=T.current)||void 0===e||e.addEventListener("wheel",t),function(){var e;null===(e=T.current)||void 0===e||e.removeEventListener("wheel",t)}}),[]);var D=s[s.length-1],L={fixed:D?D.fixed:null,onHeaderCell:function(){return{className:"".concat(k,"-cell-scrollbar")}}},R=Object(l.useMemo)((function(){return O?[].concat(Object(a.a)(o),[L]):o}),[O,o]),N=Object(l.useMemo)((function(){return O?[].concat(Object(a.a)(s),[L]):s}),[O,s]),j=Object(l.useMemo)((function(){var e=h.right,t=h.left;return Object(i.a)(Object(i.a)({},h),{},{left:"rtl"===f?[].concat(Object(a.a)(t.map((function(e){return e+O}))),[0]):t,right:"rtl"===f?e:[].concat(Object(a.a)(e.map((function(e){return e+O}))),[0]),isSticky:S})}),[O,h,S]),M=function(e,t){return Object(l.useMemo)((function(){for(var n=[],r=0;r1?n-1:0),a=1;a=p&&(r=p-g),c({scrollLeft:r/p*(f+2)}),k.current.x=e.pageX}else C&&O(!1)},I=function(){var e=Object(Y.b)(o.current).top,t=e+o.current.offsetHeight,n=document.documentElement.scrollTop+window.innerHeight;t-Object(m.a)()<=n||e>=n-d?_((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!0})})):_((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!1})}))},D=function(e){_((function(t){return Object(i.a)(Object(i.a)({},t),{},{scrollLeft:e/f*p||0})}))};return l.useImperativeHandle(t,(function(){return{setScrollLeft:D}})),l.useEffect((function(){var e=Object(q.a)(document.body,"mouseup",A,!1),t=Object(q.a)(document.body,"mousemove",T,!1);return I(),function(){e.remove(),t.remove()}}),[g,C]),l.useEffect((function(){var e=Object(q.a)(window,"scroll",I,!1),t=Object(q.a)(window,"resize",I,!1);return function(){e.remove(),t.remove()}}),[]),l.useEffect((function(){x.isHiddenScrollBar||_((function(e){var t,n;return Object(i.a)(Object(i.a)({},e),{},{scrollLeft:o.current.scrollLeft/(null===(t=o.current)||void 0===t?void 0:t.scrollWidth)*(null===(n=o.current)||void 0===n?void 0:n.clientWidth)})}))}),[x.isHiddenScrollBar]),f<=p||!g||x.isHiddenScrollBar?null:l.createElement("div",{style:{height:Object(m.a)(),width:p,bottom:d},className:"".concat(h,"-sticky-scroll")},l.createElement("div",{onMouseDown:function(e){e.persist(),k.current.delta=e.pageX-x.scrollLeft,k.current.x=0,O(!0),e.preventDefault()},ref:v,className:u()("".concat(h,"-sticky-scroll-bar"),Object(r.a)({},"".concat(h,"-sticky-scroll-bar-active"),C)),style:{width:"".concat(g,"px"),transform:"translate3d(".concat(x.scrollLeft,"px, 0, 0)")}}))}));var J=[],X={},Z="rc-table-internal-hook",$=l.memo((function(e){return e.children}),(function(e,t){return!!h()(e.props,t.props)&&(e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight)}));function ee(e){var t,n=e.prefixCls,c=e.className,d=e.rowClassName,h=e.style,g=e.data,v=e.rowKey,b=e.scroll,y=e.tableLayout,x=e.direction,w=e.title,S=e.footer,T=e.summary,L=e.id,R=e.showHeader,N=e.components,M=e.emptyText,P=e.onRow,U=e.onHeaderRow,H=e.internalHooks,q=e.transformColumns,Y=e.internalRefs,ee=e.sticky,te=g||J,ne=!!te.length,re=l.useState(0),ie=Object(s.a)(re,2),ae=ie[0],oe=ie[1];l.useEffect((function(){oe(Object(m.a)())}));var se,le,ce,ue=l.useMemo((function(){return Object(k.c)(N,{})}),[N]),de=l.useCallback((function(e,t){return Object(k.b)(ue,e)||t}),[ue]),he=l.useMemo((function(){return"function"==typeof v?v:function(e){return e&&e[v]}}),[v]),fe=Object(O.c)(e),pe=fe.expandIcon,me=fe.expandedRowKeys,ge=fe.defaultExpandedRowKeys,ve=fe.defaultExpandAllRows,be=fe.expandedRowRender,ye=fe.onExpand,xe=fe.onExpandedRowsChange,Ee=fe.expandRowByClick,_e=fe.rowExpandable,ke=fe.expandIconColumnIndex,we=fe.expandedRowClassName,Se=fe.childrenColumnName,Ce=fe.indentSize,Oe=pe||K,Ae=Se||"children",Te=l.useMemo((function(){return be?"row":!!(e.expandable&&H===Z&&e.expandable.__PARENT_RENDER_ICON__||te.some((function(e){return e&&"object"===Object(o.a)(e)&&e[Ae]})))&&"nest"}),[!!be,te]),Ie=l.useState((function(){return ge||(ve?function(e,t,n){var r=[];return function e(i){(i||[]).forEach((function(i,a){r.push(t(i,a)),e(i[n])}))}(e),r}(te,he,Ae):[])})),De=Object(s.a)(Ie,2),Le=De[0],Re=De[1],Ne=l.useMemo((function(){return new Set(me||Le||[])}),[me,Le]),je=l.useCallback((function(e){var t,n=he(e,te.indexOf(e)),r=Ne.has(n);r?(Ne.delete(n),t=Object(a.a)(Ne)):t=[].concat(Object(a.a)(Ne),[n]),Re(t),ye&&ye(!r,e),xe&&xe(t)}),[he,Ne,te,ye,xe]),Me=l.useState(0),Pe=Object(s.a)(Me,2),Be=Pe[0],Fe=Pe[1],Ue=Object(F.b)(Object(i.a)(Object(i.a)(Object(i.a)({},e),fe),{},{expandable:!!be,expandedKeys:Ne,getRowKey:he,onTriggerExpand:je,expandIcon:Oe,expandIconColumnIndex:ke,direction:x}),H===Z?q:null),He=Object(s.a)(Ue,2),Ge=He[0],ze=He[1],Ve=l.useMemo((function(){return{columns:Ge,flattenColumns:ze}}),[Ge,ze]),We=l.useRef(),Ke=l.useRef(),qe=l.useRef(),Ye=l.useState(!1),Qe=Object(s.a)(Ye,2),Je=Qe[0],Xe=Qe[1],Ze=l.useState(!1),$e=Object(s.a)(Ze,2),et=$e[0],tt=$e[1],nt=G(new Map),rt=Object(s.a)(nt,2),it=rt[0],at=rt[1],ot=Object(k.a)(ze).map((function(e){return it.get(e)})),st=l.useMemo((function(){return ot}),[ot.join("_")]),lt=z(st,ze.length,x),ct=b&&Object(k.d)(b.y),ut=b&&Object(k.d)(b.x),dt=ut&&ze.some((function(e){return e.fixed})),ht=l.useRef(),ft=function(e,t){return l.useMemo((function(){var n=!!e;return{isSticky:n,stickyClassName:n?"".concat(t,"-sticky-header"):"",offsetHeader:"object"===Object(o.a)(e)&&e.offsetHeader||0,offsetScroll:"object"===Object(o.a)(e)&&e.offsetScroll||0}}),[e,t])}(ee,n),pt=ft.isSticky,mt=ft.offsetHeader,gt=ft.offsetScroll,vt=ft.stickyClassName;ct&&(le={overflowY:"scroll",maxHeight:b.y}),ut&&(se={overflowX:"auto"},ct||(le={overflowY:"hidden"}),ce={width:!0===b.x?"auto":b.x,minWidth:"100%"});var bt=l.useCallback((function(e,t){at((function(n){var r=new Map(n);return r.set(e,t),r}))}),[]),yt=function(e){var t=Object(l.useRef)(e),n=Object(l.useRef)(null);function r(){window.clearTimeout(n.current)}return Object(l.useEffect)((function(){return r}),[]),[function(e){t.current=e,r(),n.current=window.setTimeout((function(){t.current=null,n.current=null}),100)},function(){return t.current}]}(null),xt=Object(s.a)(yt,2),Et=xt[0],_t=xt[1];function kt(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e))}var wt=function(e){var t,n=e.currentTarget,r=e.scrollLeft,i="number"==typeof r?r:n.scrollLeft,a=n||X;_t()&&_t()!==a||(Et(a),kt(i,Ke.current),kt(i,qe.current),kt(i,null===(t=ht.current)||void 0===t?void 0:t.setScrollLeft));if(n){var o=n.scrollWidth,s=n.clientWidth;Xe(i>0),tt(i0?[].concat(Object(i.a)(e),Object(i.a)(d(o).map((function(e){return Object(a.a)({fixed:r},e)})))):[].concat(Object(i.a)(e),[Object(a.a)(Object(a.a)({},t),{},{fixed:r})])}),[])}t.b=function(e,t){var n=e.prefixCls,i=e.columns,l=e.children,h=e.expandable,f=e.expandedKeys,p=e.getRowKey,m=e.onTriggerExpand,g=e.expandIcon,v=e.rowExpandable,b=e.expandIconColumnIndex,y=e.direction,x=e.expandRowByClick,E=s.useMemo((function(){return i||u(l)}),[i,l]),_=s.useMemo((function(){if(h){var e,t=b||0,i=E[t],a=(e={},Object(r.a)(e,c.a,{className:"".concat(n,"-expand-icon-col")}),Object(r.a)(e,"title",""),Object(r.a)(e,"fixed",i?i.fixed:null),Object(r.a)(e,"className","".concat(n,"-row-expand-icon-cell")),Object(r.a)(e,"render",(function(e,t,r){var i=p(t,r),a=f.has(i),o=!v||v(t),l=g({prefixCls:n,expanded:a,expandable:o,record:t,onExpand:m});return x?s.createElement("span",{onClick:function(e){return e.stopPropagation()}},l):l})),e),o=E.slice();return t>=0&&o.splice(t,0,a),o}return E}),[h,E,p,f,g,y]),k=s.useMemo((function(){var e=_;return t&&(e=t(e)),e.length||(e=[{render:function(){return null}}]),e}),[t,_,y]),w=s.useMemo((function(){return"rtl"===y?function(e){return e.map((function(e){var t=e.fixed,n=Object(o.a)(e,["fixed"]),r=t;return"left"===t?r="right":"right"===t&&(r="left"),Object(a.a)({fixed:r},n)}))}(d(k)):d(k)}),[k,y]);return[k,w]}},x6Kt: +/*!********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/Rect.js ***! + \********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../helper/roundRect */"VpOo"),a=n(/*! ../helper/subPixelOptimize */"nPnh").subPixelOptimizeRect,o={},s=r.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(e,t){var n,r,s,l;this.subPixelOptimize?(a(o,t,this.style),n=o.x,r=o.y,s=o.width,l=o.height,o.r=t.r,t=o):(n=t.x,r=t.y,s=t.width,l=t.height),t.r?i.buildPath(e,t):e.rect(n,r,s,l),e.closePath()}});e.exports=s},"y+Vt": +/*!**************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Path.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Displayable */"Gev7"),i=n(/*! ../core/util */"bYtY"),a=n(/*! ../core/PathProxy */"IMiH"),o=n(/*! ../contain/path */"2DNl"),s=n(/*! ./Pattern */"3C/r").prototype.getCanvasPattern,l=Math.abs,c=new a(!0);function u(e){r.call(this,e),this.path=null}u.prototype={constructor:u,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(e,t){var n,r=this.style,i=this.path||c,a=r.hasStroke(),o=r.hasFill(),l=r.fill,u=r.stroke,d=o&&!!l.colorStops,h=a&&!!u.colorStops,f=o&&!!l.image,p=a&&!!u.image;(r.bind(e,this,t),this.setTransform(e),this.__dirty)&&(d&&(n=n||this.getBoundingRect(),this._fillGradient=r.getGradient(e,l,n)),h&&(n=n||this.getBoundingRect(),this._strokeGradient=r.getGradient(e,u,n)));d?e.fillStyle=this._fillGradient:f&&(e.fillStyle=s.call(l,e)),h?e.strokeStyle=this._strokeGradient:p&&(e.strokeStyle=s.call(u,e));var m=r.lineDash,g=r.lineDashOffset,v=!!e.setLineDash,b=this.getGlobalScale();if(i.setScale(b[0],b[1],this.segmentIgnoreThreshold),this.__dirtyPath||m&&!v&&a?(i.beginPath(e),m&&!v&&(i.setLineDash(m),i.setLineDashOffset(g)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(e.beginPath(),this.path.rebuildPath(e)),o)if(null!=r.fillOpacity){var y=e.globalAlpha;e.globalAlpha=r.fillOpacity*r.opacity,i.fill(e),e.globalAlpha=y}else i.fill(e);if(m&&v&&(e.setLineDash(m),e.lineDashOffset=g),a)if(null!=r.strokeOpacity){y=e.globalAlpha;e.globalAlpha=r.strokeOpacity*r.opacity,i.stroke(e),e.globalAlpha=y}else i.stroke(e);m&&v&&e.setLineDash([]),null!=r.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))},buildPath:function(e,t,n){},createPathProxy:function(){this.path=new a},getBoundingRect:function(){var e=this._rect,t=this.style,n=!e;if(n){var r=this.path;r||(r=this.path=new a),this.__dirtyPath&&(r.beginPath(),this.buildPath(r,this.shape,!1)),e=r.getBoundingRect()}if(this._rect=e,t.hasStroke()){var i=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||n){i.copy(e);var o=t.lineWidth,s=t.strokeNoScale?this.getLineScale():1;t.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),s>1e-10&&(i.width+=o/s,i.height+=o/s,i.x-=o/s/2,i.y-=o/s/2)}return i}return e},contain:function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path.data;if(i.hasStroke()){var s=i.lineWidth,l=i.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(i.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),o.containStroke(a,s/l,e,t)))return!0}if(i.hasFill())return o.contain(a,e,t)}return!1},dirty:function(e){null==e&&(e=!0),e&&(this.__dirtyPath=e,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(e){return this.animate("shape",e)},attrKV:function(e,t){"shape"===e?(this.setShape(t),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,e,t)},setShape:function(e,t){var n=this.shape;if(n){if(i.isObject(e))for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);else n[e]=t;this.dirty(!0)}return this},getLineScale:function(){var e=this.transform;return e&&l(e[0]-1)>1e-10&&l(e[3]-1)>1e-10?Math.sqrt(l(e[0]*e[3]-e[2]*e[1])):1}},u.extend=function(e){var t=function(t){u.call(this,t),e.style&&this.style.extendFrom(e.style,!1);var n=e.shape;if(n){this.shape=this.shape||{};var r=this.shape;for(var i in n)!r.hasOwnProperty(i)&&n.hasOwnProperty(i)&&(r[i]=n[i])}e.init&&e.init.call(this,t)};for(var n in i.inherits(t,u),e)"style"!==n&&"shape"!==n&&(t.prototype[n]=e[n]);return t},i.inherits(u,r);var d=u;e.exports=d},"y0+3": +/*!********************************************!*\ + !*** ./node_modules/rc-util/es/Dom/css.js ***! + \********************************************/ +/*! exports provided: get, set, getOuterWidth, getOuterHeight, getDocSize, getClientSize, getScroll, getOffset */ +/*! exports used: getClientSize, getOffset */function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));function r(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function i(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}},y23F: +/*!*****************************************************!*\ + !*** ./node_modules/zrender/lib/mixin/Draggable.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function r(e,t){return{target:e,topTarget:t&&t.topTarget}}n.prototype={constructor:n,_dragStart:function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.dispatchToElement(r(t,e),"dragstart",e.event))},_drag:function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,t.drift(a,o,e),this.dispatchToElement(r(t,e),"drag",e.event);var s=this.findHover(n,i,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.dispatchToElement(r(l,e),"dragleave",e.event),s&&s!==l&&this.dispatchToElement(r(s,e),"dragenter",e.event))}},_dragEnd:function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.dispatchToElement(r(t,e),"dragend",e.event),this._dropTarget&&this.dispatchToElement(r(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null}};var i=n;e.exports=i},yslc: +/*!*********************************************!*\ + !*** ./src/assets/images/icons/groups3.png ***! + \*********************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAOHklEQVR4Xu1dCXQURRr+emZyTO6D3BCEgKCInCKeK3IoiyIqlxLyQBRBV8DNhCCrS3Z9Cq66KOoi68ECKocCcutTLhUERM1MEpBLEuQmQMKEnDNd+6onEzKTuXqmJ5l0V/EeL+mp+qu+r77UVP1V9TcHffZbIJgOlhgDMmaAA8lTwVDxJQh5UMY4GTSFM8AJ+PW6cIDsBEEfhfPB4MuUAYvQaTowOwV1NXtB0E6mWBksBTNwTeiUBENud/CmHwBEKZgTBl2GDNgKnQIsyBkCM9kEEI0M8TJICmWgqdCFkT17MngsUignDLYMGXAsdAo0XzcPILkyxMwgKZAB50InhIMhZxUIGalAXhhkmTHgXOgU6PG8UFwxbgdBf5nhZnAUxoBroVMyjryQgMraPSDoqDBuGFwZMeBe6MLi9IWuIHW7QUisjLAzKApiwDOhC25H3T3g8TUICVYQPwyqTBjwXOgUsD4nC4RfIhPsDIaCGBAndEHsujwQMkdBHDGoMmBAvNAtPvZlAMmUAX4GQSEMeCf0wrxgmCu+ASF3K4QnBrOVM+Cd0Cnoorw4mIw/guD6Vs4Ba74CGPBe6IInJicDZn4PgDYK4IpBbMUM+CZ0Qey5t4M3bwUhoa2YB4dNT1CHIzkoEkZzDYrrLtvkCeU0aBsULTw7WntRbtARoQrGbWHtBVw/Vpaggq9t1Rh9F7qwOM0ZA45fDgJp7PmJ0i4hCegU3AabjAc9qmF24r14JeXP+MZ4GEN+/69NmVvD0rGn8zThWYghF7XE7JFN+0wL0x5BQfVZLL60D1XE5JUNfxTqEZqC/C7Zgumeh96EvvqMP6ppNpvSCTM/ZxbAz222lousqGtIAnZkPIMETThmndmM1y/scGvB30KfFNcPH7YbLbRjwokVWHJ5v/CzltMgWq112z5HGXgQnDdVeFW2cSEmdFcU6nUfgpBJPrPsBwPhqmCsSM/EA9E3CtaXXPoJk09+4XIk9qfQrwuKhaFLNiLVodh7tQS3HX0HpB735Lj+WNTOu0Ojl0yViC/6u88MMqG7opDkaWCo2AJCBvnMtB8MqMFhQdoIPNPmDsH6+vIijCxegjrwDmvzl9BV4LAtYwr+FJEBEzHj1iML8EvVqYY2MKFL3/nSTV2sbTuWGw2jaReAbtI3VxqLuQkDMC91mGBsXXkhRhUvFcQeBBViNWENlcxocxdeSBqInRXHMLpkmU3lfbRtsbnjk8KzdgdetvlmKDVdBZ1COEuvJA/F7KSBwsfPnVyLdy9Suq6lOLUWafULXbGITYTHwZrzYos1yc9GdE8oPJDdHnXcHhCS7En2lsgzJ2kw8pLvA094YaG5teIoBoRnYFunqT43J6koz+E8mX6jLGz7KJ6KtxzvpwvQJ/5Y5XN9nhp4NLo7empTPcqepIlsaOcHF/fgnMnoUbmi6nNYUZbvUd7mzCT9iG5tfcHMvjDzOwFybYhsTmQe1PVGygPClOGzsl+F3P4UOl0jrGyfiWFRljXCBjptKlnqtbfGA3hNsixLfwyZsf4N3bO6zCDgCrTkP6FTpAbdQyBYA0JUgQbcUXvoiEsFaU26hHvwUvJgbK84ihHHF9sU6RvWDlszpgjPEgr/biNYI19jM3FJ0kRgY4dJoGVo+rxMj3ElnzasDai/flBkZ3xeZoDJyXpBCv6sQj9XZ4TBjbswUhWC/uEWP/qeqyWgmFylm0KTkRIUBWUKnTKj180AIfOl6KjmtiHVYnRB6gg8l3Cn0Pz/lO7CtFNfwtzoT2HtdRMwIvom6KtOo8/h+TafSYnZKnT6h2a/5rCvR+wcfUm7sciK66tgoVMG87PfBfCslJ3WHLZeTByEl1Pux8byA3iw+GObKsVsGD0U1Q2fpj8uuDOt0ySrsYmxt+Dj9DHCrxNPrMD/6n3p/sDHhO4PVhvbJKvU0O9bBxCLq6MFUhgX5LBWOlVwtqv5r5RhyEkcgE8v/4LME595LXQ6HUoPimniDWnsS6dz9uHFi4V1gtWb4wtNtL2rywtsTDCh+8Kop2UL8yJgNn4Hgl6eFpEqHz23Yez+qkNzruaUH7QdhSfjbxWmG8+eWuu10B1VTH3p2zOm4O6IDFw0XUW3Q6/jnKkCAyM64dv6ub8v+McUL8Oqcj0Tej0D/l2M2vfUbzNTUcPvBSFtfelEsWW9FfoX7bPwaMzNmHtuK2af3SKp0F9NHir46GkaXbwUn5cbhJ/bqMNwW/h1biF2CI7D22kjhHxTT67GqbpymzI/V57EadMVJvQWETqttDC3B8zm70FIpNvelDAD3YRpnGa0uVvwqFhHdDrnzoztbZNneFQ3pAfHClv0P1X9YfMZ9TOPiukhPFtYuhtmO2/JS2e+Qhlf3QSBBirBl06/KWj61ngYg+0OjHkCu/Fisctv83C4ptRtMTZ1cUuRxBn0ugdByHqJrYoyNytxAOamDGsQ+oTYvlicPlaUDVeZ6W7pSbtRlrrsVrUfj/ujujYU/eTyzxh/YrnoehsLvetvr+FQzQW3NpjQ3VIkcYb8nH8D/PMSWxVlzl7o9Oz1hLhbGmwkayIxPLobCCH4+NK+Ji6/RE2E4BKk6aOLe5t8PuvMJlw2VzXYS9VEYVPHSeipTROemQkPNacCE7qobvM6c/PO0WkzC3SZMBPbgyNeN9/7gvZCt7f0z6T7hKkNPedyz7GFTSoS4168MSQJX3V8Cu2CYwQ7b5zfgdSgKDwe21sSoYudurANI+9141lJQ3YfEO6HQLiN5ErodIe05MYXhYNVT5xYicWXf/JJ6COiumFth4m4aq7BpJOrsLJMD+sGixQjulihe9ZZ3uVS7s6olS+9LhEg+wPl1TGuhP5A1A3Y0GESKvla0ANajq6RiRnRqddnb+dpGFvyiXCbiKaWFPrB6nNYXe/lcSZnsYe6Hoq6Cd21KQrfGSWLgmA4Qu+V3uXdOCF9KWdCp/7tbzOexoCITlh2aT+y/ljhsHIxQqcGgjm1zcZUSwqdHQGQXk8Wi/qchSC85QRUgCRnQl/UdiQmx/cXFqF3HX0PuyqLJRG6vZGWEPro6B7opU2Dofo0lrs5Siv2rMuo6JvRW9sWBdVnmhxzCIQu9/9i1KB7CjyxvVkcAMgdCb3xhYi/nlqP+aXfOW2p2BE9EIQuhnaxQhdjuyXy+lfollAY2wMxAq/14oV18RSvDsPxG2YLdzgXXPge00+vc9kfTOgtIVfv6/Sf0C3b/T8H4i2jJ+P64d20RxCi0qCGN2FMyTKsu1KEx2J6CrudI4uXurwKR+lmQvdedC1R0j9CP7IgBFdL6Pd+v5YA5arO+anDMSPBEjKyzFyFGLVWuE73t7NbMO/8dtAtek8uP3QLScJH9aEq7jz6nkdlGrerJeboYvqCTV08YSs/m17HmeBJ1ubMMy6mFz5pP06ocvaZzZh3fhueib8d76Q9DI7jsPzyr5hz9mscqXV/bsTXdvsqdHo5e//1M4RmeOpHF9NmJnR3bOl100DI2+6yNffnnYPb4Jfrn0eEOgTvl+7G1FNrGppA/wDoOZcgTi08O1pTiiM1F3DWZASNk0JHeHq7nm7b09v99H4//Z+O/nQbX8OpoIZKKB/CqaFVBWFdeRHWXil0CtNTodPIBF1DE1HF16GSr0MVqQM9M5OXPAQT4/oJ4TKSi/6Bi+ZKSSllQndFJ339ixnfBOJbp3dkTBXiqNDNkt6H56PaLvxbL20q5iQNAT2xSEd3X9PQ3z/AV8ZDkgj9SvdXEKpyfHHEemHD1/bal2dCd8YoDXFRCxpTLSAj6/YMTRVu7tAYLs584xRatCoUPbSp6BqSiFi1FtHqUISpgqHmOGHUpiM4PSKg4jjQf87S9FNf4oqLC8WejujU/u5Of2lyRp1e1th85SDevLDTL3ERmdAd9ezpvDCcr9gFkJ5SjyxS2qMiLndwRlzKOjy1Ra/RxWvChdtF9pF67W3QIwR0Z7VxKjdX++0SNa2HXgAZG2O5DLai7FeUSjw18pQnqfL5/h1NW6LXLQch0h3mlgods8MYqGfAd6EbcmaC519jjDIGApkB34Sen3sfOPPm1hKgKJA7grXNvwx4L/SiWZ1gMu1jb5P2bwcx69Iw4J3QaegKk5G+uyhgI+ZKQw+zIhcGxAudEA56Hd1tscRaYIkx0AoYEC90vW4OCMlrBdhYExkDDQyIE7oQHZesDfSXcrH+ZQzYM+C50Atm3gBeiLLVrIGHWJcxBqRgwDOhH8+LQXnFPoB0lqJSZoMx0NwMuBc6yVPBULERhAxt7sax+hgDUjHgXuiG7LngMUuqCpkdxkBLMOBa6AW60TCTlS3RMFYnY0BKBpwLnUa9NZl3B/LLtqQkgtmSNwOOhX7whXjU1NKz5e4DdcubH4ZOJgw0Fbrl7c9fg5B7ZYKRwWAMOLgio89+CwTTGTeMATkxYDui63OyQPglcgLIsDAGKAPXhF6YfQvM3HeBENKZdQ1jQGoGLEIvmJ0EvnZ/c79ES2owzB5jwBkDHGhIZ/2R7QC5g9HEGJArAxzyde8D5Gm5AmS4GAO2c3TGB2OgFTLALR1KA6e5SByvUpEp7s+6tELwrMnKYcCl0DmYVOCyzOM3L2dCV44mZInUhdBrVFCPMmdt3MCmLrLsemWBcih0DlfVBMNNWVu2WdlgI7qydCE7tE2FzpVpVOqhdZkbaJSKhsSELruuVxYgG6FzOK+Bekjd+I16exaY0JWlC9mhbRA6h5PBCBpUM369w1jdTOiy63plAaoX+rEQNTewetzmEmfomdCVpQvZoeWWDi3UctrBlePXnHHpTZcdcgZIUQxErnk43vjI2ovuQP8faDGikjbF4FsAAAAASUVORK5CYII="},yxFR: +/*!********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/Line.js ***! + \********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../helper/subPixelOptimize */"nPnh").subPixelOptimizeLine,a={},o=r.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n,r,o,s;this.subPixelOptimize?(i(a,t,this.style),n=a.x1,r=a.y1,o=a.x2,s=a.y2):(n=t.x1,r=t.y1,o=t.x2,s=t.y2);var l=t.percent;0!==l&&(e.moveTo(n,r),l<1&&(o=n*(1-l)+o*l,s=r*(1-l)+s*l),e.lineTo(o,s))},pointAt:function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]}});e.exports=o},zarK: +/*!******************************************************!*\ + !*** ./node_modules/zrender/lib/dom/HandlerProxy.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,a=n(/*! ../core/event */"YH21"),o=a.addEventListener,s=a.removeEventListener,l=a.normalizeEvent,c=a.getNativeEvent,u=n(/*! ../core/util */"bYtY"),d=n(/*! ../mixin/Eventful */"H6uX"),h=n(/*! ../core/env */"ItGF"),f=h.domSupported,p=(i={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:r=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:u.map(r,(function(e){var t=e.replace("mouse","pointer");return i.hasOwnProperty(t)?t:e}))}),m=["mousemove","mouseup"],g=["pointermove","pointerup"];function v(e){return"mousewheel"===e&&h.browser.firefox?"DOMMouseScroll":e}function b(e){var t=e.pointerType;return"pen"===t||"touch"===t}function y(e){e&&(e.zrByTouch=!0)}function x(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}function E(e,t){this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}var _=E.prototype;_.stopPropagation=_.stopImmediatePropagation=_.preventDefault=u.noop;var k={mousedown:function(e){e=l(this.dom,e),this._mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=l(this.dom,e);var t=this._mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||T(this,!0),this.trigger("mousemove",e)},mouseup:function(e){e=l(this.dom,e),T(this,!1),this.trigger("mouseup",e)},mouseout:function(e){e=l(this.dom,e),this._pointerCapturing&&(e.zrEventControl="no_globalout");var t=e.toElement||e.relatedTarget;e.zrIsToLocalDOM=x(this,t),this.trigger("mouseout",e)},touchstart:function(e){y(e=l(this.dom,e)),this._lastTouchMoment=new Date,this.handler.processGesture(e,"start"),k.mousemove.call(this,e),k.mousedown.call(this,e)},touchmove:function(e){y(e=l(this.dom,e)),this.handler.processGesture(e,"change"),k.mousemove.call(this,e)},touchend:function(e){y(e=l(this.dom,e)),this.handler.processGesture(e,"end"),k.mouseup.call(this,e),+new Date-this._lastTouchMoment<300&&k.click.call(this,e)},pointerdown:function(e){k.mousedown.call(this,e)},pointermove:function(e){b(e)||k.mousemove.call(this,e)},pointerup:function(e){k.mouseup.call(this,e)},pointerout:function(e){b(e)||k.mouseout.call(this,e)}};u.each(["click","mousewheel","dblclick","contextmenu"],(function(e){k[e]=function(t){t=l(this.dom,t),this.trigger(e,t)}}));var w={pointermove:function(e){b(e)||w.mousemove.call(this,e)},pointerup:function(e){w.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this._pointerCapturing;T(this,!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function S(e,t){var n=t.domHandlers;h.pointerEventsSupported?u.each(p.pointer,(function(r){O(t,r,(function(t){n[r].call(e,t)}))})):(h.touchEventsSupported&&u.each(p.touch,(function(r){O(t,r,(function(i){n[r].call(e,i),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),u.each(p.mouse,(function(r){O(t,r,(function(i){i=c(i),t.touching||n[r].call(e,i)}))})))}function C(e,t){function n(n){O(t,n,(function(r){r=c(r),x(e,r.target)||(r=function(e,t){return l(e.dom,new E(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))}),{capture:!0})}h.pointerEventsSupported?u.each(g,n):h.touchEventsSupported||u.each(m,n)}function O(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,o(e.domTarget,v(t),n,r)}function A(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&s(e.domTarget,v(n),t[n],e.listenerOpts[n]);e.mounted={}}function T(e,t){if(e._mayPointerCapture=null,f&&e._pointerCapturing^t){e._pointerCapturing=t;var n=e._globalHandlerScope;t?C(e,n):A(n)}}function I(e,t){this.domTarget=e,this.domHandlers=t,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function D(e,t){d.call(this),this.dom=e,this.painterRoot=t,this._localHandlerScope=new I(e,k),f&&(this._globalHandlerScope=new I(document,w)),this._pointerCapturing=!1,this._mayPointerCapture=null,S(this,this._localHandlerScope)}var L=D.prototype;L.dispose=function(){A(this._localHandlerScope),f&&A(this._globalHandlerScope)},L.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},u.mixin(D,d);var R=D;e.exports=R}}]); \ No newline at end of file diff --git a/p__Classrooms__Lists__GroupHomework__Detail__index.2f276ddc.async.js b/p__Classrooms__Lists__GroupHomework__Detail__index.2f276ddc.async.js new file mode 100644 index 0000000000..529a8da4c0 --- /dev/null +++ b/p__Classrooms__Lists__GroupHomework__Detail__index.2f276ddc.async.js @@ -0,0 +1,1223 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[78,3,5,6,7,8,10],{"+NIl": +/*!***************************************************!*\ + !*** ./node_modules/codemirror/mode/stex/stex.js ***! + \***************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function r(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function i(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var a={};function o(e,t){e.f=t}function s(e,t){var i;if(e.match(/^\\[a-zA-Z@]+/)){var s=e.current().slice(1);return n(t,i=new(i=a.hasOwnProperty(s)?a[s]:a.DEFAULT)),o(t,c),i.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return o(t,(function(e,t){return l(e,t,"\\]")})),"keyword";if(e.match("\\("))return o(t,(function(e,t){return l(e,t,"\\)")})),"keyword";if(e.match("$$"))return o(t,(function(e,t){return l(e,t,"$$")})),"keyword";if(e.match("$"))return o(t,(function(e,t){return l(e,t,"$")})),"keyword";var u=e.next();return"%"==u?(e.skipToEnd(),"comment"):"}"==u||"]"==u?(i=r(t))?(i.closeBracket(u),o(t,c),"bracket"):"error":"{"==u||"["==u?(n(t,i=new(i=a.DEFAULT)),"bracket"):/\d/.test(u)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(i=function(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var r=t[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(t)).name&&(i.argument=e.current()),i.styleIdentifier())}function l(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return o(t,s),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=e.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(e.skipToEnd(),"comment"):"error"}function c(e,t){var n=e.peek();return"{"==n||"["==n?(r(t).openBracket(n),e.eat(n),o(t,s),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(o(t,s),function(e){var t=e.cmdState.pop();t&&t.closeBracket()}(t),s(e,t))}return a.importmodule=i("importmodule","tag",["string","builtin"]),a.documentclass=i("documentclass","tag",["","atom"]),a.usepackage=i("usepackage","tag",["atom"]),a.begin=i("begin","tag",["atom"]),a.end=i("end","tag",["atom"]),a.label=i("label","tag",["atom"]),a.ref=i("ref","tag",["atom"]),a.eqref=i("eqref","tag",["atom"]),a.cite=i("cite","tag",["atom"]),a.bibitem=i("bibitem","tag",["atom"]),a.Bibitem=i("Bibitem","tag",["atom"]),a.RBibitem=i("RBibitem","tag",["atom"]),a.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return l(e,t)}:s}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=s,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}(n(/*! ../../lib/codemirror */"VrN/"))},"19Vz": +/*!**************************************************************!*\ + !*** ./node_modules/codemirror/addon/display/placeholder.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){a(e)&&n(e)}function i(e){var r=e.getWrapperElement(),i=a(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(a,o,s){var l=s&&s!=e.Init;if(o&&!l)a.on("blur",r),a.on("change",i),a.on("swapDoc",i),e.on(a.getInputField(),"compositionupdate",a.state.placeholderCompose=function(){!function(e){setTimeout((function(){var r=!1,i=e.getInputField();"TEXTAREA"==i.nodeName?r=!i.value:1==e.lineCount()&&(r=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),r?n(e):t(e)}),20)}(a)}),i(a);else if(!o&&l){a.off("blur",r),a.off("change",i),a.off("swapDoc",i),e.off(a.getInputField(),"compositionupdate",a.state.placeholderCompose),t(a);var c=a.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}o&&!a.hasFocus()&&r(a)}))}(n(/*! ../../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(e,t,n){!function(e){"use strict";var t={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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var a,o,s=r.indentUnit,l={},c=i.htmlMode?t:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function h(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(f("atom","]]>")):null:e.match("--")?n(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=h;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(a=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=h,a=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return a="equals",null;if("<"==i){t.tokenize=h,t.state=v,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=d;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=h;break}n.next()}return e}}function p(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function m(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;m(e)}}function v(e,t,n){return"openTag"==e?(n.tagStart=t.column(),y):"closeTag"==e?b:v}function y(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",C):l.allowMissingTagName&&"endTag"==e?(o="tag bracket",C(e,0,n)):(o="error",y)}function b(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(o="tag",x):(o="tag error",w)}return l.allowMissingTagName&&"endTag"==e?(o="tag bracket",x(e,0,n)):(o="error",w)}function x(e,t,n){return"endTag"!=e?(o="error",x):(m(n),v)}function w(e,t,n){return o="error",x(e,0,n)}function C(e,t,n){if("word"==e)return o="attribute",E;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new p(n,r,i==n.indented)),v}return o="error",C}function E(e,t,n){return"equals"==e?k:(l.allowMissing||(o="error"),C(e,0,n))}function k(e,t,n){return"string"==e?S:"word"==e&&l.allowUnquoted?(o="string",C):(o="error",C(e,0,n))}function S(e,t,n){return"string"==e?S:C(e,0,n)}return h.isInText=!0,{startState:function(e){var t={tokenize:h,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;a=null;var n=t.tokenize(e,t);return(n||a)&&"comment"!=n&&(o=null,t.state=t.state(a||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=d&&t.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=C)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(/*! ../../lib/codemirror */"VrN/"))},"1j5w": +/*!*******************************************************!*\ + !*** ./node_modules/rc-menu/es/index.js + 11 modules ***! + \*******************************************************/ +/*! exports provided: SubMenu, Item, MenuItem, MenuItemGroup, ItemGroup, Divider, default */ +/*! exports used: Divider, Item, ItemGroup, SubMenu, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */ +/*! 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)) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.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/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"d",(function(){return oe})),n.d(t,"b",(function(){return xe})),n.d(t,"c",(function(){return Ce})),n.d(t,"a",(function(){return ke}));var r=n("VTBJ"),i=n("1OyB"),a=n("vuIU"),o=n("JX7q"),s=n("Ji7U"),l=n("LK+K"),c=n("q1tI"),u=n("I8Z2"),h=n("BGR+"),d=n("wx14"),f=n("rePB"),p=n("4IlW"),m=n("2GS6"),g=n("Gytx"),v=n.n(g),y=n("TSYQ"),b=n.n(y),x=n("U8pU"),w=n("ODXe"),C=/iPhone/i,E=/iPod/i,k=/iPad/i,S=/\bAndroid(?:.+)Mobile\b/i,O=/Android/i,T=/\bAndroid(?:.+)SD4930UR\b/i,L=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,_=/Windows Phone/i,A=/\bWindows(?:.+)ARM\b/i,D=/BlackBerry/i,R=/BB10/i,M=/Opera Mini/i,I=/\b(CriOS|Chrome)(?:.+)Mobile/i,j=/Mobile(?:.+)Firefox\b/i;function N(e,t){return e.test(t)}function P(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),n=t.split("[FBAN");if(void 0!==n[1]){var r=n;t=Object(w.a)(r,1)[0]}if(void 0!==(n=t.split("Twitter"))[1]){var i=n;t=Object(w.a)(i,1)[0]}var a={apple:{phone:N(C,t)&&!N(_,t),ipod:N(E,t),tablet:!N(C,t)&&N(k,t)&&!N(_,t),device:(N(C,t)||N(E,t)||N(k,t))&&!N(_,t)},amazon:{phone:N(T,t),tablet:!N(T,t)&&N(L,t),device:N(T,t)||N(L,t)},android:{phone:!N(_,t)&&N(T,t)||!N(_,t)&&N(S,t),tablet:!N(_,t)&&!N(T,t)&&!N(S,t)&&(N(L,t)||N(O,t)),device:!N(_,t)&&(N(T,t)||N(L,t)||N(S,t)||N(O,t))||N(/\bokhttp\b/i,t)},windows:{phone:N(_,t),tablet:N(A,t),device:N(_,t)||N(A,t)},other:{blackberry:N(D,t),blackberry10:N(R,t),opera:N(M,t),firefox:N(j,t),chrome:N(I,t),device:N(D,t)||N(R,t)||N(M,t)||N(j,t)||N(I,t)},any:null,phone:null,tablet:null};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var F=Object(r.a)(Object(r.a)({},P()),{},{isMobile:P});function B(){}function H(e,t,n){var r=t||"";return e.key||"".concat(r,"item_").concat(n)}function U(e){return"".concat(e,"-menu-")}function z(e,t){var n=-1;c.Children.forEach(e,(function(e){n+=1,e&&e.type&&e.type.isMenuItemGroup?c.Children.forEach(e.props.children,(function(e){t(e,n+=1)})):t(e,n)}))}var V=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],W=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),i=r.marginLeft,a=r.marginRight;n+=+i.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},G=function(e,t,n){e&&"object"===Object(x.a)(e.style)&&(e.style[t]=n)},K=n("KQm4"),Y=n("Ff2n"),q=n("i8i4"),X=n("bdgK"),$=n("uciX"),J=n("8XRh"),Q={adjustX:1,adjustY:1},Z={topLeft:{points:["bl","tl"],overflow:Q,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Q,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Q,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Q,offset:[4,0]}},ee={topLeft:{points:["bl","tl"],overflow:Q,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Q,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Q,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Q,offset:[4,0]}},te=0,ne={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},re=function(e,t,n){var i=U(t),a=e.getState();e.setState({defaultActiveFirst:Object(r.a)(Object(r.a)({},a.defaultActiveFirst),{},Object(f.a)({},i,n))})},ie=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;Object(i.a)(this,n),(a=t.call(this,e)).onDestroy=function(e){a.props.onDestroy(e)},a.onKeyDown=function(e){var t=e.keyCode,n=a.menuInstance,r=a.props,i=r.isOpen,o=r.store;if(t===p.a.ENTER)return a.onTitleClick(e),re(o,a.props.eventKey,!0),!0;if(t===p.a.RIGHT)return i?n.onKeyDown(e):(a.triggerOpenChange(!0),re(o,a.props.eventKey,!0)),!0;if(t===p.a.LEFT){var s;if(!i)return;return(s=n.onKeyDown(e))||(a.triggerOpenChange(!1),s=!0),s}return!i||t!==p.a.UP&&t!==p.a.DOWN?void 0:n.onKeyDown(e)},a.onOpenChange=function(e){a.props.onOpenChange(e)},a.onPopupVisibleChange=function(e){a.triggerOpenChange(e,e?"mouseenter":"mouseleave")},a.onMouseEnter=function(e){var t=a.props,n=t.eventKey,r=t.onMouseEnter,i=t.store;re(i,a.props.eventKey,!1),r({key:n,domEvent:e})},a.onMouseLeave=function(e){var t=a.props,n=t.parentMenu,r=t.eventKey,i=t.onMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,domEvent:e})},a.onTitleMouseEnter=function(e){var t=a.props,n=t.eventKey,r=t.onItemHover,i=t.onTitleMouseEnter;r({key:n,hover:!0}),i({key:n,domEvent:e})},a.onTitleMouseLeave=function(e){var t=a.props,n=t.parentMenu,r=t.eventKey,i=t.onItemHover,s=t.onTitleMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,hover:!1}),s({key:r,domEvent:e})},a.onTitleClick=function(e){var t=Object(o.a)(a).props;t.onTitleClick({key:t.eventKey,domEvent:e}),"hover"!==t.triggerSubMenuAction&&(a.triggerOpenChange(!t.isOpen,"click"),re(t.store,a.props.eventKey,!1))},a.onSubMenuClick=function(e){"function"==typeof a.props.onClick&&a.props.onClick(a.addKeyPath(e))},a.onSelect=function(e){a.props.onSelect(e)},a.onDeselect=function(e){a.props.onDeselect(e)},a.getPrefixCls=function(){return"".concat(a.props.rootPrefixCls,"-submenu")},a.getActiveClassName=function(){return"".concat(a.getPrefixCls(),"-active")},a.getDisabledClassName=function(){return"".concat(a.getPrefixCls(),"-disabled")},a.getSelectedClassName=function(){return"".concat(a.getPrefixCls(),"-selected")},a.getOpenClassName=function(){return"".concat(a.props.rootPrefixCls,"-submenu-open")},a.saveMenuInstance=function(e){a.menuInstance=e},a.addKeyPath=function(e){return Object(r.a)(Object(r.a)({},e),{},{keyPath:(e.keyPath||[]).concat(a.props.eventKey)})},a.triggerOpenChange=function(e,t){var n=a.props.eventKey,r=function(){a.onOpenChange({key:n,item:Object(o.a)(a),trigger:t,open:e})};"mouseenter"===t?a.mouseenterTimeout=setTimeout((function(){r()}),0):r()},a.isChildrenSelected=function(){var e={find:!1};return function e(t,n,r){t&&!r.find&&c.Children.forEach(t,(function(t){if(t){var i=t.type;if(!i||!(i.isSubMenu||i.isMenuItem||i.isMenuItemGroup))return;-1!==n.indexOf(t.key)?r.find=!0:t.props.children&&e(t.props.children,n,r)}}))}(a.props.children,a.props.selectedKeys,e),e.find},a.isOpen=function(){return-1!==a.props.openKeys.indexOf(a.props.eventKey)},a.adjustWidth=function(){if(a.subMenuTitle&&a.menuInstance){var e=q.findDOMNode(a.menuInstance);e.offsetWidth>=a.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(a.subMenuTitle.offsetWidth,"px"))}},a.saveSubMenuTitle=function(e){a.subMenuTitle=e},a.getBaseProps=function(){var e=Object(o.a)(a).props;return{mode:"horizontal"===e.mode?"vertical":e.mode,visible:a.props.isOpen,level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:a.onSubMenuClick,onSelect:a.onSelect,onDeselect:a.onDeselect,onDestroy:a.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:a.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(o.a)(a),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[U(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:a.internalMenuId,manualRef:a.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},a.getMotion=function(e,t){var n=Object(o.a)(a).haveRendered,i=a.props,s=i.motion,l=i.rootPrefixCls;return Object(r.a)(Object(r.a)({},s),{},{leavedClassName:"".concat(l,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var s=e.store,l=e.eventKey,u=s.getState().defaultActiveFirst;a.isRootMenu=!1;var h=!1;return u&&(h=u[l]),re(s,l,h),a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,i=t.manualRef;i&&i(this),"horizontal"===n&&r.isRootMenu&&this.props.isOpen&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(e){var t=this,n=this.getBaseProps(),r=this.getMotion(n.mode,n.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||n.visible||n.forceSubMenuRender,!this.haveOpened)return c.createElement("div",null);var i=n.direction;return c.createElement(J.default,Object.assign({visible:n.visible},r),(function(r){var a=r.className,o=r.style,s=b()("".concat(n.prefixCls,"-sub"),a,Object(f.a)({},"".concat(n.prefixCls,"-rtl"),"rtl"===i));return c.createElement(pe,Object.assign({},n,{id:t.internalMenuId,className:s,style:o}),e)}))}},{key:"render",value:function(){var e,t=Object(r.a)({},this.props),n=t.isOpen,i=this.getPrefixCls(),a="inline"===t.mode,o=b()(i,"".concat(i,"-").concat(t.mode),(e={},Object(f.a)(e,t.className,!!t.className),Object(f.a)(e,this.getOpenClassName(),n),Object(f.a)(e,this.getActiveClassName(),t.active||n&&!a),Object(f.a)(e,this.getDisabledClassName(),t.disabled),Object(f.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(t.eventKey?this.internalMenuId="".concat(t.eventKey,"$Menu"):(te+=1,this.internalMenuId="$__$".concat(te,"$Menu")));var s={},l={},u={};t.disabled||(s={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},l={onClick:this.onTitleClick},u={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var h={},d=t.direction;a&&("rtl"===d?h.paddingRight=t.inlineIndent*t.level:h.paddingLeft=t.inlineIndent*t.level);var p={};this.props.isOpen&&(p={"aria-owns":this.internalMenuId});var m=null;"horizontal"!==t.mode&&(m=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(m=c.createElement(this.props.expandIcon,Object(r.a)({},this.props))));var g=c.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:h,className:"".concat(i,"-title"),role:"button"},u,l,{"aria-expanded":n},p,{"aria-haspopup":"true",title:"string"==typeof t.title?t.title:void 0}),t.title,m||c.createElement("i",{className:"".concat(i,"-arrow")})),v=this.renderChildren(t.children),y=t.parentMenu.isRootMenu?t.parentMenu.props.getPopupContainer:function(e){return e.parentNode},x=ne[t.mode],w=t.popupOffset?{offset:t.popupOffset}:{},C="inline"===t.mode?"":t.popupClassName;C+="rtl"===d?" ".concat(i,"-rtl"):"";var E=t.disabled,k=t.triggerSubMenuAction,S=t.subMenuOpenDelay,O=t.forceSubMenuRender,T=t.subMenuCloseDelay,L=t.builtinPlacements;V.forEach((function(e){return delete t[e]})),delete t.onClick;var _="rtl"===d?Object.assign({},ee,L):Object.assign({},Z,L);return delete t.direction,c.createElement("li",Object.assign({},t,s,{className:o,role:"menuitem"}),a&&g,a&&v,!a&&c.createElement($.a,{prefixCls:i,popupClassName:b()("".concat(i,"-popup"),C),getPopupContainer:y,builtinPlacements:_,popupPlacement:x,popupVisible:n,popupAlign:w,popup:v,action:E?[]:[k],mouseEnterDelay:S,mouseLeaveDelay:T,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:O},g))}}]),n}(c.Component);ie.defaultProps={onMouseEnter:B,onMouseLeave:B,onTitleMouseEnter:B,onTitleMouseLeave:B,onTitleClick:B,manualRef:B,mode:"vertical",title:""};var ae=Object(u.b)((function(e,t){var n=e.openKeys,r=e.activeKey,i=e.selectedKeys,a=t.eventKey,o=t.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[o]===a,selectedKeys:i}}))(ie);ae.isSubMenu=!0;var oe=ae,se=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=q.findDOMNode(Object(o.a)(e));return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,i){var a=e.props,o=a.overflowedIndicator,s=a.level,l=a.mode,u=a.prefixCls,h=a.theme;if(1!==s||"horizontal"!==l)return null;var d=e.props.children[0].props,f=(d.children,d.title,d.style),p=Object(Y.a)(d,["children","title","style"]),m=Object(r.a)({},f),g="".concat(t,"-overflowed-indicator"),v="".concat(t,"-overflowed-indicator");0===n.length&&!0!==i?m=Object(r.a)(Object(r.a)({},m),{},{display:"none"}):i&&(m=Object(r.a)(Object(r.a)({},m),{},{visibility:"hidden",position:"absolute"}),g="".concat(g,"-placeholder"),v="".concat(v,"-placeholder"));var y=h?"".concat(u,"-").concat(h):"",b={};return V.forEach((function(e){void 0!==p[e]&&(b[e]=p[e])})),c.createElement(oe,Object.assign({title:o,className:"".concat(u,"-overflowed-submenu"),popupClassName:y},b,{key:g,eventKey:v,disabled:!1,style:m}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=q.findDOMNode(Object(o.a)(e));if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];G(r,"display","inline-block");var i=e.getMenuItemNodes(),a=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(e){G(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return W(e,!0)})),a.forEach((function(e){G(e,"display","none")})),e.overflowedIndicatorWidth=W(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),G(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=q.findDOMNode(Object(o.a)(e));if(t){var n=W(t);e.overflowedItems=[];var r,i=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=q.findDOMNode(this);if(!t)return;this.resizeObserver=new X.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,i,a){var o=i;if("horizontal"===t.props.mode){var s=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(a>n&&(o=c.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),a===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return c.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),s=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var l=[].concat(Object(K.a)(r),[s,o]);return a===e.length-1&&l.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),l}return[].concat(Object(K.a)(r),[o])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(Y.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return c.createElement(i,Object.assign({},r),this.renderChildren(n))}}]),n}(c.Component);se.defaultProps={tag:"div",className:""};var le=se;function ce(e,t,n){var i=e.getState();e.setState({activeKey:Object(r.a)(Object(r.a)({},i.activeKey),{},Object(f.a)({},t,n))})}function ue(e){return e.eventKey||"0-menu-"}function he(e,t){var n,r=t,i=e.children,a=e.eventKey;if(r&&(z(i,(function(e,t){e&&e.props&&!e.props.disabled&&r===H(e,a,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(z(i,(function(e,t){r||!e||e.props.disabled||(r=H(e,a,t))})),r):r}function de(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var fe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(a.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var i=null;return r!==p.a.UP&&r!==p.a.DOWN||(i=a.step(r===p.a.UP?-1:1)),i?(e.preventDefault(),ce(a.props.store,ue(a.props),i.props.eventKey),"function"==typeof t&&t(i),1):void 0},a.onItemHover=function(e){var t=e.key,n=e.hover;ce(a.props.store,ue(a.props),n?t:null)},a.onDeselect=function(e){a.props.onDeselect(e)},a.onSelect=function(e){a.props.onSelect(e)},a.onClick=function(e){a.props.onClick(e)},a.onOpenChange=function(e){a.props.onOpenChange(e)},a.onDestroy=function(e){a.props.onDestroy(e)},a.getFlatInstanceArray=function(){return a.instanceArray},a.step=function(e){var t=a.getFlatInstanceArray(),n=a.props.store.getState().activeKey[ue(a.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var i=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(i=t,!1)})),a.props.defaultActiveFirst||-1===i||(o=t.slice(i,r-1)).length&&!o.every((function(e){return!!e.props.disabled}))){var o,s=(i+1)%r,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},a.renderCommonMenuItem=function(e,t,n){var i=a.props.store.getState(),s=Object(o.a)(a).props,l=H(e,s.eventKey,t),u=e.props;if(!u||"string"==typeof e.type)return e;var h=l===i.activeKey,d=Object(r.a)(Object(r.a)({mode:u.mode||s.mode,level:s.level,inlineIndent:s.inlineIndent,renderMenuItem:a.renderMenuItem,rootPrefixCls:s.prefixCls,index:t,parentMenu:s.parentMenu,manualRef:u.disabled?void 0:Object(m.a)(e.ref,de.bind(Object(o.a)(a))),eventKey:l,active:!u.disabled&&h,multiple:s.multiple,onClick:function(e){(u.onClick||B)(e),a.onClick(e)},onItemHover:a.onItemHover,motion:s.motion,subMenuOpenDelay:s.subMenuOpenDelay,subMenuCloseDelay:s.subMenuCloseDelay,forceSubMenuRender:s.forceSubMenuRender,onOpenChange:a.onOpenChange,onDeselect:a.onDeselect,onSelect:a.onSelect,builtinPlacements:s.builtinPlacements,itemIcon:u.itemIcon||a.props.itemIcon,expandIcon:u.expandIcon||a.props.expandIcon},n),{},{direction:s.direction});return("inline"===s.mode||F.any)&&(d.triggerSubMenuAction="click"),c.cloneElement(e,d)},a.renderMenuItem=function(e,t,n){if(!e)return null;var r=a.props.store.getState(),i={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:a.props.triggerSubMenuAction,subMenuKey:n};return a.renderCommonMenuItem(e,t,i)},e.store.setState({activeKey:Object(r.a)(Object(r.a)({},e.store.getState().activeKey),{},Object(f.a)({},e.eventKey,he(e,e.activeKey)))}),a.instanceArray=[],a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!v()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[ue(t)],r=he(t,n);if(r!==n)ce(t.store,ue(t),r);else if("activeKey"in e){r!==he(e,e.activeKey)&&ce(t.store,ue(t),r)}}},{key:"render",value:function(){var e=this,t=Object(d.a)({},this.props);this.instanceArray=[];var n={className:b()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,a=t.visible,o=t.level,s=t.mode,l=t.overflowedIndicator,u=t.theme;return V.forEach((function(e){return delete t[e]})),delete t.onClick,c.createElement(le,Object.assign({},t,{prefixCls:r,mode:s,tag:"ul",level:o,theme:u,visible:a,overflowedIndicator:l},n),c.Children.map(t.children,(function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")})))}}]),n}(c.Component);fe.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:B};var pe=Object(u.b)()(fe),me=n("Kwbf");function ge(e,t,n){var r=e.prefixCls,i=e.motion,a=e.defaultMotions,o=void 0===a?{}:a,s=e.openAnimation,l=e.openTransitionName,c=t.switchingModeFromInline;if(i)return i;if("object"===Object(x.a)(s)&&s)Object(me.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=o[n];return u||(c?null:o.other)}var ve=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;Object(i.a)(this,n),(a=t.call(this,e)).inlineOpenKeys=[],a.onSelect=function(e){var t=Object(o.a)(a).props;if(t.selectable){var n=a.store.getState().selectedKeys,i=e.key;n=t.multiple?n.concat([i]):[i],"selectedKeys"in t||a.store.setState({selectedKeys:n}),t.onSelect(Object(r.a)(Object(r.a)({},e),{},{selectedKeys:n}))}},a.onClick=function(e){var t=a.getRealMenuMode(),n=Object(o.a)(a),r=n.store,i=n.props.onOpenChange;"inline"===t||"openKeys"in a.props||(r.setState({openKeys:[]}),i([])),a.props.onClick(e)},a.onKeyDown=function(e,t){a.innerMenu.getWrappedInstance().onKeyDown(e,t)},a.onOpenChange=function(e){var t=Object(o.a)(a).props,n=a.store.getState().openKeys.concat(),r=!1,i=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var i=n.indexOf(e.key);(t=-1!==i)&&n.splice(i,1)}r=r||t};Array.isArray(e)?e.forEach(i):i(e),r&&("openKeys"in a.props||a.store.setState({openKeys:n}),t.onOpenChange(n))},a.onDeselect=function(e){var t=Object(o.a)(a).props;if(t.selectable){var n=a.store.getState().selectedKeys.concat(),i=e.key,s=n.indexOf(i);-1!==s&&n.splice(s,1),"selectedKeys"in t||a.store.setState({selectedKeys:n}),t.onDeselect(Object(r.a)(Object(r.a)({},e),{},{selectedKeys:n}))}},a.onMouseEnter=function(e){a.restoreModeVerticalFromInline();var t=a.props.onMouseEnter;t&&t(e)},a.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,r="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,i="font-size"===e.propertyName&&r.indexOf("anticon")>=0;(t||i)&&a.restoreModeVerticalFromInline()},a.setInnerMenu=function(e){a.innerMenu=e},a.isRootMenu=!0;var s=e.defaultSelectedKeys,l=e.defaultOpenKeys;return"selectedKeys"in e&&(s=e.selectedKeys||[]),"openKeys"in e&&(l=e.openKeys||[]),a.store=Object(u.c)({selectedKeys:s,openKeys:l,activeKey:{"0-menu-":he(e,e.activeKey)}}),a.state={switchingModeFromInline:!1},a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){this.updateOpentKeysWhenSwitchMode(e),this.updateMiniStore();var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&i([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(e){var t=this.props,n=this.store,r=this.inlineOpenKeys,i=n.getState(),a={};"inline"===e.mode&&"inline"!==t.mode&&this.setState({switchingModeFromInline:!0}),"openKeys"in t||((t.inlineCollapsed&&!e.inlineCollapsed||t.siderCollapsed&&!e.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=i.openKeys.concat(),a.openKeys=[]),(!t.inlineCollapsed&&e.inlineCollapsed||!t.siderCollapsed&&e.siderCollapsed)&&(a.openKeys=r,this.inlineOpenKeys=[])),Object.keys(a).length&&n.setState(a)}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(r.a)({},Object(h.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(r.a)(Object(r.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ge(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,c.createElement(u.a,{store:this.store},c.createElement(pe,Object.assign({},e,{ref:this.setInnerMenu}),this.props.children))}}]),n}(c.Component);ve.defaultProps={selectable:!0,onClick:B,onSelect:B,onOpenChange:B,onDeselect:B,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:c.createElement("span",null,"···")};var ye=ve,be=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===p.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseLeave;i({key:r,hover:!1}),a({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseEnter;i({key:r,hover:!0}),a({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,i=n.multiple,a=n.onClick,s=n.onSelect,l=n.onDeselect,c=n.isSelected,u={key:r,keyPath:[r],item:Object(o.a)(e),domEvent:t};a(u),i?c?l(u):s(u):c||s(u)},e.saveNode=function(t){e.node=t},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(r.a)({},this.props),n=b()(this.getPrefixCls(),t.className,(e={},Object(f.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(f.a)(e,this.getSelectedClassName(),t.isSelected),Object(f.a)(e,this.getDisabledClassName(),t.disabled),e)),i=Object(r.a)(Object(r.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?i=Object(r.a)(Object(r.a)({},i),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(i.role="none");var a={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},o=Object(r.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?o.paddingRight=t.inlineIndent*t.level:o.paddingLeft=t.inlineIndent*t.level),V.forEach((function(e){return delete t[e]})),delete t.direction;var s=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(s=c.createElement(this.props.itemIcon,this.props)),c.createElement("li",Object.assign({},Object(h.default)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,a,{style:o,ref:this.saveNode}),t.children,s)}}]),n}(c.Component);be.isMenuItem=!0,be.defaultProps={onSelect:B,onMouseEnter:B,onMouseLeave:B,manualRef:B};var xe=Object(u.b)((function(e,t){var n=e.activeKey,r=e.selectedKeys,i=t.eventKey;return{active:n[t.subMenuKey]===i,isSelected:-1!==r.indexOf(i)}}))(be),we=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(a.a)(n,[{key:"render",value:function(){var e=Object(d.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,i="".concat(r,"-item-group-title"),a="".concat(r,"-item-group-list"),o=e.title,s=e.children;return V.forEach((function(t){return delete e[t]})),delete e.onClick,delete e.direction,c.createElement("li",Object.assign({},e,{className:"".concat(n," ").concat(r,"-item-group")}),c.createElement("div",{className:i,title:"string"==typeof o?o:void 0},o),c.createElement("ul",{className:a},c.Children.map(s,this.renderInnerMenuItem)))}}]),n}(c.Component);we.isMenuItemGroup=!0,we.defaultProps={disabled:!0};var Ce=we,Ee=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return c.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};Ee.defaultProps={disabled:!0,className:"",style:{}};var ke=Ee;t.e=ye},"49sm": +/*!***************************************!*\ + !*** ./node_modules/isarray/index.js ***! + \***************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},"4wi7": +/*!*********************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/ShixunHomeworks/components/TrfList/index.tsx ***! + \*********************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/row/style */"14J3");var r=n(/*! antd/es/row */"BMrR"),i=(n(/*! antd/es/checkbox/style */"sRBo"),n(/*! antd/es/checkbox */"kaz8")),a=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=n.n(l),u=n(/*! react */"q1tI"),h=n.n(u),d=n(/*! ./index.less?modules */"oOBs"),f=n.n(d),p=n(/*! ./delete.png */"xOL1"),m=n.n(p),g=n(/*! @/components/NoData */"BdwD");t.a=function(e){var t=e.data,n=(e.value,e.handleChangePage,e.setSelectedRowKeys),l=e.selectedRowKeys,d=(e.onChange,Object(u.useState)([])),p=Object(s.a)(d,2),v=p[0],y=p[1],b=Object(u.useState)([]),x=Object(s.a)(b,2),w=x[0],C=x[1],E=Object(u.useState)([]),k=Object(s.a)(E,2),S=k[0],O=k[1],T=Object(u.useState)(1),L=Object(s.a)(T,2),_=(L[0],L[1],Object(u.useState)()),A=Object(s.a)(_,2);A[0],A[1];return Object(u.useEffect)((function(){y(t),C([]),O([])}),[t]),Object(u.useEffect)((function(){n&&(C(l),O(l))}),[l]),h.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},h.a.createElement("div",{className:f.a.leftdiv},h.a.createElement(a.a.Search,{size:"large",onChange:function(){var e=Object(o.a)(c.a.mark((function e(n){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y(t.filter((function(e){var t;return null==e||null===(t=e.name)||void 0===t?void 0:t.includes(n.target.value)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),placeholder:"可输入班级名称查询"}),0===v.length&&h.a.createElement(g.a,{styles:{margin:"70px auto"},customText:"暂无分班"}),h.a.createElement("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"}},h.a.createElement(i.a.Group,{value:w.map((function(e){return"".concat(e.id)})),onChange:function(e){n(v.filter((function(t){return e.includes("".concat(t.id))})))},style:{marginTop:"10px"}},v.map((function(e,t){return h.a.createElement(r.a,{key:e.id,style:{marginTop:"10px",lineHeight:"24px",display:"flex",width:200}},h.a.createElement(i.a,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:e.is_published,value:"".concat(e.id)},h.a.createElement("div",{className:f.a.listClass},h.a.createElement("span",{className:f.a.spantitle,style:{width:e.is_published?"108px":"170px"}},e.name),e.is_published&&h.a.createElement("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"}},"已发布"))))}))))),h.a.createElement("div",{className:f.a.rightdiv},h.a.createElement(a.a.Search,{onChange:function(e){O(w.filter((function(t){return t.name.includes(e.target.value)})))},size:"large",placeholder:"可输入班级名称查询"}),0===S.length&&h.a.createElement(g.a,{styles:{margin:"70px auto"},customText:"暂未选择分班"}),S.length>0&&h.a.createElement("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"}},h.a.createElement("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0}},S.map((function(e,t){return h.a.createElement(r.a,{justify:"space-between",style:{marginTop:"10px"},key:e.id},h.a.createElement("div",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:"5px",marginLeft:"5px",width:"75%"}},e.name),h.a.createElement("img",{src:m.a,style:{cursor:"pointer",height:"16px",marginRight:17},onClick:function(){n(w.filter((function(t){return"".concat(t.id)!="".concat(e.id)})))}}))}))))))}},"500L": +/*!**********************************************!*\ + !*** ./src/components/MultiUpload/index.tsx ***! + \**********************************************/ +/*! exports provided: coverToFileList, default */ +/*! exports used: coverToFileList, default */function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=(n(/*! antd/es/modal/style */"2qtc"),n(/*! antd/es/modal */"kLXV")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),s=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),c=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),u=(n(/*! antd/es/upload/style */"DZo9"),n(/*! antd/es/upload */"8z0m")),h=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),d=n.n(h),f=n(/*! react */"q1tI"),p=n.n(f),m=n(/*! @/utils/env */"m3rI"),g=n(/*! @/pages/MoopCases/FormPanel/service */"wzkS"),v=n(/*! ../SingleUpload */"y5JW"),y=n(/*! @ant-design/icons */"LtfV"),b=u.a.Dragger;function x(e){var t=[];return e&&e.length>0&&(t=e.map((function(e){return{uid:e.id,id:e.id,name:e.title+v.c+e.filesize,url:e.url,filesize:e.filesize,status:"done",response:{id:e.id}}}))),t}t.b=function(e){var t=e.value,n=e.onChange,h=e.action,x=e.className,w=e.maxSize,C=void 0===w?150:w,E=e.title,k=void 0===E?"上传附件":E,S=e.showRemoveModal,O=void 0!==S&&S,T=e.accept,L=void 0===T?"":T,_=e.additionalText,A=e.isDragger,D=e.number,R=void 0===D?1e3:D,M=e.aloneClear,I=void 0!==M&&M,j=e.restrict,N=void 0===j||j,P=Object(f.useState)(!1),F=Object(c.a)(P,2),B=F[0],H=F[1],U=Object(f.useState)(t||[]),z=Object(c.a)(U,2),V=z[0],W=z[1];Object(f.useEffect)((function(){t&&(W(Object(l.a)(t)),R===(null==t?void 0:t.length)&&H(!0))}),[t]);var G,K=function(){setTimeout((function(){V.pop(),W(Object(l.a)(V))}),500)},Y={multiple:!0,disabled:B,accept:L,withCredentials:!0,fileList:V,beforeUpload:function(e,t){var n=e.size/1024/1024;return V.concat(t).length>R?(V.pop(),W(Object(l.a)(V)),s.b.error("最多只能上传".concat(R,"个文件")),I?Promise.reject():(K(),!1)):n=R?H(!0):H(!1),W(Object(l.a)(t)),t=t.map((function(e){var t,n;null!=e&&null!==(t=e.response)&&void 0!==t&&t.id&&(e.url="/api/attachments/".concat(null==e||null===(n=e.response)||void 0===n?void 0:n.id));return-1===e.name.indexOf(v.c)&&(e.name="".concat(e.name).concat(v.c).concat(Object(v.a)(e.size))),Object(o.a)({},e)})),console.log("info:",e),n(t)},onRemove:(G=Object(a.a)(d.a.mark((function e(t){var n;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=function(){var e=Object(a.a)(d.a.mark((function e(){var n;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.response?t.response.id:t.id)){e.next=8;break}return e.next=4,Object(g.d)(t.response?t.response.id:t.uid);case 4:return n=e.sent,e.abrupt("return",n);case 8:return e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!O){e.next=5;break}return e.abrupt("return",new Promise((function(e,t){var r;i.a.confirm({centered:!0,width:530,okText:"确定",cancelText:"取消",title:"提示",content:p.a.createElement("div",{className:"tc font16"},"是否确认删除?"),onOk:(r=Object(a.a)(d.a.mark((function t(){return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n();case 2:t.sent,s.b.success("删除成功"),e(!0);case 5:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)}),onCancel:function(){return e(!1)}})})));case 5:return e.next=7,n();case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)}))),function(e){return G.apply(this,arguments)})};return p.a.createElement("div",{className:"multi-upload ".concat(x||"")},A&&p.a.createElement(b,Y,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) ")),_),!A&&p.a.createElement(u.a,Y,p.a.createElement(r.a,{disabled:B},k),p.a.createElement("span",{onClick:function(e){e.preventDefault(),e.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(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return b}));var r=n(/*! react-router */"Ty5D"),i=n(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),a=n(/*! react */"q1tI"),o=n.n(a),s=n(/*! history */"YS25"),l=(n(/*! prop-types */"17x9"),n(/*! @babel/runtime/helpers/esm/extends */"wx14")),c=n(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),u=n(/*! tiny-invariant */"9R94");o.a.Component;o.a.Component;var h=function(e,t){return"function"==typeof e?e(t):e},d=function(e,t){return"string"==typeof e?Object(s.c)(e,null,null,t):e},f=function(e){return e},p=o.a.forwardRef;void 0===p&&(p=f);var m=p((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,a=Object(c.a)(e,["innerRef","navigate","onClick"]),s=a.target,u=Object(l.a)({},a,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=f!==p&&t||n,o.a.createElement("a",u)}));var g=p((function(e,t){var n=e.component,i=void 0===n?m:n,a=e.replace,s=e.to,g=e.innerRef,v=Object(c.a)(e,["component","replace","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=e.history,r=d(h(s,e.location),e.location),c=r?n.createHref(r):"",m=Object(l.a)({},v,{href:c,navigate:function(){var t=h(s,e.location);(a?n.replace:n.push)(t)}});return f!==p?m.ref=t||g:m.innerRef=g,o.a.createElement(i,m)}))})),v=function(e){return e},y=o.a.forwardRef;void 0===y&&(y=v);var b=y((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,a=e.activeClassName,s=void 0===a?"active":a,f=e.activeStyle,p=e.className,m=e.exact,b=e.isActive,x=e.location,w=e.sensitive,C=e.strict,E=e.style,k=e.to,S=e.innerRef,O=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=x||e.location,a=d(h(k,n),n),c=a.pathname,T=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),L=T?Object(r.f)(n.pathname,{path:T,exact:m,sensitive:w,strict:C}):null,_=!!(b?b(L,n):L),A=_?function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||t.relatedTarget.className.indexOf("".concat(a,"-next"))>=0)||(e.setState({goInputText:""}),i(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==m&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return Object(s.a)(n,[{key:"getValidValue",value:function(){var e=this.state,t=e.goInputText,n=e.current;return!t||isNaN(t)?n:Number(t)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.locale,i=t.rootPrefixCls,a=t.changeSize,o=t.quickGo,s=t.goButton,l=t.selectComponentClass,c=t.buildOptionText,u=t.selectPrefixCls,d=t.disabled,f=this.state.goInputText,p="".concat(i,"-options"),m=l,g=null,v=null,y=null;if(!a&&!o)return null;var b=this.getPageSizeOptions();if(a&&m){var x=b.map((function(t,n){return h.a.createElement(m.Option,{key:n,value:t.toString()},(c||e.buildOptionText)(t))}));g=h.a.createElement(m,{disabled:d,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||b[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},x)}return o&&(s&&(y="boolean"==typeof s?h.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:d,className:"".concat(p,"-quick-jumper-button")},r.jump_to_confirm):h.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),v=h.a.createElement("div",{className:"".concat(p,"-quick-jumper")},r.jump_to,h.a.createElement("input",{disabled:d,type:"text",value:f,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,y)),h.a.createElement("li",{className:"".concat(p)},g,v)}}]),n}(h.a.Component);y.defaultProps={pageSizeOptions:["10","20","50","100"]};var b=y,x=n("N2Kk");function w(){}function C(e,t,n){var r=void 0===e?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var E=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(o.a)(this,n),(r=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(C(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,t){var n=r.props.prefixCls,i=e||h.a.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"==typeof e&&(i=h.a.createElement(e,Object(a.a)({},r.props))),i},r.savePaginationNode=function(e){r.paginationNode=e},r.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==r.state.current;var t},r.shouldDisplayQuickJumper=function(){var e=r.props,t=e.showQuickJumper,n=e.pageSize;return!(e.total<=n)&&t},r.handleKeyDown=function(e){e.keyCode!==g&&e.keyCode!==v||e.preventDefault()},r.handleKeyUp=function(e){var t=r.getValidValue(e);t!==r.state.currentInputValue&&r.setState({currentInputValue:t}),e.keyCode===m?r.handleChange(t):e.keyCode===g?r.handleChange(t-1):e.keyCode===v&&r.handleChange(t+1)},r.changePageSize=function(e){var t=r.state.current,n=C(e,r.state,r.props);t=t>n?n:t,0===n&&(t=r.state.current),"number"==typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:t,currentInputValue:t})),r.props.onShowSizeChange(t,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(t,e)},r.handleChange=function(e){var t=r.props.disabled,n=e;if(r.isValid(n)&&!t){var i=C(void 0,r.state,r.props);n>i?n=i:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var a=r.state.pageSize;return r.props.onChange(n,a),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current2?n-2:0),i=2;i=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,r=e.totalBoundaryShowSizeChanger;return void 0!==t?t:n>r}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,r=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),i=!this.hasPrev();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,r=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),i=!this.hasNext();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,a=t.className,o=t.style,s=t.disabled,l=t.hideOnSinglePage,c=t.total,d=t.locale,m=t.showQuickJumper,g=t.showLessItems,v=t.showTitle,y=t.showTotal,x=t.simple,w=t.itemRender,E=t.showPrevNextJumpers,k=t.jumpPrevIcon,S=t.jumpNextIcon,O=t.selectComponentClass,T=t.selectPrefixCls,L=t.pageSizeOptions,_=this.state,A=_.current,D=_.pageSize,R=_.currentInputValue;if(!0===l&&c<=D)return null;var M=C(void 0,this.state,this.props),I=[],j=null,N=null,P=null,F=null,B=null,H=m&&m.goButton,U=g?1:2,z=A-1>0?A-1:0,V=A+1=2*U&&3!==A&&(I[0]=Object(u.cloneElement)(I[0],{className:"".concat(n,"-item-after-jump-prev")}),I.unshift(j)),M-A>=2*U&&A!==M-2&&(I[I.length-1]=Object(u.cloneElement)(I[I.length-1],{className:"".concat(n,"-item-before-jump-next")}),I.push(N)),1!==$&&I.unshift(P),J!==M&&I.push(F)}var ee=null;y&&(ee=h.a.createElement("li",{className:"".concat(n,"-total-text")},y(c,[0===c?0:(A-1)*D+1,A*D>c?c:A*D])));var te=!this.hasPrev()||!M,ne=!this.hasNext()||!M;return h.a.createElement("ul",Object(r.a)({className:f()(n,a,Object(i.a)({},"".concat(n,"-disabled"),s)),style:o,unselectable:"unselectable",ref:this.savePaginationNode},W),ee,h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:te?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),te)),"aria-disabled":te},this.renderPrev(z)),I,h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:ne?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),ne)),"aria-disabled":ne},this.renderNext(V)),h.a.createElement(b,{disabled:s,locale:d,rootPrefixCls:n,selectComponentClass:O,selectPrefixCls:T,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:A,pageSize:D,pageSizeOptions:L,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:H}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,i=C(e.pageSize,t,e);r=r>i?i:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),n}(h.a.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:w,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:w,locale:x.a,style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};var k=E},"632R": +/*!****************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/GroupHomework/Detail/index.less?modules ***! + \****************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___3r4d7",flex_space_between:"flex_space_between___v1RZU",flex_box_vertical_center:"flex_box_vertical_center___1hRcP",flex_box_center_end:"flex_box_center_end___3kWTo",flex_box_column:"flex_box_column___TGF_8",title:"title___jGN8C",export:"export___20Rrn",bg:"bg___5TRgA",tabs:"tabs___3dNSC",workListTabWrap:"workListTabWrap___2wgNK",workListTabButton:"workListTabButton___34vXT"}},"6RRn": +/*!*******************************************!*\ + !*** ./node_modules/rc-table/es/index.js ***! + \*******************************************/ +/*! exports provided: Summary, Column, ColumnGroup, INTERNAL_COL_DEFINE, default */ +/*! exports used: INTERNAL_COL_DEFINE, Summary, default */function(e,t,n){"use strict";var r=n(/*! ./Table */"wCXF"),i=n(/*! ./Footer */"n6Qo");n.d(t,"b",(function(){return i.a}));n(/*! ./sugar/Column */"IBYe"),n(/*! ./sugar/ColumnGroup */"6eGT");var a=n(/*! ./utils/legacyUtil */"hW8S");n.d(t,"a",(function(){return a.a})),t.c=r.b},"6eGT": +/*!*******************************************************!*\ + !*** ./node_modules/rc-table/es/sugar/ColumnGroup.js ***! + \*******************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";t.a=function(e){return null}},"6vEo": +/*!************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/GroupHomework/components/AssociatedProjects.tsx ***! + \************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),i=(n(/*! antd/es/skeleton/style */"cWXX"),n(/*! antd/es/skeleton */"/ezw")),a=(n(/*! antd/es/row/style */"14J3"),n(/*! antd/es/row */"BMrR")),o=(n(/*! antd/es/col/style */"jCWc"),n(/*! antd/es/col */"kPKH")),s=(n(/*! antd/es/radio/style */"7Kak"),n(/*! antd/es/radio */"9yH6")),l=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),c=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),u=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),h=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),d=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),f=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),p=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),m=n.n(p),g=n(/*! react */"q1tI"),v=n.n(g),y=n(/*! react-infinite-scroller */"RotF"),b=n.n(y),x=n(/*! @/service/shixunHomeworks */"XYT7"),w=n(/*! umi */"Ty5D"),C=n(/*! umi */"9kvl");t.a=Object(C.a)((function(e){return{classroomList:e.classroomList,user:e.user,loading:e.loading.effects}}))((function(e){var t,n,p,y=e.classroomList,C=e.loading,E=e.user,k=e.dispatch,S=Object(w.i)(),O=d.a.useForm(),T=Object(f.a)(O,1)[0],L=Object(g.useState)(!0),_=Object(f.a)(L,2),A=_[0],D=_[1],R=Object(g.useState)([]),M=Object(f.a)(R,2),I=M[0],j=M[1],N=Object(g.useState)({page:1,limit:20,keyword:""}),P=Object(f.a)(N,2),F=P[0],B=(P[1],function(){var e=Object(h.a)(m.a.mark((function e(){var t,n;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k({type:"shixunHomeworks/getProjectList",payload:Object(u.a)(Object(u.a)({},S),F)});case 2:(n=e.sent).projects&&j([].concat(Object(c.a)(I),Object(c.a)(n.projects))),(null===(t=n.projects)||void 0===t?void 0:t.length)<20&&D(!1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}());return Object(g.useEffect)((function(){"关联项目"===y.actionTabs.key&&(B(),I=[],F.page=1,F.keyword="")}),[y.actionTabs.key]),v.a.createElement(r.a,{centered:!0,title:"关联项目",visible:"关联项目"===y.actionTabs.key,bodyStyle:{minHeight:100},onOk:Object(h.a)(m.a.mark((function e(){var t,n,r,i;return m.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T.validateFields();case 2:return t=Object(u.a)({},T.getFieldValue()),n=y.actionTabs,r=n.selectArrs,i=n.cb,e.next=6,Object(x.O)(Object(u.a)(Object(u.a)({},t),{},{homeworkId:r.homework_id}));case 6:0===e.sent.status&&(i?i():k({type:"classroomList/getClassroomCommonHomeworksList",payload:Object(u.a)({},y.actionTabs.params)}),k({type:"classroomList/setActionTabs",payload:{}}));case 8:case"end":return e.stop()}}),e)}))),onCancel:function(){k({type:"classroomList/setActionTabs",payload:{}})}},v.a.createElement(i.a,{loading:C["shixunHomeworks/getProjectList"],active:!0},""==I?v.a.createElement("aside",null,v.a.createElement("div",{className:"tc font14 pt20"},"您当前尚未管理任何项目,请先",v.a.createElement("a",{href:"".concat(null===(t=E.navigationInfo)||void 0===t||null===(n=t.top)||void 0===n?void 0:n.old_url,"/projects/deposit/new"),target:"_blank"},"创建项目"),"再关联")):v.a.createElement("aside",null,v.a.createElement("div",{className:" mb20"},v.a.createElement(l.a.Search,{onSearch:function(e){""===e?delete F.keyword:F.keyword=e,I=[],D(!0),B()},placeholder:"请输入项目名称进行搜索",allowClear:!0,size:"large"})),v.a.createElement(d.a,{form:T,initialValues:{}},v.a.createElement(d.a.Item,{name:"project_id",rules:[{required:!0,message:"请选择项目"}]},v.a.createElement(s.a.Group,null,v.a.createElement(b.a,{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){F.page++,B()},hasMore:A,useWindow:!1},null===(p=I)||void 0===p?void 0:p.map((function(e,t){return v.a.createElement(a.a,{key:t},v.a.createElement(o.a,null,v.a.createElement(s.a,{value:e.id},e.name)))})))))))))}))},"7Cbv": +/*!**************************************************************!*\ + !*** ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function a(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}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 s=function(e){return"string"==typeof e&&o.test(e)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};t.a=function(e,t,n){var r=(e=e||{}).random||(e.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return u(r)}},"7ahc": +/*!*************************************************************!*\ + !*** ./src/components/markdown-editor/code-block/index.tsx ***! + \*************************************************************/ +/*! exports provided: default, MyCodeMirror */ +/*! exports used: MyCodeMirror, default */function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),a=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),o=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),c=n(/*! react */"q1tI"),u=n.n(c),h=n(/*! codemirror */"VrN/"),d=n.n(h),f=(n(/*! codemirror/lib/codemirror.css */"p77/"),n(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},m={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 g(e){var t=e.value,n=e.onChange,i=e.mode,a=e.options,o=void 0===a?{}:a,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(s.a)(h,2),p=f[0],m=f[1];return Object(c.useEffect)((function(){if(p){function e(e){var t=e.getValue();n&&n(t)}return p.on("change",e),function(){p.off("change",e)}}}),[p,n]),Object(c.useEffect)((function(){p&&p.setOption("mode",i)}),[p,i]),Object(c.useEffect)((function(){p&&(t===p.getValue()&&""!==t||setTimeout((function(){p.setValue(t||" ")}),300))}),[p,t]),Object(c.useEffect)((function(){if(l.current&&!p){var e=d.a.fromTextArea(l.current,Object(r.a)({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},o));m(e)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}t.b=function(e){var t=e.callback,n=e.onCancel,r=Object(c.useState)("python"),h=Object(s.a)(r,2),d=h[0],v=h[1];return u.a.createElement(o.a,Object(i.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)}}),u.a.createElement(o.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(e){v(m[e][1])}},Object.keys(m).map((function(e){return u.a.createElement(f,{key:e,value:e},m[e][0])})))),u.a.createElement(o.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(g,{mode:d})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(a.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(a.a,{type:"ghost",onClick:n},"取消")))}},"7ixt": +/*!**************************************************!*\ + !*** ./node_modules/rc-tooltip/es/placements.js ***! + \**************************************************/ +/*! exports provided: placements, default */ +/*! exports used: placements */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r={adjustX:1,adjustY:1},i=[0,0],a={left:{points:["cr","cl"],overflow:r,offset:[-4,0],targetOffset:i},right:{points:["cl","cr"],overflow:r,offset:[4,0],targetOffset:i},top:{points:["bc","tc"],overflow:r,offset:[0,-4],targetOffset:i},bottom:{points:["tc","bc"],overflow:r,offset:[0,4],targetOffset:i},topLeft:{points:["bl","tl"],overflow:r,offset:[0,-4],targetOffset:i},leftTop:{points:["tr","tl"],overflow:r,offset:[-4,0],targetOffset:i},topRight:{points:["br","tr"],overflow:r,offset:[0,-4],targetOffset:i},rightTop:{points:["tl","tr"],overflow:r,offset:[4,0],targetOffset:i},bottomRight:{points:["tr","br"],overflow:r,offset:[0,4],targetOffset:i},rightBottom:{points:["bl","br"],overflow:r,offset:[4,0],targetOffset:i},bottomLeft:{points:["tl","bl"],overflow:r,offset:[0,4],targetOffset:i},leftBottom:{points:["br","bl"],overflow:r,offset:[-4,0],targetOffset:i}}},"815F": +/*!***************************************************!*\ + !*** ./node_modules/rc-tree/es/utils/treeUtil.js ***! + \***************************************************/ +/*! exports provided: getKey, warningWithoutKey, convertTreeToData, flattenTreeData, traverseDataNodes, convertDataToEntities, getTreeNodeProps, convertNodePropsToEventData */ +/*! exports used: convertDataToEntities, convertNodePropsToEventData, convertTreeToData, flattenTreeData, getKey, getTreeNodeProps */function(e,t,n){"use strict";n.d(t,"e",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return h})),n.d(t,"a",(function(){return f})),n.d(t,"f",(function(){return p})),n.d(t,"b",(function(){return m}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! rc-util/es/Children/toArray */"Zm9Q"),s=n(/*! rc-util/es/warning */"Kwbf"),l=n(/*! ../util */"OZM5");function c(e,t){return null!=e?e:t}function u(e){return function e(t){return Object(o.a)(t).map((function(t){if(!Object(l.i)(t))return Object(s.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,o=r.children,c=Object(a.a)(r,["children"]),u=Object(i.a)({key:n},c),h=e(o);return h.length&&(u.children=h),u})).filter((function(e){return e}))}(e)}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===t?[]:t),a=[];function o(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.map((function(u,h){var d=Object(l.h)(s?s.pos:"0",h),f=c(u.key,d),p=Object(i.a)(Object(i.a)({},u),{},{parent:s,pos:d,children:null,data:u,isStart:[].concat(Object(r.a)(s?s.isStart:[]),[0===h]),isEnd:[].concat(Object(r.a)(s?s.isEnd:[]),[h===e.length-1])});return a.push(p),!0===t||n.has(f)?p.children=o(u.children||[],p):p.children=[],p}))}return o(e),a}function d(e,t,n){var r;n?"string"==typeof n?r=function(e){return e[n]}:"function"==typeof n&&(r=function(e){return n(e)}):r=function(e,t){return c(e.key,t)},function n(i,a,o){var s=i?i.children:e,c=i?Object(l.h)(o.pos,a):"0";if(i){var u=r(i,c),h={node:i,index:a,pos:c,key:u,parentPos:o.node?o.pos:null,level:o.level+1};t(h)}s&&s.forEach((function(e,t){n(e,t,{node:i,pos:c,level:o?o.level+1:-1})}))}(null)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,a=arguments.length>2?arguments[2]:void 0,o={},s={},l={posEntities:o,keyEntities:s};return n&&(l=n(l)||l),d(e,(function(e){var t=e.node,n=e.index,i=e.pos,a=e.key,u=e.parentPos,h={node:t,index:n,key:a,pos:i,level:e.level},d=c(a,i);o[i]=h,s[d]=h,h.parent=o[u],h.parent&&(h.parent.children=h.parent.children||[],h.parent.children.push(h)),r&&r(h,l)}),a),i&&i(l),l}function p(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,a=t.loadingKeys,o=t.checkedKeys,s=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,u=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==i.indexOf(e),loading:-1!==a.indexOf(e),checked:-1!==o.indexOf(e),halfChecked:-1!==s.indexOf(e),pos:String(u?u.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function m(e){var t=e.data,n=e.expanded,r=e.selected,a=e.checked,o=e.loaded,l=e.loading,c=e.halfChecked,u=e.dragOver,h=e.dragOverGapTop,d=e.dragOverGapBottom,f=e.pos,p=e.active,m=Object(i.a)(Object(i.a)({},t),{},{expanded:n,selected:r,checked:a,loaded:o,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:h,dragOverGapBottom:d,pos:f,active:p});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Object(s.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}},"8B0h": +/*!***************************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/GroupHomework/Detail/components/ConfigWorks/index.less?modules ***! + \***************************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___gEqtP",flex_space_between:"flex_space_between___grlN6",flex_box_vertical_center:"flex_box_vertical_center___1EQOE",flex_box_center_end:"flex_box_center_end___qI1rq",flex_box_column:"flex_box_column___1hiVF",form:"form___24-lt",efficiency:"efficiency___15_hw",configworksContainer:"configworksContainer___1ymgD"}},"8EBN": +/*!**********************************************!*\ + !*** ./node_modules/codemirror/mode/meta.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.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 t=0;t-1&&t.substring(i+1,t.length);if(a)return e.findModeByExtension(a)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n0?d.a.createElement("span",null,"(已拆分",h,"个zip包)"):"")}),i===(null==n?void 0:n.length)-1?_(r,h>0?h+1:0):l>943718400?(h++,l=0,L(h,(function(){i++,f()}))):(i++,f());case 3:case"end":return e.stop()}}),e)}))),2600)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)},f=function(){return p.apply(this,arguments)},n=t||c,k(!0),i=0,l=0,h=0,r=o.a.info({width:460,title:d.a.createElement("div",null,"正在导出附件,",d.a.createElement("span",{className:"c-red"},"请勿关闭或操作当前浏览器窗口")),content:d.a.createElement("div",null,"当前进度: ",d.a.createElement("span",{className:"c-blue"},i+1),"/",null==n?void 0:n.length),maskClosable:!1,okText:"我知道了",onOk:function(){}}),f();case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(e,t,n,r){var i=t,a=new window.XMLHttpRequest;return a.withCredentials=!0,a.addEventListener("load",(function(e){n(e,a)}),!1),a.addEventListener("error",(function(e){r&&r(e)}),!1),a.responseType="blob",a.open("GET",i),a.send(null),a},L=function(e,t){S.current.generateAsync({type:"blob"}).then((function(n){var r=document.createElement("a");r.href=window.URL.createObjectURL(n),r.download=f+"-".concat(e)+".zip",document.body.appendChild(r);var i=document.createEvent("MouseEvents");i.initEvent("click",!1,!1),r.dispatchEvent(i),document.body.removeChild(r),S.current=new p.a,t()}))},_=function(e,t){S.current.generateAsync({type:"blob"}).then((function(n){var r=document.createElement("a");r.href=window.URL.createObjectURL(n),r.download=t>0?f+"-".concat(t)+".zip":f+".zip",document.body.appendChild(r);var i=document.createEvent("MouseEvents");i.initEvent("click",!1,!1),r.dispatchEvent(i),document.body.removeChild(r),e.destroy(),k(!1),x(),S.current=new p.a}))};return y?d.a.createElement(d.a.Fragment,null):d.a.createElement(r.a,Object(i.a)({},v,{onClick:function(){return O()},loading:E}),"下载")};t.a=Object(h.forwardRef)(g)},"8hTe": +/*!******************************************************!*\ + !*** ./src/components/RenderHtml/index.less?modules ***! + \******************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={button:"button___1wy9m"}},"9Bee": +/*!*********************************************************!*\ + !*** ./src/components/RenderHtml/index.tsx + 3 modules ***! + \*********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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/RenderHtml/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/PreviewAll/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hls.js/dist/hls.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/katex/dist/katex.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/lib/marked.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/src/helpers.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("DYRE");var r=n("zeV3"),i=(n("+L6B"),n("2/Rp")),a=n("k1fw"),o=n("9og8"),s=n("tJVT"),l=n("WmNS"),c=n.n(l),u=n("q1tI"),h=n.n(u),d=(n("vg9a"),n("DlQD")),f=n.n(d),p=n("rUJ1");var m=[],g=["
        "],v=new f.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){m.length=0,g=["
          "]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(){return function e(t,n,r,i){if(n>=t.length||t[n].level<=r)return n;var a=t[n];i.push("
        • "+a.text+"");var o=[];return n=e(t,++n,a.level,o),o.length>0&&(i.push("
            "),o.forEach((function(e){i.push(e)})),i.push("
          ")),i.push("
        • "),n=e(t,n,r,i)}(m,0,0,g),g.push("
        "),g.join("")}var C={heading:function(e){var t=y.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:Object(s.a)(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||""),i=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(i)>=0){var a=S(),o=r;r=a,O[a]={type:"block",expression:o}}return{type:"code",raw:n,lang:i,text:r}}}},E=/(?:\${2})([^\n`]+?)(?:\${2})/gi,k=0,S=function(){return"__special_katext_id_".concat(k++,"__")},O={};function T(){k=0,O={}}function L(e){return e=e.replace(E,(function(e,t){var n=S();return O[n]={type:"inline",expression:t},n}))}var _=v.listitem;v.listitem=function(e){return _(L(e))};var A=v.paragraph;v.paragraph=function(e){return A(L(e))};var D=v.tablecell;v.tablecell=function(e,t){return D(L(e),t)},v.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"

        ".concat(e,"

        "):'
        ').concat(n?e:Object(p.escape)(e,!0),"
        \n"):'
        '+(n?e:Object(p.escape)(e,!0))+"
        "},v.heading=function(e,t,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:r,level:t,text:e}),"'+e+""},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:C,renderer:v});var R=f.a,M=(n("SJMd"),n("ulZh")),I=n.n(M),j=n("m3rI"),N=n("Oy/b"),P=n("p5ED"),F=n("ErOA"),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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function H(e,t){function n(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function U(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function z(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]',"select"),this.addActionButton(n,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'',"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(e){var n=document.createElement("div");n.className=""+t.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",e.typeName),n.innerHTML=e.icon,n.addEventListener("click",(function(){t.markerToolbarButtonClicked(n,e)})),t.buttons.push(n),t.markerButtons.push(n)})),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()},e.prototype.addButtonClickListener=function(e){this.buttonClickListeners.push(e)},e.prototype.removeButtonClickListener=function(e){this.buttonClickListeners.indexOf(e)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(e),1)},e.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},e.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var e=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t0&&this.buttonClickListeners.forEach((function(e){return e("marker",t)})),this.markerButtonOverflowBlock.style.display="none"},e.prototype.actionToolbarButtonClicked=function(e,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("action",t)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},e.prototype.setActiveButton=function(e){this.resetButtonStyles(),e.className=e.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),e.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},e.prototype.setActiveMarkerButton=function(e){var t=this.markerButtons.find((function(t){return t.getAttribute("data-type-name")===e}));t&&this.setActiveButton(t)},e.prototype.setCurrentMarker=function(e){var t=this;this.currentMarker=e,this.buttons.filter((function(e){return/delete|notes/.test(e.getAttribute("data-action"))})).forEach((function(e){void 0===t.currentMarker?(e.style.fillOpacity="0.4",e.style.pointerEvents="none"):(e.style.fillOpacity="1",e.style.pointerEvents="all")}))},e}(),Q=function(){function e(e,t,n,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=e,this.displayMode=t,this.uiStyleSettings=n,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return e.prototype.addStyles=function(){var e;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 t=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!==(e=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==e?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"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 "))},e.prototype.show=function(e){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==t?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},e.prototype.setPanelButtons=function(e){var t,n,r=this;this.panels=e,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==t?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(e){var t;e.uiStyleSettings=r.uiStyleSettings;var n=document.createElement("div");n.className=r.toolboxButtonStyleClass.name+" "+(null!==(t=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==t?t:r.toolboxButtonStyleColorsClass.name),n.innerHTML=e.icon,n.title=e.title,n.addEventListener("click",(function(){r.panelButtonClick(e)})),r.panelButtons.push(n),r.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},e.prototype.panelButtonClick=function(e){var t=this,n=-1;if(e!==this.activePanel){n=this.panels.indexOf(e),this.panelRow.innerHTML="";var r=e.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=e}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===t.displayMode?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(e,r){var i,a;e.className=t.toolboxButtonStyleClass.name+" "+(r===n?""+(null!==(i=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==i?i:t.toolboxActiveButtonStyleColorsClass.name):""+(null!==(a=t.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==a?a:t.toolboxButtonStyleColorsClass.name))}))},e}(),Z=function(e,t){this.title=e,this.icon=t},ee=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.colors=[],a.addTransparent=!1,a.colorBoxes=[],a.colors=n,a.currentColor=r,a.setCurrentColor=a.setCurrentColor.bind(a),a.getColorBox=a.getColorBox.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.colors.forEach((function(n){var r=e.getColorBox(n);t.appendChild(r),e.colorBoxes.push(r)})),t},t.prototype.getColorBox=function(e){var t=this,n=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-n,i=document.createElement("div");i.style.display="inline-block",i.style.boxSizing="content-box",i.style.width=r-2+"px",i.style.height=r-2+"px",i.style.padding="1px",i.style.marginRight="2px",i.style.marginBottom="2px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderRadius=(r+2)/2+"px",i.style.borderColor=e===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentColor(e,i)}));var a=document.createElement("div");return a.style.display="inline-block",a.style.width=r-2+"px",a.style.height=r-2+"px",a.style.backgroundColor=e,a.style.borderRadius=r/2+"px","transparent"===e&&(a.style.fill=this.uiStyleSettings.toolboxAccentColor,a.innerHTML='\n \n '),i.appendChild(a),i},t.prototype.setCurrentColor=function(e,t){var n=this;this.currentColor=e,this.colorBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(e)},t}(Z),te=function(){function e(e,t,n){this._state="new",this._isSelected=!1,this._container=e,this._overlayContainer=t,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(e.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!1},Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},e.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},e.prototype.pointerDown=function(e,t){},e.prototype.dblClick=function(e,t){},e.prototype.manipulate=function(e){},e.prototype.pointerUp=function(e){this.stateChanged()},e.prototype.dispose=function(){},e.prototype.addMarkerVisualToContainer=function(e){this.container.childNodes.length>0?this.container.insertBefore(e,this.container.childNodes[0]):this.container.appendChild(e)},e.prototype.getState=function(){return{typeName:e.typeName,state:this.state,notes:this.notes}},e.prototype.restoreState=function(e){this._state=e.state,this.notes=e.notes},e.prototype.scale=function(e,t){},e.prototype.colorChanged=function(e){this.onColorChanged&&this.onColorChanged(e),this.stateChanged()},e.prototype.fillColorChanged=function(e){this.onFillColorChanged&&this.onFillColorChanged(e),this.stateChanged()},e.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var e=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),e.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(e)&&this.onStateChanged(this)}},e.typeName="MarkerBase",e}(),ne=function(){function e(){this.findGripByVisual=this.findGripByVisual.bind(this)}return e.prototype.findGripByVisual=function(e){return this.topLeft.ownsTarget(e)?this.topLeft:this.topCenter.ownsTarget(e)?this.topCenter:this.topRight.ownsTarget(e)?this.topRight:this.centerLeft.ownsTarget(e)?this.centerLeft:this.centerRight.ownsTarget(e)?this.centerRight:this.bottomLeft.ownsTarget(e)?this.bottomLeft:this.bottomCenter.ownsTarget(e)?this.bottomCenter:this.bottomRight.ownsTarget(e)?this.bottomRight:void 0},e}(),re=function(){function e(){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 e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e}(),ie=function(){function e(){}return e.toITransformMatrix=function(e){return{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}},e.toSVGMatrix=function(e,t){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},e}(),ae=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(W.createTransform()),i.setupControlBox(),i}return H(t,e),Object.defineProperty(t.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visual",{get:function(){return this._visual},set:function(e){this._visual=e;var t=W.createTransform();this._visual.transform.baseVal.appendItem(t)},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!!(void 0!==this.controlGrips.findGripByVisual(t)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(t);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(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},t.prototype.moveVisual=function(e){this.visual.style.transform="translate("+e.x+"px, "+e.y+"px)"},t.prototype.manipulate=function(e){var t=this.unrotatePoint(e);"creating"===this.state?this.resize(e):"move"===this.state?(this.left=this.manipulationStartLeft+(t.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(t.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(t):"rotate"===this.state&&this.rotate(e)},t.prototype.resize=function(e){var t=this.manipulationStartLeft,n=this.manipulationStartWidth,r=this.manipulationStartTop,i=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:t=this.manipulationStartLeft+e.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-t;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+e.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+e.y-this.manipulationStartY,i=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:i=this.manipulationStartHeight+e.y-this.manipulationStartY}n>=0?(this.left=t,this.width=n):(this.left=t+n,this.width=-n),i>=0?(this.top=r,this.height=i):(this.top=r+i,this.height=-i),this.setSize()},t.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},t.prototype.rotate=function(e){if(Math.abs(e.x-this.centerX)>.1){var t=Math.sign(e.x-this.centerX);this.rotationAngle=180*Math.atan((e.y-this.centerY)/(e.x-this.centerX))/Math.PI+90*t,this.applyRotation()}},t.prototype.applyRotation=function(){var e=this.container.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(e,0)},t.prototype.rotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM(),n=W.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.unrotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM();t=t.inverse();var n=W.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=W.createGroup();var e=W.createTransform();e.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(e),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 ne,this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){var e=this.controlBox.transform.baseVal.getItem(0);e.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(e,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),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()},t.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()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.controlGrips.topLeft.GRIP_SIZE,t=-e/2,n=t,r=(this.width+this.CB_DISTANCE)/2-e/2,i=(this.height+this.CB_DISTANCE)/2-e/2,a=this.height+this.CB_DISTANCE-e/2,o=this.width+this.CB_DISTANCE-e/2;this.positionGrip(this.controlGrips.topLeft.visual,t,n),this.positionGrip(this.controlGrips.topCenter.visual,r,n),this.positionGrip(this.controlGrips.topRight.visual,o,n),this.positionGrip(this.controlGrips.centerLeft.visual,t,i),this.positionGrip(this.controlGrips.centerRight.visual,o,i),this.positionGrip(this.controlGrips.bottomLeft.visual,t,a),this.positionGrip(this.controlGrips.bottomCenter.visual,r,a),this.positionGrip(this.controlGrips.bottomRight.visual,o,a),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,n-3*this.CB_DISTANCE)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.hideControlBox=function(){this.controlBox.style.display="none"},t.prototype.showControlBox=function(){this.controlBox.style.display=""},t.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ie.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ie.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*t,y:r.y*n});this.left=i.x,this.top=i.y,this.width=this.width*t,this.height=this.height*n,this.adjustControlBox()},t}(te),oe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&W.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&W.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&W.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&W.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.title="Rectangle marker",t}(ae),se=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.widths=[],a.widthBoxes=[],a.widths=n,a.currentWidth=r,a.setCurrentWidth=a.setCurrentWidth.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.widths.forEach((function(n){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=n===e.currentWidth?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentWidth(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=n.toString(),i.style.marginRight="5px",r.appendChild(i);var a=document.createElement("div");a.style.minHeight="20px",a.style.flexGrow="2",a.style.display="flex",a.style.alignItems="center";var o=document.createElement("hr");o.style.minWidth="20px",o.style.border="0px",o.style.borderTop=n+"px solid "+e.uiStyleSettings.toolboxColor,o.style.flexGrow="2",a.appendChild(o),r.appendChild(a),e.widthBoxes.push(r)})),t},t.prototype.setCurrentWidth=function(e,t){var n=this;this.currentWidth=e,this.widthBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},t}(Z),le=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.styles=[],a.styleBoxes=[],a.styles=n,a.currentStyle=r,a.setCurrentStyle=a.setCurrentStyle.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.styles.forEach((function(n){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/e.styles.length-5+"%",r.style.borderColor=n===e.currentStyle?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentStyle(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.minHeight="20px",i.style.flexGrow="2",i.style.overflow="hidden";var a='\n \n ";i.innerHTML=a,r.appendChild(i),e.styleBoxes.push(r)})),t},t.prototype.setCurrentStyle=function(e,t){var n=this;this.currentStyle=e,this.styleBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},t}(Z),ce=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return H(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="FrameMarker",t.title="Frame marker",t.icon='',t}(oe),ue=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},he=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return H(t,e),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartX=t.x,this.manipulationStartY=t.y,"new"===this.state&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.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(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"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(t),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},t.prototype.adjustVisual=function(){},t.prototype.manipulate=function(e){"creating"===this.state?this.resize(e):"move"===this.state?(this.x1=this.manipulationStartX1+e.x-this.manipulationStartX,this.y1=this.manipulationStartY1+e.y-this.manipulationStartY,this.x2=this.manipulationStartX2+e.x-this.manipulationStartX,this.y2=this.manipulationStartY2+e.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(e)},t.prototype.resize=function(e){switch(this.activeGrip){case this.grip1:this.x1=e.x,this.y1=e.y;break;case this.grip2:case void 0:this.x2=e.x,this.y2=e.y}this.adjustVisual(),this.adjustControlBox()},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=W.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){this.positionGrips()},t.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-e/2,this.y1-e/2),this.positionGrip(this.grip2.visual,this.x2-e/2,this.y2-e/2)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.x1=this.x1*t,this.y1=this.y1*n,this.x2=this.x2*t,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},t}(te),de=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},t.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},t.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()]]))},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},t.typeName="LineMarker",t.title="Line marker",t.icon='',t}(he),fe=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.fonts=[],a.fontBoxes=[],a.fonts=n,a.currentFont=r,a.setCurrentFont=a.setCurrentFont.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.flexGrow="2",this.fonts.forEach((function(n){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/e.fonts.length-5+"%",r.style.borderColor=n===e.currentFont?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentFont(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.display="flex",i.style.minHeight="20px",i.style.flexGrow="2",i.style.fontFamily=n,i.style.overflow="hidden";var a=document.createElement("div");a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.innerHTML="The quick brown fox jumps over the lazy dog",i.appendChild(a),r.appendChild(i),e.fontBoxes.push(r)})),t},t.prototype.setCurrentFont=function(e,t){var n=this;this.currentFont=e,this.fontBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},t}(Z),pe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.padding=5,i.DEFAULT_TEXT="your text here",i.text=i.DEFAULT_TEXT,i.isMoved=!1,i.color=r.defaultColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setColor=i.setColor.bind(i),i.setFont=i.setFont.bind(i),i.renderText=i.renderText.bind(i),i.sizeText=i.sizeText.bind(i),i.textEditDivClicked=i.textEditDivClicked.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.setSize=i.setSize.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i}return H(t,e),t.prototype.ownsTarget=function(t){if(e.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(e){e===t&&(n=!0)})),n},t.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()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.renderText=function(){var e=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(t){e.textElement.appendChild(W.createTSpan(""===t.trim()?" ":t.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},t.prototype.getTextScale=function(){var e=this.textElement.getBBox(),t=1;if(e.width>0&&e.height>0){var n=(1*this.width-this.width*this.padding*2/100)/e.width,r=(1*this.height-this.height*this.padding*2/100)/e.height;t=Math.min(n,r)}return t},t.prototype.getTextPosition=function(e){var t=this.textElement.getBBox(),n=0,r=0;return t.width>0&&t.height>0&&(n=(this.width-t.width*e)/2,r=this.height/2-t.height*e/2),{x:n,y:r}},t.prototype.sizeText=function(){var e=this.textElement.getBBox(),t=this.getTextScale(),n=this.getTextPosition(t);n.y-=e.y*t,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+t+", "+t+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(t,t))},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.sizeText()},t.prototype.setSize=function(){e.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()]]))},t.prototype.pointerUp=function(t){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),e.prototype.pointerUp.call(this,t),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.showTextEditor=function(){var e=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(e){e.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var t=Number.parseFloat(e.textEditor.style.fontSize);e.textEditor.clientWidth>=Number.parseInt(e.textEditor.style.maxWidth)&&t>.9;)t-=.1,e.textEditor.style.fontSize=Math.max(t,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(e){if(e.clipboardData){var t=e.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(t)),e.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){e.textEditDivClicked(e.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},t.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var e=this.getTextScale(),t=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),r={x:n.width*e,y:n.height*e};t.x-=r.x/2,t.y-=r.y/2,this.textEditor.style.top=t.y+"px",this.textEditor.style.left=t.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-t.x+"px",this.textEditor.style.fontSize=Math.max(16*e,12)+"px",this.textElement.style.display="none"}},t.prototype.textEditDivClicked=function(e){this.text=e.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},t.prototype.select=function(){e.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},t.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),e.prototype.deselect.call(this)},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setColor=function(e){this.textElement&&W.setAttributes(this.textElement,[["fill",e]]),this.color=e,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(e)},t.prototype.setFont=function(e){this.textElement&&W.setAttributes(this.textElement,[["font-family",e]]),this.fontFamily=e,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},t.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},t.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize(),this.sizeText(),this.positionTextEditor()},t.typeName="TextMarker",t.title="Text marker",t.icon='',t}(ae),me=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},t.prototype.createVisual=function(){this.visual=W.createGroup(),this.drawingImage=W.createImage(),this.visual.appendChild(this.drawingImage);var e=W.createTransform();this.visual.transform.baseVal.appendItem(e),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){"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(t.x,t.y),this.drawing=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.manipulate=function(t){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):e.prototype.pointerUp.call(this,t)},t.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)},t.prototype.select=function(){"creating"===this.state&&this.finishCreation(),e.prototype.select.call(this)},t.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),e.prototype.deselect.call(this)},t.prototype.finishCreation=function(){for(var e=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),t=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=t[0],r=t[1],i=t[2],a=t[3],o=!1,s=0;s0&&(o=!0,sa&&(a=s),l>i&&(i=l));if(o){this.left=n/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(i-n)/this.pixelRatio,this.height=(a-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=i-n,c.height=a-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,r,i-n,a-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},t.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})},t.prototype.setColor=function(e){this.color=e,this.colorChanged(e)},t.prototype.setLineWidth=function(e){this.lineWidth=e},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){this.createVisual(),e.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setDrawingImage()},t.typeName="FreehandMarker",t.title="Freehand marker",t.icon='',t}(ae),ge=function(e){function t(t,n,r){var i=e.call(this,t,r||'')||this;return i.typeBoxes=[],i.currentType=n,i.setCurrentType=i.setCurrentType.bind(i),i}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2";for(var n=function(n){var i="both";switch(n){case 0:i="both";break;case 1:i="start";break;case 2:i="end";break;case 3:i="none"}var a=document.createElement("div");if(a.style.display="flex",a.style.flexGrow="2",a.style.alignItems="center",a.style.justifyContent="space-between",a.style.padding="5px",a.style.borderWidth="2px",a.style.borderStyle="solid",a.style.borderColor=i===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",a.addEventListener("click",(function(){e.setCurrentType(i,a)})),t.appendChild(a),"both"===i||"start"===i){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",a.appendChild(o)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.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",s.appendChild(l),a.appendChild(s),"both"===i||"end"===i){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",a.appendChild(c)}r.typeBoxes.push(a)},r=this,i=0;i<4;i++)n(i);return t},t.prototype.setCurrentType=function(e,t){var n=this;this.currentType=e,this.typeBoxes.forEach((function(e){e.style.borderColor=e===t?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},t}(Z),ve=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new ge("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},t.prototype.getArrowPoints=function(e,t){var n=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return e-n/2+","+(t+r/2)+" "+e+","+(t-r/2)+" "+(e+n/2)+","+(t+r/2)},t.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.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 t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},t.prototype.setArrowType=function(e){this.arrowType=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},t.typeName="ArrowMarker",t.title="Arrow marker",t.icon='',t}(de),ye=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new ee("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return H(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="CoverMarker",t.title="Cover marker",t.icon='',t}(oe),be=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.opacities=[],a.opacityBoxes=[],a.opacities=n,a.currentOpacity=r,a.setCurrentOpacity=a.setCurrentOpacity.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",t.style.justifyContent="space-between",this.opacities.forEach((function(n){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=n===e.currentOpacity?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentOpacity(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=100*n+"%",r.appendChild(i),e.opacityBoxes.push(r)})),t},t.prototype.setCurrentOpacity=function(e,t){var n=this;this.currentOpacity=e,this.opacityBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},t}(Z),xe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new ee("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new be("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return H(t,e),t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&W.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="HighlightMarker",t.title="Highlight marker",t.icon='',t}(ye),we='',Ce=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new ee("Text color",r.defaultColorSet,i.color,''),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new ee("Fill color",r.defaultColorSet,i.bgColor,we),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new re,i.tipGrip.visual.transform.baseVal.appendItem(W.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return H(t,e),t.prototype.ownsTarget=function(t){return e.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},t.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)},t.prototype.pointerDown=function(t,n){"new"===this.state&&e.prototype.pointerDown.call(this,t,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,e.prototype.pointerUp.call(this,t);else{var n="creating"===this.state;e.prototype.pointerUp.call(this,t),this.setTipPoints(n),this.positionTip()}},t.prototype.manipulate=function(t){if(this.tipMoving){var n=this.unrotatePoint(t);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else e.prototype.manipulate.call(this,t)},t.prototype.setBgColor=function(e){this.bgRectangle&&this.tip&&(W.setAttributes(this.bgRectangle,[["fill",e]]),W.setAttributes(this.tip,[["fill",e]])),this.bgColor=e,this.fillColorChanged(e)},t.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},t.prototype.setTipPoints=function(e){void 0===e&&(e=!1);var t=Math.min(this.height/2,15),n=this.height/5;e&&(this.tipPosition={x:t+n/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 t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},t.typeName="MeasurementMarker",t.title="Measurement marker",t.icon='',t}(de),Se=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return H(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="EllipseFrameMarker",t.title="Ellipse frame marker",t.icon='',t}(Ee),Oe=function(){function e(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),e.prototype.addUndoStep=function(e){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},e.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},e.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},e.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return void 0!==e&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},e.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},e}(),Te=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},t.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},t.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=t.x,this.curveY=t.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},t.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()]]))},t.prototype.setupControlBox=function(){e.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)},t.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,e.prototype.addControlGrips.call(this)},t.prototype.positionGrips=function(){e.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/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()))},t.prototype.manipulate=function(t){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),e.prototype.resize.call(this,t),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual()},t.prototype.scale=function(t,n){this.curveX=this.curveX*t,this.curveY=this.curveY*n,e.prototype.scale.call(this,t,n)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},t.typeName="CurveMarker",t.title="Curve marker",t.icon='',t}(he),Le=function(){function e(e,t){void 0===t&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(e.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){this._defaultPrevented=!0},e}(),_e=function(e){function t(t,n,r){var i=e.call(this,t,!1)||this;return i.dataUrl=n,i.state=r,i}return H(t,e),t}(Le),Ae=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,r)||this;return i.marker=n,i}return H(t,e),t}(Le),De=function(){function e(){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 e.prototype.addEventListener=function(e,t){this[e].push(t)},e.prototype.removeEventListener=function(e,t){var n=this[e].indexOf(t);n>-1&&this[e].splice(n,1)},e}(),Re=function(){function e(t){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ue,this._isOpen=!1,this.undoRedoManager=new Oe,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 De,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=e.instanceCounter++,this.styles=new q(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=t,this.targetRoot=document.body,this.width=t.clientWidth,this.height=t.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(e.prototype,"ALL_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,Se,Ee,xe,Ce,ke,ye,de,Te]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,Ee,xe,Ce]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(e){if("string"==typeof e){var n=t.ALL_MARKER_TYPES.find((function(t){return t.typeName===e}));void 0!==n&&t._availableMarkerTypes.push(n)}else t._availableMarkerTypes.push(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),G.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},e.prototype.show=function(){var e=this;void 0===this.styles.styleSheetRoot&&void 0!==Y.styleSheetRoot&&(this.styles.styleSheetRoot=Y.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new Le(e))}))},e.prototype.render=function(){return U(this,void 0,void 0,(function(){var e;return z(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new K).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},e.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isOpen){var n=!1;e||this.eventListeners.beforeclose.forEach((function(e){var r=new Le(t,!0);e(r),r.defaultPrevented&&(n=!0)})),n||(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(e){return e(new Le(t))})),this.detachEvents(),this._isOpen=!1)}},e.prototype.addMarkersToToolbar=function(){for(var e,t=[],n=0;nthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,n=t',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},e.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")},e.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"},e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},e.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 e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"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 J(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1","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(e),1),e.dispose()},e.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())},e.prototype.toolbarButtonClicked=function(e,t){if("marker"===e&&void 0!==t)this.createNewMarker(t);else if("action"===e)switch(t){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()}},e.prototype.deleteSelectedMarker=function(){var e=this;if(void 0!==this._currentMarker){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Ae(e,e._currentMarker,!0);n(r),r.defaultPrevented&&(t=!0)})),!t){var n=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(t){return t(new Ae(e,n))}))}}},e.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Ae(e,void 0,!0);n(r),r.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var n=function(t){var n=r.markers[t];r.setCurrentMarker(r.markers[t]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(t){return t(new Ae(e,n))}))},r=this,i=this.markers.length-1;i>=0;i--)n(i);this.addUndoStep()}},Object.defineProperty(e.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),e.prototype.showNotesEditor=function(){var e;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!==(e=this._currentMarker.notes)&&void 0!==e?e:"",this.overlayContainer.appendChild(this.notesArea))},e.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)},e.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},e.prototype.addUndoStep=function(){var e=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var t=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===t.width&&n.height===t.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),r1&&this.panTo({x:e.clientX,y:e.clientY}))},e.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep()},e.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},e.prototype.onKeyUp=function(e){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==e.key&&"Backspace"!==e.key||this.deleteSelectedMarker()},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.markerImage.getBoundingClientRect();return{x:(e-n.left)/this.zoomLevel,y:(t-n.top)/this.zoomLevel}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.addLicenseKey=function(e){G.addKey(e)},e.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},e.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),e.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new Le(e))})))},e.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new Le(e))})))},e.instanceCounter=0,e}(),Me=function(e,t){return(Me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}; +/* ********************************** +cropro version 1.2.0 +@license SEE LICENSE IN LICENSE + +copyright Alan Mendelevich +see README and LICENSE for details +********************************** */ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */function Ie(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Me(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function je(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function Ne(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&t>0){var n=new Ye(e,t),r=n.ratio>=1?20:n.getHorizontalLength(20),i=n.ratio<1?20:n.getVerticalLength(20),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(a);var o=Fe.createDefs();a.appendChild(o);var s=Fe.createElement("clipPath",[["id","text-bg-clip"]]);o.appendChild(s);var l=Fe.createPath(Fe.getHollowRectanglePath((24-r)/2,(24-i)/2,r,i,(24-r)/2+2,(24-i)/2+2,r-4,i-4));a.appendChild(l);var c=Fe.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Fe.createTSpan(e+":"+t)),a.appendChild(c);var u=c.getBBox();Fe.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=Fe.createPath(Fe.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 s.appendChild(h),Fe.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(a),a.outerHTML}return''},e}(),Xe=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.isDropdownOpen=!1,i.onClick=i.dropdownButtonClicked,i.dropdownButtons=r,i}return Ie(t,e),t.prototype.setupDropdown=function(){var e=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(t){t.className=e.className,t.colorsClassName=e.colorsClassName,e.dropdownBlock.appendChild(t.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},t.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},t.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},t.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},t.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},t.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},t}(Ge),$e=function(){function e(e,t){this.GRIP_SIZE=10,this.color=e,this.fillColor=t,this.visual=Fe.createGroup(),this.visual.appendChild(Fe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Fe.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e.prototype.setCenter=function(e,t){this.visual.childNodes.forEach((function(n){return Fe.setAttributes(n,[["cx",e.toString()],["cy",t.toString()]])}))},e}(),Je=function(){function e(e,t,n,r){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=e,this.canvasHeight=t,this.margin=n,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(e.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(e){this._aspectRatio=e,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.gridContainer&&Fe.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),e.prototype.open=function(){var e=this;this.cropShadeElement=Fe.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Fe.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var t=0;tthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-t.height/2),Fe.setAttributes(this.cropRectElement,[["x",t.x.toString()],["y",t.y.toString()],["width",t.width.toString()],["height",t.height.toString()]]);var n=t.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(e,r){var i=t.y+n*(r+1);Fe.setAttributes(e,[["x1",""+t.x],["y1",""+i],["x2",""+(t.x+t.width)],["y2",""+i]])}));var r=t.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(e,n){var i=t.x+r*(n+1);Fe.setAttributes(e,[["x1",""+i],["y1",""+t.y],["x2",""+i],["y2",""+(t.y+t.height)]])})),Fe.setAttributes(this.cropShadeElement,[["d",Fe.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,t.x,t.y,t.width,t.height)]]),this.topLeftGrip.setCenter(t.x,t.y),this.topRightGrip.setCenter(t.x+t.width,t.y),this.bottomLeftGrip.setCenter(t.x,t.y+t.height),this.bottomRightGrip.setCenter(t.x+t.width,t.y+t.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},e.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)},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.container.getBoundingClientRect();return{x:e-n.left+this.margin,y:t-n.top+this.margin}},e.prototype.onPointerDown=function(e){this.container.setPointerCapture(e.pointerId),this.previousPoint=this.clientToLocalCoordinates(e.clientX,e.clientY),this.cropRectElement===e.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(e.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(e.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(e.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(e.target)&&(this.activeGrip=this.bottomRightGrip)},e.prototype.onPointerMove=function(e){if(this.isMoving)this.move(this.clientToLocalCoordinates(e.clientX,e.clientY));else if(this.activeGrip){var t=this.clientToLocalCoordinates(e.clientX,e.clientY);this.resize(t)}e.preventDefault()},e.prototype.onPointerUp=function(e){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(e.pointerId)},e.prototype.move=function(e){var t=e.x-this.previousPoint.x,n=e.y-this.previousPoint.y;1!==this.zoomFactor&&(t=-t/this.zoomFactor,n=-n/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+t),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+n),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=e},e.prototype.resize=function(e){var t=Object.assign({},this.cropRect),n=e.x-this.previousPoint.x,r=e.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:t.x+nthis.canvasWidth*this.zoomFactor&&(n=this.canvasWidth*this.zoomFactor-t.width),t.width+=n}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(t.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(n),t.height=this.aspectRatio.getVerticalLength(t.width)):(t.y+=r,t.height=this.cropRect.y+this.cropRect.height-t.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?t.height=this.aspectRatio.getVerticalLength(t.width):t.height+=r}t.width<10&&(t.x=this.cropRect.x,t.width=10),t.height<10&&(t.y=this.cropRect.y,t.height=10),this.previousPoint=e,t.x>=this.margin&&t.y>=this.margin&&t.x-this.margin+t.width<=this.canvasWidth&&t.y-this.margin+t.height<=this.canvasHeight&&(this.cropRect=t,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},e.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var e=this.cropRect.x+this.cropRect.width/2,t=this.cropRect.y+this.cropRect.height/2,n=this.aspectRatio.getHorizontalLength(this.cropRect.height),r=this.aspectRatio.getVerticalLength(this.cropRect.width);n/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=e-this.cropRect.width/2,this.cropRect.y=t-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)}},e.prototype.getRescaledRect=function(e,t,n,r,i,a){var o=n/e,s=r/t;return{x:(i.x-a)*o+a,y:(i.y-a)*s+a,width:i.width*o,height:i.height*s}},e.prototype.scaleCanvas=function(e,t){var n=this.getRescaledRect(this.canvasWidth,this.canvasHeight,e,t,this.cropRect,this.margin);this.canvasWidth=e,this.canvasHeight=t,this.onCropChange&&this.onCropChange(n),this.setCropRectangle(n)},e}(),Qe=function(){function e(e){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=e,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(e.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),e.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},e.prototype.onPointerDown=function(e){this.controlContainer.setPointerCapture(e.pointerId),this.isDragging=!0,this.previousPoint={x:e.clientX,y:e.clientY}},e.prototype.onPointerMove=function(e){this.isDragging&&(this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.previousPoint.x=e.clientX)},e.prototype.onPointerUp=function(e){this.isDragging&&this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(e.pointerId)},e.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var e=this.angleLabelText.getBBox();Fe.setAttributes(this.angleLabelElement,[["x",((this.width-e.width)/2).toString()],["y",(this.height/2).toString()]])}},e.prototype.positionScaleShape=function(){if(this.scaleShape){var e=this.scaleShape.transform.baseVal.getItem(0);e.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(e,0)}},e.prototype.getVisual=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("width",this.width+"px"),e.setAttribute("height",this.height+"px"),e.setAttribute("viewBox","0 0 "+this.width+" "+this.height),e.style.flexShrink="0",document.body.appendChild(e);for(var t="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,n=1;n<=this.width/5+10;n++){var r=n%5==0?this.height/3:this.height/6;t+="h4v"+-r+"h1v"+r}t+="v1H0Z",this.scaleShape=Fe.createPath(t);var i=Fe.createTransform();this.scaleShape.transform.baseVal.appendItem(i),e.appendChild(this.scaleShape),this.angleLabelElement=Fe.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Fe.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var a=Fe.createTSpan("");return a.innerHTML="°",this.angleLabelElement.appendChild(a),e.appendChild(this.angleLabelElement),document.body.removeChild(e),e},e}(),Ze=function(){function e(){this.naturalSize=!1,this.imageType="image/png"}return e.prototype.rasterize=function(e,t,n,r,i,a,o){var s=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=e.width.baseVal.value-2*r,c.height=e.height.baseVal.value-2*r;var u=1,h=1;!0===s.naturalSize?(u=t.naturalWidth/(e.width.baseVal.value-2*r)/a,h=t.naturalHeight/(e.height.baseVal.value-2*r)/o,c.width=t.naturalWidth/a,c.height=t.naturalHeight/o):void 0!==s.width&&void 0!==s.height&&(u=s.width/n.width,h=s.height/n.height,c.width*=u,c.height*=h);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(i*Math.PI/180),d.scale(a,o),d.translate(-c.width/2,-c.height/2),d.drawImage(t,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=n.width*u,f.height=n.height*h,f.getContext("2d").putImageData(d.getImageData((n.x-r)*u,(n.y-r)*h,n.width*u,n.height*h),0,0),l(f.toDataURL(s.imageType,s.imageQuality))}))},e}(),et=function(){function e(t){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=e.instanceCounter++,this.styles=new Be(this.instanceNo),this.target=t,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(e){this._zoomToCropEnabled=e,e?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gridLines",{get:function(){return this._gridLines},set:function(e){this._gridLines=e,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(e){this._rotationAngle=e,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"aspectRatio",{get:function(){var e;return null!==(e=this._aspectRatio)&&void 0!==e?e:this.aspectRatios[0]},set:function(e){this._aspectRatio=e},enumerable:!1,configurable:!0}),e.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},e.prototype.show=function(){this.showUI(),this.open()},e.prototype.close=function(e){void 0===e&&(e=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),e||this.closeEventListeners.forEach((function(e){return e()})),this._isOpen=!1)},e.prototype.addRenderEventListener=function(e){this.renderEventListeners.push(e)},e.prototype.removeRenderEventListener=function(e){this.renderEventListeners.indexOf(e)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(e),1)},e.prototype.addCloseEventListener=function(e){this.closeEventListeners.push(e)},e.prototype.removeCloseEventListener=function(e){this.closeEventListeners.indexOf(e)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(e),1)},e.prototype.setupResizeObserver=function(){var e=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.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))},e.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.contentDiv.clientWidth/e>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*e:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,n=t+2*this.CANVAS_MARGINe+this.CANVAS_MARGIN?this.target.offsetTop-(e+this.CANVAS_MARGIN):0;this.coverDiv.style.top=t+"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},e.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},e.prototype.addTopToolbar=function(){var e=this;this.topToolbar=new ze,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 t=new We;t.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(t);var n=[];this.aspectRatios.forEach((function(t){var r=new Ge(qe.getIcon(t.horizontal,t.vertical),0===t.horizontal&&0===t.vertical?"FREE":t.horizontal+":"+t.vertical);r.onClick=function(){return e.ratioButtonClicked(t)},n.push(r)})),this.aspectRatioButton=new Xe(qe.getIcon(0,0),"Aspect ratio",n),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,t.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var r=new Ge('',"Toggle grid");r.isActive=this.isGridVisible,r.onClick=function(){e.isGridVisible=!e.isGridVisible,r.isActive=e.isGridVisible},t.addButton(r);var i=new Ge('',"Zoom to selection");if(i.isActive=this.zoomToCropEnabled,i.onClick=function(){e.zoomToCropEnabled=!e.zoomToCropEnabled,i.isActive=e.zoomToCropEnabled},t.addButton(i),!Pe.isLicensed){var a=new Ke;this.topToolbar.addElementBlock(a);var o=document.createElement("div");o.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var s=document.createElement("a");s.style.color="currentColor",s.href="https://markerjs.com/products/cropro",s.target="_blank",s.innerHTML='',o.appendChild(s),a.addElement(o)}var l=new We;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new Ge('',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new Ge('',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},e.prototype.addBottomToolbar=function(){var e=this;this.bottomToolbar=new ze,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 t=new We;t.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(t);var n=new Ge('',"Rotate left");n.onClick=this.rotateLeftButtonClicked,t.addButton(n);var r=new Ge('',"Rotate right");r.onClick=this.rotateRightButtonClicked,t.addButton(r);var i=new Ke;i.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(i),this.straightener=new Qe("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(t){e.rotateBy(t),e.straightener.angle=e.rotationAngle},i.addElement(this.straightener.getUI());var a=new We;a.minWidth=2*this.toolbarHeight+"px",a.contentAlign="end",this.bottomToolbar.addButtonBlock(a);var o=new Ge('',"Flip horizontal");o.onClick=this.flipHorizontallyButtonClicked,a.addButton(o);var s=new Ge('',"Flip vertical");s.onClick=this.flipVerticallyButtonClicked,a.addButton(s)},e.prototype.ratioButtonClicked=function(e){this.aspectRatio=e,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},e.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=qe.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},e.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new Ye(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},e.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},e.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},e.prototype.restoreState=function(e){if(e){var t=this.cropLayer.getRescaledRect(e.width,e.height,this.imageWidth,this.imageHeight,e.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(t),this.cropRectChanged(t),this.flippedHorizontally=e.flippedHorizontally,this.flippedVertically=e.flippedVertically,this.applyFlip(),this.rotationAngle=e.rotationAngle,this.applyRotation()}},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.cropImage.getBoundingClientRect();return{x:e-n.left,y:t-n.top}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var e=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.rotateLeftButtonClicked=function(){var e=this.rotationAngle-90;this.rotationAngle%90!=0&&(e+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateRightButtonClicked=function(){var e=this.rotationAngle+90;this.rotationAngle%90!=0&&(e-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateTo=function(e){e=(e=e>180?e-360:e)<=-180?e+360:e,this.rotationAngle=e,this.applyRotation()},e.prototype.rotateBy=function(e){this.rotateTo((this.rotationAngle+e)%360)},e.prototype.applyRotation=function(){var e=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var t=this.editingTargetRotationContainer.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(t,0);var n=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/n.width,this.imageHeight/n.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=e},e.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},e.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},e.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},e.prototype.startRenderAndClose=function(){return je(this,void 0,void 0,(function(){var e,t;return Ne(this,(function(n){switch(n.label){case 0:return[4,this.render()];case 1:return e=n.sent(),t=this.getState(),this.renderEventListeners.forEach((function(n){return n(e,t)})),this.close(!0),[2]}}))}))},e.prototype.render=function(){return je(this,void 0,void 0,(function(){var e;return Ne(this,(function(t){switch(t.label){case 0:return(e=new Ze).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.width=this.renderWidth,e.height=this.renderHeight,this.unzoomFromCrop(),Fe.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,e.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 t.sent(),[4,e.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,t.sent()]}}))}))},e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ue("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 Ue("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new Ue("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var e=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ue("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*e)+"px;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ue("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ue("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new He("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new He("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new Ue("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 Ue("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ue("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 Ue("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ue("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},e.instanceCounter=0,e}(),tt=n("8hTe"),nt=n.n(tt),rt=/]*>/g;t.a=function(e){var t=e.value,n=void 0===t?"":t,l=e.edit,d=void 0!==l&&l,f=e.className,p=e.showTextOnly,m=e.showLines,g=e.replaces,v=e.zoomImg,y=e.hasMask,C=e.style,E=void 0===C?{}:C,k=e.stylesPrev,S=void 0===k?{}:k,L=String(n),_=Object(u.useRef)(),A=Object(u.useRef)(),D=Object(u.useState)(""),M=Object(s.a)(D,2),B=M[0],H=M[1],U=Object(u.useState)("office"),z=Object(s.a)(U,2),V=z[0],W=z[1],G=Object(u.useMemo)((function(){try{L=(L=L.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+j.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+j.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+j.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]

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

        "+e+"

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

        "+se(e.message+"",!0)+"
        ";throw e}}return he.options=he.setOptions=function(e){return ae(he.defaults,e),ce(he.defaults),he},he.getDefaults=le,he.defaults=ue,he.use=function(e){var t=ae({},e);if(e.renderer&&function(){var n=he.defaults.renderer||new Z,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,a=new Array(i),o=0;o",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,o){o&&o!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(a(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var a=r(i,"pairs"),o=t.listSelections(),c=0;c=0;c--){var h=o[c].head;t.replaceRange("",n(h.line,h.ch-1),n(h.line,h.ch+1),"+delete")}},Enter:function(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),o=0;o1&&d.indexOf(i)>=0&&t.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;v="addFour"}else if(f){var w=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(x)||w==i||e.isWordChar(w))return e.Pass;v="both"}else{if(!m||!(0===x.length||/\s/.test(x)||h.indexOf(x)>-1))return e.Pass;v="both"}else v=f&&c(t,b)?"both":d.indexOf(i)>=0&&t.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=v)return e.Pass}else u=v}var C=l%2?o.charAt(l-1):i,E=l%2?i:o.charAt(l+1);t.operation((function(){if("skip"==u)t.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==u){var i=t.getSelections();for(r=0;r0,{anchor:new n(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new n(a.head.line,a.head.ch+(o?1:-1))});t.setSelections(i)}else"both"==u?(t.replaceSelection(C+E,null),t.triggerElectric(C+E),t.execCommand("goCharLeft")):"addFour"==u&&(t.replaceSelection(C+C+C+C,"before"),t.execCommand("goCharRight"));var a,o}))}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}a(t.pairs+"`")}(n(/*! ../../lib/codemirror */"VrN/"))},FOrL: +/*!********************************************!*\ + !*** ./src/assets/images/icons/nodata.png ***! + \********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/nodata.a6b3f948.png"},GUfm: +/*!************************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/GroupHomework/Detail/components/WorkList/index.less?modules ***! + \************************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={wrap:"wrap___2nb3E",MdEditor:"MdEditor___1glSN",workListButtonWrap:"workListButtonWrap___2I8CU",anticon:"anticon___Xuf4M",workListClass:"workListClass___2ETig",left:"left___w3OLq",visible:"visible___10L9C",status:"status___3sIxf",tips:"tips___1c8cd"}},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(e,t,n){"use strict";var r=n("q1tI"),i=n.n(r),a=n("TSYQ"),o=n.n(a);function s(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}function l(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var r=e.data[t];Array.isArray(r)?r.forEach((function(e){n.append(t+"[]",e)})):n.append(t,e.data[t])})),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var n="cannot "+e.method+" "+e.action+" "+t.status+"'",r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),s(t)):e.onSuccess(s(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(e){null!==r[e]&&t.setRequestHeader(e,r[e])})),t.send(n),{abort:function(){t.abort()}}}var c=+new Date,u=0;function h(){return"rc-upload-"+c+"-"+ ++u}var d=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",a=i.replace(/\/.*$/,"");return n.some((function(e){var t,n,o=e.trim();return"."===o.charAt(0)?(t=r.toLowerCase(),n=o.toLowerCase(),-1!==t.indexOf(n,t.length-n.length)):/\/\*$/.test(o)?a===o.replace(/\/.*$/,""):i===o}))}return!0};var f=function(e,t,n){var r=function e(r,i){i=i||"",r.isFile?r.file((function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))})):r.isDirectory&&function(e,t){var n=e.createReader(),r=[];!function e(){n.readEntries((function(n){var i=Array.prototype.slice.apply(n);r=r.concat(i),!i.length?t(r):e()}))}()}(r,(function(t){t.forEach((function(t){e(t,""+i+r.name+"/")}))}))};e.forEach((function(e){r(e.webkitGetAsEntry())}))},p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),w=o()((v(e={},a,!0),v(e,a+"-disabled",l),v(e,s,s),e)),C=l?{}:{onClick:g?this.onClick:function(){},onKeyDown:g?this.onKeyDown:function(){},onMouseEnter:y,onMouseLeave:b,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return i.a.createElement(r,p({},C,{className:w,role:"button",style:u}),i.a.createElement("input",p({},(t=x,Object.keys(t).reduce((function(e,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(e[n]=t[n]),e}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:d,directory:m?"directory":null,webkitdirectory:m?"webkitdirectory":null,multiple:h,onChange:this.onChange})),f)}}]),t}(r.Component),w=Object.assign||function(e){for(var t=1;t0?o-4:o;for(n=0;n>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=0,s=n-i;os?s:o+16383));1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,a,o=[],s=t;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},HDXh: +/*!*********************************************************************!*\ + !*** ./node_modules/node-libs-browser/node_modules/buffer/index.js ***! + \*********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";(function(e){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +var r=n(/*! base64-js */"H7XF"),i=n(/*! ieee754 */"kVK+"),a=n(/*! isarray */"49sm");function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(r)return H(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return L(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(a=n;as&&(n=s-l),a=n;a>=0;a--){for(var h=!0,d=0;di&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function O(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,i),u=e.slice(t,n),h=0;hi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return C(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function I(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function j(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,a){return a||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,a){return a||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],i=1,a=0;++a=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(/*! ./../../../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},HmJG: +/*!****************************************************************!*\ + !*** ./src/components/markdown-editor/upload-image/index.less ***! + \****************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},I8Z2: +/*!**********************************************************!*\ + !*** ./node_modules/mini-store/esm/index.js + 3 modules ***! + \**********************************************************/ +/*! exports provided: Provider, connect, create */ +/*! exports used: Provider, connect, create */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.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/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return v}));var r,i=n("q1tI"),a=(r=function(e,t){return(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=i.createContext(null),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return i.createElement(o.Provider,{value:this.props.store},this.props.children)},t}(i.Component),l=n("Gytx"),c=n.n(l),u=n("2mql"),h=n.n(u),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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return i&&(s?o?u.unshift(s):u.push(s):this.defaultLoader&&(o?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),a.default.createElement(r,c,u)}}]),t}(i.Component);l.propTypes={children:o.default.node.isRequired,element:o.default.node,hasMore:o.default.bool,initialLoad:o.default.bool,isReverse:o.default.bool,loader:o.default.node,loadMore:o.default.func.isRequired,pageStart:o.default.number,ref:o.default.func,getScrollParent:o.default.func,threshold:o.default.number,useCapture:o.default.bool,useWindow:o.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},LdHM: +/*!********************************************************!*\ + !*** ./node_modules/rc-select/es/index.js + 6 modules ***! + \********************************************************/ +/*! exports provided: Option, OptGroup, default */ +/*! exports used: OptGroup, Option, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.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-select/es/TransBtn.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/pickAttrs.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/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";n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return E}));var r=n("1OyB"),i=n("vuIU"),a=n("Ji7U"),o=n("LK+K"),s=n("q1tI"),l=n("rePB"),c=n("Ff2n"),u=n("ODXe"),h=n("4IlW"),d=n("bX4T"),f=n("YrtM"),p=n("TSYQ"),m=n.n(p),g=n("+nKL"),v=n("8OUc"),y=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,i=e.flattenOptions,a=e.childrenAsData,o=e.values,p=e.searchValue,y=e.multiple,b=e.defaultActiveFirstOption,x=e.height,w=e.itemHeight,C=e.notFoundContent,E=e.open,k=e.menuItemSelectedIcon,S=e.virtual,O=e.onSelect,T=e.onToggleOpen,L=e.onActiveValue,_=e.onScroll,A=e.onMouseEnter,D="".concat(n,"-item"),R=Object(f.a)((function(){return i}),[E,i],(function(e,t){return t[0]&&e[1]!==t[1]})),M=s.useRef(null),I=function(e){e.preventDefault()},j=function(e){M.current&&M.current.scrollTo({index:e})},N=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=R.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];return Object(S.a)(e).map((function(e,n){if(!s.isValidElement(e)||!e.type)return null;var r=e.type.isSelectOptGroup,i=e.key,a=e.props,o=a.children,l=Object(c.a)(a,["children"]);return t||!r?O(e):Object(k.a)(Object(k.a)({key:"__RC_SELECT_GRP__".concat(null===i?n:i,"__"),label:i},l),{},{options:T(o)})})).filter((function(e){return e}))}var L=n("2Qr1"),_=n("qNPg"),A=n("U8pU"),D=n("Kwbf"),R=n("WKfj");var M=function(e){var t=e.mode,n=e.options,r=e.children,i=e.backfill,a=e.allowClear,o=e.placeholder,l=e.getInputElement,c=e.showSearch,u=e.onSearch,h=e.defaultOpen,d=e.autoFocus,f=e.labelInValue,p=e.value,m=e.inputValue,g=e.optionLabelProp,v="multiple"===t||"tags"===t,y=void 0!==c?c:v||"combobox"===t,b=n||T(r);if(Object(D.a)("tags"!==t||b.every((function(e){return!e.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===t||"combobox"===t){var x=b.some((function(e){return e.options?e.options.some((function(e){return"number"==typeof("value"in e?e.value:e.key)})):"number"==typeof("value"in e?e.value:e.key)}));Object(D.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(D.a)("combobox"!==t||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(D.a)("combobox"===t||!i,"`backfill` only works with `combobox` mode."),Object(D.a)("combobox"===t||!l,"`getInputElement` only work with `combobox` mode."),Object(D.b)("combobox"!==t||!l||!a||!o,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==t&&"tags"!==t&&Object(D.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(D.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 w=Object(R.d)(p);Object(D.a)(!f||w.every((function(e){return"object"===Object(A.a)(e)&&("key"in e||"value"in e)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(D.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var C=null;Object(S.a)(r).some((function(e){if(!s.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(S.a)(e.props.children).every((function(t){return!(s.isValidElement(t)&&e.type&&!t.type.isSelectOption)||(C=t.type,!1)})):(C=t,!0))})),C&&Object(D.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(C.displayName||C.name||C,"`.")),Object(D.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},I=Object(_.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:T,flattenOptions:L.d,getLabeledValue:L.e,filterOptions:L.b,isValueDisabled:L.g,findValueOption:L.c,warningProps:M,fillOptionsWithMissingValue:L.a}),j=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).selectRef=s.createRef(),e.focus=function(){e.selectRef.current.focus()},e.blur=function(){e.selectRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return s.createElement(I,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);j.Option=w,j.OptGroup=E;var N=j;t.c=N},M8RZ: +/*!**********************************!*\ + !*** ./src/components/modal.tsx ***! + \**********************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! react-dom */"i8i4"),u=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;Object(r.a)(this,n),i=t.call(this,e);var a=window.document;return i.node=a.createElement("div"),a.body.appendChild(i.node),i}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props.children;return Object(c.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(l.a.Component)},Nnv5: +/*!*******************************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/GroupHomework/Detail/components/StudentGrouping/index.less?modules ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___2bJec",flex_space_between:"flex_space_between___2ahJ7",flex_box_vertical_center:"flex_box_vertical_center___2dSx8",flex_box_center_end:"flex_box_center_end___1Vr--",flex_box_column:"flex_box_column___nACsK",wrap:"wrap___2DR4Y",sys:"sys___2U2iV",head:"head___3qxDP",list:"list___uTkEt",name:"name___3QGED",tr:"tr___1zJeC"}},NvD2: +/*!******************************************************!*\ + !*** ./node_modules/rc-tree/es/utils/conductUtil.js ***! + \******************************************************/ +/*! exports provided: isCheckDisabled, conductCheck */ +/*! exports used: conductCheck */function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(/*! rc-util/es/warning */"Kwbf");function i(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function a(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!(!n&&!r)||!1===i}function o(e,t,n,o){var s,l=[];s=o||a;var c=new Set(e.filter((function(e){var t=!!n[e];return t||l.push(e),t}))),u=new Map,h=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,i=u.get(r);i||(i=new Set,u.set(r,i)),i.add(t),h=Math.max(h,r)})),Object(r.a)(!l.length,"Tree missing follow keys: ".concat(l.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),!0===t?function(e,t,n,r){for(var a=new Set(e),o=new Set,s=0;s<=n;s+=1){(t.get(s)||new Set).forEach((function(e){var t=e.key,n=e.node,i=e.children,o=void 0===i?[]:i;a.has(t)&&!r(n)&&o.filter((function(e){return!r(e.node)})).forEach((function(e){a.add(e.key)}))}))}for(var l=new Set,c=n;c>=0;c-=1){(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var i=!0,s=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);i&&!n&&(i=!1),s||!n&&!o.has(t)||(s=!0)})),i&&a.add(t.key),s&&o.add(t.key),l.add(t.key)}}))}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(i(o,a))}}(c,u,h,s):function(e,t,n,r,a){for(var o=new Set(e),s=new Set(t),l=0;l<=r;l+=1){(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,i=void 0===r?[]:r;o.has(t)||s.has(t)||a(n)||i.filter((function(e){return!a(e.node)})).forEach((function(e){o.delete(e.key)}))}))}s=new Set;for(var c=new Set,u=r;u>=0;u-=1){(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!a(n)&&e.parent&&!c.has(e.parent.key))if(a(e.parent.node))c.add(t.key);else{var r=!0,i=!1;(t.children||[]).filter((function(e){return!a(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);r&&!n&&(r=!1),i||!n&&!s.has(t)||(i=!0)})),r||o.delete(t.key),i&&s.add(t.key),c.add(t.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(i(s,o))}}(c,t.halfCheckedKeys,u,h,s)}},OLES: +/*!*********************************************************!*\ + !*** ./node_modules/rc-tooltip/es/index.js + 2 modules ***! + \*********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tooltip/es/placements.js because of ./node_modules/antd/es/tooltip/placements.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/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("U8pU"),i=n("VTBJ"),a=n("Ff2n"),o=n("q1tI"),s=n("uciX"),l=n("7ixt"),c=function(e){var t=e.overlay,n=e.prefixCls,r=e.id,i=e.overlayInnerStyle;return o.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:i},"function"==typeof t?t():t)},u=Object(o.forwardRef)((function(e,t){var n=e.overlayClassName,u=e.trigger,h=void 0===u?["hover"]:u,d=e.mouseEnterDelay,f=void 0===d?0:d,p=e.mouseLeaveDelay,m=void 0===p?.1:p,g=e.overlayStyle,v=e.prefixCls,y=void 0===v?"rc-tooltip":v,b=e.children,x=e.onVisibleChange,w=e.afterVisibleChange,C=e.transitionName,E=e.animation,k=e.placement,S=void 0===k?"right":k,O=e.align,T=void 0===O?{}:O,L=e.destroyTooltipOnHide,_=void 0!==L&&L,A=e.defaultVisible,D=e.getTooltipContainer,R=e.overlayInnerStyle,M=Object(a.a)(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),I=Object(o.useRef)(null);Object(o.useImperativeHandle)(t,(function(){return I.current}));var j=Object(i.a)({},M);"visible"in e&&(j.popupVisible=e.visible);var N=!1,P=!1;if("boolean"==typeof _)N=_;else if(_&&"object"===Object(r.a)(_)){var F=_.keepParent;N=!0===F,P=!1===F}return o.createElement(s.a,Object.assign({popupClassName:n,prefixCls:y,popup:function(){var t=e.arrowContent,n=void 0===t?null:t,r=e.overlay,i=e.id;return[o.createElement("div",{className:"".concat(y,"-arrow"),key:"arrow"},n),o.createElement(c,{key:"content",prefixCls:y,id:i,overlay:r,overlayInnerStyle:R})]},action:h,builtinPlacements:l.a,popupPlacement:S,ref:I,popupAlign:T,getPopupContainer:D,onPopupVisibleChange:x,afterPopupVisibleChange:w,popupTransitionName:C,popupAnimation:E,defaultPopupVisible:A,destroyPopupOnHide:N,autoDestroy:P,mouseLeaveDelay:m,popupStyle:g,mouseEnterDelay:f},j),b)}));t.a=u},OZM5: +/*!*****************************************!*\ + !*** ./node_modules/rc-tree/es/util.js ***! + \*****************************************/ +/*! exports provided: arrDel, arrAdd, posToArr, getPosition, isTreeNode, getDragNodesKeys, calcDropPosition, calcSelectedKeys, convertDataToTree, parseCheckedKeys, conductExpandParent, getDataAndAria */ +/*! exports used: arrAdd, arrDel, calcDropPosition, calcSelectedKeys, conductExpandParent, getDataAndAria, getDragNodesKeys, getPosition, isTreeNode, parseCheckedKeys, posToArr */function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"k",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"g",(function(){return h})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return f})),n.d(t,"j",(function(){return p})),n.d(t,"e",(function(){return m})),n.d(t,"f",(function(){return g}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),a=(n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),n(/*! react */"q1tI"),n(/*! rc-util/es/warning */"Kwbf"));n(/*! ./TreeNode */"WaYH");function o(e,t){var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function s(e,t){var n=e.slice();return-1===n.indexOf(t)&&n.push(t),n}function l(e){return e.split("-")}function c(e,t){return"".concat(e,"-").concat(t)}function u(e){return e&&e.type&&e.type.isTreeNode}function h(e,t){var n=[e];return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var r=t.key,i=t.children;n.push(r),e(i)}))}(t[e].children),n}function d(e,t){var n=e.clientY,r=t.selectHandle.getBoundingClientRect(),i=r.top,a=r.bottom,o=r.height,s=Math.max(.25*o,2);return n<=i+s?-1:n>=a-s?1:0}function f(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function p(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==Object(i.a)(e))return Object(a.a)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function m(e,t){var n=new Set;return(e||[]).forEach((function(e){!function e(r){if(!n.has(r)){var i=t[r];if(i){n.add(r);var a=i.parent;i.node.disabled||a&&e(a.key)}}}(e)})),Object(r.a)(n)}function g(e){var t={};return Object.keys(e).forEach((function(n){(n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n])})),t}},Ot1p: +/*!**************************************************************!*\ + !*** ./src/components/markdown-editor/index.tsx + 6 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./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/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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/RenderHtml/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ +/*! 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/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ +/*! 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(e,t,n){"use strict";n("2qtc");var r=n("kLXV"),i=n("rAM+"),a=(n("miYZ"),n("tsqr")),o=n("9og8"),s=n("tJVT"),l=n("jrin"),c=n("WmNS"),u=n.n(c),h=n("q1tI"),d=n.n(h),f=n("VrN/"),p=n.n(f),m=n("bdgK"),g=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),v=function(e){var t=e.value,n=void 0===t?"":t,r=(e.className,e.showTextOnly,e.showLines,e.style,Object(h.useMemo)((function(){return""}),[n]));return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},y=n("0Owb"),b=(n("dejd"),n("C+DQ"),n("1vsH")),x=n("m3rI"),w=[{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(e){var t=e.onActionCallback,n=e.title,r=e.icon,i=e.actionName,a=e.className,o=void 0===a?"":a,s=e.children;return d.a.createElement("a",{title:n,className:o,onClick:function(){t(i)}},d.a.createElement("i",{className:"md-iconfont ".concat(r)}),s)}var E=function(e){var t=e.watch,n=e.showNullButton,r=e.onActionCallback,i=e.fullScreen,a=e.insertTemp,o=e.hidetoolBar,s=e.uuid;e.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(s,"&api=").concat(encodeURIComponent(x.a.PROXY_SERVER)));var l=[].concat(w,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!o&&l.map((function(e,t){return d.a.createElement("li",{key:t},e.actionName?d.a.createElement(C,Object(y.a)({},e,{onActionCallback:r})):d.a.createElement("span",{className:"v-line"}))})),n?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,a&&d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(C,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},k=n("M8RZ"),S=(n("+L6B"),n("2/Rp")),O=(n("y8nQ"),n("Vl3Y")),T=(n("5NDa"),n("5rEg")),L={labelCol:{span:4},wrapperCol:{span:20}},_=function(e){var t=e.callback,n=e.onCancel;return d.a.createElement(O.a,Object(y.a)({},L,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)}}),d.a.createElement(O.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(T.a,null)),d.a.createElement(O.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(T.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(S.a,{type:"ghost",onClick:n},"取消")))},A=n("7ahc"),D=n("k1fw"),R=(n("HmJG"),n("BjJ7")),M=O.a.useForm,I={width:280,marginRight:10},j={labelCol:{span:5},wrapperCol:{span:19}},N=function(e){var t=e.callback,n=e.onCancel,r=M(),i=Object(s.a)(r,1)[0],a=Object(h.useRef)();function o(e,t){i.setFieldsValue({src:"/api/attachments/".concat(e.id,"?type=").concat(e.content_type),type:t.type})}return d.a.createElement(O.a,Object(y.a)({form:i},j,{className:"upload-image-panel",onFinish:function(e){t(Object(D.a)(Object(D.a)({},e),{},{name:a.current}))}}),d.a.createElement(O.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(O.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(T.a,{style:I})),d.a.createElement(P,{onFileChange:function(e){var t=e.target.files[0];a.current=t.name,F(t,o)}}))),d.a.createElement(O.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(T.a,{style:{width:264}})),d.a.createElement(O.a.Item,{style:{textAlign:"right"}},d.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(S.a,{type:"ghost",onClick:n},"取消")))};function P(e){var t=e.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:t}))}function F(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),r.addEventListener("error",(function(e){console.error(e)}),!1),r.open("POST","".concat(R.a,"/api/attachments.json")),r.send(n)}n("giR+");var B,H,U=n("fyUT"),z=(n("7Kak"),n("9yH6")),V=z.a.Group,W={margin:"0 8px"},G=function(e){var t=e.callback,n=e.onCancel;return d.a.createElement(O.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)}},d.a.createElement("div",{className:"flex-container"},d.a.createElement("span",{style:W},"单元格数:"),d.a.createElement("span",{style:W},"行数"),d.a.createElement(O.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(U.a,null)),d.a.createElement("span",{style:W},"列数"),d.a.createElement(O.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(U.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:W},"对齐方式:"),d.a.createElement(O.a.Item,{name:"align"},d.a.createElement(V,null,d.a.createElement(z.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(z.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(z.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(z.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(S.a,{type:"ghost",onClick:n},"取消")))},K=n("ErOA"),Y=n("7Cbv"),q="------------",X={default:q,left:":".concat(q),center:":".concat(q,":"),right:"".concat(q,":")},$=n("9VGf");function J(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var Q=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Z=["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"],ee=(B={},Object(l.a)(B,Q+"-B","bold"),Object(l.a)(B,Q+"-I","italic"),B),te=(H={},Object(l.a)(H,"link","添加链接"),Object(l.a)(H,"code-block","添加代码块"),Object(l.a)(H,"upload-image","添加文件"),Object(l.a)(H,"add-table","添加表格"),H);t.a=function(e){var t=e.defaultValue,n=void 0===t?"":t,c=e.onChange,f=e.width,y=void 0===f?"100%":f,b=e.height,w=void 0===b?400:b,C=e.miniToolbar,S=void 0!==C&&C,O=e.isFocus,T=void 0!==O&&O,L=e.watch,D=e.insertTemp,R=e.mode,M=void 0===R?"markdown":R,I=e.id,j=void 0===I?"markdown-editor-id":I,P=e.showResizeBar,B=void 0!==P&&P,H=e.noStorage,U=void 0!==H&&H,z=e.showNullButton,V=void 0!==z&&z,W=e.hidetoolBar,q=void 0!==W&&W,Q=e.fullScreen,ne=void 0!==Q&&Q,re=e.onBlur,ie=e.onCMBeforeChange,ae=e.onFullScreen,oe=e.className,se=void 0===oe?"":oe,le=e.disablePaste,ce=void 0!==le&&le,ue=e.placeholder,he=void 0===ue?"":ue,de=e.values,fe=void 0===de?"":de,pe=Object(h.useState)(null),me=Object(s.a)(pe,2),ge=me[0],ve=me[1],ye=Object(h.useState)(n),be=Object(s.a)(ye,2),xe=be[0],we=be[1],Ce=Object(h.useState)(L),Ee=Object(s.a)(Ce,2),ke=Ee[0],Se=Ee[1],Oe=Object(h.useState)(ne),Te=Object(s.a)(Oe,2),Le=Te[0],_e=Te[1],Ae=Object(h.useState)(""),De=Object(s.a)(Ae,2),Re=De[0],Me=De[1],Ie=Object(h.useState)(0),je=Object(s.a)(Ie,2),Ne=je[0],Pe=je[1],Fe=Object(h.useState)(w),Be=Object(s.a)(Fe,2),He=Be[0],Ue=Be[1],ze=Object(h.useState)(!1),Ve=Object(s.a)(ze,2),We=(Ve[0],Ve[1]),Ge=Object(h.useRef)(Object(Y.a)()),Ke=Object(h.useRef)(!1),Ye=Object(h.useRef)(),qe=Object(h.useRef)(),Xe=Object(h.useRef)(),$e=Object(h.useRef)(),Je=Object(h.useRef)(),Qe=function(){var e=Object(o.a)(u.a.mark((function e(){var t,n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(K.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Ge.current}});case 2:null!=(n=e.sent)&&null!==(t=n.attachments)&&void 0!==t&&t.length&&(console.log("cm:",ge,qe),n.attachments.map((function(e){e.content_type.indexOf("image")>-1?ge.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):e.content_type.indexOf("video")>-1?ge.replaceSelection('')):e.content_type.indexOf("pdf")>-1?ge.replaceSelection('
        ').concat(e.name,"")):ge.replaceSelection("[".concat(e.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")"))})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(h.useEffect)((function(){we(fe),null==ge||ge.setValue(fe)}),[fe]),Object(h.useEffect)((function(){null==ae||ae(Le)}),[Le]),Object(h.useEffect)((function(){if(qe.current){var e=p.a.fromTextArea(qe.current,{mode:M,lineNumbers:!S,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function t(t,n){if(!ce){var r=n.clipboardData;if(r){var i=r.types.toString(),o=r.items;if("Files"===i||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==M)return;try{var s,l=o[1];"file"===(null===(s=o[0])||void 0===s?void 0:s.kind)&&(l=o[0]);var c=l.getAsFile(),u=c.name.split(".").pop();F(c,(function(t){var n,r,i;t.id?(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?e.replaceSelection('')):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?e.replaceSelection('').concat(c.name,"")):Z.includes(u)?e.replaceSelection('').concat(c.name,"")):e.replaceSelection("[".concat(c.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))}catch(n){a.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return T&&e.focus(),e.on("paste",t),e.on("dragleave",(function(e,t){Xe.current.classList.remove("mouse-hover-md")})),e.on("dragover",(function(e,t){Xe.current.classList.add("mouse-hover-md")})),e.on("drop",(function(t,n){var r;if(Xe.current.classList.add("mouse-hover-md"),(r=n.dataTransfer.files).length>0){n.preventDefault(),n.stopPropagation();for(var i=function(t){var n=r[t],i=n.name.split(".").pop();F(n,(function(t){var r,a,o;t.id?(null==n||null===(r=n.type)||void 0===r?void 0:r.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==n||null===(a=n.type)||void 0===a?void 0:a.indexOf("video"))>-1?e.replaceSelection('')):(null==n||null===(o=n.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?e.replaceSelection('').concat(n.name,"")):Z.includes(i)?e.replaceSelection('').concat(n.name,"")):e.replaceSelection("[".concat(n.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))},a=0;a0||r.target.offsetWidth>0)&&(Ze(),ge.setSize("100%","100%"),ge.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(qe.current.parentElement),e}();return function(){e.unobserve(qe.current.parentElement)}}}),[ge,Ze]),Object(h.useEffect)((function(){if(ge){for(var e=[],t=function(){var t=r[n],i=(a=Object(s.a)(t,2))[0],o=a[1],c=Object(l.a)({},i,(function(){et(o)}));e.push(c),ge.addKeyMap(c)},n=0,r=Object.entries(ee);n0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(j);e>=Ne+1e4&&(!t||t!==xe)&&(window.sessionStorage.setItem(j,xe),We(!0))}}),1e4),Object(h.useEffect)((function(){Se(L)}),[ge,L]),Object(h.useEffect)((function(){ge&&T&&ge.focus()}),[ge,T]),Object(h.useEffect)((function(){if(ke&&ge){var e=ge.getScrollerElement();function t(e){var t=e.target;if(Je.current){var n=t.scrollTop/t.scrollHeight;Je.current.scrollTop=Je.current.scrollHeight*n}}return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[ge,ke]),Object(h.useEffect)((function(){if(ge&&ie){function e(e,t){ie(e,t)}return ge.on("beforeChange",e),function(){ge.off("beforeChange",e)}}}),[ge,ie]),Object(h.useEffect)((function(){if(ge&&re){function e(){re(ge.getValue())}return ge.on("blur",e),function(){ge.off("blur",e)}}}),[ge,re]),Object(h.useEffect)((function(){if(ge){function e(e){var t=e.getValue();we(t),Pe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(t)}return ge.on("change",e),function(){ge.off("change",e)}}}),[ge,c]),Object(h.useEffect)((function(){ge&&(null==n?(ge.setValue(""),we("")):n!==ge.getValue()&&(ge.setValue(n),we(n),ge.setCursor(ge.lineCount(),0)))}),[ge,n]);var et=Object(h.useCallback)((function(e){var t=ge.getCursor(),n=ge.getSelection(),r=n.split("\n");switch(e){case"bold":return ge.replaceSelection("**"+n+"**"),""===n&&ge.setCursor(t.line,t.ch+2),ge.focus();case"italic":return ge.replaceSelection("*"+n+"*"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"code":return ge.replaceSelection("`"+n+"`"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"inline-latex":return ge.replaceSelection("`$$"+n+"$$`"),""===n&&ge.setCursor(t.line,t.ch+3),ge.focus();case"latex":return ge.replaceSelection("```latex\n"+n+"\n```"),ge.setCursor(t.line+1,n.length+1),ge.focus();case"line-break":return ge.replaceSelection("
        \n"),ge.focus();case"list-ul":return""===n?ge.replaceSelection("- "+n):ge.replaceSelection(r.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),ge.focus();case"list-ol":return""===n?ge.replaceSelection("1. "+n):ge.replaceSelection(r.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),ge.focus();case"add-null-ch":return""===n&&ge.setCursor(t.line,t.ch+1),ge.replaceSelection("▁"),ge.focus();case"inster-template-1":return""===n&&ge.setCursor(t.line,t.ch),ge.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),ge.focus();case"eraser":return ge.setValue(""),ge.focus();case"trigger-watch":return Se(!ke),ge.focus();case"trigger-full-screen":return _e(!Le),ge.focus();case"link":return void Me("link");case"code-block":return void Me("code-block");case"upload-image":return void Me("upload-image");case"add-table":return void Me("add-table");default:throw new Error}}),[ge,ke,Le]),tt=Object(h.useCallback)((function(e){switch(Me(""),Re){case"link":var t=e.title,n=e.link;return ge.replaceSelection("[".concat(t,"](").concat(n,")")),ge.focus();case"code-block":var r=e.language,i=e.content;return ge.replaceSelection(["```"+r,i,"```"].join("\n")),ge.focus();case"upload-image":var a=e.src,o=e.alt,s=e.name;return a.indexOf("type=image")>-1?ge.replaceSelection("![ ".concat(o||""," ]( ").concat(a,' "').concat(o||"",'" )')):a.indexOf("type=application/pdf")>-1?ge.replaceSelection('').concat(s,"")):ge.replaceSelection('').concat(s,"")),ge.focus();case"add-table":for(var l=e.row,c=e.col,u=e.align,h="\n",d=0;d300&&(r=300),Ue(w+r+"px")}}return e.addEventListener("mousedown",r),document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),function(){e.removeEventListener("mousedown",r),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i)}}}),[ge,$e]),Object(h.useEffect)((function(){Ue(w)}),[w]);var it={width:J(y),height:J(He)};Object(h.useMemo)((function(){if(Ne){var e=new Date(Ne),t=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(r)}return 0}),[Ne]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Xe},d.a.createElement("div",{className:"markdown-editor-container ".concat(se," ").concat(ke?"on-preview":""," ").concat(S?"mini":""," ").concat(Le?"full-screen":""),style:it},d.a.createElement(E,{insertTemp:D,watch:ke,fullScreen:Le,showNullButton:V,onActionCallback:et,hidetoolBar:q,uuid:Ge.current,setOpenPhones:function(){Ke.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:qe,placeholder:he})),ke?d.a.createElement("div",{ref:Je,className:"preview-container"},"stex"===M&&d.a.createElement(v,{value:xe}),"stex"!==M&&d.a.createElement(g.a,{edit:!0,value:xe,replaces:function(e,t){var n=ge.getValue();n=n.replace(e,t),we(n),null==ge||ge.setValue(n)}})):null))),B?d.a.createElement("a",{ref:$e,className:"editor-resize"}):null,d.a.createElement(k.a,null,te[Re]?d.a.createElement(r.a,{centered:!0,title:te[Re],visible:!0,onCancel:rt,footer:null},nt):null))}},RotF: +/*!*******************************************************!*\ + !*** ./node_modules/react-infinite-scroller/index.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n(/*! ./dist/InfiniteScroll */"LSTS")},"SA+Z": +/*!********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/toArray.js ***! + \********************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./arrayWithHoles.js */"wTVA"),i=n(/*! ./iterableToArray.js */"EbDI"),a=n(/*! ./unsupportedIterableToArray.js */"ZhPi"),o=n(/*! ./nonIterableRest.js */"wkBT");e.exports=function(e){return r(e)||i(e)||a(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},SJMd: +/*!****************************************************!*\ + !*** ./node_modules/code-prettify/src/prettify.js ***! + \****************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var e=window,t=["break,continue,do,else,for,if,return,while"],n=[[t,"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=[n,"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"],i=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[n,"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=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",l=[t,"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=[t,"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=[t,"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(e,t,n,r,i){if(n){var a={sourceNode:e,pre:1,langExtension:null,numberLines:null,sourceCode:n,spans:null,basePos:t,decorations:null};r(a),i.push.apply(i,a.decorations)}}var f=/\S/;function p(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling){var r=n.nodeType;t=1===r?t?e:n:3===r&&f.test(n.nodeValue)?e:t}return t===e?void 0:t}function m(e,t){var n,r={};!function(){for(var i=e.concat(t),a=[],o={},s=0,l=i.length;s=0;)r[u.charAt(h)]=c;var d=c[1],f=""+d;o.hasOwnProperty(f)||(a.push(d),o[f]=null)}a.push(/[\0-\uffff]/),n=function(e){for(var t=0,n=!1,r=!1,i=0,a=e.length;i122||(u<65||h>90||n.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||n.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}n.sort((function(e,t){return e[0]-t[0]||t[1]-e[1]}));var d=[],f=[];for(a=0;ap[0]&&(p[1]+1>p[0]&&i.push("-"),i.push(l(p[1])))}return i.push("]"),i.join("")}function u(e){for(var r=e.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")),i=r.length,a=[],o=0,s=0;o=2&&"["===d?r[o]=c(h):"\\"!==d&&(r[o]=h.replace(/[a-zA-Z]/g,(function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"})))}return r.join("")}var h=[];for(i=0,a=e.length;i=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(g=!1,y="src"),g||(f[v]=y)}var E=u;if(u+=v.length,g){var k=b[1],S=v.indexOf(k),O=S+k.length;b[2]&&(S=(O=v.length-b[2].length)-k.length);var T=y.substring(5);d(l,s+E,v.substring(0,S),a,c),d(l,s+E+S,k,w(T,k),c),d(l,s+E+O,v.substring(O),a,c)}else c.push(s+E,y)}e.decorations=c};return a}function g(e){var t=[],n=[];e.tripleQuotedStrings?t.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=e.hashComments;r&&(e.cStyleComments?(r>1?t.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push(["com",/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var i=e.regexLiterals;if(i){var a=i>1?"":"\n\r",o=a?".":"[\\S\\s]",s="/(?=[^/*"+a+"])(?:[^/\\x5B\\x5C"+a+"]|\\x5C"+o+"|\\x5B(?:[^\\x5C\\x5D"+a+"]|\\x5C"+o+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+s+")")])}var l=e.types;l&&n.push(["typ",l]);var c=(""+e.keywords).replace(/^ | $/g,"");c.length&&n.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return e.regexLiterals&&(u+="(?!s*/)"),n.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]),m(t,n)}var v=g({keywords:[r,a,i,o,s,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(e,t,n){for(var r=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,a=e.ownerDocument,o=a.createElement("li");e.firstChild;)o.appendChild(e.firstChild);var s=[o];function l(e){var t=e.nodeType;if(1!=t||r.test(e.className)){if((3==t||4==t)&&n){var o=e.nodeValue,s=o.match(i);if(s){var u=o.substring(0,s.index);e.nodeValue=u;var h=o.substring(s.index+s[0].length);if(h)e.parentNode.insertBefore(a.createTextNode(h),e.nextSibling);c(e),u||e.parentNode.removeChild(e)}}}else if("br"===e.nodeName)c(e),e.parentNode&&e.parentNode.removeChild(e);else for(var d=e.firstChild;d;d=d.nextSibling)l(d)}function c(e){for(;!e.nextSibling;)if(!(e=e.parentNode))return;for(var t,n=function e(t,n){var r=n?t.cloneNode(!1):t,i=t.parentNode;if(i){var a=e(i,1),o=t.nextSibling;a.appendChild(r);for(var s=o;s;s=o)o=s.nextSibling,a.appendChild(s)}return r}(e.nextSibling,0);(t=n.parentNode)&&1===t.nodeType;)n=t;s.push(n)}for(var u=0;u=0;){var i=n[r];b.hasOwnProperty(i)?e.console&&console.warn("cannot override language handler %s",i):b[i]=t}}function w(e,t){return e&&b.hasOwnProperty(e)||(e=/^\s*=x&&(u+=2),s>=w&&(f+=2)}}finally{v&&(v.style.display=y)}}(t)}catch(t){e.console&&console.log(t&&t.stack||t)}}function E(e,t,n){var r=n||!1,i=t||null,a=document.createElement("div");return a.innerHTML="
        "+e+"
        ",a=a.firstChild,r&&y(a,r,!0),C({langExtension:i,numberLines:r,sourceNode:a,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),a.innerHTML}function k(t,n){var r=n||document.body,i=r.ownerDocument||document;function a(e){return r.getElementsByTagName(e)}for(var o=[a("pre"),a("code"),a("xmp")],s=[],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(m([["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(m([],[["atv",/^[\s\S]+/]]),["uq.val"]),x(g({keywords:r,hashComments:!0,cStyleComments:!0,types:h}),["c","cc","cpp","cxx","cyc","m"]),x(g({keywords:"null,true,false"}),["json"]),x(g({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:h}),["cs"]),x(g({keywords:i,cStyleComments:!0}),["java"]),x(g({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(g({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(g({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(g({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(g({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),x(g({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(m([],[["str",/^[\s\S]+/]]),["regex"]);var S=e.PR={createSimpleLexer:m,registerLangHandler:x,sourceDecorator:g,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:E,prettyPrint:k},O=e.define;"function"==typeof O&&O.amd&&O("google-code-prettify",[],(function(){return S}))}()},"VrN/": +/*!***************************************************!*\ + !*** ./node_modules/codemirror/lib/codemirror.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),l=!a&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!a&&/Chrome\//.test(e),h=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),m=!a&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),w=h&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var C=y&&(c||h&&(null==w||w<12.11)),E=n||o&&s>=9;function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,O=function(e,t){var n=e.className,r=k(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function L(e,t){return T(e).appendChild(t)}function _(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a=t)return o+(t-a);o+=s-a,o+=n-o%n,a=s+1}}m?j=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(j=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=N(this.onTimeout,this)};function H(e,t){for(var n=0;n=t)return r+Math.min(o,t-i);if(i+=a-r,r=a+1,(i+=n-i%n)>=t)return r}}var K=[""];function Y(e){for(;K.length<=e;)K.push(q(K)+" ");return K[e]}function q(e){return e[e.length-1]}function X(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Q.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Z(e))||t.test(e):Z(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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 re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}var oe=null;function se(e,t,n){var r;oe=null;for(var i=0;it)return i;a.to==t&&(a.from!=a.to&&"before"==n?r=i:oe=i),a.from==t&&(a.from!=a.to&&"before"!=n?r=i:oe=i)}return null!=r?r:oe}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function a(e,t,n){this.level=e,this.from=t,this.to=n}return function(o,s){var l="ltr"==s?"L":"R";if(0==o.length||"ltr"==s&&!e.test(o))return!1;for(var c,u=o.length,h=[],d=0;d-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function pe(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function ye(e){e.prototype.on=function(e,t){he(this,e,t)},e.prototype.off=function(e,t){fe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ce(e){be(e),xe(e)}function Ee(e){return e.target||e.srcElement}function ke(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Se,Oe,Te=function(){if(o&&s<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}();function Le(e){if(null==Se){var t=_("span","​");L(e,_("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=Se?_("span","​"):_("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function _e(e){if(null!=Oe)return Oe;var t=L(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(Oe=r.right-n.right<3)}var Ae,De=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var a=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),o=a.indexOf("\r");-1!=o?(n.push(a.slice(0,o)),t+=o+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Me="oncopy"in(Ae=_("div"))||(Ae.setAttribute("oncopy","return;"),"function"==typeof Ae.oncopy),Ie=null,je={},Ne={};function Pe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function Fe(e){if("string"==typeof e&&Ne.hasOwnProperty(e))e=Ne[e];else if(e&&"string"==typeof e.name&&Ne.hasOwnProperty(e.name)){var t=Ne[e.name];"string"==typeof t&&(t={name:t}),(e=J(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Fe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Fe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=Fe(t);var n=je[t.name];if(!n)return Be(e,"text/plain");var r=n(e,t);if(He.hasOwnProperty(t.name)){var i=He[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var He={};function Ue(e,t){P(t,He.hasOwnProperty(e)?He[e]:He[e]={})}function ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ve(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function We(e,t,n){return!e.startState||e.startState(t,n)}var Ge=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ke(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t=e.first&&tn?et(n,Ke(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ke(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r=this.string.length},Ge.prototype.sol=function(){return this.pos==this.lineStart},Ge.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ge.prototype.next=function(){if(this.post},Ge.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ge.prototype.skipToEnd=function(){this.pos=this.string.length},Ge.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ge.prototype.backUp=function(e){this.pos-=e},Ge.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ge.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ge.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ge.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ge.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ht(e,t,n,r){var i=[e.state.modeGen],a={};xt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),a,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,xt(e,t.text,s.mode,n,(function(e,t){for(var n=l;ce&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&ze(e.doc.mode,r.state),a=ht(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ft(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ut(r,!0,t);var a=function(e,t,n){for(var r,i,a=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var l=Ke(a,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=a.modeFrontier))return s;var u=F(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),o=a>r.first&&Ke(r,a-1).stateAfter,s=o?ut.fromSaved(r,o,a):new ut(r,We(r.mode),a);return r.iter(a,t,(function(n){pt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,ze(e.mode,t.state),n,t.lookAhead):new ut(e,ze(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,a,o=e.doc,s=o.mode,l=Ke(o,(t=st(o,t)).line),c=ft(e,t.line,n),u=new Ge(l.text,e.options.tabSize,c);for(r&&(a=[]);(r||u.pose.options.maxHighlightLength?(s=!1,o&&pt(e,t,r,h.pos),h.pos=t.length,l=null):l=bt(gt(n,h,r.state,d),a),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c=t:a.to>t);(r||(r=[])).push(new Et(o,a.from,s?null:a.to))}}return r}(n,i,o),l=function(e,t,n){var r;if(e)for(var i=0;i=t:a.to>t)||a.from==t&&"bookmark"==o.type&&(!n||a.marker.insertLeft)){var s=null==a.from||(o.inclusiveLeft?a.from<=t:a.from0&&s)for(var b=0;bt)&&(!n||Rt(n,a.marker)<0)&&(n=a.marker)}return n}function Pt(e,t,n,r,i){var a=Ke(e,t),o=Ct&&a.markedSpans;if(o)for(var s=0;s=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Ft(e){for(var t;t=It(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var n=Ke(e,t),r=Ft(n);return n==r?t:$e(r)}function Ht(e,t){if(t>e.lastLine())return t;var n,r=Ke(e,t);if(!Ut(e,r))return t;for(;n=jt(r);)r=n.find(1,!0).line;return $e(r)+1}function Ut(e,t){var n=Ct&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Kt=function(e,t,n){this.text=e,_t(this,t),this.height=n?n(this):1};function Yt(e){e.parent=null,Lt(e)}Kt.prototype.lineNo=function(){return $e(this)},ye(Kt);var qt={},Xt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Xt:qt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Jt(e,t){var n=A("span",null,null,l?"padding-right: .1px":null),r={pre:A("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=Zt,_e(e.display.measure)&&(o=ce(a,e.doc.direction))&&(r.addToken=en(r.addToken,o)),r.map=[],nn(a,r,dt(e,a,t!=e.display.externalMeasured&&$e(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=I(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=I(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Le(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=I(r.pre.className,r.textClass||"")),r}function Qt(e){var t=_("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,n,r,i,a,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&h.from<=c);d++);if(h.to>=u)return e(n,r,i,a,o,s,l);e(n,r.slice(0,h.to-c),i,a,null,s,l),a=null,r=r.slice(h.to-c),c=h.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(r)for(var o,s,l,c,u,h,d,f=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=u=s="",d=null,h=null,v=1/0;for(var y=[],b=void 0,x=0;xp||C.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,c=""),C.className&&(l+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&w.from==p&&(u+=" "+C.startStyle),C.endStyle&&w.to==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var E in C.attributes)(d||(d={}))[E]=C.attributes[E];C.collapsed&&(!h||Rt(h.marker,C)<0)&&(h=w)}else w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var O=Math.min(f,v);;){if(g){var T=p+g.length;if(!h){var L=T>O?g.slice(0,O-p):g;t.addToken(t,L,o?o+l:l,u,p+L.length==v?c:"",s,d)}if(T>=O){g=g.slice(O-p),p=O;break}p=T,u=""}g=i.slice(a,a=n[m++]),o=$t(n[m++],t.cm.options)}}else for(var _=1;_n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function An(e,t,n,r){return Mn(e,Rn(e,t),n,r)}function Dn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&a.push((l.bottom+c.top)/2-n.top)}}a.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(a=function(e,t,n,r){var i,a=Nn(t.map,n,r),l=a.node,c=a.start,u=a.end,h=a.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&re(t.line.text.charAt(a.coverStart+c));)--c;for(;a.coverStart+u1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var f;c>0&&(h=r="right"),i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+ir(e.display),top:p.top,bottom:p.bottom}:jn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;bt)&&(i=(a=l-s)-1,t>=l&&(o="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],o="left";if("right"==n&&i==l-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function Fn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return o("before"==c?l-1:l,"before"==c);function u(e,t,n){return o(n?e-1:e,1==s[t].level!=n)}var h=se(s,l,c),d=oe,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function qn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ke(e.doc,t.line),i=Vt(r)+En(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Xn(e,t,n,r,i){var a=et(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function $n(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Xn(r.first,0,null,-1,-1);var i=Je(r,n),a=r.first+r.size-1;if(i>a)return Xn(r.first+r.size-1,Ke(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=Ke(r,i);;){var s=er(e,o,i,t,n),l=Nt(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;o=Ke(r,i=c.line)}}function Jn(e,t,n,r){r-=Vn(t);var i=t.text.length,a=ae((function(t){return Mn(e,n,t-1).bottom<=r}),i,0);return{begin:a,end:i=ae((function(t){return Mn(e,n,t).top>r}),a,i)}}function Qn(e,t,n,r){return n||(n=Rn(e,t)),Jn(e,t,n,Wn(e,t,Mn(e,n,r),"line").top)}function Zn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Vt(t);var a=Rn(e,t),o=Vn(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var h=(e.options.lineWrapping?nr:tr)(e,t,n,a,u,r,i);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,m=null,g=ae((function(t){var n=Mn(e,a,t);return n.top+=o,n.bottom+=o,!!Zn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left=x.bottom?1:0}return Xn(n,g=ie(t.text,g,1),f,v,r-d)}function tr(e,t,n,r,i,a,o){var s=ae((function(s){var l=i[s],c=1!=l.level;return Zn(Yn(e,et(n,c?l.to:l.from,c?"before":"after"),"line",t,r),a,o,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Yn(e,et(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Zn(u,a,o,!0)&&u.top>o&&(l=i[s-1])}return l}function nr(e,t,n,r,i,a,o){var s=Jn(e,t,r,o),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=Mn(e,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,m=pm)&&(u=f,h=m)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==In){In=_("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)In.appendChild(document.createTextNode("x")),In.appendChild(_("br"));In.appendChild(document.createTextNode("x"))}L(e.measure,In);var n=In.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),T(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=_("span","xxxxxxxxxx"),n=_("pre",[t],"CodeMirror-line-like");L(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ar(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:or(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function or(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(Ut(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o0&&(l=Ke(e.doc,c.line).text).length==c.ch){var u=F(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((a-Sn(e.display).left)/ir(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ct&&Bt(e.doc,t)i.viewFrom?fr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)fr(e);else if(t<=i.viewFrom){var a=pr(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):fr(e)}else if(n>=i.viewTo){var o=pr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):fr(e)}else{var s=pr(e,t,t,-1),l=pr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(an(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):fr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var a=r.view[ur(e,t)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==H(o,n)&&o.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,a=ur(e,t),o=e.display.view;if(!Ct||n==e.doc.first+e.doc.size)return{index:a,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(a==o.length-1)return null;i=s+o[a].size-t,a++}else i=s-t;t+=i,n+=i}for(;Bt(e.doc,n)!=n;){if(a==(r<0?0:o.length-1))return null;n+=r*o[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:n}}function mr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().linet||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),1==o.level?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?d:r,(function(e,t,i,h){var g="ltr"==i,v=f(e,g?"left":"right"),y=f(t-1,g?"right":"left"),b=null==n&&0==e,x=null==r&&t==d,w=0==h,C=!m||h==m.length-1;if(y.top-v.top<=3){var E=(c?x:b)&&C,k=(c?b:x)&&w?s:(g?v:y).left,S=E?l:(g?y:v).right;u(k,v.top,S-k,v.bottom)}else{var O,T,L,_;g?(O=c&&b&&w?s:v.left,T=c?l:p(e,i,"before"),L=c?s:p(t,i,"after"),_=c&&x&&C?l:y.right):(O=c?p(e,i,"before"):s,T=!c&&b&&w?l:v.right,L=!c&&x&&C?s:y.left,_=c?p(t,i,"after"):l),u(O,v.top,T-O,v.bottom),v.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Sr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Cr(e){e.state.focused||(e.display.input.focus(),kr(e))}function Er(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Sr(e))}),100)}function kr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(pe(e,"focus",e,t),e.state.focused=!0,M(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),wr(e))}function Sr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,O(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Or(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||d<-.005)&&(Xe(i.line,l),Tr(i.line),i.rest))for(var f=0;fe.display.sizerWidth){var p=Math.ceil(c/ir(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Tr(e){if(e.widgets)for(var t=0;t=o&&(a=Je(t,Vt(Ke(t,l))-e.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function _r(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,a=Ln(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+kn(n),l=t.tops-r;if(t.topi+a){var u=Math.min(t.top,(c?s:t.bottom)-a);u!=i&&(o.scrollTop=u)}var h=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-h,f=Tn(e)-n.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?o.scrollLeft=0:t.leftf+d-3&&(o.scrollLeft=t.right+(p?0:10)-f),o}function Ar(e,t){null!=t&&(Mr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Dr(e){Mr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Rr(e,t,n){null==t&&null==n||Mr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Mr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Ir(e,qn(e,t.from),qn(e,t.to),t.margin))}function Ir(e,t,n,r){var i=_r(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Rr(e,i.scrollLeft,i.scrollTop)}function jr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||li(e,{top:t}),Nr(e,t,!0),n&&li(e),ri(e,100))}function Nr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Pr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,hi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+kn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+On(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Br=function(e,t,n){this.cm=n;var r=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),he(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),he(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Br.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var e=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Br.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Br.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Hr=function(){};function Ur(e,t){t||(t=Fr(e));var n=e.display.barWidth,r=e.display.barHeight;zr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Or(e),zr(e,Fr(e)),n=e.display.barWidth,r=e.display.barHeight}function zr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Hr.prototype.update=function(){return{bottom:0,right:0}},Hr.prototype.setScrollLeft=function(){},Hr.prototype.setScrollTop=function(){},Hr.prototype.clear=function(){};var Vr={native:Br,null:Hr};function Wr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&O(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Vr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),he(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Pr(e,t):jr(e,t)}),e),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)}var Gr=0;function Kr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++Gr},t=e.curOp,on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}function Yr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ai(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Xr(e){e.updatedDisplay=e.mustUpdate&&oi(e.cm,e.update)}function $r(e){var t=e.cm,n=t.display;e.updatedDisplay&&Or(t),e.barMeasure=Fr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=An(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+On(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Tn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Jr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var a=_("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-En(e.display))+"px;\n height: "+(t.bottom-t.top+On(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=Yn(e,t),l=n&&n!=t?Yn(e,n):s,c=_r(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=c.scrollTop&&(jr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(Pr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(o=!0)),!o)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var o=0;o=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ft(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(a){if(r.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?ze(t.mode,r.state):null,l=ht(e,a,r,!0);s&&(r.state=s),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var h=!o||o.length!=a.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&dn)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Zr(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;di(e)&&(fr(e),t.dims=ar(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFromo&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),Ct&&(a=Bt(e.doc,a),o=Ht(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=an(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=an(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n}(e,a,o),n.viewOffset=Vt(Ke(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=mr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=R();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,h=0;h-1&&(f=!1),un(e,d,u,n)),f&&(T(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Ze(e.options,u)))),o=d.node.nextSibling}else{var p=vn(e,d,u,n);a.insertBefore(p,o)}u+=d.size}for(;o;)o=s(o)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=R()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Tn(e))r&&(t.visible=Lr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+kn(e.display)-Ln(e),n.top)}),t.visible=Lr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!oi(e,t))break;Or(e);var i=Fr(e);gr(e),Ur(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var n=new ai(e,t);if(oi(e,n)){Or(e),si(e,n);var r=Fr(e);gr(e),Ur(e,r),ui(e,r),n.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+On(e)+"px"}function hi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=or(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",o=0;os.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||a&&u){if(a&&y&&l)e:for(var d=t.target,f=o.view;d!=s;d=d.parentNode)for(var p=0;p=0&&tt(e,r.to())<=0)return n}return-1};var Ei=function(e,t){this.anchor=e,this.head=t};function ki(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=H(t,i);for(var a=1;a0:l>=0){var c=at(s.from(),o.from()),u=it(s.to(),o.to()),h=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,t.splice(--a,2,new Ei(h?u:c,h?c:u))}}return new Ci(t,n)}function Si(e,t){return new Ci([new Ei(e,t||e)],0)}function Oi(e){return e.text?et(e.from.line+e.text.length-1,q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ti(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Oi(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Oi(t).ch-t.to.ch),et(n,r)}function Li(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Ii(e,t,n){!function e(r,i,a){if(r.linked)for(var o=0;os-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(a=function(e,t){return t?(Bi(e.done),q(e.done)):e.done.length&&!q(e.done).ranges?q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),q(e.done)):void 0}(i,i.lastOp==r)))o=q(a.changes),0==tt(t.from,t.to)&&0==tt(t.from,o.to)?o.to=Oi(t):a.changes.push(Fi(e,t));else{var l=q(i.done);for(l&&l.ranges||zi(e.sel,i.done),a={changes:[Fi(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,o||pe(e,"historyAdded")}function Ui(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,a,q(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function zi(e,t){var n=q(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Vi(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=n.markedSpans),++a}))}function Wi(e){if(!e)return null;for(var t,n=0;n-1&&(q(s)[h]=c[h],delete c[h])}}}return r}function Yi(e,t,n,r){if(r){var i=e.anchor;if(n){var a=tt(t,i)<0;a!=tt(n,i)<0?(i=t,t=n):a!=tt(t,n)<0&&(t=n)}return new Ei(i,t)}return new Ei(n||t,t)}function qi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Zi(e,new Ci([Yi(e.sel.primary(),t,n,i)],0),r)}function Xi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:s.to>t.ch))){if(i&&(pe(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!l.atomic)continue;if(n){var h=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(h=oa(e,h,-r,h&&h.line==t.line?a:null)),h&&h.line==t.line&&(d=tt(h,n))&&(r<0?d<0:d>0))return ia(e,h,t,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=oa(e,f,r,f.line==t.line?a:null)),f?ia(e,f,t,r,i):null}}return t}function aa(e,t,n,r,i){var a=r||1,o=ia(e,t,n,a,i)||!i&&ia(e,t,n,a,!0)||ia(e,t,n,-a,i)||!i&&ia(e,t,n,-a,!0);return o||(e.cantEdit=!0,et(e.first,0))}function oa(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ke(e,t.line)).text.length?t.line0)){var u=[l,1],h=tt(c.from,s.from),d=tt(c.to,s.to);(h<0||!o.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(d>0||!o.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)ua(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else ua(e,t)}}function ua(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Li(e,t);Hi(e,t,n,e.cm?e.cm.curOp.id:NaN),fa(e,t,n,Ot(e,t));var r=[];Ii(e,(function(e,n){n||-1!=H(r,e.history)||(va(e.history,t),r.push(e.history)),fa(e,t,null,Ot(e,t))}))}}function ha(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,a=e.history,o=e.sel,s="undo"==t?a.done:a.undone,l="undo"==t?a.undone:a.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function da(e,t){if(0!=t&&(e.first+=t,e.sel=new Ci(X(e.sel.ranges,(function(e){return new Ei(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){hr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linea&&(t={from:t.from,to:et(a,Ke(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ye(e,t.from,t.to),n||(n=Li(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,s=!1,l=a.line;e.options.lineWrapping||(l=$e(Ft(Ke(r,a.line))),r.iter(l,o.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Mi(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,a.line+t.text.length,(function(e){var t=Wt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ke(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead1||!(this.children[0]instanceof ba))){var s=[];this.collapse(s),this.children=[new ba(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var o=i.lines.length%25+25,s=o;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=A("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Pt(e,t.line,t,n,a)||t.line!=n.line&&Pt(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ct=!0}a.addToHistory&&Hi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(e){c&&a.collapsed&&!c.options.lineWrapping&&Ft(e)==c.display.maxLine&&(s=!0),a.collapsed&&l!=t.line&&Xe(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Et(a,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),a.collapsed&&e.iter(t.line,n.line+1,(function(t){Ut(e,t)&&Xe(t,0)})),a.clearOnEnter&&he(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Ea,a.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),a.collapsed)hr(c,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=t.line;u<=n.line;u++)dr(c,u,"text");a.atomic&&na(c.doc),ln(c,"markerAdded",c,a)}return a}ka.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kr(e),ve(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;ae.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&hr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&na(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&Yr(e),this.parent&&this.parent.clear()}},ka.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)ca(this,r[l]);s?Qi(this,s):this.cm&&Dr(this.cm)})),undo:ni((function(){ha(this,"undo")})),redo:ni((function(){ha(this,"redo")})),undoSelection:ni((function(){ha(this,"undo",!0)})),redoSelection:ni((function(){ha(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(a){var o=a.markedSpans;if(o)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=a,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var h=e.dataTransfer.getData("Text");if(h){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),ea(t.doc,Si(n,n)),d)for(var f=0;f=0;t--)pa(e.doc,"",r[t].from,r[t].to,"+delete");Dr(e)}))}function Ja(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Qa(e,t,n){var r=Ja(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function Za(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var a=ce(n,t.doc.direction);if(a){var o,s=i<0?q(a):a[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Rn(t,n);o=i<0?n.text.length-1:0;var u=Mn(t,c,o).top;o=ae((function(e){return Mn(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,o),"before"==l&&(o=Ja(n,o,1))}else o=i<0?s.to:s.from;return new et(r,o,l)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}za.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"},za.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"},za.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"},za.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"]},za.default=y?za.macDefault:za.pcDefault;var eo={selectAll:sa,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return $a(e,(function(t){if(t.empty()){var n=Ke(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Ke(e.doc,i.line-1).text;o&&(i=new et(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),et(i.line-1,o.length-1),i,"+transpose"))}n.push(new Ei(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Zr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,a=!1,c=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,fe(i.wrapper.ownerDocument,"mouseup",c),fe(i.wrapper.ownerDocument,"mousemove",u),fe(i.scroller,"dragstart",h),fe(i.scroller,"drop",c),a||(be(t),r.addNew||qi(e.doc,n,null,null,r.extend),l&&!d||o&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){a=a||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return a=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),he(i.wrapper.ownerDocument,"mouseup",c),he(i.wrapper.ownerDocument,"mousemove",u),he(i.scroller,"dragstart",h),he(i.scroller,"drop",c),Er(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,a):function(e,t,n,r){var i=e.display,a=e.doc;be(t);var o,s,l=a.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=a.sel.contains(n),o=s>-1?c[s]:new Ei(n,n)):(o=a.sel.primary(),s=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new Ei(n,n)),n=cr(e,t,!0,!0),s=-1;else{var u=vo(e,n,r.unit);o=r.extend?Yi(o,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,Zi(a,ki(e,c.concat([o]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Zi(a,ki(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):$i(a,s,o,V):(s=0,Zi(a,new Ci([o],0),V),l=a.sel);var h=n;function d(t){if(0!=tt(h,t))if(h=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=F(Ke(a,n.line).text,n.ch,c),d=F(Ke(a,t.line).text,t.ch,c),f=Math.min(u,d),p=Math.max(u,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ke(a,m).text,y=G(v,f,c);f==p?i.push(new Ei(et(m,y),et(m,y))):v.length>y&&i.push(new Ei(et(m,y),et(m,G(v,p,c))))}i.length||i.push(new Ei(n,n)),Zi(a,ki(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=o,w=vo(e,t,r.unit),C=x.anchor;tt(w.anchor,C)>0?(b=w.head,C=at(x.from(),w.anchor)):(b=w.anchor,C=it(x.to(),w.head));var E=l.ranges.slice(0);E[s]=function(e,t){var n=t.anchor,r=t.head,i=Ke(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var a=ce(i);if(!a)return t;var o=se(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=o+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==a.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(a,r.ch,r.sticky),h=u-o||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=a[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,m=f?"after":"before";return n.ch==p&&n.sticky==m?t:new Ei(new et(n.line,p,m),r)}(e,new Ei(st(a,C),b)),Zi(a,ki(e,E,s),V)}}var f=i.wrapper.getBoundingClientRect(),p=0;function m(t){e.state.selectingText=!1,p=1/0,t&&(be(t),i.input.focus()),fe(i.wrapper.ownerDocument,"mousemove",g),fe(i.wrapper.ownerDocument,"mouseup",v),a.history.lastSelOrigin=null}var g=ei(e,(function(t){0!==t.buttons&&ke(t)?function t(n){var o=++p,s=cr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,h)){e.curOp.focus=R(),d(s);var l=Lr(i,a);(s.line>=l.to||s.linef.bottom?20:0;c&&setTimeout(ei(e,(function(){p==o&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),v=ei(e,m);e.state.selectingText=v,he(i.wrapper.ownerDocument,"mousemove",g),he(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,a)}(t,r,a,e):Ee(e)==n.scroller&&be(e):2==i?(r&&qi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(E?t.display.input.onContextMenu(e):Er(t)))}}function vo(e,t,n){if("char"==n)return new Ei(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ei(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Ei(r.from,r.to)}function yo(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!ve(e,n))return we(t);a-=s.top-o.viewOffset;for(var l=0;l=i)return pe(e,n,e,Je(e.doc,a),e.display.gutterSpecs[l].className,t),we(t)}}function bo(e,t){return yo(e,t,"gutterClick",!0)}function xo(e,t){Cn(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&yo(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||E||e.display.input.onContextMenu(t)}function wo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hn(e)}mo.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var Co={toString:function(){return"CodeMirror.Init"}},Eo={},ko={};function So(e,t,n){if(!t!=!(n&&n!=Co)){var r=e.display.dragFunctions,i=t?he:fe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Oo(e){e.options.lineWrapping?(M(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(O(e.display.wrapper,"CodeMirror-wrap"),Gt(e)),lr(e),hr(e),Hn(e),setTimeout((function(){return Ur(e)}),100)}function To(e,t){var n=this;if(!(this instanceof To))return new To(e,t);this.options=t=t?P(t):{},P(Eo,t,!1);var r=t.value;"string"==typeof r?r=new Aa(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new To.inputStyles[t.inputStyle](this),a=this.display=new gi(e,r,i,t);for(var c in a.wrapper.CodeMirror=this,wo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wr(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 B,keySeq:null,specialChars:null},t.autofocus&&!v&&a.input.focus(),o&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;he(t.scroller,"mousedown",ei(e,go)),he(t.scroller,"dblclick",o&&s<11?ei(e,(function(t){if(!me(e,t)){var n=cr(e,t);if(n&&!bo(e,t)&&!Cn(e.display,t)){be(t);var r=e.findWordAt(n);qi(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||be(t)}),he(t.scroller,"contextmenu",(function(t){return xo(e,t)})),he(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||xo(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function a(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}he(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!bo(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),he(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),he(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Cn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,s=e.coordsChar(t.activeTouch,"page");o=!r.prev||a(r,r.prev)?new Ei(s,s):!r.prev.prev||a(r,r.prev.prev)?e.findWordAt(s):new Ei(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),be(n)}i()})),he(t.scroller,"touchcancel",i),he(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(jr(e,t.scroller.scrollTop),Pr(e,t.scroller.scrollLeft,!0),pe(e,"scroll",e))})),he(t.scroller,"mousewheel",(function(t){return wi(e,t)})),he(t.scroller,"DOMMouseScroll",(function(t){return wi(e,t)})),he(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||Ce(t)},over:function(t){me(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=_("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),L(e.display.dragCursor,r)}}(e,t),Ce(t))},start:function(t){return function(e,t){if(o&&(!e.state.draggingText||+new Date-Da<100))Ce(t);else if(!me(e,t)&&!Cn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=_("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Ra),leave:function(t){me(e,t)||Ma(e)}};var l=t.input.getField();he(l,"keyup",(function(t){return uo.call(e,t)})),he(l,"keydown",ei(e,co)),he(l,"keypress",ei(e,ho)),he(l,"focus",(function(t){return kr(e,t)})),he(l,"blur",(function(t){return Sr(e,t)}))}(this),Na(),Kr(this),this.curOp.forceUpdate=!0,ji(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&kr(n)}),20):Sr(this),ko)ko.hasOwnProperty(c)&&ko[c](this,t[c],Co);di(this),t.finishInit&&t.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>a.first?F(Ke(a,t-1).text,null,o):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/o);f;--f)d+=o,h+="\t";if(do,l=De(t),c=null;if(s&&r.ranges.length>1)if(Ao&&Ao.text.join("\n")==t){if(r.ranges.length%Ao.text.length==0){c=[];for(var u=0;u=0;d--){var f=r.ranges[d],p=f.from(),m=f.to();f.empty()&&(n&&n>0?p=et(p.line,p.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ke(a,m.line).text.length,m.ch+q(l).length)):s&&Ao&&Ao.lineWise&&Ao.text.join("\n")==l.join("\n")&&(p=m=et(p.line,0)));var g={from:p,to:m,text:c?c[d%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};ca(e.doc,g),ln(e,"inputRead",e,g)}t&&!s&&Io(e,t),Dr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Mo(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Zr(t,(function(){return Ro(t,n,0,null,"paste")})),!0}function Io(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s-1){o=_o(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ke(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=_o(e,i.head.line,"smart"));o&&ln(e,"electricInput",e,i.head.line)}}}function jo(e){for(var t=[],n=[],r=0;r0?0:-1));o=isNaN(u)?null:new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else o=i?function(e,t,n,r){var i=ce(t,e.doc.direction);if(!i)return Qa(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=se(i,n.ch,n.sticky),o=i[a];if("ltr"==e.doc.direction&&o.level%2==0&&(r>0?o.to>n.ch:o.from=o.from&&d>=u.begin)){var f=h?"before":"after";return new et(n.line,d,f)}}var p=function(e,t,r){for(var a=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e0==(1!=o.level),c=s?r.begin:l(r.end,-1);if(o.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=p(r>0?0:i.length-1,r,c(g)))?null:m}(e.cm,s,t,n):Qa(s,t,n);if(null==o){if(a||(c=t.line+l)=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=Ke(e,c))))return!1;t=Za(i,e.cm,s,t.line,l)}else t=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=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var p=s.text.charAt(t.ch)||"\n",m=ee(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(u=m),n>0&&!c(!f))break}var g=aa(e,t,a,o,!0);return nt(a,g)&&(g.hitSide=!0),g}function Bo(e,t,n,r){var i,a,o=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(a=$n(e,s,i)).outside;){if(n<0?i<=0:i>=o.height){a.hitSide=!0;break}i+=5*n}return a}var Ho=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Uo(e,t){var n=Dn(e,t.line);if(!n||n.hidden)return null;var r=Ke(e.doc,t.line),i=_n(n,r,t.line),a=ce(r,e.doc.direction),o="left";a&&(o=se(a,t.ch)%2?"right":"left");var s=Nn(i.map,t.ch,o);return s.offset="right"==s.collapse?s.end:s.start,s}function zo(e,t){return t&&(e.bad=!0),e}function Vo(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return zo(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||a.line=t.display.viewFrom&&Uo(t,i)||{node:l[0].measure.map[2],offset:0},u=a.liner.firstLine()&&(o=et(o.line-1,Ke(r.doc,o.line-1).length)),s.ch==Ke(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;o.line==i.viewFrom||0==(e=ur(r,o.line))?(t=$e(i.view[0].line),n=i.view[0].node):(t=$e(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=$e(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(e,t,n,r,i){var a="",o=!1,s=e.doc.lineSeparator(),l=!1;function c(){o&&(a+=s,l&&(a+=s),o=l=!1)}function u(e){e&&(c(),a+=e)}function h(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var a,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(et(r,0),et(i+1,0),(g=+d,function(e){return e.id==g}));return void(f.length&&(a=f[0].find(0))&&u(Ye(e.doc,a.from,a.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&c();for(var m=0;m1&&d.length>1;)if(q(h)==q(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),t++}for(var f=0,p=0,m=h[0],g=d[0],v=Math.min(m.length,g.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 w=et(t,f),C=et(l,d.length?q(d).length-p:0);return h.length>1||h[0]||tt(w,C)?(pa(r.doc,h,w,C,"+input"),!0):void 0},Ho.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ho.prototype.reset=function(){this.forceCompositionEnd()},Ho.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ho.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ho.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zr(this.cm,(function(){return hr(e.cm)}))},Ho.prototype.setUneditable=function(e){e.contentEditable="false"},Ho.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Ro)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ho.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ho.prototype.onContextMenu=function(){},Ho.prototype.resetPosition=function(){},Ho.prototype.needsContentAttribute=!0;var Go=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};Go.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function a(e){if(!me(r,e)){if(r.somethingSelected())Do({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=jo(r);Do({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,z):(n.prevInput="",i.value=t.text.join("\n"),j(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),he(i,"input",(function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),he(i,"paste",(function(e){me(r,e)||Mo(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),he(i,"cut",a),he(i,"copy",a),he(e.scroller,"paste",(function(t){if(!Cn(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var a=new Event("paste");a.clipboardData=t.clipboardData,i.dispatchEvent(a)}})),he(e.lineSpace,"selectstart",(function(t){Cn(e,t)||be(t)})),he(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),he(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Go.prototype.createField=function(e){this.wrapper=Po(),this.textarea=this.wrapper.firstChild},Go.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Go.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=Yn(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},Go.prototype.showSelection=function(e){var t=this.cm.display;L(t.cursorDiv,e.cursors),L(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Go.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&j(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null))}},Go.prototype.getField=function(){return this.textarea},Go.prototype.supportsTouch=function(){return!1},Go.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||R()!=this.textarea))try{this.textarea.focus()}catch(e){}},Go.prototype.blur=function(){this.textarea.blur()},Go.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Go.prototype.receivedFocus=function(){this.slowPoll()},Go.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Go.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Go.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Re(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(8203!=a||r||(r="​"),8666==a)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Go.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Go.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},Go.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=cr(n,e),c=r.scroller.scrollTop;if(a&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(a)&&ei(n,Zi)(n.doc,Si(a),z);var u,d=i.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.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(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&s>=9&&g(),E){Ce(e);var m=function(){fe(window,"mouseup",m),setTimeout(v,20)};he(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),a="​"+(e?i.value:"");i.value="⇚",i.value=a,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=d,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!o||o&&s<9)&&g();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ei(n,sa)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},Go.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Go.prototype.setUneditable=function(){},Go.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=Co&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Co,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Ai(e)}),!0),n("indentUnit",2,Ai,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Di(e),Hn(e),hr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(-1==a)break;i=a+t.length,n.push(et(r,a))}r++}));for(var i=n.length-1;i>=0;i--)pa(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Co&&e.refresh()})),n("specialCharPlaceholder",Qt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){wo(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Xa(t),i=n!=Co&&Xa(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Oo,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=fi(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?or(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Ur(e)}),!0),n("scrollbarStyle","native",(function(e){Wr(e),Ur(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=fi(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Sr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,So),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Di,!0),n("addModeClass",!1,Di,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Di,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(To),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),pe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Xa(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(_o(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Dr(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;l0&&$i(this.doc,r,new Ei(a,c[r].to()),z)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=dt(this,Ke(this.doc,e.line)),r=0,i=(n.length-1)/2,a=e.ch;if(0==a)t=n[2];else for(;;){var o=r+i>>1;if((o?n[2*o-1]:0)>=a)i=o;else{if(!(n[2*o+1]a&&(e=a,i=!0),r=Ke(this.doc,e)}else r=e;return Wn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Vt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a,o,s,l=this.display,c=(e=Yn(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.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||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(c=e.bottom),u+t.offsetWidth>d&&(u=d-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(a=this,o={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=_r(a,o)).scrollTop&&jr(a,s.scrollTop),null!=s.scrollLeft&&Pr(a,s.scrollLeft))},triggerOnKeyDown:ti(co),triggerOnKeyPress:ti(ho),triggerOnKeyUp:uo,triggerOnMouseDown:ti(go),execCommand:function(e){if(eo.hasOwnProperty(e))return eo[e].call(null,this)},triggerElectric:ti((function(e){Io(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=st(this.doc,e),o=0;o0&&o(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&lr(this),pe(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),ji(this,e),Hn(this),this.display.input.reset(),Rr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},ye(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,a){e.registerHelper(t,r,a),n[t]._global.push({pred:i,val:a})}}(To);var Ko="iter insert remove copy getEditor constructor".split(" ");for(var Yo in Aa.prototype)Aa.prototype.hasOwnProperty(Yo)&&H(Ko,Yo)<0&&(To.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Aa.prototype[Yo]));return ye(Aa),To.inputStyles={textarea:Go,contenteditable:Ho},To.defineMode=function(e){To.defaults.mode||"null"==e||(To.defaults.mode=e),Pe.apply(this,arguments)},To.defineMIME=function(e,t){Ne[e]=t},To.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),To.defineMIME("text/plain","null"),To.defineExtension=function(e,t){To.prototype[e]=t},To.defineDocExtension=function(e,t){Aa.prototype[e]=t},To.fromTextArea=function(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=R();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(he(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(fe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=To((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=fe,e.on=he,e.wheelEventPixels=xi,e.Doc=Aa,e.splitLines=De,e.countColumn=F,e.findColumn=G,e.isWordChar=Z,e.Pass=U,e.signal=pe,e.Line=Kt,e.changeEnd=Oi,e.scrollbarModel=Vr,e.Pos=et,e.cmpPos=tt,e.modes=je,e.mimeModes=Ne,e.resolveMode=Fe,e.getMode=Be,e.modeExtensions=He,e.extendMode=Ue,e.copyState=ze,e.startState=We,e.innerMode=Ve,e.commands=eo,e.keyMap=za,e.keyName=qa,e.isModifierKey=Ka,e.lookupKey=Ga,e.normalizeKeyMap=Wa,e.StringStream=Ge,e.SharedTextMarker=Oa,e.TextMarker=ka,e.LineWidget=wa,e.e_preventDefault=be,e.e_stopPropagation=xe,e.e_stop=Ce,e.addClass=M,e.contains=D,e.rmClass=O,e.keyNames=Fa}(To),To.version="5.58.2",To}()},WaYH: +/*!*********************************************************!*\ + !*** ./node_modules/rc-tree/es/TreeNode.js + 1 modules ***! + \*********************************************************/ +/*! exports provided: InternalTreeNode, default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.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-tree/es/contextTypes.js because of ./node_modules/rc-tree/es/Tree.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/util.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.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"),i=n("Ff2n"),a=n("VTBJ"),o=n("1OyB"),s=n("vuIU"),l=n("JX7q"),c=n("Ji7U"),u=n("LK+K"),h=n("q1tI"),d=n("TSYQ"),f=n.n(d),p=n("sboe"),m=n("OZM5"),g=function(e){var t=e.prefixCls,n=e.level,i=e.isStart,a=e.isEnd;if(!n)return null;for(var o="".concat(t,"-indent-unit"),s=[],l=0;l1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&L[n])return L[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),a=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=T.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),l={sizingStyle:s,paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(L[n]=l),l}var A,D=n("Gytx"),R=n.n(D);!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(A||(A={}));var M=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,e)).nextFrameActionId=void 0,a.resizeFrameId=void 0,a.textArea=void 0,a.saveTextArea=function(e){a.textArea=e},a.handleResize=function(e){var t=a.state.resizeStatus,n=a.props,r=n.autoSize,i=n.onResize;t===A.NONE&&("function"==typeof i&&i(e),r&&a.resizeOnNextFrame())},a.resizeOnNextFrame=function(){cancelAnimationFrame(a.nextFrameActionId),a.nextFrameActionId=requestAnimationFrame(a.resizeTextarea)},a.resizeTextarea=function(){var e=a.props.autoSize;if(e&&a.textArea){var t=e.minRows,n=e.maxRows,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;w||((w=document.createElement("textarea")).setAttribute("tab-index","-1"),w.setAttribute("aria-hidden","true"),document.body.appendChild(w)),e.getAttribute("wrap")?w.setAttribute("wrap",e.getAttribute("wrap")):w.removeAttribute("wrap");var i=_(e,t),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,l=i.sizingStyle;w.setAttribute("style","".concat(l,";").concat(O)),w.value=e.value||e.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,d=w.scrollHeight;if("border-box"===s?d+=o:"content-box"===s&&(d-=a),null!==n||null!==r){w.value=" ";var f=w.scrollHeight-a;null!==n&&(u=f*n,"border-box"===s&&(u=u+a+o),d=Math.max(u,d)),null!==r&&(h=f*r,"border-box"===s&&(h=h+a+o),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(a.textArea,!1,t,n);a.setState({textareaStyles:r,resizeStatus:A.RESIZING},(function(){cancelAnimationFrame(a.resizeFrameId),a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:A.RESIZED},(function(){a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:A.NONE}),a.fixFirefoxAutoScroll()}))}))}))}))}},a.renderTextArea=function(){var e=a.props,t=e.prefixCls,n=void 0===t?"rc-textarea":t,i=e.autoSize,o=e.onResize,s=e.className,h=e.disabled,d=a.state,f=d.textareaStyles,p=d.resizeStatus,m=Object(E.a)(a.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),g=S()(n,s,Object(u.a)({},"".concat(n,"-disabled"),h));"value"in m&&(m.value=m.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},a.props.style),f),p===A.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(C,{onResize:a.handleResize,disabled:!(i||o)},l.createElement("textarea",Object(r.a)({},m,{className:g,style:v,ref:a.saveTextArea})))},a.state={textareaStyles:{},resizeStatus:A.NONE},a}return Object(a.a)(n,[{key:"componentDidUpdate",value:function(e){e.value===this.props.value&&R()(e.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 e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.textArea.setSelectionRange(e,t)}}catch(e){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(l.Component),I=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;Object(i.a)(this,n),(r=t.call(this,e)).resizableTextArea=void 0,r.focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(e){r.resizableTextArea=e},r.handleChange=function(e){var t=r.props.onChange;r.setValue(e.target.value,(function(){r.resizableTextArea.resizeTextarea()})),t&&t(e)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,i=t.onKeyDown;13===e.keyCode&&n&&n(e),i&&i(e)};var a=void 0===e.value||null===e.value?e.defaultValue:e.value;return r.state={value:a},r}return Object(a.a)(n,[{key:"setValue",value:function(e,t){"value"in this.props||this.setState({value:e},t)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(M,Object(r.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value}:null}}]),n}(l.Component);t.default=I},ZW9T: +/*!************************************************************!*\ + !*** ./src/components/monaco-editor/index.jsx + 1 modules ***! + \************************************************************/ +/*! exports provided: getLanguageByMirrorName, default, DiffEditor */ +/*! exports used: DiffEditor, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./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/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n("k1fw"),i=(n("miYZ"),n("tsqr")),a=n("rAM+"),o=n("tJVT"),s=n("PpiC"),l=n("q1tI"),c=n.n(l),u=n("bdgK");function h(e,t,n,i,a){var o=t.getWordUntilPosition(n),s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=i.map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Keyword,insertText:t,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}));return a.map((function(e){l.push(Object(r.a)(Object(r.a)({},e),{},{range:s}))})),l}n("LvDl");function d(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}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 m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e;if(Array.isArray(e)){for(var n=0;n0||r.target.offsetWidth>0)&&G.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(W.current),e}();return Q(!0),function(){var e=G.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),G.current.subscription&&G.current.subscription.dispose(),j&&window.removeEventListener("paste",ee),n.unobserve(W.current)}}catch(e){}}))}),[]),Object(l.useEffect)((function(){if(G.current.instance&&J)return document.addEventListener("keydown",te,!1),function(){document.removeEventListener("keydown",te)}}),[D,J]),Object(l.useEffect)((function(){var e=G.current.instance;if(e&&J){var t=m(w);g.editor.setModelLanguage(e.getModel(),t),console.log("language:",w,e.getModel(),t)}}),[w,J]),Object(l.useEffect)((function(){G.current.instance&&J&&g.editor.setTheme(_)}),[_,J]),Object(l.useEffect)((function(){var e=G.current.instance;e&&J&&(e.updateOptions(Object(r.a)({},S)),setTimeout((function(){e.getModel().updateOptions(Object(r.a)({},S))}),200))}),[JSON.stringify(S),J]),Object(l.useEffect)((function(){var e=G.current.instance;e&&J&&e.layout()}),[p,y,J]);var ie=Object(l.useState)(d(p)),ae=Object(o.a)(ie,2),oe=ae[0],se=(ae[1],Object(l.useState)(d(y))),le=Object(o.a)(se,2),ce=le[0],ue=le[1],he=Object(r.a)(Object(r.a)({},E),{},{width:oe,height:ce});return c.a.createElement("div",{className:"my-monaco-editor",ref:W,style:he})};function v(e){var t=e.width,i=void 0===t?"100%":t,s=e.height,h=void 0===s?"100%":s,f=e.original,p=e.modified,m=e.language,v=e.options,y=void 0===v?{}:v,b=Object(l.useRef)(),x=Object(l.useState)(null),w=Object(o.a)(x,2),C=w[0],E=w[1];Object(l.useEffect)((function(){b.current&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){var t=(g=e).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}));E(t);var n=function(e){var t;return b.current&&(t=new u.default((function(t){var n,r=Object(a.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&e.layout()}}catch(e){r.e(e)}finally{r.f()}}))).observe(b.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),n.unobserve(b.current)}}))}),[]),Object(l.useEffect)((function(){C&&C.setModel({original:g.editor.createModel(f,m),modified:g.editor.createModel(p,m)})}),[f,p,m,C]);var k={width:d(i),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(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function i(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function a(e,t){if(e.clientHeightt||a>e&&o=t&&s>=n?a-e-r:o>t&&sn?o-t+i:0}var s=function(e,t){var n=window,i=t.scrollMode,s=t.block,l=t.inline,c=t.boundary,u=t.skipOverflowHiddenElements,h="function"==typeof c?c:function(e){return e!==c};if(!r(e))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],p=e;r(p)&&h(p);){if((p=p.parentElement)===d){f.push(p);break}null!=p&&p===document.body&&a(p)&&!a(document.documentElement)||null!=p&&a(p,u)&&f.push(p)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),x=b.height,w=b.width,C=b.top,E=b.right,k=b.bottom,S=b.left,O="start"===s||"nearest"===s?C:"end"===s?k:C+x/2,T="center"===l?S+w/2:"end"===l?E:S,L=[],_=0;_=0&&S>=0&&k<=g&&E<=m&&C>=I&&k<=N&&S>=P&&E<=j)return L;var F=getComputedStyle(A),B=parseInt(F.borderLeftWidth,10),H=parseInt(F.borderTopWidth,10),U=parseInt(F.borderRightWidth,10),z=parseInt(F.borderBottomWidth,10),V=0,W=0,G="offsetWidth"in A?A.offsetWidth-A.clientWidth-B-U:0,K="offsetHeight"in A?A.offsetHeight-A.clientHeight-H-z:0;if(d===A)V="start"===s?O:"end"===s?O-g:"nearest"===s?o(y,y+g,g,H,z,y+O,y+O+x,x):O-g/2,W="start"===l?T:"center"===l?T-m/2:"end"===l?T-m:o(v,v+m,m,B,U,v+T,v+T+w,w),V=Math.max(0,V+y),W=Math.max(0,W+v);else{V="start"===s?O-I-H:"end"===s?O-N+z+K:"nearest"===s?o(I,N,R,H,z+K,O,O+x,x):O-(I+R/2)+K/2,W="start"===l?T-P-B:"center"===l?T-(P+M/2)+G/2:"end"===l?T-j+U+G:o(P,j,M,B,U+G,T,T+w,w);var Y=A.scrollLeft,q=A.scrollTop;O+=q-(V=Math.max(0,Math.min(q+V,A.scrollHeight-R+K))),T+=Y-(W=Math.max(0,Math.min(Y+W,A.scrollWidth-M+G)))}L.push({el:A,top:V,left:W})}return L};function l(e){return e===Object(e)&&0!==Object.keys(e).length}t.a=function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(l(t)&&"function"==typeof t.behavior)return t.behavior(n?[]:s(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:l(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,i=e.top,a=e.left;r.scroll&&n?r.scroll({top:i,left:a,behavior:t}):(r.scrollTop=i,r.scrollLeft=a)}))}(s(e,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(e,t,n){var r;!function(i){var a=/^\s+/,o=/\s+$/,s=0,l=i.round,c=i.min,u=i.max,h=i.random;function d(e,t){if(t=t||{},(e=e||"")instanceof d)return e;if(!(this instanceof d))return new d(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,l=null,h=!1,d=!1;"string"==typeof e&&(e=function(e){e=e.replace(a,"").replace(o,"").toLowerCase();var t,n=!1;if(A[e])e=A[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=V.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=V.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=V.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=V.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=V.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=V.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=V.hex8.exec(e))return{r:j(t[1]),g:j(t[2]),b:j(t[3]),a:B(t[4]),format:n?"name":"hex8"};if(t=V.hex6.exec(e))return{r:j(t[1]),g:j(t[2]),b:j(t[3]),format:n?"name":"hex"};if(t=V.hex4.exec(e))return{r:j(t[1]+""+t[1]),g:j(t[2]+""+t[2]),b:j(t[3]+""+t[3]),a:B(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=V.hex3.exec(e))return{r:j(t[1]+""+t[1]),g:j(t[2]+""+t[2]),b:j(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(W(e.r)&&W(e.g)&&W(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*M(f,255),g:255*M(p,255),b:255*M(m,255)},h=!0,d="%"===String(e.r).substr(-1)?"prgb":"rgb"):W(e.h)&&W(e.s)&&W(e.v)?(r=P(e.s),s=P(e.v),t=function(e,t,n){e=6*M(e,360),t=M(t,100),n=M(n,100);var r=i.floor(e),a=e-r,o=n*(1-t),s=n*(1-a*t),l=n*(1-(1-a)*t),c=r%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(e.h,r,s),h=!0,d="hsv"):W(e.h)&&W(e.s)&&W(e.l)&&(r=P(e.s),l=P(e.l),t=function(e,t,n){var r,i,a;function o(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=M(e,360),t=M(t,100),n=M(n,100),0===t)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=o(l,s,e+1/3),i=o(l,s,e),a=o(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*a}}(e.h,r,l),h=!0,d="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=R(n),{ok:h,format:e.format||d,r:c(255,u(t.r,0)),g:c(255,u(t.g,0)),b:c(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.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=n.ok,this._tc_id=s++}function f(e,t,n){e=M(e,255),t=M(t,255),n=M(n,255);var r,i,a=u(e,t,n),o=c(e,t,n),s=(a+o)/2;if(a==o)r=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case e:r=(t-n)/l+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(d(r));return a}function _(e,t){t=t||6;for(var n=d(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(d({h:r,s:i,v:a})),a=(a+s)%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 e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=R(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var a=[N(l(e).toString(16)),N(l(t).toString(16)),N(l(n).toString(16)),N(F(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},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*M(this._r,255))+"%",g:l(100*M(this._g,255))+"%",b:l(100*M(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*M(this._r,255))+"%, "+l(100*M(this._g,255))+"%, "+l(100*M(this._b,255))+"%)":"rgba("+l(100*M(this._r,255))+"%, "+l(100*M(this._g,255))+"%, "+l(100*M(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(D[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=d(e);n="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(w,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(E,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(k,arguments)},monochromatic:function(){return this._applyCombination(_,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(O,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:P(e[r]));e=n}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(e,t,n){n=0===n?0:n||50;var r=d(e).toRgb(),i=d(t).toRgb(),a=n/100;return d({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},d.readability=function(e,t){var n=d(e),r=d(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(e,t,n){var r,i,a=d.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},d.mostReadable=function(e,t,n){var r,i,a,o,s=null,l=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var c=0;cl&&(l=r,s=d(t[c]));return d.isReadable(e,s,{level:a,size:o})||!i?s:(n.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],n))};var A=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"},D=d.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function R(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function M(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function I(e){return c(1,u(0,e))}function j(e){return parseInt(e,16)}function N(e){return 1==e.length?"0"+e:""+e}function P(e){return e<=1&&(e=100*e+"%"),e}function F(e){return i.round(255*parseFloat(e)).toString(16)}function B(e){return j(e)/255}var H,U,z,V=(U="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",z="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+U),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+U),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+U),hsva:new RegExp("hsva"+z),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(e){return!!V.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(r=function(){return d}.call(t,n,t,e))||(e.exports=r)}(Math)},bT9E: +/*!*****************************************!*\ + !*** ./node_modules/rc-util/es/omit.js ***! + \*****************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function i(e,t){var n=Object(r.a)({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}},biw7: +/*!**********************************************************!*\ + !*** ./node_modules/rc-table/es/context/TableContext.js ***! + \**********************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! react */"q1tI"),i=r.createContext(null);t.a=i},c5Ni: +/*!******************************************************!*\ + !*** ./node_modules/codemirror/theme/blackboard.css ***! + \******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},dejd: +/*!***********************************************************!*\ + !*** ./src/components/markdown-editor/toolbar/index.less ***! + \***********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},dmUQ: +/*!**************************************************************!*\ + !*** ./node_modules/rc-input-number/es/index.js + 1 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! 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(e,t,n){"use strict";var r=n("Ff2n"),i=n("rePB"),a=n("1OyB"),o=n("vuIU"),s=n("Ji7U"),l=n("md7G"),c=n("foSv"),u=n("q1tI"),h=n.n(u),d=n("TSYQ"),f=n.n(d),p=n("4IlW");function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t1?s-1:0),c=1;c1?n-1:0),a=1;a=0)return parseInt(t.slice(t.indexOf("e-")+2),10);var n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n},r.getInputDisplayValue=function(e){var t,n=e||r.state,i=n.focused,a=n.inputValue,o=n.value;null==(t=i?a:r.toPrecisionAsStep(o))&&(t="");var s=r.formatWrapper(t);return w(r.props.decimalSeparator)&&(s=s.toString().replace(".",r.props.decimalSeparator)),s},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(e){}},r.restoreByAfter=function(e){if(void 0===e)return!1;var t=r.input.value,n=t.lastIndexOf(e);if(-1===n)return!1;var i=r.cursorBefore.length;return r.lastKeyCode===p.a.DELETE&&r.cursorBefore.charAt(i-1)===e[0]?(r.fixCaret(i,i),!0):n+e.length===t.length&&(r.fixCaret(n,n),!0)},r.partRestoreByAfter=function(e){return void 0!==e&&Array.prototype.some.call(e,(function(t,n){var i=e.substring(n);return r.restoreByAfter(i)}))},r.isNotCompleteNumber=function(e){return isNaN(e)||""===e||null===e||e&&e.toString().indexOf(".")===e.toString().length-1},r.stop=function(){r.autoStepTimer&&clearTimeout(r.autoStepTimer)},r.down=function(e,t,n){r.pressingUpOrDown=!0,r.step("down",e,t,n)},r.up=function(e,t,n){r.pressingUpOrDown=!0,r.step("up",e,t,n)},r.saveInput=function(e){r.input=e};var i=e.value;void 0===i&&(i=e.defaultValue),r.state={focused:e.autoFocus};var o=r.getValidValue(r.toNumber(i));return r.state=g(g({},r.state),{},{inputValue:r.toPrecisionAsStep(o),value:o}),r}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.value,r=t.onChange,i=t.max,a=t.min,o=this.state.focused;if(e){if(!C(e.value,n)||!C(e.max,i)||!C(e.min,a)){var s,l=o?n:this.getValidValue(n);s=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:s})}var c="value"in this.props?n:this.state.value;"max"in this.props&&e.max!==i&&"number"==typeof c&&c>i&&r&&r(i),"min"in this.props&&e.min!==a&&"number"==typeof c&&c1&&void 0!==arguments[1]?arguments[1]:this.props.min,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,r=parseFloat(e);return isNaN(r)?e:(rn&&(r=n),r)}},{key:"setValue",value:function(e,t){var n=this.props.precision,r=this.isNotCompleteNumber(parseFloat(e))?null:parseFloat(e),i=this.state.value,a=void 0===i?null:i,o=this.state.inputValue,s=void 0===o?null:o,l="number"==typeof r?r.toFixed(n):"".concat(r),c=r!==a||l!=="".concat(s);return"value"in this.props?(s=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:s},t)):this.setState({value:r,inputValue:this.toPrecisionAsStep(e)},t),c&&this.props.onChange(r),r}},{key:"getMaxPrecision",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.props,r=n.precision,i=n.step;if(w(r))return r;var a=this.getPrecision(t),o=this.getPrecision(i),s=this.getPrecision(e);return e?Math.max(s,a+o):a+o}},{key:"getPrecisionFactor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getMaxPrecision(e,t);return Math.pow(10,n)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(e){return this.props.formatter?this.props.formatter(e):e}},{key:"toPrecisionAsStep",value:function(e){if(this.isNotCompleteNumber(e)||""===e)return e;var t=Math.abs(this.getMaxPrecision(e));return isNaN(t)?e.toString():Number(e).toFixed(t)}},{key:"toNumber",value:function(e){var t=this.props.precision,n=this.state.focused,r=e&&e.length>16&&n;return this.isNotCompleteNumber(e)||r?e:w(t)?Math.round(e*Math.pow(10,t))/Math.pow(10,t):Number(e)}},{key:"upStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),a=((r*e+r*n*t)/r).toFixed(i);return this.toNumber(a)}},{key:"downStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),a=((r*e-r*n*t)/r).toFixed(i);return this.toNumber(a)}},{key:"step",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0;this.stop(),t&&(t.persist(),t.preventDefault());var a=this.props;if(!a.disabled){var o=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(o)){var s=this["".concat(e,"Step")](o,r),l=s>a.max||sa.max?s=a.max:s=p)||a||o,Y=(H||0===H)&&(isNaN(H)||Number(H)<=m)||a||o,q=f()("".concat(n,"-handler"),"".concat(n,"-handler-up"),Object(i.a)({},"".concat(n,"-handler-up-disabled"),K)),X=f()("".concat(n,"-handler"),"".concat(n,"-handler-down"),Object(i.a)({},"".concat(n,"-handler-down-disabled"),Y)),$=s?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},J=s?{onTouchStart:Y?y:this.down,onTouchEnd:this.stop}:{onMouseDown:Y?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:z,style:g,title:v,onMouseEnter:x,onMouseLeave:w,onMouseOver:C,onMouseOut:E,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(n,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:q}),c||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner"),onClick:b})),h.a.createElement("span",Object.assign({unselectable:"on"},J,{role:"button","aria-label":"Decrease Value","aria-disabled":Y,className:X}),u||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner"),onClick:b}))),h.a.createElement("div",{className:"".concat(n,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":m,"aria-valuemax":p,"aria-valuenow":H,required:k,type:T,placeholder:L,onPaste:N,onClick:S,onMouseUp:this.onMouseUp,className:"".concat(n,"-input"),tabIndex:O,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:W?this.onKeyDown:y,onKeyUp:W?this.onKeyUp:y,autoFocus:I,maxLength:M,readOnly:o,disabled:a,max:p,min:m,step:R,name:j,title:v,id:_,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(G),pattern:D,inputMode:A,onInput:P},V))))}}]),n}(h.a.Component);E.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(e){return e.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var k=E;t.a=k},fyJ8: +/*!************************************************!*\ + !*** ./node_modules/rc-table/es/Cell/index.js ***! + \************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),s=n(/*! react */"q1tI"),l=n(/*! classnames */"TSYQ"),c=n.n(l),u=n(/*! rc-util/es/ref */"c+Xe"),h=n(/*! ../utils/valueUtil */"sR1s");var d=s.forwardRef((function(e,t){var n,l,d,f=e.prefixCls,p=e.className,m=e.record,g=e.index,v=e.dataIndex,y=e.render,b=e.children,x=e.component,w=void 0===x?"td":x,C=e.colSpan,E=e.rowSpan,k=e.fixLeft,S=e.fixRight,O=e.firstFixLeft,T=e.lastFixLeft,L=e.firstFixRight,_=e.lastFixRight,A=e.appendNode,D=e.additionalProps,R=void 0===D?{}:D,M=e.ellipsis,I=e.align,j=e.rowType,N=e.isSticky,P="".concat(f,"-cell");if(b)d=b;else{var F=Object(h.b)(m,v);if(d=F,y){var B=y(F,m,g);!function(e){return e&&"object"===Object(o.a)(e)&&!Array.isArray(e)&&!s.isValidElement(e)}(B)?d=B:(d=B.children,l=B.props)}}"object"!==Object(o.a)(d)||Array.isArray(d)||s.isValidElement(d)||(d=null),M&&(T||L)&&(d=s.createElement("span",{className:"".concat(P,"-content")},d));var H=l||{},U=H.colSpan,z=H.rowSpan,V=H.style,W=H.className,G=Object(a.a)(H,["colSpan","rowSpan","style","className"]),K=void 0!==U?U:C,Y=void 0!==z?z:E;if(0===K||0===Y)return null;var q={},X="number"==typeof k,$="number"==typeof S;X&&(q.position="sticky",q.left=k),$&&(q.position="sticky",q.right=S);var J,Q={};I&&(Q.textAlign=I);var Z=!0===M?{showTitle:!0}:M;Z&&(Z.showTitle||"header"===j)&&("string"==typeof d||"number"==typeof d?J=d.toString():s.isValidElement(d)&&"string"==typeof d.props.children&&(J=d.props.children));var ee,te=Object(i.a)(Object(i.a)(Object(i.a)({title:J},G),R),{},{colSpan:K&&1!==K?K:null,rowSpan:Y&&1!==Y?Y:null,className:c()(P,p,(n={},Object(r.a)(n,"".concat(P,"-fix-left"),X),Object(r.a)(n,"".concat(P,"-fix-left-first"),O),Object(r.a)(n,"".concat(P,"-fix-left-last"),T),Object(r.a)(n,"".concat(P,"-fix-right"),$),Object(r.a)(n,"".concat(P,"-fix-right-first"),L),Object(r.a)(n,"".concat(P,"-fix-right-last"),_),Object(r.a)(n,"".concat(P,"-ellipsis"),M),Object(r.a)(n,"".concat(P,"-with-append"),A),Object(r.a)(n,"".concat(P,"-fix-sticky"),(X||$)&&N),n),R.className,W),style:Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},R.style),Q),q),V),ref:(ee=w,"string"==typeof ee||Object(u.c)(ee)?t:null)});return s.createElement(w,Object.assign({},te),A,d)}));d.displayName="Cell";var f=s.memo(d,(function(e,t){return!!t.shouldCellUpdate&&!t.shouldCellUpdate(t.record,e.record)}));t.a=f},gbAR: +/*!********************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/GroupHomework/Detail/index.tsx + 12 modules ***! + \********************************************************************************/ +/*! exports provided: default */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CaretDownOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/DeliveredProcedureOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/DownOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/LikeOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/PlusCircleOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/UpOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! 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/pages/Classrooms/Lists/GroupHomework/Detail/components/ConfigWorks/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/GroupHomework/Detail/components/Group/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/GroupHomework/Detail/components/StudentGrouping/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/GroupHomework/Detail/components/WorkDescription/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/GroupHomework/Detail/components/WorkList/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/GroupHomework/Detail/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/ExportZip/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/NoData/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/PreviewAll/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/GroupHomework/components/AfterAppendix.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/GroupHomework/components/AssociatedProjects.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Classrooms/Lists/ShixunHomeworks/components/TrfList/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/service/classrooms.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/service/shixunHomeworks.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/export.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/icons/fengzhu.svg (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! 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 */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/date-picker/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/date-picker/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/empty/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/empty/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/style/index.js */ +/*! 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/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/skeleton/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/skeleton/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */ +/*! 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("Znn+");var r=n("ZTPi"),i=(n("sPJy"),n("bE4q")),a=(n("miYZ"),n("tsqr")),o=n("9og8"),s=(n("+L6B"),n("2/Rp")),l=n("k1fw"),c=n("tJVT"),u=n("WmNS"),h=n.n(u),d=n("q1tI"),f=n.n(d),p=n("Ty5D"),m=n("9kvl"),g=n("55Ip"),v=n("jhfD"),y=n("1vsH"),b=n("xKgJ"),x=(n("2qtc"),n("kLXV")),w=(n("giR+"),n("fyUT")),C=(n("7Kak"),n("9yH6")),E=(n("DjyN"),n("NUBc")),k=(n("g9YV"),n("wCAj")),S=(n("qVdP"),n("jsC+")),O=(n("5NDa"),n("5rEg")),T=(n("14J3"),n("BMrR")),L=(n("sRBo"),n("kaz8")),_=(n("jCWc"),n("kPKH")),A=(n("lUTK"),n("BvKs")),D=(n("5Dmo"),n("3S7+")),R=n("jrin"),M=n("oBTY"),I=(n("y8nQ"),n("Vl3Y")),j=n("8Skl"),N=n("y3Kf"),P=n("Llu2"),F=n("0NbB"),B=n("wd/R"),H=n.n(B),U=n("ErOA"),z=n("BdwD"),V=Object(m.a)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var t=e.shixunHomeworks,n=e.dispatch,r=Object(p.i)();return f.a.createElement(x.a,{centered:!0,title:"提示",visible:"打回重做"===t.actionTabs.key,okText:"确定",cancelText:"取消",onOk:Object(o.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(U.a)("/api/myshixuns/".concat(t.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"post",body:{course_id:r.coursesId}});case 2:0===e.sent.status&&(a.b.success("删除成功"),n({type:"shixunHomeworks/setActionTabs",payload:{}}),n({type:"shixunHomeworks/getWorkList",payload:Object(l.a)({},t.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){n({type:"shixunHomeworks/setActionTabs",payload:{}})}},f.a.createElement("p",null,"该作业将被打回重做,学生实训记录将被清空!"),f.a.createElement("p",null,"确定打回?"))})),W=Object(m.a)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var t=e.shixunHomeworks,n=e.dispatch,r=(Object(p.i)(),Object(d.useState)(!0)),i=Object(c.a)(r,2),s=(i[0],i[1],I.a.useForm()),u=Object(c.a)(s,1)[0];return f.a.createElement(f.a.Fragment,null,f.a.createElement(x.a,{centered:!0,title:"调分",visible:"调分"===t.actionTabs.key,okText:"确定",cancelText:"取消",onOk:Object(o.a)(h.a.mark((function e(){var r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.validateFields();case 2:return r=u.getFieldsValue(),e.next=5,Object(U.a)("/api/student_works/".concat(t.actionTabs.id,"/adjust_score.json"),{method:"post",body:Object(l.a)({},r)});case 5:0===e.sent.status&&(a.b.success("评阅成功"),u.resetFields(),n({type:"shixunHomeworks/setActionTabs",payload:{}}),n({type:"shixunHomeworks/getWorkList",payload:Object(l.a)({},t.actionTabs.params)}));case 7:case"end":return e.stop()}}),e)}))),onCancel:function(){n({type:"shixunHomeworks/setActionTabs",payload:{}})}},f.a.createElement("p",{className:"tc"},"该学生的最终成绩将不会按照评分规则进行计算"),f.a.createElement(I.a,{form:u,layout:"horizontal"},f.a.createElement("div",{style:{display:"flex",alignItems:"baseline"}},f.a.createElement(I.a.Item,{label:"成绩",name:"score",rules:[{required:!0,message:"请输入!"}]},f.a.createElement(w.a,{min:0,placeholder:"请填写分数"})),f.a.createElement("span",{className:"ml10"},"分")),f.a.createElement("div",null,f.a.createElement(I.a.Item,{name:"comment"},f.a.createElement(O.a.TextArea,{placeholder:"请填写您对作品调分的原因",rows:8}))))))})),G=n("Ot1p"),K=n("GUfm"),Y=n.n(K),q=n("mgmH"),X=Object(d.createRef)(),$=Object(m.a)((function(e){var t=e.shixunHomeworks,n=e.user;return{shixunHomeworks:t,loading:e.loading.effects,user:n}}))((function(e){var t,n,r,i,u,m,v,B,K,$,J,Q=e.shixunHomeworks,Z=e.loading,ee=e.user,te=e.dispatch,ne=e.zip,re=e.btnLoading,ie=e.setBtnLoading,ae=Object(d.useState)(Object(l.a)(Object(l.a)({},Object(p.i)()),{page:1,limit:20})),oe=Object(c.a)(ae,2),se=oe[0],le=(oe[1],Object(p.h)(),Q.workList),ce=Object(d.useState)({}),ue=Object(c.a)(ce,2),he=ue[0],de=(ue[1],Object(d.useState)("")),fe=Object(c.a)(de,2),pe=(fe[0],fe[1]),me=Object(d.useState)(""),ge=Object(c.a)(me,2),ve=(ge[0],ge[1],Object(d.useState)("")),ye=Object(c.a)(ve,2),be=(ye[0],ye[1],Object(d.useState)([])),xe=Object(c.a)(be,2),we=xe[0],Ce=xe[1],Ee=Object(d.useState)(),ke=Object(c.a)(Ee,2),Se=(ke[0],ke[1]),Oe=Object(d.useState)([]),Te=Object(c.a)(Oe,2),Le=Te[0],_e=Te[1],Ae=Object(d.useState)({}),De=Object(c.a)(Ae,2),Re=De[0],Me=De[1],Ie=Object(d.useState)(!1),je=Object(c.a)(Ie,2),Ne=je[0],Pe=je[1],Fe=Object(d.useState)([]),Be=Object(c.a)(Fe,2),He=Be[0],Ue=Be[1],ze=Object(d.useState)(!1),Ve=Object(c.a)(ze,2),We=Ve[0],Ge=Ve[1],Ke=Object(d.useState)(),Ye=Object(c.a)(Ke,2),qe=Ye[0],Xe=Ye[1],$e=Object(d.useState)(1),Je=Object(c.a)($e,2),Qe=Je[0],Ze=Je[1],et=Object(d.useState)(),tt=Object(c.a)(et,2),nt=tt[0],rt=tt[1],it=Object(d.useState)(),at=Object(c.a)(it,2),ot=at[0],st=at[1],lt=Object(d.useState)(),ct=Object(c.a)(lt,2),ut=ct[0],ht=ct[1],dt=Object(d.useState)({status:!1,visible:!0}),ft=Object(c.a)(dt,2),pt=ft[0],mt=ft[1],gt=I.a.useForm(),vt=Object(c.a)(gt,1)[0];Object(d.useEffect)((function(){X&&X.current&&(X.current.clientHeight>47?mt({status:!0,visible:!0}):mt({status:!1,visible:!0}))}),[le.course_group_info&&le.course_group_info.length]),Object(d.useEffect)((function(){null!=le&&le.course_id&&(Object(b.c)()?_e([]):_e([Object(l.a)(Object(l.a)({},le),{isMe:!0})]))}),[ee.userInfo]),Object(d.useEffect)((function(){null!=le&&le.course_id&&setTimeout((function(){Ce(Object(M.a)(le.student_works))}),400)}),[le]);var yt=function(){var e=Object(o.a)(h.a.mark((function e(){var t;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,te({type:"shixunHomeworks/getWorkList",payload:Object(l.a)({},se)});case 2:t=e.sent,Object(b.c)()?Ce(Object(M.a)(t.student_works)):Ce(Object(M.a)(t));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function bt(){Ze(1),Se(""),rt(""),st(""),ht(""),Ue([])}var xt=[{title:"序号",dataIndex:"name",align:"center",width:50,render:function(e,t,n){return se.limit*(se.page-1)+n+1}},{title:"姓名",align:"center",dataIndex:"user_name",width:90,render:function(e,t){return f.a.createElement("div",null,e,f.a.createElement("br",null),t.is_leader&&f.a.createElement("span",{className:"leader"},"组长"))}},Object(b.c)()&&{title:"学号",align:"center",dataIndex:"student_id",sortOrder:Re.student_id,sortDirections:["descend","ascend"],width:90,sorter:function(e,t){return e.id-t.id},render:function(e){return e}},Object(b.c)()&&{title:"分班",align:"center",dataIndex:"group_name"},{title:"分组",align:"center",dataIndex:"work_group",width:70,render:function(e){return f.a.createElement("span",{className:"c-blue"},e)}},(null==le?void 0:le.base_on_project)&&{title:"关联项目",align:"center",dataIndex:"base_on_project",width:70,render:function(e,t){var n,r,i,a,o,s;return-1!==(null===(n=t.project_info)||void 0===n?void 0:n.id)?f.a.createElement("a",{target:"_blank",href:"".concat(null===(r=ee.navigationInfo)||void 0===r||null===(i=r.top)||void 0===i?void 0:i.old_url).concat(null===(a=t.project_info)||void 0===a?void 0:a.id),className:"c-blue"},null===(o=t.project_info)||void 0===o?void 0:o.name):null===(s=t.project_info)||void 0===s?void 0:s.name}},{title:"作品状态",dataIndex:"work_status",width:"8%",align:"center",render:function(e){return-1===e?"重做中":f.a.createElement(y.a,{status:e})}},{title:"打回次数",dataIndex:"redo_count",width:"8%",align:"center",render:function(e){return e||"- -"}},{title:"更新时间",align:"center",dataIndex:"update_time",sortOrder:Re.update_time,sortDirections:["descend","ascend"],width:105,sorter:function(e,t){return e.id-t.id},render:function(e){return e?H()(e).format("YYYY-MM-DD HH:mm"):"--"}},{title:"教师评分",align:"center",dataIndex:"teacher_score",width:75},{title:"助教评分",align:"center",dataIndex:"teaching_asistant_score",width:75},le.anonymous_comment&&{title:"匿评评分",align:"center",dataIndex:"student_score",width:75},(Object(b.c)()||Object(b.s)()&&!(null!=le&&le.anonymous_comment)&&!le.anonymous_appeal||Object(b.s)()&&(null===(t=le.homework_status)||void 0===t?void 0:t.includes("已截止")))&&{title:"当前成绩",width:"9%",align:"center",dataIndex:"work_score",sortOrder:Re.work_score,sortDirections:["descend","ascend"],sorter:!0,render:function(e){return e}},{title:"操作",width:"8%",align:"center",dataInex:"action",render:function(e,t){return 0!==t.work_status||Object(b.c)()?f.a.createElement("div",null,!Object(b.c)()&&f.a.createElement(g.a,{className:"c-blue",target:"_blank",to:"/classrooms/".concat(se.coursesId,"/group_homework/").concat(se.categoryId,"/review/").concat(t.id)},"查看"),Object(b.c)()&&f.a.createElement(g.a,{className:"c-blue",target:"_blank",to:"/classrooms/".concat(se.coursesId,"/group_homework/").concat(se.categoryId,"/review/").concat(t.id)},t.has_comment?"已评阅":"评阅"),f.a.createElement("br",null),Object(b.c)()&&f.a.createElement(D.a,{placement:"bottom",title:f.a.createElement("p",null,"调整学生当前成绩",f.a.createElement("br",null),"其它历史评分将全部失效")},f.a.createElement("a",{className:"c-green",onClick:function(e){e.preventDefault(),te({type:"shixunHomeworks/setActionTabs",payload:{key:"调分",selectArrs:t,id:t.id,params:se}})}},"调分"))):f.a.createElement("div",null,"--")}}].filter((function(e){return!!e})),wt=Object(M.a)(xt.map((function(e){return Object(l.a)({},e)})));wt[0].render=function(e){return"我"};var Ct=function(){var e=Object(o.a)(h.a.mark((function e(){var t,n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ie(!0),e.next=3,Object(U.a)("/api/homework_commons/".concat(null==se?void 0:se.categoryId,"/export_student_works.json"),{method:"get",params:JSON.parse(sessionStorage.all_student_works_params)});case 3:0===(t=e.sent).status?null===(n=ne.current)||void 0===n||n.exportReport(t.files):ie(!1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return f.a.createElement("section",{className:"".concat(Y.a.wrap," minH500")},f.a.createElement("aside",null,f.a.createElement("aside",{className:"minH500 bg-white pl30 ".concat(Object(b.c)()?"pt30":""," pr30")},!(null!=le&&le.all_member_count)&&!Z["shixunHomeworks/getWorkList"]&&((null==le||null===(n=le.homework_status)||void 0===n?void 0:n.includes("未发布"))||(null==le||null===(r=le.homework_status)||void 0===r?void 0:r.includes("未开始")))&&f.a.createElement("aside",{className:"bg-white inline-block w100"},f.a.createElement(z.a,null)),!Object(b.c)()&&f.a.createElement("aside",{className:"pt10 pb10"},f.a.createElement("span",{className:"c-orange"},le.commit_count),"已交",f.a.createElement("span",{className:"ml10"},le.uncommit_count),"未交",(null==le||null===(i=le.left_time)||void 0===i?void 0:i.time)&&f.a.createElement("span",{className:"ml10"},f.a.createElement("span",null,null==le||null===(u=le.left_time)||void 0===u?void 0:u.status),f.a.createElement("span",{className:"c-orange"},null==le||null===(m=le.left_time)||void 0===m?void 0:m.time))),f.a.createElement("aside",null,!(null!=le&&null!==(v=le.homework_status)&&void 0!==v&&v.includes("未发布"))&&!(null!=le&&null!==(B=le.homework_status)&&void 0!==B&&B.includes("未开始"))&&f.a.createElement("aside",null,Object(b.c)()&&f.a.createElement("aside",{className:"mb30"},f.a.createElement(I.a,{form:vt,onChange:function(){se.page=1;var e=Object.assign({},vt.getFieldValue());delete se.course_group,delete se.teacher_comment,Object.keys(e).map((function(t){switch(t){case"teacher_comment":case"member_work":var n;if(e[t].length>1||!e[t].length)delete se[t],vt.setFieldsValue(Object(R.a)({},t,"all"));else se[t]=null===(n=e[t])||void 0===n?void 0:n[0];break;case"work_status":e[t].includes("all")||le.task_status.length===e[t].length||!e[t].length?(delete se.work_status,vt.setFieldsValue(Object(R.a)({},"work_status","all"))):(se.work_status=e[t],vt.setFieldsValue(Object(R.a)({},"work_status",se.work_status)));break;case"course_group_info":e[t].includes("all")||le[t].length===e[t].length||!e[t].length?(delete se.course_group,vt.setFieldsValue(Object(R.a)({},"course_group_info","all"))):(se.course_group=e[t],vt.setFieldsValue(Object(R.a)({},"course_group_info",se.course_group)))}})),yt()},initialValues:(K={},Object(R.a)(K,"member_work","all"),Object(R.a)(K,"work_status","all"),Object(R.a)(K,"course_group_info","all"),Object(R.a)(K,"teacher_comment","all"),K)},f.a.createElement(I.a.Item,{name:"teacher_comment"},f.a.createElement(L.a.Group,{style:{width:"100%"}},f.a.createElement(T.a,null,f.a.createElement(_.a,{flex:"80px",style:{fontSize:14}},"你的评阅:"),f.a.createElement(_.a,{flex:"80px"},f.a.createElement(L.a,{value:"all",checked:!he.teacher_comment},"全部")),f.a.createElement(_.a,{flex:"1"},le.teacher_comment&&le.teacher_comment.map((function(e){return f.a.createElement(L.a,{value:e.id,key:e.id},e.name,"(",e.count,")")})))))),f.a.createElement(I.a.Item,{name:"work_status"},f.a.createElement(L.a.Group,{value:[],style:{width:"100%"}},f.a.createElement(T.a,null,f.a.createElement(_.a,{flex:"80px",style:{fontSize:14}},"作品状态:"),f.a.createElement(_.a,{flex:"80px"},f.a.createElement(L.a,{value:"all",checked:!he.work_status},"全部")),f.a.createElement(_.a,{flex:"1"},le.task_status&&le.task_status.map((function(e){return f.a.createElement(L.a,{name:"work_status",value:e.id,key:e.id},e.name,"(",e.count,")")})))))),f.a.createElement(I.a.Item,{name:"member_work"},f.a.createElement(L.a.Group,{style:{width:"100%"}},f.a.createElement(T.a,null,f.a.createElement(_.a,{flex:"80px",style:{fontSize:14}},"组内角色:"),f.a.createElement(_.a,{flex:"80px"},f.a.createElement(L.a,{value:"all"},"全部")),f.a.createElement(_.a,{flex:"1"},[{name:"组长",id:1},{name:"组员",id:0}].map((function(e){return f.a.createElement(L.a,{value:e.id,key:e.id},e.name)})))))),f.a.createElement(I.a.Item,{name:"course_group_info"},f.a.createElement(L.a.Group,{style:{width:"100%"}},f.a.createElement(T.a,null,f.a.createElement(_.a,{flex:"80px",style:{fontSize:14}},"分班情况:"),f.a.createElement(_.a,{flex:"80px"},f.a.createElement(L.a,{value:"all",checked:!he.course_group},"全部")),f.a.createElement(_.a,{flex:"1",className:"".concat(Y.a.workListClass," ").concat(pt.visible?Y.a.visible:""," ").concat(pt.status?"":Y.a.status)},f.a.createElement("div",{ref:X,className:Y.a.left},le.course_group_info&&le.course_group_info.map((function(e){return f.a.createElement(L.a,{value:e.course_group_id,key:e.course_group_id},e.group_group_name,"(",e.count,")")}))),pt.status&&f.a.createElement("div",{className:Y.a.tips,onClick:function(){return mt(Object(l.a)(Object(l.a)({},pt),{},{visible:!pt.visible}))}},f.a.createElement("span",null,pt.visible?"展开":"收起",pt.visible?f.a.createElement(j.a,{style:{marginBottom:"3px",marginLeft:"2px"}}):f.a.createElement(N.a,{style:{marginBottom:"3px",marginLeft:"2px"}})))))))),f.a.createElement(T.a,{align:"middle"},f.a.createElement(_.a,{flex:"1"},f.a.createElement(T.a,{align:"middle"},f.a.createElement(_.a,null,f.a.createElement(O.a.Search,{allowClear:!0,placeholder:"请输入姓名或者学号搜索",onSearch:function(e){se.page=1,se.search=e,te({type:"shixunHomeworks/getWorkList",payload:Object(l.a)({},se)})},style:{width:240}})),f.a.createElement(_.a,null,f.a.createElement("span",{className:"ml5 c-red"},le.work_count),"个检索结果(",le.work_count,"个学生)"))),f.a.createElement(_.a,{style:{textAlign:"end"},className:Y.a.workListButtonWrap},f.a.createElement(S.a,{overlay:function(){return f.a.createElement(A.a,null,f.a.createElement(A.a.Item,{key:"1"},f.a.createElement("span",{onClick:function(){return Object(q.h)(JSON.parse(sessionStorage.all_student_works_params),"group_work_list")}},"导出成绩")),f.a.createElement(A.a.Item,{key:"3"},f.a.createElement(s.a,{loading:re,ghost:!0,style:{paddingLeft:0,background:"transparent"},type:"text",onClick:function(){return Ct()}},"导出作品附件")),f.a.createElement(A.a.Item,{key:"2"},f.a.createElement(g.a,{to:"/classrooms/".concat(se.coursesId,"/exportlist/group_work_list")},"历史导出")))}},f.a.createElement(s.a,null,f.a.createElement(P.a,null),"导出",f.a.createElement(F.a,null)))))),!!Le.length&&f.a.createElement(k.a,{className:"mb10",dataSource:Le,columns:wt,pagination:!1,showHeader:!1,loading:!1}),f.a.createElement("aside",{className:"mb30"},f.a.createElement(k.a,{loading:Z["shixunHomeworks/getWorkList"],hideOnSinglePage:!0,pagination:!1,dataSource:we,columns:xt,onChange:function(e,t,n){if(Re={},void 0===n.order)switch(Re[n.field]="descend",n.field){case"student_id":pe("descend"),se.b_order="desc"}else se.b_order=n.order.replace("end",""),Re[n.field]=n.order;Me(Object(l.a)({},Re)),se.order=n.field,te({type:"shixunHomeworks/getWorkList",payload:Object(l.a)({},se)})}}))))),f.a.createElement("aside",{className:"tc mb50 mt30"},f.a.createElement(E.a,{showSizeChanger:!1,hideOnSinglePage:!0,onChange:function(e,t){se.page=e,se.limit=20,yt()},defaultCurrent:se.page||1,current:se.page||1,defaultPageSize:20,total:Q.workList.work_count}))),f.a.createElement(W,null),f.a.createElement(V,null),Ne&&f.a.createElement(x.a,{title:"一键打回重做",visible:Ne,centered:!0,destroyOnClose:!0,forceRender:!0,width:700,onOk:Object(o.a)(h.a.mark((function e(){var t,n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(2!==Qe){e.next=13;break}if(!(He.length<=0)){e.next=4;break}return a.b.info("请选择作业状态"),e.abrupt("return");case 4:if(ut){e.next=7;break}return a.b.info("评语不能为空"),e.abrupt("return");case 7:return e.next=9,Object(U.a)("/api/homework_commons/".concat(se.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:se.categoryId,comment:ut,status:He}});case 9:0===(t=e.sent).status&&(Xe(t),Pe(!1),Ge(!0)),e.next=32;break;case 13:if(0!==ot&&0!==nt){e.next=16;break}e.next=22;break;case 16:if(ot){e.next=19;break}return a.b.info("最低分不能为空"),e.abrupt("return");case 19:if(nt){e.next=22;break}return a.b.info("最高分不能为空"),e.abrupt("return");case 22:if(!(ot>nt)){e.next=25;break}return a.b.info("最高分不能大于最低分"),e.abrupt("return");case 25:if(ut){e.next=28;break}return a.b.info("评语不能为空"),e.abrupt("return");case 28:return e.next=30,Object(U.a)("/api/homework_commons/".concat(se.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:se.categoryId,comment:ut,min_score:ot,max_score:nt}});case 30:0===(n=e.sent).status&&(Xe(n),Pe(!1),Ge(!0));case 32:case"end":return e.stop()}}),e)}))),onCancel:function(){Pe(!1),bt()}},f.a.createElement("div",{style:{padding:"32px"}},f.a.createElement("div",null,f.a.createElement("div",null,f.a.createElement("span",{style:{width:"80px"}},"打回方式:"),f.a.createElement(C.a.Group,{value:Qe,onChange:function(e){Ze(e.target.value)}},f.a.createElement(C.a,{value:1},"按成绩打回"),f.a.createElement(C.a,{value:2},"按作业状态打回"))),1===Qe&&f.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},f.a.createElement("span",{style:{width:"70px",textAlign:"end"}},f.a.createElement("span",{style:{color:"red"}},"*"),"最低分:"),f.a.createElement(w.a,{min:0,max:100,value:ot,onChange:function(e){return st(e)},style:{width:"100px"}}),f.a.createElement("span",{style:{width:"80px",textAlign:"end"}},f.a.createElement("span",{style:{color:"red"}},"*"),"最高分:"),f.a.createElement(w.a,{min:0,max:100,value:nt,onChange:function(e){return rt(e)},style:{width:"100px"}})),2===Qe&&f.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},f.a.createElement("span",{style:{width:"80px"}},"作业状态:"),f.a.createElement(L.a.Group,{onChange:function(e){Ue(Object(M.a)(e))},style:{width:"100%"}},null===($=le.task_status)||void 0===$?void 0:$.map((function(e,t){return f.a.createElement(L.a,{name:"task_status",value:e.id},e.name,"(",e.count,")")})))),f.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},f.a.createElement("span",{style:{width:"70px",textAlign:"end"}},f.a.createElement("span",{style:{color:"red"}},"*")," 评语:"),f.a.createElement(G.a,{className:Y.a.MdEditor,onChange:function(e){return ht(e)},placeholder:"请填写评语"}))))),We&&f.a.createElement(x.a,{visible:We,title:"打回确认",onOk:Object(o.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(2!==Qe){e.next=7;break}return e.next=3,Object(U.a)("/api/homework_commons/".concat(se.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:se.categoryId,comment:ut,status:He}});case 3:0===e.sent.status&&(a.b.info("打回成功"),bt(),yt(),Ge(!1)),e.next=11;break;case 7:return e.next=9,Object(U.a)("/api/homework_commons/".concat(se.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:se.categoryId,comment:ut,min_score:ot,max_score:nt}});case 9:0===e.sent.status&&(a.b.info("打回成功"),bt(),yt(),Ge(!1));case 11:case"end":return e.stop()}}),e)}))),onCancel:function(){bt(),Ge(!1)}},f.a.createElement("div",{style:{padding:"32px"}},1===Qe&&f.a.createElement("span",null,"确认将成绩在",ot,"-",nt,"的学生进行打回重做吗?"),2===Qe&&f.a.createElement("span",null,"确认将作业状态为",(null===(J=le.task_status)||void 0===J?void 0:J.filter((function(e){return null==He?void 0:He.includes(e.id)})).map((function(e){return e.name})).toString())+",","的学生进行作业打回重做吗?"),f.a.createElement("br",null),f.a.createElement("span",null,"该条件下共有",null==qe?void 0:qe.count,"名学生"))))})),J=n("m3rI"),Q=n("9Bee"),Z=Object(m.a)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var t=e.shixunHomeworks,n=e.dispatch;Object(p.i)();return f.a.createElement(x.a,{centered:!0,title:"提示",visible:"删除"===t.actionTabs.key,okText:"确定",cancelText:"取消",onOk:Object(o.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({type:"shixunHomeworks/deleteReply",payload:{object_id:t.actionTabs.selectArr.id,object_type:"journals_for_message"}});case 2:0===e.sent.status&&(a.b.success("删除成功"),n({type:"shixunHomeworks/setActionTabs",payload:{}}),n({type:"shixunHomeworks/getReplyList",payload:Object(l.a)({},t.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){n({type:"shixunHomeworks/setActionTabs",payload:{}})}},f.a.createElement("p",null,"确定要删除该条回复吗?"))})),ee=n("/MfK"),te=n("BtR2"),ne=n("nqnY"),re=n.n(ne),ie=n("p5ED");H.a.lang("ZH-cn");var ae=Object(m.a)((function(e){var t=e.shixunHomeworks,n=e.classroomList,r=e.user,i=e.loading;return{shixunHomeworks:t,globalSetting:e.globalSetting,user:r,classroomList:n,loading:i.effects}}))((function(e){var t,n,r,i,u=e.shixunHomeworks,m=e.classroomList,g=(e.globalSetting,e.loading,e.user),v=e.dispatch,x=Object(d.useState)(Object(l.a)({},Object(p.i)())),w=Object(c.a)(x,2),C=w[0],k=(w[1],Object(d.useState)(!1)),S=Object(c.a)(k,2),L=S[0],A=S[1],R=Object(d.useState)(-1),M=Object(c.a)(R,2),I=M[0],j=M[1],N=Object(d.useState)(""),P=Object(c.a)(N,2),F=P[0],B=P[1],H=Object(d.useState)(""),z=Object(c.a)(H,2),V=z[0],W=z[1],K=(u.workList,m.detailLeftMenus),Y=(u.shixunHomeworksDetail,u.replyList),q=u.workDetail;C.page_size=10;var X=Object(d.useState)({content:"",type:""}),$=Object(c.a)(X,2),ne=$[0],ae=$[1],oe=Object(d.useRef)();return Object(d.useEffect)((function(){v({type:"shixunHomeworks/getReplyList",payload:Object(l.a)({},C)}),v({type:"shixunHomeworks/getWorkDetail",payload:Object(l.a)({},C)}),K.course_modules||v({type:"classroomList/getClassroomLeftMenus",payload:Object(l.a)({},C)})}),[C.categoryId]),f.a.createElement("section",{className:re.a.bg},f.a.createElement("section",{className:""},f.a.createElement("aside",{className:[re.a.desc,"c-black","font14","bg-white"].join(" ")},"编辑作业"!==u.actionTabs.key&&f.a.createElement(Q.a,{value:(null==q?void 0:q.description)||"暂无~"}),"分组要求:",null==q||null===(t=q.group_info)||void 0===t?void 0:t.min_num," ~ ",null==q||null===(n=q.group_info)||void 0===n?void 0:n.max_num,"人 ",f.a.createElement("span",{className:"c-light-black"},"(学生提交作品时需要关联同组成员,组内成员作品共享)"),f.a.createElement("br",null),"基于项目实施:",null!=q&&null!==(r=q.group_info)&&void 0!==r&&r.base_on_project?"是":"否",f.a.createElement("span",{className:"c-light-black"},"(学生必须在本平台创建项目,项目管理员可以提交作品)"),null==q||null===(i=q.attachments)||void 0===i?void 0:i.map((function(e,t){return f.a.createElement("div",null,f.a.createElement("a",{href:"".concat(J.a.API_SERVER).concat(e.url),onClick:function(){var t=Object(o.a)(h.a.mark((function t(n){var r;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.preventDefault(),"txt"!==e.file_type){t.next=6;break}return t.next=4,Object(U.a)(e.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:r=t.sent,oe.current=r;case 6:ae({type:e.file_type,content:window.location.origin+e.url});case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},f.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),f.a.createElement("span",{className:"ml10 c-black"},e.title),f.a.createElement("span",{className:"c-light-black ml20 font12"},e.filesize),f.a.createElement("span",{className:"ml10 c-light-primary current",onClick:function(t){t.preventDefault(),Object(y.v)("","".concat(J.a.API_SERVER).concat(e.url))}},"下载"),f.a.createElement("span",{className:"ml10 c-green-29b current",onClick:function(){var t=Object(o.a)(h.a.mark((function t(n){var r;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.preventDefault(),"txt"!==e.file_type){t.next=6;break}return t.next=4,Object(U.a)(e.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:r=t.sent,oe.current=r;case 6:ae({type:e.file_type,content:window.location.origin+e.url});case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},"预览")))})),"编辑作业"===u.actionTabs.key&&f.a.createElement("aside",{className:["bg-white"].join(" ")},f.a.createElement(G.a,{onChange:function(e){B(e)},defaultValue:null==q?void 0:q.explanation,height:200,isFocus:!0,watch:!0}),f.a.createElement(T.a,null,f.a.createElement(_.a,{span:24,className:"tr"},f.a.createElement(s.a,{type:"default",size:"large",onClick:Object(o.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v({type:"shixunHomeworks/setActionTabs",payload:{key:""}});case 1:case"end":return e.stop()}}),e)})))},"取消"),f.a.createElement(s.a,{type:"primary",size:"large",className:"ml20",onClick:Object(o.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==F){e.next=4;break}a.b.error("请输入内容"),e.next=8;break;case 4:return e.next=6,v({type:"shixunHomeworks/updateWork",payload:{explanation:F,categoryId:C.categoryId}});case 6:0===e.sent.status&&(a.b.success("操作成功"),v({type:"shixunHomeworks/setActionTabs",payload:{key:""}}),v({type:"shixunHomeworks/getWorkDetail",payload:Object(l.a)({},C)}));case 8:case"end":return e.stop()}}),e)})))},"保存"))))),f.a.createElement("aside",{className:[re.a.reply,"bg-white","mt20"].join(" ")},L&&f.a.createElement(G.a,{onChange:function(e){B(e)},height:200,isFocus:!0,watch:!0}),f.a.createElement(T.a,{onClick:function(){A(!0)}},f.a.createElement(_.a,{flex:"1"},!L&&f.a.createElement(O.a,{size:"large",className:"current",placeholder:"说点什么",disabled:!0})),f.a.createElement(_.a,null,f.a.createElement(s.a,{type:"primary",size:"large",onClick:Object(o.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==F){e.next=4;break}a.b.error("请输入内容"),e.next=8;break;case 4:return e.next=6,v({type:"shixunHomeworks/createReply",payload:{journals_for_message:{jour_id:C.categoryId,jour_type:"HomeworkCommon",reply_id:1,notes:F}}});case 6:0===e.sent.status&&(a.b.success("发布成功"),v({type:"shixunHomeworks/getReplyList",payload:Object(l.a)({},C)}),A(!1),B(""));case 8:case"end":return e.stop()}}),e)})))},"发表")))),(null==Y?void 0:Y.comments)&&""!=Y.comments&&f.a.createElement("aside",{className:[re.a.replyList,"bg-white"].join(" ")},null==Y?void 0:Y.comments.map((function(e,t){var n,r,i,c;return f.a.createElement(T.a,{gutter:[12,12],key:t},f.a.createElement(_.a,{flex:"40px"},f.a.createElement("img",{className:re.a.headpic,width:"40",src:"".concat(J.a.IMG_SERVER,"/images/").concat(null==e||null===(n=e.author)||void 0===n?void 0:n.image_url)})),f.a.createElement(_.a,{flex:"1"},f.a.createElement(T.a,{align:"middle"},f.a.createElement(_.a,{span:20},f.a.createElement("span",{className:"c-light-black"},null==e||null===(r=e.author)||void 0===r?void 0:r.name),f.a.createElement("span",{className:"c-light-black ml10"},null==e?void 0:e.time," 发布")),f.a.createElement(_.a,{className:"tr",span:4},f.a.createElement("div",{className:"tr"},(Object(b.c)()||(null==g||null===(i=g.userInfo)||void 0===i?void 0:i.login)===(null==e||null===(c=e.author)||void 0===c?void 0:c.login))&&f.a.createElement(D.a,{title:"删除"},f.a.createElement(ee.a,{className:"current",onClick:function(){v({type:"shixunHomeworks/setActionTabs",payload:{key:"删除",params:C,selectArr:e}})}})))),f.a.createElement(_.a,{span:24},f.a.createElement(Q.a,{value:e.content})),e.children&&f.a.createElement("aside",{className:re.a.comment},e.children.map((function(e,t){var n,r;return f.a.createElement(T.a,{key:t},f.a.createElement(_.a,{span:24},f.a.createElement(T.a,null,f.a.createElement(_.a,{flex:"1"},e.author.name,f.a.createElement("span",{className:"c-light-black ml10"},null==e?void 0:e.time)),f.a.createElement(_.a,null,(Object(b.c)()||(null==g||null===(n=g.userInfo)||void 0===n?void 0:n.login)===(null==e||null===(r=e.author)||void 0===r?void 0:r.login))&&f.a.createElement(D.a,{title:"删除"},f.a.createElement(ee.a,{className:"current",onClick:function(){v({type:"shixunHomeworks/setActionTabs",payload:{key:"删除",params:C,selectArr:e}})}}))))),f.a.createElement(_.a,null,f.a.createElement(Q.a,{value:e.content})))}))),f.a.createElement(_.a,{span:24,className:"mt5 c-light-black"},I===t&&f.a.createElement("aside",null,f.a.createElement(G.a,{onChange:function(e){W(e)},height:150,isFocus:!0}),f.a.createElement(T.a,null,f.a.createElement(_.a,{span:24,className:"tr"},f.a.createElement(s.a,{type:"primary",size:"large",onClick:Object(o.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(""!==V){t.next=4;break}a.b.error("请输入内容"),t.next=9;break;case 4:return t.next=6,v({type:"shixunHomeworks/createReply",payload:{journals_for_message:{jour_id:C.categoryId,jour_type:"HomeworkCommon",m_parent_id:e.id,reply_id:1,notes:V}}});case 6:v({type:"shixunHomeworks/getReplyList",payload:Object(l.a)({},C)}),a.b.success("发布成功"),j(-1);case 9:case"end":return t.stop()}}),t)})))},"发表")))),I!==t&&f.a.createElement("div",{className:"tr"},f.a.createElement("span",{className:"iconfont icon-huifu1 mr5 ml30",onClick:function(){return j(t)}}),!!e.user_praise&&f.a.createElement("span",{className:"c-orange"},f.a.createElement(te.a,{className:"mr5 ml30",onClick:Object(o.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,v({type:"shixunHomeworks/replyUnLike",payload:{object_id:e.id,object_type:"journals_for_message"}});case 2:v({type:"shixunHomeworks/getReplyList",payload:Object(l.a)({},C)});case 3:case"end":return t.stop()}}),t)})))}),!!e.praise_count&&e.praise_count),!e.user_praise&&f.a.createElement("span",null,f.a.createElement(te.a,{className:"mr5 ml30",onClick:Object(o.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,v({type:"shixunHomeworks/replyLike",payload:{object_id:e.id,object_type:"journals_for_message"}});case 2:v({type:"shixunHomeworks/getReplyList",payload:Object(l.a)({},C)});case 3:case"end":return t.stop()}}),t)})))}),!!e.praise_count&&e.praise_count))))))})))),f.a.createElement("aside",{className:"tc mt30 pb30"},f.a.createElement(E.a,{defaultCurrent:1,total:null==Y?void 0:Y.total_count,hideOnSinglePage:!0,current:C.page||1,onChange:function(e){C.page=e,v({type:"shixunHomeworks/getReplyList",payload:Object(l.a)({},C)})}})),f.a.createElement(Z,null),f.a.createElement(ie.a,{close:!0,data:null==ne?void 0:ne.content,type:null==ne?void 0:ne.type,hasMask:!0,monacoEditor:{value:oe.current,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onClose:function(){return ae({content:"",type:""})}}))}));H.a.lang("ZH-cn");var oe=Object(m.a)((function(e){var t=e.shixunHomeworks,n=e.classroomList,r=e.loading;return{shixunHomeworks:t,globalSetting:e.globalSetting,classroomList:n,loading:r.effects}}))((function(e){var t,n=e.shixunHomeworks,r=e.classroomList,i=(e.globalSetting,e.loading,e.dispatch),a=Object(p.i)(),o=r.detailLeftMenus,s=(n.replyList,n.referenceAnswer);return a.page_size=10,Object(d.useEffect)((function(){i({type:"shixunHomeworks/getReplyList",payload:Object(l.a)({},a)}),i({type:"shixunHomeworks/getReferenceAnswer",payload:{coursesId:a.categoryId}}),o.course_modules||i({type:"classroomList/getClassroomLeftMenus",payload:Object(l.a)({},a)})}),[a.categoryId]),f.a.createElement("section",{className:"pb30 pl30 pr30 pt30 bg-white"},f.a.createElement("aside",{className:["c-black","font14"].join(" ")},"编辑作业"!==n.actionTabs.key&&f.a.createElement("div",null,(null==s?void 0:s.reference_answer)&&f.a.createElement(Q.a,{value:null==s?void 0:s.reference_answer}),!(null!=s&&s.reference_answer)&&f.a.createElement(z.a,null)),null==s||null===(t=s.attachments)||void 0===t?void 0:t.map((function(e,t){return f.a.createElement("div",null,f.a.createElement("a",{href:"".concat(J.a.API_SERVER).concat(e.url)},f.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),f.a.createElement("span",{className:"ml10 c-black"},e.title),f.a.createElement("span",{className:"c-light-black ml20 font12"},e.filesize)))}))))})),se=(n("iQDF"),n("+eQT")),le=n("PpiC"),ce=n("oUNq"),ue=n("4wi7");function he(e,t){for(var n=[],r=e;r0)){e.next=7;break}return a.b.info("发布班级不能为空"),e.abrupt("return");case 7:return s={homework_ids:Object(M.a)(t.actionTabs.selectArrs),group_ids:J.map((function(e){return e.id})),end_time:H()(o.end_time).format("YYYY-MM-DD HH:mm"),publish_time:H()(o.publish_time).format("YYYY-MM-DD HH:mm"),unified_setting:te},e.next=10,Object(U.a)("/api/courses/".concat(i.coursesId,"/homework_commons/publish_with_homework_list_position.json"),{method:"post",body:Object(l.a)({},s)});case 10:0===e.sent.status&&(Object(y.Y)(["教学课堂","图文作业","立即发布"]),a.b.success("发布成功"),n({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),"edit"===r.type&&r.onCallback&&r.onCallback(),Object(b.c)()?t.actionTabs.detail?(n({type:"shixunHomeworks/setActionTabs",payload:{}}),n({type:"shixunHomeworks/getWorkList",payload:Object(l.a)({},i)}),n({type:"shixunHomeworks/getWorkSetting",payload:Object(l.a)({},i)})):n({type:"classroomList/getClassroomTeacherCommonList",payload:Object(l.a)(Object(l.a)({},t.actionTabs.params),{},{type:3})}):n({type:"classroomList/getClassroomCommonList",payload:Object(l.a)({},t.actionTabs.params)}),"0"===localStorage.getItem("Noviceguide")||n({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:13,text:f.a.createElement("div",null,"最后,咱们给教学课堂添加一名学生~点击“添加学生”,在弹窗页面中输入并搜索学生姓名,点击“确定”就可以为您的课堂添加第一位学生啦~")}}));case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return f.a.createElement(x.a,{width:600,centered:!0,title:"发布作业",visible:"立即发布"===t.actionTabs.key,okText:"发布作业",cancelText:"暂不发布",onOk:ie,onCancel:function(){w(1),O([]),Q([]),n({type:"classroomList/setActionTabs",payload:{}})}},f.a.createElement("p",{className:"tc"},"学生将立即收到作业",f.a.createElement("br",null),'本操作只对"未发布"的作业有效'),S&&f.a.createElement(I.a,{form:u},f.a.createElement("div",{style:{paddingLeft:0}},f.a.createElement(T.a,{className:"mt30",align:"middle"},f.a.createElement(_.a,null,f.a.createElement(I.a.Item,{name:"publish_time",label:"发布时间"},f.a.createElement(se.a,{style:{width:155,marginRight:"25px"},getPopupContainer:function(e){return e.parentNode},disabledDate:function(e){return e&&e<=H()().subtract(0,"days")},disabledTime:de,placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:H()(Object(y.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1}))),f.a.createElement(_.a,{className:"ml20"},f.a.createElement(I.a.Item,{name:"end_time",label:"截止时间"},f.a.createElement(se.a,{style:{width:170},getPopupContainer:function(e){return e.parentNode},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:H()(Object(y.d)(),"HH:mm")},disabledDate:function(e){return e&&e0&&f.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"}},f.a.createElement("span",{style:{flex:1}},f.a.createElement(L.a,{checked:J.length===S.length,onChange:function(e){J.length===S.length?Q([]):Q(S.filter((function(e){return!e.is_published})))}},"全选")," "),f.a.createElement("span",{style:{width:16}}),f.a.createElement("span",{style:{flex:1}},"已选择",J.length||0,"个分班")),(1===t.actionTabs.type||!te)&&S.length>0&&f.a.createElement(ue.a,{data:S,selectedRowKeys:J,setSelectedRowKeys:Q})))})),pe=n("qbod"),me=n.n(pe),ge=Object(m.a)((function(e){return{classroomList:e.classroomList}}))((function(e){var t=e.classroomList,n=e.dispatch,r=e.cb,i=(Object(le.a)(e,["classroomList","dispatch","cb"]),Object(p.i)()),l=Object(d.useState)(null),u=Object(c.a)(l,2),m=u[0],g=u[1],v=Object(d.useState)([1,2,3,4,5]),y=Object(c.a)(v,2),b=y[0],C=y[1],E=Object(d.useState)(!1),k=Object(c.a)(E,2),S=(k[0],k[1]);Object(d.useEffect)((function(){t.actionTabs.key}),[t.actionTabs]);var O=function(){var e=Object(o.a)(h.a.mark((function e(){var t;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m){e.next=3;break}return a.b.warn("每个小组学生人数不能为空"),e.abrupt("return");case 3:return e.next=5,Object(U.a)("/api/is_checkout_data.json",{method:"get",params:{id:null==i?void 0:i.categoryId,group_num:m}});case 5:0===(null==(t=e.sent)?void 0:t.status)&&(n({type:"classroomList/setActionTabs",payload:{}}),r());case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=[{id:1,name:"总学时"},{id:2,name:"活跃时段"},{id:3,name:"历史成绩"},{id:4,name:"上课次数"},{id:5,name:"互动次数"}];return f.a.createElement(x.a,{width:500,centered:!0,afterClose:function(){S(!1),g(null),C([1,2,3,4,5])},title:"智能分组",visible:"智能分组"===t.actionTabs.key,footer:null,onCancel:function(){n({type:"classroomList/setActionTabs",payload:{}})}},f.a.createElement("div",{className:me.a.model},f.a.createElement("div",null,"每个小组学生人数:",f.a.createElement(w.a,{min:1,max:100,value:m,onChange:function(e){g(e)}})),f.a.createElement("div",{className:"mt20 mb10"},"分组规则:"),f.a.createElement(L.a.Group,{value:b,onChange:function(e){C(e)}},null==T?void 0:T.map((function(e,t){return f.a.createElement(L.a,{value:e.id}," ",e.name," ")}))),f.a.createElement("div",{className:"tr mb10 mt20"},f.a.createElement(s.a,{onClick:O,type:"primary"},"开始智能分组"))))})),ve=Object(m.a)((function(e){return{classroomList:e.classroomList}}))((function(e){var t=e.classroomList,n=e.dispatch,r=Object(le.a)(e,["classroomList","dispatch"]),i=Object(p.i)(),s=I.a.useForm(),u=Object(c.a)(s,1)[0],m=Object(d.useState)(1),g=Object(c.a)(m,2),v=g[0],w=g[1],C=Object(d.useState)([]),E=Object(c.a)(C,2),S=E[0],L=E[1],_=Object(d.useState)(0),A=Object(c.a)(_,2),D=(A[0],A[1]),j=Object(d.useState)(20),N=Object(c.a)(j,2),P=N[0],F=(N[1],Object(d.useState)(!0)),B=Object(c.a)(F,2),z=(B[0],B[1]),V=Object(d.useState)(),W=Object(c.a)(V,2),G=W[0],K=W[1],Y=Object(d.useState)([]),q=Object(c.a)(Y,2),X=q[0],$=q[1];i.id=i.coursesId,Object(d.useEffect)((function(){"立即截止"===t.actionTabs.key?J():($([]),L([]))}),[t.actionTabs.key]);var J=function(){var e=Object(o.a)(h.a.mark((function e(n){var r,a,o;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return z(!0),e.next=3,Object(ce.A)(Object(l.a)(Object(l.a)({},i),{},{page:n||v,limit:P,homework_id:1===t.actionTabs.type?"":t.actionTabs.selectArrs[0],end_homework_action:!0}));case 3:null==(r=e.sent)||r.course_groups.map((function(e){e.key=e.id})),r&&(L([].concat(Object(M.a)(S),Object(M.a)(null==r?void 0:r.course_groups))),D(null==r?void 0:r.group_count),K(null==r?void 0:r.course_groups),z(!1),n||u.setFieldsValue((o={},Object(R.a)(o,"group_ids",null==r||null===(a=r.course_groups)||void 0===a?void 0:a.map((function(e){return String(e.id)}))),Object(R.a)(o,"end_time",H()(H()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),o)));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Q=function(){var e=Object(o.a)(h.a.mark((function e(){var o;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Object(l.a)({},u.getFieldsValue()),console.log("----",o.group_ids),e.next=4,Object(U.a)("/api/courses/".concat(i.id,"/homework_commons/end_with_homework_list_position.json"),{method:"post",body:{homework_ids:Object(M.a)(t.actionTabs.selectArrs),group_ids:(null==X?void 0:X.length)>0?X:[],unified_setting:!(null!=S&&S.length),end_time:H()(o.end_time).format("YYYY-MM-DD HH:mm")}});case 4:0===e.sent.status&&(Z(),Object(y.Y)(["教学课堂","图文作业","立即截止"]),a.b.success("操作成功"),n({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),"edit"===r.type&&r.onCallback&&r.onCallback(),Object(b.c)()?(n({type:"classroomList/setActionTabs",payload:{}}),n({type:"classroomList/getClassroomTeacherCommonList",payload:Object(l.a)(Object(l.a)({},t.actionTabs.params),{},{type:3})})):n({type:"classroomList/getClassroomCommonList",payload:Object(l.a)({},t.actionTabs.params)}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Z=function(){w(1),L([])};return f.a.createElement(x.a,{centered:!0,title:"截止作业",visible:"立即截止"===t.actionTabs.key,okText:"截止作业",cancelText:"暂不截止",onOk:Q,onCancel:function(){Z(),n({type:"classroomList/setActionTabs",payload:{}})}},f.a.createElement("p",{className:"tc"},"学生将不能再提交作业",f.a.createElement("br",null),'本操作只对"提交中" “补交中”的作业有效'),S&&f.a.createElement(I.a,{form:u},f.a.createElement(T.a,null,f.a.createElement("span",{className:"mr5"},"截止时间:"),f.a.createElement(I.a.Item,{name:"end_time"},f.a.createElement(se.a,{style:{width:170},getPopupContainer:function(e){return e.parentNode},disabledDate:function(e){return e&&e0&&f.a.createElement(T.a,null,f.a.createElement("span",{className:"mr5"},"选择班级:"),f.a.createElement(O.a.Search,{style:{width:"300px"},onChange:function(e){L(G.filter((function(t){return t.name.indexOf(e.target.value)>-1})))}})),(null==S?void 0:S.length)>0&&1===t.actionTabs.type&&f.a.createElement(k.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,t){$(e)}},rowKey:"id",pagination:!1,dataSource:S,columns:[{title:"班级",dataIndex:"name",key:"name"}]}),(null==S?void 0:S.length)>0&&2===t.actionTabs.type&&f.a.createElement(k.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,t){$(e)}},rowKey:"id",pagination:!1,dataSource:S,columns:[{title:"班级",dataIndex:"name",key:"name"},{title:"发布时间",dataIndex:"publish_time",key:"publish_time"},{title:"截止时间",dataIndex:"end_time",key:"end_time"}]})))})),ye=(n("Q9mQ"),n("diRs")),be=(n("OaEy"),n("2fM7")),xe=n("w5pM"),we=n("Lyp1"),Ce=n("LvDl"),Ee=n("8B0h"),ke=n.n(Ee),Se=n("CiB2"),Oe=Object(m.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var t,n;Object(Se.a)(e);var r=Object(d.useState)(!0),i=Object(c.a)(r,2),l=i[0],u=i[1],m=Object(d.useState)(!1),g=Object(c.a)(m,2),v=g[0],y=g[1],b=Object(d.useState)([]),w=Object(c.a)(b,2),C=w[0],E=w[1],S=Object(d.useState)([]),L=Object(c.a)(S,2),A=L[0],D=L[1],R=Object(d.useState)([]),M=Object(c.a)(R,2),I=M[0],j=M[1],N=Object(d.useState)([]),P=Object(c.a)(N,2),F=P[0],B=P[1],H=Object(p.i)();function V(){return W.apply(this,arguments)}function W(){return(W=Object(o.a)(h.a.mark((function e(){var t;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(U.a)("/api/homework_commons/".concat(H.categoryId,"/homework_common_collaborators.json"),{method:"get"});case 2:t=e.sent,D(t);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(){return K.apply(this,arguments)}function K(){return(K=Object(o.a)(h.a.mark((function e(){var t;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(U.a)("/api/courses/".concat(null==H?void 0:H.coursesId,"/teachers"),{method:"get",params:{homework_id:H.categoryId}});case 2:null==(t=e.sent)||t.teacher_list.map((function(e){e.key=e.user_id})),j(null==t?void 0:t.teacher_list),B(null==t?void 0:t.teacher_list);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(d.useEffect)((function(){V(),G()}),[H]);return f.a.createElement("section",{className:[ke.a.form," bg-white pl30 pr30 pt10"].join(" ")},f.a.createElement(T.a,null,f.a.createElement(_.a,{flex:"1"},f.a.createElement("span",{style:{fontSize:"16px"}},"协作设置"),(null==A?void 0:A.can_edit)&&f.a.createElement("span",{style:{cursor:"pointer",color:"#0152d9",marginLeft:"10px"},onClick:function(){y(!0)}},"+添加协作者"))),f.a.createElement(T.a,{style:{marginTop:"20px",marginBottom:"20px"}},(null==A||null===(t=A.data)||void 0===t?void 0:t.length)<=0&&f.a.createElement(z.a,{customText:"该作业暂无协作者"}),null==A||null===(n=A.data)||void 0===n?void 0:n.map((function(e){return f.a.createElement("span",{key:e.id,style:{display:"inline-flex",height:"40px",borderRadius:"4px",border:"1px solid #44D7B6",padding:"7px 20px",color:"#44D7B6",marginRight:"40px",marginBottom:20}},f.a.createElement("span",{style:{flex:"1"}},null==e?void 0:e.real_name),(null==A?void 0:A.can_edit)&&f.a.createElement("span",{style:{cursor:"pointer",marginLeft:"10px"},onClick:Object(o.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(U.a)("/api/homework_commons/".concat(H.categoryId,"/homework_common_collaborators/delete.json"),{method:"delete",body:{user_id:e.id}});case 2:0===t.sent.status&&(a.b.info("删除成功"),V(),G());case 4:case"end":return t.stop()}}),t)})))},"X"))}))),f.a.createElement(T.a,null,!l&&f.a.createElement(_.a,{className:"mb50"},f.a.createElement(s.a,{type:"primary",size:"large",onClick:function(){}},"提交"),f.a.createElement(s.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){u(!0)}},"取消"))),f.a.createElement(x.a,{title:"添加协作者",visible:v,onCancel:function(){return y(!1)},onOk:Object(o.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==C.length){e.next=3;break}return a.b.info("请选择协作老师"),e.abrupt("return");case 3:return e.next=5,Object(U.a)("/api/homework_commons/".concat(H.categoryId,"/homework_common_collaborators.json"),{method:"post",body:{user_ids:C}});case 5:0===e.sent.status&&(a.b.info("添加成功"),E([]),V(),G(),y(!1));case 7:case"end":return e.stop()}}),e)})))},f.a.createElement("div",null,f.a.createElement("div",{style:{display:"flex"}},f.a.createElement("label",{style:{width:"50px"}},"姓名:")," ",f.a.createElement(O.a.Search,{onChange:function(e){j(F.filter((function(t){return t.name.indexOf(e.target.value)>-1})))}})),f.a.createElement(k.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,t){E(e)},selectedRowKeys:C,getCheckboxProps:function(e){return{disabled:e.is_collaborator}}},pagination:!1,dataSource:I,columns:[{title:"姓名",dataIndex:"name",key:"name"},{title:"角色",dataIndex:"role",key:"role"}]}))))})),Te=se.a.RangePicker,Le=be.a.Option,_e=Object(m.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var t,n,i,o=e.shixunHomeworks,u=(e.loading,e.dispatch),h=Object(p.i)(),m=(Object(p.h)(),o.workSetting),g=o.workList,v=Object(d.useState)(!0),x=Object(c.a)(v,2),E=x[0],k=x[1],S=Object(d.useState)({}),O=Object(c.a)(S,2),A=(O[0],O[1],I.a.useForm()),R=(Object(c.a)(A,1)[0],Object(d.useState)([])),j=Object(c.a)(R,2),N=j[0],P=j[1],F=Object(d.useState)([]),B=Object(c.a)(F,2),U=B[0],z=B[1],V=Object(d.useState)({unified_setting:!1,publish_time:"",end_time:"",ta_mode:1,final_mode:!1,st_proportion:"20%",ta_proportion:"30%",te_proportion:"50%",student_comment:!1,anonymous_appeal:!1,appeal_penalty:0,appeal_time:"",anonymous_comment:!1,evaluation_num:0,evaluation_start:"",evaluation_end:"",absence_penalty:0,work_public:!1,allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,total_score:"",eff_score:""}),W=Object(c.a)(V,2),G=W[0],K=W[1],Y=(null==g||null===(t=g.homework_status)||void 0===t?void 0:t.includes("匿评中"))||(null==g||null===(n=g.homework_status)||void 0===n?void 0:n.includes("申诉中"))||(null==g||null===(i=g.homework_status)||void 0===i?void 0:i.includes("已截止"));Object(d.useEffect)((function(){Z()}),[]),Object(d.useEffect)((function(){null!=m&&m.course_id&&(Object.keys(G).map((function(e){e.indexOf("proportion")>-1&&(m[e]=100*m[e]),G[e]=m[e]})),G.allow_late&&G.unified_late||(G.late_penalty=5),N=JSON.parse(JSON.stringify(m.group_settings.map((function(e){return Object(l.a)(Object(l.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),U=JSON.parse(JSON.stringify(m.allow_late_settings.map((function(e){return Object(l.a)(Object(l.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),K(Object(l.a)({},G)),P(Object(M.a)(N)),z(Object(M.a)(U)))}),[m]);var q,X,$,J,Q,Z=function(){u({type:"shixunHomeworks/getWorkSetting",payload:Object(l.a)({},h)})},te=function(e){return e&&e0?f.a.createElement(_.a,{span:24,className:"mt10"},f.a.createElement(L.a,{checked:G.unified_setting,disabled:E||!(null!=g&&null!==($=g.homework_status)&&void 0!==$&&$.includes("未发布")),onChange:function(){var e;null!=g&&null!==(e=g.homework_status)&&void 0!==e&&e.includes("未发布")?(G.unified_setting=!G.unified_setting,G.unified_setting||(G.unified_late=!1),K(Object.assign({},G)),""!=N?G.unified_setting&&(P([]),z([{late_penalty:5}])):P([{}])):a.b.error("已发布,不能再修改统一设置")}},f.a.createElement("strong",null,"统一设置")),f.a.createElement("span",{className:"c-grey-c font12"},"(选中则所有分班使用相同的发布设置,仅课堂管理员可修改;否则各个分班允许单独设置)")):null),G.unified_setting&&f.a.createElement("div",null,f.a.createElement(T.a,{align:"middle",className:"mt25 pl30"},f.a.createElement(_.a,null,"发布时间:"),f.a.createElement(_.a,{className:"ml5"},f.a.createElement(D.a,{title:!(null!=g&&null!==(J=g.homework_status)&&void 0!==J&&J.includes("未发布"))&&"发布时间已过,不能再修改"},f.a.createElement(se.a,{style:{width:170},placeholder:"请选择发布时间",showTime:{format:"HH:mm",defaultValue:H()(Object(y.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1,disabled:E||H()()>H()(m.publish_time),value:G.publish_time?H()(G.publish_time):"",disabledDate:te,onChange:function(e,t){G.publish_time=t,!G.end_time&&G.unified_setting&&(G.end_time=H()(e).add(1,"month").format("YYYY-MM-DD HH:mm:ss")),K(Object.assign({},G))}}))),f.a.createElement(_.a,null,f.a.createElement("span",{className:"c-grey-c ml10"},"(学生收到作业的时间)"))),f.a.createElement(T.a,{align:"middle",className:"mt25 pl30"},f.a.createElement(_.a,null,"截止时间:"),f.a.createElement(_.a,{className:"ml5"},f.a.createElement(se.a,{allowClear:!1,style:{width:170},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:H()(Object(y.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:E,disabledDate:te,value:G.end_time?H()(G.end_time):"",onChange:function(e,t){G.end_time=t,K(Object.assign({},G))}})),f.a.createElement(_.a,null,f.a.createElement("span",{className:"c-grey-c ml10"},"(学生“按时”提交作品的时间截点)")))),!G.unified_setting&&f.a.createElement(T.a,{style:{marginTop:30,paddingTop:40,marginLeft:40,borderTop:"1px solid #eee"}},f.a.createElement(_.a,{span:24},f.a.createElement(T.a,null,f.a.createElement(_.a,{span:10}),f.a.createElement(_.a,{span:1}),f.a.createElement(_.a,{span:9},f.a.createElement(T.a,{className:"c-grey-c "},f.a.createElement(_.a,{flex:"1"},"(学生收到作业时间)"),f.a.createElement(_.a,{flex:"1"},"(学生“按时”提交作品时间截点)"))),f.a.createElement(_.a,{span:4}))),N&&N.map((function(e,t){var n,r;return f.a.createElement(_.a,{span:24,key:t},f.a.createElement(T.a,null,f.a.createElement(_.a,{span:10},f.a.createElement(T.a,{gutter:[8,16]},f.a.createElement(_.a,null,"发布规则 ",t+1),f.a.createElement(_.a,{flex:"auto",style:{maxWidth:350}},f.a.createElement(be.a,{disabled:E||!(null!=g&&null!==(n=g.homework_status)&&void 0!==n&&n.includes("未发布"))&&e.id,className:"ml20",mode:"multiple",style:{width:"100%"},value:e.group_name,placeholder:"请选择分班名称",onChange:function(n){N[t].group_name=n,N[t].group_id=e.group_id;var r=Object(Ce.flattenDeep)(N.map((function(e){return e.group_name}))),i=U.map((function(e){var t=(null==e?void 0:e.group_name)||[];return Object(l.a)(Object(l.a)({},e),{},{group_name:Object(Ce.remove)(t,(function(e){return r.includes(e)}))})}));z(i),P(N.slice())}},m.group_settings&&m.group_settings.map((function(e){if(!N.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name)))return f.a.createElement(Le,{value:e.group_name,key:e.id},e.group_name)})))))),f.a.createElement(_.a,{span:1}),f.a.createElement(_.a,{span:9},f.a.createElement(Te,{allowClear:!1,disabled:E||!(null!=g&&null!==(r=g.homework_status)&&void 0!==r&&r.includes("未发布"))&&e.id&&[!0,!1],style:{width:400},placeholder:["请选择发布时间","请选择截止时间"],disabledDate:te,showTime:{format:"HH:mm",defaultValue:[H()(Object(y.d)(),"HH:mm"),H()(Object(y.d)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:e.publish_time&&[H()(e.publish_time),H()(e.end_time)],onChange:function(e,n){N[t].publish_time=n[0],N[t].end_time=n[1],P(Object(M.a)(N))}})),!E&&f.a.createElement(_.a,{span:4},t>0&&!e.id&&f.a.createElement(ee.a,{onClick:function(){N=N.filter((function(e,n){return t!==n})),P(N.slice()),setTimeout((function(){return P(N.slice())}),10)}}),f.a.createElement(xe.a,{className:"c-green ml20",onClick:function(){P(N.concat({}))}}))))}))),f.a.createElement(T.a,null,f.a.createElement(_.a,null,f.a.createElement("strong",null,"补交设置")),f.a.createElement(_.a,{span:24,className:"mt15 pl30"},f.a.createElement(L.a,{checked:G.allow_late,disabled:E,onChange:function(){G.allow_late=!G.allow_late,""==U&&z([{late_penalty:5}]),K(Object.assign({},G))}},f.a.createElement("strong",null,"开启补交")),f.a.createElement("span",{className:"c-grey-c font12"},"(选中,则允许学生延时提交作品)"))),(null==G?void 0:G.allow_late)&&f.a.createElement("div",{style:{marginLeft:22}},f.a.createElement("div",{className:"ml30 mt20"},f.a.createElement("span",null,"补交方式:"),f.a.createElement(C.a.Group,{disabled:E,value:G.unified_late,onChange:function(e){G.unified_late=e.target.value,""!=U||e.target.value||z([{late_penalty:5}]),K(Object(l.a)({},G))}},(null==G?void 0:G.unified_setting)&&f.a.createElement(C.a,{value:!0}," 统一补交 "),(null==m||null===(Q=m.group_settings)||void 0===Q?void 0:Q.length)&&f.a.createElement(C.a,{value:!1}," 分班补交 "))),null!=G&&G.unified_late?f.a.createElement(f.a.Fragment,null,f.a.createElement(T.a,{align:"middle",className:"mt25 pl30"},f.a.createElement(_.a,null,"补交扣分:"),f.a.createElement(_.a,{className:"ml5"},f.a.createElement(w.a,{disabled:E||!G.allow_late,value:G.late_penalty,onChange:function(e){G.late_penalty=e,K(Object.assign({},G))}})),f.a.createElement(_.a,{flex:"1",className:"ml5"},"分",f.a.createElement("span",{className:"c-grey-c ml10"},"(延时提交作品时,学生成绩将被扣减的分值)"))),f.a.createElement(T.a,{align:"middle",className:"mt25 pl30"},f.a.createElement(_.a,null,"补交截止时间:"),f.a.createElement(_.a,{className:"ml5"},f.a.createElement(se.a,{allowClear:!1,style:{width:170},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:H()(Object(y.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:E||!G.allow_late,value:G.late_time?H()(G.late_time):"",disabledDate:te,onChange:function(e,t){G.late_time=t,K(Object.assign({},G))}})),f.a.createElement(_.a,null,f.a.createElement("span",{className:"c-grey-c ml10"},"(学生“延时”提交作品的时间截点)")))):U.map((function(e,t){var n;return f.a.createElement(_.a,{span:24,key:t},f.a.createElement(T.a,{className:"mt25"},f.a.createElement(_.a,{style:{marginLeft:30}},f.a.createElement("span",null,"补交规则",t+1,":"),f.a.createElement(be.a,{disabled:E||!(null!=g&&null!==(n=g.homework_status)&&void 0!==n&&n.includes("未发布"))&&e.id,mode:"multiple",style:{width:306},value:"string"==typeof e.group_name?[e.group_name]:e.group_name,placeholder:"请选择分班名称",onChange:function(n){U[t].group_name=n,U[t].group_id=e.group_id,z(U.slice())}},m.group_settings&&m.group_settings.map((function(e){return null!=G&&G.unified_setting&&!U.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))||N.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))&&!U.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))?f.a.createElement(Le,{value:e.group_name,key:e.id},e.group_name):void 0})))),f.a.createElement(_.a,{className:"ml20"},f.a.createElement("span",null,"补交扣分:"),f.a.createElement(w.a,{min:0,max:100,disabled:E,defaultValue:e.late_penalty,onChange:function(e){U[t].late_penalty=e}})),f.a.createElement(_.a,{className:"ml20"},f.a.createElement("span",null,"补交截止时间:"),f.a.createElement(se.a,{disabled:E,style:{width:200},showTime:{format:"HH:mm",defaultValue:H()(Object(y.d)(),"HH:mm")},placeholder:"请选择截止时间",disabledDate:te,format:"YYYY-MM-DD HH:mm",value:null!=e&&e.late_time?H()(e.late_time):void 0,onChange:function(e,n){U[t].late_time=n,z(Object(M.a)(U))}})),!E&&f.a.createElement(_.a,{className:"ml20"},t>0&&!e.id&&f.a.createElement(ee.a,{onClick:function(){U=U.filter((function(e,n){return t!==n})),z(U.slice()),setTimeout((function(){return z(U.slice())}),10)}}),f.a.createElement(xe.a,{className:"c-green ml20",onClick:function(){z(U.concat({late_penalty:5}))}}))))}))))),f.a.createElement(r.a.TabPane,{tab:"匿评设置",key:"3"},f.a.createElement("div",{className:"bg-white pl30 pr30 pb30"},f.a.createElement(T.a,null,f.a.createElement(_.a,{span:24},f.a.createElement(T.a,{align:"middle"},f.a.createElement(_.a,{flex:"1"},f.a.createElement("h1",{className:"mt15"},"匿评设置")),f.a.createElement(_.a,null,Object(b.c)()&&E&&f.a.createElement(s.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return k(!1)}},"编辑设置")))),f.a.createElement(_.a,{span:24,className:"mt15 pl30"},f.a.createElement(L.a,{checked:G.anonymous_comment,disabled:E||(null===(q=g.homework_status)||void 0===q?void 0:q.includes("匿评中")),onChange:function(){G.anonymous_comment=!G.anonymous_comment,G.allow_late&&!G.evaluation_start?G.late_time&&""!=G.late_time&&(G.evaluation_start=H()(G.late_time).add(14,"day").format("YYYY-MM-DD HH:mm:ss"),G.evaluation_end=H()(G.late_time).add(28,"day").format("YYYY-MM-DD HH:mm:ss")):G.unified_setting&&!G.evaluation_start&&G.end_time&&""!=G.end_time&&(G.evaluation_start=H()(G.end_time).add(14,"day").format("YYYY-MM-DD HH:mm:ss"),G.evaluation_end=H()(G.end_time).add(28,"day").format("YYYY-MM-DD HH:mm:ss")),G.anonymous_comment&&(G.evaluation_num=parseInt(G.evaluation_num)?G.evaluation_num:3,G.absence_penalty=parseInt(G.absence_penalty)?G.absence_penalty:3),K(Object.assign({},G))}},f.a.createElement("strong",null,"启用匿评")),f.a.createElement("span",{className:"c-grey-c font12"},"(提交作品的数量≥2个,可以开启匿评;为确保公平,匿评规则确定后不可再修改,请谨慎操作!)"))),f.a.createElement(T.a,{align:"middle",className:"mt25 pl30"},f.a.createElement(_.a,null,"开始时间:"),f.a.createElement(_.a,{className:"ml5"},f.a.createElement(se.a,{allowClear:!1,style:{width:170},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:H()(Object(y.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:E||!G.anonymous_comment||Y,value:G.evaluation_start?H()(G.evaluation_start):"",onChange:function(e,t){G.evaluation_start=t,K(Object.assign({},G))}})),f.a.createElement(_.a,null,f.a.createElement("span",{className:"c-grey-c ml10"},"(匿评开始时间之前提交作品的学生,参与匿评)"))),f.a.createElement(T.a,{align:"middle",className:"mt25 pl30"},f.a.createElement(_.a,null,"结束时间:"),f.a.createElement(_.a,{className:"ml5"},f.a.createElement(se.a,{allowClear:!1,style:{width:170},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:H()(Object(y.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:E||!G.anonymous_comment||Y,value:G.evaluation_end?H()(G.evaluation_end):"",onChange:function(e,t){G.evaluation_end=t,K(Object.assign({},G))}})),f.a.createElement(_.a,null,f.a.createElement("span",{className:"c-grey-c ml10"},"(学生匿评TA人作品的时间截点)"))),f.a.createElement(T.a,{align:"middle",className:"mt25 pl30"},f.a.createElement(_.a,null,"匿评数量:"),f.a.createElement(_.a,{className:"ml5"},f.a.createElement(w.a,{disabled:E||!G.anonymous_comment||Y,value:G.evaluation_num,onChange:function(e){G.evaluation_num=e,K(Object.assign({},G))}})),f.a.createElement(_.a,{flex:"1",className:"ml5"},f.a.createElement("span",{className:"c-grey-c ml10"},"(本处填写每个学生将被分配的匿评作品数量。如全班实际提交作业数量小于本数值,则以实际提交作业数量为准。)"))),f.a.createElement(T.a,{align:"middle",className:"mt25 pl30"},f.a.createElement(_.a,null,"缺评扣分:"),f.a.createElement(_.a,{className:"ml5"},f.a.createElement(w.a,{min:0,disabled:E||!G.anonymous_comment||Y,value:G.absence_penalty,onChange:function(e){G.absence_penalty=e,K(Object.assign({},G))}})),f.a.createElement(_.a,{flex:"1",className:"ml5"},"分",f.a.createElement("span",{className:"c-grey-c ml10"},"(学生缺评时,其成绩将被扣减的分值)"))),G.anonymous_comment&&f.a.createElement(f.a.Fragment,null,f.a.createElement(T.a,null,f.a.createElement(_.a,{span:24,className:"mt15 pl30"},f.a.createElement(L.a,{checked:G.student_comment,disabled:E||H()(G.evaluation_start)100)throw a.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!G.late_time)throw a.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整")}else{var n;U=null===(n=U)||void 0===n?void 0:n.map((function(e){var t,n;if(null===e.late_penalty||void 0===e.late_penalty||e.late_penalty<0||e.late_penalty>100)throw a.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw a.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(!e.group_name)throw a.b.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(n=t.map((function(e){var t,n,r=null===(t=m.group_settings)||void 0===t||null===(n=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===n?void 0:n[0];return null==r?void 0:r.group_id})))||void 0===n?void 0:n.toString().split(","),e})),t.allow_late_settings=U}if(G.evaluation_start){if(G.end_time&&H()(G.evaluation_start)<=H()(G.end_time))throw a.b.error("匿评开启时间要晚于作业截止时间、补交截止时间"),new String("匿评开启时间要晚于作业截止时间、补交截止时间");if(G.late_time&&H()(G.evaluation_start)<=H()(G.late_time))throw a.b.error("匿评开启时间要晚于作业截止时间、补交截止时间"),new String("匿评开启时间要晚于作业截止时间、补交截止时间")}Object.keys(t).map((function(e){e.indexOf("proportion")>-1&&(t[e]=t[e]/100)})),u({type:"shixunHomeworks/updateSetting",payload:t}).then((function(e){0===e.status&&(a.b.success("更新成功"),k(!0),Z())}))}()}},"提交"),f.a.createElement(s.a,{onClick:function(){k(!0),Z()},type:"primary",size:"large",ghost:!0,className:"ml20"},"取消"))))})),Ae=(n("cWXX"),n("/ezw")),De=(n("R9oj"),n("ECub")),Re=n("Nnv5"),Me=n.n(Re),Ie=Object(m.a)((function(e){return{user:e.user}}))((function(e){e.exercise,e.dispatch,e.user;var t=e.studentGroupingIndex,n=Object(p.i)(),r=Object(d.useState)({page:1,limit:10,exercise_id:null==n?void 0:n.categoryId}),i=Object(c.a)(r,2),a=i[0],s=i[1],u=Object(d.useState)([]),m=Object(c.a)(u,2),g=m[0],v=m[1],y=Object(d.useState)(0),b=Object(c.a)(y,2),x=b[0],w=(b[1],Object(d.useState)(!0)),C=Object(c.a)(w,2),k=C[0],S=C[1];Object(d.useEffect)((function(){O(Object(l.a)(Object(l.a)({},a),{},{page:1})),s(Object(l.a)(Object(l.a)({},a),{},{page:1}))}),[t]);var O=function(){var e=Object(o.a)(h.a.mark((function e(t){var r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),e.next=3,Object(U.a)("/api/checkout_data.json",{method:"get",params:Object(l.a)({},n)});case 3:"成功"===(null==(r=e.sent)?void 0:r.errmsg)&&v(Object.values(null==r?void 0:r.group_info)),S(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();console.log(g,2222);return f.a.createElement("section",{className:Me.a.wrap},f.a.createElement("div",{className:Me.a.warpList},f.a.createElement(Ae.a,{loading:k,active:!0},g.length?f.a.createElement("div",{className:Me.a.sys},f.a.createElement("ol",{className:Me.a.head},f.a.createElement("li",null,"序号"),f.a.createElement("li",null,"姓名"),f.a.createElement("li",null,"学号"),f.a.createElement("li",null,"班级"),f.a.createElement("li",null,"总学时"),f.a.createElement("li",null,"上课次数"),f.a.createElement("li",null,"互动次数"),f.a.createElement("li",null,"历史成绩"),f.a.createElement("li",null,"活跃时间"),f.a.createElement("li",null,"金币")),g.map((function(e,t){return f.a.createElement("div",{className:Me.a.list,key:t},f.a.createElement("div",{className:Me.a.name},"第",t+1,"组"),null==e?void 0:e.map((function(e,t){return f.a.createElement("ol",{key:t,className:Me.a.tr},f.a.createElement("li",null,t+1),f.a.createElement("li",null,e["姓名"]),f.a.createElement("li",null,e["学号"]),f.a.createElement("li",null,e["班级"]),f.a.createElement("li",null,e["总学时"]),f.a.createElement("li",null,e["上课次数"]),f.a.createElement("li",null,e["互动次数"]),f.a.createElement("li",null,e["历史成绩"]),f.a.createElement("li",null,e["活跃时间"]),f.a.createElement("li",null,e["金币"]))})))}))):f.a.createElement(De.a,null)),f.a.createElement(E.a,{showTotal:function(e){return f.a.createElement("span",{className:"mr10"},"共",f.a.createElement("span",{className:"c-orange"},e),"条数据")},className:"tc mt20",showSizeChanger:!1,showQuickJumper:!1,hideOnSinglePage:!0,onChange:function(e,t){a.page=e,a.limit=t,s(Object(l.a)({},a)),O(a)},pageSize:null==a?void 0:a.limit,current:a.page,total:x})))})),je=n("5VF8"),Ne=n("6vEo"),Pe=n("XYT7"),Fe=n("8GSA"),Be=n("IQq8"),He=n.n(Be),Ue=n("632R"),ze=n.n(Ue);t.default=Object(m.a)((function(e){var t=e.user,n=e.shixunHomeworks,r=e.loading;return{user:t,shixunHomeworks:n,globalSetting:e.globalSetting,loading:r.effects}}))((function(e){var t,n,u=e.shixunHomeworks,x=e.user,w=e.dispatch,C=Object(d.useState)(Object(l.a)({},Object(p.i)())),E=Object(c.a)(C,2),k=E[0],S=E[1],O=Object(p.h)(),T=Object(d.useState)(O.query.tabs||"0"),L=Object(c.a)(T,2),_=L[0],A=L[1],D=Object(d.useState)(!1),R=Object(c.a)(D,2),M=R[0],I=R[1],j=Object(d.useState)(1),N=Object(c.a)(j,2),P=N[0],F=N[1],B=Object(d.useRef)(null),H=u.workList;O.query.category_id&&S(Object(l.a)(Object(l.a)({},k),{},{category:O.query.category_id})),Object(d.useEffect)((function(){ee()}),[k.coursesId]);var U,z,V,W,G,K,Y,q,X,J,Q,Z,ee=function(){w({type:"shixunHomeworks/getWorkList",payload:Object(l.a)({},k)})},te=[{name:Object(b.c)()?"作业列表":"作品列表",id:0,compontent:f.a.createElement($,{zip:B,btnLoading:M,setBtnLoading:I})},{name:"学生分组",id:5,compontent:f.a.createElement("div",{className:"minH500"},f.a.createElement(Ie,{studentGroupingIndex:P}))},{name:"作业描述",id:1,compontent:f.a.createElement("div",{className:"minH500"},f.a.createElement(ae,null))},{name:"参考答案",id:2,compontent:f.a.createElement(oe,null)},{name:Object(b.c)()?"设置":"得分规则",id:3,compontent:f.a.createElement(_e,null)}].filter((function(e){return null!=H&&H.view_answer?Object(b.u)()?e:"学生分组"!==e.name:"参考答案"!==e.name}));return f.a.createElement("section",{className:ze.a.bg},f.a.createElement("div",{className:"edu-container"},H.homework_name&&f.a.createElement("section",{className:"animated fadeIn"},f.a.createElement("aside",{className:"mt10"},H.category&&f.a.createElement(i.a,{separator:">"},f.a.createElement(i.a.Item,null,f.a.createElement(g.a,{to:"/classrooms/".concat(H.course_id,"/group_homework")},H.course_name)),f.a.createElement(i.a.Item,null,f.a.createElement(g.a,{to:"/classrooms/".concat(null==H?void 0:H.course_id,"/group_homework/").concat(null!=H&&null!==(t=H.category)&&void 0!==t&&t.main?"":null==H||null===(n=H.category)||void 0===n?void 0:n.category_id)},H.category.category_name)),f.a.createElement(i.a.Item,null,"作业详情"))),f.a.createElement("aside",{className:[ze.a.title,"mt20"].join(" ")},f.a.createElement(g.a,{to:"/classrooms/".concat(H.course_id,"/group_homework")},f.a.createElement(v.a,{className:"font16 c-black"})),f.a.createElement("strong",{className:"font20 ml5"},H.homework_name),f.a.createElement(y.k,{status:H.homework_status}))),f.a.createElement("aside",{className:"mt30 relative ".concat(ze.a.workListTabWrap)},f.a.createElement(r.a,{type:"card",activeKey:_,tabBarExtraContent:f.a.createElement("div",{className:ze.a.workListTabButton},Object(b.c)()&&f.a.createElement(f.a.Fragment,null,((null===(U=H.homework_status)||void 0===U?void 0:U.includes("未发布"))||(null===(z=H.homework_status)||void 0===z?void 0:z.includes("未开始")))&&f.a.createElement(s.a,{type:"primary",icon:f.a.createElement("i",{className:"iconfont icon-yishezhifabushijian1"}),onClick:function(e){e.preventDefault(),w({type:"classroomList/setActionTabs",payload:{key:"立即发布",selectArrs:[k.categoryId],selectArrsAll:[],params:Object(l.a)(Object(l.a)({},k),{},{id:k.coursesId}),type:2}})}},"立即发布"),!(null!==(V=H.homework_status)&&void 0!==V&&V.includes("未发布"))&&!(null!==(W=H.homework_status)&&void 0!==W&&W.includes("未开始"))&&!(null!==(G=H.homework_status)&&void 0!==G&&G.includes("已截止"))&&H.can_end&&f.a.createElement(s.a,{type:"primary",icon:f.a.createElement("i",{className:"iconfont icon-jiezhishiyan"}),onClick:function(e){e.preventDefault(),w({type:"classroomList/setActionTabs",payload:{key:"立即截止",selectArrs:[k.categoryId],selectArrsAll:[],params:Object(l.a)(Object(l.a)({},k),{},{id:k.coursesId}),type:2}})}},"立即截止"),Object(b.u)()&&f.a.createElement(s.a,{type:"primary",icon:f.a.createElement("img",{style:{transform:"translate(-3px, -1px)"},src:He.a}),onClick:function(){w({type:"classroomList/setActionTabs",payload:{key:"智能分组",params:Object(l.a)(Object(l.a)({},k),{},{id:k.coursesId})}})}},"智能分组"),f.a.createElement(s.a,{type:"primary",icon:f.a.createElement("i",{className:"iconfont icon-bianji2"}),onClick:function(){return m.d.push("/classrooms/".concat(k.coursesId,"/group_homework/").concat(k.categoryId,"/edit"))}},"编辑作业")),(null==H||null===(K=H.work_statuses)||void 0===K?void 0:K.includes("取消关联"))&&f.a.createElement(s.a,{type:"primary",onClick:Object(o.a)(h.a.mark((function e(){var t;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Pe.h)({homeworkId:k.categoryId});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(a.b.success("取消关联成功"),w({type:"shixunHomeworks/getWorkList",payload:Object(l.a)({},k)}));case 4:case"end":return e.stop()}}),e)})))},"取消关联"),(null==H||null===(Y=H.work_statuses)||void 0===Y?void 0:Y.includes("关联项目"))&&f.a.createElement(s.a,{type:"primary",onClick:function(){var e,t;return Object(y.O)("".concat(null===(e=x.navigationInfo)||void 0===e||null===(t=e.top)||void 0===t?void 0:t.old_url,"/projects/deposit/new"))}},"创建项目"),(null==H||null===(q=H.work_statuses)||void 0===q?void 0:q.includes("关联项目"))&&f.a.createElement(s.a,{type:"primary",onClick:function(e){e.preventDefault(),w({type:"classroomList/setActionTabs",payload:{key:"关联项目",params:k,selectArrs:{homework_id:k.categoryId},cb:function(){w({type:"shixunHomeworks/getWorkList",payload:Object(l.a)({},k)})}}})}},"关联项目"),(null==H||null===(X=H.work_statuses)||void 0===X?void 0:X.includes("提交作品"))&&f.a.createElement(s.a,{type:"primary",onClick:function(){return Object(y.O)("/classrooms/".concat(H.course_id,"/group_homework/").concat(H.homework_id,"/post"))}},"提交作品"),(null==H||null===(J=H.work_statuses)||void 0===J?void 0:J.includes("修改作品"))&&f.a.createElement(s.a,{type:"primary",onClick:function(){return Object(y.O)("/classrooms/".concat(H.course_id,"/group_homework/").concat(H.homework_id,"/").concat(H.id,"/edit"))}},"修改作品"),(null==H||null===(Q=H.work_statuses)||void 0===Q?void 0:Q.includes("补交作品"))&&f.a.createElement(s.a,{type:"primary",onClick:function(){return Object(y.O)("/classrooms/".concat(H.course_id,"/group_homework/").concat(H.homework_id,"/post"))}},"补交作品"),(null==H||null===(Z=H.work_statuses)||void 0===Z?void 0:Z.includes("补交附件"))&&f.a.createElement(s.a,{type:"primary",onClick:function(){w({type:"classroomList/setActionTabs",payload:{key:"补交附件",params:k,selectArrs:Object(l.a)({},H)}})}},"补交附件")),onTabClick:function(e,t){if(2===parseInt(e)){if(null==H||!H.view_answer)return void a.b.info("本次作业老师未公开答案");(null==H?void 0:H.time_status)>2||Object(b.d)()?A(e):a.b.info("截止之后的试卷才能查看答案")}else A(e)},className:ze.a.tabs},te.map((function(e,t){return f.a.createElement(r.a.TabPane,{tab:e.name,key:e.id},e.compontent)}))))),f.a.createElement(Ne.a,null),f.a.createElement(je.a,null),f.a.createElement(fe,{type:"edit",onCallback:function(){return ee()}}),f.a.createElement(ve,{type:"edit",onCallback:function(){return ee()}}),f.a.createElement(ge,{cb:function(){F(P+1),A("5")}}),f.a.createElement(ve,{type:"edit",onCallback:function(){return ee()}}),f.a.createElement(Fe.a,{ref:B,hide:!0,name:"".concat(null==H?void 0:H.homework_name,"-作品附件"),onOk:function(){return I(!1)}}))}))},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(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n("q1tI"),i=n.n(r),a=n("TSYQ"),o=n.n(a),s={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},l=function(e){var t=e.map((function(){return Object(r.useRef)()})),n=Object(r.useRef)();return Object(r.useEffect)((function(){var e=Date.now(),r=!1;Object.keys(t).forEach((function(i){var a=t[i].current;if(a){r=!0;var o=a.style;o.transitionDuration=".3s, .3s, .3s, .06s",n.current&&e-n.current<100&&(o.transitionDuration="0s, 0s")}})),r&&(n.current=Date.now())})),[t]};function c(){return(c=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var f=function(e){var t=e.className,n=e.percent,r=e.prefixCls,a=e.strokeColor,s=e.strokeLinecap,h=e.strokeWidth,f=e.style,p=e.trailColor,m=e.trailWidth,g=e.transition,v=d(e,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete v.gapPosition;var y=Array.isArray(n)?n:[n],b=Array.isArray(a)?a:[a],x=u(l(y),1)[0],w=h/2,C=100-h/2,E="M ".concat("round"===s?w:0,",").concat(w,"\n L ").concat("round"===s?C:100,",").concat(w),k="0 0 100 ".concat(h),S=0;return i.a.createElement("svg",c({className:o()("".concat(r,"-line"),t),viewBox:k,preserveAspectRatio:"none",style:f},v),i.a.createElement("path",{className:"".concat(r,"-line-trail"),d:E,strokeLinecap:s,stroke:p,strokeWidth:m||h,fillOpacity:"0"}),y.map((function(e,t){var n={strokeDasharray:"".concat(e,"px, 100px"),strokeDashoffset:"-".concat(S,"px"),transition:g||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},a=b[t]||b[b.length-1];return S+=e,i.a.createElement("path",{key:t,className:"".concat(r,"-line-path"),d:E,strokeLinecap:s,stroke:a,strokeWidth:h,fillOpacity:"0",ref:x[t],style:n})})))};f.defaultProps=s;function p(){return(p=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var y=0;function b(e){return+e.replace("%","")}function x(e){return Array.isArray(e)?e:[e]}function w(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,o=50-r/2,s=0,l=-o,c=0,u=-2*o;switch(a){case"left":s=-o,l=0,c=2*o,u=0;break;case"right":s=o,l=0,c=-2*o,u=0;break;case"bottom":l=o,u=2*o}var h="M 50,50 m ".concat(s,",").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:n,strokeDasharray:"".concat(t/100*(d-i),"px ").concat(d,"px"),strokeDashoffset:"-".concat(i/2+e/100*(d-i),"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(e){var t,n=e.prefixCls,a=e.strokeWidth,s=e.trailWidth,c=e.gapDegree,u=e.gapPosition,h=e.trailColor,d=e.strokeLinecap,f=e.style,g=e.className,C=e.strokeColor,E=e.percent,k=v(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),S=Object(r.useMemo)((function(){return y+=1}),[]),O=w(0,100,h,a,c,u),T=O.pathString,L=O.pathStyle,_=x(E),A=x(C),D=A.find((function(e){return"[object Object]"===Object.prototype.toString.call(e)})),R=m(l(_),1)[0];return i.a.createElement("svg",p({className:o()("".concat(n,"-circle"),g),viewBox:"0 0 100 100",style:f},k),D&&i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"".concat(n,"-gradient-").concat(S),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(D).sort((function(e,t){return b(e)-b(t)})).map((function(e,t){return i.a.createElement("stop",{key:t,offset:e,stopColor:D[e]})})))),i.a.createElement("path",{className:"".concat(n,"-circle-trail"),d:T,stroke:h,strokeLinecap:d,strokeWidth:s||a,fillOpacity:"0",style:L}),(t=0,_.map((function(e,r){var o=A[r]||A[A.length-1],s="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(n,"-gradient-").concat(S,")"):"",l=w(t,e,o,a,c,u);return t+=e,i.a.createElement("path",{key:r,className:"".concat(n,"-circle-path"),d:l.pathString,stroke:s,strokeLinecap:d,strokeWidth:a,opacity:0===e?0:1,fillOpacity:"0",style:l.pathStyle,ref:R[r]})}))).reverse())};C.defaultProps=s;var E=C},hW8S: +/*!******************************************************!*\ + !*** ./node_modules/rc-table/es/utils/legacyUtil.js ***! + \******************************************************/ +/*! exports provided: INTERNAL_COL_DEFINE, getExpandableProps, getDataAndAriaProps */ +/*! exports used: INTERNAL_COL_DEFINE, getDataAndAriaProps, getExpandableProps */function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=(n(/*! rc-util/es/warning */"Kwbf"),"RC_TABLE_INTERNAL_COL_DEFINE");function o(e){var t=e.expandable,n=Object(i.a)(e,["expandable"]);return"expandable"in e?Object(r.a)(Object(r.a)({},n),t):n}function s(e){return Object.keys(e).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)||(t[n]=e[n]),t}),{})}},k3GJ: +/*!*******************************************************!*\ + !*** ./node_modules/rc-tabs/es/index.js + 50 modules ***! + \*******************************************************/ +/*! exports provided: TabPane, default */ +/*! exports used: TabPane, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.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/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-align/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-dropdown/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.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/canUseDom.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Portal.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/raf.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.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/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return Gt}));var r=n("rePB"),i=n("ODXe"),a=n("Ff2n"),o=n("VTBJ"),s=n("q1tI"),l=n("TSYQ"),c=n.n(l),u=n("Zm9Q"),h=n("6cGi"),d=n("KQm4"),f=n("xEkU"),p=n.n(f),m=n("t23M");function g(e){var t=Object(s.useRef)(),n=Object(s.useRef)(!1);return Object(s.useEffect)((function(){return function(){n.current=!0,p.a.cancel(t.current)}}),[]),function(){for(var r=arguments.length,i=new Array(r),a=0;a1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),i=r.marginLeft,a=r.marginRight;n+=+i.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},ne=function(e,t,n){e&&"object"===Object(R.a)(e.style)&&(e.style[t]=n)},re=n("bdgK"),ie=n("i8i4"),ae=n.n(ie),oe=n("wgJM"),se=n("l4aY"),le=n("m+aA"),ce=n("c+Xe"),ue=n("zT1h"),he=n("QC+M");function de(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var fe=n("MNnm");function pe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var me,ge,ve,ye=(me=Object(fe.a)(),ge="undefined"!=typeof window?window:{},ve={animationend:pe("Animation","AnimationEnd"),transitionend:pe("Transition","TransitionEnd")},me&&("AnimationEvent"in ge||delete ve.animationend.animation,"TransitionEvent"in ge||delete ve.transitionend.transition),ve),be={};if(Object(fe.a)()){var xe=document.createElement("div");be=xe.style}var we={};function Ce(e){if(we[e])return we[e];var t=ye[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i1&&void 0!==arguments[1]?arguments[1]:2;t();var a=Object(oe.a)((function(){i<=1?r({isCanceled:function(){return a!==e.current}}):n(r,i-1)}));e.current=a},t]}(),c=Object(i.a)(l,2),u=c[0],h=c[1];return Ae((function(){if("none"!==a&&"end"!==a){var e=De.indexOf(a),n=De[e+1],r=t(a);!1===r?o(n):u((function(e){function t(){e.isCanceled()||o(n)}!0===r?t():Promise.resolve(r).then(t)}))}}),[e,a]),s.useEffect((function(){return function(){h()}}),[]),[function(){o("prepare")},a]};function Ie(e,t,n,a){var l=a.motionEnter,c=void 0===l||l,u=a.motionAppear,h=void 0===u||u,d=a.motionLeave,f=void 0===d||d,p=a.motionDeadline,m=a.motionLeaveImmediately,g=a.onAppearPrepare,v=a.onEnterPrepare,y=a.onLeavePrepare,b=a.onAppearStart,x=a.onEnterStart,w=a.onLeaveStart,C=a.onAppearActive,E=a.onEnterActive,k=a.onLeaveActive,S=a.onAppearEnd,O=a.onEnterEnd,T=a.onLeaveEnd,L=a.onVisibleChanged,_=_e(),A=Object(i.a)(_,2),D=A[0],R=A[1],M=_e("none"),I=Object(i.a)(M,2),j=I[0],N=I[1],P=_e(null),F=Object(i.a)(P,2),B=F[0],H=F[1],U=Object(s.useRef)(!1),z=Object(s.useRef)(null),V=Object(s.useRef)(!1),W=Object(s.useRef)(null);function G(){return n()||W.current}var K=Object(s.useRef)(!1);function Y(e){var t,n=G();e&&!e.deadline&&e.target!==n||("appear"===j&&K.current?t=null==S?void 0:S(n,e):"enter"===j&&K.current?t=null==O?void 0:O(n,e):"leave"===j&&K.current&&(t=null==T?void 0:T(n,e)),!1===t||V.current||(N("none"),H(null)))}var q=function(e){var t=Object(s.useRef)(),n=Object(s.useRef)(e);n.current=e;var r=s.useCallback((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(Te,r),e.removeEventListener(Oe,r))}return s.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(Te,r),e.addEventListener(Oe,r),t.current=e)},i]}(Y),X=Object(i.a)(q,1)[0],$=s.useMemo((function(){var e,t,n;switch(j){case"appear":return e={},Object(r.a)(e,"prepare",g),Object(r.a)(e,"start",b),Object(r.a)(e,"active",C),e;case"enter":return t={},Object(r.a)(t,"prepare",v),Object(r.a)(t,"start",x),Object(r.a)(t,"active",E),t;case"leave":return n={},Object(r.a)(n,"prepare",y),Object(r.a)(n,"start",w),Object(r.a)(n,"active",k),n;default:return{}}}),[j]),J=Me(j,(function(e){if("prepare"===e){var t=$.prepare;return!!t&&t(G())}var n;ee in $&&H((null===(n=$[ee])||void 0===n?void 0:n.call($,G(),null))||null);return"active"===ee&&(X(G()),p>0&&(clearTimeout(z.current),z.current=setTimeout((function(){Y({deadline:!0})}),p))),!0})),Q=Object(i.a)(J,2),Z=Q[0],ee=Q[1],te=Re(ee);K.current=te,Ae((function(){R(t);var n,r=U.current;(U.current=!0,e)&&(!r&&t&&h&&(n="appear"),r&&t&&c&&(n="enter"),(r&&!t&&f||!r&&m&&!t&&f)&&(n="leave"),n&&(N(n),Z()))}),[t]),Object(s.useEffect)((function(){("appear"===j&&!h||"enter"===j&&!c||"leave"===j&&!f)&&N("none")}),[h,c,f]),Object(s.useEffect)((function(){return function(){clearTimeout(z.current),V.current=!0}}),[]),Object(s.useEffect)((function(){void 0!==D&&"none"===j&&(null==L||L(D))}),[D,j]);var ne=B;return $.prepare&&"start"===ee&&(ne=Object(o.a)({transition:"none"},ne)),[j,ee,ne,null!=D?D:t]}var je=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(){return Object(C.a)(this,n),t.apply(this,arguments)}return Object(E.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(s.Component);var Ne=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===Object(R.a)(e)&&(t=e.transitionSupport);var a=s.forwardRef((function(e,t){var a=e.visible,l=void 0===a||a,u=e.removeOnLeave,h=void 0===u||u,d=e.forceRender,f=e.children,p=e.motionName,m=e.leavedClassName,g=e.eventProps,v=n(e),y=Object(s.useRef)(),b=Object(s.useRef)();var x=Ie(v,l,(function(){try{return Object(le.a)(y.current||b.current)}catch(e){return null}}),e),w=Object(i.a)(x,4),C=w[0],E=w[1],k=w[2],S=w[3],O=s.useRef(S);S&&(O.current=!0);var T=Object(s.useRef)(t);T.current=t;var L,_=s.useCallback((function(e){y.current=e,Object(ce.b)(T.current,e)}),[]),A=Object(o.a)(Object(o.a)({},g),{},{visible:l});if(f)if("none"!==C&&n(e)){var D,R;"prepare"===E?R="prepare":Re(E)?R="active":"start"===E&&(R="start"),L=f(Object(o.a)(Object(o.a)({},A),{},{className:c()(Le(p,C),(D={},Object(r.a)(D,Le(p,"".concat(C,"-").concat(R)),R),Object(r.a)(D,p,"string"==typeof p),D)),style:k}),_)}else L=S?f(Object(o.a)({},A),_):!h&&O.current?f(Object(o.a)(Object(o.a)({},A),{},{className:m}),_):d?f(Object(o.a)(Object(o.a)({},A),{},{style:{display:"none"}}),_):null;else L=null;return s.createElement(je,{ref:b},L)}));return a.displayName="CSSMotion",a}(Se);function Pe(e){var t;return t=e&&"object"===Object(R.a)(e)&&"key"in e?e:{key:e},Object(o.a)(Object(o.a)({},t),{},{key:String(t.key)})}function Fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Pe)}function Be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,a=Fe(e),s=Fe(t);a.forEach((function(e){for(var t=!1,a=r;a1}));return c.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 He=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ne,n=function(e){Object(S.a)(r,e);var n=Object(O.a)(r);function r(){var e;return Object(C.a)(this,r),(e=n.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(o.a)(Object(o.a)({},e),{},{status:"removed"})}))}}))},e}return Object(E.a)(r,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,r=this.props,i=r.component,o=r.children,l=r.onVisibleChanged,c=Object(a.a)(r,["component","children","onVisibleChanged"]),u=i||s.Fragment,h={};return He.forEach((function(e){h[e]=c[e],delete c[e]})),delete c.keys,s.createElement(u,c,n.map((function(n){var r=n.status,i=Object(a.a)(n,["status"]),c="add"===r||"keep"===r;return s.createElement(t,Object(w.a)({},h,{key:i.key,visible:c,eventProps:i,onVisibleChanged:function(t){null==l||l(t,{key:i.key}),t||e.removeKey(i.key)}}),o)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,i=Fe(n);return{keyEntities:Be(r,i).filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||"removed"!==t.status||"remove"!==e.status}))}}}]),r}(s.Component);n.defaultProps={component:"div"}}(Se);var Ue=Ne;function ze(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function Ve(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,i=e.mask,a=e.maskMotion,l=e.maskAnimation,u=e.maskTransitionName;if(!i)return null;var h={};return(a||u||l)&&(h=Object(o.a)({motionAppear:!0},ze({motion:a,prefixCls:t,transitionName:u,animation:l}))),s.createElement(Ue,Object(w.a)({},h,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return s.createElement("div",{style:{zIndex:r},className:c()("".concat(t,"-mask"),n)})}))}var We=n("9mu1"),Ge=n("o0o1"),Ke=n.n(Ge),Ye=n("HaE+"),qe=["measure","align",null,"motion"],Xe=s.forwardRef((function(e,t){var n=e.visible,r=e.prefixCls,a=e.className,l=e.style,u=e.children,h=e.zIndex,d=e.stretch,f=e.destroyPopupOnHide,p=e.forceRender,m=e.align,g=e.point,v=e.getRootDomNode,y=e.getClassNameFromAlign,b=e.onAlign,x=e.onMouseEnter,C=e.onMouseLeave,E=e.onMouseDown,k=e.onTouchStart,S=Object(s.useRef)(),O=Object(s.useRef)(),T=Object(s.useState)(),L=Object(i.a)(T,2),_=L[0],A=L[1],D=function(e){var t=s.useState({width:0,height:0}),n=Object(i.a)(t,2),r=n[0],a=n[1];return[s.useMemo((function(){var t={};if(e){var n=r.width,i=r.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,r]),function(e){a({width:e.offsetWidth,height:e.offsetHeight})}]}(d),R=Object(i.a)(D,2),M=R[0],I=R[1];var j=function(e,t){var n=Object(s.useState)(null),r=Object(i.a)(n,2),a=r[0],o=r[1],l=Object(s.useRef)(),c=Object(s.useRef)(!1);function u(e){c.current||o(e)}function h(){oe.a.cancel(l.current)}return Object(s.useEffect)((function(){u("measure")}),[e]),Object(s.useEffect)((function(){switch(a){case"measure":t()}a&&(l.current=Object(oe.a)(Object(Ye.a)(Ke.a.mark((function e(){var t,n;return Ke.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=qe.indexOf(a),(n=qe[t+1])&&-1!==t&&u(n);case 3:case"end":return e.stop()}}),e)})))))}),[a]),Object(s.useEffect)((function(){return function(){c.current=!0,h()}}),[]),[a,function(e){h(),l.current=Object(oe.a)((function(){u((function(e){switch(a){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){d&&I(v())})),N=Object(i.a)(j,2),P=N[0],F=N[1],B=Object(s.useRef)();function H(){var e;null===(e=S.current)||void 0===e||e.forceAlign()}function U(e,t){var n=y(t);_!==n&&A(n),"align"===P&&(_!==n?Promise.resolve().then((function(){H()})):F((function(){var e;null===(e=B.current)||void 0===e||e.call(B)})),null==b||b(e,t))}var z=Object(o.a)({},ze(e));function V(){return new Promise((function(e){B.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=z[e];z[e]=function(e,n){return F(),null==t?void 0:t(e,n)}})),s.useEffect((function(){z.motionName||"motion"!==P||F()}),[z.motionName,P]),s.useImperativeHandle(t,(function(){return{forceAlign:H,getElement:function(){return O.current}}}));var W=Object(o.a)(Object(o.a)({},M),{},{zIndex:h,opacity:"motion"!==P&&"stable"!==P&&n?0:void 0,pointerEvents:"stable"===P?void 0:"none"},l),G=!0;!(null==m?void 0:m.points)||"align"!==P&&"stable"!==P||(G=!1);var K=u;return s.Children.count(u)>1&&(K=s.createElement("div",{className:"".concat(r,"-content")},u)),s.createElement(Ue,Object(w.a)({visible:n,ref:O,leavedClassName:"".concat(r,"-hidden")},z,{onAppearPrepare:V,onEnterPrepare:V,removeOnLeave:f,forceRender:p}),(function(e,t){var n=e.className,i=e.style,l=c()(r,a,_,n);return s.createElement(We.a,{target:g||v,key:"popup",ref:S,monitorWindowResize:!0,disabled:G,align:m,onAlign:U},s.createElement("div",{ref:t,className:l,onMouseEnter:x,onMouseLeave:C,onMouseDownCapture:E,onTouchStartCapture:k,style:Object(o.a)(Object(o.a)({},i),W)},K))}))}));Xe.displayName="PopupInner";var $e=Xe,Je=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.visible,i=e.zIndex,a=e.children,l=e.mobile,u=(l=void 0===l?{}:l).popupClassName,h=l.popupStyle,d=l.popupMotion,f=void 0===d?{}:d,p=l.popupRender,m=s.useRef();s.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return m.current}}}));var g=Object(o.a)({zIndex:i},h),v=a;return s.Children.count(a)>1&&(v=s.createElement("div",{className:"".concat(n,"-content")},a)),p&&(v=p(v)),s.createElement(Ue,Object(w.a)({visible:r,ref:m,removeOnLeave:!0},f),(function(e,t){var r=e.className,i=e.style,a=c()(n,u,r);return s.createElement("div",{ref:t,className:a,style:Object(o.a)(Object(o.a)({},i),g)},v)}))}));Je.displayName="MobilePopupInner";var Qe=Je,Ze=["visible","mobile"],et=s.forwardRef((function(e,t){var n=e.visible,r=e.mobile,l=Object(a.a)(e,Ze),c=Object(s.useState)(n),u=Object(i.a)(c,2),h=u[0],d=u[1],f=Object(s.useState)(!1),p=Object(i.a)(f,2),m=p[0],g=p[1],v=Object(o.a)(Object(o.a)({},l),{},{visible:h});Object(s.useEffect)((function(){d(n),n&&r&&g(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4)))}())}),[n,r]);var y=m?s.createElement(Qe,Object(w.a)({},v,{mobile:r,ref:t})):s.createElement($e,Object(w.a)({},v,{ref:t}));return s.createElement("div",null,s.createElement(Ve,v),y)}));et.displayName="Popup";var tt=et,nt=s.createContext(null);function rt(){}function it(){return""}function at(e){return e?e.ownerDocument:window.document}var ot=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var st,lt,ct=(st=he.a,(lt=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(e){var r,i;return Object(C.a)(this,n),(r=t.call(this,e)).popupRef=s.createRef(),r.triggerRef=s.createRef(),r.attachId=void 0,r.clickOutsideHandler=void 0,r.touchOutsideHandler=void 0,r.contextMenuOutsideHandler1=void 0,r.contextMenuOutsideHandler2=void 0,r.mouseDownTimeout=void 0,r.focusTime=void 0,r.preClickTime=void 0,r.preTouchTime=void 0,r.delayTimer=void 0,r.hasPopupMouseDown=void 0,r.onMouseEnter=function(e){var t=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",e),r.delaySetPopupVisible(!0,t,t?null:e)},r.onMouseMove=function(e){r.fireEvents("onMouseMove",e),r.setPoint(e)},r.onMouseLeave=function(e){r.fireEvents("onMouseLeave",e),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onPopupMouseEnter=function(){r.clearDelayTimer()},r.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Object(se.a)(null===(t=r.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onFocus=function(e){r.fireEvents("onFocus",e),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))},r.onMouseDown=function(e){r.fireEvents("onMouseDown",e),r.preClickTime=Date.now()},r.onTouchStart=function(e){r.fireEvents("onTouchStart",e),r.preTouchTime=Date.now()},r.onBlur=function(e){r.fireEvents("onBlur",e),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)},r.onContextMenu=function(e){e.preventDefault(),r.fireEvents("onContextMenu",e),r.setPopupVisible(!0,e)},r.onContextMenuClose=function(){r.isContextMenuToShow()&&r.close()},r.onClick=function(e){if(r.fireEvents("onClick",e),r.focusTime){var t;if(r.preClickTime&&r.preTouchTime?t=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?t=r.preClickTime:r.preTouchTime&&(t=r.preTouchTime),Math.abs(t-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,e)},r.onPopupMouseDown=function(){var e;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(e=r.context).onPopupMouseDown.apply(e,arguments)},r.onDocumentClick=function(e){if(!r.props.mask||r.props.maskClosable){var t=e.target,n=r.getRootDomNode(),i=r.getPopupDomNode();Object(se.a)(n,t)&&!r.isContextMenuOnly()||Object(se.a)(i,t)||r.hasPopupMouseDown||r.close()}},r.getRootDomNode=function(){var e=r.props.getTriggerDOMNode;if(e)return e(r.triggerRef.current);try{var t=Object(le.a)(r.triggerRef.current);if(t)return t}catch(e){}return ae.a.findDOMNode(Object(k.a)(r))},r.getPopupClassNameFromAlign=function(e){var t=[],n=r.props,i=n.popupPlacement,a=n.builtinPlacements,o=n.prefixCls,s=n.alignPoint,l=n.getPopupClassNameFromAlign;return i&&a&&t.push(function(e,t,n,r){for(var i=n.points,a=Object.keys(e),o=0;o=r.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(r.subMenuTitle.offsetWidth,"px"))}},r.saveSubMenuTitle=function(e){r.subMenuTitle=e},r.getBaseProps=function(){var e=Object(k.a)(r).props,t=r.getMode();return{mode:"horizontal"===t?"vertical":t,visible:r.getVisible(),level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:r.onSubMenuClick,onSelect:r.onSelect,onDeselect:r.onDeselect,onDestroy:r.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:r.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(k.a)(r),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[Q(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:r.internalMenuId,manualRef:r.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},r.getMotion=function(e,t){var n=Object(k.a)(r).haveRendered,i=r.props,a=i.motion,s=i.rootPrefixCls;return Object(o.a)(Object(o.a)({},a),{},{leavedClassName:"".concat(s,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var i=e.store,a=e.eventKey,l=i.getState().defaultActiveFirst;r.isRootMenu=!1;var c=!1;return l&&(c=l[a]),mt(i,a,c),r.state={mode:e.mode,isOpen:e.isOpen},r}return Object(E.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,i=t.manualRef,a=t.isOpen,o=function(){e.setState({mode:n,isOpen:a})},s=a!==this.state.isOpen,l=n!==this.state.mode;(l||s)&&(oe.a.cancel(this.updateStateRaf),l?this.updateStateRaf=Object(oe.a)(o):o()),i&&i(this),"horizontal"===n&&(null==r?void 0:r.isRootMenu)&&a&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),oe.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(e,t){var n=this.getBaseProps();return s.createElement(Ot,Object(w.a)({},n,{id:this.internalMenuId,className:e,style:t}),this.props.children)}},{key:"renderChildren",value:function(){var e=this,t=this.getBaseProps(),n=t.mode,i=t.visible,a=t.forceSubMenuRender,o=t.direction,l=this.getMotion(n,i);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||i||a,!this.haveOpened)return s.createElement("div",null);var u=c()("".concat(t.prefixCls,"-sub"),Object(r.a)({},"".concat(t.prefixCls,"-rtl"),"rtl"===o));return this.isInlineMode()?s.createElement(Ue,Object(w.a)({visible:t.visible,forceRender:a},l),(function(t){var n=t.className,r=t.style,i=c()(u,n);return e.renderPopupMenu(i,r)})):this.renderPopupMenu(u)}},{key:"render",value:function(){var e,t,n,i=Object(o.a)({},this.props),a=this.getVisible(),l=this.getPrefixCls(),u=this.isInlineMode(),h=this.getMode(),d=c()(l,"".concat(l,"-").concat(h),(e={},Object(r.a)(e,i.className,!!i.className),Object(r.a)(e,this.getOpenClassName(),a),Object(r.a)(e,this.getActiveClassName(),i.active||a&&!u),Object(r.a)(e,this.getDisabledClassName(),i.disabled),Object(r.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(i.eventKey?this.internalMenuId="".concat(i.eventKey,"$Menu"):(ft+=1,this.internalMenuId="$__$".concat(ft,"$Menu")));var f={},p={},m={};i.disabled||(f={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},p={onClick:this.onTitleClick},m={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var g={},v="rtl"===i.direction;u&&(v?g.paddingRight=i.inlineIndent*i.level:g.paddingLeft=i.inlineIndent*i.level);var y={};this.getVisible()&&(y={"aria-owns":this.internalMenuId});var b=null;"horizontal"!==h&&(b=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(b=s.createElement(this.props.expandIcon,Object(o.a)({},this.props))));var x=s.createElement("div",Object(w.a)({ref:this.saveSubMenuTitle,style:g,className:"".concat(l,"-title"),role:"button"},m,p,{"aria-expanded":a},y,{"aria-haspopup":"true",title:"string"==typeof i.title?i.title:void 0}),i.title,b||s.createElement("i",{className:"".concat(l,"-arrow")})),C=this.renderChildren(),E=(null===(t=i.parentMenu)||void 0===t?void 0:t.isRootMenu)?i.parentMenu.props.getPopupContainer:function(e){return e.parentNode},k=pt[h],S=i.popupOffset?{offset:i.popupOffset}:{},O=c()((n={},Object(r.a)(n,i.popupClassName,i.popupClassName&&!u),Object(r.a)(n,"".concat(l,"-rtl"),v),n)),T=i.disabled,L=i.triggerSubMenuAction,_=i.subMenuOpenDelay,A=i.forceSubMenuRender,D=i.subMenuCloseDelay,R=i.builtinPlacements;ee.forEach((function(e){return delete i[e]})),delete i.onClick;var M=v?Object(o.a)(Object(o.a)({},dt),R):Object(o.a)(Object(o.a)({},ht),R);delete i.direction;var I=this.getBaseProps(),j=u?null:this.getMotion(I.mode,I.visible);return s.createElement("li",Object(w.a)({},i,f,{className:d,role:"menuitem"}),s.createElement(ct,{prefixCls:l,popupClassName:c()("".concat(l,"-popup"),O),getPopupContainer:E,builtinPlacements:M,popupPlacement:k,popupVisible:!u&&a,popupAlign:S,popup:u?null:C,action:T||u?[]:[L],mouseEnterDelay:_,mouseLeaveDelay:D,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:A,popupMotion:j},x),u?C:null)}}]),n}(s.Component);gt.defaultProps={onMouseEnter:$,onMouseLeave:$,onTitleMouseEnter:$,onTitleMouseLeave:$,onTitleClick:$,manualRef:$,mode:"vertical",title:""};var vt=Object(T.b)((function(e,t){var n=e.openKeys,r=e.activeKey,i=e.selectedKeys,a=t.eventKey,o=t.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[o]===a,selectedKeys:i}}))(gt);vt.isSubMenu=!0;var yt=vt,bt=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(){var e;return Object(C.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.childRef=s.createRef(),e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=e.childRef.current;return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,r){var i=e.props,l=i.overflowedIndicator,c=i.level,u=i.mode,h=i.prefixCls,d=i.theme;if(1!==c||"horizontal"!==u)return null;var f=e.props.children[0].props,p=(f.children,f.title,f.style),m=Object(a.a)(f,["children","title","style"]),g=Object(o.a)({},p),v="".concat(t,"-overflowed-indicator"),y="".concat(t,"-overflowed-indicator");0===n.length&&!0!==r?g=Object(o.a)(Object(o.a)({},g),{},{display:"none"}):r&&(g=Object(o.a)(Object(o.a)({},g),{},{visibility:"hidden",position:"absolute"}),v="".concat(v,"-placeholder"),y="".concat(y,"-placeholder"));var b=d?"".concat(h,"-").concat(d):"",x={};return ee.forEach((function(e){void 0!==m[e]&&(x[e]=m[e])})),s.createElement(yt,Object(w.a)({title:l,className:"".concat(h,"-overflowed-submenu"),popupClassName:b},x,{key:v,eventKey:y,disabled:!1,style:g}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];ne(r,"display","inline-block");var i=e.getMenuItemNodes(),a=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(e){ne(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return te(e,!0)})),a.forEach((function(e){ne(e,"display","none")})),e.overflowedIndicatorWidth=te(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),ne(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=te(t);e.overflowedItems=[];var r,i=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(E.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=this.childRef.current;if(!t)return;this.resizeObserver=new re.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,i,a){var o=i;if("horizontal"===t.props.mode){var l=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(a>n&&(o=s.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),a===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return s.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),l=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var c=[].concat(Object(d.a)(r),[l,o]);return a===e.length-1&&c.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),c}return[].concat(Object(d.a)(r),[o])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(a.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return s.createElement(i,Object(w.a)({ref:this.childRef},r),this.renderChildren(n))}}]),n}(s.Component);bt.defaultProps={tag:"div",className:""};var xt=bt;function wt(e,t,n){var i=e.getState();e.setState({activeKey:Object(o.a)(Object(o.a)({},i.activeKey),{},Object(r.a)({},t,n))})}function Ct(e){return e.eventKey||"0-menu-"}function Et(e,t){var n,r=t,i=e.children,a=e.eventKey;if(r&&(Z(i,(function(e,t){e&&e.props&&!e.props.disabled&&r===J(e,a,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(Z(i,(function(e,t){r||!e||e.props.disabled||(r=J(e,a,t))})),r):r}function kt(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var St=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(e){var i;return Object(C.a)(this,n),(i=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(i.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var a=null;return r!==v.a.UP&&r!==v.a.DOWN||(a=i.step(r===v.a.UP?-1:1)),a?(e.preventDefault(),wt(i.props.store,Ct(i.props),a.props.eventKey),"function"==typeof t&&t(a),1):void 0},i.onItemHover=function(e){var t=e.key,n=e.hover;wt(i.props.store,Ct(i.props),n?t:null)},i.onDeselect=function(e){i.props.onDeselect(e)},i.onSelect=function(e){i.props.onSelect(e)},i.onClick=function(e){i.props.onClick(e)},i.onOpenChange=function(e){i.props.onOpenChange(e)},i.onDestroy=function(e){i.props.onDestroy(e)},i.getFlatInstanceArray=function(){return i.instanceArray},i.step=function(e){var t=i.getFlatInstanceArray(),n=i.props.store.getState().activeKey[Ct(i.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var a=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(a=t,!1)})),i.props.defaultActiveFirst||-1===a||(o=t.slice(a,r-1)).length&&!o.every((function(e){return!!e.props.disabled}))){var o,s=(a+1)%r,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},i.renderCommonMenuItem=function(e,t,n){var r=i.props.store.getState(),a=Object(k.a)(i).props,l=J(e,a.eventKey,t),c=e.props;if(!c||"string"==typeof e.type)return e;var u=l===r.activeKey,h=Object(o.a)(Object(o.a)({mode:c.mode||a.mode,level:a.level,inlineIndent:a.inlineIndent,renderMenuItem:i.renderMenuItem,rootPrefixCls:a.prefixCls,index:t,parentMenu:a.parentMenu,manualRef:c.disabled?void 0:Object(_.a)(e.ref,kt.bind(Object(k.a)(i))),eventKey:l,active:!c.disabled&&u,multiple:a.multiple,onClick:function(e){(c.onClick||$)(e),i.onClick(e)},onItemHover:i.onItemHover,motion:a.motion,subMenuOpenDelay:a.subMenuOpenDelay,subMenuCloseDelay:a.subMenuCloseDelay,forceSubMenuRender:a.forceSubMenuRender,onOpenChange:i.onOpenChange,onDeselect:i.onDeselect,onSelect:i.onSelect,builtinPlacements:a.builtinPlacements,itemIcon:c.itemIcon||i.props.itemIcon,expandIcon:c.expandIcon||i.props.expandIcon},n),{},{direction:a.direction});return("inline"===a.mode||X.any)&&(h.triggerSubMenuAction="click"),s.cloneElement(e,Object(o.a)(Object(o.a)({},h),{},{key:l||t}))},i.renderMenuItem=function(e,t,n){if(!e)return null;var r=i.props.store.getState(),a={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:i.props.triggerSubMenuAction,subMenuKey:n};return i.renderCommonMenuItem(e,t,a)},e.store.setState({activeKey:Object(o.a)(Object(o.a)({},e.store.getState().activeKey),{},Object(r.a)({},e.eventKey,Et(e,e.activeKey)))}),i.instanceArray=[],i}return Object(E.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!D()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[Ct(t)],r=Et(t,n);if(r!==n)wt(t.store,Ct(t),r);else if("activeKey"in e){r!==Et(e,e.activeKey)&&wt(t.store,Ct(t),r)}}},{key:"render",value:function(){var e=this,t=Object(w.a)({},this.props);this.instanceArray=[];var n={className:c()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,a=t.visible,o=t.level,l=t.mode,h=t.overflowedIndicator,d=t.theme;return ee.forEach((function(e){return delete t[e]})),delete t.onClick,s.createElement(xt,Object(w.a)({},t,{prefixCls:r,mode:l,tag:"ul",level:o,theme:d,visible:a,overflowedIndicator:h},n),Object(u.a)(t.children).map((function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")})))}}]),n}(s.Component);St.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:$};var Ot=Object(T.b)()(St),Tt=n("Kwbf");function Lt(e,t,n){var r=e.prefixCls,i=e.motion,a=e.defaultMotions,o=void 0===a?{}:a,s=e.openAnimation,l=e.openTransitionName,c=t.switchingModeFromInline;if(i)return i;if("object"===Object(R.a)(s)&&s)Object(Tt.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=o[n];return u||(c?null:o.other)}var _t=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(e){var r;Object(C.a)(this,n),(r=t.call(this,e)).onSelect=function(e){var t=Object(k.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys,i=e.key;n=t.multiple?n.concat([i]):[i],"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onSelect(Object(o.a)(Object(o.a)({},e),{},{selectedKeys:n}))}},r.onClick=function(e){var t=r.getRealMenuMode(),n=Object(k.a)(r),i=n.store,a=n.props.onOpenChange;"inline"===t||"openKeys"in r.props||(i.setState({openKeys:[]}),a([])),r.props.onClick(e)},r.onKeyDown=function(e,t){r.innerMenu.getWrappedInstance().onKeyDown(e,t)},r.onOpenChange=function(e){var t=Object(k.a)(r).props,n=r.store.getState().openKeys.concat(),i=!1,a=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var r=n.indexOf(e.key);(t=-1!==r)&&n.splice(r,1)}i=i||t};Array.isArray(e)?e.forEach(a):a(e),i&&("openKeys"in r.props||r.store.setState({openKeys:n}),t.onOpenChange(n))},r.onDeselect=function(e){var t=Object(k.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys.concat(),i=e.key,a=n.indexOf(i);-1!==a&&n.splice(a,1),"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onDeselect(Object(o.a)(Object(o.a)({},e),{},{selectedKeys:n}))}},r.onMouseEnter=function(e){r.restoreModeVerticalFromInline();var t=r.props.onMouseEnter;t&&t(e)},r.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,i="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,a="font-size"===e.propertyName&&i.indexOf("anticon")>=0;(t||a)&&r.restoreModeVerticalFromInline()},r.setInnerMenu=function(e){r.innerMenu=e},r.isRootMenu=!0;var i=e.defaultSelectedKeys,a=e.defaultOpenKeys;return"selectedKeys"in e&&(i=e.selectedKeys||[]),"openKeys"in e&&(a=e.openKeys||[]),r.store=Object(T.c)({selectedKeys:i,openKeys:a,activeKey:{"0-menu-":Et(e,e.activeKey)}}),r.state={switchingModeFromInline:!1,prevProps:e,inlineOpenKeys:[],store:r.store},r}return Object(E.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&i([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(o.a)({},Object(L.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(o.a)(Object(o.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Lt(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,s.createElement(T.a,{store:this.store},s.createElement(Ot,Object(w.a)({},e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.store,i=r.getState(),a={},o={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(o.switchingModeFromInline=!0),"openKeys"in e?a.openKeys=e.openKeys||[]:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(o.switchingModeFromInline=!0,o.inlineOpenKeys=i.openKeys,a.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(a.openKeys=t.inlineOpenKeys,o.inlineOpenKeys=[])),Object.keys(a).length&&r.setState(a),o}}]),n}(s.Component);_t.defaultProps={selectable:!0,onClick:$,onSelect:$,onOpenChange:$,onDeselect:$,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:s.createElement("span",null,"···")};var At=_t,Dt=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(){var e;return Object(C.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===v.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseLeave;i({key:r,hover:!1}),a({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseEnter;i({key:r,hover:!0}),a({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,i=n.multiple,a=n.onClick,o=n.onSelect,s=n.onDeselect,l=n.isSelected,c={key:r,keyPath:[r],item:Object(k.a)(e),domEvent:t};a(c),i?l?s(c):o(c):l||o(c)},e.saveNode=function(t){e.node=t},e}return Object(E.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(o.a)({},this.props),n=c()(this.getPrefixCls(),t.className,(e={},Object(r.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(r.a)(e,this.getSelectedClassName(),t.isSelected),Object(r.a)(e,this.getDisabledClassName(),t.disabled),e)),i=Object(o.a)(Object(o.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?i=Object(o.a)(Object(o.a)({},i),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(i.role="none");var a={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},l=Object(o.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?l.paddingRight=t.inlineIndent*t.level:l.paddingLeft=t.inlineIndent*t.level),ee.forEach((function(e){return delete t[e]})),delete t.direction;var u=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(u=s.createElement(this.props.itemIcon,this.props)),s.createElement("li",Object(w.a)({},Object(L.a)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,a,{style:l,ref:this.saveNode}),t.children,u)}}]),n}(s.Component);Dt.isMenuItem=!0,Dt.defaultProps={onSelect:$,onMouseEnter:$,onMouseLeave:$,manualRef:$};var Rt=Object(T.b)((function(e,t){var n=e.activeKey,r=e.selectedKeys,i=t.eventKey;return{active:n[t.subMenuKey]===i,isSelected:Array.isArray(r)?-1!==r.indexOf(i):r===i}}))(Dt),Mt=function(e){Object(S.a)(n,e);var t=Object(O.a)(n);function n(){var e;return Object(C.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(E.a)(n,[{key:"render",value:function(){var e=Object(w.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,i="".concat(r,"-item-group-title"),a="".concat(r,"-item-group-list"),o=e.title,l=e.children;return ee.forEach((function(t){return delete e[t]})),delete e.direction,s.createElement("li",Object(w.a)({},e,{onClick:function(e){return e.stopPropagation()},className:"".concat(n," ").concat(r,"-item-group")}),s.createElement("div",{className:i,title:"string"==typeof o?o:void 0},o),s.createElement("ul",{className:a},s.Children.map(l,this.renderInnerMenuItem)))}}]),n}(s.Component);Mt.isMenuItemGroup=!0,Mt.defaultProps={disabled:!0};var It=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return s.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};It.defaultProps={disabled:!0,className:"",style:{}};var jt=At,Nt=n("eDIo");var Pt=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,a=e.style;return r&&!1!==r.showAdd?s.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:a,"aria-label":(null==i?void 0:i.addAriaLabel)||"Add tab",onClick:function(e){r.onEdit("add",{event:e})}},r.addIcon||"+"):null}));var Ft=s.forwardRef((function(e,t){var n=e.prefixCls,a=e.id,o=e.tabs,l=e.locale,u=e.mobile,h=e.moreIcon,d=void 0===h?"More":h,f=e.moreTransitionName,p=e.style,m=e.className,g=e.editable,y=e.tabBarGutter,b=e.rtl,x=e.onTabClick,w=Object(s.useState)(!1),C=Object(i.a)(w,2),E=C[0],k=C[1],S=Object(s.useState)(null),O=Object(i.a)(S,2),T=O[0],L=O[1],_="".concat(a,"-more-popup"),A="".concat(n,"-dropdown"),D=null!==T?"".concat(_,"-").concat(T):null,R=null==l?void 0:l.dropdownAriaLabel,M=s.createElement(jt,{onClick:function(e){var t=e.key,n=e.domEvent;x(t,n),k(!1)},id:_,tabIndex:-1,role:"listbox","aria-activedescendant":D,selectedKeys:[T],"aria-label":void 0!==R?R:"expanded dropdown"},o.map((function(e){return s.createElement(Rt,{key:e.key,id:"".concat(_,"-").concat(e.key),role:"option","aria-controls":a&&"".concat(a,"-panel-").concat(e.key),disabled:e.disabled},e.tab)})));function I(e){for(var t=o.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===T}))||0,r=t.length,i=0;it?"left":"right"})})),V=Object(i.a)(z,2),W=V[0],G=V[1],K=Ut(0,(function(e,t){!U&&R&&R({direction:e>t?"top":"bottom"})})),Y=Object(i.a)(K,2),q=Y[0],X=Y[1],$=Object(s.useState)(0),J=Object(i.a)($,2),Q=J[0],Z=J[1],ee=Object(s.useState)(0),te=Object(i.a)(ee,2),ne=te[0],re=te[1],ie=Object(s.useState)(0),ae=Object(i.a)(ie,2),oe=ae[0],se=ae[1],le=Object(s.useState)(0),ce=Object(i.a)(le,2),ue=ce[0],he=ce[1],de=Object(s.useState)(null),fe=Object(i.a)(de,2),pe=fe[0],me=fe[1],ge=Object(s.useState)(null),ve=Object(i.a)(ge,2),ye=ve[0],be=ve[1],xe=Object(s.useState)(0),we=Object(i.a)(xe,2),Ce=we[0],Ee=we[1],ke=Object(s.useState)(0),Se=Object(i.a)(ke,2),Oe=Se[0],Te=Se[1],Le=function(e){var t=Object(s.useRef)([]),n=Object(s.useState)({}),r=Object(i.a)(n,2)[1],a=Object(s.useRef)("function"==typeof e?e():e),o=g((function(){var e=a.current;t.current.forEach((function(t){e=t(e)})),t.current=[],a.current=e,r({})}));return[a.current,function(e){t.current.push(e),o()}]}(new Map),_e=Object(i.a)(Le,2),Ae=_e[0],De=_e[1],Re=function(e,t,n){return Object(s.useMemo)((function(){for(var n,r=new Map,i=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||b,a=i.left+i.width,s=0;sje?[je,!1]:[e,!0]}U?k?(Ie=0,je=Math.max(0,Q-pe)):(Ie=Math.min(0,pe-Q),je=0):(Ie=Math.min(0,ye-ne),je=0);var Pe=Object(s.useRef)(),Fe=Object(s.useState)(),Be=Object(i.a)(Fe,2),He=Be[0],Ue=Be[1];function ze(){Ue(Date.now())}function Ve(){window.clearTimeout(Pe.current)}function We(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=Re.get(e);if(t)if(U){var n=W;k?t.rightW+pe&&(n=t.right+t.width-pe):t.left<-W?n=-t.left:t.left+t.width>-W+pe&&(n=-(t.left+t.width-pe)),X(0),G(Ne(n)[0])}else{var r=q;t.top<-q?r=-t.top:t.top+t.height>-q+ye&&(r=-(t.top+t.height-ye)),G(0),X(Ne(r)[0])}}!function(e,t){var n=Object(s.useState)(),r=Object(i.a)(n,2),a=r[0],o=r[1],l=Object(s.useState)(0),c=Object(i.a)(l,2),u=c[0],h=c[1],d=Object(s.useState)(0),f=Object(i.a)(d,2),p=f[0],m=f[1],g=Object(s.useState)(),v=Object(i.a)(g,2),y=v[0],b=v[1],x=Object(s.useRef)(),w=Object(s.useRef)(0),C=Object(s.useRef)(!1),E=Object(s.useRef)(),k=Object(s.useRef)(null);k.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;o({x:n,y:r}),window.clearInterval(x.current)},onTouchMove:function(e){if(a){e.preventDefault();var n=e.touches[0],r=n.screenX,i=n.screenY;o({x:r,y:i});var s=r-a.x,l=i-a.y;t(s,l);var c=Date.now();h(c),m(c-u),b({x:s,y:l})}},onTouchEnd:function(){if(a&&(o(null),b(null),y)){var e=y.x/p,n=y.y/p,r=Math.abs(e),i=Math.abs(n);if(Math.max(r,i)<.1)return;var s=e,l=n;x.current=window.setInterval((function(){Math.abs(s)<.01&&Math.abs(l)<.01?window.clearInterval(x.current):t(20*(s*=Ht),20*(l*=Ht))}),20)}},onWheel:function(e){var n=e.deltaX,r=e.deltaY,i=0,a=Math.abs(n),o=Math.abs(r);a===o?i="x"===E.current?n:r:a>o?(i=n,E.current="x"):(i=r,E.current="y");var s=Date.now();s-w.current>100&&(C.current=!1),(t(-i,-i)||C.current)&&(e.preventDefault(),C.current=!0),w.current=s}},s.useEffect((function(){function t(e){k.current.onTouchMove(e)}function n(e){k.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){k.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){k.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(M,(function(e,t){var n=!1;function r(e,t){e((function(e){var r=Ne(e+t),a=Object(i.a)(r,2),o=a[0],s=a[1];return n=s,o}))}if(U){if(pe>=Q)return n;r(G,e)}else{if(ye>=ne)return n;r(X,t)}return Ve(),ze(),n})),Object(s.useEffect)((function(){return Ve(),He&&(Pe.current=window.setTimeout((function(){Ue(0)}),100)),Ve}),[He]);var Ge=function(e,t,n,r,i){var a,o,l,c=i.tabs,u=i.tabPosition,h=i.rtl;["top","bottom"].includes(u)?(a="width",o=h?"right":"left",l=Math.abs(t.left)):(a="height",o="top",l=-t.top);var d=t[a],f=n[a],p=r[a],m=d;return f+p>d&&(m=d-p),Object(s.useMemo)((function(){if(!c.length)return[0,0];for(var t=c.length,n=t,r=0;rl+m){n=r-1;break}}for(var s=0,u=t-1;u>=0;u-=1){if((e.get(c[u].key)||x)[o]0,st=W+pe */ +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=n?-1:1,f=e[t+h];for(h+=d,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+h],h+=d,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=c}return(f?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=p,o/=256,c-=8);e[n+f-p]|=128*m}},lZu9: +/*!***********************************************************!*\ + !*** ./node_modules/codemirror/mode/markdown/markdown.js ***! + \***********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),i="null"==r.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var a={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 a)a.hasOwnProperty(o)&&n.tokenTypeOverrides[o]&&(a[o]=n.tokenTypeOverrides[o]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,d=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 g(e,t,n){return t.f=t.inline=n,n(e,t)}function v(e,t,n){return t.f=t.block=n,n(e,t)}function y(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==x){var n=i;if(!n){var a=e.innerMode(r,t.htmlState);n="xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText}n&&(t.f=k,t.block=b,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function b(r,i){var o,d=r.column()===i.indentation,m=!(o=i.prevLine.stream)||!/\S/.test(o.string),v=i.indentedCode,y=i.prevLine.hr,b=!1!==i.list,x=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var E=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,b)){for(i.list=null;E=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return r.skipToEnd(),i.indentedCode=!0,a.code;if(r.eatSpace())return null;if(d&&i.indentation<=x&&(O=r.match(u))&&O[1].length<=6)return i.quote=0,i.header=O[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,C(i);if(i.indentation<=x&&r.eat(">"))return i.quote=d?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),r.eatSpace(),C(i);if(!S&&!i.setext&&d&&i.indentation<=x&&(O=r.match(l))){var T=O[1]?"ol":"ul";return i.indentation=E+r.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&r.match(c,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+T]),C(i)}return d&&i.indentation<=x&&(O=r.match(f,!0))?(i.quote=0,i.fencedEndRE=new RegExp(O[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&function(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}(O[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=w,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,C(i)):i.setext||!(k&&b||i.quote||!1!==i.list||i.code||S||p.test(r.string))&&(O=r.lookAhead(1))&&(O=O.match(h))?(i.setext?(i.header=i.setext,i.setext=0,r.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==O[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,C(i)):S?(r.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,a.hr):"["===r.peek()?g(r,i,L):g(r,i,i.inline)}function x(t,n){var a=r.token(t,n.htmlState);if(!i){var o=e.innerMode(r,n.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=k,n.block=b,n.htmlState=null)}return a}function w(e,t){var r,i=t.listStack[t.listStack.length-1]||0,o=t.indentation=e.quote?t.push(a.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function E(e,t){if(e.match(d,!0))return C(t)}function k(t,i){var o=i.text(t,i);if(void 0!==o)return o;if(i.list)return i.list=null,C(i);if(i.taskList)return" "===t.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,C(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),C(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(u),!0))return a.linkHref}if("`"===s){var h=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var d=t.current().length;if(0!=i.code||i.quote&&1!=d){if(d==i.code){var f=C(i);return i.code=0,f}return i.formatting=h,C(i)}return i.code=d,C(i)}if(i.code)return C(i);if("\\"===s&&(t.next(),n.highlightFormatting)){var p=C(i),g=a.formatting+"-escape";return p?p+" "+g:g}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),C(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),C(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var p=C(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=O,p}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),C(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var p=C(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?O:k,p}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link"),(p=C(i))?p+=" ":p="",p+a.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link"),(p=C(i))?p+=" ":p="",p+a.linkEmail;if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=t.string.indexOf(">",t.pos);if(-1!=y){var b=t.string.substring(t.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),v(t,i,x)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var w=1,E=1==t.pos?" ":t.string.charAt(t.pos-2);w<3&&t.eat(s);)w++;var T=t.peek()||" ",L=!/\s/.test(T)&&(!m.test(T)||/\s/.test(E)||m.test(E)),_=!/\s/.test(E)&&(!m.test(E)||/\s/.test(T)||m.test(T)),A=null,D=null;if(w%2&&(i.em||!L||"*"!==s&&_&&!m.test(E)?i.em!=s||!_||"*"!==s&&L&&!m.test(T)||(A=!1):A=!0),w>1&&(i.strong||!L||"*"!==s&&_&&!m.test(E)?i.strong!=s||!_||"*"!==s&&L&&!m.test(T)||(D=!1):D=!0),null!=D||null!=A)return n.highlightFormatting&&(i.formatting=null==A?"strong":null==D?"em":"strong em"),!0===A&&(i.em=s),!0===D&&(i.strong=s),f=C(i),!1===A&&(i.em=!1),!1===D&&(i.strong=!1),f}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return C(i);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),f=C(i),i.strikethrough=!1,f;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),C(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return C(i);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var R=C(i);return i.emoji=!1,R}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),C(i)}function S(e,t){if(">"===e.next()){t.f=t.inline=k,n.highlightFormatting&&(t.formatting="link");var r=C(t);return r?r+=" ":r="",r+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function O(e,t){if(e.eatSpace())return null;var r,i=e.next();return"("===i||"["===i?(t.f=t.inline=(r="("===i?")":"]",function(e,t){if(e.next()===r){t.f=t.inline=k,n.highlightFormatting&&(t.formatting="link-string");var i=C(t);return t.linkHref=!1,i}return e.match(T[r]),t.linkHref=!0,C(t)}),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,C(t)):"error"}var T={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function L(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=_,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,C(t)):g(e,t,k)}function _(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=A,n.highlightFormatting&&(t.formatting="link");var r=C(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function A(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=k,a.linkHref+" url")}var D={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:k,text:E,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(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return y(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=x)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==x?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:D}},indent:function(t,n,i){return t.block==x&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:y,getType:C,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return D}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../xml/xml */"1eCo"),n(/*! ../meta */"8EBN"))},mgmH: +/*!*****************************!*\ + !*** ./src/utils/export.ts ***! + \*****************************/ +/*! exports provided: ExportCourseInfo, ExportCourseActScore, ExportCourseMemberScores, ExportCourseAndOther, exportMoocrecord, ExportCourseTotalScore, ExportCourseWorkListScores, ExportCourseWorkListAppendix, ExportPollsScores, ExportAttendance, ExportVideoStudent, ExportCourseStudentsInfo, ExportProblemset, Exportcompetitions, ExportExerciseStudentScores, getDownFile, getecyears, getec_training_objectives, getec_graduation_requirements */ +/*! exports used: ExportAttendance, ExportCourseActScore, ExportCourseAndOther, ExportCourseInfo, ExportCourseMemberScores, ExportCourseStudentsInfo, ExportCourseTotalScore, ExportCourseWorkListScores, ExportExerciseStudentScores, ExportPollsScores, ExportProblemset, ExportVideoStudent, Exportcompetitions, exportMoocrecord, getDownFile, getec_graduation_requirements, getec_training_objectives, getecyears */function(e,t,n){"use strict";n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"e",(function(){return g})),n.d(t,"c",(function(){return v})),n.d(t,"n",(function(){return y})),n.d(t,"g",(function(){return b})),n.d(t,"h",(function(){return x})),n.d(t,"j",(function(){return w})),n.d(t,"a",(function(){return C})),n.d(t,"l",(function(){return E})),n.d(t,"f",(function(){return k})),n.d(t,"k",(function(){return S})),n.d(t,"m",(function(){return O})),n.d(t,"i",(function(){return T})),n.d(t,"o",(function(){return L})),n.d(t,"r",(function(){return _})),n.d(t,"q",(function(){return A})),n.d(t,"p",(function(){return D}));n(/*! antd/es/message/style */"miYZ");var r=n(/*! antd/es/message */"tsqr"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),s=n.n(o),l=n(/*! @/service/classrooms */"oUNq"),c=n(/*! umi */"9kvl"),u=n(/*! ./util */"1vsH"),h=n(/*! ./env */"m3rI"),d=function(){Object(c.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在生成文件,请稍后..."}})},f=function(){Object(c.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},p=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(),e.next=3,Object(l.s)(Object(i.a)({},t));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,Object(u.u)("",Object(u.U)({url:h.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/export_couser_info.json"),query:t}));case 7:f();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.q)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_member_act_score")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_member_act_score")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.t)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_score")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_score")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.r)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.y)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.u)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_homework")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_homework")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=Object(a.a)(s.a.mark((function e(t,n){var a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.w)(Object(i.a)({},t));case 2:0===(a=e.sent).status?(r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/").concat(n))):-3===a.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/").concat(n)));case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),w=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(),e.next=3,Object(l.z)(Object(i.a)({},t));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,Object(u.u)("",Object(u.U)({url:h.a.API_SERVER+"/api/polls/".concat(t.categoryId,"/commit_result.xlsx"),query:t}));case 7:f();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),C=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/attendances/export_xlsx_data.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/video_study_statics.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/export_course_students_info.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/item_banks/export.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/competitions/region_reports.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.x)(Object(i.a)({},t));case 2:0===(n=e.sent).status?(r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/exercise_score"))):-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/exercise_score")));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),L=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("----------","调用下载"),e.next=3,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/export_records/".concat(t.id,".xlsx"),query:t}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/ec_years/".concat(null==t?void 0:t.ec_year_id,"/ec_training_objectives.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/ec_years/".concat(null==t?void 0:t.ec_year_id,"/ec_graduation_requirements.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},n6Qo: +/*!**************************************************************!*\ + !*** ./node_modules/rc-table/es/Footer/index.js + 2 modules ***! + \**************************************************************/ +/*! exports provided: default, FooterComponents */ +/*! exports used: FooterComponents, default */ +/*! 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/context/TableContext.js because of ./node_modules/antd/es/table/Table.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 o}));var r=n("q1tI"),i=n("biw7"),a=n("fyJ8");t.b=function(e){var t=e.children,n=r.useContext(i.a).prefixCls;return r.createElement("tfoot",{className:"".concat(n,"-summary")},t)};var o={Cell:function(e){var t=e.className,n=e.index,o=e.children,s=e.colSpan,l=e.rowSpan,c=r.useContext(i.a),u=c.prefixCls,h=c.fixedInfoList[n];return r.createElement(a.a,Object.assign({className:t,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,render:function(){return{children:o,props:{colSpan:s,rowSpan:l}}}},h))},Row:function(e){return r.createElement("tr",Object.assign({},e))}}},nqnY: +/*!*******************************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/GroupHomework/Detail/components/WorkDescription/index.less?modules ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___37JBt",flex_space_between:"flex_space_between___3r1Lz",flex_box_vertical_center:"flex_box_vertical_center___19lKq",flex_box_center_end:"flex_box_center_end___2LfTp",flex_box_column:"flex_box_column___1ZPkn",top:"top___1rypn",desc:"desc___yUqaB",liked:"liked___17506",likedActive:"likedActive___2w83T",reply:"reply___3RGQi",replyList:"replyList___18BLu",comment:"comment___2nNFC",headpic:"headpic___yXxQj"}},oOBs: +/*!******************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/ShixunHomeworks/components/TrfList/index.less?modules ***! + \******************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={leftdiv:"leftdiv___1FhsT",listClass:"listClass___1Y2ac",spantitle:"spantitle___1pL39",rightdiv:"rightdiv___3ZICD"}},ogmK: +/*!*********************************************************!*\ + !*** ./node_modules/rc-picker/es/index.js + 42 modules ***! + \*********************************************************/ +/*! exports provided: PickerPanel, RangePicker, default */ +/*! exports used: RangePicker, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.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 */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */ +/*! 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/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return ze}));var r=n("1OyB"),i=n("vuIU"),a=n("Ji7U"),o=n("LK+K"),s=n("rePB"),l=n("VTBJ"),c=n("ODXe"),u=n("q1tI"),h=n("TSYQ"),d=n.n(h),f=n("Kwbf"),p=n("6cGi"),m=n("U8pU"),g=n("4IlW"),v=u.createContext({}),y={visibility:"hidden"};var b=function(e){var t=e.prefixCls,n=e.prevIcon,r=void 0===n?"‹":n,i=e.nextIcon,a=void 0===i?"›":i,o=e.superPrevIcon,s=void 0===o?"«":o,l=e.superNextIcon,c=void 0===l?"»":l,h=e.onSuperPrev,d=e.onSuperNext,f=e.onPrev,p=e.onNext,m=e.children,g=u.useContext(v),b=g.hideNextBtn,x=g.hidePrevBtn;return u.createElement("div",{className:t},h&&u.createElement("button",{type:"button",onClick:h,tabIndex:-1,className:"".concat(t,"-super-prev-btn"),style:x?y:{}},s),f&&u.createElement("button",{type:"button",onClick:f,tabIndex:-1,className:"".concat(t,"-prev-btn"),style:x?y:{}},r),u.createElement("div",{className:"".concat(t,"-view")},m),p&&u.createElement("button",{type:"button",onClick:p,tabIndex:-1,className:"".concat(t,"-next-btn"),style:b?y:{}},a),d&&u.createElement("button",{type:"button",onClick:d,tabIndex:-1,className:"".concat(t,"-super-next-btn"),style:b?y:{}},c))};var x=function(e){if(u.useContext(v).hideHeader)return null;var t=e.prefixCls,n=e.generateConfig,r=e.locale,i=e.value,a=e.format,o="".concat(t,"-header");return u.createElement(b,{prefixCls:o},i?n.locale.format(r.locale,i,a):" ")},w=n("YrtM"),C=n("KQm4"),E=new Map;function k(e,t,n){if(E.get(e)&&cancelAnimationFrame(E.get(e)),n<=0)E.set(e,requestAnimationFrame((function(){e.scrollTop=t})));else{var r=(t-e.scrollTop)/n*10;E.set(e,requestAnimationFrame((function(){e.scrollTop+=r,e.scrollTop!==t&&k(e,t,n-10)})))}}function S(e,t){var n=t.onLeftRight,r=t.onCtrlLeftRight,i=t.onUpDown,a=t.onPageUpDown,o=t.onEnter,s=e.which,l=e.ctrlKey,c=e.metaKey;switch(s){case g.a.LEFT:if(l||c){if(r)return r(-1),!0}else if(n)return n(-1),!0;break;case g.a.RIGHT:if(l||c){if(r)return r(1),!0}else if(n)return n(1),!0;break;case g.a.UP:if(i)return i(-1),!0;break;case g.a.DOWN:if(i)return i(1),!0;break;case g.a.PAGE_UP:if(a)return a(-1),!0;break;case g.a.PAGE_DOWN:if(a)return a(1),!0;break;case g.a.ENTER:if(o)return o(),!0}return!1}function O(e,t,n,r){var i=e;if(!i)switch(t){case"time":i=r?"hh:mm:ss a":"HH:mm:ss";break;case"week":i="gggg-wo";break;case"month":i="YYYY-MM";break;case"quarter":i="YYYY-[Q]Q";break;case"year":i="YYYY";break;default:i=n?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return i}function T(e,t){var n="time"===e?8:10;return Math.max(n,t.length)+2}var L=null,_=new Set;var A={year:function(e){return"month"===e||"date"===e?"year":e},month:function(e){return"date"===e?"month":e},quarter:function(e){return"month"===e||"date"===e?"quarter":e},week:function(e){return"date"===e?"week":e},time:null,date:null};function D(e,t){return e.some((function(e){return e&&e.contains(t)}))}var R=function(e){var t=e.prefixCls,n=e.units,r=e.onSelect,i=e.value,a=e.active,o=e.hideDisabledOptions,l="".concat(t,"-cell"),c=u.useContext(v).open,h=u.useRef(null),f=u.useRef(new Map);return u.useLayoutEffect((function(){var e=f.current.get(i);e&&!1!==c&&k(h.current,e.offsetTop,120)}),[i]),u.useLayoutEffect((function(){if(c){var e=f.current.get(i);e&&k(h.current,e.offsetTop,0)}}),[c]),u.createElement("ul",{className:d()("".concat(t,"-column"),Object(s.a)({},"".concat(t,"-column-active"),a)),ref:h,style:{position:"relative"}},n.map((function(e){var t;return o&&e.disabled?null:u.createElement("li",{key:e.value,ref:function(t){f.current.set(e.value,t)},className:d()(l,(t={},Object(s.a)(t,"".concat(l,"-disabled"),e.disabled),Object(s.a)(t,"".concat(l,"-selected"),i===e.value),t)),onClick:function(){e.disabled||r(e.value)}},u.createElement("div",{className:"".concat(l,"-inner")},e.label))})))};function M(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0",r=String(e);r.length=12,_%=12);var P=u.useMemo((function(){if(!f)return[!1,!1];var e=[!0,!0];return N.forEach((function(t){var n=t.disabled,r=t.value;n||(r>=12?e[1]=!1:e[0]=!1)})),e}),[f,N]),U=Object(c.a)(P,2),z=U[0],V=U[1],W=u.useMemo((function(){return f?N.filter(t?function(e){return e.value>=12}:function(e){return e.value<12}).map((function(e){var t=e.value%12,n=0===t?"12":M(t,2);return Object(l.a)(Object(l.a)({},e),{},{label:n,value:t})})):N}),[f,N]),G=H(0,59,v,C&&C(_)),K=H(0,59,b,E&&E(_,A));function Y(e,t,n,r,i){!1!==e&&O.push({node:u.cloneElement(t,{prefixCls:L,value:n,active:a===O.length,onSelect:i,units:r,hideDisabledOptions:k}),onSelect:i,value:n,units:r})}i.current={onUpDown:function(e){var t=O[a];if(t)for(var n=t.units.findIndex((function(e){return e.value===t.value})),r=t.units.length,i=1;i3&&void 0!==arguments[3]?arguments[3]:1;switch(t){case"year":return n.addYear(e,10*r);case"quarter":case"month":return n.addYear(e,r);default:return n.addMonth(e,r)}}var Z=u.createContext({});function ee(e){var t=e.cellPrefixCls,n=e.generateConfig,r=e.rangedValue,i=e.hoverRangedValue,a=e.isInView,o=e.isSameCell,l=e.offsetCell,c=e.today,u=e.value;return function(e){var h,d=l(e,-1),f=l(e,1),p=N(r,0),m=N(r,1),g=N(i,0),v=N(i,1),y=J(n,g,v,e);function b(e){return o(p,e)}function x(e){return o(m,e)}var w=o(g,e),C=o(v,e),E=(y||C)&&(!a(d)||x(d)),k=(y||w)&&(!a(f)||b(f));return h={},Object(s.a)(h,"".concat(t,"-in-view"),a(e)),Object(s.a)(h,"".concat(t,"-in-range"),J(n,p,m,e)),Object(s.a)(h,"".concat(t,"-range-start"),b(e)),Object(s.a)(h,"".concat(t,"-range-end"),x(e)),Object(s.a)(h,"".concat(t,"-range-start-single"),b(e)&&!m),Object(s.a)(h,"".concat(t,"-range-end-single"),x(e)&&!p),Object(s.a)(h,"".concat(t,"-range-start-near-hover"),b(e)&&(o(d,g)||J(n,g,v,d))),Object(s.a)(h,"".concat(t,"-range-end-near-hover"),x(e)&&(o(f,v)||J(n,g,v,f))),Object(s.a)(h,"".concat(t,"-range-hover"),y),Object(s.a)(h,"".concat(t,"-range-hover-start"),w),Object(s.a)(h,"".concat(t,"-range-hover-end"),C),Object(s.a)(h,"".concat(t,"-range-hover-edge-start"),E),Object(s.a)(h,"".concat(t,"-range-hover-edge-end"),k),Object(s.a)(h,"".concat(t,"-range-hover-edge-start-near-range"),E&&o(d,m)),Object(s.a)(h,"".concat(t,"-range-hover-edge-end-near-range"),k&&o(f,p)),Object(s.a)(h,"".concat(t,"-today"),o(c,e)),Object(s.a)(h,"".concat(t,"-selected"),o(u,e)),h}}function te(e){for(var t=e.prefixCls,n=e.disabledDate,r=e.onSelect,i=e.rowNum,a=e.colNum,o=e.prefixColumn,c=e.rowClassName,h=e.baseDate,f=e.getCellClassName,p=e.getCellText,m=e.getCellNode,g=e.getCellDate,y=e.titleCell,b=e.headerCells,x=u.useContext(v),w=x.onDateMouseEnter,C=x.onDateMouseLeave,E="".concat(t,"-cell"),k=[],S=0;S1&&(o=t.addDate(o,-7)),o}(i.locale,n,o),p="".concat(t,"-cell"),m=n.locale.getWeekFirstDay(i.locale),g=n.getNow(),v=[],y=i.shortWeekDays||(n.locale.getShortWeekDays?n.locale.getShortWeekDays(i.locale):[]);r&&v.push(u.createElement("th",{key:"empty","aria-label":"empty cell"}));for(var b=0;b<7;b+=1)v.push(u.createElement("th",{key:b},y[(b+m)%7]));var x=ee({cellPrefixCls:p,today:g,value:s,generateConfig:n,rangedValue:r?null:h,hoverRangedValue:r?null:d,isSameCell:function(e,t){return q(n,e,t)},isInView:function(e){return Y(n,e,o)},offsetCell:function(e,t){return n.addDate(e,t)}}),w=l?function(e){return l(e,g)}:void 0;return u.createElement(te,Object.assign({},e,{rowNum:a,colNum:7,baseDate:f,getCellNode:w,getCellText:n.getDate,getCellClassName:x,getCellDate:n.addDate,titleCell:function(e){return n.locale.format(i.locale,e,"YYYY-MM-DD")},headerCells:v}))};var re=function(e){var t=e.prefixCls,n=e.generateConfig,r=e.locale,i=e.viewDate,a=e.onNextMonth,o=e.onPrevMonth,s=e.onNextYear,l=e.onPrevYear,c=e.onYearClick,h=e.onMonthClick;if(u.useContext(v).hideHeader)return null;var d="".concat(t,"-header"),f=r.shortMonths||(n.locale.getShortMonths?n.locale.getShortMonths(r.locale):[]),p=n.getMonth(i),m=u.createElement("button",{type:"button",key:"year",onClick:c,tabIndex:-1,className:"".concat(t,"-year-btn")},n.locale.format(r.locale,i,r.yearFormat)),g=u.createElement("button",{type:"button",key:"month",onClick:h,tabIndex:-1,className:"".concat(t,"-month-btn")},r.monthFormat?n.locale.format(r.locale,i,r.monthFormat):f[p]),y=r.monthBeforeYear?[g,m]:[m,g];return u.createElement(b,Object.assign({},e,{prefixCls:d,onSuperPrev:l,onPrev:o,onNext:a,onSuperNext:s}),y)};var ie=function(e){var t=e.prefixCls,n=e.panelName,r=void 0===n?"date":n,i=e.keyboardConfig,a=e.active,o=e.operationRef,c=e.generateConfig,h=e.value,f=e.viewDate,p=e.onViewDateChange,m=e.onPanelChange,g=e.onSelect,v="".concat(t,"-").concat(r,"-panel");o.current={onKeyDown:function(e){return S(e,Object(l.a)({onLeftRight:function(e){g(c.addDate(h||f,e),"key")},onCtrlLeftRight:function(e){g(c.addYear(h||f,e),"key")},onUpDown:function(e){g(c.addDate(h||f,7*e),"key")},onPageUpDown:function(e){g(c.addMonth(h||f,e),"key")}},i))}};var y=function(e){var t=c.addYear(f,e);p(t),m(null,t)},b=function(e){var t=c.addMonth(f,e);p(t),m(null,t)};return u.createElement("div",{className:d()(v,Object(s.a)({},"".concat(v,"-active"),a))},u.createElement(re,Object.assign({},e,{prefixCls:t,value:h,viewDate:f,onPrevYear:function(){y(-1)},onNextYear:function(){y(1)},onPrevMonth:function(){b(-1)},onNextMonth:function(){b(1)},onMonthClick:function(){m("month",f)},onYearClick:function(){m("year",f)}})),u.createElement(ne,Object.assign({},e,{onSelect:function(e){return g(e,"mouse")},prefixCls:t,value:h,viewDate:f,rowCount:6})))};var ae=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]&&arguments[2];(Ne===S||n)&&(Te(e),I&&I(e),le&&le(e,t),j&&!$(h,e,Oe)&&j(e))},We=function(e){return be.current&&be.current.onKeyDown?([g.a.LEFT,g.a.RIGHT,g.a.UP,g.a.DOWN,g.a.PAGE_UP,g.a.PAGE_DOWN,g.a.ENTER].includes(e.which)&&e.preventDefault(),be.current.onKeyDown(e)):(Object(f.a)(!1,"Panel not correct handle keyDown event. Please help to fire issue about this."),!1)};re&&"right"!==me&&(re.current={onKeyDown:We,onClose:function(){be.current&&be.current.onClose&&be.current.onClose()}}),u.useEffect((function(){y&&!xe.current&&De(y)}),[y]),u.useEffect((function(){xe.current=!1}),[]);var Ge,Ke,Ye,qe=Object(l.a)(Object(l.a)({},e),{},{operationRef:be,prefixCls:r,viewDate:Ae,value:Oe,onViewDateChange:Re,sourceMode:Ue,onPanelChange:function(e,t){var n=Me(e||Ne);ze(Ne),Pe(n),N&&(Ne!==n||$(h,Ae,Ae))&&N(t,n)},disabledDate:"decade"!==Ne?C:void 0});switch(delete qe.onChange,delete qe.onSelect,Ne){case"decade":Fe=u.createElement(Ce,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}}));break;case"year":Fe=u.createElement(ve,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}}));break;case"month":Fe=u.createElement(ue,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}}));break;case"quarter":Fe=u.createElement(fe,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}}));break;case"week":Fe=u.createElement(se,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}}));break;case"time":delete qe.showTime,Fe=u.createElement(z,Object.assign({},qe,"object"===Object(m.a)(_)?_:null,{onSelect:function(e,t){Re(e),Ve(e,t)}}));break;default:Fe=_?u.createElement(oe,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}})):u.createElement(ie,Object.assign({},qe,{onSelect:function(e,t){Re(e),Ve(e,t)}}))}if(ce||(Ge=Ee(r,Ne,R),Ke=ke({prefixCls:r,components:U,needConfirmButton:J,okDisabled:!Oe||C&&C(Oe),locale:o,showNow:L,onNow:J&&function(){var e=h.getNow(),t=function(e,t,n,r,i,a){var o=Math.floor(e/r)*r;if(o1&&void 0!==arguments[1]&&arguments[1];cancelAnimationFrame(h.current),t?l(e):h.current=requestAnimationFrame((function(){l(e)}))}var f=Me(s,{formatList:n,generateConfig:r,locale:i}),p=Object(c.a)(f,2)[1];function m(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d(null,e)}return Object(u.useEffect)((function(){m(!0)}),[e]),Object(u.useEffect)((function(){return function(){return cancelAnimationFrame(h.current)}}),[]),[p,function(e){d(e)},m]}function je(e){var t,n=e.prefixCls,r=void 0===n?"rc-picker":n,i=e.id,a=e.tabIndex,o=e.style,h=e.className,m=e.dropdownClassName,g=e.dropdownAlign,y=e.popupStyle,b=e.transitionName,x=e.generateConfig,w=e.locale,C=e.inputReadOnly,E=e.allowClear,k=e.autoFocus,S=e.showTime,L=e.picker,_=void 0===L?"date":L,A=e.format,R=e.use12Hours,M=e.value,N=e.defaultValue,P=e.open,F=e.defaultOpen,B=e.defaultOpenValue,H=e.suffixIcon,U=e.clearIcon,z=e.disabled,V=e.disabledDate,W=e.placeholder,G=e.getPopupContainer,K=e.pickerRef,Y=e.panelRender,q=e.onChange,X=e.onOpenChange,J=e.onFocus,Q=e.onBlur,Z=e.onMouseDown,ee=e.onMouseUp,te=e.onMouseEnter,ne=e.onMouseLeave,re=e.onContextMenu,ie=e.onClick,ae=e.direction,oe=e.autoComplete,se=void 0===oe?"off":oe,le=u.useRef(null),ce="date"===_&&!!S||"time"===_,ue=I(O(A,_,S,R)),he=u.useRef(null),de=u.useRef(null),fe=Object(p.a)(null,{value:M,defaultValue:N}),pe=Object(c.a)(fe,2),me=pe[0],ge=pe[1],ve=u.useState(me),ye=Object(c.a)(ve,2),be=ye[0],xe=ye[1],we=u.useRef(null),Ce=Object(p.a)(!1,{value:P,defaultValue:F,postState:function(e){return!z&&e},onChange:function(e){X&&X(e),!e&&we.current&&we.current.onClose&&we.current.onClose()}}),Ee=Object(c.a)(Ce,2),ke=Ee[0],Oe=Ee[1],Te=Me(be,{formatList:ue,generateConfig:x,locale:w}),De=Object(c.a)(Te,2),Re=De[0],je=De[1],Ne=Ae({valueTexts:Re,onTextChange:function(e){var t=x.locale.parse(w.locale,e,ue);!t||V&&V(t)||xe(t)}}),Pe=Object(c.a)(Ne,3),Fe=Pe[0],Be=Pe[1],He=Pe[2],Ue=function(e){xe(e),ge(e),q&&!$(x,me,e)&&q(e,e?x.locale.format(w.locale,e,ue[0]):"")},ze=function(e){z&&e||Oe(e)},Ve=_e({blurToCancel:ce,open:ke,value:Fe,triggerOpen:ze,forwardKeyDown:function(e){return ke&&we.current&&we.current.onKeyDown?we.current.onKeyDown(e):(Object(f.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},isClickOutside:function(e){return!D([he.current,de.current],e)},onSubmit:function(){return(!V||!V(be))&&(Ue(be),ze(!1),He(),!0)},onCancel:function(){ze(!1),xe(me),He()},onFocus:J,onBlur:Q}),We=Object(c.a)(Ve,2),Ge=We[0],Ke=We[1],Ye=Ke.focused,qe=Ke.typing;u.useEffect((function(){ke||(xe(me),Re.length&&""!==Re[0]?je!==Fe&&He():Be(""))}),[ke,Re]),u.useEffect((function(){ke||He()}),[_]),u.useEffect((function(){xe(me)}),[me]),K&&(K.current={focus:function(){le.current&&le.current.focus()},blur:function(){le.current&&le.current.blur()}});var Xe=Object(l.a)(Object(l.a)({},e),{},{className:void 0,style:void 0,pickerValue:void 0,onPickerValueChange:void 0}),$e=u.createElement(Se,Object.assign({},Xe,{generateConfig:x,className:d()(Object(s.a)({},"".concat(r,"-panel-focused"),!qe)),value:be,locale:w,tabIndex:-1,onChange:xe,direction:ae}));Y&&($e=Y($e));var Je,Qe,Ze=u.createElement("div",{className:"".concat(r,"-panel-container"),onMouseDown:function(e){e.preventDefault()}},$e);H&&(Je=u.createElement("span",{className:"".concat(r,"-suffix")},H)),E&&me&&!z&&(Qe=u.createElement("span",{onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},onMouseUp:function(e){e.preventDefault(),e.stopPropagation(),Ue(null),ze(!1)},className:"".concat(r,"-clear")},U||u.createElement("span",{className:"".concat(r,"-clear-btn")})));var et="rtl"===ae?"bottomRight":"bottomLeft",tt=Ie(Fe,{formatList:ue,generateConfig:x,locale:w}),nt=Object(c.a)(tt,3),rt=nt[0],it=nt[1],at=nt[2];return u.createElement(v.Provider,{value:{operationRef:we,hideHeader:"time"===_,panelRef:he,onSelect:function(e,t){("submit"===t||"key"!==t&&!ce)&&(Ue(e),ze(!1))},open:ke,defaultOpenValue:B,onDateMouseEnter:it,onDateMouseLeave:at}},u.createElement(Le,{visible:ke,popupElement:Ze,popupStyle:y,prefixCls:r,dropdownClassName:m,dropdownAlign:g,getPopupContainer:G,transitionName:b,popupPlacement:et,direction:ae},u.createElement("div",{className:d()(r,h,(t={},Object(s.a)(t,"".concat(r,"-disabled"),z),Object(s.a)(t,"".concat(r,"-focused"),Ye),Object(s.a)(t,"".concat(r,"-rtl"),"rtl"===ae),t)),style:o,onMouseDown:Z,onMouseUp:function(){ee&&ee.apply(void 0,arguments),le.current&&(le.current.focus(),ze(!0))},onMouseEnter:te,onMouseLeave:ne,onContextMenu:re,onClick:ie},u.createElement("div",{className:d()("".concat(r,"-input"),Object(s.a)({},"".concat(r,"-input-placeholder"),!!rt)),ref:de},u.createElement("input",Object.assign({id:i,tabIndex:a,disabled:z,readOnly:C||!qe,value:rt||Fe,onChange:function(e){Be(e.target.value)},autoFocus:k,placeholder:W,ref:le,title:Fe},Ge,{size:T(_,ue[0])},j(e),{autoComplete:se})),Je,Qe))))}var Ne=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).pickerRef=u.createRef(),e.focus=function(){e.pickerRef.current&&e.pickerRef.current.focus()},e.blur=function(){e.pickerRef.current&&e.pickerRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return u.createElement(je,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),n}(u.Component);function Pe(e,t,n,r){var i=Q(e,n,r,1);function a(n){return n(e,t)?"same":n(i,t)?"closing":"far"}switch(n){case"year":return a((function(e,t){return function(e,t,n){var r=V(t,n);return"boolean"==typeof r?r:Math.floor(e.getYear(t)/10)===Math.floor(e.getYear(n)/10)}(r,e,t)}));case"quarter":case"month":return a((function(e,t){return W(r,e,t)}));default:return a((function(e,t){return Y(r,e,t)}))}}function Fe(e){var t=e.values,n=e.picker,r=e.defaultDates,i=e.generateConfig,a=u.useState((function(){return[N(r,0),N(r,1)]})),o=Object(c.a)(a,2),s=o[0],l=o[1],h=u.useState(null),d=Object(c.a)(h,2),f=d[0],p=d[1],m=N(t,0),g=N(t,1);return[function(e){return s[e]?s[e]:N(f,e)||function(e,t,n,r){var i=N(e,0),a=N(e,1);if(0===t)return i;if(i&&a)switch(Pe(i,a,n,r)){case"same":case"closing":return i;default:return Q(a,n,r,-1)}return i}(t,e,n,i)||m||g||i.getNow()},function(e,n){if(e){var r=P(f,e,n);l(P(s,null,n)||[null,null]);var i=(n+1)%2;N(t,i)||(r=P(r,e,i)),p(r)}else(m||g)&&p(null)}]}function Be(e,t){return e&&e[0]&&e[1]&&t.isAfter(e[0],e[1])?[e[1],e[0]]:e}function He(e,t,n,r){return!!e||(!(!r||!r[t])||!!n[(t+1)%2])}function Ue(e){var t,n,r,i=e.prefixCls,a=void 0===i?"rc-picker":i,o=e.id,h=e.style,g=e.className,y=e.popupStyle,b=e.dropdownClassName,x=e.transitionName,w=e.dropdownAlign,C=e.getPopupContainer,E=e.generateConfig,k=e.locale,S=e.placeholder,L=e.autoFocus,_=e.disabled,A=e.format,R=e.picker,M=void 0===R?"date":R,F=e.showTime,B=e.use12Hours,H=e.separator,U=void 0===H?"~":H,z=e.value,V=e.defaultValue,W=e.defaultPickerValue,Y=e.open,J=e.defaultOpen,ee=e.disabledDate,te=e.disabledTime,ne=e.dateRender,re=e.panelRender,ie=e.ranges,ae=e.allowEmpty,oe=e.allowClear,se=e.suffixIcon,le=e.clearIcon,ce=e.pickerRef,ue=e.inputReadOnly,he=e.mode,de=e.renderExtraFooter,fe=e.onChange,pe=e.onOpenChange,me=e.onPanelChange,ge=e.onCalendarChange,ve=e.onFocus,ye=e.onBlur,be=e.onOk,xe=e.components,we=e.order,Ce=e.direction,Oe=e.activePickerIndex,Te=e.autoComplete,De=void 0===Te?"off":Te,Re="date"===M&&!!F||"time"===M,je=Object(u.useRef)({}),Ne=Object(u.useRef)(null),Pe=Object(u.useRef)(null),Ue=Object(u.useRef)(null),ze=Object(u.useRef)(null),Ve=Object(u.useRef)(null),We=Object(u.useRef)(null),Ge=Object(u.useRef)(null),Ke=I(O(A,M,F,B)),Ye=Object(p.a)(0,{value:Oe}),qe=Object(c.a)(Ye,2),Xe=qe[0],$e=qe[1],Je=Object(u.useRef)(null),Qe=u.useMemo((function(){return Array.isArray(_)?_:[_||!1,_||!1]}),[_]),Ze=Object(p.a)(null,{value:z,defaultValue:V,postState:function(e){return"time"!==M||we?Be(e,E):e}}),et=Object(c.a)(Ze,2),tt=et[0],nt=et[1],rt=Fe({values:tt,picker:M,defaultDates:W,generateConfig:E}),it=Object(c.a)(rt,2),at=it[0],ot=it[1],st=Object(p.a)(tt,{postState:function(e){var t=e;if(Qe[0]&&Qe[1])return t;for(var n=0;n<2;n+=1)!Qe[n]||N(t,n)||N(ae,n)||(t=P(t,E.getNow(),n));return t}}),lt=Object(c.a)(st,2),ct=lt[0],ut=lt[1],ht=Object(p.a)([M,M],{value:he}),dt=Object(c.a)(ht,2),ft=dt[0],pt=dt[1];Object(u.useEffect)((function(){pt([M,M])}),[M]);var mt=function(e,t){pt(e),me&&me(t,e)},gt=function(e,t,n){var r=e.picker,i=e.locale,a=e.selectedValue,o=e.disabledDate,s=e.disabled,l=e.generateConfig,c=N(a,0),h=N(a,1);function d(e){return 100*l.getYear(e)+l.locale.getWeek(i.locale,e)}function f(e){return 100*l.getYear(e)+l.getMonth(e)}function p(e){return 10*l.getYear(e)+G(l,e)}return[u.useCallback((function(e){if(o&&o(e))return!0;if(s[1]&&h)return!q(l,e,h)&&l.isAfter(e,h);if(t&&h)switch(r){case"quarter":return p(e)>p(h);case"month":return f(e)>f(h);case"week":return d(e)>d(h);default:return!q(l,e,h)&&l.isAfter(e,h)}return!1}),[o,s[1],h,t]),u.useCallback((function(e){if(o&&o(e))return!0;if(s[0]&&c)return!q(l,e,h)&&l.isAfter(c,e);if(n&&c)switch(r){case"quarter":return p(e)0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;Ct&&ln&&ln[0]&&ln[1]&&E.isAfter(ln[1],ln[0])&&(r=ln);var i=F;if(F&&"object"===Object(m.a)(F)&&F.defaultValue){var o=F.defaultValue;i=Object(l.a)(Object(l.a)({},F),{},{defaultValue:N(o,Xe)||void 0})}var c=null;return ne&&(c=function(e,t){return ne(e,t,{range:Xe?"end":"start"})}),u.createElement(Z.Provider,{value:{inRange:!0,panelPosition:t,rangedValue:rn||ct,hoverRangedValue:r}},u.createElement(Se,Object.assign({},e,n,{dateRender:c,showTime:i,mode:ft[Xe],generateConfig:E,style:void 0,direction:Ce,disabledDate:0===Xe?yt:bt,disabledTime:function(e){return!!te&&te(e,0===Xe?"start":"end")},className:d()(Object(s.a)({},"".concat(a,"-panel-focused"),0===Xe?!On:!Rn)),value:N(ct,Xe),locale:k,tabIndex:-1,onPanelChange:function(e,n){mt(P(ft,n,Xe),P(ct,e,Xe));var r=e;"right"===t&&ft[Xe]===n&&(r=Q(r,n,E,-1)),ot(r,Xe)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:void 0,defaultPickerValue:void 0})))}var Pn=0,Fn=0;Xe&&Ue.current&&Ve.current&&Pe.current&&(Pn=Ue.current.offsetWidth+Ve.current.offsetWidth,Pe.current.offsetWidth&&Pn>Pe.current.offsetWidth&&(Fn=Pn));var Bn="rtl"===Ce?{right:Pn}:{left:Pn};var Hn,Un,zn=u.createElement("div",{className:d()("".concat(a,"-range-wrapper"),"".concat(a,"-").concat(M,"-range-wrapper")),style:{minWidth:Lt}},u.createElement("div",{className:"".concat(a,"-range-arrow"),style:Bn}),function(){var e,t=Ee(a,ft[Xe],de),n=ke({prefixCls:a,components:xe,needConfirmButton:Re,okDisabled:!N(ct,Xe)||ee&&ee(ct[Xe]),locale:k,rangeList:jn,onOk:function(){N(ct,Xe)&&(Mt(ct,Xe),be&&be(ct))}});if("time"===M||F)e=Nn();else{var r=at(Xe),i=Q(r,M,E),o=ft[Xe]===M,s=Nn(!!o&&"left",{pickerValue:r,onPickerValueChange:function(e){ot(e,Xe)}}),l=Nn("right",{pickerValue:i,onPickerValueChange:function(e){ot(Q(e,M,E,-1),Xe)}});e="rtl"===Ce?u.createElement(u.Fragment,null,l,o&&s):u.createElement(u.Fragment,null,s,o&&l)}var c=u.createElement(u.Fragment,null,u.createElement("div",{className:"".concat(a,"-panels")},e),(t||n)&&u.createElement("div",{className:"".concat(a,"-footer")},t,n));return re&&(c=re(c)),u.createElement("div",{className:"".concat(a,"-panel-container"),style:{marginLeft:Fn},ref:Pe,onMouseDown:function(e){e.preventDefault()}},c)}());se&&(Hn=u.createElement("span",{className:"".concat(a,"-suffix")},se)),oe&&(N(tt,0)&&!Qe[0]||N(tt,1)&&!Qe[1])&&(Un=u.createElement("span",{onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},onMouseUp:function(e){e.preventDefault(),e.stopPropagation();var t=tt;Qe[0]||(t=P(t,null,0)),Qe[1]||(t=P(t,null,1)),Mt(t,null),Dt(!1,Xe)},className:"".concat(a,"-clear")},le||u.createElement("span",{className:"".concat(a,"-clear-btn")})));var Vn={size:T(M,Ke[0])},Wn=0,Gn=0;Ue.current&&ze.current&&Ve.current&&(0===Xe?Gn=Ue.current.offsetWidth:(Wn=Pn,Gn=ze.current.offsetWidth));var Kn="rtl"===Ce?{right:Wn}:{left:Wn};return u.createElement(v.Provider,{value:{operationRef:Je,hideHeader:"time"===M,onDateMouseEnter:function(e){cn(P(ct,e,Xe)),0===Xe?fn(e):yn(e)},onDateMouseLeave:function(){cn(P(ct,null,Xe)),0===Xe?pn():bn()},hideRanges:!0,onSelect:function(e,t){var n=P(ct,e,Xe);"submit"===t||"key"!==t&&!Re?(Mt(n,Xe),0===Xe?pn():bn()):ut(n)},open:Ct}},u.createElement(Le,{visible:Ct,popupElement:zn,popupStyle:y,prefixCls:a,dropdownClassName:b,dropdownAlign:w,getPopupContainer:C,transitionName:x,range:!0,direction:Ce},u.createElement("div",Object.assign({ref:Ne,className:d()(a,"".concat(a,"-range"),g,(t={},Object(s.a)(t,"".concat(a,"-disabled"),Qe[0]&&Qe[1]),Object(s.a)(t,"".concat(a,"-focused"),0===Xe?Sn:Dn),Object(s.a)(t,"".concat(a,"-rtl"),"rtl"===Ce),t)),style:h,onClick:function(e){Ct||We.current.contains(e.target)||Ge.current.contains(e.target)||(Qe[0]?Qe[1]||Rt(1):Rt(0))},onMouseDown:function(e){!Ct||!Sn&&!Dn||We.current.contains(e.target)||Ge.current.contains(e.target)||e.preventDefault()}},j(e)),u.createElement("div",{className:d()("".concat(a,"-input"),(n={},Object(s.a)(n,"".concat(a,"-input-active"),0===Xe),Object(s.a)(n,"".concat(a,"-input-placeholder"),!!dn),n)),ref:Ue},u.createElement("input",Object.assign({id:o,disabled:Qe[0],readOnly:ue||!On,value:dn||Yt,onChange:function(e){qt(e.target.value)},autoFocus:L,placeholder:N(S,0)||"",ref:We},En,Vn,{autoComplete:De}))),u.createElement("div",{className:"".concat(a,"-range-separator"),ref:Ve},U),u.createElement("div",{className:d()("".concat(a,"-input"),(r={},Object(s.a)(r,"".concat(a,"-input-active"),1===Xe),Object(s.a)(r,"".concat(a,"-input-placeholder"),!!vn),r)),ref:ze},u.createElement("input",Object.assign({disabled:Qe[1],readOnly:ue||!Rn,value:vn||Qt,onChange:function(e){Zt(e.target.value)},placeholder:N(S,1)||"",ref:Ge},_n,Vn,{autoComplete:De}))),u.createElement("div",{className:"".concat(a,"-active-bar"),style:Object(l.a)(Object(l.a)({},Kn),{},{width:Gn,position:"absolute"})}),Hn,Un)))}var ze=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).pickerRef=u.createRef(),e.focus=function(){e.pickerRef.current&&e.pickerRef.current.focus()},e.blur=function(){e.pickerRef.current&&e.pickerRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return u.createElement(Ue,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),n}(u.Component);t.b=Ne},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(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.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",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function a(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function o(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(o(e,t+1)){i.lastIndex=t,e.ch=t;var n=i.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function h(e){for(;;){i.lastIndex=e.ch;var t=i.exec(e.text);if(!t){if(s(e))continue;return}if(o(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function d(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function f(e,n){for(var r=[];;){var i,a=h(e),o=e.line,s=e.ch-(a?a[0].length:0);if(!a||!(i=c(e)))return;if("selfClose"!=i)if(a[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==a[2]){r.length=l;break}if(l<0&&(!n||n==a[2]))return{tag:a[2],from:t(o,s),to:t(e.line,e.ch)}}else r.push(a[2])}}function p(e,n){for(var r=[];;){var i=d(e);if(!i)return;if("selfClose"!=i){var a=e.line,o=e.ch,s=u(e);if(!s)return;if(s[1])r.push(s[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(a,o)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,r){for(var i=new a(e,r.line,0);;){var o=h(i);if(!o||i.line!=r.line)return;var s=c(i);if(!s)return;if(!o[1]&&"selfClose"!=s){var l=t(i.line,i.ch),u=f(i,o[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),e.findMatchingTag=function(e,r,i){var o=new a(e,r.line,r.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=c(o),l=s&&t(o.line,o.ch),h=s&&u(o);if(s&&h&&!(n(o,r)>0)){var d={from:t(o.line,o.ch),to:l,tag:h[2]};return"selfClose"==s?{open:d,close:null,at:"open"}:h[1]?{open:p(o,h[2]),close:d,at:"close"}:{open:d,close:f(o=new a(e,l.line,l.ch,i),h[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new a(e,t.line,t.ch,n);;){var o=p(i,r);if(!o)break;var s=f(new a(e,t.line,t.ch,n),o.tag);if(s)return{open:o,close:s}}},e.scanForClosingTag=function(e,t,n,r){return f(new a(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(/*! ../../lib/codemirror */"VrN/"))},p5ED: +/*!*********************************************!*\ + !*** ./src/components/PreviewAll/index.tsx ***! + \*********************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=(n(/*! antd/es/tooltip/style */"5Dmo"),n(/*! antd/es/tooltip */"3S7+")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=n.n(l),u=n(/*! react */"q1tI"),h=n.n(u),d=n(/*! ./index.less?modules */"vHTk"),f=n.n(d),p=n(/*! @ant-design/icons */"yEEn"),m=n(/*! @/components/monaco-editor */"ZW9T"),g=n(/*! @/utils/util */"1vsH"),v=n(/*! @/service/exercise */"V0Rq"),y=n(/*! @/utils/env */"m3rI");t.a=function(e){var t,n,l,d,b,x,w=e.editOffice,C=void 0===w?"view":w,E=(e.name,e.data),k=(e.theme,e.type),S=e.filename,O=e.monacoEditor,T=e.className,L=e.style,_=e.close,A=e.onClose,D=e.hasMask,R=e.disabledDownload,M=e.onImgDimensions,I=e.otherData,j=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),N=Object(s.a)(j,2),P=(N[0],N[1],Object(u.useState)("")),F=Object(s.a)(P,2),B=(F[0],F[1]),H=Object(u.useState)(),U=Object(s.a)(H,2),z=U[0],V=U[1],W="build"===window.ENV?"/react/build":"",G=location.host.startsWith("localhost")?y.a.PROXY_SERVER:y.a.API_SERVER,K=Object(u.useRef)();null!==(t=E)&&void 0!==t&&t.startsWith("/api")&&"txt"!==k&&(E=y.a.API_SERVER+E),"office"===k&&Object(g.P)(E).filesize>10485760&&(k="other"),S&&(O.filename=S),Object(u.useEffect)((function(){var e,t,n=null===(e=document.cookie)||void 0===e||null===(t=e.replace(/\s/g,""))||void 0===t?void 0:t.split(";");null==n||n.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&B(t[1])}))}),[]),Object(u.useEffect)((function(){"office"===k&&Y()}),[k,E]);var Y=function(){var e=Object(o.a)(c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",E),t=E,E.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,Object(v.U)({attachment_id:n});case 6:r=e.sent,V(r);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){E.startsWith("http")||E.startsWith("blob:")?X():Object(g.x)(S||"educoder",E,S)},X=function(){Object(g.v)(S||"educoder",decodeURIComponent(E))};return h.a.createElement("div",{style:Object(a.a)({},L||{}),className:"".concat(D&&f.a.bgBlack," ").concat(k?f.a.wrp:"hide")},_&&h.a.createElement("div",{className:f.a.close,ref:K},!!M&&h.a.createElement(i.a,{title:"点击对图片进行批注",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:function(){A(),M()}},h.a.createElement("i",{className:"icon-yulanpizhu"}))),!R&&h.a.createElement(i.a,{title:"点击下载此文件",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:X},h.a.createElement("i",{className:"icon-quxiaozhiding"}))),h.a.createElement(i.a,{title:"关闭",getPopupContainer:function(){return K.current}},h.a.createElement("span",{className:"",onClick:A},h.a.createElement("i",{className:"icon-guanbi1"})))),h.a.createElement("div",{className:"".concat(f.a[T]," ").concat(T," ").concat(f.a.monaco," ").concat("txt"===k?"show":"hide")},"txt"===k&&h.a.createElement(m.b,O)),"audio"===k&&h.a.createElement("audio",{src:"".concat((null===(n=E)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(l=E)||void 0===l?void 0:l.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(E),autoPlay:!0}),"video"===k&&h.a.createElement(h.a.Fragment,null,(null===(d=E)||void 0===d?void 0:d.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"===k&&z&&h.a.createElement("iframe",{src:"".concat(W,"/office.html?key=").concat(z.key,"&url=").concat(G+z.url,"&callbackUrl=").concat(G+z.callbackUrl,"&fileType=").concat(z.fileType,"&title=").concat(z.title,"&model=").concat(C,"&officeServer=").concat(y.a.OFFICE_SERVER,"&disabledDownload=").concat(!!R)}),("xlsx"===k||"doc"===k||"pptx"===k||"docx"===k)&&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=").concat(I.model)}),"html"===k&&h.a.createElement("iframe",{src:E+"&disposition=inline"}),"pdf"===k&&h.a.createElement("embed",{className:f.a.embed,src:E}),"image"===k&&h.a.createElement("img",{src:"".concat((null===(b=E)||void 0===b?void 0:b.indexOf("http://"))>-1||(null===(x=E)||void 0===x?void 0:x.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(E)}),"other"===k&&h.a.createElement("div",null,h.a.createElement(r.a,{type:"primary",size:"large",onClick:q},h.a.createElement(p.a,null),"点击下载")),"download"===k&&h.a.createElement(r.a,{type:"primary",size:"large",onClick:q},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(e,t,n){},qbod: +/*!*********************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/GroupHomework/Detail/components/Group/index.less?modules ***! + \*********************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},"rAM+": +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***! + \*******************************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}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,s=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==n.return||n.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(e,t){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},s=e=>o[e];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(e){return e.replace(l,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const u=/(^|[^\[])\^/g;const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const f={},p=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(e,t){f[" "+e]||(p.test(e)?f[" "+e]=e+"/":f[" "+e]=y(e,"/",!0));const n=-1===(e=f[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(g,"$1")+t:e+t}function y(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i(r=(r=r.source||r).replace(u,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(c(n)).replace(h,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!d.test(n)&&(n=v(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:v,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length1)Object(h.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===t.length)return Object(h.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var n=t[0];if(l.isValidElement(n)&&Object(d.c)(n)){var r=n.ref;t[0]=l.cloneElement(n,{ref:Object(d.a)(r,this.setChildNode)})}return 1===t.length?t[0]:t.map((function(e,t){return!l.isValidElement(e)||"key"in e&&null!==e.key?e:l.cloneElement(e,{key:"".concat("rc-observer-key","-").concat(t)})}))}}]),n}(l.Component);p.displayName="ResizeObserver",t.a=p},ulZh: +/*!*****************************************!*\ + !*** ./node_modules/hls.js/dist/hls.js ***! + \*****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;"undefined"!=typeof window&&(r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js": +/*!*********************************************!*\ + !*** ./node_modules/eventemitter3/index.js ***! + \*********************************************/ +/*! no static exports found */function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function a(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,r,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,r||e,a),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new a:delete e._events[t]}function c(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(i=!1)),c.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},c.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,o=new Array(a);r0}),!1)}e.exports=function(e,t){t=t||{};var i={main:n.m},s=t.all?{main:Object.keys(i.main)}:function(e,t){for(var n={main:[t]},r={main:[]},i={main:{}};o(n);)for(var s=Object.keys(n),l=0;l=2*h/f||b<=w)){var C,E=Number.POSITIVE_INFINITY;for(C=e.level-1;C>m&&!((E=h*p[C].maxBitrate/(6.4*y))=b)){var k=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.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: "+E.toFixed(3)+" s\n Time to underbuffer: "+w.toFixed(3)+" s"),n.nextLoadLevel=C,this.bwEstimator.sample(d,u.loaded),this.clearTimer(),e.loader&&(this.fragCurrent=this.partCurrent=null,e.loader.abort()),n.trigger(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:u})}}}}}},d.onFragLoaded=function(e,t){var n=t.frag,i=t.part;if(n.type===l.PlaylistLevelType.MAIN&&Object(r.isFiniteNumber)(n.sn)){var o=i?i.stats:n.stats,s=i?i.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[n.level],u=(c.loaded?c.loaded.bytes:0)+o.loaded,h=(c.loaded?c.loaded.duration:0)+s;c.loaded={bytes:u,duration:h},c.realBitrate=Math.round(8*u/h)}if(n.bitrateTest){var d={stats:o,frag:n,part:i,id:n.type};this.onFragBuffered(a.Events.FRAG_BUFFERED,d),n.bitrateTest=!1}}},d.onFragBuffered=function(e,t){var n=t.frag,r=t.part,i=r?r.stats:n.stats;if(!i.aborted&&n.type===l.PlaylistLevelType.MAIN&&"initSegment"!==n.sn){var a=i.parsing.end-i.loading.start;this.bwEstimator.sample(a,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},d.onError=function(e,t){switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},d.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},d.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,a=n.minAutoLevel,s=n.media,l=t?t.duration:e?e.duration:0,u=s?s.currentTime:0,h=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,f=(o.BufferHelper.bufferInfo(s,u,i.maxBufferHole).end-u)/h,p=this.findBestLevel(d,a,r,f,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var m=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(!f){var y=this.bitrateTestDelay;y&&(m=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*m)+" ms"),g=v=1)}return p=this.findBestLevel(d,a,r,f+m,g,v),Math.max(p,0)},d.findBestLevel=function(e,t,n,r,i,a){for(var o,s=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,m=l?l.duration:s?s.duration:0,g=n;g>=t;g--){var v=h[g];if(v&&(!p||v.codecSet===p)){var y=v.details,b=(l?null==y?void 0:y.partTarget:null==y?void 0:y.averagetargetduration)||m,x=void 0;x=g<=u?i*e:a*e;var w=h[g].maxBitrate,C=w*b/x;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(x)+"/"+w+"/"+b+"/"+r+"/"+C),x>w&&(!C||f&&!this.bitrateTestDelay||C0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=i.State.IDLE):(this.loadedmetadata=!1,this.state=i.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},w.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_TRACK:var t,n=this.levels,r=this.trackId,a=null==n||null===(t=n[r])||void 0===t?void 0:t.details;if(a){if(this.waitForCdnTuneIn(a))break;this.state=i.State.WAITING_INIT_PTS}break;case i.State.FRAG_LOADING_WAITING_RETRY:var s,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=i.State.IDLE);break;case i.State.WAITING_INIT_PTS:var u=this.waitingData;if(u){var h=u.frag,d=u.part,f=u.cache,m=u.complete;if(void 0!==this.initPTS[h.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.FRAG_LOADING;var g={frag:h,part:d,payload:f.flush(),networkDetails:null};this._handleFragmentLoadProgress(g),m&&e.prototype._handleFragmentLoadComplete.call(this,g)}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=i.State.IDLE}this.onTickEnd()},w.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.IDLE)},w.onTickEnd=function(){var e=this.media;if(e&&e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length&&(this.loadedmetadata=!0),this.lastCurrentTime=e.currentTime}},w.doTickIdle=function(){var e,t,n=this.hls,r=this.levels,o=this.media,s=this.trackId,l=n.config;if(r&&r[s]&&(o||!this.startFragRequested&&l.startFragPrefetch)){var h=r[s].details;if(!h||h.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(h))this.state=i.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(),m=this.audioSwitch;if(!(f>=p)||m){if(!m&&this._streamEnded(d,h))return n.trigger(a.Events.BUFFER_EOS,{type:"audio"}),void(this.state=i.State.ENDED);var g=h.fragments[0].start,v=d.end;if(m){var y=this.getLoadPosition();v=y,h.PTSKnown&&yg||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),o.currentTime=g+.05)}var b=this.getNextFragment(v,h);b?"identity"!==(null===(e=b.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=b.decryptdata)&&void 0!==t&&t.key?this.loadFragment(b,h,v):this.loadKey(b,h):this.bufferFlushed=!0}}}}},w.getMaxBufferLength=function(){var t=e.prototype.getMaxBufferLength.call(this),n=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===n?t:Math.max(t,n.len)},w.onMediaDetaching=function(){this.videoBuffer=null,e.prototype.onMediaDetaching.call(this)},w.onAudioTracksUpdated=function(e,t){var n=t.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(e){return new l.Level(e)}))},w.onAudioTrackSwitching=function(e,t){var n=!!t.url;this.trackId=t.id;var r=this.fragCurrent;null!=r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.audioSwitch=!0,this.state=i.State.IDLE):this.state=i.State.STOPPED,this.tick()},w.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},w.onLevelLoaded=function(e,t){this.mainDetails=t.details},w.onAudioTrackLoaded=function(e,t){var n,r=this.levels,a=t.details,o=t.id;if(r){this.log("Track "+o+" loaded ["+a.startSN+","+a.endSN+"],duration:"+a.totalduration);var s=r[o],l=0;if(a.live||null!==(n=s.details)&&void 0!==n&&n.live){var c=this.mainDetails;if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed||!c)return;!s.details&&a.hasProgramDateTime&&c.hasProgramDateTime?(Object(m.alignMediaPlaylistByPDT)(a,c),l=a.fragments[0].start):l=this.alignPlaylists(a,s.details)}s.details=a,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(s.details,l),this.state!==i.State.WAITING_TRACK||this.waitForCdnTuneIn(a)||(this.state=i.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+o)},w._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,a=e.payload,o=this.config,s=this.trackId,l=this.levels;if(l){var u=l[s];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 m=o.defaultAudioCodec||u.audioCodec||"mp4a.40.2",g=this.transmuxer;g||(g=this.transmuxer=new d.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var y=this.initPTS[n.cc],b=null===(t=n.initSegment)||void 0===t?void 0:t.data;if(void 0!==y){var x=r?r.index:-1,w=-1!==x,C=new f.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,a.byteLength,x,w);g.push(a,b,m,"",n,r,p.totalduration,!1,C,y)}else v.logger.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+s),(this.waitingData=this.waitingData||{frag:n,part:r,cache:new h.default,complete:!1}).cache.push(new Uint8Array(a)),this.waitingVideoCC=this.videoTrackCC,this.state=i.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},w._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},w.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},w.onBufferCreated=function(e,t){var n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},w.onFragBuffered=function(e,t){var n=t.frag,r=t.part;n.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(n)?this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==n.sn&&(this.fragPrevious=n,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(n,r)))},w.onError=function(t,n){switch(n.details){case g.ErrorDetails.FRAG_LOAD_ERROR:case g.ErrorDetails.FRAG_LOAD_TIMEOUT:case g.ErrorDetails.KEY_LOAD_ERROR:case g.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,n);break;case g.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case g.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==i.State.ERROR&&this.state!==i.State.STOPPED&&(this.state=n.fatal?i.State.ERROR:i.State.IDLE,this.warn(n.details+" while loading frag, switching to "+this.state+" state"));break;case g.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===n.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var r=!0,a=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);a&&a.len>.5&&(r=!this.reduceMaxBufferLength(a.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},w.onBufferFlushed=function(e,t){t.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},w._handleTransmuxComplete=function(e){var t,n="audio",r=this.hls,o=e.remuxResult,s=e.chunkMeta,l=this.getCurrentContext(s);if(!l)return this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(s.level);var c=l.frag,h=l.part,d=o.audio,f=o.text,p=o.id3,m=o.initSegment;if(!this.fragContextChanged(c)){if(this.state=i.State.PARSING,this.audioSwitch&&d&&this.completeAudioSwitch(),null!=m&&m.tracks&&(this._bufferInitSegment(m.tracks,c,s),r.trigger(a.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:n,tracks:m.tracks})),d){var g=d.startPTS,v=d.endPTS,b=d.startDTS,x=d.endDTS;h&&(h.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:g,endPTS:v,startDTS:b,endDTS:x}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,g,v,b,x),this.bufferFragmentData(d,c,h,s)}if(null!=p&&null!==(t=p.samples)&&void 0!==t&&t.length){var w=y({frag:c,id:n},p);r.trigger(a.Events.FRAG_PARSING_METADATA,w)}if(f){var C=y({frag:c,id:n},f);r.trigger(a.Events.FRAG_PARSING_USERDATA,C)}}},w._bufferInitSegment=function(e,t,n){if(this.state===i.State.PARSING){e.video&&delete e.video;var r=e.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(a.Events.BUFFER_CODECS,e);var o=r.initSegment;if(null!=o&&o.byteLength){var s={type:"audio",frag:t,part:null,chunkMeta:n,parent:t.type,data:o};this.hls.trigger(a.Events.BUFFER_APPENDING,s)}this.tick()}}},w.loadFragment=function(t,n,a){var o=this.fragmentTracker.getState(t);this.fragCurrent=t,(this.audioSwitch||o===s.FragmentState.NOT_LOADED||o===s.FragmentState.PARTIAL)&&("initSegment"===t.sn?this._loadInitSegment(t):n.live&&!Object(r.isFiniteNumber)(this.initPTS[t.cc])?(this.log("Waiting for video PTS in continuity counter "+t.cc+" of live stream before loading audio fragment "+t.sn+" of level "+this.trackId),this.state=i.State.WAITING_INIT_PTS):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,a)))},w.completeAudioSwitch=function(){var t=this.hls,n=this.media,r=this.trackId;n&&(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,t.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:r})},x}(i.default);t.default=x},"./src/controller/audio-track-controller.ts": +/*!**************************************************!*\ + !*** ./src/controller/audio-track-controller.ts ***! + \**************************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),o=n(/*! ../types/loader */"./src/types/loader.ts");function s(e,t){for(var n=0;n=t.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var n=t[this.trackId];this.log("Now switching to audio-track index "+e);var i=t[e],a=i.id,o=i.groupId,s=void 0===o?"":o,l=i.name,c=i.type,u=i.url;if(this.trackId=e,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(r.Events.AUDIO_TRACK_SWITCHING,{id:a,groupId:s,name:l,type:c,url:u}),!i.details||i.details.live){var h=this.switchParams(i.url,null==n?void 0:n.details);this.loadPlaylist(h)}}},d.selectInitialTrack=function(){var e=this.tracksInGroup;console.assert(e.length,"Initial audio track should be selected when tracks are known");var t=this.trackName,n=this.findTrackId(t)||this.findTrackId();-1!==n?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},d.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;nt.partTarget&&(c+=1)}if(Object(r.isFiniteNumber)(l))return new i.HlsUrlParameters(l,Object(r.isFiniteNumber)(c)?c:void 0,i.HlsSkip.No)}}},t.loadPlaylist=function(e){},t.shouldLoadTrack=function(e){return this.canLoad&&e&&!!e.url&&(!e.details||e.details.live)},t.playlistLoaded=function(e,t,n){var r=this,i=t.details,o=t.stats,s=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(i.advancedDateTime=Date.now()-s,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&Object(a.mergeDetails)(n,i),!this.canLoad||!i.live)return;var l,c=void 0,u=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var h=this.hls.config.lowLatencyMode,d=i.lastPartSn,f=i.endSN,p=i.lastPartIndex,m=d===f;-1!==p?(c=m?f+1:d,u=m?h?0:p:p+1):c=f+1;var g=i.age,v=g+i.ageHeader,y=Math.min(v-i.partTarget,1.5*i.targetduration);if(y>0){if(n&&y>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+y+" with playlist age: "+i.age),y=0;else{var b=Math.floor(y/i.targetduration);c+=b,void 0!==u&&(u+=Math.round(y%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+y+" skip sn "+b+" to part "+u)}i.tuneInGoal=y}if(l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u),h||!m)return void this.loadPlaylist(l)}else l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u);var x=Object(a.computeReloadInterval)(i,o);void 0!==c&&i.canBlockReload&&(x-=i.partTarget||1),this.log("reload live playlist "+e+" in "+Math.round(x)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),x)}else this.clearTimer()},t.getDeliveryDirectives=function(e,t,n,r){var a=Object(i.getSkipValue)(e,n);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,a=i.HlsSkip.No),new i.HlsUrlParameters(n,r,a)},t.retryLoadingOrFail=function(e){var t,n=this,r=this.hls.config,i=this.retryCount-1&&null!==(t=e.context)&&void 0!==t&&t.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+e.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return n.loadPlaylist()}),a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+e.details+'"')}else this.warn('cannot recover from error "'+e.details+'"'),this.clearTimer(),e.fatal=!0;return i},e}()},"./src/controller/base-stream-controller.ts": +/*!**************************************************!*\ + !*** ./src/controller/base-stream-controller.ts ***! + \**************************************************/ +/*! exports provided: State, default */function(e,t,n){"use strict";n.r(t),n.d(t,"State",(function(){return w})),n.d(t,"default",(function(){return C}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../task-loop */"./src/task-loop.ts"),a=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ../utils/logger */"./src/utils/logger.ts"),l=n(/*! ../events */"./src/events.ts"),c=n(/*! ../errors */"./src/errors.ts"),u=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),h=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),d=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),f=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=n(/*! ./level-helper */"./src/controller/level-helper.ts"),m=n(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),g=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),v=n(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),y=n(/*! ../types/loader */"./src/types/loader.ts");function b(e,t){for(var n=0;nt.start+t.duration+c;(s0&&a&&a.key&&a.iv&&"AES-128"===a.method){var o=self.performance.now();return t.decrypter.webCryptoDecrypt(new Uint8Array(i),a.key.buffer,a.iv.buffer).then((function(t){var i=self.performance.now();return r.trigger(l.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:o,tdecrypt:i}}),n.payload=t,n}))}return n})).then((function(n){var r=t.fragCurrent,i=t.hls,a=t.levels;if(!a)throw new Error("init load aborted, missing levels");var o=a[e.level].details;console.assert(o,"Level details are defined when init segment is loaded");var s=e.stats;t.state=w.IDLE,t.fragLoadError=0,e.data=new Uint8Array(n.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),n.frag===r&&i.trigger(l.Events.FRAG_BUFFERED,{stats:s,frag:r,part:null,id:e.type}),t.tick()})).catch((function(n){t.warn(n),t.resetFragmentLoading(e)}))},S.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},S.fragBufferedComplete=function(e,t){var n=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level+" "+v.default.toString(o.BufferHelper.getBuffered(n))),this.state=w.IDLE,this.tick()},S._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var n=e.frag,r=e.part,i=e.partsLoaded,a=!i||0===i.length||i.some((function(e){return!e})),o=new u.ChunkMetadata(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!a);t.flush(o)}},S._handleFragmentLoadProgress=function(e){},S._doFragLoad=function(e,t,n,i){var a=this;if(void 0===n&&(n=null),!this.levels)throw new Error("frag load aborted, missing levels");if(n=Math.max(e.start,n||0),this.config.lowLatencyMode&&t){var o=t.partList;if(o&&i){n>e.end&&t.fragmentHint&&(e=t.fragmentHint);var s=this.getNextPart(o,e,n);if(s>-1){var c=o[s];return this.log("Loading part sn: "+e.sn+" p: "+c.index+" cc: "+e.cc+" of playlist ["+t.startSN+"-"+t.endSN+"] parts [0-"+s+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=w.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,part:o[s],targetBufferTime:n}),this.doFragPartsLoad(e,o,s,i).catch((function(e){return a.handleFragLoadError(e)}))}if(!e.url||this.loadedEndOfParts(o,n))return Promise.resolve(null)}}return this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(t?"of ["+t.startSN+"-"+t.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),Object(r.isFiniteNumber)(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=w.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragmentLoader.load(e,i).catch((function(e){return a.handleFragLoadError(e)}))},S.doFragPartsLoad=function(e,t,n,r){var i=this;return new Promise((function(a,o){var s=[];!function n(c){var u=t[c];i.fragmentLoader.loadPart(e,u,r).then((function(r){s[u.index]=r;var o=r.part;i.hls.trigger(l.Events.FRAG_LOADED,r);var h=t[c+1];if(!h||h.fragment!==e)return a({frag:e,part:o,partsLoaded:s});n(c+1)})).catch(o)}(n)}))},S.handleFragLoadError=function(e){var t=e.data;return t&&t.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(l.Events.ERROR,t),null},S._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===w.PARSING){var n=t.frag,r=t.part,i=t.level,a=self.performance.now();n.stats.parsing.end=a,r&&(r.stats.parsing.end=a),this.updateLevelTiming(n,r,i,e.partial)}else this.fragCurrent||(this.state=w.IDLE)},S.getCurrentContext=function(e){var t=this.levels,n=e.level,r=e.sn,i=e.part;if(!t||!t[n])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+n+". The current chunk will not be buffered."),null;var a=t[n],o=i>-1?Object(p.getPartWith)(a,r,i):null,s=o?o.fragment:Object(p.getFragmentWithSN)(a,r,this.fragCurrent);return s?{frag:s,part:o,level:a}:null},S.bufferFragmentData=function(e,t,n,r){if(e&&this.state===w.PARSING){var i=e.data1,a=e.data2,o=i;if(i&&a&&(o=Object(h.appendUint8Array)(i,a)),o&&o.length){var s={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:o};this.hls.trigger(l.Events.BUFFER_APPENDING,s),e.dropped&&e.independent&&!n&&this.flushBufferGap(t)}}},S.flushBufferGap=function(e){var t=this.media;if(t)if(o.BufferHelper.isBuffered(t,t.currentTime)){var n=t.currentTime,r=o.BufferHelper.bufferInfo(t,n,0),i=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),s=Math.max(Math.min(e.start-a,r.end-a),n+a);e.start-s>a&&this.flushMainBuffer(s,e.start)}else this.flushMainBuffer(0,e.start)},S.getFwdBufferInfo=function(e,t){var n=this.config,i=this.getLoadPosition();if(!Object(r.isFiniteNumber)(i))return null;var a=o.BufferHelper.bufferInfo(e,i,n.maxBufferHole);if(0===a.len&&void 0!==a.nextStart){var s=this.fragmentTracker.getBufferedFrag(i,t);if(s&&a.nextStart=n&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},S.getNextFragment=function(e,t){var n,r,i=t.fragments,a=i.length;if(!a)return null;var o,s=this.config,l=i[0].start;if(t.live){var c=s.initialLiveManifestSize;if(a-1&&nn.start&&n.loaded},S.getInitialLiveFragment=function(e,t){var n=this.fragPrevious,r=null;if(n){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=Object(f.findFragmentByPDT)(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){var a=t[i-e.startSN];n.cc===a.cc&&(r=a,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=Object(f.findFragWithCC)(t,n.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?e.fragmentEnd:e.edge,e))}return r},S.getFragmentAtPosition=function(e,t,n){var r,i=this.config,o=this.fragPrevious,s=n.fragments,l=n.endSN,c=n.fragmentHint,u=i.maxFragLookUpTolerance,h=!!(i.lowLatencyMode&&n.partList&&c);if(h&&c&&!this.bitrateTest&&(s=s.concat(c),l=c.sn),et-u?0:u;r=Object(f.findFragmentByPTS)(o,s,e,d)}else r=s[s.length-1];if(r){var p=r.sn-n.startSN,m=o&&r.level===o.level,g=s[p+1];if(this.fragmentTracker.getState(r)===a.FragmentState.BACKTRACKED){r=null;for(var v=p;s[v]&&this.fragmentTracker.getState(s[v])===a.FragmentState.BACKTRACKED;)r=o?s[v--]:s[--v];r||(r=g)}else o&&r.sn===o.sn&&!h&&m&&(r.sn=a-t.maxFragLookUpTolerance&&i<=o;if(null!==r&&n.duration>r&&(i"+e.startSN+" prev-sn: "+(a?a.sn:"na")+" fragments: "+s),h}return l},S.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},S.setStartPosition=function(e,t){var n=this.startPosition;if(n"+e))}}])&&b(C.prototype,E),k&&b(C,k),i}(i.default)},"./src/controller/buffer-controller.ts": +/*!*********************************************!*\ + !*** ./src/controller/buffer-controller.ts ***! + \*********************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ../errors */"./src/errors.ts"),s=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=n(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),h=Object(l.getMediaSource)(),d=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function e(e){var t=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 e=t.hls,n=t.media,r=t.mediaSource;a.logger.log("[buffer-controller]: Media source opened"),n&&(t.updateMediaElementDuration(),e.trigger(i.Events.MEDIA_ATTACHED,{media:n})),r&&r.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){a.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){a.logger.log("[buffer-controller]: Media source ended")},this.hls=e,this._initSourceBuffer(),this.registerListeners()}var t=e.prototype;return t.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},t.destroy=function(){this.unregisterListeners(),this.details=null},t.registerListeners=function(){var e=this.hls;e.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(i.Events.BUFFER_RESET,this.onBufferReset,this),e.on(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.on(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(i.Events.BUFFER_EOS,this.onBufferEos,this),e.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(i.Events.FRAG_PARSED,this.onFragParsed,this),e.on(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(i.Events.BUFFER_RESET,this.onBufferReset,this),e.off(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.off(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(i.Events.BUFFER_EOS,this.onBufferEos,this),e.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(i.Events.FRAG_PARSED,this.onFragParsed,this),e.off(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},t.onManifestParsed=function(e,t){var n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.details=null,a.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var n=this.media=t.media;if(n&&h){var r=this.mediaSource=new h;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(r),this._objectUrl=n.src}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,n=this._objectUrl;if(t){if(a.logger.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){a.logger.warn("[buffer-controller]: onMediaDetaching: "+e.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(n&&self.URL.revokeObjectURL(n),e.src===n?(e.removeAttribute("src"),e.load()):a.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(i.Events.MEDIA_DETACHED,void 0)},t.onBufferReset=function(){var e=this;this.getSourceBufferTypes().forEach((function(t){var n=e.sourceBuffer[t];try{n&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(n),e.sourceBuffer[t]=void 0)}catch(e){a.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",e)}})),this._initSourceBuffer()},t.onBufferCodecs=function(e,t){var n=this,r=this.getSourceBufferTypes().length;Object.keys(t).forEach((function(e){if(r){var i=n.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var a=t[e],o=a.codec,s=a.levelCodec,l=a.container;if((i.levelCodec||i.codec).replace(d,"$1")!==(s||o).replace(d,"$1")){var c=l+";codecs="+(s||o);n.appendChangeType(e,c)}}}else n.pendingTracks[e]=t[e]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},t.appendChangeType=function(e,t){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[e];i&&(a.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){a.logger.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",t)}};r.append(i,e)},t.onBufferAppending=function(e,t){var n=this,r=this.hls,l=this.operationQueue,c=this.tracks,u=t.data,h=t.type,d=t.frag,f=t.part,p=t.chunkMeta,m=p.buffering[h],g=self.performance.now();m.start=g;var v=d.stats.buffering,y=f?f.stats.buffering:null;0===v.start&&(v.start=g),y&&0===y.start&&(y.start=g);var b=c.audio,x="audio"===h&&1===p.id&&"audio/mpeg"===(null==b?void 0:b.container),w={execute:function(){if(m.executeStart=self.performance.now(),x){var e=n.sourceBuffer[h];if(e){var t=d.start-e.timestampOffset;Math.abs(t)>=.1&&(a.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+t+") sn: "+d.sn+")"),e.timestampOffset=d.start)}}n.appendExecutor(u,h)},onStart:function(){},onComplete:function(){var e=self.performance.now();m.executeEnd=m.end=e,0===v.first&&(v.first=e),y&&0===y.first&&(y.first=e);var t=n.sourceBuffer,r={};for(var a in t)r[a]=s.BufferHelper.getBuffered(t[a]);n.appendError=0,n.hls.trigger(i.Events.BUFFER_APPENDED,{type:h,frag:d,part:f,chunkMeta:p,parent:d.type,timeRanges:r})},onError:function(e){a.logger.error("[buffer-controller]: Error encountered while trying to append to the "+h+" SourceBuffer",e);var t={type:o.ErrorTypes.MEDIA_ERROR,parent:d.type,details:o.ErrorDetails.BUFFER_APPEND_ERROR,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=o.ErrorDetails.BUFFER_FULL_ERROR:(n.appendError++,t.details=o.ErrorDetails.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(a.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0)),r.trigger(i.Events.ERROR,t)}};l.append(w,h)},t.onBufferFlushing=function(e,t){var n=this,r=this.operationQueue,o=function(e){return{execute:n.removeExecutor.bind(n,e,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(i.Events.BUFFER_FLUSHED,{type:e})},onError:function(t){a.logger.warn("[buffer-controller]: Failed to remove from "+e+" SourceBuffer",t)}}};t.type?r.append(o(t.type),t.type):this.getSourceBufferTypes().forEach((function(e){r.append(o(e),e)}))},t.onFragParsed=function(e,t){var n=this,r=t.frag,o=t.part,s=[],l=o?o.elementaryStreams:r.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&s.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&s.push("video")),0===s.length&&a.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var e=self.performance.now();r.stats.buffering.end=e,o&&(o.stats.buffering.end=e);var t=o?o.stats:r.stats;n.hls.trigger(i.Events.FRAG_BUFFERED,{frag:r,part:o,stats:t,id:r.type})}),s)},t.onFragChanged=function(e,t){this.flushBackBuffer()},t.onBufferEos=function(e,t){var n=this;this.getSourceBufferTypes().reduce((function(e,r){var i=n.sourceBuffer[r];return t.type&&t.type!==r||i&&!i.ended&&(i.ended=!0,a.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS")),e&&!(i&&!i.ended)}),!0)&&this.blockBuffers((function(){var e=n.mediaSource;e&&"open"===e.readyState&&e.endOfStream()}))},t.onLevelUpdated=function(e,t){var n=t.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.flushBackBuffer=function(){var e=this.hls,t=this.details,n=this.media,a=this.sourceBuffer;if(n&&null!==t){var o=this.getSourceBufferTypes();if(o.length){var l=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if(Object(r.isFiniteNumber)(l)&&!(l<0)){var c=n.currentTime,u=t.levelTargetDuration,h=Math.max(l,u),d=Math.floor(c/u)*u-h;o.forEach((function(n){var r=a[n];if(r){var o=s.BufferHelper.getBuffered(r);o.length>0&&d>o.start(0)&&(e.trigger(i.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),t.live&&e.trigger(i.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),e.trigger(i.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:n}))}}))}}}},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var e=this.details,t=this.hls,n=this.media,i=this.mediaSource,o=e.fragments[0].start+e.totalduration,s=n.duration,l=Object(r.isFiniteNumber)(i.duration)?i.duration:0;e.live&&t.config.liveDurationInfinity?(a.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),i.duration=1/0,this.updateSeekableRange(e)):(o>l&&o>s||!Object(r.isFiniteNumber)(s))&&(a.logger.log("[buffer-controller]: Updating Media Source duration to "+o.toFixed(3)),i.duration=o)}},t.updateSeekableRange=function(e){var t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&null!=t&&t.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+e.totalduration);t.setLiveSeekableRange(r,i)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&!e||2===r){this.createSourceBuffers(n),this.pendingTracks={};var a=this.getSourceBufferTypes();if(0===a.length)return void this.hls.trigger(i.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)"});a.forEach((function(e){t.executeNext(e)}))}},t.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var s in e)if(!t[s]){var l=e[s];if(!l)throw Error("source buffer exists for track "+s+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;a.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var h=t[s]=n.addSourceBuffer(u),d=s;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[s]={buffer:h,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},r++}catch(e){a.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+e.message),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:u})}}r&&this.hls.trigger(i.Events.BUFFER_CREATED,{tracks:this.tracks})},t._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},t._onSBUpdateEnd=function(e){var t=this.operationQueue;t.current(e).onComplete(),t.shiftAndExecuteNext(e)},t._onSBUpdateError=function(e,t){a.logger.error("[buffer-controller]: "+e+" SourceBuffer error",t),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var n=this.operationQueue.current(e);n&&n.onError(t)},t.removeExecutor=function(e,t,n){var i=this.media,o=this.mediaSource,s=this.operationQueue,l=this.sourceBuffer[e];if(!i||!o||!l)return a.logger.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void s.shiftAndExecuteNext(e);var c=Object(r.isFiniteNumber)(i.duration)?i.duration:1/0,u=Object(r.isFiniteNumber)(o.duration)?o.duration:1/0,h=Math.max(0,t),d=Math.min(n,c,u);d>h?(a.logger.log("[buffer-controller]: Removing ["+h+","+d+"] from the "+e+" SourceBuffer"),console.assert(!l.updating,e+" sourceBuffer must not be updating"),l.remove(h,d)):s.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var n=this.operationQueue,r=this.sourceBuffer[t];if(!r)return a.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),void n.shiftAndExecuteNext(t);r.ended=!1,console.assert(!r.updating,t+" sourceBuffer must not be updating"),r.appendBuffer(e)},t.blockBuffers=function(e,t){var n=this;if(void 0===t&&(t=this.getSourceBufferTypes()),!t.length)return a.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(e);var r=this.operationQueue,i=t.map((function(e){return r.appendBlocker(e)}));Promise.all(i).then((function(){e(),t.forEach((function(e){var t=n.sourceBuffer[e];t&&t.updating||r.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,n){var r=this.sourceBuffer[e];if(r){var i=n.bind(this,e);this.listeners[e].push({event:t,listener:i}),r.addEventListener(t,i)}},t.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach((function(e){t.removeEventListener(e.event,e.listener)}))},e}()},"./src/controller/buffer-operation-queue.ts": +/*!**************************************************!*\ + !*** ./src/controller/buffer-operation-queue.ts ***! + \**************************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=function(){function e(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}var t=e.prototype;return t.append=function(e,t){var n=this.queues[t];n.push(e),1===n.length&&this.buffers[t]&&this.executeNext(t)},t.insertAbort=function(e,t){this.queues[t].unshift(e),this.executeNext(t)},t.appendBlocker=function(e){var t,n=new Promise((function(e){t=e})),r={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,e),n},t.executeNext=function(e){var t=this.buffers,n=this.queues,i=t[e],a=n[e];if(a.length){var o=a[0];try{o.execute()}catch(t){r.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(t),i&&i.updating||(a.shift(),this.executeNext(e))}}},t.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},t.current=function(e){return this.queues[e][0]},e}()},"./src/controller/cap-level-controller.ts": +/*!************************************************!*\ + !*** ./src/controller/cap-level-controller.ts ***! + \************************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts");function i(e,t){for(var n=0;n0&&this.mediaWidth>0){var e=this.hls.levels;if(e.length){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},o.getMaxLevel=function(t){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(r,i){return e.isLevelAllowed(i,n.restrictedLevels)&&i<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(i,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 e=this.media,t={width:0,height:0};if(e){var n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t},e.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},e.getMaxLevelByMediaSize=function(e,t,n){if(!e||!e.length)return-1;for(var r,i,a=e.length-1,o=0;o=t||s.height>=n)&&(r=s,!(i=e[o+1])||r.width!==i.width||r.height!==i.height)){a=o;break}}return a},t=e,a=[{key:"contentScaleFactor",get:function(){var e=1;try{e=self.devicePixelRatio}catch(e){}return e}}],(n=[{key:"mediaWidth",get:function(){return this.getDimensions().width*e.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*e.contentScaleFactor}}])&&i(t.prototype,n),a&&i(t,a),e}();t.default=a},"./src/controller/cmcd-controller.ts": +/*!*******************************************!*\ + !*** ./src/controller/cmcd-controller.ts ***! + \*******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return d}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../types/cmcd */"./src/types/cmcd.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts");function s(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nn&&(n=a.bitrate)}return n>0?n:NaN},t.getBufferLength=function(e){var t=this.hls.media,n=e===i.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return n&&t?1e3*a.BufferHelper.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},t.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},e.uuid=function(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)},e.serialize=function(e){for(var t,n=[],r=function(e){return!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e},i=function(e){return Math.round(e)},a=function(e){return 100*i(e/100)},o={br:i,d:i,bl:a,dl:a,mtp:a,nor:function(e){return encodeURIComponent(e)},rtp:a,tb:i},s=c(Object.keys(e||{}).sort());!(t=s()).done;){var l=t.value,u=e[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),n.push(f)}}return n.join(",")},e.toHeaders=function(t){for(var n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={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,s=Object.keys(t);o3)return void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;a.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(n,o)}}},c._generateLicenseRequestChallenge=function(e,t){switch(e.mediaKeySystemDomain){case o.KeySystems.WIDEVINE:return t}throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},c._requestLicense=function(e,t){a.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return a.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var o=this.getLicenseServerUrl(n.mediaKeySystemDomain),s=this._createLicenseXhr(o,e,t);a.logger.log("Sending license request to URL: "+o);var l=this._generateLicenseRequestChallenge(n,e);s.send(l)}catch(e){a.logger.error("Failure requesting DRM license: "+e),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(e,t){if(this._emeEnabled){var n=t.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)}},c.onMediaDetached=function(){var e=this._media,t=this._mediaKeysList;e&&(e.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map((function(e){if(e.mediaKeysSession)return e.mediaKeysSession.close().catch((function(){}))}))).then((function(){return e.setMediaKeys(null)})).catch((function(){})))},c.onManifestParsed=function(e,t){if(this._emeEnabled){var n=t.levels.map((function(e){return e.audioCodec})).filter((function(e){return!!e})),r=t.levels.map((function(e){return e.videoCodec})).filter((function(e){return!!e}));this._attemptKeySystemAccess(o.KeySystems.WIDEVINE,n,r)}},t=e,(n=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&s(t.prototype,n),l&&s(t,l),e}();t.default=l},"./src/controller/fps-controller.ts": +/*!******************************************!*\ + !*** ./src/controller/fps-controller.ts ***! + \******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=function(){function e(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching)},t.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},t.onMediaAttaching=function(e,t){var n=this.hls.config;if(n.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.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),n.fpsDroppedMonitoringPeriod)}},t.checkFPS=function(e,t,n){var a=performance.now();if(t){if(this.lastTime){var o=a-this.lastTime,s=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,c=1e3*s/o,u=this.hls;if(u.trigger(r.Events.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),c>0&&s>u.config.fpsDroppedMonitoringThreshold*l){var h=u.currentLevel;i.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=a,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.checkFPSInterval=function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},e}();t.default=a},"./src/controller/fragment-finders.ts": +/*!********************************************!*\ + !*** ./src/controller/fragment-finders.ts ***! + \********************************************/ +/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(e,t,n){"use strict";n.r(t),n.d(t,"findFragmentByPDT",(function(){return a})),n.d(t,"findFragmentByPTS",(function(){return o})),n.d(t,"fragmentWithinToleranceTest",(function(){return s})),n.d(t,"pdtWithinToleranceTest",(function(){return l})),n.d(t,"findFragWithCC",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function a(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!Object(r.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var i=0;ie&&n.start?-1:0}function l(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}function c(e,t){return i.default.search(e,(function(e){return e.cct?-1:0}))}},"./src/controller/fragment-tracker.ts": +/*!********************************************!*\ + !*** ./src/controller/fragment-tracker.ts ***! + \********************************************/ +/*! exports provided: FragmentState, FragmentTracker */function(e,t,n){"use strict";n.r(t),n.d(t,"FragmentState",(function(){return r})),n.d(t,"FragmentTracker",(function(){return o}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../types/loader */"./src/types/loader.ts");!function(e){e.NOT_LOADED="NOT_LOADED",e.BACKTRACKED="BACKTRACKED",e.APPENDING="APPENDING",e.PARTIAL="PARTIAL",e.OK="OK"}(r||(r={}));var o=function(){function e(e){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=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.on(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.off(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},t.getAppendedFrag=function(e,t){if(t===a.PlaylistLevelType.MAIN){var n=this.activeFragment,r=this.activeParts;if(!n)return null;if(r)for(var i=r.length;i--;){var o=r[i],s=o?o.end:n.appendedPTS;if(o.start<=e&&void 0!==s&&e<=s)return i>9&&(this.activeParts=r.slice(i-9)),o}else if(n.start<=e&&void 0!==n.appendedPTS&&e<=n.appendedPTS)return n}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var a=n[r[i]];if((null==a?void 0:a.body.type)===t&&a.buffered){var o=a.body;if(o.start<=e&&e<=o.end)return o}}return null},t.detectEvictedFragments=function(e,t,n){var r=this;Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a)if(a.buffered){var o=a.range[e];o&&o.time.some((function(e){var n=!r.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&r.removeFragment(a.body),n}))}else a.body.type===n&&r.removeFragment(a.body)}))},t.detectPartialFragments=function(e){var t=this,n=this.timeRanges,r=e.frag,i=e.part;if(n&&"initSegment"!==r.sn){var a=l(r),o=this.fragments[a];o&&(Object.keys(n).forEach((function(e){var a=r.elementaryStreams[e];if(a){var s=n[e],l=null!==i||!0===a.partial;o.range[e]=t.getBufferedTimes(r,i,l,s)}})),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body))}},t.fragBuffered=function(e){var t=l(e),n=this.fragments[t];n&&(n.backtrack=n.loaded=null,n.buffered=!0)},t.getBufferedTimes=function(e,t,n,r){for(var i={time:[],partial:n},a=t?t.start:e.start,o=t?t.end:e.end,s=e.minEndPTS||o,l=e.maxStartPTS||a,c=0;c=u&&s<=h){i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});break}if(au)i.partial=!0,i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});else if(o<=u)break}return i},t.getPartialFragment=function(e){var t,n,r,i=null,a=0,o=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&s(u)&&(n=u.body.start-o,r=u.body.end+o,e>=n&&e<=r&&(t=Math.min(e-n,r-e),a<=t&&(i=u.body,a=t)))})),i},t.getState=function(e){var t=l(e),n=this.fragments[t];return n?n.buffered?s(n)?r.PARTIAL:r.OK:n.backtrack?r.BACKTRACKED:r.APPENDING:r.NOT_LOADED},t.backtrack=function(e,t){var n=l(e),r=this.fragments[n];if(!r||r.backtrack)return null;var i=r.backtrack=t||r.loaded;return r.loaded=null,i},t.getBacktrackData=function(e){var t=l(e),n=this.fragments[t];if(n){var r,i=n.backtrack;if(null!=i&&null!==(r=i.payload)&&void 0!==r&&r.byteLength)return i;this.removeFragment(e)}return null},t.isTimeBuffered=function(e,t,n){for(var r,i,a=0;a=r&&t<=i)return!0;if(t<=r)return!1}return!1},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if("initSegment"!==n.sn&&!n.bitrateTest&&!r){var i=l(n);this.fragments[i]={body:n,loaded:t,backtrack:null,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var n=this,r=t.frag,i=t.part,o=t.timeRanges;if(r.type===a.PlaylistLevelType.MAIN)if(this.activeFragment=r,i){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(i)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach((function(e){var t=o[e];if(n.detectEvictedFragments(e,t),!i)for(var a=0;ae&&r.removeFragment(o)}}))},t.removeFragment=function(e){var t=l(e);e.stats.loaded=0,e.clearElementaryStreamInfo(),delete this.fragments[t]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},e}();function s(e){var t,n;return e.buffered&&((null===(t=e.range.video)||void 0===t?void 0:t.partial)||(null===(n=e.range.audio)||void 0===n?void 0:n.partial))}function l(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.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(e,t,n){"use strict";n.r(t),n.d(t,"STALL_MINIMUM_DURATION_MS",(function(){return s})),n.d(t,"MAX_START_GAP_JUMP",(function(){return l})),n.d(t,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),n.d(t,"SKIP_BUFFER_RANGE_START",(function(){return u})),n.d(t,"default",(function(){return h}));var r=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=250,l=2,c=.1,u=.05,h=function(){function e(e,t,n,r){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=e,this.media=t,this.fragmentTracker=n,this.hls=r}var t=e.prototype;return t.destroy=function(){this.hls=this.fragmentTracker=this.media=null},t.poll=function(e){var t=this.config,n=this.media,i=this.stalled,a=n.currentTime,c=n.seeking,u=this.seeking&&!c,h=!this.seeking&&c;if(this.seeking=c,a===e){if((h||u)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&r.BufferHelper.getBuffered(n).length){var d=r.BufferHelper.bufferInfo(n,a,0),f=d.len>0,p=d.nextStart||0;if(f||p){if(c){var m=d.len>l,g=!p||p-a>l&&!this.fragmentTracker.getPartialFragment(a);if(m||g)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,y=Math.max(p,d.start||0)-a,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 w=self.performance.now();if(null!==i){var C=w-i;!c&&C>=s&&this._reportStall(d.len);var E=r.BufferHelper.bufferInfo(n,a,t.maxBufferHole);this._tryFixBufferStall(E,C)}else this.stalled=w}}}else if(this.moved=!0,null!==i){if(this.stallReported){var k=self.performance.now()-i;o.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media.currentTime,a=r.getPartialFragment(i);a&&this._trySkipBufferHole(a)||e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(o.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,o.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+e+")"),t.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},t._trySkipBufferHole=function(e){for(var t=this.config,n=this.hls,s=this.media,l=s.currentTime,h=0,d=r.BufferHelper.getBuffered(s),f=0;f=h&&l.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,a)),u=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;e.playbackRate=Math.min(c,Math.max(1,u))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}}}}},l.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},l.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},t=e,(n=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e)return null;var t=e.holdBack,n=e.partHoldBack,r=e.targetduration,i=this.config,a=i.liveSyncDuration,o=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,c=s&&n||t;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==a?a:o*r);var u=r;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(null===e||null===t||null===n)return null;var r=n.edge,i=e-t-this.edgeStalled,a=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,i),o)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var n=e.buffered.length;return n?e.buffered.end(n-1):t.edge-this.currentTime}}])&&o(t.prototype,n),s&&o(t,s),e}()},"./src/controller/level-controller.ts": +/*!********************************************!*\ + !*** ./src/controller/level-controller.ts ***! + \********************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return p}));var r=n(/*! ../types/level */"./src/types/level.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/codecs */"./src/utils/codecs.ts"),s=n(/*! ./level-helper */"./src/controller/level-helper.ts"),l=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(e){for(var t=1;t0){n=c[0].bitrate,c.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=c;for(var v=0;vthis.hls.config.fragLoadingMaxRetry&&(o=n.frag.level)):o=n.frag.level}break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(l=!1),o=r.level),s=!0;break;case a.ErrorDetails.REMUX_ALLOC_ERROR:o=n.level,s=!0}void 0!==o&&this.recoverLevel(n,o,s,l)}}},v.recoverLevel=function(e,t,n,r){var i=e.details,a=this._levels[t];if(a.loadError++,n){if(!this.retryLoadingOrFail(e))return void(this.currentLevelIndex=-1);e.levelRetry=!0}if(r){var o=a.url.length;if(o>1&&a.loadError1){var r=(t.urlId+1)%n;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(e){e.urlId=r})),this.level=e}},v.onFragLoaded=function(e,t){var n=t.frag;if(void 0!==n&&n.type===c.PlaylistLevelType.MAIN){var r=this._levels[n.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},v.onLevelLoaded=function(e,t){var n,r,i=t.level,a=t.details,o=this._levels[i];if(!o)return this.warn("Invalid level index "+i),void(null!==(r=t.deliveryDirectives)&&void 0!==r&&r.skip&&(a.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(i,t,o.details)):null!==(n=t.deliveryDirectives)&&void 0!==n&&n.skip&&(a.deltaUpdateFailed=!0)},v.onAudioTrackSwitched=function(e,t){var n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=this.hls.audioTracks[t.id].groupId,a=0;a0){var r=n.urlId,a=n.url[r];if(e)try{a=e.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Attempt loading level index "+t+(e?" at sn "+e.msn+" part "+e.part:"")+" with URL-id "+r+" "+a),this.clearTimer(),this.hls.trigger(i.Events.LEVEL_LOADING,{url:a,level:t,id:r,deliveryDirectives:e||null})}},v.removeLevel=function(e,t){var n=function(e,n){return n!==t},r=this._levels.filter((function(r,i){return i!==e||r.url.length>1&&void 0!==t&&(r.url=r.url.filter(n),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(n)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(n)),r.urlId=0,!0)})).map((function(e,t){var n=e.details;return null!=n&&n.fragments&&n.fragments.forEach((function(e){e.level=t})),e}));this._levels=r,this.hls.trigger(i.Events.LEVELS_UPDATED,{levels:r})},p=l,(m=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t,n=this._levels;if(0!==n.length&&(this.currentLevelIndex!==e||null===(t=n[e])||void 0===t||!t.details)){if(e<0||e>=n.length){var r=e<0;if(this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:r,reason:"invalid level idx"}),r)return;e=Math.min(e,n.length-1)}this.clearTimer();var o=this.currentLevelIndex,s=n[o],l=n[e];this.log("switching to level "+e+" from "+o),this.currentLevelIndex=e;var c=u({},l,{level:e,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(i.Events.LEVEL_SWITCHING,c);var h=l.details;if(!h||h.live){var d=this.switchParams(l.uri,null==s?void 0:s.details);this.loadPlaylist(d)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&h(p.prototype,m),g&&h(p,g),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(e,t,n){"use strict";n.r(t),n.d(t,"addGroupId",(function(){return a})),n.d(t,"assignTrackIdsByGroup",(function(){return o})),n.d(t,"updatePTS",(function(){return s})),n.d(t,"updateFragPTSDTS",(function(){return c})),n.d(t,"mergeDetails",(function(){return u})),n.d(t,"mapPartIntersection",(function(){return h})),n.d(t,"mapFragmentIntersection",(function(){return d})),n.d(t,"adjustSliding",(function(){return f})),n.d(t,"addSliding",(function(){return p})),n.d(t,"computeReloadInterval",(function(){return m})),n.d(t,"getFragmentWithSN",(function(){return g})),n.d(t,"getPartWith",(function(){return v}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts");function a(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function o(e){var t={};e.forEach((function(e){var n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}function s(e,t,n){l(e[t],e[n])}function l(e,t){var n=t.startPTS;if(Object(r.isFiniteNumber)(n)){var i,a=0;t.sn>e.sn?(a=n-e.start,i=e):(a=e.start-n,i=t),i.duration!==a&&(i.duration=a)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}function c(e,t,n,a,o,s){a-n<=0&&(i.logger.warn("Fragment should have a positive duration",t),a=n+t.duration,s=o+t.duration);var c=n,u=a,h=t.startPTS,d=t.endPTS;if(Object(r.isFiniteNumber)(h)){var f=Math.abs(h-n);Object(r.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(f,t.deltaPTS):t.deltaPTS=f,c=Math.max(n,h),n=Math.min(n,h),o=Math.min(o,t.startDTS),u=Math.min(a,d),a=Math.max(a,d),s=Math.max(s,t.endDTS)}t.duration=a-n;var p=n-t.start;t.appendedPTS=a,t.start=t.startPTS=n,t.maxStartPTS=c,t.startDTS=o,t.endPTS=a,t.minEndPTS=u,t.endDTS=s;var m,g=t.sn;if(!e||ge.endSN)return 0;var v=g-e.startSN,y=e.fragments;for(y[v]=t,m=v;m>0;m--)l(y[m],y[m-1]);for(m=v;m=0;o--){var s=a[o].initSegment;if(s){n=s;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var l,u=0;if(d(e,t,(function(e,i){e.relurl&&(u=e.cc-i.cc),Object(r.isFiniteNumber)(e.startPTS)&&Object(r.isFiniteNumber)(e.endPTS)&&(i.start=i.startPTS=e.startPTS,i.startDTS=e.startDTS,i.appendedPTS=e.appendedPTS,i.maxStartPTS=e.maxStartPTS,i.endPTS=e.endPTS,i.endDTS=e.endDTS,i.minEndPTS=e.minEndPTS,i.duration=e.endPTS-e.startPTS,i.duration&&(l=i),t.PTSKnown=t.alignedSliding=!0),i.elementaryStreams=e.elementaryStreams,i.loader=e.loader,i.stats=e.stats,i.urlId=e.urlId,e.initSegment&&(i.initSegment=e.initSegment,n=e.initSegment)})),n&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((function(e){var t;e.initSegment&&e.initSegment.relurl!==(null===(t=n)||void 0===t?void 0:t.relurl)||(e.initSegment=n)})),t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some((function(e){return!e})),t.deltaUpdateFailed)){i.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=t.skippedSegments;p--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var m=t.fragments;if(u){i.logger.warn("discontinuity sliding from playlist, take drift into account");for(var g=0;g=r.length||p(t,r[n].start)}function p(e,t){if(t){for(var n=e.fragments,r=e.skippedSegments;r0&&a<3*r,s=t.loading.end-t.loading.start,l=e.availabilityDelay;if(!1===e.updated)if(o){var c=333*e.misses;n=Math.max(Math.min(i,2*s),c),e.availabilityDelay=(e.availabilityDelay||0)+n}else n=i;else o?(l=Math.min(l||r/2,a),e.availabilityDelay=l,n=l+r-a):n=r-s;return Math.round(n)}function g(e,t,n){if(!e||!e.details)return null;var r=e.details,i=r.fragments[t-r.startSN];return i||((i=r.fragmentHint)&&i.sn===t?i:t0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=i.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=i.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_LEVEL:var e,t=this.levels,n=this.level,r=null==t||null===(e=t[n])||void 0===e?void 0:e.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=i.State.IDLE;break}break;case i.State.FRAG_LOADING_WAITING_RETRY:var a,o=self.performance.now(),s=this.retryDate;(!s||o>=s||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=i.State.IDLE)}this.onTickEnd()},C.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var e,t,n=this.hls,r=this.levelLastLoaded,a=this.levels,s=this.media,h=n.config,d=n.nextLoadLevel;if(null!==r&&(s||!this.startFragRequested&&h.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&a&&a[d]){var f=a[d];this.level=n.nextLoadLevel=d;var p=f.details;if(!p||this.state===i.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==d)this.state=i.State.WAITING_LEVEL;else{var m=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:s,c.PlaylistLevelType.MAIN);if(null!==m&&!(m.len>=this.getMaxBufferLength(f.maxBitrate))){if(this._streamEnded(m,p)){var g={};return this.altAudio&&(g.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,g),void(this.state=i.State.ENDED)}var v=m.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(s,x,c.PlaylistLevelType.MAIN),y=this.getNextFragment(this.nextLoadPosition,p)}y&&(!y.initSegment||y.initSegment.data||this.bitrateTest||(y=y.initSegment),"identity"!==(null===(e=y.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=y.decryptdata)&&void 0!==t&&t.key?this.loadFragment(y,p,v):this.loadKey(y,p))}}}},C.loadFragment=function(t,n,r){var i,a=this.fragmentTracker.getState(t);if(this.fragCurrent=t,a===l.FragmentState.BACKTRACKED){var o=this.fragmentTracker.getBacktrackData(t);if(o)return this._handleFragmentLoadProgress(o),void this._handleFragmentLoadComplete(o);a=l.FragmentState.NOT_LOADED}a===l.FragmentState.NOT_LOADED||a===l.FragmentState.PARTIAL?"initSegment"===t.sn?this._loadInitSegment(t):this.bitrateTest?(t.bitrateTest=!0,this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t)):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)):a===l.FragmentState.APPENDING?this.reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t):0===(null===(i=this.media)||void 0===i?void 0:i.buffered.length)&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(e){var t=this.fragmentTracker.getAppendedFrag(e,c.PlaylistLevelType.MAIN);return t&&"fragment"in t?t.fragment:t},C.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,c.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var n,r=this.getAppendedFrag(t.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!t.paused&&e){var i=e[this.hls.nextLoadLevel],a=this.fragLastKbps;n=a&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*a)+1:0}else n=0;var o=this.getBufferedFrag(t.currentTime+n);if(o){var s=this.followingBufferedFrag(o);if(s){this.abortCurrentFrag();var l=s.maxStartPTS?s.maxStartPTS:s.start,c=s.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 e=this.fragCurrent;this.fragCurrent=null,null!=e&&e.loader&&e.loader.abort(),this.state===i.State.KEY_LOADING&&(this.state=i.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(t,n){e.prototype.flushMainBuffer.call(this,t,n,this.altAudio?"video":null)},C.onMediaAttached=function(t,n){e.prototype.onMediaAttached.call(this,t,n);var r=n.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 t=this.media;t&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),e.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;Object(r.isFiniteNumber)(t)&&this.log("Media seeked to "+t.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(e,t){var n,r=!1,i=!1;t.levels.forEach((function(e){(n=e.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(r=!0),-1!==n.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=r&&i&&!Object(a.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},C.onLevelLoading=function(e,t){var n=this.levels;if(n&&this.state===i.State.IDLE){var r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(r.details))&&(this.state=i.State.WAITING_LEVEL)}},C.onLevelLoaded=function(e,t){var n,r=this.levels,a=t.level,s=t.details,l=s.totalduration;if(r){this.log("Level "+a+" loaded ["+s.startSN+","+s.endSN+"], cc ["+s.startCC+", "+s.endCC+"] duration:"+l);var c=this.fragCurrent;!c||this.state!==i.State.FRAG_LOADING&&this.state!==i.State.FRAG_LOADING_WAITING_RETRY||c.level!==t.level&&c.loader&&(this.state=i.State.IDLE,c.loader.abort());var u=r[a],h=0;if(s.live||null!==(n=u.details)&&void 0!==n&&n.live){if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed)return;h=this.alignPlaylists(s,u.details)}if(u.details=s,this.levelLastLoaded=a,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:s,level:a}),this.state===i.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=i.State.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,h),this.tick()}else this.warn("Levels were reset while loading level "+a)},C._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.levels;if(a){var o=a[n.level],s=o.details;if(s){var l=o.videoCodec,u=s.PTSKnown||!s.live,f=null===(t=n.initSegment)||void 0===t?void 0:t.data,p=this._getAudioCodec(o),m=this.transmuxer=this.transmuxer||new h.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),g=r?r.index:-1,v=-1!==g,y=new d.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,i.byteLength,g,v),b=this.initPTS[n.cc];m.push(i,f,p,l,n,r,s.totalduration,u,y,b)}else this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},C.onAudioTrackSwitching=function(e,t){var n=this.altAudio,r=!!t.url,i=t.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 a=this.fragCurrent;null!=a&&a.loader&&(this.log("Switching to main audio track, cancel main fragment load"),a.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var s=this.hls;n&&s.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:i})}},C.onAudioTrackSwitched=function(e,t){var n=t.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},C.onBufferCreated=function(e,t){var n,r,i=t.tracks,a=!1;for(var o in i){var s=i[o];if("main"===s.id){if(r=o,n=s,"video"===o){var l=i[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(e,t){var n=t.frag,r=t.part;if(!n||n.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===i.State.PARSED&&(this.state=i.State.IDLE));var a=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},C.onError=function(e,t){switch(t.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,t);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==i.State.ERROR&&(t.fatal?(this.warn(""+t.details),this.state=i.State.ERROR):t.levelRetry||this.state!==i.State.WAITING_LEVEL||(this.state=i.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:if("main"===t.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var n=!0,r=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);r&&r.len>.5&&(n=!this.reduceMaxBufferLength(r.len)),n&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},C.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){var n=s.BufferHelper.getBuffered(e);!this.loadedmetadata&&n.length?(this.loadedmetadata=!0,this.seekToStartPos()):t.poll(this.lastCurrentTime),this.lastCurrentTime=e.currentTime}},C.onFragLoadEmergencyAborted=function(){this.state=i.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(e,t){var n=t.type;if(n!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(n===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,c.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(e,t){this.levels=t.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var e=this.media,t=e.currentTime,n=this.startPosition;if(n>=0&&t0&&(i1&&!1===e.seeking){var n=e.currentTime;if(s.BufferHelper.isBuffered(e,n)?t=this.getAppendedFrag(n):s.BufferHelper.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){var r=this.fragPlaying,i=t.level;r&&t.sn===r.sn&&r.level===i&&t.urlId===r.urlId||(this.hls.trigger(o.Events.FRAG_CHANGED,{frag:t}),r&&r.level===i||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:i}),this.fragPlaying=t)}}},b=y,(x=[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);return this.followingBufferedFrag(t)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&g(b.prototype,x),w&&g(b,w),y}(i.default)},"./src/controller/subtitle-stream-controller.ts": +/*!******************************************************!*\ + !*** ./src/controller/subtitle-stream-controller.ts ***! + \******************************************************/ +/*! exports provided: SubtitleStreamController */function(e,t,n){"use strict";n.r(t),n.d(t,"SubtitleStreamController",(function(){return m}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),s=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),l=n(/*! ./level-helper */"./src/controller/level-helper.ts"),c=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),u=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),h=n(/*! ../types/loader */"./src/types/loader.ts"),d=n(/*! ../types/level */"./src/types/level.ts");function f(e,t){for(var n=0;n=i[s].start&&o<=i[s].end){a=i[s];break}var l=n.start+n.duration;a?a.end=l:(a={start:o,end:l},i.push(a)),this.fragmentTracker.fragBuffered(n)}}},b.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=this.currentTrackId,a=this.levels;if(!a.length||!a[i]||!a[i].details)return;var o=r-a[i].details.targetduration;if(o<=0)return;t.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(e){for(var t=0;t=c.length||i!==a)&&h){if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||null!==(n=h.details)&&void 0!==n&&n.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(s.alignMediaPlaylistByPDT)(r,d):f&&Object(l.addSliding)(r,f.start)}h.details=r,this.levelLastLoaded=i,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(e){var t=e.frag,n=e.payload,i=t.decryptdata,a=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var o=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(n),i.key.buffer,i.iv.buffer).then((function(e){var n=performance.now();a.trigger(r.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:o,tdecrypt:n}})}))}},b.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var e,t=this.currentTrackId,n=this.levels;if(!n.length||!n[t]||!n[t].details)return;var s=n[t].details,l=s.targetduration,h=this.config,d=this.media,f=a.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,d.currentTime-l,h.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(s,"Subtitle track details are defined on idle subtitle stream controller tick");var m,g=s.fragments,v=g.length,y=s.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(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},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(e){Object(i.clearCurrentCues)(e)})),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(e,t){this.tracks=t.subtitleTracks},f.onSubtitleTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.trackId,a=this.tracksInGroup[i];if(a){var o=a.details;a.details=t.details,this.log("subtitle track "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,o))}else this.warn("Invalid subtitle track id "+n)},f.onLevelLoading=function(e,t){this.switchLevel(t.level)},f.onLevelSwitching=function(e,t){this.switchLevel(t.level)},f.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.textGroupIds){var n=t.textGroupIds[t.urlId];if(this.groupId!==n){var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,a=this.tracks.filter((function(e){return!n||e.groupId===n}));this.tracksInGroup=a;var o=this.findTrackId(null==i?void 0:i.name)||this.findTrackId();this.groupId=n;var s={subtitleTracks:a};this.log("Updating subtitle tracks, "+a.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(r.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==o&&this.setSubtitleTrack(o,i)}}},f.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n=i.length)){this.clearTimer();var a=i[e];if(this.log("Switching to subtitle track "+e),this.trackId=e,a){var o=a.id,s=a.groupId,l=void 0===s?"":s,c=a.name,u=a.type,h=a.url;this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:l,name:c,type:u,url:h});var d=this.switchParams(a.url,null==t?void 0:t.details);this.loadPlaylist(d)}else this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:e})}}else this.queuedDefaultTrack=e},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=u(this.media.textTracks),n=0;n=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),u=!0,f/(n-t)>.5))return}if(u||a.push([t,n]),this.config.renderTextTracksNatively){var p=this.captionsTracks[e];this.Cues.newCue(p,t,n,r)}else{var m=this.Cues.newCue(null,t,n,r);this.hls.trigger(i.Events.CUES_PARSED,{type:"captions",cues:m,track:e})}},t.onInitPtsFound=function(e,t){var n=this,r=t.frag,a=t.id,o=t.initPTS,s=t.timescale,l=this.unparsedVttFrags;"main"===a&&(this.initPTS[r.cc]=o,this.timescale[r.cc]=s),l.length&&(this.unparsedVttFrags=[],l.forEach((function(e){n.onFragLoaded(i.Events.FRAG_LOADED,e)})))},t.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n>>8^255&g^99,e[f]=g,t[g]=f;var v=d[f],y=d[v],b=d[y],x=257*d[g]^16843008*g;r[f]=x<<24|x>>>8,i[f]=x<<16|x>>>16,a[f]=x<<8|x>>>24,o[f]=x,x=16843009*b^65537*y^257*v^16843008*f,l[g]=x<<24|x>>>8,c[g]=x<<16|x>>>16,u[g]=x<<8|x>>>24,h[g]=x,f?(f=v^d[d[d[b^v]]],p^=d[d[p]]):f=p=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r>>6);var p=(60&t[n+2])>>>2;if(!(p>f.length-1))return c=(1&t[n+2])<<2,c|=(192&t[n+3])>>>6,r.logger.log("manifest codec:"+o+", ADTS type:"+s+", samplingIndex:"+p),/firefox/i.test(h)?p>=6?(s=5,u=new Array(4),l=p-3):(s=2,u=new Array(2),l=p):-1!==h.indexOf("android")?(s=2,u=new Array(2),l=p):(s=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)&&(s=2,u=new Array(2)),l=p)),u[0]=s<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===s&&(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."+s,manifestCodec:d};e.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function s(e,t){return 255===e[t]&&240==(246&e[t+1])}function l(e,t){return 1&e[t+1]?7:9}function c(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function u(e,t){return t+5=e.length)return!1;var r=c(e,t);if(r<=n)return!1;var i=t+r;return i===e.length||h(e,i)}return!1}function p(e,t,n,i,a){if(!e.samplerate){var s=o(t,n,i,a);if(!s)return;e.config=s.config,e.samplerate=s.samplerate,e.channelCount=s.channelCount,e.codec=s.codec,e.manifestCodec=s.manifestCodec,r.logger.log("parsed codec:"+e.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function m(e){return 9216e4/e}function g(e,t,n,r,i){var a=l(e,t),o=c(e,t);if((o-=a)>0)return{headerLength:a,frameLength:o,stamp:n+r*i}}function v(e,t,n,r,i){var a=g(t,n,r,i,m(e.samplerate));if(a){var o,s=a.frameLength,l=a.headerLength,c=a.stamp,u=l+s,h=Math.max(0,n+u-t.length);h?(o=new Uint8Array(u-l)).set(t.subarray(n+l,t.length),0):o=t.subarray(n+l,n+u);var d={unit:o,pts:c};return h||e.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(e,t,n){"use strict";n.r(t),n.d(t,"initPTSFn",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),o=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),l=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(){},t.resetContiguity=function(){},t.canParse=function(e,t){return!1},t.appendFrame=function(e,t,n){},t.demux=function(e,t){this.cachedData&&(e=Object(o.appendUint8Array)(this.cachedData,e),this.cachedData=null);var n,r,l=i.getID3Data(e,0),u=l?l.length:0,h=this._audioTrack,d=this._id3Track,f=l?i.getTimeStamp(l):void 0,p=e.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=c(f,t)),l&&l.length>0&&d.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),r=this.initPTS;ue?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&r.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){for(var t=8,n=8,r=0;r0)return e.subarray(n,n+r)},s=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3]},l=function(e,t){return i(e,t)&&s(e,t+6)+10<=e.length-t},c=function(e){for(var t=d(e),n=0;n>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(a);break;case 12:case 13:o=e[u++],c+=String.fromCharCode((31&a)<<6|63&o);break;case 14:o=e[u++],s=e[u++],c+=String.fromCharCode((15&a)<<12|(63&o)<<6|(63&s)<<0)}}return c},b={decodeTextFrame:m};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(e,t,n){"use strict";n.r(t);var r=n(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ./mpegaudio */"./src/demux/mpegaudio.ts");function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var l=r.prototype;return l.resetInitSegment=function(t,n,r){e.prototype.resetInitSegment.call(this,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(i.getID3Data(e,0)||[]).length,n=e.length;t0},t.demux=function(e){var t=e,n=Object(i.dummyTrack)();if(this.config.progressive){this.remainderData&&(t=Object(r.appendUint8Array)(this.remainderData,e));var a=Object(r.segmentValidRange)(t);this.remainderData=a.remainder,n.samples=a.valid||new Uint8Array}else n.samples=t;return{audioTrack:Object(i.dummyTrack)(),avcTrack:n,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.flush=function(){var e=Object(i.dummyTrack)();return e.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(i.dummyTrack)(),avcTrack:e,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){},e}();a.minProbeByteLength=1024,t.default=a},"./src/demux/mpegaudio.ts": +/*!********************************!*\ + !*** ./src/demux/mpegaudio.ts ***! + \********************************/ +/*! exports provided: appendFrame, parseHeader, isHeaderPattern, isHeader, canParse, probe */function(e,t,n){"use strict";n.r(t),n.d(t,"appendFrame",(function(){return l})),n.d(t,"parseHeader",(function(){return c})),n.d(t,"isHeaderPattern",(function(){return u})),n.d(t,"isHeader",(function(){return h})),n.d(t,"canParse",(function(){return d})),n.d(t,"probe",(function(){return f}));var r=null,i=[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],a=[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]],s=[0,1,1,4];function l(e,t,n,r,i){if(!(n+24>t.length)){var a=c(t,n);if(a&&n+a.frameLength<=t.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength,missing:0}}}}function c(e,t){var n=e[t+1]>>3&3,l=e[t+1]>>1&3,c=e[t+2]>>4&15,u=e[t+2]>>2&3;if(1!==n&&0!==c&&15!==c&&3!==u){var h=e[t+2]>>1&1,d=e[t+3]>>6,f=1e3*i[14*(3===n?3-l:3===l?3:4)+c-1],p=a[3*(3===n?0:2===n?1:2)+u],m=3===d?1:2,g=o[n][l],v=s[l],y=8*g*v,b=Math.floor(g*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&&(e[t+3]=128|e[t+3]),{sampleRate:p,channelCount:m,frameLength:b,samplesPerFrame:y}}}function u(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function h(e,t){return t+1=e.length)return void n();if(!(e[t].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,r),!r)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n},t.getAvcDecryptedUnit=function(e,t){for(var n=new Uint8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e},t.decryptAvcSample=function(e,t,n,r,a,o){var s=Object(i.discardEPB)(a.data),l=this.getAvcEncryptedData(s),c=this;this.decryptBuffer(l.buffer,(function(i){a.data=c.getAvcDecryptedUnit(s,i),o||c.decryptAvcSamples(e,t,n+1,r)}))},t.decryptAvcSamples=function(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var a=i[n];if(!(a.data.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,r,a,o),!o)return}}}},e}();t.default=a},"./src/demux/transmuxer-interface.ts": +/*!*******************************************!*\ + !*** ./src/demux/transmuxer-interface.ts ***! + \*******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h}));var r=n(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function e(e,t,n,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=e,this.id=t,this.onTransmuxComplete=n,this.onFlush=l;var d=e.config,f=function(t,n){(n=n||{}).frag=h.frag,n.id=h.id,e.trigger(t,n)};this.observer=new c.EventEmitter,this.observer.on(i.Events.FRAG_DECRYPTED,f),this.observer.on(i.Events.ERROR,f);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(d.enableWorker&&"undefined"!=typeof Worker){var g;o.logger.log("demuxing in webworker");try{g=this.worker=r(/*! ../demux/transmuxer-worker.ts */"./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(t){e.trigger(i.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(t.message+" ("+t.filename+":"+t.lineno+")")})},g.postMessage({cmd:"init",typeSupported:p,vendor:m,id:t,config:JSON.stringify(d)})}catch(e){o.logger.warn("Error in worker:",e),o.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new a.default(this.observer,p,d,m,t),this.worker=null}}else this.transmuxer=new a.default(this.observer,p,d,m,t)}var t=e.prototype;return t.destroy=function(){var e=this.worker;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.worker=null;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var n=this.observer;n&&n.removeAllListeners(),this.observer=null},t.push=function(e,t,n,r,i,s,l,c,u,h){var d=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,m=s?s.start:i.start,g=i.decryptdata,v=this.frag,y=!(v&&i.cc===v.cc),b=!(v&&u.level===v.level),x=v?u.sn-v.sn:-1,w=this.part?u.part-this.part.index:1,C=!b&&(1===x||0===x&&1===w),E=self.performance.now();(b||x||0===i.stats.parsing.start)&&(i.stats.parsing.start=E),!s||!w&&C||(s.stats.parsing.start=E);var k=new a.TransmuxState(y,C,c,b,m);if(!C||y){o.logger.log("[transmuxer-interface, "+i.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: "+m);var S=new a.TransmuxConfig(n,r,t,l,h);this.configureTransmuxer(S)}if(this.frag=i,this.part=s,p)p.postMessage({cmd:"demux",data:e,decryptdata:g,chunkMeta:u,state:k},e instanceof ArrayBuffer?[e]:[]);else if(f){var O=f.push(e,g,u,k);Object(a.isPromise)(O)?O.then((function(e){d.handleTransmuxComplete(e)})):this.handleTransmuxComplete(O)}},t.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:e});else if(n){var i=n.flush(e);Object(a.isPromise)(i)?i.then((function(n){t.handleFlushResult(n,e)})):this.handleFlushResult(i,e)}},t.handleFlushResult=function(e,t){var n=this;e.forEach((function(e){n.handleTransmuxComplete(e)})),this.onFlush(t)},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},t.configureTransmuxer=function(e){var t=this.worker,n=this.transmuxer;t?t.postMessage({cmd:"configure",config:e}):n&&n.configure(e)},t.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},e}()},"./src/demux/transmuxer-worker.ts": +/*!****************************************!*\ + !*** ./src/demux/transmuxer-worker.ts ***! + \****************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return s}));var r=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function s(e){var t=new o.EventEmitter,n=function(t,n){e.postMessage({event:t,data:n})};t.on(i.Events.FRAG_DECRYPTED,n),t.on(i.Events.ERROR,n),e.addEventListener("message",(function(i){var o=i.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);e.transmuxer=new r.default(t,o.typeSupported,s,o.vendor,o.id),Object(a.enableLogs)(s.debug),n("init",null);break;case"configure":e.transmuxer.configure(o.config);break;case"demux":var c=e.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(r.isPromise)(c)?c.then((function(t){l(e,t)})):l(e,c);break;case"flush":var h=o.chunkMeta,d=e.transmuxer.flush(h);Object(r.isPromise)(d)?d.then((function(t){u(e,t,h)})):u(e,d,h)}}))}function l(e,t){if((n=t.remuxResult).audio||n.video||n.text||n.id3||n.initSegment){var n,r=[],i=t.remuxResult,a=i.audio,o=i.video;a&&c(r,a),o&&c(r,o),e.postMessage({event:"transmuxComplete",data:t},r)}}function c(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function u(e,t,n){t.forEach((function(t){l(e,t)})),e.postMessage({event:"flush",data:n})}},"./src/demux/transmuxer.ts": +/*!*********************************!*\ + !*** ./src/demux/transmuxer.ts ***! + \*********************************/ +/*! exports provided: default, isPromise, TransmuxConfig, TransmuxState */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return y})),n.d(t,"isPromise",(function(){return x})),n.d(t,"TransmuxConfig",(function(){return w})),n.d(t,"TransmuxState",(function(){return C}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),s=n(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.ts"),l=n(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.ts"),c=n(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.ts"),u=n(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.ts"),h=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),d=n(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.ts"),f=n(/*! ./chunk-cache */"./src/demux/chunk-cache.ts"),p=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),m=n(/*! ../utils/logger */"./src/utils/logger.ts");try{r=self.performance.now.bind(self.performance)}catch(e){m.logger.debug("Unable to use Performance API on this environment"),r=self.Date.now}var g=[{demux:c.default,remux:h.default},{demux:l.default,remux:d.default},{demux:s.default,remux:h.default},{demux:u.default,remux:h.default}],v=1024;g.forEach((function(e){var t=e.demux;v=Math.max(v,t.minProbeByteLength)}));var y=function(){function e(e,t,n,r,i){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=e,this.typeSupported=t,this.config=n,this.vendor=r,this.id=i}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(e,t,n,i){var a=this,o=n.transmuxing;o.executeStart=r();var s=new Uint8Array(e),l=this.cache,c=this.config,u=this.currentTransmuxState,h=this.transmuxConfig;i&&(this.currentTransmuxState=i);var d=function(e,t){var n=null;return e.byteLength>0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(n=t),n}(s,t);if(d&&"AES-128"===d.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(s,d.key.buffer,d.iv.buffer).then((function(e){var t=a.push(e,null,n);return a.decryptionPromise=null,t})),this.decryptionPromise;var m=f.softwareDecrypt(s,d.key.buffer,d.iv.buffer);if(!m)return o.executeEnd=r(),b(n);s=new Uint8Array(m)}var g=i||u,v=g.contiguous,y=g.discontinuity,x=g.trackSwitch,w=g.accurateTimeOffset,C=g.timeOffset,E=h.audioCodec,k=h.videoCodec,S=h.defaultInitPts,O=h.duration,T=h.initSegmentData;if((y||x)&&this.resetInitSegment(T,E,k,O),y&&this.resetInitialTimestamp(S),v||this.resetContiguity(),this.needsProbing(s,y,x)){if(l.dataLength){var L=l.flush();s=Object(p.appendUint8Array)(L,s)}this.configureTransmuxer(s,h)}var _=this.transmux(s,d,C,w,n),A=this.currentTransmuxState;return A.contiguous=!0,A.discontinuity=!1,A.trackSwitch=!1,o.executeEnd=r(),_},t.flush=function(e){var t=this,n=e.transmuxing;n.executeStart=r();var o=this.decrypter,s=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return t.flush(e)}));var u=[],h=l.timeOffset;if(o){var d=o.flush();d&&u.push(this.push(d,null,e))}var f=s.dataLength;s.reset();var p=this.demuxer,m=this.remuxer;if(!p||!m)return f>=v&&this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),n.executeEnd=r(),[b(e)];var g=p.flush(h);return x(g)?g.then((function(n){return t.flushRemux(u,n,e),u})):(this.flushRemux(u,g,e),u)},t.flushRemux=function(e,t,n){var i=t.audioTrack,a=t.avcTrack,o=t.id3Track,s=t.textTrack,l=this.currentTransmuxState,c=l.accurateTimeOffset,u=l.timeOffset;m.logger.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var h=this.remuxer.remux(i,a,o,s,u,c,!0,this.id);e.push({remuxResult:h,chunkMeta:n}),n.transmuxing.executeEnd=r()},t.resetInitialTimestamp=function(e){var t=this.demuxer,n=this.remuxer;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,n,r){var i=this.demuxer,a=this.remuxer;i&&a&&(i.resetInitSegment(t,n,r),a.resetInitSegment(e,t,n))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(e,t,n,r,i){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,r,i):this.transmuxUnencrypted(e,n,r,i)},t.transmuxUnencrypted=function(e,t,n,r){var i=this.demuxer.demux(e,t,!1,!this.config.progressive),a=i.audioTrack,o=i.avcTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(a,o,s,l,t,n,!1,this.id),chunkMeta:r}},t.transmuxSampleAes=function(e,t,n,r,i){var a=this;return this.demuxer.demuxSampleAes(e,t,n).then((function(e){return{remuxResult:a.remuxer.remux(e.audioTrack,e.avcTrack,e.id3Track,e.textTrack,n,r,!1,a.id),chunkMeta:i}}))},t.configureTransmuxer=function(e,t){for(var n,r=this.config,i=this.observer,a=this.typeSupported,o=this.vendor,s=t.audioCodec,c=t.defaultInitPts,u=t.duration,h=t.initSegmentData,f=t.videoCodec,p=0,v=g.length;p>4>1){if((A=T+5+t[T+4])===T+188)continue}else A=T+4;switch(_){case f:L&&(p&&(a=v(p))&&this.parseAVCPES(a,!1),p={data:[],size:0}),p&&(p.data.push(t.subarray(A,T+188)),p.size+=T+188-A);break;case y:L&&(x&&(a=v(x))&&(s.isAAC?this.parseAACPES(a):this.parseMPEGPES(a)),x={data:[],size:0}),x&&(x.data.push(t.subarray(A,T+188)),x.size+=T+188-A);break;case b:L&&(w&&(a=v(w))&&this.parseID3PES(a),w={data:[],size:0}),w&&(w.data.push(t.subarray(A,T+188)),w.size+=T+188-A);break;case 0:L&&(A+=t[A]+1),k=this._pmtId=m(t,A);break;case k:L&&(A+=t[A]+1);var D=g(t,A,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,r);(f=D.avc)>0&&(o.pid=f),(y=D.audio)>0&&(s.pid=y,s.isAAC=D.isAAC),(b=D.id3)>0&&(d.pid=b),C&&!E&&(u.logger.log("reparse from beginning"),C=!1,T=O-188),E=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,s.pesData=x,d.pesData=w;var R={audioTrack:s,avcTrack:o,id3Track:d,textTrack:this._txtTrack};return i&&this.extractRemainingSamples(R),R},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,n=e.audioTrack,r=e.avcTrack,i=e.id3Track,a=r.pesData,o=n.pesData,s=i.pesData;a&&(t=v(a))?(this.parseAVCPES(t,!0),r.pesData=null):r.pesData=a,o&&(t=v(o))?(n.isAAC?this.parseAACPES(t):this.parseMPEGPES(t),n.pesData=null):(null!=o&&o.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=o),s&&(t=v(s))?(this.parseID3PES(t),i.pesData=null):i.pesData=s},t.demuxSampleAes=function(e,t,n){var r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new s.default(this.observer,this.config,t);return this.decrypt(r,i)},t.decrypt=function(e,t){return new Promise((function(n){var r=e.audioTrack,i=e.avcTrack;r.samples&&r.isAAC?t.decryptAacSamples(r.samples,0,(function(){i.samples?t.decryptAvcSamples(i.samples,0,0,(function(){n(e)})):n(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(function(){n(e)}))}))},t.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},t.parseAVCPES=function(e,t){var n,r=this,i=this._avcTrack,s=this.parseAVCNALu(e.data),l=this.avcSample,c=!1;e.data=null,l&&s.length&&!i.audFound&&(y(l,i),l=this.avcSample=p(!1,e.pts,e.dts,"")),s.forEach((function(t){switch(t.type){case 1:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.frame=!0;var s=t.data;if(c&&s.length>4){var u=new a.default(s).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(l.key=!0)}break;case 5:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:n=!0;var h=new a.default(x(t.data));h.readUByte();for(var d=0,f=0,m=!1,g=0;!m&&h.bytesAvailable>1;){d=0;do{d+=g=h.readUByte()}while(255===g);f=0;do{f+=g=h.readUByte()}while(255===g);if(4===d&&0!==h.bytesAvailable){if(m=!0,181===h.readUByte()&&49===h.readUShort()&&1195456820===h.readUInt()&&3===h.readUByte()){for(var v=h.readUByte(),w=31&v,C=[v,h.readUByte()],E=0;E16){for(var k=[],S=0;S<16;S++)k.push(h.readUByte().toString(16)),3!==S&&5!==S&&7!==S&&9!==S||k.push("-");for(var O=f-16,T=new Uint8Array(O),L=0;L=0){var h={data:e.subarray(c,l-a-1),type:u};s.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)),(n=l-a-1)>0)){var f=new Uint8Array(d.data.byteLength+n);f.set(d.data,0),f.set(e.subarray(0,n),d.data.byteLength),d.data=f,d.state=0}}l=0&&a>=0){var p={data:e.subarray(c,r),type:u,state:a};s.push(p)}if(0===s.length){var m=this.getLastNalUnit();if(m){var g=new Uint8Array(m.data.byteLength+e.byteLength);g.set(m.data,0),g.set(e,m.data.byteLength),m.data=g}}return i.naluState=a,s},t.parseAACPES=function(e){var t,n,i,a,o,s=0,c=this._audioTrack,d=this.aacOverFlow,f=e.data;if(d){this.aacOverFlow=null;var p=d.sample.unit.byteLength,m=Math.min(d.missing,p),g=p-m;d.sample.unit.set(f.subarray(0,m),g),c.samples.push(d.sample),s=d.missing}for(t=s,n=f.length;t1;){var l=new Uint8Array(s[0].length+s[1].length);l.set(s[0]),l.set(s[1],s[0].length),s[0]=l,s.splice(1,1)}if(1===((t=s[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;var c=t[7];192&c&&(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&c?i-(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(u.logger.warn(Math.round((i-a)/9e4)+"s delta between PTS and DTS, align them"),i=a):a=i);var h=(r=t[8])+9;if(e.size<=h)return null;e.size-=h;for(var d=new Uint8Array(e.size),f=0,p=s.length;fm){h-=m;continue}t=t.subarray(h),m-=h,h=0}d.set(t,o),o+=m}return n&&(n-=r+3),{data:d,pts:i,dts:a,len:n}}return null}function y(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var n=t.samples,r=n.length;if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}t.samples.push(e)}e.debug.length&&u.logger.log(e.pts+"/"+e.dts+":"+e.debug)}function b(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var r=n-1;r>=0;r--)if(t.ptst)return r;return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{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(t.prototype,n),y&&v(t,y),e}();y.defaultConfig=void 0},"./src/is-supported.ts": +/*!*****************************!*\ + !*** ./src/is-supported.ts ***! + \*****************************/ +/*! exports provided: isSupported, changeTypeSupported */function(e,t,n){"use strict";n.r(t),n.d(t,"isSupported",(function(){return a})),n.d(t,"changeTypeSupported",(function(){return o}));var r=n(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function i(){return self.SourceBuffer||self.WebKitSourceBuffer}function a(){var e=Object(r.getMediaSource)();if(!e)return!1;var t=i(),n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),a=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!a}function o(){var e,t=i();return"function"==typeof(null==t||null===(e=t.prototype)||void 0===e?void 0:e.changeType)}},"./src/loader/fragment-loader.ts": +/*!***************************************!*\ + !*** ./src/loader/fragment-loader.ts ***! + \***************************************/ +/*! exports provided: default, LoadError */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h})),n.d(t,"LoadError",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../errors */"./src/errors.ts");function a(e){var t="function"==typeof Map?new Map:void 0;return(a=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return o(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,e)})(e)}function o(e,t,n){return(o=s()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&l(i,n.prototype),i}).apply(null,arguments)}function s(){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}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=Math.pow(2,17),h=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var n=this,r=e.url;if(!r)return Promise.reject(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(r?"part list":"url")));this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(r,l){n.loader&&n.loader.destroy();var c=n.loader=e.loader=o?new o(a):new s(a),h=d(e),p={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=c.stats,c.load(h,p,{onSuccess:function(t,i,a,o){n.resetLoader(e,c),r({frag:e,part:null,payload:t.data,networkDetails:o})},onError:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:a}))},onAbort:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:a}))},onTimeout:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:a}))},onProgress:function(n,r,i,a){t&&t({frag:e,part:null,payload:i,networkDetails:a})}})}))},t.loadPart=function(e,t,n){var r=this;this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(l,c){r.loader&&r.loader.destroy();var h=r.loader=e.loader=o?new o(a):new s(a),p=d(e,t),m={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=h.stats,h.load(p,m,{onSuccess:function(i,a,o,s){r.resetLoader(e,h),r.updateStatsFromPart(e,t);var c={frag:e,part:t,payload:i.data,networkDetails:s};n(c),l(c)},onError:function(n,a,o){r.resetLoader(e,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:n,networkDetails:o}))},onAbort:function(n,a,o){e.stats.aborted=t.stats.aborted,r.resetLoader(e,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:o}))},onTimeout:function(n,a,o){r.resetLoader(e,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,networkDetails:o}))}})}))},t.updateStatsFromPart=function(e,t){var n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){var a=Math.round(e.duration/t.duration),o=Math.min(Math.round(n.loaded/i),a),s=(a-o)*Math.round(n.loaded/o);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,c=r.loading;l.start?l.first+=c.first-c.start:(l.start=c.start,l.first=c.first),l.end=c.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function d(e,t){void 0===t&&(t=null);var n=t||e,i={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},a=n.byteRangeStartOffset,o=n.byteRangeEndOffset;return Object(r.isFiniteNumber)(a)&&Object(r.isFiniteNumber)(o)&&(i.rangeStart=a,i.rangeEnd=o),i}var f=function(e){var t,n;function r(t){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a>8*(15-n)&255;return t},n.setDecryptDataFromLevelKey=function(e,t){var n=e;return"AES-128"===(null==e?void 0:e.method)&&e.uri&&!e.iv&&((n=s.LevelKey.fromURI(e.uri)).method=e.method,n.iv=this.createInitializationVector(t),n.keyFormat="identity"),n},n.setElementaryStreamInfo=function(e,t,n,r,i,a){void 0===a&&(a=!1);var o=this.elementaryStreams,s=o[e];s?(s.startPTS=Math.min(s.startPTS,t),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,r),s.endDTS=Math.max(s.endDTS,i)):o[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:a}},n.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[r.AUDIO]=null,e[r.VIDEO]=null,e[r.AUDIOVIDEO]=null},d(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(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'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(i.isFiniteNumber)(this.programDateTime))return null;var e=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;return!(null===(e=this.decryptdata)||void 0===e||!e.keyFormat||!this.decryptdata.uri)}}]),t}(f),m=function(e){function t(t,n,r,i,a){var o;(o=e.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=t.decimalFloatingPoint("DURATION"),o.gap=t.bool("GAP"),o.independent=t.bool("INDEPENDENT"),o.relurl=t.enumeratedString("URI"),o.fragment=n,o.index=i;var s=t.enumeratedString("BYTERANGE");return s&&o.setByteRange(s,a),a&&(o.fragOffset=a.fragOffset+a.duration),o}return c(t,e),d(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(f)},"./src/loader/key-loader.ts": +/*!**********************************!*\ + !*** ./src/loader/key-loader.ts ***! + \**********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=function(){function e(e){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){this.hls.on(r.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(r.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){for(var e in this._unregisterListeners(),this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={}},t.onKeyLoading=function(e,t){var n=t.frag,i=n.type,o=this.loaders[i];if(n.decryptdata){var s=n.decryptdata.uri;if(s!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(o&&(a.logger.warn("abort previous key loader for type:"+i),o.abort()),!s)return void a.logger.warn("key uri is falsy");var c=l.loader,u=n.loader=this.loaders[i]=new c(l);this.decrypturl=s,this.decryptkey=null;var h={url:s,frag:n,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&&(n.decryptdata.key=this.decryptkey,this.hls.trigger(r.Events.KEY_LOADED,{frag:n}))}else a.logger.warn("Missing decryption data on fragment in onKeyLoading")},t.loadsuccess=function(e,t,n){var i=n.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(r.Events.KEY_LOADED,{frag:i})):a.logger.error("after key load, decryptdata unset")},t.loaderror=function(e,t){var n=t.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})},t.loadtimeout=function(e,t){var n=t.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},e}()},"./src/loader/level-details.ts": +/*!*************************************!*\ + !*** ./src/loader/level-details.ts ***! + \*************************************/ +/*! exports provided: LevelDetails */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelDetails",(function(){return a}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function i(e,t){for(var n=0;ne.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},t=e,(n=[{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 e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!==(e=this.fragments)&&void 0!==e&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&i(t.prototype,n),a&&i(t,a),e}()},"./src/loader/level-key.ts": +/*!*********************************!*\ + !*** ./src/loader/level-key.ts ***! + \*********************************/ +/*! exports provided: LevelKey */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelKey",(function(){return a}));var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js");function i(e,t){for(var n=0;n2){var n=t.shift()+".";return n+=parseInt(t.shift()).toString(16),n+=("000"+parseInt(t.shift()).toString(16)).substr(-4)}return e},e.resolve=function(e,t){return i.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var r,i=[],a={},o=!1;for(h.lastIndex=0;null!=(r=h.exec(t));)if(r[1]){var s=new l.AttrList(r[1]),c={attrs:s,bitrate:s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),name:s.NAME,url:e.resolve(r[2],n)},u=s.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((s.CODECS||"").split(/[ ,]+/).filter((function(e){return e})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=e.convertAVC1ToAVCOTI(c.videoCodec)),i.push(c)}else if(r[3]){var d=new l.AttrList(r[3]);d["DATA-ID"]&&(o=!0,a[d["DATA-ID"]]=d)}return{levels:i,sessionData:o?a:null}},e.parseMasterPlaylistMedia=function(t,n,r,i){var a;void 0===i&&(i=[]);var o=[],s=0;for(d.lastIndex=0;null!==(a=d.exec(t));){var c=new l.AttrList(a[1]);if(c.TYPE===r){var u={attrs:c,bitrate:0,id:s++,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?e.resolve(c.URI,n):""};if(i.length){var h=e.findGroup(i,u.groupId)||i[0];y(u,h,"audioCodec"),y(u,h,"textCodec")}o.push(u)}}return o},e.parseLevelPlaylist=function(e,t,n,u,h){var d,g,v,y=new o.LevelDetails(t),x=y.fragments,w=null,C=0,E=0,k=0,S=0,O=null,T=new a.Fragment(u,t),L=-1,_=!1;for(f.lastIndex=0,y.m3u8=e;null!==(d=f.exec(e));){_&&(_=!1,(T=new a.Fragment(u,t)).start=k,T.sn=C,T.cc=S,T.level=n,w&&(T.initSegment=w,T.rawProgramDateTime=w.rawProgramDateTime));var A=d[1];if(A){T.duration=parseFloat(A);var D=(" "+d[2]).slice(1);T.title=D||null,T.tagList.push(D?["INF",A,D]:["INF",A])}else if(d[3])Object(r.isFiniteNumber)(T.duration)&&(T.start=k,v&&(T.levelkey=v),T.sn=C,T.level=n,T.cc=S,T.urlId=h,x.push(T),T.relurl=(" "+d[3]).slice(1),b(T,O),O=T,k+=T.duration,C++,E=0,_=!0);else if(d[4]){var R=(" "+d[4]).slice(1);O?T.setByteRange(R,O):T.setByteRange(R)}else if(d[5])T.rawProgramDateTime=(" "+d[5]).slice(1),T.tagList.push(["PROGRAM-DATE-TIME",T.rawProgramDateTime]),-1===L&&(L=x.length);else{if(!(d=d[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(g=1;g-1){c.logger.warn("Keyformat "+Y+" is not supported from the manifest");continue}if("identity"!==Y)continue;z&&(v=s.LevelKey.fromURL(t,V),V&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(z)>=0&&(v.method=z,v.keyFormat=Y,K&&(v.keyID=K),G&&(v.keyFormatVersions=G),v.iv=W));break;case"START":var q=new l.AttrList(I).decimalFloatingPoint("TIME-OFFSET");Object(r.isFiniteNumber)(q)&&(y.startTimeOffset=q);break;case"MAP":var X=new l.AttrList(I);T.relurl=X.URI,X.BYTERANGE&&T.setByteRange(X.BYTERANGE),T.level=n,T.sn="initSegment",v&&(T.levelkey=v),T.initSegment=null,w=T,_=!0;break;case"SERVER-CONTROL":var $=new l.AttrList(I);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 J=new l.AttrList(I);y.partTarget=J.decimalFloatingPoint("PART-TARGET");break;case"PART":var Q=y.partList;Q||(Q=y.partList=[]);var Z=E>0?Q[Q.length-1]:void 0,ee=E++,te=new a.Part(new l.AttrList(I),T,t,ee,Z);Q.push(te),T.duration+=te.duration;break;case"PRELOAD-HINT":var ne=new l.AttrList(I);y.preloadHint=ne;break;case"RENDITION-REPORT":var re=new l.AttrList(I);y.renditionReports=y.renditionReports||[],y.renditionReports.push(re);break;default:c.logger.warn("line parsed but not handled: "+d)}}}O&&!O.relurl?(x.pop(),k-=O.duration,y.partList&&(y.fragmentHint=O)):y.partList&&(b(T,O),T.cc=S,y.fragmentHint=T);var ie=x.length,ae=x[0],oe=x[ie-1];if((k+=y.skippedSegments*y.targetduration)>0&&ie&&oe){y.averagetargetduration=k/ie;var se=oe.sn;y.endSN="initSegment"!==se?se:0,ae&&(y.startCC=ae.cc,ae.initSegment||y.fragments.every((function(e){return e.relurl&&(t=e.relurl,m.test(null!=(n=null===(r=i.parseURL(t))||void 0===r?void 0:r.path)?n:""));var t,n,r}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(T=new a.Fragment(u,t)).relurl=oe.relurl,T.level=n,T.sn="initSegment",ae.initSegment=T,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(k+=y.fragmentHint.duration),y.totalduration=k,y.endCC=S,L>0&&function(e,t){for(var n=e[t],r=t;r--;){var i=e[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(x,L),y},e}();function v(e,t){["video","audio","text"].forEach((function(n){var r=e.filter((function(e){return Object(u.isCodecType)(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}function y(e,t,n){var r=t[n];r&&(e[n]=r)}function b(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Object(r.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts": +/*!***************************************!*\ + !*** ./src/loader/playlist-loader.ts ***! + \***************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=n(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function h(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}var d=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.hls=e,this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return e.loader=i,this.loaders[e.type]=i,i},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var n=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:n,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var n=t.id,r=t.level,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:null,level:r,responseType:"text",type:c.PlaylistContextType.LEVEL,url:i,deliveryDirectives:a})},t.onAudioTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:a})},t.onSubtitleTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:a})},t.load=function(e){var t,n,r,i,a,s,l=this.hls.config,u=this.getInternalLoader(e);if(u){var h=u.context;if(h&&h.url===e.url)return void o.logger.trace("[playlist-loader]: playlist request ongoing");o.logger.log("[playlist-loader]: aborting previous loader for type: "+e.type),u.abort()}switch(e.type){case c.PlaylistContextType.MANIFEST:n=l.manifestLoadingMaxRetry,r=l.manifestLoadingTimeOut,i=l.manifestLoadingRetryDelay,a=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:n=0,r=l.levelLoadingTimeOut;break;default:n=l.levelLoadingMaxRetry,r=l.levelLoadingTimeOut,i=l.levelLoadingRetryDelay,a=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(e),null!==(t=e.deliveryDirectives)&&void 0!==t&&t.part&&(e.type===c.PlaylistContextType.LEVEL&&null!==e.level?s=this.hls.levels[e.level].details:e.type===c.PlaylistContextType.AUDIO_TRACK&&null!==e.id?s=this.hls.audioTracks[e.id].details:e.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==e.id&&(s=this.hls.subtitleTracks[e.id].details),s)){var d=s.partTarget,f=s.targetduration;d&&f&&(r=Math.min(1e3*Math.max(3*d,.8*f),r))}var p={timeout:r,maxRetry:n,retryDelay:i,maxRetryDelay:a,highWaterMark:0},m={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(e,p,m)},t.loadsuccess=function(e,t,n,r){if(void 0===r&&(r=null),n.isSidxRequest)return this.handleSidxRequest(e,n),void this.handlePlaylistLoaded(e,t,n,r);this.resetInternalLoader(n.type);var i=e.data;0===i.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(e,t,n,r):this.handleMasterPlaylist(e,t,n,r)):this.handleManifestParsingError(e,n,"no EXTM3U delimiter",r)},t.loaderror=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!1,e)},t.loadtimeout=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!0)},t.handleMasterPlaylist=function(e,t,n,r){var a=this.hls,s=e.data,c=h(e,n),d=l.default.parseMasterPlaylist(s,c),f=d.levels,p=d.sessionData;if(f.length){var m=f.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),g=f.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),v=l.default.parseMasterPlaylistMedia(s,c,"AUDIO",m),y=l.default.parseMasterPlaylistMedia(s,c,"SUBTITLES",g),b=l.default.parseMasterPlaylistMedia(s,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(e){return!e.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:""}))),a.trigger(i.Events.MANIFEST_LOADED,{levels:f,audioTracks:v,subtitles:y,captions:b,url:c,stats:t,networkDetails:r,sessionData:p})}else this.handleManifestParsingError(e,n,"no level found in manifest",r)},t.handleTrackOrLevelPlaylist=function(e,t,n,o){var s=this.hls,d=n.id,f=n.level,p=n.type,m=h(e,n),g=Object(r.isFiniteNumber)(d)?d:0,v=Object(r.isFiniteNumber)(f)?f:g,y=function(e){switch(e.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(n),b=l.default.parseLevelPlaylist(e.data,m,v,y,g);if(b.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var x={attrs:new u.AttrList({}),bitrate:0,details:b,name:"",url:m};s.trigger(i.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:m,stats:t,networkDetails:o,sessionData:null})}if(t.parsing.end=performance.now(),b.needSidxRanges){var w,C=null===(w=b.fragments[0].initSegment)||void 0===w?void 0:w.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 n.levelDetails=b,this.handlePlaylistLoaded(e,t,n,o)}else s.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:m,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},t.handleSidxRequest=function(e,t){var n=Object(s.parseSegmentIndex)(new Uint8Array(e.data));if(n){var r=n.references,i=t.levelDetails;r.forEach((function(e,t){var r=e.info,a=i.fragments[t];0===a.byteRange.length&&a.setByteRange(String(1+r.end-r.start)+"@"+String(r.start)),a.initSegment&&a.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}))}},t.handleManifestParsingError=function(e,t,n,r){this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===c.PlaylistContextType.MANIFEST,url:e.url,reason:n,response:e,context:t,networkDetails:r})},t.handleNetworkError=function(e,t,n,r){void 0===n&&(n=!1),o.logger.warn("[playlist-loader]: A network "+(n?"timeout":"error")+" occurred while loading "+e.type+" level: "+e.level+" id: "+e.id+' group-id: "'+e.groupId+'"');var s=a.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(e);switch(e.type){case c.PlaylistContextType.MANIFEST:s=n?a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:a.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:s=n?a.ErrorDetails.LEVEL_LOAD_TIMEOUT:a.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:s=n?a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:s=n?a.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:a.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(e.type);var h={type:a.ErrorTypes.NETWORK_ERROR,details:s,fatal:l,url:e.url,loader:u,context:e,networkDetails:t};r&&(h.response=r),this.hls.trigger(i.Events.ERROR,h)},t.handlePlaylistLoaded=function(e,t,n,r){var a=n.type,o=n.level,s=n.id,l=n.groupId,u=n.loader,h=n.levelDetails,d=n.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)),a){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(i.Events.LEVEL_LOADED,{details:h,level:o||0,id:s||0,stats:t,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(i.Events.AUDIO_TRACK_LOADED,{details:h,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(i.Events.SUBTITLE_TRACK_LOADED,{details:h,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:d})}}else this.handleManifestParsingError(e,n,"invalid target duration",r)},e}();t.default=d},"./src/polyfills/number.ts": +/*!*********************************!*\ + !*** ./src/polyfills/number.ts ***! + \*********************************/ +/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(e,t,n){"use strict";n.r(t),n.d(t,"isFiniteNumber",(function(){return r})),n.d(t,"MAX_SAFE_INTEGER",(function(){return i}));var r=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},i=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts": +/*!*********************************!*\ + !*** ./src/remux/aac-helper.ts ***! + \*********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(){}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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===t)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===t)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===t)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===t)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])}},e}();t.default=r},"./src/remux/mp4-generator.ts": +/*!************************************!*\ + !*** ./src/remux/mp4-generator.ts ***! + \************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=Math.pow(2,32)-1,i=function(){function e(){}return e.init=function(){var t;for(t in e.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:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=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]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t=8,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=255&t,s.set(e,4),a=0,t=8;a>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var i=Math.floor(n/(r+1)),a=Math.floor(n%(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,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,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 e.box(e.types.mvhd,o)},e.sdtp=function(t){var n,r,i=t.samples||[],a=new Uint8Array(4+i.length);for(n=0;n>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,c=t.height,u=t.pixelRatio[0],h=t.pixelRatio[1];return e.box(e.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]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,h>>24,h>>16&255,h>>8&255,255&h])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,i=t.duration*t.timescale,a=t.width,o=t.height,s=Math.floor(i/(r+1)),l=Math.floor(i%(r+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,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,a>>8&255,255&a,0,0,o>>8&255,255&o,0,0]))},e.traf=function(t,n){var i=e.sdtp(t),a=t.id,o=Math.floor(n/(r+1)),s=Math.floor(n%(r+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,i.length+16+20+8+16+8+8),i)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,a,o,s,l,c=t.samples||[],u=c.length,h=12+16*u,d=new Uint8Array(h);for(n+=8+h,d.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,d)},e.initSegment=function(t){e.types||e.init();var n=e.moov(t),r=new Uint8Array(e.FTYP.byteLength+n.byteLength);return r.set(e.FTYP),r.set(n,e.FTYP.byteLength),r},e}();i.types=void 0,i.HDLR_TYPES=void 0,i.STTS=void 0,i.STSC=void 0,i.STCO=void 0,i.STSZ=void 0,i.VMHD=void 0,i.SMHD=void 0,i.STSD=void 0,i.FTYP=void 0,i.DINF=void 0,t.default=i},"./src/remux/mp4-remuxer.ts": +/*!**********************************!*\ + !*** ./src/remux/mp4-remuxer.ts ***! + \**********************************/ +/*! exports provided: default, normalizePts */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return m})),n.d(t,"normalizePts",(function(){return g}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./aac-helper */"./src/remux/aac-helper.ts"),a=n(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),o=n(/*! ../events */"./src/events.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/logger */"./src/utils/logger.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function h(){return(h=Object.assign||function(e){for(var t=1;t0?e:n.pts}),e[0].pts);return t&&l.logger.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,i,a,o,s){var u,h,d,f,p,m,v=i,y=i,b=e.pid>-1,x=t.pid>-1,w=t.samples.length,C=e.samples.length>0,E=w>1;if((!b||C)&&(!x||E)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(e,t,i));var k=this.isVideoContiguous,S=-1;if(E&&(S=function(e){for(var t=0;t0){l.logger.warn("[mp4-remuxer]: Dropped "+S+" out of "+w+" video samples due to a missing keyframe");var O=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(S),t.dropped+=S,y+=(t.samples[0].pts-O)/(t.timescale||9e4)}else-1===S&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+w+" video samples"),m=!1);if(this.ISGenerated){if(C&&E){var T=this.getVideoStartPts(t.samples),L=(g(e.samples[0].pts,T)-T)/t.inputTimeScale;v+=Math.max(0,L),y+=Math.max(0,-L)}if(C){if(e.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(e,t,i)),h=this.remuxAudio(e,v,this.isAudioContiguous,a,x||E||s===c.PlaylistLevelType.AUDIO?y:void 0),E){var _=h?h.endPTS-h.startPTS:0;t.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(e,t,i)),u=this.remuxVideo(t,y,k,_)}}else E&&(u=this.remuxVideo(t,y,k,0));u&&(u.firstKeyFrame=S,u.independent=-1!==S)}}return this.ISGenerated&&(n.samples.length&&(p=this.remuxID3(n,i)),r.samples.length&&(f=this.remuxText(r,i))),{audio:h,video:u,initSegment:d,independent:m,text:f,id3:p}},t.generateIS=function(e,t,n){var i,o,s,l=e.samples,c=t.samples,u=this.typeSupported,h={},d=!Object(r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(i=o=1/0),e.config&&l.length&&(e.timescale=e.samplerate,e.isAAC||(u.mpeg?(f="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3")),h.audio={id:"audio",container:f,codec:e.codec,initSegment:!e.isAAC&&u.mpeg?new Uint8Array(0):a.default.initSegment([e]),metadata:{channelCount:e.channelCount}},d&&(s=e.inputTimeScale,i=o=l[0].pts-Math.round(s*n))),t.sps&&t.pps&&c.length&&(t.timescale=t.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:a.default.initSegment([t]),metadata:{width:t.width,height:t.height}},d)){s=t.inputTimeScale;var p=this.getVideoStartPts(c),m=Math.round(s*n);o=Math.min(o,g(c[0].dts,p)-m),i=Math.min(i,p-m)}if(Object.keys(h).length)return this.ISGenerated=!0,d&&(this._initPTS=i,this._initDTS=o),{tracks:h,initPTS:i,timescale:s}},t.remuxVideo=function(e,t,n,r){var i,c,f,m=e.inputTimeScale,y=e.samples,b=[],x=y.length,w=this._initPTS,C=this.nextAvcDts,E=8,k=Number.POSITIVE_INFINITY,S=Number.NEGATIVE_INFINITY,O=0,T=!1;n&&null!==C||(C=t*m-(y[0].pts-g(y[0].dts,y[0].pts)));for(var L=0;L_.pts&&(O=Math.max(Math.min(O,_.pts-_.dts),-18e3)),_.dts0?L-1:L].dts&&(T=!0)}T&&y.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),c=y[0].dts,f=y[y.length-1].dts;var A=Math.round((f-c)/(x-1));if(O<0){if(O<-2*A){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-A,!0)+" ms");for(var D=O,R=0;RA;if(j||I<-1){j?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(I,!0)+" ms ("+I+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-I,!0)+" ms ("+I+"dts) overlapping between fragments detected"),c=C;var N=y[0].pts-I;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)(I,!0)+" ms")}}p&&(c=Math.max(0,c));for(var P=0,F=0,B=0;B0?q-1:q].dts;if(re.stretchShortVideoTrack&&null!==this.nextAudioPts){var ae=Math.floor(re.maxBufferHole*m),oe=(r?k+r*m:this.nextAudioPts)-X.pts;oe>ae?((i=oe-ie)<0&&(i=ie),l.logger.log("[mp4-remuxer]: It is approximately "+oe/90+" ms to the next segment; using duration "+i/90+" ms for the last video frame.")):i=ie}else i=ie}var se=Math.round(X.pts-X.dts);b.push(new v(X.key,i,J,se))}if(b.length&&d&&d<70){var le=b[0].flags;le.dependsOn=2,le.isNonSync=0}console.assert(void 0!==i,"mp4SampleDuration must be computed"),this.nextAvcDts=C=f+i,this.isVideoContiguous=!0;var ce={data1:a.default.moof(e.sequenceNumber++,c,h({},e,{samples:b})),data2:G,startPTS:k/m,endPTS:(S+i)/m,startDTS:c/m,endDTS:C/m,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:e.dropped};return e.samples=[],e.dropped=0,console.assert(G.length,"MDAT length must not be zero"),ce},t.remuxAudio=function(e,t,n,r,c){var u=e.inputTimeScale,d=u/(e.samplerate?e.samplerate:u),f=e.isAAC?1024:1152,p=f*d,m=this._initPTS,y=!e.isAAC&&this.typeSupported.mpeg,b=[],x=e.samples,w=y?0:8,C=this.nextAudioPts||-1,E=t*u;if(this.isAudioContiguous=n=n||x.length&&C>0&&(r&&Math.abs(E-C)<9e3||Math.abs(g(x[0].pts-m,E)-C)<20*p),x.forEach((function(e){e.pts=g(e.pts-m,E)})),!n||C<0){if(!(x=x.filter((function(e){return e.pts>=0}))).length)return;C=0===c?0:r?Math.max(0,E):x[0].pts}if(e.isAAC)for(var k=void 0!==c,S=this.config.maxAudioFramesDrift,O=0,T=C;O=S*p&&D<1e4&&k){var R=Math.round(A/p);(T=_-R*p)<0&&(R--,T+=p),0===O&&(this.nextAudioPts=C=T),l.logger.warn("[mp4-remuxer]: Injecting "+R+" audio frame @ "+(T/u).toFixed(3)+"s due to "+Math.round(1e3*A/u)+" ms gap.");for(var M=0;M0))return;B+=w;try{N=new Uint8Array(B)}catch(e){return void this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:B,reason:"fail allocating audio mdat "+B})}y||(new DataView(N.buffer).setUint32(0,B),N.set(a.default.types.mdat,4))}N.set(W,w);var K=W.byteLength;w+=K,b.push(new v(!0,f,K,0)),F=G}var Y=b.length;if(Y){var q=b[b.length-1];this.nextAudioPts=C=F+d*q.duration;var X=y?new Uint8Array(0):a.default.moof(e.sequenceNumber++,P/d,h({},e,{samples:b}));e.samples=[];var $=P/u,J=C/u,Q={data1:X,data2:N,startPTS:$,endPTS:J,startDTS:$,endDTS:J,type:"audio",hasAudio:!0,hasVideo:!1,nb:Y};return this.isAudioContiguous=!0,console.assert(N.length,"MDAT length must not be zero"),Q}},t.remuxEmptyAudio=function(e,t,n,r){var a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),s=this.nextAudioPts,c=(null!==s?s:r.startDTS*a)+this._initDTS,u=r.endDTS*a+this._initDTS,h=1024*o,d=Math.ceil((u-c)/h),f=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var p=[],m=0;m4294967296;)e+=n;return e}var v=function(e,t,n,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=n,this.cts=r,this.flags=new y(e)},y=function(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}},"./src/remux/passthrough-remuxer.ts": +/*!******************************************!*\ + !*** ./src/remux/passthrough-remuxer.ts ***! + \******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),a=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=function(){function e(){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 t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this.initPTS=e,this.lastEndDTS=null},t.resetNextTimestamp=function(){this.lastEndDTS=null},t.resetInitSegment=function(e,t,n){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(e),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,n=this.videoCodec;if(!e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=Object(i.parseInitSegment)(e);t||(t=c(r.audio,a.ElementaryStreamTypes.AUDIO)),n||(n=c(r.video,a.ElementaryStreamTypes.VIDEO));var s={};r.audio&&r.video?s.audiovideo={container:"video/mp4",codec:t+","+n,initSegment:e,id:"main"}:r.audio?s.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?s.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:o.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s},t.remux=function(e,t,n,a,s){var c=this.initPTS,u=this.lastEndDTS,h={audio:void 0,video:void 0,text:a,id3:n,initSegment:void 0};Object(r.isFiniteNumber)(u)||(u=this.lastEndDTS=s||0);var d=t.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 m=Object(i.getDuration)(d,p),g=u,v=m+g;Object(i.offsetStartDTS)(p,d,c),m>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 w={data1:d,startPTS:g,startDTS:g,endPTS:v,endDTS:v,type:x,hasAudio:y,hasVideo:b,nb:1,dropped:0};return h.audio="audio"===w.type?w:void 0,h.video="audio"!==w.type?w:void 0,h.text=a,h.id3=n,h.initSegment=f,h},e}(),l=function(e,t,n){return Object(i.getStartDTS)(e,t)-n};function c(e,t){var n=null==e?void 0:e.codec;return n&&n.length>4?n:"hvc1"===n?"hvc1.1.c.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||t===a.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}t.default=s},"./src/task-loop.ts": +/*!**************************!*\ + !*** ./src/task-loop.ts ***! + \**************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},t.onHandlerDestroyed=function(){},t.hasInterval=function(){return!!this._tickInterval},t.hasNextTick=function(){return!!this._tickTimer},t.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},t.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},t.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},t.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},t.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},t.doTick=function(){},e}()},"./src/types/cmcd.ts": +/*!***************************!*\ + !*** ./src/types/cmcd.ts ***! + \***************************/ +/*! exports provided: CMCDVersion, CMCDObjectType, CMCDStreamingFormat, CMCDStreamType */function(e,t,n){"use strict";n.r(t),n.d(t,"CMCDVersion",(function(){return o})),n.d(t,"CMCDObjectType",(function(){return r})),n.d(t,"CMCDStreamingFormat",(function(){return i})),n.d(t,"CMCDStreamType",(function(){return a}));var r,i,a,o=1;!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(r||(r={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(i||(i={})),function(e){e.VOD="v",e.LIVE="l"}(a||(a={}))},"./src/types/level.ts": +/*!****************************!*\ + !*** ./src/types/level.ts ***! + \****************************/ +/*! exports provided: HlsSkip, getSkipValue, HlsUrlParameters, Level */function(e,t,n){"use strict";function r(e,t){for(var n=0;nNumber.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;rNumber.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var n=this[e];return n?parseFloat(n):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=r.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(i.lastIndex=0;null!==(t=i.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n},e}()},"./src/utils/binary-search.ts": +/*!************************************!*\ + !*** ./src/utils/binary-search.ts ***! + \************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={search:function(e,t){for(var n=0,r=e.length-1,i=null,a=null;n<=r;){var o=t(a=e[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null}}},"./src/utils/buffer-helper.ts": +/*!************************************!*\ + !*** ./src/utils/buffer-helper.ts ***! + \************************************/ +/*! exports provided: BufferHelper */function(e,t,n){"use strict";n.r(t),n.d(t,"BufferHelper",(function(){return a}));var r=n(/*! ./logger */"./src/utils/logger.ts"),i={length:0,start:function(){return 0},end:function(){return 0}},a=function(){function e(){}return e.isBuffered=function(t,n){try{if(t)for(var r=e.getBuffered(t),i=0;i=r.start(i)&&n<=r.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(t,n,r){try{if(t){var i,a=e.getBuffered(t),o=[];for(i=0;io&&(r[a-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,c=t,u=t,h=0;h=d&&t=e&&i.logger.log(this.time+" ["+e+"] "+t)},e}(),f=function(e){for(var t=[],n=0;n100&&(this.logger.log(r.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n=144&&this.backSpace();var t=o(e);this.pos>=100?this.logger.log(r.ERROR,"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<100;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<100;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),v=function(){function e(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var t=0;t<15;t++)this.rows.push(new g(e));this.logger=e,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<15;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(r.INFO,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(r.INFO,"pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),y=function(){function e(e,t,n){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=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new v(n),this.nonDisplayedMemory=new v(n),this.lastOutputScreen=new v(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var t=e.prototype;return t.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},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(r.INFO,"MODE="+e),"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=e)},t.insertChars=function(e){for(var t=0;t=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(r.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),b=function(){function e(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new d;this.channels=[null,new y(e,t,r),new y(e+1,n,r)],this.cmdHistory={a:null,b:null},this.logger=r}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,i,a,o=!1;this.logger.time=e;for(var s=0;s ("+f([i,a])+")"),(n=this.parseCmd(i,a))||(n=this.parseMidrow(i,a)),n||(n=this.parsePAC(i,a)),n||(n=this.parseBackgroundAttributes(i,a)),!n&&(o=this.parseChars(i,a))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(o):this.logger.log(r.WARNING,"No channel found yet. TEXT-MODE?")}n||o||this.logger.log(r.WARNING,"Couldn't parse cleaned data "+f([i,a])+" orig: "+f([t[s],t[s+1]]))}},t.parseCmd=function(e,t){var n=this.cmdHistory;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(w(e,t,n))return x(null,null,n),this.logger.log(r.DEBUG,"Repeated command ("+f([e,t])+") is dropped"),!0;var i=20===e||21===e||23===e?1:2,a=this.channels[i];return 20===e||21===e||28===e||29===e?32===t?a.ccRCL():33===t?a.ccBS():34===t?a.ccAOF():35===t?a.ccAON():36===t?a.ccDER():37===t?a.ccRU(2):38===t?a.ccRU(3):39===t?a.ccRU(4):40===t?a.ccFON():41===t?a.ccRDC():42===t?a.ccTR():43===t?a.ccRTD():44===t?a.ccEDM():45===t?a.ccCR():46===t?a.ccENM():47===t&&a.ccEOC():a.ccTO(t-32),x(e,t,n),this.currentChannel=i,!0},t.parseMidrow=function(e,t){var n=0;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currentChannel)return this.logger.log(r.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[n];return!!i&&(i.ccMIDROW(t),this.logger.log(r.DEBUG,"MIDROW ("+f([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var n,r=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(w(e,t,r))return x(null,null,r),!0;var i=e<=23?1:2;n=t>=64&&t<=95?1===i?s[e]:c[e]:1===i?l[e]:u[e];var a=this.channels[i];return!!a&&(a.setPAC(this.interpretPAC(n,t)),x(e,t,r),this.currentChannel=i,!0)},t.interpretPAC=function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.parseChars=function(e,t){var n,i,a=null,s=null;if(e>=25?(n=2,s=e-8):(n=1,s=e),s>=17&&s<=19?(i=17===s?t+80:18===s?t+112:t+144,this.logger.log(r.INFO,"Special char '"+o(i)+"' in channel "+n),a=[i]):e>=32&&e<=127&&(a=0===t?[e]:[e,t]),a){var l=f(a);this.logger.log(r.DEBUG,"Char codes = "+l.join(",")),x(e,t,this.cmdHistory)}return a},t.parseBackgroundAttributes=function(e,t){var n;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=h[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));var i=e<=23?1:2;return this.channels[i].setBkgData(r),x(e,t,this.cmdHistory),!0},t.reset=function(){for(var e=0;e=16?h--:h++;var v=Object(r.fixLineBreaks)(d.trim()),y=Object(i.generateCueId)(t,n,v);e&&e.cues&&e.cues.getCueById(y)||((c=new p(t,n,v)).id=y,c.line=m+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*h/32)),f.push(c))}return e&&f.length&&(f.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),f.forEach((function(t){return Object(a.addCueToTrack)(e,t)}))),f}};t.default=s},"./src/utils/discontinuities.ts": +/*!**************************************!*\ + !*** ./src/utils/discontinuities.ts ***! + \**************************************/ +/*! exports provided: findFirstFragWithCC, shouldAlignOnDiscontinuities, findDiscontinuousReferenceFrag, adjustSlidingStart, alignStream, alignPDT, alignFragmentByPDTDelta, alignMediaPlaylistByPDT */function(e,t,n){"use strict";n.r(t),n.d(t,"findFirstFragWithCC",(function(){return o})),n.d(t,"shouldAlignOnDiscontinuities",(function(){return s})),n.d(t,"findDiscontinuousReferenceFrag",(function(){return l})),n.d(t,"adjustSlidingStart",(function(){return u})),n.d(t,"alignStream",(function(){return h})),n.d(t,"alignPDT",(function(){return d})),n.d(t,"alignFragmentByPDTDelta",(function(){return f})),n.d(t,"alignMediaPlaylistByPDT",(function(){return p}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./logger */"./src/utils/logger.ts"),a=n(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function o(e,t){for(var n=null,r=0,i=e.length;rn.startCC||e&&e.cc=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();t.default=i},"./src/utils/ewma.ts": +/*!***************************!*\ + !*** ./src/utils/ewma.ts ***! + \***************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}();t.default=r},"./src/utils/fetch-loader.ts": +/*!***********************************!*\ + !*** ./src/utils/fetch-loader.ts ***! + \***********************************/ +/*! exports provided: fetchSupported, default */function(e,t,n){"use strict";n.r(t),n.d(t,"fetchSupported",(function(){return d}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=n(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function o(e){var t="function"==typeof Map?new Map:void 0;return(o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)})(e)}function s(e,t,n){return(s=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&c(i,n.prototype),i}).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(e){return!1}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(){return(h=Object.assign||function(e){for(var t=1;t=r&&i(t,n,o.flush(),e)):i(t,n,l,e),a()})).catch((function(){return Promise.reject()}))}()},e}();function p(e,t){return new self.Request(e.url,t)}var m=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r}(o(Error));t.default=f},"./src/utils/imsc1-ttml-parser.ts": +/*!****************************************!*\ + !*** ./src/utils/imsc1-ttml-parser.ts ***! + \****************************************/ +/*! exports provided: IMSC1_CODEC, parseIMSC1 */function(e,t,n){"use strict";n.r(t),n.d(t,"IMSC1_CODEC",(function(){return u})),n.d(t,"parseIMSC1",(function(){return p}));var r=n(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),i=n(/*! ./vttparser */"./src/utils/vttparser.ts"),a=n(/*! ./vttcue */"./src/utils/vttcue.ts"),o=n(/*! ../demux/id3 */"./src/demux/id3.ts"),s=n(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=n(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function c(){return(c=Object.assign||function(e){for(var t=1;t"):r}function s(e){if(self.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function h(e,t){var n,r,i,a=[];if(!t.length)return a;"data"in e?(n=e.data,r=e.start,i=e.end):(r=0,i=(n=e).byteLength);for(var l=r;l1?l+u:i;if(s(n.subarray(l+4,l+8))===t[0])if(1===t.length)a.push({data:n,start:l+8,end:d});else{var f=h({data:n,start:l+8,end:d},t.slice(1));f.length&&o.apply(a,f)}l=d}return a}function d(e){var t=h(e,["moov"])[0],n=t?t.end:null,r=h(e,["sidx"]);if(!r||!r[0])return null;var i=[],a=r[0],o=a.data[0],s=0===o?8:16,u=c(a,s);s+=4,s+=0===o?8:16,s+=2;var d=a.end+0,f=l(a,s);s+=2;for(var p=0;p>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(a,m);m+=4,i.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/u,start:d,end:d+v-1}}),d+=v,s=m+=4}return{earliestPresentationTime:0,timescale:u,version:o,referencesCount:f,references:i,moovEndOffset:n}}function f(e){for(var t=[],n=h(e,["moov","trak"]),r=0;re)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[]},e}()},"./src/utils/texttrack-utils.ts": +/*!**************************************!*\ + !*** ./src/utils/texttrack-utils.ts ***! + \**************************************/ +/*! exports provided: sendAddTrackEvent, addCueToTrack, clearCurrentCues, removeCuesInRange, getCuesInRange */function(e,t,n){"use strict";n.r(t),n.d(t,"sendAddTrackEvent",(function(){return i})),n.d(t,"addCueToTrack",(function(){return a})),n.d(t,"clearCurrentCues",(function(){return o})),n.d(t,"removeCuesInRange",(function(){return s})),n.d(t,"getCuesInRange",(function(){return l}));var r=n(/*! ./logger */"./src/utils/logger.ts");function i(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function a(e,t){var n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(n){r.logger.debug("[texttrack-utils]: "+n);var i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}"disabled"===n&&(e.mode=n)}function o(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var n=e.cues.length;n--;)e.removeCue(e.cues[n]);"disabled"===t&&(e.mode=t)}function s(e,t,n){var r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var i=l(e.cues,t,n),a=0;ae[n].endTime)return-1;for(var r=0,i=n;r<=i;){var a=Math.floor((i+r)/2);if(te[a].startTime&&r-1)for(var a=i,o=e.length;a=t&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}},"./src/utils/time-ranges.ts": +/*!**********************************!*\ + !*** ./src/utils/time-ranges.ts ***! + \**********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={toString:function(e){for(var t="",n=e.length,r=0;r1?t-1:0),r=1;r100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return x},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");x=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},l,{get:function(){return w},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");w=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},l,{get:function(){return C},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");C=t,this.hasBeenReset=!0}})),s.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}()},"./src/utils/vttparser.ts": +/*!********************************!*\ + !*** ./src/utils/vttparser.ts ***! + \********************************/ +/*! exports provided: parseTimeStamp, fixLineBreaks, VTTParser */function(e,t,n){"use strict";n.r(t),n.d(t,"parseTimeStamp",(function(){return a})),n.d(t,"fixLineBreaks",(function(){return h})),n.d(t,"VTTParser",(function(){return d}));var r=n(/*! ./vttcue */"./src/utils/vttcue.ts"),i=function(){function e(){}return e.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},e}();function a(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+parseFloat(r||0)}var n=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?t(n[2],n[3],0,n[4]):t(n[1],n[2],n[3],n[4]):null}var o=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,n){for(var r=0;r=0&&n<=100)return this.set(e,n),!0}return!1},e}();function s(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}var l=new r.default(0,0,""),c="middle"===l.align?"middle":"center";function u(e,t,n){var r=e;function i(){var t=a(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=i(),u(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),u(),t.endTime=i(),u(),function(e,t){var r=new o;s(e,(function(e,t){var i;switch(e){case"region":for(var a=n.length-1;a>=0;a--)if(n[a].id===t){r.set(e,n[a].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),r.integer(e,i[0]),r.percent(e,i[0])&&r.set("snapToLines",!1),r.alt(e,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",c,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",c,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===l.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",c);var a=r.get("position","auto");"auto"===a&&50===l.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function h(e){return e.replace(//gi,"\n")}var d=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new i,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=h(e);n>>0).toString()};function h(e,t,n){return u(e.toString())+u(t.toString())+u(n)}function d(e,t,n,u,d,f,p,m){var g,v=new i.VTTParser,y=Object(a.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(l,"\n").split("\n"),b=[],x=Object(o.toMpegTsClockFromTimescale)(t,n),w="00:00.000",C=0,E=0,k=!0,S=!1;v.oncue=function(e){var t=u[d],n=u.ccOffset,r=(C-x)/9e4;if(null!=t&&t.new&&(void 0!==E?n=u.ccOffset=t.start:function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;null!==(a=i)&&void 0!==a&&a.new;){var a;e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC]}e.presentationOffset=n}(u,d,r)),r&&(n=r-u.presentationOffset),S){var i=e.endTime-e.startTime,a=Object(s.normalizePts)(9e4*(e.startTime+n-E),9e4*f)/9e4;e.startTime=a,e.endTime=a+i}var o=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(o)),e.id||(e.id=h(e.startTime,e.endTime,o)),e.endTime>0&&b.push(e)},v.onparsingerror=function(e){g=e},v.onflush=function(){g?m(g):p(b)},y.forEach((function(e){if(k){if(c(e,"X-TIMESTAMP-MAP=")){k=!1,S=!0,e.substr(16).split(",").forEach((function(e){c(e,"LOCAL:")?w=e.substr(6):c(e,"MPEGTS:")&&(C=parseInt(e.substr(7)))}));try{E=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),i=parseInt(e.substr(-9,2)),a=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(r.isFiniteNumber)(t)&&Object(r.isFiniteNumber)(n)&&Object(r.isFiniteNumber)(i)&&Object(r.isFiniteNumber)(a)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,t+=6e4*i,t+=36e5*a}(w)/1e3}catch(e){S=!1,g=e}return}""===e&&(k=!1)}v.parse(e+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts": +/*!*********************************!*\ + !*** ./src/utils/xhr-loader.ts ***! + \*********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=/^age:\s*[\d.]+\s*$/m,o=function(){function e(e){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=e?e.xhrSetup:null,this.stats=new i.LoadStats,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e=this.config,t=this.context;if(e){var n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(n,t.url)}catch(e){n.open("GET",t.url,!0),i(n,t.url)}n.readyState||n.open("GET",t.url,!0);var a=this.context.headers;if(a)for(var o in a)n.setRequestHeader(o,a[o])}catch(e){return void this.callbacks.onError({code:n.status,text:e.message},t,n)}t.rangeEnd&&n.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),n.onreadystatechange=this.readystatechange.bind(this),n.onprogress=this.loadprogress.bind(this),n.responseType=t.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.timeout),n.send()}},t.readystatechange=function(){var e=this.context,t=this.loader,n=this.stats;if(e&&t){var i=t.readyState,a=this.config;if(!n.aborted&&i>=2)if(self.clearTimeout(this.requestTimeout),0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start)),4===i){t.onreadystatechange=null,t.onprogress=null;var o=t.status;if(o>=200&&o<300){var s,l;if(n.loading.end=Math.max(self.performance.now(),n.loading.first),l="arraybuffer"===e.responseType?(s=t.response).byteLength:(s=t.responseText).length,n.loaded=n.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(n,e,s,t),!this.callbacks)return;var u={url:t.responseURL,data:s};this.callbacks.onSuccess(u,n,e,t)}else n.retry>=a.maxRetry||o>=400&&o<499?(r.logger.error(o+" while loading "+e.url),this.callbacks.onError({code:o,text:t.statusText},e,t)):(r.logger.warn(o+" while loading "+e.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),n.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)}},t.loadtimeout=function(){r.logger.warn("timeout while loading "+this.context.url);var e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&a.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},e}();t.default=o}}).default},e.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(e,t,n){e.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF: +/*!********************************************************!*\ + !*** ./node_modules/rc-table/es/Table.js + 17 modules ***! + \********************************************************/ +/*! exports provided: INTERNAL_HOOKS, default */ +/*! exports used: INTERNAL_HOOKS, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ +/*! 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/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-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 */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */ +/*! 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/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return Q}));var r=n("rePB"),i=n("VTBJ"),a=n("KQm4"),o=n("U8pU"),s=n("ODXe"),l=n("q1tI"),c=n("TSYQ"),u=n.n(c),h=n("Gytx"),d=n.n(h),f=n("Kwbf"),p=n("t23M"),m=n("qx4F"),g=n("6eGT"),v=n("IBYe"),y=n("Ff2n"),b=n("c+Xe"),x=n("fyJ8"),w=n("biw7");function C(e,t,n,r,i){var a,o,s=n[e]||{},l=n[t]||{};"left"===s.fixed?a=r.left[e]:"right"===l.fixed&&(o=r.right[t]);var c=!1,u=!1,h=!1,d=!1,f=n[t+1],p=n[e-1];if("rtl"===i){if(void 0!==a)d=!(p&&"left"===p.fixed);else if(void 0!==o){h=!(f&&"right"===f.fixed)}}else if(void 0!==a){c=!(f&&"left"===f.fixed)}else if(void 0!==o){u=!(p&&"right"===p.fixed)}return{fixLeft:a,fixRight:o,lastFixLeft:c,firstFixRight:u,lastFixRight:h,firstFixLeft:d,isSticky:r.isSticky}}var E=n("sR1s");function k(e){var t,n=e.cells,r=e.stickyOffsets,i=e.flattenColumns,a=e.rowComponent,o=e.cellComponent,s=e.onHeaderRow,c=e.index,u=l.useContext(w.a),h=u.prefixCls,d=u.direction;s&&(t=s(n.map((function(e){return e.column})),c));var f=Object(E.a)(n.map((function(e){return e.column})));return l.createElement(a,Object.assign({},t),n.map((function(e,t){var n,a=e.column,s=C(e.colStart,e.colEnd,i,r,d);return a&&a.onHeaderCell&&(n=e.column.onHeaderCell(a)),l.createElement(x.a,Object.assign({},e,{ellipsis:a.ellipsis,align:a.align,component:o,prefixCls:h,key:f[t]},s,{additionalProps:n,rowType:"header"}))})))}k.displayName="HeaderRow";var S=k;var O=function(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,i=e.onHeaderRow,a=l.useContext(w.a),o=a.prefixCls,s=a.getComponent,c=l.useMemo((function(){return function(e){var t=[];!function e(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[i]=t[i]||[];var a=r,o=n.filter(Boolean).map((function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:a},o=1,s=n.children;return s&&s.length>0&&(o=e(s,a,i+1).reduce((function(e,t){return e+t}),0),r.hasSubColumns=!0),"colSpan"in n&&(o=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=o,r.colEnd=r.colStart+o-1,t[i].push(r),a+=o,o}));return o}(e,0);for(var n=t.length,r=function(e){t[e].forEach((function(t){"rowSpan"in t||t.hasSubColumns||(t.rowSpan=n-e)}))},i=0;i=0;a-=1){var o=t[a],s=n&&n[a],c=s&&s[T.a];(o||c||i)&&(r.unshift(l.createElement("col",Object.assign({key:a,style:{width:o,minWidth:o}},c))),i=!0)}return l.createElement("colgroup",null,r)};var _=l.forwardRef((function(e,t){var n=e.noData,o=e.columns,s=e.flattenColumns,c=e.colWidths,h=e.columCount,d=e.stickyOffsets,f=e.direction,p=e.fixHeader,m=e.offsetHeader,g=e.stickyClassName,v=e.onScroll,x=Object(y.a)(e,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),C=l.useContext(w.a),E=C.prefixCls,k=C.scrollbarSize,S=C.isSticky,T=S&&!p?0:k,_=l.useRef(null),A=l.useCallback((function(e){Object(b.b)(t,e),Object(b.b)(_,e)}),[]);l.useEffect((function(){var e;function t(e){var t=e.currentTarget,n=e.deltaX;n&&(v({currentTarget:t,scrollLeft:t.scrollLeft+n}),e.preventDefault())}return null===(e=_.current)||void 0===e||e.addEventListener("wheel",t),function(){var e;null===(e=_.current)||void 0===e||e.removeEventListener("wheel",t)}}),[]);var D=s[s.length-1],R={fixed:D?D.fixed:null,onHeaderCell:function(){return{className:"".concat(E,"-cell-scrollbar")}}},M=Object(l.useMemo)((function(){return T?[].concat(Object(a.a)(o),[R]):o}),[T,o]),I=Object(l.useMemo)((function(){return T?[].concat(Object(a.a)(s),[R]):s}),[T,s]),j=Object(l.useMemo)((function(){var e=d.right,t=d.left;return Object(i.a)(Object(i.a)({},d),{},{left:"rtl"===f?[].concat(Object(a.a)(t.map((function(e){return e+T}))),[0]):t,right:"rtl"===f?e:[].concat(Object(a.a)(e.map((function(e){return e+T}))),[0]),isSticky:S})}),[T,d,S]),N=function(e,t){return Object(l.useMemo)((function(){for(var n=[],r=0;r1?n-1:0),a=1;a=p&&(r=p-g),c({scrollLeft:r/p*(f+2)}),E.current.x=e.pageX}else O&&T(!1)},A=function(){var e=Object(q.b)(o.current).top,t=e+o.current.offsetHeight,n=document.documentElement.scrollTop+window.innerHeight;t-Object(m.a)()<=n||e>=n-h?C((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!0})})):C((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!1})}))},D=function(e){C((function(t){return Object(i.a)(Object(i.a)({},t),{},{scrollLeft:e/f*p||0})}))};return l.useImperativeHandle(t,(function(){return{setScrollLeft:D}})),l.useEffect((function(){var e=Object(Y.a)(document.body,"mouseup",L,!1),t=Object(Y.a)(document.body,"mousemove",_,!1);return A(),function(){e.remove(),t.remove()}}),[g,O]),l.useEffect((function(){var e=Object(Y.a)(window,"scroll",A,!1),t=Object(Y.a)(window,"resize",A,!1);return function(){e.remove(),t.remove()}}),[]),l.useEffect((function(){x.isHiddenScrollBar||C((function(e){var t,n;return Object(i.a)(Object(i.a)({},e),{},{scrollLeft:o.current.scrollLeft/(null===(t=o.current)||void 0===t?void 0:t.scrollWidth)*(null===(n=o.current)||void 0===n?void 0:n.clientWidth)})}))}),[x.isHiddenScrollBar]),f<=p||!g||x.isHiddenScrollBar?null:l.createElement("div",{style:{height:Object(m.a)(),width:p,bottom:h},className:"".concat(d,"-sticky-scroll")},l.createElement("div",{onMouseDown:function(e){e.persist(),E.current.delta=e.pageX-x.scrollLeft,E.current.x=0,T(!0),e.preventDefault()},ref:v,className:u()("".concat(d,"-sticky-scroll-bar"),Object(r.a)({},"".concat(d,"-sticky-scroll-bar-active"),O)),style:{width:"".concat(g,"px"),transform:"translate3d(".concat(x.scrollLeft,"px, 0, 0)")}}))}));var $=[],J={},Q="rc-table-internal-hook",Z=l.memo((function(e){return e.children}),(function(e,t){return!!d()(e.props,t.props)&&(e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight)}));function ee(e){var t,n=e.prefixCls,c=e.className,h=e.rowClassName,d=e.style,g=e.data,v=e.rowKey,y=e.scroll,b=e.tableLayout,x=e.direction,k=e.title,S=e.footer,_=e.summary,R=e.id,M=e.showHeader,I=e.components,N=e.emptyText,P=e.onRow,H=e.onHeaderRow,U=e.internalHooks,Y=e.transformColumns,q=e.internalRefs,ee=e.sticky,te=g||$,ne=!!te.length,re=l.useState(0),ie=Object(s.a)(re,2),ae=ie[0],oe=ie[1];l.useEffect((function(){oe(Object(m.a)())}));var se,le,ce,ue=l.useMemo((function(){return Object(E.c)(I,{})}),[I]),he=l.useCallback((function(e,t){return Object(E.b)(ue,e)||t}),[ue]),de=l.useMemo((function(){return"function"==typeof v?v:function(e){return e&&e[v]}}),[v]),fe=Object(T.c)(e),pe=fe.expandIcon,me=fe.expandedRowKeys,ge=fe.defaultExpandedRowKeys,ve=fe.defaultExpandAllRows,ye=fe.expandedRowRender,be=fe.onExpand,xe=fe.onExpandedRowsChange,we=fe.expandRowByClick,Ce=fe.rowExpandable,Ee=fe.expandIconColumnIndex,ke=fe.expandedRowClassName,Se=fe.childrenColumnName,Oe=fe.indentSize,Te=pe||K,Le=Se||"children",_e=l.useMemo((function(){return ye?"row":!!(e.expandable&&U===Q&&e.expandable.__PARENT_RENDER_ICON__||te.some((function(e){return e&&"object"===Object(o.a)(e)&&e[Le]})))&&"nest"}),[!!ye,te]),Ae=l.useState((function(){return ge||(ve?function(e,t,n){var r=[];return function e(i){(i||[]).forEach((function(i,a){r.push(t(i,a)),e(i[n])}))}(e),r}(te,de,Le):[])})),De=Object(s.a)(Ae,2),Re=De[0],Me=De[1],Ie=l.useMemo((function(){return new Set(me||Re||[])}),[me,Re]),je=l.useCallback((function(e){var t,n=de(e,te.indexOf(e)),r=Ie.has(n);r?(Ie.delete(n),t=Object(a.a)(Ie)):t=[].concat(Object(a.a)(Ie),[n]),Me(t),be&&be(!r,e),xe&&xe(t)}),[de,Ie,te,be,xe]),Ne=l.useState(0),Pe=Object(s.a)(Ne,2),Fe=Pe[0],Be=Pe[1],He=Object(B.b)(Object(i.a)(Object(i.a)(Object(i.a)({},e),fe),{},{expandable:!!ye,expandedKeys:Ie,getRowKey:de,onTriggerExpand:je,expandIcon:Te,expandIconColumnIndex:Ee,direction:x}),U===Q?Y:null),Ue=Object(s.a)(He,2),ze=Ue[0],Ve=Ue[1],We=l.useMemo((function(){return{columns:ze,flattenColumns:Ve}}),[ze,Ve]),Ge=l.useRef(),Ke=l.useRef(),Ye=l.useRef(),qe=l.useState(!1),Xe=Object(s.a)(qe,2),$e=Xe[0],Je=Xe[1],Qe=l.useState(!1),Ze=Object(s.a)(Qe,2),et=Ze[0],tt=Ze[1],nt=z(new Map),rt=Object(s.a)(nt,2),it=rt[0],at=rt[1],ot=Object(E.a)(Ve).map((function(e){return it.get(e)})),st=l.useMemo((function(){return ot}),[ot.join("_")]),lt=V(st,Ve.length,x),ct=y&&Object(E.d)(y.y),ut=y&&Object(E.d)(y.x),ht=ut&&Ve.some((function(e){return e.fixed})),dt=l.useRef(),ft=function(e,t){return l.useMemo((function(){var n=!!e;return{isSticky:n,stickyClassName:n?"".concat(t,"-sticky-header"):"",offsetHeader:"object"===Object(o.a)(e)&&e.offsetHeader||0,offsetScroll:"object"===Object(o.a)(e)&&e.offsetScroll||0}}),[e,t])}(ee,n),pt=ft.isSticky,mt=ft.offsetHeader,gt=ft.offsetScroll,vt=ft.stickyClassName;ct&&(le={overflowY:"scroll",maxHeight:y.y}),ut&&(se={overflowX:"auto"},ct||(le={overflowY:"hidden"}),ce={width:!0===y.x?"auto":y.x,minWidth:"100%"});var yt=l.useCallback((function(e,t){at((function(n){var r=new Map(n);return r.set(e,t),r}))}),[]),bt=function(e){var t=Object(l.useRef)(e),n=Object(l.useRef)(null);function r(){window.clearTimeout(n.current)}return Object(l.useEffect)((function(){return r}),[]),[function(e){t.current=e,r(),n.current=window.setTimeout((function(){t.current=null,n.current=null}),100)},function(){return t.current}]}(null),xt=Object(s.a)(bt,2),wt=xt[0],Ct=xt[1];function Et(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e))}var kt=function(e){var t,n=e.currentTarget,r=e.scrollLeft,i="number"==typeof r?r:n.scrollLeft,a=n||J;Ct()&&Ct()!==a||(wt(a),Et(i,Ke.current),Et(i,Ye.current),Et(i,null===(t=dt.current)||void 0===t?void 0:t.setScrollLeft));if(n){var o=n.scrollWidth,s=n.clientWidth;Je(i>0),tt(i0?[].concat(Object(i.a)(e),Object(i.a)(h(o).map((function(e){return Object(a.a)({fixed:r},e)})))):[].concat(Object(i.a)(e),[Object(a.a)(Object(a.a)({},t),{},{fixed:r})])}),[])}t.b=function(e,t){var n=e.prefixCls,i=e.columns,l=e.children,d=e.expandable,f=e.expandedKeys,p=e.getRowKey,m=e.onTriggerExpand,g=e.expandIcon,v=e.rowExpandable,y=e.expandIconColumnIndex,b=e.direction,x=e.expandRowByClick,w=s.useMemo((function(){return i||u(l)}),[i,l]),C=s.useMemo((function(){if(d){var e,t=y||0,i=w[t],a=(e={},Object(r.a)(e,c.a,{className:"".concat(n,"-expand-icon-col")}),Object(r.a)(e,"title",""),Object(r.a)(e,"fixed",i?i.fixed:null),Object(r.a)(e,"className","".concat(n,"-row-expand-icon-cell")),Object(r.a)(e,"render",(function(e,t,r){var i=p(t,r),a=f.has(i),o=!v||v(t),l=g({prefixCls:n,expanded:a,expandable:o,record:t,onExpand:m});return x?s.createElement("span",{onClick:function(e){return e.stopPropagation()}},l):l})),e),o=w.slice();return t>=0&&o.splice(t,0,a),o}return w}),[d,w,p,f,g,b]),E=s.useMemo((function(){var e=C;return t&&(e=t(e)),e.length||(e=[{render:function(){return null}}]),e}),[t,C,b]),k=s.useMemo((function(){return"rtl"===b?function(e){return e.map((function(e){var t=e.fixed,n=Object(o.a)(e,["fixed"]),r=t;return"left"===t?r="right":"right"===t&&(r="left"),Object(a.a)({fixed:r},n)}))}(h(E)):h(E)}),[E,b]);return[E,k]}},wzkS: +/*!**************************************************!*\ + !*** ./src/pages/MoopCases/FormPanel/service.ts ***! + \**************************************************/ +/*! exports provided: getMoopCase, getLibraryTags, removeAttachment, addMoopCase, updateMoopCase */ +/*! exports used: addMoopCase, getLibraryTags, getMoopCase, removeAttachment, updateMoopCase */function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return c})),n.d(t,"a",(function(){return h})),n.d(t,"e",(function(){return d}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),a=n.n(i),o=n(/*! @/utils/fetch */"ErOA");function s(e){return Object(o.c)("libraries/".concat(e,".json"))}function l(){return Object(o.c)("library_tags.json")}function c(e){return u.apply(this,arguments)}function u(){return(u=Object(r.a)(a.a.mark((function e(t){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(o.b)("attachments/".concat(t,".json"));case 2:return n=e.sent,e.abrupt("return",0===n.status);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return Object(o.f)("libraries.json",e)}function d(e,t){return Object(o.g)("libraries/".concat(e,".json"),t)}},xOL1: +/*!**********************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/ShixunHomeworks/components/TrfList/delete.png ***! + \**********************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC"},"y0+3": +/*!********************************************!*\ + !*** ./node_modules/rc-util/es/Dom/css.js ***! + \********************************************/ +/*! exports provided: get, set, getOuterWidth, getOuterHeight, getDocSize, getClientSize, getScroll, getOffset */ +/*! exports used: getClientSize, getOffset */function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));function r(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function i(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}},y5JW: +/*!***********************************************!*\ + !*** ./src/components/SingleUpload/index.tsx ***! + \***********************************************/ +/*! exports provided: uploadNameSizeSeperator, bytesToSize, default */ +/*! exports used: bytesToSize, default, uploadNameSizeSeperator */function(e,t,n){"use strict";n.d(t,"c",(function(){return m})),n.d(t,"a",(function(){return g}));n(/*! antd/es/upload/style */"DZo9");var r=n(/*! antd/es/upload */"8z0m"),i=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),l=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),c=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),u=n.n(c),h=n(/*! react */"q1tI"),d=n.n(h),f=n(/*! @/utils/env */"m3rI"),p=n(/*! @/pages/MoopCases/FormPanel/service */"wzkS"),m="  ";function g(e){if(0==e)return"0 Byte";var t=parseInt(""+Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,t)).toFixed(1)+" "+["Bytes","KB","MB","GB","TB"][t]}t.b=function(e){var t,n=e.value,c=void 0===n?[]:n,h=(e.action,e.onChange),v=e.className,y=e.maxSize,b=void 0===y?150:y,x=e.title,w=void 0===x?"文件上传":x,C=e.accept,E={multiple:!1,fileList:c,accept:void 0===C?null:C,withCredentials:!0,beforeUpload:function(e){return e.size/1024/10240?"每次只能上传一个资源, 删除下面资源可重新上传 ":"",disabled:c.length>0,ghost:!0},w),d.a.createElement("span",{onClick:function(e){e.preventDefault(),e.stopPropagation()},style:{marginLeft:10}},"(单个文件最大",b,"M) ")))}}}]); \ No newline at end of file diff --git a/p__Classrooms__Lists__GroupHomework__Review__index.77f5589c.async.js b/p__Classrooms__Lists__GroupHomework__Review__index.77f5589c.async.js new file mode 100644 index 0000000000..38dcdf830d --- /dev/null +++ b/p__Classrooms__Lists__GroupHomework__Review__index.77f5589c.async.js @@ -0,0 +1,796 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[81,5,6,7],{"+NIl": +/*!***************************************************!*\ + !*** ./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 a={};function s(t,e){t.f=e}function o(t,e){var n;if(t.match(/^\\[a-zA-Z@]+/)){var o=t.current().slice(1);return r(e,n=new(n=a.hasOwnProperty(o)?a[o]:a.DEFAULT)),s(e,c),n.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return s(e,(function(t,e){return l(t,e,"\\]")})),"keyword";if(t.match("\\("))return s(e,(function(t,e){return l(t,e,"\\)")})),"keyword";if(t.match("$$"))return s(e,(function(t,e){return l(t,e,"$$")})),"keyword";if(t.match("$"))return s(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),s(e,c),"bracket"):"error":"{"==u||"["==u?(r(e,n=new(n=a.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 s(e,o),"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),s(e,o),"bracket"):/[ \t\r]/.test(r)?(t.eat(r),null):(s(e,o),function(t){var e=t.cmdState.pop();e&&e.closeBracket()}(e),o(t,e))}return a.importmodule=n("importmodule","tag",["string","builtin"]),a.documentclass=n("documentclass","tag",["","atom"]),a.usepackage=n("usepackage","tag",["atom"]),a.begin=n("begin","tag",["atom"]),a.end=n("end","tag",["atom"]),a.label=n("label","tag",["atom"]),a.ref=n("ref","tag",["atom"]),a.eqref=n("eqref","tag",["atom"]),a.cite=n("cite","tag",["atom"]),a.bibitem=n("bibitem","tag",["atom"]),a.Bibitem=n("Bibitem","tag",["atom"]),a.RBibitem=n("RBibitem","tag",["atom"]),a.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)}:o}},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=o,t.cmdState.length=0},lineComment:"%"}})),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")}(r(/*! ../../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){a(t)&&r(t)}function n(t){var i=t.getWrapperElement(),n=a(t);i.className=i.className.replace(" CodeMirror-empty","")+(n?" CodeMirror-empty":""),n?r(t):e(t)}function a(t){return 1===t.lineCount()&&""===t.getLine(0)}t.defineOption("placeholder","",(function(a,s,o){var l=o&&o!=t.Init;if(s&&!l)a.on("blur",i),a.on("change",n),a.on("swapDoc",n),t.on(a.getInputField(),"compositionupdate",a.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)}(a)}),n(a);else if(!s&&l){a.off("blur",i),a.off("change",n),a.off("swapDoc",n),t.off(a.getInputField(),"compositionupdate",a.state.placeholderCompose),e(a);var c=a.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}s&&!a.hasFocus()&&i(a)}))}(r(/*! ../../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 a,s,o=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"):(a=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,a=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return a="equals",null;if("<"==n){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var s=e.tokenize(t,e);return s?s+" 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(),s="tag",C):l.allowMissingTagName&&"endTag"==t?(s="tag bracket",C(t,0,r)):(s="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?(s="tag",x):(s="tag error",S)}return l.allowMissingTagName&&"endTag"==t?(s="tag bracket",x(t,0,r)):(s="error",S)}function x(t,e,r){return"endTag"!=t?(s="error",x):(g(r),v)}function S(t,e,r){return s="error",x(t,0,r)}function C(t,e,r){if("word"==t)return s="attribute",k;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 s="error",C}function k(t,e,r){return"equals"==t?w:(l.allowMissing||(s="error"),C(t,0,r))}function w(t,e,r){return"string"==t?E:"word"==t&&l.allowUnquoted?(s="string",C):(s="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;a=null;var r=e.tokenize(t,e);return(r||a)&&"comment"!=r&&(s=null,e.state=e.state(a||r,t,e),s&&(r="error"==s?r+" error":s)),r},indent:function(e,r,i){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+o;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+o*(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==w&&(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": +/*!**********************************************!*\ + !*** ./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")),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=(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,k=t.title,w=void 0===k?"上传附件":k,E=t.showRemoveModal,T=void 0!==E&&E,L=t.accept,A=void 0===L?"":L,D=t.additionalText,_=t.isDragger,O=t.number,R=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)),R===(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>R?(z.pop(),W(Object(l.a)(z)),o.b.error("最多只能上传".concat(R,"个文件")),M?Promise.reject():(K(),!1)):r=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(s.a)({},t)})),console.log("info:",t),r(e)},onRemove:(V=Object(a.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(a.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(a.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,o.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||"")},_&&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),!_&&p.a.createElement(u.a,q,p.a.createElement(i.a,{disabled:j},w),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"),a=r(/*! react */"q1tI"),s=r.n(a),o=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");s.a.Component;s.a.Component;var h=function(t,e){return"function"==typeof t?t(e):t},d=function(t,e){return"string"==typeof t?Object(o.c)(t,null,null,e):t},f=function(t){return t},p=s.a.forwardRef;void 0===p&&(p=f);var g=p((function(t,e){var r=t.innerRef,i=t.navigate,n=t.onClick,a=Object(c.a)(t,["innerRef","navigate","onClick"]),o=a.target,u=Object(l.a)({},a,{onClick:function(t){try{n&&n(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||o&&"_self"!==o||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),i())}});return u.ref=f!==p&&e||r,s.a.createElement("a",u)}));var m=p((function(t,e){var r=t.component,n=void 0===r?g:r,a=t.replace,o=t.to,m=t.innerRef,v=Object(c.a)(t,["component","replace","to","innerRef"]);return s.a.createElement(i.e.Consumer,null,(function(t){t||Object(u.a)(!1);var r=t.history,i=d(h(o,t.location),t.location),c=i?r.createHref(i):"",g=Object(l.a)({},v,{href:c,navigate:function(){var e=h(o,t.location);(a?r.replace:r.push)(e)}});return f!==p?g.ref=e||m:g.innerRef=m,s.a.createElement(n,g)}))})),v=function(t){return t},y=s.a.forwardRef;void 0===y&&(y=v);var b=y((function(t,e){var r=t["aria-current"],n=void 0===r?"page":r,a=t.activeClassName,o=void 0===a?"active":a,f=t.activeStyle,p=t.className,g=t.exact,b=t.isActive,x=t.location,S=t.sensitive,C=t.strict,k=t.style,w=t.to,E=t.innerRef,T=Object(c.a)(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return s.a.createElement(i.e.Consumer,null,(function(t){t||Object(u.a)(!1);var r=x||t.location,a=d(h(w,r),r),c=a.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),_=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(!o(r))throw TypeError("Stringified UUID is invalid");return r};e.a=function(t,e,r){var i=(t=t||{}).random||(t.rng||a)();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": +/*!*************************************************************!*\ + !*** ./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"),a=(r(/*! antd/es/button/style */"+L6B"),r(/*! antd/es/button */"2/Rp")),s=(r(/*! antd/es/form/style */"y8nQ"),r(/*! antd/es/form */"Vl3Y")),o=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,a=t.options,s=void 0===a?{}:a,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(o.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},s));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(o.a)(i,2),d=h[0],v=h[1];return u.a.createElement(s.a,Object(n.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(t){e(t)}}),u.a.createElement(s.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(s.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(a.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(a.a,{type:"ghost",onClick:r},"取消")))}},"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(a)return t.findModeByExtension(a)},t.findModeByName=function(e){e=e.toLowerCase();for(var r=0;r"],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 a=e[r];n.push("
        • "+a.text+"");var s=[];return r=t(e,++r,a.level,s),s.length>0&&(n.push("
            "),s.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(o.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 a=E(),s=i;i=a,T[a]={type:"block",expression:s}}return{type:"code",raw:r,lang:n,text:i}}}},k=/(?:\${2})([^\n`]+?)(?:\${2})/gi,w=0,E=function(){return"__special_katext_id_".concat(w++,"__")},T={};function L(){w=0,T={}}function A(t){return t=t.replace(k,(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 _=v.paragraph;v.paragraph=function(t){return _(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 R=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,a){function s(t){try{l(i.next(t))}catch(t){a(t)}}function o(t){try{l(i.throw(t))}catch(t){a(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(s,o)}l((i=i.apply(t,e||[])).next())}))}function G(t,e){var r,i,n,a,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(n=2&a[0]?i.return:a[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,a[1])).done)return n;switch(i=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,i=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[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}(),J=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,a;t.className=e.toolboxButtonStyleClass.name+" "+(i===r?""+(null!==(n=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==n?n:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(a=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==a?a:e.toolboxButtonStyleColorsClass.name))}))},t}(),Q=function(t,e){this.title=t,this.icon=e},tt=function(t){function e(e,r,i,n){var a=t.call(this,e,n||'')||this;return a.colors=[],a.addTransparent=!1,a.colorBoxes=[],a.colors=r,a.currentColor=i,a.setCurrentColor=a.setCurrentColor.bind(a),a.getColorBox=a.getColorBox.bind(a),a}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 a=document.createElement("div");return a.style.display="inline-block",a.style.width=i-2+"px",a.style.height=i-2+"px",a.style.backgroundColor=t,a.style.borderRadius=i/2+"px","transparent"===t&&(a.style.fill=this.uiStyleSettings.toolboxAccentColor,a.innerHTML='\n \n '),n.appendChild(a),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}(Q),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}(),at=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 a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,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,a=this.height+this.CB_DISTANCE-t/2,s=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,s,r),this.positionGrip(this.controlGrips.centerLeft.visual,e,n),this.positionGrip(this.controlGrips.centerRight.visual,s,n),this.positionGrip(this.controlGrips.bottomLeft.visual,e,a),this.positionGrip(this.controlGrips.bottomCenter.visual,i,a),this.positionGrip(this.controlGrips.bottomRight.visual,s,a),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),st=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}(at),ot=function(t){function e(e,r,i,n){var a=t.call(this,e,n||'')||this;return a.widths=[],a.widthBoxes=[],a.widths=r,a.currentWidth=i,a.setCurrentWidth=a.setCurrentWidth.bind(a),a}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 a=document.createElement("div");a.style.minHeight="20px",a.style.flexGrow="2",a.style.display="flex",a.style.alignItems="center";var s=document.createElement("hr");s.style.minWidth="20px",s.style.border="0px",s.style.borderTop=r+"px solid "+t.uiStyleSettings.toolboxColor,s.style.flexGrow="2",a.appendChild(s),i.appendChild(a),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}(Q),lt=function(t){function e(e,r,i,n){var a=t.call(this,e,n||'')||this;return a.styles=[],a.styleBoxes=[],a.styles=r,a.currentStyle=i,a.setCurrentStyle=a.setCurrentStyle.bind(a),a}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 a='\n \n ";n.innerHTML=a,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}(Q),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 ot("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}(st),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 ot("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 a=t.call(this,e,n||'')||this;return a.fonts=[],a.fontBoxes=[],a.fonts=r,a.currentFont=i,a.setCurrentFont=a.setCurrentFont.bind(a),a}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 a=document.createElement("div");a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.innerHTML="The quick brown fox jumps over the lazy dog",n.appendChild(a),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}(Q),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}(at),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 ot("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],a=e[3],s=!1,o=0;o0&&(s=!0,oa&&(a=o),l>n&&(n=l));if(s){this.left=r/this.pixelRatio,this.top=i/this.pixelRatio,this.width=(n-r)/this.pixelRatio,this.height=(a-i)/this.pixelRatio;var c=document.createElement("canvas");c.width=n-r,c.height=a-i,c.getContext("2d").putImageData(this.canvasContext.getImageData(r,i,n-r,a-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}(at),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 a=document.createElement("div");if(a.style.display="flex",a.style.flexGrow="2",a.style.alignItems="center",a.style.justifyContent="space-between",a.style.padding="5px",a.style.borderWidth="2px",a.style.borderStyle="solid",a.style.borderColor=n===i.currentType?i.uiStyleSettings.toolboxAccentColor:"transparent",a.addEventListener("click",(function(){t.setCurrentType(n,a)})),e.appendChild(a),"both"===n||"start"===n){var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.innerHTML='\n \n ',s.style.marginLeft="5px",a.appendChild(s)}var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.minHeight="20px",o.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",o.appendChild(l),a.appendChild(o),"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",a.appendChild(c)}i.typeBoxes.push(a)},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}(Q),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}(st),bt=function(t){function e(e,r,i,n){var a=t.call(this,e,n||'')||this;return a.opacities=[],a.opacityBoxes=[],a.opacities=r,a.currentOpacity=i,a.setCurrentOpacity=a.setCurrentOpacity.bind(a),a}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}(Q),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}(kt),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 ot("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),_t=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}(),Rt=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,kt,xt,Ct,wt,yt,dt,Lt]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ct,gt,vt,pt,kt,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 _t(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 _t(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 _t(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 _t(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)}; +/* ********************************** +cropro version 1.2.0 +@license SEE LICENSE IN LICENSE + +copyright Alan Mendelevich +see README and LICENSE for details +********************************** */ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */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,a){function s(t){try{l(i.next(t))}catch(t){a(t)}}function o(t){try{l(i.throw(t))}catch(t){a(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(s,o)}l((i=i.apply(t,e||[])).next())}))}function Nt(t,e){var r,i,n,a,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(n=2&a[0]?i.return:a[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,a[1])).done)return n;switch(i=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,i=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[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),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(a);var s=Bt.createDefs();a.appendChild(s);var o=Bt.createElement("clipPath",[["id","text-bg-clip"]]);s.appendChild(o);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));a.appendChild(l);var c=Bt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Bt.createTSpan(t+":"+e)),a.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 o.appendChild(h),Bt.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(a),a.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,a){var s=r/t,o=i/e;return{x:(n.x-a)*s+a,y:(n.y-a)*o+a,width:n.width*s,height:n.height*o}},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}(),Jt=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 a=Bt.createTSpan("");return a.innerHTML="°",this.angleLabelElement.appendChild(a),t.appendChild(this.angleLabelElement),document.body.removeChild(t),t},t}(),Qt=function(){function t(){this.naturalSize=!1,this.imageType="image/png"}return t.prototype.rasterize=function(t,e,r,i,n,a,s){var o=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===o.naturalSize?(u=e.naturalWidth/(t.width.baseVal.value-2*i)/a,h=e.naturalHeight/(t.height.baseVal.value-2*i)/s,c.width=e.naturalWidth/a,c.height=e.naturalHeight/s):void 0!==o.width&&void 0!==o.height&&(u=o.width/r.width,h=o.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(a,s),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(o.imageType,o.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 a=new Kt;this.topToolbar.addElementBlock(a);var s=document.createElement("div");s.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var o=document.createElement("a");o.style.color="currentColor",o.href="https://markerjs.com/products/cropro",o.target="_blank",o.innerHTML='',s.appendChild(o),a.addElement(s)}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 Jt("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 a=new Wt;a.minWidth=2*this.toolbarHeight+"px",a.contentAlign="end",this.bottomToolbar.addButtonBlock(a);var s=new Vt('',"Flip horizontal");s.onClick=this.flipHorizontallyButtonClicked,a.addButton(s);var o=new Vt('',"Flip vertical");o.onClick=this.flipVerticallyButtonClicked,a.addButton(o)},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 Qt).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,k=void 0===C?{}:C,w=t.stylesPrev,E=void 0===w?{}:w,A=String(r),D=Object(u.useRef)(),_=Object(u.useRef)(),O=Object(u.useState)(""),I=Object(o.a)(O,2),j=I[0],U=I[1],H=Object(u.useState)("office"),G=Object(o.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,a=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}(a)||"",{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&&(k=Object(a.a)(Object(a.a)({},k),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(a.a)({},k),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",_.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(_.current)).displayMode="popup",t.addRenderEventListener(function(){var t=Object(s.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(_.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 Rt(_.current)).settings.displayMode="popup",t.addEventListener("render",function(){var t=Object(s.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",!_.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(_.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:_,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(a.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: +/*!***************************************************!*\ + !*** ./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 o}));var i=r(/*! ./canUseDom */"MNnm");function n(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function a(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(i.a)())return null;var a,s=document.createElement("style");(null===(e=r.csp)||void 0===e?void 0:e.nonce)&&(s.nonce=null===(a=r.csp)||void 0===a?void 0:a.nonce);s.innerHTML=t;var o=n(r),l=o.firstChild;return r.prepend&&o.prepend?o.prepend(s):r.prepend&&l?o.insertBefore(s,l):o.appendChild(s),s}var s=new Map;function o(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n(r);if(!s.has(i)){var o=a("",r),l=o.parentNode;s.set(i,l),l.removeChild(o)}var c=Array.from(s.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=a(t,r);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(s,o,l){if(l!=t.Init&&l&&s.removeKeyMap("autoCloseTags"),o){var c={name:"autoCloseTags"};"object"==typeof o&&!1===o.whenClosing||(c["'/'"]=function(e){return function(e){return e.getOption("disableInput")?t.Pass:i(e,!0)}(e)}),"object"==typeof o&&!1===o.whenOpening||(c["'>'"]=function(i){return function(i){if(i.getOption("disableInput"))return t.Pass;for(var s=i.listSelections(),o=[],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||a(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)o[c]={text:"/>",newPos:t.Pos(u.line,u.ch+2)};else{var S=y&&n(y,b)>-1;o[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=s.length-1;c>=0;c--){var k=o[c];i.replaceRange(k.text,s[c].head,s[c].anchor,"+insert");var w=i.listSelections().slice(0);w[c]={head:k.newPos,anchor:k.newPos},i.setSelections(w),!C&&k.indent&&(i.indentLine(k.newPos.line,null,!0),i.indentLine(k.newPos.line+1,null,!0))}}(i)}),s.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=[],s=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=o.to,c=1;c0){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"",r=[],i=0;it.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,/[&<>"']/),a=/[&<>"']/g,s=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\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:R(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,a,s,o,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)&&(a=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-a.length),v=m-1)),s=g||/\n\n(?!\s*$)/.test(r),v!==m-1&&(g="\n"===r.charAt(r.length-1),s||(s=g)),s&&(f.loose=!0),l=void 0,(o=/^\[[ xX]\] /.test(r))&&(l=" "!==r[1],r=r.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:o,checked:l,loose:s,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],a="";if(this.options.pedantic){var s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);s?(n=s[1],a=s[3]):a=""}else a=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:a?a.replace(this.rules.inline._escapes,"$1"):a},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,a="**"===i[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(a.lastIndex=0;null!=(i=a.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,a="*"===i[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(a.lastIndex=0;null!=(i=a.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 a;do{a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(a!==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=k,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,a=e.prototype;return a.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},a.blockTokens=function(t,e,r){var i,n,a,s;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):((s=e[e.length-1]).raw+="\n"+i.raw,s.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),a=i.items.length,n=0;n0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(o));)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(o));)o=o.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(a=this.tokenizer.escape(t))t=t.substring(a.raw.length),e.push(a);else if(a=this.tokenizer.tag(t,r,i))t=t.substring(a.raw.length),r=a.inLink,i=a.inRawBlock,e.push(a);else if(a=this.tokenizer.link(t))t=t.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,i)),e.push(a);else if(a=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,i)),e.push(a);else if(a=this.tokenizer.strong(t,o,n))t=t.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],r,i),e.push(a);else if(a=this.tokenizer.em(t,o,n))t=t.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],r,i),e.push(a);else if(a=this.tokenizer.codespan(t))t=t.substring(a.raw.length),e.push(a);else if(a=this.tokenizer.br(t))t=t.substring(a.raw.length),e.push(a);else if(a=this.tokenizer.del(t))t=t.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],r,i),e.push(a);else if(a=this.tokenizer.autolink(t,Y))t=t.substring(a.raw.length),e.push(a);else if(r||!(a=this.tokenizer.url(t,Y))){if(a=this.tokenizer.inlineText(t,i,q))t=t.substring(a.raw.length),n=a.raw.slice(-1),e.push(a);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(a.raw.length),e.push(a);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=w,J=S,Q=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:J(t,!0))+"
        \n":"
        "+(r?t:J(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 Q,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,a,s,o,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:

        "+ot(t.message+"",!0)+"
        ";throw t}}return ht.options=ht.setOptions=function(t){return at(ht.defaults,t),ct(ht.defaults),ht},ht.getDefaults=lt,ht.defaults=ut,ht.use=function(t){var e=at({},t);if(t.renderer&&function(){var r=ht.defaults.renderer||new Q,i=function(e){var i=r[e];r[e]=function(){for(var n=arguments.length,a=new Array(n),s=0;s",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,s){s&&s!=t.Init&&(e.removeKeyMap(n),e.state.closeBrackets=null),r&&(a(i(r,"pairs")),e.state.closeBrackets=r,e.addKeyMap(n))}));var n={Backspace:function(e){var n=o(e);if(!n||e.getOption("disableInput"))return t.Pass;for(var a=i(n,"pairs"),s=e.listSelections(),c=0;c=0;c--){var h=s[c].head;e.replaceRange("",r(h.line,h.ch-1),r(h.line,h.ch+1),"+delete")}},Enter:function(e){var r=o(e),n=r&&i(r,"explode");if(!n||e.getOption("disableInput"))return t.Pass;for(var a=e.listSelections(),s=0;s1&&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?s.charAt(l-1):n,k=l%2?n:s.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(a.anchor.line,a.anchor.ch+(s?-1:1)),head:new r(a.head.line,a.head.ch+(s?1:-1))});e.setSelections(n)}else"both"==u?(e.replaceSelection(C+k,null),e.triggerElectric(C+k),e.execCommand("goCharLeft")):"addFour"==u&&(e.replaceSelection(C+C+C+C,"before"),e.execCommand("goCharRight"));var a,s}))}(n,e)}}function o(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)))}a(e.pairs+"`")}(r(/*! ../../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),a=r("TSYQ"),s=r.n(a);function o(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),o(e)):t.onSuccess(o(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||"",a=n.replace(/\/.*$/,"");return r.some((function(t){var e,r,s=t.trim();return"."===s.charAt(0)?(e=i.toLowerCase(),r=s.toLowerCase(),-1!==e.indexOf(r,e.length-r.length)):/\/\*$/.test(s)?a===s.replace(/\/.*$/,""):n===s}))}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=s()((v(t={},a,!0),v(t,a+"-disabled",l),v(t,o,o),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;e1&&void 0!==arguments[1]?arguments[1]:1,r=R.length,i=0;i1&&void 0!==arguments[1]&&arguments[1];return Object(E.a)(t).map((function(t,r){if(!o.isValidElement(t)||!t.type)return null;var i=t.type.isSelectOptGroup,n=t.key,a=t.props,s=a.children,l=Object(c.a)(a,["children"]);return e||!i?T(t):Object(w.a)(Object(w.a)({key:"__RC_SELECT_GRP__".concat(null===n?r:n,"__"),label:n},l),{},{options:L(s)})})).filter((function(t){return t}))}var A=r("2Qr1"),D=r("qNPg"),_=r("U8pU"),O=r("Kwbf"),R=r("WKfj");var I=function(t){var e=t.mode,r=t.options,i=t.children,n=t.backfill,a=t.allowClear,s=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||!a||!s,"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(R.d)(p);Object(O.a)(!f||S.every((function(t){return"object"===Object(_.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(!o.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!(o.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(a.a)(r,t);var e=Object(s.a)(r);function r(){var t;return Object(i.a)(this,r),(t=e.apply(this,arguments)).selectRef=o.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 o.createElement(M,Object.assign({ref:this.selectRef},this.props))}}]),r}(o.Component);P.Option=S,P.OptGroup=k;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"),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),s=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),o=r(/*! react */"q1tI"),l=r.n(o),c=r(/*! react-dom */"i8i4"),u=function(t){Object(a.a)(r,t);var e=Object(s.a)(r);function r(t){var n;Object(i.a)(this,r),n=e.call(this,t);var a=window.document;return n.node=a.createElement("div"),a.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: +/*!**************************************************************!*\ + !*** ./src/components/markdown-editor/index.tsx + 6 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./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/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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/RenderHtml/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ +/*! 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/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ +/*! 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+"),a=(r("miYZ"),r("tsqr")),s=r("9og8"),o=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,a=t.className,s=void 0===a?"":a,o=t.children;return d.a.createElement("a",{title:r,className:s,onClick:function(){e(n)}},d.a.createElement("i",{className:"md-iconfont ".concat(i)}),o)}var k=function(t){var e=t.watch,r=t.showNullButton,i=t.onActionCallback,n=t.fullScreen,a=t.insertTemp,s=t.hidetoolBar,o=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(o,"&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"},!s&&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,a&&d.a.createElement("li",null,d.a.createElement(C,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),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})))},w=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("7ahc"),O=r("k1fw"),R=(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(o.a)(i,1)[0],a=Object(h.useRef)();function s(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:a.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];a.current=e.name,B(e,s)}}))),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(R.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 J=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Q=["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,J+"-B","bold"),Object(l.a)(j,J+"-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,R=t.mode,I=void 0===R?"markdown":R,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,J=t.fullScreen,rt=void 0!==J&&J,it=t.onBlur,nt=t.onCMBeforeChange,at=t.onFullScreen,st=t.className,ot=void 0===st?"":st,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(o.a)(pt,2),mt=gt[0],vt=gt[1],yt=Object(h.useState)(r),bt=Object(o.a)(yt,2),xt=bt[0],St=bt[1],Ct=Object(h.useState)(A),kt=Object(o.a)(Ct,2),wt=kt[0],Et=kt[1],Tt=Object(h.useState)(rt),Lt=Object(o.a)(Tt,2),At=Lt[0],Dt=Lt[1],_t=Object(h.useState)(""),Ot=Object(o.a)(_t,2),Rt=Ot[0],It=Ot[1],Mt=Object(h.useState)(0),Pt=Object(o.a)(Mt,2),Nt=Pt[0],Ft=Pt[1],Bt=Object(h.useState)(S),jt=Object(o.a)(Bt,2),Ut=jt[0],Ht=jt[1],Gt=Object(h.useState)(!1),zt=Object(o.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)(),Jt=function(){var t=Object(s.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==at||at(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(),s=i.items;if("Files"===n||i.types.indexOf("Files")>-1){if(r.preventDefault(),"stex"==I)return;try{var o,l=s[1];"file"===(null===(o=s[0])||void 0===o?void 0:o.kind)&&(l=s[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,"")):Q.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){a.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,a,s;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===(a=r.type)||void 0===a?void 0:a.indexOf("video"))>-1?t.replaceSelection('')):(null==r||null===(s=r.type)||void 0===s?void 0:s.indexOf("pdf"))>-1?t.replaceSelection('').concat(r.name,"")):Q.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")}))},a=0;a0||i.target.offsetWidth>0)&&(Qt(),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,Qt]),Object(h.useEffect)((function(){if(mt){for(var t=[],e=function(){var e=i[r],n=(a=Object(o.a)(e,2))[0],s=a[1],c=Object(l.a)({},n,(function(){te(s)}));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(wt&&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,wt]),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(!wt),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,wt,At]),ee=Object(h.useCallback)((function(t){switch(It(""),Rt){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 a=t.src,s=t.alt,o=t.name;return a.indexOf("type=image")>-1?mt.replaceSelection("![ ".concat(s||""," ]( ").concat(a,' "').concat(s||"",'" )')):a.indexOf("type=application/pdf")>-1?mt.replaceSelection('').concat(o,"")):mt.replaceSelection('').concat(o,"")),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",a),document.addEventListener("mouseup",n),function(){t.removeEventListener("mousedown",i),document.removeEventListener("mousemove",a),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(ot," ").concat(wt?"on-preview":""," ").concat(E?"mini":""," ").concat(At?"full-screen":""),style:ne},d.a.createElement(k,{insertTemp:O,watch:wt,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})),wt?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(w.a,null,et[Rt]?d.a.createElement(i.a,{centered:!0,title:et[Rt],visible:!0,onCancel:ie,footer:null},re):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"],a=[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"],s=[r,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],o="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",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 a={sourceNode:t,pre:1,langExtension:null,numberLines:null,sourceCode:r,spans:null,basePos:e,decorations:null};i(a),n.push.apply(n,a.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),a=[],s={},o=0,l=n.length;o=0;)i[u.charAt(h)]=c;var d=c[1],f=""+d;s.hasOwnProperty(f)||(a.push(d),s[f]=null)}a.push(/[\0-\uffff]/),r=function(t){for(var e=0,r=!1,i=!1,n=0,a=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(a=0;ap[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,a=[],s=0,o=0;s=2&&"["===d?i[s]=c(h):"\\"!==d&&(i[s]=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,a=t.length;n=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(m=!1,y="src"),m||(f[v]=y)}var k=u;if(u+=v.length,m){var w=b[1],E=v.indexOf(w),T=E+w.length;b[2]&&(E=(T=v.length-b[2].length)-w.length);var L=y.substring(5);d(l,o+k,v.substring(0,E),a,c),d(l,o+k+E,w,S(L,w),c),d(l,o+k+T,v.substring(T),a,c)}else c.push(o+k,y)}t.decorations=c};return a}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 a=n>1?"":"\n\r",s=a?".":"[\\S\\s]",o="/(?=[^/*"+a+"])(?:[^/\\x5B\\x5C"+a+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+a+"]|\\x5C"+s+")*(?:\\x5D|$))+/";r.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+o+")")])}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,a,n,s,o,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/,a=t.ownerDocument,s=a.createElement("li");t.firstChild;)s.appendChild(t.firstChild);var o=[s];function l(t){var e=t.nodeType;if(1!=e||i.test(t.className)){if((3==e||4==e)&&r){var s=t.nodeValue,o=s.match(n);if(o){var u=s.substring(0,o.index);t.nodeValue=u;var h=s.substring(o.index+o[0].length);if(h)t.parentNode.insertBefore(a.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 a=t(n,1),s=e.nextSibling;a.appendChild(i);for(var o=s;o;o=s)s=o.nextSibling,a.appendChild(o)}return i}(t.nextSibling,0);(e=r.parentNode)&&1===e.nodeType;)r=e;o.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),o>=S&&(f+=2)}}finally{v&&(v.style.display=y)}}(e)}catch(e){t.console&&console.log(e&&e.stack||e)}}function k(t,e,r){var i=r||!1,n=e||null,a=document.createElement("div");return a.innerHTML="
        "+t+"
        ",a=a.firstChild,i&&y(a,i,!0),C({langExtension:n,numberLines:i,sourceNode:a,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),a.innerHTML}function w(e,r){var i=r||document.body,n=i.ownerDocument||document;function a(t){return i.getElementsByTagName(t)}for(var s=[a("pre"),a("code"),a("xmp")],o=[],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:a,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:o,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(m({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(m({keywords:s,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:k,prettyPrint:w},T=t.define;"function"==typeof T&&T.amd&&T("google-code-prettify",[],(function(){return E}))}()},Sdqs: +/*!*******************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/GroupHomework/Review/index.tsx + 2 modules ***! + \*******************************************************************************/ +/*! exports provided: default */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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/pages/Classrooms/Lists/GroupHomework/Review/index.less?modules (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/MultiUpload/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/PreviewAll/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/image-preview/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/mediator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/service/shixunHomeworks.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! 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 */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ +/*! 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/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */ +/*! 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(t,e,r){"use strict";r.r(e);r("5Dmo");var i=r("3S7+"),n=(r("+L6B"),r("2/Rp")),a=(r("giR+"),r("fyUT")),s=(r("sRBo"),r("kaz8")),o=(r("/zsF"),r("PArb")),l=(r("14J3"),r("BMrR")),c=(r("jCWc"),r("kPKH")),u=(r("sPJy"),r("bE4q")),h=(r("miYZ"),r("tsqr")),d=r("9og8"),f=r("k1fw"),p=(r("y8nQ"),r("Vl3Y")),g=(r("2qtc"),r("kLXV")),m=r("tJVT"),v=r("PpiC"),y=r("WmNS"),b=r.n(y),x=r("q1tI"),S=r.n(x),C=r("Ty5D"),k=r("9kvl"),w=r("55Ip"),E=r("jhfD"),T=r("/MfK"),L=r("kaH+"),A=r("Ot1p"),D=r("dhSg"),_=r("wd/R"),O=r.n(_),R=r("m3rI"),I=r("LvDl"),M=r("XYT7"),P=(r("5NDa"),r("5rEg")),N=r("ErOA"),F=Object(k.a)((function(t){return{shixunHomeworks:t.shixunHomeworks}}))((function(t){var e=t.shixunHomeworks,r=t.dispatch,i=Object(C.i)(),n=Object(x.useState)(!0),s=Object(m.a)(n,2),o=(s[0],s[1],p.a.useForm()),l=Object(m.a)(o,1)[0];return S.a.createElement(S.a.Fragment,null,S.a.createElement(g.a,{centered:!0,title:"调分",visible:"调分"===e.actionTabs.key,okText:"确定",cancelText:"取消",onOk:Object(d.a)(b.a.mark((function t(){var n;return b.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.validateFields();case 2:return n=l.getFieldsValue(),t.next=5,Object(N.a)("/api/student_works/".concat(e.actionTabs.id,"/adjust_score.json"),{method:"post",body:Object(f.a)({},n)});case 5:0===t.sent.status&&(h.b.success("评阅成功"),l.resetFields(),r({type:"shixunHomeworks/setActionTabs",payload:{}}),r({type:"shixunHomeworks/getStudentWorkCommon",payload:Object(f.a)({},i)}));case 7:case"end":return t.stop()}}),t)}))),onCancel:function(){r({type:"shixunHomeworks/setActionTabs",payload:{}})}},S.a.createElement("p",{className:"tc"},"该学生的最终成绩将不会按照评分规则进行计算"),S.a.createElement(p.a,{form:l,layout:"horizontal"},S.a.createElement("div",{style:{display:"flex",alignItems:"baseline"}},S.a.createElement(p.a.Item,{label:"成绩",name:"score",rules:[{required:!0,message:"请输入!"}]},S.a.createElement(a.a,{min:0,placeholder:"请填写分数"})),S.a.createElement("span",{className:"ml10"},"分")),S.a.createElement("div",null,S.a.createElement(p.a.Item,{name:"comment"},S.a.createElement(P.a.TextArea,{placeholder:"请填写您对作品调分的原因",rows:8}))))))})),B=r("500L"),j=Object(k.a)((function(t){return{classroomList:t.classroomList,loading:t.loading}}))((function(t){var e=t.classroomList,r=(t.loading,t.dispatch),i=(Object(C.i)(),p.a.useForm()),n=Object(m.a)(i,1)[0];return S.a.createElement(g.a,{centered:!0,title:"补交附件",visible:"补交附件"===e.actionTabs.key,bodyStyle:{minHeight:200},onOk:Object(d.a)(b.a.mark((function t(){var i,a,s;return b.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.validateFields();case 2:return a=Object(f.a)({},n.getFieldValue()),s=e.actionTabs.selectArrs,a.attachment_ids=null===(i=a.attachment_ids)||void 0===i?void 0:i.map((function(t){return t.response.id})),t.next=7,Object(M.R)(Object(f.a)(Object(f.a)({},a),{},{homeworkId:s.work_id}));case 7:0===t.sent.status&&(r({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:Object(f.a)({},e.actionTabs.params)}),r({type:"classroomList/setActionTabs",payload:{}}));case 9:case"end":return t.stop()}}),t)}))),onCancel:function(){r({type:"classroomList/setActionTabs",payload:{}})}},S.a.createElement(p.a,{form:n,initialValues:{}},S.a.createElement(p.a.Item,{name:"attachment_ids",rules:[{required:!0,message:"请上传附件"}]},S.a.createElement(B.b,null)),S.a.createElement(p.a.Item,{name:"description"},S.a.createElement(P.a.TextArea,{placeholder:"请在此输入补交附件的原因,最大限制100个字符",rows:7}))))})),U=r("xKgJ"),H=r("T/ev"),G=r.n(H),z=r("9Bee"),W=r("1vsH"),V=r("p5ED");e.default=Object(k.a)((function(t){var e=t.shixunHomeworks,r=t.loading,i=t.user;return{shixunHomeworks:e,globalSetting:t.globalSetting,user:i,loading:r.effects}}))((function(t){var e,r,y,_,P,H,K,q,Y,X,$,Z,J,Q,tt,et,rt,it,nt,at,st,ot,lt,ct=t.shixunHomeworks,ut=(t.globalSetting,t.loading,t.user),ht=t.dispatch,dt=(Object(v.a)(t,["shixunHomeworks","globalSetting","loading","user","dispatch"]),Object(C.i)()),ft=Object(x.useRef)(),pt=(Object(C.h)(),ut.userInfo),gt=ct.studentWorkDetail,mt=ct.studentWorkCommon,vt=ct.studentWorkSupplyDetail,yt=(ct.workList,Object(x.useState)({})),bt=Object(m.a)(yt,2),xt=(bt[0],bt[1],Object(x.useState)("")),St=Object(m.a)(xt,2),Ct=St[0],kt=St[1],wt=Object(x.useState)(!1),Et=Object(m.a)(wt,2),Tt=Et[0],Lt=Et[1],At=g.a.useModal(),Dt=Object(m.a)(At,2),_t=Dt[0],Ot=Dt[1],Rt=p.a.useForm(),It=Object(m.a)(Rt,1)[0],Mt=Object(x.useState)({last:!1}),Pt=Object(m.a)(Mt,2),Nt=Pt[0],Ft=Pt[1],Bt=Object(x.useState)({last:!1}),jt=Object(m.a)(Bt,2),Ut=jt[0],Ht=jt[1],Gt=Object(x.useState)(!1),zt=Object(m.a)(Gt,2),Wt=zt[0],Vt=zt[1],Kt=Object(x.useState)(""),qt=Object(m.a)(Kt,2),Yt=qt[0],Xt=qt[1],$t=Object(x.useState)({content:"",type:""}),Zt=Object(m.a)($t,2),Jt=Zt[0],Qt=Zt[1],te=Object(x.useRef)(),ee=function(){ht({type:"shixunHomeworks/getStudentWorkCommon",payload:Object(f.a)({},dt)})};function re(){return(re=Object(d.a)(b.a.mark((function t(){var e,r,i,n,a,s,o;return b.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=JSON.parse(localStorage.getItem("all_student_works_param")||"{}"),t.next=3,ht({type:"shixunHomeworks/getAllStudentWorks",payload:Object(f.a)(Object(f.a)({},dt),i)});case 3:n=t.sent,(a=null===(e=n.all_student_works)||void 0===e?void 0:e.map((function(t){return String(t.student_work_id)})).indexOf(dt.userId))===(null===(r=n.all_student_works)||void 0===r?void 0:r.length)-1?Ft({last:!0}):Ft(null===(s=n.all_student_works)||void 0===s?void 0:s[a+1]),Ht(0===a?{last:!0}:null===(o=n.all_student_works)||void 0===o?void 0:o[a-1]);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}Object(x.useEffect)((function(){return ht({type:"globalSetting/footerToggle",payload:!1}),function(){ht({type:"globalSetting/footerToggle",payload:!0})}}),[]),Object(x.useEffect)((function(){ht({type:"shixunHomeworks/getStudentWorkDetail",payload:Object(f.a)({},dt)}),ht({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:Object(f.a)({},dt)}),ee(),function(){re.apply(this,arguments)}(),ft.current.onclick=function(t){"IMG"===t.target.nodeName&&""!==t.target.alt&&D.a.publish("preview-image",t.target.src)}}),[dt.categoryId,dt.userId]);var ie=function(t){var e;_t.confirm({title:"是否确认删除?",onOk:(e=Object(d.a)(b.a.mark((function e(){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(M.k)({score_id:t.comment_id,userId:dt.userId});case 2:0===e.sent.status&&(h.b.success("删除成功"),ee());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},ne=function(){var t=Object(d.a)(b.a.mark((function t(e){var r;return b.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.attachment_ids=null===(r=e.attachment_ids)||void 0===r?void 0:r.map((function(t){var e;return null==t||null===(e=t.response)||void 0===e?void 0:e.id})),t.next=3,Object(M.e)(Object(f.a)(Object(f.a)({},e),{},{userId:dt.userId}));case 3:0===t.sent.status&&(h.b.success("提交成功"),It.resetFields(),ee());case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ae=function(){var t=Object(d.a)(b.a.mark((function t(e){var r,i,n,a,s;return b.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=It.getFieldsValue(),i=r.comment,n=r.score,a=r.attachment_ids,s=!Object(I.isNil)(n),console.log("-------",dt),!(i||s||a)){t.next=6;break}return g.a.confirm({centered:!0,okText:"离开",cancelText:"取消",title:"离开此页提示",content:S.a.createElement("div",{className:"tc"},"系统可能不会保存您所做的更改"),onOk:function(){It.resetFields(),"last"===e?k.d.push("/classrooms/".concat(null==dt?void 0:dt.coursesId,"/group_homework/").concat(null==dt?void 0:dt.commonHomeworkId,"/review/").concat(null==Ut?void 0:Ut.student_work_id)):"read"===e?k.d.push("/classrooms/".concat(null==dt?void 0:dt.coursesId,"/group_homework/").concat(null==dt?void 0:dt.commonHomeworkId,"/review/").concat(null==Nt?void 0:Nt.student_work_id)):k.d.push("/classrooms/".concat(dt.coursesId,"/group_homework/").concat(dt.commonHomeworkId,"/detail"))}}),t.abrupt("return");case 6:"last"===e?k.d.push("/classrooms/".concat(null==dt?void 0:dt.coursesId,"/group_homework/").concat(null==dt?void 0:dt.commonHomeworkId,"/review/").concat(null==Ut?void 0:Ut.student_work_id)):"read"===e?k.d.push("/classrooms/".concat(null==dt?void 0:dt.coursesId,"/group_homework/").concat(null==dt?void 0:dt.commonHomeworkId,"/review/").concat(null==Nt?void 0:Nt.student_work_id)):k.d.push("/classrooms/".concat(dt.coursesId,"/group_homework/").concat(dt.commonHomeworkId,"/detail"));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return S.a.createElement("section",{className:"edu-container",ref:ft},S.a.createElement("section",{className:"animated fadeIn"},S.a.createElement("aside",{className:"mt10"},pt&&S.a.createElement(u.a,{separator:">"},S.a.createElement(u.a.Item,null,S.a.createElement(w.a,{to:"/classrooms/".concat(dt.coursesId,"/group_homework")},null==pt||null===(e=pt.course)||void 0===e?void 0:e.course_name)),S.a.createElement(u.a.Item,null,S.a.createElement(w.a,{to:"/classrooms/".concat(dt.coursesId,"/group_homework")},"分组作业")),S.a.createElement(u.a.Item,null,S.a.createElement(w.a,{to:"/classrooms/".concat(dt.coursesId,"/group_homework/").concat(dt.commonHomeworkId,"/detail")},"作业详情")),S.a.createElement(u.a.Item,null,null==gt?void 0:gt.author_name))),S.a.createElement("aside",{className:[G.a.title,"mt20"].join(" ")},S.a.createElement(l.a,{style:{width:"100%"}},S.a.createElement(c.a,{flex:"1"},S.a.createElement(w.a,{to:"/classrooms/".concat(dt.coursesId,"/group_homework")},S.a.createElement(E.a,{className:"font16 c-black"})),S.a.createElement("strong",{className:"font20 ml5"},null==gt?void 0:gt.homework_name),S.a.createElement(W.k,{status:null==gt?void 0:gt.homework_status})),S.a.createElement(c.a,null,Object(U.s)()&&(null==gt||null===(r=gt.homework_status)||void 0===r?void 0:r.includes("补交中"))&&S.a.createElement("span",{onClick:function(){ht({type:"classroomList/setActionTabs",payload:{key:"补交附件",params:dt,selectArrs:{homework_id:dt.commonHomeworkId,work_id:dt.userId}}})},className:"c-blue current font14"},"补交附件"))))),S.a.createElement("section",{className:[G.a.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},(null==gt?void 0:gt.description)&&S.a.createElement("aside",null,S.a.createElement("div",{className:"font16"},"内容"),S.a.createElement("div",{className:"pl30 mt20"},S.a.createElement(z.a,{value:(null==gt?void 0:gt.description)||"暂无~"})),null==gt||null===(y=gt.attachments)||void 0===y?void 0:y.map((function(t,e){return S.a.createElement("div",{className:"pl30",key:e},S.a.createElement("a",{href:"".concat(R.a.API_SERVER).concat(t.url),onClick:function(){var e=Object(d.a)(b.a.mark((function e(r){var i;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.preventDefault(),"txt"!==t.file_type){e.next=6;break}return e.next=4,Object(N.a)(t.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:i=e.sent,te.current=i;case 6:Qt({type:t.file_type,content:window.location.origin+t.url});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},S.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),S.a.createElement("span",{className:"ml10 c-black"},t.title),S.a.createElement("span",{className:"c-light-black ml20 font12"},t.filesize),S.a.createElement("span",{className:"ml10 c-light-primary current",onClick:function(e){e.preventDefault(),Object(W.v)("","".concat(R.a.API_SERVER).concat(t.url))}},"下载"),S.a.createElement("span",{className:"ml10 c-green-29b current",onClick:function(){var e=Object(d.a)(b.a.mark((function e(r){var i;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.preventDefault(),"txt"!==t.file_type){e.next=6;break}return e.next=4,Object(N.a)(t.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:i=e.sent,te.current=i;case 6:Qt({type:t.file_type,content:window.location.origin+t.url});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},"预览")))})),S.a.createElement("aside",{className:"tr"},S.a.createElement("span",{className:" c-light-black"},O()(gt.commit_time).format("YYYY-MM-DD HH:mm")),S.a.createElement("span",{className:"ml10"},gt.commit_user_name),S.a.createElement("span",{className:"ml10 c-light-black"},"提交"),S.a.createElement("span",{className:"ml30 c-light-black"},O()(gt.update_time).format("YYYY-MM-DD HH:mm")),S.a.createElement("span",{className:"ml10"},gt.update_user_name),S.a.createElement("span",{className:"ml10 c-light-black"},"更新"))),(null==gt?void 0:gt.redo_description)&&S.a.createElement("aside",null,S.a.createElement(o.a,null),S.a.createElement("div",{className:"font16"},"重做记录"),S.a.createElement("div",{className:"pl30 mt20"},S.a.createElement(z.a,{value:(null==gt?void 0:gt.redo_description)||"暂无~"})),null==gt||null===(_=gt.redo_attachments)||void 0===_?void 0:_.map((function(t,e){return S.a.createElement("div",{className:"pl30",key:e},S.a.createElement("a",{href:"".concat(R.a.API_SERVER).concat(t.url),onClick:function(){var e=Object(d.a)(b.a.mark((function e(r){var i;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.preventDefault(),"txt"!==t.file_type){e.next=6;break}return e.next=4,Object(N.a)(t.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:i=e.sent,te.current=i;case 6:Qt({type:t.file_type,content:window.location.origin+t.url});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},S.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),S.a.createElement("span",{className:"ml10 c-black"},t.title),S.a.createElement("span",{className:"c-light-black ml20 font12"},t.filesize),S.a.createElement("span",{className:"ml10 c-light-primary current",onClick:function(e){e.preventDefault(),Object(W.v)("","".concat(R.a.API_SERVER).concat(t.url))}},"下载"),S.a.createElement("span",{className:"ml10 c-green-29b current",onClick:function(){var e=Object(d.a)(b.a.mark((function e(r){var i;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.preventDefault(),"txt"!==t.file_type){e.next=6;break}return e.next=4,Object(N.a)(t.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:i=e.sent,te.current=i;case 6:Qt({type:t.file_type,content:window.location.origin+t.url});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},"预览")))})),S.a.createElement("aside",{className:"tr"},S.a.createElement("span",{className:" c-light-black"},O()(gt.redo_commit_time).format("YYYY-MM-DD HH:mm")),S.a.createElement("span",{className:"ml10"},gt.commit_user_name),S.a.createElement("span",{className:"ml10 c-light-black"},"提交"),S.a.createElement("span",{className:"ml30 c-light-black"},O()(gt.redo_update_time).format("YYYY-MM-DD HH:mm")),S.a.createElement("span",{className:"ml10"},gt.update_user_name),S.a.createElement("span",{className:"ml10 c-light-black"},"更新"))),(null==vt?void 0:vt.revise_reason)&&S.a.createElement("aside",null,S.a.createElement(o.a,null),S.a.createElement("div",{className:"font16"},"补交内容"),S.a.createElement("div",{className:"pl30 mt20"},S.a.createElement(z.a,{value:(null==vt?void 0:vt.revise_reason)||"暂无~"})),null==vt||null===(P=vt.revise_attachments)||void 0===P?void 0:P.map((function(t,e){return S.a.createElement("div",{className:"pl30",key:e},S.a.createElement("a",{href:"".concat(R.a.API_SERVER).concat(t.url),onClick:function(){var e=Object(d.a)(b.a.mark((function e(r){var i;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.preventDefault(),"txt"!==t.file_type){e.next=6;break}return e.next=4,Object(N.a)(t.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:i=e.sent,te.current=i;case 6:Qt({type:t.file_type,content:window.location.origin+t.url});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},S.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),S.a.createElement("span",{className:"ml10 c-black"},t.title),S.a.createElement("span",{className:"c-light-black ml20 font12"},t.filesize),S.a.createElement("span",{className:"ml10 c-light-primary current",onClick:function(e){e.preventDefault(),Object(W.v)("","".concat(R.a.API_SERVER).concat(t.url))}},"下载"),S.a.createElement("span",{className:"ml10 c-green-29b current",onClick:function(){var e=Object(d.a)(b.a.mark((function e(r){var i;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.preventDefault(),"txt"!==t.file_type){e.next=6;break}return e.next=4,Object(N.a)(t.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:i=e.sent,te.current=i;case 6:Qt({type:t.file_type,content:window.location.origin+t.url});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},"预览")))})),S.a.createElement("aside",{className:"tr"},S.a.createElement("span",{className:"ml30 c-light-black"},O()(vt.atta_update_time).format("YYYY-MM-DD HH:mm")),S.a.createElement("span",{className:"ml10"},vt.atta_update_user),S.a.createElement("span",{className:"ml10 c-light-black"},"更新"))),S.a.createElement(o.a,null),(null==gt||null===(H=gt.project_info)||void 0===H?void 0:H.id)&&S.a.createElement("aside",null,S.a.createElement("div",{className:"font16"},"关联项目"),S.a.createElement("div",{className:"pl30 mt20"},-1===(null==gt||null===(K=gt.project_info)||void 0===K?void 0:K.id)&&S.a.createElement("span",{className:"c-blue"},null==gt||null===(q=gt.project_info)||void 0===q?void 0:q.name),-1!==(null==gt||null===(Y=gt.project_info)||void 0===Y?void 0:Y.id)&&S.a.createElement("a",{target:"_blank",href:"".concat(null===(X=ut.navigationInfo)||void 0===X||null===($=X.top)||void 0===$?void 0:$.old_url).concat(null==gt||null===(Z=gt.project_info)||void 0===Z?void 0:Z.id)},null==gt||null===(J=gt.project_info)||void 0===J?void 0:J.name))),S.a.createElement(o.a,null),(null==gt||null===(Q=gt.project_info)||void 0===Q?void 0:Q.id)&&S.a.createElement("aside",null,S.a.createElement("div",{className:"font16"},"全部组员"),S.a.createElement("div",{className:"pl30 mt20"},"当前组员:",null==gt?void 0:gt.author_name," ",(null==gt?void 0:gt.is_leader_work)&&S.a.createElement("span",{className:G.a.leader},"组长"),S.a.createElement("br",null),(null==gt||null===(tt=gt.work_members)||void 0===tt?void 0:tt.length)>0&&S.a.createElement("span",null,"其他组员:",null==gt||null===(et=gt.work_members)||void 0===et?void 0:et.map((function(t,e){return Object(U.s)()?S.a.createElement("a",{style:{pointerEvents:"none"}},t.user_name,(null==t?void 0:t.is_leader)&&S.a.createElement("span",{className:G.a.leader},"组长")):S.a.createElement(w.a,{key:e,className:"mr10",to:"/classrooms/".concat(dt.coursesId,"/group_homework/").concat(dt.commonHomeworkId,"/review/").concat(t.work_id),target:"_blank"},t.user_name,(null==t?void 0:t.is_leader)&&S.a.createElement("span",{className:G.a.leader},"组长"))})))),!Object(U.s)()&&S.a.createElement("div",{className:"c-grey-999 pl30"},"温馨提示:点击其他组员的姓名,可以快速评阅TA的作品"))),(null==gt?void 0:gt.anonymous_comment)&&Object(U.e)()&&S.a.createElement("section",null,S.a.createElement("aside",{className:[G.a.replyList,"bg-white"].join(" ")},S.a.createElement("span",{style:{fontSize:"16px"}},"匿评学员"),S.a.createElement("br",null),(null==gt||null===(rt=gt.no_commented_user_names)||void 0===rt?void 0:rt.length)>0&&S.a.createElement("p",{style:{marginTop:"1em"}},"未完成匿评:",null==gt||null===(it=gt.no_commented_user_names)||void 0===it?void 0:it.toString()),S.a.createElement("span",{style:{marginTop:(null==gt||null===(nt=gt.no_commented_user_names)||void 0===nt?void 0:nt.length)>0?"":"1em",display:"flex"}},"已完成匿评:",null==gt||null===(at=gt.commented_user_names)||void 0===at?void 0:at.toString()))),(Object(U.c)()||(null==gt||null===(st=gt.homework_status)||void 0===st?void 0:st.includes("匿评中")))&&S.a.createElement("section",null,S.a.createElement("aside",{className:[G.a.replyList,"bg-white"].join(" ")},S.a.createElement(l.a,{gutter:[10,20]},S.a.createElement(c.a,{flex:1},S.a.createElement("span",{className:"font-16"},"全部评阅(",null==mt?void 0:mt.comment_count,")")),S.a.createElement(c.a,{style:{lineHeight:"40px"}},Object(U.c)()&&(null==mt?void 0:mt.ultimate)&&S.a.createElement("span",{className:"font-16 c-blue current",onClick:function(){ht({type:"shixunHomeworks/setActionTabs",payload:{key:"调分",selectArrs:gt,id:dt.userId,params:dt}})}},"调分")),S.a.createElement(c.a,null)),(!(null!=mt&&mt.ultimate)||(null==gt||null===(ot=gt.homework_status)||void 0===ot?void 0:ot.includes("匿评中")))&&!(null!=mt&&mt.is_author)&&S.a.createElement("aside",null,S.a.createElement(p.a,{layout:"vertical",form:It,onFinish:function(t){return ne(t)},initialValues:{same_score:!0}},S.a.createElement(p.a.Item,{label:"评语",name:"comment",rules:[{required:!0,message:"请填写评语"}]},S.a.createElement(A.a,{placeholder:"请在此输入对本作品的评语,最大限制2000个字符",maxLength:2e3,defaultValue:"",height:200})),S.a.createElement(p.a.Item,{name:"same_score",valuePropName:"checked"},S.a.createElement(s.a,null,"整组同评(选中,则本次评阅对象指小组全部成员,否则仅评阅此成员1人 )")),S.a.createElement("div",null,S.a.createElement(p.a.Item,{name:"attachment_ids"},S.a.createElement(B.b,null))),S.a.createElement("div",{className:"mt10"},S.a.createElement(l.a,null,S.a.createElement(c.a,{flex:"1"},S.a.createElement(l.a,{align:"middle",justify:"start"},S.a.createElement(c.a,null,S.a.createElement(p.a.Item,{noStyle:!0,name:"score",rules:[{required:!Object(U.c)(),message:"请填写分数"}]},S.a.createElement(a.a,{min:0,step:.1,style:{width:100},size:"large",placeholder:"请填写分数"}))),S.a.createElement(c.a,null,S.a.createElement("span",{className:"ml5 mr20"},"分")))))),S.a.createElement("aside",{className:"".concat(G.a.buttonFixed)},S.a.createElement("aside",{className:"edu-container"},S.a.createElement(l.a,{align:"middle"},S.a.createElement(c.a,{flex:"1"},S.a.createElement(n.a,{type:"default",onClick:function(){return ae("list")}},"返回列表")),S.a.createElement(c.a,{flex:"1",className:"tr"},!Object(U.s)()&&S.a.createElement(n.a,{type:"default",onClick:function(){return ae("last")},disabled:null==Ut?void 0:Ut.last},"上一个"),!Object(U.s)()&&S.a.createElement(n.a,{type:"default",disabled:null==Nt?void 0:Nt.last,style:{marginLeft:"20px",marginRight:"20px"},onClick:function(){return ae("read")}},"下一个"),S.a.createElement(n.a,{htmlType:"submit",type:"primary"},"提交评阅"))))))),S.a.createElement(o.a,null),null==mt||null===(lt=mt.comment_scores)||void 0===lt?void 0:lt.map((function(t,e){var r;return S.a.createElement("aside",{key:e},S.a.createElement(l.a,{gutter:[12,12],key:e},S.a.createElement(c.a,{flex:"40px"},S.a.createElement("img",{className:G.a.headpic,width:"40",src:"".concat(R.a.IMG_SERVER,"/images/").concat(null==t?void 0:t.user_image_url)})),S.a.createElement(c.a,{flex:"1"},S.a.createElement(l.a,{align:"middle"},S.a.createElement(c.a,{span:24},S.a.createElement(l.a,null,S.a.createElement(c.a,{flex:1},S.a.createElement("span",{className:"c-light-black"},null==t?void 0:t.user_name),S.a.createElement("span",{className:"c-light-black"},"(",null==t?void 0:t.comment_role,")"),S.a.createElement("span",{className:"c-light-black ml10"},O()(null==t?void 0:t.comment_time).format("YYYY-MM-DD HH:mm")),null!==t.score&&S.a.createElement("span",{className:"ml30 c-orange"},t.score,"分")),S.a.createElement(c.a,null,0===e?S.a.createElement("aside",null,t.delete&&S.a.createElement("span",{className:"c-blue current",onClick:function(){ie(t)}},"删除"),t.can_appeal&&S.a.createElement("span",{className:"c-blue current",onClick:function(){Lt({show:!0,type:1,active:e})}},"申诉"),t.can_reply&&S.a.createElement("span",{className:"c-blue current ml10",onClick:function(){return Lt({show:!0,type:0,active:e})}},"回复")):S.a.createElement("aside",null,t.delete&&S.a.createElement("span",{className:"c-blue current",onClick:function(){ie(t)}},"删除"),t.can_appeal&&S.a.createElement("span",{className:"c-blue current",onClick:function(){Lt({show:!0,type:1,active:e})}},"申诉"),t.can_reply&&S.a.createElement("span",{className:"c-blue current ml10",onClick:function(){return Lt({show:!0,type:0,active:e})}},"回复"),!t.can_reply&&S.a.createElement("span",{className:"c-light-black ml10"},"失效"))))),S.a.createElement(c.a,{span:24},t.content&&S.a.createElement(z.a,{value:t.content}),!t.content&&S.a.createElement("span",{className:"c-light-black"},"暂未写评语"),null==t||null===(r=t.attachments)||void 0===r?void 0:r.map((function(t,e){return S.a.createElement("div",{key:e},S.a.createElement("a",{href:"".concat(R.a.API_SERVER).concat(t.url),onClick:function(){var e=Object(d.a)(b.a.mark((function e(r){var i;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.preventDefault(),"txt"!==t.file_type){e.next=6;break}return e.next=4,Object(N.a)(t.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:i=e.sent,te.current=i;case 6:Qt({type:t.file_type,content:window.location.origin+t.url});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},S.a.createElement("span",{className:"iconfont icon-fujian c-green font14"}),S.a.createElement("span",{className:"ml10 c-black"},t.title),S.a.createElement("span",{className:"c-light-black ml20 font12"},t.filesize),S.a.createElement("span",{className:"ml10 c-light-primary current",onClick:function(e){e.preventDefault(),Object(W.v)("","".concat(R.a.API_SERVER).concat(t.url))}},"下载"),S.a.createElement("span",{className:"ml10 c-green-29b current",onClick:function(){var e=Object(d.a)(b.a.mark((function e(r){var i;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.preventDefault(),"txt"!==t.file_type){e.next=6;break}return e.next=4,Object(N.a)(t.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:i=e.sent,te.current=i;case 6:Qt({type:t.file_type,content:window.location.origin+t.url});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},"预览")))}))),""!=t.journals&&S.a.createElement("div",{className:"w100"},S.a.createElement(o.a,null),S.a.createElement("aside",{className:[G.a.comment,"w100"].join(" ")},t.journals.map((function(t,e){var r,n;return S.a.createElement("aside",{key:e},S.a.createElement(l.a,{key:e},S.a.createElement(c.a,{span:24},S.a.createElement(l.a,null,S.a.createElement(c.a,{flex:"50px"},S.a.createElement("img",{className:G.a.headpic,width:"40",src:"".concat(R.a.IMG_SERVER,"/images/").concat(null==t||null===(r=t.user_info)||void 0===r?void 0:r.user_image_url)})),S.a.createElement(c.a,{flex:"1"},null==t||null===(n=t.user_info)||void 0===n?void 0:n.user_name,S.a.createElement("span",{className:"c-light-black ml10"},O()(null==t?void 0:t.time).format("YYYY-MM-DD HH:mm")),S.a.createElement("br",null),S.a.createElement("strong",null,S.a.createElement(z.a,{value:t.content}))),S.a.createElement(c.a,null,S.a.createElement(i.a,{title:"删除"},S.a.createElement(T.a,{className:"current c-light-black",onClick:function(){var e,r;e=t,_t.confirm({title:"是否确认删除?",onOk:(r=Object(d.a)(b.a.mark((function t(){return b.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ht({type:"shixunHomeworks/deleteReply",payload:{object_id:e.id,object_type:"journals_for_message"}});case 2:0===t.sent.status&&(h.b.success("删除成功"),ee());case 4:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})})}})))))),S.a.createElement(o.a,null))}))))),Tt&&0===e&&S.a.createElement("aside",{className:["bg-white"].join(" ")},S.a.createElement(A.a,{onChange:function(t){kt(t)},height:150,isFocus:!0,watch:!0}),S.a.createElement(l.a,null,S.a.createElement(c.a,{span:24,className:"tr"},S.a.createElement(n.a,{type:"default",size:"large",onClick:Object(d.a)(b.a.mark((function t(){return b.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Lt(!1);case 1:case"end":return t.stop()}}),t)})))},"取消"),S.a.createElement(n.a,{type:"primary",size:"large",className:"ml20",onClick:Object(d.a)(b.a.mark((function e(){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==Ct){e.next=4;break}h.b.error("请输入内容"),e.next=8;break;case 4:return e.next=6,Object(M.f)({comment:Ct,userId:dt.userId,score_id:t.score_id});case 6:0===e.sent.status&&(h.b.success("操作成功"),Lt(!1),ee());case 8:case"end":return e.stop()}}),e)})))},"保存")))))),S.a.createElement(o.a,null))})))),S.a.createElement(F,null),S.a.createElement(j,null),S.a.createElement(L.a,null),S.a.createElement(g.a,{title:"确认打回重做",visible:Wt,destroyOnClose:!0,forceRender:!0,onCancel:function(){Vt(!1)},onOk:Object(d.a)(b.a.mark((function t(){var e;return b.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Yt){t.next=3;break}return h.b.info("评语不能为空"),t.abrupt("return");case 3:return t.next=5,Object(N.a)("/api/student_works/".concat(dt.userId,"/redo_modal.json"),{method:"post",body:{comment:Yt,id:dt.userId}});case 5:0===(null==(e=t.sent)?void 0:e.status)&&(h.b.info("打回重做成功"),Vt(!1),ee());case 7:case"end":return t.stop()}}),t)}))),width:700},S.a.createElement("div",{style:{padding:"32px"}},S.a.createElement("span",null,"确认将",null==gt?void 0:gt.author_name,"的作业打回重做吗"),S.a.createElement("div",{style:{marginTop:"20px"}},S.a.createElement("label",null,S.a.createElement("span",{style:{marginRight:"5px",color:"red"}},"*"),"评语:"),S.a.createElement(A.a,{className:G.a.MdEditor,onChange:function(t){return Xt(t)},defaultValue:"",height:250})))),Ot,S.a.createElement(V.a,{close:!0,data:null==Jt?void 0:Jt.content,type:null==Jt?void 0:Jt.type,hasMask:!0,monacoEditor:{value:te.current,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onClose:function(){return Qt({content:"",type:""})}}))}))},"T/ev": +/*!****************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/GroupHomework/Review/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___YeRn8",flex_space_between:"flex_space_between___1Koq4",flex_box_vertical_center:"flex_box_vertical_center___iwltW",flex_box_center_end:"flex_box_center_end___Wt8Ci",flex_box_column:"flex_box_column___1_Hpq",bg:"bg___DLoEi",title:"title___Rt3xF",replyList:"replyList___1-Na2",leader:"leader___2AO79",buttonFixed:"buttonFixed___LfzzJ",exitComment:"exitComment___1F28w",nextComment:"nextComment___3Jkyg",modal:"modal___1isyX",MdEditor:"MdEditor___3xy6-"}},"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),a=/Edge\/(\d+)/.exec(t),s=i||n||a,o=s&&(i?document.documentMode||6:+(a||n)[1]),l=!a&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!a&&/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=!a&&/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)),k=r||s&&o>=9;function w(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var E,T=function(t,e){var r=t.className,i=w(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 a=0;a=e)return s+(e-a);s+=o-a,s+=r-s%r,a=o+1}}g?P=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:s&&(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(s,e-n);if(n+=a-i,i=a+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()||J.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&Q(t))||e.test(t):Q(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,a=i<0?Math.ceil(n):Math.floor(n);if(a==e)return t(a)?e:r;t(a)?r=a:e=a+i}}var st=null;function ot(t,e,r){var i;st=null;for(var n=0;ne)return n;a.to==e&&(a.from!=a.to&&"before"==r?i=n:st=n),a.from==e&&(a.from!=a.to&&"before"!=r?i=n:st=n)}return null!=i?i:st}var lt=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,r=/[LRr]/,i=/[Lb1n]/,n=/[1n]/;function a(t,e,r){this.level=t,this.from=e,this.to=r}return function(s,o){var l="ltr"==o?"L":"R";if(0==s.length||"ltr"==o&&!t.test(s))return!1;for(var c,u=s.length,h=[],d=0;d-1&&(i[e]=n.slice(0,a).concat(n.slice(a+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 kt(t){return t.target||t.srcElement}function wt(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(s&&o<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&&!(s&&o<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 _t,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 a=t.slice(e,"\r"==t.charAt(n-1)?n-1:n),s=a.indexOf("\r");-1!=s?(r.push(a.slice(0,s)),e+=s+1):(r.push(a),e=n+1)}return r}:function(t){return t.split(/\r\n?|\n/)},Rt=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(_t=D("div"))||(_t.setAttribute("oncopy","return;"),"function"==typeof _t.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 a in n)n.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=n[a])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)i[s]=e.modeProps[s];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],a=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],a={};xe(t,e.text,t.doc.mode,r,(function(t,e){return n.push(t,e)}),a,i);for(var s=r.state,o=function(i){r.baseTokens=n;var o=t.state.overlays[i],l=1,c=0;r.state=!0,xe(t,e.text,o.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(o.opaque)n.splice(r,l-r,t,"overlay "+e),l=r+2;else for(;rt.options.maxHighlightLength&&Gt(t.doc.mode,i.state),a=he(t,e,i);n&&(i.state=n),e.stateAfter=i.save(!n),e.styles=a.styles,a.classes?e.styleClasses=a.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 a=function(t,e,r){for(var i,n,a=t.doc,s=r?-1:e-(t.doc.mode.innerMode?1e3:100),o=e;o>s;--o){if(o<=a.first)return a.first;var l=Kt(a,o-1),c=l.stateAfter;if(c&&(!r||o+(c instanceof ce?c.lookAhead:0)<=a.modeFrontier))return o;var u=B(l.text,null,t.options.tabSize);(null==n||i>u)&&(n=o-1,i=u)}return n}(t,e,r),s=a>i.first&&Kt(i,a-1).stateAfter,o=s?ue.fromSaved(i,s,a):new ue(i,Wt(i.mode),a);return i.iter(a,e,(function(r){pe(t,r.text,o);var i=o.line;r.stateAfter=i==e-1||i%5==0||i>=n.viewFrom&&ie.start)return a}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,a,s=t.doc,o=s.mode,l=Kt(s,(e=oe(s,e)).line),c=fe(t,e.line,r),u=new Vt(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(o=!1,s&&pe(t,e,i,h.pos),h.pos=e.length,l=null):l=be(me(r,h,i.state,d),a),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!o||u!=l){for(;c=e:a.to>e);(i||(i=[])).push(new ke(s,a.from,o?null:a.to))}}return i}(r,n,s),l=function(t,e,r){var i;if(t)for(var n=0;n=e:a.to>e)||a.from==e&&"bookmark"==s.type&&(!r||a.marker.insertLeft)){var o=null==a.from||(s.inclusiveLeft?a.from<=e:a.from0&&o)for(var b=0;be)&&(!r||Re(r,a.marker)<0)&&(r=a.marker)}return r}function Fe(t,e,r,i,n){var a=Kt(t,e),s=Ce&&a.markedSpans;if(s)for(var o=0;o=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=_("span",null,null,l?"padding-right: .1px":null),i={pre:_("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 a=n?e.rest[n-1]:e.line,s=void 0;i.pos=0,i.addToken=Qe,Dt(t.display.measure)&&(s=ct(a,t.doc.direction))&&(i.addToken=tr(i.addToken,s)),i.map=[],rr(a,i,de(t,a,e!=t.display.externalMeasured&&$t(a))),a.styleClasses&&(a.styleClasses.bgClass&&(i.bgClass=M(a.styleClasses.bgClass,i.bgClass||"")),a.styleClasses.textClass&&(i.textClass=M(a.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 o=i.content.lastChild;(/\bcm-tab\b/.test(o.className)||o.querySelector&&o.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 Je(t){var e=D("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Qe(t,e,r,i,n,a,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,a,s,o,l);t(r,i.slice(0,h.to-c),n,a,null,o,l),a=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,a=0;if(i)for(var s,o,l,c,u,h,d,f=n.length,p=0,g=1,m="",v=0;;){if(v==p){l=c=u=o="",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&&(o=(o?o+";":"")+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 k in C.attributes)(d||(d={}))[k]=C.attributes[k];C.collapsed&&(!h||Re(h.marker,C)<0)&&(h=S)}else S.from>p&&v>S.from&&(v=S.from)}if(b)for(var w=0;w=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,s?s+l:l,u,p+A.length==v?c:"",o,d)}if(L>=T){m=m.slice(T-p),p=T;break}p=L,u=""}m=n.slice(a,a=r[g++]),s=$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 Rr(t,Or(t,e),r,i)}function _r(t,e){if(e>=t.display.viewFrom&&e=r.lineN&&e2&&a.push((l.bottom+c.top)/2-r.top)}}a.push(r.bottom-r.top)}}(t,e.view,e.rect),e.hasHeights=!0),(a=function(t,e,r,i){var n,a=Pr(e.map,r,i),l=a.node,c=a.start,u=a.end,h=a.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&it(e.line.text.charAt(a.coverStart+c));)--c;for(;a.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(s&&o<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=(a=l-o)-1,e>=l&&(s="right")),null!=n){if(i=t[c+2],o==l&&r==(i.insertLeft?"left":"right")&&(s=r),"left"==r&&0==n)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)i=t[2+(c-=3)],s="left";if("right"==r&&n==l-o)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"),!o)return s("before"==c?l-1:l,"before"==c);function u(t,e,r){return s(r?t-1:t,1==o[e].level!=r)}var h=ot(o,l,c),d=st,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=oe(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 a=te(t,e,r);return a.xRel=n,i&&(a.outside=i),a}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),a=i.first+i.size-1;if(n>a)return Yr(i.first+i.size-1,Kt(i,a).text.length,null,1,1);e<0&&(e=0);for(var s=Kt(i,n);;){var o=Qr(t,s,n,e,r),l=Ne(s,o.ch+(o.xRel>0||o.outside>0?1:0));if(!l)return o;var c=l.find(1);if(c.line==n)return c;s=Kt(i,n=c.line)}}function $r(t,e,r,i){i-=Gr(e);var n=e.text.length,a=at((function(e){return Rr(t,r,e-1).bottom<=i}),n,0);return{begin:a,end:n=at((function(e){return Rr(t,r,e).top>i}),a,n)}}function Zr(t,e,r,i){return r||(r=Or(t,e)),$r(t,e,r,zr(t,e,Rr(t,r,i),"line").top)}function Jr(t,e,r,i){return!(t.bottom<=r)&&(t.top>r||(i?t.left:t.right)>e)}function Qr(t,e,r,i,n){n-=ze(e);var a=Or(t,e),s=Gr(e),o=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,a,u,i,n);o=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,g=null,m=at((function(e){var r=Rr(t,a,e);return r.top+=s,r.bottom+=s,!!Jr(r,i,n,!1)&&(r.top<=n&&r.left<=i&&(p=e,g=r),!0)}),o,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,a,s){var o=at((function(o){var l=n[o],c=1!=l.level;return Jr(Kr(t,te(r,c?l.to:l.from,c?"before":"after"),"line",e,i),a,s,!0)}),0,n.length-1),l=n[o];if(o>0){var c=1!=l.level,u=Kr(t,te(r,c?l.from:l.to,c?"after":"before"),"line",e,i);Jr(u,a,s,!0)&&u.top>s&&(l=n[o-1])}return l}function ei(t,e,r,i,n,a,s){var o=$r(t,e,i,s),l=o.begin,c=o.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=Rr(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,a=e.gutters.firstChild,s=0;a;a=a.nextSibling,++s){var o=t.display.gutterSpecs[s].className;r[o]=a.offsetLeft+a.clientLeft+n,i[o]=a.clientWidth}return{fixedPos:ai(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:r,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function ai(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function si(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 a=0;if(n.widgets)for(var s=0;s0&&(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((a-wr(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 a=fi(t,r,r+i,1);a?(n.view=n.view.slice(a.index),n.viewFrom=a.lineN,n.viewTo+=i):di(t)}else if(r>=n.viewTo){var s=fi(t,e,e,-1);s?(n.view=n.view.slice(0,s.index),n.viewTo=s.lineN):di(t)}else{var o=fi(t,e,e,-1),l=fi(t,r,r+i,1);o&&l?(n.view=n.view.slice(0,o.index).concat(nr(t,o.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 a=i.view[ci(t,e)];if(null!=a.node){var s=a.changes||(a.changes=[]);-1==U(s,r)&&s.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,a=ci(t,e),s=t.display.view;if(!Ce||r==t.doc.first+t.doc.size)return{index:a,lineN:r};for(var o=t.display.viewFrom,l=0;l0){if(a==s.length-1)return null;n=o+s[a].size-e,a++}else n=o-e;e+=n,r+=n}for(;je(t.doc,r)!=r;){if(a==(i<0?0:s.length-1))return null;r+=i*s[a-(i<0?1:0)].size,a+=i}return{index:a,lineN:r}}function pi(t){for(var e=t.display.view,r=0,i=0;i=t.display.viewTo||o.to().linee||e==r&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,r),1==s.level?"rtl":"ltr",a),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 k=(c?x:b)&&C,w=(c?b:x)&&S?o:(m?v:y).left,E=k?l:(m?y:v).right;u(w,v.top,E-w,v.bottom)}else{var T,L,A,D;m?(T=c&&b&&S?o:v.left,L=c?l:p(t,n,"before"),A=c?o:p(e,n,"after"),D=c&&x&&C?l:y.right):(T=c?p(t,n,"before"):o,L=!c&&b&&S?l:v.right,A=!c&&x&&C?o: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()||wi(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(),ki(t))}function Ci(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,wi(t))}),100)}function ki(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 wi(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=s&&(a=Zt(e,ze(Kt(e,l))-t.wrapper.clientHeight),s=l)}return{from:a,to:Math.max(s,a+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,a=Lr(t),s={};e.bottom-e.top>a&&(e.bottom=e.top+a);var o=t.doc.height+kr(r),l=e.topo-i;if(e.topn+a){var u=Math.min(e.top,(c?o:e.bottom)-a);u!=n&&(s.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?s.scrollLeft=0:e.leftf+d-3&&(s.scrollLeft=e.right+(p?0:10)-f),s}function Di(t,e){null!=e&&(Ri(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function _i(t){Ri(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||Ri(t),null!=e&&(t.curOp.scrollLeft=e),null!=r&&(t.curOp.scrollTop=r)}function Ri(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+kr(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,s&&o<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 a=t.viewWidth-t.barLeft-(r?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+a)+"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,ar?ar.ops.push(e):e.ownsGroup=ar={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 an(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Yi(t){t.updatedDisplay=t.mustUpdate&&sn(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 a=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(a),a.scrollIntoView(n),t.display.lineSpace.removeChild(a)}}}(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 a=0;a<5;a++){var s=!1,o=Kr(t,e),l=r&&r!=e?Kr(t,r):o,c=Ai(t,n={left:Math.min(o.left,l.left),top:Math.min(o.top,l.top)-i,right:Math.max(o.left,l.left),bottom:Math.max(o.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&&(s=!0)),null!=c.scrollLeft&&(Ni(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return n}(e,oe(i,t.scrollToPos.from),oe(i,t.scrollToPos.to),t.scrollToPos.margin));var n=t.maybeHiddenMarkers,a=t.maybeUnhiddenMarkers;if(n)for(var s=0;s=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(a){if(i.line>=t.display.viewFrom){var s=a.styles,o=a.text.length>t.options.maxHighlightLength?Gt(e.mode,i.state):null,l=he(t,a,i,!0);o&&(i.state=o),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var h=!s||s.length!=a.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&&Ji(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,a=Math.max(e.visible.from-t.options.viewportMargin,i.first),s=Math.min(n,e.visible.to+t.options.viewportMargin);r.viewFroms&&r.viewTo-s<20&&(s=Math.min(n,r.viewTo)),Ce&&(a=je(t.doc,a),s=Ue(t.doc,s));var o=a!=r.viewFrom||s!=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,a,s),r.viewOffset=ze(Kt(t.doc,r.viewFrom)),t.display.mover.style.top=r.viewOffset+"px";var c=pi(t);if(!o&&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=R();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,a=i.lineDiv,s=a.firstChild;function o(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(Qt(t.options,u)))),s=d.node.nextSibling}else{var p=mr(t,d,u,r);a.insertBefore(p,s)}u+=d.size}for(;s;)s=o(s)}(t,r.updateLineNumbers,e.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(t){if(t&&t.activeElt&&t.activeElt!=R()&&(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,o&&(r.lastWrapHeight=e.wrapperHeight,r.lastWrapWidth=e.wrapperWidth,rn(t,400)),r.updateLineNumbers=null,!0}function on(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+kr(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(!sn(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 an(t,e);if(sn(t,r)){Ei(t),on(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=ai(e)-e.scroller.scrollLeft+t.doc.scrollLeft,n=e.gutters.offsetWidth,a=i+"px",s=0;so.clientWidth,u=o.scrollHeight>o.clientHeight;if(n&&c||a&&u){if(a&&y&&l)t:for(var d=e.target,f=s.view;d!=o;d=d.parentNode)for(var p=0;p=0&&ee(t,i.to())<=0)return r}return-1};var kn=function(t,e){this.anchor=t,this.head=e};function wn(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 a=1;a0:l>=0){var c=ae(o.from(),s.from()),u=ne(o.to(),s.to()),h=o.empty()?s.from()==s.head:o.from()==o.head;a<=r&&--r,e.splice(--a,2,new kn(h?u:c,h?c:u))}}return new Cn(e,r)}function En(t,e){return new Cn([new kn(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(o.line+1,p-1),t.insert(o.line+1,v)}or(t,"change",t,e)}function Mn(t,e,r){!function t(i,n,a){if(i.linked)for(var s=0;so-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(a=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)))s=Y(a.changes),0==ee(e.from,e.to)&&0==ee(e.from,s.to)?s.to=Tn(e):a.changes.push(Bn(t,e));else{var l=Y(n.done);for(l&&l.ranges||Gn(t.sel,n.done),a={changes:[Bn(t,e)],generation:n.generation},n.done.push(a);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=o,n.lastOp=n.lastSelOp=i,n.lastOrigin=n.lastSelOrigin=e.origin,s||pt(t,"historyAdded")}function Hn(t,e,r,i){var n=t.history,a=i&&i.origin;r==n.lastSelOp||a&&n.lastSelOrigin==a&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==a||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,a,Y(n.done),e))?n.done[n.done.length-1]=e:Gn(e,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=a,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],a=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]={}))[a]=r.markedSpans),++a}))}function Wn(t){if(!t)return null;for(var e,r=0;r-1&&(Y(o)[h]=c[h],delete c[h])}}}return i}function qn(t,e,r,i){if(i){var n=t.anchor;if(r){var a=ee(e,n)<0;a!=ee(r,n)<0?(n=e,e=r):a!=ee(e,r)<0&&(e=r)}return new kn(n,e)}return new kn(r||e,e)}function Yn(t,e,r,i,n){null==n&&(n=t.cm&&(t.cm.display.shift||t.extend)),Qn(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),a=0;a=e.ch:o.to>e.ch))){if(n&&(pt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--s;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=sa(t,h,-i,h&&h.line==e.line?a:null)),h&&h.line==e.line&&(d=ee(h,r))&&(i<0?d<0:d>0))return na(t,h,e,i,n)}var f=l.find(i<0?-1:1);return(i<0?c:u)&&(f=sa(t,f,i,f.line==e.line?a:null)),f?na(t,f,e,i,n):null}}return e}function aa(t,e,r,i,n){var a=i||1,s=na(t,e,r,a,n)||!n&&na(t,e,r,a,!0)||na(t,e,r,-a,n)||!n&&na(t,e,r,-a,!0);return s||(t.cantEdit=!0,te(t.first,0))}function sa(t,e,r,i){return r<0&&0==e.ch?e.line>t.first?oe(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,o.from),d=ee(c.to,o.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:o.from}),(d>0||!s.inclusiveRight&&!d)&&u.push({from:o.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)ua(t,{from:i[n].from,to:i[n].to,text:n?[""]:e.text,origin:e.origin});else ua(t,e)}}function ua(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),fa(t,e,r,Te(t,e));var i=[];Mn(t,(function(t,r){r||-1!=U(i,t.history)||(va(t.history,e),i.push(t.history)),fa(t,e,null,Te(t,e))}))}}function ha(t,e,r){var i=t.cm&&t.cm.state.suppressEdits;if(!i||r){for(var n,a=t.history,s=t.sel,o="undo"==e?a.done:a.undone,l="undo"==e?a.undone:a.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function da(t,e){if(0!=e&&(t.first+=e,t.sel=new Cn(X(t.sel.ranges,(function(t){return new kn(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.linea&&(e={from:e.from,to:te(a,Kt(t,a).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,a=e.from,s=e.to,o=!1,l=a.line;t.options.lineWrapping||(l=$t(Be(Kt(i,a.line))),i.iter(l,s.line+1,(function(t){if(t==n.maxLine)return o=!0,!0}))),i.sel.contains(e.from,e.to)>-1&&mt(t),In(i,e,r,si(t)),t.options.lineWrapping||(i.iter(l,a.line+e.text.length,(function(t){var e=We(t);e>n.maxLineLength&&(n.maxLine=t,n.maxLineLength=e,n.maxLineChanged=!0,o=!1)})),o&&(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 ba))){var o=[];this.collapse(o),this.children=[new ba(o)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var s=n.lines.length%25+25,o=s;o10);t.parent.maybeSpill()}},iterN:function(t,e,r){for(var i=0;i0||0==s&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=_("span",[a.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Fe(t,e.line,e,r,a)||e.line!=r.line&&Fe(t,r.line,e,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ce=!0}a.addToHistory&&Un(t,{from:e,to:r,origin:"markText"},t.sel,NaN);var o,l=e.line,c=t.cm;if(t.iter(l,r.line+1,(function(t){c&&a.collapsed&&!c.options.lineWrapping&&Be(t)==c.display.maxLine&&(o=!0),a.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 ke(a,l==e.line?e.ch:null,l==r.line?r.ch:null)),++l})),a.collapsed&&t.iter(e.line,r.line+1,(function(e){He(t,e)&&Xt(e,0)})),a.clearOnEnter&&ht(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(Se=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),a.collapsed&&(a.id=++ka,a.atomic=!0),c){if(o&&(c.curOp.updateMaxLine=!0),a.collapsed)ui(c,e.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=e.line;u<=r.line;u++)hi(c,u,"text");a.atomic&&ra(c.doc),or(c,"markerAdded",c,a)}return a}wa.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&&or(this,"clear",r.from,r.to)}for(var i=null,n=null,a=0;at.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&&ra(t.doc)),t&&or(t,"markerCleared",t,this,i,n),e&&Ki(t),this.parent&&this.parent.clear()}},wa.prototype.find=function(t,e){var r,i;null==t&&"bookmark"==this.type&&(t=1);for(var n=0;n=0;l--)ca(this,i[l]);o?Jn(this,o):this.cm&&_i(this.cm)})),undo:en((function(){ha(this,"undo")})),redo:en((function(){ha(this,"redo")})),undoSelection:en((function(){ha(this,"undo",!0)})),redoSelection:en((function(){ha(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=oe(this,t),e=oe(this,e);var i=[],n=t.line;return this.iter(t.line,e.line+1,(function(a){var s=a.markedSpans;if(s)for(var o=0;o=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-=a,++r})),oe(this,te(r,e))},indexFromPos:function(t){var e=(t=oe(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()),ta(e.doc,En(r,r)),d)for(var f=0;f=0;e--)pa(t.doc,"",i[e].from,i[e].to,"+delete");_i(t)}))}function Za(t,e,r){var i=nt(t.text,e+r,r);return i<0||i>t.text.length?null:i}function Ja(t,e,r){var i=Za(t,e.ch,r);return null==i?null:new te(e.line,i,r<0?"after":"before")}function Qa(t,e,r,i,n){if(t){"rtl"==e.doc.direction&&(n=-n);var a=ct(r,e.doc.direction);if(a){var s,o=n<0?Y(a):a[0],l=n<0==(1==o.level)?"after":"before";if(o.level>0||"rtl"==e.doc.direction){var c=Or(e,r);s=n<0?r.text.length-1:0;var u=Rr(e,c,s).top;s=at((function(t){return Rr(e,c,t).top==u}),n<0==(1==o.level)?o.from:o.to-1,s),"before"==l&&(s=Za(r,s,1))}else s=n<0?o.to:o.from;return new te(i,s,l)}}return new te(i,n<0?r.text.length:0,n<0?"before":"after")}Ga.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"},Ga.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"},Ga.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"},Ga.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"]},Ga.default=y?Ga.macDefault:Ga.pcDefault;var ts={selectAll:oa,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),G)},killLine:function(t){return $a(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(a.charAt(n.ch-1)+a.charAt(n.ch-2),te(n.line,n.ch-2),n,"+transpose");else if(n.line>t.doc.first){var s=Kt(t.doc,n.line-1).text;s&&(n=new te(n.line,1),t.replaceRange(a.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),te(n.line-1,s.length-1),n,"+transpose"))}r.push(new kn(n,n))}t.setSelections(r)}))},newlineAndIndent:function(t){return Ji(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,a=!1,c=Qi(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),a||(bt(e),i.addNew||Yn(t.doc,r,null,null,i.extend),l&&!d||s&&9==o?setTimeout((function(){n.wrapper.ownerDocument.body.focus({preventScroll:!0}),n.input.focus()}),20):n.input.focus())})),u=function(t){a=a||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return a=!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,a):function(t,e,r,i){var n=t.display,a=t.doc;bt(e);var s,o,l=a.sel,c=l.ranges;if(i.addNew&&!i.extend?(o=a.sel.contains(r),s=o>-1?c[o]:new kn(r,r)):(s=a.sel.primary(),o=a.sel.primIndex),"rectangle"==i.unit)i.addNew||(s=new kn(r,r)),r=li(t,e,!0,!0),o=-1;else{var u=ms(t,r,i.unit);s=i.extend?qn(s,u.anchor,u.head,i.extend):u}i.addNew?-1==o?(o=c.length,Qn(a,wn(t,c.concat([s]),o),{scroll:!1,origin:"*mouse"})):c.length>1&&c[o].empty()&&"char"==i.unit&&!i.extend?(Qn(a,wn(t,c.slice(0,o).concat(c.slice(o+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):$n(a,o,s,z):(o=0,Qn(a,new Cn([s],0),z),l=a.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(a,r.line).text,r.ch,c),d=B(Kt(a,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(a,g).text,y=V(v,f,c);f==p?n.push(new kn(te(g,y),te(g,y))):v.length>y&&n.push(new kn(te(g,y),te(g,V(v,p,c))))}n.length||n.push(new kn(r,r)),Qn(a,wn(t,l.ranges.slice(0,o).concat(n),o),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=s,S=ms(t,e,i.unit),C=x.anchor;ee(S.anchor,C)>0?(b=S.head,C=ae(x.from(),S.anchor)):(b=S.anchor,C=ne(x.to(),S.head));var k=l.ranges.slice(0);k[o]=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 a=ct(n);if(!a)return e;var s=ot(a,r.ch,r.sticky),o=a[s];if(o.from!=r.ch&&o.to!=r.ch)return e;var l,c=s+(o.from==r.ch==(1!=o.level)?0:1);if(0==c||c==a.length)return e;if(i.line!=r.line)l=(i.line-r.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=ot(a,i.ch,i.sticky),h=u-s||(i.ch-r.ch)*(1==o.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=a[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 kn(new te(r.line,p,g),i)}(t,new kn(oe(a,C),b)),Qn(a,wn(t,k,o),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),a.history.lastSelOrigin=null}var m=Qi(t,(function(e){0!==e.buttons&&wt(e)?function e(r){var s=++p,o=li(t,r,!0,"rectangle"==i.unit);if(o)if(0!=ee(o,h)){t.curOp.focus=R(),d(o);var l=Li(n,a);(o.line>=l.to||o.linef.bottom?20:0;c&&setTimeout(Qi(t,(function(){p==s&&(n.scroller.scrollTop+=c,e(r))})),50)}}(e):g(e)})),v=Qi(t,g);t.state.selectingText=v,ht(n.wrapper.ownerDocument,"mousemove",m),ht(n.wrapper.ownerDocument,"mouseup",v)}(t,i,e,a)}(e,i,a,t):kt(t)==r.scroller&&bt(t):2==n?(i&&Yn(e.doc,i),setTimeout((function(){return r.input.focus()}),20)):3==n&&(k?e.display.input.onContextMenu(t):Ci(e)))}}function ms(t,e,r){if("char"==r)return new kn(e,e);if("word"==r)return t.findWordAt(e);if("line"==r)return new kn(te(e.line,0),oe(t.doc,te(e.line+1,0)));var i=r(t,e);return new kn(i.from,i.to)}function vs(t,e,r,i){var n,a;if(e.touches)n=e.touches[0].clientX,a=e.touches[0].clientY;else try{n=e.clientX,a=e.clientY}catch(t){return!1}if(n>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&bt(e);var s=t.display,o=s.lineDiv.getBoundingClientRect();if(a>o.bottom||!vt(t,r))return St(e);a-=o.top-s.viewOffset;for(var l=0;l=n)return pt(t,r,t,Zt(t.doc,a),t.display.gutterSpecs[l].className,e),St(e)}}function ys(t,e){return vs(t,e,"gutterClick",!0)}function bs(t,e){Sr(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&vs(t,e,"gutterContextMenu",!1)}(t,e)||gt(t,e,"contextmenu")||k||t.display.input.onContextMenu(e)}function xs(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)}ps.prototype.compare=function(t,e,r){return this.time+400>t&&0==ee(e,this.pos)&&r==this.button};var Ss={toString:function(){return"CodeMirror.Init"}},Cs={},ks={};function ws(t,e,r){if(!e!=!(r&&r!=Ss)){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 Es(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)),oi(t),ui(t),jr(t),setTimeout((function(){return Ui(t)}),100)}function Ts(t,e){var r=this;if(!(this instanceof Ts))return new Ts(t,e);this.options=e=e?F(e):{},F(Cs,e,!1);var i=e.value;"string"==typeof i?i=new _a(i,e.mode,null,e.lineSeparator,e.direction):e.mode&&(i.modeOption=e.mode),this.doc=i;var n=new Ts.inputStyles[e.inputStyle](this),a=this.display=new mn(t,i,n,e);for(var c in a.wrapper.CodeMirror=this,xs(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&&a.input.focus(),s&&o<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),function(t){var e=t.display;ht(e.scroller,"mousedown",Qi(t,gs)),ht(e.scroller,"dblclick",s&&o<11?Qi(t,(function(e){if(!gt(t,e)){var r=li(t,e);if(r&&!ys(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 bs(t,e)})),ht(e.input.getField(),"contextmenu",(function(r){e.scroller.contains(r.target)||bs(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 a(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)&&!ys(t,n)){e.input.ensurePolled(),clearTimeout(r);var a=+new Date;e.activeTouch={start:a,moved:!1,prev:a-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 s,o=t.coordsChar(e.activeTouch,"page");s=!i.prev||a(i,i.prev)?new kn(o,o):!i.prev.prev||a(i,i.prev.prev)?t.findWordAt(o):new kn(te(o.line,0),oe(t.doc,te(o.line+1,0))),t.setSelection(s.anchor,s.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(s&&(!t.state.draggingText||+new Date-Oa<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:Qi(t,Ra),leave:function(e){gt(t,e)||Ia(t)}};var l=e.input.getField();ht(l,"keyup",(function(e){return us.call(t,e)})),ht(l,"keydown",Qi(t,cs)),ht(l,"keypress",Qi(t,hs)),ht(l,"focus",(function(e){return ki(t,e)})),ht(l,"blur",(function(e){return wi(t,e)}))}(this),Na(),Vi(this),this.curOp.forceUpdate=!0,Pn(this,i),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&ki(r)}),20):wi(this),ks)ks.hasOwnProperty(c)&&ks[c](this,e[c],Ss);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>a.first?B(Kt(a,e-1).text,null,s):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/s);f;--f)d+=s,h+="\t";if(ds,l=Ot(e),c=null;if(o&&i.ranges.length>1)if(Ds&&Ds.text.join("\n")==e){if(i.ranges.length%Ds.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&&!o?g=te(g.line,Math.min(Kt(a,g.line).text.length,g.ch+Y(l).length)):o&&Ds&&Ds.lineWise&&Ds.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||(o?"paste":t.state.cutIncoming>s?"cut":"+input")};ca(t.doc,m),or(t,"inputRead",t,m)}e&&!o&&Is(t,e),_i(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Rs(t,e){var r=t.clipboardData&&t.clipboardData.getData("Text");if(r)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Ji(e,(function(){return Os(e,r,0,null,"paste")})),!0}function Is(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 a=t.getModeAt(n.head),s=!1;if(a.electricChars){for(var o=0;o-1){s=As(t,n.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Kt(t.doc,n.head.line).text.slice(0,n.head.ch))&&(s=As(t,n.head.line,"smart"));s&&or(t,"electricInput",t,n.head.line)}}}function Ms(t){for(var e=[],r=[],i=0;i0?0:-1));s=isNaN(u)?null:new te(e.line,Math.max(0,Math.min(o.text.length,e.ch+r*(u>=55296&&u<56320?2:1))),-r)}else s=n?function(t,e,r,i){var n=ct(e,t.doc.direction);if(!n)return Ja(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 a=ot(n,r.ch,r.sticky),s=n[a];if("ltr"==t.doc.direction&&s.level%2==0&&(i>0?s.to>r.ch:s.from=s.from&&d>=u.begin)){var f=h?"before":"after";return new te(r.line,d,f)}}var p=function(t,e,i){for(var a=function(t,e){return e?new te(r.line,l(t,1),"before"):new te(r.line,t,"after")};t>=0&&t0==(1!=s.level),c=o?i.begin:l(i.end,-1);if(s.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,o,e,r):Ja(o,e,r);if(null==s){if(a||(c=e.line+l)=t.first+t.size||(e=new te(c,e.ch,e.sticky),!(o=Kt(t,c))))return!1;e=Qa(n,t.cm,o,e.line,l)}else e=s;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=o.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=aa(t,e,a,s,!0);return re(a,m)&&(m.hitSide=!0),m}function Bs(t,e,r,i){var n,a,s=t.doc,o=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(;(a=Xr(t,o,n)).outside;){if(r<0?n<=0:n>=s.height){a.hitSide=!0;break}n+=5*r}return a}var js=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 Us(t,e){var r=_r(t,e.line);if(!r||r.hidden)return null;var i=Kt(t.doc,e.line),n=Ar(r,i,e.line),a=ct(i,t.doc.direction),s="left";a&&(s=ot(a,e.ch)%2?"right":"left");var o=Pr(n.map,e.ch,s);return o.offset="right"==o.collapse?o.end:o.start,o}function Hs(t,e){return e&&(t.bad=!0),t}function Gs(t,e,r){var i;if(e==t.display.lineDiv){if(!(i=t.display.lineDiv.childNodes[r]))return Hs(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||a.line=e.display.viewFrom&&Us(e,n)||{node:l[0].measure.map[2],offset:0},u=a.linei.firstLine()&&(s=te(s.line-1,Kt(i.doc,s.line-1).length)),o.ch==Kt(i.doc,o.line).text.length&&o.linen.viewTo-1)return!1;s.line==n.viewFrom||0==(t=ci(i,s.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,o.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 a="",s=!1,o=t.doc.lineSeparator(),l=!1;function c(){s&&(a+=o,l&&(a+=o),s=l=!1)}function u(t){t&&(c(),a+=t)}function h(e){if(1==e.nodeType){var r=e.getAttribute("cm-text");if(r)return void u(r);var a,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&&(a=f[0].find(0))&&u(qt(t.doc,a.from,a.to).join(o)))}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);fs.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)?(pa(i.doc,h,S,C,"+input"),!0):void 0},js.prototype.ensurePolled=function(){this.forceCompositionEnd()},js.prototype.reset=function(){this.forceCompositionEnd()},js.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},js.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))},js.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Ji(this.cm,(function(){return ui(t.cm)}))},js.prototype.setUneditable=function(t){t.contentEditable="false"},js.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Qi(this.cm,Os)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},js.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},js.prototype.onContextMenu=function(){},js.prototype.resetPosition=function(){},js.prototype.needsContentAttribute=!0;var Ws=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new j,this.hasSelection=!1,this.composing=null};Ws.prototype.init=function(t){var e=this,r=this,i=this.cm;this.createField(t);var n=this.textarea;function a(t){if(!gt(i,t)){if(i.somethingSelected())_s({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=Ms(i);_s({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(){s&&o>=9&&e.hasSelection&&(e.hasSelection=null),r.poll()})),ht(n,"paste",(function(t){gt(i,t)||Rs(t,i)||(i.state.pasteIncoming=+new Date,r.fastPoll())})),ht(n,"cut",a),ht(n,"copy",a),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 a=new Event("paste");a.clipboardData=e.clipboardData,n.dispatchEvent(a)}})),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)}))},Ws.prototype.createField=function(t){this.wrapper=Ns(),this.textarea=this.wrapper.firstChild},Ws.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Ws.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"),a=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,n.top+s.top-a.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,n.left+s.left-a.left))}return i},Ws.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")},Ws.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),s&&o>=9&&(this.hasSelection=r)}else t||(this.prevInput=this.textarea.value="",s&&o>=9&&(this.hasSelection=null))}},Ws.prototype.getField=function(){return this.textarea},Ws.prototype.supportsTouch=function(){return!1},Ws.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||R()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ws.prototype.blur=function(){this.textarea.blur()},Ws.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ws.prototype.receivedFocus=function(){this.slowPoll()},Ws.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},Ws.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))}))},Ws.prototype.poll=function(){var t=this,e=this.cm,r=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Rt(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(s&&o>=9&&this.hasSelection===n||y&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var a=n.charCodeAt(0);if(8203!=a||i||(i="​"),8666==a)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},Ws.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ws.prototype.onKeyPress=function(){s&&o>=9&&(this.hasSelection=null),this.fastPoll()},Ws.prototype.onContextMenu=function(t){var e=this,r=e.cm,i=r.display,n=e.textarea;e.contextMenuPending&&e.contextMenuPending();var a=li(r,t),c=i.scroller.scrollTop;if(a&&!h){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&Qi(r,Qn)(r.doc,En(a),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: "+(s?"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),s&&o>=9&&m(),k){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(),a="​"+(t?n.value:"");n.value="⇚",n.value=a,e.prevInput=t?"":"​",n.selectionStart=1,n.selectionEnd=a.length,i.selForContextMenu=r.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,n.style.cssText=d,s&&o<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=n.selectionStart)){(!s||s&&o<9)&&m();var t=0,a=function(){i.selForContextMenu==r.doc.sel&&0==n.selectionStart&&n.selectionEnd>0&&"​"==e.prevInput?Qi(r,oa)(r):t++<10?i.detectingSelectAll=setTimeout(a,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(a,200)}}},Ws.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Ws.prototype.setUneditable=function(){},Ws.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function r(r,i,n,a){t.defaults[r]=i,n&&(e[r]=a?function(t,e,r){r!=Ss&&n(t,e,r)}:n)}t.defineOption=r,t.Init=Ss,r("value","",(function(t,e){return t.setValue(e)}),!0),r("mode",null,(function(t,e){t.doc.modeOption=e,_n(t)}),!0),r("indentUnit",2,_n,!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 a=t.text.indexOf(e,n);if(-1==a)break;n=a+e.length,r.push(te(i,a))}i++}));for(var n=r.length-1;n>=0;n--)pa(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!=Ss&&t.refresh()})),r("specialCharPlaceholder",Je,(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){xs(t),gn(t)}),!0),r("keyMap","default",(function(t,e,r){var i=Xa(e),n=r!=Ss&&Xa(r);n&&n.detach&&n.detach(t,i),i.attach&&i.attach(t,n||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Es,!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?ai(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&&(wi(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,ws),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)}(Ts),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)&&Qi(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"](Xa(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,r=0;rr&&(As(this,n.head.line,t,!0),r=n.head.line,i==this.doc.sel.primIndex&&_i(this));else{var a=n.from(),s=n.to(),o=Math.max(r,a.line);r=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=o;l0&&$n(this.doc,i,new kn(a,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=oe(this.doc,t);var e,r=de(this,Kt(this.doc,t.line)),i=0,n=(r.length-1)/2,a=t.ch;if(0==a)e=r[2];else for(;;){var s=i+n>>1;if((s?r[2*s-1]:0)>=a)n=s;else{if(!(r[2*s+1]a&&(t=a,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 a,s,o,l=this.display,c=(t=Kr(this,oe(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&&(a=this,s={left:u,top:c,right:u+e.offsetWidth,bottom:c+e.offsetHeight},null!=(o=Ai(a,s)).scrollTop&&Mi(a,o.scrollTop),null!=o.scrollLeft&&Ni(a,o.scrollLeft))},triggerOnKeyDown:tn(cs),triggerOnKeyPress:tn(hs),triggerOnKeyUp:us,triggerOnMouseDown:tn(gs),execCommand:function(t){if(ts.hasOwnProperty(t))return ts[t].call(null,this)},triggerElectric:tn((function(t){Is(this,t)})),findPosH:function(t,e,r,i){var n=1;e<0&&(n=-1,e=-e);for(var a=oe(this.doc,t),s=0;s0&&s(e.charAt(r-1));)--r;for(;i.5||this.options.lineWrapping)&&oi(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,or(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,a){t.registerHelper(e,i,a),r[e]._global.push({pred:n,val:a})}}(Ts);var Vs="iter insert remove copy getEditor constructor".split(" ");for(var Ks in _a.prototype)_a.prototype.hasOwnProperty(Ks)&&U(Vs,Ks)<0&&(Ts.prototype[Ks]=function(t){return function(){return t.apply(this.doc,arguments)}}(_a.prototype[Ks]));return yt(_a),Ts.inputStyles={textarea:Ws,contenteditable:js},Ts.defineMode=function(t){Ts.defaults.mode||"null"==t||(Ts.defaults.mode=t),Ft.apply(this,arguments)},Ts.defineMIME=function(t,e){Nt[t]=e},Ts.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Ts.defineMIME("text/plain","null"),Ts.defineExtension=function(t,e){Ts.prototype[t]=e},Ts.defineDocExtension=function(t,e){_a.prototype[t]=e},Ts.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=R();e.autofocus=r==t||null!=t.getAttribute("autofocus")&&r==document.body}function i(){t.value=o.getValue()}var n;if(t.form&&(ht(t.form,"submit",i),!e.leaveSubmitMethodAlone)){var a=t.form;n=a.submit;try{var s=a.submit=function(){i(),a.submit=n,a.submit(),a.submit=s}}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 o=Ts((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return o},function(t){t.off=ft,t.on=ht,t.wheelEventPixels=xn,t.Doc=_a,t.splitLines=Ot,t.countColumn=B,t.findColumn=V,t.isWordChar=Q,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=ts,t.keyMap=Ga,t.keyName=Ya,t.isModifierKey=Ka,t.lookupKey=Va,t.normalizeKeyMap=Wa,t.StringStream=Vt,t.SharedTextMarker=Ta,t.TextMarker=wa,t.LineWidget=Sa,t.e_preventDefault=bt,t.e_stopPropagation=xt,t.e_stop=Ct,t.addClass=I,t.contains=O,t.rmClass=T,t.keyNames=Ba}(Ts),Ts.version="5.58.2",Ts}()},XFxt: +/*!*********************************************************!*\ + !*** ./src/components/image-preview/index.less?modules ***! + \*********************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){t.exports={"image-preview-container":"image-preview-container___1L8o9","image-preview":"image-preview___3YjNO","button-group":"button-group___3y9R5","preview-wrp-group":"preview-wrp-group___19bWd"}},Y1PL: +/*!**********************************************************!*\ + !*** ./node_modules/rc-textarea/es/index.js + 7 modules ***! + \**********************************************************/ +/*! exports provided: ResizableTextArea, default */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.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/Children/toArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */ +/*! 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"),a=r("vuIU"),s=r("Ji7U"),o=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(s.a)(r,t);var e=Object(o.a)(r);function r(){return Object(n.a)(this,r),e.apply(this,arguments)}return Object(a.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),a=l.useContext(y),s=l.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),o=l.isValidElement(e)&&Object(d.c)(e),u=o?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(),o=n.width,l=n.height,u=t.offsetWidth,h=t.offsetHeight,d=Math.floor(o),f=Math.floor(l);if(s.current.width!==d||s.current.height!==f||s.current.offsetWidth!==u||s.current.offsetHeight!==h){var g={width:d,height:f,offsetWidth:u,offsetHeight:h};s.current=g;var m=u===Math.round(o)?o:u,v=h===Math.round(l)?l:h,y=Object(c.a)(Object(c.a)({},g),{},{offsetWidth:m,offsetHeight:v});null==a||a(y,t,i),r&&Promise.resolve().then((function(){r(y,t)}))}}),[]);return l.useEffect((function(){var t,e,a=Object(f.a)(i.current)||Object(f.a)(n.current);return a&&!r&&(t=a,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)))}(a,b)}}),[i.current,r]),l.createElement(v,{ref:n},o?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([]),a=l.useContext(y),s=l.useCallback((function(t,e,s){i.current+=1;var o=i.current;n.current.push({size:t,element:e,data:s}),Promise.resolve().then((function(){o===i.current&&(null==r||r(n.current),n.current=[])})),null==a||a(t,e,s)}),[r,a]);return l.createElement(y.Provider,{value:s},e)};var S,C=x,k=r("bT9E"),w=r("TSYQ"),E=r.n(w),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"),a=parseFloat(i.getPropertyValue("padding-bottom"))+parseFloat(i.getPropertyValue("padding-top")),s=parseFloat(i.getPropertyValue("border-bottom-width"))+parseFloat(i.getPropertyValue("border-top-width")),o=L.map((function(t){return"".concat(t,":").concat(i.getPropertyValue(t))})).join(";"),l={sizingStyle:o,paddingSize:a,borderSize:s,boxSizing:n};return e&&r&&(A[r]=l),l}var _,O=r("Gytx"),R=r.n(O);!function(t){t[t.NONE=0]="NONE",t[t.RESIZING=1]="RESIZING",t[t.RESIZED=2]="RESIZED"}(_||(_={}));var I=function(t){Object(s.a)(r,t);var e=Object(o.a)(r);function r(t){var a;return Object(n.a)(this,r),(a=e.call(this,t)).nextFrameActionId=void 0,a.resizeFrameId=void 0,a.textArea=void 0,a.saveTextArea=function(t){a.textArea=t},a.handleResize=function(t){var e=a.state.resizeStatus,r=a.props,i=r.autoSize,n=r.onResize;e===_.NONE&&("function"==typeof n&&n(t),i&&a.resizeOnNextFrame())},a.resizeOnNextFrame=function(){cancelAnimationFrame(a.nextFrameActionId),a.nextFrameActionId=requestAnimationFrame(a.resizeTextarea)},a.resizeTextarea=function(){var t=a.props.autoSize;if(t&&a.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),a=n.paddingSize,s=n.borderSize,o=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"===o?d+=s:"content-box"===o&&(d-=a),null!==r||null!==i){S.value=" ";var f=S.scrollHeight-a;null!==r&&(u=f*r,"border-box"===o&&(u=u+a+s),d=Math.max(u,d)),null!==i&&(h=f*i,"border-box"===o&&(h=h+a+s),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(a.textArea,!1,e,r);a.setState({textareaStyles:i,resizeStatus:_.RESIZING},(function(){cancelAnimationFrame(a.resizeFrameId),a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:_.RESIZED},(function(){a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:_.NONE}),a.fixFirefoxAutoScroll()}))}))}))}))}},a.renderTextArea=function(){var t=a.props,e=t.prefixCls,r=void 0===e?"rc-textarea":e,n=t.autoSize,s=t.onResize,o=t.className,h=t.disabled,d=a.state,f=d.textareaStyles,p=d.resizeStatus,g=Object(k.a)(a.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),m=E()(r,o,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)({},a.props.style),f),p===_.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(C,{onResize:a.handleResize,disabled:!(n||s)},l.createElement("textarea",Object(i.a)({},g,{className:m,style:v,ref:a.saveTextArea})))},a.state={textareaStyles:{},resizeStatus:_.NONE},a}return Object(a.a)(r,[{key:"componentDidUpdate",value:function(t){t.value===this.props.value&&R()(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(s.a)(r,t);var e=Object(o.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 a=void 0===t.value||null===t.value?t.defaultValue:t.value;return i.state={value:a},i}return Object(a.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: +/*!************************************************************!*\ + !*** ./src/components/monaco-editor/index.jsx + 1 modules ***! + \************************************************************/ +/*! exports provided: getLanguageByMirrorName, default, DiffEditor */ +/*! exports used: DiffEditor, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./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/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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")),a=r("rAM+"),s=r("tJVT"),o=r("PpiC"),l=r("q1tI"),c=r.n(l),u=r("bdgK");function h(t,e,r,n,a){var s=e.getWordUntilPosition(r),o={startLineNumber:r.lineNumber,endLineNumber:r.lineNumber,startColumn:s.startColumn,endColumn:s.endColumn},l=n.map((function(e){return{label:e,kind:t.languages.CompletionItemKind.Keyword,insertText:e,insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o}}));return a.map((function(t){l.push(Object(i.a)(Object(i.a)({},t),{},{range:o}))})),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 J(!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)),at=Object(s.a)(nt,2),st=at[0],ot=(at[1],Object(l.useState)(d(y))),lt=Object(s.a)(ot,2),ct=lt[0],ut=lt[1],ht=Object(i.a)(Object(i.a)({},k),{},{width:st,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,o=t.height,h=void 0===o?"100%":o,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(s.a)(x,2),C=S[0],k=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}));k(e);var r=function(t){var e;return b.current&&(e=new u.default((function(e){var r,i=Object(a.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 w={width:d(n),height:d(h)};return c.a.createElement("div",{className:"my-diff-editor",ref:b,style:w})}},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 a(t,e){if(t.clientHeighte||a>t&&s=e&&o>=r?a-t-i:s>e&&or?s-e+n:0}var o=function(t,e){var r=window,n=e.scrollMode,o=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&&a(p)&&!a(document.documentElement)||null!=p&&a(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,k=b.right,w=b.bottom,E=b.left,T="start"===o||"nearest"===o?C:"end"===o?w:C+x/2,L="center"===l?E+S/2:"end"===l?k:E,A=[],D=0;D=0&&E>=0&&w<=m&&k<=g&&C>=M&&w<=N&&E>=F&&k<=P)return A;var B=getComputedStyle(_),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 _?_.offsetWidth-_.clientWidth-j-H:0,K="offsetHeight"in _?_.offsetHeight-_.clientHeight-U-G:0;if(d===_)z="start"===o?T:"end"===o?T-m:"nearest"===o?s(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:s(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"===o?T-M-U:"end"===o?T-N+G+K:"nearest"===o?s(M,N,R,U,G+K,T,T+x,x):T-(M+R/2)+K/2,W="start"===l?L-F-j:"center"===l?L-(F+I/2)+V/2:"end"===l?L-P+H+V:s(F,P,I,j,H+V,L,L+S,S);var q=_.scrollLeft,Y=_.scrollTop;T+=Y-(z=Math.max(0,Math.min(Y+z,_.scrollHeight-R+K))),L+=q-(W=Math.max(0,Math.min(q+W,_.scrollWidth-I+V)))}A.push({el:_,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?[]:o(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,a=t.left;i.scroll&&r?i.scroll({top:n,left:a,behavior:e}):(i.scrollTop=n,i.scrollLeft=a)}))}(o(t,i),i.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 a=/^\s+/,s=/\s+$/,o=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,o=null,l=null,h=!1,d=!1;"string"==typeof t&&(t=function(t){t=t.replace(a,"").replace(s,"").toLowerCase();var e,r=!1;if(_[t])t=_[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),o=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),a=t-i,s=r*(1-e),o=r*(1-a*e),l=r*(1-(1-a)*e),c=i%6;return{r:255*[r,o,s,s,l,r][c],g:255*[l,r,r,o,s,s][c],b:255*[s,s,l,r,r,o][c]}}(t.h,i,o),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,a;function s(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=a=r;else{var o=r<.5?r*(1+e):r+e-r*e,l=2*r-o;i=s(l,o,t+1/3),n=s(l,o,t),a=s(l,o,t-1/3)}return{r:255*i,g:255*n,b:255*a}}(t.h,i,l),h=!0,d="hsl"),t.hasOwnProperty("a")&&(r=t.a));var f,p,g;return r=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=o++}function f(t,e,r){t=I(t,255),e=I(e,255),r=I(r,255);var i,n,a=u(t,e,r),s=c(t,e,r),o=(a+s)/2;if(a==s)i=n=0;else{var l=a-s;switch(n=o>.5?l/(2-a-s):l/(a+s),a){case t:i=(e-r)/l+(e>1)+720)%360;--e;)i.h=(i.h+n)%360,a.push(d(i));return a}function D(t,e){e=e||6;for(var r=d(t).toHsv(),i=r.h,n=r.s,a=r.v,s=[],o=1/e;e--;)s.push(d({h:i,s:n,v:a})),a=(a+o)%1;return s}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=R(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 a=[N(l(t).toString(16)),N(l(e).toString(16)),N(l(r).toString(16)),N(B(i))];if(n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.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(k,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(w,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(),a=r/100;return d({r:(n.r-i.r)*a+i.r,g:(n.g-i.g)*a+i.g,b:(n.b-i.b)*a+i.b,a:(n.a-i.a)*a+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,a=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=a>=4.5;break;case"AAlarge":n=a>=3;break;case"AAAsmall":n=a>=7}return n},d.mostReadable=function(t,e,r){var i,n,a,s,o=null,l=0;n=(r=r||{}).includeFallbackColors,a=r.level,s=r.size;for(var c=0;cl&&(l=i,o=d(e[c]));return d.isReadable(t,o,{level:a,size:s})||!n?o:(r.includeFallbackColors=!1,d.mostReadable(t,["#fff","#000"],r))};var _=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}(_);function R(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: +/*!*****************************************!*\ + !*** ./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: +/*!******************************************************!*\ + !*** ./node_modules/codemirror/theme/blackboard.css ***! + \******************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){},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: +/*!**************************************************************!*\ + !*** ./node_modules/rc-input-number/es/index.js + 1 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! 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"),a=r("1OyB"),s=r("vuIU"),o=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?o-1:0),c=1;c1?r-1:0),a=1;a=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,a=r.inputValue,s=r.value;null==(e=n?a:i.toPrecisionAsStep(s))&&(e="");var o=i.formatWrapper(e);return S(i.props.decimalSeparator)&&(o=o.toString().replace(".",i.props.decimalSeparator)),o},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 s=i.getValidValue(i.toNumber(n));return i.state=m(m({},i.state),{},{inputValue:i.toPrecisionAsStep(s),value:s}),i}return Object(s.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,a=e.min,s=this.state.focused;if(t){if(!C(t.value,r)||!C(t.max,n)||!C(t.min,a)){var o,l=s?r:this.getValidValue(r);o=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:o})}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!==a&&"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,a=void 0===n?null:n,s=this.state.inputValue,o=void 0===s?null:s,l="number"==typeof i?i.toFixed(r):"".concat(i),c=i!==a||l!=="".concat(o);return"value"in this.props?(o=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:o},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 a=this.getPrecision(e),s=this.getPrecision(n),o=this.getPrecision(t);return t?Math.max(o,a+s):a+s}},{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)),a=((i*t+i*r*e)/i).toFixed(n);return this.toNumber(a)}},{key:"downStep",value:function(t,e){var r=this.props.step,i=this.getPrecisionFactor(t,e),n=Math.abs(this.getMaxPrecision(t,e)),a=((i*t-i*r*e)/i).toFixed(n);return this.toNumber(a)}},{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 a=this.props;if(!a.disabled){var s=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(s)){var o=this["".concat(t,"Step")](s,i),l=o>a.max||oa.max?o=a.max:o=p)||a||s,q=(U||0===U)&&(isNaN(U)||Number(U)<=g)||a||s,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)),$=o?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Z=o?{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:k,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:w,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:s,disabled:a,max:p,min:g,step:R,name:P,title:v,id:D,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(V),pattern:O,inputMode:_,onInput:F},z))))}}]),r}(h.a.Component);k.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 w=k;e.a=w},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 k}));var i=r("q1tI"),n=r.n(i),a=r("TSYQ"),s=r.n(a),o={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 a=e[n].current;if(a){i=!0;var s=a.style;s.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(s.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 a=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,a=t.strokeColor,o=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(a)?a:[a],x=u(l(y),1)[0],S=h/2,C=100-h/2,k="M ".concat("round"===o?S:0,",").concat(S,"\n L ").concat("round"===o?C:100,",").concat(S),w="0 0 100 ".concat(h),E=0;return n.a.createElement("svg",c({className:s()("".concat(i,"-line"),e),viewBox:w,preserveAspectRatio:"none",style:f},v),n.a.createElement("path",{className:"".concat(i,"-line-trail"),d:k,strokeLinecap:o,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"},a=b[e]||b[b.length-1];return E+=t,n.a.createElement("path",{key:e,className:"".concat(i,"-line-path"),d:k,strokeLinecap:o,stroke:a,strokeWidth:h,fillOpacity:"0",ref:x[e],style:r})})))};f.defaultProps=o;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 a=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,a=arguments.length>5?arguments[5]:void 0,s=50-i/2,o=0,l=-s,c=0,u=-2*s;switch(a){case"left":o=-s,l=0,c=2*s,u=0;break;case"right":o=s,l=0,c=-2*s,u=0;break;case"bottom":l=s,u=2*s}var h="M 50,50 m ".concat(o,",").concat(l,"\n a ").concat(s,",").concat(s," 0 1 1 ").concat(c,",").concat(-u,"\n a ").concat(s,",").concat(s," 0 1 1 ").concat(-c,",").concat(u),d=2*Math.PI*s,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,a=t.strokeWidth,o=t.trailWidth,c=t.gapDegree,u=t.gapPosition,h=t.trailColor,d=t.strokeLinecap,f=t.style,m=t.className,C=t.strokeColor,k=t.percent,w=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,a,c,u),L=T.pathString,A=T.pathStyle,D=x(k),_=x(C),O=_.find((function(t){return"[object Object]"===Object.prototype.toString.call(t)})),R=g(l(D),1)[0];return n.a.createElement("svg",p({className:s()("".concat(r,"-circle"),m),viewBox:"0 0 100 100",style:f},w),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:o||a,fillOpacity:"0",style:A}),(e=0,D.map((function(t,i){var s=_[i]||_[_.length-1],o="[object Object]"===Object.prototype.toString.call(s)?"url(#".concat(r,"-gradient-").concat(E,")"):"",l=S(e,t,s,a,c,u);return e+=t,n.a.createElement("path",{key:i,className:"".concat(r,"-circle-path"),d:l.pathString,stroke:o,strokeLinecap:d,strokeWidth:a,opacity:0===t?0:1,fillOpacity:"0",style:l.pathStyle,ref:R[i]})}))).reverse())};C.defaultProps=o;var k=C},kSUc: +/*!***************************************************!*\ + !*** ./src/components/markdown-editor/index.less ***! + \***************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(t,e,r){},"kaH+": +/*!************************************************!*\ + !*** ./src/components/image-preview/index.tsx ***! + \************************************************/ +/*! exports provided: 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(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),a=r(/*! react */"q1tI"),s=r.n(a),o=r(/*! ./index.less?modules */"XFxt"),l=r.n(o),c=r(/*! @/components/mediator */"dhSg"),u=r(/*! @ant-design/icons */"rLCj"),h=r(/*! @ant-design/icons */"dF/Y"),d=r(/*! @ant-design/icons */"4i/N");e.a=function(){var t=Object(a.useState)(""),e=Object(n.a)(t,2),r=e[0],o=e[1],f=Object(a.useState)(0),p=Object(n.a)(f,2),g=p[0],m=p[1],v=Object(a.useRef)("");function y(t){27==t.keyCode&&v.current&&b()}function b(){document.body.style.overflow="auto",o("")}return Object(a.useEffect)((function(){return c.a.subscribe("preview-image",(function(t){o(t),document.body.style.overflow="hidden"}))}),[]),Object(a.useEffect)((function(){return document.addEventListener("keydown",y),function(){document.removeEventListener("keydown",y)}}),[]),Object(a.useEffect)((function(){v.current=r}),[r]),s.a.createElement(a.Fragment,null,r?s.a.createElement("div",{className:l.a["image-preview-container"]},s.a.createElement("div",{className:l.a["button-group"]},s.a.createElement(i.a,{onClick:function(){m(g+90)}},"旋转",s.a.createElement(u.a,null)),s.a.createElement(i.a,{href:r},"下载",s.a.createElement(h.a,null)),s.a.createElement(i.a,{onClick:b},"关闭",s.a.createElement(d.a,null))),s.a.createElement("div",{className:l.a["preview-wrp-group"]},s.a.createElement("img",{className:l.a["image-preview"],src:r,alt:"预览大图",style:{transform:"rotate(".concat(g,"deg)")}}))):null)}},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 a={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 s in a)a.hasOwnProperty(s)&&r.tokenTypeOverrides[s]&&(a[s]=r.tokenTypeOverrides[s]);var o=/^([*\-_])(?:\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 a=t.innerMode(i,e.htmlState);r="xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText}r&&(e.f=w,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 s,d=i.column()===n.indentation,g=!(s=n.prevLine.stream)||!/\S/.test(s.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 k=n.indentation;if(null===n.indentationDiff&&(n.indentationDiff=n.indentation,b)){for(n.list=null;k=4&&(v||n.prevLine.fencedCodeEnd||n.prevLine.header||g))return i.skipToEnd(),n.indentedCode=!0,a.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=k+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||!(w&&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,a.hr):"["===i.peek()?m(i,n,A):m(i,n,n.inline)}function x(e,r){var a=i.token(e,r.htmlState);if(!n){var s=t.innerMode(i,r.htmlState);("xml"==s.mode.name&&null===s.state.tagStart&&!s.state.context&&s.state.tokenize.isInText||r.md_inside&&e.current().indexOf(">")>-1)&&(r.f=w,r.block=b,r.htmlState=null)}return a}function S(t,e){var i,n=e.listStack[e.listStack.length-1]||0,s=e.indentation=t.quote?e.push(a.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(a.linkHref,"url"):(t.strong&&e.push(a.strong),t.em&&e.push(a.em),t.strikethrough&&e.push(a.strikethrough),t.emoji&&e.push(a.emoji),t.linkText&&e.push(a.linkText),t.code&&e.push(a.code),t.image&&e.push(a.image),t.imageAltText&&e.push(a.imageAltText,"link"),t.imageMarker&&e.push(a.imageMarker)),t.header&&e.push(a.header,a.header+"-"+t.header),t.quote&&(e.push(a.quote),!r.maxBlockquoteDepth||r.maxBlockquoteDepth>=t.quote?e.push(a.quote+"-"+t.quote):e.push(a.quote+"-"+r.maxBlockquoteDepth)),!1!==t.list){var n=(t.listStack.length-1)%3;n?1===n?e.push(a.list2):e.push(a.list3):e.push(a.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 k(t,e){if(t.match(d,!0))return C(e)}function w(e,n){var s=n.text(e,n);if(void 0!==s)return s;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 o=e.next();if(n.linkTitle){n.linkTitle=!1;var l=o;"("===o&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(e.match(new RegExp(u),!0))return a.linkHref}if("`"===o){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("\\"===o&&(e.next(),r.highlightFormatting)){var p=C(n),m=a.formatting+"-escape";return p?p+" "+m:m}if("!"===o&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return n.imageMarker=!0,n.image=!0,r.highlightFormatting&&(n.formatting="image"),C(n);if("["===o&&n.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return n.imageMarker=!1,n.imageAltText=!0,r.highlightFormatting&&(n.formatting="image"),C(n);if("]"===o&&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("["===o&&!n.image)return n.linkText&&e.match(/^.*?\]/)||(n.linkText=!0,r.highlightFormatting&&(n.formatting="link")),C(n);if("]"===o&&n.linkText){r.highlightFormatting&&(n.formatting="link");var p=C(n);return n.linkText=!1,n.inline=n.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?T:w,p}if("<"===o&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=E,r.highlightFormatting&&(n.formatting="link"),(p=C(n))?p+=" ":p="",p+a.linkInline;if("<"===o&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=E,r.highlightFormatting&&(n.formatting="link"),(p=C(n))?p+=" ":p="",p+a.linkEmail;if(r.xml&&"<"===o&&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&&"<"===o&&e.match(/^\/\w*?>/))return n.md_inside=!1,"tag";if("*"===o||"_"===o){for(var S=1,k=1==e.pos?" ":e.string.charAt(e.pos-2);S<3&&e.eat(o);)S++;var L=e.peek()||" ",A=!/\s/.test(L)&&(!g.test(L)||/\s/.test(k)||g.test(k)),D=!/\s/.test(k)&&(!g.test(k)||/\s/.test(L)||g.test(L)),_=null,O=null;if(S%2&&(n.em||!A||"*"!==o&&D&&!g.test(k)?n.em!=o||!D||"*"!==o&&A&&!g.test(L)||(_=!1):_=!0),S>1&&(n.strong||!A||"*"!==o&&D&&!g.test(k)?n.strong!=o||!D||"*"!==o&&A&&!g.test(L)||(O=!1):O=!0),null!=O||null!=_)return r.highlightFormatting&&(n.formatting=null==_?"strong":null==O?"em":"strong em"),!0===_&&(n.em=o),!0===O&&(n.strong=o),f=C(n),!1===_&&(n.em=!1),!1===O&&(n.strong=!1),f}else if(" "===o&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return C(n);e.backUp(1)}if(r.strikethrough)if("~"===o&&e.eatWhile(o)){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(" "===o&&e.match(/^~~/,!0)){if(" "===e.peek())return C(n);e.backUp(2)}if(r.emoji&&":"===o&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){n.emoji=!0,r.highlightFormatting&&(n.formatting="emoji");var R=C(n);return n.emoji=!1,R}return" "===o&&(e.match(/^ +$/,!1)?n.trailingSpace++:n.trailingSpace&&(n.trailingSpaceNewLine=!0)),C(n)}function E(t,e){if(">"===t.next()){e.f=e.inline=w,r.highlightFormatting&&(e.formatting="link");var i=C(e);return i?i+=" ":i="",i+a.linkInline}return t.match(/^[^>]+/,!0),a.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=w,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,w)}function D(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=_,r.highlightFormatting&&(e.formatting="link");var i=C(e);return e.linkText=!1,i}return t.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function _(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=w,a.linkHref+" url")}var O={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:w,text:k,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: +/*!********************************************************!*\ + !*** ./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 a(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 s(t,r){var i=t.cm.getTokenTypeAt(e(t.line,r));return i&&/\btag\b/.test(i)}function o(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(o(t))continue;return}if(s(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(s(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(o(t))continue;return}if(s(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(s(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,a=h(t),s=t.line,o=t.ch-(a?a[0].length:0);if(!a||!(n=c(t)))return;if("selfClose"!=n)if(a[1]){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(s,o),to:e(t.line,t.ch)}}else i.push(a[2])}}function p(t,r){for(var i=[];;){var n=d(t);if(!n)return;if("selfClose"!=n){var a=t.line,s=t.ch,o=u(t);if(!o)return;if(o[1])i.push(o[2]);else{for(var l=i.length-1;l>=0;--l)if(i[l]==o[2]){i.length=l;break}if(l<0&&(!r||r==o[2]))return{tag:o[2],from:e(t.line,t.ch),to:e(a,s)}}}else u(t)}}t.registerHelper("fold","xml",(function(t,i){for(var n=new a(t,i.line,0);;){var s=h(n);if(!s||n.line!=i.line)return;var o=c(n);if(!o)return;if(!s[1]&&"selfClose"!=o){var l=e(n.line,n.ch),u=f(n,s[2]);return u&&r(u.from,l)>0?{from:l,to:u.from}:null}}})),t.findMatchingTag=function(t,i,n){var s=new a(t,i.line,i.ch,n);if(-1!=s.text.indexOf(">")||-1!=s.text.indexOf("<")){var o=c(s),l=o&&e(s.line,s.ch),h=o&&u(s);if(o&&h&&!(r(s,i)>0)){var d={from:e(s.line,s.ch),to:l,tag:h[2]};return"selfClose"==o?{open:d,close:null,at:"open"}:h[1]?{open:p(s,h[2]),close:d,at:"close"}:{open:d,close:f(s=new a(t,l.line,l.ch,n),h[2]),at:"open"}}}},t.findEnclosingTag=function(t,e,r,i){for(var n=new a(t,e.line,e.ch,r);;){var s=p(n,i);if(!s)break;var o=f(new a(t,e.line,e.ch,r),s.tag);if(o)return{open:s,close:o}}},t.scanForClosingTag=function(t,e,r,i){return f(new a(t,e.line,e.ch,i?{from:0,to:i}:null),r)}}(r(/*! ../../lib/codemirror */"VrN/"))},p5ED: +/*!*********************************************!*\ + !*** ./src/components/PreviewAll/index.tsx ***! + \*********************************************/ +/*! exports provided: 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+")),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),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/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){var e,r,l,d,b,x,S=t.editOffice,C=void 0===S?"view":S,k=(t.name,t.data),w=(t.theme,t.type),E=t.filename,T=t.monacoEditor,L=t.className,A=t.style,D=t.close,_=t.onClose,O=t.hasMask,R=t.disabledDownload,I=t.onImgDimensions,M=t.otherData,P=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),N=Object(o.a)(P,2),F=(N[0],N[1],Object(u.useState)("")),B=Object(o.a)(F,2),j=(B[0],B[1]),U=Object(u.useState)(),H=Object(o.a)(U,2),G=H[0],z=H[1],W="build"===window.ENV?"/react/build":"",V=location.host.startsWith("localhost")?y.a.PROXY_SERVER:y.a.API_SERVER,K=Object(u.useRef)();null!==(e=k)&&void 0!==e&&e.startsWith("/api")&&"txt"!==w&&(k=y.a.API_SERVER+k),"office"===w&&Object(m.P)(k).filesize>10485760&&(w="other"),E&&(T.filename=E),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]&&j(e[1])}))}),[]),Object(u.useEffect)((function(){"office"===w&&q()}),[w,k]);var q=function(){var t=Object(s.a)(c.a.mark((function t(){var e,r,i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("data:",k),e=k,k.startsWith("http")||(e=location.origin+e),r=new URL(e).pathname.split("/").pop(),t.next=6,Object(v.U)({attachment_id:r});case 6:i=t.sent,z(i);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Y=function(){k.startsWith("http")||k.startsWith("blob:")?X():Object(m.x)(E||"educoder",k,E)},X=function(){Object(m.v)(E||"educoder",decodeURIComponent(k))};return h.a.createElement("div",{style:Object(a.a)({},A||{}),className:"".concat(O&&f.a.bgBlack," ").concat(w?f.a.wrp:"hide")},D&&h.a.createElement("div",{className:f.a.close,ref:K},!!I&&h.a.createElement(n.a,{title:"点击对图片进行批注",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:function(){_(),I()}},h.a.createElement("i",{className:"icon-yulanpizhu"}))),!R&&h.a.createElement(n.a,{title:"点击下载此文件",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:X},h.a.createElement("i",{className:"icon-quxiaozhiding"}))),h.a.createElement(n.a,{title:"关闭",getPopupContainer:function(){return K.current}},h.a.createElement("span",{className:"",onClick:_},h.a.createElement("i",{className:"icon-guanbi1"})))),h.a.createElement("div",{className:"".concat(f.a[L]," ").concat(L," ").concat(f.a.monaco," ").concat("txt"===w?"show":"hide")},"txt"===w&&h.a.createElement(g.b,T)),"audio"===w&&h.a.createElement("audio",{src:"".concat((null===(r=k)||void 0===r?void 0:r.indexOf("http://"))>-1||(null===(l=k)||void 0===l?void 0:l.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(k),autoPlay:!0}),"video"===w&&h.a.createElement(h.a.Fragment,null,(null===(d=k)||void 0===d?void 0:d.indexOf("http"))>-1?h.a.createElement("video",{controls:!0,src:"".concat(k),autoPlay:!0}):h.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(k),autoPlay:!0})),"office"===w&&G&&h.a.createElement("iframe",{src:"".concat(W,"/office.html?key=").concat(G.key,"&url=").concat(V+G.url,"&callbackUrl=").concat(V+G.callbackUrl,"&fileType=").concat(G.fileType,"&title=").concat(G.title,"&model=").concat(C,"&officeServer=").concat(y.a.OFFICE_SERVER,"&disabledDownload=").concat(!!R)}),("xlsx"===w||"doc"===w||"pptx"===w||"docx"===w)&&h.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(M.key,"&url=").concat(y.a.API_SERVER+M.url,"&callbackUrl=").concat(y.a.API_SERVER+M.callbackUrl,"&fileType=").concat(M.fileType,"&title=").concat(M.title,"&model=").concat(M.model)}),"html"===w&&h.a.createElement("iframe",{src:k+"&disposition=inline"}),"pdf"===w&&h.a.createElement("embed",{className:f.a.embed,src:k}),"image"===w&&h.a.createElement("img",{src:"".concat((null===(b=k)||void 0===b?void 0:b.indexOf("http://"))>-1||(null===(x=k)||void 0===x?void 0:x.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(k)}),"other"===w&&h.a.createElement("div",null,h.a.createElement(i.a,{type:"primary",size:"large",onClick:Y},h.a.createElement(p.a,null),"点击下载")),"download"===w&&h.a.createElement(i.a,{type:"primary",size:"large",onClick:Y},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+": +/*!*******************************************************************************************************************!*\ + !*** ./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,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}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 s,o=!0,l=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){l=!0,s=t},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw s}}}}},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+;)/,a=/[<>"']|&(?!#?\w+;)/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},o=t=>s[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.length0}),!1)}t.exports=function(t,e){e=e||{};var n={main:r.m},o=e.all?{main:Object.keys(n.main)}:function(t,e){for(var r={main:[e]},i={main:[]},n={main:{}};s(r);)for(var o=Object.keys(r),l=0;l=2*h/f||b<=S)){var C,k=Number.POSITIVE_INFINITY;for(C=t.level-1;C>g&&!((k=h*p[C].maxBitrate/(6.4*y))=b)){var w=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)(w)?(w/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: "+k.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(a.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 s=n?n.stats:r.stats,o=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)+s.loaded,h=(c.loaded?c.loaded.duration:0)+o;c.loaded={bytes:u,duration:h},c.realBitrate=Math.round(8*u/h)}if(r.bitrateTest){var d={stats:s,frag:r,part:n,id:r.type};this.onFragBuffered(a.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 a=n.parsing.end-n.loading.start;this.bwEstimator.sample(a,n.loaded),n.bwEstimate=this.bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},d.onError=function(t,e){switch(e.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.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,a=r.minAutoLevel,o=r.media,l=e?e.duration:t?t.duration:0,u=o?o.currentTime:0,h=o&&0!==o.playbackRate?Math.abs(o.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():n.abrEwmaDefaultEstimate,f=(s.BufferHelper.bufferInfo(o,u,n.maxBufferHole).end-u)/h,p=this.findBestLevel(d,a,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,a,i,f+g,m,v),Math.max(p,0)},d.findBestLevel=function(t,e,r,i,n,a){for(var s,o=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,h=this.hls.levels,d=h[u],f=!(null==d||null===(s=d.details)||void 0===s||!s.live),p=null==d?void 0:d.codecSet,g=l?l.duration:o?o.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:a*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||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,a=null==r||null===(e=r[i])||void 0===e?void 0:e.details;if(a){if(this.waitForCdnTuneIn(a))break;this.state=n.State.WAITING_INIT_PTS}break;case n.State.FRAG_LOADING_WAITING_RETRY:var o,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(o=this.media)&&void 0!==o&&o.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=s.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,s=this.media,o=this.trackId,l=r.config;if(i&&i[o]&&(s||!this.startFragRequested&&l.startFragPrefetch)){var h=i[o].details;if(!h||h.live&&this.levelLastLoaded!==o||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(a.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"),s.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,a=e.details,s=e.id;if(i){this.log("Track "+s+" loaded ["+a.startSN+","+a.endSN+"],duration:"+a.totalduration);var o=i[s],l=0;if(a.live||null!==(r=o.details)&&void 0!==r&&r.live){var c=this.mainDetails;if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed||!c)return;!o.details&&a.hasProgramDateTime&&c.hasProgramDateTime?(Object(g.alignMediaPlaylistByPDT)(a,c),l=a.fragments[0].start):l=this.alignPlaylists(a,o.details)}o.details=a,this.levelLastLoaded=s,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(o.details,l),this.state!==n.State.WAITING_TRACK||this.waitForCdnTuneIn(a)||(this.state=n.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+s)},S._handleFragmentLoadProgress=function(t){var e,r=t.frag,i=t.part,a=t.payload,s=this.config,o=this.trackId,l=this.levels;if(l){var u=l[o];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=s.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,a.byteLength,x,S);m.push(a,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 "+o),(this.waitingData=this.waitingData||{frag:r,part:i,cache:new h.default,complete:!1}).cache.push(new Uint8Array(a)),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(a.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,a=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);a&&a.len>.5&&(i=!this.reduceMaxBufferLength(a.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,s=t.remuxResult,o=t.chunkMeta,l=this.getCurrentContext(o);if(!l)return this.warn("The loading context changed while buffering fragment "+o.sn+" of level "+o.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(o.level);var c=l.frag,h=l.part,d=s.audio,f=s.text,p=s.id3,g=s.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,o),i.trigger(a.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,o)}if(null!=p&&null!==(e=p.samples)&&void 0!==e&&e.length){var S=y({frag:c,id:r},p);i.trigger(a.Events.FRAG_PARSING_METADATA,S)}if(f){var C=y({frag:c,id:r},f);i.trigger(a.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(a.Events.BUFFER_CODECS,t);var s=i.initSegment;if(null!=s&&s.byteLength){var o={type:"audio",frag:e,part:null,chunkMeta:r,parent:e.type,data:s};this.hls.trigger(a.Events.BUFFER_APPENDING,o)}this.tick()}}},S.loadFragment=function(e,r,a){var s=this.fragmentTracker.getState(e);this.fragCurrent=e,(this.audioSwitch||s===o.FragmentState.NOT_LOADED||s===o.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,a)))},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(a.Events.AUDIO_TRACK_SWITCHED,{id:i})},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"),a=r(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),s=r(/*! ../types/loader */"./src/types/loader.ts");function o(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],a=n.id,s=n.groupId,o=void 0===s?"":s,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:a,groupId:o,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;re.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,s=e.stats,o=s.loading.end?Math.max(0,self.performance.now()-s.loading.end):0;if(n.advancedDateTime=Date.now()-o,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(a.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(a.computeReloadInterval)(n,s);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 a=Object(n.getSkipValue)(t,r);return null!=e&&e.skip&&t.deltaUpdateFailed&&(r=e.msn,i=e.part,a=n.HlsSkip.No),new n.HlsUrlParameters(r,i,a)},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 a=Math.min(Math.pow(2,this.retryCount)*i.levelLoadingRetryDelay,i.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return r.loadPlaylist()}),a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' 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"),a=r(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),s=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=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;(o0&&a&&a.key&&a.iv&&"AES-128"===a.method){var s=self.performance.now();return e.decrypter.webCryptoDecrypt(new Uint8Array(n),a.key.buffer,a.iv.buffer).then((function(e){var n=self.performance.now();return i.trigger(l.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:s,tdecrypt:n}}),r.payload=e,r}))}return r})).then((function(r){var i=e.fragCurrent,n=e.hls,a=e.levels;if(!a)throw new Error("init load aborted, missing levels");var s=a[t.level].details;console.assert(s,"Level details are defined when init segment is loaded");var o=t.stats;e.state=S.IDLE,e.fragLoadError=0,t.data=new Uint8Array(r.payload),o.parsing.start=o.buffering.start=self.performance.now(),o.parsing.end=o.buffering.end=self.performance.now(),r.frag===i&&n.trigger(l.Events.FRAG_BUFFERED,{stats:o,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(s.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,a=!n||0===n.length||n.some((function(t){return!t})),s=new u.ChunkMetadata(r.level,r.sn,r.stats.chunkCount+1,0,i?i.index:-1,!a);e.flush(s)}},E._handleFragmentLoadProgress=function(t){},E._doFragLoad=function(t,e,r,n){var a=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 s=e.partList;if(s&&n){r>t.end&&e.fragmentHint&&(t=e.fragmentHint);var o=this.getNextPart(s,t,r);if(o>-1){var c=s[o];return this.log("Loading part sn: "+t.sn+" p: "+c.index+" cc: "+t.cc+" of playlist ["+e.startSN+"-"+e.endSN+"] parts [0-"+o+"-"+(s.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:s[o],targetBufferTime:r}),this.doFragPartsLoad(t,s,o,n).catch((function(t){return a.handleFragLoadError(t)}))}if(!t.url||this.loadedEndOfParts(s,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 a.handleFragLoadError(t)}))},E.doFragPartsLoad=function(t,e,r,i){var n=this;return new Promise((function(a,s){var o=[];!function r(c){var u=e[c];n.fragmentLoader.loadPart(t,u,i).then((function(i){o[u.index]=i;var s=i.part;n.hls.trigger(l.Events.FRAG_LOADED,i);var h=e[c+1];if(!h||h.fragment!==t)return a({frag:t,part:s,partsLoaded:o});r(c+1)})).catch(s)}(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,a=self.performance.now();r.stats.parsing.end=a,i&&(i.stats.parsing.end=a),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 a=e[r],s=n>-1?Object(p.getPartWith)(a,i,n):null,o=s?s.fragment:Object(p.getFragmentWithSN)(a,i,this.fragCurrent);return o?{frag:o,part:s,level:a}:null},E.bufferFragmentData=function(t,e,r,i){if(t&&this.state===S.PARSING){var n=t.data1,a=t.data2,s=n;if(n&&a&&(s=Object(h.appendUint8Array)(n,a)),s&&s.length){var o={type:t.type,frag:e,part:r,chunkMeta:i,parent:e.type,data:s};this.hls.trigger(l.Events.BUFFER_APPENDING,o),t.dropped&&t.independent&&!r&&this.flushBufferGap(e)}}},E.flushBufferGap=function(t){var e=this.media;if(e)if(s.BufferHelper.isBuffered(e,e.currentTime)){var r=e.currentTime,i=s.BufferHelper.bufferInfo(e,r,0),n=t.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*n),o=Math.max(Math.min(t.start-a,i.end-a),r+a);t.start-o>a&&this.flushMainBuffer(o,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 a=s.BufferHelper.bufferInfo(t,n,r.maxBufferHole);if(0===a.len&&void 0!==a.nextStart){var o=this.fragmentTracker.getBufferedFrag(n,e);if(o&&a.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,a=n.length;if(!a)return null;var s,o=this.config,l=n[0].start;if(e.live){var c=o.initialLiveManifestSize;if(a-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 a=e[n-t.startSN];r.cc===a.cc&&(i=a,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 s=this.hls.liveSyncPosition;null!==s&&(i=this.getFragmentAtPosition(s,this.bitrateTest?t.fragmentEnd:t.edge,t))}return i},E.getFragmentAtPosition=function(t,e,r){var i,n=this.config,s=this.fragPrevious,o=r.fragments,l=r.endSN,c=r.fragmentHint,u=n.maxFragLookUpTolerance,h=!!(n.lowLatencyMode&&r.partList&&c);if(h&&c&&!this.bitrateTest&&(o=o.concat(c),l=c.sn),te-u?0:u;i=Object(f.findFragmentByPTS)(s,o,t,d)}else i=o[o.length-1];if(i){var p=i.sn-r.startSN,g=s&&i.level===s.level,m=o[p+1];if(this.fragmentTracker.getState(i)===a.FragmentState.BACKTRACKED){i=null;for(var v=p;o[v]&&this.fragmentTracker.getState(o[v])===a.FragmentState.BACKTRACKED;)i=s?o[v--]:o[--v];i||(i=m)}else s&&i.sn===s.sn&&!h&&g&&(i.sn=a-e.maxFragLookUpTolerance&&n<=s;if(null!==i&&r.duration>i&&(n"+t.startSN+" prev-sn: "+(a?a.sn:"na")+" fragments: "+o),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,k),w&&b(C,w),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"),a=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=r(/*! ../errors */"./src/errors.ts"),o=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;a.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(){a.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){a.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,a.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(a.logger.log("[buffer-controller]: media source detaching"),"open"===e.readyState)try{e.endOfStream()}catch(t){a.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()):a.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){a.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 a=e[t],s=a.codec,o=a.levelCodec,l=a.container;if((n.levelCodec||n.codec).replace(d,"$1")!==(o||s).replace(d,"$1")){var c=l+";codecs="+(o||s);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&&(a.logger.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+e),n.changeType(e)),i.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(e){a.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&&(a.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 a in e)i[a]=o.BufferHelper.getBuffered(e[a]);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){a.logger.error("[buffer-controller]: Error encountered while trying to append to the "+h+" SourceBuffer",t);var e={type:s.ErrorTypes.MEDIA_ERROR,parent:d.type,details:s.ErrorDetails.BUFFER_APPEND_ERROR,err:t,fatal:!1};t.code===DOMException.QUOTA_EXCEEDED_ERR?e.details=s.ErrorDetails.BUFFER_FULL_ERROR:(r.appendError++,e.details=s.ErrorDetails.BUFFER_APPEND_ERROR,r.appendError>i.config.appendErrorMaxRetry&&(a.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,s=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){a.logger.warn("[buffer-controller]: Failed to remove from "+t+" SourceBuffer",e)}}};e.type?i.append(s(e.type),e.type):this.getSourceBufferTypes().forEach((function(t){i.append(s(t),t)}))},e.onFragParsed=function(t,e){var r=this,i=e.frag,s=e.part,o=[],l=s?s.elementaryStreams:i.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?o.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&o.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&o.push("video")),0===o.length&&a.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,s&&(s.stats.buffering.end=t);var e=s?s.stats:i.stats;r.hls.trigger(n.Events.FRAG_BUFFERED,{frag:i,part:s,stats:e,id:i.type})}),o)},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,a.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,a=this.sourceBuffer;if(r&&null!==e){var s=this.getSourceBufferTypes();if(s.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;s.forEach((function(r){var i=a[r];if(i){var s=o.BufferHelper.getBuffered(i);s.length>0&&d>s.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,s=t.fragments[0].start+t.totalduration,o=r.duration,l=Object(i.isFiniteNumber)(n.duration)?n.duration:0;t.live&&e.config.liveDurationInfinity?(a.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),n.duration=1/0,this.updateSeekableRange(t)):(s>l&&s>o||!Object(i.isFiniteNumber)(o))&&(a.logger.log("[buffer-controller]: Updating Media Source duration to "+s.toFixed(3)),n.duration=s)}},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 a=this.getSourceBufferTypes();if(0===a.length)return void this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});a.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 o in t)if(!e[o]){var l=t[o];if(!l)throw Error("source buffer exists for track "+o+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;a.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var h=e[o]=r.addSourceBuffer(u),d=o;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[o]={buffer:h,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},i++}catch(t){a.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+t.message),this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.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){a.logger.error("[buffer-controller]: "+t+" SourceBuffer error",e),this.hls.trigger(n.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.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,s=this.mediaSource,o=this.operationQueue,l=this.sourceBuffer[t];if(!n||!s||!l)return a.logger.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),void o.shiftAndExecuteNext(t);var c=Object(i.isFiniteNumber)(n.duration)?n.duration:1/0,u=Object(i.isFiniteNumber)(s.duration)?s.duration:1/0,h=Math.max(0,e),d=Math.min(r,c,u);d>h?(a.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)):o.shiftAndExecuteNext(t)},e.appendExecutor=function(t,e){var r=this.operationQueue,i=this.sourceBuffer[e];if(!i)return a.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 a.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": +/*!**************************************************!*\ + !*** ./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],a=r[t];if(a.length){var s=a[0];try{s.execute()}catch(e){i.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),s.onError(e),n&&n.updating||(a.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}}},s.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)},s.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())},s.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},s.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,a=t.length-1,s=0;s=e||o.height>=r)&&(i=o,!(n=t[s+1])||i.width!==n.width||i.height!==n.height)){a=s;break}}return a},e=t,a=[{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),a&&n(e,a),t}();e.default=a},"./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"),a=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts");function o(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=a.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*a.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)},a=function(t){return 100*n(t/100)},s={br:n,d:n,bl:a,dl:a,mtp:a,nor:function(t){return encodeURIComponent(t)},rtp:a,tb:n},o=c(Object.keys(t||{}).sort());!(e=o()).done;){var l=e.value,u=t[l];if(i(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var h=s[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=[{},{},{},{}],a={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},s=0,o=Object.keys(e);s3)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;a.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(r,s)}}},c._generateLicenseRequestChallenge=function(t,e){switch(t.mediaKeySystemDomain){case s.KeySystems.WIDEVINE:return e}throw new Error("unsupported key-system: "+t.mediaKeySystemDomain)},c._requestLicense=function(t,e){a.logger.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r)return a.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 s=this.getLicenseServerUrl(r.mediaKeySystemDomain),o=this._createLicenseXhr(s,t,e);a.logger.log("Sending license request to URL: "+s);var l=this._generateLicenseRequestChallenge(r,t);o.send(l)}catch(t){a.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(s.KeySystems.WIDEVINE,r,i)}},e=t,(r=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&o(e.prototype,r),l&&o(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"),a=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 a=performance.now();if(e){if(this.lastTime){var s=a-this.lastTime,o=r-this.lastDroppedFrames,l=e-this.lastDecodedFrames,c=1e3*o/s,u=this.hls;if(u.trigger(i.Events.FPS_DROP,{currentDropped:o,currentDecoded:l,totalDroppedFrames:r}),c>0&&o>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=a,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=a},"./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 a})),r.d(e,"findFragmentByPTS",(function(){return s})),r.d(e,"fragmentWithinToleranceTest",(function(){return o})),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 a(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": +/*!********************************************!*\ + !*** ./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 s}));var i,n=r(/*! ../events */"./src/events.ts"),a=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 s=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===a.PlaylistLevelType.MAIN){var r=this.activeFragment,i=this.activeParts;if(!r)return null;if(i)for(var n=i.length;n--;){var s=i[n],o=s?s.end:r.appendedPTS;if(s.start<=t&&void 0!==o&&t<=o)return n>9&&(this.activeParts=i.slice(n-9)),s}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 a=r[i[n]];if((null==a?void 0:a.body.type)===e&&a.buffered){var s=a.body;if(s.start<=t&&t<=s.end)return s}}return null},e.detectEvictedFragments=function(t,e,r){var i=this;Object.keys(this.fragments).forEach((function(n){var a=i.fragments[n];if(a)if(a.buffered){var s=a.range[t];s&&s.time.some((function(t){var r=!i.isTimeBuffered(t.startPTS,t.endPTS,e);return r&&i.removeFragment(a.body),r}))}else a.body.type===r&&i.removeFragment(a.body)}))},e.detectPartialFragments=function(t){var e=this,r=this.timeRanges,i=t.frag,n=t.part;if(r&&"initSegment"!==i.sn){var a=l(i),s=this.fragments[a];s&&(Object.keys(r).forEach((function(t){var a=i.elementaryStreams[t];if(a){var o=r[t],l=null!==n||!0===a.partial;s.range[t]=e.getBufferedTimes(i,n,l,o)}})),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.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},a=e?e.start:t.start,s=e?e.end:t.end,o=t.minEndPTS||s,l=t.maxStartPTS||a,c=0;c=u&&o<=h){n.time.push({startPTS:Math.max(a,i.start(c)),endPTS:Math.min(s,i.end(c))});break}if(au)n.partial=!0,n.time.push({startPTS:Math.max(a,i.start(c)),endPTS:Math.min(s,i.end(c))});else if(s<=u)break}return n},e.getPartialFragment=function(t){var e,r,i,n=null,a=0,s=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&o(u)&&(r=u.body.start-s,i=u.body.end+s,t>=r&&t<=i&&(e=Math.min(t-r,i-t),a<=e&&(n=u.body,a=e)))})),n},e.getState=function(t){var e=l(t),r=this.fragments[e];return r?r.buffered?o(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,a=0;a=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,s=e.timeRanges;if(i.type===a.PlaylistLevelType.MAIN)if(this.activeFragment=i,n){var o=this.activeParts;o||(this.activeParts=o=[]),o.push(n)}else this.activeParts=null;this.timeRanges=s,Object.keys(s).forEach((function(t){var e=s[t];if(r.detectEvictedFragments(t,e),!n)for(var a=0;at&&i.removeFragment(s)}}))},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 o(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": +/*!******************************************!*\ + !*** ./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 o})),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"),a=r(/*! ../events */"./src/events.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=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,a=r.currentTime,c=r.seeking,u=this.seeking&&!c,h=!this.seeking&&c;if(this.seeking=c,a===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,a,0),f=d.len>0,p=d.nextStart||0;if(f||p){if(c){var g=d.len>l,m=!p||p-a>l&&!this.fragmentTracker.getPartialFragment(a);if(g||m)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,y=Math.max(p,d.start||0)-a,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>=o&&this._reportStall(d.len);var k=i.BufferHelper.bufferInfo(r,a,e.maxBufferHole);this._tryFixBufferStall(k,C)}else this.stalled=S}}}else if(this.moved=!0,null!==n){if(this.stallReported){var w=self.performance.now()-n;s.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(w)+"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,a=i.getPartialFragment(n);a&&this._trySkipBufferHole(a)||t.len>r.maxBufferHole&&e>1e3*r.highBufferWatchdogPeriod&&(s.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,s.logger.warn("Playback stalling at @"+r.currentTime+" due to low buffer (buffer="+t+")"),e.trigger(a.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,o=this.media,l=o.currentTime,h=0,d=i.BufferHelper.getBuffered(o),f=0;f=h&&l.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,a)),u=Math.round(2/(1+Math.exp(-.75*o-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,a=n.liveSyncDuration,s=n.liveSyncDurationCount,o=n.lowLatencyMode,l=this.hls.userConfig,c=o&&r||e;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==a?a:s*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,a=i-r.totalduration,s=i-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(a,n),s)}},{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}}])&&s(e.prototype,r),o&&s(e,o),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"),a=r(/*! ../errors */"./src/errors.ts"),s=r(/*! ../utils/codecs */"./src/utils/codecs.ts"),o=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&&(s=r.frag.level)):s=r.frag.level}break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:i&&(i.deliveryDirectives&&(l=!1),s=i.level),o=!0;break;case a.ErrorDetails.REMUX_ALLOC_ERROR:s=r.level,o=!0}void 0!==s&&this.recoverLevel(r,s,o,l)}}},v.recoverLevel=function(t,e,r,i){var n=t.details,a=this._levels[e];if(a.loadError++,r){if(!this.retryLoadingOrFail(t))return void(this.currentLevelIndex=-1);t.levelRetry=!0}if(i){var s=a.url.length;if(s>1&&a.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,a=e.details,s=this._levels[n];if(!s)return this.warn("Invalid level index "+n),void(null!==(i=e.deliveryDirectives)&&void 0!==i&&i.skip&&(a.deltaUpdateFailed=!0));n===this.currentLevelIndex?(0===s.fragmentError&&(s.loadError=0,this.retryCount=0),this.playlistLoaded(n,e,s.details)):null!==(r=e.deliveryDirectives)&&void 0!==r&&r.skip&&(a.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,a=0;a0){var i=r.urlId,a=r.url[i];if(t)try{a=t.addDirectives(a)}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+" "+a),this.clearTimer(),this.hls.trigger(n.Events.LEVEL_LOADING,{url:a,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:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.LEVEL_SWITCH_ERROR,level:t,fatal:i,reason:"invalid level idx"}),i)return;t=Math.min(t,r.length-1)}this.clearTimer();var s=this.currentLevelIndex,o=r[s],l=r[t];this.log("switching to level "+t+" from "+s),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==o?void 0:o.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 a})),r.d(e,"assignTrackIdsByGroup",(function(){return s})),r.d(e,"updatePTS",(function(){return o})),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 a(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 s(t){var e={};t.forEach((function(t){var r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++}))}function o(t,e,r){l(t[e],t[r])}function l(t,e){var r=e.startPTS;if(Object(i.isFiniteNumber)(r)){var n,a=0;e.sn>t.sn?(a=r-t.start,n=t):(a=t.start-r,n=e),n.duration!==a&&(n.duration=a)}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,a,s,o){a-r<=0&&(n.logger.warn("Fragment should have a positive duration",e),a=r+e.duration,o=s+e.duration);var c=r,u=a,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),s=Math.min(s,e.startDTS),u=Math.min(a,d),a=Math.max(a,d),o=Math.max(o,e.endDTS)}e.duration=a-r;var p=r-e.start;e.appendedPTS=a,e.start=e.startPTS=r,e.maxStartPTS=c,e.startDTS=s,e.endPTS=a,e.minEndPTS=u,e.endDTS=o;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;s--){var o=a[s].initSegment;if(o){r=o;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&&a<3*i,o=e.loading.end-e.loading.start,l=t.availabilityDelay;if(!1===t.updated)if(s){var c=333*t.misses;r=Math.max(Math.min(n,2*o),c),t.availabilityDelay=(t.availabilityDelay||0)+r}else r=n;else s?(l=Math.min(l||i/2,a),t.availabilityDelay=l,r=l+i-a):r=i-o;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: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 a,s=self.performance.now(),o=this.retryDate;(!o||s>=o||null!==(a=this.media)&&void 0!==a&&a.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,a=this.levels,o=this.media,h=r.config,d=r.nextLoadLevel;if(null!==i&&(o||!this.startFragRequested&&h.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&a&&a[d]){var f=a[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:o,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(s.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(o,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,a=this.fragmentTracker.getState(e);if(this.fragCurrent=e,a===l.FragmentState.BACKTRACKED){var s=this.fragmentTracker.getBacktrackData(e);if(s)return this._handleFragmentLoadProgress(s),void this._handleFragmentLoadComplete(s);a=l.FragmentState.NOT_LOADED}a===l.FragmentState.NOT_LOADED||a===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)):a===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],a=this.fragLastKbps;r=a&&this.fragCurrent?this.fragCurrent.duration*n.maxBitrate/(1e3*a)+1:0}else r=0;var s=this.getBufferedFrag(e.currentTime+r);if(s){var o=this.followingBufferedFrag(s);if(o){this.abortCurrentFrag();var l=o.maxStartPTS?o.maxStartPTS:o.start,c=o.duration,u=Math.max(s.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(s.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(a.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,a=e.level,o=e.details,l=o.totalduration;if(i){this.log("Level "+a+" loaded ["+o.startSN+","+o.endSN+"], cc ["+o.startCC+", "+o.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[a],h=0;if(o.live||null!==(r=u.details)&&void 0!==r&&r.live){if(o.fragments[0]||(o.deltaUpdateFailed=!0),o.deltaUpdateFailed)return;h=this.alignPlaylists(o,u.details)}if(u.details=o,this.levelLastLoaded=a,this.hls.trigger(s.Events.LEVEL_UPDATED,{details:o,level:a}),this.state===n.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=n.State.IDLE}this.startFragRequested?o.live&&this.synchronizeToLiveEdge(o):this.setStartPosition(o,h),this.tick()}else this.warn("Levels were reset while loading level "+a)},C._handleFragmentLoadProgress=function(t){var e,r=t.frag,i=t.part,n=t.payload,a=this.levels;if(a){var s=a[r.level],o=s.details;if(o){var l=s.videoCodec,u=o.PTSKnown||!o.live,f=null===(e=r.initSegment)||void 0===e?void 0:e.data,p=this._getAudioCodec(s),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,o.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 a=this.fragCurrent;null!=a&&a.loader&&(this.log("Switching to main audio track, cancel main fragment load"),a.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var o=this.hls;r&&o.trigger(s.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),o.trigger(s.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,a=!1;for(var s in n){var o=n[s];if("main"===o.id){if(i=s,r=o,"video"===s){var l=n[s];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&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 a=i?i.stats:r.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.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=o.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(o.BufferHelper.isBuffered(t,r)?e=this.getAppendedFrag(r):o.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(s.Events.FRAG_CHANGED,{frag:e}),i&&i.level===n||this.hls.trigger(s.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"),a=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=r(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),o=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[o].start&&s<=n[o].end){a=n[o];break}var l=r.start+r.duration;a?a.end=l:(a={start:s,end:l},n.push(a)),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,a=this.levels;if(!a.length||!a[n]||!a[n].details)return;var s=i-a[n].details.targetduration;if(s<=0)return;e.endOffsetSubtitles=Math.max(0,s),this.tracksBuffered.forEach((function(t){for(var e=0;e=c.length||n!==a)&&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(o.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(s.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,a=this.hls;if(!this.fragContextChanged(e)&&r&&r.byteLength>0&&n&&n.key&&n.iv&&"AES-128"===n.method){var s=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(r),n.key.buffer,n.iv.buffer).then((function(t){var r=performance.now();a.trigger(i.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:s,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 o=r[e].details,l=o.targetduration,h=this.config,d=this.media,f=a.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,d.currentTime-l,h.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(o,"Subtitle track details are defined on idle subtitle stream controller tick");var g,m=o.fragments,v=m.length,y=o.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,a=this.tracksInGroup[n];if(a){var s=a.details;a.details=e.details,this.log("subtitle track "+r+" loaded ["+i.startSN+"-"+i.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,e,s))}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,a=this.tracks.filter((function(t){return!r||t.groupId===r}));this.tracksInGroup=a;var s=this.findTrackId(null==n?void 0:n.name)||this.findTrackId();this.groupId=r;var o={subtitleTracks:a};this.log("Updating subtitle tracks, "+a.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(i.Events.SUBTITLE_TRACKS_UPDATED,o),-1!==s&&this.setSubtitleTrack(s,n)}}},f.findTrackId=function(t){for(var e=this.tracksInGroup,r=0;r=n.length)){this.clearTimer();var a=n[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,a){var s=a.id,o=a.groupId,l=void 0===o?"":o,c=a.name,u=a.type,h=a.url;this.hls.trigger(i.Events.SUBTITLE_TRACK_SWITCH,{id:s,groupId:l,name:c,type:u,url:h});var d=this.switchParams(a.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=0&&(d[0]=Math.min(d[0],e),d[1]=Math.max(d[1],r),u=!0,f/(r-e)>.5))return}if(u||a.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,a=e.id,s=e.initPTS,o=e.timescale,l=this.unparsedVttFrags;"main"===a&&(this.initPTS[i.cc]=s,this.timescale[i.cc]=o),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>>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,a[f]=x<<8|x>>>24,s[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>>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:"+s+", ADTS type:"+o+", samplingIndex:"+p),/firefox/i.test(h)?p>=6?(o=5,u=new Array(4),l=p-3):(o=2,u=new Array(2),l=p):-1!==h.indexOf("android")?(o=2,u=new Array(2),l=p):(o=5,u=new Array(4),s&&(-1!==s.indexOf("mp4a.40.29")||-1!==s.indexOf("mp4a.40.5"))||!s&&p>=6?l=p-3:((s&&-1!==s.indexOf("mp4a.40.2")&&(p>=6&&1===c||/vivaldi/i.test(h))||!s&&1===c)&&(o=2,u=new Array(2)),l=p)),u[0]=o<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===o&&(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."+o,manifestCodec:d};t.trigger(a.Events.ERROR,{type:n.ErrorTypes.MEDIA_ERROR,details:n.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function o(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,a){if(!t.samplerate){var o=s(e,r,n,a);if(!o)return;t.config=o.config,t.samplerate=o.samplerate,t.channelCount=o.channelCount,t.codec=o.codec,t.manifestCodec=o.manifestCodec,i.logger.log("parsed codec:"+t.codec+", rate:"+o.samplerate+", channels:"+o.channelCount)}}function g(t){return 9216e4/t}function m(t,e,r,i,n){var a=l(t,e),s=c(t,e);if((s-=a)>0)return{headerLength:a,frameLength:s,stamp:r+i*n}}function v(t,e,r,i,n){var a=m(e,r,i,n,g(t.samplerate));if(a){var s,o=a.frameLength,l=a.headerLength,c=a.stamp,u=l+o,h=Math.max(0,r+u-e.length);h?(s=new Uint8Array(u-l)).set(e.subarray(r+l,e.length),0):s=e.subarray(r+l,r+u);var d={unit:s,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"),a=r(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),s=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),o=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(s.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;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;i0)return t.subarray(r,r+i)},o=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)&&o(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(a);break;case 12:case 13:s=t[u++],c+=String.fromCharCode((31&a)<<6|63&s);break;case 14:s=t[u++],o=t[u++],c+=String.fromCharCode((15&a)<<12|(63&s)<<6|(63&o)<<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": +/*!*********************************!*\ + !*** ./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"),a=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=r(/*! ./mpegaudio */"./src/demux/mpegaudio.ts");function o(t,e){return(o=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,o(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 a=Object(i.segmentValidRange)(e);this.remainderData=a.remainder,r.samples=a.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}();a.minProbeByteLength=1024,e.default=a},"./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],a=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],s=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],o=[0,1,1,4];function l(t,e,r,i,n){if(!(r+24>e.length)){var a=c(e,r);if(a&&r+a.frameLength<=e.length){var s=i+n*(9e4*a.samplesPerFrame/a.sampleRate),o={unit:e.subarray(r,r+a.frameLength),pts:s,dts:s};return t.config=[],t.channelCount=a.channelCount,t.samplerate=a.sampleRate,t.samples.push(o),{sample:o,length:a.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=a[3*(3===r?0:2===r?1:2)+u],g=3===d?1:2,m=s[r][l],v=o[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+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,a,s){var o=Object(n.discardEPB)(a.data),l=this.getAvcEncryptedData(o),c=this;this.decryptBuffer(l.buffer,(function(n){a.data=c.getAvcDecryptedUnit(o,n),s||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 a=n[r];if(!(a.data.length<=48||1!==a.type&&5!==a.type)){var s=this.decrypter.isSync();if(this.decryptAvcSample(t,e,r,i,a,s),!s)return}}}},t}();e.default=a},"./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"),a=r(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=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;s.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:o.ErrorTypes.OTHER_ERROR,details:o.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){s.logger.warn("Error in worker:",t),s.logger.error("Error while initializing DemuxerWorker, fallback to inline"),m&&self.URL.revokeObjectURL(m.objectURL),this.transmuxer=new a.default(this.observer,p,d,g,e),this.worker=null}}else this.transmuxer=new a.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,o,l,c,u,h){var d=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,g=o?o.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),k=self.performance.now();(b||x||0===n.stats.parsing.start)&&(n.stats.parsing.start=k),!o||!S&&C||(o.stats.parsing.start=k);var w=new a.TransmuxState(y,C,c,b,g);if(!C||y){s.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 a.TransmuxConfig(r,i,e,l,h);this.configureTransmuxer(E)}if(this.frag=n,this.part=o,p)p.postMessage({cmd:"demux",data:t,decryptdata:m,chunkMeta:u,state:w},t instanceof ArrayBuffer?[t]:[]);else if(f){var T=f.push(t,m,u,w);Object(a.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(a.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": +/*!****************************************!*\ + !*** ./src/demux/transmuxer-worker.ts ***! + \****************************************/ +/*! exports provided: default */function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return o}));var i=r(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),n=r(/*! ../events */"./src/events.ts"),a=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=r(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function o(t){var e=new s.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 s=n.data;switch(s.cmd){case"init":var o=JSON.parse(s.config);t.transmuxer=new i.default(e,s.typeSupported,o,s.vendor,s.id),Object(a.enableLogs)(o.debug),r("init",null);break;case"configure":t.transmuxer.configure(s.config);break;case"demux":var c=t.transmuxer.push(s.data,s.decryptdata,s.chunkMeta,s.state);Object(i.isPromise)(c)?c.then((function(e){l(t,e)})):l(t,c);break;case"flush":var h=s.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,a=n.audio,s=n.video;a&&c(i,a),s&&c(i,s),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": +/*!*********************************!*\ + !*** ./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"),a=r(/*! ../errors */"./src/errors.ts"),s=r(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),o=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:o.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 a=this,s=r.transmuxing;s.executeStart=i();var o=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}(o,e);if(d&&"AES-128"===d.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(o,d.key.buffer,d.iv.buffer).then((function(t){var e=a.push(t,null,r);return a.decryptionPromise=null,e})),this.decryptionPromise;var g=f.softwareDecrypt(o,d.key.buffer,d.iv.buffer);if(!g)return s.executeEnd=i(),b(r);o=new Uint8Array(g)}var m=n||u,v=m.contiguous,y=m.discontinuity,x=m.trackSwitch,S=m.accurateTimeOffset,C=m.timeOffset,k=h.audioCodec,w=h.videoCodec,E=h.defaultInitPts,T=h.duration,L=h.initSegmentData;if((y||x)&&this.resetInitSegment(L,k,w,T),y&&this.resetInitialTimestamp(E),v||this.resetContiguity(),this.needsProbing(o,y,x)){if(l.dataLength){var A=l.flush();o=Object(p.appendUint8Array)(A,o)}this.configureTransmuxer(o,h)}var D=this.transmux(o,d,C,S,r),_=this.currentTransmuxState;return _.contiguous=!0,_.discontinuity=!1,_.trackSwitch=!1,s.executeEnd=i(),D},e.flush=function(t){var e=this,r=t.transmuxing;r.executeStart=i();var s=this.decrypter,o=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return e.flush(t)}));var u=[],h=l.timeOffset;if(s){var d=s.flush();d&&u.push(this.push(d,null,t))}var f=o.dataLength;o.reset();var p=this.demuxer,g=this.remuxer;if(!p||!g)return f>=v&&this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.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,a=e.avcTrack,s=e.id3Track,o=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,a,s,o,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,a=this.remuxer;n&&a&&(n.resetInitSegment(e,r,i),a.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),a=n.audioTrack,s=n.avcTrack,o=n.id3Track,l=n.textTrack;return{remuxResult:this.remuxer.remux(a,s,o,l,e,r,!1,this.id),chunkMeta:i}},e.transmuxSampleAes=function(t,e,r,i,n){var a=this;return this.demuxer.demuxSampleAes(t,e,r).then((function(t){return{remuxResult:a.remuxer.remux(t.audioTrack,t.avcTrack,t.id3Track,t.textTrack,r,i,!1,a.id),chunkMeta:n}}))},e.configureTransmuxer=function(t,e){for(var r,i=this.config,n=this.observer,a=this.typeSupported,s=this.vendor,o=e.audioCodec,c=e.defaultInitPts,u=e.duration,h=e.initSegmentData,f=e.videoCodec,p=0,v=m.length;p>4>1){if((_=L+5+e[L+4])===L+188)continue}else _=L+4;switch(D){case f:A&&(p&&(a=v(p))&&this.parseAVCPES(a,!1),p={data:[],size:0}),p&&(p.data.push(e.subarray(_,L+188)),p.size+=L+188-_);break;case y:A&&(x&&(a=v(x))&&(o.isAAC?this.parseAACPES(a):this.parseMPEGPES(a)),x={data:[],size:0}),x&&(x.data.push(e.subarray(_,L+188)),x.size+=L+188-_);break;case b:A&&(S&&(a=v(S))&&this.parseID3PES(a),S={data:[],size:0}),S&&(S.data.push(e.subarray(_,L+188)),S.size+=L+188-_);break;case 0:A&&(_+=e[_]+1),w=this._pmtId=g(e,_);break;case w:A&&(_+=e[_]+1);var O=m(e,_,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,i);(f=O.avc)>0&&(s.pid=f),(y=O.audio)>0&&(o.pid=y,o.isAAC=O.isAAC),(b=O.id3)>0&&(d.pid=b),C&&!k&&(u.logger.log("reparse from beginning"),C=!1,L=T-188),k=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"});s.pesData=p,o.pesData=x,d.pesData=S;var R={audioTrack:o,avcTrack:s,id3Track:d,textTrack:this._txtTrack};return n&&this.extractRemainingSamples(R),R},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,a=i.pesData,s=r.pesData,o=n.pesData;a&&(e=v(a))?(this.parseAVCPES(e,!0),i.pesData=null):i.pesData=a,s&&(e=v(s))?(r.isAAC?this.parseAACPES(e):this.parseMPEGPES(e),r.pesData=null):(null!=s&&s.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),r.pesData=s),o&&(e=v(o))?(this.parseID3PES(e),n.pesData=null):n.pesData=o},e.demuxSampleAes=function(t,e,r){var i=this.demux(t,r,!0,!this.config.progressive),n=this.sampleAes=new o.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,o=this.parseAVCNALu(t.data),l=this.avcSample,c=!1;t.data=null,l&&o.length&&!n.audFound&&(y(l,n),l=this.avcSample=p(!1,t.pts,t.dts,"")),o.forEach((function(e){switch(e.type){case 1:r=!0,l||(l=i.avcSample=p(!0,t.pts,t.dts,"")),l.frame=!0;var o=e.data;if(c&&o.length>4){var u=new a.default(o).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 a.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()],k=0;k16){for(var w=[],E=0;E<16;E++)w.push(h.readUByte().toString(16)),3!==E&&5!==E&&7!==E&&9!==E||w.push("-");for(var T=f-16,L=new Uint8Array(T),A=0;A=0){var h={data:t.subarray(c,l-a-1),type:u};o.push(h)}else{var d=this.getLastNalUnit();if(d&&(s&&l<=4-s&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-s)),(r=l-a-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&&a>=0){var p={data:t.subarray(c,i),type:u,state:a};o.push(p)}if(0===o.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=a,o},e.parseAACPES=function(t){var e,r,n,a,s,o=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),o=d.missing}for(e=o,r=f.length;e1;){var l=new Uint8Array(o[0].length+o[1].length);l.set(o[0]),l.set(o[1],o[0].length),o[0]=l,o.splice(1,1)}if(1===((e=o[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-(a=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-a)/9e4)+"s delta between PTS and DTS, align them"),n=a):a=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=o.length;fg){h-=g;continue}e=e.subarray(h),g-=h,h=0}d.set(e,s),s+=g}return r&&(r-=i+3),{data:d,pts:n,dts:a,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.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": +/*!*****************************!*\ + !*** ./src/is-supported.ts ***! + \*****************************/ +/*! exports provided: isSupported, changeTypeSupported */function(t,e,r){"use strict";r.r(e),r.d(e,"isSupported",(function(){return a})),r.d(e,"changeTypeSupported",(function(){return s}));var i=r(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function n(){return self.SourceBuffer||self.WebKitSourceBuffer}function a(){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"'),a=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!r&&!!a}function s(){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 a(t){var e="function"==typeof Map?new Map:void 0;return(a=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 s(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 s(t,e,r){return(s=o()?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 o(){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 a=this.config,s=a.fLoader,o=a.loader;return new Promise((function(i,l){r.loader&&r.loader.destroy();var c=r.loader=t.loader=s?new s(a):new o(a),h=d(t),p={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=c.stats,c.load(h,p,{onSuccess:function(e,n,a,s){r.resetLoader(t,c),i({frag:t,part:null,payload:e.data,networkDetails:s})},onError:function(e,i,a){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:a}))},onAbort:function(e,i,a){r.resetLoader(t,c),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:a}))},onTimeout:function(e,i,a){r.resetLoader(t,c),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:a}))},onProgress:function(r,i,n,a){e&&e({frag:t,part:null,payload:n,networkDetails:a})}})}))},e.loadPart=function(t,e,r){var i=this;this.abort();var a=this.config,s=a.fLoader,o=a.loader;return new Promise((function(l,c){i.loader&&i.loader.destroy();var h=i.loader=t.loader=s?new s(a):new o(a),p=d(t,e),g={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=h.stats,h.load(p,g,{onSuccess:function(n,a,s,o){i.resetLoader(t,h),i.updateStatsFromPart(t,e);var c={frag:t,part:e,payload:n.data,networkDetails:o};r(c),l(c)},onError:function(r,a,s){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:s}))},onAbort:function(r,a,s){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:s}))},onTimeout:function(r,a,s){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:s}))}})}))},e.updateStatsFromPart=function(t,e){var r=t.stats,i=e.stats,n=i.total;if(r.loaded+=i.loaded,n){var a=Math.round(t.duration/e.duration),s=Math.min(Math.round(r.loaded/n),a),o=(a-s)*Math.round(r.loaded/s);r.total=r.loaded+o}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},a=r.byteRangeStartOffset,s=r.byteRangeEndOffset;return Object(i.isFiniteNumber)(a)&&Object(i.isFiniteNumber)(s)&&(n.rangeStart=a,n.rangeEnd=s),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),a=1;a>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=o.LevelKey.fromURI(t.uri)).method=t.method,r.iv=this.createInitializationVector(e),r.keyFormat="identity"),r},r.setElementaryStreamInfo=function(t,e,r,i,n,a){void 0===a&&(a=!1);var s=this.elementaryStreams,o=s[t];o?(o.startPTS=Math.min(o.startPTS,e),o.endPTS=Math.max(o.endPTS,r),o.startDTS=Math.min(o.startDTS,i),o.endDTS=Math.max(o.endDTS,n)):s[t]={startPTS:e,endPTS:r,startDTS:i,endDTS:n,partial:a}},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&&s.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,a){var s;(s=t.call(this,i)||this).fragOffset=0,s.duration=0,s.gap=!1,s.independent=!1,s.relurl=void 0,s.fragment=void 0,s.index=void 0,s.stats=new l.LoadStats,s.duration=e.decimalFloatingPoint("DURATION"),s.gap=e.bool("GAP"),s.independent=e.bool("INDEPENDENT"),s.relurl=e.enumeratedString("URI"),s.fragment=r,s.index=n;var o=e.enumeratedString("BYTERANGE");return o&&s.setByteRange(o,a),a&&(s.fragOffset=a.fragOffset+a.duration),s}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 s}));var i=r(/*! ../events */"./src/events.ts"),n=r(/*! ../errors */"./src/errors.ts"),a=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=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,s=this.loaders[n];if(r.decryptdata){var o=r.decryptdata.uri;if(o!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(s&&(a.logger.warn("abort previous key loader for type:"+n),s.abort()),!o)return void a.logger.warn("key uri is falsy");var c=l.loader,u=r.loader=this.loaders[n]=new c(l);this.decrypturl=o,this.decryptkey=null;var h={url:o,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 a.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})):a.logger.error("after key load, decryptdata unset")},e.loaderror=function(t,e){var r=e.frag,a=r.loader;a&&a.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,a=r.loader;a&&a.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": +/*!*************************************!*\ + !*** ./src/loader/level-details.ts ***! + \*************************************/ +/*! exports provided: LevelDetails */function(t,e,r){"use strict";r.r(e),r.d(e,"LevelDetails",(function(){return a}));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),a&&n(e,a),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 a}));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=[],a={},s=!1;for(h.lastIndex=0;null!=(i=h.exec(e));)if(i[1]){var o=new l.AttrList(i[1]),c={attrs:o,bitrate:o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),name:o.NAME,url:t.resolve(i[2],r)},u=o.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((o.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"]&&(s=!0,a[d["DATA-ID"]]=d)}return{levels:n,sessionData:s?a:null}},t.parseMasterPlaylistMedia=function(e,r,i,n){var a;void 0===n&&(n=[]);var s=[],o=0;for(d.lastIndex=0;null!==(a=d.exec(e));){var c=new l.AttrList(a[1]);if(c.TYPE===i){var u={attrs:c,bitrate:0,id:o++,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")}s.push(u)}}return s},t.parseLevelPlaylist=function(t,e,r,u,h){var d,m,v,y=new s.LevelDetails(e),x=y.fragments,S=null,C=0,k=0,w=0,E=0,T=null,L=new a.Fragment(u,e),A=-1,D=!1;for(f.lastIndex=0,y.m3u8=t;null!==(d=f.exec(t));){D&&(D=!1,(L=new a.Fragment(u,e)).start=w,L.sn=C,L.cc=E,L.level=r,S&&(L.initSegment=S,L.rawProgramDateTime=S.rawProgramDateTime));var _=d[1];if(_){L.duration=parseFloat(_);var O=(" "+d[2]).slice(1);L.title=O||null,L.tagList.push(O?["INF",_,O]:["INF",_])}else if(d[3])Object(i.isFiniteNumber)(L.duration)&&(L.start=w,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,w+=L.duration,C++,k=0,D=!0);else if(d[4]){var R=(" "+d[4]).slice(1);T?L.setByteRange(R,T):L.setByteRange(R)}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=o.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 J=y.partList;J||(J=y.partList=[]);var Q=k>0?J[J.length-1]:void 0,tt=k++,et=new a.Part(new l.AttrList(M),L,e,tt,Q);J.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(),w-=T.duration,y.partList&&(y.fragmentHint=T)):y.partList&&(b(L,T),L.cc=E,y.fragmentHint=L);var nt=x.length,at=x[0],st=x[nt-1];if((w+=y.skippedSegments*y.targetduration)>0&&nt&&st){y.averagetargetduration=w/nt;var ot=st.sn;y.endSN="initSegment"!==ot?ot:0,at&&(y.startCC=at.cc,at.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 a.Fragment(u,e)).relurl=st.relurl,L.level=r,L.sn="initSegment",at.initSegment=L,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(w+=y.fragmentHint.duration),y.totalduration=w,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": +/*!***************************************!*\ + !*** ./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"),a=r(/*! ../errors */"./src/errors.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=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,a=e.deliveryDirectives;this.load({id:r,groupId:null,level:i,responseType:"text",type:c.PlaylistContextType.LEVEL,url:n,deliveryDirectives:a})},e.onAudioTrackLoading=function(t,e){var r=e.id,i=e.groupId,n=e.url,a=e.deliveryDirectives;this.load({id:r,groupId:i,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:n,deliveryDirectives:a})},e.onSubtitleTrackLoading=function(t,e){var r=e.id,i=e.groupId,n=e.url,a=e.deliveryDirectives;this.load({id:r,groupId:i,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:n,deliveryDirectives:a})},e.load=function(t){var e,r,i,n,a,o,l=this.hls.config,u=this.getInternalLoader(t);if(u){var h=u.context;if(h&&h.url===t.url)return void s.logger.trace("[playlist-loader]: playlist request ongoing");s.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,a=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,a=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(t),null!==(e=t.deliveryDirectives)&&void 0!==e&&e.part&&(t.type===c.PlaylistContextType.LEVEL&&null!==t.level?o=this.hls.levels[t.level].details:t.type===c.PlaylistContextType.AUDIO_TRACK&&null!==t.id?o=this.hls.audioTracks[t.id].details:t.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==t.id&&(o=this.hls.subtitleTracks[t.id].details),o)){var d=o.partTarget,f=o.targetduration;d&&f&&(i=Math.min(1e3*Math.max(3*d,.8*f),i))}var p={timeout:i,maxRetry:r,retryDelay:n,maxRetryDelay:a,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 a=this.hls,o=t.data,c=h(t,r),d=l.default.parseMasterPlaylist(o,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(o,c,"AUDIO",g),y=l.default.parseMasterPlaylistMedia(o,c,"SUBTITLES",m),b=l.default.parseMasterPlaylistMedia(o,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(t){return!t.url}))||!f[0].audioCodec||f[0].attrs.AUDIO||(s.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:""}))),a.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,s){var o=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};o.trigger(n.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:g,stats:e,networkDetails:s,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,s)}else o.trigger(n.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.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(o.parseSegmentIndex)(new Uint8Array(t.data));if(r){var i=r.references,n=e.levelDetails;i.forEach((function(t,e){var i=t.info,a=n.fragments[e];0===a.byteRange.length&&a.setByteRange(String(1+i.end-i.start)+"@"+String(i.start)),a.initSegment&&a.initSegment.setByteRange(String(r.moovEndOffset)+"@0")}))}},e.handleManifestParsingError=function(t,e,r,i){this.hls.trigger(n.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.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),s.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 o=a.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(t);switch(t.type){case c.PlaylistContextType.MANIFEST:o=r?a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:a.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:o=r?a.ErrorDetails.LEVEL_LOAD_TIMEOUT:a.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:o=r?a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:o=r?a.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:a.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(t.type);var h={type:a.ErrorTypes.NETWORK_ERROR,details:o,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 a=r.type,s=r.level,o=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)),a){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(n.Events.LEVEL_LOADED,{details:h,level:s||0,id:o||0,stats:e,networkDetails:i,deliveryDirectives:d});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(n.Events.AUDIO_TRACK_LOADED,{details:h,id:o||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:o||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": +/*!*********************************!*\ + !*** ./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": +/*!*********************************!*\ + !*** ./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": +/*!************************************!*\ + !*** ./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]),a=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=a,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 s=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,s,l,s,o),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,o[1]=e>>16&255,o[2]=e>>8&255,o[3]=255&e,o.set(t,4),a=0,e=8;a>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,a>>24,a>>16&255,a>>8&255,255&a,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)),a=Math.floor(r%(i+1)),s=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,a>>24,a>>16&255,a>>8&255,255&a,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,s)},t.sdtp=function(e){var r,i,n=e.samples||[],a=new Uint8Array(4+n.length);for(r=0;r>>8&255),a.push(255&n),a=a.concat(Array.prototype.slice.call(i));for(r=0;r>>8&255),s.push(255&n),s=s.concat(Array.prototype.slice.call(i));var o=t.box(t.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|e.sps.length].concat(a).concat([e.pps.length]).concat(s))),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]),o,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,a=e.width,s=e.height,o=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,o>>24,o>>16&255,o>>8&255,255&o,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,a>>8&255,255&a,0,0,s>>8&255,255&s,0,0]))},t.traf=function(e,r){var n=t.sdtp(e),a=e.id,s=Math.floor(r/(i+1)),o=Math.floor(r%(i+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,o>>24,o>>16&255,o>>8&255,255&o])),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,a,s,o,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,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.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": +/*!**********************************!*\ + !*** ./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"),a=r(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),s=r(/*! ../events */"./src/events.ts"),o=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,a,s,o){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,k=S>1;if((!b||C)&&(!x||k)||this.ISGenerated||s){this.ISGenerated||(d=this.generateIS(t,e,n));var w=this.isVideoContiguous,E=-1;if(k&&(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&&k){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,a,x||k||o===c.PlaylistLevelType.AUDIO?y:void 0),k){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,w,D)}}else k&&(u=this.remuxVideo(e,y,w,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,s,o,l=t.samples,c=e.samples,u=this.typeSupported,h={},d=!Object(i.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(n=s=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):a.default.initSegment([t]),metadata:{channelCount:t.channelCount}},d&&(o=t.inputTimeScale,n=s=l[0].pts-Math.round(o*r))),e.sps&&e.pps&&c.length&&(e.timescale=e.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:e.codec,initSegment:a.default.initSegment([e]),metadata:{width:e.width,height:e.height}},d)){o=e.inputTimeScale;var p=this.getVideoStartPts(c),g=Math.round(o*r);s=Math.min(s,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=s),{tracks:h,initPTS:n,timescale:o}},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,k=8,w=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 _=Math.round((f-c)/(x-1));if(T<0){if(T<-2*_){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-_,!0)+" ms");for(var O=T,R=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 at=Math.floor(it.maxBufferHole*g),st=(i?w+i*g:this.nextAudioPts)-X.pts;st>at?((n=st-nt)<0&&(n=nt),l.logger.log("[mp4-remuxer]: It is approximately "+st/90+" ms to the next segment; using duration "+n/90+" ms for the last video frame.")):n=nt}else n=nt}var ot=Math.round(X.pts-X.dts);b.push(new v(X.key,n,Z,ot))}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:a.default.moof(t.sequenceNumber++,c,h({},t,{samples:b})),data2:V,startPTS:w/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,k=e*u;if(this.isAudioContiguous=r=r||x.length&&C>0&&(i&&Math.abs(k-C)<9e3||Math.abs(m(x[0].pts-g,k)-C)<20*p),x.forEach((function(t){t.pts=m(t.pts-g,k)})),!r||C<0){if(!(x=x.filter((function(t){return t.pts>=0}))).length)return;C=0===c?0:i?Math.max(0,k):x[0].pts}if(t.isAAC)for(var w=void 0!==c,E=this.config.maxAudioFramesDrift,T=0,L=C;T=E*p&&O<1e4&&w){var R=Math.round(_/p);(L=D-R*p)<0&&(R--,L+=p),0===T&&(this.nextAudioPts=C=L),l.logger.warn("[mp4-remuxer]: Injecting "+R+" audio frame @ "+(L/u).toFixed(3)+"s due to "+Math.round(1e3*_/u)+" ms gap.");for(var I=0;I0))return;j+=S;try{N=new Uint8Array(j)}catch(t){return void this.observer.emit(s.Events.ERROR,s.Events.ERROR,{type:o.ErrorTypes.MUX_ERROR,details:o.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:j,reason:"fail allocating audio mdat "+j})}y||(new DataView(N.buffer).setUint32(0,j),N.set(a.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):a.default.moof(t.sequenceNumber++,F/d,h({},t,{samples:b}));t.samples=[];var $=F/u,Z=C/u,J={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"),J}},e.remuxEmptyAudio=function(t,e,r,i){var a=t.inputTimeScale,s=a/(t.samplerate?t.samplerate:a),o=this.nextAudioPts,c=(null!==o?o:i.startDTS*a)+this._initDTS,u=i.endDTS*a+this._initDTS,h=1024*s,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": +/*!******************************************!*\ + !*** ./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"),a=r(/*! ../loader/fragment */"./src/loader/fragment.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=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,a.ElementaryStreamTypes.AUDIO)),r||(r=c(i.video,a.ElementaryStreamTypes.VIDEO));var o={};i.audio&&i.video?o.audiovideo={container:"video/mp4",codec:e+","+r,initSegment:t,id:"main"}:i.audio?o.audio={container:"audio/mp4",codec:e,initSegment:t,id:"audio"}:i.video?o.video={container:"video/mp4",codec:r,initSegment:t,id:"main"}:s.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=o},e.remux=function(t,e,r,a,o){var c=this.initPTS,u=this.lastEndDTS,h={audio:void 0,video:void 0,text:a,id3:r,initSegment:void 0};Object(i.isFiniteNumber)(u)||(u=this.lastEndDTS=o||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 s.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:(s.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=a,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===a.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}e.default=o},"./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": +/*!***************************!*\ + !*** ./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 s})),r.d(e,"CMCDObjectType",(function(){return i})),r.d(e,"CMCDStreamingFormat",(function(){return n})),r.d(e,"CMCDStreamType",(function(){return a}));var i,n,a,s=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"}(a||(a={}))},"./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": +/*!************************************!*\ + !*** ./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,a=null;r<=i;){var s=e(a=t[n=(r+i)/2|0]);if(s>0)r=n+1;else{if(!(s<0))return a;i=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 a}));var i=r(/*! ./logger */"./src/utils/logger.ts"),n={length:0,start:function(){return 0},end:function(){return 0}},a=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,a=t.getBuffered(e),s=[];for(n=0;ns&&(i[a-1].end=t[n].end):i.push(t[n])}else i.push(t[n])}else i=t;for(var o,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=s(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,a,s=!1;this.logger.time=t;for(var o=0;o ("+f([n,a])+")"),(r=this.parseCmd(n,a))||(r=this.parseMidrow(n,a)),r||(r=this.parsePAC(n,a)),r||(r=this.parseBackgroundAttributes(n,a)),!r&&(s=this.parseChars(n,a))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(s):this.logger.log(i.WARNING,"No channel found yet. TEXT-MODE?")}r||s||this.logger.log(i.WARNING,"Couldn't parse cleaned data "+f([n,a])+" orig: "+f([e[o],e[o+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,a=this.channels[n];return 20===t||21===t||28===t||29===t?32===e?a.ccRCL():33===e?a.ccBS():34===e?a.ccAOF():35===e?a.ccAON():36===e?a.ccDER():37===e?a.ccRU(2):38===e?a.ccRU(3):39===e?a.ccRU(4):40===e?a.ccFON():41===e?a.ccRDC():42===e?a.ccTR():43===e?a.ccRTD():44===e?a.ccEDM():45===e?a.ccCR():46===e?a.ccENM():47===e&&a.ccEOC():a.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?o[t]:c[t]:1===n?l[t]:u[t];var a=this.channels[n];return!!a&&(a.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,a=null,o=null;if(t>=25?(r=2,o=t-8):(r=1,o=t),o>=17&&o<=19?(n=17===o?e+80:18===o?e+112:e+144,this.logger.log(i.INFO,"Special char '"+s(n)+"' in channel "+r),a=[n]):t>=32&&t<=127&&(a=0===e?[t]:[t,e]),a){var l=f(a);this.logger.log(i.DEBUG,"Char codes = "+l.join(",")),x(t,e,this.cmdHistory)}return a},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=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(a.addCueToTrack)(t,e)}))),f}};e.default=o},"./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 s})),r.d(e,"shouldAlignOnDiscontinuities",(function(){return o})),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"),a=r(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function s(t,e){for(var r=null,i=0,n=t.length;ir.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": +/*!***************************!*\ + !*** ./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": +/*!***********************************!*\ + !*** ./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"),a=r(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.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,u(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),c(i,t)})(t)}function o(t,e,r){return(o=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,s.flush(),t)):n(e,r,l,t),a()})).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}(s(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"),a=r(/*! ./vttcue */"./src/utils/vttcue.ts"),s=r(/*! ../demux/id3 */"./src/demux/id3.ts"),o=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 o(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>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,a=[];if(!e.length)return a;"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(o(r.subarray(l+4,l+8))===e[0])if(1===e.length)a.push({data:r,start:l+8,end:d});else{var f=h({data:r,start:l+8,end:d},e.slice(1));f.length&&s.apply(a,f)}l=d}return a}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=[],a=i[0],s=a.data[0],o=0===s?8:16,u=c(a,o);o+=4,o+=0===s?8:16,o+=2;var d=a.end+0,f=l(a,o);o+=2;for(var p=0;p>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(a,g);g+=4,n.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/u,start:d,end:d+v-1}}),d+=v,o=g+=4}return{earliestPresentationTime:0,timescale:u,version:s,referencesCount:f,references:n,moovEndOffset:r}}function f(t){for(var e=[],r=h(t,["moov","trak"]),i=0;it)&&(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": +/*!**************************************!*\ + !*** ./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 a})),r.d(e,"clearCurrentCues",(function(){return s})),r.d(e,"removeCuesInRange",(function(){return o})),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 a(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 s(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 o(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),a=0;at[r].endTime)return-1;for(var i=0,n=r;i<=n;){var a=Math.floor((n+i)/2);if(et[a].startTime&&i-1)for(var a=n,s=t.length;a=e&&o.endTime<=r)i.push(o);else if(o.startTime>r)return i}return i}},"./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(o,"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(o,"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(o,"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}})),o.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}()},"./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 a})),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 a(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 s=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 o(t,e,r,i){var n=i?t.split(i):[t];for(var a in n)if("string"==typeof n[a]){var s=n[a].split(r);2===s.length&&e(s[0],s[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=a(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 s;o(t,(function(t,e){var n;switch(t){case"region":for(var a=r.length-1;a>=0;a--)if(r[a].id===e){i.set(t,r[a].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 a=i.get("position","auto");"auto"===a&&50===l.position&&(a="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=a}(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);r>>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(a.utf8ArrayToStr)(new Uint8Array(t)).trim().replace(l,"\n").split("\n"),b=[],x=Object(s.toMpegTsClockFromTimescale)(e,r),S="00:00.000",C=0,k=0,w=!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!==k?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!==(a=n)&&void 0!==a&&a.new;){var a;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,a=Object(o.normalizePts)(9e4*(t.startTime+r-k),9e4*f)/9e4;t.startTime=a,t.endTime=a+n}var s=t.text.trim();t.text=decodeURIComponent(encodeURIComponent(s)),t.id||(t.id=h(t.startTime,t.endTime,s)),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(w){if(c(t,"X-TIMESTAMP-MAP=")){w=!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{k=function(t){var e=parseInt(t.substr(-3)),r=parseInt(t.substr(-6,2)),n=parseInt(t.substr(-9,2)),a=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)(a)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+t);return e+=1e3*r,e+=6e4*n,e+=36e5*a}(S)/1e3}catch(t){E=!1,m=t}return}""===t&&(w=!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"),a=/^age:\s*[\d.]+\s*$/m,s=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 a=this.context.headers;if(a)for(var s in a)r.setRequestHeader(s,a[s])}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,a=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 s=e.status;if(s>=200&&s<300){var o,l;if(r.loading.end=Math.max(self.performance.now(),r.loading.first),l="arraybuffer"===t.responseType?(o=e.response).byteLength:(o=e.responseText).length,r.loaded=r.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(r,t,o,e),!this.callbacks)return;var u={url:e.responseURL,data:o};this.callbacks.onSuccess(u,r,t,e)}else r.retry>=a.maxRetry||s>=400&&s<499?(i.logger.error(s+" while loading "+t.url),this.callbacks.onError({code:s,text:e.statusText},t,e)):(i.logger.warn(s+" 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,a.maxRetryDelay),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.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&&a.test(this.loader.getAllResponseHeaders())){var e=this.loader.getResponseHeader("age");t=e?parseFloat(e):null}return t},t}();e.default=s}}).default},t.exports=i())},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: +/*!**************************************************!*\ + !*** ./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 o})),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"),a=r.n(n),s=r(/*! @/utils/fetch */"ErOA");function o(t){return Object(s.c)("libraries/".concat(t,".json"))}function l(){return Object(s.c)("library_tags.json")}function c(t){return u.apply(this,arguments)}function u(){return(u=Object(i.a)(a.a.mark((function t(e){var r;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(s.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(s.f)("libraries.json",t)}function d(t,e){return Object(s.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")),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),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/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,k={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) ")))}}}]); \ No newline at end of file diff --git a/p__Classrooms__Lists__ShixunHomeworks__Detail__index.f56bc3e5.async.js b/p__Classrooms__Lists__ShixunHomeworks__Detail__index.f56bc3e5.async.js new file mode 100644 index 0000000000..6f6971be0c --- /dev/null +++ b/p__Classrooms__Lists__ShixunHomeworks__Detail__index.f56bc3e5.async.js @@ -0,0 +1,1763 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[95,3,5,7,8,10],{"+NIl": +/*!***************************************************!*\ + !*** ./node_modules/codemirror/mode/stex/stex.js ***! + \***************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function r(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function i(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var a={};function o(e,t){e.f=t}function s(e,t){var i;if(e.match(/^\\[a-zA-Z@]+/)){var s=e.current().slice(1);return n(t,i=new(i=a.hasOwnProperty(s)?a[s]:a.DEFAULT)),o(t,c),i.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return o(t,(function(e,t){return l(e,t,"\\]")})),"keyword";if(e.match("\\("))return o(t,(function(e,t){return l(e,t,"\\)")})),"keyword";if(e.match("$$"))return o(t,(function(e,t){return l(e,t,"$$")})),"keyword";if(e.match("$"))return o(t,(function(e,t){return l(e,t,"$")})),"keyword";var u=e.next();return"%"==u?(e.skipToEnd(),"comment"):"}"==u||"]"==u?(i=r(t))?(i.closeBracket(u),o(t,c),"bracket"):"error":"{"==u||"["==u?(n(t,i=new(i=a.DEFAULT)),"bracket"):/\d/.test(u)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(i=function(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var r=t[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(t)).name&&(i.argument=e.current()),i.styleIdentifier())}function l(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return o(t,s),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=e.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(e.skipToEnd(),"comment"):"error"}function c(e,t){var n=e.peek();return"{"==n||"["==n?(r(t).openBracket(n),e.eat(n),o(t,s),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(o(t,s),function(e){var t=e.cmdState.pop();t&&t.closeBracket()}(t),s(e,t))}return a.importmodule=i("importmodule","tag",["string","builtin"]),a.documentclass=i("documentclass","tag",["","atom"]),a.usepackage=i("usepackage","tag",["atom"]),a.begin=i("begin","tag",["atom"]),a.end=i("end","tag",["atom"]),a.label=i("label","tag",["atom"]),a.ref=i("ref","tag",["atom"]),a.eqref=i("eqref","tag",["atom"]),a.cite=i("cite","tag",["atom"]),a.bibitem=i("bibitem","tag",["atom"]),a.Bibitem=i("Bibitem","tag",["atom"]),a.RBibitem=i("RBibitem","tag",["atom"]),a.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return l(e,t)}:s}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=s,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}(n(/*! ../../lib/codemirror */"VrN/"))},"06Qe": +/*!**********************************************!*\ + !*** ./node_modules/zrender/lib/vml/core.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i=n(/*! ../core/env */"ItGF"),a="urn:schemas-microsoft-com:vml",o="undefined"==typeof window?null:window,s=!1,l=o&&o.document;if(l&&!i.canvasSupported)try{!l.namespaces.zrvml&&l.namespaces.add("zrvml",a),r=function(e){return l.createElement("')}}catch(e){r=function(e){return l.createElement("<"+e+' xmlns="'+a+'" class="zrvml">')}}t.doc=l,t.createNode=function(e){return r(e)},t.initVML=function(){if(!s&&l){s=!0;var e=l.styleSheets;e.length<31?l.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):e[0].addRule(".zrvml","behavior:url(#default#VML)")}}},"0s+r": +/*!*********************************************!*\ + !*** ./node_modules/zrender/lib/Handler.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core/util */"bYtY"),i=n(/*! ./core/vector */"QBsz"),a=n(/*! ./mixin/Draggable */"y23F"),o=n(/*! ./mixin/Eventful */"H6uX"),s=n(/*! ./core/event */"YH21"),l=n(/*! ./core/GestureMgr */"C0SR");function c(){s.stop(this.event)}function u(){}u.prototype.dispose=function(){};var h=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],d=function(e,t,n,r){o.call(this),this.storage=e,this.painter=t,this.painterRoot=r,n=n||new u,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,a.call(this),this.setHandlerProxy(n)};function f(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r,i=e;i;){if(i.clipPath&&!i.clipPath.contain(t,n))return!1;i.silent&&(r=!0),i=i.parent}return!r||"silent"}return!1}function p(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}d.prototype={constructor:d,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(r.each(h,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},mousemove:function(e){var t=e.zrX,n=e.zrY,r=p(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(a=(i=this.findHover(i.x,i.y)).target);var o=this._hovered=r?{x:t,y:n}:this.findHover(t,n),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(i,"mouseout",e),this.dispatchToElement(o,"mousemove",e),s&&s!==a&&this.dispatchToElement(o,"mouseover",e)},mouseout:function(e){var t=e.zrEventControl,n=e.zrIsToLocalDOM;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&!n&&this.trigger("globalout",{type:"globalout",event:e})},resize:function(e){this._hovered={}},dispatch:function(e,t){var n=this[e];n&&n.call(this,t)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},dispatchToElement:function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var i="on"+t,a=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:c}}(t,e,n);r&&(r[i]&&(a.cancelBubble=r[i].call(r,a)),r.trigger(t,a),r=r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer((function(e){"function"==typeof e[i]&&e[i].call(e,a),e.trigger&&e.trigger(t,a)})))}},findHover:function(e,t,n){for(var r=this.storage.getDisplayList(),i={x:e,y:t},a=r.length-1;a>=0;a--){var o;if(r[a]!==n&&!r[a].ignore&&(o=f(r[a],e,t))&&(!i.topTarget&&(i.topTarget=r[a]),"silent"!==o)){i.target=r[a];break}}return i},processGesture:function(e,t){this._gestureMgr||(this._gestureMgr=new l);var n=this._gestureMgr;"start"===t&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),r){var i=r.type;e.gestureEvent=i,this.dispatchToElement({target:r.target},i,r.event)}}},r.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){d.prototype[e]=function(t){var n,r,a=t.zrX,o=t.zrY,s=p(this,a,o);if("mouseup"===e&&s||(r=(n=this.findHover(a,o)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||i.dist(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}})),r.mixin(d,o),r.mixin(d,a);var m=d;e.exports=m},"19Vz": +/*!**************************************************************!*\ + !*** ./node_modules/codemirror/addon/display/placeholder.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){a(e)&&n(e)}function i(e){var r=e.getWrapperElement(),i=a(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(a,o,s){var l=s&&s!=e.Init;if(o&&!l)a.on("blur",r),a.on("change",i),a.on("swapDoc",i),e.on(a.getInputField(),"compositionupdate",a.state.placeholderCompose=function(){!function(e){setTimeout((function(){var r=!1,i=e.getInputField();"TEXTAREA"==i.nodeName?r=!i.value:1==e.lineCount()&&(r=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),r?n(e):t(e)}),20)}(a)}),i(a);else if(!o&&l){a.off("blur",r),a.off("change",i),a.off("swapDoc",i),e.off(a.getInputField(),"compositionupdate",a.state.placeholderCompose),t(a);var c=a.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}o&&!a.hasFocus()&&r(a)}))}(n(/*! ../../lib/codemirror */"VrN/"))},"1Jh7": +/*!************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/Polyline.js ***! + \************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../helper/poly */"T6xi"),a=r.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(e,t){i.buildPath(e,t,!1)}});e.exports=a},"1MYJ": +/*!**********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/CompoundPath.js ***! + \**********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Path */"y+Vt"),i=r.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var e=this.__dirtyPath,t=this.shape.paths,n=0;n=this._maxSize&&o>0){var l=n.head;n.remove(l),delete r[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new i(t),s.key=e,n.insertEntry(s),r[e]=s}return a},o.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},o.clear=function(){this._list.clear(),this._map={}};var s=a;e.exports=s},"1ZF9": +/*!*****************************************!*\ + !*** ./src/assets/images/Authorize.png ***! + \*****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/Authorize.cc9c212f.png"},"1bdT": +/*!*********************************************!*\ + !*** ./node_modules/zrender/lib/Element.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core/guid */"3gBT"),i=n(/*! ./mixin/Eventful */"H6uX"),a=n(/*! ./mixin/Transformable */"DN4a"),o=n(/*! ./mixin/Animatable */"vWvF"),s=n(/*! ./core/util */"bYtY"),l=function(e){a.call(this,e),i.call(this,e),o.call(this,e),this.id=e.id||r()};l.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(e,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(e,t){},attrKV:function(e,t){if("position"===e||"scale"===e||"origin"===e){if(t){var n=this[e];n||(n=this[e]=[]),n[0]=t[0],n[1]=t[1]}}else this[e]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(s.isObject(e))for(var n in e)e.hasOwnProperty(n)&&this.attrKV(n,e[n]);return this.dirty(!1),this},setClipPath:function(e){var t=this.__zr;t&&e.addSelfToZr(t),this.clipPath&&this.clipPath!==e&&this.removeClipPath(),this.clipPath=e,e.__zr=t,e.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var e=this.clipPath;e&&(e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n")):null:e.match("--")?n(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=h;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(a=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=h,a=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return a="equals",null;if("<"==i){t.tokenize=h,t.state=v,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=d;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=h;break}n.next()}return e}}function p(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function m(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;m(e)}}function v(e,t,n){return"openTag"==e?(n.tagStart=t.column(),y):"closeTag"==e?b:v}function y(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",k):l.allowMissingTagName&&"endTag"==e?(o="tag bracket",k(e,0,n)):(o="error",y)}function b(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(o="tag",x):(o="tag error",w)}return l.allowMissingTagName&&"endTag"==e?(o="tag bracket",x(e,0,n)):(o="error",w)}function x(e,t,n){return"endTag"!=e?(o="error",x):(m(n),v)}function w(e,t,n){return o="error",x(e,0,n)}function k(e,t,n){if("word"==e)return o="attribute",C;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new p(n,r,i==n.indented)),v}return o="error",k}function C(e,t,n){return"equals"==e?E:(l.allowMissing||(o="error"),k(e,0,n))}function E(e,t,n){return"string"==e?S:"word"==e&&l.allowUnquoted?(o="string",k):(o="error",k(e,0,n))}function S(e,t,n){return"string"==e?S:k(e,0,n)}return h.isInText=!0,{startState:function(e){var t={tokenize:h,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;a=null;var n=t.tokenize(e,t);return(n||a)&&"comment"!=n&&(o=null,t.state=t.state(a||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=d&&t.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==E&&(e.state=k)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(/*! ../../lib/codemirror */"VrN/"))},"1j5w": +/*!*******************************************************!*\ + !*** ./node_modules/rc-menu/es/index.js + 11 modules ***! + \*******************************************************/ +/*! exports provided: SubMenu, Item, MenuItem, MenuItemGroup, ItemGroup, Divider, default */ +/*! exports used: Divider, Item, ItemGroup, SubMenu, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */ +/*! 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)) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.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/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"d",(function(){return oe})),n.d(t,"b",(function(){return xe})),n.d(t,"c",(function(){return ke})),n.d(t,"a",(function(){return Ee}));var r=n("VTBJ"),i=n("1OyB"),a=n("vuIU"),o=n("JX7q"),s=n("Ji7U"),l=n("LK+K"),c=n("q1tI"),u=n("I8Z2"),h=n("BGR+"),d=n("wx14"),f=n("rePB"),p=n("4IlW"),m=n("2GS6"),g=n("Gytx"),v=n.n(g),y=n("TSYQ"),b=n.n(y),x=n("U8pU"),w=n("ODXe"),k=/iPhone/i,C=/iPod/i,E=/iPad/i,S=/\bAndroid(?:.+)Mobile\b/i,T=/Android/i,_=/\bAndroid(?:.+)SD4930UR\b/i,O=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,L=/Windows Phone/i,A=/\bWindows(?:.+)ARM\b/i,D=/BlackBerry/i,M=/BB10/i,R=/Opera Mini/i,I=/\b(CriOS|Chrome)(?:.+)Mobile/i,j=/Mobile(?:.+)Firefox\b/i;function N(e,t){return e.test(t)}function P(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),n=t.split("[FBAN");if(void 0!==n[1]){var r=n;t=Object(w.a)(r,1)[0]}if(void 0!==(n=t.split("Twitter"))[1]){var i=n;t=Object(w.a)(i,1)[0]}var a={apple:{phone:N(k,t)&&!N(L,t),ipod:N(C,t),tablet:!N(k,t)&&N(E,t)&&!N(L,t),device:(N(k,t)||N(C,t)||N(E,t))&&!N(L,t)},amazon:{phone:N(_,t),tablet:!N(_,t)&&N(O,t),device:N(_,t)||N(O,t)},android:{phone:!N(L,t)&&N(_,t)||!N(L,t)&&N(S,t),tablet:!N(L,t)&&!N(_,t)&&!N(S,t)&&(N(O,t)||N(T,t)),device:!N(L,t)&&(N(_,t)||N(O,t)||N(S,t)||N(T,t))||N(/\bokhttp\b/i,t)},windows:{phone:N(L,t),tablet:N(A,t),device:N(L,t)||N(A,t)},other:{blackberry:N(D,t),blackberry10:N(M,t),opera:N(R,t),firefox:N(j,t),chrome:N(I,t),device:N(D,t)||N(M,t)||N(R,t)||N(j,t)||N(I,t)},any:null,phone:null,tablet:null};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var F=Object(r.a)(Object(r.a)({},P()),{},{isMobile:P});function B(){}function H(e,t,n){var r=t||"";return e.key||"".concat(r,"item_").concat(n)}function z(e){return"".concat(e,"-menu-")}function U(e,t){var n=-1;c.Children.forEach(e,(function(e){n+=1,e&&e.type&&e.type.isMenuItemGroup?c.Children.forEach(e.props.children,(function(e){t(e,n+=1)})):t(e,n)}))}var V=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],W=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),i=r.marginLeft,a=r.marginRight;n+=+i.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},G=function(e,t,n){e&&"object"===Object(x.a)(e.style)&&(e.style[t]=n)},K=n("KQm4"),Y=n("Ff2n"),q=n("i8i4"),X=n("bdgK"),$=n("uciX"),Q=n("8XRh"),J={adjustX:1,adjustY:1},Z={topLeft:{points:["bl","tl"],overflow:J,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:J,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:J,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:J,offset:[4,0]}},ee={topLeft:{points:["bl","tl"],overflow:J,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:J,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:J,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:J,offset:[4,0]}},te=0,ne={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},re=function(e,t,n){var i=z(t),a=e.getState();e.setState({defaultActiveFirst:Object(r.a)(Object(r.a)({},a.defaultActiveFirst),{},Object(f.a)({},i,n))})},ie=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;Object(i.a)(this,n),(a=t.call(this,e)).onDestroy=function(e){a.props.onDestroy(e)},a.onKeyDown=function(e){var t=e.keyCode,n=a.menuInstance,r=a.props,i=r.isOpen,o=r.store;if(t===p.a.ENTER)return a.onTitleClick(e),re(o,a.props.eventKey,!0),!0;if(t===p.a.RIGHT)return i?n.onKeyDown(e):(a.triggerOpenChange(!0),re(o,a.props.eventKey,!0)),!0;if(t===p.a.LEFT){var s;if(!i)return;return(s=n.onKeyDown(e))||(a.triggerOpenChange(!1),s=!0),s}return!i||t!==p.a.UP&&t!==p.a.DOWN?void 0:n.onKeyDown(e)},a.onOpenChange=function(e){a.props.onOpenChange(e)},a.onPopupVisibleChange=function(e){a.triggerOpenChange(e,e?"mouseenter":"mouseleave")},a.onMouseEnter=function(e){var t=a.props,n=t.eventKey,r=t.onMouseEnter,i=t.store;re(i,a.props.eventKey,!1),r({key:n,domEvent:e})},a.onMouseLeave=function(e){var t=a.props,n=t.parentMenu,r=t.eventKey,i=t.onMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,domEvent:e})},a.onTitleMouseEnter=function(e){var t=a.props,n=t.eventKey,r=t.onItemHover,i=t.onTitleMouseEnter;r({key:n,hover:!0}),i({key:n,domEvent:e})},a.onTitleMouseLeave=function(e){var t=a.props,n=t.parentMenu,r=t.eventKey,i=t.onItemHover,s=t.onTitleMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,hover:!1}),s({key:r,domEvent:e})},a.onTitleClick=function(e){var t=Object(o.a)(a).props;t.onTitleClick({key:t.eventKey,domEvent:e}),"hover"!==t.triggerSubMenuAction&&(a.triggerOpenChange(!t.isOpen,"click"),re(t.store,a.props.eventKey,!1))},a.onSubMenuClick=function(e){"function"==typeof a.props.onClick&&a.props.onClick(a.addKeyPath(e))},a.onSelect=function(e){a.props.onSelect(e)},a.onDeselect=function(e){a.props.onDeselect(e)},a.getPrefixCls=function(){return"".concat(a.props.rootPrefixCls,"-submenu")},a.getActiveClassName=function(){return"".concat(a.getPrefixCls(),"-active")},a.getDisabledClassName=function(){return"".concat(a.getPrefixCls(),"-disabled")},a.getSelectedClassName=function(){return"".concat(a.getPrefixCls(),"-selected")},a.getOpenClassName=function(){return"".concat(a.props.rootPrefixCls,"-submenu-open")},a.saveMenuInstance=function(e){a.menuInstance=e},a.addKeyPath=function(e){return Object(r.a)(Object(r.a)({},e),{},{keyPath:(e.keyPath||[]).concat(a.props.eventKey)})},a.triggerOpenChange=function(e,t){var n=a.props.eventKey,r=function(){a.onOpenChange({key:n,item:Object(o.a)(a),trigger:t,open:e})};"mouseenter"===t?a.mouseenterTimeout=setTimeout((function(){r()}),0):r()},a.isChildrenSelected=function(){var e={find:!1};return function e(t,n,r){t&&!r.find&&c.Children.forEach(t,(function(t){if(t){var i=t.type;if(!i||!(i.isSubMenu||i.isMenuItem||i.isMenuItemGroup))return;-1!==n.indexOf(t.key)?r.find=!0:t.props.children&&e(t.props.children,n,r)}}))}(a.props.children,a.props.selectedKeys,e),e.find},a.isOpen=function(){return-1!==a.props.openKeys.indexOf(a.props.eventKey)},a.adjustWidth=function(){if(a.subMenuTitle&&a.menuInstance){var e=q.findDOMNode(a.menuInstance);e.offsetWidth>=a.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(a.subMenuTitle.offsetWidth,"px"))}},a.saveSubMenuTitle=function(e){a.subMenuTitle=e},a.getBaseProps=function(){var e=Object(o.a)(a).props;return{mode:"horizontal"===e.mode?"vertical":e.mode,visible:a.props.isOpen,level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:a.onSubMenuClick,onSelect:a.onSelect,onDeselect:a.onDeselect,onDestroy:a.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:a.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(o.a)(a),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[z(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:a.internalMenuId,manualRef:a.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},a.getMotion=function(e,t){var n=Object(o.a)(a).haveRendered,i=a.props,s=i.motion,l=i.rootPrefixCls;return Object(r.a)(Object(r.a)({},s),{},{leavedClassName:"".concat(l,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var s=e.store,l=e.eventKey,u=s.getState().defaultActiveFirst;a.isRootMenu=!1;var h=!1;return u&&(h=u[l]),re(s,l,h),a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,i=t.manualRef;i&&i(this),"horizontal"===n&&r.isRootMenu&&this.props.isOpen&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(e){var t=this,n=this.getBaseProps(),r=this.getMotion(n.mode,n.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||n.visible||n.forceSubMenuRender,!this.haveOpened)return c.createElement("div",null);var i=n.direction;return c.createElement(Q.default,Object.assign({visible:n.visible},r),(function(r){var a=r.className,o=r.style,s=b()("".concat(n.prefixCls,"-sub"),a,Object(f.a)({},"".concat(n.prefixCls,"-rtl"),"rtl"===i));return c.createElement(pe,Object.assign({},n,{id:t.internalMenuId,className:s,style:o}),e)}))}},{key:"render",value:function(){var e,t=Object(r.a)({},this.props),n=t.isOpen,i=this.getPrefixCls(),a="inline"===t.mode,o=b()(i,"".concat(i,"-").concat(t.mode),(e={},Object(f.a)(e,t.className,!!t.className),Object(f.a)(e,this.getOpenClassName(),n),Object(f.a)(e,this.getActiveClassName(),t.active||n&&!a),Object(f.a)(e,this.getDisabledClassName(),t.disabled),Object(f.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(t.eventKey?this.internalMenuId="".concat(t.eventKey,"$Menu"):(te+=1,this.internalMenuId="$__$".concat(te,"$Menu")));var s={},l={},u={};t.disabled||(s={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},l={onClick:this.onTitleClick},u={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var h={},d=t.direction;a&&("rtl"===d?h.paddingRight=t.inlineIndent*t.level:h.paddingLeft=t.inlineIndent*t.level);var p={};this.props.isOpen&&(p={"aria-owns":this.internalMenuId});var m=null;"horizontal"!==t.mode&&(m=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(m=c.createElement(this.props.expandIcon,Object(r.a)({},this.props))));var g=c.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:h,className:"".concat(i,"-title"),role:"button"},u,l,{"aria-expanded":n},p,{"aria-haspopup":"true",title:"string"==typeof t.title?t.title:void 0}),t.title,m||c.createElement("i",{className:"".concat(i,"-arrow")})),v=this.renderChildren(t.children),y=t.parentMenu.isRootMenu?t.parentMenu.props.getPopupContainer:function(e){return e.parentNode},x=ne[t.mode],w=t.popupOffset?{offset:t.popupOffset}:{},k="inline"===t.mode?"":t.popupClassName;k+="rtl"===d?" ".concat(i,"-rtl"):"";var C=t.disabled,E=t.triggerSubMenuAction,S=t.subMenuOpenDelay,T=t.forceSubMenuRender,_=t.subMenuCloseDelay,O=t.builtinPlacements;V.forEach((function(e){return delete t[e]})),delete t.onClick;var L="rtl"===d?Object.assign({},ee,O):Object.assign({},Z,O);return delete t.direction,c.createElement("li",Object.assign({},t,s,{className:o,role:"menuitem"}),a&&g,a&&v,!a&&c.createElement($.a,{prefixCls:i,popupClassName:b()("".concat(i,"-popup"),k),getPopupContainer:y,builtinPlacements:L,popupPlacement:x,popupVisible:n,popupAlign:w,popup:v,action:C?[]:[E],mouseEnterDelay:S,mouseLeaveDelay:_,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:T},g))}}]),n}(c.Component);ie.defaultProps={onMouseEnter:B,onMouseLeave:B,onTitleMouseEnter:B,onTitleMouseLeave:B,onTitleClick:B,manualRef:B,mode:"vertical",title:""};var ae=Object(u.b)((function(e,t){var n=e.openKeys,r=e.activeKey,i=e.selectedKeys,a=t.eventKey,o=t.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[o]===a,selectedKeys:i}}))(ie);ae.isSubMenu=!0;var oe=ae,se=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=q.findDOMNode(Object(o.a)(e));return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,i){var a=e.props,o=a.overflowedIndicator,s=a.level,l=a.mode,u=a.prefixCls,h=a.theme;if(1!==s||"horizontal"!==l)return null;var d=e.props.children[0].props,f=(d.children,d.title,d.style),p=Object(Y.a)(d,["children","title","style"]),m=Object(r.a)({},f),g="".concat(t,"-overflowed-indicator"),v="".concat(t,"-overflowed-indicator");0===n.length&&!0!==i?m=Object(r.a)(Object(r.a)({},m),{},{display:"none"}):i&&(m=Object(r.a)(Object(r.a)({},m),{},{visibility:"hidden",position:"absolute"}),g="".concat(g,"-placeholder"),v="".concat(v,"-placeholder"));var y=h?"".concat(u,"-").concat(h):"",b={};return V.forEach((function(e){void 0!==p[e]&&(b[e]=p[e])})),c.createElement(oe,Object.assign({title:o,className:"".concat(u,"-overflowed-submenu"),popupClassName:y},b,{key:g,eventKey:v,disabled:!1,style:m}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=q.findDOMNode(Object(o.a)(e));if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];G(r,"display","inline-block");var i=e.getMenuItemNodes(),a=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(e){G(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return W(e,!0)})),a.forEach((function(e){G(e,"display","none")})),e.overflowedIndicatorWidth=W(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),G(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=q.findDOMNode(Object(o.a)(e));if(t){var n=W(t);e.overflowedItems=[];var r,i=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=q.findDOMNode(this);if(!t)return;this.resizeObserver=new X.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,i,a){var o=i;if("horizontal"===t.props.mode){var s=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(a>n&&(o=c.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),a===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return c.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),s=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var l=[].concat(Object(K.a)(r),[s,o]);return a===e.length-1&&l.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),l}return[].concat(Object(K.a)(r),[o])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(Y.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return c.createElement(i,Object.assign({},r),this.renderChildren(n))}}]),n}(c.Component);se.defaultProps={tag:"div",className:""};var le=se;function ce(e,t,n){var i=e.getState();e.setState({activeKey:Object(r.a)(Object(r.a)({},i.activeKey),{},Object(f.a)({},t,n))})}function ue(e){return e.eventKey||"0-menu-"}function he(e,t){var n,r=t,i=e.children,a=e.eventKey;if(r&&(U(i,(function(e,t){e&&e.props&&!e.props.disabled&&r===H(e,a,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(U(i,(function(e,t){r||!e||e.props.disabled||(r=H(e,a,t))})),r):r}function de(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var fe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(a.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var i=null;return r!==p.a.UP&&r!==p.a.DOWN||(i=a.step(r===p.a.UP?-1:1)),i?(e.preventDefault(),ce(a.props.store,ue(a.props),i.props.eventKey),"function"==typeof t&&t(i),1):void 0},a.onItemHover=function(e){var t=e.key,n=e.hover;ce(a.props.store,ue(a.props),n?t:null)},a.onDeselect=function(e){a.props.onDeselect(e)},a.onSelect=function(e){a.props.onSelect(e)},a.onClick=function(e){a.props.onClick(e)},a.onOpenChange=function(e){a.props.onOpenChange(e)},a.onDestroy=function(e){a.props.onDestroy(e)},a.getFlatInstanceArray=function(){return a.instanceArray},a.step=function(e){var t=a.getFlatInstanceArray(),n=a.props.store.getState().activeKey[ue(a.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var i=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(i=t,!1)})),a.props.defaultActiveFirst||-1===i||(o=t.slice(i,r-1)).length&&!o.every((function(e){return!!e.props.disabled}))){var o,s=(i+1)%r,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},a.renderCommonMenuItem=function(e,t,n){var i=a.props.store.getState(),s=Object(o.a)(a).props,l=H(e,s.eventKey,t),u=e.props;if(!u||"string"==typeof e.type)return e;var h=l===i.activeKey,d=Object(r.a)(Object(r.a)({mode:u.mode||s.mode,level:s.level,inlineIndent:s.inlineIndent,renderMenuItem:a.renderMenuItem,rootPrefixCls:s.prefixCls,index:t,parentMenu:s.parentMenu,manualRef:u.disabled?void 0:Object(m.a)(e.ref,de.bind(Object(o.a)(a))),eventKey:l,active:!u.disabled&&h,multiple:s.multiple,onClick:function(e){(u.onClick||B)(e),a.onClick(e)},onItemHover:a.onItemHover,motion:s.motion,subMenuOpenDelay:s.subMenuOpenDelay,subMenuCloseDelay:s.subMenuCloseDelay,forceSubMenuRender:s.forceSubMenuRender,onOpenChange:a.onOpenChange,onDeselect:a.onDeselect,onSelect:a.onSelect,builtinPlacements:s.builtinPlacements,itemIcon:u.itemIcon||a.props.itemIcon,expandIcon:u.expandIcon||a.props.expandIcon},n),{},{direction:s.direction});return("inline"===s.mode||F.any)&&(d.triggerSubMenuAction="click"),c.cloneElement(e,d)},a.renderMenuItem=function(e,t,n){if(!e)return null;var r=a.props.store.getState(),i={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:a.props.triggerSubMenuAction,subMenuKey:n};return a.renderCommonMenuItem(e,t,i)},e.store.setState({activeKey:Object(r.a)(Object(r.a)({},e.store.getState().activeKey),{},Object(f.a)({},e.eventKey,he(e,e.activeKey)))}),a.instanceArray=[],a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!v()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[ue(t)],r=he(t,n);if(r!==n)ce(t.store,ue(t),r);else if("activeKey"in e){r!==he(e,e.activeKey)&&ce(t.store,ue(t),r)}}},{key:"render",value:function(){var e=this,t=Object(d.a)({},this.props);this.instanceArray=[];var n={className:b()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,a=t.visible,o=t.level,s=t.mode,l=t.overflowedIndicator,u=t.theme;return V.forEach((function(e){return delete t[e]})),delete t.onClick,c.createElement(le,Object.assign({},t,{prefixCls:r,mode:s,tag:"ul",level:o,theme:u,visible:a,overflowedIndicator:l},n),c.Children.map(t.children,(function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")})))}}]),n}(c.Component);fe.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:B};var pe=Object(u.b)()(fe),me=n("Kwbf");function ge(e,t,n){var r=e.prefixCls,i=e.motion,a=e.defaultMotions,o=void 0===a?{}:a,s=e.openAnimation,l=e.openTransitionName,c=t.switchingModeFromInline;if(i)return i;if("object"===Object(x.a)(s)&&s)Object(me.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=o[n];return u||(c?null:o.other)}var ve=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;Object(i.a)(this,n),(a=t.call(this,e)).inlineOpenKeys=[],a.onSelect=function(e){var t=Object(o.a)(a).props;if(t.selectable){var n=a.store.getState().selectedKeys,i=e.key;n=t.multiple?n.concat([i]):[i],"selectedKeys"in t||a.store.setState({selectedKeys:n}),t.onSelect(Object(r.a)(Object(r.a)({},e),{},{selectedKeys:n}))}},a.onClick=function(e){var t=a.getRealMenuMode(),n=Object(o.a)(a),r=n.store,i=n.props.onOpenChange;"inline"===t||"openKeys"in a.props||(r.setState({openKeys:[]}),i([])),a.props.onClick(e)},a.onKeyDown=function(e,t){a.innerMenu.getWrappedInstance().onKeyDown(e,t)},a.onOpenChange=function(e){var t=Object(o.a)(a).props,n=a.store.getState().openKeys.concat(),r=!1,i=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var i=n.indexOf(e.key);(t=-1!==i)&&n.splice(i,1)}r=r||t};Array.isArray(e)?e.forEach(i):i(e),r&&("openKeys"in a.props||a.store.setState({openKeys:n}),t.onOpenChange(n))},a.onDeselect=function(e){var t=Object(o.a)(a).props;if(t.selectable){var n=a.store.getState().selectedKeys.concat(),i=e.key,s=n.indexOf(i);-1!==s&&n.splice(s,1),"selectedKeys"in t||a.store.setState({selectedKeys:n}),t.onDeselect(Object(r.a)(Object(r.a)({},e),{},{selectedKeys:n}))}},a.onMouseEnter=function(e){a.restoreModeVerticalFromInline();var t=a.props.onMouseEnter;t&&t(e)},a.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,r="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,i="font-size"===e.propertyName&&r.indexOf("anticon")>=0;(t||i)&&a.restoreModeVerticalFromInline()},a.setInnerMenu=function(e){a.innerMenu=e},a.isRootMenu=!0;var s=e.defaultSelectedKeys,l=e.defaultOpenKeys;return"selectedKeys"in e&&(s=e.selectedKeys||[]),"openKeys"in e&&(l=e.openKeys||[]),a.store=Object(u.c)({selectedKeys:s,openKeys:l,activeKey:{"0-menu-":he(e,e.activeKey)}}),a.state={switchingModeFromInline:!1},a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){this.updateOpentKeysWhenSwitchMode(e),this.updateMiniStore();var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&i([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(e){var t=this.props,n=this.store,r=this.inlineOpenKeys,i=n.getState(),a={};"inline"===e.mode&&"inline"!==t.mode&&this.setState({switchingModeFromInline:!0}),"openKeys"in t||((t.inlineCollapsed&&!e.inlineCollapsed||t.siderCollapsed&&!e.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=i.openKeys.concat(),a.openKeys=[]),(!t.inlineCollapsed&&e.inlineCollapsed||!t.siderCollapsed&&e.siderCollapsed)&&(a.openKeys=r,this.inlineOpenKeys=[])),Object.keys(a).length&&n.setState(a)}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(r.a)({},Object(h.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(r.a)(Object(r.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ge(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,c.createElement(u.a,{store:this.store},c.createElement(pe,Object.assign({},e,{ref:this.setInnerMenu}),this.props.children))}}]),n}(c.Component);ve.defaultProps={selectable:!0,onClick:B,onSelect:B,onOpenChange:B,onDeselect:B,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:c.createElement("span",null,"···")};var ye=ve,be=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===p.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseLeave;i({key:r,hover:!1}),a({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseEnter;i({key:r,hover:!0}),a({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,i=n.multiple,a=n.onClick,s=n.onSelect,l=n.onDeselect,c=n.isSelected,u={key:r,keyPath:[r],item:Object(o.a)(e),domEvent:t};a(u),i?c?l(u):s(u):c||s(u)},e.saveNode=function(t){e.node=t},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(r.a)({},this.props),n=b()(this.getPrefixCls(),t.className,(e={},Object(f.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(f.a)(e,this.getSelectedClassName(),t.isSelected),Object(f.a)(e,this.getDisabledClassName(),t.disabled),e)),i=Object(r.a)(Object(r.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?i=Object(r.a)(Object(r.a)({},i),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(i.role="none");var a={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},o=Object(r.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?o.paddingRight=t.inlineIndent*t.level:o.paddingLeft=t.inlineIndent*t.level),V.forEach((function(e){return delete t[e]})),delete t.direction;var s=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(s=c.createElement(this.props.itemIcon,this.props)),c.createElement("li",Object.assign({},Object(h.default)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,a,{style:o,ref:this.saveNode}),t.children,s)}}]),n}(c.Component);be.isMenuItem=!0,be.defaultProps={onSelect:B,onMouseEnter:B,onMouseLeave:B,manualRef:B};var xe=Object(u.b)((function(e,t){var n=e.activeKey,r=e.selectedKeys,i=t.eventKey;return{active:n[t.subMenuKey]===i,isSelected:-1!==r.indexOf(i)}}))(be),we=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(a.a)(n,[{key:"render",value:function(){var e=Object(d.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,i="".concat(r,"-item-group-title"),a="".concat(r,"-item-group-list"),o=e.title,s=e.children;return V.forEach((function(t){return delete e[t]})),delete e.onClick,delete e.direction,c.createElement("li",Object.assign({},e,{className:"".concat(n," ").concat(r,"-item-group")}),c.createElement("div",{className:i,title:"string"==typeof o?o:void 0},o),c.createElement("ul",{className:a},c.Children.map(s,this.renderInnerMenuItem)))}}]),n}(c.Component);we.isMenuItemGroup=!0,we.defaultProps={disabled:!0};var ke=we,Ce=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return c.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};Ce.defaultProps={disabled:!0,className:"",style:{}};var Ee=Ce;t.e=ye},"24YM": +/*!**************************************************!*\ + !*** ./node_modules/size-sensor/lib/constant.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SensorTabIndex=t.SensorClassName=t.SizeSensorId=void 0;t.SizeSensorId="size-sensor-id";t.SensorClassName="size-sensor-object";t.SensorTabIndex="-1"},"2DNl": +/*!**************************************************!*\ + !*** ./node_modules/zrender/lib/contain/path.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/PathProxy */"IMiH"),i=n(/*! ./line */"loD1"),a=n(/*! ./cubic */"59Ip"),o=n(/*! ./quadratic */"aKvl"),s=n(/*! ./arc */"n1HI"),l=n(/*! ./util */"hX1E").normalizeRadian,c=n(/*! ../core/curve */"Sj9i"),u=n(/*! ./windingLine */"hyiK"),h=r.CMD,d=2*Math.PI;var f=[-1,-1,-1],p=[-1,-1];function m(e,t,n,r,i,a,o,s,l,u){if(u>t&&u>r&&u>a&&u>s||u1&&(h=void 0,h=p[0],p[0]=p[1],p[1]=h),m=c.cubicAt(t,r,a,s,p[0]),y>1&&(g=c.cubicAt(t,r,a,s,p[1]))),2===y?xt&&s>r&&s>a||s=0&&u<=1){for(var h=0,d=c.quadraticAt(t,r,a,u),p=0;pn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);f[0]=-c,f[1]=c;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u%d<1e-4){r=0,i=d;var h=a?1:-1;return o>=f[0]+e&&o<=f[1]+e?h:0}if(a){c=r;r=l(i),i=l(c)}else r=l(r),i=l(i);r>i&&(i+=d);for(var p=0,m=0;m<2;m++){var g=f[m];if(g+e>o){var v=Math.atan2(s,g);h=a?1:-1;v<0&&(v=d+v),(v>=r&&v<=i||v+d>=r&&v+d<=i)&&(v>Math.PI/2&&v<1.5*Math.PI&&(h=-h),p+=h)}}return p}function y(e,t,n,r,l){for(var c,d,f=0,p=0,y=0,b=0,x=0,w=0;w1&&(n||(f+=u(p,y,b,x,r,l))),1===w&&(b=p=e[w],x=y=e[w+1]),k){case h.M:p=b=e[w++],y=x=e[w++];break;case h.L:if(n){if(i.containStroke(p,y,e[w],e[w+1],t,r,l))return!0}else f+=u(p,y,e[w],e[w+1],r,l)||0;p=e[w++],y=e[w++];break;case h.C:if(n){if(a.containStroke(p,y,e[w++],e[w++],e[w++],e[w++],e[w],e[w+1],t,r,l))return!0}else f+=m(p,y,e[w++],e[w++],e[w++],e[w++],e[w],e[w+1],r,l)||0;p=e[w++],y=e[w++];break;case h.Q:if(n){if(o.containStroke(p,y,e[w++],e[w++],e[w],e[w+1],t,r,l))return!0}else f+=g(p,y,e[w++],e[w++],e[w],e[w+1],r,l)||0;p=e[w++],y=e[w++];break;case h.A:var C=e[w++],E=e[w++],S=e[w++],T=e[w++],_=e[w++],O=e[w++];w+=1;var L=1-e[w++],A=Math.cos(_)*S+C,D=Math.sin(_)*T+E;w>1?f+=u(p,y,A,D,r,l):(b=A,x=D);var M=(r-C)*T/S+C;if(n){if(s.containStroke(C,E,T,_,_+O,L,t,M,l))return!0}else f+=v(C,E,T,_,_+O,L,M,l);p=Math.cos(_+O)*S+C,y=Math.sin(_+O)*T+E;break;case h.R:b=p=e[w++],x=y=e[w++];A=b+e[w++],D=x+e[w++];if(n){if(i.containStroke(b,x,A,x,t,r,l)||i.containStroke(A,x,A,D,t,r,l)||i.containStroke(A,D,b,D,t,r,l)||i.containStroke(b,D,b,x,t,r,l))return!0}else f+=u(A,x,A,D,r,l),f+=u(b,D,b,x,r,l);break;case h.Z:if(n){if(i.containStroke(p,y,b,x,t,r,l))return!0}else f+=u(p,y,b,x,r,l);p=b,y=x}}return n||(c=y,d=x,Math.abs(c-d)<1e-4)||(f+=u(p,y,b,x,r,l)||0),0!==f}t.contain=function(e,t,n){return y(e,0,!1,t,n)},t.containStroke=function(e,t,n,r){return y(e,t,!0,n,r)}},"2fw6": +/*!**********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/Circle.js ***! + \**********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt").extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(e,t,n){n&&e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI,!0)}});e.exports=r},"3C/r": +/*!*****************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Pattern.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=function(e,t){this.image=e,this.repeat=t,this.type="pattern"};n.prototype.getCanvasPattern=function(e){return e.createPattern(this.image,this.repeat||"repeat")};var r=n;e.exports=r},"3CBa": +/*!*************************************************!*\ + !*** ./node_modules/zrender/lib/svg/Painter.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core */"hydK").createElement,i=n(/*! ../core/util */"bYtY"),a=n(/*! ../core/log */"SUKs"),o=n(/*! ../graphic/Path */"y+Vt"),s=n(/*! ../graphic/Image */"Dagg"),l=n(/*! ../graphic/Text */"dqUG"),c=n(/*! ../core/arrayDiff2 */"DBLp"),u=n(/*! ./helper/GradientManager */"sW+o"),h=n(/*! ./helper/ClippathManager */"n6Mw"),d=n(/*! ./helper/ShadowManager */"vKoX"),f=n(/*! ./graphic */"P47w"),p=f.path,m=f.image,g=f.text;function v(e){return parseInt(e,10)}function y(e,t){return t&&e&&t.parentNode!==e}function b(e,t,n){if(y(e,t)&&n){var r=n.nextSibling;r?e.insertBefore(t,r):e.appendChild(t)}}function x(e,t){if(y(e,t)){var n=e.firstChild;n?e.insertBefore(t,n):e.appendChild(t)}}function w(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)}function k(e){return e.__textSvgEl}function C(e){return e.__svgEl}var E=function(e,t,n,a){this.root=e,this.storage=t,this._opts=n=i.extend({},n||{});var o=r("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;";var s=r("g");o.appendChild(s);var l=r("g");o.appendChild(l),this.gradientManager=new u(a,l),this.clipPathManager=new h(a,l),this.shadowManager=new d(a,l);var c=document.createElement("div");c.style.cssText="overflow:hidden;position:relative",this._svgDom=o,this._svgRoot=l,this._backgroundRoot=s,this._viewport=c,e.appendChild(c),c.appendChild(o),this.resize(n.width,n.height),this._visibleList=[]};E.prototype={constructor:E,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0);this._paintList(e)},setBackgroundColor:function(e){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var t=r("rect");t.setAttribute("width",this.getWidth()),t.setAttribute("height",this.getHeight()),t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("id",0),t.style.fill=e,this._backgroundRoot.appendChild(t),this._backgroundNode=t},_paintList:function(e){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var t,n,r=this._svgRoot,i=this._visibleList,a=e.length,u=[];for(t=0;t=0;--r)if(n[r]===e)return!0;return!1}),t):null:t[0]},resize:function(e,t){var n=this._viewport;n.style.display="none";var r=this._opts;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=this._getSize(0),t=this._getSize(1),n.style.display="",this._width!==e||this._height!==t){this._width=e,this._height=t;var i=n.style;i.width=e+"px",i.height=t+"px";var a=this._svgDom;a.setAttribute("width",e),a.setAttribute("height",t)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",e),this._backgroundNode.setAttribute("height",t))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,n=["width","height"][e],r=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=t[n]&&"auto"!==t[n])return parseFloat(t[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||v(s[n])||v(o.style[n]))-(v(s[i])||0)-(v(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/>\n\r<"))}},i.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(e){var t;E.prototype[e]=(t=e,function(){a('In SVG mode painter not support method "'+t+'"')})}));var S=E;e.exports=S},"3e3G": +/*!************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/RadialGradient.js ***! + \************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ./Gradient */"QuXc"),a=function(e,t,n,r,a){this.x=null==e?.5:e,this.y=null==t?.5:t,this.r=null==n?.5:n,this.type="radial",this.global=a||!1,i.call(this,r)};a.prototype={constructor:a},r.inherits(a,i);var o=a;e.exports=o},"3gBT": +/*!***********************************************!*\ + !*** ./node_modules/zrender/lib/core/guid.js ***! + \***********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=2311;e.exports=function(){return n++}},"4fz+": +/*!*****************************************************!*\ + !*** ./node_modules/zrender/lib/container/Group.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ../Element */"1bdT"),a=n(/*! ../core/BoundingRect */"mFDi"),o=function(e){for(var t in e=e||{},i.call(this,e),e)e.hasOwnProperty(t)&&(this[t]=e[t]);this._children=[],this.__storage=null,this.__dirty=!0};o.prototype={constructor:o,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(e){return this._children[e]},childOfName:function(e){for(var t=this._children,n=0;n=0&&(n.splice(r,0,e),this._doAdd(e))}return this},_doAdd:function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__storage,n=this.__zr;t&&t!==e.__storage&&(t.addToStorage(e),e instanceof o&&e.addChildrenToStorage(t)),n&&n.refresh()},remove:function(e){var t=this.__zr,n=this.__storage,i=this._children,a=r.indexOf(i,e);return a<0||(i.splice(a,1),e.parent=null,n&&(n.delFromStorage(e),e instanceof o&&e.delChildrenFromStorage(n)),t&&t.refresh()),this},removeAll:function(){var e,t,n=this._children,r=this.__storage;for(t=0;t1e-4)return p[0]=e-n,p[1]=t-i,m[0]=e+n,void(m[1]=t+i);if(u[0]=l(a)*n+e,u[1]=s(a)*i+t,h[0]=l(o)*n+e,h[1]=s(o)*i+t,g(p,u,h),v(m,u,h),(a%=c)<0&&(a+=c),(o%=c)<0&&(o+=c),a>o&&!f?o+=c:aa&&(d[0]=l(x)*n+e,d[1]=s(x)*i+t,g(p,d,p),v(m,d,m))}},"4wi7": +/*!*********************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/ShixunHomeworks/components/TrfList/index.tsx ***! + \*********************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/row/style */"14J3");var r=n(/*! antd/es/row */"BMrR"),i=(n(/*! antd/es/checkbox/style */"sRBo"),n(/*! antd/es/checkbox */"kaz8")),a=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=n.n(l),u=n(/*! react */"q1tI"),h=n.n(u),d=n(/*! ./index.less?modules */"oOBs"),f=n.n(d),p=n(/*! ./delete.png */"xOL1"),m=n.n(p),g=n(/*! @/components/NoData */"BdwD");t.a=function(e){var t=e.data,n=(e.value,e.handleChangePage,e.setSelectedRowKeys),l=e.selectedRowKeys,d=(e.onChange,Object(u.useState)([])),p=Object(s.a)(d,2),v=p[0],y=p[1],b=Object(u.useState)([]),x=Object(s.a)(b,2),w=x[0],k=x[1],C=Object(u.useState)([]),E=Object(s.a)(C,2),S=E[0],T=E[1],_=Object(u.useState)(1),O=Object(s.a)(_,2),L=(O[0],O[1],Object(u.useState)()),A=Object(s.a)(L,2);A[0],A[1];return Object(u.useEffect)((function(){y(t),k([]),T([])}),[t]),Object(u.useEffect)((function(){n&&(k(l),T(l))}),[l]),h.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},h.a.createElement("div",{className:f.a.leftdiv},h.a.createElement(a.a.Search,{size:"large",onChange:function(){var e=Object(o.a)(c.a.mark((function e(n){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y(t.filter((function(e){var t;return null==e||null===(t=e.name)||void 0===t?void 0:t.includes(n.target.value)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),placeholder:"可输入班级名称查询"}),0===v.length&&h.a.createElement(g.a,{styles:{margin:"70px auto"},customText:"暂无分班"}),h.a.createElement("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"}},h.a.createElement(i.a.Group,{value:w.map((function(e){return"".concat(e.id)})),onChange:function(e){n(v.filter((function(t){return e.includes("".concat(t.id))})))},style:{marginTop:"10px"}},v.map((function(e,t){return h.a.createElement(r.a,{key:e.id,style:{marginTop:"10px",lineHeight:"24px",display:"flex",width:200}},h.a.createElement(i.a,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:e.is_published,value:"".concat(e.id)},h.a.createElement("div",{className:f.a.listClass},h.a.createElement("span",{className:f.a.spantitle,style:{width:e.is_published?"108px":"170px"}},e.name),e.is_published&&h.a.createElement("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"}},"已发布"))))}))))),h.a.createElement("div",{className:f.a.rightdiv},h.a.createElement(a.a.Search,{onChange:function(e){T(w.filter((function(t){return t.name.includes(e.target.value)})))},size:"large",placeholder:"可输入班级名称查询"}),0===S.length&&h.a.createElement(g.a,{styles:{margin:"70px auto"},customText:"暂未选择分班"}),S.length>0&&h.a.createElement("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"}},h.a.createElement("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0}},S.map((function(e,t){return h.a.createElement(r.a,{justify:"space-between",style:{marginTop:"10px"},key:e.id},h.a.createElement("div",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:"5px",marginLeft:"5px",width:"75%"}},e.name),h.a.createElement("img",{src:m.a,style:{cursor:"pointer",height:"16px",marginRight:17},onClick:function(){n(w.filter((function(t){return"".concat(t.id)!="".concat(e.id)})))}}))}))))))}},"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(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return b}));var r=n(/*! react-router */"Ty5D"),i=n(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),a=n(/*! react */"q1tI"),o=n.n(a),s=n(/*! history */"YS25"),l=(n(/*! prop-types */"17x9"),n(/*! @babel/runtime/helpers/esm/extends */"wx14")),c=n(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),u=n(/*! tiny-invariant */"9R94");o.a.Component;o.a.Component;var h=function(e,t){return"function"==typeof e?e(t):e},d=function(e,t){return"string"==typeof e?Object(s.c)(e,null,null,t):e},f=function(e){return e},p=o.a.forwardRef;void 0===p&&(p=f);var m=p((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,a=Object(c.a)(e,["innerRef","navigate","onClick"]),s=a.target,u=Object(l.a)({},a,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=f!==p&&t||n,o.a.createElement("a",u)}));var g=p((function(e,t){var n=e.component,i=void 0===n?m:n,a=e.replace,s=e.to,g=e.innerRef,v=Object(c.a)(e,["component","replace","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=e.history,r=d(h(s,e.location),e.location),c=r?n.createHref(r):"",m=Object(l.a)({},v,{href:c,navigate:function(){var t=h(s,e.location);(a?n.replace:n.push)(t)}});return f!==p?m.ref=t||g:m.innerRef=g,o.a.createElement(i,m)}))})),v=function(e){return e},y=o.a.forwardRef;void 0===y&&(y=v);var b=y((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,a=e.activeClassName,s=void 0===a?"active":a,f=e.activeStyle,p=e.className,m=e.exact,b=e.isActive,x=e.location,w=e.sensitive,k=e.strict,C=e.style,E=e.to,S=e.innerRef,T=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=x||e.location,a=d(h(E,n),n),c=a.pathname,_=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),O=_?Object(r.f)(n.pathname,{path:_,exact:m,sensitive:w,strict:k}):null,L=!!(b?b(O,n):O),A=L?function(){for(var e=arguments.length,t=new Array(e),n=0;nt+d&&h>i+d&&h>o+d&&h>l+d||he+d&&u>n+d&&u>a+d&&u>s+d||u=0||t.relatedTarget.className.indexOf("".concat(a,"-next"))>=0)||(e.setState({goInputText:""}),i(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==m&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return Object(s.a)(n,[{key:"getValidValue",value:function(){var e=this.state,t=e.goInputText,n=e.current;return!t||isNaN(t)?n:Number(t)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.locale,i=t.rootPrefixCls,a=t.changeSize,o=t.quickGo,s=t.goButton,l=t.selectComponentClass,c=t.buildOptionText,u=t.selectPrefixCls,d=t.disabled,f=this.state.goInputText,p="".concat(i,"-options"),m=l,g=null,v=null,y=null;if(!a&&!o)return null;var b=this.getPageSizeOptions();if(a&&m){var x=b.map((function(t,n){return h.a.createElement(m.Option,{key:n,value:t.toString()},(c||e.buildOptionText)(t))}));g=h.a.createElement(m,{disabled:d,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||b[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},x)}return o&&(s&&(y="boolean"==typeof s?h.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:d,className:"".concat(p,"-quick-jumper-button")},r.jump_to_confirm):h.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),v=h.a.createElement("div",{className:"".concat(p,"-quick-jumper")},r.jump_to,h.a.createElement("input",{disabled:d,type:"text",value:f,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,y)),h.a.createElement("li",{className:"".concat(p)},g,v)}}]),n}(h.a.Component);y.defaultProps={pageSizeOptions:["10","20","50","100"]};var b=y,x=n("N2Kk");function w(){}function k(e,t,n){var r=void 0===e?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var C=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(o.a)(this,n),(r=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(k(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,t){var n=r.props.prefixCls,i=e||h.a.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"==typeof e&&(i=h.a.createElement(e,Object(a.a)({},r.props))),i},r.savePaginationNode=function(e){r.paginationNode=e},r.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==r.state.current;var t},r.shouldDisplayQuickJumper=function(){var e=r.props,t=e.showQuickJumper,n=e.pageSize;return!(e.total<=n)&&t},r.handleKeyDown=function(e){e.keyCode!==g&&e.keyCode!==v||e.preventDefault()},r.handleKeyUp=function(e){var t=r.getValidValue(e);t!==r.state.currentInputValue&&r.setState({currentInputValue:t}),e.keyCode===m?r.handleChange(t):e.keyCode===g?r.handleChange(t-1):e.keyCode===v&&r.handleChange(t+1)},r.changePageSize=function(e){var t=r.state.current,n=k(e,r.state,r.props);t=t>n?n:t,0===n&&(t=r.state.current),"number"==typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:t,currentInputValue:t})),r.props.onShowSizeChange(t,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(t,e)},r.handleChange=function(e){var t=r.props.disabled,n=e;if(r.isValid(n)&&!t){var i=k(void 0,r.state,r.props);n>i?n=i:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var a=r.state.pageSize;return r.props.onChange(n,a),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current2?n-2:0),i=2;i=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,r=e.totalBoundaryShowSizeChanger;return void 0!==t?t:n>r}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,r=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),i=!this.hasPrev();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,r=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),i=!this.hasNext();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,a=t.className,o=t.style,s=t.disabled,l=t.hideOnSinglePage,c=t.total,d=t.locale,m=t.showQuickJumper,g=t.showLessItems,v=t.showTitle,y=t.showTotal,x=t.simple,w=t.itemRender,C=t.showPrevNextJumpers,E=t.jumpPrevIcon,S=t.jumpNextIcon,T=t.selectComponentClass,_=t.selectPrefixCls,O=t.pageSizeOptions,L=this.state,A=L.current,D=L.pageSize,M=L.currentInputValue;if(!0===l&&c<=D)return null;var R=k(void 0,this.state,this.props),I=[],j=null,N=null,P=null,F=null,B=null,H=m&&m.goButton,z=g?1:2,U=A-1>0?A-1:0,V=A+1=2*z&&3!==A&&(I[0]=Object(u.cloneElement)(I[0],{className:"".concat(n,"-item-after-jump-prev")}),I.unshift(j)),R-A>=2*z&&A!==R-2&&(I[I.length-1]=Object(u.cloneElement)(I[I.length-1],{className:"".concat(n,"-item-before-jump-next")}),I.push(N)),1!==$&&I.unshift(P),Q!==R&&I.push(F)}var ee=null;y&&(ee=h.a.createElement("li",{className:"".concat(n,"-total-text")},y(c,[0===c?0:(A-1)*D+1,A*D>c?c:A*D])));var te=!this.hasPrev()||!R,ne=!this.hasNext()||!R;return h.a.createElement("ul",Object(r.a)({className:f()(n,a,Object(i.a)({},"".concat(n,"-disabled"),s)),style:o,unselectable:"unselectable",ref:this.savePaginationNode},W),ee,h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:te?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),te)),"aria-disabled":te},this.renderPrev(U)),I,h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:ne?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),ne)),"aria-disabled":ne},this.renderNext(V)),h.a.createElement(b,{disabled:s,locale:d,rootPrefixCls:n,selectComponentClass:T,selectPrefixCls:_,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:A,pageSize:D,pageSizeOptions:O,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:H}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,i=k(e.pageSize,t,e);r=r>i?i:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),n}(h.a.Component);C.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:w,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:w,locale:x.a,style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};var E=C},"6GrX": +/*!**************************************************!*\ + !*** ./node_modules/zrender/lib/contain/text.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/BoundingRect */"mFDi"),i=n(/*! ../graphic/helper/image */"Xnb7"),a=n(/*! ../core/util */"bYtY"),o=a.getContext,s=a.extend,l=a.retrieve2,c=a.retrieve3,u=a.trim,h={},d=0,f=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,p={};function m(e,t){var n=e+":"+(t=t||"12px sans-serif");if(h[n])return h[n];for(var r=(e+"").split("\n"),i=0,a=0,o=r.length;a5e3&&(d=0,h={}),d++,h[n]=i,i}function g(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function v(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function y(e,t,n){var r=t.textPosition,i=t.textDistance,a=n.x,o=n.y;i=i||0;var s=n.height,l=n.width,c=s/2,u="left",h="top";switch(r){case"left":a-=i,o+=c,u="right",h="middle";break;case"right":a+=i+l,o+=c,h="middle";break;case"top":a+=l/2,o-=i,u="center",h="bottom";break;case"bottom":a+=l/2,o+=s+i,u="center";break;case"inside":a+=l/2,o+=c,u="center",h="middle";break;case"insideLeft":a+=i,o+=c,h="middle";break;case"insideRight":a+=l-i,o+=c,u="right",h="middle";break;case"insideTop":a+=l/2,o+=i,u="center";break;case"insideBottom":a+=l/2,o+=s-i,u="center",h="bottom";break;case"insideTopLeft":a+=i,o+=i;break;case"insideTopRight":a+=l-i,o+=i,u="right";break;case"insideBottomLeft":a+=i,o+=s-i,h="bottom";break;case"insideBottomRight":a+=l-i,o+=s-i,u="right",h="bottom"}return(e=e||{}).x=a,e.y=o,e.textAlign=u,e.textVerticalAlign=h,e}function b(e,t,n,r,i){if(!t)return"";var a=(e+"").split("\n");i=x(t,n,r,i);for(var o=0,s=a.length;o=a;c++)o-=a;var u=m(n,t);return u>o&&(n="",u=0),o=e-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=o,r.containerWidth=e,r}function w(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";var a=m(e,r);if(a<=n)return e;for(var o=0;;o++){if(a<=i||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?k(e,i,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*i/a):0;a=m(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function k(e,t,n,r){for(var i=0,a=0,o=e.length;ah)e="",o=[];else if(null!=d)for(var f=x(d-(n?n[1]+n[3]:0),t,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),p=0,m=o.length;pa&&_(n,e.substring(a,o)),_(n,r[2],r[1]),a=f.lastIndex}ay)return{lines:[],width:0,height:0};P.textWidth=m(P.text,L);var D=T.textWidth,M=null==D||"auto"===D;if("string"==typeof D&&"%"===D.charAt(D.length-1))P.percentWidth=D,d.push(P),D=0;else{if(M){D=P.textWidth;var R=T.textBackgroundColor,I=R&&R.image;I&&(I=i.findExistImage(I),i.isImageReady(I)&&(D=Math.max(D,I.width*A/I.height)))}var j=O?O[1]+O[3]:0;D+=j;var N=null!=v?v-E:null;null!=N&&N1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};t.a=function(e,t,n){var r=(e=e||{}).random||(e.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return u(r)}},"7SHv": +/*!*********************************************!*\ + !*** ./node_modules/zrender/lib/Painter.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./config */"LPTA").devicePixelRatio,i=n(/*! ./core/util */"bYtY"),a=n(/*! ./core/log */"SUKs"),o=n(/*! ./core/BoundingRect */"mFDi"),s=n(/*! ./core/timsort */"BPZU"),l=n(/*! ./Layer */"Xmg4"),c=n(/*! ./animation/requestAnimationFrame */"mLcG"),u=n(/*! ./graphic/Image */"Dagg"),h=n(/*! ./core/env */"ItGF");function d(e){return parseInt(e,10)}var f=new o(0,0,0,0),p=new o(0,0,0,0);var m=function(e,t,n){this.type="canvas";var a=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=i.extend({},n||{}),this.dpr=n.devicePixelRatio||r,this._singleCanvas=a,this.root=e;var o=e.style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",e.innerHTML=""),this.storage=t;var s=this._zlevelList=[],c=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,a){var u=e.width,h=e.height;null!=n.width&&(u=n.width),null!=n.height&&(h=n.height),this.dpr=n.devicePixelRatio||1,e.width=u*this.dpr,e.height=h*this.dpr,this._width=u,this._height=h;var d=new l(e,this,this.dpr);d.__builtin__=!0,d.initContext(),c[314159]=d,d.zlevel=314159,s.push(314159),this._domRoot=e}else{this._width=this._getSize(0),this._height=this._getSize(1);var f=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(f)}this._hoverlayer=null,this._hoverElements=[]};m.prototype={constructor:m,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(e){var t=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,e,this._redrawId);for(var r=0;r=0&&n.splice(r,1),e.__hoverMir=null},clearHover:function(e){for(var t=this._hoverElements,n=0;n15)break}l.__drawIndex=v,l.__drawIndex0&&e>r[0]){for(s=0;se);s++);o=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(o){var c=o.dom;c.nextSibling?l.insertBefore(t.dom,c.nextSibling):l.appendChild(t.dom)}else l.firstChild?l.insertBefore(t.dom,l.firstChild):l.appendChild(t.dom)}else a("Layer of zlevel "+e+" is not valid")},eachLayer:function(e,t){var n,r,i=this._zlevelList;for(r=0;r0?.01:0),this._needsManuallyCompositing),l.__builtin__||a("ZLevel "+c+" has been used by unkown layer "+l.id),l!==i&&(l.__used=!0,l.__startIndex!==n&&(l.__dirty=!0),l.__startIndex=n,l.incremental?l.__drawIndex=-1:l.__drawIndex=n,t(n),i=l),s.__dirty&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=n))}t(n),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(e){e.clear()},setBackgroundColor:function(e){this._backgroundColor=e},configLayer:function(e,t){if(t){var n=this._layerConfig;n[e]?i.merge(n[e],t,!0):n[e]=t;for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===t?[]:t),a=[];function o(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.map((function(u,h){var d=Object(l.h)(s?s.pos:"0",h),f=c(u.key,d),p=Object(i.a)(Object(i.a)({},u),{},{parent:s,pos:d,children:null,data:u,isStart:[].concat(Object(r.a)(s?s.isStart:[]),[0===h]),isEnd:[].concat(Object(r.a)(s?s.isEnd:[]),[h===e.length-1])});return a.push(p),!0===t||n.has(f)?p.children=o(u.children||[],p):p.children=[],p}))}return o(e),a}function d(e,t,n){var r;n?"string"==typeof n?r=function(e){return e[n]}:"function"==typeof n&&(r=function(e){return n(e)}):r=function(e,t){return c(e.key,t)},function n(i,a,o){var s=i?i.children:e,c=i?Object(l.h)(o.pos,a):"0";if(i){var u=r(i,c),h={node:i,index:a,pos:c,key:u,parentPos:o.node?o.pos:null,level:o.level+1};t(h)}s&&s.forEach((function(e,t){n(e,t,{node:i,pos:c,level:o?o.level+1:-1})}))}(null)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,a=arguments.length>2?arguments[2]:void 0,o={},s={},l={posEntities:o,keyEntities:s};return n&&(l=n(l)||l),d(e,(function(e){var t=e.node,n=e.index,i=e.pos,a=e.key,u=e.parentPos,h={node:t,index:n,key:a,pos:i,level:e.level},d=c(a,i);o[i]=h,s[d]=h,h.parent=o[u],h.parent&&(h.parent.children=h.parent.children||[],h.parent.children.push(h)),r&&r(h,l)}),a),i&&i(l),l}function p(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,a=t.loadingKeys,o=t.checkedKeys,s=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,u=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==i.indexOf(e),loading:-1!==a.indexOf(e),checked:-1!==o.indexOf(e),halfChecked:-1!==s.indexOf(e),pos:String(u?u.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function m(e){var t=e.data,n=e.expanded,r=e.selected,a=e.checked,o=e.loaded,l=e.loading,c=e.halfChecked,u=e.dragOver,h=e.dragOverGapTop,d=e.dragOverGapBottom,f=e.pos,p=e.active,m=Object(i.a)(Object(i.a)({},t),{},{expanded:n,selected:r,checked:a,loaded:o,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:h,dragOverGapBottom:d,pos:f,active:p});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Object(s.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}},"8EBN": +/*!**********************************************!*\ + !*** ./node_modules/codemirror/mode/meta.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.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 t=0;t-1&&t.substring(i+1,t.length);if(a)return e.findModeByExtension(a)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n"],v=new f.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){m.length=0,g=["
          "]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(){return function e(t,n,r,i){if(n>=t.length||t[n].level<=r)return n;var a=t[n];i.push("
        • "+a.text+"");var o=[];return n=e(t,++n,a.level,o),o.length>0&&(i.push("
            "),o.forEach((function(e){i.push(e)})),i.push("
          ")),i.push("
        • "),n=e(t,n,r,i)}(m,0,0,g),g.push("
        "),g.join("")}var k={heading:function(e){var t=y.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:Object(s.a)(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||""),i=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(i)>=0){var a=S(),o=r;r=a,T[a]={type:"block",expression:o}}return{type:"code",raw:n,lang:i,text:r}}}},C=/(?:\${2})([^\n`]+?)(?:\${2})/gi,E=0,S=function(){return"__special_katext_id_".concat(E++,"__")},T={};function _(){E=0,T={}}function O(e){return e=e.replace(C,(function(e,t){var n=S();return T[n]={type:"inline",expression:t},n}))}var L=v.listitem;v.listitem=function(e){return L(O(e))};var A=v.paragraph;v.paragraph=function(e){return A(O(e))};var D=v.tablecell;v.tablecell=function(e,t){return D(O(e),t)},v.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"

        ".concat(e,"

        "):'
        ').concat(n?e:Object(p.escape)(e,!0),"
        \n"):'
        '+(n?e:Object(p.escape)(e,!0))+"
        "},v.heading=function(e,t,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:r,level:t,text:e}),"'+e+""},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:k,renderer:v});var M=f.a,R=(n("SJMd"),n("ulZh")),I=n.n(R),j=n("m3rI"),N=n("Oy/b"),P=n("p5ED"),F=n("ErOA"),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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function H(e,t){function n(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function z(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function U(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]',"select"),this.addActionButton(n,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'',"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(e){var n=document.createElement("div");n.className=""+t.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",e.typeName),n.innerHTML=e.icon,n.addEventListener("click",(function(){t.markerToolbarButtonClicked(n,e)})),t.buttons.push(n),t.markerButtons.push(n)})),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()},e.prototype.addButtonClickListener=function(e){this.buttonClickListeners.push(e)},e.prototype.removeButtonClickListener=function(e){this.buttonClickListeners.indexOf(e)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(e),1)},e.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},e.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var e=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t0&&this.buttonClickListeners.forEach((function(e){return e("marker",t)})),this.markerButtonOverflowBlock.style.display="none"},e.prototype.actionToolbarButtonClicked=function(e,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("action",t)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},e.prototype.setActiveButton=function(e){this.resetButtonStyles(),e.className=e.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),e.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},e.prototype.setActiveMarkerButton=function(e){var t=this.markerButtons.find((function(t){return t.getAttribute("data-type-name")===e}));t&&this.setActiveButton(t)},e.prototype.setCurrentMarker=function(e){var t=this;this.currentMarker=e,this.buttons.filter((function(e){return/delete|notes/.test(e.getAttribute("data-action"))})).forEach((function(e){void 0===t.currentMarker?(e.style.fillOpacity="0.4",e.style.pointerEvents="none"):(e.style.fillOpacity="1",e.style.pointerEvents="all")}))},e}(),J=function(){function e(e,t,n,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=e,this.displayMode=t,this.uiStyleSettings=n,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return e.prototype.addStyles=function(){var e;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 t=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!==(e=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==e?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"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 "))},e.prototype.show=function(e){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==t?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},e.prototype.setPanelButtons=function(e){var t,n,r=this;this.panels=e,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==t?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(e){var t;e.uiStyleSettings=r.uiStyleSettings;var n=document.createElement("div");n.className=r.toolboxButtonStyleClass.name+" "+(null!==(t=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==t?t:r.toolboxButtonStyleColorsClass.name),n.innerHTML=e.icon,n.title=e.title,n.addEventListener("click",(function(){r.panelButtonClick(e)})),r.panelButtons.push(n),r.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},e.prototype.panelButtonClick=function(e){var t=this,n=-1;if(e!==this.activePanel){n=this.panels.indexOf(e),this.panelRow.innerHTML="";var r=e.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=e}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===t.displayMode?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(e,r){var i,a;e.className=t.toolboxButtonStyleClass.name+" "+(r===n?""+(null!==(i=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==i?i:t.toolboxActiveButtonStyleColorsClass.name):""+(null!==(a=t.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==a?a:t.toolboxButtonStyleColorsClass.name))}))},e}(),Z=function(e,t){this.title=e,this.icon=t},ee=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.colors=[],a.addTransparent=!1,a.colorBoxes=[],a.colors=n,a.currentColor=r,a.setCurrentColor=a.setCurrentColor.bind(a),a.getColorBox=a.getColorBox.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.colors.forEach((function(n){var r=e.getColorBox(n);t.appendChild(r),e.colorBoxes.push(r)})),t},t.prototype.getColorBox=function(e){var t=this,n=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-n,i=document.createElement("div");i.style.display="inline-block",i.style.boxSizing="content-box",i.style.width=r-2+"px",i.style.height=r-2+"px",i.style.padding="1px",i.style.marginRight="2px",i.style.marginBottom="2px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderRadius=(r+2)/2+"px",i.style.borderColor=e===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentColor(e,i)}));var a=document.createElement("div");return a.style.display="inline-block",a.style.width=r-2+"px",a.style.height=r-2+"px",a.style.backgroundColor=e,a.style.borderRadius=r/2+"px","transparent"===e&&(a.style.fill=this.uiStyleSettings.toolboxAccentColor,a.innerHTML='\n \n '),i.appendChild(a),i},t.prototype.setCurrentColor=function(e,t){var n=this;this.currentColor=e,this.colorBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(e)},t}(Z),te=function(){function e(e,t,n){this._state="new",this._isSelected=!1,this._container=e,this._overlayContainer=t,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(e.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!1},Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},e.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},e.prototype.pointerDown=function(e,t){},e.prototype.dblClick=function(e,t){},e.prototype.manipulate=function(e){},e.prototype.pointerUp=function(e){this.stateChanged()},e.prototype.dispose=function(){},e.prototype.addMarkerVisualToContainer=function(e){this.container.childNodes.length>0?this.container.insertBefore(e,this.container.childNodes[0]):this.container.appendChild(e)},e.prototype.getState=function(){return{typeName:e.typeName,state:this.state,notes:this.notes}},e.prototype.restoreState=function(e){this._state=e.state,this.notes=e.notes},e.prototype.scale=function(e,t){},e.prototype.colorChanged=function(e){this.onColorChanged&&this.onColorChanged(e),this.stateChanged()},e.prototype.fillColorChanged=function(e){this.onFillColorChanged&&this.onFillColorChanged(e),this.stateChanged()},e.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var e=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),e.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(e)&&this.onStateChanged(this)}},e.typeName="MarkerBase",e}(),ne=function(){function e(){this.findGripByVisual=this.findGripByVisual.bind(this)}return e.prototype.findGripByVisual=function(e){return this.topLeft.ownsTarget(e)?this.topLeft:this.topCenter.ownsTarget(e)?this.topCenter:this.topRight.ownsTarget(e)?this.topRight:this.centerLeft.ownsTarget(e)?this.centerLeft:this.centerRight.ownsTarget(e)?this.centerRight:this.bottomLeft.ownsTarget(e)?this.bottomLeft:this.bottomCenter.ownsTarget(e)?this.bottomCenter:this.bottomRight.ownsTarget(e)?this.bottomRight:void 0},e}(),re=function(){function e(){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 e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e}(),ie=function(){function e(){}return e.toITransformMatrix=function(e){return{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}},e.toSVGMatrix=function(e,t){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},e}(),ae=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(W.createTransform()),i.setupControlBox(),i}return H(t,e),Object.defineProperty(t.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visual",{get:function(){return this._visual},set:function(e){this._visual=e;var t=W.createTransform();this._visual.transform.baseVal.appendItem(t)},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!!(void 0!==this.controlGrips.findGripByVisual(t)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(t);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(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},t.prototype.moveVisual=function(e){this.visual.style.transform="translate("+e.x+"px, "+e.y+"px)"},t.prototype.manipulate=function(e){var t=this.unrotatePoint(e);"creating"===this.state?this.resize(e):"move"===this.state?(this.left=this.manipulationStartLeft+(t.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(t.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(t):"rotate"===this.state&&this.rotate(e)},t.prototype.resize=function(e){var t=this.manipulationStartLeft,n=this.manipulationStartWidth,r=this.manipulationStartTop,i=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:t=this.manipulationStartLeft+e.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-t;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+e.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+e.y-this.manipulationStartY,i=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:i=this.manipulationStartHeight+e.y-this.manipulationStartY}n>=0?(this.left=t,this.width=n):(this.left=t+n,this.width=-n),i>=0?(this.top=r,this.height=i):(this.top=r+i,this.height=-i),this.setSize()},t.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},t.prototype.rotate=function(e){if(Math.abs(e.x-this.centerX)>.1){var t=Math.sign(e.x-this.centerX);this.rotationAngle=180*Math.atan((e.y-this.centerY)/(e.x-this.centerX))/Math.PI+90*t,this.applyRotation()}},t.prototype.applyRotation=function(){var e=this.container.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(e,0)},t.prototype.rotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM(),n=W.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.unrotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM();t=t.inverse();var n=W.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=W.createGroup();var e=W.createTransform();e.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(e),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 ne,this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){var e=this.controlBox.transform.baseVal.getItem(0);e.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(e,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),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()},t.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()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.controlGrips.topLeft.GRIP_SIZE,t=-e/2,n=t,r=(this.width+this.CB_DISTANCE)/2-e/2,i=(this.height+this.CB_DISTANCE)/2-e/2,a=this.height+this.CB_DISTANCE-e/2,o=this.width+this.CB_DISTANCE-e/2;this.positionGrip(this.controlGrips.topLeft.visual,t,n),this.positionGrip(this.controlGrips.topCenter.visual,r,n),this.positionGrip(this.controlGrips.topRight.visual,o,n),this.positionGrip(this.controlGrips.centerLeft.visual,t,i),this.positionGrip(this.controlGrips.centerRight.visual,o,i),this.positionGrip(this.controlGrips.bottomLeft.visual,t,a),this.positionGrip(this.controlGrips.bottomCenter.visual,r,a),this.positionGrip(this.controlGrips.bottomRight.visual,o,a),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,n-3*this.CB_DISTANCE)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.hideControlBox=function(){this.controlBox.style.display="none"},t.prototype.showControlBox=function(){this.controlBox.style.display=""},t.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ie.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ie.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*t,y:r.y*n});this.left=i.x,this.top=i.y,this.width=this.width*t,this.height=this.height*n,this.adjustControlBox()},t}(te),oe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&W.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&W.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&W.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&W.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.title="Rectangle marker",t}(ae),se=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.widths=[],a.widthBoxes=[],a.widths=n,a.currentWidth=r,a.setCurrentWidth=a.setCurrentWidth.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.widths.forEach((function(n){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=n===e.currentWidth?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentWidth(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=n.toString(),i.style.marginRight="5px",r.appendChild(i);var a=document.createElement("div");a.style.minHeight="20px",a.style.flexGrow="2",a.style.display="flex",a.style.alignItems="center";var o=document.createElement("hr");o.style.minWidth="20px",o.style.border="0px",o.style.borderTop=n+"px solid "+e.uiStyleSettings.toolboxColor,o.style.flexGrow="2",a.appendChild(o),r.appendChild(a),e.widthBoxes.push(r)})),t},t.prototype.setCurrentWidth=function(e,t){var n=this;this.currentWidth=e,this.widthBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},t}(Z),le=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.styles=[],a.styleBoxes=[],a.styles=n,a.currentStyle=r,a.setCurrentStyle=a.setCurrentStyle.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.styles.forEach((function(n){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/e.styles.length-5+"%",r.style.borderColor=n===e.currentStyle?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentStyle(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.minHeight="20px",i.style.flexGrow="2",i.style.overflow="hidden";var a='\n \n ";i.innerHTML=a,r.appendChild(i),e.styleBoxes.push(r)})),t},t.prototype.setCurrentStyle=function(e,t){var n=this;this.currentStyle=e,this.styleBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},t}(Z),ce=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return H(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="FrameMarker",t.title="Frame marker",t.icon='',t}(oe),ue=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},he=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return H(t,e),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartX=t.x,this.manipulationStartY=t.y,"new"===this.state&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.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(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"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(t),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},t.prototype.adjustVisual=function(){},t.prototype.manipulate=function(e){"creating"===this.state?this.resize(e):"move"===this.state?(this.x1=this.manipulationStartX1+e.x-this.manipulationStartX,this.y1=this.manipulationStartY1+e.y-this.manipulationStartY,this.x2=this.manipulationStartX2+e.x-this.manipulationStartX,this.y2=this.manipulationStartY2+e.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(e)},t.prototype.resize=function(e){switch(this.activeGrip){case this.grip1:this.x1=e.x,this.y1=e.y;break;case this.grip2:case void 0:this.x2=e.x,this.y2=e.y}this.adjustVisual(),this.adjustControlBox()},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=W.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){this.positionGrips()},t.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(W.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-e/2,this.y1-e/2),this.positionGrip(this.grip2.visual,this.x2-e/2,this.y2-e/2)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.x1=this.x1*t,this.y1=this.y1*n,this.x2=this.x2*t,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},t}(te),de=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},t.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},t.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()]]))},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},t.typeName="LineMarker",t.title="Line marker",t.icon='',t}(he),fe=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.fonts=[],a.fontBoxes=[],a.fonts=n,a.currentFont=r,a.setCurrentFont=a.setCurrentFont.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.flexGrow="2",this.fonts.forEach((function(n){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/e.fonts.length-5+"%",r.style.borderColor=n===e.currentFont?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentFont(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.display="flex",i.style.minHeight="20px",i.style.flexGrow="2",i.style.fontFamily=n,i.style.overflow="hidden";var a=document.createElement("div");a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.innerHTML="The quick brown fox jumps over the lazy dog",i.appendChild(a),r.appendChild(i),e.fontBoxes.push(r)})),t},t.prototype.setCurrentFont=function(e,t){var n=this;this.currentFont=e,this.fontBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},t}(Z),pe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.padding=5,i.DEFAULT_TEXT="your text here",i.text=i.DEFAULT_TEXT,i.isMoved=!1,i.color=r.defaultColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setColor=i.setColor.bind(i),i.setFont=i.setFont.bind(i),i.renderText=i.renderText.bind(i),i.sizeText=i.sizeText.bind(i),i.textEditDivClicked=i.textEditDivClicked.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.setSize=i.setSize.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i}return H(t,e),t.prototype.ownsTarget=function(t){if(e.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(e){e===t&&(n=!0)})),n},t.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()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.renderText=function(){var e=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(t){e.textElement.appendChild(W.createTSpan(""===t.trim()?" ":t.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},t.prototype.getTextScale=function(){var e=this.textElement.getBBox(),t=1;if(e.width>0&&e.height>0){var n=(1*this.width-this.width*this.padding*2/100)/e.width,r=(1*this.height-this.height*this.padding*2/100)/e.height;t=Math.min(n,r)}return t},t.prototype.getTextPosition=function(e){var t=this.textElement.getBBox(),n=0,r=0;return t.width>0&&t.height>0&&(n=(this.width-t.width*e)/2,r=this.height/2-t.height*e/2),{x:n,y:r}},t.prototype.sizeText=function(){var e=this.textElement.getBBox(),t=this.getTextScale(),n=this.getTextPosition(t);n.y-=e.y*t,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+t+", "+t+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(t,t))},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.sizeText()},t.prototype.setSize=function(){e.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()]]))},t.prototype.pointerUp=function(t){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),e.prototype.pointerUp.call(this,t),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.showTextEditor=function(){var e=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(e){e.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var t=Number.parseFloat(e.textEditor.style.fontSize);e.textEditor.clientWidth>=Number.parseInt(e.textEditor.style.maxWidth)&&t>.9;)t-=.1,e.textEditor.style.fontSize=Math.max(t,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(e){if(e.clipboardData){var t=e.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(t)),e.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){e.textEditDivClicked(e.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},t.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var e=this.getTextScale(),t=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),r={x:n.width*e,y:n.height*e};t.x-=r.x/2,t.y-=r.y/2,this.textEditor.style.top=t.y+"px",this.textEditor.style.left=t.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-t.x+"px",this.textEditor.style.fontSize=Math.max(16*e,12)+"px",this.textElement.style.display="none"}},t.prototype.textEditDivClicked=function(e){this.text=e.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},t.prototype.select=function(){e.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},t.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),e.prototype.deselect.call(this)},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setColor=function(e){this.textElement&&W.setAttributes(this.textElement,[["fill",e]]),this.color=e,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(e)},t.prototype.setFont=function(e){this.textElement&&W.setAttributes(this.textElement,[["font-family",e]]),this.fontFamily=e,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},t.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},t.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize(),this.sizeText(),this.positionTextEditor()},t.typeName="TextMarker",t.title="Text marker",t.icon='',t}(ae),me=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},t.prototype.createVisual=function(){this.visual=W.createGroup(),this.drawingImage=W.createImage(),this.visual.appendChild(this.drawingImage);var e=W.createTransform();this.visual.transform.baseVal.appendItem(e),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){"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(t.x,t.y),this.drawing=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.manipulate=function(t){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),W.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),W.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):e.prototype.pointerUp.call(this,t)},t.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)},t.prototype.select=function(){"creating"===this.state&&this.finishCreation(),e.prototype.select.call(this)},t.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),e.prototype.deselect.call(this)},t.prototype.finishCreation=function(){for(var e=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),t=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=t[0],r=t[1],i=t[2],a=t[3],o=!1,s=0;s0&&(o=!0,sa&&(a=s),l>i&&(i=l));if(o){this.left=n/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(i-n)/this.pixelRatio,this.height=(a-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=i-n,c.height=a-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,r,i-n,a-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},t.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})},t.prototype.setColor=function(e){this.color=e,this.colorChanged(e)},t.prototype.setLineWidth=function(e){this.lineWidth=e},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){this.createVisual(),e.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setDrawingImage()},t.typeName="FreehandMarker",t.title="Freehand marker",t.icon='',t}(ae),ge=function(e){function t(t,n,r){var i=e.call(this,t,r||'')||this;return i.typeBoxes=[],i.currentType=n,i.setCurrentType=i.setCurrentType.bind(i),i}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2";for(var n=function(n){var i="both";switch(n){case 0:i="both";break;case 1:i="start";break;case 2:i="end";break;case 3:i="none"}var a=document.createElement("div");if(a.style.display="flex",a.style.flexGrow="2",a.style.alignItems="center",a.style.justifyContent="space-between",a.style.padding="5px",a.style.borderWidth="2px",a.style.borderStyle="solid",a.style.borderColor=i===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",a.addEventListener("click",(function(){e.setCurrentType(i,a)})),t.appendChild(a),"both"===i||"start"===i){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",a.appendChild(o)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.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",s.appendChild(l),a.appendChild(s),"both"===i||"end"===i){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",a.appendChild(c)}r.typeBoxes.push(a)},r=this,i=0;i<4;i++)n(i);return t},t.prototype.setCurrentType=function(e,t){var n=this;this.currentType=e,this.typeBoxes.forEach((function(e){e.style.borderColor=e===t?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},t}(Z),ve=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new ge("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},t.prototype.getArrowPoints=function(e,t){var n=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return e-n/2+","+(t+r/2)+" "+e+","+(t-r/2)+" "+(e+n/2)+","+(t+r/2)},t.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.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 t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},t.prototype.setArrowType=function(e){this.arrowType=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},t.typeName="ArrowMarker",t.title="Arrow marker",t.icon='',t}(de),ye=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new ee("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return H(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="CoverMarker",t.title="Cover marker",t.icon='',t}(oe),be=function(e){function t(t,n,r,i){var a=e.call(this,t,i||'')||this;return a.opacities=[],a.opacityBoxes=[],a.opacities=n,a.currentOpacity=r,a.setCurrentOpacity=a.setCurrentOpacity.bind(a),a}return H(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",t.style.justifyContent="space-between",this.opacities.forEach((function(n){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=n===e.currentOpacity?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentOpacity(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=100*n+"%",r.appendChild(i),e.opacityBoxes.push(r)})),t},t.prototype.setCurrentOpacity=function(e,t){var n=this;this.currentOpacity=e,this.opacityBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},t}(Z),xe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new ee("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new be("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return H(t,e),t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&W.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="HighlightMarker",t.title="Highlight marker",t.icon='',t}(ye),we='',ke=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new ee("Text color",r.defaultColorSet,i.color,''),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new ee("Fill color",r.defaultColorSet,i.bgColor,we),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new re,i.tipGrip.visual.transform.baseVal.appendItem(W.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return H(t,e),t.prototype.ownsTarget=function(t){return e.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},t.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)},t.prototype.pointerDown=function(t,n){"new"===this.state&&e.prototype.pointerDown.call(this,t,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,e.prototype.pointerUp.call(this,t);else{var n="creating"===this.state;e.prototype.pointerUp.call(this,t),this.setTipPoints(n),this.positionTip()}},t.prototype.manipulate=function(t){if(this.tipMoving){var n=this.unrotatePoint(t);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else e.prototype.manipulate.call(this,t)},t.prototype.setBgColor=function(e){this.bgRectangle&&this.tip&&(W.setAttributes(this.bgRectangle,[["fill",e]]),W.setAttributes(this.tip,[["fill",e]])),this.bgColor=e,this.fillColorChanged(e)},t.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},t.prototype.setTipPoints=function(e){void 0===e&&(e=!1);var t=Math.min(this.height/2,15),n=this.height/5;e&&(this.tipPosition={x:t+n/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 t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},t.typeName="MeasurementMarker",t.title="Measurement marker",t.icon='',t}(de),Se=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return H(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="EllipseFrameMarker",t.title="Ellipse frame marker",t.icon='',t}(Ce),Te=function(){function e(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),e.prototype.addUndoStep=function(e){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},e.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},e.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},e.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return void 0!==e&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},e.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},e}(),_e=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return H(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},t.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},t.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=t.x,this.curveY=t.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},t.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()]]))},t.prototype.setupControlBox=function(){e.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)},t.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,e.prototype.addControlGrips.call(this)},t.prototype.positionGrips=function(){e.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/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()))},t.prototype.manipulate=function(t){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),e.prototype.resize.call(this,t),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual()},t.prototype.scale=function(t,n){this.curveX=this.curveX*t,this.curveY=this.curveY*n,e.prototype.scale.call(this,t,n)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},t.typeName="CurveMarker",t.title="Curve marker",t.icon='',t}(he),Oe=function(){function e(e,t){void 0===t&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(e.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){this._defaultPrevented=!0},e}(),Le=function(e){function t(t,n,r){var i=e.call(this,t,!1)||this;return i.dataUrl=n,i.state=r,i}return H(t,e),t}(Oe),Ae=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,r)||this;return i.marker=n,i}return H(t,e),t}(Oe),De=function(){function e(){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 e.prototype.addEventListener=function(e,t){this[e].push(t)},e.prototype.removeEventListener=function(e,t){var n=this[e].indexOf(t);n>-1&&this[e].splice(n,1)},e}(),Me=function(){function e(t){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ue,this._isOpen=!1,this.undoRedoManager=new Te,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 De,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=e.instanceCounter++,this.styles=new q(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=t,this.targetRoot=document.body,this.width=t.clientWidth,this.height=t.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(e.prototype,"ALL_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,Se,Ce,xe,ke,Ee,ye,de,_e]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,Ce,xe,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(e){if("string"==typeof e){var n=t.ALL_MARKER_TYPES.find((function(t){return t.typeName===e}));void 0!==n&&t._availableMarkerTypes.push(n)}else t._availableMarkerTypes.push(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),G.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},e.prototype.show=function(){var e=this;void 0===this.styles.styleSheetRoot&&void 0!==Y.styleSheetRoot&&(this.styles.styleSheetRoot=Y.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new Oe(e))}))},e.prototype.render=function(){return z(this,void 0,void 0,(function(){var e;return U(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new K).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},e.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isOpen){var n=!1;e||this.eventListeners.beforeclose.forEach((function(e){var r=new Oe(t,!0);e(r),r.defaultPrevented&&(n=!0)})),n||(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(e){return e(new Oe(t))})),this.detachEvents(),this._isOpen=!1)}},e.prototype.addMarkersToToolbar=function(){for(var e,t=[],n=0;nthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,n=t',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},e.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")},e.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"},e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},e.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 e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"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 Q(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(e),1),e.dispose()},e.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())},e.prototype.toolbarButtonClicked=function(e,t){if("marker"===e&&void 0!==t)this.createNewMarker(t);else if("action"===e)switch(t){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()}},e.prototype.deleteSelectedMarker=function(){var e=this;if(void 0!==this._currentMarker){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Ae(e,e._currentMarker,!0);n(r),r.defaultPrevented&&(t=!0)})),!t){var n=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(t){return t(new Ae(e,n))}))}}},e.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Ae(e,void 0,!0);n(r),r.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var n=function(t){var n=r.markers[t];r.setCurrentMarker(r.markers[t]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(t){return t(new Ae(e,n))}))},r=this,i=this.markers.length-1;i>=0;i--)n(i);this.addUndoStep()}},Object.defineProperty(e.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),e.prototype.showNotesEditor=function(){var e;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!==(e=this._currentMarker.notes)&&void 0!==e?e:"",this.overlayContainer.appendChild(this.notesArea))},e.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)},e.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},e.prototype.addUndoStep=function(){var e=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var t=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===t.width&&n.height===t.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),r1&&this.panTo({x:e.clientX,y:e.clientY}))},e.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep()},e.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},e.prototype.onKeyUp=function(e){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==e.key&&"Backspace"!==e.key||this.deleteSelectedMarker()},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.markerImage.getBoundingClientRect();return{x:(e-n.left)/this.zoomLevel,y:(t-n.top)/this.zoomLevel}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.addLicenseKey=function(e){G.addKey(e)},e.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},e.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),e.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new Oe(e))})))},e.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new Oe(e))})))},e.instanceCounter=0,e}(),Re=function(e,t){return(Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}; +/* ********************************** +cropro version 1.2.0 +@license SEE LICENSE IN LICENSE + +copyright Alan Mendelevich +see README and LICENSE for details +********************************** */ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */function Ie(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Re(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function je(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function Ne(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&t>0){var n=new Ye(e,t),r=n.ratio>=1?20:n.getHorizontalLength(20),i=n.ratio<1?20:n.getVerticalLength(20),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(a);var o=Fe.createDefs();a.appendChild(o);var s=Fe.createElement("clipPath",[["id","text-bg-clip"]]);o.appendChild(s);var l=Fe.createPath(Fe.getHollowRectanglePath((24-r)/2,(24-i)/2,r,i,(24-r)/2+2,(24-i)/2+2,r-4,i-4));a.appendChild(l);var c=Fe.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Fe.createTSpan(e+":"+t)),a.appendChild(c);var u=c.getBBox();Fe.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=Fe.createPath(Fe.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 s.appendChild(h),Fe.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(a),a.outerHTML}return''},e}(),Xe=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.isDropdownOpen=!1,i.onClick=i.dropdownButtonClicked,i.dropdownButtons=r,i}return Ie(t,e),t.prototype.setupDropdown=function(){var e=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(t){t.className=e.className,t.colorsClassName=e.colorsClassName,e.dropdownBlock.appendChild(t.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},t.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},t.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},t.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},t.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},t.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},t}(Ge),$e=function(){function e(e,t){this.GRIP_SIZE=10,this.color=e,this.fillColor=t,this.visual=Fe.createGroup(),this.visual.appendChild(Fe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Fe.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e.prototype.setCenter=function(e,t){this.visual.childNodes.forEach((function(n){return Fe.setAttributes(n,[["cx",e.toString()],["cy",t.toString()]])}))},e}(),Qe=function(){function e(e,t,n,r){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=e,this.canvasHeight=t,this.margin=n,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(e.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(e){this._aspectRatio=e,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.gridContainer&&Fe.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),e.prototype.open=function(){var e=this;this.cropShadeElement=Fe.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Fe.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var t=0;tthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-t.height/2),Fe.setAttributes(this.cropRectElement,[["x",t.x.toString()],["y",t.y.toString()],["width",t.width.toString()],["height",t.height.toString()]]);var n=t.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(e,r){var i=t.y+n*(r+1);Fe.setAttributes(e,[["x1",""+t.x],["y1",""+i],["x2",""+(t.x+t.width)],["y2",""+i]])}));var r=t.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(e,n){var i=t.x+r*(n+1);Fe.setAttributes(e,[["x1",""+i],["y1",""+t.y],["x2",""+i],["y2",""+(t.y+t.height)]])})),Fe.setAttributes(this.cropShadeElement,[["d",Fe.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,t.x,t.y,t.width,t.height)]]),this.topLeftGrip.setCenter(t.x,t.y),this.topRightGrip.setCenter(t.x+t.width,t.y),this.bottomLeftGrip.setCenter(t.x,t.y+t.height),this.bottomRightGrip.setCenter(t.x+t.width,t.y+t.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},e.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)},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.container.getBoundingClientRect();return{x:e-n.left+this.margin,y:t-n.top+this.margin}},e.prototype.onPointerDown=function(e){this.container.setPointerCapture(e.pointerId),this.previousPoint=this.clientToLocalCoordinates(e.clientX,e.clientY),this.cropRectElement===e.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(e.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(e.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(e.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(e.target)&&(this.activeGrip=this.bottomRightGrip)},e.prototype.onPointerMove=function(e){if(this.isMoving)this.move(this.clientToLocalCoordinates(e.clientX,e.clientY));else if(this.activeGrip){var t=this.clientToLocalCoordinates(e.clientX,e.clientY);this.resize(t)}e.preventDefault()},e.prototype.onPointerUp=function(e){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(e.pointerId)},e.prototype.move=function(e){var t=e.x-this.previousPoint.x,n=e.y-this.previousPoint.y;1!==this.zoomFactor&&(t=-t/this.zoomFactor,n=-n/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+t),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+n),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=e},e.prototype.resize=function(e){var t=Object.assign({},this.cropRect),n=e.x-this.previousPoint.x,r=e.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:t.x+nthis.canvasWidth*this.zoomFactor&&(n=this.canvasWidth*this.zoomFactor-t.width),t.width+=n}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(t.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(n),t.height=this.aspectRatio.getVerticalLength(t.width)):(t.y+=r,t.height=this.cropRect.y+this.cropRect.height-t.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?t.height=this.aspectRatio.getVerticalLength(t.width):t.height+=r}t.width<10&&(t.x=this.cropRect.x,t.width=10),t.height<10&&(t.y=this.cropRect.y,t.height=10),this.previousPoint=e,t.x>=this.margin&&t.y>=this.margin&&t.x-this.margin+t.width<=this.canvasWidth&&t.y-this.margin+t.height<=this.canvasHeight&&(this.cropRect=t,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},e.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var e=this.cropRect.x+this.cropRect.width/2,t=this.cropRect.y+this.cropRect.height/2,n=this.aspectRatio.getHorizontalLength(this.cropRect.height),r=this.aspectRatio.getVerticalLength(this.cropRect.width);n/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=e-this.cropRect.width/2,this.cropRect.y=t-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)}},e.prototype.getRescaledRect=function(e,t,n,r,i,a){var o=n/e,s=r/t;return{x:(i.x-a)*o+a,y:(i.y-a)*s+a,width:i.width*o,height:i.height*s}},e.prototype.scaleCanvas=function(e,t){var n=this.getRescaledRect(this.canvasWidth,this.canvasHeight,e,t,this.cropRect,this.margin);this.canvasWidth=e,this.canvasHeight=t,this.onCropChange&&this.onCropChange(n),this.setCropRectangle(n)},e}(),Je=function(){function e(e){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=e,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(e.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),e.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},e.prototype.onPointerDown=function(e){this.controlContainer.setPointerCapture(e.pointerId),this.isDragging=!0,this.previousPoint={x:e.clientX,y:e.clientY}},e.prototype.onPointerMove=function(e){this.isDragging&&(this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.previousPoint.x=e.clientX)},e.prototype.onPointerUp=function(e){this.isDragging&&this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(e.pointerId)},e.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var e=this.angleLabelText.getBBox();Fe.setAttributes(this.angleLabelElement,[["x",((this.width-e.width)/2).toString()],["y",(this.height/2).toString()]])}},e.prototype.positionScaleShape=function(){if(this.scaleShape){var e=this.scaleShape.transform.baseVal.getItem(0);e.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(e,0)}},e.prototype.getVisual=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("width",this.width+"px"),e.setAttribute("height",this.height+"px"),e.setAttribute("viewBox","0 0 "+this.width+" "+this.height),e.style.flexShrink="0",document.body.appendChild(e);for(var t="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,n=1;n<=this.width/5+10;n++){var r=n%5==0?this.height/3:this.height/6;t+="h4v"+-r+"h1v"+r}t+="v1H0Z",this.scaleShape=Fe.createPath(t);var i=Fe.createTransform();this.scaleShape.transform.baseVal.appendItem(i),e.appendChild(this.scaleShape),this.angleLabelElement=Fe.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Fe.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var a=Fe.createTSpan("");return a.innerHTML="°",this.angleLabelElement.appendChild(a),e.appendChild(this.angleLabelElement),document.body.removeChild(e),e},e}(),Ze=function(){function e(){this.naturalSize=!1,this.imageType="image/png"}return e.prototype.rasterize=function(e,t,n,r,i,a,o){var s=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=e.width.baseVal.value-2*r,c.height=e.height.baseVal.value-2*r;var u=1,h=1;!0===s.naturalSize?(u=t.naturalWidth/(e.width.baseVal.value-2*r)/a,h=t.naturalHeight/(e.height.baseVal.value-2*r)/o,c.width=t.naturalWidth/a,c.height=t.naturalHeight/o):void 0!==s.width&&void 0!==s.height&&(u=s.width/n.width,h=s.height/n.height,c.width*=u,c.height*=h);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(i*Math.PI/180),d.scale(a,o),d.translate(-c.width/2,-c.height/2),d.drawImage(t,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=n.width*u,f.height=n.height*h,f.getContext("2d").putImageData(d.getImageData((n.x-r)*u,(n.y-r)*h,n.width*u,n.height*h),0,0),l(f.toDataURL(s.imageType,s.imageQuality))}))},e}(),et=function(){function e(t){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=e.instanceCounter++,this.styles=new Be(this.instanceNo),this.target=t,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(e){this._zoomToCropEnabled=e,e?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gridLines",{get:function(){return this._gridLines},set:function(e){this._gridLines=e,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(e){this._rotationAngle=e,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"aspectRatio",{get:function(){var e;return null!==(e=this._aspectRatio)&&void 0!==e?e:this.aspectRatios[0]},set:function(e){this._aspectRatio=e},enumerable:!1,configurable:!0}),e.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},e.prototype.show=function(){this.showUI(),this.open()},e.prototype.close=function(e){void 0===e&&(e=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),e||this.closeEventListeners.forEach((function(e){return e()})),this._isOpen=!1)},e.prototype.addRenderEventListener=function(e){this.renderEventListeners.push(e)},e.prototype.removeRenderEventListener=function(e){this.renderEventListeners.indexOf(e)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(e),1)},e.prototype.addCloseEventListener=function(e){this.closeEventListeners.push(e)},e.prototype.removeCloseEventListener=function(e){this.closeEventListeners.indexOf(e)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(e),1)},e.prototype.setupResizeObserver=function(){var e=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.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))},e.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.contentDiv.clientWidth/e>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*e:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,n=t+2*this.CANVAS_MARGINe+this.CANVAS_MARGIN?this.target.offsetTop-(e+this.CANVAS_MARGIN):0;this.coverDiv.style.top=t+"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},e.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},e.prototype.addTopToolbar=function(){var e=this;this.topToolbar=new Ue,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 t=new We;t.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(t);var n=[];this.aspectRatios.forEach((function(t){var r=new Ge(qe.getIcon(t.horizontal,t.vertical),0===t.horizontal&&0===t.vertical?"FREE":t.horizontal+":"+t.vertical);r.onClick=function(){return e.ratioButtonClicked(t)},n.push(r)})),this.aspectRatioButton=new Xe(qe.getIcon(0,0),"Aspect ratio",n),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,t.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var r=new Ge('',"Toggle grid");r.isActive=this.isGridVisible,r.onClick=function(){e.isGridVisible=!e.isGridVisible,r.isActive=e.isGridVisible},t.addButton(r);var i=new Ge('',"Zoom to selection");if(i.isActive=this.zoomToCropEnabled,i.onClick=function(){e.zoomToCropEnabled=!e.zoomToCropEnabled,i.isActive=e.zoomToCropEnabled},t.addButton(i),!Pe.isLicensed){var a=new Ke;this.topToolbar.addElementBlock(a);var o=document.createElement("div");o.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var s=document.createElement("a");s.style.color="currentColor",s.href="https://markerjs.com/products/cropro",s.target="_blank",s.innerHTML='',o.appendChild(s),a.addElement(o)}var l=new We;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new Ge('',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new Ge('',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},e.prototype.addBottomToolbar=function(){var e=this;this.bottomToolbar=new Ue,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 t=new We;t.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(t);var n=new Ge('',"Rotate left");n.onClick=this.rotateLeftButtonClicked,t.addButton(n);var r=new Ge('',"Rotate right");r.onClick=this.rotateRightButtonClicked,t.addButton(r);var i=new Ke;i.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(i),this.straightener=new Je("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(t){e.rotateBy(t),e.straightener.angle=e.rotationAngle},i.addElement(this.straightener.getUI());var a=new We;a.minWidth=2*this.toolbarHeight+"px",a.contentAlign="end",this.bottomToolbar.addButtonBlock(a);var o=new Ge('',"Flip horizontal");o.onClick=this.flipHorizontallyButtonClicked,a.addButton(o);var s=new Ge('',"Flip vertical");s.onClick=this.flipVerticallyButtonClicked,a.addButton(s)},e.prototype.ratioButtonClicked=function(e){this.aspectRatio=e,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},e.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=qe.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},e.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new Ye(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},e.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},e.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},e.prototype.restoreState=function(e){if(e){var t=this.cropLayer.getRescaledRect(e.width,e.height,this.imageWidth,this.imageHeight,e.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(t),this.cropRectChanged(t),this.flippedHorizontally=e.flippedHorizontally,this.flippedVertically=e.flippedVertically,this.applyFlip(),this.rotationAngle=e.rotationAngle,this.applyRotation()}},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.cropImage.getBoundingClientRect();return{x:e-n.left,y:t-n.top}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var e=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.rotateLeftButtonClicked=function(){var e=this.rotationAngle-90;this.rotationAngle%90!=0&&(e+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateRightButtonClicked=function(){var e=this.rotationAngle+90;this.rotationAngle%90!=0&&(e-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateTo=function(e){e=(e=e>180?e-360:e)<=-180?e+360:e,this.rotationAngle=e,this.applyRotation()},e.prototype.rotateBy=function(e){this.rotateTo((this.rotationAngle+e)%360)},e.prototype.applyRotation=function(){var e=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var t=this.editingTargetRotationContainer.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(t,0);var n=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/n.width,this.imageHeight/n.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=e},e.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},e.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},e.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},e.prototype.startRenderAndClose=function(){return je(this,void 0,void 0,(function(){var e,t;return Ne(this,(function(n){switch(n.label){case 0:return[4,this.render()];case 1:return e=n.sent(),t=this.getState(),this.renderEventListeners.forEach((function(n){return n(e,t)})),this.close(!0),[2]}}))}))},e.prototype.render=function(){return je(this,void 0,void 0,(function(){var e;return Ne(this,(function(t){switch(t.label){case 0:return(e=new Ze).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.width=this.renderWidth,e.height=this.renderHeight,this.unzoomFromCrop(),Fe.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,e.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 t.sent(),[4,e.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,t.sent()]}}))}))},e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ze("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 ze("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new ze("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var e=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ze("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*e)+"px;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ze("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ze("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new He("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new He("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new ze("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 ze("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new ze("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 ze("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new ze("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},e.instanceCounter=0,e}(),tt=n("8hTe"),nt=n.n(tt),rt=/]*>/g;t.a=function(e){var t=e.value,n=void 0===t?"":t,l=e.edit,d=void 0!==l&&l,f=e.className,p=e.showTextOnly,m=e.showLines,g=e.replaces,v=e.zoomImg,y=e.hasMask,k=e.style,C=void 0===k?{}:k,E=e.stylesPrev,S=void 0===E?{}:E,O=String(n),L=Object(u.useRef)(),A=Object(u.useRef)(),D=Object(u.useState)(""),R=Object(s.a)(D,2),B=R[0],H=R[1],z=Object(u.useState)("office"),U=Object(s.a)(z,2),V=U[0],W=U[1],G=Object(u.useMemo)((function(){try{O=(O=O.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+j.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+j.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+j.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]

        ",w()),b()),e=(e=e.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var r=t[n],i=r.type,a=r.expression;return Object(N.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(a)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),_(),p){var n=document.createElement("div");return n.innerHTML=e,n.innerText}return setTimeout((function(){return q()}),500),e}),[O]),K=Object(u.useRef)();function Y(e){var t=e.target;if("IMG"===t.tagName.toUpperCase()){if(v){var n=t.getAttribute("src");H(n),W("image")}}else if("A"===t.tagName.toUpperCase()){var r=t.getAttribute("href");if(r.indexOf("office")>-1)e.preventDefault(),H(r),W("office");else if(r.indexOf("application/pdf")>-1)e.preventDefault(),H(r),W("pdf");else if(r.indexOf("type=text")>-1)e.preventDefault(),H(r),W("html");else if(r.startsWith("#")){e.preventDefault();var i=document.getElementById(r.replace("#",""));i&&i.scrollIntoView(!0)}}}x.WebkitLineClamp=m,m&&(C=Object(a.a)(Object(a.a)({},C),x));var q=function(){var e,t=null===(e=K.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(I.a.isSupported()){var t=new I.a;t.loadSource(e.src),t.attachMedia(e)}}))};Object(u.useEffect)((function(){if(K.current&&G&&G.match(rt)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",Y),function(){K.current.removeEventListener("click",Y),_(),b()}}),[G,K.current,Y]);return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:K,style:Object(a.a)({},C),className:"".concat(f||""," markdown-body ").concat(nt.a.mdBody),onMouseOver:function(e){d&&("IMG"===e.target.nodeName?(L.current.style.display="flex",L.current.style.width=e.target.clientWidth+"px",L.current.style.height=e.target.clientHeight+"px",L.current.style.top=e.target.offsetTop+"px",L.current.style.left=e.target.offsetLeft+"px",A.current.src=e.target.getAttribute("src")):L.current.style.display="none")},dangerouslySetInnerHTML:{__html:G}}),h.a.createElement("div",{ref:L,className:nt.a.button},h.a.createElement(r.a,null,h.a.createElement(i.a,{onClick:function(){return(e=new et(A.current)).displayMode="popup",e.addRenderEventListener(function(){var e=Object(o.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return L.current.style.display="none",e.next=3,Object(F.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:t}});case 3:null!=(n=e.sent)&&n.id&&g(A.current.getAttribute("src").replace(j.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),void e.show();var e}},"裁剪"),h.a.createElement(i.a,{onClick:function(){return(e=new Me(A.current)).settings.displayMode="popup",e.addEventListener("render",function(){var e=Object(o.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(L.current.style.display="none",!A.current){e.next=6;break}return e.next=4,Object(F.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:t.dataUrl}});case 4:null!=(n=e.sent)&&n.id&&g(A.current.getAttribute("src").replace(j.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.show(),void(window.markerArea=e);var e}},"编辑"))),h.a.createElement("img",{ref:A,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),h.a.createElement(P.a,{close:!0,data:B,hasMask:y,type:null!=B&&B.length?V:"",style:Object(a.a)({},S),onClose:function(){return H("")}}))}},"9VGf": +/*!****************************************!*\ + !*** ./src/components/useInterval.tsx ***! + \****************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! react */"q1tI");function i(e,t){var n=Object(r.useRef)();Object(r.useEffect)((function(){n.current=e})),Object(r.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}},Aocz: +/*!******************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/ShixunHomeworks/Detail/index.less?modules ***! + \******************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___7n5J9",flex_space_between:"flex_space_between___1vC-V",flex_box_vertical_center:"flex_box_vertical_center___3gkLb",flex_box_center_end:"flex_box_center_end___26SUk",flex_box_column:"flex_box_column___2iv36",title:"title___ooa1w",menuTabs:"menuTabs___3mPq2",rightMenu:"rightMenu___2Vjbz",shixunDetail:"shixunDetail___2EXcB"}},BPZU: +/*!**************************************************!*\ + !*** ./node_modules/zrender/lib/core/timsort.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function r(e,t,n,r,i){for(r===t&&r++;r>>1])<0?l=a:s=a+1;var c=r-s;switch(c){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;c>0;)e[s+c]=e[s+c-1],c--}e[s]=o}}function i(e,t,n,r,i,a){var o=0,s=0,l=1;if(a(e,t[n+i])>0){for(s=r-i;l0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var c=o;o=i-l,l=i-c}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:l=u}return l}function a(e,t,n,r,i,a){var o=0,s=0,l=1;if(a(e,t[n+i])<0){for(s=i+1;ls&&(l=s);var c=o;o=i-l,l=i-c}else{for(s=r-i;l=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(e,t[n+u])<0?l=u:o=u+1}return l}function o(e,t){var n,r,o,s=7,l=0;n=e.length;var c=[];function u(n){var u=r[n],h=o[n],d=r[n+1],f=o[n+1];o[n]=h+f,n===l-3&&(r[n+1]=r[n+2],o[n+1]=o[n+2]),l--;var p=a(e[d],e,u,h,0,t);u+=p,0!==(h-=p)&&0!==(f=i(e[u+h-1],e,d,f,f-1,t))&&(h<=f?function(n,r,o,l){var u=0;for(u=0;u=7||m>=7);if(g)break;v<0&&(v=0),v+=2}if((s=v)<1&&(s=1),1===r){for(u=0;u=0;u--)e[m+u]=e[p+u];return void(e[f]=c[d])}var g=s;for(;;){var v=0,y=0,b=!1;do{if(t(c[d],e[h])<0){if(e[f--]=e[h--],v++,y=0,0==--r){b=!0;break}}else if(e[f--]=c[d--],y++,v=0,1==--l){b=!0;break}}while((v|y)=0;u--)e[m+u]=e[p+u];if(0===r){b=!0;break}}if(e[f--]=c[d--],1==--l){b=!0;break}if(0!==(y=l-i(e[h],c,0,l,l-1,t))){for(l-=y,m=(f-=y)+1,p=(d-=y)+1,u=0;u=7||y>=7);if(b)break;g<0&&(g=0),g+=2}(s=g)<1&&(s=1);if(1===l){for(m=(f-=r)+1,p=(h-=r)+1,u=r-1;u>=0;u--)e[m+u]=e[p+u];e[f]=c[d]}else{if(0===l)throw new Error;for(p=f-(l-1),u=0;u1;){var e=l-2;if(e>=1&&o[e-1]<=o[e]+o[e+1]||e>=2&&o[e-2]<=o[e]+o[e-1])o[e-1]o[e+1])break;u(e)}},this.forceMergeRuns=function(){for(;l>1;){var e=l-2;e>0&&o[e-1]=32;)t|=1&e,e>>=1;return e+t}(s);do{if((l=n(e,i,a,t))u&&(h=u),r(e,i,i+h,i+l,t),l=h}c.pushRun(i,l),c.mergeRuns(),s-=l,i+=l}while(0!==s);c.forceMergeRuns()}}}},BU3w: +/*!***************************************************!*\ + !*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***! + \***************************************************/ +/*! exports provided: injectCSS, updateCSS */ +/*! exports used: updateCSS */function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(/*! ./canUseDom */"MNnm");function i(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function a(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(r.a)())return null;var a,o=document.createElement("style");(null===(t=n.csp)||void 0===t?void 0:t.nonce)&&(o.nonce=null===(a=n.csp)||void 0===a?void 0:a.nonce);o.innerHTML=e;var s=i(n),l=s.firstChild;return n.prepend&&s.prepend?s.prepend(o):n.prepend&&l?s.insertBefore(o,l):s.appendChild(o),o}var o=new Map;function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i(n);if(!o.has(r)){var s=a("",n),l=s.parentNode;o.set(r,l),l.removeChild(s)}var c=Array.from(o.get(r).children).find((function(e){return"STYLE"===e.tagName&&e["rc-util-key"]===t}));if(c){var u,h,d;if((null===(u=n.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(h=n.csp)||void 0===h?void 0:h.nonce))c.nonce=null===(d=n.csp)||void 0===d?void 0:d.nonce;return c.innerHTML!==e&&(c.innerHTML=e),c}var f=a(e,n);return f["rc-util-key"]=t,f}},Bd2K: +/*!********************************************************!*\ + !*** ./node_modules/codemirror/addon/edit/closetag.js ***! + \********************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(o,s,l){if(l!=e.Init&&l&&o.removeKeyMap("autoCloseTags"),s){var c={name:"autoCloseTags"};"object"==typeof s&&!1===s.whenClosing||(c["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}(t)}),"object"==typeof s&&!1===s.whenOpening||(c["'>'"]=function(r){return function(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),s=[],l=r.getOption("autoCloseTags"),c=0;cu.ch&&(m=m.slice(0,m.length-h.end+u.ch));var b=m.toLowerCase();if(!m||"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&&i(v,b)>-1||a(r,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],m,u,!0))return e.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&i(x,m)>-1)s[c]={text:"/>",newPos:e.Pos(u.line,u.ch+2)};else{var w=y&&i(y,b)>-1;s[c]={indent:w,text:">"+(w?"\n\n":"")+"",newPos:w?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}}var k="object"==typeof l&&l.dontIndentOnAutoClose;for(c=o.length-1;c>=0;c--){var C=s[c];r.replaceRange(C.text,o[c].head,o[c].anchor,"+insert");var E=r.listSelections().slice(0);E[c]={head:C.newPos,anchor:C.newPos},r.setSelections(E),!k&&C.indent&&(r.indentLine(C.newPos.line,null,!0),r.indentLine(C.newPos.line+1,null,!0))}}(r)}),o.addKeyMap(c)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["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(t,n){for(var r=t.listSelections(),i=[],o=n?"/":""!=t.getLine(u.line).charAt(h.end)&&(p+=">"),i[c]=p}if(t.replaceSelections(i),r=t.listSelections(),!l)for(c=0;c=0&&n[c]==r;c--)++l;for(i=s.to,c=1;c0){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=0;r.5?t:e}function h(e,t,n,r,i){var a=e.length;if(1===i)for(var o=0;oi)e.length=i;else for(var a=r;a=0&&!(_[n]<=t);n--);n=Math.min(n,x-2)}else{for(n=H;nt);n++);n=Math.min(n-1,x-2)}H=n,z=t;var r=_[n+1]-_[n];if(0!==r)if(j=(t-_[n])/r,b)if(P=O[n],N=O[0===n?n:n-1],F=O[n>x-2?x-1:n+1],B=O[n>x-3?x-1:n+2],C)p(N,P,F,B,j,j*j,j*j*j,g(e,s),T);else{if(E)i=p(N,P,F,B,j,j*j,j*j*j,U,1),i=v(U);else{if(S)return u(P,F,j);i=m(N,P,F,B,j,j*j,j*j*j)}y(e,s,i)}else if(C)h(O[n],O[n+1],j,g(e,s),T);else{var i;if(E)h(O[n],O[n+1],j,U,1),i=v(U);else{if(S)return u(O[n],O[n+1],j);i=c(O[n],O[n+1],j)}y(e,s,i)}},ondestroy:n});return t&&"spline"!==t&&(V.easing=t),V}}}var b=function(e,t,n,r){this._tracks={},this._target=e,this._loop=t||!1,this._getter=n||s,this._setter=r||l,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};b.prototype={when:function(e,t){var n=this._tracks;for(var r in t)if(t.hasOwnProperty(r)){if(!n[r]){n[r]=[];var i=this._getter(this._target,r);if(null==i)continue;0!==e&&n[r].push({time:0,value:g(i)})}n[r].push({time:e,value:t[r]})}return this},during:function(e){return this._onframeList.push(e),this},pause:function(){for(var e=0;e1&&i&&i.length>1){var s=a(i)/a(o);!isFinite(s)&&(s=1),t.pinchScale=s;var l=[((r=i)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=l[0],t.pinchY=l[1],{type:"pinch",target:e[0].target,event:t}}}}},s=i;e.exports=s},DBLp: +/*!*****************************************************!*\ + !*** ./node_modules/zrender/lib/core/arrayDiff2.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(){}function r(e,t,n,r){for(var i=0,a=t.length,o=0,s=0;i=a&&u+1>=o){for(var h=[],d=0;d=a&&d+1>=o)return r(i,l.components,t,e);c[n]=l}else c[n]=void 0}var m;s++}for(;s<=l;){var p=f();if(p)return p}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var i=t.length,a=n.length,o=e.newPos,s=o-r,l=0;o+15e-5||e<-5e-5}var s=function(e){(e=e||{}).position||(this.position=[0,0]),null==e.rotation&&(this.rotation=0),e.scale||(this.scale=[1,1]),this.origin=this.origin||null},l=s.prototype;l.transform=null,l.needLocalTransform=function(){return o(this.rotation)||o(this.position[0])||o(this.position[1])||o(this.scale[0]-1)||o(this.scale[1]-1)};var c=[];l.updateTransform=function(){var e=this.parent,t=e&&e.transform,n=this.needLocalTransform(),i=this.transform;if(n||t){i=i||r.create(),n?this.getLocalTransform(i):a(i),t&&(n?r.mul(i,e.transform,i):r.copy(i,e.transform)),this.transform=i;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(c);var s=c[0]<0?-1:1,l=c[1]<0?-1:1,u=((c[0]-s)*o+s)/c[0]||0,h=((c[1]-l)*o+l)/c[1]||0;i[0]*=u,i[1]*=u,i[2]*=h,i[3]*=h}this.invTransform=this.invTransform||r.create(),r.invert(this.invTransform,i)}else i&&a(i)},l.getLocalTransform=function(e){return s.getLocalTransform(this,e)},l.setTransform=function(e){var t=this.transform,n=e.dpr||1;t?e.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):e.setTransform(n,0,0,n,0,0)},l.restoreTransform=function(e){var t=e.dpr||1;e.setTransform(t,0,0,t,0,0)};var u=[],h=r.create();l.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=this.position,i=this.scale;o(t-1)&&(t=Math.sqrt(t)),o(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(t=-t),e[3]<0&&(n=-n),r[0]=e[4],r[1]=e[5],i[0]=t,i[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/t)}},l.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(r.mul(u,e.invTransform,t),t=u);var n=this.origin;n&&(n[0]||n[1])&&(h[4]=n[0],h[5]=n[1],r.mul(u,t,h),u[4]-=n[0],u[5]-=n[1],t=u),this.setLocalTransform(t)}},l.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},l.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&i.applyTransform(n,n,r),n},l.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&i.applyTransform(n,n,r),n},s.getLocalTransform=function(e,t){a(t=t||[]);var n=e.origin,i=e.scale||[1,1],o=e.rotation||0,s=e.position||[0,0];return n&&(t[4]-=n[0],t[5]-=n[1]),r.scale(t,t,i),o&&r.rotate(t,t,o),n&&(t[4]+=n[0],t[5]+=n[1]),t[4]+=s[0],t[5]+=s[1],t};var d=s;e.exports=d},Dagg: +/*!***************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Image.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Displayable */"Gev7"),i=n(/*! ../core/BoundingRect */"mFDi"),a=n(/*! ../core/util */"bYtY"),o=n(/*! ./helper/image */"Xnb7");function s(e){r.call(this,e)}s.prototype={constructor:s,type:"image",brush:function(e,t){var n=this.style,r=n.image;n.bind(e,this,t);var i=this._image=o.createOrUpdateImage(r,this._image,this,this.onload);if(i&&o.isImageReady(i)){var a=n.x||0,s=n.y||0,l=n.width,c=n.height,u=i.width/i.height;if(null==l&&null!=c?l=c*u:null==c&&null!=l?c=l/u:null==l&&null==c&&(l=i.width,c=i.height),this.setTransform(e),n.sWidth&&n.sHeight){var h=n.sx||0,d=n.sy||0;e.drawImage(i,h,d,n.sWidth,n.sHeight,a,s,l,c)}else if(n.sx&&n.sy){var f=l-(h=n.sx),p=c-(d=n.sy);e.drawImage(i,h,d,f,p,a,s,l,c)}else e.drawImage(i,a,s,l,c);null!=n.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))}},getBoundingRect:function(){var e=this.style;return this._rect||(this._rect=new i(e.x||0,e.y||0,e.width||0,e.height||0)),this._rect}},a.inherits(s,r);var l=s;e.exports=l},DlQD: +/*!*******************************************!*\ + !*** ./node_modules/marked/lib/marked.js ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";function e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[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.")}return(r=e[Symbol.iterator]()).next.bind(r)}var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){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}}e.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:t,changeDefaults:function(t){e.exports.defaults=t}}})),i=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),a=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var d=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},g=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){m[" "+e]||(g.test(e)?m[" "+e]=e+"/":m[" "+e]=x(e,"/",!0));var n=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(v,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(y,"$1")+t:e+t}function x(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:M(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,r,i,a,o,s,l,c=t[0],u=t[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=t[0].match(this.rules.block.item),m=!1,g=p.length,v=0;v1||this.options.smartLists&&i!==u)&&(a=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-a.length),v=g-1)),o=m||/\n\n(?!\s*$)/.test(n),v!==g-1&&(m="\n"===n.charAt(n.length-1),o||(o=m)),o&&(f.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:l,loose:o,text:n});return f}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):I(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i=n.align.length;for(r=0;r/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):I(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=j(t[2],"()");if(n>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,r).trim(),t[3]=""}var i=t[2],a="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o?(i=o[1],a=o[3]):a=""}else a=t[3]?t[3].slice(1,-1):"";return N(t,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return N(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,a="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(a.lastIndex=0;null!=(r=a.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,a="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(a.lastIndex=0;null!=(r=a.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=I(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=I(this.options.mangle?t(i[1]):i[1])):n=I(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=I(this.options.mangle?t(n[0]):n[0]));else{var a;do{a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(a!==n[0]);r=I(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):I(i[0]):i[0]:I(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),F=S,B=C,H=T,z={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:F,table:F,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?'|\([^()]*\))/};z.def=B(z.def).replace("label",z._label).replace("title",z._title).getRegex(),z.bullet=/(?:[*+-]|\d{1,9}[.)])/,z.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,z.item=B(z.item,"gm").replace(/bull/g,z.bullet).getRegex(),z.list=B(z.list).replace(/bull/g,z.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+z.def.source+")").getRegex(),z._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",z._comment=//,z.html=B(z.html,"i").replace("comment",z._comment).replace("tag",z._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),z.paragraph=B(z._paragraph).replace("hr",z.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",z._tag).getRegex(),z.blockquote=B(z.blockquote).replace("paragraph",z.paragraph).getRegex(),z.normal=H({},z),z.gfm=H({},z.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*|$)"}),z.gfm.nptable=B(z.gfm.nptable).replace("hr",z.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",z._tag).getRegex(),z.gfm.table=B(z.gfm.table).replace("hr",z.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",z._tag).getRegex(),z.pedantic=H({},z.normal,{html:B("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",z._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:F,paragraph:B(z.normal._paragraph).replace("hr",z.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",z.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var U={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:F,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:F,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};U.punctuation=B(U.punctuation).replace(/punctuation/g,U._punctuation).getRegex(),U._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",U._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",U.em.start=B(U.em.start).replace(/punctuation/g,U._punctuation).getRegex(),U.em.middle=B(U.em.middle).replace(/punctuation/g,U._punctuation).replace(/overlapSkip/g,U._overlapSkip).getRegex(),U.em.endAst=B(U.em.endAst,"g").replace(/punctuation/g,U._punctuation).getRegex(),U.em.endUnd=B(U.em.endUnd,"g").replace(/punctuation/g,U._punctuation).getRegex(),U.strong.start=B(U.strong.start).replace(/punctuation/g,U._punctuation).getRegex(),U.strong.middle=B(U.strong.middle).replace(/punctuation/g,U._punctuation).replace(/blockSkip/g,U._blockSkip).getRegex(),U.strong.endAst=B(U.strong.endAst,"g").replace(/punctuation/g,U._punctuation).getRegex(),U.strong.endUnd=B(U.strong.endUnd,"g").replace(/punctuation/g,U._punctuation).getRegex(),U.blockSkip=B(U._blockSkip,"g").getRegex(),U.overlapSkip=B(U._overlapSkip,"g").getRegex(),U._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,U._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,U._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])?)+(?![-_])/,U.autolink=B(U.autolink).replace("scheme",U._scheme).replace("email",U._email).getRegex(),U._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,U.tag=B(U.tag).replace("comment",z._comment).replace("attribute",U._attribute).getRegex(),U._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,U._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,U._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,U.link=B(U.link).replace("label",U._label).replace("href",U._href).replace("title",U._title).getRegex(),U.reflink=B(U.reflink).replace("label",U._label).getRegex(),U.reflinkSearch=B(U.reflinkSearch,"g").replace("reflink",U.reflink).replace("nolink",U.nolink).getRegex(),U.normal=H({},U),U.pedantic=H({},U.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:B(/^!?\[(label)\]\((.*?)\)/).replace("label",U._label).getRegex(),reflink:B(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",U._label).getRegex()}),U.gfm=H({},U.normal,{escape:B(U.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&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var X=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||W,this.options.tokenizer=this.options.tokenizer||new P,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:G.normal,inline:K.normal};this.options.pedantic?(t.block=G.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=G.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)};var n,r,i,a=t.prototype;return a.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},a.blockTokens=function(e,t,n){var r,i,a,o;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((o=t[t.length-1]).raw+="\n"+r.raw,o.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),a=r.items.length,i=0;i0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(a=this.tokenizer.escape(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.tag(e,n,r))e=e.substring(a.raw.length),n=a.inLink,r=a.inRawBlock,t.push(a);else if(a=this.tokenizer.link(e))e=e.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),t.push(a);else if(a=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),t.push(a);else if(a=this.tokenizer.strong(e,s,i))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.em(e,s,i))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.codespan(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.br(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.del(e))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.autolink(e,q))e=e.substring(a.raw.length),t.push(a);else if(n||!(a=this.tokenizer.url(e,q))){if(a=this.tokenizer.inlineText(e,r,Y))e=e.substring(a.raw.length),i=a.raw.slice(-1),t.push(a);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(a.raw.length),t.push(a);return t},n=t,i=[{key:"rules",get:function(){return{block:G,inline:K}}}],(r=null)&&e(n.prototype,r),i&&e(n,i),t}(),$=r.defaults,Q=E,J=w,Z=function(){function e(e){this.options=e||$}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'
        '+(n?e:J(e,!0))+"
        \n":"
        "+(n?e:J(e,!0))+"
        \n"},t.blockquote=function(e){return"
        \n"+e+"
        \n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
        \n":"
        \n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
      • "+e+"
      • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

        "+e+"

        \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
        \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
        ":"
        "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=Q(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"},t.image=function(e,t,n){if(null===(e=Q(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/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},e}(),ne=r.defaults,re=k,ie=function(){function e(e){this.options=e||ne,this.options.renderer=this.options.renderer||new Z,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,a,o,s,l,c,u,h,d,f,p,m,g,v,y,b,x="",w=e.length;for(n=0;n0&&"text"===g.tokens[0].type?(g.tokens[0].text=b+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=b+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(g.tokens,p),u+=this.renderer.listitem(m,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;n+1An error occurred:

        "+se(e.message+"",!0)+"
        ";throw e}}return he.options=he.setOptions=function(e){return ae(he.defaults,e),ce(he.defaults),he},he.getDefaults=le,he.defaults=ue,he.use=function(e){var t=ae({},e);if(e.renderer&&function(){var n=he.defaults.renderer||new Z,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,a=new Array(i),o=0;o",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,o){o&&o!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(a(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var a=r(i,"pairs"),o=t.listSelections(),c=0;c=0;c--){var h=o[c].head;t.replaceRange("",n(h.line,h.ch-1),n(h.line,h.ch+1),"+delete")}},Enter:function(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),o=0;o1&&d.indexOf(i)>=0&&t.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;v="addFour"}else if(f){var w=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(x)||w==i||e.isWordChar(w))return e.Pass;v="both"}else{if(!m||!(0===x.length||/\s/.test(x)||h.indexOf(x)>-1))return e.Pass;v="both"}else v=f&&c(t,b)?"both":d.indexOf(i)>=0&&t.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=v)return e.Pass}else u=v}var k=l%2?o.charAt(l-1):i,C=l%2?i:o.charAt(l+1);t.operation((function(){if("skip"==u)t.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==u){var i=t.getSelections();for(r=0;r0,{anchor:new n(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new n(a.head.line,a.head.ch+(o?1:-1))});t.setSelections(i)}else"both"==u?(t.replaceSelection(k+C,null),t.triggerElectric(k+C),t.execCommand("goCharLeft")):"addFour"==u&&(t.replaceSelection(k+k+k+k,"before"),t.execCommand("goCharRight"));var a,o}))}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}a(t.pairs+"`")}(n(/*! ../../lib/codemirror */"VrN/"))},FOrL: +/*!********************************************!*\ + !*** ./src/assets/images/icons/nodata.png ***! + \********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/nodata.a6b3f948.png"},Fofx: +/*!*************************************************!*\ + !*** ./node_modules/zrender/lib/core/matrix.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n="undefined"==typeof Float32Array?Array:Float32Array;function r(){var e=new n(6);return i(e),e}function i(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}t.create=r,t.identity=i,t.copy=a,t.mul=function(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e},t.translate=function(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e},t.rotate=function(e,t,n){var r=t[0],i=t[2],a=t[4],o=t[1],s=t[3],l=t[5],c=Math.sin(n),u=Math.cos(n);return e[0]=r*u+o*c,e[1]=-r*c+o*u,e[2]=i*u+s*c,e[3]=-i*c+u*s,e[4]=u*a+c*l,e[5]=u*l-c*a,e},t.scale=function(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e},t.invert=function(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=n*o-a*r;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-o*i)*l,e[5]=(a*i-n*s)*l,e):null},t.clone=function(e){var t=r();return a(t,e),t}},FxDU: +/*!*******************************************************!*\ + !*** ./node_modules/size-sensor/lib/sensors/index.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSensor=void 0;var r=n(/*! ./object */"QO+J"),i=n(/*! ./resizeObserver */"j5sG"),a="undefined"!=typeof ResizeObserver?i.createSensor:r.createSensor;t.createSensor=a},Gev7: +/*!*********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Displayable.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ./Style */"K2GJ"),a=n(/*! ../Element */"1bdT"),o=n(/*! ./mixin/RectText */"ni6a");function s(e){for(var t in e=e||{},a.call(this,e),e)e.hasOwnProperty(t)&&"style"!==t&&(this[t]=e[t]);this.style=new i(e.style,this),this._rect=null,this.__clipPaths=null}s.prototype={constructor:s,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(e){},afterBrush:function(e){},brush:function(e,t){},getBoundingRect:function(){},contain:function(e,t){return this.rectContain(e,t)},traverse:function(e,t){e.call(t,this)},rectContain:function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(e){return this.animate("style",e)},attrKV:function(e,t){"style"!==e?a.prototype.attrKV.call(this,e,t):this.style.set(t)},setStyle:function(e,t){return this.style.set(e,t),this.dirty(!1),this},useStyle:function(e){return this.style=new i(e,this),this.dirty(!1),this},calculateTextPosition:null},r.inherits(s,a),r.mixin(s,o);var l=s;e.exports=l},Gytx: +/*!********************************************!*\ + !*** ./node_modules/shallowequal/index.js ***! + \********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l3&&(i=n.call(i,1));for(var o=t.length,s=0;s4&&(i=n.call(i,1,i.length-1));for(var o=i[i.length-1],s=t.length,l=0;lthis._ux||y(t-this._yi)>this._uy||this._len<5;return this.addData(l.L,e,t),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(e,t):this._ctx.lineTo(e,t)),n&&(this._xi=e,this._yi=t),this},bezierCurveTo:function(e,t,n,r,i,a){return this.addData(l.C,e,t,n,r,i,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(e,t,n,r,i,a):this._ctx.bezierCurveTo(e,t,n,r,i,a)),this._xi=i,this._yi=a,this},quadraticCurveTo:function(e,t,n,r){return this.addData(l.Q,e,t,n,r),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(e,t,n,r):this._ctx.quadraticCurveTo(e,t,n,r)),this._xi=n,this._yi=r,this},arc:function(e,t,n,r,i,a){return this.addData(l.A,e,t,n,n,r,i-r,0,a?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=m(i)*n+e,this._yi=g(i)*n+t,this},arcTo:function(e,t,n,r,i){return this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},rect:function(e,t,n,r){return this._ctx&&this._ctx.rect(e,t,n,r),this.addData(l.R,e,t,n,r),this},closePath:function(){this.addData(l.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&(this._needsDash()&&this._dashedLineTo(t,n),e.closePath()),this._xi=t,this._yi=n,this},fill:function(e){e&&e.fill(),this.toStatic()},stroke:function(e){e&&e.stroke(),this.toStatic()},setLineDash:function(e){if(e instanceof Array){this._lineDash=e,this._dashIdx=0;for(var t=0,n=0;nt.length&&(this._expandData(),t=this.data);for(var n=0;n0&&m<=e||u<0&&m>=e||0===u&&(h>0&&g<=t||h<0&&g>=t);)m+=u*(n=o[r=this._dashIdx]),g+=h*n,this._dashIdx=(r+1)%y,u>0&&ml||h>0&&gc||s[r%2?"moveTo":"lineTo"](u>=0?f(m,e):p(m,e),h>=0?f(g,t):p(g,t));u=m-e,h=g-t,this._dashOffset=-v(u*u+h*h)},_dashedBezierTo:function(e,t,n,i,a,o){var s,l,c,u,h,d=this._dashSum,f=this._dashOffset,p=this._lineDash,m=this._ctx,g=this._xi,y=this._yi,b=r.cubicAt,x=0,w=this._dashIdx,k=p.length,C=0;for(f<0&&(f=d+f),f%=d,s=0;s<1;s+=.1)l=b(g,e,n,a,s+.1)-b(g,e,n,a,s),c=b(y,t,i,o,s+.1)-b(y,t,i,o,s),x+=v(l*l+c*c);for(;wf);w++);for(s=(C-f)/x;s<=1;)u=b(g,e,n,a,s),h=b(y,t,i,o,s),w%2?m.moveTo(u,h):m.lineTo(u,h),s+=p[w]/x,w=(w+1)%k;w%2!=0&&m.lineTo(a,o),l=a-u,c=o-h,this._dashOffset=-v(l*l+c*c)},_dashedQuadraticTo:function(e,t,n,r){var i=n,a=r;n=(n+2*e)/3,r=(r+2*t)/3,e=(this._xi+2*e)/3,t=(this._yi+2*t)/3,this._dashedBezierTo(e,t,n,r,i,a)},toStatic:function(){var e=this.data;e instanceof Array&&(e.length=this._len,b&&(this.data=new Float32Array(e)))},getBoundingRect:function(){c[0]=c[1]=h[0]=h[1]=Number.MAX_VALUE,u[0]=u[1]=d[0]=d[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,s=0,f=0;fc||y(o-i)>u||d===h-1)&&(e.lineTo(a,o),r=a,i=o);break;case l.C:e.bezierCurveTo(s[d++],s[d++],s[d++],s[d++],s[d++],s[d++]),r=s[d-2],i=s[d-1];break;case l.Q:e.quadraticCurveTo(s[d++],s[d++],s[d++],s[d++]),r=s[d-2],i=s[d-1];break;case l.A:var p=s[d++],v=s[d++],b=s[d++],x=s[d++],w=s[d++],k=s[d++],C=s[d++],E=s[d++],S=b>x?b:x,T=b>x?1:b/x,_=b>x?x/b:1,O=w+k;Math.abs(b-x)>.001?(e.translate(p,v),e.rotate(C),e.scale(T,_),e.arc(0,0,S,w,O,1-E),e.scale(1/T,1/_),e.rotate(-C),e.translate(-p,-v)):e.arc(p,v,S,w,O,1-E),1===d&&(t=m(w)*b+p,n=g(w)*x+v),r=m(O)*b+p,i=g(O)*x+v;break;case l.R:t=r=s[d],n=i=s[d+1],e.rect(s[d++],s[d++],s[d++],s[d++]);break;case l.Z:e.closePath(),r=t,i=n}}}},x.CMD=l;var w=x;e.exports=w},ItGF: +/*!**********************************************!*\ + !*** ./node_modules/zrender/lib/core/env.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(e){var t={},n=e.match(/Firefox\/([\d.]+)/),r=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(e);n&&(t.firefox=!0,t.version=n[1]);r&&(t.ie=!0,t.version=r[1]);i&&(t.edge=!0,t.version=i[1]);a&&(t.weChat=!0);return{browser:t,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!t.ie&&!t.edge,pointerEventsSupported:"onpointerdown"in window&&(t.edge||t.ie&&t.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent);e.exports=n},K2GJ: +/*!***************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Style.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./helper/fixShadow */"fW2E"),i=n(/*! ./constant */"gut8").ContextCachedBy,a=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],o=function(e){this.extendFrom(e,!1)};function s(e,t,n){var r=null==t.x?0:t.x,i=null==t.x2?1:t.x2,a=null==t.y?0:t.y,o=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),r=isNaN(r)?0:r,i=isNaN(i)?1:i,a=isNaN(a)?0:a,o=isNaN(o)?0:o,e.createLinearGradient(r,a,i,o)}function l(e,t,n){var r=n.width,i=n.height,a=Math.min(r,i),o=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(o=o*r+n.x,s=s*i+n.y,l*=a),e.createRadialGradient(o,s,0,o,s,l)}for(var c=o.prototype={constructor:o,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(e,t,n){var o=n&&n.style,s=!o||e.__attrCachedBy!==i.STYLE_BIND;e.__attrCachedBy=i.STYLE_BIND;for(var l=0;l0},extendFrom:function(e,t){if(e)for(var n in e)!e.hasOwnProperty(n)||!0!==t&&(!1===t?this.hasOwnProperty(n):null==e[n])||(this[n]=e[n])},set:function(e,t){"string"==typeof e?this[e]=t:this.extendFrom(e,!0)},clone:function(){var e=new this.constructor;return e.extendFrom(this,!0),e},getGradient:function(e,t,n){for(var r=("radial"===t.type?l:s)(e,t,n),i=t.colorStops,a=0;a=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return i&&(s?o?u.unshift(s):u.push(s):this.defaultLoader&&(o?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),a.default.createElement(r,c,u)}}]),t}(i.Component);l.propTypes={children:o.default.node.isRequired,element:o.default.node,hasMore:o.default.bool,initialLoad:o.default.bool,isReverse:o.default.bool,loader:o.default.node,loadMore:o.default.func.isRequired,pageStart:o.default.number,ref:o.default.func,getScrollParent:o.default.func,threshold:o.default.number,useCapture:o.default.bool,useWindow:o.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},LdHM: +/*!********************************************************!*\ + !*** ./node_modules/rc-select/es/index.js + 6 modules ***! + \********************************************************/ +/*! exports provided: Option, OptGroup, default */ +/*! exports used: OptGroup, Option, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.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-select/es/TransBtn.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/pickAttrs.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/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";n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return C}));var r=n("1OyB"),i=n("vuIU"),a=n("Ji7U"),o=n("LK+K"),s=n("q1tI"),l=n("rePB"),c=n("Ff2n"),u=n("ODXe"),h=n("4IlW"),d=n("bX4T"),f=n("YrtM"),p=n("TSYQ"),m=n.n(p),g=n("+nKL"),v=n("8OUc"),y=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,i=e.flattenOptions,a=e.childrenAsData,o=e.values,p=e.searchValue,y=e.multiple,b=e.defaultActiveFirstOption,x=e.height,w=e.itemHeight,k=e.notFoundContent,C=e.open,E=e.menuItemSelectedIcon,S=e.virtual,T=e.onSelect,_=e.onToggleOpen,O=e.onActiveValue,L=e.onScroll,A=e.onMouseEnter,D="".concat(n,"-item"),M=Object(f.a)((function(){return i}),[C,i],(function(e,t){return t[0]&&e[1]!==t[1]})),R=s.useRef(null),I=function(e){e.preventDefault()},j=function(e){R.current&&R.current.scrollTo({index:e})},N=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=M.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];return Object(S.a)(e).map((function(e,n){if(!s.isValidElement(e)||!e.type)return null;var r=e.type.isSelectOptGroup,i=e.key,a=e.props,o=a.children,l=Object(c.a)(a,["children"]);return t||!r?T(e):Object(E.a)(Object(E.a)({key:"__RC_SELECT_GRP__".concat(null===i?n:i,"__"),label:i},l),{},{options:_(o)})})).filter((function(e){return e}))}var O=n("2Qr1"),L=n("qNPg"),A=n("U8pU"),D=n("Kwbf"),M=n("WKfj");var R=function(e){var t=e.mode,n=e.options,r=e.children,i=e.backfill,a=e.allowClear,o=e.placeholder,l=e.getInputElement,c=e.showSearch,u=e.onSearch,h=e.defaultOpen,d=e.autoFocus,f=e.labelInValue,p=e.value,m=e.inputValue,g=e.optionLabelProp,v="multiple"===t||"tags"===t,y=void 0!==c?c:v||"combobox"===t,b=n||_(r);if(Object(D.a)("tags"!==t||b.every((function(e){return!e.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===t||"combobox"===t){var x=b.some((function(e){return e.options?e.options.some((function(e){return"number"==typeof("value"in e?e.value:e.key)})):"number"==typeof("value"in e?e.value:e.key)}));Object(D.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(D.a)("combobox"!==t||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(D.a)("combobox"===t||!i,"`backfill` only works with `combobox` mode."),Object(D.a)("combobox"===t||!l,"`getInputElement` only work with `combobox` mode."),Object(D.b)("combobox"!==t||!l||!a||!o,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==t&&"tags"!==t&&Object(D.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(D.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 w=Object(M.d)(p);Object(D.a)(!f||w.every((function(e){return"object"===Object(A.a)(e)&&("key"in e||"value"in e)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(D.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var k=null;Object(S.a)(r).some((function(e){if(!s.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(S.a)(e.props.children).every((function(t){return!(s.isValidElement(t)&&e.type&&!t.type.isSelectOption)||(k=t.type,!1)})):(k=t,!0))})),k&&Object(D.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(k.displayName||k.name||k,"`.")),Object(D.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},I=Object(L.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:_,flattenOptions:O.d,getLabeledValue:O.e,filterOptions:O.b,isValueDisabled:O.g,findValueOption:O.c,warningProps:R,fillOptionsWithMissingValue:O.a}),j=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).selectRef=s.createRef(),e.focus=function(){e.selectRef.current.focus()},e.blur=function(){e.selectRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return s.createElement(I,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);j.Option=w,j.OptGroup=C;var N=j;t.c=N},M8RZ: +/*!**********************************!*\ + !*** ./src/components/modal.tsx ***! + \**********************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! react-dom */"i8i4"),u=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;Object(r.a)(this,n),i=t.call(this,e);var a=window.document;return i.node=a.createElement("div"),a.body.appendChild(i.node),i}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props.children;return Object(c.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(l.a.Component)},MEGo: +/*!***************************************************!*\ + !*** ./node_modules/zrender/lib/tool/parseSVG.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../container/Group */"4fz+"),i=n(/*! ../graphic/Image */"Dagg"),a=n(/*! ../graphic/Text */"dqUG"),o=n(/*! ../graphic/shape/Circle */"2fw6"),s=n(/*! ../graphic/shape/Rect */"x6Kt"),l=n(/*! ../graphic/shape/Ellipse */"rmlV"),c=n(/*! ../graphic/shape/Line */"yxFR"),u=n(/*! ../graphic/Path */"y+Vt"),h=n(/*! ../graphic/shape/Polygon */"h7HQ"),d=n(/*! ../graphic/shape/Polyline */"1Jh7"),f=n(/*! ../graphic/LinearGradient */"SKnc"),p=n(/*! ../graphic/Style */"K2GJ"),m=n(/*! ../core/matrix */"Fofx"),g=n(/*! ./path */"NC18").createFromString,v=n(/*! ../core/util */"bYtY"),y=v.isString,b=v.extend,x=v.defaults,w=v.trim,k=v.each,C=/[\s,]+/;function E(e){y(e)&&(e=(new DOMParser).parseFromString(e,"text/xml"));for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}function S(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}S.prototype.parse=function(e,t){t=t||{};var n=E(e);if(!n)throw new Error("Illegal svg");var i=new r;this._root=i;var a=n.getAttribute("viewBox")||"",o=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(o)&&(o=null),isNaN(l)&&(l=null),D(n,i,null,!0);for(var c,u,h=n.firstChild;h;)this._parseNode(h,i),h=h.nextSibling;if(a){var d=w(a).split(C);d.length>=4&&(c={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(c&&null!=o&&null!=l&&(u=N(c,o,l),!t.ignoreViewBox)){var f=i;(i=new r).add(f),f.scale=u.scale.slice(),f.position=u.position.slice()}return t.ignoreRootClip||null==o||null==l||i.setClipPath(new s({shape:{x:0,y:0,width:o,height:l}})),{root:i,width:o,height:l,viewBoxRect:c,viewBoxTransform:u}},S.prototype._parseNode=function(e,t){var n,r,i=e.nodeName.toLowerCase();if("defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0),this._isDefine){if(r=_[i]){var a=r.call(this,e),o=e.getAttribute("id");o&&(this._defs[o]=a)}}else(r=T[i])&&(n=r.call(this,e,t),t.add(n));for(var s=e.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},S.prototype._parseText=function(e,t){if(1===e.nodeType){var n=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(r)}var i=new a({style:{text:e.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});O(t,i),D(e,i,this._defs);var o=i.style.fontSize;o&&o<9&&(i.style.fontSize=9,i.scale=i.scale||[1,1],i.scale[0]*=o/9,i.scale[1]*=o/9);var s=i.getBoundingRect();return this._textX+=s.width,t.add(i),i};var T={g:function(e,t){var n=new r;return O(t,n),D(e,n,this._defs),n},rect:function(e,t){var n=new s;return O(t,n),D(e,n,this._defs),n.setShape({x:parseFloat(e.getAttribute("x")||0),y:parseFloat(e.getAttribute("y")||0),width:parseFloat(e.getAttribute("width")||0),height:parseFloat(e.getAttribute("height")||0)}),n},circle:function(e,t){var n=new o;return O(t,n),D(e,n,this._defs),n.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),r:parseFloat(e.getAttribute("r")||0)}),n},line:function(e,t){var n=new c;return O(t,n),D(e,n,this._defs),n.setShape({x1:parseFloat(e.getAttribute("x1")||0),y1:parseFloat(e.getAttribute("y1")||0),x2:parseFloat(e.getAttribute("x2")||0),y2:parseFloat(e.getAttribute("y2")||0)}),n},ellipse:function(e,t){var n=new l;return O(t,n),D(e,n,this._defs),n.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),rx:parseFloat(e.getAttribute("rx")||0),ry:parseFloat(e.getAttribute("ry")||0)}),n},polygon:function(e,t){var n=e.getAttribute("points");n&&(n=L(n));var r=new h({shape:{points:n||[]}});return O(t,r),D(e,r,this._defs),r},polyline:function(e,t){var n=new u;O(t,n),D(e,n,this._defs);var r=e.getAttribute("points");return r&&(r=L(r)),new d({shape:{points:r||[]}})},image:function(e,t){var n=new i;return O(t,n),D(e,n,this._defs),n.setStyle({image:e.getAttribute("xlink:href"),x:e.getAttribute("x"),y:e.getAttribute("y"),width:e.getAttribute("width"),height:e.getAttribute("height")}),n},text:function(e,t){var n=e.getAttribute("x")||0,i=e.getAttribute("y")||0,a=e.getAttribute("dx")||0,o=e.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new r;return O(t,s),D(e,s,this._defs),s},tspan:function(e,t){var n=e.getAttribute("x"),i=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||0,o=e.getAttribute("dy")||0,s=new r;return O(t,s),D(e,s,this._defs),this._textX+=a,this._textY+=o,s},path:function(e,t){var n=e.getAttribute("d")||"",r=g(n);return O(t,r),D(e,r,this._defs),r}},_={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||0,10),n=parseInt(e.getAttribute("y1")||0,10),r=parseInt(e.getAttribute("x2")||10,10),i=parseInt(e.getAttribute("y2")||0,10),a=new f(t,n,r,i);return function(e,t){var n=e.firstChild;for(;n;){if(1===n.nodeType){var r=n.getAttribute("offset");r=r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var i=n.getAttribute("stop-color")||"#000000";t.addColorStop(r,i)}n=n.nextSibling}}(e,a),a},radialgradient:function(e){}};function O(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),x(t.__inheritedStyle,e.__inheritedStyle))}function L(e){for(var t=w(e).split(C),n=[],r=0;r0;a-=2){var o=i[a],s=i[a-1];switch(r=r||m.create(),s){case"translate":o=w(o).split(C),m.translate(r,r,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=w(o).split(C),m.scale(r,r,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=w(o).split(C),m.rotate(r,r,parseFloat(o[0]));break;case"skew":o=w(o).split(C),console.warn("Skew transform is not supported yet");break;case"matrix":o=w(o).split(C);r[0]=parseFloat(o[0]),r[1]=parseFloat(o[1]),r[2]=parseFloat(o[2]),r[3]=parseFloat(o[3]),r[4]=parseFloat(o[4]),r[5]=parseFloat(o[5])}}t.setLocalTransform(r)}}(e,t),b(i,function(e){var t=e.getAttribute("style"),n={};if(!t)return n;var r,i={};j.lastIndex=0;for(;null!=(r=j.exec(t));)i[r[1]]=r[2];for(var a in A)A.hasOwnProperty(a)&&null!=i[a]&&(n[A[a]]=i[a]);return n}(e)),!r))for(var o in A)if(A.hasOwnProperty(o)){var s=e.getAttribute(o);null!=s&&(i[A[o]]=s)}var l=a?"textFill":"fill",c=a?"textStroke":"stroke";t.style=t.style||new p;var u=t.style;null!=i.fill&&u.set(l,R(i.fill,n)),null!=i.stroke&&u.set(c,R(i.stroke,n)),k(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){var t="lineWidth"===e&&a?"textStrokeWidth":e;null!=i[e]&&u.set(t,parseFloat(i[e]))})),i.textBaseline&&"auto"!==i.textBaseline||(i.textBaseline="alphabetic"),"alphabetic"===i.textBaseline&&(i.textBaseline="bottom"),"start"===i.textAlign&&(i.textAlign="left"),"end"===i.textAlign&&(i.textAlign="right"),k(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(e){null!=i[e]&&u.set(e,i[e])})),i.lineDash&&(t.style.lineDash=w(i.lineDash).split(C)),u[c]&&"none"!==u[c]&&(t[c]=!0),t.__inheritedStyle=i}var M=/url\(\s*#(.*?)\)/;function R(e,t){var n=t&&e&&e.match(M);return n?t[w(n[1])]:e}var I=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var j=/([^\s:;]+)\s*:\s*([^:;]+)/g;function N(e,t,n){var r=t/e.width,i=n/e.height,a=Math.min(r,i);return{scale:[a,a],position:[-(e.x+e.width/2)*a+t/2,-(e.y+e.height/2)*a+n/2]}}t.parseXML=E,t.makeViewBoxTransform=N,t.parseSVG=function(e,t){return(new S).parse(e,t)}},MKOG: +/*!*********************************************************!*\ + !*** ./node_modules/zrender/lib/animation/Animation.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ../core/event */"YH21").Dispatcher,a=n(/*! ./requestAnimationFrame */"mLcG"),o=n(/*! ./Animator */"Bq2U"),s=function(e){e=e||{},this.stage=e.stage||{},this.onframe=e.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,i.call(this)};s.prototype={constructor:s,addClip:function(e){this._clips.push(e)},addAnimator:function(e){e.animation=this;for(var t=e.getClips(),n=0;n=0&&this._clips.splice(t,1)},removeAnimator:function(e){for(var t=e.getClips(),n=0;n1&&(u*=o(x),f*=o(x));var w=(i===a?-1:1)*o((u*u*(f*f)-u*u*(b*b)-f*f*(y*y))/(u*u*(b*b)+f*f*(y*y)))||0,k=w*u*b/f,C=w*-f*y/u,E=(e+n)/2+l(v)*k-s(v)*C,S=(t+r)/2+s(v)*k+l(v)*C,T=d([1,0],[(y-k)/u,(b-C)/f]),_=[(y-k)/u,(b-C)/f],O=[(-1*y-k)/u,(-1*b-C)/f],L=d(_,O);h(_,O)<=-1&&(L=c),h(_,O)>=1&&(L=0),0===a&&L>0&&(L-=2*c),1===a&&L<0&&(L+=2*c),g.addData(m,E,S,u,f,T,L,v,a)}var p=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,m=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function g(e,t){var n=function(e){if(!e)return new i;for(var t,n=0,r=0,a=n,o=r,s=new i,l=i.CMD,c=e.match(p),u=0;u1&&void 0!==arguments[1]&&arguments[1];return!(!k(e)||!C(t))},k=function(e){return!!Object(h.p)()||(e({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},C=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=Object(u.c)()._store.getState(),r=n.user;return!(null===(e=r.userInfo)||void 0===e||!e.profile_completed)||(a.a.confirm({title:"提示",width:530,centered:!0,content:t?"按照有关政策规定,特殊实验需要先绑定手机号才能使用,请先绑定手机号码":"您需要去完善您的个人资料,才能使用此功能",okText:"立即完善",cancelText:"稍后完善",onOk:function(){u.d.push("/account/profile/edit")}}),!1)},E=function(){var e;return!(null===(e=Object(u.c)()._store.getState().user.userInfo)||void 0===e||!e.professional_certification)||(a.a.confirm({title:"提示",centered:!0,content:c.a.createElement("div",{className:"tc"},"您需要去完成您的职业认证,才能使用此功能"),okText:"立即完善",cancelText:"稍后完善",onOk:function(){Object(d.O)("/account/certification")}}),!1)},S=function(){return!!Object(h.a)()||(a.a.warning({centered:!0,width:530,title:"提示",content:c.a.createElement("div",{className:"tc",style:{marginLeft:-38}},c.a.createElement("p",null,"您可以扫码加群@群管理员,申请操作权限哦!"),c.a.createElement("img",{src:Object(h.t)()?b.a:"".concat(x.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"我知道了",maskClosable:!0}),!1)},T=function(e,t){return!!e||(a.a.confirm({centered:!0,zIndex:1e4,width:530,title:"提示",content:c.a.createElement("div",null,c.a.createElement("p",null,t||"该实践资源需授权后才可使用。 您可以在QQ服务群向管理员申请,获得继续操作的权限。"),c.a.createElement("div",{style:{marginLeft:"110px"}},c.a.createElement("img",{src:v.a,width:200}),c.a.createElement("div",{style:{marginLeft:"35px"}},"群号:","714336072"))),okText:"立即联系",cancelText:"取消",onOk:function(){Object(d.O)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(u.c)()._store.getState(),o=n.shixunsDetail.detail;return 2===(null==o?void 0:o.public)||1===(null==o?void 0:o.public)||3===(null==o?void 0:o.shixun_status)?(a.a.info({centered:!0,icon:c.a.createElement(f.a,{style:{color:"#faad14"}}),width:460,title:"提示",content:c.a.createElement("div",{className:"tc",style:{marginLeft:-38}},c.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},c.a.createElement("span",null,"该实践项目的状态为",2===(null==o?void 0:o.public)?"已公开":1===(null==o?void 0:o.public)?"待审核":"已关闭",",",t,"。"),c.a.createElement("p",null,"如有需要,请联系平台管理员进行技术支持。")),c.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:m.a,alt:"二维码",width:160})),okText:"我知道了"}),!0):2===(null==o?void 0:o.shixun_status)&&(a.a.confirm({centered:!0,icon:c.a.createElement(f.a,null),title:"提示",content:c.a.createElement("div",null,c.a.createElement("span",null,"该实践项目已发布,",t,"。"),c.a.createElement("br",null),c.a.createElement("span",null,"如有需要,您可以撤销发布后,再进行操作。")),okText:"撤销发布",cancelText:"取消",onOk:function(){var t;a.a.confirm({width:440,centered:!0,icon:c.a.createElement(f.a,{style:{color:"#faad14"}}),title:"提示",content:"撤销发布后,学员将无法进行练习。是否确认撤销发布?",okText:"确定撤销发布",cancelText:"取消",onOk:(t=Object(i.a)(s.a.mark((function t(){return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e({type:"shixunsDetail/cancelRelease",payload:{id:null==o?void 0:o.identifier}});case 2:401!==t.sent.status&&(r.b.success("撤销发布成功。实训回到未发布的状态。"),e({type:"shixunsDetail/getShixunsDetail",payload:{id:null==o?void 0:o.identifier}}),e({type:"practiceSetting/getCommonData",payload:{id:null==o?void 0:o.identifier}}));case 4:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})}}),!0)}},NohK: +/*!**************************************************!*\ + !*** ./node_modules/size-sensor/lib/debounce.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60,n=null;return function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o=0;c-=1){(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var i=!0,s=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);i&&!n&&(i=!1),s||!n&&!o.has(t)||(s=!0)})),i&&a.add(t.key),s&&o.add(t.key),l.add(t.key)}}))}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(i(o,a))}}(c,u,h,s):function(e,t,n,r,a){for(var o=new Set(e),s=new Set(t),l=0;l<=r;l+=1){(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,i=void 0===r?[]:r;o.has(t)||s.has(t)||a(n)||i.filter((function(e){return!a(e.node)})).forEach((function(e){o.delete(e.key)}))}))}s=new Set;for(var c=new Set,u=r;u>=0;u-=1){(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!a(n)&&e.parent&&!c.has(e.parent.key))if(a(e.parent.node))c.add(t.key);else{var r=!0,i=!1;(t.children||[]).filter((function(e){return!a(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);r&&!n&&(r=!1),i||!n&&!s.has(t)||(i=!0)})),r||o.delete(t.key),i&&s.add(t.key),c.add(t.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(i(s,o))}}(c,t.halfCheckedKeys,u,h,s)}},OLES: +/*!*********************************************************!*\ + !*** ./node_modules/rc-tooltip/es/index.js + 2 modules ***! + \*********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tooltip/es/placements.js because of ./node_modules/antd/es/tooltip/placements.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/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("U8pU"),i=n("VTBJ"),a=n("Ff2n"),o=n("q1tI"),s=n("uciX"),l=n("7ixt"),c=function(e){var t=e.overlay,n=e.prefixCls,r=e.id,i=e.overlayInnerStyle;return o.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:i},"function"==typeof t?t():t)},u=Object(o.forwardRef)((function(e,t){var n=e.overlayClassName,u=e.trigger,h=void 0===u?["hover"]:u,d=e.mouseEnterDelay,f=void 0===d?0:d,p=e.mouseLeaveDelay,m=void 0===p?.1:p,g=e.overlayStyle,v=e.prefixCls,y=void 0===v?"rc-tooltip":v,b=e.children,x=e.onVisibleChange,w=e.afterVisibleChange,k=e.transitionName,C=e.animation,E=e.placement,S=void 0===E?"right":E,T=e.align,_=void 0===T?{}:T,O=e.destroyTooltipOnHide,L=void 0!==O&&O,A=e.defaultVisible,D=e.getTooltipContainer,M=e.overlayInnerStyle,R=Object(a.a)(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),I=Object(o.useRef)(null);Object(o.useImperativeHandle)(t,(function(){return I.current}));var j=Object(i.a)({},R);"visible"in e&&(j.popupVisible=e.visible);var N=!1,P=!1;if("boolean"==typeof L)N=L;else if(L&&"object"===Object(r.a)(L)){var F=L.keepParent;N=!0===F,P=!1===F}return o.createElement(s.a,Object.assign({popupClassName:n,prefixCls:y,popup:function(){var t=e.arrowContent,n=void 0===t?null:t,r=e.overlay,i=e.id;return[o.createElement("div",{className:"".concat(y,"-arrow"),key:"arrow"},n),o.createElement(c,{key:"content",prefixCls:y,id:i,overlay:r,overlayInnerStyle:M})]},action:h,builtinPlacements:l.a,popupPlacement:S,ref:I,popupAlign:_,getPopupContainer:D,onPopupVisibleChange:x,afterPopupVisibleChange:w,popupTransitionName:k,popupAnimation:C,defaultPopupVisible:A,destroyPopupOnHide:N,autoDestroy:P,mouseLeaveDelay:m,popupStyle:g,mouseEnterDelay:f},j),b)}));t.a=u},OS9S: +/*!********************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/IncrementalDisplayable.js ***! + \********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY").inherits,i=n(/*! ./Displayable */"Gev7"),a=n(/*! ../core/BoundingRect */"mFDi");function o(e){i.call(this,e),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}o.prototype.incremental=!0,o.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},o.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.dirty()},o.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n=0&&n.splice(r,1),n}function s(e,t){var n=e.slice();return-1===n.indexOf(t)&&n.push(t),n}function l(e){return e.split("-")}function c(e,t){return"".concat(e,"-").concat(t)}function u(e){return e&&e.type&&e.type.isTreeNode}function h(e,t){var n=[e];return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var r=t.key,i=t.children;n.push(r),e(i)}))}(t[e].children),n}function d(e,t){var n=e.clientY,r=t.selectHandle.getBoundingClientRect(),i=r.top,a=r.bottom,o=r.height,s=Math.max(.25*o,2);return n<=i+s?-1:n>=a-s?1:0}function f(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function p(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==Object(i.a)(e))return Object(a.a)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function m(e,t){var n=new Set;return(e||[]).forEach((function(e){!function e(r){if(!n.has(r)){var i=t[r];if(i){n.add(r);var a=i.parent;i.node.disabled||a&&e(a.key)}}}(e)})),Object(r.a)(n)}function g(e){var t={};return Object.keys(e).forEach((function(n){(n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n])})),t}},Ot1p: +/*!**************************************************************!*\ + !*** ./src/components/markdown-editor/index.tsx + 6 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./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/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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/RenderHtml/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ +/*! 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/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ +/*! 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(e,t,n){"use strict";n("2qtc");var r=n("kLXV"),i=n("rAM+"),a=(n("miYZ"),n("tsqr")),o=n("9og8"),s=n("tJVT"),l=n("jrin"),c=n("WmNS"),u=n.n(c),h=n("q1tI"),d=n.n(h),f=n("VrN/"),p=n.n(f),m=n("bdgK"),g=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),v=function(e){var t=e.value,n=void 0===t?"":t,r=(e.className,e.showTextOnly,e.showLines,e.style,Object(h.useMemo)((function(){return""}),[n]));return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},y=n("0Owb"),b=(n("dejd"),n("C+DQ"),n("1vsH")),x=n("m3rI"),w=[{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 k(e){var t=e.onActionCallback,n=e.title,r=e.icon,i=e.actionName,a=e.className,o=void 0===a?"":a,s=e.children;return d.a.createElement("a",{title:n,className:o,onClick:function(){t(i)}},d.a.createElement("i",{className:"md-iconfont ".concat(r)}),s)}var C=function(e){var t=e.watch,n=e.showNullButton,r=e.onActionCallback,i=e.fullScreen,a=e.insertTemp,o=e.hidetoolBar,s=e.uuid;e.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(s,"&api=").concat(encodeURIComponent(x.a.PROXY_SERVER)));var l=[].concat(w,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!o&&l.map((function(e,t){return d.a.createElement("li",{key:t},e.actionName?d.a.createElement(k,Object(y.a)({},e,{onActionCallback:r})):d.a.createElement("span",{className:"v-line"}))})),n?d.a.createElement("li",null,d.a.createElement(k,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,a&&d.a.createElement("li",null,d.a.createElement(k,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(k,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},E=n("M8RZ"),S=(n("+L6B"),n("2/Rp")),T=(n("y8nQ"),n("Vl3Y")),_=(n("5NDa"),n("5rEg")),O={labelCol:{span:4},wrapperCol:{span:20}},L=function(e){var t=e.callback,n=e.onCancel;return d.a.createElement(T.a,Object(y.a)({},O,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)}}),d.a.createElement(T.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(_.a,null)),d.a.createElement(T.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(_.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(S.a,{type:"ghost",onClick:n},"取消")))},A=n("7ahc"),D=n("k1fw"),M=(n("HmJG"),n("BjJ7")),R=T.a.useForm,I={width:280,marginRight:10},j={labelCol:{span:5},wrapperCol:{span:19}},N=function(e){var t=e.callback,n=e.onCancel,r=R(),i=Object(s.a)(r,1)[0],a=Object(h.useRef)();function o(e,t){i.setFieldsValue({src:"/api/attachments/".concat(e.id,"?type=").concat(e.content_type),type:t.type})}return d.a.createElement(T.a,Object(y.a)({form:i},j,{className:"upload-image-panel",onFinish:function(e){t(Object(D.a)(Object(D.a)({},e),{},{name:a.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(_.a,{style:I})),d.a.createElement(P,{onFileChange:function(e){var t=e.target.files[0];a.current=t.name,F(t,o)}}))),d.a.createElement(T.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(_.a,{style:{width:264}})),d.a.createElement(T.a.Item,{style:{textAlign:"right"}},d.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(S.a,{type:"ghost",onClick:n},"取消")))};function P(e){var t=e.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:t}))}function F(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),r.addEventListener("error",(function(e){console.error(e)}),!1),r.open("POST","".concat(M.a,"/api/attachments.json")),r.send(n)}n("giR+");var B,H,z=n("fyUT"),U=(n("7Kak"),n("9yH6")),V=U.a.Group,W={margin:"0 8px"},G=function(e){var t=e.callback,n=e.onCancel;return d.a.createElement(T.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)}},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(z.a,null)),d.a.createElement("span",{style:W},"列数"),d.a.createElement(T.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(z.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(V,null,d.a.createElement(U.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(U.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(U.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(U.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(S.a,{type:"ghost",onClick:n},"取消")))},K=n("ErOA"),Y=n("7Cbv"),q="------------",X={default:q,left:":".concat(q),center:":".concat(q,":"),right:"".concat(q,":")},$=n("9VGf");function Q(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var J=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Z=["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"],ee=(B={},Object(l.a)(B,J+"-B","bold"),Object(l.a)(B,J+"-I","italic"),B),te=(H={},Object(l.a)(H,"link","添加链接"),Object(l.a)(H,"code-block","添加代码块"),Object(l.a)(H,"upload-image","添加文件"),Object(l.a)(H,"add-table","添加表格"),H);t.a=function(e){var t=e.defaultValue,n=void 0===t?"":t,c=e.onChange,f=e.width,y=void 0===f?"100%":f,b=e.height,w=void 0===b?400:b,k=e.miniToolbar,S=void 0!==k&&k,T=e.isFocus,_=void 0!==T&&T,O=e.watch,D=e.insertTemp,M=e.mode,R=void 0===M?"markdown":M,I=e.id,j=void 0===I?"markdown-editor-id":I,P=e.showResizeBar,B=void 0!==P&&P,H=e.noStorage,z=void 0!==H&&H,U=e.showNullButton,V=void 0!==U&&U,W=e.hidetoolBar,q=void 0!==W&&W,J=e.fullScreen,ne=void 0!==J&&J,re=e.onBlur,ie=e.onCMBeforeChange,ae=e.onFullScreen,oe=e.className,se=void 0===oe?"":oe,le=e.disablePaste,ce=void 0!==le&&le,ue=e.placeholder,he=void 0===ue?"":ue,de=e.values,fe=void 0===de?"":de,pe=Object(h.useState)(null),me=Object(s.a)(pe,2),ge=me[0],ve=me[1],ye=Object(h.useState)(n),be=Object(s.a)(ye,2),xe=be[0],we=be[1],ke=Object(h.useState)(O),Ce=Object(s.a)(ke,2),Ee=Ce[0],Se=Ce[1],Te=Object(h.useState)(ne),_e=Object(s.a)(Te,2),Oe=_e[0],Le=_e[1],Ae=Object(h.useState)(""),De=Object(s.a)(Ae,2),Me=De[0],Re=De[1],Ie=Object(h.useState)(0),je=Object(s.a)(Ie,2),Ne=je[0],Pe=je[1],Fe=Object(h.useState)(w),Be=Object(s.a)(Fe,2),He=Be[0],ze=Be[1],Ue=Object(h.useState)(!1),Ve=Object(s.a)(Ue,2),We=(Ve[0],Ve[1]),Ge=Object(h.useRef)(Object(Y.a)()),Ke=Object(h.useRef)(!1),Ye=Object(h.useRef)(),qe=Object(h.useRef)(),Xe=Object(h.useRef)(),$e=Object(h.useRef)(),Qe=Object(h.useRef)(),Je=function(){var e=Object(o.a)(u.a.mark((function e(){var t,n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(K.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Ge.current}});case 2:null!=(n=e.sent)&&null!==(t=n.attachments)&&void 0!==t&&t.length&&(console.log("cm:",ge,qe),n.attachments.map((function(e){e.content_type.indexOf("image")>-1?ge.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):e.content_type.indexOf("video")>-1?ge.replaceSelection('')):e.content_type.indexOf("pdf")>-1?ge.replaceSelection('
        ').concat(e.name,"")):ge.replaceSelection("[".concat(e.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")"))})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(h.useEffect)((function(){we(fe),null==ge||ge.setValue(fe)}),[fe]),Object(h.useEffect)((function(){null==ae||ae(Oe)}),[Oe]),Object(h.useEffect)((function(){if(qe.current){var e=p.a.fromTextArea(qe.current,{mode:R,lineNumbers:!S,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function t(t,n){if(!ce){var r=n.clipboardData;if(r){var i=r.types.toString(),o=r.items;if("Files"===i||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==R)return;try{var s,l=o[1];"file"===(null===(s=o[0])||void 0===s?void 0:s.kind)&&(l=o[0]);var c=l.getAsFile(),u=c.name.split(".").pop();F(c,(function(t){var n,r,i;t.id?(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?e.replaceSelection('')):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?e.replaceSelection('').concat(c.name,"")):Z.includes(u)?e.replaceSelection('').concat(c.name,"")):e.replaceSelection("[".concat(c.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))}catch(n){a.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return _&&e.focus(),e.on("paste",t),e.on("dragleave",(function(e,t){Xe.current.classList.remove("mouse-hover-md")})),e.on("dragover",(function(e,t){Xe.current.classList.add("mouse-hover-md")})),e.on("drop",(function(t,n){var r;if(Xe.current.classList.add("mouse-hover-md"),(r=n.dataTransfer.files).length>0){n.preventDefault(),n.stopPropagation();for(var i=function(t){var n=r[t],i=n.name.split(".").pop();F(n,(function(t){var r,a,o;t.id?(null==n||null===(r=n.type)||void 0===r?void 0:r.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==n||null===(a=n.type)||void 0===a?void 0:a.indexOf("video"))>-1?e.replaceSelection('')):(null==n||null===(o=n.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?e.replaceSelection('').concat(n.name,"")):Z.includes(i)?e.replaceSelection('').concat(n.name,"")):e.replaceSelection("[".concat(n.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))},a=0;a0||r.target.offsetWidth>0)&&(Ze(),ge.setSize("100%","100%"),ge.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(qe.current.parentElement),e}();return function(){e.unobserve(qe.current.parentElement)}}}),[ge,Ze]),Object(h.useEffect)((function(){if(ge){for(var e=[],t=function(){var t=r[n],i=(a=Object(s.a)(t,2))[0],o=a[1],c=Object(l.a)({},i,(function(){et(o)}));e.push(c),ge.addKeyMap(c)},n=0,r=Object.entries(ee);n0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(j);e>=Ne+1e4&&(!t||t!==xe)&&(window.sessionStorage.setItem(j,xe),We(!0))}}),1e4),Object(h.useEffect)((function(){Se(O)}),[ge,O]),Object(h.useEffect)((function(){ge&&_&&ge.focus()}),[ge,_]),Object(h.useEffect)((function(){if(Ee&&ge){var e=ge.getScrollerElement();function t(e){var t=e.target;if(Qe.current){var n=t.scrollTop/t.scrollHeight;Qe.current.scrollTop=Qe.current.scrollHeight*n}}return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[ge,Ee]),Object(h.useEffect)((function(){if(ge&&ie){function e(e,t){ie(e,t)}return ge.on("beforeChange",e),function(){ge.off("beforeChange",e)}}}),[ge,ie]),Object(h.useEffect)((function(){if(ge&&re){function e(){re(ge.getValue())}return ge.on("blur",e),function(){ge.off("blur",e)}}}),[ge,re]),Object(h.useEffect)((function(){if(ge){function e(e){var t=e.getValue();we(t),Pe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(t)}return ge.on("change",e),function(){ge.off("change",e)}}}),[ge,c]),Object(h.useEffect)((function(){ge&&(null==n?(ge.setValue(""),we("")):n!==ge.getValue()&&(ge.setValue(n),we(n),ge.setCursor(ge.lineCount(),0)))}),[ge,n]);var et=Object(h.useCallback)((function(e){var t=ge.getCursor(),n=ge.getSelection(),r=n.split("\n");switch(e){case"bold":return ge.replaceSelection("**"+n+"**"),""===n&&ge.setCursor(t.line,t.ch+2),ge.focus();case"italic":return ge.replaceSelection("*"+n+"*"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"code":return ge.replaceSelection("`"+n+"`"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"inline-latex":return ge.replaceSelection("`$$"+n+"$$`"),""===n&&ge.setCursor(t.line,t.ch+3),ge.focus();case"latex":return ge.replaceSelection("```latex\n"+n+"\n```"),ge.setCursor(t.line+1,n.length+1),ge.focus();case"line-break":return ge.replaceSelection("
        \n"),ge.focus();case"list-ul":return""===n?ge.replaceSelection("- "+n):ge.replaceSelection(r.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),ge.focus();case"list-ol":return""===n?ge.replaceSelection("1. "+n):ge.replaceSelection(r.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),ge.focus();case"add-null-ch":return""===n&&ge.setCursor(t.line,t.ch+1),ge.replaceSelection("▁"),ge.focus();case"inster-template-1":return""===n&&ge.setCursor(t.line,t.ch),ge.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),ge.focus();case"eraser":return ge.setValue(""),ge.focus();case"trigger-watch":return Se(!Ee),ge.focus();case"trigger-full-screen":return Le(!Oe),ge.focus();case"link":return void Re("link");case"code-block":return void Re("code-block");case"upload-image":return void Re("upload-image");case"add-table":return void Re("add-table");default:throw new Error}}),[ge,Ee,Oe]),tt=Object(h.useCallback)((function(e){switch(Re(""),Me){case"link":var t=e.title,n=e.link;return ge.replaceSelection("[".concat(t,"](").concat(n,")")),ge.focus();case"code-block":var r=e.language,i=e.content;return ge.replaceSelection(["```"+r,i,"```"].join("\n")),ge.focus();case"upload-image":var a=e.src,o=e.alt,s=e.name;return a.indexOf("type=image")>-1?ge.replaceSelection("![ ".concat(o||""," ]( ").concat(a,' "').concat(o||"",'" )')):a.indexOf("type=application/pdf")>-1?ge.replaceSelection('').concat(s,"")):ge.replaceSelection('').concat(s,"")),ge.focus();case"add-table":for(var l=e.row,c=e.col,u=e.align,h="\n",d=0;d300&&(r=300),ze(w+r+"px")}}return e.addEventListener("mousedown",r),document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),function(){e.removeEventListener("mousedown",r),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i)}}}),[ge,$e]),Object(h.useEffect)((function(){ze(w)}),[w]);var it={width:Q(y),height:Q(He)};Object(h.useMemo)((function(){if(Ne){var e=new Date(Ne),t=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(r)}return 0}),[Ne]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Xe},d.a.createElement("div",{className:"markdown-editor-container ".concat(se," ").concat(Ee?"on-preview":""," ").concat(S?"mini":""," ").concat(Oe?"full-screen":""),style:it},d.a.createElement(C,{insertTemp:D,watch:Ee,fullScreen:Oe,showNullButton:V,onActionCallback:et,hidetoolBar:q,uuid:Ge.current,setOpenPhones:function(){Ke.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:qe,placeholder:he})),Ee?d.a.createElement("div",{ref:Qe,className:"preview-container"},"stex"===R&&d.a.createElement(v,{value:xe}),"stex"!==R&&d.a.createElement(g.a,{edit:!0,value:xe,replaces:function(e,t){var n=ge.getValue();n=n.replace(e,t),we(n),null==ge||ge.setValue(n)}})):null))),B?d.a.createElement("a",{ref:$e,className:"editor-resize"}):null,d.a.createElement(E.a,null,te[Me]?d.a.createElement(r.a,{centered:!0,title:te[Me],visible:!0,onCancel:rt,footer:null},nt):null))}},P47w: +/*!*************************************************!*\ + !*** ./node_modules/zrender/lib/svg/graphic.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./core */"hydK").createElement,i=n(/*! ../core/PathProxy */"IMiH"),a=n(/*! ../core/BoundingRect */"mFDi"),o=n(/*! ../core/matrix */"Fofx"),s=n(/*! ../contain/text */"6GrX"),l=n(/*! ../graphic/helper/text */"pzxd"),c=n(/*! ../graphic/Text */"dqUG"),u=i.CMD,h=Array.prototype.join,d=Math.round,f=Math.sin,p=Math.cos,m=Math.PI,g=2*Math.PI,v=180/m;function y(e){return d(1e4*e)/1e4}function b(e){return e<1e-4&&e>-1e-4}function x(e,t){t&&w(e,"transform","matrix("+h.call(t,",")+")")}function w(e,t,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&e.setAttribute(t,n)}function k(e,t,n,r){if(function(e,t){var n=t?e.textFill:e.fill;return null!=n&&"none"!==n}(t,n)){var i=n?t.textFill:t.fill;w(e,"fill",i="transparent"===i?"none":i),w(e,"fill-opacity",null!=t.fillOpacity?t.fillOpacity*t.opacity:t.opacity)}else w(e,"fill","none");if(function(e,t){var n=t?e.textStroke:e.stroke;return null!=n&&"none"!==n}(t,n)){var a=n?t.textStroke:t.stroke;w(e,"stroke",a="transparent"===a?"none":a),w(e,"stroke-width",(n?t.textStrokeWidth:t.lineWidth)/(!n&&t.strokeNoScale?r.getLineScale():1)),w(e,"paint-order",n?"stroke":"fill"),w(e,"stroke-opacity",null!=t.strokeOpacity?t.strokeOpacity:t.opacity),t.lineDash?(w(e,"stroke-dasharray",t.lineDash.join(",")),w(e,"stroke-dashoffset",d(t.lineDashOffset||0))):w(e,"stroke-dasharray",""),t.lineCap&&w(e,"stroke-linecap",t.lineCap),t.lineJoin&&w(e,"stroke-linejoin",t.lineJoin),t.miterLimit&&w(e,"stroke-miterlimit",t.miterLimit)}else w(e,"stroke","none")}var C={};C.brush=function(e){var t=e.style,n=e.__svgEl;n||(n=r("path"),e.__svgEl=n),e.path||e.createPathProxy();var i=e.path;if(e.__dirtyPath){i.beginPath(),i.subPixelOptimize=!1,e.buildPath(i,e.shape),e.__dirtyPath=!1;var a=function(e){for(var t=[],n=e.data,r=e.len(),i=0;i=g:-w>=g),T=w>0?w%g:w%g+g,_=!1;_=!!S||!b(E)&&T>=m==!!C;var O=y(s+c*p(x)),L=y(l+h*f(x));S&&(w=C?g-1e-4:1e-4-g,_=!0,9===i&&t.push("M",O,L));var A=y(s+c*p(x+w)),D=y(l+h*f(x+w));t.push("A",y(c),y(h),d(k*v),+_,+C,A,D);break;case u.Z:a="Z";break;case u.R:A=y(n[i++]),D=y(n[i++]);var M=y(n[i++]),R=y(n[i++]);t.push("M",A,D,"L",A+M,D,"L",A+M,D+R,"L",A,D+R,"L",A,D)}a&&t.push(a);for(var I=0;IP){for(;j255?255:e}function o(e){return e<0?0:e>1?1:e}function s(e){return e.length&&"%"===e.charAt(e.length-1)?a(parseFloat(e)/100*255):a(parseInt(e,10))}function l(e){return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100):o(parseFloat(e))}function c(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function u(e,t,n){return e+(t-e)*n}function h(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var f=new r(20),p=null;function m(e,t){p&&d(p,t),p=f.put(e,p||t.slice())}function g(e,t){if(e){t=t||[];var n=f.get(e);if(n)return d(t,n);var r,a=(e+="").replace(/ /g,"").toLowerCase();if(a in i)return d(t,i[a]),m(e,t),t;if("#"===a.charAt(0))return 4===a.length?(r=parseInt(a.substr(1),16))>=0&&r<=4095?(h(t,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1),m(e,t),t):void h(t,0,0,0,1):7===a.length?(r=parseInt(a.substr(1),16))>=0&&r<=16777215?(h(t,(16711680&r)>>16,(65280&r)>>8,255&r,1),m(e,t),t):void h(t,0,0,0,1):void 0;var o=a.indexOf("("),c=a.indexOf(")");if(-1!==o&&c+1===a.length){var u=a.substr(0,o),p=a.substr(o+1,c-(o+1)).split(","),g=1;switch(u){case"rgba":if(4!==p.length)return void h(t,0,0,0,1);g=l(p.pop());case"rgb":return 3!==p.length?void h(t,0,0,0,1):(h(t,s(p[0]),s(p[1]),s(p[2]),g),m(e,t),t);case"hsla":return 4!==p.length?void h(t,0,0,0,1):(p[3]=l(p[3]),v(p,t),m(e,t),t);case"hsl":return 3!==p.length?void h(t,0,0,0,1):(v(p,t),m(e,t),t);default:return}}h(t,0,0,0,1)}}function v(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=l(e[1]),i=l(e[2]),o=i<=.5?i*(r+1):i+r-i*r,s=2*i-o;return h(t=t||[],a(255*c(s,o,n+1/3)),a(255*c(s,o,n)),a(255*c(s,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function y(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),i=Math.floor(r),s=Math.ceil(r),l=t[i],c=t[s],h=r-i;return n[0]=a(u(l[0],c[0],h)),n[1]=a(u(l[1],c[1],h)),n[2]=a(u(l[2],c[2],h)),n[3]=o(u(l[3],c[3],h)),n}}var b=y;function x(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),s=Math.ceil(r),l=g(t[i]),c=g(t[s]),h=r-i,d=k([a(u(l[0],c[0],h)),a(u(l[1],c[1],h)),a(u(l[2],c[2],h)),o(u(l[3],c[3],h))],"rgba");return n?{color:d,leftIndex:i,rightIndex:s,value:r}:d}}var w=x;function k(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}t.parse=g,t.lift=function(e,t){var n=g(e);if(n){for(var r=0;r<3;r++)n[r]=t<0?n[r]*(1-t)|0:(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:e[r]<0&&(n[r]=0);return k(n,4===n.length?"rgba":"rgb")}},t.toHex=function(e){var t=g(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},t.fastLerp=y,t.fastMapToColor=b,t.lerp=x,t.mapToColor=w,t.modifyHSL=function(e,t,n,r){if(e=g(e))return e=function(e){if(e){var t,n,r=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(r,i,a),s=Math.max(r,i,a),l=s-o,c=(s+o)/2;if(0===l)t=0,n=0;else{n=c<.5?l/(s+o):l/(2-s-o);var u=((s-r)/6+l/2)/l,h=((s-i)/6+l/2)/l,d=((s-a)/6+l/2)/l;r===s?t=d-h:i===s?t=1/3+u-d:a===s&&(t=2/3+h-u),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,n,c];return null!=e[3]&&f.push(e[3]),f}}(e),null!=t&&(e[0]=(i=t,(i=Math.round(i))<0?0:i>360?360:i)),null!=n&&(e[1]=l(n)),null!=r&&(e[2]=l(r)),k(v(e),"rgba");var i},t.modifyAlpha=function(e,t){if((e=g(e))&&null!=t)return e[3]=o(t),k(e,"rgba")},t.stringify=k},QuXc: +/*!******************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Gradient.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=function(e){this.colorStops=e||[]};n.prototype={constructor:n,addColorStop:function(e,t){this.colorStops.push({offset:e,color:t})}};var r=n;e.exports=r},R5GN: +/*!*****************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/ShixunHomeworks/components/CutOffNow.tsx ***! + \*****************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),i=(n(/*! antd/es/table/style */"g9YV"),n(/*! antd/es/table */"wCAj")),a=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),o=(n(/*! antd/es/row/style */"14J3"),n(/*! antd/es/row */"BMrR")),s=(n(/*! antd/es/date-picker/style */"iQDF"),n(/*! antd/es/date-picker */"+eQT")),l=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),c=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty */"jrin"),u=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),h=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),d=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),f=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),p=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),m=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),g=n.n(m),v=n(/*! react */"q1tI"),y=n.n(v),b=n(/*! moment */"wd/R"),x=n.n(b),w=n(/*! @/utils/fetch */"ErOA"),k=n(/*! @/utils/util */"1vsH"),C=n(/*! umi */"Ty5D"),E=n(/*! umi */"9kvl"),S=n(/*! @/service/classrooms */"oUNq"),T=n(/*! @/utils/authority */"xKgJ");t.a=Object(E.a)((function(e){return{classroomList:e.classroomList}}))((function(e){var t=e.classroomList,n=e.dispatch,m=Object(C.i)(),b=f.a.useForm(),E=Object(p.a)(b,1)[0],_=Object(v.useState)(1),O=Object(p.a)(_,2),L=O[0],A=O[1],D=Object(v.useState)([]),M=Object(p.a)(D,2),R=M[0],I=M[1],j=Object(v.useState)(0),N=Object(p.a)(j,2),P=(N[0],N[1]),F=Object(v.useState)(2e4),B=Object(p.a)(F,2),H=B[0],z=(B[1],Object(v.useState)(!0)),U=Object(p.a)(z,2),V=(U[0],U[1]),W=Object(v.useState)([]),G=Object(p.a)(W,2),K=G[0],Y=G[1],q=Object(v.useState)(),X=Object(p.a)(q,2),$=X[0],Q=X[1];Object(v.useEffect)((function(){"立即截止"===t.actionTabs.key?J():(Y([]),I([]))}),[t.actionTabs.key]);var J=function(){var e=Object(d.a)(g.a.mark((function e(n){var r,i,a;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return V(!0),e.next=3,Object(S.A)(Object(h.a)(Object(h.a)({},m),{},{page:n||L,limit:H,homework_id:1===t.actionTabs.type?"":t.actionTabs.selectArrs[0],end_homework_action:!0}));case 3:null==(r=e.sent)||r.course_groups.map((function(e,t){e.key=e.id})),r&&(I([].concat(Object(u.a)(R),Object(u.a)(null==r?void 0:r.course_groups))),P(null==r?void 0:r.course_groups_count),Q(null==r?void 0:r.course_groups),V(!1),n||E.setFieldsValue((a={},Object(c.a)(a,"group_ids",null==r||null===(i=r.course_groups)||void 0===i?void 0:i.map((function(e){return String(e.id)}))),Object(c.a)(a,"end_time",x()(x()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),a)));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Z=function(){var e=Object(d.a)(g.a.mark((function e(){var r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(h.a)({},E.getFieldsValue()),e.next=3,Object(w.a)("/api/courses/".concat(m.coursesId,"/homework_commons/end_with_homework_list_position.json"),{method:"post",body:{homework_ids:Object(u.a)(t.actionTabs.selectArrs),group_ids:(null==K?void 0:K.length)>0?K:[],unified_setting:!(null!=R&&R.length),end_time:x()(r.end_time).format("YYYY-MM-DD HH:mm")}});case 3:0===e.sent.status&&(ee(),Object(k.Y)(["教学课堂","课程实验","立即截止"]),l.b.success("操作成功"),n({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),Object(T.c)()?t.actionTabs.detail?(n({type:"classroomList/setActionTabs",payload:{}}),n({type:"shixunHomeworks/getWorkList",payload:Object(h.a)({},m)}),n({type:"shixunHomeworks/getWorkSetting",payload:Object(h.a)({},m)})):n({type:"classroomList/getClassroomTeacherShixunsList",payload:Object(h.a)(Object(h.a)({},t.actionTabs.params),{},{type:4})}):n({type:"classroomList/getClassroomShixunsList",payload:Object(h.a)({},t.actionTabs.params)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ee=function(){A(1),I([])};return y.a.createElement(r.a,{centered:!0,title:"截止作业",visible:"立即截止"===t.actionTabs.key,okText:"截止作业",cancelText:"暂不截止",onOk:Z,onCancel:function(){ee(),n({type:"classroomList/setActionTabs",payload:{}})}},y.a.createElement("p",{className:"tc"},"学生将不能再提交作业",y.a.createElement("br",null),'本操作只对"提交中" “补交中”的作业有效'),R&&y.a.createElement(f.a,{form:E},y.a.createElement(o.a,null,y.a.createElement("span",{className:"mr5"},"截止时间:"),y.a.createElement(f.a.Item,{name:"end_time"},y.a.createElement(s.a,{style:{width:170},getPopupContainer:function(e){return e.parentNode},disabledDate:function(e){return e&&e0&&y.a.createElement(o.a,null,y.a.createElement("span",{className:"mr5"},"选择班级:"),y.a.createElement(a.a.Search,{style:{width:"300px"},onChange:function(e){I($.filter((function(t){return t.name.indexOf(e.target.value)>-1})))}})),(null==R?void 0:R.length)>0&&1===t.actionTabs.type&&y.a.createElement(i.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,t){Y(e)}},pagination:!1,dataSource:R,columns:[{title:"班级",dataIndex:"name",key:"name"}]}),(null==R?void 0:R.length)>0&&2===t.actionTabs.type&&y.a.createElement(i.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,t){Y(e)}},pagination:!1,dataSource:R,columns:[{title:"班级",dataIndex:"name",key:"name"},{title:"发布时间",dataIndex:"publish_time",key:"publish_time"},{title:"截止时间",dataIndex:"end_time",key:"end_time"}]})))}))},RDYZ: +/*!****************************************************!*\ + !*** ./node_modules/zrender/lib/animation/Clip.js ***! + \****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./easing */"dMvE");function i(e){this._target=e.target,this._life=e.life||1e3,this._delay=e.delay||0,this._initialized=!1,this.loop=null!=e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this._pausedTime=0,this._paused=!1}i.prototype={constructor:i,step:function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)this._pausedTime+=t;else{var n=(e-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,a="string"==typeof i?r[i]:i,o="function"==typeof a?a(n):n;return this.fire("frame",o),1===n?this.loop?(this.restart(e),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(e){var t=(e-this._startTime-this._pausedTime)%this._life;this._startTime=e-t+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(e,t){this[e="on"+e]&&this[e](this._target,t)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var a=i;e.exports=a},RXMa: +/*!********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/Ring.js ***! + \********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt").extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)}});e.exports=r},RotF: +/*!*******************************************************!*\ + !*** ./node_modules/react-infinite-scroller/index.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n(/*! ./dist/InfiniteScroll */"LSTS")},"SA+Z": +/*!********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/toArray.js ***! + \********************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./arrayWithHoles.js */"wTVA"),i=n(/*! ./iterableToArray.js */"EbDI"),a=n(/*! ./unsupportedIterableToArray.js */"ZhPi"),o=n(/*! ./nonIterableRest.js */"wkBT");e.exports=function(e){return r(e)||i(e)||a(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},SJMd: +/*!****************************************************!*\ + !*** ./node_modules/code-prettify/src/prettify.js ***! + \****************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var e=window,t=["break,continue,do,else,for,if,return,while"],n=[[t,"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=[n,"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"],i=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[n,"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=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",l=[t,"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=[t,"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=[t,"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(e,t,n,r,i){if(n){var a={sourceNode:e,pre:1,langExtension:null,numberLines:null,sourceCode:n,spans:null,basePos:t,decorations:null};r(a),i.push.apply(i,a.decorations)}}var f=/\S/;function p(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling){var r=n.nodeType;t=1===r?t?e:n:3===r&&f.test(n.nodeValue)?e:t}return t===e?void 0:t}function m(e,t){var n,r={};!function(){for(var i=e.concat(t),a=[],o={},s=0,l=i.length;s=0;)r[u.charAt(h)]=c;var d=c[1],f=""+d;o.hasOwnProperty(f)||(a.push(d),o[f]=null)}a.push(/[\0-\uffff]/),n=function(e){for(var t=0,n=!1,r=!1,i=0,a=e.length;i122||(u<65||h>90||n.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||n.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}n.sort((function(e,t){return e[0]-t[0]||t[1]-e[1]}));var d=[],f=[];for(a=0;ap[0]&&(p[1]+1>p[0]&&i.push("-"),i.push(l(p[1])))}return i.push("]"),i.join("")}function u(e){for(var r=e.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")),i=r.length,a=[],o=0,s=0;o=2&&"["===d?r[o]=c(h):"\\"!==d&&(r[o]=h.replace(/[a-zA-Z]/g,(function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"})))}return r.join("")}var h=[];for(i=0,a=e.length;i=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(g=!1,y="src"),g||(f[v]=y)}var C=u;if(u+=v.length,g){var E=b[1],S=v.indexOf(E),T=S+E.length;b[2]&&(S=(T=v.length-b[2].length)-E.length);var _=y.substring(5);d(l,s+C,v.substring(0,S),a,c),d(l,s+C+S,E,w(_,E),c),d(l,s+C+T,v.substring(T),a,c)}else c.push(s+C,y)}e.decorations=c};return a}function g(e){var t=[],n=[];e.tripleQuotedStrings?t.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=e.hashComments;r&&(e.cStyleComments?(r>1?t.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push(["com",/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var i=e.regexLiterals;if(i){var a=i>1?"":"\n\r",o=a?".":"[\\S\\s]",s="/(?=[^/*"+a+"])(?:[^/\\x5B\\x5C"+a+"]|\\x5C"+o+"|\\x5B(?:[^\\x5C\\x5D"+a+"]|\\x5C"+o+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+s+")")])}var l=e.types;l&&n.push(["typ",l]);var c=(""+e.keywords).replace(/^ | $/g,"");c.length&&n.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return e.regexLiterals&&(u+="(?!s*/)"),n.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]),m(t,n)}var v=g({keywords:[r,a,i,o,s,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(e,t,n){for(var r=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,a=e.ownerDocument,o=a.createElement("li");e.firstChild;)o.appendChild(e.firstChild);var s=[o];function l(e){var t=e.nodeType;if(1!=t||r.test(e.className)){if((3==t||4==t)&&n){var o=e.nodeValue,s=o.match(i);if(s){var u=o.substring(0,s.index);e.nodeValue=u;var h=o.substring(s.index+s[0].length);if(h)e.parentNode.insertBefore(a.createTextNode(h),e.nextSibling);c(e),u||e.parentNode.removeChild(e)}}}else if("br"===e.nodeName)c(e),e.parentNode&&e.parentNode.removeChild(e);else for(var d=e.firstChild;d;d=d.nextSibling)l(d)}function c(e){for(;!e.nextSibling;)if(!(e=e.parentNode))return;for(var t,n=function e(t,n){var r=n?t.cloneNode(!1):t,i=t.parentNode;if(i){var a=e(i,1),o=t.nextSibling;a.appendChild(r);for(var s=o;s;s=o)o=s.nextSibling,a.appendChild(s)}return r}(e.nextSibling,0);(t=n.parentNode)&&1===t.nodeType;)n=t;s.push(n)}for(var u=0;u=0;){var i=n[r];b.hasOwnProperty(i)?e.console&&console.warn("cannot override language handler %s",i):b[i]=t}}function w(e,t){return e&&b.hasOwnProperty(e)||(e=/^\s*=x&&(u+=2),s>=w&&(f+=2)}}finally{v&&(v.style.display=y)}}(t)}catch(t){e.console&&console.log(t&&t.stack||t)}}function C(e,t,n){var r=n||!1,i=t||null,a=document.createElement("div");return a.innerHTML="
        "+e+"
        ",a=a.firstChild,r&&y(a,r,!0),k({langExtension:i,numberLines:r,sourceNode:a,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),a.innerHTML}function E(t,n){var r=n||document.body,i=r.ownerDocument||document;function a(e){return r.getElementsByTagName(e)}for(var o=[a("pre"),a("code"),a("xmp")],s=[],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(m([["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(m([],[["atv",/^[\s\S]+/]]),["uq.val"]),x(g({keywords:r,hashComments:!0,cStyleComments:!0,types:h}),["c","cc","cpp","cxx","cyc","m"]),x(g({keywords:"null,true,false"}),["json"]),x(g({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:h}),["cs"]),x(g({keywords:i,cStyleComments:!0}),["java"]),x(g({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(g({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(g({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(g({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(g({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),x(g({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(m([],[["str",/^[\s\S]+/]]),["regex"]);var S=e.PR={createSimpleLexer:m,registerLangHandler:x,sourceDecorator:g,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:C,prettyPrint:E},T=e.define;"function"==typeof T&&T.amd&&T("google-code-prettify",[],(function(){return S}))}()},SKnc: +/*!************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/LinearGradient.js ***! + \************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/util */"bYtY"),i=n(/*! ./Gradient */"QuXc"),a=function(e,t,n,r,a,o){this.x=null==e?0:e,this.y=null==t?0:t,this.x2=null==n?1:n,this.y2=null==r?0:r,this.type="linear",this.global=o||!1,i.call(this,a)};a.prototype={constructor:a},r.inherits(a,i);var o=a;e.exports=o},SUKs: +/*!**********************************************!*\ + !*** ./node_modules/zrender/lib/core/log.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=function(){};1===n(/*! ../config */"LPTA").debugMode&&(r=console.error);var i=r;e.exports=i},Sj9i: +/*!************************************************!*\ + !*** ./node_modules/zrender/lib/core/curve.js ***! + \************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./vector */"QBsz"),i=r.create,a=r.distSquare,o=Math.pow,s=Math.sqrt,l=s(3),c=i(),u=i(),h=i();function d(e){return e>-1e-8&&e<1e-8}function f(e){return e>1e-8||e<-1e-8}function p(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function m(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}t.cubicAt=p,t.cubicDerivativeAt=function(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)},t.cubicRootAt=function(e,t,n,r,i,a){var c=r+3*(t-n)-e,u=3*(n-2*t+e),h=3*(t-e),f=e-i,p=u*u-3*c*h,m=u*h-9*c*f,g=h*h-3*u*f,v=0;if(d(p)&&d(m)){if(d(u))a[0]=0;else(O=-h/u)>=0&&O<=1&&(a[v++]=O)}else{var y=m*m-4*p*g;if(d(y)){var b=m/p,x=-b/2;(O=-u/c+b)>=0&&O<=1&&(a[v++]=O),x>=0&&x<=1&&(a[v++]=x)}else if(y>0){var w=s(y),k=p*u+1.5*c*(-m+w),C=p*u+1.5*c*(-m-w);(O=(-u-((k=k<0?-o(-k,1/3):o(k,1/3))+(C=C<0?-o(-C,1/3):o(C,1/3))))/(3*c))>=0&&O<=1&&(a[v++]=O)}else{var E=(2*p*u-3*c*m)/(2*s(p*p*p)),S=Math.acos(E)/3,T=s(p),_=Math.cos(S),O=(-u-2*T*_)/(3*c),L=(x=(-u+T*(_+l*Math.sin(S)))/(3*c),(-u+T*(_-l*Math.sin(S)))/(3*c));O>=0&&O<=1&&(a[v++]=O),x>=0&&x<=1&&(a[v++]=x),L>=0&&L<=1&&(a[v++]=L)}}return v},t.cubicExtrema=function(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,l=3*t-3*e,c=0;if(d(o)){if(f(a))(h=-l/a)>=0&&h<=1&&(i[c++]=h)}else{var u=a*a-4*o*l;if(d(u))i[0]=-a/(2*o);else if(u>0){var h,p=s(u),m=(-a-p)/(2*o);(h=(-a+p)/(2*o))>=0&&h<=1&&(i[c++]=h),m>=0&&m<=1&&(i[c++]=m)}}return c},t.cubicSubdivide=function(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,l=(r-n)*i+n,c=(s-o)*i+o,u=(l-s)*i+s,h=(u-c)*i+c;a[0]=e,a[1]=o,a[2]=c,a[3]=h,a[4]=h,a[5]=u,a[6]=l,a[7]=r},t.cubicProjectPoint=function(e,t,n,r,i,o,l,d,f,m,g){var v,y,b,x,w,k=.005,C=1/0;c[0]=f,c[1]=m;for(var E=0;E<1;E+=.05)u[0]=p(e,n,i,l,E),u[1]=p(t,r,o,d,E),(x=a(c,u))=0&&x=0&&h<=1&&(i[c++]=h)}else{var u=o*o-4*a*l;if(d(u))(h=-o/(2*a))>=0&&h<=1&&(i[c++]=h);else if(u>0){var h,p=s(u),m=(-o-p)/(2*a);(h=(-o+p)/(2*a))>=0&&h<=1&&(i[c++]=h),m>=0&&m<=1&&(i[c++]=m)}}return c},t.quadraticExtremum=function(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r},t.quadraticSubdivide=function(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n},t.quadraticProjectPoint=function(e,t,n,r,i,o,l,d,f){var p,g=.005,v=1/0;c[0]=l,c[1]=d;for(var y=0;y<1;y+=.05){u[0]=m(e,n,i,y),u[1]=m(t,r,o,y),(k=a(c,u))=0&&k=0;--r)if(t[r]===e)return!0;return!1}),n):null:n[0]},d.prototype.update=function(e,t){if(e){var n=this.getDefs(!1);if(e[this._domName]&&n.contains(e[this._domName]))"function"==typeof t&&t(e);else{var r=this.add(e);r&&(e[this._domName]=r)}}},d.prototype.addDom=function(e){this.getDefs(!0).appendChild(e)},d.prototype.removeDom=function(e){var t=this.getDefs(!1);t&&e[this._domName]&&(t.removeChild(e[this._domName]),e[this._domName]=null)},d.prototype.getDoms=function(){var e=this.getDefs(!1);if(!e)return[];var t=[];return i.each(this._tagNames,(function(n){var r=e.getElementsByTagName(n);t=t.concat([].slice.call(r))})),t},d.prototype.markAllUnused=function(){var e=this.getDoms(),t=this;i.each(e,(function(e){e[t._markLabel]="0"}))},d.prototype.markUsed=function(e){e&&(e[this._markLabel]="1")},d.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),n=this;i.each(t,(function(t){"1"!==t[n._markLabel]&&e.removeChild(t)}))}},d.prototype.getSvgProxy=function(e){return e instanceof a?c:e instanceof o?u:e instanceof s?h:c},d.prototype.getTextSvgElement=function(e){return e.__textSvgEl},d.prototype.getSvgElement=function(e){return e.__svgEl};var f=d;e.exports=f},T6xi: +/*!*********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/helper/poly.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./smoothSpline */"YgsL"),i=n(/*! ./smoothBezier */"nCxF");t.buildPath=function(e,t,n){var a=t.points,o=t.smooth;if(a&&a.length>=2){if(o&&"spline"!==o){var s=i(a,o,n,t.smoothConstraint);e.moveTo(a[0][0],a[0][1]);for(var l=a.length,c=0;c<(n?l:l-1);c++){var u=s[2*c],h=s[2*c+1],d=a[(c+1)%l];e.bezierCurveTo(u[0],u[1],h[0],h[1],d[0],d[1])}}else{"spline"===o&&(a=r(a,n)),e.moveTo(a[0][0],a[0][1]);c=1;for(var f=a.length;c47&&(dt(47),gt(!0)))}),[document.getElementById("divhe")]);function xt(){Ye(1),$e(""),et(""),it(""),lt(""),je([])}var wt=[{title:"序号",dataIndex:"number",align:"center",width:50,fixed:"left",ellipsis:{showTitle:!1},render:function(e,t,n){return fe.limit*(fe.page-1)+n+1}},{title:"姓名",dataIndex:"user_name",align:"center",width:110,fixed:"left",ellipsis:{showTitle:!1},render:function(e){return p.a.createElement(a.a,{placement:"bottomLeft",title:e},p.a.createElement("span",{className:"current"},e))}},!(null!=ke&&ke.is_excellent)&&!Object(F.r)()&&{title:"学号",dataIndex:"student_id",align:"center",sorter:!0,fixed:"left",width:110,showSorterTooltip:!1,ellipsis:{showTitle:!1},sortOrder:"student_id"===fe.order?"desc"===fe.b_order?"descend":"ascend":null,render:function(e){return p.a.createElement(a.a,{placement:"bottomLeft",title:e||"--"},p.a.createElement("span",{className:"current"},e||"--"))}},{title:"分班",dataIndex:"group_name",align:"center",width:180,fixed:"left",ellipsis:{showTitle:!1},render:function(e,t){return e?p.a.createElement(a.a,{placement:"bottom",title:e},p.a.createElement("span",{className:"current"},e)):"--"}},{title:"作业状态",dataIndex:"work_status",align:"center",width:80,fixed:"left",sorter:!0,ellipsis:{showTitle:!1},showSorterTooltip:!1,sortOrder:"work_status"===fe.order?"desc"===fe.b_order?"descend":"ascend":null,render:function(e){return p.a.createElement(b.f,{status:e})}},{title:p.a.createElement("span",null,"实训总耗时"),dataIndex:"cost_time",align:"center",width:130,ellipsis:{showTitle:!1},showSorterTooltip:!1,sorter:!0,sortOrder:"cost_time"===fe.order?"desc"===fe.b_order?"descend":"ascend":null,render:function(e,t){return e?p.a.createElement(a.a,{placement:"bottomLeft",title:e},e):"--"}},{title:"通关情况",align:"center",dataIndex:"complete_count",ellipsis:{showTitle:!1},render:function(e,t){return p.a.createElement("span",null,e||0,"/",ke.challenges_count)}},{title:"评测次数",dataIndex:"sum_evaluate_count",align:"center",ellipsis:{showTitle:!1},sorter:!0,sortOrder:"sum_evaluate_count"===fe.order?"desc"===fe.b_order?"descend":"ascend":null,render:function(e,t){return e&&"--"!=e?p.a.createElement(a.a,{placement:"bottom",title:e},p.a.createElement("span",{className:"current"},e)):"--"}},!Object(F.r)()&&{title:p.a.createElement("span",null,"最终成绩",p.a.createElement(a.a,{placement:"top",title:p.a.createElement("pre",null,"鼠标停留具体分值上可查",p.a.createElement("br",null),"看得分明细",p.a.createElement("br",null))},p.a.createElement("img",{src:"".concat(O.a.IMG_SERVER,"/images/educoder/problem.png"),className:"ml2 current"}))),dataIndex:"work_score",sorter:!0,align:"center",showSorterTooltip:!1,sortOrder:"work_score"===fe.order?"desc"===fe.b_order?"descend":"ascend":null,ellipsis:{showTitle:!1},render:function(e,t){var n,r;return r=e>=0&&e<=60?p.a.createElement("span",{className:"c-red"},e):100===e?p.a.createElement("span",{className:"c-green"},e):e>60?p.a.createElement("span",{className:"c-orange"},e):"--",p.a.createElement(a.a,{placement:"bottom",title:t.ultimate_score?p.a.createElement("div",null,"--"===r?"最终调整成绩:0分":"最终调整成绩:".concat(t.work_score,"分")):p.a.createElement("div",null,p.a.createElement("div",null,t.final_score?"关卡得分:".concat(t.final_score,"分"):"关卡得分:0分"),p.a.createElement("div",null,t.eff_score?"效率评分:".concat(t.eff_score,"分"):"效率评分:0分"),p.a.createElement("div",null,t.late_penalty?"迟交扣分:".concat(t.late_penalty,"分"):"迟交扣分:0分"),!(null!==(n=B.workList)&&void 0!==n&&n.answer_open_evaluation)&&p.a.createElement("div",null,"查看参考答案:",t.view_answer_count,"关"),p.a.createElement("div",null,t.work_score?"最终成绩:".concat(t.work_score,"分"):"最终成绩:0分"))},r)}},{title:"打回次数",dataIndex:"redo_count",align:"center",render:function(e){return e||"- -"}},{title:p.a.createElement("span",null,"评阅状态",p.a.createElement(a.a,{overlayClassName:ae.a.reviewStatusTooltip,placement:"top",title:p.a.createElement("pre",null,"以下情形出现一种,评阅状态自动变为已评阅:",p.a.createElement("br",null),"1.学生开启作业,系统对学生进行了自动打分;",p.a.createElement("br",null),"2.老师对学生作业进行关卡调分或者追加点评;",p.a.createElement("br",null),"3.整个作业截止/补交结束后,所有学生作业状态将自动变为已评阅。",p.a.createElement("br",null))},p.a.createElement("img",{src:"".concat(O.a.IMG_SERVER,"/images/educoder/problem.png"),className:"ml2 current"}))),align:"center",dataIndex:"has_comment",width:90,fixed:"right",ellipsis:!0,render:function(e){return e?"已评阅":"未评阅"}},{title:"操作",dataInex:"action",align:"center",width:70,fixed:"right",ellipsis:!0,className:"workListTable",render:function(e,t){var n,r,i;return Object(F.s)()?p.a.createElement("div",null,"未开启"===Object(b.z)(null==t?void 0:t.work_status)?p.a.createElement("span",null,"--"):p.a.createElement(g.a,{target:"_blank",onClick:function(e){e.stopPropagation()},to:"/classrooms/".concat(fe.coursesId,"/shixun_homework/").concat(fe.categoryId,"/").concat(t.id,"/comment")},"查看")):p.a.createElement("div",null,p.a.createElement("span",{style:{color:"#0152d9"},onClick:function(e){e.stopPropagation(),te({type:"shixunHomeworks/setActionTabs",payload:{key:"更改点评",selectArrs:{myshixun_identifier:"",data:{name:null==t?void 0:t.user_name,homeworkId:null==t?void 0:t.id,work_comment:null==t?void 0:t.work_comment,work_comment_hidden:null==t?void 0:t.work_comment_hidden}}}})}},t.has_shixun_work_comment?"更改点评":"追加点评"),(null==t||null===(n=t.shixun_detail)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.game_identifier)&&[1,2,3].includes(null==t?void 0:t.work_status)&&[p.a.createElement("br",null),p.a.createElement("a",{target:"_blank",onClick:function(e){var n,r,i;if(e.stopPropagation(),null===(n=ce.userInfo)||void 0===n||!n.professional_certification)return c.a.confirm({title:"提示",centered:!0,content:p.a.createElement("div",{className:"tc"},"您需要去完成您的职业认证,才能使用此功能"),okText:"立即完善",cancelText:"稍后完善",onOk:function(){Object(b.O)("/account/certification")}}),!1;Object(b.O)("/tasks/".concat(null==t||null===(r=t.shixun_detail)||void 0===r||null===(i=r[0])||void 0===i?void 0:i.game_identifier,"?homework_common_id=").concat(ue.categoryId))}},"查看实训")],"已截止"!==(null==ke||null===(i=ke.homework_status)||void 0===i?void 0:i[0])&&!!t.myshixun_id&&[p.a.createElement("br",null),p.a.createElement("span",{className:ae.a.color32C,onClick:function(e){e.stopPropagation(),te({type:"shixunHomeworks/setActionTabs",payload:{key:"打回重做",selectArrs:t,params:fe}})}},"打回重做")])}}].filter((function(e){return!!e}));return p.a.createElement(p.a.Fragment,null,p.a.createElement("section",{className:"".concat(ae.a.wrap," minH500 bg-white pl30 pr30 pt30")},(null===(t=ke.homework_status)||void 0===t?void 0:t.includes("未发布"))&&p.a.createElement(J.a,null),!!Te.length&&p.a.createElement(r.a,{className:"mb10",dataSource:Te,columns:wt,pagination:!1,showHeader:!1,loading:!1}),!(null!==(n=ke.homework_status)&&void 0!==n&&n.includes("未发布"))&&p.a.createElement("aside",null,!Object(F.c)()&&p.a.createElement("div",{className:"c-light-black font12"},p.a.createElement("span",null,"已开始做题 ",(null==ke?void 0:ke.commit_count)||0," 人"),p.a.createElement("span",{className:"ml5"},"未开始做题 ",(null==ke?void 0:ke.uncommit_count)||0," 人"),(null==ke?void 0:ke.left_time)&&p.a.createElement(p.a.Fragment,null,p.a.createElement("span",{className:"ml20 c-black"},null==ke||null===(i=ke.left_time)||void 0===i?void 0:i.status),p.a.createElement("span",{className:"ml20 c-orange-ff9"},null==ke||null===(o=ke.left_time)||void 0===o?void 0:o.time))),Object(F.c)()&&p.a.createElement(p.a.Fragment,null,p.a.createElement(K.a,{form:me,onChange:function(){fe.page=1;var e=Object.assign({},me.getFieldValue());delete fe.course_group,delete fe.teacher_comment,Object.keys(e).map((function(t){switch(t){case"task_status":e[t].includes("all")||!e[t].length?(delete fe.work_status,me.setFieldsValue(Object(G.a)({},"task_status","all"))):(fe.work_status=e[t],me.setFieldsValue(Object(G.a)({},"task_status",fe.work_status)));break;case"course_group_info":e[t].includes("all")||!e[t].length?(delete fe.course_group,me.setFieldsValue(Object(G.a)({},"course_group_info","all"))):(fe.course_group=e[t],me.setFieldsValue(Object(G.a)({},"course_group_info",fe.course_group)));break;case"teacher_comment":var n;if(e[t].includes("all")||!e[t].length)delete fe.teacher_comment,me.setFieldsValue(Object(G.a)({},"teacher_comment","all"));else fe.teacher_comment=1===(null===(n=e[t])||void 0===n?void 0:n.length)?Number(e[t][0]):"",me.setFieldsValue(Object(G.a)({},"teacher_comment",e[t]))}})),vt()},initialValues:(h={},Object(G.a)(h,"task_status","all"),Object(G.a)(h,"course_group_info","all"),Object(G.a)(h,"teacher_comment","all"),h)},(null===(v=ke.task_status)||void 0===v?void 0:v.length)>0&&p.a.createElement(K.a.Item,{name:"task_status"},p.a.createElement(V.a.Group,{value:[],style:{width:"100%"}},p.a.createElement(C.a,null,p.a.createElement(E.a,{className:"font14",flex:"80px"},"作业状态:"),p.a.createElement(E.a,{flex:"80px"},p.a.createElement(V.a,{value:"all"},"全部")),p.a.createElement(E.a,{flex:"1"},ke.task_status&&ke.task_status.map((function(e,t){return p.a.createElement(V.a,{name:"task_status",value:e.id},e.name,"(",e.count,")")})))))),(null===(y=ke.course_group_info)||void 0===y?void 0:y.length)>0&&p.a.createElement(K.a.Item,{name:"course_group_info"},p.a.createElement(V.a.Group,{style:{width:"100%"}},p.a.createElement(C.a,null,p.a.createElement(E.a,{className:"font14",flex:"80px"},"分班情况:"),p.a.createElement(E.a,{flex:"80px"},p.a.createElement(V.a,{value:"all"},"全部")),p.a.createElement(E.a,{flex:"1",id:"divhe",style:{height:ht+"px",overflow:"hidden"}},null===(L=ke.course_group_info)||void 0===L?void 0:L.map((function(e,t){return p.a.createElement(V.a,{value:e.course_group_id},e.group_group_name,"(",e.count,")")}))),mt&&p.a.createElement("span",{onClick:function(){var e=document.getElementById("divhe").scrollHeight;dt(ht>47?47:e)},style:{color:"rgb(76, 172, 255)",cursor:"pointer",alignItems:"flex-end",display:"flex"}},47===ht?"展开":"收起",47===ht?p.a.createElement(Y.a,{style:{marginBottom:"3px",marginLeft:"2px"}}):p.a.createElement(q.a,{style:{marginBottom:"3px",marginLeft:"2px"}}))))),(null===(A=ke.teacher_comment)||void 0===A?void 0:A.length)>0&&p.a.createElement(K.a.Item,{name:"teacher_comment"},p.a.createElement(V.a.Group,{style:{width:"100%"}},p.a.createElement(C.a,null,p.a.createElement(E.a,{className:"font14",flex:"80px"},"追加点评:"),p.a.createElement(E.a,{flex:"80px"},p.a.createElement(V.a,{value:"all"},"全部")),p.a.createElement(E.a,{flex:"1"},ke.teacher_comment&&ke.teacher_comment.map((function(e,t){return p.a.createElement(V.a,{value:String(e.id)},e.name,"(",e.count,")")}))))))),p.a.createElement(C.a,{align:"middle"},p.a.createElement(E.a,{flex:"1"},p.a.createElement(C.a,{align:"middle"},p.a.createElement(E.a,null,p.a.createElement(k.a.Search,{allowClear:!0,placeholder:"请输入姓名或者学号搜索",onSearch:function(e){fe.search=e,fe.page=1,vt()},style:{width:240}})),p.a.createElement(E.a,null,p.a.createElement("span",{className:"ml5"},p.a.createElement("span",{className:"c-red"},ke.work_count),"个检索结果(",ke.work_count,"个学生)")))),p.a.createElement(E.a,null,Object(F.c)()&&ke.code_review&&p.a.createElement(S.a,{className:"ml10",onClick:function(){te({type:"shixunHomeworks/setActionTabs",payload:{key:"代码查重",selectArrs:ke.student_works.map((function(e){return e.id})),params:fe}})}},p.a.createElement("span",{className:"".concat(ae.a.tr1," iconfont icon-daimachazhong")}),"代码查重"),Object(F.c)()&&ye&&p.a.createElement(S.a,{className:"ml10",onClick:bt},p.a.createElement("i",{className:"iconfont icon-gengxinchengji font14 pr5"}),"更新成绩"),(null==ke||null===(M=ke.homework_status)||void 0===M?void 0:M.includes("已截止"))&&Object(F.c)()&&p.a.createElement(S.a,{className:"ml10",onClick:function(){te({type:"shixunHomeworks/setActionTabs",payload:{key:"质量检测",selectArrs:ke.student_works.map((function(e){return e.id})),params:fe}})}},p.a.createElement("i",{className:"iconfont icon-a-08zhiliang-xianxing font14 pr5"}),"质量评分"),p.a.createElement(S.a,{className:"ml10",onClick:function(){te({type:"shixunHomeworks/setActionTabs",payload:{key:"一键点评",selectArrs:ke.student_works.map((function(e){return e.id})),params:fe}})}},p.a.createElement(X.a,{className:"mr5"}),"一键点评"),((null==ke||null===(R=ke.homework_status)||void 0===R?void 0:R.includes("提交中"))||(null==ke||null===(I=ke.homework_status)||void 0===I?void 0:I.includes("补交中"))||(null==ke||null===(j=ke.homework_status)||void 0===j?void 0:j.includes("进行中")))&&p.a.createElement(S.a,{className:"ml10",onClick:function(){De(!0)}},"一键打回"),Object(F.c)()&&p.a.createElement(U.a,{overlay:function(){var e,t;return p.a.createElement(W.a,null,p.a.createElement(W.a.Item,{onClick:function(){Object(le.h)(JSON.parse(sessionStorage.all_student_works_params),"shixun_work_list")},key:"1"},"学生成绩"),Object(F.c)()&&(null==ke?void 0:ke.student_works.length)>0&&p.a.createElement(W.a.Item,{key:"3"},p.a.createElement(g.a,{onClick:function(e){te({type:"shixunHomeworks/setActionTabs",payload:{key:"导出实训报告",type:2}})},to:"/classrooms/".concat(fe.coursesId,"/shixun_homework/").concat(fe.categoryId,"/").concat(null==ke||null===(e=ke.student_works)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.id,"/comment")},"实训报告")),p.a.createElement(W.a.Item,{key:"2"},p.a.createElement(g.a,{to:"/classrooms/".concat(fe.coursesId,"/exportlist/shixun_work_list")},"历史导出")))},className:"ml10"},p.a.createElement(S.a,null,p.a.createElement($.a,null),"导出",p.a.createElement(Q.a,null)))))),p.a.createElement(C.a,{style:{justifyContent:"end",marginTop:"5px"}},Object(F.c)()&&ye&&p.a.createElement("span",null,p.a.createElement("span",{style:{color:"red"}},"*"),"列表中作业记录存在差异,请点击“更新成绩”按钮")),p.a.createElement(r.a,{className:"mt30",loading:ee["shixunHomeworks/getWorkList"],pagination:!1,style:{cursor:"pointer"},onRow:function(e){return{onClick:function(t){window.open("/classrooms/".concat(fe.coursesId,"/shixun_homework/").concat(fe.categoryId,"/").concat(e.id,"/comment"),"_blank")}}},dataSource:ke.student_works,columns:wt,onChange:function(e,t,n){n.field&&(fe.order=n.field),n.order||(fe.b_order="asc"),"ascend"===n.order&&(fe.b_order="asc"),"descend"===n.order&&(fe.b_order="desc"),n.order||(fe.b_order="asc"),vt()}}),p.a.createElement(re,null),p.a.createElement(oe,null),p.a.createElement(Z.a,null)),p.a.createElement(c.a,{title:"一键打回重做",visible:Ae,centered:!0,destroyOnClose:!0,forceRender:!0,width:700,onOk:Object(l.a)(d.a.mark((function e(){var t,n;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(2!==Ke){e.next=13;break}if(!(Ie.length<=0)){e.next=4;break}return s.b.info("请选择作业状态"),e.abrupt("return");case 4:if(st){e.next=7;break}return s.b.info("评语不能为空"),e.abrupt("return");case 7:return e.next=9,Object(ne.a)("/api/homework_commons/".concat(fe.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:fe.categoryId,comment:st,status:Ie}});case 9:0===(t=e.sent).status&&(Ve(t),De(!1),Be(!0)),e.next=32;break;case 13:if(0!==rt&&0!==Ze){e.next=16;break}e.next=22;break;case 16:if(rt){e.next=19;break}return s.b.info("最低分不能为空"),e.abrupt("return");case 19:if(Ze){e.next=22;break}return s.b.info("最高分不能为空"),e.abrupt("return");case 22:if(!(rt>Ze)){e.next=25;break}return s.b.info("最高分不能大于最低分"),e.abrupt("return");case 25:if(st){e.next=28;break}return s.b.info("评语不能为空"),e.abrupt("return");case 28:return e.next=30,Object(ne.a)("/api/homework_commons/".concat(fe.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:fe.categoryId,comment:st,min_score:rt,max_score:Ze}});case 30:0===(n=e.sent).status&&(Ve(n),De(!1),Be(!0));case 32:case"end":return e.stop()}}),e)}))),onCancel:function(){De(!1),xt()}},p.a.createElement("div",{style:{padding:"32px"}},p.a.createElement("div",null,p.a.createElement("div",null,p.a.createElement("span",{style:{width:"80px"}},"打回方式:"),p.a.createElement(z.a.Group,{value:Ke,onChange:function(e){Ye(e.target.value)}},p.a.createElement(z.a,{value:1},"按成绩打回"),p.a.createElement(z.a,{value:2},"按作业状态打回"))),1===Ke&&p.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},p.a.createElement("span",{style:{width:"70px",textAlign:"end"}},p.a.createElement("span",{style:{color:"red"}},"*"),"最低分:"),p.a.createElement(H.a,{min:0,max:100,value:rt,onChange:function(e){return it(e)},style:{width:"100px"}}),p.a.createElement("span",{style:{width:"80px",textAlign:"end"}},p.a.createElement("span",{style:{color:"red"}},"*"),"最高分:"),p.a.createElement(H.a,{min:0,max:100,value:Ze,onChange:function(e){return et(e)},style:{width:"100px"}})),2===Ke&&p.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},p.a.createElement("span",{style:{width:"80px"}},"作业状态:"),p.a.createElement(V.a.Group,{onChange:function(e){je(Object(w.a)(e))},style:{width:"100%"}},null===(N=ke.task_status)||void 0===N?void 0:N.map((function(e,t){return p.a.createElement(V.a,{name:"task_status",value:e.id},e.name,"(",e.count,")")})))),p.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},p.a.createElement("span",{style:{width:"70px",textAlign:"end"}},p.a.createElement("span",{style:{color:"red"}},"*")," 评语:"),p.a.createElement(_.a,{className:ae.a.MdEditor,onChange:function(e){return lt(e)},placeholder:"请填写评语"}))))),p.a.createElement(c.a,{visible:Fe,title:"打回确认",onOk:Object(l.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(2!==Ke){e.next=7;break}return e.next=3,Object(ne.a)("/api/homework_commons/".concat(fe.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:fe.categoryId,comment:st,status:Ie}});case 3:0===e.sent.status&&(s.b.info("打回成功"),xt(),vt(),Be(!1)),e.next=11;break;case 7:return e.next=9,Object(ne.a)("/api/homework_commons/".concat(fe.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:fe.categoryId,comment:st,min_score:rt,max_score:Ze}});case 9:0===e.sent.status&&(s.b.info("打回成功"),xt(),vt(),Be(!1));case 11:case"end":return e.stop()}}),e)}))),onCancel:function(){xt(),Be(!1)}},p.a.createElement("div",{style:{padding:"32px"}},1===Ke&&p.a.createElement("span",null,"确认将成绩在",rt,"-",Ze,"的学生进行打回重做吗?"),2===Ke&&p.a.createElement("span",null,"确认将作业状态为",(null===(P=ke.task_status)||void 0===P?void 0:P.filter((function(e){return null==Ie?void 0:Ie.includes(e.id)})).map((function(e){return e.name})).toString())+",","的学生进行作业打回重做吗?"),p.a.createElement("br",null),p.a.createElement("span",null,"该条件下共有",null==Ue?void 0:Ue.count,"名学生")))),p.a.createElement(se,null),p.a.createElement("aside",{className:"tc mb50 mt30"},p.a.createElement(x.a,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!1,onChange:function(e,t){fe.page=e,fe.limit=20,vt()},current:fe.page||1,defaultPageSize:20,total:ke.work_count})))})),ue=(n("fOrg"),n("+KLJ")),he=Object(v.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var t,n=e.shixunHomeworks,i=e.loading,a=e.dispatch,o=Object(m.i)(),s=Object(f.useState)(Object(T.a)(Object(T.a)({},{page:1,limit:20,group_ids:[]}),o)),c=Object(u.a)(s,2),h=c[0],v=c[1],y=(Object(m.h)(),n.codeReview),b=Object(f.useState)({}),w=Object(u.a)(b,2),_=(w[0],w[1],K.a.useForm());Object(u.a)(_,1)[0];h.order="code_rate",h.sort="desc",h.category=h.categoryId,Object(f.useEffect)((function(){O(),console.log("params",h)}),[h]),Object(f.useEffect)((function(){"执行代码查重"===n.actionTabs.key&&O()}),[n.actionTabs.key]);var O=function(){var e=Object(l.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a({type:"shixunHomeworks/getCodeReview",payload:Object(T.a)({},h)});case 2:-2===e.sent.status&&setTimeout((function(){return O()}),1500);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),L=[{title:"序号",dataIndex:"number",render:function(e,t,n){return h.limit*(h.page-1)+n+1}},{title:"姓名",dataIndex:"username"},{title:"学号",dataIndex:"student_id"},{title:"相似度",dataIndex:"code_rate",render:function(e){return p.a.createElement("span",{className:"c-orange"},e)}},{title:"操作",dataInex:"action",render:function(e,t){return p.a.createElement("div",null,p.a.createElement(g.a,{target:"_blank",to:"/classrooms/".concat(h.coursesId,"/shixun_homework/").concat(h.categoryId,"/review_detail/").concat(t.user_id)},"查看"),p.a.createElement("br",null))}}];return p.a.createElement("section",{className:"minH500 bg-white pl30 pr30 pt10"},-2===(null==y?void 0:y.status)&&p.a.createElement(ue.a,{message:"查重进行中,请稍候……",className:"mb10 font14",type:"error"}),p.a.createElement(C.a,null,p.a.createElement(E.a,{flex:"1"},p.a.createElement("p",{className:"mt10"},"查重时间:",y.last_review_time,p.a.createElement(S.a,{ghost:!0,danger:!0,style:{color:"#29BD8B",borderColor:"#29BD8B",marginLeft:10},onClick:function(){a({type:"shixunHomeworks/setActionTabs",payload:{key:"代码查重",params:h}})}},"代码查重"))),p.a.createElement(E.a,null,p.a.createElement(k.a.Search,{allowClear:!0,placeholder:"请输入姓名或者学号搜索",onSearch:function(e){h.search=e,a({type:"shixunHomeworks/getCodeReview",payload:h})},style:{width:200}}),p.a.createElement("span",{className:"ml5 c-red"}))),(null===(t=y.group_info)||void 0===t?void 0:t.length)>0&&p.a.createElement(p.a.Fragment,null,p.a.createElement(C.a,null,p.a.createElement(E.a,{flex:"80px",className:"font14"},"分班情况:"),p.a.createElement(E.a,{flex:"80px"},p.a.createElement(V.a,{checked:""==h.group_ids,value:"all",onChange:function(e){delete h.group_ids,h.group_ids=[],h.page=1,v(Object(T.a)({},h))}},"全部")),p.a.createElement(E.a,{flex:"1"},y.group_info&&y.group_info.map((function(e,t){return p.a.createElement(V.a,{value:e.id,checked:h.group_ids.includes(e.id),onChange:function(t){t.target.checked?h.group_ids.push(e.id):h.group_ids.splice(h.group_ids.indexOf(e.id),1),h.page=1,v(Object(T.a)({},h))}},e.name,"(",e.members_count,")")})))),p.a.createElement(C.a,{className:"font14 c-red mt5"},p.a.createElement(E.a,null,"本页仅显示全部已查重分班"))),p.a.createElement("p",{className:"mt10"},p.a.createElement("span",{className:"c-red"},y.copy_reviews_count),"个疑似抄袭作品(",y.all_reviews_count,"作品)"),p.a.createElement(r.a,{className:"mt30",loading:i["shixunHomeworks/getCodeReview"],pagination:!1,dataSource:y.users_reviews,columns:L,onChange:function(e,t,n){"ascend"===n.order&&(h.b_order="asc"),"descend"===n.order&&(h.b_order="desc"),n.order||delete h.b_order,a({type:"shixunHomeworks/getCodeReview",payload:Object(T.a)({},h)})}}),p.a.createElement("aside",{className:"tc mb50 mt30"},p.a.createElement(x.a,{showSizeChanger:!1,onChange:function(e,t){h.page=e,h.limit=20,a({type:"shixunHomeworks/getCodeReview",payload:Object(T.a)({},h)})},defaultCurrent:h.page||1,current:h.page||1,defaultPageSize:20,hideOnSinglePage:!0,total:y.copy_reviews_count})))})),de=(n("OaEy"),n("2fM7")),fe=(n("iQDF"),n("+eQT")),pe=n("zetH"),me=n.n(pe),ge=(n("/zsF"),n("PArb")),ve=n("w5pM"),ye=n("LvDl"),be=fe.a.RangePicker,xe=de.a.Option,we=Object(v.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var t,n,r,i,a,o,h=e.shixunHomeworks,g=(e.loading,e.dispatch),v=Object(m.i)(),y=h.workSetting,x=h.workList,k=h.changeData,_=Object(f.useState)(!0),O=Object(u.a)(_,2),L=O[0],A=O[1],D=Object(f.useState)(!1),M=Object(u.a)(D,2),j=M[0],N=M[1],P=Object(f.useState)([]),B=Object(u.a)(P,2),U=B[0],W=B[1],G=Object(f.useState)([]),K=Object(u.a)(G,2),Y=K[0],q=K[1],X=Object(f.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0}),$=Object(u.a)(X,2),Q=$[0],J=$[1];Object(f.useEffect)((function(){return Z(),function(){W([].concat())}}),[]);var Z=function(){g({type:"shixunHomeworks/getWorkSetting",payload:Object(T.a)({},v)})};Object(f.useEffect)((function(){var e;null!=y&&y.course_id&&(Object.keys(Q).map((function(e){Q[e]=y[e]})),Q.allow_late&&Q.unified_late||(Q.late_penalty=5),U=JSON.parse(JSON.stringify(y.group_settings.map((function(e){return Object(T.a)(Object(T.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),Y=JSON.parse(JSON.stringify(y.allow_late_settings.map((function(e){return Object(T.a)(Object(T.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),J(Object(T.a)({},Q)),W(Object(w.a)(U)),(null===(e=Y)||void 0===e?void 0:e.length)<=0?q([{late_penalty:5}]):q(Object(w.a)(Y)))}),[y]);var ee=function(e){var t,n;if(null!==e.total_score)if(null!=e&&e.work_efficiency&&null===e.eff_score)s.b.warn("效率分不能为空");else{var r=e.challenge_settings.reduce((function(e,t){return e+Number(t.challenge_score)}),0);if((null==r?void 0:r.toFixed(10))===(null===(t=e.total_score-e.eff_score)||void 0===t?void 0:t.toFixed(10))){var i={shixun_evaluation:e.shixun_evaluation,challenge_settings:e.challenge_settings},a=function(){var t=Object(l.a)(d.a.mark((function t(){return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return N(!0),t.next=3,Object(ne.a)("/api/homework_commons/".concat(v.categoryId,"/publish_setting.json"),{method:"post",body:Object(T.a)({},e)});case 3:0===t.sent.status&&(s.b.success("更新成功"),A(!0),Z(),g({type:"shixunHomeworks/getWorkList",payload:Object(T.a)({},v)})),N(!1);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();Object(ye.isEqual)(k,i)||null!=x&&null!==(n=x.homework_status)&&void 0!==n&&n.includes("未发布")?a():c.a.confirm({title:"更新成绩",content:"您改动了本次作业的关卡得分设置,这可能导致已完成作业的学生的成绩产生错误。点击“确定”按钮将保存最新设置并按最新设置更新全班成绩。",okText:"确认",cancelText:"取消",onOk:a})}else s.b.warn("效率分加关卡任务总分必须等于总分值:".concat(e.total_score,"分"))}else s.b.warn("总分值不能为空")},te=function(e){return e&&e0&&p.a.createElement(C.a,{style:{marginTop:30,paddingTop:40,marginLeft:40,borderTop:"1px solid #eee"}},p.a.createElement(E.a,{span:24},p.a.createElement(C.a,null,p.a.createElement(E.a,{span:10}),p.a.createElement(E.a,{span:10},p.a.createElement(C.a,{className:"c-grey-c ml30"},p.a.createElement(E.a,{flex:"1"},"(学生收到作业时间)"),p.a.createElement(E.a,{flex:"1"},"(学生“按时”提交作品时间截点)"))),p.a.createElement(E.a,{span:4}))),U&&U.map((function(e,t){var n,r;return p.a.createElement(E.a,{span:24,key:t},p.a.createElement(C.a,{gutter:[8,16]},p.a.createElement(E.a,{span:10},p.a.createElement(C.a,{gutter:[8,16]},p.a.createElement(E.a,null,"发布规则 ",t+1),p.a.createElement(E.a,{flex:"1",style:{maxWidth:300}},p.a.createElement(de.a,{disabled:L||!(null!=x&&null!==(n=x.homework_status)&&void 0!==n&&n.includes("未发布"))&&e.id,className:"ml20",mode:"multiple",style:{width:"100%"},value:e.group_name,placeholder:"请选择分班名称",onChange:function(n){U[t].group_name=n,U[t].group_id=e.group_id;var r=Object(ye.flattenDeep)(U.map((function(e){return e.group_name}))),i=Y.map((function(e){var t=(null==e?void 0:e.group_name)||[];return Object(T.a)(Object(T.a)({},e),{},{group_name:Object(ye.remove)(t,(function(e){return r.includes(e)}))})}));q(i),W(U.slice())}},y.group_settings&&y.group_settings.map((function(e){if(!U.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name)))return p.a.createElement(xe,{value:e.group_name,key:e.id},e.group_name)})))))),p.a.createElement(E.a,{span:10},p.a.createElement("div",{className:"ml30"},p.a.createElement(be,{allowClear:!1,disabled:L||!(null!=x&&null!==(r=x.homework_status)&&void 0!==r&&r.includes("未发布"))&&e.id&&[!0,!1],style:{width:400},placeholder:["请选择发布时间","请选择截止时间"],disabledDate:te,showTime:{format:"HH:mm",defaultValue:[R()(Object(b.d)(),"HH:mm"),R()(Object(b.d)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:e.publish_time&&[R()(e.publish_time),e.end_time?R()(e.end_time):void 0],onChange:function(e,n){U[t].publish_time=n[0],U[t].end_time=n[1],W(Object(w.a)(U))}}))),!L&&p.a.createElement(E.a,{span:4},t>0&&!e.id&&p.a.createElement(I.a,{onClick:function(){U=U.filter((function(e,n){return t!==n})),W(U.slice()),setTimeout((function(){return W(U.slice())}),10)}}),p.a.createElement(ve.a,{className:"c-green ml20",onClick:function(){W(U.concat({}))}}))))}))),p.a.createElement(ge.a,null),p.a.createElement(C.a,null,p.a.createElement(E.a,null,p.a.createElement("h1",null,"补交设置")),p.a.createElement(E.a,{span:24,className:"mt15 pl30"},p.a.createElement(V.a,{checked:Q.allow_late,disabled:L,onChange:function(){Q.allow_late=!Q.allow_late,""==Y&&q([{late_penalty:5}]),J(Object.assign({},Q))}},p.a.createElement("strong",null,"开启补交")),p.a.createElement("span",{className:"c-grey-c font12"},"(选中,则允许学生延时提交作品)"))),(null==Q?void 0:Q.allow_late)&&p.a.createElement("div",{style:{marginLeft:22}},p.a.createElement("div",{className:"ml30 mt20"},p.a.createElement("span",null,"补交方式:"),p.a.createElement(z.a.Group,{disabled:L,value:Q.unified_late,onChange:function(e){Q.unified_late=e.target.value,""!=Y||e.target.value||q([{late_penalty:5}]),J(Object(T.a)({},Q))}},(null==Q?void 0:Q.unified_setting)&&p.a.createElement(z.a,{value:!0}," 统一补交 "),(null==y||null===(o=y.group_settings)||void 0===o?void 0:o.length)&&p.a.createElement(z.a,{value:!1}," 分班补交 "))),null!=Q&&Q.unified_late?p.a.createElement(p.a.Fragment,null,p.a.createElement(C.a,{align:"middle",className:"mt25 pl30"},p.a.createElement(E.a,null,"补交扣分:"),p.a.createElement(E.a,{className:"ml5"},p.a.createElement(H.a,{disabled:L||!Q.allow_late,value:Q.late_penalty,onChange:function(e){Q.late_penalty=e,J(Object.assign({},Q))}})),p.a.createElement(E.a,{flex:"1",className:"ml5"},"分",p.a.createElement("span",{className:"c-grey-c ml10"},"(延时提交作品时,学生成绩将被扣减的分值)"))),p.a.createElement(C.a,{align:"middle",className:"mt25 pl30"},p.a.createElement(E.a,null,"补交截止时间:"),p.a.createElement(E.a,{className:"ml5"},p.a.createElement(fe.a,{allowClear:!1,style:{width:170},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:R()(Object(b.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:L||!Q.allow_late,value:Q.late_time?R()(Q.late_time):"",disabledDate:te,onChange:function(e,t){Q.late_time=t,J(Object.assign({},Q))}})),p.a.createElement(E.a,null,p.a.createElement("span",{className:"c-grey-c ml10"},"(学生“延时”提交作品的时间截点)")))):Y.map((function(e,t){var n;return p.a.createElement(E.a,{span:24,key:t},p.a.createElement(C.a,{className:"mt25"},p.a.createElement(E.a,{style:{marginLeft:30}},p.a.createElement("span",null,"补交规则",t+1,":"),p.a.createElement(de.a,{disabled:L||!(null!=x&&null!==(n=x.homework_status)&&void 0!==n&&n.includes("未发布"))&&e.id,mode:"multiple",style:{width:306},value:"string"==typeof e.group_name?[e.group_name]:e.group_name,placeholder:"请选择分班名称",onChange:function(n){Y[t].group_name=n,Y[t].group_id=e.group_id,q(Y.slice())}},y.group_settings&&y.group_settings.map((function(e){return null!=Q&&Q.unified_setting&&!Y.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))||U.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))&&!Y.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))?p.a.createElement(xe,{value:e.group_name,key:e.id},e.group_name):void 0})))),p.a.createElement(E.a,{className:"ml20"},p.a.createElement("span",null,"补交扣分:"),p.a.createElement(H.a,{min:0,max:100,disabled:L,defaultValue:e.late_penalty,onChange:function(e){Y[t].late_penalty=e}})),p.a.createElement(E.a,{className:"ml20"},p.a.createElement("span",null,"补交截止时间:"),p.a.createElement(fe.a,{disabled:L,style:{width:200},showTime:{format:"HH:mm",defaultValue:R()(Object(b.d)(),"HH:mm")},placeholder:"请选择截止时间",disabledDate:te,format:"YYYY-MM-DD HH:mm",value:null!=e&&e.late_time?R()(e.late_time):void 0,onChange:function(e,n){Y[t].late_time=n,q(Object(w.a)(Y))}})),!L&&p.a.createElement(E.a,{className:"ml20"},t>0&&!e.id&&p.a.createElement(I.a,{onClick:function(){Y=Y.filter((function(e,n){return t!==n})),q(Y.slice()),setTimeout((function(){return q(Y.slice())}),10)}}),p.a.createElement(ve.a,{className:"c-green ml20",onClick:function(){q(Y.concat({late_penalty:5}))}}))))}))),p.a.createElement(ge.a,null),!L&&p.a.createElement(E.a,{className:"mb50"},p.a.createElement(S.a,{type:"primary",size:"large",style:{marginTop:"40px"},loading:j,onClick:function(){return function(){var e,t,n=JSON.parse(JSON.stringify(Q));if(n.challenge_settings.filter((function(e){return!e.hide})),n.categoryId=v.categoryId,null!==(e=n.challenge_settings)&&void 0!==e&&e.every((function(e){return!e.checked})))s.b.warn("关卡不能全部设置为可不做");else{if(Q.unified_setting||(U=null===(t=U)||void 0===t?void 0:t.map((function(e){var t;if(!e.publish_time||!e.end_time)throw s.b.error("请把发布时间填写完整"),new String("请把发布时间填写完整");if(!e.group_name)throw s.b.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null===(t=y.group_settings)||void 0===t?void 0:t.filter((function(t){var n;return null==e||null===(n=e.group_name)||void 0===n?void 0:n.includes(t.group_name)})).map((function(e){return e.group_id||e.id})).toString().split(","),e}))),n.group_settings=U,Q.allow_late)if(Q.unified_late){if(null===Q.late_penalty||void 0===Q.late_penalty||Q.late_penalty<0||Q.late_penalty>100)throw s.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!Q.late_time)throw s.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整")}else{var r;Y=null===(r=Y)||void 0===r?void 0:r.map((function(e){var t,n;if(null===e.late_penalty||void 0===e.late_penalty||e.late_penalty<0||e.late_penalty>100)throw s.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw s.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(!e.group_name)throw s.b.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(n=t.map((function(e){var t,n,r=null===(t=y.group_settings)||void 0===t||null===(n=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===n?void 0:n[0];return null==r?void 0:r.group_id})))||void 0===n?void 0:n.toString().split(","),e})),n.allow_late_settings=Y}ee(n)}}()}},"提交"),p.a.createElement(S.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){A(!0),Z()}},"取消")))})),ke=(fe.a.RangePicker,de.a.Option,Object(v.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var t=e.shixunHomeworks,n=(e.loading,e.dispatch),i=Object(m.i)(),a=(Object(m.h)(),t.workSetting),o=t.workList,h=t.changeData,g=Object(f.useState)(!0),v=Object(u.a)(g,2),y=v[0],b=v[1],x=Object(f.useState)({}),_=Object(u.a)(x,2),O=(_[0],_[1],Object(f.useState)(!1)),L=Object(u.a)(O,2),A=L[0],D=L[1],M=K.a.useForm(),R=(Object(u.a)(M,1)[0],Object(f.useState)([])),I=Object(u.a)(R,2),j=I[0],N=I[1],P=Object(f.useState)([]),F=Object(u.a)(P,2),B=F[0],H=F[1],z=Object(f.useState)(!1),U=Object(u.a)(z,2),W=U[0],G=U[1],Y=Object(f.useState)([]),q=Object(u.a)(Y,2),X=(q[0],q[1]),$=Object(f.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0}),Q=Object(u.a)($,2),J=Q[0],Z=Q[1];Object(f.useEffect)((function(){return ee(),function(){N([].concat())}}),[]);var ee=function(){n({type:"shixunHomeworks/getWorkSetting",payload:Object(T.a)({},i)})};Object(f.useEffect)((function(){null!=a&&a.course_id&&(Object.keys(J).map((function(e){J[e]=a[e]})),J.allow_late&&J.unified_late||(J.late_penalty=5),j=JSON.parse(JSON.stringify(a.group_settings.map((function(e){return Object(T.a)(Object(T.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),B=JSON.parse(JSON.stringify(a.allow_late_settings.map((function(e){return Object(T.a)(Object(T.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),Z(Object(T.a)({},J)),N(Object(w.a)(j)),H(Object(w.a)(B)))}),[a]);var te=function(e){var t,r;if(console.log(e.total_score,e.eff_score),null!==e.total_score)if(null!=e&&e.work_efficiency&&null===e.eff_score)s.b.warn("效率分不能为空");else{var a=e.challenge_settings.reduce((function(e,t){return e+Number(t.challenge_score)}),0);if((null==a?void 0:a.toFixed(10))===(null===(t=e.total_score-e.eff_score)||void 0===t?void 0:t.toFixed(10))){var u={shixun_evaluation:e.shixun_evaluation,challenge_settings:e.challenge_settings},f=function(){var t=Object(l.a)(d.a.mark((function t(){return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return D(!0),t.next=3,Object(ne.a)("/api/homework_commons/".concat(i.categoryId,"/public_setting.json"),{method:"post",body:Object(T.a)({},e)});case 3:0===t.sent.status&&(s.b.success("更新成功"),b(!0),ee(),n({type:"shixunHomeworks/getWorkList",payload:Object(T.a)({},i)})),D(!1);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();Object(ye.isEqual)(h,u)||null!=o&&null!==(r=o.homework_status)&&void 0!==r&&r.includes("未发布")?f():c.a.confirm({title:"更新成绩",content:"您改动了本次作业的关卡得分设置,这可能导致已完成作业的学生的成绩产生错误。点击“确定”按钮将保存最新设置并按最新设置更新全班成绩。",okText:"确认",cancelText:"取消",onOk:f})}else s.b.warn("效率分加关卡任务总分必须等于总分值:".concat(e.total_score,"分"))}else s.b.warn("总分值不能为空")};return p.a.createElement("section",{className:[me.a.form," bg-white pl30 pr30 pt10"].join(" ")},p.a.createElement(C.a,null,p.a.createElement(E.a,{flex:"1"},p.a.createElement("span",{style:{fontSize:"16px"}},"公开设置")),p.a.createElement(E.a,null,(null==a?void 0:a.can_edit)&&p.a.createElement(S.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return b(!1)}},"编辑设置")),p.a.createElement(E.a,{span:24,className:"mt15 pl30"},p.a.createElement(V.a,{checked:J.score_open,disabled:y,onChange:function(e){J.score_open=e.target.checked,Z(Object.assign({},J))}},p.a.createElement("strong",null,"公开成绩")),p.a.createElement("span",{className:"c-grey-c font12"},"(选中,则在作业截止/补交结束时间之后,已提交作品的学生可以查看其它学生的成绩,否则只能查看自己的成绩)")),p.a.createElement(E.a,{span:24,className:"mt15 pl30"},p.a.createElement(V.a,{checked:J.answer_public,disabled:y,onChange:function(e){J.answer_public=e.target.checked,Z(Object.assign({},J))}},p.a.createElement("strong",null,"公开答案")),p.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生可以查看实训参考答案,否则禁止查看答案)")),p.a.createElement(E.a,{span:24,className:"mt15 pl30 pb40"},p.a.createElement(V.a,{checked:J.comment_public,disabled:y,onChange:function(e){J.comment_public=e.target.checked,Z(Object.assign({},J))}},p.a.createElement("strong",null,"公开评论")),p.a.createElement("span",{className:"c-grey-c font12"},"(选中,则学生可以查看课程实验的评论,否则禁止查看)")),!y&&p.a.createElement(E.a,{className:"mb50"},p.a.createElement(S.a,{type:"primary",size:"large",loading:A,onClick:function(){return function(){var e,t,n=JSON.parse(JSON.stringify(J));if(n.challenge_settings.filter((function(e){return!e.hide})),n.categoryId=i.categoryId,null!==(e=n.challenge_settings)&&void 0!==e&&e.every((function(e){return!e.checked})))s.b.warn("关卡不能全部设置为可不做");else{if(J.unified_setting||(j=null===(t=j)||void 0===t?void 0:t.map((function(e){var t;if(!e.publish_time||!e.end_time)throw s.b.error("请把发布时间填写完整"),new String("请把发布时间填写完整");if(!e.group_name)throw s.b.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null===(t=a.group_settings)||void 0===t?void 0:t.filter((function(t){var n;return null==e||null===(n=e.group_name)||void 0===n?void 0:n.includes(t.group_name)})).map((function(e){return e.group_id||e.id})).toString().split(","),e}))),n.group_settings=j,J.allow_late)if(J.unified_late){if(null===J.late_penalty||void 0===J.late_penalty||J.late_penalty<0||J.late_penalty>100)throw s.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!J.late_time)throw s.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整")}else{var r;B=null===(r=B)||void 0===r?void 0:r.map((function(e){var t,n;if(null===e.late_penalty||void 0===e.late_penalty||e.late_penalty<0||e.late_penalty>100)throw s.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw s.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(!e.group_name)throw s.b.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(n=t.map((function(e){var t,n,r=null===(t=a.group_settings)||void 0===t||null===(n=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===n?void 0:n[0];return null==r?void 0:r.group_id})))||void 0===n?void 0:n.toString().split(","),e})),n.allow_late_settings=B}te(n)}}()}},"提交"),p.a.createElement(S.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){b(!0),ee()}},"取消"))),p.a.createElement(c.a,{title:"添加协作者",visible:W,onCancel:function(){return G(!1)}},p.a.createElement("div",null,p.a.createElement("div",{style:{display:"flex"}},p.a.createElement("label",{style:{width:"50px"}},"姓名:")," ",p.a.createElement(k.a.Search,{onChange:function(e){}})),p.a.createElement(r.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,t){X(e)}},pagination:!1,dataSource:[{name:"1"}],columns:[{title:"班级",dataIndex:"name",key:"name"},{title:"发布时间",dataIndex:"publish_time",key:"publish_time"},{title:"截止时间",dataIndex:"end_time",key:"end_time"}]}))))}))),Ce=Object(v.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var t=e.shixunHomeworks,n=(e.loading,e.dispatch),r=Object(m.i)(),i=t.workSetting,a=t.workList,o=t.changeData,h=Object(f.useState)(!0),g=Object(u.a)(h,2),v=g[0],y=g[1],b=Object(f.useState)(!1),x=Object(u.a)(b,2),k=x[0],_=x[1],O=Object(f.useState)(!1),L=Object(u.a)(O,2),A=L[0],D=L[1],M=K.a.useForm(),R=(Object(u.a)(M,1)[0],Object(f.useState)([])),I=Object(u.a)(R,2),j=I[0],N=I[1],P=Object(f.useState)([]),F=Object(u.a)(P,2),B=F[0],U=F[1],W=Object(f.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0,is_onpage_time:!0,training_time_rules:1}),G=Object(u.a)(W,2),Y=G[0],q=G[1];Object(f.useEffect)((function(){return X(),function(){N([].concat())}}),[]);var X=function(){n({type:"shixunHomeworks/getWorkSetting",payload:Object(T.a)({},r)})};Object(f.useEffect)((function(){null!=i&&i.course_id&&(Object.keys(Y).map((function(e){Y[e]=i[e]})),Y.allow_late&&Y.unified_late||(Y.late_penalty=5),j=JSON.parse(JSON.stringify(i.group_settings.map((function(e){return Object(T.a)(Object(T.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),B=JSON.parse(JSON.stringify(i.allow_late_settings.map((function(e){return Object(T.a)(Object(T.a)({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),q(Object(T.a)({},Y)),N(Object(w.a)(j)),U(Object(w.a)(B)))}),[i]);var $=function(e){var t,i;if(console.log(e.total_score,e.eff_score),null!==e.total_score)if(null!=e&&e.work_efficiency&&null===e.eff_score)s.b.warn("效率分不能为空");else{var u=e.challenge_settings.reduce((function(e,t){return e+Number(t.challenge_score)}),0);if((null==u?void 0:u.toFixed(10))===(null===(t=e.total_score-e.eff_score)||void 0===t?void 0:t.toFixed(10))){var h={shixun_evaluation:e.shixun_evaluation,challenge_settings:e.challenge_settings},f=function(){var t=Object(l.a)(d.a.mark((function t(){return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return _(!0),t.next=3,Object(ne.a)("/api/homework_commons/".concat(r.categoryId,"/score_setting.json"),{method:"post",body:Object(T.a)({},e)});case 3:0===t.sent.status&&(s.b.success("更新成功"),y(!0),X(),n({type:"shixunHomeworks/getWorkList",payload:Object(T.a)({},r)})),_(!1);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();Object(ye.isEqual)(o,h)||null!=a&&null!==(i=a.homework_status)&&void 0!==i&&i.includes("未发布")?f():c.a.confirm({title:"更新成绩",content:"您改动了本次作业的关卡得分设置,这可能导致已完成作业的学生的成绩产生错误。点击“确定”按钮将保存最新设置并按最新设置更新全班成绩。",okText:"确认",cancelText:"取消",onOk:f})}else s.b.warn("效率分加关卡任务总分必须等于总分值:".concat(e.total_score,"分"))}else s.b.warn("总分值不能为空")},Q=function(){var e,t=Y.eff_score,n=Y.total_score-t,r=null===(e=Y.challenge_settings)||void 0===e?void 0:e.filter((function(e){return e.checked})).length;if(r){var i,a=n/Y.challenge_settings.filter((function(e){return e.checked})).map((function(e){return e.challenge_exp})).reduce((function(e,t){return e+t})),o=0,s=0;switch(Y.shixun_evaluation){case 0:var l=(n/r).toFixed(1);Y.challenge_settings.map((function(e,t){e.checked?(o=t,e.challenge_score=l>0?l:0):e.challenge_score=0})),i=(n-l*(r-1)).toFixed(1),Y.challenge_settings[o].challenge_score=i>0?i:0;break;case 1:Y.challenge_settings.map((function(e,t){e.checked?(o=t,s+=Number((Math.round(e.challenge_exp*a*10)/10).toFixed(1)),e.challenge_score=(Math.round(e.challenge_exp*a*10)/10).toFixed(1)):e.challenge_score=0}));var c=Y.challenge_settings[o].challenge_score;i=(n-s+Number(c)).toFixed(1),Y.challenge_settings[o].challenge_score=i>0?i:0}}else Y.challenge_settings.map((function(e,t){e.challenge_score=0}))};return p.a.createElement("section",{className:[me.a.form," bg-white pl30 pr30 pt10 mb20 pb10"].join(" ")},p.a.createElement(C.a,{className:"mt25"},p.a.createElement(E.a,{flex:"1"}),p.a.createElement(E.a,null,(null==i?void 0:i.can_edit)&&p.a.createElement(S.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return y(!1)}},"编辑设置")),p.a.createElement(E.a,{span:24,className:"pl30 mt10"},p.a.createElement("strong",null,"总分值:"),p.a.createElement(H.a,{min:0,value:Y.total_score,disabled:v,onChange:function(e){Y.total_score=e,q(Object.assign({},Y)),Q()}})," 分"),p.a.createElement(E.a,{span:24,style:{paddingLeft:60,marginTop:20}},p.a.createElement("strong",null,"关卡任务的选择和分值设置"),p.a.createElement("span",{className:"c-orange"}," (总分值 = 效率分+ 关卡任务总分)"))),p.a.createElement(C.a,{style:{paddingLeft:85,marginTop:30}},p.a.createElement(E.a,{flex:"1"},p.a.createElement(V.a,{disabled:v,checked:Y.work_efficiency,onChange:function(e){Y.work_efficiency=e.target.checked,Y.work_efficiency?Y.eff_score=20:Y.eff_score=0,q(Object.assign({},Y)),Q()}},p.a.createElement("strong",null,"效率分")),p.a.createElement("span",{className:"c-orange font12",style:{marginLeft:-4}},"(选中,则学生最终成绩包含效率分。效率分在作业截止或者补交结束后由系统自动生成)")),p.a.createElement(E.a,{className:me.a.efficiency},"(学生学习效率= log(实训总得分/实训总耗时)",p.a.createElement("br",null),"(学生效率分 = 学生学习效率 / 课堂学生最高学习效率 * 分值)",p.a.createElement("br",null),p.a.createElement("span",{style:{marginLeft:10}},"另:当学生未通关时,学生效率分记 0 分"))),p.a.createElement(C.a,{align:"middle",style:{paddingLeft:105}},p.a.createElement(E.a,null,p.a.createElement("span",{className:"mr5"},"效率分"),p.a.createElement(H.a,{min:0,disabled:v||!Y.work_efficiency,value:Y.eff_score,step:.1,onChange:function(e){Y.eff_score=e,q(Object.assign({},Y)),Q()}}),p.a.createElement("span",null," 分"))),p.a.createElement(C.a,{align:"middle",style:{paddingLeft:105,marginTop:"20px"}},p.a.createElement(E.a,null,p.a.createElement("span",{className:"mr5"},"实训耗时规则:"),p.a.createElement(z.a.Group,{disabled:v,value:Y.training_time_rules,onChange:function(e){Y.training_time_rules=e.target.value,q(Object.assign({},Y)),Q()}},p.a.createElement(z.a,{value:1},"页面停留时长"),p.a.createElement(z.a,{value:2},"关卡总耗时"),p.a.createElement(z.a,{value:3},"即时通关时长",p.a.createElement("i",{onClick:function(e){e.stopPropagation(),e.preventDefault(),D(!0)},style:{marginLeft:10,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"}))))),p.a.createElement(C.a,{align:"middle",style:{paddingLeft:85,marginTop:35}},p.a.createElement(E.a,null,p.a.createElement("strong",null,"关卡任务分值设置规则")),p.a.createElement(E.a,{flex:"1"},p.a.createElement(K.a.Item,{className:"ml5"},p.a.createElement(z.a.Group,{disabled:v,value:Y.shixun_evaluation,onChange:function(e){Y.shixun_evaluation=e.target.value,q(Object.assign({},Y)),Q()}},p.a.createElement(z.a,{value:0},"均分比例"),p.a.createElement(z.a,{value:1},"难易度"),p.a.createElement(z.a,{value:2},"自定义分值"))))),p.a.createElement(C.a,null,p.a.createElement(E.a,{style:{marginLeft:145,marginTop:15}},p.a.createElement("span",{className:"font16"},"关卡名称"),p.a.createElement("span",{className:"font14 ml5 c-orange"},(null!=i&&i.task_pass,"(请选中需要学生完成的关卡,该实训支持跳关学习)")))),Y.challenge_settings&&Y.challenge_settings.map((function(e,t){return p.a.createElement(C.a,{key:t,align:"middle",style:{paddingLeft:275,marginTop:20}},p.a.createElement(E.a,{flex:"1"},p.a.createElement(V.a,{disabled:v,checked:e.checked,onChange:function(e){var n=Object(ye.cloneDeep)(Y.challenge_settings);n[t].checked=e.target.checked,null!=n&&n.every((function(e){return!e.checked}))?s.b.warn("关卡不能全部设置为可不做"):(Y.challenge_settings[t].checked=e.target.checked,Y.challenge_settings[t].hide=e.target.checked,2!==Y.shixun_evaluation||e.target.checked||(Y.challenge_settings[t].challenge_score=0),q(Object(T.a)({},Y)),Q())}},p.a.createElement("strong",null,e.challenge_name))),p.a.createElement(E.a,null,!e.checked&&p.a.createElement("span",{className:"tag-style-border-small bg-orange border-raduis-50 c-white mr10"},"可不做")),p.a.createElement(E.a,{flex:"150px"},p.a.createElement(H.a,{min:0,step:.1,value:e.challenge_score,disabled:v||2!==Y.shixun_evaluation||!e.checked,onChange:function(e){Y.challenge_settings[t].challenge_score=e,q(Object(T.a)({},Y))}}),p.a.createElement("span",{className:"ml10"},"分")),p.a.createElement(E.a,{flex:"300px"},p.a.createElement("span",{className:"tag-style-border-small bg-green c-white mr10"},e.difficulty),"金币奖励数: ",e.challenge_exp))})),p.a.createElement(C.a,{className:"mt30",style:{paddingLeft:65}},p.a.createElement(E.a,null,p.a.createElement("span",{className:"font16 c-black"},"查看参考答案才通过评测的关卡扣分规则"),p.a.createElement("span",{className:"font12 c-grey-c"}," (学生通过评测后再查看参考答案,不对成绩产生影响)"))),p.a.createElement(C.a,{style:{paddingLeft:65}},p.a.createElement(z.a.Group,{disabled:v,value:Y.answer_open_evaluation,onChange:function(e){Y.answer_open_evaluation=e.target.value,q(Object(T.a)({},Y))}},p.a.createElement(z.a,{value:!1,style:{marginTop:15}},p.a.createElement("strong",null,"按查看答案级别扣分"),p.a.createElement("span",{className:"c-grey-c"},"(根据学员选择查看的实训答案级别(解题思路、完整答案),扣减相应的分值)")),p.a.createElement("br",null),p.a.createElement(z.a,{value:!0,style:{marginTop:15}},p.a.createElement("strong",null,"不扣分")))),!v&&p.a.createElement(E.a,{className:"mb50",style:{marginTop:"10px"}},p.a.createElement(S.a,{type:"primary",size:"large",loading:k,onClick:function(){return function(){var e,t,n=JSON.parse(JSON.stringify(Y));if(n.challenge_settings.filter((function(e){return!e.hide})),n.categoryId=r.categoryId,null!==(e=n.challenge_settings)&&void 0!==e&&e.every((function(e){return!e.checked})))s.b.warn("关卡不能全部设置为可不做");else{if(Y.unified_setting||(j=null===(t=j)||void 0===t?void 0:t.map((function(e){var t;if(!e.publish_time||!e.end_time)throw s.b.error("请把发布时间填写完整"),new String("请把发布时间填写完整");if(!e.group_name)throw s.b.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null===(t=i.group_settings)||void 0===t?void 0:t.filter((function(t){var n;return null==e||null===(n=e.group_name)||void 0===n?void 0:n.includes(t.group_name)})).map((function(e){return e.group_id||e.id})).toString().split(","),e}))),n.group_settings=j,Y.allow_late)if(Y.unified_late){if(null===Y.late_penalty||void 0===Y.late_penalty||Y.late_penalty<0||Y.late_penalty>100)throw s.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!Y.late_time)throw s.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整")}else{var a;B=null===(a=B)||void 0===a?void 0:a.map((function(e){var t,n;if(null===e.late_penalty||void 0===e.late_penalty||e.late_penalty<0||e.late_penalty>100)throw s.b.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw s.b.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(!e.group_name)throw s.b.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(n=t.map((function(e){var t,n,r=null===(t=i.group_settings)||void 0===t||null===(n=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===n?void 0:n[0];return null==r?void 0:r.group_id})))||void 0===n?void 0:n.toString().split(","),e})),n.allow_late_settings=B}$(n)}}()}},"提交"),p.a.createElement(S.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){y(!0),X()}},"取消")),p.a.createElement(c.a,{visible:A,width:860,onCancel:function(){D(!1)},title:"计时规则说明",footer:null},p.a.createElement("div",{style:{color:"#333333",fontWeight:400}},p.a.createElement("span",{style:{fontWeight:500}},"1、页面停留时长"),p.a.createElement("br",null),p.a.createElement("span",null,"学生进入关卡的答题页面开始计时,直至学生关卡评测通过,则计时结束;"),p.a.createElement("br",null),p.a.createElement("span",null," 学生进入关卡的答题页面开始计时,若学生关闭/退出答题页面,则计时暂停,再次进入答题页面时开始累计计时直至评测通过,则计时结束;"),p.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," 可能会造成时长评估与实际做题能力不符的情况 "),p.a.createElement("span",null,"a、学生进入关卡看完题后,退出答题页面完成代码设计,再复制进平台答题页面进行评测,无法评估学生的学习和思考时间。")),p.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},p.a.createElement("span",{style:{fontWeight:500}},"2、关卡总耗时"),p.a.createElement("br",null),p.a.createElement("span",{style:{}},"学生第一次进入关卡答题页面开始计时,直至该关卡评测通过,则计时结束。 "),p.a.createElement("br",null),p.a.createElement("span",null," 另,即使关卡闯关过程中,学生退出/关闭答题页面,也将持续计时,直至该关卡通过。"),p.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," 可能会造成时长评估与实际做题能力不符的情况 "),p.a.createElement("span",null,"a、学生从其他同学处看到题目后,完成代码设计,再进入关卡答题页面,将已完成的代码复制至平台进行评测;"),p.a.createElement("br",null),p.a.createElement("span",null,"b、学生第一次打开关卡后,因为某种原因离开页面,时隔多日才再次进入平台闯关,就会导致学生关卡总耗时过长;")),p.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},p.a.createElement("span",{style:{fontWeight:500}},"3、即时通关时长"),p.a.createElement("br",null),p.a.createElement("span",{style:{}},"从老师发布的实训作业开始时间,开始计时,直至学生实训通关(包括迟交通关),结束计时。如果学生未通关,则该生的闯关耗时为老师设置的实训开始时间至实训截止时间,如果老师开启了补交,则该生的闯关耗时为实训开始时间至实训补交截止时间。")),p.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},p.a.createElement("span",{style:{fontWeight:500}},"规则目的"),p.a.createElement("br",null),p.a.createElement("span",{style:{}},"鼓励学生在实训作业发布的第一时间,计时登录平台完成实训作业的通关。"))))})),Ee=Object(v.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){e.shixunHomeworks,e.loading,e.dispatch;var t,n,i=Object(f.useState)(!0),a=Object(u.a)(i,2),o=a[0],h=a[1],g=Object(f.useState)(!1),v=Object(u.a)(g,2),y=v[0],b=v[1],x=Object(f.useState)([]),w=Object(u.a)(x,2),T=w[0],_=w[1],O=Object(f.useState)([]),L=Object(u.a)(O,2),A=L[0],D=L[1],M=Object(f.useState)([]),R=Object(u.a)(M,2),I=R[0],j=R[1],N=Object(f.useState)([]),P=Object(u.a)(N,2),F=P[0],B=P[1],H=Object(m.i)();function z(){return U.apply(this,arguments)}function U(){return(U=Object(l.a)(d.a.mark((function e(){var t;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ne.a)("/api/homework_commons/".concat(H.categoryId,"/homework_common_collaborators.json"),{method:"get"});case 2:t=e.sent,D(t);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(){return W.apply(this,arguments)}function W(){return(W=Object(l.a)(d.a.mark((function e(){var t;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ne.a)("/api/courses/".concat(null==H?void 0:H.coursesId,"/teachers"),{method:"get",params:{homework_id:H.categoryId}});case 2:null==(t=e.sent)||t.teacher_list.map((function(e){e.key=e.user_id})),j(null==t?void 0:t.teacher_list),B(null==t?void 0:t.teacher_list);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(f.useEffect)((function(){z(),V()}),[H]);return p.a.createElement("section",{className:[me.a.form," bg-white pl30 pr30 pt10"].join(" ")},p.a.createElement(C.a,null,p.a.createElement(E.a,{flex:"1"},p.a.createElement("span",{style:{fontSize:"16px"}},"协作设置"),(null==A?void 0:A.can_edit)&&p.a.createElement("span",{style:{cursor:"pointer",color:"#0152d9",marginLeft:"10px"},onClick:function(){b(!0)}},"+添加协作者"))),p.a.createElement(C.a,{style:{marginTop:"20px",marginBottom:"20px"}},(null==A||null===(t=A.data)||void 0===t?void 0:t.length)<=0&&p.a.createElement(J.a,{customText:"该作业暂无协作者"}),null==A||null===(n=A.data)||void 0===n?void 0:n.map((function(e){return p.a.createElement("span",{style:{display:"inline-flex",height:"40px",borderRadius:"4px",border:"1px solid #44D7B6",padding:"7px 20px",color:"#44D7B6",marginRight:"40px"}},p.a.createElement("span",{style:{flex:"1"}},null==e?void 0:e.real_name),(null==A?void 0:A.can_edit)&&p.a.createElement("span",{style:{cursor:"pointer",marginLeft:"10px"},onClick: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,Object(ne.a)("/api/homework_commons/".concat(H.categoryId,"/homework_common_collaborators/delete.json"),{method:"delete",body:{user_id:e.id}});case 2:0===t.sent.status&&(s.b.info("删除成功"),z(),V());case 4:case"end":return t.stop()}}),t)})))},"X"))}))),p.a.createElement(C.a,null,!o&&p.a.createElement(E.a,{className:"mb50"},p.a.createElement(S.a,{type:"primary",size:"large",onClick:function(){}},"提交"),p.a.createElement(S.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){h(!0)}},"取消"))),p.a.createElement(c.a,{title:"添加协作者",visible:y,onCancel:function(){return b(!1)},onOk:Object(l.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==T.length){e.next=3;break}return s.b.info("请选择协作老师"),e.abrupt("return");case 3:return e.next=5,Object(ne.a)("/api/homework_commons/".concat(H.categoryId,"/homework_common_collaborators.json"),{method:"post",body:{user_ids:T}});case 5:0===e.sent.status&&(s.b.info("添加成功"),_([]),z(),V(),b(!1));case 7:case"end":return e.stop()}}),e)})))},p.a.createElement("div",null,p.a.createElement("div",{style:{display:"flex"}},p.a.createElement("label",{style:{width:"50px"}},"姓名:")," ",p.a.createElement(k.a.Search,{onChange:function(e){j(F.filter((function(t){return t.name.indexOf(e.target.value)>-1})))}})),p.a.createElement(r.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,t){_(e)},selectedRowKeys:T,getCheckboxProps:function(e){return{disabled:e.is_collaborator}}},pagination:!1,dataSource:I,columns:[{title:"姓名",dataIndex:"name",key:"name"},{title:"角色",dataIndex:"role",key:"role"}]}))))})),Se=(fe.a.RangePicker,de.a.Option,Object(v.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){e.shixunHomeworks,e.loading,e.dispatch;return p.a.createElement("section",{className:[me.a.form," bg-white pl30 pr30 pt10"].join(" ")},p.a.createElement(i.a,null,p.a.createElement(i.a.TabPane,{tab:"发布设置",key:1},p.a.createElement(we,null)),p.a.createElement(i.a.TabPane,{tab:"评分设置",key:2},p.a.createElement(Ce,null)),p.a.createElement(i.a.TabPane,{tab:"公开设置",key:3},p.a.createElement(ke,null)),p.a.createElement(i.a.TabPane,{tab:"协作设置",key:4},p.a.createElement(Ee,null))))}))),Te=n("lO7E"),_e=n.n(Te),Oe=n("cVA7"),Le=n.n(Oe),Ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return console.log("---",e,t,n),{tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:["等级A","等级B","等级C","等级D","等级E"]}],yAxis:[{type:"value"}],series:[{name:"缺陷",type:"bar",stack:"Ad",color:["#5c9ef7"],emphasis:{focus:"series"},data:n},{name:"漏洞",type:"bar",stack:"Ad",color:["#75c87c"],emphasis:{focus:"series"},data:t},{name:"代码规范性",type:"bar",stack:"Ad",color:["#f3d460"],emphasis:{focus:"series"},data:e}]}},De=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{dataset:[{source:e}],tooltip:{show:!0,formatter:function(e){return e.value[2]+":"+e.value[1]+"分"}},xAxis:{splitLine:{lineStyle:{type:"dashed"}},show:!1},yAxis:{splitLine:{lineStyle:{type:"dashed"}}},series:[{name:"scatter",type:"scatter",datasetIndex:0},{name:"line",type:"line",smooth:!0,datasetIndex:1,symbolSize:.1,symbol:"circle",label:{show:!0,fontSize:16},labelLayout:{dx:-20},encode:{label:2,tooltip:1}}]}},Me=Object(v.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){e.shixunHomeworks,e.loading;var t,n,i,a,o=e.dispatch,s=Object(m.i)(),c=Object(f.useState)(Object(T.a)(Object(T.a)({},{sort_by:"student_id",sort_direction:"desc"}),s)),h=Object(u.a)(c,2),g=h[0],v=(h[1],Object(f.useState)()),y=Object(u.a)(v,2),b=y[0],_=y[1],O=Object(f.useState)([]),L=Object(u.a)(O,2),A=L[0],D=L[1],M=Object(f.useRef)(),R=Object(f.useState)(1),I=Object(u.a)(R,2),j=I[0],N=I[1],P=Object(f.useState)(10),F=Object(u.a)(P,2),B=F[0],H=F[1],z=Object(f.useState)([]),U=Object(u.a)(z,2),W=U[0],G=U[1];Object(f.useEffect)((function(){Y()}),[]);var K=[{title:"学号",dataIndex:"student_number",sorter:!0,showSorterTooltip:!1,sortOrder:"student_number"===g.sort_by?"desc"===g.sort_direction?"descend":"ascend":null},{title:"分班",dataIndex:"group_course_name"},{title:"姓名",dataIndex:"user_name"},{title:"缺陷",children:[{title:"崩溃",dataIndex:"bug",render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.blocker)}},{title:"严重",dataIndex:"bug",render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.critical)}},{title:"主要",dataIndex:"bug",render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.major)}},{title:"次要",dataIndex:"bug",render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.minor)}},{title:"等级",dataIndex:"bug",sorter:!1,showSorterTooltip:!1,sortOrder:"bug"===g.sort_by?"desc"===g.sort_direction?"descend":"ascend":null,render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.grade)}}]},{title:"漏洞",children:[{title:"崩溃",dataIndex:"vulnerability",render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.blocker)}},{title:"严重",dataIndex:"vulnerability",render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.critical)}},{title:"主要",dataIndex:"vulnerability",render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.major)}},{title:"次要",dataIndex:"vulnerability",render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.minor)}},{title:"等级",dataIndex:"vulnerability",sorter:!1,showSorterTooltip:!1,sortOrder:"vulnerability"===g.sort_by?"desc"===g.sort_direction?"descend":"ascend":null,render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.grade)}}]},{title:"代码规范性",children:[{title:"崩溃",dataIndex:"specification",render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.blocker)}},{title:"严重",dataIndex:"specification",render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.critical)}},{title:"主要",dataIndex:"specification",render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.major)}},{title:"次要",dataIndex:"specification",render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.minor)}},{title:"等级",dataIndex:"specification",sorter:!1,showSorterTooltip:!1,sortOrder:"specification"===g.sort_by?"desc"===g.sort_direction?"descend":"ascend":null,render:function(e){return p.a.createElement("span",{className:"current"},null==e?void 0:e.grade)}}]},{title:"复杂代码",dataIndex:"complexity",sorter:!0,showSorterTooltip:!1,sortOrder:"complexity"===g.sort_by?"desc"===g.sort_direction?"descend":"ascend":null},{title:"代码行数",dataIndex:"total_row_number",sorter:!0,showSorterTooltip:!1,sortOrder:"total_row_number"===g.sort_by?"desc"===g.sort_direction?"descend":"ascend":null},{title:"质量评分",dataIndex:"quality_score",sorter:!0,showSorterTooltip:!1,sortOrder:"quality_score"===g.sort_by?"desc"===g.sort_direction?"descend":"ascend":null}];function Y(){return q.apply(this,arguments)}function q(){return(q=Object(l.a)(d.a.mark((function e(){var t;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ne.a)("/api/homework_commons/".concat(g.categoryId,"/code_quality_analyses/check_status.json"),{method:"GET"});case 2:t=e.sent,_(t.status),2!=t.status&&-1!=t.status&&(X({page:1,limit:10}),clearTimeout(M.current));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(e){return $.apply(this,arguments)}function $(){return($=Object(l.a)(d.a.mark((function e(t){var n;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(null==t?void 0:t.page),H(null==t?void 0:t.limit),e.next=4,Object(ne.a)("/api/homework_commons/".concat(g.categoryId,"/code_quality_analyses.json"),{method:"GET",params:Object(T.a)({},t)});case 4:n=e.sent,D(n);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(f.useEffect)((function(){return 2===b&&(M.current=setInterval((function(){Y()}),6e4)),function(){clearTimeout(M.current)}}),[b]),console.log("-------",b),p.a.createElement("section",{style:{paddingBottom:"10px"},className:"minH500 bg-white pl30 pr30 pt10"},(0===b||1===b)&&p.a.createElement("div",null,p.a.createElement("p",{style:{display:"flex"}},p.a.createElement("span",{style:{flex:"1"}},p.a.createElement("label",null,"检测时间:",null==A?void 0:A.created_at)),p.a.createElement(S.a,{onClick:function(){o({type:"shixunHomeworks/setActionTabs",payload:{key:"质量检测"}})}},"重新检测")),p.a.createElement("p",{style:{display:"flex"}},p.a.createElement(C.a,{style:{width:"100%"}},p.a.createElement(E.a,{flex:"80px"},p.a.createElement("label",null,"分班情况:")),p.a.createElement(E.a,{flex:"80px"},p.a.createElement(V.a,{checked:0===(null==W?void 0:W.length),onChange:function(e){e.target.checked&&(G([]),X({page:j,limit:B}))},style:{fontSize:"14px"},value:"all"},"全部")),p.a.createElement(E.a,{flex:"1"},p.a.createElement(V.a.Group,{value:W,onChange:function(){var e=Object(l.a)(d.a.mark((function e(t){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:G(Object(w.a)(t)),X({page:j,limit:B,group_course_ids:t});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),style:{width:"100%",fontSize:"14px"}},null==A||null===(t=A.course_groups)||void 0===t?void 0:t.map((function(e,t){return p.a.createElement(V.a,{style:{fontSize:"14px"},value:null==e?void 0:e.id},null==e?void 0:e.name,"(",null==e?void 0:e.count,")")})))))),p.a.createElement("p",{style:{display:"flex"}},p.a.createElement("span",null,p.a.createElement("label",{style:{color:"red"}},"注意:")),"本页仅显示全部已完成检测的分班"),p.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},p.a.createElement("div",null,p.a.createElement("p",{style:{marginLeft:"20px",fontSize:"20px",fontWeight:500}},"代码等级分析"),(null==A?void 0:A.grade_statistics)&&p.a.createElement(Le.a,{option:Ae(null==A||null===(n=A.grade_statistics)||void 0===n?void 0:n.map((function(e){return e.specification_count})),null==A||null===(i=A.grade_statistics)||void 0===i?void 0:i.map((function(e){return e.vulnerability_count})),null==A||null===(a=A.grade_statistics)||void 0===a?void 0:a.map((function(e){return e.bug_count}))),style:{height:400,width:600},opts:{renderer:"svg"}})),p.a.createElement("div",null,p.a.createElement("p",{style:{marginLeft:"20px",fontSize:"20px",fontWeight:500}},"代码质量分布"),(null==A?void 0:A.quality_scores)&&p.a.createElement(Le.a,{option:De(null==A?void 0:A.quality_scores.map((function(e,t){return[t+1,null==e?void 0:e.quality_score,null==e?void 0:e.user_name]}))),style:{height:400,width:600},opts:{renderer:"svg"}}))),p.a.createElement("div",null,p.a.createElement("div",{style:{display:"flex"}},p.a.createElement("p",{style:{marginLeft:"20px",fontSize:"20px",fontWeight:500,flex:"1"}},"详细列表"),p.a.createElement(k.a.Search,{size:"large",onSearch:function(e){X({page:1,limit:B,search:e})},style:{width:"300px"},enterButton:"搜索"})),p.a.createElement(r.a,{columns:K,dataSource:null==A?void 0:A.analysis,bordered:!0,scroll:{x:"calc(700px + 50%)"},pagination:!1,onChange:function(e,t,n){n.field&&(g.sort_by=n.field),n.order||(g.sort_direction="asc"),"ascend"===n.order&&(g.sort_direction="asc"),"descend"===n.order&&(g.sort_direction="desc"),n.order||(g.sort_direction="asc"),X(Object(T.a)({page:1,limit:B},g))}}),p.a.createElement(x.a,{current:j,total:null==A?void 0:A.total_count,pageSizeOptions:["10","20","50","100","200"],pageSize:B,style:{textAlign:"center",marginTop:"20px",marginBottom:"20px"},onChange:function(e,t){N(e),H(t),X({page:e,limit:t,group_course_ids:W})}}))),2===b&&p.a.createElement("div",{style:{textAlign:"center",margin:"100px 0px",paddingBottom:"100px"}},p.a.createElement("img",{src:_e.a}),p.a.createElement("br",null),p.a.createElement(S.a,{type:"primary",style:{width:"120px",height:"40px"},onClick:function(){Y()}},"刷新页面")),p.a.createElement(se,null))})),Re=n("RotF"),Ie=n.n(Re),je=Object(v.a)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading}}))((function(e){var t,n=e.shixunHomeworks,i=e.loading,a=e.dispatch,o=Object(m.i)(),h=(Object(m.h)(),Object(f.useState)([])),g=Object(u.a)(h,2),y=g[0],b=g[1],x=Object(f.useState)([]),k=Object(u.a)(x,2),S=(k[0],k[1],Object(f.useState)(!0)),_=Object(u.a)(S,2),O=_[0],L=_[1],A=Object(f.useState)(!1),M=Object(u.a)(A,2),I=M[0],j=M[1],N=Object(f.useState)(1),P=Object(u.a)(N,2),F=P[0],B=P[1],H=Object(f.useState)([]),z=Object(u.a)(H,2),U=(z[0],z[1]),W=Object(f.useState)(!1),Y=Object(u.a)(W,2),q=Y[0],X=Y[1],$=Object(f.useState)(!1),Q=Object(u.a)($,2),J=Q[0],Z=Q[1];Object(f.useEffect)((function(){"代码查重"===n.actionTabs.key?(te.resetFields(),b([]),X(!0),re()):X(!1)}),[n.actionTabs.key]);var ee=K.a.useForm(),te=Object(u.a)(ee,1)[0],re=function(){var e=Object(l.a)(d.a.mark((function e(){var t,n,r;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!O||I){e.next=11;break}return j(!0),B(F+1),e.next=5,Object(D.x)(Object(T.a)(Object(T.a)({},o),{},{page:F}));case 5:n=e.sent,r=Object(w.a)(n.group_list),null!=n&&n.ungroup_list&&r.push({id:null==n?void 0:n.ungroup_list.id,name:null==n?void 0:n.ungroup_list.name,works_count:null==n?void 0:n.ungroup_list.work_count,last_review_time:null==n?void 0:n.ungroup_list.last_review_time}),b([].concat(Object(w.a)(y),Object(w.a)(r))),j(!1),(null===(t=n.group_list)||void 0===t?void 0:t.length)<10&&L(!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ie=function(){a({type:"shixunHomeworks/setActionTabs",payload:{}}),Z(!1),L(!0),j(!1),B(1),b([]),te.resetFields()},ae=[{title:"",dataIndex:"id",width:280,render:function(e,t){return p.a.createElement(V.a,{disabled:!(t.works_count>1),value:String(t.id)},t.name)}},{title:"有效作品数",dataIndex:"works_count"},{title:"上次查重时间",dataIndex:"last_review_time",width:130}];return p.a.createElement(c.a,{centered:!0,title:"代码查重",keyboard:!1,maskClosable:!1,visible:q,okText:"确认",cancelText:"取消",width:820,bodyStyle:{minHeight:200},onOk:Object(l.a)(d.a.mark((function e(){var t;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=te.getFieldValue(),e.next=3,Object(ne.a)("/api/homework_commons/".concat(o.categoryId,"/homework_code_repeat.json"),{method:"post",body:{group_ids:Object(w.a)(t.group_ids)}});case 3:if(0!==e.sent.status){e.next=11;break}return ie(),s.b.success("操作成功"),e.next=9,a({type:"shixunHomeworks/getWorkList",payload:n.actionTabs.params});case 9:v.d.push("/classrooms/".concat(o.coursesId,"/shixun_homework/").concat(o.categoryId,"/detail?tabs=2")),a({type:"shixunHomeworks/setActionTabs",payload:{key:"执行代码查重"}});case 11:case"end":return e.stop()}}),e)}))),onCancel:ie},n.codeReviewCourse&&p.a.createElement(K.a,{form:te,onChange:function(e){U(Object(T.a)({},te.getFieldValue()))},initialValues:(t={},Object(G.a)(t,"group_ids",[]),Object(G.a)(t,"end_time",R()(R()().add(7,"days").format("YYYY-MM-DD HH:mm"))),t)},p.a.createElement("div",{className:"flexd-table-header mt20"},p.a.createElement(r.a,{pagination:!1,dataSource:[],columns:ae})),p.a.createElement(K.a.Item,{name:"group_ids"},p.a.createElement(V.a.Group,{className:"w100"},p.a.createElement("div",{style:{width:"100%",maxHeight:260,overflow:"auto"}},p.a.createElement(Ie.a,{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){re()},hasMore:O,useWindow:!1},p.a.createElement(r.a,{loading:i.effects["shixunHomeworks/getCodeReviewCourse"],showHeader:!1,columns:ae,dataSource:y,pagination:!1})))))),p.a.createElement(C.a,null,p.a.createElement(E.a,{className:"ml10"},p.a.createElement(V.a,{checked:J,onChange:function(e){Z(e.target.checked);var t=[];e.target.checked&&(t=y.filter((function(e){return e.works_count>1})).map((function(e){return e.id+""}))),te.setFieldsValue(Object(G.a)({},"group_ids",t))}},"全选"))))})),Ne=n("R5GN"),Pe=n("rhHp"),Fe=n("Aocz"),Be=n.n(Fe),He=n("HBuW"),ze=n("NLgs"),Ue=[{live:"A",gz:"0个错误",ld:"0个漏洞",gf:"0 - 5%"},{live:"B",gz:"至少1个次要错误",ld:"至少1个次要漏洞",gf:"6% - 10%"},{live:"C",gz:"至少1个主要错误",ld:"至少1个主要漏洞",gf:"11% - 20%"},{live:"D",gz:"至少1个严重错误",ld:"至少1个严重漏洞",gf:"21% - 50%"},{live:"E",gz:"至少1个崩溃错误",ld:"至少1个崩溃漏洞",gf:"超过50%"}];t.default=Object(v.a)((function(e){var t=e.shixunHomeworks,n=e.loading;return{shixunHomeworks:t,globalSetting:e.globalSetting,loading:n.effects}}))((function(e){var t,n,h,v,x,w,k,C,E=e.shixunHomeworks,S=(e.globalSetting,e.loading,e.dispatch),T=Object(m.i)(),_=Object(m.h)(),O=(Object(m.g)(),Object(f.useState)([])),L=Object(u.a)(O,2),A=(L[0],L[1],Object(f.useState)(_.query.tabs||"0")),M=Object(u.a)(A,2),R=M[0],I=M[1],j=Object(f.useState)({}),N=Object(u.a)(j,2),P=N[0],H=N[1],z=E.workList,U=Object(f.useState)(!1),V=Object(u.a)(U,2),W=V[0],G=V[1];T.category=_.query.category_id,T.order="work_score",T.b_order="desc";var K=function e(t){var n,r;t=null!==(n=t)&&void 0!==n&&n.includes(".json")?t:"".concat(t,".json"),c.a.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:p.a.createElement("div",{className:"tc font16"},"实训已经更新了,正在为您重置!"),onOk:(r=Object(l.a)(d.a.mark((function n(){var r,i;return d.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(He.Ab)({url:t});case 2:if(r=n.sent){n.next=5;break}return n.abrupt("return");case 5:return s.b.success("重置成功,正在进入实训!"),n.next=8,Object(He.D)({id:r.shixun_identifier});case 8:if(null==(i=n.sent)||!i.game_identifier){n.next=12;break}return Object(b.O)("/tasks/".concat(i.game_identifier,"?coursesId=").concat(T.coursesId)),n.abrupt("return");case 12:2===(null==i?void 0:i.status)?e(null==i?void 0:i.message):3===(null==i?void 0:i.status)&&Y(null==i?void 0:i.message);case 13:case"end":return n.stop()}}),n)}))),function(){return r.apply(this,arguments)})})},Y=function(e){c.a.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:p.a.createElement("div",{className:"tc font16"},"目前该实践项目尚在内测中,将于",e,"之后开放,谢谢!")})},q=function(){var e=Object(l.a)(d.a.mark((function e(t){var n,r;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=null!==(n=t)&&void 0!==n&&n.includes(".json")?t:"".concat(t,".json"),e.next=3,Object(He.Ab)({url:t});case 3:if(r=e.sent,console.log(r,"execRes"),null==r||!r.game_identifier){e.next=8;break}return Object(b.O)("/tasks/".concat(r.game_identifier,"?coursesId=").concat(T.coursesId)),e.abrupt("return");case 8:-3===(null==r?void 0:r.status)?Object(b.o)():2===(null==r?void 0:r.status)?K(null==r?void 0:r.message):3===(null==r?void 0:r.status)&&Y(null==r?void 0:r.message);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),X=[{name:"作业列表",id:"0",compontent:p.a.createElement(ce,{setExportParams:H}),forceRender:!0},{name:"作业描述",id:"1",compontent:p.a.createElement(B,null)},{name:"代码查重",id:"2",compontent:p.a.createElement(he,null)},{name:"质量检测",id:"4",compontent:p.a.createElement(Me,null)},{name:Object(F.c)()?"设置":"得分规则",id:"3",compontent:p.a.createElement(Se,null)}].filter((function(e){var t,n;return Object(F.s)()?"代码查重"!==e.name:Object(F.s)()||"已截止"!==(null==z||null===(t=z.homework_status)||void 0===t?void 0:t[0])?"质量检测"!==e.name:!z.code_review&&"未发布"!==(null==z||null===(n=z.homework_status)||void 0===n?void 0:n[0])||"代码查重"!==e.name})).filter((function(e){return!!z.open_code_quality_analysis||"质量检测"!==e.name}));return p.a.createElement("section",null,p.a.createElement("div",{className:"edu-container"},z.homework_name&&p.a.createElement("section",{className:"animated fadeIn"},p.a.createElement("aside",{className:"mt10"},z.category&&p.a.createElement(o.a,{separator:">"},p.a.createElement(o.a.Item,null,p.a.createElement(g.a,{to:"/classrooms/".concat(z.course_id,"/shixun_homework")},z.course_name)),p.a.createElement(o.a.Item,null,p.a.createElement(g.a,{to:"/classrooms/".concat(z.course_id,"/shixun_homework/").concat(z.category.main?"":z.category.category_id)},z.category.category_name)),p.a.createElement(o.a.Item,null,"作业详情"))),p.a.createElement("aside",{className:[Be.a.title,"mt20"].join(" ")},p.a.createElement(g.a,{to:"/classrooms/".concat(z.course_id,"/shixun_homework/").concat(z.category.main?"":z.category.category_id)},p.a.createElement(y.a,{className:"font16 c-black"})),p.a.createElement(a.a,{title:z.homework_name,placement:"bottom"},p.a.createElement("strong",{className:"font20 ml5"},z.homework_name)),p.a.createElement(b.k,{temporary:!0,status:z.homework_status}),"4"===R&&p.a.createElement("span",{className:"iconfont icon-a-wenhaobeifen2",onClick:function(){G(!0)},style:{fontWeight:800,color:"#0152d9",textAlign:"end",flex:1,cursor:"pointer"}},"规则说明"))),p.a.createElement("aside",{className:"mt30 relative"},p.a.createElement("aside",{className:Be.a.rightMenu},Object(F.s)()&&(null===(t=E.workList)||void 0===t?void 0:t.redo_work)&&p.a.createElement("p",{onClick:function(){var e;c.a.confirm({centered:!0,width:530,title:"提示",okText:"确定",cancelText:"取消",content:p.a.createElement("div",{className:"tc font16"},"你在该实训的学习记录将被清空,无法恢复",p.a.createElement("br",null),"是否确认重做?"),onOk:(e=Object(l.a)(d.a.mark((function e(){var t,n;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null===(t=E.workList)||void 0===t?void 0:t.myshixun_identifier,e.next=3,Object(D.T)({id:n});case 3:e.sent&&(s.b.info("已清空本实训的学习记录\n\n请点击“开启挑战”重做课程实验"),S({type:"shixunHomeworks/getWorkList",payload:P}));case 5:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})}},p.a.createElement("span",{className:"iconfont icon-dahuizhongzuo3x"}),"重做"),(null===(n=E.workList)||void 0===n?void 0:n.shixun_status)>1&&(null===(h=E.workList)||void 0===h?void 0:h.time_status)<5&&Object(F.s)()&&p.a.createElement("p",{onClick:function(){var e,t,n,r,i,a,o;Object(ze.e)(S,!0)&&(null!==(e=E.workList)&&void 0!==e&&null!==(t=e.task_operation)&&void 0!==t&&null!==(n=t[1])&&void 0!==n&&n.includes("/")?q(null===(r=E.workList)||void 0===r||null===(i=r.task_operation)||void 0===i?void 0:i[1]):Object(b.O)("/tasks/".concat(null===(a=E.workList)||void 0===a||null===(o=a.task_operation)||void 0===o?void 0:o[1])))}},p.a.createElement("span",{className:"iconfont icon-kaiqizhong"}),null===(v=E.workList)||void 0===v||null===(x=v.task_operation)||void 0===x?void 0:x[0]),(null===(w=E.workList)||void 0===w?void 0:w.commit_des)&&p.a.createElement("p",{onClick:function(){var e;Object(b.O)("/classrooms/".concat(T.coursesId,"/shixun_homework/").concat(T.categoryId,"/").concat(null===(e=E.workList)||void 0===e?void 0:e.id,"/commitsummary"))}},p.a.createElement("span",{className:"iconfont icon-tijiaozongjie"}),null===(k=E.workList)||void 0===k?void 0:k.commit_des),"1"==R&&Object(F.c)()&&p.a.createElement("p",{onClick:function(){S({type:"shixunHomeworks/setActionTabs",payload:{key:"编辑作业"}})}},p.a.createElement("span",{className:"iconfont icon-bianjishijuan3x translateY1"}),"编辑作业"),Object(F.c)()&&z.publish_immediately&&p.a.createElement("p",{onClick:function(){S({type:"classroomList/setActionTabs",payload:{key:"立即发布",selectArrs:[T.categoryId],params:T,detail:!0,type:2}})}},p.a.createElement("span",{className:"iconfont icon-yishezhifabushijian1 translateY1"}),"立即发布"),(null===(C=E.workList)||void 0===C?void 0:C.is_enter_shixun)&&p.a.createElement("p",{onClick:function(){Object(b.O)("/shixuns/".concat(z.shixun_identifier,"/challenges"))}},p.a.createElement("span",{className:"iconfont icon-shixun3 translateY1"}),"进入实训"),Object(F.c)()&&z.end_immediately&&(null==z?void 0:z.can_end)&&p.a.createElement("p",{style:{background:"#0152d9",color:"#fff"},onClick:function(){S({type:"classroomList/setActionTabs",payload:{key:"立即截止",params:T,type:2,detail:!0,selectArrs:[T.categoryId]}})}},p.a.createElement("span",{style:{color:"#fff"},className:"iconfont icon-jiezhishiyan"}),"立即截止")),p.a.createElement(i.a,{defaultActiveKey:R,activeKey:R,onChange:function(e){I(e),"0"===e&&S({type:"shixunHomeworks/getWorkList",payload:P})},className:Be.a.menuTabs},X.map((function(e,t){return p.a.createElement(i.a.TabPane,{tab:e.name,key:e.id,forceRender:e.forceRender},e.compontent)}))))),p.a.createElement(je,null),p.a.createElement(Ne.a,null),p.a.createElement(Pe.a,null),p.a.createElement(c.a,{visible:W,title:"规则说明",width:800,footer:null,onCancel:function(){G(!1)}},p.a.createElement("p",null,"一、等级规则"),p.a.createElement("p",{style:{marginLeft:"10px"}},"1. 缺陷等级"),p.a.createElement("p",{style:{marginLeft:"10px"}},p.a.createElement(r.a,{dataSource:Ue,columns:[{title:"等级",dataIndex:"live"},{title:"缺陷评估规则",dataIndex:"gz"},{title:"漏洞评估规则",dataIndex:"ld"},{title:"代码规范评估规则",dataIndex:"gf"}],pagination:!1})),p.a.createElement("p",{style:{marginLeft:"10px"}},"注:代码规范评估规则中数值来源为计算技术债务时间占开发所有代码所需要的时间的比例(Technical Debt Ratio)"),p.a.createElement("p",{style:{marginLeft:"20px"}},"Technical Debt Ratio = 技术债务时间 / 开发时间"),p.a.createElement("p",{style:{marginLeft:"20px"}},"技术债务时间为修复所有问题所需要的时间。"),p.a.createElement("p",null,"二、复杂度规则"),p.a.createElement("p",{style:{marginLeft:"10px"}},"根据代码路径数计算的数值,每当一个函数的控制流分叉时,复杂度计数器就会自增一。"),p.a.createElement("p",{style:{marginLeft:"10px"}},"每个程序语言的关键字对应的复杂度数据不同,但每个函数的最小复杂度为1。(特定语言的详细数据略)"),p.a.createElement("p",null,"三、代码质量分规则"),p.a.createElement("p",{style:{marginLeft:"10px"}},"代码质量分 = 0.5*缺陷分数 + 0.3*漏洞分数 + 0.2*代码规范性分数"),p.a.createElement("p",{style:{marginLeft:"10px"}},"其中:"),p.a.createElement("p",{style:{marginLeft:"10px"}},"缺陷/漏洞/代码规范性分数计算规则为:100 - 100 *((100*崩溃数 + 5*严重数 + 3*主要数 + 1*次数)/ 代码行数)"),p.a.createElement("p",{style:{marginLeft:"10px"}},"注:分数为空的代表不支持的文件格式。")))}))},VpOo: +/*!**************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/helper/roundRect.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){t.buildPath=function(e,t){var n,r,i,a,o,s=t.x,l=t.y,c=t.width,u=t.height,h=t.r;c<0&&(s+=c,c=-c),u<0&&(l+=u,u=-u),"number"==typeof h?n=r=i=a=h:h instanceof Array?1===h.length?n=r=i=a=h[0]:2===h.length?(n=i=h[0],r=a=h[1]):3===h.length?(n=h[0],r=a=h[1],i=h[2]):(n=h[0],r=h[1],i=h[2],a=h[3]):n=r=i=a=0,n+r>c&&(n*=c/(o=n+r),r*=c/o),i+a>c&&(i*=c/(o=i+a),a*=c/o),r+i>u&&(r*=u/(o=r+i),i*=u/o),n+a>u&&(n*=u/(o=n+a),a*=u/o),e.moveTo(s+n,l),e.lineTo(s+c-r,l),0!==r&&e.arc(s+c-r,l+r,r,-Math.PI/2,0),e.lineTo(s+c,l+u-i),0!==i&&e.arc(s+c-i,l+u-i,i,0,Math.PI/2),e.lineTo(s+a,l+u),0!==a&&e.arc(s+a,l+u-a,a,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}},"VrN/": +/*!***************************************************!*\ + !*** ./node_modules/codemirror/lib/codemirror.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),l=!a&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!a&&/Chrome\//.test(e),h=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),m=!a&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),w=h&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var k=y&&(c||h&&(null==w||w<12.11)),C=n||o&&s>=9;function E(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,T=function(e,t){var n=e.className,r=E(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function _(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return _(e).appendChild(t)}function L(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a=t)return o+(t-a);o+=s-a,o+=n-o%n,a=s+1}}m?j=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(j=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=N(this.onTimeout,this)};function H(e,t){for(var n=0;n=t)return r+Math.min(o,t-i);if(i+=a-r,r=a+1,(i+=n-i%n)>=t)return r}}var K=[""];function Y(e){for(;K.length<=e;)K.push(q(K)+" ");return K[e]}function q(e){return e[e.length-1]}function X(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Z(e))||t.test(e):Z(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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 re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}var oe=null;function se(e,t,n){var r;oe=null;for(var i=0;it)return i;a.to==t&&(a.from!=a.to&&"before"==n?r=i:oe=i),a.from==t&&(a.from!=a.to&&"before"!=n?r=i:oe=i)}return null!=r?r:oe}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function a(e,t,n){this.level=e,this.from=t,this.to=n}return function(o,s){var l="ltr"==s?"L":"R";if(0==o.length||"ltr"==s&&!e.test(o))return!1;for(var c,u=o.length,h=[],d=0;d-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function pe(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function ye(e){e.prototype.on=function(e,t){he(this,e,t)},e.prototype.off=function(e,t){fe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ke(e){be(e),xe(e)}function Ce(e){return e.target||e.srcElement}function Ee(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Se,Te,_e=function(){if(o&&s<9)return!1;var e=L("div");return"draggable"in e||"dragDrop"in e}();function Oe(e){if(null==Se){var t=L("span","​");O(e,L("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=Se?L("span","​"):L("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Le(e){if(null!=Te)return Te;var t=O(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return _(e),!(!n||n.left==n.right)&&(Te=r.right-n.right<3)}var Ae,De=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var a=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),o=a.indexOf("\r");-1!=o?(n.push(a.slice(0,o)),t+=o+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Me=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re="oncopy"in(Ae=L("div"))||(Ae.setAttribute("oncopy","return;"),"function"==typeof Ae.oncopy),Ie=null,je={},Ne={};function Pe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function Fe(e){if("string"==typeof e&&Ne.hasOwnProperty(e))e=Ne[e];else if(e&&"string"==typeof e.name&&Ne.hasOwnProperty(e.name)){var t=Ne[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Fe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Fe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=Fe(t);var n=je[t.name];if(!n)return Be(e,"text/plain");var r=n(e,t);if(He.hasOwnProperty(t.name)){var i=He[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var He={};function ze(e,t){P(t,He.hasOwnProperty(e)?He[e]:He[e]={})}function Ue(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ve(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function We(e,t,n){return!e.startState||e.startState(t,n)}var Ge=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ke(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t=e.first&&tn?et(n,Ke(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ke(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r=this.string.length},Ge.prototype.sol=function(){return this.pos==this.lineStart},Ge.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ge.prototype.next=function(){if(this.post},Ge.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ge.prototype.skipToEnd=function(){this.pos=this.string.length},Ge.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ge.prototype.backUp=function(e){this.pos-=e},Ge.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ge.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ge.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ge.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ge.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ht(e,t,n,r){var i=[e.state.modeGen],a={};xt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),a,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,xt(e,t.text,s.mode,n,(function(e,t){for(var n=l;ce&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Ue(e.doc.mode,r.state),a=ht(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ft(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ut(r,!0,t);var a=function(e,t,n){for(var r,i,a=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var l=Ke(a,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=a.modeFrontier))return s;var u=F(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),o=a>r.first&&Ke(r,a-1).stateAfter,s=o?ut.fromSaved(r,o,a):new ut(r,We(r.mode),a);return r.iter(a,t,(function(n){pt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,Ue(e.mode,t.state),n,t.lookAhead):new ut(e,Ue(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?Ue(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,a,o=e.doc,s=o.mode,l=Ke(o,(t=st(o,t)).line),c=ft(e,t.line,n),u=new Ge(l.text,e.options.tabSize,c);for(r&&(a=[]);(r||u.pose.options.maxHighlightLength?(s=!1,o&&pt(e,t,r,h.pos),h.pos=t.length,l=null):l=bt(gt(n,h,r.state,d),a),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c=t:a.to>t);(r||(r=[])).push(new Ct(o,a.from,s?null:a.to))}}return r}(n,i,o),l=function(e,t,n){var r;if(e)for(var i=0;i=t:a.to>t)||a.from==t&&"bookmark"==o.type&&(!n||a.marker.insertLeft)){var s=null==a.from||(o.inclusiveLeft?a.from<=t:a.from0&&s)for(var b=0;bt)&&(!n||Mt(n,a.marker)<0)&&(n=a.marker)}return n}function Pt(e,t,n,r,i){var a=Ke(e,t),o=kt&&a.markedSpans;if(o)for(var s=0;s=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Ft(e){for(var t;t=It(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var n=Ke(e,t),r=Ft(n);return n==r?t:$e(r)}function Ht(e,t){if(t>e.lastLine())return t;var n,r=Ke(e,t);if(!zt(e,r))return t;for(;n=jt(r);)r=n.find(1,!0).line;return $e(r)+1}function zt(e,t){var n=kt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Kt=function(e,t,n){this.text=e,Lt(this,t),this.height=n?n(this):1};function Yt(e){e.parent=null,Ot(e)}Kt.prototype.lineNo=function(){return $e(this)},ye(Kt);var qt={},Xt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Xt:qt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Qt(e,t){var n=A("span",null,null,l?"padding-right: .1px":null),r={pre:A("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=Zt,Le(e.display.measure)&&(o=ce(a,e.doc.direction))&&(r.addToken=en(r.addToken,o)),r.map=[],nn(a,r,dt(e,a,t!=e.display.externalMeasured&&$e(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=I(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=I(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Oe(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=I(r.pre.className,r.textClass||"")),r}function Jt(e){var t=L("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,n,r,i,a,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&h.from<=c);d++);if(h.to>=u)return e(n,r,i,a,o,s,l);e(n,r.slice(0,h.to-c),i,a,null,s,l),a=null,r=r.slice(h.to-c),c=h.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(r)for(var o,s,l,c,u,h,d,f=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=u=s="",d=null,h=null,v=1/0;for(var y=[],b=void 0,x=0;xp||k.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,c=""),k.className&&(l+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&w.from==p&&(u+=" "+k.startStyle),k.endStyle&&w.to==v&&(b||(b=[])).push(k.endStyle,w.to),k.title&&((d||(d={})).title=k.title),k.attributes)for(var C in k.attributes)(d||(d={}))[C]=k.attributes[C];k.collapsed&&(!h||Mt(h.marker,k)<0)&&(h=w)}else w.from>p&&v>w.from&&(v=w.from)}if(b)for(var E=0;E=f)break;for(var T=Math.min(f,v);;){if(g){var _=p+g.length;if(!h){var O=_>T?g.slice(0,T-p):g;t.addToken(t,O,o?o+l:l,u,p+O.length==v?c:"",s,d)}if(_>=T){g=g.slice(T-p),p=T;break}p=_,u=""}g=i.slice(a,a=n[m++]),o=$t(n[m++],t.cm.options)}}else for(var L=1;Ln)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function An(e,t,n,r){return Rn(e,Mn(e,t),n,r)}function Dn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&a.push((l.bottom+c.top)/2-n.top)}}a.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(a=function(e,t,n,r){var i,a=Nn(t.map,n,r),l=a.node,c=a.start,u=a.end,h=a.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&re(t.line.text.charAt(a.coverStart+c));)--c;for(;a.coverStart+u1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var f;c>0&&(h=r="right"),i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+ir(e.display),top:p.top,bottom:p.bottom}:jn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;bt)&&(i=(a=l-s)-1,t>=l&&(o="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],o="left";if("right"==n&&i==l-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function Fn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return o("before"==c?l-1:l,"before"==c);function u(e,t,n){return o(n?e-1:e,1==s[t].level!=n)}var h=se(s,l,c),d=oe,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function qn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ke(e.doc,t.line),i=Vt(r)+Cn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Xn(e,t,n,r,i){var a=et(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function $n(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Xn(r.first,0,null,-1,-1);var i=Qe(r,n),a=r.first+r.size-1;if(i>a)return Xn(r.first+r.size-1,Ke(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=Ke(r,i);;){var s=er(e,o,i,t,n),l=Nt(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;o=Ke(r,i=c.line)}}function Qn(e,t,n,r){r-=Vn(t);var i=t.text.length,a=ae((function(t){return Rn(e,n,t-1).bottom<=r}),i,0);return{begin:a,end:i=ae((function(t){return Rn(e,n,t).top>r}),a,i)}}function Jn(e,t,n,r){return n||(n=Mn(e,t)),Qn(e,t,n,Wn(e,t,Rn(e,n,r),"line").top)}function Zn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Vt(t);var a=Mn(e,t),o=Vn(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var h=(e.options.lineWrapping?nr:tr)(e,t,n,a,u,r,i);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,m=null,g=ae((function(t){var n=Rn(e,a,t);return n.top+=o,n.bottom+=o,!!Zn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left=x.bottom?1:0}return Xn(n,g=ie(t.text,g,1),f,v,r-d)}function tr(e,t,n,r,i,a,o){var s=ae((function(s){var l=i[s],c=1!=l.level;return Zn(Yn(e,et(n,c?l.to:l.from,c?"before":"after"),"line",t,r),a,o,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Yn(e,et(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Zn(u,a,o,!0)&&u.top>o&&(l=i[s-1])}return l}function nr(e,t,n,r,i,a,o){var s=Qn(e,t,r,o),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=Rn(e,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,m=pm)&&(u=f,h=m)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==In){In=L("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)In.appendChild(document.createTextNode("x")),In.appendChild(L("br"));In.appendChild(document.createTextNode("x"))}O(e.measure,In);var n=In.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),_(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=L("span","xxxxxxxxxx"),n=L("pre",[t],"CodeMirror-line-like");O(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ar(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:or(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function or(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(zt(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o0&&(l=Ke(e.doc,c.line).text).length==c.ch){var u=F(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((a-Sn(e.display).left)/ir(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)kt&&Bt(e.doc,t)i.viewFrom?fr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)fr(e);else if(t<=i.viewFrom){var a=pr(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):fr(e)}else if(n>=i.viewTo){var o=pr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):fr(e)}else{var s=pr(e,t,t,-1),l=pr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(an(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):fr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var a=r.view[ur(e,t)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==H(o,n)&&o.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,a=ur(e,t),o=e.display.view;if(!kt||n==e.doc.first+e.doc.size)return{index:a,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(a==o.length-1)return null;i=s+o[a].size-t,a++}else i=s-t;t+=i,n+=i}for(;Bt(e.doc,n)!=n;){if(a==(r<0?0:o.length-1))return null;n+=r*o[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:n}}function mr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().linet||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),1==o.level?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?d:r,(function(e,t,i,h){var g="ltr"==i,v=f(e,g?"left":"right"),y=f(t-1,g?"right":"left"),b=null==n&&0==e,x=null==r&&t==d,w=0==h,k=!m||h==m.length-1;if(y.top-v.top<=3){var C=(c?x:b)&&k,E=(c?b:x)&&w?s:(g?v:y).left,S=C?l:(g?y:v).right;u(E,v.top,S-E,v.bottom)}else{var T,_,O,L;g?(T=c&&b&&w?s:v.left,_=c?l:p(e,i,"before"),O=c?s:p(t,i,"after"),L=c&&x&&k?l:y.right):(T=c?p(e,i,"before"):s,_=!c&&b&&w?l:v.right,O=!c&&x&&k?s:y.left,L=c?p(t,i,"after"):l),u(T,v.top,_-T,v.bottom),v.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Sr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function kr(e){e.state.focused||(e.display.input.focus(),Er(e))}function Cr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Sr(e))}),100)}function Er(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(pe(e,"focus",e,t),e.state.focused=!0,R(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),wr(e))}function Sr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Tr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||d<-.005)&&(Xe(i.line,l),_r(i.line),i.rest))for(var f=0;fe.display.sizerWidth){var p=Math.ceil(c/ir(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function _r(e){if(e.widgets)for(var t=0;t=o&&(a=Qe(t,Vt(Ke(t,l))-e.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function Lr(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,a=On(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+En(n),l=t.tops-r;if(t.topi+a){var u=Math.min(t.top,(c?s:t.bottom)-a);u!=i&&(o.scrollTop=u)}var h=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-h,f=_n(e)-n.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?o.scrollLeft=0:t.leftf+d-3&&(o.scrollLeft=t.right+(p?0:10)-f),o}function Ar(e,t){null!=t&&(Rr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Dr(e){Rr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Mr(e,t,n){null==t&&null==n||Rr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Rr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Ir(e,qn(e,t.from),qn(e,t.to),t.margin))}function Ir(e,t,n,r){var i=Lr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Mr(e,i.scrollLeft,i.scrollTop)}function jr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||li(e,{top:t}),Nr(e,t,!0),n&&li(e),ri(e,100))}function Nr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Pr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,hi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+En(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Tn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Br=function(e,t,n){this.cm=n;var r=this.vert=L("div",[L("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=L("div",[L("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),he(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),he(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Br.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var e=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Br.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Br.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Hr=function(){};function zr(e,t){t||(t=Fr(e));var n=e.display.barWidth,r=e.display.barHeight;Ur(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Tr(e),Ur(e,Fr(e)),n=e.display.barWidth,r=e.display.barHeight}function Ur(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Hr.prototype.update=function(){return{bottom:0,right:0}},Hr.prototype.setScrollLeft=function(){},Hr.prototype.setScrollTop=function(){},Hr.prototype.clear=function(){};var Vr={native:Br,null:Hr};function Wr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Vr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),he(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Pr(e,t):jr(e,t)}),e),e.display.scrollbars.addClass&&R(e.display.wrapper,e.display.scrollbars.addClass)}var Gr=0;function Kr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++Gr},t=e.curOp,on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}function Yr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ai(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Xr(e){e.updatedDisplay=e.mustUpdate&&oi(e.cm,e.update)}function $r(e){var t=e.cm,n=t.display;e.updatedDisplay&&Tr(t),e.barMeasure=Fr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=An(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Tn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-_n(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Qr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var a=L("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Cn(e.display))+"px;\n height: "+(t.bottom-t.top+Tn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=Yn(e,t),l=n&&n!=t?Yn(e,n):s,c=Lr(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=c.scrollTop&&(jr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(Pr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(o=!0)),!o)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var o=0;o=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ft(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(a){if(r.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?Ue(t.mode,r.state):null,l=ht(e,a,r,!0);s&&(r.state=s),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var h=!o||o.length!=a.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&dn)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Zr(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;di(e)&&(fr(e),t.dims=ar(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFromo&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),kt&&(a=Bt(e.doc,a),o=Ht(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=an(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=an(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n}(e,a,o),n.viewOffset=Vt(Ke(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=mr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=M();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,h=0;h-1&&(f=!1),un(e,d,u,n)),f&&(_(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Ze(e.options,u)))),o=d.node.nextSibling}else{var p=vn(e,d,u,n);a.insertBefore(p,o)}u+=d.size}for(;o;)o=s(o)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=M()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),_(n.cursorDiv),_(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=_n(e))r&&(t.visible=Or(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+En(e.display)-On(e),n.top)}),t.visible=Or(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!oi(e,t))break;Tr(e);var i=Fr(e);gr(e),zr(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var n=new ai(e,t);if(oi(e,n)){Tr(e),si(e,n);var r=Fr(e);gr(e),zr(e,r),ui(e,r),n.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Tn(e)+"px"}function hi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=or(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",o=0;os.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||a&&u){if(a&&y&&l)e:for(var d=t.target,f=o.view;d!=s;d=d.parentNode)for(var p=0;p=0&&tt(e,r.to())<=0)return n}return-1};var Ci=function(e,t){this.anchor=e,this.head=t};function Ei(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=H(t,i);for(var a=1;a0:l>=0){var c=at(s.from(),o.from()),u=it(s.to(),o.to()),h=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,t.splice(--a,2,new Ci(h?u:c,h?c:u))}}return new ki(t,n)}function Si(e,t){return new ki([new Ci(e,t||e)],0)}function Ti(e){return e.text?et(e.from.line+e.text.length-1,q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function _i(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Ti(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ti(t).ch-t.to.ch),et(n,r)}function Oi(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Ii(e,t,n){!function e(r,i,a){if(r.linked)for(var o=0;os-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(a=function(e,t){return t?(Bi(e.done),q(e.done)):e.done.length&&!q(e.done).ranges?q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),q(e.done)):void 0}(i,i.lastOp==r)))o=q(a.changes),0==tt(t.from,t.to)&&0==tt(t.from,o.to)?o.to=Ti(t):a.changes.push(Fi(e,t));else{var l=q(i.done);for(l&&l.ranges||Ui(e.sel,i.done),a={changes:[Fi(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,o||pe(e,"historyAdded")}function zi(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,a,q(i.done),t))?i.done[i.done.length-1]=t:Ui(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function Ui(e,t){var n=q(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Vi(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=n.markedSpans),++a}))}function Wi(e){if(!e)return null;for(var t,n=0;n-1&&(q(s)[h]=c[h],delete c[h])}}}return r}function Yi(e,t,n,r){if(r){var i=e.anchor;if(n){var a=tt(t,i)<0;a!=tt(n,i)<0?(i=t,t=n):a!=tt(t,n)<0&&(t=n)}return new Ci(i,t)}return new Ci(n||t,t)}function qi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Zi(e,new ki([Yi(e.sel.primary(),t,n,i)],0),r)}function Xi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:s.to>t.ch))){if(i&&(pe(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!l.atomic)continue;if(n){var h=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(h=oa(e,h,-r,h&&h.line==t.line?a:null)),h&&h.line==t.line&&(d=tt(h,n))&&(r<0?d<0:d>0))return ia(e,h,t,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=oa(e,f,r,f.line==t.line?a:null)),f?ia(e,f,t,r,i):null}}return t}function aa(e,t,n,r,i){var a=r||1,o=ia(e,t,n,a,i)||!i&&ia(e,t,n,a,!0)||ia(e,t,n,-a,i)||!i&&ia(e,t,n,-a,!0);return o||(e.cantEdit=!0,et(e.first,0))}function oa(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ke(e,t.line)).text.length?t.line0)){var u=[l,1],h=tt(c.from,s.from),d=tt(c.to,s.to);(h<0||!o.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(d>0||!o.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)ua(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else ua(e,t)}}function ua(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Oi(e,t);Hi(e,t,n,e.cm?e.cm.curOp.id:NaN),fa(e,t,n,Tt(e,t));var r=[];Ii(e,(function(e,n){n||-1!=H(r,e.history)||(va(e.history,t),r.push(e.history)),fa(e,t,null,Tt(e,t))}))}}function ha(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,a=e.history,o=e.sel,s="undo"==t?a.done:a.undone,l="undo"==t?a.undone:a.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function da(e,t){if(0!=t&&(e.first+=t,e.sel=new ki(X(e.sel.ranges,(function(e){return new Ci(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){hr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linea&&(t={from:t.from,to:et(a,Ke(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ye(e,t.from,t.to),n||(n=Oi(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,s=!1,l=a.line;e.options.lineWrapping||(l=$e(Ft(Ke(r,a.line))),r.iter(l,o.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Ri(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,a.line+t.text.length,(function(e){var t=Wt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ke(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead1||!(this.children[0]instanceof ba))){var s=[];this.collapse(s),this.children=[new ba(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var o=i.lines.length%25+25,s=o;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=A("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Pt(e,t.line,t,n,a)||t.line!=n.line&&Pt(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");kt=!0}a.addToHistory&&Hi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(e){c&&a.collapsed&&!c.options.lineWrapping&&Ft(e)==c.display.maxLine&&(s=!0),a.collapsed&&l!=t.line&&Xe(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Ct(a,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),a.collapsed&&e.iter(t.line,n.line+1,(function(t){zt(e,t)&&Xe(t,0)})),a.clearOnEnter&&he(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Ca,a.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),a.collapsed)hr(c,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=t.line;u<=n.line;u++)dr(c,u,"text");a.atomic&&na(c.doc),ln(c,"markerAdded",c,a)}return a}Ea.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kr(e),ve(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;ae.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&hr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&na(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&Yr(e),this.parent&&this.parent.clear()}},Ea.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)ca(this,r[l]);s?Ji(this,s):this.cm&&Dr(this.cm)})),undo:ni((function(){ha(this,"undo")})),redo:ni((function(){ha(this,"redo")})),undoSelection:ni((function(){ha(this,"undo",!0)})),redoSelection:ni((function(){ha(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(a){var o=a.markedSpans;if(o)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=a,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var h=e.dataTransfer.getData("Text");if(h){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),ea(t.doc,Si(n,n)),d)for(var f=0;f=0;t--)pa(e.doc,"",r[t].from,r[t].to,"+delete");Dr(e)}))}function Qa(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ja(e,t,n){var r=Qa(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function Za(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var a=ce(n,t.doc.direction);if(a){var o,s=i<0?q(a):a[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Mn(t,n);o=i<0?n.text.length-1:0;var u=Rn(t,c,o).top;o=ae((function(e){return Rn(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,o),"before"==l&&(o=Qa(n,o,1))}else o=i<0?s.to:s.from;return new et(r,o,l)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}Ua.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"},Ua.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"},Ua.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"},Ua.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"]},Ua.default=y?Ua.macDefault:Ua.pcDefault;var eo={selectAll:sa,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),U)},killLine:function(e){return $a(e,(function(t){if(t.empty()){var n=Ke(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Ke(e.doc,i.line-1).text;o&&(i=new et(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),et(i.line-1,o.length-1),i,"+transpose"))}n.push(new Ci(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Zr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,a=!1,c=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,fe(i.wrapper.ownerDocument,"mouseup",c),fe(i.wrapper.ownerDocument,"mousemove",u),fe(i.scroller,"dragstart",h),fe(i.scroller,"drop",c),a||(be(t),r.addNew||qi(e.doc,n,null,null,r.extend),l&&!d||o&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){a=a||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return a=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),he(i.wrapper.ownerDocument,"mouseup",c),he(i.wrapper.ownerDocument,"mousemove",u),he(i.scroller,"dragstart",h),he(i.scroller,"drop",c),Cr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,a):function(e,t,n,r){var i=e.display,a=e.doc;be(t);var o,s,l=a.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=a.sel.contains(n),o=s>-1?c[s]:new Ci(n,n)):(o=a.sel.primary(),s=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new Ci(n,n)),n=cr(e,t,!0,!0),s=-1;else{var u=vo(e,n,r.unit);o=r.extend?Yi(o,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,Zi(a,Ei(e,c.concat([o]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Zi(a,Ei(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):$i(a,s,o,V):(s=0,Zi(a,new ki([o],0),V),l=a.sel);var h=n;function d(t){if(0!=tt(h,t))if(h=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=F(Ke(a,n.line).text,n.ch,c),d=F(Ke(a,t.line).text,t.ch,c),f=Math.min(u,d),p=Math.max(u,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ke(a,m).text,y=G(v,f,c);f==p?i.push(new Ci(et(m,y),et(m,y))):v.length>y&&i.push(new Ci(et(m,y),et(m,G(v,p,c))))}i.length||i.push(new Ci(n,n)),Zi(a,Ei(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=o,w=vo(e,t,r.unit),k=x.anchor;tt(w.anchor,k)>0?(b=w.head,k=at(x.from(),w.anchor)):(b=w.anchor,k=it(x.to(),w.head));var C=l.ranges.slice(0);C[s]=function(e,t){var n=t.anchor,r=t.head,i=Ke(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var a=ce(i);if(!a)return t;var o=se(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=o+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==a.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(a,r.ch,r.sticky),h=u-o||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=a[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,m=f?"after":"before";return n.ch==p&&n.sticky==m?t:new Ci(new et(n.line,p,m),r)}(e,new Ci(st(a,k),b)),Zi(a,Ei(e,C,s),V)}}var f=i.wrapper.getBoundingClientRect(),p=0;function m(t){e.state.selectingText=!1,p=1/0,t&&(be(t),i.input.focus()),fe(i.wrapper.ownerDocument,"mousemove",g),fe(i.wrapper.ownerDocument,"mouseup",v),a.history.lastSelOrigin=null}var g=ei(e,(function(t){0!==t.buttons&&Ee(t)?function t(n){var o=++p,s=cr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,h)){e.curOp.focus=M(),d(s);var l=Or(i,a);(s.line>=l.to||s.linef.bottom?20:0;c&&setTimeout(ei(e,(function(){p==o&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),v=ei(e,m);e.state.selectingText=v,he(i.wrapper.ownerDocument,"mousemove",g),he(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,a)}(t,r,a,e):Ce(e)==n.scroller&&be(e):2==i?(r&&qi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):Cr(t)))}}function vo(e,t,n){if("char"==n)return new Ci(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ci(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Ci(r.from,r.to)}function yo(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!ve(e,n))return we(t);a-=s.top-o.viewOffset;for(var l=0;l=i)return pe(e,n,e,Qe(e.doc,a),e.display.gutterSpecs[l].className,t),we(t)}}function bo(e,t){return yo(e,t,"gutterClick",!0)}function xo(e,t){kn(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&yo(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function wo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hn(e)}mo.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var ko={toString:function(){return"CodeMirror.Init"}},Co={},Eo={};function So(e,t,n){if(!t!=!(n&&n!=ko)){var r=e.display.dragFunctions,i=t?he:fe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function To(e){e.options.lineWrapping?(R(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),Gt(e)),lr(e),hr(e),Hn(e),setTimeout((function(){return zr(e)}),100)}function _o(e,t){var n=this;if(!(this instanceof _o))return new _o(e,t);this.options=t=t?P(t):{},P(Co,t,!1);var r=t.value;"string"==typeof r?r=new Aa(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new _o.inputStyles[t.inputStyle](this),a=this.display=new gi(e,r,i,t);for(var c in a.wrapper.CodeMirror=this,wo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wr(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 B,keySeq:null,specialChars:null},t.autofocus&&!v&&a.input.focus(),o&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;he(t.scroller,"mousedown",ei(e,go)),he(t.scroller,"dblclick",o&&s<11?ei(e,(function(t){if(!me(e,t)){var n=cr(e,t);if(n&&!bo(e,t)&&!kn(e.display,t)){be(t);var r=e.findWordAt(n);qi(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||be(t)}),he(t.scroller,"contextmenu",(function(t){return xo(e,t)})),he(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||xo(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function a(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}he(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!bo(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),he(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),he(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!kn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,s=e.coordsChar(t.activeTouch,"page");o=!r.prev||a(r,r.prev)?new Ci(s,s):!r.prev.prev||a(r,r.prev.prev)?e.findWordAt(s):new Ci(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),be(n)}i()})),he(t.scroller,"touchcancel",i),he(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(jr(e,t.scroller.scrollTop),Pr(e,t.scroller.scrollLeft,!0),pe(e,"scroll",e))})),he(t.scroller,"mousewheel",(function(t){return wi(e,t)})),he(t.scroller,"DOMMouseScroll",(function(t){return wi(e,t)})),he(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||ke(t)},over:function(t){me(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=L("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),O(e.display.dragCursor,r)}}(e,t),ke(t))},start:function(t){return function(e,t){if(o&&(!e.state.draggingText||+new Date-Da<100))ke(t);else if(!me(e,t)&&!kn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=L("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Ma),leave:function(t){me(e,t)||Ra(e)}};var l=t.input.getField();he(l,"keyup",(function(t){return uo.call(e,t)})),he(l,"keydown",ei(e,co)),he(l,"keypress",ei(e,ho)),he(l,"focus",(function(t){return Er(e,t)})),he(l,"blur",(function(t){return Sr(e,t)}))}(this),Na(),Kr(this),this.curOp.forceUpdate=!0,ji(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Er(n)}),20):Sr(this),Eo)Eo.hasOwnProperty(c)&&Eo[c](this,t[c],ko);di(this),t.finishInit&&t.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>a.first?F(Ke(a,t-1).text,null,o):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/o);f;--f)d+=o,h+="\t";if(do,l=De(t),c=null;if(s&&r.ranges.length>1)if(Ao&&Ao.text.join("\n")==t){if(r.ranges.length%Ao.text.length==0){c=[];for(var u=0;u=0;d--){var f=r.ranges[d],p=f.from(),m=f.to();f.empty()&&(n&&n>0?p=et(p.line,p.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ke(a,m.line).text.length,m.ch+q(l).length)):s&&Ao&&Ao.lineWise&&Ao.text.join("\n")==l.join("\n")&&(p=m=et(p.line,0)));var g={from:p,to:m,text:c?c[d%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};ca(e.doc,g),ln(e,"inputRead",e,g)}t&&!s&&Io(e,t),Dr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ro(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Zr(t,(function(){return Mo(t,n,0,null,"paste")})),!0}function Io(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s-1){o=Lo(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ke(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Lo(e,i.head.line,"smart"));o&&ln(e,"electricInput",e,i.head.line)}}}function jo(e){for(var t=[],n=[],r=0;r0?0:-1));o=isNaN(u)?null:new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else o=i?function(e,t,n,r){var i=ce(t,e.doc.direction);if(!i)return Ja(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=se(i,n.ch,n.sticky),o=i[a];if("ltr"==e.doc.direction&&o.level%2==0&&(r>0?o.to>n.ch:o.from=o.from&&d>=u.begin)){var f=h?"before":"after";return new et(n.line,d,f)}}var p=function(e,t,r){for(var a=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e0==(1!=o.level),c=s?r.begin:l(r.end,-1);if(o.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=p(r>0?0:i.length-1,r,c(g)))?null:m}(e.cm,s,t,n):Ja(s,t,n);if(null==o){if(a||(c=t.line+l)=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=Ke(e,c))))return!1;t=Za(i,e.cm,s,t.line,l)}else t=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=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var p=s.text.charAt(t.ch)||"\n",m=ee(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(u=m),n>0&&!c(!f))break}var g=aa(e,t,a,o,!0);return nt(a,g)&&(g.hitSide=!0),g}function Bo(e,t,n,r){var i,a,o=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(a=$n(e,s,i)).outside;){if(n<0?i<=0:i>=o.height){a.hitSide=!0;break}i+=5*n}return a}var Ho=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function zo(e,t){var n=Dn(e,t.line);if(!n||n.hidden)return null;var r=Ke(e.doc,t.line),i=Ln(n,r,t.line),a=ce(r,e.doc.direction),o="left";a&&(o=se(a,t.ch)%2?"right":"left");var s=Nn(i.map,t.ch,o);return s.offset="right"==s.collapse?s.end:s.start,s}function Uo(e,t){return t&&(e.bad=!0),e}function Vo(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Uo(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||a.line=t.display.viewFrom&&zo(t,i)||{node:l[0].measure.map[2],offset:0},u=a.liner.firstLine()&&(o=et(o.line-1,Ke(r.doc,o.line-1).length)),s.ch==Ke(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;o.line==i.viewFrom||0==(e=ur(r,o.line))?(t=$e(i.view[0].line),n=i.view[0].node):(t=$e(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=$e(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(e,t,n,r,i){var a="",o=!1,s=e.doc.lineSeparator(),l=!1;function c(){o&&(a+=s,l&&(a+=s),o=l=!1)}function u(e){e&&(c(),a+=e)}function h(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var a,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(et(r,0),et(i+1,0),(g=+d,function(e){return e.id==g}));return void(f.length&&(a=f[0].find(0))&&u(Ye(e.doc,a.from,a.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&c();for(var m=0;m1&&d.length>1;)if(q(h)==q(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),t++}for(var f=0,p=0,m=h[0],g=d[0],v=Math.min(m.length,g.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 w=et(t,f),k=et(l,d.length?q(d).length-p:0);return h.length>1||h[0]||tt(w,k)?(pa(r.doc,h,w,k,"+input"),!0):void 0},Ho.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ho.prototype.reset=function(){this.forceCompositionEnd()},Ho.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ho.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ho.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zr(this.cm,(function(){return hr(e.cm)}))},Ho.prototype.setUneditable=function(e){e.contentEditable="false"},Ho.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Mo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ho.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ho.prototype.onContextMenu=function(){},Ho.prototype.resetPosition=function(){},Ho.prototype.needsContentAttribute=!0;var Go=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};Go.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function a(e){if(!me(r,e)){if(r.somethingSelected())Do({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=jo(r);Do({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,U):(n.prevInput="",i.value=t.text.join("\n"),j(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),he(i,"input",(function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),he(i,"paste",(function(e){me(r,e)||Ro(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),he(i,"cut",a),he(i,"copy",a),he(e.scroller,"paste",(function(t){if(!kn(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var a=new Event("paste");a.clipboardData=t.clipboardData,i.dispatchEvent(a)}})),he(e.lineSpace,"selectstart",(function(t){kn(e,t)||be(t)})),he(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),he(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Go.prototype.createField=function(e){this.wrapper=Po(),this.textarea=this.wrapper.firstChild},Go.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Go.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=Yn(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},Go.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Go.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&j(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null))}},Go.prototype.getField=function(){return this.textarea},Go.prototype.supportsTouch=function(){return!1},Go.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||M()!=this.textarea))try{this.textarea.focus()}catch(e){}},Go.prototype.blur=function(){this.textarea.blur()},Go.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Go.prototype.receivedFocus=function(){this.slowPoll()},Go.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Go.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Go.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Me(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(8203!=a||r||(r="​"),8666==a)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Go.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Go.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},Go.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=cr(n,e),c=r.scroller.scrollTop;if(a&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(a)&&ei(n,Zi)(n.doc,Si(a),U);var u,d=i.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.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(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&s>=9&&g(),C){ke(e);var m=function(){fe(window,"mouseup",m),setTimeout(v,20)};he(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),a="​"+(e?i.value:"");i.value="⇚",i.value=a,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=d,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!o||o&&s<9)&&g();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ei(n,sa)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},Go.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Go.prototype.setUneditable=function(){},Go.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=ko&&i(e,t,n)}:i)}e.defineOption=n,e.Init=ko,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Ai(e)}),!0),n("indentUnit",2,Ai,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Di(e),Hn(e),hr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(-1==a)break;i=a+t.length,n.push(et(r,a))}r++}));for(var i=n.length-1;i>=0;i--)pa(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=ko&&e.refresh()})),n("specialCharPlaceholder",Jt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){wo(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Xa(t),i=n!=ko&&Xa(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,To,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=fi(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?or(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return zr(e)}),!0),n("scrollbarStyle","native",(function(e){Wr(e),zr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=fi(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Sr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,So),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Di,!0),n("addModeClass",!1,Di,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Di,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(_o),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),pe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Xa(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Lo(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Dr(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;l0&&$i(this.doc,r,new Ci(a,c[r].to()),U)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=dt(this,Ke(this.doc,e.line)),r=0,i=(n.length-1)/2,a=e.ch;if(0==a)t=n[2];else for(;;){var o=r+i>>1;if((o?n[2*o-1]:0)>=a)i=o;else{if(!(n[2*o+1]a&&(e=a,i=!0),r=Ke(this.doc,e)}else r=e;return Wn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Vt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a,o,s,l=this.display,c=(e=Yn(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.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||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(c=e.bottom),u+t.offsetWidth>d&&(u=d-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(a=this,o={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Lr(a,o)).scrollTop&&jr(a,s.scrollTop),null!=s.scrollLeft&&Pr(a,s.scrollLeft))},triggerOnKeyDown:ti(co),triggerOnKeyPress:ti(ho),triggerOnKeyUp:uo,triggerOnMouseDown:ti(go),execCommand:function(e){if(eo.hasOwnProperty(e))return eo[e].call(null,this)},triggerElectric:ti((function(e){Io(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=st(this.doc,e),o=0;o0&&o(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&lr(this),pe(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),ji(this,e),Hn(this),this.display.input.reset(),Mr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},ye(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,a){e.registerHelper(t,r,a),n[t]._global.push({pred:i,val:a})}}(_o);var Ko="iter insert remove copy getEditor constructor".split(" ");for(var Yo in Aa.prototype)Aa.prototype.hasOwnProperty(Yo)&&H(Ko,Yo)<0&&(_o.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Aa.prototype[Yo]));return ye(Aa),_o.inputStyles={textarea:Go,contenteditable:Ho},_o.defineMode=function(e){_o.defaults.mode||"null"==e||(_o.defaults.mode=e),Pe.apply(this,arguments)},_o.defineMIME=function(e,t){Ne[e]=t},_o.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),_o.defineMIME("text/plain","null"),_o.defineExtension=function(e,t){_o.prototype[e]=t},_o.defineDocExtension=function(e,t){Aa.prototype[e]=t},_o.fromTextArea=function(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=M();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(he(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(fe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=_o((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=fe,e.on=he,e.wheelEventPixels=xi,e.Doc=Aa,e.splitLines=De,e.countColumn=F,e.findColumn=G,e.isWordChar=Z,e.Pass=z,e.signal=pe,e.Line=Kt,e.changeEnd=Ti,e.scrollbarModel=Vr,e.Pos=et,e.cmpPos=tt,e.modes=je,e.mimeModes=Ne,e.resolveMode=Fe,e.getMode=Be,e.modeExtensions=He,e.extendMode=ze,e.copyState=Ue,e.startState=We,e.innerMode=Ve,e.commands=eo,e.keyMap=Ua,e.keyName=qa,e.isModifierKey=Ka,e.lookupKey=Ga,e.normalizeKeyMap=Wa,e.StringStream=Ge,e.SharedTextMarker=Ta,e.TextMarker=Ea,e.LineWidget=wa,e.e_preventDefault=be,e.e_stopPropagation=xe,e.e_stop=ke,e.addClass=R,e.contains=D,e.rmClass=T,e.keyNames=Fa}(_o),_o.version="5.58.2",_o}()},WaYH: +/*!*********************************************************!*\ + !*** ./node_modules/rc-tree/es/TreeNode.js + 1 modules ***! + \*********************************************************/ +/*! exports provided: InternalTreeNode, default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.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-tree/es/contextTypes.js because of ./node_modules/rc-tree/es/Tree.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/util.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.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"),i=n("Ff2n"),a=n("VTBJ"),o=n("1OyB"),s=n("vuIU"),l=n("JX7q"),c=n("Ji7U"),u=n("LK+K"),h=n("q1tI"),d=n("TSYQ"),f=n.n(d),p=n("sboe"),m=n("OZM5"),g=function(e){var t=e.prefixCls,n=e.level,i=e.isStart,a=e.isEnd;if(!n)return null;for(var o="".concat(t,"-indent-unit"),s=[],l=0;l1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&O[n])return O[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),a=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=_.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),l={sizingStyle:s,paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(O[n]=l),l}var A,D=n("Gytx"),M=n.n(D);!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(A||(A={}));var R=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,e)).nextFrameActionId=void 0,a.resizeFrameId=void 0,a.textArea=void 0,a.saveTextArea=function(e){a.textArea=e},a.handleResize=function(e){var t=a.state.resizeStatus,n=a.props,r=n.autoSize,i=n.onResize;t===A.NONE&&("function"==typeof i&&i(e),r&&a.resizeOnNextFrame())},a.resizeOnNextFrame=function(){cancelAnimationFrame(a.nextFrameActionId),a.nextFrameActionId=requestAnimationFrame(a.resizeTextarea)},a.resizeTextarea=function(){var e=a.props.autoSize;if(e&&a.textArea){var t=e.minRows,n=e.maxRows,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;w||((w=document.createElement("textarea")).setAttribute("tab-index","-1"),w.setAttribute("aria-hidden","true"),document.body.appendChild(w)),e.getAttribute("wrap")?w.setAttribute("wrap",e.getAttribute("wrap")):w.removeAttribute("wrap");var i=L(e,t),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,l=i.sizingStyle;w.setAttribute("style","".concat(l,";").concat(T)),w.value=e.value||e.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,d=w.scrollHeight;if("border-box"===s?d+=o:"content-box"===s&&(d-=a),null!==n||null!==r){w.value=" ";var f=w.scrollHeight-a;null!==n&&(u=f*n,"border-box"===s&&(u=u+a+o),d=Math.max(u,d)),null!==r&&(h=f*r,"border-box"===s&&(h=h+a+o),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(a.textArea,!1,t,n);a.setState({textareaStyles:r,resizeStatus:A.RESIZING},(function(){cancelAnimationFrame(a.resizeFrameId),a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:A.RESIZED},(function(){a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:A.NONE}),a.fixFirefoxAutoScroll()}))}))}))}))}},a.renderTextArea=function(){var e=a.props,t=e.prefixCls,n=void 0===t?"rc-textarea":t,i=e.autoSize,o=e.onResize,s=e.className,h=e.disabled,d=a.state,f=d.textareaStyles,p=d.resizeStatus,m=Object(C.a)(a.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),g=S()(n,s,Object(u.a)({},"".concat(n,"-disabled"),h));"value"in m&&(m.value=m.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},a.props.style),f),p===A.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(k,{onResize:a.handleResize,disabled:!(i||o)},l.createElement("textarea",Object(r.a)({},m,{className:g,style:v,ref:a.saveTextArea})))},a.state={textareaStyles:{},resizeStatus:A.NONE},a}return Object(a.a)(n,[{key:"componentDidUpdate",value:function(e){e.value===this.props.value&&M()(e.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 e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.textArea.setSelectionRange(e,t)}}catch(e){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(l.Component),I=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;Object(i.a)(this,n),(r=t.call(this,e)).resizableTextArea=void 0,r.focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(e){r.resizableTextArea=e},r.handleChange=function(e){var t=r.props.onChange;r.setValue(e.target.value,(function(){r.resizableTextArea.resizeTextarea()})),t&&t(e)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,i=t.onKeyDown;13===e.keyCode&&n&&n(e),i&&i(e)};var a=void 0===e.value||null===e.value?e.defaultValue:e.value;return r.state={value:a},r}return Object(a.a)(n,[{key:"setValue",value:function(e,t){"value"in this.props||this.setState({value:e},t)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(R,Object(r.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value}:null}}]),n}(l.Component);t.default=I},YH21: +/*!************************************************!*\ + !*** ./node_modules/zrender/lib/core/event.js ***! + \************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../mixin/Eventful */"H6uX");t.Dispatcher=r;var i=n(/*! ./env */"ItGF"),a=n(/*! ./dom */"Ze12"),o=a.isCanvasEl,s=a.transformCoordWithViewport,l="undefined"!=typeof window&&!!window.addEventListener,c=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,u=[];function h(e,t,n,r){return n=n||{},r||!i.canvasSupported?d(e,t,n):i.browser.firefox&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):d(e,t,n),n}function d(e,t,n){if(i.domSupported&&e.getBoundingClientRect){var r=t.clientX,a=t.clientY;if(o(e)){var l=e.getBoundingClientRect();return n.zrX=r-l.left,void(n.zrY=a-l.top)}if(s(u,e,r,a))return n.zrX=u[0],void(n.zrY=u[1])}n.zrX=n.zrY=0}function f(e){return e||window.event}var p=l?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0};t.clientToLocal=h,t.getNativeEvent=f,t.normalizeEvent=function(e,t,n){if(null!=(t=f(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];i&&h(e,i,t,n)}else h(e,t,t,n),t.zrDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3;var a=t.button;return null==t.which&&void 0!==a&&c.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t},t.addEventListener=function(e,t,n,r){l?e.addEventListener(t,n,r):e.attachEvent("on"+t,n)},t.removeEventListener=function(e,t,n,r){l?e.removeEventListener(t,n,r):e.detachEvent("on"+t,n)},t.stop=p,t.isMiddleOrRightButtonOnMouseUpDown=function(e){return 2===e.which||3===e.which},t.notLeftMouse=function(e){return e.which>1}},YgsL: +/*!*****************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/helper/smoothSpline.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../../core/vector */"QBsz").distance;function i(e,t,n,r,i,a,o){var s=.5*(n-e),l=.5*(r-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*a+s*i+t}e.exports=function(e,t){for(var n=e.length,a=[],o=0,s=1;sn-2?n-1:f+1],h=e[f>n-3?n-1:f+2]);var g=p*p,v=p*g;a.push([i(c[0],m[0],u[0],h[0],p,g,v),i(c[1],m[1],u[1],h[1],p,g,v)])}return a}},ZW9T: +/*!************************************************************!*\ + !*** ./src/components/monaco-editor/index.jsx + 1 modules ***! + \************************************************************/ +/*! exports provided: getLanguageByMirrorName, default, DiffEditor */ +/*! exports used: DiffEditor, default */ +/*! ModuleConcatenation bailout: Cannot concat with ./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/objectSpread2.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ +/*! 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(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n("k1fw"),i=(n("miYZ"),n("tsqr")),a=n("rAM+"),o=n("tJVT"),s=n("PpiC"),l=n("q1tI"),c=n.n(l),u=n("bdgK");function h(e,t,n,i,a){var o=t.getWordUntilPosition(n),s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=i.map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Keyword,insertText:t,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}));return a.map((function(e){l.push(Object(r.a)(Object(r.a)({},e),{},{range:s}))})),l}n("LvDl");function d(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}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 m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e;if(Array.isArray(e)){for(var n=0;n0||r.target.offsetWidth>0)&&G.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(W.current),e}();return J(!0),function(){var e=G.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),G.current.subscription&&G.current.subscription.dispose(),j&&window.removeEventListener("paste",ee),n.unobserve(W.current)}}catch(e){}}))}),[]),Object(l.useEffect)((function(){if(G.current.instance&&Q)return document.addEventListener("keydown",te,!1),function(){document.removeEventListener("keydown",te)}}),[D,Q]),Object(l.useEffect)((function(){var e=G.current.instance;if(e&&Q){var t=m(w);g.editor.setModelLanguage(e.getModel(),t),console.log("language:",w,e.getModel(),t)}}),[w,Q]),Object(l.useEffect)((function(){G.current.instance&&Q&&g.editor.setTheme(L)}),[L,Q]),Object(l.useEffect)((function(){var e=G.current.instance;e&&Q&&(e.updateOptions(Object(r.a)({},S)),setTimeout((function(){e.getModel().updateOptions(Object(r.a)({},S))}),200))}),[JSON.stringify(S),Q]),Object(l.useEffect)((function(){var e=G.current.instance;e&&Q&&e.layout()}),[p,y,Q]);var ie=Object(l.useState)(d(p)),ae=Object(o.a)(ie,2),oe=ae[0],se=(ae[1],Object(l.useState)(d(y))),le=Object(o.a)(se,2),ce=le[0],ue=le[1],he=Object(r.a)(Object(r.a)({},C),{},{width:oe,height:ce});return c.a.createElement("div",{className:"my-monaco-editor",ref:W,style:he})};function v(e){var t=e.width,i=void 0===t?"100%":t,s=e.height,h=void 0===s?"100%":s,f=e.original,p=e.modified,m=e.language,v=e.options,y=void 0===v?{}:v,b=Object(l.useRef)(),x=Object(l.useState)(null),w=Object(o.a)(x,2),k=w[0],C=w[1];Object(l.useEffect)((function(){b.current&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){var t=(g=e).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}));C(t);var n=function(e){var t;return b.current&&(t=new u.default((function(t){var n,r=Object(a.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&e.layout()}}catch(e){r.e(e)}finally{r.f()}}))).observe(b.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),n.unobserve(b.current)}}))}),[]),Object(l.useEffect)((function(){k&&k.setModel({original:g.editor.createModel(f,m),modified:g.editor.createModel(p,m)})}),[f,p,m,k]);var E={width:d(i),height:d(h)};return c.a.createElement("div",{className:"my-diff-editor",ref:b,style:E})}},Ze12: +/*!**********************************************!*\ + !*** ./node_modules/zrender/lib/core/dom.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./env */"ItGF"),i=n(/*! ./fourPointsTransform */"hOwI").buildTransformer,a=[];function o(e,t,n,a,o){if(t.getBoundingClientRect&&r.domSupported&&!s(t)){var l=t.___zrEVENTSAVED||(t.___zrEVENTSAVED={}),c=function(e,t,n){for(var r=n?"invTrans":"trans",a=t[r],o=t.srcCoords,s=!0,l=[],c=[],u=0;u<4;u++){var h=e[u].getBoundingClientRect(),d=2*u,f=h.left,p=h.top;l.push(f,p),s=s&&o&&f===o[d]&&p===o[d+1],c.push(e[u].offsetLeft,e[u].offsetTop)}return s&&a?a:(t.srcCoords=l,t[r]=n?i(c,l):i(l,c))}(function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,c=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[l]+":0",i[c]+":0",r[1-l]+":auto",i[1-c]+":auto",""].join("!important;"),e.appendChild(o),n.push(o)}return n}(t,l),l,o);if(c)return c(e,n,a),!0}return!1}function s(e){return"CANVAS"===e.nodeName.toUpperCase()}t.transformLocalCoord=function(e,t,n,r,i){return o(a,t,r,i,!0)&&o(e,n,a[0],a[1])},t.transformCoordWithViewport=o,t.isCanvasEl=s},ZpRC: +/*!*************************************************************************!*\ + !*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***! + \*************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function i(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function a(e,t){if(e.clientHeightt||a>e&&o=t&&s>=n?a-e-r:o>t&&sn?o-t+i:0}var s=function(e,t){var n=window,i=t.scrollMode,s=t.block,l=t.inline,c=t.boundary,u=t.skipOverflowHiddenElements,h="function"==typeof c?c:function(e){return e!==c};if(!r(e))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],p=e;r(p)&&h(p);){if((p=p.parentElement)===d){f.push(p);break}null!=p&&p===document.body&&a(p)&&!a(document.documentElement)||null!=p&&a(p,u)&&f.push(p)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),x=b.height,w=b.width,k=b.top,C=b.right,E=b.bottom,S=b.left,T="start"===s||"nearest"===s?k:"end"===s?E:k+x/2,_="center"===l?S+w/2:"end"===l?C:S,O=[],L=0;L=0&&S>=0&&E<=g&&C<=m&&k>=I&&E<=N&&S>=P&&C<=j)return O;var F=getComputedStyle(A),B=parseInt(F.borderLeftWidth,10),H=parseInt(F.borderTopWidth,10),z=parseInt(F.borderRightWidth,10),U=parseInt(F.borderBottomWidth,10),V=0,W=0,G="offsetWidth"in A?A.offsetWidth-A.clientWidth-B-z:0,K="offsetHeight"in A?A.offsetHeight-A.clientHeight-H-U:0;if(d===A)V="start"===s?T:"end"===s?T-g:"nearest"===s?o(y,y+g,g,H,U,y+T,y+T+x,x):T-g/2,W="start"===l?_:"center"===l?_-m/2:"end"===l?_-m:o(v,v+m,m,B,z,v+_,v+_+w,w),V=Math.max(0,V+y),W=Math.max(0,W+v);else{V="start"===s?T-I-H:"end"===s?T-N+U+K:"nearest"===s?o(I,N,M,H,U+K,T,T+x,x):T-(I+M/2)+K/2,W="start"===l?_-P-B:"center"===l?_-(P+R/2)+G/2:"end"===l?_-j+z+G:o(P,j,R,B,z+G,_,_+w,w);var Y=A.scrollLeft,q=A.scrollTop;T+=q-(V=Math.max(0,Math.min(q+V,A.scrollHeight-M+K))),_+=Y-(W=Math.max(0,Math.min(Y+W,A.scrollWidth-R+G)))}O.push({el:A,top:V,left:W})}return O};function l(e){return e===Object(e)&&0!==Object.keys(e).length}t.a=function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(l(t)&&"function"==typeof t.behavior)return t.behavior(n?[]:s(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:l(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,i=e.top,a=e.left;r.scroll&&n?r.scroll({top:i,left:a,behavior:t}):(r.scrollTop=i,r.scrollLeft=a)}))}(s(e,r),r.behavior)}}},aKvl: +/*!*******************************************************!*\ + !*** ./node_modules/zrender/lib/contain/quadratic.js ***! + \*******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../core/curve */"Sj9i").quadraticProjectPoint;t.containStroke=function(e,t,n,i,a,o,s,l,c){if(0===s)return!1;var u=s;return!(c>t+u&&c>i+u&&c>o+u||ce+u&&l>n+u&&l>a+u||l1?s-1:0),c=1;c1?n-1:0),a=1;a=0)return parseInt(t.slice(t.indexOf("e-")+2),10);var n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n},r.getInputDisplayValue=function(e){var t,n=e||r.state,i=n.focused,a=n.inputValue,o=n.value;null==(t=i?a:r.toPrecisionAsStep(o))&&(t="");var s=r.formatWrapper(t);return w(r.props.decimalSeparator)&&(s=s.toString().replace(".",r.props.decimalSeparator)),s},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(e){}},r.restoreByAfter=function(e){if(void 0===e)return!1;var t=r.input.value,n=t.lastIndexOf(e);if(-1===n)return!1;var i=r.cursorBefore.length;return r.lastKeyCode===p.a.DELETE&&r.cursorBefore.charAt(i-1)===e[0]?(r.fixCaret(i,i),!0):n+e.length===t.length&&(r.fixCaret(n,n),!0)},r.partRestoreByAfter=function(e){return void 0!==e&&Array.prototype.some.call(e,(function(t,n){var i=e.substring(n);return r.restoreByAfter(i)}))},r.isNotCompleteNumber=function(e){return isNaN(e)||""===e||null===e||e&&e.toString().indexOf(".")===e.toString().length-1},r.stop=function(){r.autoStepTimer&&clearTimeout(r.autoStepTimer)},r.down=function(e,t,n){r.pressingUpOrDown=!0,r.step("down",e,t,n)},r.up=function(e,t,n){r.pressingUpOrDown=!0,r.step("up",e,t,n)},r.saveInput=function(e){r.input=e};var i=e.value;void 0===i&&(i=e.defaultValue),r.state={focused:e.autoFocus};var o=r.getValidValue(r.toNumber(i));return r.state=g(g({},r.state),{},{inputValue:r.toPrecisionAsStep(o),value:o}),r}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.value,r=t.onChange,i=t.max,a=t.min,o=this.state.focused;if(e){if(!k(e.value,n)||!k(e.max,i)||!k(e.min,a)){var s,l=o?n:this.getValidValue(n);s=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:s})}var c="value"in this.props?n:this.state.value;"max"in this.props&&e.max!==i&&"number"==typeof c&&c>i&&r&&r(i),"min"in this.props&&e.min!==a&&"number"==typeof c&&c1&&void 0!==arguments[1]?arguments[1]:this.props.min,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,r=parseFloat(e);return isNaN(r)?e:(rn&&(r=n),r)}},{key:"setValue",value:function(e,t){var n=this.props.precision,r=this.isNotCompleteNumber(parseFloat(e))?null:parseFloat(e),i=this.state.value,a=void 0===i?null:i,o=this.state.inputValue,s=void 0===o?null:o,l="number"==typeof r?r.toFixed(n):"".concat(r),c=r!==a||l!=="".concat(s);return"value"in this.props?(s=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:s},t)):this.setState({value:r,inputValue:this.toPrecisionAsStep(e)},t),c&&this.props.onChange(r),r}},{key:"getMaxPrecision",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.props,r=n.precision,i=n.step;if(w(r))return r;var a=this.getPrecision(t),o=this.getPrecision(i),s=this.getPrecision(e);return e?Math.max(s,a+o):a+o}},{key:"getPrecisionFactor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getMaxPrecision(e,t);return Math.pow(10,n)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(e){return this.props.formatter?this.props.formatter(e):e}},{key:"toPrecisionAsStep",value:function(e){if(this.isNotCompleteNumber(e)||""===e)return e;var t=Math.abs(this.getMaxPrecision(e));return isNaN(t)?e.toString():Number(e).toFixed(t)}},{key:"toNumber",value:function(e){var t=this.props.precision,n=this.state.focused,r=e&&e.length>16&&n;return this.isNotCompleteNumber(e)||r?e:w(t)?Math.round(e*Math.pow(10,t))/Math.pow(10,t):Number(e)}},{key:"upStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),a=((r*e+r*n*t)/r).toFixed(i);return this.toNumber(a)}},{key:"downStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),a=((r*e-r*n*t)/r).toFixed(i);return this.toNumber(a)}},{key:"step",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0;this.stop(),t&&(t.persist(),t.preventDefault());var a=this.props;if(!a.disabled){var o=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(o)){var s=this["".concat(e,"Step")](o,r),l=s>a.max||sa.max?s=a.max:s=p)||a||o,Y=(H||0===H)&&(isNaN(H)||Number(H)<=m)||a||o,q=f()("".concat(n,"-handler"),"".concat(n,"-handler-up"),Object(i.a)({},"".concat(n,"-handler-up-disabled"),K)),X=f()("".concat(n,"-handler"),"".concat(n,"-handler-down"),Object(i.a)({},"".concat(n,"-handler-down-disabled"),Y)),$=s?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Q=s?{onTouchStart:Y?y:this.down,onTouchEnd:this.stop}:{onMouseDown:Y?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:U,style:g,title:v,onMouseEnter:x,onMouseLeave:w,onMouseOver:k,onMouseOut:C,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(n,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:q}),c||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner"),onClick:b})),h.a.createElement("span",Object.assign({unselectable:"on"},Q,{role:"button","aria-label":"Decrease Value","aria-disabled":Y,className:X}),u||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner"),onClick:b}))),h.a.createElement("div",{className:"".concat(n,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":m,"aria-valuemax":p,"aria-valuenow":H,required:E,type:_,placeholder:O,onPaste:N,onClick:S,onMouseUp:this.onMouseUp,className:"".concat(n,"-input"),tabIndex:T,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:W?this.onKeyDown:y,onKeyUp:W?this.onKeyUp:y,autoFocus:I,maxLength:R,readOnly:o,disabled:a,max:p,min:m,step:M,name:j,title:v,id:L,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(G),pattern:D,inputMode:A,onInput:P},V))))}}]),n}(h.a.Component);C.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(e){return e.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var E=C;t.a=E},dqUG: +/*!**************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Text.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Displayable */"Gev7"),i=n(/*! ../core/util */"bYtY"),a=n(/*! ../contain/text */"6GrX"),o=n(/*! ./helper/text */"pzxd"),s=n(/*! ./constant */"gut8").ContextCachedBy,l=function(e){r.call(this,e)};l.prototype={constructor:l,type:"text",brush:function(e,t){var n=this.style;this.__dirty&&o.normalizeTextStyle(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var r=n.text;null!=r&&(r+=""),o.needDrawText(r,n)?(this.setTransform(e),o.renderText(this,e,r,n,null,t),this.restoreTransform(e)):e.__attrCachedBy=s.NONE},getBoundingRect:function(){var e=this.style;if(this.__dirty&&o.normalizeTextStyle(e,!0),!this._rect){var t=e.text;null!=t?t+="":t="";var n=a.getBoundingRect(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich);if(n.x+=e.x||0,n.y+=e.y||0,o.getStroke(e.textStroke,e.textStrokeWidth)){var r=e.textStrokeWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect}},i.inherits(l,r);var c=l;e.exports=c},fW2E: +/*!**************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/helper/fixShadow.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};e.exports=function(e,t,r){return n.hasOwnProperty(t)?r*e.dpr:r}},fyJ8: +/*!************************************************!*\ + !*** ./node_modules/rc-table/es/Cell/index.js ***! + \************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),s=n(/*! react */"q1tI"),l=n(/*! classnames */"TSYQ"),c=n.n(l),u=n(/*! rc-util/es/ref */"c+Xe"),h=n(/*! ../utils/valueUtil */"sR1s");var d=s.forwardRef((function(e,t){var n,l,d,f=e.prefixCls,p=e.className,m=e.record,g=e.index,v=e.dataIndex,y=e.render,b=e.children,x=e.component,w=void 0===x?"td":x,k=e.colSpan,C=e.rowSpan,E=e.fixLeft,S=e.fixRight,T=e.firstFixLeft,_=e.lastFixLeft,O=e.firstFixRight,L=e.lastFixRight,A=e.appendNode,D=e.additionalProps,M=void 0===D?{}:D,R=e.ellipsis,I=e.align,j=e.rowType,N=e.isSticky,P="".concat(f,"-cell");if(b)d=b;else{var F=Object(h.b)(m,v);if(d=F,y){var B=y(F,m,g);!function(e){return e&&"object"===Object(o.a)(e)&&!Array.isArray(e)&&!s.isValidElement(e)}(B)?d=B:(d=B.children,l=B.props)}}"object"!==Object(o.a)(d)||Array.isArray(d)||s.isValidElement(d)||(d=null),R&&(_||O)&&(d=s.createElement("span",{className:"".concat(P,"-content")},d));var H=l||{},z=H.colSpan,U=H.rowSpan,V=H.style,W=H.className,G=Object(a.a)(H,["colSpan","rowSpan","style","className"]),K=void 0!==z?z:k,Y=void 0!==U?U:C;if(0===K||0===Y)return null;var q={},X="number"==typeof E,$="number"==typeof S;X&&(q.position="sticky",q.left=E),$&&(q.position="sticky",q.right=S);var Q,J={};I&&(J.textAlign=I);var Z=!0===R?{showTitle:!0}:R;Z&&(Z.showTitle||"header"===j)&&("string"==typeof d||"number"==typeof d?Q=d.toString():s.isValidElement(d)&&"string"==typeof d.props.children&&(Q=d.props.children));var ee,te=Object(i.a)(Object(i.a)(Object(i.a)({title:Q},G),M),{},{colSpan:K&&1!==K?K:null,rowSpan:Y&&1!==Y?Y:null,className:c()(P,p,(n={},Object(r.a)(n,"".concat(P,"-fix-left"),X),Object(r.a)(n,"".concat(P,"-fix-left-first"),T),Object(r.a)(n,"".concat(P,"-fix-left-last"),_),Object(r.a)(n,"".concat(P,"-fix-right"),$),Object(r.a)(n,"".concat(P,"-fix-right-first"),O),Object(r.a)(n,"".concat(P,"-fix-right-last"),L),Object(r.a)(n,"".concat(P,"-ellipsis"),R),Object(r.a)(n,"".concat(P,"-with-append"),A),Object(r.a)(n,"".concat(P,"-fix-sticky"),(X||$)&&N),n),M.className,W),style:Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},M.style),J),q),V),ref:(ee=w,"string"==typeof ee||Object(u.c)(ee)?t:null)});return s.createElement(w,Object.assign({},te),A,d)}));d.displayName="Cell";var f=s.memo(d,(function(e,t){return!!t.shouldCellUpdate&&!t.shouldCellUpdate(t.record,e.record)}));t.a=f},gut8: +/*!******************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/constant.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){t.ContextCachedBy={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},t.WILL_BE_RESTORED=9},h7HQ: +/*!***********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/Polygon.js ***! + \***********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../helper/poly */"T6xi"),a=r.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(e,t){i.buildPath(e,t,!0)}});e.exports=a},hOwI: +/*!**************************************************************!*\ + !*** ./node_modules/zrender/lib/core/fourPointsTransform.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=Math.log(2);function r(e,t,i,a,o,s){var l=a+"-"+o,c=e.length;if(s.hasOwnProperty(l))return s[l];if(1===t){var u=Math.round(Math.log((1<t&&a>r||ai?o:0}},iXp4: +/*!**********************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/helper/fixClipWithShadow.js ***! + \**********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../../core/env */"ItGF"),i=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];e.exports=function(e){return r.browser.ie&&r.browser.version>=11?function(){var t,n=this.__clipPaths,r=this.style;if(n)for(var a=0;a1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),i=r.marginLeft,a=r.marginRight;n+=+i.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},ne=function(e,t,n){e&&"object"===Object(M.a)(e.style)&&(e.style[t]=n)},re=n("bdgK"),ie=n("i8i4"),ae=n.n(ie),oe=n("wgJM"),se=n("l4aY"),le=n("m+aA"),ce=n("c+Xe"),ue=n("zT1h"),he=n("QC+M");function de(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var fe=n("MNnm");function pe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var me,ge,ve,ye=(me=Object(fe.a)(),ge="undefined"!=typeof window?window:{},ve={animationend:pe("Animation","AnimationEnd"),transitionend:pe("Transition","TransitionEnd")},me&&("AnimationEvent"in ge||delete ve.animationend.animation,"TransitionEvent"in ge||delete ve.transitionend.transition),ve),be={};if(Object(fe.a)()){var xe=document.createElement("div");be=xe.style}var we={};function ke(e){if(we[e])return we[e];var t=ye[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i1&&void 0!==arguments[1]?arguments[1]:2;t();var a=Object(oe.a)((function(){i<=1?r({isCanceled:function(){return a!==e.current}}):n(r,i-1)}));e.current=a},t]}(),c=Object(i.a)(l,2),u=c[0],h=c[1];return Ae((function(){if("none"!==a&&"end"!==a){var e=De.indexOf(a),n=De[e+1],r=t(a);!1===r?o(n):u((function(e){function t(){e.isCanceled()||o(n)}!0===r?t():Promise.resolve(r).then(t)}))}}),[e,a]),s.useEffect((function(){return function(){h()}}),[]),[function(){o("prepare")},a]};function Ie(e,t,n,a){var l=a.motionEnter,c=void 0===l||l,u=a.motionAppear,h=void 0===u||u,d=a.motionLeave,f=void 0===d||d,p=a.motionDeadline,m=a.motionLeaveImmediately,g=a.onAppearPrepare,v=a.onEnterPrepare,y=a.onLeavePrepare,b=a.onAppearStart,x=a.onEnterStart,w=a.onLeaveStart,k=a.onAppearActive,C=a.onEnterActive,E=a.onLeaveActive,S=a.onAppearEnd,T=a.onEnterEnd,_=a.onLeaveEnd,O=a.onVisibleChanged,L=Le(),A=Object(i.a)(L,2),D=A[0],M=A[1],R=Le("none"),I=Object(i.a)(R,2),j=I[0],N=I[1],P=Le(null),F=Object(i.a)(P,2),B=F[0],H=F[1],z=Object(s.useRef)(!1),U=Object(s.useRef)(null),V=Object(s.useRef)(!1),W=Object(s.useRef)(null);function G(){return n()||W.current}var K=Object(s.useRef)(!1);function Y(e){var t,n=G();e&&!e.deadline&&e.target!==n||("appear"===j&&K.current?t=null==S?void 0:S(n,e):"enter"===j&&K.current?t=null==T?void 0:T(n,e):"leave"===j&&K.current&&(t=null==_?void 0:_(n,e)),!1===t||V.current||(N("none"),H(null)))}var q=function(e){var t=Object(s.useRef)(),n=Object(s.useRef)(e);n.current=e;var r=s.useCallback((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(_e,r),e.removeEventListener(Te,r))}return s.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(_e,r),e.addEventListener(Te,r),t.current=e)},i]}(Y),X=Object(i.a)(q,1)[0],$=s.useMemo((function(){var e,t,n;switch(j){case"appear":return e={},Object(r.a)(e,"prepare",g),Object(r.a)(e,"start",b),Object(r.a)(e,"active",k),e;case"enter":return t={},Object(r.a)(t,"prepare",v),Object(r.a)(t,"start",x),Object(r.a)(t,"active",C),t;case"leave":return n={},Object(r.a)(n,"prepare",y),Object(r.a)(n,"start",w),Object(r.a)(n,"active",E),n;default:return{}}}),[j]),Q=Re(j,(function(e){if("prepare"===e){var t=$.prepare;return!!t&&t(G())}var n;ee in $&&H((null===(n=$[ee])||void 0===n?void 0:n.call($,G(),null))||null);return"active"===ee&&(X(G()),p>0&&(clearTimeout(U.current),U.current=setTimeout((function(){Y({deadline:!0})}),p))),!0})),J=Object(i.a)(Q,2),Z=J[0],ee=J[1],te=Me(ee);K.current=te,Ae((function(){M(t);var n,r=z.current;(z.current=!0,e)&&(!r&&t&&h&&(n="appear"),r&&t&&c&&(n="enter"),(r&&!t&&f||!r&&m&&!t&&f)&&(n="leave"),n&&(N(n),Z()))}),[t]),Object(s.useEffect)((function(){("appear"===j&&!h||"enter"===j&&!c||"leave"===j&&!f)&&N("none")}),[h,c,f]),Object(s.useEffect)((function(){return function(){clearTimeout(U.current),V.current=!0}}),[]),Object(s.useEffect)((function(){void 0!==D&&"none"===j&&(null==O||O(D))}),[D,j]);var ne=B;return $.prepare&&"start"===ee&&(ne=Object(o.a)({transition:"none"},ne)),[j,ee,ne,null!=D?D:t]}var je=function(e){Object(S.a)(n,e);var t=Object(T.a)(n);function n(){return Object(k.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(s.Component);var Ne=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===Object(M.a)(e)&&(t=e.transitionSupport);var a=s.forwardRef((function(e,t){var a=e.visible,l=void 0===a||a,u=e.removeOnLeave,h=void 0===u||u,d=e.forceRender,f=e.children,p=e.motionName,m=e.leavedClassName,g=e.eventProps,v=n(e),y=Object(s.useRef)(),b=Object(s.useRef)();var x=Ie(v,l,(function(){try{return Object(le.a)(y.current||b.current)}catch(e){return null}}),e),w=Object(i.a)(x,4),k=w[0],C=w[1],E=w[2],S=w[3],T=s.useRef(S);S&&(T.current=!0);var _=Object(s.useRef)(t);_.current=t;var O,L=s.useCallback((function(e){y.current=e,Object(ce.b)(_.current,e)}),[]),A=Object(o.a)(Object(o.a)({},g),{},{visible:l});if(f)if("none"!==k&&n(e)){var D,M;"prepare"===C?M="prepare":Me(C)?M="active":"start"===C&&(M="start"),O=f(Object(o.a)(Object(o.a)({},A),{},{className:c()(Oe(p,k),(D={},Object(r.a)(D,Oe(p,"".concat(k,"-").concat(M)),M),Object(r.a)(D,p,"string"==typeof p),D)),style:E}),L)}else O=S?f(Object(o.a)({},A),L):!h&&T.current?f(Object(o.a)(Object(o.a)({},A),{},{className:m}),L):d?f(Object(o.a)(Object(o.a)({},A),{},{style:{display:"none"}}),L):null;else O=null;return s.createElement(je,{ref:b},O)}));return a.displayName="CSSMotion",a}(Se);function Pe(e){var t;return t=e&&"object"===Object(M.a)(e)&&"key"in e?e:{key:e},Object(o.a)(Object(o.a)({},t),{},{key:String(t.key)})}function Fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Pe)}function Be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,a=Fe(e),s=Fe(t);a.forEach((function(e){for(var t=!1,a=r;a1}));return c.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 He=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ne,n=function(e){Object(S.a)(r,e);var n=Object(T.a)(r);function r(){var e;return Object(k.a)(this,r),(e=n.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(o.a)(Object(o.a)({},e),{},{status:"removed"})}))}}))},e}return Object(C.a)(r,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,r=this.props,i=r.component,o=r.children,l=r.onVisibleChanged,c=Object(a.a)(r,["component","children","onVisibleChanged"]),u=i||s.Fragment,h={};return He.forEach((function(e){h[e]=c[e],delete c[e]})),delete c.keys,s.createElement(u,c,n.map((function(n){var r=n.status,i=Object(a.a)(n,["status"]),c="add"===r||"keep"===r;return s.createElement(t,Object(w.a)({},h,{key:i.key,visible:c,eventProps:i,onVisibleChanged:function(t){null==l||l(t,{key:i.key}),t||e.removeKey(i.key)}}),o)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,i=Fe(n);return{keyEntities:Be(r,i).filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||"removed"!==t.status||"remove"!==e.status}))}}}]),r}(s.Component);n.defaultProps={component:"div"}}(Se);var ze=Ne;function Ue(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function Ve(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,i=e.mask,a=e.maskMotion,l=e.maskAnimation,u=e.maskTransitionName;if(!i)return null;var h={};return(a||u||l)&&(h=Object(o.a)({motionAppear:!0},Ue({motion:a,prefixCls:t,transitionName:u,animation:l}))),s.createElement(ze,Object(w.a)({},h,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return s.createElement("div",{style:{zIndex:r},className:c()("".concat(t,"-mask"),n)})}))}var We=n("9mu1"),Ge=n("o0o1"),Ke=n.n(Ge),Ye=n("HaE+"),qe=["measure","align",null,"motion"],Xe=s.forwardRef((function(e,t){var n=e.visible,r=e.prefixCls,a=e.className,l=e.style,u=e.children,h=e.zIndex,d=e.stretch,f=e.destroyPopupOnHide,p=e.forceRender,m=e.align,g=e.point,v=e.getRootDomNode,y=e.getClassNameFromAlign,b=e.onAlign,x=e.onMouseEnter,k=e.onMouseLeave,C=e.onMouseDown,E=e.onTouchStart,S=Object(s.useRef)(),T=Object(s.useRef)(),_=Object(s.useState)(),O=Object(i.a)(_,2),L=O[0],A=O[1],D=function(e){var t=s.useState({width:0,height:0}),n=Object(i.a)(t,2),r=n[0],a=n[1];return[s.useMemo((function(){var t={};if(e){var n=r.width,i=r.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,r]),function(e){a({width:e.offsetWidth,height:e.offsetHeight})}]}(d),M=Object(i.a)(D,2),R=M[0],I=M[1];var j=function(e,t){var n=Object(s.useState)(null),r=Object(i.a)(n,2),a=r[0],o=r[1],l=Object(s.useRef)(),c=Object(s.useRef)(!1);function u(e){c.current||o(e)}function h(){oe.a.cancel(l.current)}return Object(s.useEffect)((function(){u("measure")}),[e]),Object(s.useEffect)((function(){switch(a){case"measure":t()}a&&(l.current=Object(oe.a)(Object(Ye.a)(Ke.a.mark((function e(){var t,n;return Ke.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=qe.indexOf(a),(n=qe[t+1])&&-1!==t&&u(n);case 3:case"end":return e.stop()}}),e)})))))}),[a]),Object(s.useEffect)((function(){return function(){c.current=!0,h()}}),[]),[a,function(e){h(),l.current=Object(oe.a)((function(){u((function(e){switch(a){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){d&&I(v())})),N=Object(i.a)(j,2),P=N[0],F=N[1],B=Object(s.useRef)();function H(){var e;null===(e=S.current)||void 0===e||e.forceAlign()}function z(e,t){var n=y(t);L!==n&&A(n),"align"===P&&(L!==n?Promise.resolve().then((function(){H()})):F((function(){var e;null===(e=B.current)||void 0===e||e.call(B)})),null==b||b(e,t))}var U=Object(o.a)({},Ue(e));function V(){return new Promise((function(e){B.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=U[e];U[e]=function(e,n){return F(),null==t?void 0:t(e,n)}})),s.useEffect((function(){U.motionName||"motion"!==P||F()}),[U.motionName,P]),s.useImperativeHandle(t,(function(){return{forceAlign:H,getElement:function(){return T.current}}}));var W=Object(o.a)(Object(o.a)({},R),{},{zIndex:h,opacity:"motion"!==P&&"stable"!==P&&n?0:void 0,pointerEvents:"stable"===P?void 0:"none"},l),G=!0;!(null==m?void 0:m.points)||"align"!==P&&"stable"!==P||(G=!1);var K=u;return s.Children.count(u)>1&&(K=s.createElement("div",{className:"".concat(r,"-content")},u)),s.createElement(ze,Object(w.a)({visible:n,ref:T,leavedClassName:"".concat(r,"-hidden")},U,{onAppearPrepare:V,onEnterPrepare:V,removeOnLeave:f,forceRender:p}),(function(e,t){var n=e.className,i=e.style,l=c()(r,a,L,n);return s.createElement(We.a,{target:g||v,key:"popup",ref:S,monitorWindowResize:!0,disabled:G,align:m,onAlign:z},s.createElement("div",{ref:t,className:l,onMouseEnter:x,onMouseLeave:k,onMouseDownCapture:C,onTouchStartCapture:E,style:Object(o.a)(Object(o.a)({},i),W)},K))}))}));Xe.displayName="PopupInner";var $e=Xe,Qe=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.visible,i=e.zIndex,a=e.children,l=e.mobile,u=(l=void 0===l?{}:l).popupClassName,h=l.popupStyle,d=l.popupMotion,f=void 0===d?{}:d,p=l.popupRender,m=s.useRef();s.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return m.current}}}));var g=Object(o.a)({zIndex:i},h),v=a;return s.Children.count(a)>1&&(v=s.createElement("div",{className:"".concat(n,"-content")},a)),p&&(v=p(v)),s.createElement(ze,Object(w.a)({visible:r,ref:m,removeOnLeave:!0},f),(function(e,t){var r=e.className,i=e.style,a=c()(n,u,r);return s.createElement("div",{ref:t,className:a,style:Object(o.a)(Object(o.a)({},i),g)},v)}))}));Qe.displayName="MobilePopupInner";var Je=Qe,Ze=["visible","mobile"],et=s.forwardRef((function(e,t){var n=e.visible,r=e.mobile,l=Object(a.a)(e,Ze),c=Object(s.useState)(n),u=Object(i.a)(c,2),h=u[0],d=u[1],f=Object(s.useState)(!1),p=Object(i.a)(f,2),m=p[0],g=p[1],v=Object(o.a)(Object(o.a)({},l),{},{visible:h});Object(s.useEffect)((function(){d(n),n&&r&&g(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4)))}())}),[n,r]);var y=m?s.createElement(Je,Object(w.a)({},v,{mobile:r,ref:t})):s.createElement($e,Object(w.a)({},v,{ref:t}));return s.createElement("div",null,s.createElement(Ve,v),y)}));et.displayName="Popup";var tt=et,nt=s.createContext(null);function rt(){}function it(){return""}function at(e){return e?e.ownerDocument:window.document}var ot=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var st,lt,ct=(st=he.a,(lt=function(e){Object(S.a)(n,e);var t=Object(T.a)(n);function n(e){var r,i;return Object(k.a)(this,n),(r=t.call(this,e)).popupRef=s.createRef(),r.triggerRef=s.createRef(),r.attachId=void 0,r.clickOutsideHandler=void 0,r.touchOutsideHandler=void 0,r.contextMenuOutsideHandler1=void 0,r.contextMenuOutsideHandler2=void 0,r.mouseDownTimeout=void 0,r.focusTime=void 0,r.preClickTime=void 0,r.preTouchTime=void 0,r.delayTimer=void 0,r.hasPopupMouseDown=void 0,r.onMouseEnter=function(e){var t=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",e),r.delaySetPopupVisible(!0,t,t?null:e)},r.onMouseMove=function(e){r.fireEvents("onMouseMove",e),r.setPoint(e)},r.onMouseLeave=function(e){r.fireEvents("onMouseLeave",e),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onPopupMouseEnter=function(){r.clearDelayTimer()},r.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Object(se.a)(null===(t=r.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onFocus=function(e){r.fireEvents("onFocus",e),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))},r.onMouseDown=function(e){r.fireEvents("onMouseDown",e),r.preClickTime=Date.now()},r.onTouchStart=function(e){r.fireEvents("onTouchStart",e),r.preTouchTime=Date.now()},r.onBlur=function(e){r.fireEvents("onBlur",e),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)},r.onContextMenu=function(e){e.preventDefault(),r.fireEvents("onContextMenu",e),r.setPopupVisible(!0,e)},r.onContextMenuClose=function(){r.isContextMenuToShow()&&r.close()},r.onClick=function(e){if(r.fireEvents("onClick",e),r.focusTime){var t;if(r.preClickTime&&r.preTouchTime?t=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?t=r.preClickTime:r.preTouchTime&&(t=r.preTouchTime),Math.abs(t-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,e)},r.onPopupMouseDown=function(){var e;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(e=r.context).onPopupMouseDown.apply(e,arguments)},r.onDocumentClick=function(e){if(!r.props.mask||r.props.maskClosable){var t=e.target,n=r.getRootDomNode(),i=r.getPopupDomNode();Object(se.a)(n,t)&&!r.isContextMenuOnly()||Object(se.a)(i,t)||r.hasPopupMouseDown||r.close()}},r.getRootDomNode=function(){var e=r.props.getTriggerDOMNode;if(e)return e(r.triggerRef.current);try{var t=Object(le.a)(r.triggerRef.current);if(t)return t}catch(e){}return ae.a.findDOMNode(Object(E.a)(r))},r.getPopupClassNameFromAlign=function(e){var t=[],n=r.props,i=n.popupPlacement,a=n.builtinPlacements,o=n.prefixCls,s=n.alignPoint,l=n.getPopupClassNameFromAlign;return i&&a&&t.push(function(e,t,n,r){for(var i=n.points,a=Object.keys(e),o=0;o=r.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(r.subMenuTitle.offsetWidth,"px"))}},r.saveSubMenuTitle=function(e){r.subMenuTitle=e},r.getBaseProps=function(){var e=Object(E.a)(r).props,t=r.getMode();return{mode:"horizontal"===t?"vertical":t,visible:r.getVisible(),level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:r.onSubMenuClick,onSelect:r.onSelect,onDeselect:r.onDeselect,onDestroy:r.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:r.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(E.a)(r),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[J(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:r.internalMenuId,manualRef:r.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},r.getMotion=function(e,t){var n=Object(E.a)(r).haveRendered,i=r.props,a=i.motion,s=i.rootPrefixCls;return Object(o.a)(Object(o.a)({},a),{},{leavedClassName:"".concat(s,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var i=e.store,a=e.eventKey,l=i.getState().defaultActiveFirst;r.isRootMenu=!1;var c=!1;return l&&(c=l[a]),mt(i,a,c),r.state={mode:e.mode,isOpen:e.isOpen},r}return Object(C.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,i=t.manualRef,a=t.isOpen,o=function(){e.setState({mode:n,isOpen:a})},s=a!==this.state.isOpen,l=n!==this.state.mode;(l||s)&&(oe.a.cancel(this.updateStateRaf),l?this.updateStateRaf=Object(oe.a)(o):o()),i&&i(this),"horizontal"===n&&(null==r?void 0:r.isRootMenu)&&a&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),oe.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(e,t){var n=this.getBaseProps();return s.createElement(Tt,Object(w.a)({},n,{id:this.internalMenuId,className:e,style:t}),this.props.children)}},{key:"renderChildren",value:function(){var e=this,t=this.getBaseProps(),n=t.mode,i=t.visible,a=t.forceSubMenuRender,o=t.direction,l=this.getMotion(n,i);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||i||a,!this.haveOpened)return s.createElement("div",null);var u=c()("".concat(t.prefixCls,"-sub"),Object(r.a)({},"".concat(t.prefixCls,"-rtl"),"rtl"===o));return this.isInlineMode()?s.createElement(ze,Object(w.a)({visible:t.visible,forceRender:a},l),(function(t){var n=t.className,r=t.style,i=c()(u,n);return e.renderPopupMenu(i,r)})):this.renderPopupMenu(u)}},{key:"render",value:function(){var e,t,n,i=Object(o.a)({},this.props),a=this.getVisible(),l=this.getPrefixCls(),u=this.isInlineMode(),h=this.getMode(),d=c()(l,"".concat(l,"-").concat(h),(e={},Object(r.a)(e,i.className,!!i.className),Object(r.a)(e,this.getOpenClassName(),a),Object(r.a)(e,this.getActiveClassName(),i.active||a&&!u),Object(r.a)(e,this.getDisabledClassName(),i.disabled),Object(r.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(i.eventKey?this.internalMenuId="".concat(i.eventKey,"$Menu"):(ft+=1,this.internalMenuId="$__$".concat(ft,"$Menu")));var f={},p={},m={};i.disabled||(f={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},p={onClick:this.onTitleClick},m={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var g={},v="rtl"===i.direction;u&&(v?g.paddingRight=i.inlineIndent*i.level:g.paddingLeft=i.inlineIndent*i.level);var y={};this.getVisible()&&(y={"aria-owns":this.internalMenuId});var b=null;"horizontal"!==h&&(b=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(b=s.createElement(this.props.expandIcon,Object(o.a)({},this.props))));var x=s.createElement("div",Object(w.a)({ref:this.saveSubMenuTitle,style:g,className:"".concat(l,"-title"),role:"button"},m,p,{"aria-expanded":a},y,{"aria-haspopup":"true",title:"string"==typeof i.title?i.title:void 0}),i.title,b||s.createElement("i",{className:"".concat(l,"-arrow")})),k=this.renderChildren(),C=(null===(t=i.parentMenu)||void 0===t?void 0:t.isRootMenu)?i.parentMenu.props.getPopupContainer:function(e){return e.parentNode},E=pt[h],S=i.popupOffset?{offset:i.popupOffset}:{},T=c()((n={},Object(r.a)(n,i.popupClassName,i.popupClassName&&!u),Object(r.a)(n,"".concat(l,"-rtl"),v),n)),_=i.disabled,O=i.triggerSubMenuAction,L=i.subMenuOpenDelay,A=i.forceSubMenuRender,D=i.subMenuCloseDelay,M=i.builtinPlacements;ee.forEach((function(e){return delete i[e]})),delete i.onClick;var R=v?Object(o.a)(Object(o.a)({},dt),M):Object(o.a)(Object(o.a)({},ht),M);delete i.direction;var I=this.getBaseProps(),j=u?null:this.getMotion(I.mode,I.visible);return s.createElement("li",Object(w.a)({},i,f,{className:d,role:"menuitem"}),s.createElement(ct,{prefixCls:l,popupClassName:c()("".concat(l,"-popup"),T),getPopupContainer:C,builtinPlacements:R,popupPlacement:E,popupVisible:!u&&a,popupAlign:S,popup:u?null:k,action:_||u?[]:[O],mouseEnterDelay:L,mouseLeaveDelay:D,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:A,popupMotion:j},x),u?k:null)}}]),n}(s.Component);gt.defaultProps={onMouseEnter:$,onMouseLeave:$,onTitleMouseEnter:$,onTitleMouseLeave:$,onTitleClick:$,manualRef:$,mode:"vertical",title:""};var vt=Object(_.b)((function(e,t){var n=e.openKeys,r=e.activeKey,i=e.selectedKeys,a=t.eventKey,o=t.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[o]===a,selectedKeys:i}}))(gt);vt.isSubMenu=!0;var yt=vt,bt=function(e){Object(S.a)(n,e);var t=Object(T.a)(n);function n(){var e;return Object(k.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.childRef=s.createRef(),e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=e.childRef.current;return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,r){var i=e.props,l=i.overflowedIndicator,c=i.level,u=i.mode,h=i.prefixCls,d=i.theme;if(1!==c||"horizontal"!==u)return null;var f=e.props.children[0].props,p=(f.children,f.title,f.style),m=Object(a.a)(f,["children","title","style"]),g=Object(o.a)({},p),v="".concat(t,"-overflowed-indicator"),y="".concat(t,"-overflowed-indicator");0===n.length&&!0!==r?g=Object(o.a)(Object(o.a)({},g),{},{display:"none"}):r&&(g=Object(o.a)(Object(o.a)({},g),{},{visibility:"hidden",position:"absolute"}),v="".concat(v,"-placeholder"),y="".concat(y,"-placeholder"));var b=d?"".concat(h,"-").concat(d):"",x={};return ee.forEach((function(e){void 0!==m[e]&&(x[e]=m[e])})),s.createElement(yt,Object(w.a)({title:l,className:"".concat(h,"-overflowed-submenu"),popupClassName:b},x,{key:v,eventKey:y,disabled:!1,style:g}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];ne(r,"display","inline-block");var i=e.getMenuItemNodes(),a=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(e){ne(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return te(e,!0)})),a.forEach((function(e){ne(e,"display","none")})),e.overflowedIndicatorWidth=te(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),ne(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=te(t);e.overflowedItems=[];var r,i=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(C.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=this.childRef.current;if(!t)return;this.resizeObserver=new re.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,i,a){var o=i;if("horizontal"===t.props.mode){var l=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(a>n&&(o=s.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),a===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return s.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),l=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var c=[].concat(Object(d.a)(r),[l,o]);return a===e.length-1&&c.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),c}return[].concat(Object(d.a)(r),[o])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(a.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return s.createElement(i,Object(w.a)({ref:this.childRef},r),this.renderChildren(n))}}]),n}(s.Component);bt.defaultProps={tag:"div",className:""};var xt=bt;function wt(e,t,n){var i=e.getState();e.setState({activeKey:Object(o.a)(Object(o.a)({},i.activeKey),{},Object(r.a)({},t,n))})}function kt(e){return e.eventKey||"0-menu-"}function Ct(e,t){var n,r=t,i=e.children,a=e.eventKey;if(r&&(Z(i,(function(e,t){e&&e.props&&!e.props.disabled&&r===Q(e,a,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(Z(i,(function(e,t){r||!e||e.props.disabled||(r=Q(e,a,t))})),r):r}function Et(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var St=function(e){Object(S.a)(n,e);var t=Object(T.a)(n);function n(e){var i;return Object(k.a)(this,n),(i=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(i.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var a=null;return r!==v.a.UP&&r!==v.a.DOWN||(a=i.step(r===v.a.UP?-1:1)),a?(e.preventDefault(),wt(i.props.store,kt(i.props),a.props.eventKey),"function"==typeof t&&t(a),1):void 0},i.onItemHover=function(e){var t=e.key,n=e.hover;wt(i.props.store,kt(i.props),n?t:null)},i.onDeselect=function(e){i.props.onDeselect(e)},i.onSelect=function(e){i.props.onSelect(e)},i.onClick=function(e){i.props.onClick(e)},i.onOpenChange=function(e){i.props.onOpenChange(e)},i.onDestroy=function(e){i.props.onDestroy(e)},i.getFlatInstanceArray=function(){return i.instanceArray},i.step=function(e){var t=i.getFlatInstanceArray(),n=i.props.store.getState().activeKey[kt(i.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var a=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(a=t,!1)})),i.props.defaultActiveFirst||-1===a||(o=t.slice(a,r-1)).length&&!o.every((function(e){return!!e.props.disabled}))){var o,s=(a+1)%r,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},i.renderCommonMenuItem=function(e,t,n){var r=i.props.store.getState(),a=Object(E.a)(i).props,l=Q(e,a.eventKey,t),c=e.props;if(!c||"string"==typeof e.type)return e;var u=l===r.activeKey,h=Object(o.a)(Object(o.a)({mode:c.mode||a.mode,level:a.level,inlineIndent:a.inlineIndent,renderMenuItem:i.renderMenuItem,rootPrefixCls:a.prefixCls,index:t,parentMenu:a.parentMenu,manualRef:c.disabled?void 0:Object(L.a)(e.ref,Et.bind(Object(E.a)(i))),eventKey:l,active:!c.disabled&&u,multiple:a.multiple,onClick:function(e){(c.onClick||$)(e),i.onClick(e)},onItemHover:i.onItemHover,motion:a.motion,subMenuOpenDelay:a.subMenuOpenDelay,subMenuCloseDelay:a.subMenuCloseDelay,forceSubMenuRender:a.forceSubMenuRender,onOpenChange:i.onOpenChange,onDeselect:i.onDeselect,onSelect:i.onSelect,builtinPlacements:a.builtinPlacements,itemIcon:c.itemIcon||i.props.itemIcon,expandIcon:c.expandIcon||i.props.expandIcon},n),{},{direction:a.direction});return("inline"===a.mode||X.any)&&(h.triggerSubMenuAction="click"),s.cloneElement(e,Object(o.a)(Object(o.a)({},h),{},{key:l||t}))},i.renderMenuItem=function(e,t,n){if(!e)return null;var r=i.props.store.getState(),a={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:i.props.triggerSubMenuAction,subMenuKey:n};return i.renderCommonMenuItem(e,t,a)},e.store.setState({activeKey:Object(o.a)(Object(o.a)({},e.store.getState().activeKey),{},Object(r.a)({},e.eventKey,Ct(e,e.activeKey)))}),i.instanceArray=[],i}return Object(C.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!D()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[kt(t)],r=Ct(t,n);if(r!==n)wt(t.store,kt(t),r);else if("activeKey"in e){r!==Ct(e,e.activeKey)&&wt(t.store,kt(t),r)}}},{key:"render",value:function(){var e=this,t=Object(w.a)({},this.props);this.instanceArray=[];var n={className:c()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,a=t.visible,o=t.level,l=t.mode,h=t.overflowedIndicator,d=t.theme;return ee.forEach((function(e){return delete t[e]})),delete t.onClick,s.createElement(xt,Object(w.a)({},t,{prefixCls:r,mode:l,tag:"ul",level:o,theme:d,visible:a,overflowedIndicator:h},n),Object(u.a)(t.children).map((function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")})))}}]),n}(s.Component);St.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:$};var Tt=Object(_.b)()(St),_t=n("Kwbf");function Ot(e,t,n){var r=e.prefixCls,i=e.motion,a=e.defaultMotions,o=void 0===a?{}:a,s=e.openAnimation,l=e.openTransitionName,c=t.switchingModeFromInline;if(i)return i;if("object"===Object(M.a)(s)&&s)Object(_t.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=o[n];return u||(c?null:o.other)}var Lt=function(e){Object(S.a)(n,e);var t=Object(T.a)(n);function n(e){var r;Object(k.a)(this,n),(r=t.call(this,e)).onSelect=function(e){var t=Object(E.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys,i=e.key;n=t.multiple?n.concat([i]):[i],"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onSelect(Object(o.a)(Object(o.a)({},e),{},{selectedKeys:n}))}},r.onClick=function(e){var t=r.getRealMenuMode(),n=Object(E.a)(r),i=n.store,a=n.props.onOpenChange;"inline"===t||"openKeys"in r.props||(i.setState({openKeys:[]}),a([])),r.props.onClick(e)},r.onKeyDown=function(e,t){r.innerMenu.getWrappedInstance().onKeyDown(e,t)},r.onOpenChange=function(e){var t=Object(E.a)(r).props,n=r.store.getState().openKeys.concat(),i=!1,a=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var r=n.indexOf(e.key);(t=-1!==r)&&n.splice(r,1)}i=i||t};Array.isArray(e)?e.forEach(a):a(e),i&&("openKeys"in r.props||r.store.setState({openKeys:n}),t.onOpenChange(n))},r.onDeselect=function(e){var t=Object(E.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys.concat(),i=e.key,a=n.indexOf(i);-1!==a&&n.splice(a,1),"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onDeselect(Object(o.a)(Object(o.a)({},e),{},{selectedKeys:n}))}},r.onMouseEnter=function(e){r.restoreModeVerticalFromInline();var t=r.props.onMouseEnter;t&&t(e)},r.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,i="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,a="font-size"===e.propertyName&&i.indexOf("anticon")>=0;(t||a)&&r.restoreModeVerticalFromInline()},r.setInnerMenu=function(e){r.innerMenu=e},r.isRootMenu=!0;var i=e.defaultSelectedKeys,a=e.defaultOpenKeys;return"selectedKeys"in e&&(i=e.selectedKeys||[]),"openKeys"in e&&(a=e.openKeys||[]),r.store=Object(_.c)({selectedKeys:i,openKeys:a,activeKey:{"0-menu-":Ct(e,e.activeKey)}}),r.state={switchingModeFromInline:!1,prevProps:e,inlineOpenKeys:[],store:r.store},r}return Object(C.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&i([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(o.a)({},Object(O.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(o.a)(Object(o.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ot(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,s.createElement(_.a,{store:this.store},s.createElement(Tt,Object(w.a)({},e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.store,i=r.getState(),a={},o={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(o.switchingModeFromInline=!0),"openKeys"in e?a.openKeys=e.openKeys||[]:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(o.switchingModeFromInline=!0,o.inlineOpenKeys=i.openKeys,a.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(a.openKeys=t.inlineOpenKeys,o.inlineOpenKeys=[])),Object.keys(a).length&&r.setState(a),o}}]),n}(s.Component);Lt.defaultProps={selectable:!0,onClick:$,onSelect:$,onOpenChange:$,onDeselect:$,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:s.createElement("span",null,"···")};var At=Lt,Dt=function(e){Object(S.a)(n,e);var t=Object(T.a)(n);function n(){var e;return Object(k.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===v.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseLeave;i({key:r,hover:!1}),a({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseEnter;i({key:r,hover:!0}),a({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,i=n.multiple,a=n.onClick,o=n.onSelect,s=n.onDeselect,l=n.isSelected,c={key:r,keyPath:[r],item:Object(E.a)(e),domEvent:t};a(c),i?l?s(c):o(c):l||o(c)},e.saveNode=function(t){e.node=t},e}return Object(C.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(o.a)({},this.props),n=c()(this.getPrefixCls(),t.className,(e={},Object(r.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(r.a)(e,this.getSelectedClassName(),t.isSelected),Object(r.a)(e,this.getDisabledClassName(),t.disabled),e)),i=Object(o.a)(Object(o.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?i=Object(o.a)(Object(o.a)({},i),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(i.role="none");var a={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},l=Object(o.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?l.paddingRight=t.inlineIndent*t.level:l.paddingLeft=t.inlineIndent*t.level),ee.forEach((function(e){return delete t[e]})),delete t.direction;var u=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(u=s.createElement(this.props.itemIcon,this.props)),s.createElement("li",Object(w.a)({},Object(O.a)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,a,{style:l,ref:this.saveNode}),t.children,u)}}]),n}(s.Component);Dt.isMenuItem=!0,Dt.defaultProps={onSelect:$,onMouseEnter:$,onMouseLeave:$,manualRef:$};var Mt=Object(_.b)((function(e,t){var n=e.activeKey,r=e.selectedKeys,i=t.eventKey;return{active:n[t.subMenuKey]===i,isSelected:Array.isArray(r)?-1!==r.indexOf(i):r===i}}))(Dt),Rt=function(e){Object(S.a)(n,e);var t=Object(T.a)(n);function n(){var e;return Object(k.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(C.a)(n,[{key:"render",value:function(){var e=Object(w.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,i="".concat(r,"-item-group-title"),a="".concat(r,"-item-group-list"),o=e.title,l=e.children;return ee.forEach((function(t){return delete e[t]})),delete e.direction,s.createElement("li",Object(w.a)({},e,{onClick:function(e){return e.stopPropagation()},className:"".concat(n," ").concat(r,"-item-group")}),s.createElement("div",{className:i,title:"string"==typeof o?o:void 0},o),s.createElement("ul",{className:a},s.Children.map(l,this.renderInnerMenuItem)))}}]),n}(s.Component);Rt.isMenuItemGroup=!0,Rt.defaultProps={disabled:!0};var It=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return s.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};It.defaultProps={disabled:!0,className:"",style:{}};var jt=At,Nt=n("eDIo");var Pt=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,a=e.style;return r&&!1!==r.showAdd?s.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:a,"aria-label":(null==i?void 0:i.addAriaLabel)||"Add tab",onClick:function(e){r.onEdit("add",{event:e})}},r.addIcon||"+"):null}));var Ft=s.forwardRef((function(e,t){var n=e.prefixCls,a=e.id,o=e.tabs,l=e.locale,u=e.mobile,h=e.moreIcon,d=void 0===h?"More":h,f=e.moreTransitionName,p=e.style,m=e.className,g=e.editable,y=e.tabBarGutter,b=e.rtl,x=e.onTabClick,w=Object(s.useState)(!1),k=Object(i.a)(w,2),C=k[0],E=k[1],S=Object(s.useState)(null),T=Object(i.a)(S,2),_=T[0],O=T[1],L="".concat(a,"-more-popup"),A="".concat(n,"-dropdown"),D=null!==_?"".concat(L,"-").concat(_):null,M=null==l?void 0:l.dropdownAriaLabel,R=s.createElement(jt,{onClick:function(e){var t=e.key,n=e.domEvent;x(t,n),E(!1)},id:L,tabIndex:-1,role:"listbox","aria-activedescendant":D,selectedKeys:[_],"aria-label":void 0!==M?M:"expanded dropdown"},o.map((function(e){return s.createElement(Mt,{key:e.key,id:"".concat(L,"-").concat(e.key),role:"option","aria-controls":a&&"".concat(a,"-panel-").concat(e.key),disabled:e.disabled},e.tab)})));function I(e){for(var t=o.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===_}))||0,r=t.length,i=0;it?"left":"right"})})),V=Object(i.a)(U,2),W=V[0],G=V[1],K=zt(0,(function(e,t){!z&&M&&M({direction:e>t?"top":"bottom"})})),Y=Object(i.a)(K,2),q=Y[0],X=Y[1],$=Object(s.useState)(0),Q=Object(i.a)($,2),J=Q[0],Z=Q[1],ee=Object(s.useState)(0),te=Object(i.a)(ee,2),ne=te[0],re=te[1],ie=Object(s.useState)(0),ae=Object(i.a)(ie,2),oe=ae[0],se=ae[1],le=Object(s.useState)(0),ce=Object(i.a)(le,2),ue=ce[0],he=ce[1],de=Object(s.useState)(null),fe=Object(i.a)(de,2),pe=fe[0],me=fe[1],ge=Object(s.useState)(null),ve=Object(i.a)(ge,2),ye=ve[0],be=ve[1],xe=Object(s.useState)(0),we=Object(i.a)(xe,2),ke=we[0],Ce=we[1],Ee=Object(s.useState)(0),Se=Object(i.a)(Ee,2),Te=Se[0],_e=Se[1],Oe=function(e){var t=Object(s.useRef)([]),n=Object(s.useState)({}),r=Object(i.a)(n,2)[1],a=Object(s.useRef)("function"==typeof e?e():e),o=g((function(){var e=a.current;t.current.forEach((function(t){e=t(e)})),t.current=[],a.current=e,r({})}));return[a.current,function(e){t.current.push(e),o()}]}(new Map),Le=Object(i.a)(Oe,2),Ae=Le[0],De=Le[1],Me=function(e,t,n){return Object(s.useMemo)((function(){for(var n,r=new Map,i=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||b,a=i.left+i.width,s=0;sje?[je,!1]:[e,!0]}z?E?(Ie=0,je=Math.max(0,J-pe)):(Ie=Math.min(0,pe-J),je=0):(Ie=Math.min(0,ye-ne),je=0);var Pe=Object(s.useRef)(),Fe=Object(s.useState)(),Be=Object(i.a)(Fe,2),He=Be[0],ze=Be[1];function Ue(){ze(Date.now())}function Ve(){window.clearTimeout(Pe.current)}function We(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=Me.get(e);if(t)if(z){var n=W;E?t.rightW+pe&&(n=t.right+t.width-pe):t.left<-W?n=-t.left:t.left+t.width>-W+pe&&(n=-(t.left+t.width-pe)),X(0),G(Ne(n)[0])}else{var r=q;t.top<-q?r=-t.top:t.top+t.height>-q+ye&&(r=-(t.top+t.height-ye)),G(0),X(Ne(r)[0])}}!function(e,t){var n=Object(s.useState)(),r=Object(i.a)(n,2),a=r[0],o=r[1],l=Object(s.useState)(0),c=Object(i.a)(l,2),u=c[0],h=c[1],d=Object(s.useState)(0),f=Object(i.a)(d,2),p=f[0],m=f[1],g=Object(s.useState)(),v=Object(i.a)(g,2),y=v[0],b=v[1],x=Object(s.useRef)(),w=Object(s.useRef)(0),k=Object(s.useRef)(!1),C=Object(s.useRef)(),E=Object(s.useRef)(null);E.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;o({x:n,y:r}),window.clearInterval(x.current)},onTouchMove:function(e){if(a){e.preventDefault();var n=e.touches[0],r=n.screenX,i=n.screenY;o({x:r,y:i});var s=r-a.x,l=i-a.y;t(s,l);var c=Date.now();h(c),m(c-u),b({x:s,y:l})}},onTouchEnd:function(){if(a&&(o(null),b(null),y)){var e=y.x/p,n=y.y/p,r=Math.abs(e),i=Math.abs(n);if(Math.max(r,i)<.1)return;var s=e,l=n;x.current=window.setInterval((function(){Math.abs(s)<.01&&Math.abs(l)<.01?window.clearInterval(x.current):t(20*(s*=Ht),20*(l*=Ht))}),20)}},onWheel:function(e){var n=e.deltaX,r=e.deltaY,i=0,a=Math.abs(n),o=Math.abs(r);a===o?i="x"===C.current?n:r:a>o?(i=n,C.current="x"):(i=r,C.current="y");var s=Date.now();s-w.current>100&&(k.current=!1),(t(-i,-i)||k.current)&&(e.preventDefault(),k.current=!0),w.current=s}},s.useEffect((function(){function t(e){E.current.onTouchMove(e)}function n(e){E.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){E.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){E.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(R,(function(e,t){var n=!1;function r(e,t){e((function(e){var r=Ne(e+t),a=Object(i.a)(r,2),o=a[0],s=a[1];return n=s,o}))}if(z){if(pe>=J)return n;r(G,e)}else{if(ye>=ne)return n;r(X,t)}return Ve(),Ue(),n})),Object(s.useEffect)((function(){return Ve(),He&&(Pe.current=window.setTimeout((function(){ze(0)}),100)),Ve}),[He]);var Ge=function(e,t,n,r,i){var a,o,l,c=i.tabs,u=i.tabPosition,h=i.rtl;["top","bottom"].includes(u)?(a="width",o=h?"right":"left",l=Math.abs(t.left)):(a="height",o="top",l=-t.top);var d=t[a],f=n[a],p=r[a],m=d;return f+p>d&&(m=d-p),Object(s.useMemo)((function(){if(!c.length)return[0,0];for(var t=c.length,n=t,r=0;rl+m){n=r-1;break}}for(var s=0,u=t-1;u>=0;u-=1){if((e.get(c[u].key)||x)[o]0,st=W+pe` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 g(e,t,n){return t.f=t.inline=n,n(e,t)}function v(e,t,n){return t.f=t.block=n,n(e,t)}function y(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==x){var n=i;if(!n){var a=e.innerMode(r,t.htmlState);n="xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText}n&&(t.f=E,t.block=b,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function b(r,i){var o,d=r.column()===i.indentation,m=!(o=i.prevLine.stream)||!/\S/.test(o.string),v=i.indentedCode,y=i.prevLine.hr,b=!1!==i.list,x=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var C=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,b)){for(i.list=null;C=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return r.skipToEnd(),i.indentedCode=!0,a.code;if(r.eatSpace())return null;if(d&&i.indentation<=x&&(T=r.match(u))&&T[1].length<=6)return i.quote=0,i.header=T[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,k(i);if(i.indentation<=x&&r.eat(">"))return i.quote=d?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),r.eatSpace(),k(i);if(!S&&!i.setext&&d&&i.indentation<=x&&(T=r.match(l))){var _=T[1]?"ol":"ul";return i.indentation=C+r.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&r.match(c,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+_]),k(i)}return d&&i.indentation<=x&&(T=r.match(f,!0))?(i.quote=0,i.fencedEndRE=new RegExp(T[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&function(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}(T[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=w,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,k(i)):i.setext||!(E&&b||i.quote||!1!==i.list||i.code||S||p.test(r.string))&&(T=r.lookAhead(1))&&(T=T.match(h))?(i.setext?(i.header=i.setext,i.setext=0,r.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==T[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,k(i)):S?(r.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,a.hr):"["===r.peek()?g(r,i,O):g(r,i,i.inline)}function x(t,n){var a=r.token(t,n.htmlState);if(!i){var o=e.innerMode(r,n.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=E,n.block=b,n.htmlState=null)}return a}function w(e,t){var r,i=t.listStack[t.listStack.length-1]||0,o=t.indentation=e.quote?t.push(a.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function C(e,t){if(e.match(d,!0))return k(t)}function E(t,i){var o=i.text(t,i);if(void 0!==o)return o;if(i.list)return i.list=null,k(i);if(i.taskList)return" "===t.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,k(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),k(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(u),!0))return a.linkHref}if("`"===s){var h=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var d=t.current().length;if(0!=i.code||i.quote&&1!=d){if(d==i.code){var f=k(i);return i.code=0,f}return i.formatting=h,k(i)}return i.code=d,k(i)}if(i.code)return k(i);if("\\"===s&&(t.next(),n.highlightFormatting)){var p=k(i),g=a.formatting+"-escape";return p?p+" "+g:g}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),k(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),k(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var p=k(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=T,p}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),k(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var p=k(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?T:E,p}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link"),(p=k(i))?p+=" ":p="",p+a.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link"),(p=k(i))?p+=" ":p="",p+a.linkEmail;if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=t.string.indexOf(">",t.pos);if(-1!=y){var b=t.string.substring(t.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),v(t,i,x)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var w=1,C=1==t.pos?" ":t.string.charAt(t.pos-2);w<3&&t.eat(s);)w++;var _=t.peek()||" ",O=!/\s/.test(_)&&(!m.test(_)||/\s/.test(C)||m.test(C)),L=!/\s/.test(C)&&(!m.test(C)||/\s/.test(_)||m.test(_)),A=null,D=null;if(w%2&&(i.em||!O||"*"!==s&&L&&!m.test(C)?i.em!=s||!L||"*"!==s&&O&&!m.test(_)||(A=!1):A=!0),w>1&&(i.strong||!O||"*"!==s&&L&&!m.test(C)?i.strong!=s||!L||"*"!==s&&O&&!m.test(_)||(D=!1):D=!0),null!=D||null!=A)return n.highlightFormatting&&(i.formatting=null==A?"strong":null==D?"em":"strong em"),!0===A&&(i.em=s),!0===D&&(i.strong=s),f=k(i),!1===A&&(i.em=!1),!1===D&&(i.strong=!1),f}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return k(i);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),f=k(i),i.strikethrough=!1,f;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),k(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return k(i);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var M=k(i);return i.emoji=!1,M}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),k(i)}function S(e,t){if(">"===e.next()){t.f=t.inline=E,n.highlightFormatting&&(t.formatting="link");var r=k(t);return r?r+=" ":r="",r+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function T(e,t){if(e.eatSpace())return null;var r,i=e.next();return"("===i||"["===i?(t.f=t.inline=(r="("===i?")":"]",function(e,t){if(e.next()===r){t.f=t.inline=E,n.highlightFormatting&&(t.formatting="link-string");var i=k(t);return t.linkHref=!1,i}return e.match(_[r]),t.linkHref=!0,k(t)}),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,k(t)):"error"}var _={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function O(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=L,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,k(t)):g(e,t,E)}function L(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=A,n.highlightFormatting&&(t.formatting="link");var r=k(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function A(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=E,a.linkHref+" url")}var D={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:E,text:C,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(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return y(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=x)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==x?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:D}},indent:function(t,n,i){return t.block==x&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:y,getType:k,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return D}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../xml/xml */"1eCo"),n(/*! ../meta */"8EBN"))},loD1: +/*!**************************************************!*\ + !*** ./node_modules/zrender/lib/contain/line.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){t.containStroke=function(e,t,n,r,i,a,o){if(0===i)return!1;var s=i,l=0;if(o>t+s&&o>r+s||oe+s&&a>n+s||a=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height},clone:function(){return new d(this.x,this.y,this.width,this.height)},copy:function(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},d.create=function(e){return new d(e.x,e.y,e.width,e.height)};var f=d;e.exports=f},mLcG: +/*!*********************************************************************!*\ + !*** ./node_modules/zrender/lib/animation/requestAnimationFrame.js ***! + \*********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)};e.exports=n},mOS8: +/*!*****************************************!*\ + !*** ./src/assets/images/403Qrcode.png ***! + \*****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/403Qrcode.6c17b6f4.png"},mgmH: +/*!*****************************!*\ + !*** ./src/utils/export.ts ***! + \*****************************/ +/*! exports provided: ExportCourseInfo, ExportCourseActScore, ExportCourseMemberScores, ExportCourseAndOther, exportMoocrecord, ExportCourseTotalScore, ExportCourseWorkListScores, ExportCourseWorkListAppendix, ExportPollsScores, ExportAttendance, ExportVideoStudent, ExportCourseStudentsInfo, ExportProblemset, Exportcompetitions, ExportExerciseStudentScores, getDownFile, getecyears, getec_training_objectives, getec_graduation_requirements */ +/*! exports used: ExportAttendance, ExportCourseActScore, ExportCourseAndOther, ExportCourseInfo, ExportCourseMemberScores, ExportCourseStudentsInfo, ExportCourseTotalScore, ExportCourseWorkListScores, ExportExerciseStudentScores, ExportPollsScores, ExportProblemset, ExportVideoStudent, Exportcompetitions, exportMoocrecord, getDownFile, getec_graduation_requirements, getec_training_objectives, getecyears */function(e,t,n){"use strict";n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"e",(function(){return g})),n.d(t,"c",(function(){return v})),n.d(t,"n",(function(){return y})),n.d(t,"g",(function(){return b})),n.d(t,"h",(function(){return x})),n.d(t,"j",(function(){return w})),n.d(t,"a",(function(){return k})),n.d(t,"l",(function(){return C})),n.d(t,"f",(function(){return E})),n.d(t,"k",(function(){return S})),n.d(t,"m",(function(){return T})),n.d(t,"i",(function(){return _})),n.d(t,"o",(function(){return O})),n.d(t,"r",(function(){return L})),n.d(t,"q",(function(){return A})),n.d(t,"p",(function(){return D}));n(/*! antd/es/message/style */"miYZ");var r=n(/*! antd/es/message */"tsqr"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),s=n.n(o),l=n(/*! @/service/classrooms */"oUNq"),c=n(/*! umi */"9kvl"),u=n(/*! ./util */"1vsH"),h=n(/*! ./env */"m3rI"),d=function(){Object(c.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在生成文件,请稍后..."}})},f=function(){Object(c.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},p=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(),e.next=3,Object(l.s)(Object(i.a)({},t));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,Object(u.u)("",Object(u.U)({url:h.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/export_couser_info.json"),query:t}));case 7:f();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.q)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_member_act_score")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_member_act_score")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.t)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_score")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_score")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.r)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.y)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.u)(Object(i.a)({},t));case 2:if(0!==(n=e.sent).status){e.next=8;break}r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_homework")),e.next=13;break;case 8:if(-2!==n.status){e.next=12;break}return e.abrupt("return",n);case 12:-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/course_total_homework")));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=Object(a.a)(s.a.mark((function e(t,n){var a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.w)(Object(i.a)({},t));case 2:0===(a=e.sent).status?(r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/").concat(n))):-3===a.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/").concat(n)));case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),w=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(),e.next=3,Object(l.z)(Object(i.a)({},t));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,Object(u.u)("",Object(u.U)({url:h.a.API_SERVER+"/api/polls/".concat(t.categoryId,"/commit_result.xlsx"),query:t}));case 7:f();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/attendances/export_xlsx_data.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),C=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/video_study_statics.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/courses/".concat(t.coursesId,"/export_course_students_info.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/item_banks/export.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/competitions/region_reports.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_=function(){var e=Object(a.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.x)(Object(i.a)({},t));case 2:0===(n=e.sent).status?(r.b.info("导出任务生成成功"),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/exercise_score"))):-3===n.status&&(Object(c.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.d.push("/classrooms/".concat(t.coursesId,"/exportlist/exercise_score")));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("----------","调用下载"),e.next=3,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/export_records/".concat(t.id,".xlsx"),query:t}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),L=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/ec_years/".concat(null==t?void 0:t.ec_year_id,"/ec_training_objectives.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=Object(a.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.t)("",Object(u.U)({url:h.a.API_SERVER+"/api/ec_years/".concat(null==t?void 0:t.ec_year_id,"/ec_graduation_requirements.xlsx"),query:t}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},n1HI: +/*!*************************************************!*\ + !*** ./node_modules/zrender/lib/contain/arc.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./util */"hX1E").normalizeRadian,i=2*Math.PI;t.containStroke=function(e,t,n,a,o,s,l,c,u){if(0===l)return!1;var h=l;c-=e,u-=t;var d=Math.sqrt(c*c+u*u);if(d-h>n||d+ho&&(o+=i);var p=Math.atan2(u,c);return p<0&&(p+=i),p>=a&&p<=o||p+i>=a&&p+i<=o}},n6Mw: +/*!****************************************************************!*\ + !*** ./node_modules/zrender/lib/svg/helper/ClippathManager.js ***! + \****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Definable */"SrGk"),i=n(/*! ../../core/util */"bYtY"),a=n(/*! ../../core/matrix */"Fofx");function o(e,t){r.call(this,e,t,"clipPath","__clippath_in_use__")}i.inherits(o,r),o.prototype.update=function(e){var t=this.getSvgElement(e);t&&this.updateDom(t,e.__clipPaths,!1);var n=this.getTextSvgElement(e);n&&this.updateDom(n,e.__clipPaths,!0),this.markUsed(e)},o.prototype.updateDom=function(e,t,n){if(t&&t.length>0){var r,i,o=this.getDefs(!0),s=t[0],l=n?"_textDom":"_dom";s[l]?(i=s[l].getAttribute("id"),r=s[l],o.contains(r)||o.appendChild(r)):(i="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",i),o.appendChild(r),s[l]=r);var c=this.getSvgProxy(s);if(s.transform&&s.parent.invTransform&&!n){var u=Array.prototype.slice.call(s.transform);a.mul(s.transform,s.parent.invTransform,s.transform),c.brush(s),s.transform=u}else c.brush(s);var h=this.getSvgElement(s);r.innerHTML="",r.appendChild(h.cloneNode()),e.setAttribute("clip-path","url(#"+i+")"),t.length>1&&this.updateDom(r,t.slice(1),n)}else e&&e.setAttribute("clip-path","none")},o.prototype.markUsed=function(e){var t=this;e.__clipPaths&&i.each(e.__clipPaths,(function(e){e._dom&&r.prototype.markUsed.call(t,e._dom),e._textDom&&r.prototype.markUsed.call(t,e._textDom)}))};var s=o;e.exports=s},n6Qo: +/*!**************************************************************!*\ + !*** ./node_modules/rc-table/es/Footer/index.js + 2 modules ***! + \**************************************************************/ +/*! exports provided: default, FooterComponents */ +/*! exports used: FooterComponents, default */ +/*! 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/context/TableContext.js because of ./node_modules/antd/es/table/Table.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 o}));var r=n("q1tI"),i=n("biw7"),a=n("fyJ8");t.b=function(e){var t=e.children,n=r.useContext(i.a).prefixCls;return r.createElement("tfoot",{className:"".concat(n,"-summary")},t)};var o={Cell:function(e){var t=e.className,n=e.index,o=e.children,s=e.colSpan,l=e.rowSpan,c=r.useContext(i.a),u=c.prefixCls,h=c.fixedInfoList[n];return r.createElement(a.a,Object.assign({className:t,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,render:function(){return{children:o,props:{colSpan:s,rowSpan:l}}}},h))},Row:function(e){return r.createElement("tr",Object.assign({},e))}}},nCxF: +/*!*****************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/helper/smoothBezier.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../../core/vector */"QBsz"),i=r.min,a=r.max,o=r.scale,s=r.distance,l=r.add,c=r.clone,u=r.sub;e.exports=function(e,t,n,r){var h,d,f,p,m=[],g=[],v=[],y=[];if(r){f=[1/0,1/0],p=[-1/0,-1/0];for(var b=0,x=e.length;b2&&void 0!==arguments[2]?arguments[2]:"0",r=String(e);r.length=12,L%=12);var P=u.useMemo((function(){if(!f)return[!1,!1];var e=[!0,!0];return N.forEach((function(t){var n=t.disabled,r=t.value;n||(r>=12?e[1]=!1:e[0]=!1)})),e}),[f,N]),z=Object(c.a)(P,2),U=z[0],V=z[1],W=u.useMemo((function(){return f?N.filter(t?function(e){return e.value>=12}:function(e){return e.value<12}).map((function(e){var t=e.value%12,n=0===t?"12":R(t,2);return Object(l.a)(Object(l.a)({},e),{},{label:n,value:t})})):N}),[f,N]),G=H(0,59,v,k&&k(L)),K=H(0,59,b,C&&C(L,A));function Y(e,t,n,r,i){!1!==e&&T.push({node:u.cloneElement(t,{prefixCls:O,value:n,active:a===T.length,onSelect:i,units:r,hideDisabledOptions:E}),onSelect:i,value:n,units:r})}i.current={onUpDown:function(e){var t=T[a];if(t)for(var n=t.units.findIndex((function(e){return e.value===t.value})),r=t.units.length,i=1;i3&&void 0!==arguments[3]?arguments[3]:1;switch(t){case"year":return n.addYear(e,10*r);case"quarter":case"month":return n.addYear(e,r);default:return n.addMonth(e,r)}}var Z=u.createContext({});function ee(e){var t=e.cellPrefixCls,n=e.generateConfig,r=e.rangedValue,i=e.hoverRangedValue,a=e.isInView,o=e.isSameCell,l=e.offsetCell,c=e.today,u=e.value;return function(e){var h,d=l(e,-1),f=l(e,1),p=N(r,0),m=N(r,1),g=N(i,0),v=N(i,1),y=Q(n,g,v,e);function b(e){return o(p,e)}function x(e){return o(m,e)}var w=o(g,e),k=o(v,e),C=(y||k)&&(!a(d)||x(d)),E=(y||w)&&(!a(f)||b(f));return h={},Object(s.a)(h,"".concat(t,"-in-view"),a(e)),Object(s.a)(h,"".concat(t,"-in-range"),Q(n,p,m,e)),Object(s.a)(h,"".concat(t,"-range-start"),b(e)),Object(s.a)(h,"".concat(t,"-range-end"),x(e)),Object(s.a)(h,"".concat(t,"-range-start-single"),b(e)&&!m),Object(s.a)(h,"".concat(t,"-range-end-single"),x(e)&&!p),Object(s.a)(h,"".concat(t,"-range-start-near-hover"),b(e)&&(o(d,g)||Q(n,g,v,d))),Object(s.a)(h,"".concat(t,"-range-end-near-hover"),x(e)&&(o(f,v)||Q(n,g,v,f))),Object(s.a)(h,"".concat(t,"-range-hover"),y),Object(s.a)(h,"".concat(t,"-range-hover-start"),w),Object(s.a)(h,"".concat(t,"-range-hover-end"),k),Object(s.a)(h,"".concat(t,"-range-hover-edge-start"),C),Object(s.a)(h,"".concat(t,"-range-hover-edge-end"),E),Object(s.a)(h,"".concat(t,"-range-hover-edge-start-near-range"),C&&o(d,m)),Object(s.a)(h,"".concat(t,"-range-hover-edge-end-near-range"),E&&o(f,p)),Object(s.a)(h,"".concat(t,"-today"),o(c,e)),Object(s.a)(h,"".concat(t,"-selected"),o(u,e)),h}}function te(e){for(var t=e.prefixCls,n=e.disabledDate,r=e.onSelect,i=e.rowNum,a=e.colNum,o=e.prefixColumn,c=e.rowClassName,h=e.baseDate,f=e.getCellClassName,p=e.getCellText,m=e.getCellNode,g=e.getCellDate,y=e.titleCell,b=e.headerCells,x=u.useContext(v),w=x.onDateMouseEnter,k=x.onDateMouseLeave,C="".concat(t,"-cell"),E=[],S=0;S1&&(o=t.addDate(o,-7)),o}(i.locale,n,o),p="".concat(t,"-cell"),m=n.locale.getWeekFirstDay(i.locale),g=n.getNow(),v=[],y=i.shortWeekDays||(n.locale.getShortWeekDays?n.locale.getShortWeekDays(i.locale):[]);r&&v.push(u.createElement("th",{key:"empty","aria-label":"empty cell"}));for(var b=0;b<7;b+=1)v.push(u.createElement("th",{key:b},y[(b+m)%7]));var x=ee({cellPrefixCls:p,today:g,value:s,generateConfig:n,rangedValue:r?null:h,hoverRangedValue:r?null:d,isSameCell:function(e,t){return q(n,e,t)},isInView:function(e){return Y(n,e,o)},offsetCell:function(e,t){return n.addDate(e,t)}}),w=l?function(e){return l(e,g)}:void 0;return u.createElement(te,Object.assign({},e,{rowNum:a,colNum:7,baseDate:f,getCellNode:w,getCellText:n.getDate,getCellClassName:x,getCellDate:n.addDate,titleCell:function(e){return n.locale.format(i.locale,e,"YYYY-MM-DD")},headerCells:v}))};var re=function(e){var t=e.prefixCls,n=e.generateConfig,r=e.locale,i=e.viewDate,a=e.onNextMonth,o=e.onPrevMonth,s=e.onNextYear,l=e.onPrevYear,c=e.onYearClick,h=e.onMonthClick;if(u.useContext(v).hideHeader)return null;var d="".concat(t,"-header"),f=r.shortMonths||(n.locale.getShortMonths?n.locale.getShortMonths(r.locale):[]),p=n.getMonth(i),m=u.createElement("button",{type:"button",key:"year",onClick:c,tabIndex:-1,className:"".concat(t,"-year-btn")},n.locale.format(r.locale,i,r.yearFormat)),g=u.createElement("button",{type:"button",key:"month",onClick:h,tabIndex:-1,className:"".concat(t,"-month-btn")},r.monthFormat?n.locale.format(r.locale,i,r.monthFormat):f[p]),y=r.monthBeforeYear?[g,m]:[m,g];return u.createElement(b,Object.assign({},e,{prefixCls:d,onSuperPrev:l,onPrev:o,onNext:a,onSuperNext:s}),y)};var ie=function(e){var t=e.prefixCls,n=e.panelName,r=void 0===n?"date":n,i=e.keyboardConfig,a=e.active,o=e.operationRef,c=e.generateConfig,h=e.value,f=e.viewDate,p=e.onViewDateChange,m=e.onPanelChange,g=e.onSelect,v="".concat(t,"-").concat(r,"-panel");o.current={onKeyDown:function(e){return S(e,Object(l.a)({onLeftRight:function(e){g(c.addDate(h||f,e),"key")},onCtrlLeftRight:function(e){g(c.addYear(h||f,e),"key")},onUpDown:function(e){g(c.addDate(h||f,7*e),"key")},onPageUpDown:function(e){g(c.addMonth(h||f,e),"key")}},i))}};var y=function(e){var t=c.addYear(f,e);p(t),m(null,t)},b=function(e){var t=c.addMonth(f,e);p(t),m(null,t)};return u.createElement("div",{className:d()(v,Object(s.a)({},"".concat(v,"-active"),a))},u.createElement(re,Object.assign({},e,{prefixCls:t,value:h,viewDate:f,onPrevYear:function(){y(-1)},onNextYear:function(){y(1)},onPrevMonth:function(){b(-1)},onNextMonth:function(){b(1)},onMonthClick:function(){m("month",f)},onYearClick:function(){m("year",f)}})),u.createElement(ne,Object.assign({},e,{onSelect:function(e){return g(e,"mouse")},prefixCls:t,value:h,viewDate:f,rowCount:6})))};var ae=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]&&arguments[2];(Ne===S||n)&&(_e(e),I&&I(e),le&&le(e,t),j&&!$(h,e,Te)&&j(e))},We=function(e){return be.current&&be.current.onKeyDown?([g.a.LEFT,g.a.RIGHT,g.a.UP,g.a.DOWN,g.a.PAGE_UP,g.a.PAGE_DOWN,g.a.ENTER].includes(e.which)&&e.preventDefault(),be.current.onKeyDown(e)):(Object(f.a)(!1,"Panel not correct handle keyDown event. Please help to fire issue about this."),!1)};re&&"right"!==me&&(re.current={onKeyDown:We,onClose:function(){be.current&&be.current.onClose&&be.current.onClose()}}),u.useEffect((function(){y&&!xe.current&&De(y)}),[y]),u.useEffect((function(){xe.current=!1}),[]);var Ge,Ke,Ye,qe=Object(l.a)(Object(l.a)({},e),{},{operationRef:be,prefixCls:r,viewDate:Ae,value:Te,onViewDateChange:Me,sourceMode:ze,onPanelChange:function(e,t){var n=Re(e||Ne);Ue(Ne),Pe(n),N&&(Ne!==n||$(h,Ae,Ae))&&N(t,n)},disabledDate:"decade"!==Ne?k:void 0});switch(delete qe.onChange,delete qe.onSelect,Ne){case"decade":Fe=u.createElement(ke,Object.assign({},qe,{onSelect:function(e,t){Me(e),Ve(e,t)}}));break;case"year":Fe=u.createElement(ve,Object.assign({},qe,{onSelect:function(e,t){Me(e),Ve(e,t)}}));break;case"month":Fe=u.createElement(ue,Object.assign({},qe,{onSelect:function(e,t){Me(e),Ve(e,t)}}));break;case"quarter":Fe=u.createElement(fe,Object.assign({},qe,{onSelect:function(e,t){Me(e),Ve(e,t)}}));break;case"week":Fe=u.createElement(se,Object.assign({},qe,{onSelect:function(e,t){Me(e),Ve(e,t)}}));break;case"time":delete qe.showTime,Fe=u.createElement(U,Object.assign({},qe,"object"===Object(m.a)(L)?L:null,{onSelect:function(e,t){Me(e),Ve(e,t)}}));break;default:Fe=L?u.createElement(oe,Object.assign({},qe,{onSelect:function(e,t){Me(e),Ve(e,t)}})):u.createElement(ie,Object.assign({},qe,{onSelect:function(e,t){Me(e),Ve(e,t)}}))}if(ce||(Ge=Ce(r,Ne,M),Ke=Ee({prefixCls:r,components:z,needConfirmButton:Q,okDisabled:!Te||k&&k(Te),locale:o,showNow:O,onNow:Q&&function(){var e=h.getNow(),t=function(e,t,n,r,i,a){var o=Math.floor(e/r)*r;if(o1&&void 0!==arguments[1]&&arguments[1];cancelAnimationFrame(h.current),t?l(e):h.current=requestAnimationFrame((function(){l(e)}))}var f=Re(s,{formatList:n,generateConfig:r,locale:i}),p=Object(c.a)(f,2)[1];function m(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d(null,e)}return Object(u.useEffect)((function(){m(!0)}),[e]),Object(u.useEffect)((function(){return function(){return cancelAnimationFrame(h.current)}}),[]),[p,function(e){d(e)},m]}function je(e){var t,n=e.prefixCls,r=void 0===n?"rc-picker":n,i=e.id,a=e.tabIndex,o=e.style,h=e.className,m=e.dropdownClassName,g=e.dropdownAlign,y=e.popupStyle,b=e.transitionName,x=e.generateConfig,w=e.locale,k=e.inputReadOnly,C=e.allowClear,E=e.autoFocus,S=e.showTime,O=e.picker,L=void 0===O?"date":O,A=e.format,M=e.use12Hours,R=e.value,N=e.defaultValue,P=e.open,F=e.defaultOpen,B=e.defaultOpenValue,H=e.suffixIcon,z=e.clearIcon,U=e.disabled,V=e.disabledDate,W=e.placeholder,G=e.getPopupContainer,K=e.pickerRef,Y=e.panelRender,q=e.onChange,X=e.onOpenChange,Q=e.onFocus,J=e.onBlur,Z=e.onMouseDown,ee=e.onMouseUp,te=e.onMouseEnter,ne=e.onMouseLeave,re=e.onContextMenu,ie=e.onClick,ae=e.direction,oe=e.autoComplete,se=void 0===oe?"off":oe,le=u.useRef(null),ce="date"===L&&!!S||"time"===L,ue=I(T(A,L,S,M)),he=u.useRef(null),de=u.useRef(null),fe=Object(p.a)(null,{value:R,defaultValue:N}),pe=Object(c.a)(fe,2),me=pe[0],ge=pe[1],ve=u.useState(me),ye=Object(c.a)(ve,2),be=ye[0],xe=ye[1],we=u.useRef(null),ke=Object(p.a)(!1,{value:P,defaultValue:F,postState:function(e){return!U&&e},onChange:function(e){X&&X(e),!e&&we.current&&we.current.onClose&&we.current.onClose()}}),Ce=Object(c.a)(ke,2),Ee=Ce[0],Te=Ce[1],_e=Re(be,{formatList:ue,generateConfig:x,locale:w}),De=Object(c.a)(_e,2),Me=De[0],je=De[1],Ne=Ae({valueTexts:Me,onTextChange:function(e){var t=x.locale.parse(w.locale,e,ue);!t||V&&V(t)||xe(t)}}),Pe=Object(c.a)(Ne,3),Fe=Pe[0],Be=Pe[1],He=Pe[2],ze=function(e){xe(e),ge(e),q&&!$(x,me,e)&&q(e,e?x.locale.format(w.locale,e,ue[0]):"")},Ue=function(e){U&&e||Te(e)},Ve=Le({blurToCancel:ce,open:Ee,value:Fe,triggerOpen:Ue,forwardKeyDown:function(e){return Ee&&we.current&&we.current.onKeyDown?we.current.onKeyDown(e):(Object(f.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},isClickOutside:function(e){return!D([he.current,de.current],e)},onSubmit:function(){return(!V||!V(be))&&(ze(be),Ue(!1),He(),!0)},onCancel:function(){Ue(!1),xe(me),He()},onFocus:Q,onBlur:J}),We=Object(c.a)(Ve,2),Ge=We[0],Ke=We[1],Ye=Ke.focused,qe=Ke.typing;u.useEffect((function(){Ee||(xe(me),Me.length&&""!==Me[0]?je!==Fe&&He():Be(""))}),[Ee,Me]),u.useEffect((function(){Ee||He()}),[L]),u.useEffect((function(){xe(me)}),[me]),K&&(K.current={focus:function(){le.current&&le.current.focus()},blur:function(){le.current&&le.current.blur()}});var Xe=Object(l.a)(Object(l.a)({},e),{},{className:void 0,style:void 0,pickerValue:void 0,onPickerValueChange:void 0}),$e=u.createElement(Se,Object.assign({},Xe,{generateConfig:x,className:d()(Object(s.a)({},"".concat(r,"-panel-focused"),!qe)),value:be,locale:w,tabIndex:-1,onChange:xe,direction:ae}));Y&&($e=Y($e));var Qe,Je,Ze=u.createElement("div",{className:"".concat(r,"-panel-container"),onMouseDown:function(e){e.preventDefault()}},$e);H&&(Qe=u.createElement("span",{className:"".concat(r,"-suffix")},H)),C&&me&&!U&&(Je=u.createElement("span",{onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},onMouseUp:function(e){e.preventDefault(),e.stopPropagation(),ze(null),Ue(!1)},className:"".concat(r,"-clear")},z||u.createElement("span",{className:"".concat(r,"-clear-btn")})));var et="rtl"===ae?"bottomRight":"bottomLeft",tt=Ie(Fe,{formatList:ue,generateConfig:x,locale:w}),nt=Object(c.a)(tt,3),rt=nt[0],it=nt[1],at=nt[2];return u.createElement(v.Provider,{value:{operationRef:we,hideHeader:"time"===L,panelRef:he,onSelect:function(e,t){("submit"===t||"key"!==t&&!ce)&&(ze(e),Ue(!1))},open:Ee,defaultOpenValue:B,onDateMouseEnter:it,onDateMouseLeave:at}},u.createElement(Oe,{visible:Ee,popupElement:Ze,popupStyle:y,prefixCls:r,dropdownClassName:m,dropdownAlign:g,getPopupContainer:G,transitionName:b,popupPlacement:et,direction:ae},u.createElement("div",{className:d()(r,h,(t={},Object(s.a)(t,"".concat(r,"-disabled"),U),Object(s.a)(t,"".concat(r,"-focused"),Ye),Object(s.a)(t,"".concat(r,"-rtl"),"rtl"===ae),t)),style:o,onMouseDown:Z,onMouseUp:function(){ee&&ee.apply(void 0,arguments),le.current&&(le.current.focus(),Ue(!0))},onMouseEnter:te,onMouseLeave:ne,onContextMenu:re,onClick:ie},u.createElement("div",{className:d()("".concat(r,"-input"),Object(s.a)({},"".concat(r,"-input-placeholder"),!!rt)),ref:de},u.createElement("input",Object.assign({id:i,tabIndex:a,disabled:U,readOnly:k||!qe,value:rt||Fe,onChange:function(e){Be(e.target.value)},autoFocus:E,placeholder:W,ref:le,title:Fe},Ge,{size:_(L,ue[0])},j(e),{autoComplete:se})),Qe,Je))))}var Ne=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).pickerRef=u.createRef(),e.focus=function(){e.pickerRef.current&&e.pickerRef.current.focus()},e.blur=function(){e.pickerRef.current&&e.pickerRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return u.createElement(je,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),n}(u.Component);function Pe(e,t,n,r){var i=J(e,n,r,1);function a(n){return n(e,t)?"same":n(i,t)?"closing":"far"}switch(n){case"year":return a((function(e,t){return function(e,t,n){var r=V(t,n);return"boolean"==typeof r?r:Math.floor(e.getYear(t)/10)===Math.floor(e.getYear(n)/10)}(r,e,t)}));case"quarter":case"month":return a((function(e,t){return W(r,e,t)}));default:return a((function(e,t){return Y(r,e,t)}))}}function Fe(e){var t=e.values,n=e.picker,r=e.defaultDates,i=e.generateConfig,a=u.useState((function(){return[N(r,0),N(r,1)]})),o=Object(c.a)(a,2),s=o[0],l=o[1],h=u.useState(null),d=Object(c.a)(h,2),f=d[0],p=d[1],m=N(t,0),g=N(t,1);return[function(e){return s[e]?s[e]:N(f,e)||function(e,t,n,r){var i=N(e,0),a=N(e,1);if(0===t)return i;if(i&&a)switch(Pe(i,a,n,r)){case"same":case"closing":return i;default:return J(a,n,r,-1)}return i}(t,e,n,i)||m||g||i.getNow()},function(e,n){if(e){var r=P(f,e,n);l(P(s,null,n)||[null,null]);var i=(n+1)%2;N(t,i)||(r=P(r,e,i)),p(r)}else(m||g)&&p(null)}]}function Be(e,t){return e&&e[0]&&e[1]&&t.isAfter(e[0],e[1])?[e[1],e[0]]:e}function He(e,t,n,r){return!!e||(!(!r||!r[t])||!!n[(t+1)%2])}function ze(e){var t,n,r,i=e.prefixCls,a=void 0===i?"rc-picker":i,o=e.id,h=e.style,g=e.className,y=e.popupStyle,b=e.dropdownClassName,x=e.transitionName,w=e.dropdownAlign,k=e.getPopupContainer,C=e.generateConfig,E=e.locale,S=e.placeholder,O=e.autoFocus,L=e.disabled,A=e.format,M=e.picker,R=void 0===M?"date":M,F=e.showTime,B=e.use12Hours,H=e.separator,z=void 0===H?"~":H,U=e.value,V=e.defaultValue,W=e.defaultPickerValue,Y=e.open,Q=e.defaultOpen,ee=e.disabledDate,te=e.disabledTime,ne=e.dateRender,re=e.panelRender,ie=e.ranges,ae=e.allowEmpty,oe=e.allowClear,se=e.suffixIcon,le=e.clearIcon,ce=e.pickerRef,ue=e.inputReadOnly,he=e.mode,de=e.renderExtraFooter,fe=e.onChange,pe=e.onOpenChange,me=e.onPanelChange,ge=e.onCalendarChange,ve=e.onFocus,ye=e.onBlur,be=e.onOk,xe=e.components,we=e.order,ke=e.direction,Te=e.activePickerIndex,_e=e.autoComplete,De=void 0===_e?"off":_e,Me="date"===R&&!!F||"time"===R,je=Object(u.useRef)({}),Ne=Object(u.useRef)(null),Pe=Object(u.useRef)(null),ze=Object(u.useRef)(null),Ue=Object(u.useRef)(null),Ve=Object(u.useRef)(null),We=Object(u.useRef)(null),Ge=Object(u.useRef)(null),Ke=I(T(A,R,F,B)),Ye=Object(p.a)(0,{value:Te}),qe=Object(c.a)(Ye,2),Xe=qe[0],$e=qe[1],Qe=Object(u.useRef)(null),Je=u.useMemo((function(){return Array.isArray(L)?L:[L||!1,L||!1]}),[L]),Ze=Object(p.a)(null,{value:U,defaultValue:V,postState:function(e){return"time"!==R||we?Be(e,C):e}}),et=Object(c.a)(Ze,2),tt=et[0],nt=et[1],rt=Fe({values:tt,picker:R,defaultDates:W,generateConfig:C}),it=Object(c.a)(rt,2),at=it[0],ot=it[1],st=Object(p.a)(tt,{postState:function(e){var t=e;if(Je[0]&&Je[1])return t;for(var n=0;n<2;n+=1)!Je[n]||N(t,n)||N(ae,n)||(t=P(t,C.getNow(),n));return t}}),lt=Object(c.a)(st,2),ct=lt[0],ut=lt[1],ht=Object(p.a)([R,R],{value:he}),dt=Object(c.a)(ht,2),ft=dt[0],pt=dt[1];Object(u.useEffect)((function(){pt([R,R])}),[R]);var mt=function(e,t){pt(e),me&&me(t,e)},gt=function(e,t,n){var r=e.picker,i=e.locale,a=e.selectedValue,o=e.disabledDate,s=e.disabled,l=e.generateConfig,c=N(a,0),h=N(a,1);function d(e){return 100*l.getYear(e)+l.locale.getWeek(i.locale,e)}function f(e){return 100*l.getYear(e)+l.getMonth(e)}function p(e){return 10*l.getYear(e)+G(l,e)}return[u.useCallback((function(e){if(o&&o(e))return!0;if(s[1]&&h)return!q(l,e,h)&&l.isAfter(e,h);if(t&&h)switch(r){case"quarter":return p(e)>p(h);case"month":return f(e)>f(h);case"week":return d(e)>d(h);default:return!q(l,e,h)&&l.isAfter(e,h)}return!1}),[o,s[1],h,t]),u.useCallback((function(e){if(o&&o(e))return!0;if(s[0]&&c)return!q(l,e,h)&&l.isAfter(c,e);if(n&&c)switch(r){case"quarter":return p(e)0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;kt&&ln&&ln[0]&&ln[1]&&C.isAfter(ln[1],ln[0])&&(r=ln);var i=F;if(F&&"object"===Object(m.a)(F)&&F.defaultValue){var o=F.defaultValue;i=Object(l.a)(Object(l.a)({},F),{},{defaultValue:N(o,Xe)||void 0})}var c=null;return ne&&(c=function(e,t){return ne(e,t,{range:Xe?"end":"start"})}),u.createElement(Z.Provider,{value:{inRange:!0,panelPosition:t,rangedValue:rn||ct,hoverRangedValue:r}},u.createElement(Se,Object.assign({},e,n,{dateRender:c,showTime:i,mode:ft[Xe],generateConfig:C,style:void 0,direction:ke,disabledDate:0===Xe?yt:bt,disabledTime:function(e){return!!te&&te(e,0===Xe?"start":"end")},className:d()(Object(s.a)({},"".concat(a,"-panel-focused"),0===Xe?!Tn:!Mn)),value:N(ct,Xe),locale:E,tabIndex:-1,onPanelChange:function(e,n){mt(P(ft,n,Xe),P(ct,e,Xe));var r=e;"right"===t&&ft[Xe]===n&&(r=J(r,n,C,-1)),ot(r,Xe)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:void 0,defaultPickerValue:void 0})))}var Pn=0,Fn=0;Xe&&ze.current&&Ve.current&&Pe.current&&(Pn=ze.current.offsetWidth+Ve.current.offsetWidth,Pe.current.offsetWidth&&Pn>Pe.current.offsetWidth&&(Fn=Pn));var Bn="rtl"===ke?{right:Pn}:{left:Pn};var Hn,zn,Un=u.createElement("div",{className:d()("".concat(a,"-range-wrapper"),"".concat(a,"-").concat(R,"-range-wrapper")),style:{minWidth:Ot}},u.createElement("div",{className:"".concat(a,"-range-arrow"),style:Bn}),function(){var e,t=Ce(a,ft[Xe],de),n=Ee({prefixCls:a,components:xe,needConfirmButton:Me,okDisabled:!N(ct,Xe)||ee&&ee(ct[Xe]),locale:E,rangeList:jn,onOk:function(){N(ct,Xe)&&(Rt(ct,Xe),be&&be(ct))}});if("time"===R||F)e=Nn();else{var r=at(Xe),i=J(r,R,C),o=ft[Xe]===R,s=Nn(!!o&&"left",{pickerValue:r,onPickerValueChange:function(e){ot(e,Xe)}}),l=Nn("right",{pickerValue:i,onPickerValueChange:function(e){ot(J(e,R,C,-1),Xe)}});e="rtl"===ke?u.createElement(u.Fragment,null,l,o&&s):u.createElement(u.Fragment,null,s,o&&l)}var c=u.createElement(u.Fragment,null,u.createElement("div",{className:"".concat(a,"-panels")},e),(t||n)&&u.createElement("div",{className:"".concat(a,"-footer")},t,n));return re&&(c=re(c)),u.createElement("div",{className:"".concat(a,"-panel-container"),style:{marginLeft:Fn},ref:Pe,onMouseDown:function(e){e.preventDefault()}},c)}());se&&(Hn=u.createElement("span",{className:"".concat(a,"-suffix")},se)),oe&&(N(tt,0)&&!Je[0]||N(tt,1)&&!Je[1])&&(zn=u.createElement("span",{onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},onMouseUp:function(e){e.preventDefault(),e.stopPropagation();var t=tt;Je[0]||(t=P(t,null,0)),Je[1]||(t=P(t,null,1)),Rt(t,null),Dt(!1,Xe)},className:"".concat(a,"-clear")},le||u.createElement("span",{className:"".concat(a,"-clear-btn")})));var Vn={size:_(R,Ke[0])},Wn=0,Gn=0;ze.current&&Ue.current&&Ve.current&&(0===Xe?Gn=ze.current.offsetWidth:(Wn=Pn,Gn=Ue.current.offsetWidth));var Kn="rtl"===ke?{right:Wn}:{left:Wn};return u.createElement(v.Provider,{value:{operationRef:Qe,hideHeader:"time"===R,onDateMouseEnter:function(e){cn(P(ct,e,Xe)),0===Xe?fn(e):yn(e)},onDateMouseLeave:function(){cn(P(ct,null,Xe)),0===Xe?pn():bn()},hideRanges:!0,onSelect:function(e,t){var n=P(ct,e,Xe);"submit"===t||"key"!==t&&!Me?(Rt(n,Xe),0===Xe?pn():bn()):ut(n)},open:kt}},u.createElement(Oe,{visible:kt,popupElement:Un,popupStyle:y,prefixCls:a,dropdownClassName:b,dropdownAlign:w,getPopupContainer:k,transitionName:x,range:!0,direction:ke},u.createElement("div",Object.assign({ref:Ne,className:d()(a,"".concat(a,"-range"),g,(t={},Object(s.a)(t,"".concat(a,"-disabled"),Je[0]&&Je[1]),Object(s.a)(t,"".concat(a,"-focused"),0===Xe?Sn:Dn),Object(s.a)(t,"".concat(a,"-rtl"),"rtl"===ke),t)),style:h,onClick:function(e){kt||We.current.contains(e.target)||Ge.current.contains(e.target)||(Je[0]?Je[1]||Mt(1):Mt(0))},onMouseDown:function(e){!kt||!Sn&&!Dn||We.current.contains(e.target)||Ge.current.contains(e.target)||e.preventDefault()}},j(e)),u.createElement("div",{className:d()("".concat(a,"-input"),(n={},Object(s.a)(n,"".concat(a,"-input-active"),0===Xe),Object(s.a)(n,"".concat(a,"-input-placeholder"),!!dn),n)),ref:ze},u.createElement("input",Object.assign({id:o,disabled:Je[0],readOnly:ue||!Tn,value:dn||Yt,onChange:function(e){qt(e.target.value)},autoFocus:O,placeholder:N(S,0)||"",ref:We},Cn,Vn,{autoComplete:De}))),u.createElement("div",{className:"".concat(a,"-range-separator"),ref:Ve},z),u.createElement("div",{className:d()("".concat(a,"-input"),(r={},Object(s.a)(r,"".concat(a,"-input-active"),1===Xe),Object(s.a)(r,"".concat(a,"-input-placeholder"),!!vn),r)),ref:Ue},u.createElement("input",Object.assign({disabled:Je[1],readOnly:ue||!Mn,value:vn||Jt,onChange:function(e){Zt(e.target.value)},placeholder:N(S,1)||"",ref:Ge},Ln,Vn,{autoComplete:De}))),u.createElement("div",{className:"".concat(a,"-active-bar"),style:Object(l.a)(Object(l.a)({},Kn),{},{width:Gn,position:"absolute"})}),Hn,zn)))}var Ue=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).pickerRef=u.createRef(),e.focus=function(){e.pickerRef.current&&e.pickerRef.current.focus()},e.blur=function(){e.pickerRef.current&&e.pickerRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return u.createElement(ze,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),n}(u.Component);t.b=Ne},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(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.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",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function a(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function o(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(o(e,t+1)){i.lastIndex=t,e.ch=t;var n=i.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function h(e){for(;;){i.lastIndex=e.ch;var t=i.exec(e.text);if(!t){if(s(e))continue;return}if(o(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function d(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function f(e,n){for(var r=[];;){var i,a=h(e),o=e.line,s=e.ch-(a?a[0].length:0);if(!a||!(i=c(e)))return;if("selfClose"!=i)if(a[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==a[2]){r.length=l;break}if(l<0&&(!n||n==a[2]))return{tag:a[2],from:t(o,s),to:t(e.line,e.ch)}}else r.push(a[2])}}function p(e,n){for(var r=[];;){var i=d(e);if(!i)return;if("selfClose"!=i){var a=e.line,o=e.ch,s=u(e);if(!s)return;if(s[1])r.push(s[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(a,o)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,r){for(var i=new a(e,r.line,0);;){var o=h(i);if(!o||i.line!=r.line)return;var s=c(i);if(!s)return;if(!o[1]&&"selfClose"!=s){var l=t(i.line,i.ch),u=f(i,o[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),e.findMatchingTag=function(e,r,i){var o=new a(e,r.line,r.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=c(o),l=s&&t(o.line,o.ch),h=s&&u(o);if(s&&h&&!(n(o,r)>0)){var d={from:t(o.line,o.ch),to:l,tag:h[2]};return"selfClose"==s?{open:d,close:null,at:"open"}:h[1]?{open:p(o,h[2]),close:d,at:"close"}:{open:d,close:f(o=new a(e,l.line,l.ch,i),h[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new a(e,t.line,t.ch,n);;){var o=p(i,r);if(!o)break;var s=f(new a(e,t.line,t.ch,n),o.tag);if(s)return{open:o,close:s}}},e.scanForClosingTag=function(e,t,n,r){return f(new a(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(/*! ../../lib/codemirror */"VrN/"))},p5ED: +/*!*********************************************!*\ + !*** ./src/components/PreviewAll/index.tsx ***! + \*********************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=(n(/*! antd/es/tooltip/style */"5Dmo"),n(/*! antd/es/tooltip */"3S7+")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),c=n.n(l),u=n(/*! react */"q1tI"),h=n.n(u),d=n(/*! ./index.less?modules */"vHTk"),f=n.n(d),p=n(/*! @ant-design/icons */"yEEn"),m=n(/*! @/components/monaco-editor */"ZW9T"),g=n(/*! @/utils/util */"1vsH"),v=n(/*! @/service/exercise */"V0Rq"),y=n(/*! @/utils/env */"m3rI");t.a=function(e){var t,n,l,d,b,x,w=e.editOffice,k=void 0===w?"view":w,C=(e.name,e.data),E=(e.theme,e.type),S=e.filename,T=e.monacoEditor,_=e.className,O=e.style,L=e.close,A=e.onClose,D=e.hasMask,M=e.disabledDownload,R=e.onImgDimensions,I=e.otherData,j=Object(u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),N=Object(s.a)(j,2),P=(N[0],N[1],Object(u.useState)("")),F=Object(s.a)(P,2),B=(F[0],F[1]),H=Object(u.useState)(),z=Object(s.a)(H,2),U=z[0],V=z[1],W="build"===window.ENV?"/react/build":"",G=location.host.startsWith("localhost")?y.a.PROXY_SERVER:y.a.API_SERVER,K=Object(u.useRef)();null!==(t=C)&&void 0!==t&&t.startsWith("/api")&&"txt"!==E&&(C=y.a.API_SERVER+C),"office"===E&&Object(g.P)(C).filesize>10485760&&(E="other"),S&&(T.filename=S),Object(u.useEffect)((function(){var e,t,n=null===(e=document.cookie)||void 0===e||null===(t=e.replace(/\s/g,""))||void 0===t?void 0:t.split(";");null==n||n.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&B(t[1])}))}),[]),Object(u.useEffect)((function(){"office"===E&&Y()}),[E,C]);var Y=function(){var e=Object(o.a)(c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",C),t=C,C.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,Object(v.U)({attachment_id:n});case 6:r=e.sent,V(r);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){C.startsWith("http")||C.startsWith("blob:")?X():Object(g.x)(S||"educoder",C,S)},X=function(){Object(g.v)(S||"educoder",decodeURIComponent(C))};return h.a.createElement("div",{style:Object(a.a)({},O||{}),className:"".concat(D&&f.a.bgBlack," ").concat(E?f.a.wrp:"hide")},L&&h.a.createElement("div",{className:f.a.close,ref:K},!!R&&h.a.createElement(i.a,{title:"点击对图片进行批注",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:function(){A(),R()}},h.a.createElement("i",{className:"icon-yulanpizhu"}))),!M&&h.a.createElement(i.a,{title:"点击下载此文件",getPopupContainer:function(){return K.current}},h.a.createElement("span",{onClick:X},h.a.createElement("i",{className:"icon-quxiaozhiding"}))),h.a.createElement(i.a,{title:"关闭",getPopupContainer:function(){return K.current}},h.a.createElement("span",{className:"",onClick:A},h.a.createElement("i",{className:"icon-guanbi1"})))),h.a.createElement("div",{className:"".concat(f.a[_]," ").concat(_," ").concat(f.a.monaco," ").concat("txt"===E?"show":"hide")},"txt"===E&&h.a.createElement(m.b,T)),"audio"===E&&h.a.createElement("audio",{src:"".concat((null===(n=C)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(l=C)||void 0===l?void 0:l.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(C),autoPlay:!0}),"video"===E&&h.a.createElement(h.a.Fragment,null,(null===(d=C)||void 0===d?void 0:d.indexOf("http"))>-1?h.a.createElement("video",{controls:!0,src:"".concat(C),autoPlay:!0}):h.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(C),autoPlay:!0})),"office"===E&&U&&h.a.createElement("iframe",{src:"".concat(W,"/office.html?key=").concat(U.key,"&url=").concat(G+U.url,"&callbackUrl=").concat(G+U.callbackUrl,"&fileType=").concat(U.fileType,"&title=").concat(U.title,"&model=").concat(k,"&officeServer=").concat(y.a.OFFICE_SERVER,"&disabledDownload=").concat(!!M)}),("xlsx"===E||"doc"===E||"pptx"===E||"docx"===E)&&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=").concat(I.model)}),"html"===E&&h.a.createElement("iframe",{src:C+"&disposition=inline"}),"pdf"===E&&h.a.createElement("embed",{className:f.a.embed,src:C}),"image"===E&&h.a.createElement("img",{src:"".concat((null===(b=C)||void 0===b?void 0:b.indexOf("http://"))>-1||(null===(x=C)||void 0===x?void 0:x.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(C)}),"other"===E&&h.a.createElement("div",null,h.a.createElement(r.a,{type:"primary",size:"large",onClick:q},h.a.createElement(p.a,null),"点击下载")),"download"===E&&h.a.createElement(r.a,{type:"primary",size:"large",onClick:q},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(e,t,n){},pzxd: +/*!*********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/helper/text.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../../core/util */"bYtY"),i=r.retrieve2,a=r.retrieve3,o=r.each,s=r.normalizeCssArray,l=r.isString,c=r.isObject,u=n(/*! ../../contain/text */"6GrX"),h=n(/*! ./roundRect */"VpOo"),d=n(/*! ./image */"Xnb7"),f=n(/*! ./fixShadow */"fW2E"),p=n(/*! ../constant */"gut8"),m=p.ContextCachedBy,g=p.WILL_BE_RESTORED,v=u.DEFAULT_FONT,y={left:1,right:1,center:1},b={top:1,bottom:1,middle:1},x=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],w={},k={};function C(e){if(e){e.font=u.makeFont(e);var t=e.textAlign;"middle"===t&&(t="center"),e.textAlign=null==t||y[t]?t:"left";var n=e.textVerticalAlign||e.textBaseline;"center"===n&&(n="middle"),e.textVerticalAlign=null==n||b[n]?n:"top",e.textPadding&&(e.textPadding=s(e.textPadding))}}function E(e,t,n,r,i){if(n&&t.textRotation){var a=t.textOrigin;"center"===a?(r=n.width/2+n.x,i=n.height/2+n.y):a&&(r=a[0]+n.x,i=a[1]+n.y),e.translate(r,i),e.rotate(-t.textRotation),e.translate(-r,-i)}}function S(e,t,n,r,o,s,l,c){var u=r.rich[n.styleName]||{};u.text=n.text;var h=n.textVerticalAlign,d=s+o/2;"top"===h?d=s+n.height/2:"bottom"===h&&(d=s+o-n.height/2),!n.isLineHolder&&T(u)&&_(e,t,u,"right"===c?l-n.width:"center"===c?l-n.width/2:l,d-n.height/2,n.width,n.height);var f=n.textPadding;f&&(l=I(l,c,f),d-=n.height/2-f[2]-n.textHeight/2),A(t,"shadowBlur",a(u.textShadowBlur,r.textShadowBlur,0)),A(t,"shadowColor",u.textShadowColor||r.textShadowColor||"transparent"),A(t,"shadowOffsetX",a(u.textShadowOffsetX,r.textShadowOffsetX,0)),A(t,"shadowOffsetY",a(u.textShadowOffsetY,r.textShadowOffsetY,0)),A(t,"textAlign",c),A(t,"textBaseline","middle"),A(t,"font",n.font||v);var p=D(u.textStroke||r.textStroke,g),m=M(u.textFill||r.textFill),g=i(u.textStrokeWidth,r.textStrokeWidth);p&&(A(t,"lineWidth",g),A(t,"strokeStyle",p),t.strokeText(n.text,l,d)),m&&(A(t,"fillStyle",m),t.fillText(n.text,l,d))}function T(e){return!!(e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor)}function _(e,t,n,r,i,a,o){var s=n.textBackgroundColor,u=n.textBorderWidth,f=n.textBorderColor,p=l(s);if(A(t,"shadowBlur",n.textBoxShadowBlur||0),A(t,"shadowColor",n.textBoxShadowColor||"transparent"),A(t,"shadowOffsetX",n.textBoxShadowOffsetX||0),A(t,"shadowOffsetY",n.textBoxShadowOffsetY||0),p||u&&f){t.beginPath();var m=n.textBorderRadius;m?h.buildPath(t,{x:r,y:i,width:a,height:o,r:m}):t.rect(r,i,a,o),t.closePath()}if(p)if(A(t,"fillStyle",s),null!=n.fillOpacity){var g=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,t.fill(),t.globalAlpha=g}else t.fill();else if(c(s)){var v=s.image;(v=d.createOrUpdateImage(v,null,e,O,s))&&d.isImageReady(v)&&t.drawImage(v,r,i,a,o)}if(u&&f)if(A(t,"lineWidth",u),A(t,"strokeStyle",f),null!=n.strokeOpacity){g=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,t.stroke(),t.globalAlpha=g}else t.stroke()}function O(e,t){t.image=e}function L(e,t,n,r){var i=n.x||0,a=n.y||0,o=n.textAlign,s=n.textVerticalAlign;if(r){var l=n.textPosition;if(l instanceof Array)i=r.x+R(l[0],r.width),a=r.y+R(l[1],r.height);else{var c=t&&t.calculateTextPosition?t.calculateTextPosition(w,n,r):u.calculateTextPosition(w,n,r);i=c.x,a=c.y,o=o||c.textAlign,s=s||c.textVerticalAlign}var h=n.textOffset;h&&(i+=h[0],a+=h[1])}return(e=e||{}).baseX=i,e.baseY=a,e.textAlign=o,e.textVerticalAlign=s,e}function A(e,t,n){return e[t]=f(e,t,n),e[t]}function D(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function M(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function R(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function I(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}t.normalizeTextStyle=function(e){return C(e),o(e.rich,C),e},t.renderText=function(e,t,n,r,i,a){r.rich?function(e,t,n,r,i,a){a!==g&&(t.__attrCachedBy=m.NONE);var o=e.__textCotentBlock;o&&!e.__dirtyText||(o=e.__textCotentBlock=u.parseRichText(n,r));!function(e,t,n,r,i){var a=n.width,o=n.outerWidth,s=n.outerHeight,l=r.textPadding,c=L(k,e,r,i),h=c.baseX,d=c.baseY,f=c.textAlign,p=c.textVerticalAlign;E(t,r,i,h,d);var m=u.adjustTextX(h,o,f),g=u.adjustTextY(d,s,p),v=m,y=g;l&&(v+=l[3],y+=l[0]);var b=v+a;T(r)&&_(e,t,r,m,g,o,s);for(var x=0;x=0&&"right"===(w=O[N]).textAlign;)S(e,t,w,r,D,y,j,"right"),M-=w.width,j-=w.width,N--;for(I+=(a-(I-v)-(b-j)-M)/2;R<=N;)w=O[R],S(e,t,w,r,D,y,I+w.width/2,"center"),I+=w.width,R++;y+=D}}(e,t,o,r,i)}(e,t,n,r,i,a):function(e,t,n,r,i,a){"use strict";var o,s=T(r),l=!1,c=t.__attrCachedBy===m.PLAIN_TEXT;a!==g?(a&&(o=a.style,l=!s&&c&&o),t.__attrCachedBy=s?m.NONE:m.PLAIN_TEXT):c&&(t.__attrCachedBy=m.NONE);var h=r.font||v;l&&h===(o.font||v)||(t.font=h);var d=e.__computedFont;e.__styleFont!==h&&(e.__styleFont=h,d=e.__computedFont=t.font);var p=r.textPadding,y=r.textLineHeight,b=e.__textCotentBlock;b&&!e.__dirtyText||(b=e.__textCotentBlock=u.parsePlainText(n,d,p,y,r.truncate));var w=b.outerHeight,C=b.lines,S=b.lineHeight,O=L(k,e,r,i),A=O.baseX,R=O.baseY,j=O.textAlign||"left",N=O.textVerticalAlign;E(t,r,i,A,R);var P=u.adjustTextY(R,w,N),F=A,B=P;if(s||p){var H=u.getWidth(n,d);p&&(H+=p[1]+p[3]);var z=u.adjustTextX(A,H,j);s&&_(e,t,r,z,P,H,w),p&&(F=I(A,j,p),B+=p[0])}t.textAlign=j,t.textBaseline="middle",t.globalAlpha=r.opacity||1;for(var U=0;U=2){var P=D[0][0],F=D[1][0],B=D[0][1]*t.opacity,H=D[1][1]*t.opacity;e.type=l,e.method="none",e.focus="100%",e.angle=c,e.color=P,e.color2=F,e.colors=R.join(","),e.opacity=H,e.opacity2=B}"radial"===l&&(e.focusposition=u.join(","))}else M(e,s,t.opacity)}(s,n,r):function(e,t){t.lineDash&&(e.dashstyle=t.lineDash.join(" ")),null==t.stroke||t.stroke instanceof m||M(e,t.stroke,t.opacity)}(s,n),O(e,s)):(e[a?"filled":"stroked"]="false",L(e,s))},I=[[],[],[]];f.prototype.brushVML=function(e){var t=this.style,n=this._vmlEl;n||(n=g.createNode("shape"),T(n),this._vmlEl=n),R(n,"fill",t,this),R(n,"stroke",t,this);var r=this.transform,a=null!=r,o=n.getElementsByTagName("stroke")[0];if(o){var s=t.lineWidth;if(a&&!t.strokeNoScale){var l=r[0]*r[3]-r[1]*r[2];s*=b(x(l))}o.weight=s+"px"}var c=this.path||(this.path=new p);this.__dirtyPath&&(c.beginPath(),c.subPixelOptimize=!1,this.buildPath(c,this.shape),c.toStatic(),this.__dirtyPath=!1),n.path=function(e,t){var n,r,a,o,s,l,c=v.M,u=v.C,h=v.L,d=v.A,f=v.Q,p=[],m=e.data,g=e.len();for(o=0;o.01?U&&(V+=.0125):Math.abs(W-P)<1e-4?U&&VN?_-=.0125:_+=.0125:U&&WP?T+=.0125:T-=.0125),p.push(G,y(((N-F)*M+A)*E-S),",",y(((P-B)*R+D)*E-S),",",y(((N+F)*M+A)*E-S),",",y(((P+B)*R+D)*E-S),",",y((V*M+A)*E-S),",",y((W*R+D)*E-S),",",y((T*M+A)*E-S),",",y((_*R+D)*E-S)),s=T,l=_;break;case v.R:var K=I[0],Y=I[1];K[0]=m[o++],K[1]=m[o++],Y[0]=K[0]+m[o++],Y[1]=K[1]+m[o++],t&&(i(K,K,t),i(Y,Y,t)),K[0]=y(K[0]*E-S),Y[0]=y(Y[0]*E-S),K[1]=y(K[1]*E-S),Y[1]=y(Y[1]*E-S),p.push(" m ",K[0],",",K[1]," l ",Y[0],",",K[1]," l ",Y[0],",",Y[1]," l ",K[0],",",Y[1]);break;case v.Z:p.push(" x ")}if(n>0){p.push(r);for(var q=0;q100&&(P=0,N={});var n,r=F.style;try{r.font=e,n=r.fontFamily.split(",")[0]}catch(e){}t={style:r.fontStyle||"normal",variant:r.fontVariant||"normal",weight:r.fontWeight||"normal",size:0|parseFloat(r.fontSize||12),family:n||"Microsoft YaHei"},N[e]=t,P++}return t}(a.font),w=x.style+" "+x.variant+" "+x.weight+" "+x.size+'px "'+x.family+'"';n=n||s.getBoundingRect(o,w,v,b,a.textPadding,a.textLineHeight);var k=this.transform;if(k&&!r&&(B.copy(t),B.applyTransform(k),t=B),r)p=t.x,m=t.y;else{var C=a.textPosition;if(C instanceof Array)p=t.x+D(C[0],t.width),m=t.y+D(C[1],t.height),v=v||"left";else{var E=this.calculateTextPosition?this.calculateTextPosition({},a,t):s.calculateTextPosition({},a,t);p=E.x,m=E.y,v=v||E.textAlign,b=b||E.textVerticalAlign}}p=s.adjustTextX(p,n.width,v),m=s.adjustTextY(m,n.height,b),m+=n.height/2;var S,_,L,M=g.createNode,I=this._textVmlEl;I?_=(S=(L=I.firstChild).nextSibling).nextSibling:(I=M("line"),S=M("path"),_=M("textpath"),L=M("skew"),_.style["v-text-align"]="left",T(I),S.textpathok=!0,_.on=!0,I.from="0 0",I.to="1000 0.05",O(I,L),O(I,S),O(I,_),this._textVmlEl=I);var j=[p,m],H=I.style;k&&r?(i(j,j,k),L.on=!0,L.matrix=k[0].toFixed(3)+","+k[2].toFixed(3)+","+k[1].toFixed(3)+","+k[3].toFixed(3)+",0,0",L.offset=(y(j[0])||0)+","+(y(j[1])||0),L.origin="0 0",H.left="0px",H.top="0px"):(L.on=!1,H.left=y(p)+"px",H.top=y(m)+"px"),_.string=String(o).replace(/&/g,"&").replace(/"/g,""");try{_.style.font=w}catch(e){}R(I,"fill",{fill:a.textFill,opacity:a.opacity},this),R(I,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash||null},this),I.style.zIndex=A(this.zlevel,this.z,this.z2),O(e,I)}},z=function(e){L(e,this._textVmlEl),this._textVmlEl=null},U=function(e){O(e,this._textVmlEl)},V=[c,u,h,f,d],W=0;W=0&&(this.delFromStorage(e),this._roots.splice(o,1),e instanceof a&&e.delChildrenFromStorage(this))}},addToStorage:function(e){return e&&(e.__storage=this,e.dirty(!1)),this},delFromStorage:function(e){return e&&(e.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:s};var c=l;e.exports=c},rA99: +/*!***************************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/BezierCurve.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../../core/vector */"QBsz"),a=n(/*! ../../core/curve */"Sj9i"),o=a.quadraticSubdivide,s=a.cubicSubdivide,l=a.quadraticAt,c=a.cubicAt,u=a.quadraticDerivativeAt,h=a.cubicDerivativeAt,d=[];function f(e,t,n){var r=e.cpx2,i=e.cpy2;return null===r||null===i?[(n?h:c)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?h:c)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?u:l)(e.x1,e.cpx1,e.x2,t),(n?u:l)(e.y1,e.cpy1,e.y2,t)]}var p=r.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2,l=t.cpx1,c=t.cpy1,u=t.cpx2,h=t.cpy2,f=t.percent;0!==f&&(e.moveTo(n,r),null==u||null==h?(f<1&&(o(n,l,i,f,d),l=d[1],i=d[2],o(r,c,a,f,d),c=d[1],a=d[2]),e.quadraticCurveTo(l,c,i,a)):(f<1&&(s(n,l,u,i,f,d),l=d[1],u=d[2],i=d[3],s(r,c,h,a,f,d),c=d[1],h=d[2],a=d[3]),e.bezierCurveTo(l,c,u,h,i,a)))},pointAt:function(e){return f(this.shape,e,!1)},tangentAt:function(e){var t=f(this.shape,e,!0);return i.normalize(t,t)}});e.exports=p},"rAM+": +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***! + \*******************************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}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,s=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==n.return||n.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(e,t){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},s=e=>o[e];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(e){return e.replace(l,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const u=/(^|[^\[])\^/g;const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const f={},p=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(e,t){f[" "+e]||(p.test(e)?f[" "+e]=e+"/":f[" "+e]=y(e,"/",!0));const n=-1===(e=f[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(g,"$1")+t:e+t}function y(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i(r=(r=r.source||r).replace(u,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(c(n)).replace(h,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!d.test(n)&&(n=v(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:v,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length0)){e.next=7;break}return c.b.info("发布班级不能为空"),e.abrupt("return");case 7:return i={homework_ids:Object(h.a)(t.actionTabs.selectArrs),group_ids:q.map((function(e){return e.id})),end_time:w()(r.end_time).format("YYYY-MM-DD HH:mm"),publish_time:w()(r.publish_time).format("YYYY-MM-DD HH:mm"),unified_setting:J},e.next=10,Object(k.a)("/api/courses/".concat(g.coursesId,"/homework_commons/publish_with_homework_list_position.json"),{method:"post",body:Object(d.a)({},i)});case 10:0===e.sent.status&&(ne(),Object(C.Y)(["教学课堂","课程实验","立即发布"]),c.b.success("发布成功"),n({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),Object(T.c)()?t.actionTabs.detail?(n({type:"shixunHomeworks/setActionTabs",payload:{}}),n({type:"shixunHomeworks/getWorkList",payload:Object(d.a)({},g)}),n({type:"shixunHomeworks/getWorkSetting",payload:Object(d.a)({},g)})):n({type:"classroomList/getClassroomTeacherShixunsList",payload:Object(d.a)(Object(d.a)({},t.actionTabs.params),{},{type:4})}):n({type:"classroomList/getClassroomShixunsList",payload:Object(d.a)({},t.actionTabs.params)}),"0"===localStorage.getItem("Noviceguide")||n({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:13,text:b.a.createElement("div",null,"最后,咱们给教学课堂添加一名学生~点击“添加学生”,在弹窗页面中输入并搜索学生姓名,点击“确定”就可以为您的课堂添加第一位学生啦~")}}));case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=function(){R(1),P([]),X([])};return b.a.createElement(r.a,{width:600,centered:!0,title:"发布作业",visible:"立即发布"===t.actionTabs.key,okText:"发布作业",cancelText:"暂不发布",onOk:te,onCancel:function(){ne(),n({type:"classroomList/setActionTabs",payload:{}})}},b.a.createElement("p",{className:"tc"},"学生将立即收到作业",b.a.createElement("br",null),'本操作只对"未发布"的作业有效'),N&&b.a.createElement(p.a,{form:S},b.a.createElement("div",{style:{paddingLeft:0}},b.a.createElement(o.a,{className:"mt30",align:"middle"},b.a.createElement(s.a,null,b.a.createElement(p.a.Item,{name:"publish_time",label:"发布时间"},b.a.createElement(l.a,{style:{width:155,marginRight:"25px"},getPopupContainer:function(e){return e.parentNode},disabledDate:function(e){return e&&e<=w()().subtract(0,"days")},disabledTime:A,placeholder:"请选择发布时间",showTime:{format:"HH:mm",defaultValue:w()(Object(C.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1}))),b.a.createElement(s.a,{className:"ml20"},b.a.createElement(p.a.Item,{name:"end_time",label:"截止时间:"},b.a.createElement(l.a,{style:{width:170},getPopupContainer:function(e){return e.parentNode},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:w()(Object(C.d)(),"HH:mm")},disabledDate:function(e){return e&&e0&&b.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"}},b.a.createElement("span",{style:{flex:1}},b.a.createElement(i.a,{checked:q.length===N.length,onChange:function(e){q.length===N.length?X([]):X(N)}},"全选")," "),b.a.createElement("span",{style:{width:16}}),b.a.createElement("span",{style:{flex:1}},"已选择",q.length||0,"个分班")),(1===t.actionTabs.type||!J)&&N.length>0&&b.a.createElement(O.a,{data:N,selectedRowKeys:q,setSelectedRowKeys:X})))}))},rmlV: +/*!***********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/Ellipse.js ***! + \***********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt").extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(e,t){var n=.5522848,r=t.cx,i=t.cy,a=t.rx,o=t.ry,s=a*n,l=o*n;e.moveTo(r-a,i),e.bezierCurveTo(r-a,i-l,r-s,i-o,r,i-o),e.bezierCurveTo(r+s,i-o,r+a,i-l,r+a,i),e.bezierCurveTo(r+a,i+l,r+s,i+o,r,i+o),e.bezierCurveTo(r-s,i+o,r-a,i+l,r-a,i),e.closePath()}});e.exports=r},sR1s: +/*!*****************************************************!*\ + !*** ./node_modules/rc-table/es/utils/valueUtil.js ***! + \*****************************************************/ +/*! exports provided: getPathValue, getColumnsKey, mergeObject, validateValue */ +/*! exports used: getColumnsKey, getPathValue, mergeObject, validateValue */function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l}));var r=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU");function i(e){return null==e?[]:Array.isArray(e)?e:[e]}function a(e,t){if(!t&&"number"!=typeof t)return e;for(var n=i(t),r=e,a=0;a1)Object(h.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===t.length)return Object(h.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var n=t[0];if(l.isValidElement(n)&&Object(d.c)(n)){var r=n.ref;t[0]=l.cloneElement(n,{ref:Object(d.a)(r,this.setChildNode)})}return 1===t.length?t[0]:t.map((function(e,t){return!l.isValidElement(e)||"key"in e&&null!==e.key?e:l.cloneElement(e,{key:"".concat("rc-observer-key","-").concat(t)})}))}}]),n}(l.Component);p.displayName="ResizeObserver",t.a=p},u3os: +/*!***********************************************!*\ + !*** ./node_modules/size-sensor/lib/index.js ***! + \***********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ver=t.clear=t.bind=void 0;var r=n(/*! ./sensorPool */"P4Qj");t.bind=function(e,t){var n=(0,r.getSensor)(e);return n.bind(t),function(){n.unbind(t)}};t.clear=function(e){var t=(0,r.getSensor)(e);(0,r.removeSensor)(t)};t.ver="1.0.1"},ulZh: +/*!*****************************************!*\ + !*** ./node_modules/hls.js/dist/hls.js ***! + \*****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;"undefined"!=typeof window&&(r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js": +/*!*********************************************!*\ + !*** ./node_modules/eventemitter3/index.js ***! + \*********************************************/ +/*! no static exports found */function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function a(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,r,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,r||e,a),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new a:delete e._events[t]}function c(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(i=!1)),c.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},c.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,o=new Array(a);r0}),!1)}e.exports=function(e,t){t=t||{};var i={main:n.m},s=t.all?{main:Object.keys(i.main)}:function(e,t){for(var n={main:[t]},r={main:[]},i={main:{}};o(n);)for(var s=Object.keys(n),l=0;l=2*h/f||b<=w)){var k,C=Number.POSITIVE_INFINITY;for(k=e.level-1;k>m&&!((C=h*p[k].maxBitrate/(6.4*y))=b)){var E=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+k+"\n Current BW estimate: "+(Object(r.isFiniteNumber)(E)?(E/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: "+C.toFixed(3)+" s\n Time to underbuffer: "+w.toFixed(3)+" s"),n.nextLoadLevel=k,this.bwEstimator.sample(d,u.loaded),this.clearTimer(),e.loader&&(this.fragCurrent=this.partCurrent=null,e.loader.abort()),n.trigger(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:u})}}}}}},d.onFragLoaded=function(e,t){var n=t.frag,i=t.part;if(n.type===l.PlaylistLevelType.MAIN&&Object(r.isFiniteNumber)(n.sn)){var o=i?i.stats:n.stats,s=i?i.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[n.level],u=(c.loaded?c.loaded.bytes:0)+o.loaded,h=(c.loaded?c.loaded.duration:0)+s;c.loaded={bytes:u,duration:h},c.realBitrate=Math.round(8*u/h)}if(n.bitrateTest){var d={stats:o,frag:n,part:i,id:n.type};this.onFragBuffered(a.Events.FRAG_BUFFERED,d),n.bitrateTest=!1}}},d.onFragBuffered=function(e,t){var n=t.frag,r=t.part,i=r?r.stats:n.stats;if(!i.aborted&&n.type===l.PlaylistLevelType.MAIN&&"initSegment"!==n.sn){var a=i.parsing.end-i.loading.start;this.bwEstimator.sample(a,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},d.onError=function(e,t){switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},d.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},d.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,a=n.minAutoLevel,s=n.media,l=t?t.duration:e?e.duration:0,u=s?s.currentTime:0,h=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,f=(o.BufferHelper.bufferInfo(s,u,i.maxBufferHole).end-u)/h,p=this.findBestLevel(d,a,r,f,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var m=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(!f){var y=this.bitrateTestDelay;y&&(m=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*m)+" ms"),g=v=1)}return p=this.findBestLevel(d,a,r,f+m,g,v),Math.max(p,0)},d.findBestLevel=function(e,t,n,r,i,a){for(var o,s=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,m=l?l.duration:s?s.duration:0,g=n;g>=t;g--){var v=h[g];if(v&&(!p||v.codecSet===p)){var y=v.details,b=(l?null==y?void 0:y.partTarget:null==y?void 0:y.averagetargetduration)||m,x=void 0;x=g<=u?i*e:a*e;var w=h[g].maxBitrate,k=w*b/x;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(x)+"/"+w+"/"+b+"/"+r+"/"+k),x>w&&(!k||f&&!this.bitrateTestDelay||k0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=i.State.IDLE):(this.loadedmetadata=!1,this.state=i.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},w.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_TRACK:var t,n=this.levels,r=this.trackId,a=null==n||null===(t=n[r])||void 0===t?void 0:t.details;if(a){if(this.waitForCdnTuneIn(a))break;this.state=i.State.WAITING_INIT_PTS}break;case i.State.FRAG_LOADING_WAITING_RETRY:var s,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=i.State.IDLE);break;case i.State.WAITING_INIT_PTS:var u=this.waitingData;if(u){var h=u.frag,d=u.part,f=u.cache,m=u.complete;if(void 0!==this.initPTS[h.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.FRAG_LOADING;var g={frag:h,part:d,payload:f.flush(),networkDetails:null};this._handleFragmentLoadProgress(g),m&&e.prototype._handleFragmentLoadComplete.call(this,g)}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=i.State.IDLE}this.onTickEnd()},w.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.IDLE)},w.onTickEnd=function(){var e=this.media;if(e&&e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length&&(this.loadedmetadata=!0),this.lastCurrentTime=e.currentTime}},w.doTickIdle=function(){var e,t,n=this.hls,r=this.levels,o=this.media,s=this.trackId,l=n.config;if(r&&r[s]&&(o||!this.startFragRequested&&l.startFragPrefetch)){var h=r[s].details;if(!h||h.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(h))this.state=i.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(),m=this.audioSwitch;if(!(f>=p)||m){if(!m&&this._streamEnded(d,h))return n.trigger(a.Events.BUFFER_EOS,{type:"audio"}),void(this.state=i.State.ENDED);var g=h.fragments[0].start,v=d.end;if(m){var y=this.getLoadPosition();v=y,h.PTSKnown&&yg||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),o.currentTime=g+.05)}var b=this.getNextFragment(v,h);b?"identity"!==(null===(e=b.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=b.decryptdata)&&void 0!==t&&t.key?this.loadFragment(b,h,v):this.loadKey(b,h):this.bufferFlushed=!0}}}}},w.getMaxBufferLength=function(){var t=e.prototype.getMaxBufferLength.call(this),n=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===n?t:Math.max(t,n.len)},w.onMediaDetaching=function(){this.videoBuffer=null,e.prototype.onMediaDetaching.call(this)},w.onAudioTracksUpdated=function(e,t){var n=t.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(e){return new l.Level(e)}))},w.onAudioTrackSwitching=function(e,t){var n=!!t.url;this.trackId=t.id;var r=this.fragCurrent;null!=r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.audioSwitch=!0,this.state=i.State.IDLE):this.state=i.State.STOPPED,this.tick()},w.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},w.onLevelLoaded=function(e,t){this.mainDetails=t.details},w.onAudioTrackLoaded=function(e,t){var n,r=this.levels,a=t.details,o=t.id;if(r){this.log("Track "+o+" loaded ["+a.startSN+","+a.endSN+"],duration:"+a.totalduration);var s=r[o],l=0;if(a.live||null!==(n=s.details)&&void 0!==n&&n.live){var c=this.mainDetails;if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed||!c)return;!s.details&&a.hasProgramDateTime&&c.hasProgramDateTime?(Object(m.alignMediaPlaylistByPDT)(a,c),l=a.fragments[0].start):l=this.alignPlaylists(a,s.details)}s.details=a,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(s.details,l),this.state!==i.State.WAITING_TRACK||this.waitForCdnTuneIn(a)||(this.state=i.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+o)},w._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,a=e.payload,o=this.config,s=this.trackId,l=this.levels;if(l){var u=l[s];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 m=o.defaultAudioCodec||u.audioCodec||"mp4a.40.2",g=this.transmuxer;g||(g=this.transmuxer=new d.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var y=this.initPTS[n.cc],b=null===(t=n.initSegment)||void 0===t?void 0:t.data;if(void 0!==y){var x=r?r.index:-1,w=-1!==x,k=new f.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,a.byteLength,x,w);g.push(a,b,m,"",n,r,p.totalduration,!1,k,y)}else v.logger.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+s),(this.waitingData=this.waitingData||{frag:n,part:r,cache:new h.default,complete:!1}).cache.push(new Uint8Array(a)),this.waitingVideoCC=this.videoTrackCC,this.state=i.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},w._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},w.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},w.onBufferCreated=function(e,t){var n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},w.onFragBuffered=function(e,t){var n=t.frag,r=t.part;n.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(n)?this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==n.sn&&(this.fragPrevious=n,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(n,r)))},w.onError=function(t,n){switch(n.details){case g.ErrorDetails.FRAG_LOAD_ERROR:case g.ErrorDetails.FRAG_LOAD_TIMEOUT:case g.ErrorDetails.KEY_LOAD_ERROR:case g.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,n);break;case g.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case g.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==i.State.ERROR&&this.state!==i.State.STOPPED&&(this.state=n.fatal?i.State.ERROR:i.State.IDLE,this.warn(n.details+" while loading frag, switching to "+this.state+" state"));break;case g.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===n.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var r=!0,a=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);a&&a.len>.5&&(r=!this.reduceMaxBufferLength(a.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},w.onBufferFlushed=function(e,t){t.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},w._handleTransmuxComplete=function(e){var t,n="audio",r=this.hls,o=e.remuxResult,s=e.chunkMeta,l=this.getCurrentContext(s);if(!l)return this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(s.level);var c=l.frag,h=l.part,d=o.audio,f=o.text,p=o.id3,m=o.initSegment;if(!this.fragContextChanged(c)){if(this.state=i.State.PARSING,this.audioSwitch&&d&&this.completeAudioSwitch(),null!=m&&m.tracks&&(this._bufferInitSegment(m.tracks,c,s),r.trigger(a.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:n,tracks:m.tracks})),d){var g=d.startPTS,v=d.endPTS,b=d.startDTS,x=d.endDTS;h&&(h.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:g,endPTS:v,startDTS:b,endDTS:x}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,g,v,b,x),this.bufferFragmentData(d,c,h,s)}if(null!=p&&null!==(t=p.samples)&&void 0!==t&&t.length){var w=y({frag:c,id:n},p);r.trigger(a.Events.FRAG_PARSING_METADATA,w)}if(f){var k=y({frag:c,id:n},f);r.trigger(a.Events.FRAG_PARSING_USERDATA,k)}}},w._bufferInitSegment=function(e,t,n){if(this.state===i.State.PARSING){e.video&&delete e.video;var r=e.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(a.Events.BUFFER_CODECS,e);var o=r.initSegment;if(null!=o&&o.byteLength){var s={type:"audio",frag:t,part:null,chunkMeta:n,parent:t.type,data:o};this.hls.trigger(a.Events.BUFFER_APPENDING,s)}this.tick()}}},w.loadFragment=function(t,n,a){var o=this.fragmentTracker.getState(t);this.fragCurrent=t,(this.audioSwitch||o===s.FragmentState.NOT_LOADED||o===s.FragmentState.PARTIAL)&&("initSegment"===t.sn?this._loadInitSegment(t):n.live&&!Object(r.isFiniteNumber)(this.initPTS[t.cc])?(this.log("Waiting for video PTS in continuity counter "+t.cc+" of live stream before loading audio fragment "+t.sn+" of level "+this.trackId),this.state=i.State.WAITING_INIT_PTS):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,a)))},w.completeAudioSwitch=function(){var t=this.hls,n=this.media,r=this.trackId;n&&(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,t.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:r})},x}(i.default);t.default=x},"./src/controller/audio-track-controller.ts": +/*!**************************************************!*\ + !*** ./src/controller/audio-track-controller.ts ***! + \**************************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),o=n(/*! ../types/loader */"./src/types/loader.ts");function s(e,t){for(var n=0;n=t.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var n=t[this.trackId];this.log("Now switching to audio-track index "+e);var i=t[e],a=i.id,o=i.groupId,s=void 0===o?"":o,l=i.name,c=i.type,u=i.url;if(this.trackId=e,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(r.Events.AUDIO_TRACK_SWITCHING,{id:a,groupId:s,name:l,type:c,url:u}),!i.details||i.details.live){var h=this.switchParams(i.url,null==n?void 0:n.details);this.loadPlaylist(h)}}},d.selectInitialTrack=function(){var e=this.tracksInGroup;console.assert(e.length,"Initial audio track should be selected when tracks are known");var t=this.trackName,n=this.findTrackId(t)||this.findTrackId();-1!==n?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},d.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;nt.partTarget&&(c+=1)}if(Object(r.isFiniteNumber)(l))return new i.HlsUrlParameters(l,Object(r.isFiniteNumber)(c)?c:void 0,i.HlsSkip.No)}}},t.loadPlaylist=function(e){},t.shouldLoadTrack=function(e){return this.canLoad&&e&&!!e.url&&(!e.details||e.details.live)},t.playlistLoaded=function(e,t,n){var r=this,i=t.details,o=t.stats,s=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(i.advancedDateTime=Date.now()-s,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&Object(a.mergeDetails)(n,i),!this.canLoad||!i.live)return;var l,c=void 0,u=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var h=this.hls.config.lowLatencyMode,d=i.lastPartSn,f=i.endSN,p=i.lastPartIndex,m=d===f;-1!==p?(c=m?f+1:d,u=m?h?0:p:p+1):c=f+1;var g=i.age,v=g+i.ageHeader,y=Math.min(v-i.partTarget,1.5*i.targetduration);if(y>0){if(n&&y>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+y+" with playlist age: "+i.age),y=0;else{var b=Math.floor(y/i.targetduration);c+=b,void 0!==u&&(u+=Math.round(y%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+y+" skip sn "+b+" to part "+u)}i.tuneInGoal=y}if(l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u),h||!m)return void this.loadPlaylist(l)}else l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u);var x=Object(a.computeReloadInterval)(i,o);void 0!==c&&i.canBlockReload&&(x-=i.partTarget||1),this.log("reload live playlist "+e+" in "+Math.round(x)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),x)}else this.clearTimer()},t.getDeliveryDirectives=function(e,t,n,r){var a=Object(i.getSkipValue)(e,n);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,a=i.HlsSkip.No),new i.HlsUrlParameters(n,r,a)},t.retryLoadingOrFail=function(e){var t,n=this,r=this.hls.config,i=this.retryCount-1&&null!==(t=e.context)&&void 0!==t&&t.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+e.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return n.loadPlaylist()}),a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+e.details+'"')}else this.warn('cannot recover from error "'+e.details+'"'),this.clearTimer(),e.fatal=!0;return i},e}()},"./src/controller/base-stream-controller.ts": +/*!**************************************************!*\ + !*** ./src/controller/base-stream-controller.ts ***! + \**************************************************/ +/*! exports provided: State, default */function(e,t,n){"use strict";n.r(t),n.d(t,"State",(function(){return w})),n.d(t,"default",(function(){return k}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../task-loop */"./src/task-loop.ts"),a=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ../utils/logger */"./src/utils/logger.ts"),l=n(/*! ../events */"./src/events.ts"),c=n(/*! ../errors */"./src/errors.ts"),u=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),h=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),d=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),f=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=n(/*! ./level-helper */"./src/controller/level-helper.ts"),m=n(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),g=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),v=n(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),y=n(/*! ../types/loader */"./src/types/loader.ts");function b(e,t){for(var n=0;nt.start+t.duration+c;(s0&&a&&a.key&&a.iv&&"AES-128"===a.method){var o=self.performance.now();return t.decrypter.webCryptoDecrypt(new Uint8Array(i),a.key.buffer,a.iv.buffer).then((function(t){var i=self.performance.now();return r.trigger(l.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:o,tdecrypt:i}}),n.payload=t,n}))}return n})).then((function(n){var r=t.fragCurrent,i=t.hls,a=t.levels;if(!a)throw new Error("init load aborted, missing levels");var o=a[e.level].details;console.assert(o,"Level details are defined when init segment is loaded");var s=e.stats;t.state=w.IDLE,t.fragLoadError=0,e.data=new Uint8Array(n.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),n.frag===r&&i.trigger(l.Events.FRAG_BUFFERED,{stats:s,frag:r,part:null,id:e.type}),t.tick()})).catch((function(n){t.warn(n),t.resetFragmentLoading(e)}))},S.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},S.fragBufferedComplete=function(e,t){var n=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level+" "+v.default.toString(o.BufferHelper.getBuffered(n))),this.state=w.IDLE,this.tick()},S._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var n=e.frag,r=e.part,i=e.partsLoaded,a=!i||0===i.length||i.some((function(e){return!e})),o=new u.ChunkMetadata(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!a);t.flush(o)}},S._handleFragmentLoadProgress=function(e){},S._doFragLoad=function(e,t,n,i){var a=this;if(void 0===n&&(n=null),!this.levels)throw new Error("frag load aborted, missing levels");if(n=Math.max(e.start,n||0),this.config.lowLatencyMode&&t){var o=t.partList;if(o&&i){n>e.end&&t.fragmentHint&&(e=t.fragmentHint);var s=this.getNextPart(o,e,n);if(s>-1){var c=o[s];return this.log("Loading part sn: "+e.sn+" p: "+c.index+" cc: "+e.cc+" of playlist ["+t.startSN+"-"+t.endSN+"] parts [0-"+s+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=w.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,part:o[s],targetBufferTime:n}),this.doFragPartsLoad(e,o,s,i).catch((function(e){return a.handleFragLoadError(e)}))}if(!e.url||this.loadedEndOfParts(o,n))return Promise.resolve(null)}}return this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(t?"of ["+t.startSN+"-"+t.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),Object(r.isFiniteNumber)(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=w.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragmentLoader.load(e,i).catch((function(e){return a.handleFragLoadError(e)}))},S.doFragPartsLoad=function(e,t,n,r){var i=this;return new Promise((function(a,o){var s=[];!function n(c){var u=t[c];i.fragmentLoader.loadPart(e,u,r).then((function(r){s[u.index]=r;var o=r.part;i.hls.trigger(l.Events.FRAG_LOADED,r);var h=t[c+1];if(!h||h.fragment!==e)return a({frag:e,part:o,partsLoaded:s});n(c+1)})).catch(o)}(n)}))},S.handleFragLoadError=function(e){var t=e.data;return t&&t.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(l.Events.ERROR,t),null},S._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===w.PARSING){var n=t.frag,r=t.part,i=t.level,a=self.performance.now();n.stats.parsing.end=a,r&&(r.stats.parsing.end=a),this.updateLevelTiming(n,r,i,e.partial)}else this.fragCurrent||(this.state=w.IDLE)},S.getCurrentContext=function(e){var t=this.levels,n=e.level,r=e.sn,i=e.part;if(!t||!t[n])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+n+". The current chunk will not be buffered."),null;var a=t[n],o=i>-1?Object(p.getPartWith)(a,r,i):null,s=o?o.fragment:Object(p.getFragmentWithSN)(a,r,this.fragCurrent);return s?{frag:s,part:o,level:a}:null},S.bufferFragmentData=function(e,t,n,r){if(e&&this.state===w.PARSING){var i=e.data1,a=e.data2,o=i;if(i&&a&&(o=Object(h.appendUint8Array)(i,a)),o&&o.length){var s={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:o};this.hls.trigger(l.Events.BUFFER_APPENDING,s),e.dropped&&e.independent&&!n&&this.flushBufferGap(t)}}},S.flushBufferGap=function(e){var t=this.media;if(t)if(o.BufferHelper.isBuffered(t,t.currentTime)){var n=t.currentTime,r=o.BufferHelper.bufferInfo(t,n,0),i=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),s=Math.max(Math.min(e.start-a,r.end-a),n+a);e.start-s>a&&this.flushMainBuffer(s,e.start)}else this.flushMainBuffer(0,e.start)},S.getFwdBufferInfo=function(e,t){var n=this.config,i=this.getLoadPosition();if(!Object(r.isFiniteNumber)(i))return null;var a=o.BufferHelper.bufferInfo(e,i,n.maxBufferHole);if(0===a.len&&void 0!==a.nextStart){var s=this.fragmentTracker.getBufferedFrag(i,t);if(s&&a.nextStart=n&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},S.getNextFragment=function(e,t){var n,r,i=t.fragments,a=i.length;if(!a)return null;var o,s=this.config,l=i[0].start;if(t.live){var c=s.initialLiveManifestSize;if(a-1&&nn.start&&n.loaded},S.getInitialLiveFragment=function(e,t){var n=this.fragPrevious,r=null;if(n){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=Object(f.findFragmentByPDT)(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){var a=t[i-e.startSN];n.cc===a.cc&&(r=a,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=Object(f.findFragWithCC)(t,n.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?e.fragmentEnd:e.edge,e))}return r},S.getFragmentAtPosition=function(e,t,n){var r,i=this.config,o=this.fragPrevious,s=n.fragments,l=n.endSN,c=n.fragmentHint,u=i.maxFragLookUpTolerance,h=!!(i.lowLatencyMode&&n.partList&&c);if(h&&c&&!this.bitrateTest&&(s=s.concat(c),l=c.sn),et-u?0:u;r=Object(f.findFragmentByPTS)(o,s,e,d)}else r=s[s.length-1];if(r){var p=r.sn-n.startSN,m=o&&r.level===o.level,g=s[p+1];if(this.fragmentTracker.getState(r)===a.FragmentState.BACKTRACKED){r=null;for(var v=p;s[v]&&this.fragmentTracker.getState(s[v])===a.FragmentState.BACKTRACKED;)r=o?s[v--]:s[--v];r||(r=g)}else o&&r.sn===o.sn&&!h&&m&&(r.sn=a-t.maxFragLookUpTolerance&&i<=o;if(null!==r&&n.duration>r&&(i"+e.startSN+" prev-sn: "+(a?a.sn:"na")+" fragments: "+s),h}return l},S.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},S.setStartPosition=function(e,t){var n=this.startPosition;if(n"+e))}}])&&b(k.prototype,C),E&&b(k,E),i}(i.default)},"./src/controller/buffer-controller.ts": +/*!*********************************************!*\ + !*** ./src/controller/buffer-controller.ts ***! + \*********************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ../errors */"./src/errors.ts"),s=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=n(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),h=Object(l.getMediaSource)(),d=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function e(e){var t=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 e=t.hls,n=t.media,r=t.mediaSource;a.logger.log("[buffer-controller]: Media source opened"),n&&(t.updateMediaElementDuration(),e.trigger(i.Events.MEDIA_ATTACHED,{media:n})),r&&r.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){a.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){a.logger.log("[buffer-controller]: Media source ended")},this.hls=e,this._initSourceBuffer(),this.registerListeners()}var t=e.prototype;return t.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},t.destroy=function(){this.unregisterListeners(),this.details=null},t.registerListeners=function(){var e=this.hls;e.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(i.Events.BUFFER_RESET,this.onBufferReset,this),e.on(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.on(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(i.Events.BUFFER_EOS,this.onBufferEos,this),e.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(i.Events.FRAG_PARSED,this.onFragParsed,this),e.on(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(i.Events.BUFFER_RESET,this.onBufferReset,this),e.off(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.off(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(i.Events.BUFFER_EOS,this.onBufferEos,this),e.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(i.Events.FRAG_PARSED,this.onFragParsed,this),e.off(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},t.onManifestParsed=function(e,t){var n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.details=null,a.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var n=this.media=t.media;if(n&&h){var r=this.mediaSource=new h;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(r),this._objectUrl=n.src}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,n=this._objectUrl;if(t){if(a.logger.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){a.logger.warn("[buffer-controller]: onMediaDetaching: "+e.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(n&&self.URL.revokeObjectURL(n),e.src===n?(e.removeAttribute("src"),e.load()):a.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(i.Events.MEDIA_DETACHED,void 0)},t.onBufferReset=function(){var e=this;this.getSourceBufferTypes().forEach((function(t){var n=e.sourceBuffer[t];try{n&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(n),e.sourceBuffer[t]=void 0)}catch(e){a.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",e)}})),this._initSourceBuffer()},t.onBufferCodecs=function(e,t){var n=this,r=this.getSourceBufferTypes().length;Object.keys(t).forEach((function(e){if(r){var i=n.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var a=t[e],o=a.codec,s=a.levelCodec,l=a.container;if((i.levelCodec||i.codec).replace(d,"$1")!==(s||o).replace(d,"$1")){var c=l+";codecs="+(s||o);n.appendChangeType(e,c)}}}else n.pendingTracks[e]=t[e]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},t.appendChangeType=function(e,t){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[e];i&&(a.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){a.logger.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",t)}};r.append(i,e)},t.onBufferAppending=function(e,t){var n=this,r=this.hls,l=this.operationQueue,c=this.tracks,u=t.data,h=t.type,d=t.frag,f=t.part,p=t.chunkMeta,m=p.buffering[h],g=self.performance.now();m.start=g;var v=d.stats.buffering,y=f?f.stats.buffering:null;0===v.start&&(v.start=g),y&&0===y.start&&(y.start=g);var b=c.audio,x="audio"===h&&1===p.id&&"audio/mpeg"===(null==b?void 0:b.container),w={execute:function(){if(m.executeStart=self.performance.now(),x){var e=n.sourceBuffer[h];if(e){var t=d.start-e.timestampOffset;Math.abs(t)>=.1&&(a.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+t+") sn: "+d.sn+")"),e.timestampOffset=d.start)}}n.appendExecutor(u,h)},onStart:function(){},onComplete:function(){var e=self.performance.now();m.executeEnd=m.end=e,0===v.first&&(v.first=e),y&&0===y.first&&(y.first=e);var t=n.sourceBuffer,r={};for(var a in t)r[a]=s.BufferHelper.getBuffered(t[a]);n.appendError=0,n.hls.trigger(i.Events.BUFFER_APPENDED,{type:h,frag:d,part:f,chunkMeta:p,parent:d.type,timeRanges:r})},onError:function(e){a.logger.error("[buffer-controller]: Error encountered while trying to append to the "+h+" SourceBuffer",e);var t={type:o.ErrorTypes.MEDIA_ERROR,parent:d.type,details:o.ErrorDetails.BUFFER_APPEND_ERROR,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=o.ErrorDetails.BUFFER_FULL_ERROR:(n.appendError++,t.details=o.ErrorDetails.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(a.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0)),r.trigger(i.Events.ERROR,t)}};l.append(w,h)},t.onBufferFlushing=function(e,t){var n=this,r=this.operationQueue,o=function(e){return{execute:n.removeExecutor.bind(n,e,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(i.Events.BUFFER_FLUSHED,{type:e})},onError:function(t){a.logger.warn("[buffer-controller]: Failed to remove from "+e+" SourceBuffer",t)}}};t.type?r.append(o(t.type),t.type):this.getSourceBufferTypes().forEach((function(e){r.append(o(e),e)}))},t.onFragParsed=function(e,t){var n=this,r=t.frag,o=t.part,s=[],l=o?o.elementaryStreams:r.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&s.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&s.push("video")),0===s.length&&a.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var e=self.performance.now();r.stats.buffering.end=e,o&&(o.stats.buffering.end=e);var t=o?o.stats:r.stats;n.hls.trigger(i.Events.FRAG_BUFFERED,{frag:r,part:o,stats:t,id:r.type})}),s)},t.onFragChanged=function(e,t){this.flushBackBuffer()},t.onBufferEos=function(e,t){var n=this;this.getSourceBufferTypes().reduce((function(e,r){var i=n.sourceBuffer[r];return t.type&&t.type!==r||i&&!i.ended&&(i.ended=!0,a.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS")),e&&!(i&&!i.ended)}),!0)&&this.blockBuffers((function(){var e=n.mediaSource;e&&"open"===e.readyState&&e.endOfStream()}))},t.onLevelUpdated=function(e,t){var n=t.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.flushBackBuffer=function(){var e=this.hls,t=this.details,n=this.media,a=this.sourceBuffer;if(n&&null!==t){var o=this.getSourceBufferTypes();if(o.length){var l=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if(Object(r.isFiniteNumber)(l)&&!(l<0)){var c=n.currentTime,u=t.levelTargetDuration,h=Math.max(l,u),d=Math.floor(c/u)*u-h;o.forEach((function(n){var r=a[n];if(r){var o=s.BufferHelper.getBuffered(r);o.length>0&&d>o.start(0)&&(e.trigger(i.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),t.live&&e.trigger(i.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),e.trigger(i.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:n}))}}))}}}},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var e=this.details,t=this.hls,n=this.media,i=this.mediaSource,o=e.fragments[0].start+e.totalduration,s=n.duration,l=Object(r.isFiniteNumber)(i.duration)?i.duration:0;e.live&&t.config.liveDurationInfinity?(a.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),i.duration=1/0,this.updateSeekableRange(e)):(o>l&&o>s||!Object(r.isFiniteNumber)(s))&&(a.logger.log("[buffer-controller]: Updating Media Source duration to "+o.toFixed(3)),i.duration=o)}},t.updateSeekableRange=function(e){var t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&null!=t&&t.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+e.totalduration);t.setLiveSeekableRange(r,i)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&!e||2===r){this.createSourceBuffers(n),this.pendingTracks={};var a=this.getSourceBufferTypes();if(0===a.length)return void this.hls.trigger(i.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)"});a.forEach((function(e){t.executeNext(e)}))}},t.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var s in e)if(!t[s]){var l=e[s];if(!l)throw Error("source buffer exists for track "+s+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;a.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var h=t[s]=n.addSourceBuffer(u),d=s;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[s]={buffer:h,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},r++}catch(e){a.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+e.message),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:u})}}r&&this.hls.trigger(i.Events.BUFFER_CREATED,{tracks:this.tracks})},t._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},t._onSBUpdateEnd=function(e){var t=this.operationQueue;t.current(e).onComplete(),t.shiftAndExecuteNext(e)},t._onSBUpdateError=function(e,t){a.logger.error("[buffer-controller]: "+e+" SourceBuffer error",t),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var n=this.operationQueue.current(e);n&&n.onError(t)},t.removeExecutor=function(e,t,n){var i=this.media,o=this.mediaSource,s=this.operationQueue,l=this.sourceBuffer[e];if(!i||!o||!l)return a.logger.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void s.shiftAndExecuteNext(e);var c=Object(r.isFiniteNumber)(i.duration)?i.duration:1/0,u=Object(r.isFiniteNumber)(o.duration)?o.duration:1/0,h=Math.max(0,t),d=Math.min(n,c,u);d>h?(a.logger.log("[buffer-controller]: Removing ["+h+","+d+"] from the "+e+" SourceBuffer"),console.assert(!l.updating,e+" sourceBuffer must not be updating"),l.remove(h,d)):s.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var n=this.operationQueue,r=this.sourceBuffer[t];if(!r)return a.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),void n.shiftAndExecuteNext(t);r.ended=!1,console.assert(!r.updating,t+" sourceBuffer must not be updating"),r.appendBuffer(e)},t.blockBuffers=function(e,t){var n=this;if(void 0===t&&(t=this.getSourceBufferTypes()),!t.length)return a.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(e);var r=this.operationQueue,i=t.map((function(e){return r.appendBlocker(e)}));Promise.all(i).then((function(){e(),t.forEach((function(e){var t=n.sourceBuffer[e];t&&t.updating||r.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,n){var r=this.sourceBuffer[e];if(r){var i=n.bind(this,e);this.listeners[e].push({event:t,listener:i}),r.addEventListener(t,i)}},t.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach((function(e){t.removeEventListener(e.event,e.listener)}))},e}()},"./src/controller/buffer-operation-queue.ts": +/*!**************************************************!*\ + !*** ./src/controller/buffer-operation-queue.ts ***! + \**************************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=function(){function e(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}var t=e.prototype;return t.append=function(e,t){var n=this.queues[t];n.push(e),1===n.length&&this.buffers[t]&&this.executeNext(t)},t.insertAbort=function(e,t){this.queues[t].unshift(e),this.executeNext(t)},t.appendBlocker=function(e){var t,n=new Promise((function(e){t=e})),r={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,e),n},t.executeNext=function(e){var t=this.buffers,n=this.queues,i=t[e],a=n[e];if(a.length){var o=a[0];try{o.execute()}catch(t){r.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(t),i&&i.updating||(a.shift(),this.executeNext(e))}}},t.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},t.current=function(e){return this.queues[e][0]},e}()},"./src/controller/cap-level-controller.ts": +/*!************************************************!*\ + !*** ./src/controller/cap-level-controller.ts ***! + \************************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts");function i(e,t){for(var n=0;n0&&this.mediaWidth>0){var e=this.hls.levels;if(e.length){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},o.getMaxLevel=function(t){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(r,i){return e.isLevelAllowed(i,n.restrictedLevels)&&i<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(i,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 e=this.media,t={width:0,height:0};if(e){var n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t},e.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},e.getMaxLevelByMediaSize=function(e,t,n){if(!e||!e.length)return-1;for(var r,i,a=e.length-1,o=0;o=t||s.height>=n)&&(r=s,!(i=e[o+1])||r.width!==i.width||r.height!==i.height)){a=o;break}}return a},t=e,a=[{key:"contentScaleFactor",get:function(){var e=1;try{e=self.devicePixelRatio}catch(e){}return e}}],(n=[{key:"mediaWidth",get:function(){return this.getDimensions().width*e.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*e.contentScaleFactor}}])&&i(t.prototype,n),a&&i(t,a),e}();t.default=a},"./src/controller/cmcd-controller.ts": +/*!*******************************************!*\ + !*** ./src/controller/cmcd-controller.ts ***! + \*******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return d}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../types/cmcd */"./src/types/cmcd.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts");function s(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nn&&(n=a.bitrate)}return n>0?n:NaN},t.getBufferLength=function(e){var t=this.hls.media,n=e===i.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return n&&t?1e3*a.BufferHelper.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},t.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},e.uuid=function(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)},e.serialize=function(e){for(var t,n=[],r=function(e){return!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e},i=function(e){return Math.round(e)},a=function(e){return 100*i(e/100)},o={br:i,d:i,bl:a,dl:a,mtp:a,nor:function(e){return encodeURIComponent(e)},rtp:a,tb:i},s=c(Object.keys(e||{}).sort());!(t=s()).done;){var l=t.value,u=e[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),n.push(f)}}return n.join(",")},e.toHeaders=function(t){for(var n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={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,s=Object.keys(t);o3)return void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;a.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(n,o)}}},c._generateLicenseRequestChallenge=function(e,t){switch(e.mediaKeySystemDomain){case o.KeySystems.WIDEVINE:return t}throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},c._requestLicense=function(e,t){a.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return a.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var o=this.getLicenseServerUrl(n.mediaKeySystemDomain),s=this._createLicenseXhr(o,e,t);a.logger.log("Sending license request to URL: "+o);var l=this._generateLicenseRequestChallenge(n,e);s.send(l)}catch(e){a.logger.error("Failure requesting DRM license: "+e),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(e,t){if(this._emeEnabled){var n=t.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)}},c.onMediaDetached=function(){var e=this._media,t=this._mediaKeysList;e&&(e.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map((function(e){if(e.mediaKeysSession)return e.mediaKeysSession.close().catch((function(){}))}))).then((function(){return e.setMediaKeys(null)})).catch((function(){})))},c.onManifestParsed=function(e,t){if(this._emeEnabled){var n=t.levels.map((function(e){return e.audioCodec})).filter((function(e){return!!e})),r=t.levels.map((function(e){return e.videoCodec})).filter((function(e){return!!e}));this._attemptKeySystemAccess(o.KeySystems.WIDEVINE,n,r)}},t=e,(n=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&s(t.prototype,n),l&&s(t,l),e}();t.default=l},"./src/controller/fps-controller.ts": +/*!******************************************!*\ + !*** ./src/controller/fps-controller.ts ***! + \******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=function(){function e(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching)},t.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},t.onMediaAttaching=function(e,t){var n=this.hls.config;if(n.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.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),n.fpsDroppedMonitoringPeriod)}},t.checkFPS=function(e,t,n){var a=performance.now();if(t){if(this.lastTime){var o=a-this.lastTime,s=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,c=1e3*s/o,u=this.hls;if(u.trigger(r.Events.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),c>0&&s>u.config.fpsDroppedMonitoringThreshold*l){var h=u.currentLevel;i.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=a,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.checkFPSInterval=function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},e}();t.default=a},"./src/controller/fragment-finders.ts": +/*!********************************************!*\ + !*** ./src/controller/fragment-finders.ts ***! + \********************************************/ +/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(e,t,n){"use strict";n.r(t),n.d(t,"findFragmentByPDT",(function(){return a})),n.d(t,"findFragmentByPTS",(function(){return o})),n.d(t,"fragmentWithinToleranceTest",(function(){return s})),n.d(t,"pdtWithinToleranceTest",(function(){return l})),n.d(t,"findFragWithCC",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function a(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!Object(r.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var i=0;ie&&n.start?-1:0}function l(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}function c(e,t){return i.default.search(e,(function(e){return e.cct?-1:0}))}},"./src/controller/fragment-tracker.ts": +/*!********************************************!*\ + !*** ./src/controller/fragment-tracker.ts ***! + \********************************************/ +/*! exports provided: FragmentState, FragmentTracker */function(e,t,n){"use strict";n.r(t),n.d(t,"FragmentState",(function(){return r})),n.d(t,"FragmentTracker",(function(){return o}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../types/loader */"./src/types/loader.ts");!function(e){e.NOT_LOADED="NOT_LOADED",e.BACKTRACKED="BACKTRACKED",e.APPENDING="APPENDING",e.PARTIAL="PARTIAL",e.OK="OK"}(r||(r={}));var o=function(){function e(e){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=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.on(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.off(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},t.getAppendedFrag=function(e,t){if(t===a.PlaylistLevelType.MAIN){var n=this.activeFragment,r=this.activeParts;if(!n)return null;if(r)for(var i=r.length;i--;){var o=r[i],s=o?o.end:n.appendedPTS;if(o.start<=e&&void 0!==s&&e<=s)return i>9&&(this.activeParts=r.slice(i-9)),o}else if(n.start<=e&&void 0!==n.appendedPTS&&e<=n.appendedPTS)return n}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var a=n[r[i]];if((null==a?void 0:a.body.type)===t&&a.buffered){var o=a.body;if(o.start<=e&&e<=o.end)return o}}return null},t.detectEvictedFragments=function(e,t,n){var r=this;Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a)if(a.buffered){var o=a.range[e];o&&o.time.some((function(e){var n=!r.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&r.removeFragment(a.body),n}))}else a.body.type===n&&r.removeFragment(a.body)}))},t.detectPartialFragments=function(e){var t=this,n=this.timeRanges,r=e.frag,i=e.part;if(n&&"initSegment"!==r.sn){var a=l(r),o=this.fragments[a];o&&(Object.keys(n).forEach((function(e){var a=r.elementaryStreams[e];if(a){var s=n[e],l=null!==i||!0===a.partial;o.range[e]=t.getBufferedTimes(r,i,l,s)}})),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body))}},t.fragBuffered=function(e){var t=l(e),n=this.fragments[t];n&&(n.backtrack=n.loaded=null,n.buffered=!0)},t.getBufferedTimes=function(e,t,n,r){for(var i={time:[],partial:n},a=t?t.start:e.start,o=t?t.end:e.end,s=e.minEndPTS||o,l=e.maxStartPTS||a,c=0;c=u&&s<=h){i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});break}if(au)i.partial=!0,i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});else if(o<=u)break}return i},t.getPartialFragment=function(e){var t,n,r,i=null,a=0,o=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&s(u)&&(n=u.body.start-o,r=u.body.end+o,e>=n&&e<=r&&(t=Math.min(e-n,r-e),a<=t&&(i=u.body,a=t)))})),i},t.getState=function(e){var t=l(e),n=this.fragments[t];return n?n.buffered?s(n)?r.PARTIAL:r.OK:n.backtrack?r.BACKTRACKED:r.APPENDING:r.NOT_LOADED},t.backtrack=function(e,t){var n=l(e),r=this.fragments[n];if(!r||r.backtrack)return null;var i=r.backtrack=t||r.loaded;return r.loaded=null,i},t.getBacktrackData=function(e){var t=l(e),n=this.fragments[t];if(n){var r,i=n.backtrack;if(null!=i&&null!==(r=i.payload)&&void 0!==r&&r.byteLength)return i;this.removeFragment(e)}return null},t.isTimeBuffered=function(e,t,n){for(var r,i,a=0;a=r&&t<=i)return!0;if(t<=r)return!1}return!1},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if("initSegment"!==n.sn&&!n.bitrateTest&&!r){var i=l(n);this.fragments[i]={body:n,loaded:t,backtrack:null,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var n=this,r=t.frag,i=t.part,o=t.timeRanges;if(r.type===a.PlaylistLevelType.MAIN)if(this.activeFragment=r,i){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(i)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach((function(e){var t=o[e];if(n.detectEvictedFragments(e,t),!i)for(var a=0;ae&&r.removeFragment(o)}}))},t.removeFragment=function(e){var t=l(e);e.stats.loaded=0,e.clearElementaryStreamInfo(),delete this.fragments[t]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},e}();function s(e){var t,n;return e.buffered&&((null===(t=e.range.video)||void 0===t?void 0:t.partial)||(null===(n=e.range.audio)||void 0===n?void 0:n.partial))}function l(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.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(e,t,n){"use strict";n.r(t),n.d(t,"STALL_MINIMUM_DURATION_MS",(function(){return s})),n.d(t,"MAX_START_GAP_JUMP",(function(){return l})),n.d(t,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),n.d(t,"SKIP_BUFFER_RANGE_START",(function(){return u})),n.d(t,"default",(function(){return h}));var r=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=250,l=2,c=.1,u=.05,h=function(){function e(e,t,n,r){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=e,this.media=t,this.fragmentTracker=n,this.hls=r}var t=e.prototype;return t.destroy=function(){this.hls=this.fragmentTracker=this.media=null},t.poll=function(e){var t=this.config,n=this.media,i=this.stalled,a=n.currentTime,c=n.seeking,u=this.seeking&&!c,h=!this.seeking&&c;if(this.seeking=c,a===e){if((h||u)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&r.BufferHelper.getBuffered(n).length){var d=r.BufferHelper.bufferInfo(n,a,0),f=d.len>0,p=d.nextStart||0;if(f||p){if(c){var m=d.len>l,g=!p||p-a>l&&!this.fragmentTracker.getPartialFragment(a);if(m||g)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,y=Math.max(p,d.start||0)-a,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 w=self.performance.now();if(null!==i){var k=w-i;!c&&k>=s&&this._reportStall(d.len);var C=r.BufferHelper.bufferInfo(n,a,t.maxBufferHole);this._tryFixBufferStall(C,k)}else this.stalled=w}}}else if(this.moved=!0,null!==i){if(this.stallReported){var E=self.performance.now()-i;o.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(E)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media.currentTime,a=r.getPartialFragment(i);a&&this._trySkipBufferHole(a)||e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(o.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,o.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+e+")"),t.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},t._trySkipBufferHole=function(e){for(var t=this.config,n=this.hls,s=this.media,l=s.currentTime,h=0,d=r.BufferHelper.getBuffered(s),f=0;f=h&&l.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,a)),u=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;e.playbackRate=Math.min(c,Math.max(1,u))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}}}}},l.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},l.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},t=e,(n=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e)return null;var t=e.holdBack,n=e.partHoldBack,r=e.targetduration,i=this.config,a=i.liveSyncDuration,o=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,c=s&&n||t;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==a?a:o*r);var u=r;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(null===e||null===t||null===n)return null;var r=n.edge,i=e-t-this.edgeStalled,a=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,i),o)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var n=e.buffered.length;return n?e.buffered.end(n-1):t.edge-this.currentTime}}])&&o(t.prototype,n),s&&o(t,s),e}()},"./src/controller/level-controller.ts": +/*!********************************************!*\ + !*** ./src/controller/level-controller.ts ***! + \********************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return p}));var r=n(/*! ../types/level */"./src/types/level.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/codecs */"./src/utils/codecs.ts"),s=n(/*! ./level-helper */"./src/controller/level-helper.ts"),l=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(e){for(var t=1;t0){n=c[0].bitrate,c.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=c;for(var v=0;vthis.hls.config.fragLoadingMaxRetry&&(o=n.frag.level)):o=n.frag.level}break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(l=!1),o=r.level),s=!0;break;case a.ErrorDetails.REMUX_ALLOC_ERROR:o=n.level,s=!0}void 0!==o&&this.recoverLevel(n,o,s,l)}}},v.recoverLevel=function(e,t,n,r){var i=e.details,a=this._levels[t];if(a.loadError++,n){if(!this.retryLoadingOrFail(e))return void(this.currentLevelIndex=-1);e.levelRetry=!0}if(r){var o=a.url.length;if(o>1&&a.loadError1){var r=(t.urlId+1)%n;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(e){e.urlId=r})),this.level=e}},v.onFragLoaded=function(e,t){var n=t.frag;if(void 0!==n&&n.type===c.PlaylistLevelType.MAIN){var r=this._levels[n.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},v.onLevelLoaded=function(e,t){var n,r,i=t.level,a=t.details,o=this._levels[i];if(!o)return this.warn("Invalid level index "+i),void(null!==(r=t.deliveryDirectives)&&void 0!==r&&r.skip&&(a.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(i,t,o.details)):null!==(n=t.deliveryDirectives)&&void 0!==n&&n.skip&&(a.deltaUpdateFailed=!0)},v.onAudioTrackSwitched=function(e,t){var n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=this.hls.audioTracks[t.id].groupId,a=0;a0){var r=n.urlId,a=n.url[r];if(e)try{a=e.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Attempt loading level index "+t+(e?" at sn "+e.msn+" part "+e.part:"")+" with URL-id "+r+" "+a),this.clearTimer(),this.hls.trigger(i.Events.LEVEL_LOADING,{url:a,level:t,id:r,deliveryDirectives:e||null})}},v.removeLevel=function(e,t){var n=function(e,n){return n!==t},r=this._levels.filter((function(r,i){return i!==e||r.url.length>1&&void 0!==t&&(r.url=r.url.filter(n),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(n)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(n)),r.urlId=0,!0)})).map((function(e,t){var n=e.details;return null!=n&&n.fragments&&n.fragments.forEach((function(e){e.level=t})),e}));this._levels=r,this.hls.trigger(i.Events.LEVELS_UPDATED,{levels:r})},p=l,(m=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t,n=this._levels;if(0!==n.length&&(this.currentLevelIndex!==e||null===(t=n[e])||void 0===t||!t.details)){if(e<0||e>=n.length){var r=e<0;if(this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:r,reason:"invalid level idx"}),r)return;e=Math.min(e,n.length-1)}this.clearTimer();var o=this.currentLevelIndex,s=n[o],l=n[e];this.log("switching to level "+e+" from "+o),this.currentLevelIndex=e;var c=u({},l,{level:e,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(i.Events.LEVEL_SWITCHING,c);var h=l.details;if(!h||h.live){var d=this.switchParams(l.uri,null==s?void 0:s.details);this.loadPlaylist(d)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&h(p.prototype,m),g&&h(p,g),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(e,t,n){"use strict";n.r(t),n.d(t,"addGroupId",(function(){return a})),n.d(t,"assignTrackIdsByGroup",(function(){return o})),n.d(t,"updatePTS",(function(){return s})),n.d(t,"updateFragPTSDTS",(function(){return c})),n.d(t,"mergeDetails",(function(){return u})),n.d(t,"mapPartIntersection",(function(){return h})),n.d(t,"mapFragmentIntersection",(function(){return d})),n.d(t,"adjustSliding",(function(){return f})),n.d(t,"addSliding",(function(){return p})),n.d(t,"computeReloadInterval",(function(){return m})),n.d(t,"getFragmentWithSN",(function(){return g})),n.d(t,"getPartWith",(function(){return v}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts");function a(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function o(e){var t={};e.forEach((function(e){var n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}function s(e,t,n){l(e[t],e[n])}function l(e,t){var n=t.startPTS;if(Object(r.isFiniteNumber)(n)){var i,a=0;t.sn>e.sn?(a=n-e.start,i=e):(a=e.start-n,i=t),i.duration!==a&&(i.duration=a)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}function c(e,t,n,a,o,s){a-n<=0&&(i.logger.warn("Fragment should have a positive duration",t),a=n+t.duration,s=o+t.duration);var c=n,u=a,h=t.startPTS,d=t.endPTS;if(Object(r.isFiniteNumber)(h)){var f=Math.abs(h-n);Object(r.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(f,t.deltaPTS):t.deltaPTS=f,c=Math.max(n,h),n=Math.min(n,h),o=Math.min(o,t.startDTS),u=Math.min(a,d),a=Math.max(a,d),s=Math.max(s,t.endDTS)}t.duration=a-n;var p=n-t.start;t.appendedPTS=a,t.start=t.startPTS=n,t.maxStartPTS=c,t.startDTS=o,t.endPTS=a,t.minEndPTS=u,t.endDTS=s;var m,g=t.sn;if(!e||ge.endSN)return 0;var v=g-e.startSN,y=e.fragments;for(y[v]=t,m=v;m>0;m--)l(y[m],y[m-1]);for(m=v;m=0;o--){var s=a[o].initSegment;if(s){n=s;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var l,u=0;if(d(e,t,(function(e,i){e.relurl&&(u=e.cc-i.cc),Object(r.isFiniteNumber)(e.startPTS)&&Object(r.isFiniteNumber)(e.endPTS)&&(i.start=i.startPTS=e.startPTS,i.startDTS=e.startDTS,i.appendedPTS=e.appendedPTS,i.maxStartPTS=e.maxStartPTS,i.endPTS=e.endPTS,i.endDTS=e.endDTS,i.minEndPTS=e.minEndPTS,i.duration=e.endPTS-e.startPTS,i.duration&&(l=i),t.PTSKnown=t.alignedSliding=!0),i.elementaryStreams=e.elementaryStreams,i.loader=e.loader,i.stats=e.stats,i.urlId=e.urlId,e.initSegment&&(i.initSegment=e.initSegment,n=e.initSegment)})),n&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((function(e){var t;e.initSegment&&e.initSegment.relurl!==(null===(t=n)||void 0===t?void 0:t.relurl)||(e.initSegment=n)})),t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some((function(e){return!e})),t.deltaUpdateFailed)){i.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=t.skippedSegments;p--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var m=t.fragments;if(u){i.logger.warn("discontinuity sliding from playlist, take drift into account");for(var g=0;g=r.length||p(t,r[n].start)}function p(e,t){if(t){for(var n=e.fragments,r=e.skippedSegments;r0&&a<3*r,s=t.loading.end-t.loading.start,l=e.availabilityDelay;if(!1===e.updated)if(o){var c=333*e.misses;n=Math.max(Math.min(i,2*s),c),e.availabilityDelay=(e.availabilityDelay||0)+n}else n=i;else o?(l=Math.min(l||r/2,a),e.availabilityDelay=l,n=l+r-a):n=r-s;return Math.round(n)}function g(e,t,n){if(!e||!e.details)return null;var r=e.details,i=r.fragments[t-r.startSN];return i||((i=r.fragmentHint)&&i.sn===t?i:t0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=i.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=i.State.STOPPED},k.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},k.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_LEVEL:var e,t=this.levels,n=this.level,r=null==t||null===(e=t[n])||void 0===e?void 0:e.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=i.State.IDLE;break}break;case i.State.FRAG_LOADING_WAITING_RETRY:var a,o=self.performance.now(),s=this.retryDate;(!s||o>=s||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=i.State.IDLE)}this.onTickEnd()},k.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},k.doTickIdle=function(){var e,t,n=this.hls,r=this.levelLastLoaded,a=this.levels,s=this.media,h=n.config,d=n.nextLoadLevel;if(null!==r&&(s||!this.startFragRequested&&h.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&a&&a[d]){var f=a[d];this.level=n.nextLoadLevel=d;var p=f.details;if(!p||this.state===i.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==d)this.state=i.State.WAITING_LEVEL;else{var m=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:s,c.PlaylistLevelType.MAIN);if(null!==m&&!(m.len>=this.getMaxBufferLength(f.maxBitrate))){if(this._streamEnded(m,p)){var g={};return this.altAudio&&(g.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,g),void(this.state=i.State.ENDED)}var v=m.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(s,x,c.PlaylistLevelType.MAIN),y=this.getNextFragment(this.nextLoadPosition,p)}y&&(!y.initSegment||y.initSegment.data||this.bitrateTest||(y=y.initSegment),"identity"!==(null===(e=y.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=y.decryptdata)&&void 0!==t&&t.key?this.loadFragment(y,p,v):this.loadKey(y,p))}}}},k.loadFragment=function(t,n,r){var i,a=this.fragmentTracker.getState(t);if(this.fragCurrent=t,a===l.FragmentState.BACKTRACKED){var o=this.fragmentTracker.getBacktrackData(t);if(o)return this._handleFragmentLoadProgress(o),void this._handleFragmentLoadComplete(o);a=l.FragmentState.NOT_LOADED}a===l.FragmentState.NOT_LOADED||a===l.FragmentState.PARTIAL?"initSegment"===t.sn?this._loadInitSegment(t):this.bitrateTest?(t.bitrateTest=!0,this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t)):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)):a===l.FragmentState.APPENDING?this.reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t):0===(null===(i=this.media)||void 0===i?void 0:i.buffered.length)&&this.fragmentTracker.removeAllFragments()},k.getAppendedFrag=function(e){var t=this.fragmentTracker.getAppendedFrag(e,c.PlaylistLevelType.MAIN);return t&&"fragment"in t?t.fragment:t},k.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,c.PlaylistLevelType.MAIN)},k.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},k.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},k.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var n,r=this.getAppendedFrag(t.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!t.paused&&e){var i=e[this.hls.nextLoadLevel],a=this.fragLastKbps;n=a&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*a)+1:0}else n=0;var o=this.getBufferedFrag(t.currentTime+n);if(o){var s=this.followingBufferedFrag(o);if(s){this.abortCurrentFrag();var l=s.maxStartPTS?s.maxStartPTS:s.start,c=s.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)}}}},k.abortCurrentFrag=function(){var e=this.fragCurrent;this.fragCurrent=null,null!=e&&e.loader&&e.loader.abort(),this.state===i.State.KEY_LOADING&&(this.state=i.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},k.flushMainBuffer=function(t,n){e.prototype.flushMainBuffer.call(this,t,n,this.altAudio?"video":null)},k.onMediaAttached=function(t,n){e.prototype.onMediaAttached.call(this,t,n);var r=n.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)},k.onMediaDetaching=function(){var t=this.media;t&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),e.prototype.onMediaDetaching.call(this)},k.onMediaPlaying=function(){this.tick()},k.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;Object(r.isFiniteNumber)(t)&&this.log("Media seeked to "+t.toFixed(3)),this.tick()},k.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},k.onManifestParsed=function(e,t){var n,r=!1,i=!1;t.levels.forEach((function(e){(n=e.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(r=!0),-1!==n.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=r&&i&&!Object(a.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},k.onLevelLoading=function(e,t){var n=this.levels;if(n&&this.state===i.State.IDLE){var r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(r.details))&&(this.state=i.State.WAITING_LEVEL)}},k.onLevelLoaded=function(e,t){var n,r=this.levels,a=t.level,s=t.details,l=s.totalduration;if(r){this.log("Level "+a+" loaded ["+s.startSN+","+s.endSN+"], cc ["+s.startCC+", "+s.endCC+"] duration:"+l);var c=this.fragCurrent;!c||this.state!==i.State.FRAG_LOADING&&this.state!==i.State.FRAG_LOADING_WAITING_RETRY||c.level!==t.level&&c.loader&&(this.state=i.State.IDLE,c.loader.abort());var u=r[a],h=0;if(s.live||null!==(n=u.details)&&void 0!==n&&n.live){if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed)return;h=this.alignPlaylists(s,u.details)}if(u.details=s,this.levelLastLoaded=a,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:s,level:a}),this.state===i.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=i.State.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,h),this.tick()}else this.warn("Levels were reset while loading level "+a)},k._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.levels;if(a){var o=a[n.level],s=o.details;if(s){var l=o.videoCodec,u=s.PTSKnown||!s.live,f=null===(t=n.initSegment)||void 0===t?void 0:t.data,p=this._getAudioCodec(o),m=this.transmuxer=this.transmuxer||new h.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),g=r?r.index:-1,v=-1!==g,y=new d.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,i.byteLength,g,v),b=this.initPTS[n.cc];m.push(i,f,p,l,n,r,s.totalduration,u,y,b)}else this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},k.onAudioTrackSwitching=function(e,t){var n=this.altAudio,r=!!t.url,i=t.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 a=this.fragCurrent;null!=a&&a.loader&&(this.log("Switching to main audio track, cancel main fragment load"),a.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var s=this.hls;n&&s.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:i})}},k.onAudioTrackSwitched=function(e,t){var n=t.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},k.onBufferCreated=function(e,t){var n,r,i=t.tracks,a=!1;for(var o in i){var s=i[o];if("main"===s.id){if(r=o,n=s,"video"===o){var l=i[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},k.onFragBuffered=function(e,t){var n=t.frag,r=t.part;if(!n||n.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===i.State.PARSED&&(this.state=i.State.IDLE));var a=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},k.onError=function(e,t){switch(t.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,t);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==i.State.ERROR&&(t.fatal?(this.warn(""+t.details),this.state=i.State.ERROR):t.levelRetry||this.state!==i.State.WAITING_LEVEL||(this.state=i.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:if("main"===t.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var n=!0,r=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);r&&r.len>.5&&(n=!this.reduceMaxBufferLength(r.len)),n&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},k.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){var n=s.BufferHelper.getBuffered(e);!this.loadedmetadata&&n.length?(this.loadedmetadata=!0,this.seekToStartPos()):t.poll(this.lastCurrentTime),this.lastCurrentTime=e.currentTime}},k.onFragLoadEmergencyAborted=function(){this.state=i.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},k.onBufferFlushed=function(e,t){var n=t.type;if(n!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(n===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,c.PlaylistLevelType.MAIN)}},k.onLevelsUpdated=function(e,t){this.levels=t.levels},k.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},k.seekToStartPos=function(){var e=this.media,t=e.currentTime,n=this.startPosition;if(n>=0&&t0&&(i1&&!1===e.seeking){var n=e.currentTime;if(s.BufferHelper.isBuffered(e,n)?t=this.getAppendedFrag(n):s.BufferHelper.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){var r=this.fragPlaying,i=t.level;r&&t.sn===r.sn&&r.level===i&&t.urlId===r.urlId||(this.hls.trigger(o.Events.FRAG_CHANGED,{frag:t}),r&&r.level===i||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:i}),this.fragPlaying=t)}}},b=y,(x=[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);return this.followingBufferedFrag(t)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&g(b.prototype,x),w&&g(b,w),y}(i.default)},"./src/controller/subtitle-stream-controller.ts": +/*!******************************************************!*\ + !*** ./src/controller/subtitle-stream-controller.ts ***! + \******************************************************/ +/*! exports provided: SubtitleStreamController */function(e,t,n){"use strict";n.r(t),n.d(t,"SubtitleStreamController",(function(){return m}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),s=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),l=n(/*! ./level-helper */"./src/controller/level-helper.ts"),c=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),u=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),h=n(/*! ../types/loader */"./src/types/loader.ts"),d=n(/*! ../types/level */"./src/types/level.ts");function f(e,t){for(var n=0;n=i[s].start&&o<=i[s].end){a=i[s];break}var l=n.start+n.duration;a?a.end=l:(a={start:o,end:l},i.push(a)),this.fragmentTracker.fragBuffered(n)}}},b.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=this.currentTrackId,a=this.levels;if(!a.length||!a[i]||!a[i].details)return;var o=r-a[i].details.targetduration;if(o<=0)return;t.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(e){for(var t=0;t=c.length||i!==a)&&h){if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||null!==(n=h.details)&&void 0!==n&&n.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(s.alignMediaPlaylistByPDT)(r,d):f&&Object(l.addSliding)(r,f.start)}h.details=r,this.levelLastLoaded=i,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(e){var t=e.frag,n=e.payload,i=t.decryptdata,a=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var o=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(n),i.key.buffer,i.iv.buffer).then((function(e){var n=performance.now();a.trigger(r.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:o,tdecrypt:n}})}))}},b.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var e,t=this.currentTrackId,n=this.levels;if(!n.length||!n[t]||!n[t].details)return;var s=n[t].details,l=s.targetduration,h=this.config,d=this.media,f=a.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,d.currentTime-l,h.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(s,"Subtitle track details are defined on idle subtitle stream controller tick");var m,g=s.fragments,v=g.length,y=s.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(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},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(e){Object(i.clearCurrentCues)(e)})),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(e,t){this.tracks=t.subtitleTracks},f.onSubtitleTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.trackId,a=this.tracksInGroup[i];if(a){var o=a.details;a.details=t.details,this.log("subtitle track "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,o))}else this.warn("Invalid subtitle track id "+n)},f.onLevelLoading=function(e,t){this.switchLevel(t.level)},f.onLevelSwitching=function(e,t){this.switchLevel(t.level)},f.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.textGroupIds){var n=t.textGroupIds[t.urlId];if(this.groupId!==n){var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,a=this.tracks.filter((function(e){return!n||e.groupId===n}));this.tracksInGroup=a;var o=this.findTrackId(null==i?void 0:i.name)||this.findTrackId();this.groupId=n;var s={subtitleTracks:a};this.log("Updating subtitle tracks, "+a.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(r.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==o&&this.setSubtitleTrack(o,i)}}},f.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n=i.length)){this.clearTimer();var a=i[e];if(this.log("Switching to subtitle track "+e),this.trackId=e,a){var o=a.id,s=a.groupId,l=void 0===s?"":s,c=a.name,u=a.type,h=a.url;this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:l,name:c,type:u,url:h});var d=this.switchParams(a.url,null==t?void 0:t.details);this.loadPlaylist(d)}else this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:e})}}else this.queuedDefaultTrack=e},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=u(this.media.textTracks),n=0;n=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),u=!0,f/(n-t)>.5))return}if(u||a.push([t,n]),this.config.renderTextTracksNatively){var p=this.captionsTracks[e];this.Cues.newCue(p,t,n,r)}else{var m=this.Cues.newCue(null,t,n,r);this.hls.trigger(i.Events.CUES_PARSED,{type:"captions",cues:m,track:e})}},t.onInitPtsFound=function(e,t){var n=this,r=t.frag,a=t.id,o=t.initPTS,s=t.timescale,l=this.unparsedVttFrags;"main"===a&&(this.initPTS[r.cc]=o,this.timescale[r.cc]=s),l.length&&(this.unparsedVttFrags=[],l.forEach((function(e){n.onFragLoaded(i.Events.FRAG_LOADED,e)})))},t.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n>>8^255&g^99,e[f]=g,t[g]=f;var v=d[f],y=d[v],b=d[y],x=257*d[g]^16843008*g;r[f]=x<<24|x>>>8,i[f]=x<<16|x>>>16,a[f]=x<<8|x>>>24,o[f]=x,x=16843009*b^65537*y^257*v^16843008*f,l[g]=x<<24|x>>>8,c[g]=x<<16|x>>>16,u[g]=x<<8|x>>>24,h[g]=x,f?(f=v^d[d[d[b^v]]],p^=d[d[p]]):f=p=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r>>6);var p=(60&t[n+2])>>>2;if(!(p>f.length-1))return c=(1&t[n+2])<<2,c|=(192&t[n+3])>>>6,r.logger.log("manifest codec:"+o+", ADTS type:"+s+", samplingIndex:"+p),/firefox/i.test(h)?p>=6?(s=5,u=new Array(4),l=p-3):(s=2,u=new Array(2),l=p):-1!==h.indexOf("android")?(s=2,u=new Array(2),l=p):(s=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)&&(s=2,u=new Array(2)),l=p)),u[0]=s<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===s&&(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."+s,manifestCodec:d};e.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function s(e,t){return 255===e[t]&&240==(246&e[t+1])}function l(e,t){return 1&e[t+1]?7:9}function c(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function u(e,t){return t+5=e.length)return!1;var r=c(e,t);if(r<=n)return!1;var i=t+r;return i===e.length||h(e,i)}return!1}function p(e,t,n,i,a){if(!e.samplerate){var s=o(t,n,i,a);if(!s)return;e.config=s.config,e.samplerate=s.samplerate,e.channelCount=s.channelCount,e.codec=s.codec,e.manifestCodec=s.manifestCodec,r.logger.log("parsed codec:"+e.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function m(e){return 9216e4/e}function g(e,t,n,r,i){var a=l(e,t),o=c(e,t);if((o-=a)>0)return{headerLength:a,frameLength:o,stamp:n+r*i}}function v(e,t,n,r,i){var a=g(t,n,r,i,m(e.samplerate));if(a){var o,s=a.frameLength,l=a.headerLength,c=a.stamp,u=l+s,h=Math.max(0,n+u-t.length);h?(o=new Uint8Array(u-l)).set(t.subarray(n+l,t.length),0):o=t.subarray(n+l,n+u);var d={unit:o,pts:c};return h||e.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(e,t,n){"use strict";n.r(t),n.d(t,"initPTSFn",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),o=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),l=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(){},t.resetContiguity=function(){},t.canParse=function(e,t){return!1},t.appendFrame=function(e,t,n){},t.demux=function(e,t){this.cachedData&&(e=Object(o.appendUint8Array)(this.cachedData,e),this.cachedData=null);var n,r,l=i.getID3Data(e,0),u=l?l.length:0,h=this._audioTrack,d=this._id3Track,f=l?i.getTimeStamp(l):void 0,p=e.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=c(f,t)),l&&l.length>0&&d.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),r=this.initPTS;ue?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&r.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){for(var t=8,n=8,r=0;r0)return e.subarray(n,n+r)},s=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3]},l=function(e,t){return i(e,t)&&s(e,t+6)+10<=e.length-t},c=function(e){for(var t=d(e),n=0;n>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(a);break;case 12:case 13:o=e[u++],c+=String.fromCharCode((31&a)<<6|63&o);break;case 14:o=e[u++],s=e[u++],c+=String.fromCharCode((15&a)<<12|(63&o)<<6|(63&s)<<0)}}return c},b={decodeTextFrame:m};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(e,t,n){"use strict";n.r(t);var r=n(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ./mpegaudio */"./src/demux/mpegaudio.ts");function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var l=r.prototype;return l.resetInitSegment=function(t,n,r){e.prototype.resetInitSegment.call(this,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(i.getID3Data(e,0)||[]).length,n=e.length;t0},t.demux=function(e){var t=e,n=Object(i.dummyTrack)();if(this.config.progressive){this.remainderData&&(t=Object(r.appendUint8Array)(this.remainderData,e));var a=Object(r.segmentValidRange)(t);this.remainderData=a.remainder,n.samples=a.valid||new Uint8Array}else n.samples=t;return{audioTrack:Object(i.dummyTrack)(),avcTrack:n,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.flush=function(){var e=Object(i.dummyTrack)();return e.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(i.dummyTrack)(),avcTrack:e,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){},e}();a.minProbeByteLength=1024,t.default=a},"./src/demux/mpegaudio.ts": +/*!********************************!*\ + !*** ./src/demux/mpegaudio.ts ***! + \********************************/ +/*! exports provided: appendFrame, parseHeader, isHeaderPattern, isHeader, canParse, probe */function(e,t,n){"use strict";n.r(t),n.d(t,"appendFrame",(function(){return l})),n.d(t,"parseHeader",(function(){return c})),n.d(t,"isHeaderPattern",(function(){return u})),n.d(t,"isHeader",(function(){return h})),n.d(t,"canParse",(function(){return d})),n.d(t,"probe",(function(){return f}));var r=null,i=[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],a=[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]],s=[0,1,1,4];function l(e,t,n,r,i){if(!(n+24>t.length)){var a=c(t,n);if(a&&n+a.frameLength<=t.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength,missing:0}}}}function c(e,t){var n=e[t+1]>>3&3,l=e[t+1]>>1&3,c=e[t+2]>>4&15,u=e[t+2]>>2&3;if(1!==n&&0!==c&&15!==c&&3!==u){var h=e[t+2]>>1&1,d=e[t+3]>>6,f=1e3*i[14*(3===n?3-l:3===l?3:4)+c-1],p=a[3*(3===n?0:2===n?1:2)+u],m=3===d?1:2,g=o[n][l],v=s[l],y=8*g*v,b=Math.floor(g*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&&(e[t+3]=128|e[t+3]),{sampleRate:p,channelCount:m,frameLength:b,samplesPerFrame:y}}}function u(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function h(e,t){return t+1=e.length)return void n();if(!(e[t].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,r),!r)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n},t.getAvcDecryptedUnit=function(e,t){for(var n=new Uint8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e},t.decryptAvcSample=function(e,t,n,r,a,o){var s=Object(i.discardEPB)(a.data),l=this.getAvcEncryptedData(s),c=this;this.decryptBuffer(l.buffer,(function(i){a.data=c.getAvcDecryptedUnit(s,i),o||c.decryptAvcSamples(e,t,n+1,r)}))},t.decryptAvcSamples=function(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var a=i[n];if(!(a.data.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,r,a,o),!o)return}}}},e}();t.default=a},"./src/demux/transmuxer-interface.ts": +/*!*******************************************!*\ + !*** ./src/demux/transmuxer-interface.ts ***! + \*******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h}));var r=n(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function e(e,t,n,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=e,this.id=t,this.onTransmuxComplete=n,this.onFlush=l;var d=e.config,f=function(t,n){(n=n||{}).frag=h.frag,n.id=h.id,e.trigger(t,n)};this.observer=new c.EventEmitter,this.observer.on(i.Events.FRAG_DECRYPTED,f),this.observer.on(i.Events.ERROR,f);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(d.enableWorker&&"undefined"!=typeof Worker){var g;o.logger.log("demuxing in webworker");try{g=this.worker=r(/*! ../demux/transmuxer-worker.ts */"./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(t){e.trigger(i.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(t.message+" ("+t.filename+":"+t.lineno+")")})},g.postMessage({cmd:"init",typeSupported:p,vendor:m,id:t,config:JSON.stringify(d)})}catch(e){o.logger.warn("Error in worker:",e),o.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new a.default(this.observer,p,d,m,t),this.worker=null}}else this.transmuxer=new a.default(this.observer,p,d,m,t)}var t=e.prototype;return t.destroy=function(){var e=this.worker;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.worker=null;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var n=this.observer;n&&n.removeAllListeners(),this.observer=null},t.push=function(e,t,n,r,i,s,l,c,u,h){var d=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,m=s?s.start:i.start,g=i.decryptdata,v=this.frag,y=!(v&&i.cc===v.cc),b=!(v&&u.level===v.level),x=v?u.sn-v.sn:-1,w=this.part?u.part-this.part.index:1,k=!b&&(1===x||0===x&&1===w),C=self.performance.now();(b||x||0===i.stats.parsing.start)&&(i.stats.parsing.start=C),!s||!w&&k||(s.stats.parsing.start=C);var E=new a.TransmuxState(y,k,c,b,m);if(!k||y){o.logger.log("[transmuxer-interface, "+i.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: "+k+"\n accurateTimeOffset: "+c+"\n timeOffset: "+m);var S=new a.TransmuxConfig(n,r,t,l,h);this.configureTransmuxer(S)}if(this.frag=i,this.part=s,p)p.postMessage({cmd:"demux",data:e,decryptdata:g,chunkMeta:u,state:E},e instanceof ArrayBuffer?[e]:[]);else if(f){var T=f.push(e,g,u,E);Object(a.isPromise)(T)?T.then((function(e){d.handleTransmuxComplete(e)})):this.handleTransmuxComplete(T)}},t.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:e});else if(n){var i=n.flush(e);Object(a.isPromise)(i)?i.then((function(n){t.handleFlushResult(n,e)})):this.handleFlushResult(i,e)}},t.handleFlushResult=function(e,t){var n=this;e.forEach((function(e){n.handleTransmuxComplete(e)})),this.onFlush(t)},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},t.configureTransmuxer=function(e){var t=this.worker,n=this.transmuxer;t?t.postMessage({cmd:"configure",config:e}):n&&n.configure(e)},t.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},e}()},"./src/demux/transmuxer-worker.ts": +/*!****************************************!*\ + !*** ./src/demux/transmuxer-worker.ts ***! + \****************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return s}));var r=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function s(e){var t=new o.EventEmitter,n=function(t,n){e.postMessage({event:t,data:n})};t.on(i.Events.FRAG_DECRYPTED,n),t.on(i.Events.ERROR,n),e.addEventListener("message",(function(i){var o=i.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);e.transmuxer=new r.default(t,o.typeSupported,s,o.vendor,o.id),Object(a.enableLogs)(s.debug),n("init",null);break;case"configure":e.transmuxer.configure(o.config);break;case"demux":var c=e.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(r.isPromise)(c)?c.then((function(t){l(e,t)})):l(e,c);break;case"flush":var h=o.chunkMeta,d=e.transmuxer.flush(h);Object(r.isPromise)(d)?d.then((function(t){u(e,t,h)})):u(e,d,h)}}))}function l(e,t){if((n=t.remuxResult).audio||n.video||n.text||n.id3||n.initSegment){var n,r=[],i=t.remuxResult,a=i.audio,o=i.video;a&&c(r,a),o&&c(r,o),e.postMessage({event:"transmuxComplete",data:t},r)}}function c(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function u(e,t,n){t.forEach((function(t){l(e,t)})),e.postMessage({event:"flush",data:n})}},"./src/demux/transmuxer.ts": +/*!*********************************!*\ + !*** ./src/demux/transmuxer.ts ***! + \*********************************/ +/*! exports provided: default, isPromise, TransmuxConfig, TransmuxState */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return y})),n.d(t,"isPromise",(function(){return x})),n.d(t,"TransmuxConfig",(function(){return w})),n.d(t,"TransmuxState",(function(){return k}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),s=n(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.ts"),l=n(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.ts"),c=n(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.ts"),u=n(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.ts"),h=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),d=n(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.ts"),f=n(/*! ./chunk-cache */"./src/demux/chunk-cache.ts"),p=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),m=n(/*! ../utils/logger */"./src/utils/logger.ts");try{r=self.performance.now.bind(self.performance)}catch(e){m.logger.debug("Unable to use Performance API on this environment"),r=self.Date.now}var g=[{demux:c.default,remux:h.default},{demux:l.default,remux:d.default},{demux:s.default,remux:h.default},{demux:u.default,remux:h.default}],v=1024;g.forEach((function(e){var t=e.demux;v=Math.max(v,t.minProbeByteLength)}));var y=function(){function e(e,t,n,r,i){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=e,this.typeSupported=t,this.config=n,this.vendor=r,this.id=i}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(e,t,n,i){var a=this,o=n.transmuxing;o.executeStart=r();var s=new Uint8Array(e),l=this.cache,c=this.config,u=this.currentTransmuxState,h=this.transmuxConfig;i&&(this.currentTransmuxState=i);var d=function(e,t){var n=null;return e.byteLength>0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(n=t),n}(s,t);if(d&&"AES-128"===d.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(s,d.key.buffer,d.iv.buffer).then((function(e){var t=a.push(e,null,n);return a.decryptionPromise=null,t})),this.decryptionPromise;var m=f.softwareDecrypt(s,d.key.buffer,d.iv.buffer);if(!m)return o.executeEnd=r(),b(n);s=new Uint8Array(m)}var g=i||u,v=g.contiguous,y=g.discontinuity,x=g.trackSwitch,w=g.accurateTimeOffset,k=g.timeOffset,C=h.audioCodec,E=h.videoCodec,S=h.defaultInitPts,T=h.duration,_=h.initSegmentData;if((y||x)&&this.resetInitSegment(_,C,E,T),y&&this.resetInitialTimestamp(S),v||this.resetContiguity(),this.needsProbing(s,y,x)){if(l.dataLength){var O=l.flush();s=Object(p.appendUint8Array)(O,s)}this.configureTransmuxer(s,h)}var L=this.transmux(s,d,k,w,n),A=this.currentTransmuxState;return A.contiguous=!0,A.discontinuity=!1,A.trackSwitch=!1,o.executeEnd=r(),L},t.flush=function(e){var t=this,n=e.transmuxing;n.executeStart=r();var o=this.decrypter,s=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return t.flush(e)}));var u=[],h=l.timeOffset;if(o){var d=o.flush();d&&u.push(this.push(d,null,e))}var f=s.dataLength;s.reset();var p=this.demuxer,m=this.remuxer;if(!p||!m)return f>=v&&this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),n.executeEnd=r(),[b(e)];var g=p.flush(h);return x(g)?g.then((function(n){return t.flushRemux(u,n,e),u})):(this.flushRemux(u,g,e),u)},t.flushRemux=function(e,t,n){var i=t.audioTrack,a=t.avcTrack,o=t.id3Track,s=t.textTrack,l=this.currentTransmuxState,c=l.accurateTimeOffset,u=l.timeOffset;m.logger.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var h=this.remuxer.remux(i,a,o,s,u,c,!0,this.id);e.push({remuxResult:h,chunkMeta:n}),n.transmuxing.executeEnd=r()},t.resetInitialTimestamp=function(e){var t=this.demuxer,n=this.remuxer;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,n,r){var i=this.demuxer,a=this.remuxer;i&&a&&(i.resetInitSegment(t,n,r),a.resetInitSegment(e,t,n))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(e,t,n,r,i){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,r,i):this.transmuxUnencrypted(e,n,r,i)},t.transmuxUnencrypted=function(e,t,n,r){var i=this.demuxer.demux(e,t,!1,!this.config.progressive),a=i.audioTrack,o=i.avcTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(a,o,s,l,t,n,!1,this.id),chunkMeta:r}},t.transmuxSampleAes=function(e,t,n,r,i){var a=this;return this.demuxer.demuxSampleAes(e,t,n).then((function(e){return{remuxResult:a.remuxer.remux(e.audioTrack,e.avcTrack,e.id3Track,e.textTrack,n,r,!1,a.id),chunkMeta:i}}))},t.configureTransmuxer=function(e,t){for(var n,r=this.config,i=this.observer,a=this.typeSupported,o=this.vendor,s=t.audioCodec,c=t.defaultInitPts,u=t.duration,h=t.initSegmentData,f=t.videoCodec,p=0,v=g.length;p>4>1){if((A=_+5+t[_+4])===_+188)continue}else A=_+4;switch(L){case f:O&&(p&&(a=v(p))&&this.parseAVCPES(a,!1),p={data:[],size:0}),p&&(p.data.push(t.subarray(A,_+188)),p.size+=_+188-A);break;case y:O&&(x&&(a=v(x))&&(s.isAAC?this.parseAACPES(a):this.parseMPEGPES(a)),x={data:[],size:0}),x&&(x.data.push(t.subarray(A,_+188)),x.size+=_+188-A);break;case b:O&&(w&&(a=v(w))&&this.parseID3PES(a),w={data:[],size:0}),w&&(w.data.push(t.subarray(A,_+188)),w.size+=_+188-A);break;case 0:O&&(A+=t[A]+1),E=this._pmtId=m(t,A);break;case E:O&&(A+=t[A]+1);var D=g(t,A,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,r);(f=D.avc)>0&&(o.pid=f),(y=D.audio)>0&&(s.pid=y,s.isAAC=D.isAAC),(b=D.id3)>0&&(d.pid=b),k&&!C&&(u.logger.log("reparse from beginning"),k=!1,_=T-188),C=this.pmtParsed=!0;break;case 17:case 8191:break;default:k=!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,s.pesData=x,d.pesData=w;var M={audioTrack:s,avcTrack:o,id3Track:d,textTrack:this._txtTrack};return i&&this.extractRemainingSamples(M),M},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,n=e.audioTrack,r=e.avcTrack,i=e.id3Track,a=r.pesData,o=n.pesData,s=i.pesData;a&&(t=v(a))?(this.parseAVCPES(t,!0),r.pesData=null):r.pesData=a,o&&(t=v(o))?(n.isAAC?this.parseAACPES(t):this.parseMPEGPES(t),n.pesData=null):(null!=o&&o.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=o),s&&(t=v(s))?(this.parseID3PES(t),i.pesData=null):i.pesData=s},t.demuxSampleAes=function(e,t,n){var r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new s.default(this.observer,this.config,t);return this.decrypt(r,i)},t.decrypt=function(e,t){return new Promise((function(n){var r=e.audioTrack,i=e.avcTrack;r.samples&&r.isAAC?t.decryptAacSamples(r.samples,0,(function(){i.samples?t.decryptAvcSamples(i.samples,0,0,(function(){n(e)})):n(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(function(){n(e)}))}))},t.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},t.parseAVCPES=function(e,t){var n,r=this,i=this._avcTrack,s=this.parseAVCNALu(e.data),l=this.avcSample,c=!1;e.data=null,l&&s.length&&!i.audFound&&(y(l,i),l=this.avcSample=p(!1,e.pts,e.dts,"")),s.forEach((function(t){switch(t.type){case 1:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.frame=!0;var s=t.data;if(c&&s.length>4){var u=new a.default(s).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(l.key=!0)}break;case 5:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:n=!0;var h=new a.default(x(t.data));h.readUByte();for(var d=0,f=0,m=!1,g=0;!m&&h.bytesAvailable>1;){d=0;do{d+=g=h.readUByte()}while(255===g);f=0;do{f+=g=h.readUByte()}while(255===g);if(4===d&&0!==h.bytesAvailable){if(m=!0,181===h.readUByte()&&49===h.readUShort()&&1195456820===h.readUInt()&&3===h.readUByte()){for(var v=h.readUByte(),w=31&v,k=[v,h.readUByte()],C=0;C16){for(var E=[],S=0;S<16;S++)E.push(h.readUByte().toString(16)),3!==S&&5!==S&&7!==S&&9!==S||E.push("-");for(var T=f-16,_=new Uint8Array(T),O=0;O=0){var h={data:e.subarray(c,l-a-1),type:u};s.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)),(n=l-a-1)>0)){var f=new Uint8Array(d.data.byteLength+n);f.set(d.data,0),f.set(e.subarray(0,n),d.data.byteLength),d.data=f,d.state=0}}l=0&&a>=0){var p={data:e.subarray(c,r),type:u,state:a};s.push(p)}if(0===s.length){var m=this.getLastNalUnit();if(m){var g=new Uint8Array(m.data.byteLength+e.byteLength);g.set(m.data,0),g.set(e,m.data.byteLength),m.data=g}}return i.naluState=a,s},t.parseAACPES=function(e){var t,n,i,a,o,s=0,c=this._audioTrack,d=this.aacOverFlow,f=e.data;if(d){this.aacOverFlow=null;var p=d.sample.unit.byteLength,m=Math.min(d.missing,p),g=p-m;d.sample.unit.set(f.subarray(0,m),g),c.samples.push(d.sample),s=d.missing}for(t=s,n=f.length;t1;){var l=new Uint8Array(s[0].length+s[1].length);l.set(s[0]),l.set(s[1],s[0].length),s[0]=l,s.splice(1,1)}if(1===((t=s[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;var c=t[7];192&c&&(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&c?i-(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(u.logger.warn(Math.round((i-a)/9e4)+"s delta between PTS and DTS, align them"),i=a):a=i);var h=(r=t[8])+9;if(e.size<=h)return null;e.size-=h;for(var d=new Uint8Array(e.size),f=0,p=s.length;fm){h-=m;continue}t=t.subarray(h),m-=h,h=0}d.set(t,o),o+=m}return n&&(n-=r+3),{data:d,pts:i,dts:a,len:n}}return null}function y(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var n=t.samples,r=n.length;if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}t.samples.push(e)}e.debug.length&&u.logger.log(e.pts+"/"+e.dts+":"+e.debug)}function b(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var r=n-1;r>=0;r--)if(t.ptst)return r;return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{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(t.prototype,n),y&&v(t,y),e}();y.defaultConfig=void 0},"./src/is-supported.ts": +/*!*****************************!*\ + !*** ./src/is-supported.ts ***! + \*****************************/ +/*! exports provided: isSupported, changeTypeSupported */function(e,t,n){"use strict";n.r(t),n.d(t,"isSupported",(function(){return a})),n.d(t,"changeTypeSupported",(function(){return o}));var r=n(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function i(){return self.SourceBuffer||self.WebKitSourceBuffer}function a(){var e=Object(r.getMediaSource)();if(!e)return!1;var t=i(),n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),a=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!a}function o(){var e,t=i();return"function"==typeof(null==t||null===(e=t.prototype)||void 0===e?void 0:e.changeType)}},"./src/loader/fragment-loader.ts": +/*!***************************************!*\ + !*** ./src/loader/fragment-loader.ts ***! + \***************************************/ +/*! exports provided: default, LoadError */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h})),n.d(t,"LoadError",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../errors */"./src/errors.ts");function a(e){var t="function"==typeof Map?new Map:void 0;return(a=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return o(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,e)})(e)}function o(e,t,n){return(o=s()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&l(i,n.prototype),i}).apply(null,arguments)}function s(){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}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=Math.pow(2,17),h=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var n=this,r=e.url;if(!r)return Promise.reject(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(r?"part list":"url")));this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(r,l){n.loader&&n.loader.destroy();var c=n.loader=e.loader=o?new o(a):new s(a),h=d(e),p={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=c.stats,c.load(h,p,{onSuccess:function(t,i,a,o){n.resetLoader(e,c),r({frag:e,part:null,payload:t.data,networkDetails:o})},onError:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:a}))},onAbort:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:a}))},onTimeout:function(t,r,a){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:a}))},onProgress:function(n,r,i,a){t&&t({frag:e,part:null,payload:i,networkDetails:a})}})}))},t.loadPart=function(e,t,n){var r=this;this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(l,c){r.loader&&r.loader.destroy();var h=r.loader=e.loader=o?new o(a):new s(a),p=d(e,t),m={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=h.stats,h.load(p,m,{onSuccess:function(i,a,o,s){r.resetLoader(e,h),r.updateStatsFromPart(e,t);var c={frag:e,part:t,payload:i.data,networkDetails:s};n(c),l(c)},onError:function(n,a,o){r.resetLoader(e,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:n,networkDetails:o}))},onAbort:function(n,a,o){e.stats.aborted=t.stats.aborted,r.resetLoader(e,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:o}))},onTimeout:function(n,a,o){r.resetLoader(e,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,networkDetails:o}))}})}))},t.updateStatsFromPart=function(e,t){var n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){var a=Math.round(e.duration/t.duration),o=Math.min(Math.round(n.loaded/i),a),s=(a-o)*Math.round(n.loaded/o);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,c=r.loading;l.start?l.first+=c.first-c.start:(l.start=c.start,l.first=c.first),l.end=c.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function d(e,t){void 0===t&&(t=null);var n=t||e,i={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},a=n.byteRangeStartOffset,o=n.byteRangeEndOffset;return Object(r.isFiniteNumber)(a)&&Object(r.isFiniteNumber)(o)&&(i.rangeStart=a,i.rangeEnd=o),i}var f=function(e){var t,n;function r(t){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a>8*(15-n)&255;return t},n.setDecryptDataFromLevelKey=function(e,t){var n=e;return"AES-128"===(null==e?void 0:e.method)&&e.uri&&!e.iv&&((n=s.LevelKey.fromURI(e.uri)).method=e.method,n.iv=this.createInitializationVector(t),n.keyFormat="identity"),n},n.setElementaryStreamInfo=function(e,t,n,r,i,a){void 0===a&&(a=!1);var o=this.elementaryStreams,s=o[e];s?(s.startPTS=Math.min(s.startPTS,t),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,r),s.endDTS=Math.max(s.endDTS,i)):o[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:a}},n.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[r.AUDIO]=null,e[r.VIDEO]=null,e[r.AUDIOVIDEO]=null},d(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(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'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(i.isFiniteNumber)(this.programDateTime))return null;var e=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;return!(null===(e=this.decryptdata)||void 0===e||!e.keyFormat||!this.decryptdata.uri)}}]),t}(f),m=function(e){function t(t,n,r,i,a){var o;(o=e.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=t.decimalFloatingPoint("DURATION"),o.gap=t.bool("GAP"),o.independent=t.bool("INDEPENDENT"),o.relurl=t.enumeratedString("URI"),o.fragment=n,o.index=i;var s=t.enumeratedString("BYTERANGE");return s&&o.setByteRange(s,a),a&&(o.fragOffset=a.fragOffset+a.duration),o}return c(t,e),d(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(f)},"./src/loader/key-loader.ts": +/*!**********************************!*\ + !*** ./src/loader/key-loader.ts ***! + \**********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=function(){function e(e){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){this.hls.on(r.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(r.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){for(var e in this._unregisterListeners(),this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={}},t.onKeyLoading=function(e,t){var n=t.frag,i=n.type,o=this.loaders[i];if(n.decryptdata){var s=n.decryptdata.uri;if(s!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(o&&(a.logger.warn("abort previous key loader for type:"+i),o.abort()),!s)return void a.logger.warn("key uri is falsy");var c=l.loader,u=n.loader=this.loaders[i]=new c(l);this.decrypturl=s,this.decryptkey=null;var h={url:s,frag:n,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&&(n.decryptdata.key=this.decryptkey,this.hls.trigger(r.Events.KEY_LOADED,{frag:n}))}else a.logger.warn("Missing decryption data on fragment in onKeyLoading")},t.loadsuccess=function(e,t,n){var i=n.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(r.Events.KEY_LOADED,{frag:i})):a.logger.error("after key load, decryptdata unset")},t.loaderror=function(e,t){var n=t.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})},t.loadtimeout=function(e,t){var n=t.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},e}()},"./src/loader/level-details.ts": +/*!*************************************!*\ + !*** ./src/loader/level-details.ts ***! + \*************************************/ +/*! exports provided: LevelDetails */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelDetails",(function(){return a}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function i(e,t){for(var n=0;ne.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},t=e,(n=[{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 e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!==(e=this.fragments)&&void 0!==e&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&i(t.prototype,n),a&&i(t,a),e}()},"./src/loader/level-key.ts": +/*!*********************************!*\ + !*** ./src/loader/level-key.ts ***! + \*********************************/ +/*! exports provided: LevelKey */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelKey",(function(){return a}));var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js");function i(e,t){for(var n=0;n2){var n=t.shift()+".";return n+=parseInt(t.shift()).toString(16),n+=("000"+parseInt(t.shift()).toString(16)).substr(-4)}return e},e.resolve=function(e,t){return i.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var r,i=[],a={},o=!1;for(h.lastIndex=0;null!=(r=h.exec(t));)if(r[1]){var s=new l.AttrList(r[1]),c={attrs:s,bitrate:s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),name:s.NAME,url:e.resolve(r[2],n)},u=s.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((s.CODECS||"").split(/[ ,]+/).filter((function(e){return e})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=e.convertAVC1ToAVCOTI(c.videoCodec)),i.push(c)}else if(r[3]){var d=new l.AttrList(r[3]);d["DATA-ID"]&&(o=!0,a[d["DATA-ID"]]=d)}return{levels:i,sessionData:o?a:null}},e.parseMasterPlaylistMedia=function(t,n,r,i){var a;void 0===i&&(i=[]);var o=[],s=0;for(d.lastIndex=0;null!==(a=d.exec(t));){var c=new l.AttrList(a[1]);if(c.TYPE===r){var u={attrs:c,bitrate:0,id:s++,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?e.resolve(c.URI,n):""};if(i.length){var h=e.findGroup(i,u.groupId)||i[0];y(u,h,"audioCodec"),y(u,h,"textCodec")}o.push(u)}}return o},e.parseLevelPlaylist=function(e,t,n,u,h){var d,g,v,y=new o.LevelDetails(t),x=y.fragments,w=null,k=0,C=0,E=0,S=0,T=null,_=new a.Fragment(u,t),O=-1,L=!1;for(f.lastIndex=0,y.m3u8=e;null!==(d=f.exec(e));){L&&(L=!1,(_=new a.Fragment(u,t)).start=E,_.sn=k,_.cc=S,_.level=n,w&&(_.initSegment=w,_.rawProgramDateTime=w.rawProgramDateTime));var A=d[1];if(A){_.duration=parseFloat(A);var D=(" "+d[2]).slice(1);_.title=D||null,_.tagList.push(D?["INF",A,D]:["INF",A])}else if(d[3])Object(r.isFiniteNumber)(_.duration)&&(_.start=E,v&&(_.levelkey=v),_.sn=k,_.level=n,_.cc=S,_.urlId=h,x.push(_),_.relurl=(" "+d[3]).slice(1),b(_,T),T=_,E+=_.duration,k++,C=0,L=!0);else if(d[4]){var M=(" "+d[4]).slice(1);T?_.setByteRange(M,T):_.setByteRange(M)}else if(d[5])_.rawProgramDateTime=(" "+d[5]).slice(1),_.tagList.push(["PROGRAM-DATE-TIME",_.rawProgramDateTime]),-1===O&&(O=x.length);else{if(!(d=d[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(g=1;g-1){c.logger.warn("Keyformat "+Y+" is not supported from the manifest");continue}if("identity"!==Y)continue;U&&(v=s.LevelKey.fromURL(t,V),V&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(U)>=0&&(v.method=U,v.keyFormat=Y,K&&(v.keyID=K),G&&(v.keyFormatVersions=G),v.iv=W));break;case"START":var q=new l.AttrList(I).decimalFloatingPoint("TIME-OFFSET");Object(r.isFiniteNumber)(q)&&(y.startTimeOffset=q);break;case"MAP":var X=new l.AttrList(I);_.relurl=X.URI,X.BYTERANGE&&_.setByteRange(X.BYTERANGE),_.level=n,_.sn="initSegment",v&&(_.levelkey=v),_.initSegment=null,w=_,L=!0;break;case"SERVER-CONTROL":var $=new l.AttrList(I);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 Q=new l.AttrList(I);y.partTarget=Q.decimalFloatingPoint("PART-TARGET");break;case"PART":var J=y.partList;J||(J=y.partList=[]);var Z=C>0?J[J.length-1]:void 0,ee=C++,te=new a.Part(new l.AttrList(I),_,t,ee,Z);J.push(te),_.duration+=te.duration;break;case"PRELOAD-HINT":var ne=new l.AttrList(I);y.preloadHint=ne;break;case"RENDITION-REPORT":var re=new l.AttrList(I);y.renditionReports=y.renditionReports||[],y.renditionReports.push(re);break;default:c.logger.warn("line parsed but not handled: "+d)}}}T&&!T.relurl?(x.pop(),E-=T.duration,y.partList&&(y.fragmentHint=T)):y.partList&&(b(_,T),_.cc=S,y.fragmentHint=_);var ie=x.length,ae=x[0],oe=x[ie-1];if((E+=y.skippedSegments*y.targetduration)>0&&ie&&oe){y.averagetargetduration=E/ie;var se=oe.sn;y.endSN="initSegment"!==se?se:0,ae&&(y.startCC=ae.cc,ae.initSegment||y.fragments.every((function(e){return e.relurl&&(t=e.relurl,m.test(null!=(n=null===(r=i.parseURL(t))||void 0===r?void 0:r.path)?n:""));var t,n,r}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(_=new a.Fragment(u,t)).relurl=oe.relurl,_.level=n,_.sn="initSegment",ae.initSegment=_,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(E+=y.fragmentHint.duration),y.totalduration=E,y.endCC=S,O>0&&function(e,t){for(var n=e[t],r=t;r--;){var i=e[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(x,O),y},e}();function v(e,t){["video","audio","text"].forEach((function(n){var r=e.filter((function(e){return Object(u.isCodecType)(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}function y(e,t,n){var r=t[n];r&&(e[n]=r)}function b(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Object(r.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts": +/*!***************************************!*\ + !*** ./src/loader/playlist-loader.ts ***! + \***************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=n(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function h(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}var d=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.hls=e,this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return e.loader=i,this.loaders[e.type]=i,i},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var n=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:n,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var n=t.id,r=t.level,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:null,level:r,responseType:"text",type:c.PlaylistContextType.LEVEL,url:i,deliveryDirectives:a})},t.onAudioTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:a})},t.onSubtitleTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:a})},t.load=function(e){var t,n,r,i,a,s,l=this.hls.config,u=this.getInternalLoader(e);if(u){var h=u.context;if(h&&h.url===e.url)return void o.logger.trace("[playlist-loader]: playlist request ongoing");o.logger.log("[playlist-loader]: aborting previous loader for type: "+e.type),u.abort()}switch(e.type){case c.PlaylistContextType.MANIFEST:n=l.manifestLoadingMaxRetry,r=l.manifestLoadingTimeOut,i=l.manifestLoadingRetryDelay,a=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:n=0,r=l.levelLoadingTimeOut;break;default:n=l.levelLoadingMaxRetry,r=l.levelLoadingTimeOut,i=l.levelLoadingRetryDelay,a=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(e),null!==(t=e.deliveryDirectives)&&void 0!==t&&t.part&&(e.type===c.PlaylistContextType.LEVEL&&null!==e.level?s=this.hls.levels[e.level].details:e.type===c.PlaylistContextType.AUDIO_TRACK&&null!==e.id?s=this.hls.audioTracks[e.id].details:e.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==e.id&&(s=this.hls.subtitleTracks[e.id].details),s)){var d=s.partTarget,f=s.targetduration;d&&f&&(r=Math.min(1e3*Math.max(3*d,.8*f),r))}var p={timeout:r,maxRetry:n,retryDelay:i,maxRetryDelay:a,highWaterMark:0},m={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(e,p,m)},t.loadsuccess=function(e,t,n,r){if(void 0===r&&(r=null),n.isSidxRequest)return this.handleSidxRequest(e,n),void this.handlePlaylistLoaded(e,t,n,r);this.resetInternalLoader(n.type);var i=e.data;0===i.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(e,t,n,r):this.handleMasterPlaylist(e,t,n,r)):this.handleManifestParsingError(e,n,"no EXTM3U delimiter",r)},t.loaderror=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!1,e)},t.loadtimeout=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!0)},t.handleMasterPlaylist=function(e,t,n,r){var a=this.hls,s=e.data,c=h(e,n),d=l.default.parseMasterPlaylist(s,c),f=d.levels,p=d.sessionData;if(f.length){var m=f.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),g=f.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),v=l.default.parseMasterPlaylistMedia(s,c,"AUDIO",m),y=l.default.parseMasterPlaylistMedia(s,c,"SUBTITLES",g),b=l.default.parseMasterPlaylistMedia(s,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(e){return!e.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:""}))),a.trigger(i.Events.MANIFEST_LOADED,{levels:f,audioTracks:v,subtitles:y,captions:b,url:c,stats:t,networkDetails:r,sessionData:p})}else this.handleManifestParsingError(e,n,"no level found in manifest",r)},t.handleTrackOrLevelPlaylist=function(e,t,n,o){var s=this.hls,d=n.id,f=n.level,p=n.type,m=h(e,n),g=Object(r.isFiniteNumber)(d)?d:0,v=Object(r.isFiniteNumber)(f)?f:g,y=function(e){switch(e.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(n),b=l.default.parseLevelPlaylist(e.data,m,v,y,g);if(b.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var x={attrs:new u.AttrList({}),bitrate:0,details:b,name:"",url:m};s.trigger(i.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:m,stats:t,networkDetails:o,sessionData:null})}if(t.parsing.end=performance.now(),b.needSidxRanges){var w,k=null===(w=b.fragments[0].initSegment)||void 0===w?void 0:w.url;this.load({url:k,isSidxRequest:!0,type:p,level:f,levelDetails:b,id:d,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else n.levelDetails=b,this.handlePlaylistLoaded(e,t,n,o)}else s.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:m,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},t.handleSidxRequest=function(e,t){var n=Object(s.parseSegmentIndex)(new Uint8Array(e.data));if(n){var r=n.references,i=t.levelDetails;r.forEach((function(e,t){var r=e.info,a=i.fragments[t];0===a.byteRange.length&&a.setByteRange(String(1+r.end-r.start)+"@"+String(r.start)),a.initSegment&&a.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}))}},t.handleManifestParsingError=function(e,t,n,r){this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===c.PlaylistContextType.MANIFEST,url:e.url,reason:n,response:e,context:t,networkDetails:r})},t.handleNetworkError=function(e,t,n,r){void 0===n&&(n=!1),o.logger.warn("[playlist-loader]: A network "+(n?"timeout":"error")+" occurred while loading "+e.type+" level: "+e.level+" id: "+e.id+' group-id: "'+e.groupId+'"');var s=a.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(e);switch(e.type){case c.PlaylistContextType.MANIFEST:s=n?a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:a.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:s=n?a.ErrorDetails.LEVEL_LOAD_TIMEOUT:a.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:s=n?a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:s=n?a.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:a.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(e.type);var h={type:a.ErrorTypes.NETWORK_ERROR,details:s,fatal:l,url:e.url,loader:u,context:e,networkDetails:t};r&&(h.response=r),this.hls.trigger(i.Events.ERROR,h)},t.handlePlaylistLoaded=function(e,t,n,r){var a=n.type,o=n.level,s=n.id,l=n.groupId,u=n.loader,h=n.levelDetails,d=n.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)),a){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(i.Events.LEVEL_LOADED,{details:h,level:o||0,id:s||0,stats:t,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(i.Events.AUDIO_TRACK_LOADED,{details:h,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(i.Events.SUBTITLE_TRACK_LOADED,{details:h,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:d})}}else this.handleManifestParsingError(e,n,"invalid target duration",r)},e}();t.default=d},"./src/polyfills/number.ts": +/*!*********************************!*\ + !*** ./src/polyfills/number.ts ***! + \*********************************/ +/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(e,t,n){"use strict";n.r(t),n.d(t,"isFiniteNumber",(function(){return r})),n.d(t,"MAX_SAFE_INTEGER",(function(){return i}));var r=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},i=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts": +/*!*********************************!*\ + !*** ./src/remux/aac-helper.ts ***! + \*********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(){}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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===t)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===t)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===t)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===t)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])}},e}();t.default=r},"./src/remux/mp4-generator.ts": +/*!************************************!*\ + !*** ./src/remux/mp4-generator.ts ***! + \************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=Math.pow(2,32)-1,i=function(){function e(){}return e.init=function(){var t;for(t in e.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:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=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]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t=8,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=255&t,s.set(e,4),a=0,t=8;a>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var i=Math.floor(n/(r+1)),a=Math.floor(n%(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,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,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 e.box(e.types.mvhd,o)},e.sdtp=function(t){var n,r,i=t.samples||[],a=new Uint8Array(4+i.length);for(n=0;n>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,c=t.height,u=t.pixelRatio[0],h=t.pixelRatio[1];return e.box(e.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]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,h>>24,h>>16&255,h>>8&255,255&h])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,i=t.duration*t.timescale,a=t.width,o=t.height,s=Math.floor(i/(r+1)),l=Math.floor(i%(r+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,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,a>>8&255,255&a,0,0,o>>8&255,255&o,0,0]))},e.traf=function(t,n){var i=e.sdtp(t),a=t.id,o=Math.floor(n/(r+1)),s=Math.floor(n%(r+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,i.length+16+20+8+16+8+8),i)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,a,o,s,l,c=t.samples||[],u=c.length,h=12+16*u,d=new Uint8Array(h);for(n+=8+h,d.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,d)},e.initSegment=function(t){e.types||e.init();var n=e.moov(t),r=new Uint8Array(e.FTYP.byteLength+n.byteLength);return r.set(e.FTYP),r.set(n,e.FTYP.byteLength),r},e}();i.types=void 0,i.HDLR_TYPES=void 0,i.STTS=void 0,i.STSC=void 0,i.STCO=void 0,i.STSZ=void 0,i.VMHD=void 0,i.SMHD=void 0,i.STSD=void 0,i.FTYP=void 0,i.DINF=void 0,t.default=i},"./src/remux/mp4-remuxer.ts": +/*!**********************************!*\ + !*** ./src/remux/mp4-remuxer.ts ***! + \**********************************/ +/*! exports provided: default, normalizePts */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return m})),n.d(t,"normalizePts",(function(){return g}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./aac-helper */"./src/remux/aac-helper.ts"),a=n(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),o=n(/*! ../events */"./src/events.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/logger */"./src/utils/logger.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function h(){return(h=Object.assign||function(e){for(var t=1;t0?e:n.pts}),e[0].pts);return t&&l.logger.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,i,a,o,s){var u,h,d,f,p,m,v=i,y=i,b=e.pid>-1,x=t.pid>-1,w=t.samples.length,k=e.samples.length>0,C=w>1;if((!b||k)&&(!x||C)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(e,t,i));var E=this.isVideoContiguous,S=-1;if(C&&(S=function(e){for(var t=0;t0){l.logger.warn("[mp4-remuxer]: Dropped "+S+" out of "+w+" video samples due to a missing keyframe");var T=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(S),t.dropped+=S,y+=(t.samples[0].pts-T)/(t.timescale||9e4)}else-1===S&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+w+" video samples"),m=!1);if(this.ISGenerated){if(k&&C){var _=this.getVideoStartPts(t.samples),O=(g(e.samples[0].pts,_)-_)/t.inputTimeScale;v+=Math.max(0,O),y+=Math.max(0,-O)}if(k){if(e.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(e,t,i)),h=this.remuxAudio(e,v,this.isAudioContiguous,a,x||C||s===c.PlaylistLevelType.AUDIO?y:void 0),C){var L=h?h.endPTS-h.startPTS:0;t.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(e,t,i)),u=this.remuxVideo(t,y,E,L)}}else C&&(u=this.remuxVideo(t,y,E,0));u&&(u.firstKeyFrame=S,u.independent=-1!==S)}}return this.ISGenerated&&(n.samples.length&&(p=this.remuxID3(n,i)),r.samples.length&&(f=this.remuxText(r,i))),{audio:h,video:u,initSegment:d,independent:m,text:f,id3:p}},t.generateIS=function(e,t,n){var i,o,s,l=e.samples,c=t.samples,u=this.typeSupported,h={},d=!Object(r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(i=o=1/0),e.config&&l.length&&(e.timescale=e.samplerate,e.isAAC||(u.mpeg?(f="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3")),h.audio={id:"audio",container:f,codec:e.codec,initSegment:!e.isAAC&&u.mpeg?new Uint8Array(0):a.default.initSegment([e]),metadata:{channelCount:e.channelCount}},d&&(s=e.inputTimeScale,i=o=l[0].pts-Math.round(s*n))),t.sps&&t.pps&&c.length&&(t.timescale=t.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:a.default.initSegment([t]),metadata:{width:t.width,height:t.height}},d)){s=t.inputTimeScale;var p=this.getVideoStartPts(c),m=Math.round(s*n);o=Math.min(o,g(c[0].dts,p)-m),i=Math.min(i,p-m)}if(Object.keys(h).length)return this.ISGenerated=!0,d&&(this._initPTS=i,this._initDTS=o),{tracks:h,initPTS:i,timescale:s}},t.remuxVideo=function(e,t,n,r){var i,c,f,m=e.inputTimeScale,y=e.samples,b=[],x=y.length,w=this._initPTS,k=this.nextAvcDts,C=8,E=Number.POSITIVE_INFINITY,S=Number.NEGATIVE_INFINITY,T=0,_=!1;n&&null!==k||(k=t*m-(y[0].pts-g(y[0].dts,y[0].pts)));for(var O=0;OL.pts&&(T=Math.max(Math.min(T,L.pts-L.dts),-18e3)),L.dts0?O-1:O].dts&&(_=!0)}_&&y.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),c=y[0].dts,f=y[y.length-1].dts;var A=Math.round((f-c)/(x-1));if(T<0){if(T<-2*A){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-A,!0)+" ms");for(var D=T,M=0;MA;if(j||I<-1){j?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(I,!0)+" ms ("+I+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-I,!0)+" ms ("+I+"dts) overlapping between fragments detected"),c=k;var N=y[0].pts-I;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)(I,!0)+" ms")}}p&&(c=Math.max(0,c));for(var P=0,F=0,B=0;B0?q-1:q].dts;if(re.stretchShortVideoTrack&&null!==this.nextAudioPts){var ae=Math.floor(re.maxBufferHole*m),oe=(r?E+r*m:this.nextAudioPts)-X.pts;oe>ae?((i=oe-ie)<0&&(i=ie),l.logger.log("[mp4-remuxer]: It is approximately "+oe/90+" ms to the next segment; using duration "+i/90+" ms for the last video frame.")):i=ie}else i=ie}var se=Math.round(X.pts-X.dts);b.push(new v(X.key,i,Q,se))}if(b.length&&d&&d<70){var le=b[0].flags;le.dependsOn=2,le.isNonSync=0}console.assert(void 0!==i,"mp4SampleDuration must be computed"),this.nextAvcDts=k=f+i,this.isVideoContiguous=!0;var ce={data1:a.default.moof(e.sequenceNumber++,c,h({},e,{samples:b})),data2:G,startPTS:E/m,endPTS:(S+i)/m,startDTS:c/m,endDTS:k/m,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:e.dropped};return e.samples=[],e.dropped=0,console.assert(G.length,"MDAT length must not be zero"),ce},t.remuxAudio=function(e,t,n,r,c){var u=e.inputTimeScale,d=u/(e.samplerate?e.samplerate:u),f=e.isAAC?1024:1152,p=f*d,m=this._initPTS,y=!e.isAAC&&this.typeSupported.mpeg,b=[],x=e.samples,w=y?0:8,k=this.nextAudioPts||-1,C=t*u;if(this.isAudioContiguous=n=n||x.length&&k>0&&(r&&Math.abs(C-k)<9e3||Math.abs(g(x[0].pts-m,C)-k)<20*p),x.forEach((function(e){e.pts=g(e.pts-m,C)})),!n||k<0){if(!(x=x.filter((function(e){return e.pts>=0}))).length)return;k=0===c?0:r?Math.max(0,C):x[0].pts}if(e.isAAC)for(var E=void 0!==c,S=this.config.maxAudioFramesDrift,T=0,_=k;T=S*p&&D<1e4&&E){var M=Math.round(A/p);(_=L-M*p)<0&&(M--,_+=p),0===T&&(this.nextAudioPts=k=_),l.logger.warn("[mp4-remuxer]: Injecting "+M+" audio frame @ "+(_/u).toFixed(3)+"s due to "+Math.round(1e3*A/u)+" ms gap.");for(var R=0;R0))return;B+=w;try{N=new Uint8Array(B)}catch(e){return void this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:B,reason:"fail allocating audio mdat "+B})}y||(new DataView(N.buffer).setUint32(0,B),N.set(a.default.types.mdat,4))}N.set(W,w);var K=W.byteLength;w+=K,b.push(new v(!0,f,K,0)),F=G}var Y=b.length;if(Y){var q=b[b.length-1];this.nextAudioPts=k=F+d*q.duration;var X=y?new Uint8Array(0):a.default.moof(e.sequenceNumber++,P/d,h({},e,{samples:b}));e.samples=[];var $=P/u,Q=k/u,J={data1:X,data2:N,startPTS:$,endPTS:Q,startDTS:$,endDTS:Q,type:"audio",hasAudio:!0,hasVideo:!1,nb:Y};return this.isAudioContiguous=!0,console.assert(N.length,"MDAT length must not be zero"),J}},t.remuxEmptyAudio=function(e,t,n,r){var a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),s=this.nextAudioPts,c=(null!==s?s:r.startDTS*a)+this._initDTS,u=r.endDTS*a+this._initDTS,h=1024*o,d=Math.ceil((u-c)/h),f=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var p=[],m=0;m4294967296;)e+=n;return e}var v=function(e,t,n,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=n,this.cts=r,this.flags=new y(e)},y=function(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}},"./src/remux/passthrough-remuxer.ts": +/*!******************************************!*\ + !*** ./src/remux/passthrough-remuxer.ts ***! + \******************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),a=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=function(){function e(){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 t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this.initPTS=e,this.lastEndDTS=null},t.resetNextTimestamp=function(){this.lastEndDTS=null},t.resetInitSegment=function(e,t,n){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(e),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,n=this.videoCodec;if(!e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=Object(i.parseInitSegment)(e);t||(t=c(r.audio,a.ElementaryStreamTypes.AUDIO)),n||(n=c(r.video,a.ElementaryStreamTypes.VIDEO));var s={};r.audio&&r.video?s.audiovideo={container:"video/mp4",codec:t+","+n,initSegment:e,id:"main"}:r.audio?s.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?s.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:o.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s},t.remux=function(e,t,n,a,s){var c=this.initPTS,u=this.lastEndDTS,h={audio:void 0,video:void 0,text:a,id3:n,initSegment:void 0};Object(r.isFiniteNumber)(u)||(u=this.lastEndDTS=s||0);var d=t.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 m=Object(i.getDuration)(d,p),g=u,v=m+g;Object(i.offsetStartDTS)(p,d,c),m>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 w={data1:d,startPTS:g,startDTS:g,endPTS:v,endDTS:v,type:x,hasAudio:y,hasVideo:b,nb:1,dropped:0};return h.audio="audio"===w.type?w:void 0,h.video="audio"!==w.type?w:void 0,h.text=a,h.id3=n,h.initSegment=f,h},e}(),l=function(e,t,n){return Object(i.getStartDTS)(e,t)-n};function c(e,t){var n=null==e?void 0:e.codec;return n&&n.length>4?n:"hvc1"===n?"hvc1.1.c.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||t===a.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}t.default=s},"./src/task-loop.ts": +/*!**************************!*\ + !*** ./src/task-loop.ts ***! + \**************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},t.onHandlerDestroyed=function(){},t.hasInterval=function(){return!!this._tickInterval},t.hasNextTick=function(){return!!this._tickTimer},t.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},t.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},t.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},t.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},t.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},t.doTick=function(){},e}()},"./src/types/cmcd.ts": +/*!***************************!*\ + !*** ./src/types/cmcd.ts ***! + \***************************/ +/*! exports provided: CMCDVersion, CMCDObjectType, CMCDStreamingFormat, CMCDStreamType */function(e,t,n){"use strict";n.r(t),n.d(t,"CMCDVersion",(function(){return o})),n.d(t,"CMCDObjectType",(function(){return r})),n.d(t,"CMCDStreamingFormat",(function(){return i})),n.d(t,"CMCDStreamType",(function(){return a}));var r,i,a,o=1;!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(r||(r={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(i||(i={})),function(e){e.VOD="v",e.LIVE="l"}(a||(a={}))},"./src/types/level.ts": +/*!****************************!*\ + !*** ./src/types/level.ts ***! + \****************************/ +/*! exports provided: HlsSkip, getSkipValue, HlsUrlParameters, Level */function(e,t,n){"use strict";function r(e,t){for(var n=0;nNumber.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;rNumber.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var n=this[e];return n?parseFloat(n):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=r.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(i.lastIndex=0;null!==(t=i.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n},e}()},"./src/utils/binary-search.ts": +/*!************************************!*\ + !*** ./src/utils/binary-search.ts ***! + \************************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={search:function(e,t){for(var n=0,r=e.length-1,i=null,a=null;n<=r;){var o=t(a=e[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null}}},"./src/utils/buffer-helper.ts": +/*!************************************!*\ + !*** ./src/utils/buffer-helper.ts ***! + \************************************/ +/*! exports provided: BufferHelper */function(e,t,n){"use strict";n.r(t),n.d(t,"BufferHelper",(function(){return a}));var r=n(/*! ./logger */"./src/utils/logger.ts"),i={length:0,start:function(){return 0},end:function(){return 0}},a=function(){function e(){}return e.isBuffered=function(t,n){try{if(t)for(var r=e.getBuffered(t),i=0;i=r.start(i)&&n<=r.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(t,n,r){try{if(t){var i,a=e.getBuffered(t),o=[];for(i=0;io&&(r[a-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,c=t,u=t,h=0;h=d&&t=e&&i.logger.log(this.time+" ["+e+"] "+t)},e}(),f=function(e){for(var t=[],n=0;n100&&(this.logger.log(r.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n=144&&this.backSpace();var t=o(e);this.pos>=100?this.logger.log(r.ERROR,"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<100;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<100;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),v=function(){function e(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var t=0;t<15;t++)this.rows.push(new g(e));this.logger=e,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<15;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(r.INFO,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(r.INFO,"pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),y=function(){function e(e,t,n){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=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new v(n),this.nonDisplayedMemory=new v(n),this.lastOutputScreen=new v(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var t=e.prototype;return t.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},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(r.INFO,"MODE="+e),"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=e)},t.insertChars=function(e){for(var t=0;t=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(r.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),b=function(){function e(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new d;this.channels=[null,new y(e,t,r),new y(e+1,n,r)],this.cmdHistory={a:null,b:null},this.logger=r}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,i,a,o=!1;this.logger.time=e;for(var s=0;s ("+f([i,a])+")"),(n=this.parseCmd(i,a))||(n=this.parseMidrow(i,a)),n||(n=this.parsePAC(i,a)),n||(n=this.parseBackgroundAttributes(i,a)),!n&&(o=this.parseChars(i,a))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(o):this.logger.log(r.WARNING,"No channel found yet. TEXT-MODE?")}n||o||this.logger.log(r.WARNING,"Couldn't parse cleaned data "+f([i,a])+" orig: "+f([t[s],t[s+1]]))}},t.parseCmd=function(e,t){var n=this.cmdHistory;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(w(e,t,n))return x(null,null,n),this.logger.log(r.DEBUG,"Repeated command ("+f([e,t])+") is dropped"),!0;var i=20===e||21===e||23===e?1:2,a=this.channels[i];return 20===e||21===e||28===e||29===e?32===t?a.ccRCL():33===t?a.ccBS():34===t?a.ccAOF():35===t?a.ccAON():36===t?a.ccDER():37===t?a.ccRU(2):38===t?a.ccRU(3):39===t?a.ccRU(4):40===t?a.ccFON():41===t?a.ccRDC():42===t?a.ccTR():43===t?a.ccRTD():44===t?a.ccEDM():45===t?a.ccCR():46===t?a.ccENM():47===t&&a.ccEOC():a.ccTO(t-32),x(e,t,n),this.currentChannel=i,!0},t.parseMidrow=function(e,t){var n=0;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currentChannel)return this.logger.log(r.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[n];return!!i&&(i.ccMIDROW(t),this.logger.log(r.DEBUG,"MIDROW ("+f([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var n,r=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(w(e,t,r))return x(null,null,r),!0;var i=e<=23?1:2;n=t>=64&&t<=95?1===i?s[e]:c[e]:1===i?l[e]:u[e];var a=this.channels[i];return!!a&&(a.setPAC(this.interpretPAC(n,t)),x(e,t,r),this.currentChannel=i,!0)},t.interpretPAC=function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.parseChars=function(e,t){var n,i,a=null,s=null;if(e>=25?(n=2,s=e-8):(n=1,s=e),s>=17&&s<=19?(i=17===s?t+80:18===s?t+112:t+144,this.logger.log(r.INFO,"Special char '"+o(i)+"' in channel "+n),a=[i]):e>=32&&e<=127&&(a=0===t?[e]:[e,t]),a){var l=f(a);this.logger.log(r.DEBUG,"Char codes = "+l.join(",")),x(e,t,this.cmdHistory)}return a},t.parseBackgroundAttributes=function(e,t){var n;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=h[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));var i=e<=23?1:2;return this.channels[i].setBkgData(r),x(e,t,this.cmdHistory),!0},t.reset=function(){for(var e=0;e=16?h--:h++;var v=Object(r.fixLineBreaks)(d.trim()),y=Object(i.generateCueId)(t,n,v);e&&e.cues&&e.cues.getCueById(y)||((c=new p(t,n,v)).id=y,c.line=m+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*h/32)),f.push(c))}return e&&f.length&&(f.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),f.forEach((function(t){return Object(a.addCueToTrack)(e,t)}))),f}};t.default=s},"./src/utils/discontinuities.ts": +/*!**************************************!*\ + !*** ./src/utils/discontinuities.ts ***! + \**************************************/ +/*! exports provided: findFirstFragWithCC, shouldAlignOnDiscontinuities, findDiscontinuousReferenceFrag, adjustSlidingStart, alignStream, alignPDT, alignFragmentByPDTDelta, alignMediaPlaylistByPDT */function(e,t,n){"use strict";n.r(t),n.d(t,"findFirstFragWithCC",(function(){return o})),n.d(t,"shouldAlignOnDiscontinuities",(function(){return s})),n.d(t,"findDiscontinuousReferenceFrag",(function(){return l})),n.d(t,"adjustSlidingStart",(function(){return u})),n.d(t,"alignStream",(function(){return h})),n.d(t,"alignPDT",(function(){return d})),n.d(t,"alignFragmentByPDTDelta",(function(){return f})),n.d(t,"alignMediaPlaylistByPDT",(function(){return p}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./logger */"./src/utils/logger.ts"),a=n(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function o(e,t){for(var n=null,r=0,i=e.length;rn.startCC||e&&e.cc=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();t.default=i},"./src/utils/ewma.ts": +/*!***************************!*\ + !*** ./src/utils/ewma.ts ***! + \***************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}();t.default=r},"./src/utils/fetch-loader.ts": +/*!***********************************!*\ + !*** ./src/utils/fetch-loader.ts ***! + \***********************************/ +/*! exports provided: fetchSupported, default */function(e,t,n){"use strict";n.r(t),n.d(t,"fetchSupported",(function(){return d}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=n(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function o(e){var t="function"==typeof Map?new Map:void 0;return(o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)})(e)}function s(e,t,n){return(s=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&c(i,n.prototype),i}).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(e){return!1}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(){return(h=Object.assign||function(e){for(var t=1;t=r&&i(t,n,o.flush(),e)):i(t,n,l,e),a()})).catch((function(){return Promise.reject()}))}()},e}();function p(e,t){return new self.Request(e.url,t)}var m=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r}(o(Error));t.default=f},"./src/utils/imsc1-ttml-parser.ts": +/*!****************************************!*\ + !*** ./src/utils/imsc1-ttml-parser.ts ***! + \****************************************/ +/*! exports provided: IMSC1_CODEC, parseIMSC1 */function(e,t,n){"use strict";n.r(t),n.d(t,"IMSC1_CODEC",(function(){return u})),n.d(t,"parseIMSC1",(function(){return p}));var r=n(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),i=n(/*! ./vttparser */"./src/utils/vttparser.ts"),a=n(/*! ./vttcue */"./src/utils/vttcue.ts"),o=n(/*! ../demux/id3 */"./src/demux/id3.ts"),s=n(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=n(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function c(){return(c=Object.assign||function(e){for(var t=1;t"):r}function s(e){if(self.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function h(e,t){var n,r,i,a=[];if(!t.length)return a;"data"in e?(n=e.data,r=e.start,i=e.end):(r=0,i=(n=e).byteLength);for(var l=r;l1?l+u:i;if(s(n.subarray(l+4,l+8))===t[0])if(1===t.length)a.push({data:n,start:l+8,end:d});else{var f=h({data:n,start:l+8,end:d},t.slice(1));f.length&&o.apply(a,f)}l=d}return a}function d(e){var t=h(e,["moov"])[0],n=t?t.end:null,r=h(e,["sidx"]);if(!r||!r[0])return null;var i=[],a=r[0],o=a.data[0],s=0===o?8:16,u=c(a,s);s+=4,s+=0===o?8:16,s+=2;var d=a.end+0,f=l(a,s);s+=2;for(var p=0;p>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(a,m);m+=4,i.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/u,start:d,end:d+v-1}}),d+=v,s=m+=4}return{earliestPresentationTime:0,timescale:u,version:o,referencesCount:f,references:i,moovEndOffset:n}}function f(e){for(var t=[],n=h(e,["moov","trak"]),r=0;re)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[]},e}()},"./src/utils/texttrack-utils.ts": +/*!**************************************!*\ + !*** ./src/utils/texttrack-utils.ts ***! + \**************************************/ +/*! exports provided: sendAddTrackEvent, addCueToTrack, clearCurrentCues, removeCuesInRange, getCuesInRange */function(e,t,n){"use strict";n.r(t),n.d(t,"sendAddTrackEvent",(function(){return i})),n.d(t,"addCueToTrack",(function(){return a})),n.d(t,"clearCurrentCues",(function(){return o})),n.d(t,"removeCuesInRange",(function(){return s})),n.d(t,"getCuesInRange",(function(){return l}));var r=n(/*! ./logger */"./src/utils/logger.ts");function i(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function a(e,t){var n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(n){r.logger.debug("[texttrack-utils]: "+n);var i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}"disabled"===n&&(e.mode=n)}function o(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var n=e.cues.length;n--;)e.removeCue(e.cues[n]);"disabled"===t&&(e.mode=t)}function s(e,t,n){var r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var i=l(e.cues,t,n),a=0;ae[n].endTime)return-1;for(var r=0,i=n;r<=i;){var a=Math.floor((i+r)/2);if(te[a].startTime&&r-1)for(var a=i,o=e.length;a=t&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}},"./src/utils/time-ranges.ts": +/*!**********************************!*\ + !*** ./src/utils/time-ranges.ts ***! + \**********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={toString:function(e){for(var t="",n=e.length,r=0;r1?t-1:0),r=1;r100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return x},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");x=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},l,{get:function(){return w},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");w=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},l,{get:function(){return k},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");k=t,this.hasBeenReset=!0}})),s.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}()},"./src/utils/vttparser.ts": +/*!********************************!*\ + !*** ./src/utils/vttparser.ts ***! + \********************************/ +/*! exports provided: parseTimeStamp, fixLineBreaks, VTTParser */function(e,t,n){"use strict";n.r(t),n.d(t,"parseTimeStamp",(function(){return a})),n.d(t,"fixLineBreaks",(function(){return h})),n.d(t,"VTTParser",(function(){return d}));var r=n(/*! ./vttcue */"./src/utils/vttcue.ts"),i=function(){function e(){}return e.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},e}();function a(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+parseFloat(r||0)}var n=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?t(n[2],n[3],0,n[4]):t(n[1],n[2],n[3],n[4]):null}var o=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,n){for(var r=0;r=0&&n<=100)return this.set(e,n),!0}return!1},e}();function s(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}var l=new r.default(0,0,""),c="middle"===l.align?"middle":"center";function u(e,t,n){var r=e;function i(){var t=a(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=i(),u(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),u(),t.endTime=i(),u(),function(e,t){var r=new o;s(e,(function(e,t){var i;switch(e){case"region":for(var a=n.length-1;a>=0;a--)if(n[a].id===t){r.set(e,n[a].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),r.integer(e,i[0]),r.percent(e,i[0])&&r.set("snapToLines",!1),r.alt(e,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",c,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",c,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===l.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",c);var a=r.get("position","auto");"auto"===a&&50===l.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function h(e){return e.replace(//gi,"\n")}var d=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new i,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=h(e);n>>0).toString()};function h(e,t,n){return u(e.toString())+u(t.toString())+u(n)}function d(e,t,n,u,d,f,p,m){var g,v=new i.VTTParser,y=Object(a.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(l,"\n").split("\n"),b=[],x=Object(o.toMpegTsClockFromTimescale)(t,n),w="00:00.000",k=0,C=0,E=!0,S=!1;v.oncue=function(e){var t=u[d],n=u.ccOffset,r=(k-x)/9e4;if(null!=t&&t.new&&(void 0!==C?n=u.ccOffset=t.start:function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;null!==(a=i)&&void 0!==a&&a.new;){var a;e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC]}e.presentationOffset=n}(u,d,r)),r&&(n=r-u.presentationOffset),S){var i=e.endTime-e.startTime,a=Object(s.normalizePts)(9e4*(e.startTime+n-C),9e4*f)/9e4;e.startTime=a,e.endTime=a+i}var o=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(o)),e.id||(e.id=h(e.startTime,e.endTime,o)),e.endTime>0&&b.push(e)},v.onparsingerror=function(e){g=e},v.onflush=function(){g?m(g):p(b)},y.forEach((function(e){if(E){if(c(e,"X-TIMESTAMP-MAP=")){E=!1,S=!0,e.substr(16).split(",").forEach((function(e){c(e,"LOCAL:")?w=e.substr(6):c(e,"MPEGTS:")&&(k=parseInt(e.substr(7)))}));try{C=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),i=parseInt(e.substr(-9,2)),a=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(r.isFiniteNumber)(t)&&Object(r.isFiniteNumber)(n)&&Object(r.isFiniteNumber)(i)&&Object(r.isFiniteNumber)(a)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,t+=6e4*i,t+=36e5*a}(w)/1e3}catch(e){S=!1,g=e}return}""===e&&(E=!1)}v.parse(e+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts": +/*!*********************************!*\ + !*** ./src/utils/xhr-loader.ts ***! + \*********************************/ +/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=/^age:\s*[\d.]+\s*$/m,o=function(){function e(e){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=e?e.xhrSetup:null,this.stats=new i.LoadStats,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e=this.config,t=this.context;if(e){var n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(n,t.url)}catch(e){n.open("GET",t.url,!0),i(n,t.url)}n.readyState||n.open("GET",t.url,!0);var a=this.context.headers;if(a)for(var o in a)n.setRequestHeader(o,a[o])}catch(e){return void this.callbacks.onError({code:n.status,text:e.message},t,n)}t.rangeEnd&&n.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),n.onreadystatechange=this.readystatechange.bind(this),n.onprogress=this.loadprogress.bind(this),n.responseType=t.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.timeout),n.send()}},t.readystatechange=function(){var e=this.context,t=this.loader,n=this.stats;if(e&&t){var i=t.readyState,a=this.config;if(!n.aborted&&i>=2)if(self.clearTimeout(this.requestTimeout),0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start)),4===i){t.onreadystatechange=null,t.onprogress=null;var o=t.status;if(o>=200&&o<300){var s,l;if(n.loading.end=Math.max(self.performance.now(),n.loading.first),l="arraybuffer"===e.responseType?(s=t.response).byteLength:(s=t.responseText).length,n.loaded=n.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(n,e,s,t),!this.callbacks)return;var u={url:t.responseURL,data:s};this.callbacks.onSuccess(u,n,e,t)}else n.retry>=a.maxRetry||o>=400&&o<499?(r.logger.error(o+" while loading "+e.url),this.callbacks.onError({code:o,text:t.statusText},e,t)):(r.logger.warn(o+" while loading "+e.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),n.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)}},t.loadtimeout=function(){r.logger.warn("timeout while loading "+this.context.url);var e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&a.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},e}();t.default=o}}).default},e.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(e,t,n){e.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKoX: +/*!**************************************************************!*\ + !*** ./node_modules/zrender/lib/svg/helper/ShadowManager.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Definable */"SrGk");function i(e,t){r.call(this,e,t,["filter"],"__filter_in_use__","_shadowDom")}function a(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY||e.textShadowBlur||e.textShadowOffsetX||e.textShadowOffsetY)}n(/*! ../../core/util */"bYtY").inherits(i,r),i.prototype.addWithoutUpdate=function(e,t){if(t&&a(t.style)){var n;if(t._shadowDom)n=t._shadowDom,this.getDefs(!0).contains(t._shadowDom)||this.addDom(n);else n=this.add(t);this.markUsed(t);var r=n.getAttribute("id");e.style.filter="url(#"+r+")"}},i.prototype.add=function(e){var t=this.createElement("filter");return e._shadowDomId=e._shadowDomId||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-shadow-"+e._shadowDomId),this.updateDom(e,t),this.addDom(t),t},i.prototype.update=function(e,t){if(a(t.style)){var n=this;r.prototype.update.call(this,t,(function(){n.updateDom(t,t._shadowDom)}))}else this.remove(e,t)},i.prototype.remove=function(e,t){null!=t._shadowDomId&&(this.removeDom(e),e.style.filter="")},i.prototype.updateDom=function(e,t){var n=t.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var r,i,a,o,s=e.style,l=e.scale&&e.scale[0]||1,c=e.scale&&e.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)r=s.shadowOffsetX||0,i=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(t,s);r=s.textShadowOffsetX||0,i=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}n.setAttribute("dx",r/l),n.setAttribute("dy",i/c),n.setAttribute("flood-color",o);var u=a/2/l+" "+a/2/c;n.setAttribute("stdDeviation",u),t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width",Math.ceil(a/2*200)+"%"),t.setAttribute("height",Math.ceil(a/2*200)+"%"),t.appendChild(n),e._shadowDom=t},i.prototype.markUsed=function(e){e._shadowDom&&r.prototype.markUsed.call(this,e._shadowDom)};var o=i;e.exports=o},vWvF: +/*!******************************************************!*\ + !*** ./node_modules/zrender/lib/mixin/Animatable.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../animation/Animator */"Bq2U"),i=n(/*! ../core/log */"SUKs"),a=n(/*! ../core/util */"bYtY"),o=a.isString,s=a.isFunction,l=a.isObject,c=a.isArrayLike,u=a.indexOf,h=function(){this.animators=[]};function d(e,t,n,r,i,a,u,h){o(r)?(a=i,i=r,r=0):s(i)?(a=i,i="linear",r=0):s(r)?(a=r,r=0):s(n)?(a=n,n=500):n||(n=500),e.stopAnimation(),function e(t,n,r,i,a,o,s){var u={},h=0;for(var d in i)i.hasOwnProperty(d)&&(null!=r[d]?l(i[d])&&!c(i[d])?e(t,n?n+"."+d:d,r[d],i[d],a,o,s):(s?(u[d]=r[d],f(t,n,d,i[d])):u[d]=i[d],h++):null==i[d]||s||f(t,n,d,i[d]));h>0&&t.animate(n,!1).when(null==a?500:a,u).delay(o||0)}(e,"",e,t,n,r,h);var d=e.animators.slice(),p=d.length;function m(){--p||a&&a()}p||a&&a();for(var g=0;g2&&void 0!==arguments[2]?arguments[2]:0;t[i]=t[i]||[];var a=r,o=n.filter(Boolean).map((function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:a},o=1,s=n.children;return s&&s.length>0&&(o=e(s,a,i+1).reduce((function(e,t){return e+t}),0),r.hasSubColumns=!0),"colSpan"in n&&(o=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=o,r.colEnd=r.colStart+o-1,t[i].push(r),a+=o,o}));return o}(e,0);for(var n=t.length,r=function(e){t[e].forEach((function(t){"rowSpan"in t||t.hasSubColumns||(t.rowSpan=n-e)}))},i=0;i=0;a-=1){var o=t[a],s=n&&n[a],c=s&&s[_.a];(o||c||i)&&(r.unshift(l.createElement("col",Object.assign({key:a,style:{width:o,minWidth:o}},c))),i=!0)}return l.createElement("colgroup",null,r)};var L=l.forwardRef((function(e,t){var n=e.noData,o=e.columns,s=e.flattenColumns,c=e.colWidths,h=e.columCount,d=e.stickyOffsets,f=e.direction,p=e.fixHeader,m=e.offsetHeader,g=e.stickyClassName,v=e.onScroll,x=Object(y.a)(e,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),k=l.useContext(w.a),C=k.prefixCls,E=k.scrollbarSize,S=k.isSticky,_=S&&!p?0:E,L=l.useRef(null),A=l.useCallback((function(e){Object(b.b)(t,e),Object(b.b)(L,e)}),[]);l.useEffect((function(){var e;function t(e){var t=e.currentTarget,n=e.deltaX;n&&(v({currentTarget:t,scrollLeft:t.scrollLeft+n}),e.preventDefault())}return null===(e=L.current)||void 0===e||e.addEventListener("wheel",t),function(){var e;null===(e=L.current)||void 0===e||e.removeEventListener("wheel",t)}}),[]);var D=s[s.length-1],M={fixed:D?D.fixed:null,onHeaderCell:function(){return{className:"".concat(C,"-cell-scrollbar")}}},R=Object(l.useMemo)((function(){return _?[].concat(Object(a.a)(o),[M]):o}),[_,o]),I=Object(l.useMemo)((function(){return _?[].concat(Object(a.a)(s),[M]):s}),[_,s]),j=Object(l.useMemo)((function(){var e=d.right,t=d.left;return Object(i.a)(Object(i.a)({},d),{},{left:"rtl"===f?[].concat(Object(a.a)(t.map((function(e){return e+_}))),[0]):t,right:"rtl"===f?e:[].concat(Object(a.a)(e.map((function(e){return e+_}))),[0]),isSticky:S})}),[_,d,S]),N=function(e,t){return Object(l.useMemo)((function(){for(var n=[],r=0;r1?n-1:0),a=1;a=p&&(r=p-g),c({scrollLeft:r/p*(f+2)}),C.current.x=e.pageX}else T&&_(!1)},A=function(){var e=Object(q.b)(o.current).top,t=e+o.current.offsetHeight,n=document.documentElement.scrollTop+window.innerHeight;t-Object(m.a)()<=n||e>=n-h?k((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!0})})):k((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!1})}))},D=function(e){k((function(t){return Object(i.a)(Object(i.a)({},t),{},{scrollLeft:e/f*p||0})}))};return l.useImperativeHandle(t,(function(){return{setScrollLeft:D}})),l.useEffect((function(){var e=Object(Y.a)(document.body,"mouseup",O,!1),t=Object(Y.a)(document.body,"mousemove",L,!1);return A(),function(){e.remove(),t.remove()}}),[g,T]),l.useEffect((function(){var e=Object(Y.a)(window,"scroll",A,!1),t=Object(Y.a)(window,"resize",A,!1);return function(){e.remove(),t.remove()}}),[]),l.useEffect((function(){x.isHiddenScrollBar||k((function(e){var t,n;return Object(i.a)(Object(i.a)({},e),{},{scrollLeft:o.current.scrollLeft/(null===(t=o.current)||void 0===t?void 0:t.scrollWidth)*(null===(n=o.current)||void 0===n?void 0:n.clientWidth)})}))}),[x.isHiddenScrollBar]),f<=p||!g||x.isHiddenScrollBar?null:l.createElement("div",{style:{height:Object(m.a)(),width:p,bottom:h},className:"".concat(d,"-sticky-scroll")},l.createElement("div",{onMouseDown:function(e){e.persist(),C.current.delta=e.pageX-x.scrollLeft,C.current.x=0,_(!0),e.preventDefault()},ref:v,className:u()("".concat(d,"-sticky-scroll-bar"),Object(r.a)({},"".concat(d,"-sticky-scroll-bar-active"),T)),style:{width:"".concat(g,"px"),transform:"translate3d(".concat(x.scrollLeft,"px, 0, 0)")}}))}));var $=[],Q={},J="rc-table-internal-hook",Z=l.memo((function(e){return e.children}),(function(e,t){return!!d()(e.props,t.props)&&(e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight)}));function ee(e){var t,n=e.prefixCls,c=e.className,h=e.rowClassName,d=e.style,g=e.data,v=e.rowKey,y=e.scroll,b=e.tableLayout,x=e.direction,E=e.title,S=e.footer,L=e.summary,M=e.id,R=e.showHeader,I=e.components,N=e.emptyText,P=e.onRow,H=e.onHeaderRow,z=e.internalHooks,Y=e.transformColumns,q=e.internalRefs,ee=e.sticky,te=g||$,ne=!!te.length,re=l.useState(0),ie=Object(s.a)(re,2),ae=ie[0],oe=ie[1];l.useEffect((function(){oe(Object(m.a)())}));var se,le,ce,ue=l.useMemo((function(){return Object(C.c)(I,{})}),[I]),he=l.useCallback((function(e,t){return Object(C.b)(ue,e)||t}),[ue]),de=l.useMemo((function(){return"function"==typeof v?v:function(e){return e&&e[v]}}),[v]),fe=Object(_.c)(e),pe=fe.expandIcon,me=fe.expandedRowKeys,ge=fe.defaultExpandedRowKeys,ve=fe.defaultExpandAllRows,ye=fe.expandedRowRender,be=fe.onExpand,xe=fe.onExpandedRowsChange,we=fe.expandRowByClick,ke=fe.rowExpandable,Ce=fe.expandIconColumnIndex,Ee=fe.expandedRowClassName,Se=fe.childrenColumnName,Te=fe.indentSize,_e=pe||K,Oe=Se||"children",Le=l.useMemo((function(){return ye?"row":!!(e.expandable&&z===J&&e.expandable.__PARENT_RENDER_ICON__||te.some((function(e){return e&&"object"===Object(o.a)(e)&&e[Oe]})))&&"nest"}),[!!ye,te]),Ae=l.useState((function(){return ge||(ve?function(e,t,n){var r=[];return function e(i){(i||[]).forEach((function(i,a){r.push(t(i,a)),e(i[n])}))}(e),r}(te,de,Oe):[])})),De=Object(s.a)(Ae,2),Me=De[0],Re=De[1],Ie=l.useMemo((function(){return new Set(me||Me||[])}),[me,Me]),je=l.useCallback((function(e){var t,n=de(e,te.indexOf(e)),r=Ie.has(n);r?(Ie.delete(n),t=Object(a.a)(Ie)):t=[].concat(Object(a.a)(Ie),[n]),Re(t),be&&be(!r,e),xe&&xe(t)}),[de,Ie,te,be,xe]),Ne=l.useState(0),Pe=Object(s.a)(Ne,2),Fe=Pe[0],Be=Pe[1],He=Object(B.b)(Object(i.a)(Object(i.a)(Object(i.a)({},e),fe),{},{expandable:!!ye,expandedKeys:Ie,getRowKey:de,onTriggerExpand:je,expandIcon:_e,expandIconColumnIndex:Ce,direction:x}),z===J?Y:null),ze=Object(s.a)(He,2),Ue=ze[0],Ve=ze[1],We=l.useMemo((function(){return{columns:Ue,flattenColumns:Ve}}),[Ue,Ve]),Ge=l.useRef(),Ke=l.useRef(),Ye=l.useRef(),qe=l.useState(!1),Xe=Object(s.a)(qe,2),$e=Xe[0],Qe=Xe[1],Je=l.useState(!1),Ze=Object(s.a)(Je,2),et=Ze[0],tt=Ze[1],nt=U(new Map),rt=Object(s.a)(nt,2),it=rt[0],at=rt[1],ot=Object(C.a)(Ve).map((function(e){return it.get(e)})),st=l.useMemo((function(){return ot}),[ot.join("_")]),lt=V(st,Ve.length,x),ct=y&&Object(C.d)(y.y),ut=y&&Object(C.d)(y.x),ht=ut&&Ve.some((function(e){return e.fixed})),dt=l.useRef(),ft=function(e,t){return l.useMemo((function(){var n=!!e;return{isSticky:n,stickyClassName:n?"".concat(t,"-sticky-header"):"",offsetHeader:"object"===Object(o.a)(e)&&e.offsetHeader||0,offsetScroll:"object"===Object(o.a)(e)&&e.offsetScroll||0}}),[e,t])}(ee,n),pt=ft.isSticky,mt=ft.offsetHeader,gt=ft.offsetScroll,vt=ft.stickyClassName;ct&&(le={overflowY:"scroll",maxHeight:y.y}),ut&&(se={overflowX:"auto"},ct||(le={overflowY:"hidden"}),ce={width:!0===y.x?"auto":y.x,minWidth:"100%"});var yt=l.useCallback((function(e,t){at((function(n){var r=new Map(n);return r.set(e,t),r}))}),[]),bt=function(e){var t=Object(l.useRef)(e),n=Object(l.useRef)(null);function r(){window.clearTimeout(n.current)}return Object(l.useEffect)((function(){return r}),[]),[function(e){t.current=e,r(),n.current=window.setTimeout((function(){t.current=null,n.current=null}),100)},function(){return t.current}]}(null),xt=Object(s.a)(bt,2),wt=xt[0],kt=xt[1];function Ct(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e))}var Et=function(e){var t,n=e.currentTarget,r=e.scrollLeft,i="number"==typeof r?r:n.scrollLeft,a=n||Q;kt()&&kt()!==a||(wt(a),Ct(i,Ke.current),Ct(i,Ye.current),Ct(i,null===(t=dt.current)||void 0===t?void 0:t.setScrollLeft));if(n){var o=n.scrollWidth,s=n.clientWidth;Qe(i>0),tt(i0?[].concat(Object(i.a)(e),Object(i.a)(h(o).map((function(e){return Object(a.a)({fixed:r},e)})))):[].concat(Object(i.a)(e),[Object(a.a)(Object(a.a)({},t),{},{fixed:r})])}),[])}t.b=function(e,t){var n=e.prefixCls,i=e.columns,l=e.children,d=e.expandable,f=e.expandedKeys,p=e.getRowKey,m=e.onTriggerExpand,g=e.expandIcon,v=e.rowExpandable,y=e.expandIconColumnIndex,b=e.direction,x=e.expandRowByClick,w=s.useMemo((function(){return i||u(l)}),[i,l]),k=s.useMemo((function(){if(d){var e,t=y||0,i=w[t],a=(e={},Object(r.a)(e,c.a,{className:"".concat(n,"-expand-icon-col")}),Object(r.a)(e,"title",""),Object(r.a)(e,"fixed",i?i.fixed:null),Object(r.a)(e,"className","".concat(n,"-row-expand-icon-cell")),Object(r.a)(e,"render",(function(e,t,r){var i=p(t,r),a=f.has(i),o=!v||v(t),l=g({prefixCls:n,expanded:a,expandable:o,record:t,onExpand:m});return x?s.createElement("span",{onClick:function(e){return e.stopPropagation()}},l):l})),e),o=w.slice();return t>=0&&o.splice(t,0,a),o}return w}),[d,w,p,f,g,b]),C=s.useMemo((function(){var e=k;return t&&(e=t(e)),e.length||(e=[{render:function(){return null}}]),e}),[t,k,b]),E=s.useMemo((function(){return"rtl"===b?function(e){return e.map((function(e){var t=e.fixed,n=Object(o.a)(e,["fixed"]),r=t;return"left"===t?r="right":"right"===t&&(r="left"),Object(a.a)({fixed:r},n)}))}(h(C)):h(C)}),[C,b]);return[C,E]}},x6Kt: +/*!********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/Rect.js ***! + \********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../helper/roundRect */"VpOo"),a=n(/*! ../helper/subPixelOptimize */"nPnh").subPixelOptimizeRect,o={},s=r.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(e,t){var n,r,s,l;this.subPixelOptimize?(a(o,t,this.style),n=o.x,r=o.y,s=o.width,l=o.height,o.r=t.r,t=o):(n=t.x,r=t.y,s=t.width,l=t.height),t.r?i.buildPath(e,t):e.rect(n,r,s,l),e.closePath()}});e.exports=s},xOL1: +/*!**********************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/ShixunHomeworks/components/TrfList/delete.png ***! + \**********************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC"},"y+Vt": +/*!**************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/Path.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./Displayable */"Gev7"),i=n(/*! ../core/util */"bYtY"),a=n(/*! ../core/PathProxy */"IMiH"),o=n(/*! ../contain/path */"2DNl"),s=n(/*! ./Pattern */"3C/r").prototype.getCanvasPattern,l=Math.abs,c=new a(!0);function u(e){r.call(this,e),this.path=null}u.prototype={constructor:u,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(e,t){var n,r=this.style,i=this.path||c,a=r.hasStroke(),o=r.hasFill(),l=r.fill,u=r.stroke,h=o&&!!l.colorStops,d=a&&!!u.colorStops,f=o&&!!l.image,p=a&&!!u.image;(r.bind(e,this,t),this.setTransform(e),this.__dirty)&&(h&&(n=n||this.getBoundingRect(),this._fillGradient=r.getGradient(e,l,n)),d&&(n=n||this.getBoundingRect(),this._strokeGradient=r.getGradient(e,u,n)));h?e.fillStyle=this._fillGradient:f&&(e.fillStyle=s.call(l,e)),d?e.strokeStyle=this._strokeGradient:p&&(e.strokeStyle=s.call(u,e));var m=r.lineDash,g=r.lineDashOffset,v=!!e.setLineDash,y=this.getGlobalScale();if(i.setScale(y[0],y[1],this.segmentIgnoreThreshold),this.__dirtyPath||m&&!v&&a?(i.beginPath(e),m&&!v&&(i.setLineDash(m),i.setLineDashOffset(g)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(e.beginPath(),this.path.rebuildPath(e)),o)if(null!=r.fillOpacity){var b=e.globalAlpha;e.globalAlpha=r.fillOpacity*r.opacity,i.fill(e),e.globalAlpha=b}else i.fill(e);if(m&&v&&(e.setLineDash(m),e.lineDashOffset=g),a)if(null!=r.strokeOpacity){b=e.globalAlpha;e.globalAlpha=r.strokeOpacity*r.opacity,i.stroke(e),e.globalAlpha=b}else i.stroke(e);m&&v&&e.setLineDash([]),null!=r.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))},buildPath:function(e,t,n){},createPathProxy:function(){this.path=new a},getBoundingRect:function(){var e=this._rect,t=this.style,n=!e;if(n){var r=this.path;r||(r=this.path=new a),this.__dirtyPath&&(r.beginPath(),this.buildPath(r,this.shape,!1)),e=r.getBoundingRect()}if(this._rect=e,t.hasStroke()){var i=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||n){i.copy(e);var o=t.lineWidth,s=t.strokeNoScale?this.getLineScale():1;t.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),s>1e-10&&(i.width+=o/s,i.height+=o/s,i.x-=o/s/2,i.y-=o/s/2)}return i}return e},contain:function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path.data;if(i.hasStroke()){var s=i.lineWidth,l=i.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(i.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),o.containStroke(a,s/l,e,t)))return!0}if(i.hasFill())return o.contain(a,e,t)}return!1},dirty:function(e){null==e&&(e=!0),e&&(this.__dirtyPath=e,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(e){return this.animate("shape",e)},attrKV:function(e,t){"shape"===e?(this.setShape(t),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,e,t)},setShape:function(e,t){var n=this.shape;if(n){if(i.isObject(e))for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);else n[e]=t;this.dirty(!0)}return this},getLineScale:function(){var e=this.transform;return e&&l(e[0]-1)>1e-10&&l(e[3]-1)>1e-10?Math.sqrt(l(e[0]*e[3]-e[2]*e[1])):1}},u.extend=function(e){var t=function(t){u.call(this,t),e.style&&this.style.extendFrom(e.style,!1);var n=e.shape;if(n){this.shape=this.shape||{};var r=this.shape;for(var i in n)!r.hasOwnProperty(i)&&n.hasOwnProperty(i)&&(r[i]=n[i])}e.init&&e.init.call(this,t)};for(var n in i.inherits(t,u),e)"style"!==n&&"shape"!==n&&(t.prototype[n]=e[n]);return t},i.inherits(u,r);var h=u;e.exports=h},"y0+3": +/*!********************************************!*\ + !*** ./node_modules/rc-util/es/Dom/css.js ***! + \********************************************/ +/*! exports provided: get, set, getOuterWidth, getOuterHeight, getDocSize, getClientSize, getScroll, getOffset */ +/*! exports used: getClientSize, getOffset */function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));function r(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function i(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}},y23F: +/*!*****************************************************!*\ + !*** ./node_modules/zrender/lib/mixin/Draggable.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function r(e,t){return{target:e,topTarget:t&&t.topTarget}}n.prototype={constructor:n,_dragStart:function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.dispatchToElement(r(t,e),"dragstart",e.event))},_drag:function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,t.drift(a,o,e),this.dispatchToElement(r(t,e),"drag",e.event);var s=this.findHover(n,i,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.dispatchToElement(r(l,e),"dragleave",e.event),s&&s!==l&&this.dispatchToElement(r(s,e),"dragenter",e.event))}},_dragEnd:function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.dispatchToElement(r(t,e),"dragend",e.event),this._dropTarget&&this.dispatchToElement(r(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null}};var i=n;e.exports=i},yxFR: +/*!********************************************************!*\ + !*** ./node_modules/zrender/lib/graphic/shape/Line.js ***! + \********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../Path */"y+Vt"),i=n(/*! ../helper/subPixelOptimize */"nPnh").subPixelOptimizeLine,a={},o=r.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n,r,o,s;this.subPixelOptimize?(i(a,t,this.style),n=a.x1,r=a.y1,o=a.x2,s=a.y2):(n=t.x1,r=t.y1,o=t.x2,s=t.y2);var l=t.percent;0!==l&&(e.moveTo(n,r),l<1&&(o=n*(1-l)+o*l,s=r*(1-l)+s*l),e.lineTo(o,s))},pointAt:function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]}});e.exports=o},zarK: +/*!******************************************************!*\ + !*** ./node_modules/zrender/lib/dom/HandlerProxy.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,a=n(/*! ../core/event */"YH21"),o=a.addEventListener,s=a.removeEventListener,l=a.normalizeEvent,c=a.getNativeEvent,u=n(/*! ../core/util */"bYtY"),h=n(/*! ../mixin/Eventful */"H6uX"),d=n(/*! ../core/env */"ItGF"),f=d.domSupported,p=(i={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:r=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:u.map(r,(function(e){var t=e.replace("mouse","pointer");return i.hasOwnProperty(t)?t:e}))}),m=["mousemove","mouseup"],g=["pointermove","pointerup"];function v(e){return"mousewheel"===e&&d.browser.firefox?"DOMMouseScroll":e}function y(e){var t=e.pointerType;return"pen"===t||"touch"===t}function b(e){e&&(e.zrByTouch=!0)}function x(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}function w(e,t){this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}var k=w.prototype;k.stopPropagation=k.stopImmediatePropagation=k.preventDefault=u.noop;var C={mousedown:function(e){e=l(this.dom,e),this._mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=l(this.dom,e);var t=this._mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||L(this,!0),this.trigger("mousemove",e)},mouseup:function(e){e=l(this.dom,e),L(this,!1),this.trigger("mouseup",e)},mouseout:function(e){e=l(this.dom,e),this._pointerCapturing&&(e.zrEventControl="no_globalout");var t=e.toElement||e.relatedTarget;e.zrIsToLocalDOM=x(this,t),this.trigger("mouseout",e)},touchstart:function(e){b(e=l(this.dom,e)),this._lastTouchMoment=new Date,this.handler.processGesture(e,"start"),C.mousemove.call(this,e),C.mousedown.call(this,e)},touchmove:function(e){b(e=l(this.dom,e)),this.handler.processGesture(e,"change"),C.mousemove.call(this,e)},touchend:function(e){b(e=l(this.dom,e)),this.handler.processGesture(e,"end"),C.mouseup.call(this,e),+new Date-this._lastTouchMoment<300&&C.click.call(this,e)},pointerdown:function(e){C.mousedown.call(this,e)},pointermove:function(e){y(e)||C.mousemove.call(this,e)},pointerup:function(e){C.mouseup.call(this,e)},pointerout:function(e){y(e)||C.mouseout.call(this,e)}};u.each(["click","mousewheel","dblclick","contextmenu"],(function(e){C[e]=function(t){t=l(this.dom,t),this.trigger(e,t)}}));var E={pointermove:function(e){y(e)||E.mousemove.call(this,e)},pointerup:function(e){E.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this._pointerCapturing;L(this,!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function S(e,t){var n=t.domHandlers;d.pointerEventsSupported?u.each(p.pointer,(function(r){_(t,r,(function(t){n[r].call(e,t)}))})):(d.touchEventsSupported&&u.each(p.touch,(function(r){_(t,r,(function(i){n[r].call(e,i),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),u.each(p.mouse,(function(r){_(t,r,(function(i){i=c(i),t.touching||n[r].call(e,i)}))})))}function T(e,t){function n(n){_(t,n,(function(r){r=c(r),x(e,r.target)||(r=function(e,t){return l(e.dom,new w(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))}),{capture:!0})}d.pointerEventsSupported?u.each(g,n):d.touchEventsSupported||u.each(m,n)}function _(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,o(e.domTarget,v(t),n,r)}function O(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&s(e.domTarget,v(n),t[n],e.listenerOpts[n]);e.mounted={}}function L(e,t){if(e._mayPointerCapture=null,f&&e._pointerCapturing^t){e._pointerCapturing=t;var n=e._globalHandlerScope;t?T(e,n):O(n)}}function A(e,t){this.domTarget=e,this.domHandlers=t,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function D(e,t){h.call(this),this.dom=e,this.painterRoot=t,this._localHandlerScope=new A(e,C),f&&(this._globalHandlerScope=new A(document,E)),this._pointerCapturing=!1,this._mayPointerCapture=null,S(this,this._localHandlerScope)}var M=D.prototype;M.dispose=function(){O(this._localHandlerScope),f&&O(this._globalHandlerScope)},M.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},u.mixin(D,h);var R=D;e.exports=R},zetH: +/*!*****************************************************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/ShixunHomeworks/Detail/components/ConfigWorks/index.less?modules ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___Joa_H",flex_space_between:"flex_space_between___3VhCy",flex_box_vertical_center:"flex_box_vertical_center___3wSNZ",flex_box_center_end:"flex_box_center_end___3z8HR",flex_box_column:"flex_box_column___KdHzx",form:"form___3KoYn",efficiency:"efficiency___1LMk4"}}}]); \ No newline at end of file diff --git a/umi.0f1049fb.js b/umi.0f1049fb.js new file mode 100644 index 0000000000..d0c1698604 --- /dev/null +++ b/umi.0f1049fb.js @@ -0,0 +1,4379 @@ +!function(e){function t(t){for(var r,a,c=t[0],u=t[1],s=t[2],l=0,f=[];l + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */var r=n(/*! isobject */"qDJ8");function a(e){return!0===r(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,n;return!1!==a(e)&&("function"==typeof(t=e.constructor)&&(!1!==a(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")))}},"+2a4": +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.some.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/an-object */"f1E4"),i=n(/*! ../internals/function-bind-context */"7BAe"),c=n(/*! ../internals/get-set-iterator */"jbR1"),u=n(/*! ../internals/iterate */"IuhT");r({target:"Set",proto:!0,real:!0,forced:a},{some:function(e){var t=o(this),n=c(t),r=i(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e){if(r(e,e,t))return u.stop()}),void 0,!1,!0).stopped}})},"+4le": +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.global-this.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ./es.global-this */"UXQe")},"+GPJ": +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.intersection.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/get-built-in */"29mP"),i=n(/*! ../internals/an-object */"f1E4"),c=n(/*! ../internals/a-function */"cT1L"),u=n(/*! ../internals/species-constructor */"/dTS"),s=n(/*! ../internals/iterate */"IuhT");r({target:"Set",proto:!0,real:!0,forced:a},{intersection:function(e){var t=i(this),n=new(u(t,o("Set"))),r=c(t.has),a=c(n.add);return s(e,(function(e){r.call(t,e)&&a.call(n,e)})),n}})},"+Hw1": +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.math.iaddh.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Math",stat:!0},{iaddh:function(e,t,n,r){var a=e>>>0,o=n>>>0;return(t>>>0)+(r>>>0)+((a&o|(a|o)&~(a+o>>>0))>>>31)|0}})},"+SQA": +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/function-bind.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/a-function */"cT1L"),a=n(/*! ../internals/is-object */"tSXo"),o=[].slice,i={},c=function(e,t,n){if(!(t in i)){for(var r=[],a=0;a1?arguments[1]:void 0)}})},"+qE3": +/*!***************************************!*\ + !*** ./node_modules/events/events.js ***! + \***************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r,a="object"==typeof Reflect?Reflect:null,o=a&&"function"==typeof a.apply?a.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function c(){c.init.call(this)}e.exports=c,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}y(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&y(e,"error",t,n)}(e,a,{once:!0})}))},c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var u=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?c.defaultMaxListeners:e._maxListeners}function p(e,t,n,r){var a,o,i,c;if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),i=o[t]),void 0===i)i=o[t]=n,++e._eventsCount;else if("function"==typeof i?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(a=l(e))>0&&i.length>a&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,c=u,console&&console.warn&&console.warn(c)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=f.bind(r);return a.listener=n,r.wrapFn=a,a}function h(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(i=t[0]),i instanceof Error)throw i;var c=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw c.context=i,c}var u=a[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var s=u.length,l=b(u,s);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},c.prototype.listeners=function(e){return h(this,e,!0)},c.prototype.rawListeners=function(e){return h(this,e,!1)},c.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},c.prototype.listenerCount=m,c.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},"+rjg": +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/string-repeat.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/to-integer */"m0kY"),a=n(/*! ../internals/require-object-coercible */"FCfD");e.exports="".repeat||function(e){var t=String(a(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},"+u1y": +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.array.last-index.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/descriptors */"tny8"),a=n(/*! ../internals/add-to-unscopables */"eNh0"),o=n(/*! ../internals/to-object */"cTDu"),i=n(/*! ../internals/to-length */"oa35"),c=n(/*! ../internals/object-define-property */"YfKC").f;r&&!("lastIndex"in[])&&(c(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=o(this),t=i(e.length);return 0==t?0:t-1}}),a("lastIndex"))},"+vfm": +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/inherit-if-required.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/is-object */"tSXo"),a=n(/*! ../internals/object-set-prototype-of */"g1ZG");e.exports=function(e,t,n){var o,i;return a&&"function"==typeof(o=t.constructor)&&o!==n&&r(i=o.prototype)&&i!==n.prototype&&a(e,i),e}},"+wdc": +/*!****************************************************************!*\ + !*** ./node_modules/scheduler/cjs/scheduler.production.min.js ***! + \****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict"; +/** @license React v0.18.0 + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r,a,o,i,c;if(Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,s=null,l=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(l,0),e}},p=Date.now();t.unstable_now=function(){return Date.now()-p},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(l,0))},a=function(e,t){s=setTimeout(e,t)},o=function(){clearTimeout(s)},i=function(){return!1},c=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,d=window.Date,h=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var b=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof b&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var y=d.now();t.unstable_now=function(){return d.now()-y}}var v=!1,g=null,_=-1,x=5,w=0;i=function(){return t.unstable_now()>=w},c=function(){},t.unstable_forceFrameRate=function(e){0>e||125P(i,n))void 0!==u&&0>P(u,i)?(e[r]=u,e[c]=n,r=c):(e[r]=i,e[o]=n,r=o);else{if(!(void 0!==u&&0>P(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}return null}function P(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],T=[],A=1,I=null,M=3,L=!1,D=!1,R=!1;function N(e){for(var t=E(T);null!==t;){if(null===t.callback)S(T);else{if(!(t.startTime<=e))break;S(T),t.sortIndex=t.expirationTime,k(C,t)}t=E(T)}}function F(e){if(R=!1,N(e),!D)if(null!==E(C))D=!0,r(U);else{var t=E(T);null!==t&&a(F,t.startTime-e)}}function U(e,n){D=!1,R&&(R=!1,o()),L=!0;var r=M;try{for(N(n),I=E(C);null!==I&&(!(I.expirationTime>n)||e&&!i());){var c=I.callback;if(null!==c){I.callback=null,M=I.priorityLevel;var u=c(I.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?I.callback=u:I===E(C)&&S(C),N(n)}else S(C);I=E(C)}if(null!==I)var s=!0;else{var l=E(T);null!==l&&a(F,l.startTime-n),s=!1}return s}finally{I=null,M=r,L=!1}}function z(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var V=c;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=M;M=e;try{return t()}finally{M=n}},t.unstable_next=function(e){switch(M){case 1:case 2:case 3:var t=3;break;default:t=M}var n=M;M=t;try{return e()}finally{M=n}},t.unstable_scheduleCallback=function(e,n,i){var c=t.unstable_now();if("object"==typeof i&&null!==i){var u=i.delay;u="number"==typeof u&&0c?(e.sortIndex=u,k(T,e),null===E(C)&&e===E(T)&&(R?o():R=!0,a(F,u-c))):(e.sortIndex=i,k(C,e),D||L||(D=!0,r(U))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=M;return function(){var n=M;M=t;try{return e.apply(this,arguments)}finally{M=n}}},t.unstable_getCurrentPriorityLevel=function(){return M},t.unstable_shouldYield=function(){var e=t.unstable_now();N(e);var n=E(C);return n!==I&&null!==I&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTimel;)if((c=u[l++])!=c)return!0}else for(;s>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},"/8Wl": +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.math.trunc.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=Math.ceil,o=Math.floor;r({target:"Math",stat:!0},{trunc:function(e){return(e>0?o:a)(e)}})},"/EoS": +/*!******************************************!*\ + !*** ./src/styles/iconfont/iconfont.css ***! + \******************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},"/I8r": +/*!**********************************************!*\ + !*** ./src/models/engineering/normDetail.ts ***! + \**********************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/engineering */"rbmi"),c={namespace:"engineeringNormDetail",state:{actionTabs:{key:"",params:{}},dataSource:{name:"",goal_value:0,actual_value:0,subitems:[]}},effects:{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)})),getGraduationResultDetail: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.g,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{dataSource:u}});case 7:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return Object(r.a)(Object(r.a)({},e),t.payload)},setDataSource:function(e,t){var n=t.payload;return Object(r.a)(Object(r.a)({},e),{},{dataSource:n})}},subscriptions:{setup:function(e){var t=e.dispatch;return e.history.listen((function(e){"/"===e.pathname&&t({type:"query"})}))}}};t.a=c},"/MKj": +/*!***********************************************************!*\ + !*** ./node_modules/react-redux/es/index.js + 19 modules ***! + \***********************************************************/ +/*! exports provided: Provider, connectAdvanced, ReactReduxContext, connect, useDispatch, createDispatchHook, useSelector, createSelectorHook, useStore, createStoreHook, shallowEqual, batch */ +/*! exports used: Provider, ReactReduxContext, connect */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js because of ./node_modules/rc-field-form/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/es/components/Context.js because of ./node_modules/react-redux/es/components/connectAdvanced.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/es/components/connectAdvanced.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/es/utils/Subscription.js because of ./node_modules/react-redux/es/components/connectAdvanced.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/es/utils/batch.js because of ./node_modules/react-redux/es/components/connectAdvanced.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js because of ./node_modules/react-redux/es/components/connectAdvanced.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 u})),n.d(t,"b",(function(){return o.a})),n.d(t,"c",(function(){return C}));var r=n("q1tI"),a=n.n(r),o=(n("17x9"),n("joe6")),i=n("edbT"),c=n("V+Yl");var u=function(e){var t=e.store,n=e.context,u=e.children,s=Object(r.useMemo)((function(){var e=Object(i.a)(t);return{store:t,subscription:e}}),[t]),l=Object(r.useMemo)((function(){return t.getState()}),[t]);Object(c.a)((function(){var e=s.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),l!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[s,l]);var p=n||o.a;return a.a.createElement(p.Provider,{value:s},u)},s=n("/jNT"),l=n("wx14"),p=n("zLVn");function f(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function d(e,t){if(f(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a=0;r--){var a=t[r](e);if(a)return a}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function S(e,t){return e===t}function P(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?s.a:n,a=t.mapStateToPropsFactories,o=void 0===a?v:a,i=t.mapDispatchToPropsFactories,c=void 0===i?y:i,u=t.mergePropsFactories,f=void 0===u?_:u,h=t.selectorFactory,m=void 0===h?O:h;return function(e,t,n,a){void 0===a&&(a={});var i=a,u=i.pure,s=void 0===u||u,h=i.areStatesEqual,b=void 0===h?S:h,y=i.areOwnPropsEqual,v=void 0===y?d:y,g=i.areStatePropsEqual,_=void 0===g?d:g,x=i.areMergedPropsEqual,w=void 0===x?d:x,j=Object(p.a)(i,k),O=E(e,o,"mapStateToProps"),P=E(t,c,"mapDispatchToProps"),C=E(n,f,"mergeProps");return r(m,Object(l.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:O,initMapDispatchToProps:P,initMergeProps:C,pure:s,areStatesEqual:b,areOwnPropsEqual:v,areStatePropsEqual:_,areMergedPropsEqual:w},j))}}var C=P();var T=n("i8i4"),A=n("TfIc");Object(A.b)(T.unstable_batchedUpdates)},"/R3g": +/*!**************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.reflect.get-metadata-keys.js ***! + \**************************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../modules/es.set */"zTPR"),o=n(/*! ../internals/reflect-metadata */"ls1J"),i=n(/*! ../internals/an-object */"f1E4"),c=n(/*! ../internals/object-get-prototype-of */"Acmb"),u=n(/*! ../internals/iterate */"IuhT"),s=o.keys,l=o.toKey,p=function(e,t){var n=s(e,t),r=c(e);if(null===r)return n;var o,i,l=p(r,t);return l.length?n.length?(o=new a(n.concat(l)),u(o,(i=[]).push,i),i):l:n};r({target:"Reflect",stat:!0},{getMetadataKeys:function(e){var t=arguments.length<2?void 0:l(arguments[1]);return p(i(e),t)}})},"/dTS": +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/species-constructor.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/an-object */"f1E4"),a=n(/*! ../internals/a-function */"cT1L"),o=n(/*! ../internals/well-known-symbol */"2kyd")("species");e.exports=function(e,t){var n,i=r(e).constructor;return void 0===i||null==(n=r(i)[o])?t:a(n)}},"/gva": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/collection.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/global */"ukPv"),o=n(/*! ../internals/is-forced */"kkxG"),i=n(/*! ../internals/redefine */"NMFW"),c=n(/*! ../internals/internal-metadata */"a5mf"),u=n(/*! ../internals/iterate */"IuhT"),s=n(/*! ../internals/an-instance */"igoe"),l=n(/*! ../internals/is-object */"tSXo"),p=n(/*! ../internals/fails */"MVys"),f=n(/*! ../internals/check-correctness-of-iteration */"GPrf"),d=n(/*! ../internals/set-to-string-tag */"kiNa"),h=n(/*! ../internals/inherit-if-required */"+vfm");e.exports=function(e,t,n){var m=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),y=m?"set":"add",v=a[e],g=v&&v.prototype,_=v,x={},w=function(e){var t=g[e];i(g,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(b&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return b&&!l(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!l(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(o(e,"function"!=typeof v||!(b||g.forEach&&!p((function(){(new v).entries().next()})))))_=n.getConstructor(t,e,m,y),c.REQUIRED=!0;else if(o(e,!0)){var j=new _,O=j[y](b?{}:-0,1)!=j,k=p((function(){j.has(1)})),E=f((function(e){new v(e)})),S=!b&&p((function(){for(var e=new v,t=5;t--;)e[y](t,t);return!e.has(-0)}));E||((_=t((function(t,n){s(t,_,e);var r=h(new v,t,_);return null!=n&&u(n,r[y],r,m),r}))).prototype=g,g.constructor=_),(k||S)&&(w("delete"),w("has"),m&&w("get")),(S||O)&&w(y),b&&g.clear&&delete g.clear}return x[e]=_,r({global:!0,forced:_!=v},x),d(_,e),b||n.setStrong(_,e,m),_}},"/mKc": +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.filter.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/get-built-in */"29mP"),i=n(/*! ../internals/an-object */"f1E4"),c=n(/*! ../internals/a-function */"cT1L"),u=n(/*! ../internals/function-bind-context */"7BAe"),s=n(/*! ../internals/species-constructor */"/dTS"),l=n(/*! ../internals/get-set-iterator */"jbR1"),p=n(/*! ../internals/iterate */"IuhT");r({target:"Set",proto:!0,real:!0,forced:a},{filter:function(e){var t=i(this),n=l(t),r=u(e,arguments.length>1?arguments[1]:void 0,3),a=new(s(t,o("Set"))),f=c(a.add);return p(n,(function(e){r(e,e,t)&&f.call(a,e)}),void 0,!1,!0),a}})},"/vMi": +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.weak-set.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";n(/*! ../internals/collection */"/gva")("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(/*! ../internals/collection-weak */"uz3g"))},"/yC2": +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/ie8-dom-define.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/descriptors */"tny8"),a=n(/*! ../internals/fails */"MVys"),o=n(/*! ../internals/document-create-element */"8w+9");e.exports=!r&&!a((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},0: +/*!******************************************!*\ + !*** multi ./src/.umi-production/umi.ts ***! + \******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n(/*! E:\gonshi\ppte5yg23\src\.umi-production\umi.ts */"tB8F")},"02UQ": +/*!*********************************************!*\ + !*** ./src/models/classrooms/graduation.ts ***! + \*********************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/graduation */"B3m4"),c={namespace:"graduation",state:{name:"毕业设计",loading:!0,actionTabs:{},detailList:{},detailTaskList:{},replyList:{},detail:{},addTopicData:{},editTopicData:{},editTasksData:{}},effects:{getTopisDetailList: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.o,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailList:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getTasksListDetail: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.m,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailTaskList:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getTopisDetail: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.n,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)})),getTasksDetail: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.l,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{tasksDetail:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),refuseTopic: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,t.callback,a=n.call,n.put,e.next=4,a(i.p,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),agreeTopic: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,t.callback,a=n.call,n.put,e.next=4,a(i.d,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),getReplyList: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,t.callback,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:{replyList:Object(r.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),createReply: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,t.callback,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)})),replyLike: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,t.callback,a=n.call,n.put,e.next=4,a(i.q,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),replyUnLike: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,t.callback,a=n.call,n.put,e.next=4,a(i.r,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),deleteReply: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,t.callback,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)})),addTopicDefaultData: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.c,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{addTopicData:Object(r.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),editTopicDefaultData: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,t.callback,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:{editTopicData:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),editTasksDefaultData: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.h,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{editTasksData:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),addTopic: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,t.callback,a=n.call,n.put,e.next=4,a(i.b,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),editTopic: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,t.callback,a=n.call,n.put,e.next=4,a(i.i,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),addTasks: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,t.callback,a=n.call,n.put,e.next=4,a(i.a,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),editTasks: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,t.callback,a=n.call,n.put,e.next=4,a(i.g,r);case 4:return c=e.sent,e.abrupt("return",c);case 6: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 Object(r.a)(Object(r.a)({},e),t.payload)}},subscriptions:{setup:function(e){e.dispatch,e.history}}};t.a=c},"0BeC": +/*!*********************************************!*\ + !*** ./src/models/classrooms/attachment.ts ***! + \*********************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/attachment */"Xq8v"),c={namespace:"attachment",state:{name:"资源",loading:!0,detail:{},actionTabs:{}},effects:{allAttachment: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.a,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{allList:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),mineAttachment: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.d,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{mineList:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),fileImport: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,t.callback,a=n.call,n.put,e.next=4,a(i.b,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),getDetail: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.c,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)})),updateVisits: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,t.callback,a=n.call,n.put,e.next=4,a(i.f,r);case 4:return c=e.sent,e.abrupt("return",c);case 6: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 Object(r.a)(Object(r.a)({},e),t.payload)}},subscriptions:{setup:function(e){e.dispatch,e.history}}};t.a=c},"0O5u": +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.array.concat.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/fails */"MVys"),o=n(/*! ../internals/is-array */"Un+d"),i=n(/*! ../internals/is-object */"tSXo"),c=n(/*! ../internals/to-object */"cTDu"),u=n(/*! ../internals/to-length */"oa35"),s=n(/*! ../internals/create-property */"arQb"),l=n(/*! ../internals/array-species-create */"nMuc"),p=n(/*! ../internals/array-method-has-species-support */"jMDO"),f=n(/*! ../internals/well-known-symbol */"2kyd"),d=n(/*! ../internals/engine-v8-version */"hRxt"),h=f("isConcatSpreadable"),m=d>=51||!a((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),b=p("concat"),y=function(e){if(!i(e))return!1;var t=e[h];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!m||!b},{concat:function(e){var t,n,r,a,o,i=c(this),p=l(i,0),f=0;for(t=-1,r=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");s(p,f++,o)}return p.length=f,p}})},"0Owb": +/*!*************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js ***! + \*************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],a=0;a=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===r.RFC1738&&(40===l||41===l)?u+=c.charAt(s):l<128?u+=i[l]:l<2048?u+=i[192|l>>6]+i[128|63&l]:l<55296||l>=57344?u+=i[224|l>>12]+i[128|l>>6&63]+i[128|63&l]:(s+=1,l=65536+((1023&l)<<10|1023&c.charCodeAt(s)),u+=i[240|l>>18]+i[128|l>>12&63]+i[128|l>>6&63]+i[128|63&l])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r1?arguments[1]:void 0,v=void 0!==y,g=s(h),_=0;if(v&&(y=r(y,b>2?arguments[2]:void 0,2)),null==g||m==Array&&i(g))for(n=new m(t=c(h.length));t>_;_++)d=v?y(h[_],_):h[_],u(n,_,d);else for(f=(p=g.call(h)).next,n=new m;!(l=f.call(p)).done;_++)d=v?o(p,y,[l.value,_],!0):l.value,u(n,_,d);return n.length=_,n}},"1OyB": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},"1W/9": +/*!**************************************************************!*\ + !*** ./node_modules/rc-util/es/PortalWrapper.js + 3 modules ***! + \**************************************************************/ +/*! exports provided: getOpenCount, default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./node_modules/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./node_modules/rc-field-form/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./node_modules/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./node_modules/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./node_modules/rc-field-form/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/rc-field-form/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/canUseDom.js because of ./node_modules/rc-select/es/SelectTrigger.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Portal.js because of ./node_modules/rc-select/es/SelectTrigger.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js because of ./node_modules/rc-table/es/Table.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/raf.js because of ./node_modules/rc-virtual-list/es/hooks/useFrameWheel.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("1OyB"),a=n("vuIU"),o=n("Ji7U"),i=n("LK+K"),c=n("U8pU"),u=n("q1tI"),s=n("wgJM"),l=n("QC+M"),p=n("MNnm"),f=n("qx4F");var d=function(e){var t=arguments.length>1&&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": +/*!********************************************************************************!*\ + !*** ./node_modules/@umijs/plugin-model/node_modules/fast-deep-equal/index.js ***! + \********************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,a,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(a=r;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(n,o[a]))return!1;for(a=r;0!=a--;){var i=o[a];if(!e(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}},"1aI8": +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/internal-state.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,a,o,i=n(/*! ../internals/native-weak-map */"ZkJ9"),c=n(/*! ../internals/global */"ukPv"),u=n(/*! ../internals/is-object */"tSXo"),s=n(/*! ../internals/create-non-enumerable-property */"lz10"),l=n(/*! ../internals/has */"jtLI"),p=n(/*! ../internals/shared-key */"CjUg"),f=n(/*! ../internals/hidden-keys */"6ixQ"),d=c.WeakMap;if(i){var h=new d,m=h.get,b=h.has,y=h.set;r=function(e,t){return y.call(h,e,t),t},a=function(e){return m.call(h,e)||{}},o=function(e){return b.call(h,e)}}else{var v=p("state");f[v]=!0,r=function(e,t){return s(e,v,t),t},a=function(e){return l(e,v)?e[v]:{}},o=function(e){return l(e,v)}}e.exports={set:r,get:a,has:o,enforce:function(e){return o(e)?a(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=a(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},"1cmj": +/*!***********************************************************!*\ + !*** ./src/models/shixuns/practiceSetting.ts + 1 modules ***! + \***********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! 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/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";var r=n("k1fw"),a=n("WmNS"),o=n.n(a),i=n("9og8"),c=n("ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(i.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(c.a)("/api/shixuns/new.json",{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(i.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(c.a)("/api/shixuns/".concat(t.id,"/required_status.json"),{method:"Get",params:{}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var f={namespace:"practiceSetting",state:{data:{},is_published:!0,updateIndex:1,id:"",questionName:"",base_info_warning:!1,challenges_warning:!1,repository_warning:!1,mirror_warning:!1,service_warning:!1,selectQuestionParams:{},newQuestion:null,user_name:"",user_image_url:"",title:"",windows_vnc:!0,isExistComplete:!1,sideBar:{tabsActive:"",selectPath:"",confirmLeave:!1}},effects:{setParams: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:Object(r.a)({},a)});case 4:case"end":return e.stop()}}),e)})),getTestData:o.a.mark((function e(t,n){var r,a,i,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,i=n.put,e.next=4,a(u,r);case 4:return c=e.sent,e.next=7,i({type:"save",payload:{data:c}});case 7:case"end":return e.stop()}}),e)})),setUpdateIndex:o.a.mark((function e(t,n){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.payload,n.call,r=n.put,e.next=4,r({type:"save",payload:{updateIndex:Math.random()}});case 4:case"end":return e.stop()}}),e)})),getCommonData:o.a.mark((function e(t,n){var a,i,c,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,i=n.call,c=n.put,e.next=4,i(l,a);case 4:return u=e.sent,e.next=7,c({type:"save",payload:Object(r.a)({},u.data)});case 7:case"end":return e.stop()}}),e)})),setSideBarTabs: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:"sideBar",payload:Object(r.a)({},a)});case 4:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return Object(r.a)(Object(r.a)({},e),t.payload)},sideBar:function(e,t){return Object(r.a)(Object(r.a)({},e),{},{sideBar:Object(r.a)(Object(r.a)({},e.sideBar),t.payload)})}},subscriptions:{setup:function(e){e.dispatch,e.history}}};t.a=f},"1jPx": +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.from.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/typed-array-constructors-require-wrappers */"8OQV");(0,n(/*! ../internals/array-buffer-view-core */"FVwB").exportTypedArrayStaticMethod)("from",n(/*! ../internals/typed-array-from */"Sn4z"),r)},"1nhP": +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/to-positive-integer.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/to-integer */"m0kY");e.exports=function(e){var t=r(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},"1qEB": +/*!****************************************!*\ + !*** ./src/models/innovation/index.ts ***! + \****************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a={namespace:"innovation",state:{visibleModalName:"",hideRemindModal:!0,openForkModalPosition:"forkButton",simpleModalProps:{visible:!1}},reducers:{save:function(e,t){return Object(r.a)(Object(r.a)({},e),t.payload)},openModal:function(e,t){return Object(r.a)(Object(r.a)({},e),{},{visibleModalName:t.payload})},closeModal:function(e){return Object(r.a)(Object(r.a)({},e),{},{visibleModalName:""})},openSimpleModal:function(e,t){return Object(r.a)(Object(r.a)({},e),{},{simpleModalProps:Object(r.a)({visible:!0},t.payload)})},closeSimpleModal:function(e){return Object(r.a)(Object(r.a)({},e),{},{simpleModalProps:{visible:!1}})}}};t.a=a},"1vsH": +/*!****************************************!*\ + !*** ./src/utils/util.tsx + 1 modules ***! + \****************************************/ +/*! exports provided: ZimuSort, JudgeSort, RomanNumber, StatusTags, formatHomeWorkStatusToName, HomeWorkListStatus, HomeWorkDetailStatus, StatusGraduationProjectTags, ExerciseStatus, PollsStatus, StatusClassroomsTags, exerciseTips, WorkStatus, CommonWorkStatus, timego, timeformat, toTimeFormat, validateLength, handleValidatorNickName, handleValidatorName, getHiddenName, getBase64, setmiyah, getCookie, setCookie, delCookie, downLoadLink, getBlob, saveAs, download, downLoadFileIframe, downLoadFile, setUrlQuery, isPc, isChrome, isChromeOrFirefox, formatMoney, openNewWindow, openNewWindows, formatTextMiddleIntercept, HalfPastOne, DayHalfPastOne, isEmpty, rangeNumber, middleEllipsis, formatRate, isUnOrNull, getUrlToken, getMessagesUrl, checkLocalOrPublicIp, isKepuKehuan, startExercise, educationList, parseUrl, messageInfo, base64ToBlob, downloadFile, trackEvent, trackEventCustom, onPreviewImage, getCategoryName, bindPhone, copyTextFuc, getJsonFromUrl, arrTrans, setDocumentTitle, checkIsClientExam, localSort, ImgSrcConvert, compareVersion, isLocalApp, randomArray */ +/*! exports used: CommonWorkStatus, DayHalfPastOne, ExerciseStatus, HalfPastOne, HomeWorkDetailStatus, HomeWorkListStatus, ImgSrcConvert, JudgeSort, PollsStatus, RomanNumber, StatusClassroomsTags, StatusGraduationProjectTags, ZimuSort, arrTrans, bindPhone, checkIsClientExam, checkLocalOrPublicIp, compareVersion, copyTextFuc, downLoadFile, downLoadFileIframe, downLoadLink, download, downloadFile, exerciseTips, formatHomeWorkStatusToName, formatRate, getBase64, getCategoryName, getCookie, getHiddenName, getJsonFromUrl, getMessagesUrl, handleValidatorName, isKepuKehuan, isLocalApp, isPc, isUnOrNull, localSort, onPreviewImage, openNewWindow, parseUrl, randomArray, rangeNumber, setCookie, setDocumentTitle, setUrlQuery, setmiyah, startExercise, toTimeFormat, trackEvent, validateLength */ +/*! 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/defineProperty.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/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/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/Answer/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/components/mediator.js because of ./src/pages/virtualSpaces/Lists/Notices/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/Member/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/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 */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */ +/*! 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/antd/es/modal/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/md5/md5.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,"m",(function(){return k})),n.d(t,"h",(function(){return E})),n.d(t,"j",(function(){return S})),n.d(t,"z",(function(){return P})),n.d(t,"f",(function(){return C})),n.d(t,"e",(function(){return T})),n.d(t,"l",(function(){return A})),n.d(t,"c",(function(){return I})),n.d(t,"i",(function(){return M})),n.d(t,"k",(function(){return L})),n.d(t,"y",(function(){return D})),n.d(t,"a",(function(){return R})),n.d(t,"X",(function(){return N})),n.d(t,"Z",(function(){return F})),n.d(t,"H",(function(){return U})),n.d(t,"E",(function(){return z})),n.d(t,"B",(function(){return V})),n.d(t,"V",(function(){return q})),n.d(t,"D",(function(){return B})),n.d(t,"S",(function(){return W})),n.d(t,"v",(function(){return H})),n.d(t,"w",(function(){return G})),n.d(t,"u",(function(){return Q})),n.d(t,"t",(function(){return Y})),n.d(t,"U",(function(){return K})),n.d(t,"K",(function(){return X})),n.d(t,"O",(function(){return ee})),n.d(t,"d",(function(){return te})),n.d(t,"b",(function(){return ne})),n.d(t,"R",(function(){return re})),n.d(t,"A",(function(){return ae})),n.d(t,"L",(function(){return oe})),n.d(t,"G",(function(){return ie})),n.d(t,"q",(function(){return ce})),n.d(t,"I",(function(){return ue})),n.d(t,"W",(function(){return se})),n.d(t,"P",(function(){return le})),n.d(t,"x",(function(){return pe})),n.d(t,"Y",(function(){return fe})),n.d(t,"N",(function(){return de})),n.d(t,"C",(function(){return he})),n.d(t,"o",(function(){return me})),n.d(t,"s",(function(){return be})),n.d(t,"F",(function(){return ye})),n.d(t,"n",(function(){return ve})),n.d(t,"T",(function(){return ge})),n.d(t,"p",(function(){return _e})),n.d(t,"M",(function(){return xe})),n.d(t,"g",(function(){return we})),n.d(t,"r",(function(){return je})),n.d(t,"J",(function(){return ke})),n.d(t,"Q",(function(){return Ee}));var r=n("oBTY"),a=(n("miYZ"),n("tsqr")),o=(n("sRBo"),n("kaz8")),i=(n("14J3"),n("BMrR")),c=(n("jCWc"),n("kPKH")),u=(n("2qtc"),n("kLXV")),s=n("9og8"),l=n("k1fw"),p=n("jrin"),f=n("WmNS"),d=n.n(f),h=n("q1tI"),m=n.n(h),b=n("xKgJ"),y=n("s8TD"),v=n("V0Rq"),g=n("bntm"),_={load:"text/html",123:"application/vndlotus-1-2-3","3ds":"image/x-3ds","3g2":"video/3gpp","3ga":"video/3gpp","3gp":"video/3gpp","3gpp":"video/3gpp",602:"application/x-t602",669:"audio/x-mod","7z":"application/x-7z-compressed",a:"application/x-archive",aac:"audio/mp4",abw:"application/x-abiword",abwcrashed:"application/x-abiword",abwgz:"application/x-abiword",ac3:"audio/ac3",ace:"application/x-ace",adb:"text/x-adasrc",ads:"text/x-adasrc",afm:"application/x-font-afm",ag:"image/x-applix-graphics",ai:"application/illustrator",aif:"audio/x-aiff",aifc:"audio/x-aiff",aiff:"audio/x-aiff",al:"application/x-perl",alz:"application/x-alz",amr:"audio/amr",ani:"application/x-navi-animation","anim[1-9j]":"video/x-anim",anx:"application/annodex",ape:"audio/x-ape",arj:"application/x-arj",arw:"image/x-sony-arw",as:"application/x-applix-spreadsheet",asc:"text/plain",asf:"video/x-ms-asf",asp:"application/x-asp",ass:"text/x-ssa",asx:"audio/x-ms-asx",atom:"application/atom+xml",au:"audio/basic",avi:"video/x-msvideo",aw:"application/x-applix-word",awb:"audio/amr-wb",awk:"application/x-awk",axa:"audio/annodex",axv:"video/annodex",bak:"application/x-trash",bcpio:"application/x-bcpio",bdf:"application/x-font-bdf",bib:"text/x-bibtex",bin:"application/octet-stream",blend:"application/x-blender",blender:"application/x-blender",bmp:"image/bmp",bz:"application/x-bzip",bz2:"application/x-bzip",c:"text/x-csrc","c++":"text/x-c++src",cab:"application/vndms-cab-compressed",cb7:"application/x-cb7",cbr:"application/x-cbr",cbt:"application/x-cbt",cbz:"application/x-cbz",cc:"text/x-c++src",cdf:"application/x-netcdf",cdr:"application/vndcorel-draw",cer:"application/x-x509-ca-cert",cert:"application/x-x509-ca-cert",cgm:"image/cgm",chm:"application/x-chm",chrt:"application/x-kchart",class:"application/x-java",cls:"text/x-tex",cmake:"text/x-cmake",cpio:"application/x-cpio",cpiogz:"application/x-cpio-compressed",cpp:"text/x-c++src",cr2:"image/x-canon-cr2",crt:"application/x-x509-ca-cert",crw:"image/x-canon-crw",cs:"text/x-csharp",csh:"application/x-csh",css:"text/css",cssl:"text/css",csv:"text/csv",cue:"application/x-cue",cur:"image/x-win-bitmap",cxx:"text/x-c++src",d:"text/x-dsrc",dar:"application/x-dar",dbf:"application/x-dbf",dc:"application/x-dc-rom",dcl:"text/x-dcl",dcm:"application/dicom",dcr:"image/x-kodak-dcr",dds:"image/x-dds",deb:"application/x-deb",der:"application/x-x509-ca-cert",desktop:"application/x-desktop",dia:"application/x-dia-diagram",diff:"text/x-patch",divx:"video/x-msvideo",djv:"image/vnddjvu",djvu:"image/vnddjvu",dng:"image/x-adobe-dng",doc:"application/msword",docbook:"application/docbook+xml",docm:"application/vndopenxmlformats-officedocumentwordprocessingmldocument",docx:"application/vndopenxmlformats-officedocumentwordprocessingmldocument",dot:"text/vndgraphviz",dsl:"text/x-dsl",dtd:"application/xml-dtd",dtx:"text/x-tex",dv:"video/dv",dvi:"application/x-dvi",dvibz2:"application/x-bzdvi",dvigz:"application/x-gzdvi",dwg:"image/vnddwg",dxf:"image/vnddxf",e:"text/x-eiffel",egon:"application/x-egon",eif:"text/x-eiffel",el:"text/x-emacs-lisp",emf:"image/x-emf",emp:"application/vndemusic-emusic_package",ent:"application/xml-external-parsed-entity",eps:"image/x-eps",epsbz2:"image/x-bzeps",epsgz:"image/x-gzeps",epsf:"image/x-eps",epsfbz2:"image/x-bzeps",epsfgz:"image/x-gzeps",epsi:"image/x-eps",epsibz2:"image/x-bzeps",epsigz:"image/x-gzeps",epub:"application/epub+zip",erl:"text/x-erlang",es:"application/ecmascript",etheme:"application/x-e-theme",etx:"text/x-setext",exe:"application/x-ms-dos-executable",exr:"image/x-exr",ez:"application/andrew-inset",f:"text/x-fortran",f90:"text/x-fortran",f95:"text/x-fortran",fb2:"application/x-fictionbook+xml",fig:"image/x-xfig",fits:"image/fits",fl:"application/x-fluid",flac:"audio/x-flac",flc:"video/x-flic",fli:"video/x-flic",flv:"video/x-flv",flw:"application/x-kivio",fo:"text/x-xslfo",for:"text/x-fortran",g3:"image/fax-g3",gb:"application/x-gameboy-rom",gba:"application/x-gba-rom",gcrd:"text/directory",ged:"application/x-gedcom",gedcom:"application/x-gedcom",gen:"application/x-genesis-rom",gf:"application/x-tex-gf",gg:"application/x-sms-rom",gif:"image/gif",glade:"application/x-glade",gmo:"application/x-gettext-translation",gnc:"application/x-gnucash",gnd:"application/gnunet-directory",gnucash:"application/x-gnucash",gnumeric:"application/x-gnumeric",gnuplot:"application/x-gnuplot",gp:"application/x-gnuplot",gpg:"application/pgp-encrypted",gplt:"application/x-gnuplot",gra:"application/x-graphite",gsf:"application/x-font-type1",gsm:"audio/x-gsm",gtar:"application/x-tar",gv:"text/vndgraphviz",gvp:"text/x-google-video-pointer",gz:"application/x-gzip",h:"text/x-chdr","h++":"text/x-c++hdr",hdf:"application/x-hdf",hh:"text/x-c++hdr",hp:"text/x-c++hdr",hpgl:"application/vndhp-hpgl",hpp:"text/x-c++hdr",hs:"text/x-haskell",htm:"text/html",html:"text/html",hwp:"application/x-hwp",hwt:"application/x-hwt",hxx:"text/x-c++hdr",ica:"application/x-ica",icb:"image/x-tga",icns:"image/x-icns",ico:"image/vndmicrosofticon",ics:"text/calendar",idl:"text/x-idl",ief:"image/ief",iff:"image/x-iff",ilbm:"image/x-ilbm",ime:"text/x-imelody",imy:"text/x-imelody",ins:"text/x-tex",iptables:"text/x-iptables",iso:"application/x-cd-image",iso9660:"application/x-cd-image",it:"audio/x-it",j2k:"image/jp2",jad:"text/vndsunj2meapp-descriptor",jar:"application/x-java-archive",java:"text/x-java",jng:"image/x-jng",jnlp:"application/x-java-jnlp-file",jp2:"image/jp2",jpc:"image/jp2",jpe:"image/jpeg",jpeg:"image/jpeg",jpf:"image/jp2",jpg:"image/jpeg",jpr:"application/x-jbuilder-project",jpx:"image/jp2",js:"application/javascript",json:"application/json",jsonp:"application/jsonp",k25:"image/x-kodak-k25",kar:"audio/midi",karbon:"application/x-karbon",kdc:"image/x-kodak-kdc",kdelnk:"application/x-desktop",kexi:"application/x-kexiproject-sqlite3",kexic:"application/x-kexi-connectiondata",kexis:"application/x-kexiproject-shortcut",kfo:"application/x-kformula",kil:"application/x-killustrator",kino:"application/smil",kml:"application/vndgoogle-earthkml+xml",kmz:"application/vndgoogle-earthkmz",kon:"application/x-kontour",kpm:"application/x-kpovmodeler",kpr:"application/x-kpresenter",kpt:"application/x-kpresenter",kra:"application/x-krita",ksp:"application/x-kspread",kud:"application/x-kugar",kwd:"application/x-kword",kwt:"application/x-kword",la:"application/x-shared-library-la",latex:"text/x-tex",ldif:"text/x-ldif",lha:"application/x-lha",lhs:"text/x-literate-haskell",lhz:"application/x-lhz",log:"text/x-log",ltx:"text/x-tex",lua:"text/x-lua",lwo:"image/x-lwo",lwob:"image/x-lwo",lws:"image/x-lws",ly:"text/x-lilypond",lyx:"application/x-lyx",lz:"application/x-lzip",lzh:"application/x-lha",lzma:"application/x-lzma",lzo:"application/x-lzop",m:"text/x-matlab",m15:"audio/x-mod",m2t:"video/mpeg",m3u:"audio/x-mpegurl",m3u8:"audio/x-mpegurl",m4:"application/x-m4",m4a:"audio/mp4",m4b:"audio/x-m4b",m4v:"video/mp4",mab:"application/x-markaby",man:"application/x-troff-man",mbox:"application/mbox",md:"application/x-genesis-rom",mdb:"application/vndms-access",mdi:"image/vndms-modi",me:"text/x-troff-me",med:"audio/x-mod",metalink:"application/metalink+xml",mgp:"application/x-magicpoint",mid:"audio/midi",midi:"audio/midi",mif:"application/x-mif",minipsf:"audio/x-minipsf",mka:"audio/x-matroska",mkv:"video/x-matroska",ml:"text/x-ocaml",mli:"text/x-ocaml",mm:"text/x-troff-mm",mmf:"application/x-smaf",mml:"text/mathml",mng:"video/x-mng",mo:"application/x-gettext-translation",mo3:"audio/x-mo3",moc:"text/x-moc",mod:"audio/x-mod",mof:"text/x-mof",moov:"video/quicktime",mov:"video/quicktime",movie:"video/x-sgi-movie","mp+":"audio/x-musepack",mp2:"video/mpeg",mp3:"audio/mpeg",mp4:"video/mp4",mpc:"audio/x-musepack",mpe:"video/mpeg",mpeg:"video/mpeg",mpg:"video/mpeg",mpga:"audio/mpeg",mpp:"audio/x-musepack",mrl:"text/x-mrml",mrml:"text/x-mrml",mrw:"image/x-minolta-mrw",ms:"text/x-troff-ms",msi:"application/x-msi",msod:"image/x-msod",msx:"application/x-msx-rom",mtm:"audio/x-mod",mup:"text/x-mup",mxf:"application/mxf",n64:"application/x-n64-rom",nb:"application/mathematica",nc:"application/x-netcdf",nds:"application/x-nintendo-ds-rom",nef:"image/x-nikon-nef",nes:"application/x-nes-rom",nfo:"text/x-nfo",not:"text/x-mup",nsc:"application/x-netshow-channel",nsv:"video/x-nsv",o:"application/x-object",obj:"application/x-tgif",ocl:"text/x-ocl",oda:"application/oda",odb:"application/vndoasisopendocumentdatabase",odc:"application/vndoasisopendocumentchart",odf:"application/vndoasisopendocumentformula",odg:"application/vndoasisopendocumentgraphics",odi:"application/vndoasisopendocumentimage",odm:"application/vndoasisopendocumenttext-master",odp:"application/vndoasisopendocumentpresentation",ods:"application/vndoasisopendocumentspreadsheet",odt:"application/vndoasisopendocumenttext",oga:"audio/ogg",ogg:"video/x-theora+ogg",ogm:"video/x-ogm+ogg",ogv:"video/ogg",ogx:"application/ogg",old:"application/x-trash",oleo:"application/x-oleo",opml:"text/x-opml+xml",ora:"image/openraster",orf:"image/x-olympus-orf",otc:"application/vndoasisopendocumentchart-template",otf:"application/x-font-otf",otg:"application/vndoasisopendocumentgraphics-template",oth:"application/vndoasisopendocumenttext-web",otp:"application/vndoasisopendocumentpresentation-template",ots:"application/vndoasisopendocumentspreadsheet-template",ott:"application/vndoasisopendocumenttext-template",owl:"application/rdf+xml",oxt:"application/vndopenofficeorgextension",p:"text/x-pascal",p10:"application/pkcs10",p12:"application/x-pkcs12",p7b:"application/x-pkcs7-certificates",p7s:"application/pkcs7-signature",pack:"application/x-java-pack200",pak:"application/x-pak",par2:"application/x-par2",pas:"text/x-pascal",patch:"text/x-patch",pbm:"image/x-portable-bitmap",pcd:"image/x-photo-cd",pcf:"application/x-cisco-vpn-settings",pcfgz:"application/x-font-pcf",pcfz:"application/x-font-pcf",pcl:"application/vndhp-pcl",pcx:"image/x-pcx",pdb:"chemical/x-pdb",pdc:"application/x-aportisdoc",pdf:"application/pdf",pdfbz2:"application/x-bzpdf",pdfgz:"application/x-gzpdf",pef:"image/x-pentax-pef",pem:"application/x-x509-ca-cert",perl:"application/x-perl",pfa:"application/x-font-type1",pfb:"application/x-font-type1",pfx:"application/x-pkcs12",pgm:"image/x-portable-graymap",pgn:"application/x-chess-pgn",pgp:"application/pgp-encrypted",php:"application/x-php",php3:"application/x-php",php4:"application/x-php",pict:"image/x-pict",pict1:"image/x-pict",pict2:"image/x-pict",pickle:"application/python-pickle",pk:"application/x-tex-pk",pkipath:"application/pkix-pkipath",pkr:"application/pgp-keys",pl:"application/x-perl",pla:"audio/x-iriver-pla",pln:"application/x-planperfect",pls:"audio/x-scpls",pm:"application/x-perl",png:"image/png",pnm:"image/x-portable-anymap",pntg:"image/x-macpaint",po:"text/x-gettext-translation",por:"application/x-spss-por",pot:"text/x-gettext-translation-template",ppm:"image/x-portable-pixmap",pps:"application/vndms-powerpoint",ppt:"application/vndms-powerpoint",pptm:"application/vndopenxmlformats-officedocumentpresentationmlpresentation",pptx:"application/vndopenxmlformats-officedocumentpresentationmlpresentation",ppz:"application/vndms-powerpoint",prc:"application/x-palm-database",ps:"application/postscript",psbz2:"application/x-bzpostscript",psgz:"application/x-gzpostscript",psd:"image/vndadobephotoshop",psf:"audio/x-psf",psfgz:"application/x-gz-font-linux-psf",psflib:"audio/x-psflib",psid:"audio/prssid",psw:"application/x-pocket-word",pw:"application/x-pw",py:"text/x-python",pyc:"application/x-python-bytecode",pyo:"application/x-python-bytecode",qif:"image/x-quicktime",qt:"video/quicktime",qtif:"image/x-quicktime",qtl:"application/x-quicktime-media-link",qtvr:"video/quicktime",ra:"audio/vndrn-realaudio",raf:"image/x-fuji-raf",ram:"application/ram",rar:"application/x-rar",ras:"image/x-cmu-raster",raw:"image/x-panasonic-raw",rax:"audio/vndrn-realaudio",rb:"application/x-ruby",rdf:"application/rdf+xml",rdfs:"application/rdf+xml",reg:"text/x-ms-regedit",rej:"application/x-reject",rgb:"image/x-rgb",rle:"image/rle",rm:"application/vndrn-realmedia",rmj:"application/vndrn-realmedia",rmm:"application/vndrn-realmedia",rms:"application/vndrn-realmedia",rmvb:"application/vndrn-realmedia",rmx:"application/vndrn-realmedia",roff:"text/troff",rp:"image/vndrn-realpix",rpm:"application/x-rpm",rss:"application/rss+xml",rt:"text/vndrn-realtext",rtf:"application/rtf",rtx:"text/richtext",rv:"video/vndrn-realvideo",rvx:"video/vndrn-realvideo",s3m:"audio/x-s3m",sam:"application/x-amipro",sami:"application/x-sami",sav:"application/x-spss-sav",scm:"text/x-scheme",sda:"application/vndstardivisiondraw",sdc:"application/vndstardivisioncalc",sdd:"application/vndstardivisionimpress",sdp:"application/sdp",sds:"application/vndstardivisionchart",sdw:"application/vndstardivisionwriter",sgf:"application/x-go-sgf",sgi:"image/x-sgi",sgl:"application/vndstardivisionwriter",sgm:"text/sgml",sgml:"text/sgml",sh:"application/x-shellscript",shar:"application/x-shar",shn:"application/x-shorten",siag:"application/x-siag",sid:"audio/prssid",sik:"application/x-trash",sis:"application/vndsymbianinstall",sisx:"x-epoc/x-sisx-app",sit:"application/x-stuffit",siv:"application/sieve",sk:"image/x-skencil",sk1:"image/x-skencil",skr:"application/pgp-keys",slk:"text/spreadsheet",smaf:"application/x-smaf",smc:"application/x-snes-rom",smd:"application/vndstardivisionmail",smf:"application/vndstardivisionmath",smi:"application/x-sami",smil:"application/smil",sml:"application/smil",sms:"application/x-sms-rom",snd:"audio/basic",so:"application/x-sharedlib",spc:"application/x-pkcs7-certificates",spd:"application/x-font-speedo",spec:"text/x-rpm-spec",spl:"application/x-shockwave-flash",spx:"audio/x-speex",sql:"text/x-sql",sr2:"image/x-sony-sr2",src:"application/x-wais-source",srf:"image/x-sony-srf",srt:"application/x-subrip",ssa:"text/x-ssa",stc:"application/vndsunxmlcalctemplate",std:"application/vndsunxmldrawtemplate",sti:"application/vndsunxmlimpresstemplate",stm:"audio/x-stm",stw:"application/vndsunxmlwritertemplate",sty:"text/x-tex",sub:"text/x-subviewer",sun:"image/x-sun-raster",sv4cpio:"application/x-sv4cpio",sv4crc:"application/x-sv4crc",svg:"image/svg+xml",svgz:"image/svg+xml-compressed",swf:"application/x-shockwave-flash",sxc:"application/vndsunxmlcalc",sxd:"application/vndsunxmldraw",sxg:"application/vndsunxmlwriterglobal",sxi:"application/vndsunxmlimpress",sxm:"application/vndsunxmlmath",sxw:"application/vndsunxmlwriter",sylk:"text/spreadsheet",t:"text/troff",t2t:"text/x-txt2tags",tar:"application/x-tar",tarbz:"application/x-bzip-compressed-tar",tarbz2:"application/x-bzip-compressed-tar",targz:"application/x-compressed-tar",tarlzma:"application/x-lzma-compressed-tar",tarlzo:"application/x-tzo",tarxz:"application/x-xz-compressed-tar",tarz:"application/x-tarz",tbz:"application/x-bzip-compressed-tar",tbz2:"application/x-bzip-compressed-tar",tcl:"text/x-tcl",tex:"text/x-tex",texi:"text/x-texinfo",texinfo:"text/x-texinfo",tga:"image/x-tga",tgz:"application/x-compressed-tar",theme:"application/x-theme",themepack:"application/x-windows-themepack",tif:"image/tiff",tiff:"image/tiff",tk:"text/x-tcl",tlz:"application/x-lzma-compressed-tar",tnef:"application/vndms-tnef",tnf:"application/vndms-tnef",toc:"application/x-cdrdao-toc",torrent:"application/x-bittorrent",tpic:"image/x-tga",tr:"text/troff",ts:"application/x-linguist",tsv:"text/tab-separated-values",tta:"audio/x-tta",ttc:"application/x-font-ttf",ttf:"application/x-font-ttf",ttx:"application/x-font-ttx",txt:"text/plain",txz:"application/x-xz-compressed-tar",tzo:"application/x-tzo",ufraw:"application/x-ufraw",ui:"application/x-designer",uil:"text/x-uil",ult:"audio/x-mod",uni:"audio/x-mod",uri:"text/x-uri",url:"text/x-uri",ustar:"application/x-ustar",vala:"text/x-vala",vapi:"text/x-vala",vcf:"text/directory",vcs:"text/calendar",vct:"text/directory",vda:"image/x-tga",vhd:"text/x-vhdl",vhdl:"text/x-vhdl",viv:"video/vivo",vivo:"video/vivo",vlc:"audio/x-mpegurl",vob:"video/mpeg",voc:"audio/x-voc",vor:"application/vndstardivisionwriter",vst:"image/x-tga",wav:"audio/x-wav",wax:"audio/x-ms-asx",wb1:"application/x-quattropro",wb2:"application/x-quattropro",wb3:"application/x-quattropro",wbmp:"image/vndwapwbmp",wcm:"application/vndms-works",wdb:"application/vndms-works",webm:"video/webm",wk1:"application/vndlotus-1-2-3",wk3:"application/vndlotus-1-2-3",wk4:"application/vndlotus-1-2-3",wks:"application/vndms-works",wma:"audio/x-ms-wma",wmf:"image/x-wmf",wml:"text/vndwapwml",wmls:"text/vndwapwmlscript",wmv:"video/x-ms-wmv",wmx:"audio/x-ms-asx",wp:"application/vndwordperfect",wp4:"application/vndwordperfect",wp5:"application/vndwordperfect",wp6:"application/vndwordperfect",wpd:"application/vndwordperfect",wpg:"application/x-wpg",wpl:"application/vndms-wpl",wpp:"application/vndwordperfect",wps:"application/vndms-works",wri:"application/x-mswrite",wrl:"model/vrml",wv:"audio/x-wavpack",wvc:"audio/x-wavpack-correction",wvp:"audio/x-wavpack",wvx:"audio/x-ms-asx",x3f:"image/x-sigma-x3f",xac:"application/x-gnucash",xbel:"application/x-xbel",xbl:"application/xml",xbm:"image/x-xbitmap",xcf:"image/x-xcf",xcfbz2:"image/x-compressed-xcf",xcfgz:"image/x-compressed-xcf",xhtml:"application/xhtml+xml",xi:"audio/x-xi",xla:"application/vndms-excel",xlc:"application/vndms-excel",xld:"application/vndms-excel",xlf:"application/x-xliff",xliff:"application/x-xliff",xll:"application/vndms-excel",xlm:"application/vndms-excel",xls:"application/vndms-excel",xlsm:"application/vndopenxmlformats-officedocumentspreadsheetmlsheet",xlsx:"application/vndopenxmlformats-officedocumentspreadsheetmlsheet",xlt:"application/vndms-excel",xlw:"application/vndms-excel",xm:"audio/x-xm",xmf:"audio/x-xmf",xmi:"text/x-xmi",xml:"application/xml",xpm:"image/x-xpixmap",xps:"application/vndms-xpsdocument",xsl:"application/xml",xslfo:"text/x-xslfo",xslt:"application/xml",xspf:"application/xspf+xml",xul:"application/vndmozillaxul+xml",xwd:"image/x-xwindowdump",xyz:"chemical/x-pdb",xz:"application/x-xz",w2p:"application/w2p",z:"application/x-compress",zabw:"application/x-abiword",zip:"application/zip"},x=n("aCH8"),w=n.n(x),j=n("m3rI"),O=n("dhSg"),k=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],E=["正确","错误"],S=["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII","XIII","XIV","XV","XVI","XVII","XVIII","XIX","XX"],P=function(e){var t;return(t={},Object(p.a)(t,-1,"重做中"),Object(p.a)(t,0,"未开启"),Object(p.a)(t,1,"未通关"),Object(p.a)(t,2,"按时通关"),t)[e]||"迟交通关"},C=function(e){var t,n,r,a=(t={},Object(p.a)(t,-1,{name:"重做中",class:"c-orange"}),Object(p.a)(t,0,{name:"未开启",class:"c-black"}),Object(p.a)(t,1,{name:"未通关",class:"c-red"}),Object(p.a)(t,2,{name:"按时通关",class:"c-green"}),Object(p.a)(t,3,{name:"迟交通关",class:"c-orange"}),t);return m.a.createElement("span",{className:null==a||null===(n=a[e.status])||void 0===n?void 0:n.class},null==a||null===(r=a[e.status])||void 0===r?void 0:r.name)},T=function(e){var t,n,r,a=(t={},Object(p.a)(t,-1,{name:"重做中",class:"c-orange",color:"#999999"}),Object(p.a)(t,0,{name:"未开启",class:"c-black",color:"#999999"}),Object(p.a)(t,1,{name:"未通关",class:"c-red",color:"#d4443d"}),Object(p.a)(t,2,{name:"按时通关",class:"c-green",color:"#57be40"}),Object(p.a)(t,3,{name:"迟交通关",class:"c-orange",color:"#f09143"}),t);return m.a.createElement("span",{style:{marginLeft:"10px",color:"#fff",background:null==a||null===(n=a[e.status])||void 0===n?void 0:n.color,borderRadius:"20px",width:"65px",height:"18px",justifyContent:"center",display:"inline-flex",lineHeight:"18px"}},null==a||null===(r=a[e.status])||void 0===r?void 0:r.name)},A=function(e){var t=e.status,n={0:{class:"tag-style bg-blue ml10",name:"待选中"},1:{class:"tag-style bg-blue ml10",name:"待确认"},2:{class:"tag-style bg-pink ml10",name:"已确认"}};try{return m.a.createElement("span",{className:n[t].class},n[t].name)}catch(t){console.log("utils.StatusGraduationProjectTags",e.status)}},I={1:"未发布",2:"考试中",3:"已截止",4:"已结束",99:"模拟考试中"},M={1:"未发布",2:"提交中",3:"已截止",4:"已结束"},L=function(e){var t={"模拟考试中":{class:"tag-style bg-light-pink ml10"},"已开启防作弊":{class:"tag-style-fzb ml10 iconfont icon-fangzuobi"},"公开":{class:"tag-style bg-blue ml10"},"已开启补交":{class:"tag-style bg-green ml10"},"未开启补交":{class:"tag-style bg-pink ml10soft"},"未发布":{class:"tag-style bgB8B8B8 ml10soft"},"未开始":{class:"tag-style bg-c5d6ff ml10soft"},"匿名作品":{class:"tag-style bg-cyan ml10"},"已选择":{class:"tag-style bg-grey-ede ml10"},"已结束":{class:"tag-style bg-grey-ede ml10soft"},"提交中":{class:"tag-style bg-blue ml10soft"},"进行中":{class:"tag-style bg-blue ml10soft"},"匿评中":{class:"tag-style bg-blue ml10"},"申诉中":{class:"tag-style bg-blue ml10"},"考试中":{class:"tag-style bg-light-blue ml10"},"补交中":{class:"tag-style bg-blue ml10soft"},"评阅中":{class:"tag-style bg-blue ml10"},"待选中":{class:"tag-style bg-blue ml10"},"交叉评阅中":{class:"tag-style bg-light-orange ml10"},"已开启交叉评阅":{class:"tag-style bg-lightblue-purple ml10"},"待确认":{class:"tag-style bg-lightblue-purple ml10"},"待处理":{class:"tag-style bg-lightblue-purple ml10"},"私有":{class:"tag-style bg-lightblue-purple ml10"},"未提交":{class:"tag-style bg-lightblue-purple ml10"},"已确认":{class:"tag-style bg-light-pink ml10"},"已发布":{class:"tag-style bg-light-blue ml10"},"已截止":{class:"tag-style bg-light-pink ml10soft"},"开发课程":{class:"tag-style bg-orange ml10"},"已开播":{class:"tag-style-border border-green c-green ml10"},"未开播":{class:"tag-style-border border-light-black ml10"},"按时通关":{class:"tag-style-border border-light-black ml10"},"迟交通关":{class:"tag-style-border border-light-black ml10"},"未通关":{class:"tag-style-border border-light-black ml10"},"未开启":{class:"tag-style-border border-light-black ml10"}};e.temporary&&(t=Object(l.a)(Object(l.a)({},t),{"未发布":{class:"tag-style bg-C6CED6 ml10soft"},"未开始":{class:"tag-style bg-C1E2FF ml10soft"},"进行中":{class:"tag-style bg-0152d9 ml10soft"},"已截止":{class:"tag-style bg-E53333 ml10soft"},"提交中":{class:"tag-style bg-0152d9 ml10soft"},"补交中":{class:"tag-style bg-44D7B6 ml10soft"}}));var n=[];e.is_random&&n.push(m.a.createElement("span",{className:"tag-style bg-blue ml10"},"随机"));try{e.status&&e.status.map((function(r,a){n.push(m.a.createElement("span",{style:(null==e?void 0:e.style)||[],key:a,className:t[r]&&t[r].class},r))}))}catch(t){console.log("utils.status.tag:",t,e.status)}return n},D=function(e){return 1===e?m.a.createElement("span",{style:{backgroundColor:"#B8B8B8"},className:"tag-style ml5"},"未开始"):2===e?m.a.createElement("span",{style:{backgroundColor:"#007AFF"},className:"tag-style ml5"},"考试中"):3===e?m.a.createElement("span",{style:{backgroundColor:"#FC2D6B"},className:"tag-style ml5"},"已结束"):void 0},R=function(e){var t,n,r={0:{name:"未提交",class:"c-black"},1:{name:"按时提交",class:"c-green"},2:{name:"延时提交",class:"c-red"}};return m.a.createElement("span",{className:null===(t=r[e.status])||void 0===t?void 0:t.class},null===(n=r[e.status])||void 0===n?void 0:n.name)},N=function(e){if(!e||e<0)return"0秒";console.log("time:",e);var t=e/86400,n=e/3600,r=e/60;return t>=1?parseInt(t.toString())+"天"+Math.floor(n%24)+"时"+Math.floor(r%60)+"分"+Math.floor(e%60)+"秒":n>1?parseInt(n.toString())+"时"+Math.floor(r%60)+"分"+Math.floor(e%60)+"秒":r>=1?parseInt(r.toString())+"分"+Math.floor(e%60)+"秒":Math.ceil(e)+"秒"},F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=0;if(e){n=e.length;for(var r=0;r=55296&&a<=56319&&(n--,r++)}}return n<=t},U=function(e,t,n){if(t){var r=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi.test(t),a=/[`~!@#$%^&()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&()——\-+={}|《》?:“”【】、;‘’,。、]/im.test(t);(!0===r||!0===a||t.length<2||t.length>=11)&&n("2-10位中英文、数字")}n()},z=function(e){if(!e)return"";for(var t=e.length-1,n="",r=0;r0){n=!1;break}return n}function J(){var e=navigator.userAgent;return["Chrome"].some((function(t){return e.indexOf(t)>-1}))}function Z(){var e=navigator.userAgent;return["Chrome","Firefox"].some((function(t){return e.indexOf(t)>-1}))}var $,ee=function(e){var t=document.createElement("a");t.target="_blank",document.body.appendChild(t),t.href=e;var n=document.createEvent("MouseEvents");n.initEvent("click",!1,!1),t.dispatchEvent(n),document.body.removeChild(t)},te=function(){var e=(new Date).getHours(),t=(new Date).getMinutes();return t>=30?(e++,t="00"):t="30",e+":"+t},ne=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"-",t=(new Date).getHours(),n=(new Date).getMinutes();return n>=30?(t++,n="00"):n="30",(new Date).toLocaleDateString().replace(/\//g,e)+" "+t+":"+n};!function(e){e.Number="Number",e.String="String",e.Boolean="Boolean",e.Object="Object",e.Array="Array",e.Function="Function"}($||($={}));var re=function(e,t){for(var n=[],r=e;r4.5?5:e>4&&e<=4.5?4.5:e>3.5&&e<=4?4:e>3&&e<=3.5?3.5:e>2.5&&e<=3?3:e>2&&e<=2.5?2.5:e>1.5&&e<=2?2:e>1&&e<=1.5?1.5:e>.5&&e<=1?1:e>0&&e<=.5?.5:0},oe=function(e){return null==e};var ie=function(e){if(e.link_url)return window.open(e.link_url);switch(e.container_type){case"ApplyUserAuthentication":if("Apply"===e.tiding_type){if(1===e.auth_type)return window.open("/admins/identity_authentications");if(2===e.auth_type)return window.open("/admins/professional_authentications")}return"System"===e.tiding_type?window.open("/account/certification"):void 0;case"CancelUserAuthentication":case"CancelUserProCertification":return window.open("/account/certification");case"ApplyAddDepartment":return"Apply"===e.tiding_type?window.open("/admins/department_applies"):"System"===e.tiding_type?window.open("/account/profile"):void 0;case"ApplyAddSchools":return"Apply"===e.tiding_type?window.open("/admins/unit_applies"):"System"===e.tiding_type?window.open("/account/profile"):void 0;case"ApplyAction":switch(e.parent_container_type){case"ApplyShixun":if("Apply"===e.tiding_type)return window.open("/admins/shixun_authorizations");if("System"===e.tiding_type)return window.open("/shixuns/".concat(e.identifier,"/challenges"));case"ApplySubject":if("Apply"===e.tiding_type)return window.open("/admins/subject_authorizations");if("System"===e.tiding_type)return window.open("/paths/".concat(e.parent_container_id));case"TrialAuthorization":if("Apply"===e.tiding_type)return window.open("/managements/trial_authorization");if("System"===e.tiding_type)return window.open("/account/profile")}return;case"JoinCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/teachers"));case"StudentJoinCourse":if("Apply"===e.tiding_type)return window.open("/classrooms/".concat(e.belong_container_id,"/teachers"));if("System"===e.tiding_type)return window.open("/classrooms/".concat(e.belong_container_id,"/students"));case"DealCourse":case"TeacherJoinCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/"));case"Course":if("Delete"===e.tiding_type)return;return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/"));case"ArchiveCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/"));case"Shixun":return window.open("/shixuns/".concat(e.identifier,"/challenges"));case"Subject":return window.open("/paths/".concat(e.container_id));case"JournalsForMessage":switch(e.parent_container_type){case"Principal":return"";case"HomeworkCommon":return"normal"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/question")):"group"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/question")):"practice"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=1")):"";case"GraduationTopic":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"StudentWorksScore":return window.open(e.link_url)}case"Memo":return window.open("/forums/".concat(e.parent_container_id));case"Message":return window.open("/forums/");case"Watcher":return window.open("/users/".concat(e.trigger_user.login,"/classrooms"));case"PraiseTread":case"Grade":return"";case"JoinProject":case"ReporterJoinProject":case"DealProject":case"ManagerJoinProject":return window.open(j.a.FORGE+e.project_url);case"Poll":switch(e.parent_container_type){case"CommitPoll":default:return window.open("\t/classrooms/".concat(e.belong_container_id,"/poll/").concat(e.container_id,"/detail"))}case"Exercise":switch(e.parent_container_type){case"CommitExercise":case"ExerciseScore":return window.open("\t/classrooms/".concat(e.belong_container_id,"/exercise/").concat(e.container_id,"/detail?tab=0"));default:return window.open("/classrooms/".concat(e.belong_container_id,"/exercise/").concat(e.container_id,"/detail?tab=0"))}case"StudentGraduationTopic":case"DealStudentTopicSelect":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"GraduationTask":case"GraduationWork":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.container_id));case"GraduationWorkScore":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.parent_container_id));case"HomeworkCommon":switch(e.parent_container_type){case"AnonymousCommentFail":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));case"HomeworkPublish":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));case"AnonymousAppeal":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));default:if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"))}case"StudentWork":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/review/").concat(e.container_id));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/review/").concat(e.container_id));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail"));case"StudentWorksScore":case"StudentWorksScoresAppeal":return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.trigger_user.id,"/review/").concat(e.parent_container_id));case"ChallengeWorkScore":return"";case"SendMessage":return window.open("".concat(j.a.API_SERVER,"/admins/mirror_repositories"));case"Journal":return window.open("/issues/".concat(e.parent_container_id));case"Issue":return window.open("/issues/".concat(e.container_id));case"PullRequest":return window.open(j.a.FORGE+e.project_url);case"Department":return window.open("/account/profile");case"Library":if("Apply"===e.tiding_type)return window.open("/admins/library_applies");if("System"===e.tiding_type)return window.open("/moop_cases/".concat(e.container_id));case"ProjectPackage":if("Destroyed"===e.tiding_type)return;return"Destroyed_end"===e.tiding_type?void 0:"Apply"===e.tiding_type?window.open("/admins/project_package_applies"):window.open("/crowdsourcing/".concat(e.container_id));case"Discuss":return"Hack"===e.parent_container_type&&e.extra?window.open("/myproblems/".concat(e.extra,"/comment")):"ai_reply"===e.extra&&e.task_identifier?window.open("/tasks/".concat(e.task_identifier,"?extra=extra")):window.open("/shixuns/".concat(e.identifier,"/shixun_discuss"));case"Video":return"Apply"===e.tiding_type?window.open("/admins/video_applies"):"System"===e.tiding_type?window.open("/users/".concat(null===(t=Object(b.x)())||void 0===t?void 0:t.login,"/videos")):"";var t;case"PublicCourseStart":return window.open("/classrooms/".concat(e.container_id,"/informs"));case"SubjectStartCourse":return window.open("/paths/".concat(e.container_id));case"ResubmitStudentWork":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));case"AdjustScore":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id));case"LiveLink":return window.open("/classrooms/".concat(e.belong_container_id,"/course_videos?open=live"));case"Hack":if(e.extra&&"HackDelete"!==e.parent_container_type)return window.open("/problems/".concat(e.extra,"/edit"));default:return}},ce=function(e){var t,n;return new Promise(function(){var r=Object(s.a)(d.a.mark((function r(a,o){var s;return d.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("no"===e.ip_limit&&!e.ip_bind){r.next=4;break}return r.next=3,Object(y.a)({ip_limit:null==e?void 0:e.ip_limit,ip_bind:null==e?void 0:e.ip_bind});case 3:t=r.sent;case 4:return r.next=6,Object(v.f)({id:e.exerciseId,ip:t});case 6:if(0===(s=r.sent).status?a(s):o(s),!e.errmsgHide){r.next=10;break}return r.abrupt("return",!0);case 10:if(-1!==s.status){r.next=15;break}return n=u.a.info({title:m.a.createElement(i.a,null,m.a.createElement(c.a,{flex:"1"},"提示"),m.a.createElement(c.a,null,m.a.createElement("span",{className:"iconfont icon-yiguanbi1 current c-grey-c",onClick:function(){return n.destroy()}}))),icon:null,className:"custom-modal-divider",content:m.a.createElement("div",{className:"font16 p20"},"您的IP不在考试允许的范围内!"),okText:"我知道了"}),r.abrupt("return",!1);case 15:if(-2!==s.status){r.next=18;break}return n=u.a.info({title:m.a.createElement(i.a,null,m.a.createElement(c.a,{flex:"1"},"提示"),m.a.createElement(c.a,null,m.a.createElement("span",{className:"iconfont icon-yiguanbi1 current c-grey-c",onClick:function(){return n.destroy()}}))),icon:null,className:"custom-modal-divider",content:m.a.createElement("div",{className:"font16 p20"},"您已绑定当前考试IP地址:",m.a.createElement("span",{className:"c-red"},s.ip),"请使用该IP地址进入考试。"),okText:"我知道了"}),r.abrupt("return",!1);case 18:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}())},ue=function(){return location.pathname.indexOf("/classrooms/4RW9CYHY")>-1||location.pathname.indexOf("/classrooms/qb4ft587")>-1||location.pathname.indexOf("/classrooms/c5q9bsp2")>-1},se=function(){var e=Object(s.a)(d.a.mark((function e(t){var n;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(location.pathname.indexOf("/classrooms/4RW9CYHY")>-1||location.pathname.indexOf("/classrooms/qb4ft587")>-1||location.pathname.indexOf("/classrooms/c5q9bsp2")>-1)||X()){e.next=3;break}return u.a.info({content:"请使用电脑参加考试!"}),e.abrupt("return");case 3:if("no"===t.ip_limit&&!t.ip_bind){e.next=9;break}return e.next=6,ce(t);case 6:if(J()){e.next=9;break}return u.a.info({icon:null,okText:"确定",width:500,content:m.a.createElement("div",{className:"font16"},"本次考试已开启防作弊设置,仅支持",m.a.createElement("span",{className:"c-red"},"谷歌"),"。",m.a.createElement("br",null),"请使用",m.a.createElement("span",{className:"c-red"},"谷歌"),"浏览器开始考试。")}),e.abrupt("return");case 9:if(!(t.open_camera||t.screen_open||"no"!==t.ip_limit||t.ip_bind||t.identity_verify)){e.next=17;break}if(Z()){e.next=14;break}return u.a.info({icon:null,okText:"确定",width:500,content:m.a.createElement("div",{className:"font16"},"本次考试已开启防作弊设置,仅支持",m.a.createElement("span",{className:"c-red"},"谷歌"),"、",m.a.createElement("span",{className:"c-red"},"火狐"),"浏览器。",m.a.createElement("br",null),"请使用",m.a.createElement("span",{className:"c-red"},"谷歌"),"、",m.a.createElement("span",{className:"c-red"},"火狐"),"浏览器开始考试。")}),e.abrupt("return",!1);case 14:n=u.a.info({title:m.a.createElement(i.a,null,m.a.createElement(c.a,{flex:"1"},"考试说明"),m.a.createElement(c.a,null,m.a.createElement("span",{className:"iconfont icon-yiguanbi1 current c-grey-c",onClick:function(){return n.destroy()}}))),width:700,icon:null,className:"custom-modal-divider",content:m.a.createElement("div",{className:"font16 p20"},t.identity_verify&&m.a.createElement(i.a,{align:"middle",justify:"start",className:"mt20"},m.a.createElement(c.a,{flex:"45px"},m.a.createElement("span",{className:"iconfont icon-kaiqishexiangtou c-blue mr20 font24"})),m.a.createElement(c.a,{flex:"1"},"进入考试前,请允许摄像头授权,授权后需采集照片认证,认证通过并开启手机录制才可以进入考试。",!_e()&&m.a.createElement("a",{target:"_blank",href:"https://www.educoder.net/forums/4459"},"无法调用摄像头?"))),t.open_camera&&m.a.createElement(i.a,{align:"middle",justify:"start",className:"mt20"},m.a.createElement(c.a,null,m.a.createElement("span",{className:"iconfont icon-kaiqishexiangtou c-blue mr20 font24"})),m.a.createElement(c.a,null,"进入考试后,请允许摄像头授权,授权后打开摄像头方可作答!",!_e()&&m.a.createElement("a",{target:"_blank",href:"https://www.educoder.net/forums/4459"},"无法调用摄像头?"))),t.screen_open&&m.a.createElement(i.a,{justify:"start",className:"mt20"},m.a.createElement(c.a,{flex:"24px",className:"mr20"},m.a.createElement("span",{className:"iconfont icon-kaiqifangqieping c-blue font24"})),m.a.createElement(c.a,{flex:"1"},"当前考试已开启防切屏,切屏超过",t.screen_num,"次将强制交卷。(退出全屏将判定为切屏一次,考试过程中请勿退出全屏)",!_e()&&m.a.createElement("a",{target:"_blank",href:"https://www.educoder.net/forums/4460"},"浏览器无法自动全屏?"))),(""!==t.inner_ip||""!==t.public_ip)&&"no"!==t.ip_limit&&m.a.createElement(i.a,{justify:"start",className:"mt20"},m.a.createElement(c.a,{flex:"24px",className:"mr20"},m.a.createElement("span",{className:"iconfont icon-IP c-blue font24"})),m.a.createElement(c.a,{flex:"1"},"当前考试已开启IP范围限定。IP地址不在范围内不可参加考试。",m.a.createElement("br",null),!_e()&&m.a.createElement(m.a.Fragment,null,m.a.createElement("span",{className:"c-red"},"(只允许在Chrome谷歌浏览器作答,并且需要安装WebRTC Leak Prevent插件)"),m.a.createElement("br",null),m.a.createElement("a",{href:"https://www.educoder.net/forums/4478",target:"_blank"},"如何安装WebRTC Leak Prevent插件?")))),t.ip_bind&&m.a.createElement(i.a,{justify:"start",className:"mt20"},m.a.createElement(c.a,{flex:"24px",className:"mr20"},m.a.createElement("span",{className:"iconfont icon-IPbangding c-blue font24"})),m.a.createElement(c.a,{flex:"1"},"当前考试已启用考试期间IP绑定。当您开始考试后,将自动绑定IP,考试期间只允许使用唯一的IP进入考试。如遇特殊情况,可向老师申请解除IP绑定。",m.a.createElement("br",null),!_e()&&m.a.createElement(m.a.Fragment,null,m.a.createElement("span",{className:"c-red"},"(只允许在Chrome谷歌浏览器作答,并且需要安装WebRTC Leak Prevent插件)"),m.a.createElement("br",null),m.a.createElement("a",{href:"https://www.educoder.net/forums/4478",target:"_blank"},"如何安装WebRTC Leak Prevent插件?")))),m.a.createElement("p",{className:"ml40 mt40"},m.a.createElement(o.a,{onChange:function(e){return n.update({okButtonProps:{disabled:!e.target.checked}})}},"我已阅读"))),onOk:function(){var e;if(Object(g.d)(document.body),t.open_phone_video_recording)t.history.push("/classrooms/".concat(t.coursesId,"/exercise/").concat(t.exerciseId,"/users/").concat(null===(e=Object(b.x)())||void 0===e?void 0:e.login,"/check"));else if(t.identity_verify&&2===t.current_status){var n;t.history.push("/classrooms/".concat(t.coursesId,"/exercise/").concat(t.exerciseId,"/users/").concat(null===(n=Object(b.x)())||void 0===n?void 0:n.login,"/check"))}else{var r;t.history.push("/classrooms/".concat(t.coursesId,"/exercise/").concat(t.exerciseId,"/users/").concat(null===(r=Object(b.x)())||void 0===r?void 0:r.login))}},okText:"进入考试",okButtonProps:{disabled:!0}}),e.next=18;break;case 17:t.identity_verify&&2===t.current_status?t.history.push("/classrooms/".concat(t.coursesId,"/exercise/").concat(t.exerciseId,"/users/").concat(t.login,"/check")):t.history.push("/classrooms/".concat(t.coursesId,"/exercise/").concat(t.exerciseId,"/users/").concat(t.login));case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),le=function(e){var t={};return e.replace(/(\w+)=([^\#&]*)/gi,(function(e,n,r){t[n]=decodeURI(r)})),t},pe=function(e,t,n){var r=function(e,t){for(var n,r,a=window.atob(e),o=a.length,i=new Uint8Array(o),c=0;c0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.createElement("textarea");n.value=e,document.body.appendChild(n),n.select(),document.execCommand("Copy"),t||a.b.success("复制成功"),document.body.removeChild(n)},ye=function(e){e||(e=window.location.search);var t=e.substr(1),n={};return t.split("&").forEach((function(e){var t=e.split("=");n[t[0]]=decodeURIComponent(t[1])})),n},ve=function(e,t){if(!t)return null;var n=[];return t.forEach((function(t,r){var a=Math.floor(r/e);n[a]||(n[a]=[]),n[a].push(t)})),n},ge=function(e){_e()?document.title="考试系统":document.title=e||"实践教学平台"},_e=function(){var e,t;return null===(e=window)||void 0===e||null===(t=e.localStorage)||void 0===t?void 0:t.isClientExam},xe={setItem:function(e,t,n){var r=e,a=localStorage.getItem(r),o=null!==a&&"[object Object]"!==a?JSON.parse(a):{};o[n]=t,localStorage.setItem(r,JSON.stringify(o))},getItem:function(e,t){var n=e,r=localStorage.getItem(n);return(null!==r&&"[object Object]"!==r?JSON.parse(r):{})[t]}},we=function(e){return null!=e&&e.startsWith("http")?e:j.a.IMG_SERVER+e},je=function(e){for(var t=Oe(),n=e.split("."),r=t.split("."),a=Math.max(n.length,r.length);n.lengthc)return 1;if(i-1};function Ee(e,t){var n,r,a=e.length;t=t||1;for(var o;0!==a;)r=Math.floor((o=void 0,((o=1e3*Math.sin(t++))-Math.floor(o))*a)),n=e[a-=1],e[a]=e[r],e[r]=n;return e}},"1vuE": +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.array.unscopables.flat.js ***! + \*******************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/add-to-unscopables */"eNh0")("flat")},2: +/*!********************************!*\ + !*** ./util.inspect (ignored) ***! + \********************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){},"22qN": +/*!*********************************!*\ + !*** ./src/styles/markdown.css ***! + \*********************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},"25BE": +/*!********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***! + \********************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,"a",(function(){return r}))},"284h": +/*!***********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/interopRequireWildcard.js ***! + \***********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./typeof.js */"cDf5").default;function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in e)if("default"!==c&&Object.prototype.hasOwnProperty.call(e,c)){var u=i?Object.getOwnPropertyDescriptor(e,c):null;u&&(u.get||u.set)?Object.defineProperty(o,c,u):o[c]=e[c]}return o.default=e,n&&n.set(e,o),o},e.exports.__esModule=!0,e.exports.default=e.exports},"29mP": +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/get-built-in.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/path */"nFn1"),a=n(/*! ../internals/global */"ukPv"),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(a[e]):r[e]&&r[e][t]||a[e]&&a[e][t]}},"2FZw": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/string-pad.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/to-length */"oa35"),a=n(/*! ../internals/string-repeat */"+rjg"),o=n(/*! ../internals/require-object-coercible */"FCfD"),i=Math.ceil,c=function(e){return function(t,n,c){var u,s,l=String(o(t)),p=l.length,f=void 0===c?" ":String(c),d=r(n);return d<=p||""==f?l:(u=d-p,(s=a.call(f,i(u/f.length))).length>u&&(s=s.slice(0,u)),e?l+s:s+l)}};e.exports={start:c(!1),end:c(!0)}},"2GS6": +/*!**********************************************************!*\ + !*** ./node_modules/rc-util/es/createChainedFunction.js ***! + \**********************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(){var e=[].slice.call(arguments,0);return 1===e.length?e[0]:function(){for(var t=0;t1?arguments[1]:void 0,3),a=new(s(t,o("Map"))),f=c(a.set);return p(n,(function(e,n){f.call(a,e,r(n,e,t))}),void 0,!0,!0),a}})},"2j6C": +/*!***************************************************!*\ + !*** ./node_modules/minimalistic-assert/index.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},"2kyd": +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/well-known-symbol.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv"),a=n(/*! ../internals/shared */"xxaU"),o=n(/*! ../internals/has */"jtLI"),i=n(/*! ../internals/uid */"evbn"),c=n(/*! ../internals/native-symbol */"Fs9M"),u=n(/*! ../internals/use-symbol-as-uid */"wgKq"),s=a("wks"),l=r.Symbol,p=u?l:l&&l.withoutSetter||i;e.exports=function(e){return o(s,e)||(c&&o(l,e)?s[e]=l[e]:s[e]=p("Symbol."+e)),s[e]}},"2mql": +/*!**********************************************************************************!*\ + !*** ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! react-is */"TOwV"),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function u(e){return r.isMemo(e)?i:c[e.$$typeof]||a}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=i;var s=Object.defineProperty,l=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var a=d(n);a&&a!==h&&e(t,a,r)}var i=l(n);p&&(i=i.concat(p(n)));for(var c=u(t),m=u(n),b=0;b=0;r--){var a=e[r];"."===a?e.splice(r,1):".."===a?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!a;o--){var i=o>=0?arguments[o]:e.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(t=i+"/"+t,a="/"===i.charAt(0))}return(a?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!a).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),i="/"===a(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&i&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var a=r(e.split("/")),o=r(n.split("/")),i=Math.min(a.length,o.length),c=i,u=0;u=1;--o)if(47===(t=e.charCodeAt(o))){if(!a){r=o;break}}else a=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,a=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!a){n=t+1;break}}else-1===r&&(a=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,a=!0,o=0,i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(47!==c)-1===r&&(a=!1,r=i+1),46===c?-1===t?t=i:1!==o&&(o=1):-1!==t&&(o=-1);else if(!a){n=i+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var a="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(/*! ./../node-libs-browser/mock/process.js */"Q2Ig"))},"3Mug": +/*!***************************************************!*\ + !*** ./node_modules/rc-util/lib/Dom/canUseDom.js ***! + \***************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},"3UWB": +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.math.isubh.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Math",stat:!0},{isubh:function(e,t,n,r){var a=e>>>0,o=n>>>0;return(t>>>0)-(r>>>0)-((~a&o|~(a^o)&a-o>>>0)>>>31)|0}})},"3Us1": +/*!**********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.float32-array.js ***! + \**********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/typed-array-constructor */"Mi8B")("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},"3blH": +/*!******************************************!*\ + !*** ./src/models/competitions/index.ts ***! + \******************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/competitions */"hJwl"),c={namespace:"competitions",state:{name:"",loading:!0,listParams:{page:1,per_page:20,category:""},competitions:[],count:""},effects:{getList:o.a.mark((function e(t,n){var a,c,u,s,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,s=a,e.next=5,c(i.v,a);case 5:return l=e.sent,e.next=8,u({type:"save",payload:Object(r.a)({listParams:s},l)});case 8:return e.abrupt("return",l);case 9:case"end":return e.stop()}}),e)})),addApplytojoincourse: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,t.callback,a=n.call,n.put,e.next=4,a(i.r,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),competitionTeams: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,t.callback,a=n.call,n.put,e.next=4,a(i.s,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),getStaff: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,t.callback,a=n.call,n.put,e.next=4,a(i.A,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),getHeader: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,t.callback,a=n.call,n.put,e.next=4,a(i.x,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),getItem: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,t.callback,a=n.call,n.put,e.next=4,a(i.y,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),updateMdContent: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,t.callback,a=n.call,n.put,e.next=4,a(i.H,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),getTeamList: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,t.callback,a=n.call,n.put,e.next=4,a(i.E,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),getTeamDetail: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,t.callback,a=n.call,n.put,e.next=4,a(i.D,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),UpTeam: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,t.callback,a=n.call,n.put,e.next=4,a(i.q,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),DeleteTeam: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,t.callback,a=n.call,n.put,e.next=4,a(i.f,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),ExitTeam: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,t.callback,a=n.call,n.put,e.next=4,a(i.h,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),AddTeam: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,t.callback,a=n.call,n.put,e.next=4,a(i.b,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),JoinTeam: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,t.callback,a=n.call,n.put,e.next=4,a(i.i,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),getTeacher: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,t.callback,a=n.call,n.put,e.next=4,a(i.C,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),getStudents: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,t.callback,a=n.call,n.put,e.next=4,a(i.B,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),SubmitTeam: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,t.callback,a=n.call,n.put,e.next=4,a(i.o,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),Reward: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,t.callback,a=n.call,n.put,e.next=4,a(i.n,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),ChartRules: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,t.callback,a=n.call,n.put,e.next=4,a(i.d,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),Charts: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,t.callback,a=n.call,n.put,e.next=4,a(i.e,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),TabResults: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,t.callback,a=n.call,n.put,e.next=4,a(i.p,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),Results: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,t.callback,a=n.call,n.put,e.next=4,a(i.m,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),Prize: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,t.callback,a=n.call,n.put,e.next=4,a(i.k,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),Accounts: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,t.callback,a=n.call,n.put,e.next=4,a(i.a,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),getVerification: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,t.callback,a=n.call,n.put,e.next=4,a(i.F,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),PhoneBind: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,t.callback,a=n.call,n.put,e.next=4,a(i.j,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),EmailBind: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,t.callback,a=n.call,n.put,e.next=4,a(i.g,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),Authentication: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,t.callback,a=n.call,n.put,e.next=4,a(i.c,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),Professional: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,t.callback,a=n.call,n.put,e.next=4,a(i.l,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),setleader: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,t.callback,a=n.call,n.put,e.next=4,a(i.G,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),getShixun: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,t.callback,a=n.call,n.put,e.next=4,a(i.z,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),getCourse: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,t.callback,a=n.call,n.put,e.next=4,a(i.w,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return 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=c},"3dhw": +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.regexp.to-string.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/redefine */"NMFW"),a=n(/*! ../internals/an-object */"f1E4"),o=n(/*! ../internals/fails */"MVys"),i=n(/*! ../internals/regexp-flags */"k/J9"),c=RegExp.prototype,u=c.toString,s=o((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),l="toString"!=u.name;(s||l)&&r(RegExp.prototype,"toString",(function(){var e=a(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in c)?i.call(e):n)}),{unsafe:!0})},"3tO9": +/*!**************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/objectSpread2.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./defineProperty.js */"lSNA");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t1?arguments[1]:void 0)}})},"4IlW": +/*!********************************************!*\ + !*** ./node_modules/rc-util/es/KeyCode.js ***! + \********************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=r.F1&&t<=r.F12)return!1;switch(t){case r.ALT:case r.CAPS_LOCK:case r.CONTEXT_MENU:case r.CTRL:case r.DOWN:case r.END:case r.ESC:case r.HOME:case r.INSERT:case r.LEFT:case r.MAC_FF_META:case r.META:case r.NUMLOCK:case r.NUM_CENTER:case r.PAGE_DOWN:case r.PAGE_UP:case r.PAUSE:case r.PRINT_SCREEN:case r.RIGHT:case r.SHIFT:case r.UP:case r.WIN_KEY:case r.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=r.ZERO&&e<=r.NINE)return!0;if(e>=r.NUM_ZERO&&e<=r.NUM_MULTIPLY)return!0;if(e>=r.A&&e<=r.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case r.SPACE:case r.QUESTION_MARK:case r.NUM_PLUS:case r.NUM_MINUS:case r.NUM_PERIOD:case r.NUM_DIVISION:case r.SEMICOLON:case r.DASH:case r.EQUALS:case r.COMMA:case r.PERIOD:case r.SLASH:case r.APOSTROPHE:case r.SINGLE_QUOTE:case r.OPEN_SQUARE_BRACKET:case r.BACKSLASH:case r.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.a=r},"4MGa": +/*!********************************************!*\ + !*** ./src/styles/iconeditor/iconfont.css ***! + \********************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},"4Mzw": +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.json.to-string-tag.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv");n(/*! ../internals/set-to-string-tag */"kiNa")(r.JSON,"JSON",!0)},"4rKd": +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.date.to-primitive.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/create-non-enumerable-property */"lz10"),a=n(/*! ../internals/date-to-primitive */"aKVN"),o=n(/*! ../internals/well-known-symbol */"2kyd")("toPrimitive"),i=Date.prototype;o in i||r(i,o,a)},"58Ye": +/*!******************************!*\ + !*** ./src/styles/base.less ***! + \******************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},"5Blz": +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.array.reduce-right.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/array-reduce */"9RRT").right,o=n(/*! ../internals/array-method-is-strict */"R8iy"),i=n(/*! ../internals/array-method-uses-to-length */"kGMc"),c=o("reduceRight"),u=i("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!u},{reduceRight:function(e){return a(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"5FVT": +/*!*************************************!*\ + !*** ./src/models/forums/detail.ts ***! + \*************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/forums */"h+Ho"),c={namespace:"forumsDetail",state:{forumsDetailData:{}},effects:{getForumsDetailData: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.d,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{forumsDetailData:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),setForumsDetailData: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:{forumsDetailData:Object(r.a)({},a)}});case 4:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return 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=c},"5JgN": +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/web.url-search-params.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";n(/*! ../modules/es.array.iterator */"FbcW");var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/get-built-in */"29mP"),o=n(/*! ../internals/native-url */"lgSf"),i=n(/*! ../internals/redefine */"NMFW"),c=n(/*! ../internals/redefine-all */"ujhg"),u=n(/*! ../internals/set-to-string-tag */"kiNa"),s=n(/*! ../internals/create-iterator-constructor */"uoF6"),l=n(/*! ../internals/internal-state */"1aI8"),p=n(/*! ../internals/an-instance */"igoe"),f=n(/*! ../internals/has */"jtLI"),d=n(/*! ../internals/function-bind-context */"7BAe"),h=n(/*! ../internals/classof */"Ei+o"),m=n(/*! ../internals/an-object */"f1E4"),b=n(/*! ../internals/is-object */"tSXo"),y=n(/*! ../internals/object-create */"u+7+"),v=n(/*! ../internals/create-property-descriptor */"HhvW"),g=n(/*! ../internals/get-iterator */"qcmB"),_=n(/*! ../internals/get-iterator-method */"9SZg"),x=n(/*! ../internals/well-known-symbol */"2kyd"),w=a("fetch"),j=a("Headers"),O=x("iterator"),k=l.set,E=l.getterFor("URLSearchParams"),S=l.getterFor("URLSearchParamsIterator"),P=/\+/g,C=Array(4),T=function(e){return C[e-1]||(C[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},A=function(e){try{return decodeURIComponent(e)}catch(t){return e}},I=function(e){var t=e.replace(P," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(T(n--),A);return t}},M=/[!'()~]|%20/g,L={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},D=function(e){return L[e]},R=function(e){return encodeURIComponent(e).replace(M,D)},N=function(e,t){if(t)for(var n,r,a=t.split("&"),o=0;o0?arguments[0]:void 0,l=this,d=[];if(k(l,{type:"URLSearchParams",entries:d,updateURL:function(){},updateSearchParams:F}),void 0!==s)if(b(s))if("function"==typeof(e=_(s)))for(n=(t=e.call(s)).next;!(r=n.call(t)).done;){if((i=(o=(a=g(m(r.value))).next).call(a)).done||(c=o.call(a)).done||!o.call(a).done)throw TypeError("Expected sequence with length 2");d.push({key:i.value+"",value:c.value+""})}else for(u in s)f(s,u)&&d.push({key:u,value:s[u]+""});else N(d,"string"==typeof s?"?"===s.charAt(0)?s.slice(1):s:s+"")},q=V.prototype;c(q,{append:function(e,t){U(arguments.length,2);var n=E(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){U(arguments.length,1);for(var t=E(this),n=t.entries,r=e+"",a=0;ae.key){a.splice(t,0,e);break}t===n&&a.push(e)}r.updateURL()},forEach:function(e){for(var t,n=E(this).entries,r=d(e,arguments.length>1?arguments[1]:void 0,3),a=0;a1&&(b(t=arguments[1])&&(n=t.body,"URLSearchParams"===h(n)&&((r=t.headers?new j(t.headers):new j).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=y(t,{body:v(0,String(n)),headers:v(0,r)}))),a.push(t)),w.apply(this,a)}}),e.exports={URLSearchParams:V,getState:E}},"5QGz": +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.math.atanh.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=Math.atanh,o=Math.log;r({target:"Math",stat:!0,forced:!(a&&1/a(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:o((1+e)/(1-e))/2}})},"5WQS": +/*!*********************************!*\ + !*** ./src/service/messages.ts ***! + \*********************************/ +/*! exports provided: getTidings, unreadMessageInfo, getPrivateMessages, postPrivateMessages, getRecentContacts, getUsersForPrivateMessages, getPrivateMessageDetails, deletePrivateMessage */ +/*! exports used: deletePrivateMessage, getPrivateMessageDetails, getPrivateMessages, getRecentContacts, getTidings, getUsersForPrivateMessages, postPrivateMessages, unreadMessageInfo */function(e,t,n){"use strict";n.d(t,"e",(function(){return u})),n.d(t,"h",(function(){return l})),n.d(t,"c",(function(){return f})),n.d(t,"g",(function(){return h})),n.d(t,"d",(function(){return b})),n.d(t,"f",(function(){return v})),n.d(t,"b",(function(){return _})),n.d(t,"a",(function(){return w}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/utils/fetch */"ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/tidings.json",{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.userId,"/unread_message_info.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.userId,"/private_messages.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.userId,"/private_messages.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.id,"/recent_contacts.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users_for_private_messages.json",{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.userId,"/private_message_details.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return j.apply(this,arguments)}function j(){return(j=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.userId,"/private_messages/").concat(t.id,".json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},"5mCs": +/*!****************************************!*\ + !*** ./src/models/classrooms/index.ts ***! + \****************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/service/classrooms */"oUNq"),u={namespace:"classroomList",state:{name:"",loading:!0,detailTopBanner:{},detailLeftMenus:{},detailLeftMenusNames:{},detailShixunsList:{},detailGraduationTopicsList:{},detailGraduationTaskList:{},detailExerciseList:{},detailPollsList:{},detailCommonHomeworksList:{},detailAttendancesList:{},detailAttendancesDetail:{},detailAnnouncementList:{},detailAttachmentList:{},detailCourseware:{},courseMine:{},detailVideoList:{},detailLiveVideoList:{},detailBoardList:{},courseGroups:{},allCourseGroups:{},detailCourseGroupsList:{},detailCoursStudentsList:{},detailCourseStatisticsList:{},detailAttendancesStatistic:{},detailCourseWorkscore:{},detailCourseActscore:{},coursesLists:{},shixunLists:{},schoolList:{},taskList:[],searchMemberList:{},actionTabs:{key:""},listParams:{order:"all",page:1,limit:16,search:""},shareStatus:!1},effects:{getClassroom:i.a.mark((function e(t,n){var r,o,u,s,l;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,s=r,e.next=5,o(c.O,r);case 5:return l=e.sent,e.next=8,u({type:"save",payload:Object(a.a)({listParams:s},l)});case 8:return e.abrupt("return",l);case 9:case"end":return e.stop()}}),e)})),getClassroomTopBanner:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.S,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailTopBanner:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getClassroomLeftMenus:i.a.mark((function e(t,n){var o,u,s,l,p,f;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.payload,u=n.call,s=n.put,e.next=4,u(c.N,o);case 4:return l=e.sent,p=[].concat(Object(r.a)((null==l?void 0:l.course_modules)||[]),Object(r.a)((null==l?void 0:l.hidden_modules)||[])),f={},null==p||p.forEach((function(e){f[e.type]=e.name})),e.next=10,s({type:"save",payload:{detailLeftMenus:Object(a.a)({},l),detailLeftMenusNames:f}});case 10:return e.abrupt("return",l);case 11:case"end":return e.stop()}}),e)})),getClassroomShixunsList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.Q,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailShixunsList:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getClassroomTeacherShixunsList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.R,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailShixunsList:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getClassroomCommonList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.Q,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailCommonHomeworksList:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getClassroomTeacherCommonList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.R,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailCommonHomeworksList:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getClassroomGraduationTopicsList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.M,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailGraduationTopicsList:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getClassroomGraduationTaskList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.L,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailGraduationTaskList:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getClassroomExercisesList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.K,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailExerciseList:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getClassroomPollsList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.P,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailPollsList:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getCourseGroups:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.W,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{courseGroups:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getAllCourseGroup:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.A,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{allCourseGroups:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getClassroomCommonHomeworksList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.J,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailCommonHomeworksList:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getClassroomAttendancesList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.H,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailAttendancesList:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getClassroomAttendancesStatistic:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.I,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailAttendancesStatistic:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getAttendanceDetail:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.E,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailAttendancesDetail:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getAnnouncementList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.C,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailAnnouncementList:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getAttachmentList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.D,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailAttachmentList:Object(a.a)({},s.data)}});case 7:case"end":return e.stop()}}),e)})),getCourseware:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.eb,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailCourseware:Object(a.a)({},s.data)}});case 7:case"end":return e.stop()}}),e)})),getVideoList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,u({type:"save",payload:{detailVideoList:{}}});case 4:return e.next=6,o(c.ob,r);case 6:return s=e.sent,e.next=9,u({type:"save",payload:{detailVideoList:Object(a.a)({},s)}});case 9:case"end":return e.stop()}}),e)})),getLiveVideoList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,u=n.put,e.next=4,o(c.gb,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailLiveVideoList:Object(a.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getCoursesMine:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.db,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{courseMine:Object(a.a)({},s)}});case 7:return e.abrupt("return",s.data);case 8:case"end":return e.stop()}}),e)})),getBoardList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.G,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailBoardList:Object(a.a)({},s.data)}});case 7:return e.abrupt("return",s.data);case 8:case"end":return e.stop()}}),e)})),getCourseGroupsList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.X,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailCourseGroupsList:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getCourseStudentsList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.ab,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailCoursStudentsList:Object(a.a)({},s)}});case 7:return e.abrupt("return",s.data);case 8:case"end":return e.stop()}}),e)})),getCourseStatistics:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.Z,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailCourseStatisticsList:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getCourseActscore:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.T,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailCourseActscore:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getCourseWorkscore:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.bb,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{detailCourseWorkscore:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getShixunLists:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.nb,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{shixunLists:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getExperimentLists:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.fb,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{shixunLists:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getShixunAiRecommendLists:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.mb,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{shixunAiRecommendLists:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getCoursesLists:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.cb,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{coursesLists:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),createCoursesHomework:i.a.mark((function e(t,n){var r,a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,a=n.call,n.put,e.next=4,a(c.f,r);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})),createShixunHomework:i.a.mark((function e(t,n){var r,a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,a=n.call,n.put,e.next=4,a(c.i,r);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})),createExperiment:i.a.mark((function e(t,n){var r,a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,a=n.call,n.put,e.next=4,a(c.g,r);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})),getSchoolList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.kb,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{schoolList:Object(a.a)({},s.school_names)}});case 7:return e.abrupt("return",s.school_names);case 8:case"end":return e.stop()}}),e)})),searchSchoolTeacherList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.wb,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{searchMemberList:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getAllTaskList:i.a.mark((function e(t,n){var a,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.B,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{taskList:Object(r.a)(s.tasks)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),updateTaskPosition:i.a.mark((function e(t,n){var r,a,o,u;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,a=n.call,o=n.put,e.next=4,a(c.Hb,r);case 4:return u=e.sent,e.next=7,o({type:"save",payload:{actionTabs:{key:""}}});case 7:return e.abrupt("return",u);case 8:case"end":return e.stop()}}),e)})),setActionTabs:i.a.mark((function e(t,n){var r,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,n.call,o=n.put,e.next=4,o({type:"save",payload:{actionTabs:Object(a.a)({},r)}});case 4:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return Object(a.a)(Object(a.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=u},"5wUe": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/slicedToArray.js ***! + \***************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./arrayWithHoles */"Q9SF"),a=n(/*! ./iterableToArrayLimit */"MIOZ"),o=n(/*! ./unsupportedIterableToArray */"mGKP"),i=n(/*! ./nonIterableRest */"h0XC");e.exports=function(e,t){return r(e)||a(e,t)||o(e,t)||i()}},"5yw/": +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/iterators.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports={}},"66pj": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.math.cbrt.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/math-sign */"u93E"),o=Math.abs,i=Math.pow;r({target:"Math",stat:!0},{cbrt:function(e){return a(e=+e)*i(o(e),1/3)}})},"6CvP": +/*!*****************************!*\ + !*** ./src/service/home.ts ***! + \*****************************/ +/*! exports provided: HomeIndex, applyToJoinCourse, projectApplies, getHomeNotice, UploadNotice */ +/*! exports used: HomeIndex, UploadNotice, applyToJoinCourse, getHomeNotice, projectApplies */function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return p})),n.d(t,"d",(function(){return d})),n.d(t,"b",(function(){return m}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/utils/fetch */"ErOA");function c(){return u.apply(this,arguments)}function u(){return(u=Object(r.a)(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(i.a)("/api/home/index.json",{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function s(e){return l.apply(this,arguments)}function l(){return(l=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/courses/apply_to_join_course.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return f.apply(this,arguments)}function f(){return(f=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/project_applies.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){return h.apply(this,arguments)}function h(){return(h=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/users/home_notice.json",{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e){return b.apply(this,arguments)}function b(){return(b=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/users/view_notice.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},"6FCX": +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.weak-map.of.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"WeakMap",stat:!0},{of:n(/*! ../internals/collection-of */"qA1w")})},"6YAi": +/*!***********************************************!*\ + !*** ./src/models/classrooms/announcement.ts ***! + \***********************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/announcement */"yMj0"),c={namespace:"announcement",state:{name:"普通试卷,随机试卷详情页面",loading:!0,actionTabs:{}},effects:{informDown: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,t.callback,a=n.call,n.put,e.next=4,a(i.a,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),informUp: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,t.callback,a=n.call,n.put,e.next=4,a(i.b,r);case 4:return c=e.sent,e.abrupt("return",c);case 6: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 Object(r.a)(Object(r.a)({},e),t.payload)}},subscriptions:{setup:function(e){e.dispatch,e.history}}};t.a=c},"6cL7": +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.search.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/fix-regexp-well-known-symbol-logic */"ENif"),a=n(/*! ../internals/an-object */"f1E4"),o=n(/*! ../internals/require-object-coercible */"FCfD"),i=n(/*! ../internals/same-value */"UPML"),c=n(/*! ../internals/regexp-exec-abstract */"dagG");r("search",1,(function(e,t,n){return[function(t){var n=o(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=a(e),u=String(this),s=o.lastIndex;i(s,0)||(o.lastIndex=0);var l=c(o,u);return i(o.lastIndex,s)||(o.lastIndex=s),null===l?-1:l.index}]}))},"6fQ5": +/*!***************************************!*\ + !*** ./src/models/problemset/util.ts ***! + \***************************************/ +/*! exports provided: formatCourseOptions, formatPaperData */ +/*! exports used: formatCourseOptions, formatPaperData */function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=function(e){return null==e?void 0:e.map((function(e){var t=(e.sub_disciplines||[]).map((function(e){return{value:e.id,label:e.name}}));return{value:e.id,label:e.name,children:t}}))},o={1:"一",2:"二",3:"三",4:"四",5:"五",6:"六",7:"七",8:"八"},i=function(e){if(e){var t=e||{},n=t.all_questions_count,a=t.all_score,i=t.single_questions,c=t.multiple_questions,u=t.judgement_questions,s=t.program_questions,l=t.completion_questions,p=t.subjective_questions,f=t.practical_questions,d=t.combination_questions;return{all_questions_count:n,all_score:a,questionList:[Object(r.a)({type:"SINGLE",name:"单选题"},i),Object(r.a)({type:"MULTIPLE",name:"多选题"},c),Object(r.a)({type:"COMPLETION",name:"填空题"},l),Object(r.a)({type:"JUDGMENT",name:"判断题"},u),Object(r.a)({type:"SUBJECTIVE",name:"简答题"},p),Object(r.a)({type:"PROGRAM",name:"编程题"},s),Object(r.a)({type:"PRACTICAL",name:"实训题"},f),Object(r.a)({type:"COMBINATION",name:"组合题"},d)].filter((function(e){return e.questions_count>0})).map((function(e,t){return Object(r.a)(Object(r.a)({},e),{number:o[t+1]})}))}}}},"6ixQ": +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/hidden-keys.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports={}},"6koa": +/*!*****************************************************!*\ + !*** ./node_modules/shallow-equal/objects/index.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),a=n.length;if(r.length!==a)return!1;for(var o=0;o0?d[0]||u.data[0].ec_major_school_id:void 0}});case 14:case"end":return e.stop()}}),e)})),getYearList:s.a.mark((function e(t,n){var r,a,o,i,c,u,d,h;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,o=n.put,i=n.select,e.next=4,a(l.k,r.id);case 4:return c=e.sent,e.next=7,i((function(e){return e.user}));case 7:if(u=e.sent,d=u.userInfo,!c||!c.data){e.next=13;break}return h=p.a.getItem(null==d?void 0:d.login),e.next=13,o({type:"setMajorOrYearDataSource",payload:{key:f[1],value:c.data.map((function(e){return{label:e.year,value:e.ec_year_id}})),active:c.data.length>0?r.firstEnter?h[1]:c.data[0].ec_year_id:void 0}});case 13:case"end":return e.stop()}}),e)})),getCourseResults:s.a.mark((function e(t,n){var r,a,o,c,u,d,h,m,b,y,v,g,_,x,w,j,O;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=void 0===r?{}:r,o=n.call,c=n.put,u=n.select,d=a.calc,h=a.page,m=a.per_page,e.next=5,u((function(e){return e.engineeringEvaluteList}));case 5:return b=e.sent,y=b.headerData,v=b.tabListData,e.next=10,u((function(e){return e.user}));case 10:if(g=e.sent,_=g.userInfo,!(x=y.active[f[1]])){e.next=26;break}return w={id:x,page:h||1,per_page:m||v.pageSize},d&&(w=Object(i.a)(Object(i.a)({},w),{},{page:v.pageNo})),e.next=18,o(l.e,w);case 18:if(j=e.sent,O=[y.active[f[0]],y.active[f[1]]],p.a.setItem(null==_?void 0:_.login,O),!j||!j.ec_courses){e.next=24;break}return e.next=24,c({type:"setCourseResults",payload:Object(i.a)(Object(i.a)({},v),{},{pageNo:w.page,total:j.count,pageSize:w.per_page||v.pageSize,dataSource:j.ec_courses.map((function(e,t){return Object(i.a)(Object(i.a)({},e),{},{key:w.page>1?(w.page-1)*w.per_page+t+1:t+1})}))})});case 24:e.next=28;break;case 26:return e.next=28,c({type:"setCourseResults",payload:Object(i.a)(Object(i.a)({},v),{},{pageNo:1,total:0,dataSource:[]})});case 28:case"end":return e.stop()}}),e)})),exportCourse:s.a.mark((function e(t,n){var r,a,o,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.payload,r=n.call,a=n.select,e.next=4,a((function(e){return e.engineeringEvaluteList}));case 4:if(o=e.sent,!(i=o.headerData).active[f[1]]){e.next=9;break}return e.next=9,r(l.a,i.active[f[1]]);case 9:case"end":return e.stop()}}),e)})),compute:s.a.mark((function e(t,n){var r,i,c,u,p,f;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,i=n.call,c=n.put,u=r.all,p=Object(o.a)(r,["all"]),e.next=5,i(u?l.m:l.n,p);case 5:if(!(f=e.sent)||0!==f.status){e.next=12;break}return a.b.success("计算完成"),e.next=10,c({type:"getCourseResults",payload:{calc:!0}});case 10:e.next=13;break;case 12:a.b.error(f.message);case 13:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return Object(i.a)(Object(i.a)({},e),t.payload)},setMajorOrYearDataSource:function(e,t){var n=t.payload,r=e.headerData.active;return n.active&&(r=Object(i.a)(Object(i.a)({},r),{},Object(c.a)({},n.key,n.active))),Object(i.a)(Object(i.a)({},e),{},{headerData:Object(i.a)(Object(i.a)({},e.headerData),{},{dataSource:Object(i.a)(Object(i.a)({},e.headerData.dataSource),{},Object(c.a)({},n.key,Object(i.a)(Object(i.a)({},e.headerData.dataSource[n.key]),{},{dataList:n.value}))),active:r})})},setMajorOrYearActive:function(e,t){var n=t.payload;return Object(i.a)(Object(i.a)({},e),{},{headerData:Object(i.a)(Object(i.a)({},e.headerData),{},{active:Object(i.a)(Object(i.a)({},e.headerData.active),{},Object(c.a)({},n.key,n.value))})})},setCourseResults:function(e,t){var n=t.payload;return Object(i.a)(Object(i.a)({},e),{},{tabListData:Object(i.a)(Object(i.a)({},e.tabListData),n)})}},subscriptions:{setup:function(e){var t=e.dispatch;return e.history.listen((function(e){"/"===e.pathname&&t({type:"query"})}))}}};t.a=d},"7VZV": +/*!*************************************************!*\ + !*** ./src/models/globalSetting.ts + 1 modules ***! + \*************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! 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/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts because of ./src/pages/Account/Binding/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/pages/Account/Results/index.tsx */function(e,t,n){"use strict";var r=n("k1fw"),a=n("WmNS"),o=n.n(a),i=n("9og8"),c=n("ErOA");function u(){return s.apply(this,arguments)}function s(){return(s=Object(i.a)(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/setting.json",{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(){return p.apply(this,arguments)}function p(){return(p=Object(i.a)(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/system_update.json",{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var f=n("m3rI"),d={namespace:"globalSetting",state:{name:"全局配置",loading:!0,isIlearning:window.location.host.indexOf("learning.")>-1,isPaZhou:window.location.host.indexOf("local-pazhou.")>-1,showFooter:!0,showHeader:!0,showHeaderFooter:!0,showHeaderFixed:!1,onlyShowBackTop:!0,onlyShowBackTopIcons:!0,operateModel:!1,operateModelPath:"",showQuestionBackTop:!1,theme:"default",globalLoading:{show:!1,text:""},updateData:{end_time:"",start_time:"",subject:"",system_score:"",system_update:!1}},effects:{query:o.a.mark((function e(t,n){var a,i,c,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,i=n.call,c=n.put,e.next=4,i(u,a);case 4:return s=e.sent,h(s),e.next=8,c({type:"save",payload:Object(r.a)({},s)});case 8:case"end":return e.stop()}}),e)})),getSystemUpdate:o.a.mark((function e(t,n){var a,i,c,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,i=n.call,c=n.put,e.next=4,i(l,a);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{updateData:Object(r.a)({},u)}});case 7:case"end":return e.stop()}}),e)})),setTheme:o.a.mark((function e(t,n){var r,a,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,i=n.put,e.next=4,a(l,r);case 4:return e.sent,e.next=7,i({type:"save",payload:{theme:r||"default"}});case 7:case"end":return e.stop()}}),e)})),setGlobalLoading: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:{globalLoading:Object(r.a)({},a)}});case 4:case"end":return e.stop()}}),e)})),headerToggle: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,n.call,a=n.put,e.next=4,a({type:"save",payload:{showHeader:r}});case 4:case"end":return e.stop()}}),e)})),footerToggle: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,n.call,a=n.put,e.next=4,a({type:"save",payload:{showFooter:r}});case 4:case"end":return e.stop()}}),e)})),headerFooterToggle: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,n.call,a=n.put,e.next=4,a({type:"save",payload:{showHeaderFooter:r}});case 4:case"end":return e.stop()}}),e)})),headerFixedToggle: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,n.call,a=n.put,e.next=4,a({type:"save",payload:{showHeaderFixed:r}});case 4:case"end":return e.stop()}}),e)})),onlyShowBackTopToggle: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,n.call,a=n.put,e.next=4,a({type:"save",payload:{onlyShowBackTop:r}});case 4:case"end":return e.stop()}}),e)})),onlyShowBackTopIconToggle: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,n.call,a=n.put,e.next=4,a({type:"save",payload:{onlyShowBackTopIcons:r}});case 4:case"end":return e.stop()}}),e)})),setOperateModel: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,n.call,a=n.put,e.next=4,a({type:"save",payload:{operateModel:r}});case 4:case"end":return e.stop()}}),e)})),setOperateModelPath: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,n.call,a=n.put,e.next=4,a({type:"save",payload:{operateModelPath:r}});case 4:case"end":return e.stop()}}),e)})),setShowQuestionBackTop: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,n.call,a=n.put,e.next=4,a({type:"save",payload:{showQuestionBackTop:r}});case 4:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return Object(r.a)(Object(r.a)({},e),t.payload)}},subscriptions:{setup:function(e){e.dispatch;return e.history.listen((function(e){e.pathname}))}}},h=(t.a=d,function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null===(e=r.setting)||void 0===e||e.tab_logo_url;var a=document.createElement("link"),o=document.getElementById("dynamic-favicon");a.id="dynamic-favicon",a.rel="shortcut icon",a.href=null!==(t=r.setting)&&void 0!==t&&t.tab_logo_url?"".concat(f.a.IMG_SERVER,"/").concat(null===(n=r.setting)||void 0===n?void 0:n.tab_logo_url):"".concat(f.a.IMG_SERVER,"/react/build/./favicon.ico"),o&&document.head.removeChild(o),document.head.appendChild(a)})},"7W2i": +/*!*********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/inherits.js ***! + \*********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./setPrototypeOf.js */"SksO");e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},"7bO/": +/*!**********************************************************!*\ + !*** ./node_modules/redux-saga/es/index.js + 16 modules ***! + \**********************************************************/ +/*! exports provided: default, runSaga, END, eventChannel, channel, buffers, takeEvery, takeLatest, throttle, delay, CANCEL, detach, effects, utils */ +/*! exports used: default, effects */function(e,t,n){"use strict";n.d(t,"b",(function(){return r}));var r={};n.r(r),n.d(r,"take",(function(){return ue})),n.d(r,"takem",(function(){return se})),n.d(r,"put",(function(){return le})),n.d(r,"all",(function(){return pe})),n.d(r,"race",(function(){return fe})),n.d(r,"call",(function(){return he})),n.d(r,"apply",(function(){return me})),n.d(r,"cps",(function(){return be})),n.d(r,"fork",(function(){return ye})),n.d(r,"spawn",(function(){return ve})),n.d(r,"join",(function(){return ge})),n.d(r,"cancel",(function(){return _e})),n.d(r,"select",(function(){return xe})),n.d(r,"actionChannel",(function(){return we})),n.d(r,"cancelled",(function(){return je})),n.d(r,"flush",(function(){return Oe})),n.d(r,"getContext",(function(){return ke})),n.d(r,"setContext",(function(){return Ee})),n.d(r,"takeEvery",(function(){return et})),n.d(r,"takeLatest",(function(){return tt})),n.d(r,"throttle",(function(){return nt}));var a=Object.assign||function(e){for(var t=1;t=0&&e.splice(n,1)}var j=function(e){var t=Array(e.length);for(var n in e)g(e,n)&&(t[n]=e[n]);return t};function O(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=a({},e),n=new Promise((function(e,n){t.resolve=e,t.reject=n}));return t.promise=n,t}function k(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=void 0,r=new Promise((function(r){n=setTimeout((function(){return r(t)}),e)}));return r[l]=function(){return clearTimeout(n)},r}function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(){return++e}}var S=E(),P=function(e){throw e},C=function(e){return{value:e,done:!0}};function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:P,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3],a={name:n,next:e,throw:t,return:C};return r&&(a[u]=!0),"undefined"!=typeof Symbol&&(a[Symbol.iterator]=function(){return a}),a}function A(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";"undefined"==typeof window?console.log("redux-saga "+e+": "+t+"\n"+(n&&n.stack||n)):console[e](t,n)}function I(e,t){return function(){return e.apply(void 0,arguments)}}var M=function(e,t){return e+" has been deprecated in favor of "+t+", please update your code"},L=function(e){return new Error("\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project's github repo.\n Error: "+e+"\n")},D=function(e,t){return(e?e+".":"")+"setContext(props): argument "+t+" is not a plain object"},R=function(e){return function(t){return e(Object.defineProperty(t,p,{value:!0}))}},N={isEmpty:h,put:m,take:m};function F(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=arguments[1],n=new Array(e),r=0,a=0,o=0,i=function(t){n[a]=t,a=(a+1)%e,r++},c=function(){if(0!=r){var t=n[o];return n[o]=null,r--,o=(o+1)%e,t}},u=function(){for(var e=[];r;)e.push(c());return e};return{isEmpty:function(){return 0==r},put:function(c){if(r0&&void 0!==arguments[0]?arguments[0]:z(),t=!1,n=[];function r(){if(t&&n.length)throw L("Cannot have a closed channel with pending takers");if(n.length&&!e.isEmpty())throw L("Cannot have pending takers with non empty buffer")}function a(a){if(r(),y(a,_.notUndef,"Saga was provided with an undefined action"),!t){if(!n.length)return e.put(a);for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:U(),n=arguments[2];arguments.length>2&&y(n,_.func,"Invalid match function passed to eventChannel");var r=ee(t),a=function(){r.__closed__||(o&&o(),r.close())},o=e((function(e){J(e)?a():n&&!n(e)||r.put(e)}));if(r.__closed__&&o(),!_.func(o))throw new Error("in eventChannel: subscribe should return a function to unsubscribe");return{take:r.take,flush:r.flush,close:a}}function ne(e){var t=te((function(t){return e((function(e){e[p]?t(e):H((function(){return t(e)}))}))}));return K({},t,{take:function(e,n){arguments.length>1&&(y(n,_.func,"channel.take's matcher argument must be a function"),e[s]=n),t.take(e)}})}var re=i("IO"),ae="TAKE",oe="\n(HINT: if you are getting this errors in tests, consider using createMockTask from redux-saga/utils)",ie=function(e,t){var n;return(n={})[re]=!0,n[e]=t,n},ce=function(e){return y(Pe.fork(e),_.object,"detach(eff): argument must be a fork effect"),e.FORK.detached=!0,e};function ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*";if(arguments.length&&y(arguments[0],_.notUndef,"take(patternOrChannel): patternOrChannel is undefined"),_.pattern(e))return ie(ae,{pattern:e});if(_.channel(e))return ie(ae,{channel:e});throw new Error("take(patternOrChannel): argument "+String(e)+" is not valid channel or a valid pattern")}ue.maybe=function(){var e=ue.apply(void 0,arguments);return e[ae].maybe=!0,e};var se=I(ue.maybe);function le(e,t){return arguments.length>1?(y(e,_.notUndef,"put(channel, action): argument channel is undefined"),y(e,_.channel,"put(channel, action): argument "+e+" is not a valid channel"),y(t,_.notUndef,"put(channel, action): argument action is undefined")):(y(e,_.notUndef,"put(action): argument action is undefined"),t=e,e=null),ie("PUT",{channel:e,action:t})}function pe(e){return ie("ALL",e)}function fe(e){return ie("RACE",e)}function de(e,t,n){y(t,_.notUndef,e+": argument fn is undefined");var r=null;if(_.array(t)){var a=t;r=a[0],t=a[1]}else if(t.fn){var o=t;r=o.context,t=o.fn}return r&&_.string(t)&&_.func(r[t])&&(t=r[t]),y(t,_.func,e+": argument "+t+" is not a function"),{context:r,fn:t,args:n}}function he(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:[];return ie("CALL",de("apply",{context:e,fn:t},n))}function be(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1)return pe(t.map((function(e){return ge(e)})));var r=t[0];return y(r,_.notUndef,"join(task): argument task is undefined"),y(r,_.task,"join(task): argument "+r+" is not a valid Task object "+oe),ie("JOIN",r)}function _e(){for(var e=arguments.length,t=Array(e),n=0;n1)return pe(t.map((function(e){return _e(e)})));var r=t[0];return 1===t.length&&(y(r,_.notUndef,"cancel(task): argument task is undefined"),y(r,_.task,"cancel(task): argument "+r+" is not a valid Task object "+oe)),ie("CANCEL",r||f)}function xe(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1&&(y(t,_.notUndef,"actionChannel(pattern, buffer): argument buffer is undefined"),y(t,_.buffer,"actionChannel(pattern, buffer): argument "+t+" is not a valid buffer")),ie("ACTION_CHANNEL",{pattern:e,buffer:t})}function je(){return ie("CANCELLED",{})}function Oe(e){return y(e,_.channel,"flush(channel): argument "+e+" is not valid channel"),ie("FLUSH",e)}function ke(e){return y(e,_.string,"getContext(prop): argument "+e+" is not a string"),ie("GET_CONTEXT",e)}function Ee(e){return y(e,_.object,D(null,e)),ie("SET_CONTEXT",e)}le.resolve=function(){var e=le.apply(void 0,arguments);return e.PUT.resolve=!0,e},le.sync=I(le.resolve);var Se=function(e){return function(t){return t&&t[re]&&t[e]}},Pe={take:Se(ae),put:Se("PUT"),all:Se("ALL"),race:Se("RACE"),call:Se("CALL"),cps:Se("CPS"),fork:Se("FORK"),join:Se("JOIN"),cancel:Se("CANCEL"),select:Se("SELECT"),actionChannel:Se("ACTION_CHANNEL"),cancelled:Se("CANCELLED"),flush:Se("FLUSH"),getContext:Se("GET_CONTEXT"),setContext:Se("SET_CONTEXT")},Ce=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:function(){return m},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:m,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"anonymous",s=arguments[8];y(e,_.iterator,Ie);var p="[...effects]",d=I(re,M(p,"all("+p+")")),h=o.sagaMonitor,b=o.logger,v=o.onError,g=b||A,k=function(e){var t=e.sagaStack;!t&&e.stack&&(t=-1!==e.stack.split("\n")[0].indexOf(e.message)?e.stack:"Error: "+e.message+"\n"+e.stack),g("error","uncaught at "+u,t||e.message||e)},E=ne(t),P=Object.create(a);F.cancel=m;var C=pe(i,u,e,s),T={name:u,cancel:R,isRunning:!0},L=ze(0,T,U);function R(){T.isRunning&&!T.isCancelled&&(T.isCancelled=!0,F(Le))}function N(){e._isRunning&&!e._isCancelled&&(e._isCancelled=!0,L.cancelAll(),U(Le))}return s&&(s.cancel=N),e._isRunning=!0,F(),C;function F(t,n){if(!T.isRunning)throw new Error("Trying to resume an already finished generator");try{var r=void 0;n?r=e.throw(t):t===Le?(T.isCancelled=!0,F.cancel(),r=_.func(e.return)?e.return(Le):{done:!0,value:Le}):r=t===Me?_.func(e.return)?e.return():{done:!0}:e.next(t),r.done?(T.isMainRunning=!1,T.cont&&T.cont(r.value)):V(r.value,i,"",F)}catch(e){T.isCancelled&&k(e),T.isMainRunning=!1,T.cont(e,!0)}}function U(t,n){e._isRunning=!1,E.close(),n?(t instanceof Error&&Object.defineProperty(t,"sagaStack",{value:"at "+u+" \n "+(t.sagaStack||t.stack),configurable:!0}),C.cont||(t instanceof Error&&v?v(t):k(t)),e._error=t,e._isAborted=!0,e._deferredEnd&&e._deferredEnd.reject(t)):(e._result=t,e._deferredEnd&&e._deferredEnd.resolve(t)),C.cont&&C.cont(t,n),C.joiners.forEach((function(e){return e.cb(t,n)})),C.joiners=null}function V(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3],a=S();h&&h.effectTriggered({effectId:a,parentEffectId:t,label:n,effect:e});var o=void 0;function i(e,t){o||(o=!0,r.cancel=m,h&&(t?h.effectRejected(a,e):h.effectResolved(a,e)),r(e,t))}i.cancel=m,r.cancel=function(){if(!o){o=!0;try{i.cancel()}catch(e){k(e)}i.cancel=m,h&&h.effectCancelled(a)}};var c=void 0;return _.promise(e)?q(e,i):_.helper(e)?Z(qe(e),a,i):_.iterator(e)?B(e,a,u,i):_.array(e)?d(e,a,i):(c=Pe.take(e))?W(c,i):(c=Pe.put(e))?Q(c,i):(c=Pe.all(e))?re(c,a,i):(c=Pe.race(e))?ae(c,a,i):(c=Pe.call(e))?K(c,a,i):(c=Pe.cps(e))?X(c,i):(c=Pe.fork(e))?Z(c,a,i):(c=Pe.join(e))?$(c,i):(c=Pe.cancel(e))?ee(c,i):(c=Pe.select(e))?oe(c,i):(c=Pe.actionChannel(e))?ie(c,i):(c=Pe.flush(e))?ue(c,i):(c=Pe.cancelled(e))?ce(c,i):(c=Pe.getContext(e))?se(c,i):(c=Pe.setContext(e))?le(c,i):i(e)}function q(e,t){var n=e[l];_.func(n)?t.cancel=n:_.func(e.abort)&&(t.cancel=function(){return e.abort()}),e.then(t,(function(e){return t(e,!0)}))}function B(e,a,i,c){Be(e,t,n,r,P,o,a,i,c)}function W(e,t){var n=e.channel,r=e.pattern,a=e.maybe;n=n||E;var o=function(e){return e instanceof Error?t(e,!0):J(e)&&!a?t(Me):t(e)};try{n.take(o,Ue(r))}catch(e){return t(e,!0)}t.cancel=o.cancel}function Q(e,t){var r=e.channel,a=e.action,o=e.resolve;H((function(){var e=void 0;try{e=(r?r.put:n)(a)}catch(e){if(r||o)return t(e,!0);k(e)}if(!o||!_.promise(e))return t(e);q(e,t)}))}function K(e,t,n){var r=e.context,a=e.fn,o=e.args,i=void 0;try{i=a.apply(r,o)}catch(e){return n(e,!0)}return _.promise(i)?q(i,n):_.iterator(i)?B(i,t,a.name,n):n(i)}function X(e,t){var n=e.context,r=e.fn,a=e.args;try{var o=function(e,n){return _.undef(e)?t(n):t(e,!0)};r.apply(n,a.concat(o)),o.cancel&&(t.cancel=function(){return o.cancel()})}catch(e){return t(e,!0)}}function Z(e,a,i){var c=e.context,u=e.fn,s=e.args,l=e.detached,p=Ve({context:c,fn:u,args:s});try{G();var f=Be(p,t,n,r,P,o,a,u.name,l?null:m);l?i(f):p._isRunning?(L.addTask(f),i(f)):p._error?L.abort(p._error):i(f)}finally{Y()}}function $(e,t){if(e.isRunning()){var n={task:C,cb:t};t.cancel=function(){return w(e.joiners,n)},e.joiners.push(n)}else e.isAborted()?t(e.error(),!0):t(e.result())}function ee(e,t){e===f&&(e=C),e.isRunning()&&e.cancel(),t()}function re(e,t,n){var r=Object.keys(e);if(!r.length)return n(_.array(e)?[]:{});var a=0,o=void 0,i={},c={};r.forEach((function(t){var u=function(c,u){o||(u||J(c)||c===Me||c===Le?(n.cancel(),n(c,u)):(i[t]=c,++a===r.length&&(o=!0,n(_.array(e)?j(Ce({},i,{length:r.length})):i))))};u.cancel=m,c[t]=u})),n.cancel=function(){o||(o=!0,r.forEach((function(e){return c[e].cancel()})))},r.forEach((function(n){return V(e[n],t,n,c[n])}))}function ae(e,t,n){var r=void 0,a=Object.keys(e),o={};a.forEach((function(t){var i=function(o,i){if(!r)if(i)n.cancel(),n(o,!0);else if(!J(o)&&o!==Me&&o!==Le){var c;n.cancel(),r=!0;var u=((c={})[t]=o,c);n(_.array(e)?[].slice.call(Ce({},u,{length:a.length})):u)}};i.cancel=m,o[t]=i})),n.cancel=function(){r||(r=!0,a.forEach((function(e){return o[e].cancel()})))},a.forEach((function(n){r||V(e[n],t,n,o[n])}))}function oe(e,t){var n=e.selector,a=e.args;try{t(n.apply(void 0,[r()].concat(a)))}catch(e){t(e,!0)}}function ie(e,n){var r=e.pattern,a=e.buffer,o=Ue(r);o.pattern=r,n(te(t,a||z(),o))}function ce(e,t){t(!!T.isCancelled)}function ue(e,t){e.flush(t)}function se(e,t){t(P[e])}function le(e,t){x(P,e),t()}function pe(e,t,n,r){var a,o;return n._deferredEnd=null,(a={})[c]=!0,a.id=e,a.name=t,"done",(o={}).done=o.done||{},o.done.get=function(){if(n._deferredEnd)return n._deferredEnd.promise;var e=O();return n._deferredEnd=e,n._isRunning||(n._error?e.reject(n._error):e.resolve(n._result)),e.promise},a.cont=r,a.joiners=[],a.cancel=N,a.isRunning=function(){return n._isRunning},a.isCancelled=function(){return n._isCancelled},a.isAborted=function(){return n._isAborted},a.result=function(){return n._result},a.error=function(){return n._error},a.setContext=function(e){y(e,_.object,D("task",e)),x(P,e)},Ae(a,o),a}}var We="runSaga(storeInterface, saga, ...args): saga argument must be a Generator function!";function He(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;a=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Qe={done:!0,value:void 0},Ye={};function Ke(e){return _.channel(e)?"channel":Array.isArray(e)?String(e.map((function(e){return String(e)}))):String(e)}function Xe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"iterator",r=void 0,a=t;function o(t,n){if(a===Ye)return Qe;if(n)throw a=Ye,n;r&&r(t);var o=e[a](),i=o[0],c=o[1],u=o[2];return r=u,(a=i)===Ye?Qe:c}return T(o,(function(e){return o(null,e)}),n,!0)}function Je(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;a2?n-2:0),a=2;a3?r-3:0),o=3;o2?n-2:0),a=2;a2?n-2:0),a=2;a3?r-3:0),o=3;o0&&void 0!==arguments[0]?arguments[0]:{},t=e.context,n=void 0===t?{}:t,r=Ge(e,["context"]),a=r.sagaMonitor,o=r.logger,i=r.onError;if(_.func(r))throw new Error("Saga middleware no longer accept Generator functions. Use sagaMiddleware.run instead");if(o&&!_.func(o))throw new Error("`options.logger` passed to the Saga middleware is not a function!");if(i&&!_.func(i))throw new Error("`options.onError` passed to the Saga middleware is not a function!");if(r.emitter&&!_.func(r.emitter))throw new Error("`options.emitter` passed to the Saga middleware is not a function!");function c(e){var t=e.getState,u=e.dispatch,s=Z();return s.emit=(r.emitter||b)(s.emit),c.run=He.bind(null,{context:n,subscribe:s.subscribe,dispatch:u,getState:t,sagaMonitor:a,logger:o,onError:i}),function(e){return function(t){a&&a.actionDispatched&&a.actionDispatched(t);var n=e(t);return s.emit(t),n}}}return c.run=function(){throw new Error("Before running a Saga, you must mount the Saga middleware on the Store using applyMiddleware")},c.setContext=function(e){y(e,_.object,D("sagaMiddleware",e)),x(n,e)},c}},"7ckf": +/*!*************************************************!*\ + !*** ./node_modules/hash.js/lib/hash/common.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ./utils */"w8CP"),a=n(/*! minimalistic-assert */"2j6C");function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var a=0;a>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=255&e}else for(r[a++]=255&e,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,o=8;o1?arguments[1]:void 0,3),a=new(s(t,o("Map"))),f=c(a.set);return p(n,(function(e,n){r(n,e,t)&&f.call(a,e,n)}),void 0,!0,!0),a}})},"7zRj": +/*!*****************************************!*\ + !*** ./node_modules/global/document.js ***! + \*****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(t){var r,a=void 0!==t?t:"undefined"!=typeof window?window:{},o=n(/*! min-document */3);"undefined"!=typeof document?r=document:(r=a["__GLOBAL_DOCUMENT_CACHE@4"])||(r=a["__GLOBAL_DOCUMENT_CACHE@4"]=o),e.exports=r}).call(this,n(/*! ./../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},"8+s/": +/*!*****************************************************!*\ + !*** ./node_modules/react-side-effect/lib/index.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r,a=n(/*! react */"q1tI"),o=(r=a)&&"object"==typeof r&&"default"in r?r.default:r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var u,s=[];function l(){u=e(s.map((function(e){return e.props}))),p.canUseDOM?t(u):n&&(u=n(u))}var p=function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.peek=function(){return u},a.rewind=function(){if(a.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=u;return u=void 0,s=[],e};var i=a.prototype;return i.UNSAFE_componentWillMount=function(){s.push(this),l()},i.componentDidUpdate=function(){l()},i.componentWillUnmount=function(){var e=s.indexOf(this);s.splice(e,1),l()},i.render=function(){return o.createElement(r,this.props)},a}(a.PureComponent);return i(p,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),i(p,"canUseDOM",c),p}}},"80Z6": +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.promise.any.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/a-function */"cT1L"),o=n(/*! ../internals/get-built-in */"29mP"),i=n(/*! ../internals/new-promise-capability */"LUyE"),c=n(/*! ../internals/perform */"WJ3H"),u=n(/*! ../internals/iterate */"IuhT");r({target:"Promise",stat:!0},{any:function(e){var t=this,n=i.f(t),r=n.resolve,s=n.reject,l=c((function(){var n=a(t.resolve),i=[],c=0,l=1,p=!1;u(e,(function(e){var a=c++,u=!1;i.push(void 0),l++,n.call(t,e).then((function(e){u||p||(p=!0,r(e))}),(function(e){u||p||(u=!0,i[a]=e,--l||s(new(o("AggregateError"))(i,"No one promise resolved")))}))})),--l||s(new(o("AggregateError"))(i,"No one promise resolved"))}));return l.error&&s(l.value),n.promise}})},"85Yc": +/*!*************************************************************!*\ + !*** ./node_modules/rc-field-form/es/index.js + 13 modules ***! + \*************************************************************/ +/*! 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/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./node_modules/antd/node_modules/rc-checkbox/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./node_modules/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/rc-select/es/generate.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./node_modules/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./node_modules/rc-select/es/utils/legacyUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./node_modules/rc-select/es/utils/legacyUtil.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-select/es/utils/valueUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/rc-select/es/utils/warningPropsUtil.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-select/es/utils/legacyUtil.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;ac;)i.push(String(t[c++])),c1?arguments[1]:void 0)}))},"8OGu": +/*!************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.symbol.is-concat-spreadable.js ***! + \************************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/define-well-known-symbol */"I65O")("isConcatSpreadable")},"8OQS": +/*!*****************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a},e.exports.__esModule=!0,e.exports.default=e.exports},"8OQV": +/*!*************************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/typed-array-constructors-require-wrappers.js ***! + \*************************************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv"),a=n(/*! ../internals/fails */"MVys"),o=n(/*! ../internals/check-correctness-of-iteration */"GPrf"),i=n(/*! ../internals/array-buffer-view-core */"FVwB").NATIVE_ARRAY_BUFFER_VIEWS,c=r.ArrayBuffer,u=r.Int8Array;e.exports=!i||!a((function(){u(1)}))||!a((function(){new u(-1)}))||!o((function(e){new u,new u(null),new u(1.5),new u(e)}),!0)||a((function(){return 1!==new u(new c(2),1,void 0).length}))},"8Ubs": +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.map.from.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Map",stat:!0},{from:n(/*! ../internals/collection-from */"aF2d")})},"8XRh": +/*!********************************************************!*\ + !*** ./node_modules/rc-motion/es/index.js + 5 modules ***! + \********************************************************/ +/*! exports provided: CSSMotionList, default */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js because of ./node_modules/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./node_modules/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./node_modules/rc-field-form/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./node_modules/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/rc-field-form/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./node_modules/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./node_modules/rc-field-form/es/index.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/typeof.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/raf/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js because of ./node_modules/antd/es/typography/Base.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js because of ./node_modules/rc-resize-observer/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";n.r(t),n.d(t,"CSSMotionList",(function(){return F}));var r=n("rePB"),a=n("VTBJ"),o=n("1OyB"),i=n("vuIU"),c=n("JX7q"),u=n("Ji7U"),s=n("LK+K"),l=n("U8pU"),p=n("q1tI"),f=n("m+aA"),d=n("c+Xe"),h=n("TSYQ"),m=n.n(h),b=n("xEkU"),y=n.n(b),v=!("undefined"==typeof window||!window.document||!window.document.createElement);function g(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var _,x,w,j=(_=v,x="undefined"!=typeof window?window:{},w={animationend:g("Animation","AnimationEnd"),transitionend:g("Transition","TransitionEnd")},_&&("AnimationEvent"in x||delete w.animationend.animation,"TransitionEvent"in x||delete w.transitionend.transition),w),O={};if(v){var k=document.createElement("div");O=k.style}var E={};function S(e){if(E[e])return E[e];var t=j[e];if(t)for(var n=Object.keys(t),r=n.length,a=0;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 children");r=e}})),r}var v=n("UwPn"),g={isAppearSupported:function(e){return e.transitionName&&e.transitionAppear||e.animation.appear},isEnterSupported:function(e){return e.transitionName&&e.transitionEnter||e.animation.enter},isLeaveSupported:function(e){return e.transitionName&&e.transitionLeave||e.animation.leave},allowAppearCallback:function(e){return e.transitionAppear||e.animation.appear},allowEnterCallback:function(e){return e.transitionEnter||e.animation.enter},allowLeaveCallback:function(e){return e.transitionLeave||e.animation.leave}},_=function(){function e(e,t){for(var n=0;n children");return p.a.createElement(O,{key:n.key,ref:function(t){e.childrenRefs[n.key]=t},animation:t.animation,transitionName:t.transitionName,transitionEnter:t.transitionEnter,transitionAppear:t.transitionAppear,transitionLeave:t.transitionLeave},n)})));var a=t.component;if(a){var o=t;return"string"==typeof a&&(o=k({className:t.className,style:t.style},t.componentProps)),p.a.createElement(a,o,r)}return r[0]||null}}]),t}(p.a.Component);T.isAnimate=!0,T.defaultProps={animation:{},component:"span",componentProps:{},transitionEnter:!0,transitionLeave:!0,transitionAppear:!1,onEnd:C,onEnter:C,onLeave:C,onAppear:C};var A=function(){var e=this;this.performEnter=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillEnter(e.handleDoneAdding.bind(e,t,"enter")))},this.performAppear=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillAppear(e.handleDoneAdding.bind(e,t,"appear")))},this.handleDoneAdding=function(t,n){var r=e.props;if(delete e.currentlyAnimatingKeys[t],!r.exclusive||r===e.nextProps){var a=m(P(r));e.isValidChildByKey(a,t)?"appear"===n?g.allowAppearCallback(r)&&(r.onAppear(t),r.onEnd(t,!0)):g.allowEnterCallback(r)&&(r.onEnter(t),r.onEnd(t,!0)):e.performLeave(t)}},this.performLeave=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillLeave(e.handleDoneLeaving.bind(e,t)))},this.handleDoneLeaving=function(t){var n=e.props;if(delete e.currentlyAnimatingKeys[t],!n.exclusive||n===e.nextProps){var r,a,o,i,c=m(P(n));if(e.isValidChildByKey(c,t))e.performEnter(t);else{var u=function(){g.allowLeaveCallback(n)&&(n.onLeave(t),n.onEnd(t,!1))};r=e.state.children,a=c,o=n.showProp,(i=r.length===a.length)&&r.forEach((function(e,t){var n=a[t];e&&n&&(e&&!n||!e&&n||e.key!==n.key||o&&e.props[o]!==n.props[o])&&(i=!1)})),i?u():e.setState({children:c},u)}}}},I=h(T),M=n("2GS6"),L=n("TSYQ"),D=n.n(L),R=n("EE3K"),N=n("8HVG");function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t=a&&(t.updateKey=c[0].notice.updateKey||c[0].notice.key,c.shift()),c.push({notice:t,holderCallback:n})),{notices:c}}))},e.remove=function(t){e.setState((function(e){return{notices:e.notices.filter((function(e){return e.notice.key!==t}))}}))},e}return Object(i.a)(n,[{key:"getTransitionName",value:function(){var e=this.props,t=e.prefixCls,n=e.animation,r=this.props.transitionName;return!r&&n&&(r="".concat(t,"-").concat(n)),r}},{key:"render",value:function(){var e=this,t=this.state.notices,n=this.props,r=n.prefixCls,a=n.className,o=n.closeIcon,i=n.style,c=t.map((function(n,a){var i=n.notice,c=n.holderCallback,u=Boolean(a===t.length-1&&i.updateKey),s=i.updateKey?i.updateKey:i.key,l=Object(M.a)(e.remove.bind(e,i.key),i.onClose),f=U(U(U({prefixCls:r,closeIcon:o},i),i.props),{},{key:s,update:u,onClose:l,onClick:i.onClick,children:i.content});return c?p.a.createElement("div",{key:s,className:"".concat(r,"-hook-holder"),ref:function(t){void 0!==s&&(t?(e.hookRefs.set(s,t),c(t,f)):e.hookRefs.delete(s))}}):p.a.createElement(R.a,Object.assign({},f))}));return p.a.createElement("div",{className:D()(r,a),style:i},p.a.createElement(I,{transitionName:this.getTransitionName()},c))}}]),n}(l.Component);W.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}},W.newInstance=function(e,t){var n=e||{},a=n.getContainer,o=Object(r.a)(n,["getContainer"]),i=document.createElement("div");a?a().appendChild(i):document.body.appendChild(i);var c=!1;d.a.render(p.a.createElement(W,Object.assign({},o,{ref:function(e){c||(c=!0,t({notice:function(t){e.add(t)},removeNotice:function(t){e.remove(t)},component:e,destroy:function(){d.a.unmountComponentAtNode(i),i.parentNode&&i.parentNode.removeChild(i)},useNotification:function(){return Object(N.a)(e)}}))}})),i)};var H=W;t.default=H},"8w+9": +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/document-create-element.js ***! + \*******************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv"),a=n(/*! ../internals/is-object */"tSXo"),o=r.document,i=a(o)&&a(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},"8yz6": +/*!**********************************************!*\ + !*** ./node_modules/split-on-first/index.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";e.exports=function(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];var n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},"9/ry": +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.includes.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/not-a-regexp */"rjJZ"),o=n(/*! ../internals/require-object-coercible */"FCfD");r({target:"String",proto:!0,forced:!n(/*! ../internals/correct-is-regexp-logic */"C7V6")("includes")},{includes:function(e){return!!~String(o(this)).indexOf(a(e),arguments.length>1?arguments[1]:void 0)}})},"9BQv": +/*!****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.array.last-item.js ***! + \****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/descriptors */"tny8"),a=n(/*! ../internals/add-to-unscopables */"eNh0"),o=n(/*! ../internals/to-object */"cTDu"),i=n(/*! ../internals/to-length */"oa35"),c=n(/*! ../internals/object-define-property */"YfKC").f;r&&!("lastItem"in[])&&(c(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=o(this),t=i(e.length);return 0==t?void 0:e[t-1]},set:function(e){var t=o(this),n=i(t.length);return t[0==n?0:n-1]=e}}),a("lastItem"))},"9R94": +/*!****************************************************************!*\ + !*** ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js ***! + \****************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r="Invariant failed";function a(e,t){if(!e)throw new Error(r)}},"9RRT": +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/array-reduce.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/a-function */"cT1L"),a=n(/*! ../internals/to-object */"cTDu"),o=n(/*! ../internals/indexed-object */"EzR6"),i=n(/*! ../internals/to-length */"oa35"),c=function(e){return function(t,n,c,u){r(n);var s=a(t),l=o(s),p=i(s.length),f=e?p-1:0,d=e?-1:1;if(c<2)for(;;){if(f in l){u=l[f],f+=d;break}if(f+=d,e?f<0:p<=f)throw TypeError("Reduce of empty array with no initial value")}for(;e?f>=0:p>f;f+=d)f in l&&(u=n(u,l[f],f,s));return u}};e.exports={left:c(!1),right:c(!0)}},"9Rzw": +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.difference.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/get-built-in */"29mP"),i=n(/*! ../internals/an-object */"f1E4"),c=n(/*! ../internals/a-function */"cT1L"),u=n(/*! ../internals/species-constructor */"/dTS"),s=n(/*! ../internals/iterate */"IuhT");r({target:"Set",proto:!0,real:!0,forced:a},{difference:function(e){var t=i(this),n=new(u(t,o("Set")))(t),r=c(n.delete);return s(e,(function(e){r.call(n,e)})),n}})},"9SZg": +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/get-iterator-method.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/classof */"Ei+o"),a=n(/*! ../internals/iterators */"5yw/"),o=n(/*! ../internals/well-known-symbol */"2kyd")("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||a[r(e)]}},"9Y4n": +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.bold.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/create-html */"V85Q");r({target:"String",proto:!0,forced:n(/*! ../internals/string-html-forced */"NQQk")("bold")},{bold:function(){return a(this,"b","","")}})},"9bAj": +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.map.reduce.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/an-object */"f1E4"),i=n(/*! ../internals/a-function */"cT1L"),c=n(/*! ../internals/get-map-iterator */"PPXv"),u=n(/*! ../internals/iterate */"IuhT");r({target:"Map",proto:!0,real:!0,forced:a},{reduce:function(e){var t=o(this),n=c(t),r=arguments.length<2,a=r?void 0:arguments[1];if(i(e),u(n,(function(n,o){r?(r=!1,a=o):a=e(a,o,n,t)}),void 0,!0,!0),r)throw TypeError("Reduce of empty map with no initial value");return a}})},"9hUv": +/*!**************************************!*\ + !*** ./src/models/messages/index.ts ***! + \**************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/messages */"5WQS"),c={namespace:"messages",state:{tidingsList:[],privateMessage:[],unreadInfo:[],recentContacts:{},privateMessageDetails:{},userPrivateMessage:{},actionTabs:{key:"",params:{}}},effects:{getPrivateMessageDetails: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.b,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{privateMessageDetails:u||[]}});case 7:return e.abrupt("return",u);case 8:case"end":return e.stop()}}),e)})),getTidings: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.e,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{tidingsList:u||[]}});case 7:case"end":return e.stop()}}),e)})),getPrivateMessages: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.c,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{privateMessage:u||[]}});case 7:return e.abrupt("return",u);case 8:case"end":return e.stop()}}),e)})),getUsersForPrivateMessages: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.f,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{userPrivateMessage:u||[]}});case 7:return e.abrupt("return",u);case 8:case"end":return e.stop()}}),e)})),unreadMessageInfo: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.h,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{unreadInfo:u||[]}});case 7:case"end":return e.stop()}}),e)})),getRecentContacts: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.d,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{recentContacts: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 Object(r.a)(Object(r.a)({},e),t.payload)}},subscriptions:{setup:function(e){e.dispatch,e.history}}};t.a=c},"9kvl": +/*!*************************************************************!*\ + !*** ./src/.umi-production/core/umiExports.ts + 17 modules ***! + \*************************************************************/ +/*! exports provided: history, plugin, connect, useDispatch, useStore, useSelector, getDvaApp, evaluateListHeaderKey, __PLUGIN_INITIAL_STATE, createIntl, FormattedDate, FormattedDateParts, FormattedDisplayName, FormattedHTMLMessage, FormattedList, FormattedMessage, FormattedNumber, FormattedNumberParts, FormattedPlural, FormattedRelativeTime, FormattedTime, FormattedTimeParts, IntlContext, IntlProvider, RawIntlProvider, createIntlCache, defineMessages, injectIntl, useIntl, localeInfo, addLocale, getIntl, setIntl, getLocale, getDirection, setLocale, formatMessage, getAllLocales, SelectLang, useModel, ErrorShowType, request, useRequest, UseRequestProvider, Helmet */ +/*! exports used: connect, evaluateListHeaderKey, getDvaApp, history, plugin, setLocale */ +/*! 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/defineProperty.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/extends.js because of ./src/pages/MyProblem/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/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/history.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/plugin.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-dva/connect.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-dva/exports.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-locale/localeExports.ts because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-model/useModel.tsx because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/runtime/dist/index.esm.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/style/index.js */ +/*! 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/antd/es/notification/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/notification/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash.debounce/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash.throttle/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-helmet/es/Helmet.js (<- Module uses injected variables (global)) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/umi-request/dist/index.esm.js (<- Module uses injected variables (process)) */function(e,t,n){"use strict";n.d(t,"d",(function(){return r.b})),n.d(t,"e",(function(){return a.a})),n.d(t,"a",(function(){return o.a})),n.d(t,"c",(function(){return o.b})),n.d(t,"b",(function(){return i.a})),n.d(t,"f",(function(){return c.g}));var r=n("FfOG"),a=n("bCY9"),o=n("p12T"),i=n("cFGR"),c=n("Fghh"),u=n("jrin"),s=(n("k1fw"),n("qVdP"),n("jsC+"),n("0Owb"),n("PpiC"),n("q1tI")),l=n.n(s),p=(Object(u.a)({"ar-EG":{lang:"ar-EG",label:"العربية",icon:"🇪🇬",title:"لغة"},"az-AZ":{lang:"az-AZ",label:"Azərbaycan dili",icon:"🇦🇿",title:"Dil"},"bg-BG":{lang:"bg-BG",label:"Български език",icon:"🇧🇬",title:"език"},"ca-ES":{lang:"ca-ES",label:"Catalá",icon:"🇨🇦",title:"llengua"},"cs-CZ":{lang:"cs-CZ",label:"Čeština",icon:"🇨🇿",title:"Jazyk"},"da-DK":{lang:"da-DK",label:"Dansk",icon:"🇩🇰",title:"Sprog"},"de-DE":{lang:"de-DE",label:"Deutsch",icon:"🇩🇪",title:"Sprache"},"el-GR":{lang:"el-GR",label:"Ελληνικά",icon:"🇬🇷",title:"Γλώσσα"},"en-GB":{lang:"en-GB",label:"English",icon:"🇬🇧",title:"Language"},"en-US":{lang:"en-US",label:"English",icon:"🇺🇸",title:"Language"},"es-ES":{lang:"es-ES",label:"Español",icon:"🇪🇸",title:"Idioma"},"et-EE":{lang:"et-EE",label:"Eesti",icon:"🇪🇪",title:"Keel"},"fa-IR":{lang:"fa-IR",label:"فارسی",icon:"🇮🇷",title:"زبان"},"fi-FI":{lang:"fi-FI",label:"Suomi",icon:"🇫🇮",title:"Kieli"},"fr-BE":{lang:"fr-BE",label:"Français",icon:"🇧🇪",title:"Langue"},"fr-FR":{lang:"fr-FR",label:"Français",icon:"🇫🇷",title:"Langue"},"ga-IE":{lang:"ga-IE",label:"Gaeilge",icon:"🇮🇪",title:"Teanga"},"he-IL":{lang:"he-IL",label:"עברית",icon:"🇮🇱",title:"שפה"},"hi-IN":{lang:"hi-IN",label:"हिन्दी, हिंदी",icon:"🇮🇳",title:"भाषा: हिन्दी"},"hr-HR":{lang:"hr-HR",label:"Hrvatski jezik",icon:"🇭🇷",title:"Jezik"},"hu-HU":{lang:"hu-HU",label:"Magyar",icon:"🇭🇺",title:"Nyelv"},"hy-AM":{lang:"hu-HU",label:"Հայերեն",icon:"🇦🇲",title:"Լեզու"},"id-ID":{lang:"id-ID",label:"Bahasa Indonesia",icon:"🇮🇩",title:"Bahasa"},"it-IT":{lang:"it-IT",label:"Italiano",icon:"🇮🇹",title:"Linguaggio"},"is-IS":{lang:"is-IS",label:"Íslenska",icon:"🇮🇸",title:"Tungumál"},"ja-JP":{lang:"ja-JP",label:"日本語",icon:"🇯🇵",title:"言語"},"ku-IQ":{lang:"ku-IQ",label:"کوردی",icon:"🇮🇶",title:"Ziman"},"kn-IN":{lang:"zh-TW",label:"ಕನ್ನಡ",icon:"🇮🇳",title:"ಭಾಷೆ"},"ko-KR":{lang:"ko-KR",label:"한국어",icon:"🇰🇷",title:"언어"},"lv-LV":{lang:"lv-LV",label:"Latviešu valoda",icon:"🇱🇮",title:"Kalba"},"mk-MK":{lang:"mk-MK",label:"македонски јазик",icon:"🇲🇰",title:"Јазик"},"mn-MN":{lang:"mn-MN",label:"Монгол хэл",icon:"🇲🇳",title:"Хэл"},"ms-MY":{lang:"ms-MY",label:"بهاس ملايو‎",icon:"🇲🇾",title:"Bahasa"},"nb-NO":{lang:"nb-NO",label:"Norsk",icon:"🇳🇴",title:"Språk"},"ne-NP":{lang:"ne-NP",label:"नेपाली",icon:"🇳🇵",title:"भाषा"},"nl-BE":{lang:"nl-BE",label:"Vlaams",icon:"🇧🇪",title:"Taal"},"nl-NL":{lang:"nl-NL",label:"Vlaams",icon:"🇳🇱",title:"Taal"},"pt-BR":{lang:"pt-BR",label:"Português",icon:"🇧🇷",title:"Idiomas"},"pt-PT":{lang:"pt-PT",label:"Português",icon:"🇵🇹",title:"Idiomas"},"ro-RO":{lang:"ro-RO",label:"Română",icon:"🇷🇴",title:"Limba"},"ru-RU":{lang:"ru-RU",label:"русский",icon:"🇷🇺",title:"язык"},"sk-SK":{lang:"sk-SK",label:"Slovenčina",icon:"🇸🇰",title:"Jazyk"},"sr-RS":{lang:"sr-RS",label:"српски језик",icon:"🇸🇷",title:"Језик"},"sl-SI":{lang:"sl-SI",label:"Slovenščina",icon:"🇸🇱",title:"Jezik"},"sv-SE":{lang:"sv-SE",label:"Svenska",icon:"🇸🇪",title:"Språk"},"ta-IN":{lang:"ta-IN",label:"தமிழ்",icon:"🇮🇳",title:"மொழி"},"th-TH":{lang:"th-TH",label:"ไทย",icon:"🇹🇭",title:"ภาษา"},"tr-TR":{lang:"tr-TR",label:"Türkçe",icon:"🇹🇷",title:"Dil"},"uk-UA":{lang:"uk-UA",label:"Українська",icon:"🇺🇰",title:"Мова"},"vi-VN":{lang:"vi-VN",label:"Tiếng Việt",icon:"🇻🇳",title:"Ngôn ngữ"},"zh-CN":{lang:"zh-CN",label:"简体中文",icon:"🇨🇳",title:"语言"},"zh-TW":{lang:"zh-TW",label:"繁体中文",icon:"🇭🇰",title:"語言"}},"zh-TW",{lang:"zh-TW",label:"繁体中文",icon:"🇹🇼",title:"語言"}),n("I5X1"),n("9og8"),n("/xke"),n("TeRw"),n("miYZ"),n("tsqr"),n("WmNS"),n("ZqBY"),n("LtsZ"),n("9/5/")),f=n.n(p),d=n("hKI/"),h=n.n(d);function m(){return"undefined"==typeof document||void 0===document.visibilityState||"hidden"!==document.visibilityState}new Map;var b=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},y=function(){for(var e=[],t=0;t0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},S=function(){for(var e=[],t=0;t=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": +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***! + \**********************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e,t,n,r,a,o,i){try{var c=e[o](i),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,o){var i=e.apply(t,n);function c(e){r(i,a,o,c,u,"next",e)}function u(e){r(i,a,o,c,u,"throw",e)}c(void 0)}))}}n.d(t,"a",(function(){return a}))},"9xmf": +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./arrayLikeToArray */"EdiO");e.exports=function(e){if(Array.isArray(e))return r(e)}},"9zP7": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.is.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Object",stat:!0},{is:n(/*! ../internals/same-value */"UPML")})},"9znl": +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.from.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Set",stat:!0},{from:n(/*! ../internals/collection-from */"aF2d")})},"A+b4": +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.trim-start.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/string-trim */"mTKU").start,o=n(/*! ../internals/string-trim-forced */"HKQd")("trimStart"),i=o?function(){return a(this)}:"".trimStart;r({target:"String",proto:!0,forced:o},{trimStart:i,trimLeft:i})},A9H8: +/*!****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.from-entries.js ***! + \****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/iterate */"IuhT"),o=n(/*! ../internals/create-property */"arQb");r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return a(e,(function(e,n){o(t,e,n)}),void 0,!0),t}})},AGcU: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.math.fround.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Math",stat:!0},{fround:n(/*! ../internals/math-fround */"jdp+")})},AM7I: +/*!*********************************************!*\ + !*** ./node_modules/get-intrinsic/index.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=SyntaxError,a=Function,o=TypeError,i=function(e){try{return a('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var u=function(){throw new o},s=c?function(){try{return u}catch(e){try{return c(arguments,"callee").get}catch(e){return u}}}():u,l=n(/*! has-symbols */"UVaH")(),p=Object.getPrototypeOf||function(e){return e.__proto__},f={},d="undefined"==typeof Uint8Array?void 0:p(Uint8Array),h={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":l?p([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":a,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?p(p([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l?p((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l?p((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?p(""[Symbol.iterator]()):void 0,"%Symbol%":l?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":s,"%TypedArray%":d,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=n(/*! function-bind */"D3zA"),y=n(/*! has */"oNNP"),v=b.call(Function.call,Array.prototype.concat),g=b.call(Function.apply,Array.prototype.splice),_=b.call(Function.call,String.prototype.replace),x=b.call(Function.call,String.prototype.slice),w=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,O=function(e){var t=x(e,0,1),n=x(e,-1);if("%"===t&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var a=[];return _(e,w,(function(e,t,n,r){a[a.length]=n?_(r,j,"$1"):t||e})),a},k=function(e,t){var n,a=e;if(y(m,a)&&(a="%"+(n=m[a])[0]+"%"),y(h,a)){var c=h[a];if(c===f&&(c=function e(t){var n;if("%AsyncFunction%"===t)n=i("async function () {}");else if("%GeneratorFunction%"===t)n=i("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=i("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&(n=p(a.prototype))}return h[t]=n,n}(a)),void 0===c&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:a,value:c}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');var n=O(e),a=n.length>0?n[0]:"",i=k("%"+a+"%",t),u=i.name,s=i.value,l=!1,p=i.alias;p&&(a=p[0],g(n,v([0,1],p)));for(var f=1,d=!0;f=n.length){var w=c(s,m);s=(d=!!w)&&"get"in w&&!("originalValue"in w.get)?w.get:s[m]}else d=y(s,m),s=s[m];d&&!l&&(h[u]=s)}}return s}},ANhw: +/*!*************************************!*\ + !*** ./node_modules/crypt/crypt.js ***! + \*************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n,r;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,a=0;r>>6-2*a);return t}},e.exports=r},ANjH: +/*!****************************************!*\ + !*** ./node_modules/redux/es/redux.js ***! + \****************************************/ +/*! exports provided: __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, createStore */ +/*! exports used: applyMiddleware, bindActionCreators, combineReducers, compose, createStore */function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return s}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function a(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var o="function"==typeof Symbol&&Symbol.observable||"@@observable",i=function(){return Math.random().toString(36).substring(7).split("").join(".")},c={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function u(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(a(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(a(1));return n(s)(e,t)}if("function"!=typeof e)throw new Error(a(2));var i=e,l=t,p=[],f=p,d=!1;function h(){f===p&&(f=p.slice())}function m(){if(d)throw new Error(a(3));return l}function b(e){if("function"!=typeof e)throw new Error(a(4));if(d)throw new Error(a(5));var t=!0;return h(),f.push(e),function(){if(t){if(d)throw new Error(a(6));t=!1,h();var n=f.indexOf(e);f.splice(n,1),p=null}}}function y(e){if(!u(e))throw new Error(a(7));if(void 0===e.type)throw new Error(a(8));if(d)throw new Error(a(9));try{d=!0,l=i(l,e)}finally{d=!1}for(var t=p=f,n=0;n2&&void 0!==arguments[2]&&arguments[2];return{type:r,payload:{location:e,action:t,isFirstRendering:n}}},o="@@router/CALL_HISTORY_METHOD",i=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r2?arguments[2]:void 0,p=i((void 0===l?c:a(l,c))-s,c-u),f=1;for(s0;)s in n?n[u]=n[s]:delete n[u],u+=f,s+=f;return n}},AqCL: +/*!*******************************************************************!*\ + !*** ./node_modules/path-to-regexp/node_modules/isarray/index.js ***! + \*******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},Auwt: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.map.includes.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/an-object */"f1E4"),i=n(/*! ../internals/get-map-iterator */"PPXv"),c=n(/*! ../internals/same-value-zero */"bwJD"),u=n(/*! ../internals/iterate */"IuhT");r({target:"Map",proto:!0,real:!0,forced:a},{includes:function(e){return u(i(o(this)),(function(t,n){if(c(n,e))return u.stop()}),void 0,!0,!0).stopped}})},"B/G0": +/*!********************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.get-own-property-descriptors.js ***! + \********************************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/descriptors */"tny8"),o=n(/*! ../internals/own-keys */"cC5k"),i=n(/*! ../internals/to-indexed-object */"0qr0"),c=n(/*! ../internals/object-get-own-property-descriptor */"g8rt"),u=n(/*! ../internals/create-property */"arQb");r({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(e){for(var t,n,r=i(e),a=c.f,s=o(r),l={},p=0;s.length>p;)void 0!==(n=a(r,t=s[p++]))&&u(l,t,n);return l}})},"B/J0": +/*!**************************************************!*\ + !*** ./node_modules/hash.js/lib/hash/sha/224.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../utils */"w8CP"),a=n(/*! ./256 */"bu2F");function o(){if(!(this instanceof o))return new o;a.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(o,a),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},B3m4: +/*!***********************************!*\ + !*** ./src/service/graduation.ts ***! + \***********************************/ +/*! exports provided: getTasksDetail, getTasksListDetail, getTopisDetail, getTopisDetailList, refuseTopic, agreeTopic, getReplyList, createReply, replyLike, replyUnLike, deleteReply, addTopicDefaultData, editTopicDefaultData, addTopic, editTopic, addTasks, editTasks, editTasksDefaultData */ +/*! exports used: addTasks, addTopic, addTopicDefaultData, agreeTopic, createReply, deleteReply, editTasks, editTasksDefaultData, editTopic, editTopicDefaultData, getReplyList, getTasksDetail, getTasksListDetail, getTopisDetail, getTopisDetailList, refuseTopic, replyLike, replyUnLike */function(e,t,n){"use strict";n.d(t,"l",(function(){return u})),n.d(t,"m",(function(){return l})),n.d(t,"n",(function(){return f})),n.d(t,"o",(function(){return h})),n.d(t,"p",(function(){return b})),n.d(t,"d",(function(){return v})),n.d(t,"k",(function(){return _})),n.d(t,"e",(function(){return w})),n.d(t,"q",(function(){return O})),n.d(t,"r",(function(){return E})),n.d(t,"f",(function(){return P})),n.d(t,"c",(function(){return T})),n.d(t,"j",(function(){return I})),n.d(t,"b",(function(){return L})),n.d(t,"i",(function(){return R})),n.d(t,"a",(function(){return F})),n.d(t,"g",(function(){return z})),n.d(t,"h",(function(){return q}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/utils/fetch */"ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/graduation_tasks/".concat(t.categoryId,".json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/graduation_tasks/".concat(t.categoryId,"/tasks_list.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/graduation_topics/").concat(t.categoryId,"/show_detail.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/graduation_topics/").concat(t.categoryId,".json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/graduation_topics/").concat(t.categoryId,"/refuse_student_topic.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/graduation_topics/").concat(t.categoryId,"/accept_student_topic.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/homework_commons/".concat(t.categoryId,"/show_comment.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return j.apply(this,arguments)}function j(){return(j=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/reply_message.json",{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return k.apply(this,arguments)}function k(){return(k=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/praise_tread/like.json",{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return S.apply(this,arguments)}function S(){return(S=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/praise_tread/unlike.json",{method:"delete",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/commons/delete.json",{method:"delete",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return A.apply(this,arguments)}function A(){return(A=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/graduation_topics/new.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e){return M.apply(this,arguments)}function M(){return(M=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/graduation_topics/").concat(t.categoryId,"/edit.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(e){return D.apply(this,arguments)}function D(){return(D=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/graduation_topics"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e){return N.apply(this,arguments)}function N(){return(N=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/graduation_topics/").concat(t.categoryId),{method:"put",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e){return U.apply(this,arguments)}function U(){return(U=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/graduation_tasks"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(e){return V.apply(this,arguments)}function V(){return(V=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/graduation_tasks/".concat(t.categoryId,".json"),{method:"put",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(e){return B.apply(this,arguments)}function B(){return(B=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/graduation_tasks/".concat(t.categoryId,"/edit.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},BEtg: +/*!*****************************************!*\ + !*** ./node_modules/is-buffer/index.js ***! + \*****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ +e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},"BGR+": +/*!******************************************!*\ + !*** ./node_modules/omit.js/es/index.js ***! + \******************************************/ +/*! exports provided: default */ +/*! all exports used */ +/*! ModuleConcatenation bailout: 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) */function(e,t,n){"use strict";n.r(t),t.default=function(e,t){for(var n=Object.assign({},e),r=0;r1?arguments[1]:void 0,(function(e,t){return new(c(o(e,e.constructor)))(t)}))}))},Bnag: +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! + \******************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=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.")},e.exports.__esModule=!0,e.exports.default=e.exports},Bnwu: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.math.log1p.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Math",stat:!0},{log1p:n(/*! ../internals/math-log1p */"egz/")})},BsWD: +/*!*******************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***! + \*******************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(/*! ./arrayLikeToArray.js */"a3WO");function a(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},BtTS: +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.int16-array.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/typed-array-constructor */"Mi8B")("Int16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},C3pJ: +/*!************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/task.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,a,o,i=n(/*! ../internals/global */"ukPv"),c=n(/*! ../internals/fails */"MVys"),u=n(/*! ../internals/classof-raw */"UwrT"),s=n(/*! ../internals/function-bind-context */"7BAe"),l=n(/*! ../internals/html */"yj7k"),p=n(/*! ../internals/document-create-element */"8w+9"),f=n(/*! ../internals/engine-is-ios */"xRZI"),d=i.location,h=i.setImmediate,m=i.clearImmediate,b=i.process,y=i.MessageChannel,v=i.Dispatch,g=0,_={},x=function(e){if(_.hasOwnProperty(e)){var t=_[e];delete _[e],t()}},w=function(e){return function(){x(e)}},j=function(e){x(e.data)},O=function(e){i.postMessage(e+"",d.protocol+"//"+d.host)};h&&m||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return _[++g]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(g),g},m=function(e){delete _[e]},"process"==u(b)?r=function(e){b.nextTick(w(e))}:v&&v.now?r=function(e){v.now(w(e))}:y&&!f?(o=(a=new y).port2,a.port1.onmessage=j,r=s(o.postMessage,o,1)):!i.addEventListener||"function"!=typeof postMessage||i.importScripts||c(O)||"file:"===d.protocol?r="onreadystatechange"in p("script")?function(e){l.appendChild(p("script")).onreadystatechange=function(){l.removeChild(this),x(e)}}:function(e){setTimeout(w(e),0)}:(r=O,i.addEventListener("message",j,!1))),e.exports={set:h,clear:m}},C7V6: +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/correct-is-regexp-logic.js ***! + \*******************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/well-known-symbol */"2kyd")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},CO2k: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.union.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/get-built-in */"29mP"),i=n(/*! ../internals/an-object */"f1E4"),c=n(/*! ../internals/a-function */"cT1L"),u=n(/*! ../internals/species-constructor */"/dTS"),s=n(/*! ../internals/iterate */"IuhT");r({target:"Set",proto:!0,real:!0,forced:a},{union:function(e){var t=i(this),n=new(u(t,o("Set")))(t);return s(e,c(n.add),n),n}})},CRpX: +/*!**********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/web.dom-collections.iterator.js ***! + \**********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv"),a=n(/*! ../internals/dom-iterables */"XX5T"),o=n(/*! ../modules/es.array.iterator */"FbcW"),i=n(/*! ../internals/create-non-enumerable-property */"lz10"),c=n(/*! ../internals/well-known-symbol */"2kyd"),u=c("iterator"),s=c("toStringTag"),l=o.values;for(var p in a){var f=r[p],d=f&&f.prototype;if(d){if(d[u]!==l)try{i(d,u,l)}catch(e){d[u]=l}if(d[s]||i(d,s,p),a[p])for(var h in o)if(d[h]!==o[h])try{i(d,h,o[h])}catch(e){d[h]=o[h]}}}},CSFr: +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.math.imul.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/fails */"MVys"),o=Math.imul;r({target:"Math",stat:!0,forced:a((function(){return-5!=o(4294967295,5)||2!=o.length}))},{imul:function(e,t){var n=+e,r=+t,a=65535&n,o=65535&r;return 0|a*o+((65535&n>>>16)*o+a*(65535&r>>>16)<<16>>>0)}})},CWID: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.array.find.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/array-iteration */"zv1X").find,o=n(/*! ../internals/add-to-unscopables */"eNh0"),i=n(/*! ../internals/array-method-uses-to-length */"kGMc"),c=!0,u=i("find");"find"in[]&&Array(1).find((function(){c=!1})),r({target:"Array",proto:!0,forced:c||!u},{find:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),o("find")},Cb9Y: +/*!****************************************!*\ + !*** ./src/models/classrooms/polls.ts ***! + \****************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/polls */"tgas"),c={namespace:"polls",state:{name:"普通试卷,随机试卷详情页面",loading:!0,pollsList:{},statisticsList:{},pollsCoursesList:{},brankList:{},actionTabs:{},commonHeader:{},pollSetting:{},endGroups:{},publishGroups:{},exerciseBanks:{}},effects:{getPollsList: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.p,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{pollsList:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getCommonHeader: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.l,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{commonHeader:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getPollsStatistics: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.r,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{statisticsList:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getBrankList: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,t.callback,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:{brankList:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),saveBanks: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,t.callback,a=n.call,n.put,e.next=4,a(i.y,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),getPollsCourses: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.o,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{pollsCoursesList:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getPollsSetting: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.q,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{pollSetting:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),editPolls: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.g,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{editData:Object(r.a)({},JSON.parse(JSON.stringify(s)))}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getEndGroups: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.m,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{endGroups:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getPublishGroups: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,t.callback,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:{publishGroups:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getExerciseBanks: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.n,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{exerciseBanks:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);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 Object(r.a)(Object(r.a)({},e),t.payload)}},subscriptions:{setup:function(e){e.dispatch,e.history}}};t.a=c},CdV7: +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/object-to-array.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/descriptors */"tny8"),a=n(/*! ../internals/object-keys */"P0e2"),o=n(/*! ../internals/to-indexed-object */"0qr0"),i=n(/*! ../internals/object-property-is-enumerable */"e3V2").f,c=function(e){return function(t){for(var n,c=o(t),u=a(c),s=u.length,l=0,p=[];s>l;)n=u[l++],r&&!i.call(c,n)||p.push(e?[n,c[n]]:c[n]);return p}};e.exports={entries:c(!0),values:c(!1)}},CiB2: +/*!******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js ***! + \******************************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e){if(null==e)throw new TypeError("Cannot destructure undefined")}n.d(t,"a",(function(){return r}))},CjUg: +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/shared-key.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/shared */"xxaU"),a=n(/*! ../internals/uid */"evbn"),o=r("keys");e.exports=function(e){return o[e]||(o[e]=a(e))}},CkqQ: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.math.asinh.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=Math.asinh,o=Math.log,i=Math.sqrt;r({target:"Math",stat:!0,forced:!(a&&1/a(0)>0)},{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):o(t+i(t*t+1)):t}})},Cq6t: +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/ieee754.js ***! + \***************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=Math.abs,r=Math.pow,a=Math.floor,o=Math.log,i=Math.LN2;e.exports={pack:function(e,t,c){var u,s,l,p=new Array(c),f=8*c-t-1,d=(1<>1,m=23===t?r(2,-24)-r(2,-77):0,b=e<0||0===e&&1/e<0?1:0,y=0;for((e=n(e))!=e||e===1/0?(s=e!=e?1:0,u=d):(u=a(o(e)/i),e*(l=r(2,-u))<1&&(u--,l*=2),(e+=u+h>=1?m/l:m*r(2,1-h))*l>=2&&(u++,l/=2),u+h>=d?(s=0,u=d):u+h>=1?(s=(e*l-1)*r(2,t),u+=h):(s=e*r(2,h-1)*r(2,t),u=0));t>=8;p[y++]=255&s,s/=256,t-=8);for(u=u<0;p[y++]=255&u,u/=256,f-=8);return p[--y]|=128*b,p},unpack:function(e,t){var n,a=e.length,o=8*a-t-1,i=(1<>1,u=o-7,s=a-1,l=e[s--],p=127&l;for(l>>=7;u>0;p=256*p+e[s],s--,u-=8);for(n=p&(1<<-u)-1,p>>=-u,u+=t;u>0;n=256*n+e[s],s--,u-=8);if(0===p)p=1-c;else{if(p===i)return n?NaN:l?-1/0:1/0;n+=r(2,t),p-=c}return(l?-1:1)*n*r(2,p-t)}}},D1Ff: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.reflect.has.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},D3zA: +/*!*********************************************!*\ + !*** ./node_modules/function-bind/index.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ./implementation */"aI7X");e.exports=Function.prototype.bind||r},DMUC: +/*!*******************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.get-own-property-descriptor.js ***! + \*******************************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/fails */"MVys"),o=n(/*! ../internals/to-indexed-object */"0qr0"),i=n(/*! ../internals/object-get-own-property-descriptor */"g8rt").f,c=n(/*! ../internals/descriptors */"tny8"),u=a((function(){i(1)}));r({target:"Object",stat:!0,forced:!c||u,sham:!c},{getOwnPropertyDescriptor:function(e,t){return i(o(e),t)}})},DSFK: +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},DUzY: +/*!***************************************************************************************!*\ + !*** ./node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict"; +/** @license React v17.0.2 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r=60103,a=60106,o=60107,i=60108,c=60114,u=60109,s=60110,l=60112,p=60113,f=60120,d=60115,h=60116,m=60121,b=60122,y=60117,v=60129,g=60131;if("function"==typeof Symbol&&Symbol.for){var _=Symbol.for;r=_("react.element"),a=_("react.portal"),o=_("react.fragment"),i=_("react.strict_mode"),c=_("react.profiler"),u=_("react.provider"),s=_("react.context"),l=_("react.forward_ref"),p=_("react.suspense"),f=_("react.suspense_list"),d=_("react.memo"),h=_("react.lazy"),m=_("react.block"),b=_("react.server.block"),y=_("react.fundamental"),v=_("react.debug_trace_mode"),g=_("react.legacy_hidden")}function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case c:case i:case p:case f:return e;default:switch(e=e&&e.$$typeof){case s:case l:case h:case d:case u:return e;default:return t}}case a:return t}}}var w=u,j=r,O=l,k=o,E=h,S=d,P=a,C=c,T=i,A=p;t.ContextConsumer=s,t.ContextProvider=w,t.Element=j,t.ForwardRef=O,t.Fragment=k,t.Lazy=E,t.Memo=S,t.Portal=P,t.Profiler=C,t.StrictMode=T,t.Suspense=A,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return x(e)===s},t.isContextProvider=function(e){return x(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===l},t.isFragment=function(e){return x(e)===o},t.isLazy=function(e){return x(e)===h},t.isMemo=function(e){return x(e)===d},t.isPortal=function(e){return x(e)===a},t.isProfiler=function(e){return x(e)===c},t.isStrictMode=function(e){return x(e)===i},t.isSuspense=function(e){return x(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===c||e===v||e===i||e===p||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===d||e.$$typeof===u||e.$$typeof===s||e.$$typeof===l||e.$$typeof===y||e.$$typeof===m||e[0]===b)},t.typeOf=x},DVoG: +/*!*************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.reflect.has-own-metadata.js ***! + \*************************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/reflect-metadata */"ls1J"),o=n(/*! ../internals/an-object */"f1E4"),i=a.has,c=a.toKey;r({target:"Reflect",stat:!0},{hasOwnMetadata:function(e,t){var n=arguments.length<3?void 0:c(arguments[2]);return i(e,o(t),n)}})},DVom: +/*!**************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.get-own-property-names.js ***! + \**************************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/fails */"MVys"),o=n(/*! ../internals/object-get-own-property-names-external */"IGnA").f;r({target:"Object",stat:!0,forced:a((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},Dbv2: +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.map.update.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/an-object */"f1E4"),i=n(/*! ../internals/a-function */"cT1L");r({target:"Map",proto:!0,real:!0,forced:a},{update:function(e,t){var n=o(this),r=arguments.length;i(t);var a=n.has(e);if(!a&&r<3)throw TypeError("Updating absent value");var c=a?n.get(e):i(r>2?arguments[2]:void 0)(e,n);return n.set(e,t(c,e,n)),n}})},De94: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/enum-bug-keys.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},Di6M: +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/string-punycode-to-ascii.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=/[^\0-\u007E]/,a=/[.\u3002\uFF0E\uFF61]/g,o="Overflow: input needs wider integers to process",i=Math.floor,c=String.fromCharCode,u=function(e){return e+22+75*(e<26)},s=function(e,t,n){var r=0;for(e=n?i(e/700):e>>1,e+=i(e/t);e>455;r+=36)e=i(e/35);return i(r+36*e/(e+38))},l=function(e){var t,n,r=[],a=(e=function(e){for(var t=[],n=0,r=e.length;n=55296&&a<=56319&&n=l&&ni((2147483647-p)/b))throw RangeError(o);for(p+=(m-l)*b,l=m,t=0;t2147483647)throw RangeError(o);if(n==l){for(var y=p,v=36;;v+=36){var g=v<=f?1:v>=f+26?26:v-f;if(y")})),l="$0"==="a".replace(/./,"$0"),p=o("replace"),f=!!/./[p]&&""===/./[p]("a","$0"),d=!a((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,p){var h=o(e),m=!a((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),b=m&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!m||!b||"replace"===e&&(!s||!l||f)||"split"===e&&!d){var y=/./[h],v=n(h,""[e],(function(e,t,n,r,a){return t.exec===i?m&&!a?{done:!0,value:y.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),g=v[0],_=v[1];r(String.prototype,e,g),r(RegExp.prototype,h,2==t?function(e,t){return _.call(e,this,t)}:function(e){return _.call(e,this)})}p&&c(RegExp.prototype[h],"sham",!0)}},EOz7: +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.starts-with.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r,a=n(/*! ../internals/export */"MMxC"),o=n(/*! ../internals/object-get-own-property-descriptor */"g8rt").f,i=n(/*! ../internals/to-length */"oa35"),c=n(/*! ../internals/not-a-regexp */"rjJZ"),u=n(/*! ../internals/require-object-coercible */"FCfD"),s=n(/*! ../internals/correct-is-regexp-logic */"C7V6"),l=n(/*! ../internals/is-pure */"Zcjx"),p="".startsWith,f=Math.min,d=s("startsWith");a({target:"String",proto:!0,forced:!!(l||d||(r=o(String.prototype,"startsWith"),!r||r.writable))&&!d},{startsWith:function(e){var t=String(u(this));c(e);var n=i(f(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return p?p.call(t,r,n):t.slice(n,n+r.length)===r}})},EbDI: +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***! + \****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},EdiO: +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ni;){if(t=+arguments[i++],a(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},ErOA: +/*!****************************!*\ + !*** ./src/utils/fetch.ts ***! + \****************************/ +/*! exports provided: parseParams, default, get, getqq, post, put, del */ +/*! exports used: default, del, get, getqq, parseParams, post, put */function(e,t,n){"use strict";n.d(t,"e",(function(){return g})),n.d(t,"a",(function(){return _})),n.d(t,"c",(function(){return O})),n.d(t,"d",(function(){return k})),n.d(t,"f",(function(){return E})),n.d(t,"g",(function(){return S})),n.d(t,"b",(function(){return P}));n(/*! antd/es/message/style */"miYZ");var r,a=n(/*! antd/es/message */"tsqr"),o=(n(/*! antd/es/modal/style */"2qtc"),n(/*! antd/es/modal */"kLXV")),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),c=(n(/*! antd/es/notification/style */"/xke"),n(/*! antd/es/notification */"TeRw")),u=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),l=n.n(s),p=n(/*! dva */"LpSC"),f=n.n(p),d=n(/*! ./env */"m3rI"),h=n(/*! hash.js */"fZJM"),m=n.n(h),b=n(/*! umi */"9kvl"),y={200:"服务器成功返回请求的数据。",201:"新建或修改数据成功。",202:"一个请求已经进入后台排队(异步任务)。",204:"删除数据成功。",400:"发出的请求有错误,服务器没有进行新建或修改数据的操作。",401:"用户没有权限(令牌、用户名、密码错误)。",403:"用户得到授权,但是访问是被禁止的。",404:"发出的请求针对的是不存在的记录,服务器没有进行操作。",406:"请求的格式不可得。",410:"请求的资源被永久删除,且不会再得到的。",422:"当创建一个对象时,发生一个验证错误。",500:"服务器发生错误,请检查服务器。",502:"网关错误。",503:"服务不可用,服务器暂时过载或维护。",504:"网关超时。"},v=function(){var e=Object(u.a)(l.a.mark((function e(t,n){var r,a,o,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.status>=200&&t.status<300)){e.next=2;break}return e.abrupt("return",t);case 2:return r=y[t.status]||t.statusText,o=t.json(),e.next=6,o.then((function(e,n){setTimeout((function(){Object(b.c)()}),400),a=e.message,c.a.error({style:{wordBreak:"break-all"},message:e.message||"请求错误 ".concat(t.status,": ").concat(t.message),description:e.message?"":r})}));case 6:throw(i=new Error(r)).name=t.status,i.response=t,{data:t,code:t.status,message:a||r};case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),g=function(e){e=e||{};var t="",n=function(n){"object"==typeof e[n]?Array.isArray(e[n])&&e[n].forEach((function(e,r){t+="&"+n+"[]="+e})):t+="&"+n+"="+e[n]};for(var r in e)n(r);return t.substr(1)};function _(e,t,n,a){!t.method&&(t.method="get"),t.method=t.method.toUpperCase(),t.mode="cors";var s=Object(i.a)({},t),p=e+(s.body?JSON.stringify(s.body):""),h=(m.a.sha256().update(p).digest("hex"),Object(i.a)(Object(i.a)({},{credentials:"include",withCredentials:!0}),s));"POST"!==h.method&&"PUT"!==h.method&&"PATCH"!==h.method&&"DELETE"!==h.method||(n?(h.headers=Object(i.a)({},h.headers),h.body=s.body):(h.headers=Object(i.a)({Accept:"application/json","Content-Type":"application/json; charset=utf-8"},h.headers),h.body=JSON.stringify(s.body))),"GET"==h.method&&(h.headers=Object(i.a)({Accept:"application/json","Content-Type":"application/json; charset=utf-8"},h.headers),e+="?"+g(s.params));var y,_;s.expirys;!function(e){e.json="application/json;charset=UTF-8",e.form="application/x-www-form-urlencoded; charset=UTF-8"}(y||(y={})),function(e){e.get="GET",e.post="POST"}(_||(_={}));var x=function(){var e=Object(u.a)(l.a.mark((function e(t){var n,r,a,o,i,c;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.arrayBuffer();case 2:n=e.sent,a=new Blob([n]);try{r=t.headers.get("content-type").split(";")[1].replace("filename=","")}catch(e){r="userfiles.zip"}return o=document.createElement("a"),i=window.URL.createObjectURL(a),c=r,o.href=i,o.download=c,o.click(),window.URL.revokeObjectURL(i),e.abrupt("return",n);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=d.a.API_SERVER;return"dev"===window.ENV&&(w=""),a&&(w=""),f()(w+e,h).then((function(t){return v(t,Object(i.a)({url:d.a.API_SERVER+e},h))})).then((function(e){return function(e,t){var n=e.headers.get("Content-Type");return n&&n.match(/application\/json/i)&&e.clone().text().then((function(){})),e}(e)})).then(function(){var t=Object(u.a)(l.a.mark((function t(n){var a,i,c;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(204!==n.status){t.next=2;break}return t.abrupt("return",n.text());case 2:if(!(n.headers.get("content-type").indexOf("application/json")>-1)){t.next=8;break}return t.next=5,n.json();case 5:a=t.sent,t.next=11;break;case 8:return t.next=10,x(n);case 10:a=t.sent;case 11:try{401!==a.status||null!==(i=h.params)&&void 0!==i&&i.hidePopLogin&&null!==(c=h.body)&&void 0!==c&&c.hidePopLogin||(console.log("new:",h),Object(b.c)()._store.dispatch({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}})),402===a.status&&("2"===localStorage.getItem("addinfo")?Object(b.c)()._store.dispatch({type:"shixunHomeworks/setActionTabs",payload:{key:"填充信息弹窗"}}):(r=r||o.a.confirm({visible:!1,okText:"确定",cancelText:"取消"})).update({centered:!0,visible:!0,title:"提示",content:"您需要去完善您的个人资料,才能使用此功能",okText:"立即完善",cancelText:"稍后完善",onOk:function(){b.d.push("/account/profile/edit")}}))}catch(e){console.log("fetcherr",e)}return j(a,e),t.abrupt("return",a);case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t,n,r){try{var a=t.code;if(a){if(401===a)return void Object(b.c)()._store.dispatch({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}});j(t,e)}else console.log("---",e,h),e.includes("/file/filePatchMerge")?Object(b.c)()._store.dispatch({type:"shixunHomeworks/setActionTabs",payload:{key:"分片专用504",params:h.body}}):c.a.error({style:{wordBreak:"break-all"},duration:null,message:"您的网络可能出现了问题,请稍后再试",description:e});return t}catch(t){}}))}var x=!1,w=!1,j=function(e,t){if((-1==e.status||-2==e.status||e.status>400)&&403!=e.status&&!w)return w=!0,setTimeout((function(){return w=!1}),500),void a.b.warn({content:e.message,key:"message-key",duration:3});var n={403:"/403",404:"/404",500:"/500"};if(n[e.status]&&!x){var r=Object(b.c)()._store.getState().user.userInfo;return window.location.pathname.indexOf("/users")>-1&&"kepukehuan.educoder.net"===document.domain&&alert(e.status+":"+(null==r?void 0:r.id)+"---"+t),x=!0,setTimeout((function(){return x=!1}),500),e.status,b.d.replace(n[e.status]),void sessionStorage.setItem("errorStatus",JSON.stringify(e))}};function O(e,t){return _("/api/".concat(e),{method:"Get",params:t||{}})}function k(e,t){return _("/".concat(e),{method:"Get",params:t})}function E(e,t){return _("/api/".concat(e),{method:"Post",body:Object(i.a)({},t)})}function S(e,t){return _("/api/".concat(e),{method:"Put",body:Object(i.a)({},t)})}function P(e){return _("/api/".concat(e),{method:"delete"})}},EzR6: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/indexed-object.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/fails */"MVys"),a=n(/*! ../internals/classof-raw */"UwrT"),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?o.call(e,""):Object(e)}:Object},F1NP: +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.subarray.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-buffer-view-core */"FVwB"),a=n(/*! ../internals/to-length */"oa35"),o=n(/*! ../internals/to-absolute-index */"bIKR"),i=n(/*! ../internals/species-constructor */"/dTS"),c=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(e,t){var n=c(this),r=n.length,u=o(e,r);return new(i(n,n.constructor))(n.buffer,n.byteOffset+u*n.BYTES_PER_ELEMENT,a((void 0===t?r:o(t,r))-u))}))},F52u: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/this-number-value.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/classof-raw */"UwrT");e.exports=function(e){if("number"!=typeof e&&"Number"!=r(e))throw TypeError("Incorrect invocation");return+e}},FBts: +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.math.imulh.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Math",stat:!0},{imulh:function(e,t){var n=+e,r=+t,a=65535&n,o=65535&r,i=n>>16,c=r>>16,u=(i*o>>>0)+(a*o>>>16);return i*c+(u>>16)+((a*c>>>0)+(65535&u)>>16)}})},FCfD: +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/require-object-coercible.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},FER5: +/*!****************************************************************!*\ + !*** ./node_modules/@ctrl/tinycolor/dist/module/conversion.js ***! + \****************************************************************/ +/*! exports provided: rgbToRgb, rgbToHsl, hslToRgb, rgbToHsv, hsvToRgb, rgbToHex, rgbaToHex, rgbaToArgbHex, convertDecimalToHex, convertHexToDecimal, parseIntFromHex, numberInputToObject */ +/*! exports used: convertHexToDecimal, hslToRgb, hsvToRgb, parseIntFromHex, rgbToHex, rgbToHsv, rgbToRgb */function(e,t,n){"use strict";n.d(t,"g",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"f",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return p}));var r=n(/*! ./util */"b3aT");function a(e,t,n){return{r:255*Object(r.a)(e,255),g:255*Object(r.a)(t,255),b:255*Object(r.a)(n,255)}}function o(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function i(e,t,n){var a,i,c;if(e=Object(r.a)(e,360),t=Object(r.a)(t,100),n=Object(r.a)(n,100),0===t)i=n,c=n,a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;a=o(s,u,e+1/3),i=o(s,u,e),c=o(s,u,e-1/3)}return{r:255*a,g:255*i,b:255*c}}function c(e,t,n){e=Object(r.a)(e,255),t=Object(r.a)(t,255),n=Object(r.a)(n,255);var a=Math.max(e,t,n),o=Math.min(e,t,n),i=0,c=a,u=a-o,s=0===a?0:u/a;if(a===o)i=0;else{switch(a){case e:i=(t-n)/u+(t>>16,c=r>>>16,u=(i*o>>>0)+(a*o>>>16);return i*c+(u>>>16)+((a*c>>>0)+(65535&u)>>>16)}})},FMtG: +/*!******************************************************************!*\ + !*** ./node_modules/@umijs/plugin-model/lib/helpers/constant.js ***! + \******************************************************************/ +/*! no static exports found */ +/*! exports used: UmiContext */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.UmiContext=void 0;var a=((r=n(/*! react */"q1tI"))&&r.__esModule?r:{default:r}).default.createContext({});t.UmiContext=a},FVwB: +/*!******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/array-buffer-view-core.js ***! + \******************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r,a=n(/*! ../internals/array-buffer-native */"GNqc"),o=n(/*! ../internals/descriptors */"tny8"),i=n(/*! ../internals/global */"ukPv"),c=n(/*! ../internals/is-object */"tSXo"),u=n(/*! ../internals/has */"jtLI"),s=n(/*! ../internals/classof */"Ei+o"),l=n(/*! ../internals/create-non-enumerable-property */"lz10"),p=n(/*! ../internals/redefine */"NMFW"),f=n(/*! ../internals/object-define-property */"YfKC").f,d=n(/*! ../internals/object-get-prototype-of */"Acmb"),h=n(/*! ../internals/object-set-prototype-of */"g1ZG"),m=n(/*! ../internals/well-known-symbol */"2kyd"),b=n(/*! ../internals/uid */"evbn"),y=i.Int8Array,v=y&&y.prototype,g=i.Uint8ClampedArray,_=g&&g.prototype,x=y&&d(y),w=v&&d(v),j=Object.prototype,O=j.isPrototypeOf,k=m("toStringTag"),E=b("TYPED_ARRAY_TAG"),S=a&&!!h&&"Opera"!==s(i.opera),P=!1,C={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},T=function(e){return c(e)&&u(C,s(e))};for(r in C)i[r]||(S=!1);if((!S||"function"!=typeof x||x===Function.prototype)&&(x=function(){throw TypeError("Incorrect invocation")},S))for(r in C)i[r]&&h(i[r],x);if((!S||!w||w===j)&&(w=x.prototype,S))for(r in C)i[r]&&h(i[r].prototype,w);if(S&&d(_)!==w&&h(_,w),o&&!u(w,k))for(r in P=!0,f(w,k,{get:function(){return c(this)?this[E]:void 0}}),C)i[r]&&l(i[r],E,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:S,TYPED_ARRAY_TAG:P&&E,aTypedArray:function(e){if(T(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(h){if(O.call(x,e))return e}else for(var t in C)if(u(C,r)){var n=i[t];if(n&&(e===n||O.call(n,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n){if(o){if(n)for(var r in C){var a=i[r];a&&u(a.prototype,e)&&delete a.prototype[e]}w[e]&&!n||p(w,e,n?t:S&&v[e]||t)}},exportTypedArrayStaticMethod:function(e,t,n){var r,a;if(o){if(h){if(n)for(r in C)(a=i[r])&&u(a,e)&&delete a[e];if(x[e]&&!n)return;try{return p(x,e,n?t:S&&y[e]||t)}catch(e){}}for(r in C)!(a=i[r])||a[e]&&!n||p(a,e,t)}},isView:function(e){var t=s(e);return"DataView"===t||u(C,t)},isTypedArray:T,TypedArray:x,TypedArrayPrototype:w}},FbcW: +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.array.iterator.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/to-indexed-object */"0qr0"),a=n(/*! ../internals/add-to-unscopables */"eNh0"),o=n(/*! ../internals/iterators */"5yw/"),i=n(/*! ../internals/internal-state */"1aI8"),c=n(/*! ../internals/define-iterator */"uMwj"),u=i.set,s=i.getterFor("Array Iterator");e.exports=c(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=s(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,a("keys"),a("values"),a("entries")},Ff2n: +/*!****************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js ***! + \****************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(/*! ./objectWithoutPropertiesLoose.js */"zLVn");function a(e,t){if(null==e)return{};var n,a,o=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},FfOG: +/*!*********************************************!*\ + !*** ./src/.umi-production/core/history.ts ***! + \*********************************************/ +/*! exports provided: createHistory, history */ +/*! exports used: createHistory, history */function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(/*! ./node_modules/@umijs/runtime */"YS25"),a={basename:"/"};window.routerBase&&(a.basename=window.routerBase);var o=Object({NODE_ENV:"production"}).__IS_SERVER?null:Object(r.a)(a),i=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e||(o=Object(r.a)(a)),o}},Fghh: +/*!*************************************************************************!*\ + !*** ./src/.umi-production/plugin-locale/localeExports.ts + 20 modules ***! + \*************************************************************************/ +/*! exports provided: createIntl, FormattedDate, FormattedDateParts, FormattedDisplayName, FormattedHTMLMessage, FormattedList, FormattedMessage, FormattedNumber, FormattedNumberParts, FormattedPlural, FormattedRelativeTime, FormattedTime, FormattedTimeParts, IntlContext, IntlProvider, RawIntlProvider, createIntlCache, defineMessages, injectIntl, useIntl, localeInfo, addLocale, getIntl, setIntl, getLocale, getDirection, setLocale, formatMessage, getAllLocales */ +/*! exports used: RawIntlProvider, getDirection, getIntl, getLocale, localeInfo, setIntl, setLocale */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/.umi-production/plugin-dva/dva.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.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/inherits.js because of ./src/components/modal.tsx */ +/*! 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 ./src/.umi-production/core/umiExports.ts because of ./src/.umi-production/plugin-dva/dva.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-locale/locale.tsx because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/runtime/dist/index.esm.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/intl-locales-supported/dist/index.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/shallow-equal/objects/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/warning/warning.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return fe})),n.d(t,"e",(function(){return tt})),n.d(t,"c",(function(){return nt})),n.d(t,"f",(function(){return rt})),n.d(t,"d",(function(){return at})),n.d(t,"b",(function(){return ot})),n.d(t,"g",(function(){return it}));var r,a=n("fWQN"),o=n("mtLc"),i=n("yKVA"),c=n("879j"),u=n("q1tI"),s=(n("jrin"),n("2mql")),l=n.n(s);function p(e){return e.type===r.literal}function f(e){return e.type===r.argument}function d(e){return e.type===r.number}function h(e){return e.type===r.date}function m(e){return e.type===r.time}function b(e){return e.type===r.select}function y(e){return e.type===r.plural}function v(e){return e.type===r.pound}function g(e){return!(!e||"object"!=typeof e||0!==e.type)}function _(e){return!(!e||"object"!=typeof e||1!==e.type)}!function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound"}(r||(r={}));var x,w=(x=function(e,t){return(x=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}x(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),j=function(){return(j=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){for(t=1,n=1;t1&&"}"===e)},J=me("\n",!1),Z=ye("argNameOrNumber"),$=ye("argNumber"),ee=me("0",!1),te=/^[1-9]/,ne=be([["1","9"]],!1,!1),re=/^[0-9]/,ae=be([["0","9"]],!1,!1),oe=ye("argName"),ie=0,ce=0,ue=[{line:1,column:1}],se=0,le=[],pe=0;if(void 0!==t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');i=o[t.startRule]}function fe(){return e.substring(ce,ie)}function de(){return ge(ce,ie)}function he(e,t){throw function(e,t){return new O(e,[],"",t)}(e,t=void 0!==t?t:ge(ce,ie))}function me(e,t){return{type:"literal",text:e,ignoreCase:t}}function be(e,t,n){return{type:"class",parts:e,inverted:t,ignoreCase:n}}function ye(e){return{type:"other",description:e}}function ve(t){var n,r=ue[t];if(r)return r;for(n=t-1;!ue[n];)n--;for(r={line:(r=ue[n]).line,column:r.column};nse&&(se=ie,le=[]),le.push(e))}function xe(e,t,n){return new O(O.buildMessage(e,t),e,t,n)}function we(){return je()}function je(){var e,t;for(e=[],t=Oe();t!==a;)e.push(t),t=Oe();return e}function Oe(){var t;return(t=function(){var e,t;e=ie,(t=ke())!==a&&(ce=e,n=t,t=j({type:r.literal,value:n},He()));var n;return e=t}())===a&&(t=function(){var t,n,o,i;pe++,t=ie,123===e.charCodeAt(ie)?(n="{",ie++):(n=a,0===pe&&_e(s));n!==a&&De()!==a&&(o=ze())!==a&&De()!==a?(125===e.charCodeAt(ie)?(i="}",ie++):(i=a,0===pe&&_e(l)),i!==a?(ce=t,c=o,n=j({type:r.argument,value:c},He()),t=n):(ie=t,t=a)):(ie=t,t=a);var c;pe--,t===a&&(n=a,0===pe&&_e(u));return t}())===a&&(t=function(){var t;(t=function(){var t,n,r,o,i,c,u,p,f;t=ie,123===e.charCodeAt(ie)?(n="{",ie++):(n=a,0===pe&&_e(s));n!==a&&De()!==a&&(r=ze())!==a&&De()!==a?(44===e.charCodeAt(ie)?(o=",",ie++):(o=a,0===pe&&_e(_)),o!==a&&De()!==a?("number"===e.substr(ie,6)?(i="number",ie+=6):(i=a,0===pe&&_e(x)),i!==a&&De()!==a?(c=ie,44===e.charCodeAt(ie)?(u=",",ie++):(u=a,0===pe&&_e(_)),u!==a&&(p=De())!==a&&(f=function(){var t,n,r;t=ie,"::"===e.substr(ie,2)?(n="::",ie+=2):(n=a,0===pe&&_e(v));n!==a&&(r=function(){var e,t,n;if(e=ie,t=[],(n=Pe())!==a)for(;n!==a;)t.push(n),n=Pe();else t=a;t!==a&&(ce=e,t=j({type:0,tokens:t},He()));return e=t}())!==a?(ce=t,t=n=r):(ie=t,t=a);t===a&&(t=ie,ce=ie,Be.push("numberArgStyle"),(n=(n=!0)?void 0:a)!==a&&(r=ke())!==a?(ce=t,n=g(r),t=n):(ie=t,t=a));return t}())!==a?c=u=[u,p,f]:(ie=c,c=a),c===a&&(c=null),c!==a&&(u=De())!==a?(125===e.charCodeAt(ie)?(p="}",ie++):(p=a,0===pe&&_e(l)),p!==a?(ce=t,n=w(r,i,c),t=n):(ie=t,t=a)):(ie=t,t=a)):(ie=t,t=a)):(ie=t,t=a)):(ie=t,t=a);return t}())===a&&(t=function(){var t,n,r,o,i,c,u,p,f;t=ie,123===e.charCodeAt(ie)?(n="{",ie++):(n=a,0===pe&&_e(s));n!==a&&De()!==a&&(r=ze())!==a&&De()!==a?(44===e.charCodeAt(ie)?(o=",",ie++):(o=a,0===pe&&_e(_)),o!==a&&De()!==a?("date"===e.substr(ie,4)?(i="date",ie+=4):(i=a,0===pe&&_e(I)),i===a&&("time"===e.substr(ie,4)?(i="time",ie+=4):(i=a,0===pe&&_e(M))),i!==a&&De()!==a?(c=ie,44===e.charCodeAt(ie)?(u=",",ie++):(u=a,0===pe&&_e(_)),u!==a&&(p=De())!==a&&(f=function(){var t,n,r;t=ie,"::"===e.substr(ie,2)?(n="::",ie+=2):(n=a,0===pe&&_e(v));n!==a&&(r=function(){var t,n,r,o;t=ie,n=ie,r=[],(o=Ce())===a&&(o=Te());if(o!==a)for(;o!==a;)r.push(o),(o=Ce())===a&&(o=Te());else r=a;n=r!==a?e.substring(n,ie):r;n!==a&&(ce=t,n=j({type:1,pattern:n},He()));return t=n}())!==a?(ce=t,t=n=r):(ie=t,t=a);t===a&&(t=ie,ce=ie,Be.push("dateOrTimeArgStyle"),(n=(n=!0)?void 0:a)!==a&&(r=ke())!==a?(ce=t,n=g(r),t=n):(ie=t,t=a));return t}())!==a?c=u=[u,p,f]:(ie=c,c=a),c===a&&(c=null),c!==a&&(u=De())!==a?(125===e.charCodeAt(ie)?(p="}",ie++):(p=a,0===pe&&_e(l)),p!==a?(ce=t,n=w(r,i,c),t=n):(ie=t,t=a)):(ie=t,t=a)):(ie=t,t=a)):(ie=t,t=a)):(ie=t,t=a);return t}());return t}())===a&&(t=function(){var t,n,o,i,c,u,p,f,d,h,m;t=ie,123===e.charCodeAt(ie)?(n="{",ie++):(n=a,0===pe&&_e(s));if(n!==a)if(De()!==a)if((o=ze())!==a)if(De()!==a)if(44===e.charCodeAt(ie)?(i=",",ie++):(i=a,0===pe&&_e(_)),i!==a)if(De()!==a)if("plural"===e.substr(ie,6)?(c="plural",ie+=6):(c=a,0===pe&&_e(L)),c===a&&("selectordinal"===e.substr(ie,13)?(c="selectordinal",ie+=13):(c=a,0===pe&&_e(D))),c!==a)if(De()!==a)if(44===e.charCodeAt(ie)?(u=",",ie++):(u=a,0===pe&&_e(_)),u!==a)if(De()!==a)if(p=ie,"offset:"===e.substr(ie,7)?(f="offset:",ie+=7):(f=a,0===pe&&_e(R)),f!==a&&(d=De())!==a&&(h=Re())!==a?p=f=[f,d,h]:(ie=p,p=a),p===a&&(p=null),p!==a)if((f=De())!==a){if(d=[],(h=Ie())!==a)for(;h!==a;)d.push(h),h=Ie();else d=a;d!==a&&(h=De())!==a?(125===e.charCodeAt(ie)?(m="}",ie++):(m=a,0===pe&&_e(l)),m!==a?(ce=t,n=function(e,t,n,a){return j({type:r.plural,pluralType:"plural"===t?"cardinal":"ordinal",value:e,offset:n?n[2]:0,options:a.reduce((function(e,t){var n=t.id,r=t.value,a=t.location;return n in e&&he('Duplicate option "'+n+'" in plural element: "'+fe()+'"',de()),e[n]={value:r,location:a},e}),{})},He())}(o,c,p,d),t=n):(ie=t,t=a)):(ie=t,t=a)}else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;return t}())===a&&(t=function(){var t,n,o,i,c,u,p,f,d;t=ie,123===e.charCodeAt(ie)?(n="{",ie++):(n=a,0===pe&&_e(s));if(n!==a)if(De()!==a)if((o=ze())!==a)if(De()!==a)if(44===e.charCodeAt(ie)?(i=",",ie++):(i=a,0===pe&&_e(_)),i!==a)if(De()!==a)if("select"===e.substr(ie,6)?(c="select",ie+=6):(c=a,0===pe&&_e(N)),c!==a)if(De()!==a)if(44===e.charCodeAt(ie)?(u=",",ie++):(u=a,0===pe&&_e(_)),u!==a)if(De()!==a){if(p=[],(f=Ae())!==a)for(;f!==a;)p.push(f),f=Ae();else p=a;p!==a&&(f=De())!==a?(125===e.charCodeAt(ie)?(d="}",ie++):(d=a,0===pe&&_e(l)),d!==a?(ce=t,n=function(e,t){return j({type:r.select,value:e,options:t.reduce((function(e,t){var n=t.id,r=t.value,a=t.location;return n in e&&he('Duplicate option "'+n+'" in select element: "'+fe()+'"',de()),e[n]={value:r,location:a},e}),{})},He())}(o,p),t=n):(ie=t,t=a)):(ie=t,t=a)}else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;else ie=t,t=a;return t}())===a&&(t=function(){var t,n;t=ie,35===e.charCodeAt(ie)?(n="#",ie++):(n=a,0===pe&&_e(c));n!==a&&(ce=t,n=j({type:r.pound},He()));return t=n}()),t}function ke(){var e,t,n;if(e=ie,t=[],(n=Ne())===a&&(n=Fe())===a&&(n=Ue()),n!==a)for(;n!==a;)t.push(n),(n=Ne())===a&&(n=Fe())===a&&(n=Ue());else t=a;return t!==a&&(ce=e,t=t.join("")),e=t}function Ee(){var t,n,r,o,i;if(pe++,t=ie,n=[],r=ie,o=ie,pe++,(i=Me())===a&&(f.test(e.charAt(ie))?(i=e.charAt(ie),ie++):(i=a,0===pe&&_e(d))),pe--,i===a?o=void 0:(ie=o,o=a),o!==a?(e.length>ie?(i=e.charAt(ie),ie++):(i=a,0===pe&&_e(h)),i!==a?r=o=[o,i]:(ie=r,r=a)):(ie=r,r=a),r!==a)for(;r!==a;)n.push(r),r=ie,o=ie,pe++,(i=Me())===a&&(f.test(e.charAt(ie))?(i=e.charAt(ie),ie++):(i=a,0===pe&&_e(d))),pe--,i===a?o=void 0:(ie=o,o=a),o!==a?(e.length>ie?(i=e.charAt(ie),ie++):(i=a,0===pe&&_e(h)),i!==a?r=o=[o,i]:(ie=r,r=a)):(ie=r,r=a);else n=a;return t=n!==a?e.substring(t,ie):n,pe--,t===a&&(n=a,0===pe&&_e(p)),t}function Se(){var t,n,r;return pe++,t=ie,47===e.charCodeAt(ie)?(n="/",ie++):(n=a,0===pe&&_e(b)),n!==a&&(r=Ee())!==a?(ce=t,t=n=r):(ie=t,t=a),pe--,t===a&&(n=a,0===pe&&_e(m)),t}function Pe(){var e,t,n,r;if(pe++,e=ie,De()!==a)if((t=Ee())!==a){for(n=[],r=Se();r!==a;)n.push(r),r=Se();n!==a?(ce=e,e=function(e,t){return{stem:e,options:t}}(t,n)):(ie=e,e=a)}else ie=e,e=a;else ie=e,e=a;return pe--,e===a&&(a,0===pe&&_e(y)),e}function Ce(){var t,n,r,o;if(t=ie,39===e.charCodeAt(ie)?(n="'",ie++):(n=a,0===pe&&_e(k)),n!==a){if(r=[],(o=Ne())===a&&(E.test(e.charAt(ie))?(o=e.charAt(ie),ie++):(o=a,0===pe&&_e(S))),o!==a)for(;o!==a;)r.push(o),(o=Ne())===a&&(E.test(e.charAt(ie))?(o=e.charAt(ie),ie++):(o=a,0===pe&&_e(S)));else r=a;r!==a?(39===e.charCodeAt(ie)?(o="'",ie++):(o=a,0===pe&&_e(k)),o!==a?t=n=[n,r,o]:(ie=t,t=a)):(ie=t,t=a)}else ie=t,t=a;if(t===a)if(t=[],(n=Ne())===a&&(P.test(e.charAt(ie))?(n=e.charAt(ie),ie++):(n=a,0===pe&&_e(C))),n!==a)for(;n!==a;)t.push(n),(n=Ne())===a&&(P.test(e.charAt(ie))?(n=e.charAt(ie),ie++):(n=a,0===pe&&_e(C)));else t=a;return t}function Te(){var t,n;if(t=[],T.test(e.charAt(ie))?(n=e.charAt(ie),ie++):(n=a,0===pe&&_e(A)),n!==a)for(;n!==a;)t.push(n),T.test(e.charAt(ie))?(n=e.charAt(ie),ie++):(n=a,0===pe&&_e(A));else t=a;return t}function Ae(){var t,n,r,o,i,c,u;return t=ie,De()!==a&&(n=qe())!==a&&De()!==a?(123===e.charCodeAt(ie)?(r="{",ie++):(r=a,0===pe&&_e(s)),r!==a?(ce=ie,Be.push("select"),(!0?void 0:a)!==a&&(o=je())!==a?(125===e.charCodeAt(ie)?(i="}",ie++):(i=a,0===pe&&_e(l)),i!==a?(ce=t,c=n,u=o,Be.pop(),t=j({id:c,value:u},He())):(ie=t,t=a)):(ie=t,t=a)):(ie=t,t=a)):(ie=t,t=a),t}function Ie(){var t,n,r,o,i,c,u;return t=ie,De()!==a&&(n=function(){var t,n,r,o;return t=ie,n=ie,61===e.charCodeAt(ie)?(r="=",ie++):(r=a,0===pe&&_e(F)),r!==a&&(o=Re())!==a?n=r=[r,o]:(ie=n,n=a),(t=n!==a?e.substring(t,ie):n)===a&&(t=qe()),t}())!==a&&De()!==a?(123===e.charCodeAt(ie)?(r="{",ie++):(r=a,0===pe&&_e(s)),r!==a?(ce=ie,Be.push("plural"),(!0?void 0:a)!==a&&(o=je())!==a?(125===e.charCodeAt(ie)?(i="}",ie++):(i=a,0===pe&&_e(l)),i!==a?(ce=t,c=n,u=o,Be.pop(),t=j({id:c,value:u},He())):(ie=t,t=a)):(ie=t,t=a)):(ie=t,t=a)):(ie=t,t=a),t}function Me(){var t;return pe++,z.test(e.charAt(ie))?(t=e.charAt(ie),ie++):(t=a,0===pe&&_e(V)),pe--,t===a&&(a,0===pe&&_e(U)),t}function Le(){var t;return pe++,B.test(e.charAt(ie))?(t=e.charAt(ie),ie++):(t=a,0===pe&&_e(W)),pe--,t===a&&(a,0===pe&&_e(q)),t}function De(){var t,n,r;for(pe++,t=ie,n=[],r=Me();r!==a;)n.push(r),r=Me();return t=n!==a?e.substring(t,ie):n,pe--,t===a&&(n=a,0===pe&&_e(H)),t}function Re(){var t,n,r,o,i;return pe++,t=ie,45===e.charCodeAt(ie)?(n="-",ie++):(n=a,0===pe&&_e(Q)),n===a&&(n=null),n!==a&&(r=Ve())!==a?(ce=t,o=n,t=n=(i=r)?o?-i:i:0):(ie=t,t=a),pe--,t===a&&(n=a,0===pe&&_e(G)),t}function Ne(){var t,n;return pe++,t=ie,"''"===e.substr(ie,2)?(n="''",ie+=2):(n=a,0===pe&&_e(K)),n!==a&&(ce=t,n="'"),pe--,(t=n)===a&&(n=a,0===pe&&_e(Y)),t}function Fe(){var t,n,r,o,i,c;if(t=ie,39===e.charCodeAt(ie)?(n="'",ie++):(n=a,0===pe&&_e(k)),n!==a)if((r=function(){var t,n,r,o;t=ie,n=ie,e.length>ie?(r=e.charAt(ie),ie++):(r=a,0===pe&&_e(h));r!==a?(ce=ie,(o=(o="{"===(i=r)||"}"===i||We()&&"#"===i)?void 0:a)!==a?n=r=[r,o]:(ie=n,n=a)):(ie=n,n=a);var i;t=n!==a?e.substring(t,ie):n;return t}())!==a){for(o=ie,i=[],"''"===e.substr(ie,2)?(c="''",ie+=2):(c=a,0===pe&&_e(K)),c===a&&(E.test(e.charAt(ie))?(c=e.charAt(ie),ie++):(c=a,0===pe&&_e(S)));c!==a;)i.push(c),"''"===e.substr(ie,2)?(c="''",ie+=2):(c=a,0===pe&&_e(K)),c===a&&(E.test(e.charAt(ie))?(c=e.charAt(ie),ie++):(c=a,0===pe&&_e(S)));(o=i!==a?e.substring(o,ie):i)!==a?(39===e.charCodeAt(ie)?(i="'",ie++):(i=a,0===pe&&_e(k)),i===a&&(i=null),i!==a?(ce=t,t=n=r+o.replace("''","'")):(ie=t,t=a)):(ie=t,t=a)}else ie=t,t=a;else ie=t,t=a;return t}function Ue(){var t,n,r,o;return t=ie,n=ie,e.length>ie?(r=e.charAt(ie),ie++):(r=a,0===pe&&_e(h)),r!==a?(ce=ie,(o=(o=X(r))?void 0:a)!==a?n=r=[r,o]:(ie=n,n=a)):(ie=n,n=a),n===a&&(10===e.charCodeAt(ie)?(n="\n",ie++):(n=a,0===pe&&_e(J))),t=n!==a?e.substring(t,ie):n}function ze(){var t,n;return pe++,t=ie,(n=Ve())===a&&(n=qe()),t=n!==a?e.substring(t,ie):n,pe--,t===a&&(n=a,0===pe&&_e(Z)),t}function Ve(){var t,n,r,o,i;if(pe++,t=ie,48===e.charCodeAt(ie)?(n="0",ie++):(n=a,0===pe&&_e(ee)),n!==a&&(ce=t,n=0),(t=n)===a){if(t=ie,n=ie,te.test(e.charAt(ie))?(r=e.charAt(ie),ie++):(r=a,0===pe&&_e(ne)),r!==a){for(o=[],re.test(e.charAt(ie))?(i=e.charAt(ie),ie++):(i=a,0===pe&&_e(ae));i!==a;)o.push(i),re.test(e.charAt(ie))?(i=e.charAt(ie),ie++):(i=a,0===pe&&_e(ae));o!==a?n=r=[r,o]:(ie=n,n=a)}else ie=n,n=a;n!==a&&(ce=t,n=parseInt(n.join(""),10)),t=n}return pe--,t===a&&(n=a,0===pe&&_e($)),t}function qe(){var t,n,r,o,i;if(pe++,t=ie,n=[],r=ie,o=ie,pe++,(i=Me())===a&&(i=Le()),pe--,i===a?o=void 0:(ie=o,o=a),o!==a?(e.length>ie?(i=e.charAt(ie),ie++):(i=a,0===pe&&_e(h)),i!==a?r=o=[o,i]:(ie=r,r=a)):(ie=r,r=a),r!==a)for(;r!==a;)n.push(r),r=ie,o=ie,pe++,(i=Me())===a&&(i=Le()),pe--,i===a?o=void 0:(ie=o,o=a),o!==a?(e.length>ie?(i=e.charAt(ie),ie++):(i=a,0===pe&&_e(h)),i!==a?r=o=[o,i]:(ie=r,r=a)):(ie=r,r=a);else n=a;return t=n!==a?e.substring(t,ie):n,pe--,t===a&&(n=a,0===pe&&_e(oe)),t}var Be=["root"];function We(){return"plural"===Be[Be.length-1]}function He(){return t&&t.captureLocation?{location:de()}:{}}if((n=i())!==a&&ie===e.length)return n;throw n!==a&&ie1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(D,(function(e,n,r){return"."===e?t.maximumFractionDigits=0:"+"===r?t.minimumFractionDigits=r.length:"#"===n[0]?t.maximumFractionDigits=n.length:(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length+("string"==typeof r?r.length:0)),""})),a.options.length&&(t=I(I({},t),N(a.options[0])))}else if(R.test(a.stem))t=I(I({},t),N(a.stem));else{var o=F(a.stem);o&&(t=I(I({},t),o))}}return t}var V,q=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 r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=function(){for(var e=0,t=0,n=arguments.length;t(.*?)<\/([0-9a-zA-Z-_]*?)>)|(<[0-9a-zA-Z-_]*?\/>)/,X=Date.now()+"@@",J=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"];function Z(e,t,n,r,a,o){var i=H(e,t,n,r,a,void 0,o),c={},u=i.reduce((function(e,t){if(0===t.type)return e+t.value;var n=Date.now()+"_"+ ++Q;return c[n]=t.value,e+"@@"+n+"@@"}),"");if(!K.test(u))return Y(u,c);if(!a)throw new W("Message has placeholders but no values was given");if("undefined"==typeof DOMParser)throw new W("Cannot format XML message without DOMParser");V||(V=new DOMParser);var s=V.parseFromString(''+u+"","text/html").getElementById(X);if(!s)throw new W("Malformed HTML message "+u);var l=Object.keys(a).filter((function(e){return!!s.getElementsByTagName(e).length}));if(!l.length)return Y(u,c);var p=l.filter((function(e){return e!==e.toLowerCase()}));if(p.length)throw new W("HTML tag must be lowercased but the following tags are not: "+p.join(", "));return Array.prototype.slice.call(s.childNodes).reduce((function(e,t){return e.concat(function e(t,n,r){var a=t.tagName,o=t.outerHTML,i=t.textContent,c=t.childNodes;if(!a)return Y(i||"",n);a=a.toLowerCase();var u=~J.indexOf(a),s=r[a];if(s&&u)throw new W(a+" is a self-closing tag and can not be used, please use another tag name.");if(!c.length)return[o];var l=Array.prototype.slice.call(c).reduce((function(t,a){return t.concat(e(a,n,r))}),[]);return s?"function"==typeof s?[s.apply(void 0,l)]:[s]:B(["<"+a+">"],l,[""])}(t,c,a))}),[])}var $=function(){return($=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<"']/g;function oe(e){return(""+e).replace(ae,(function(e){return re[e.charCodeAt(0)]}))}function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.reduce((function(t,r){return r in e?t[r]=e[r]:r in n&&(t[r]=n[r]),t}),{})}function ce(e){ne(e,"[React Intl] Could not find required `intl` object. needs to exist in the component ancestry.")}function ue(e,t){var n=t?"\n".concat(t.stack):"";return"[React Intl] ".concat(e).concat(n)}var se={formats:{},messages:{},timeZone:void 0,textComponent:u.Fragment,defaultLocale:"en",defaultFormats:{},onError:function(e){0}};function le(e,t,n,r){var a,o=e&&e[t];if(o&&(a=o[n]),a)return a;r(ue("No ".concat(t," format named: ").concat(n)))}l.a;var pe=u.createContext(null),fe=(pe.Consumer,pe.Provider);var de=n("kyWZ"),he=n.n(de),me=["localeMatcher","style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay"];function be(e,t){var n=e.locale,r=e.formats,a=e.onError,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.format,c=i&&le(r,"number",i,a)||{},u=ie(o,me,c);return t(n,u)}function ye(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{return be(e,t,r).format(n)}catch(t){e.onError(ue("Error formatting number.",t))}return String(n)}function ve(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{return be(e,t,r).formatToParts(n)}catch(t){e.onError(ue("Error formatting number.",t))}return[]}var ge=["numeric","style"];function _e(e,t){var n=e.locale,r=e.formats,a=e.onError,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.format,c=!!i&&le(r,"relative",i,a)||{},u=ie(o,ge,c);return t(n,u)}function xe(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};r||(r="second");var o=Intl.RelativeTimeFormat;o||e.onError(ue('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n'));try{return _e(e,t,a).format(n,r)}catch(t){e.onError(ue("Error formatting relative time.",t))}return String(n)}var we=["localeMatcher","formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function je(e,t,n){var r=e.locale,a=e.formats,o=e.onError,i=e.timeZone,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=c.format,s=Object.assign(Object.assign({},i&&{timeZone:i}),u&&le(a,t,u,o)),l=ie(c,we,s);return"time"!==t||l.hour||l.minute||l.second||(l=Object.assign(Object.assign({},l),{hour:"numeric",minute:"numeric"})),n(r,l)}function Oe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a="string"==typeof n?new Date(n||0):n;try{return je(e,"date",t,r).format(a)}catch(t){e.onError(ue("Error formatting date.",t))}return String(a)}function ke(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a="string"==typeof n?new Date(n||0):n;try{return je(e,"time",t,r).format(a)}catch(t){e.onError(ue("Error formatting time.",t))}return String(a)}function Ee(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a="string"==typeof n?new Date(n||0):n;try{return je(e,"date",t,r).formatToParts(a)}catch(t){e.onError(ue("Error formatting date.",t))}return[]}function Se(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a="string"==typeof n?new Date(n||0):n;try{return je(e,"time",t,r).formatToParts(a)}catch(t){e.onError(ue("Error formatting time.",t))}return[]}var Pe=["localeMatcher","type"];function Ce(e,t,n){var r=e.locale,a=e.onError,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Intl.PluralRules||a(ue('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n'));var i=ie(o,Pe);try{return t(r,i).select(n)}catch(e){a(ue("Error formatting plural.",e))}return"other"}var Te=n("oBTY");function Ae(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=Object.assign({timeZone:t},e[r]),n}),{})}function Ie(e,t){return Object.keys(Object.assign(Object.assign({},e),t)).reduce((function(n,r){return n[r]=Object.assign(Object.assign({},e[r]||{}),t[r]||{}),n}),{})}function Me(e,t){if(!t)return e;var n=te.formats;return Object.assign(Object.assign(Object.assign({},n),e),{date:Ie(Ae(n.date,t),Ae(e.date||{},t)),time:Ie(Ae(n.time,t),Ae(e.time||{},t))})}var Le=function(e){return u.createElement.apply(u,[u.Fragment,null].concat(Object(Te.a)(e)))};function De(e,t){var n=e.locale,r=e.formats,a=e.messages,o=e.defaultLocale,i=e.defaultFormats,c=e.onError,u=e.timeZone,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{id:""},l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},p=s.id,f=s.defaultMessage;ne(!!p,"[React Intl] An `id` must be provided to format a message.");var d=a&&a[String(p)];r=Me(r,u),i=Me(i,u);var h=[];if(d)try{var m=t.getMessageFormat(d,n,r,{formatters:t});h=m.formatHTMLMessage(l)}catch(e){c(ue('Error formatting message: "'.concat(p,'" for locale: "').concat(n,'"')+(f?", using default message as fallback.":""),e))}else(!f||n&&n.toLowerCase()!==o.toLowerCase())&&c(ue('Missing message: "'.concat(p,'" for locale: "').concat(n,'"')+(f?", using default message as fallback.":"")));if(!h.length&&f)try{var b=t.getMessageFormat(f,o,i);h=b.formatHTMLMessage(l)}catch(e){c(ue('Error formatting the default message for: "'.concat(p,'"'),e))}return h.length?1===h.length&&"string"==typeof h[0]?h[0]||f||String(p):Le(h):(c(ue('Cannot format message: "'.concat(p,'", ')+"using message ".concat(d||f?"source":"id"," as fallback."))),"string"==typeof d?d||f||String(p):f||String(p))}function Re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{id:""},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=Object.keys(r).reduce((function(e,t){var n=r[t];return e[t]="string"==typeof n?oe(n):n,e}),{});return De(e,t,n,a)}var Ne=n("6koa"),Fe=n.n(Ne),Ue=["localeMatcher","type","style"],ze=Date.now();function Ve(e){return"".concat(ze,"_").concat(e,"_").concat(ze)}function qe(e,t,n){var r=e.locale,a=e.onError,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=Intl.ListFormat;i||a(ue('Intl.ListFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-listformat"\n'));var c=ie(o,Ue);try{var u={},s=n.map((function(e,t){if("object"==typeof e){var n=Ve(t);return u[n]=e,n}return String(e)}));if(!Object.keys(u).length)return t(r,c).format(s);var l=t(r,c).formatToParts(s);return l.reduce((function(e,t){var n=t.value;return u[n]?e.push(u[n]):"string"==typeof e[e.length-1]?e[e.length-1]+=n:e.push(n),e}),[])}catch(e){a(ue("Error formatting list.",e))}return n}var Be=["localeMatcher","style","type","fallback"];function We(e,t,n){var r=e.locale,a=e.onError,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=Intl.DisplayNames;i||a(ue('Intl.DisplayNames is not available in this environment.\nTry polyfilling it using "@formatjs/intl-displaynames"\n'));var c=ie(o,Be);try{return t(r,c).of(n)}catch(e){a(ue("Error formatting display name.",e))}}var He=Fe.a||Ne;function Ge(e){return{locale:e.locale,timeZone:e.timeZone,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError}}function Qe(e,t){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames;return{getDateTimeFormat:A(Intl.DateTimeFormat,e.dateTime),getNumberFormat:A(Intl.NumberFormat,e.number),getMessageFormat:A(te,e.message),getRelativeTimeFormat:A(t,e.relativeTime),getPluralRules:A(Intl.PluralRules,e.pluralRules),getListFormat:A(n,e.list),getDisplayNames:A(r,e.displayNames)}}(t),r=Object.assign(Object.assign({},se),e);if(!r.locale||!he()(r.locale)){var a=r.locale,o=r.defaultLocale,i=r.onError;"function"==typeof i&&i(ue('Missing locale data for locale: "'.concat(a,'". ')+'Using default locale: "'.concat(o,'" as fallback.'))),r.locale=r.defaultLocale||"en"}return Object.assign(Object.assign({},r),{formatters:n,formatNumber:ye.bind(null,r,n.getNumberFormat),formatNumberToParts:ve.bind(null,r,n.getNumberFormat),formatRelativeTime:xe.bind(null,r,n.getRelativeTimeFormat),formatDate:Oe.bind(null,r,n.getDateTimeFormat),formatDateToParts:Ee.bind(null,r,n.getDateTimeFormat),formatTime:ke.bind(null,r,n.getDateTimeFormat),formatTimeToParts:Se.bind(null,r,n.getDateTimeFormat),formatPlural:Ce.bind(null,r,n.getPluralRules),formatMessage:De.bind(null,r,n),formatHTMLMessage:Re.bind(null,r,n),formatList:qe.bind(null,r,n.getListFormat),formatDisplayName:We.bind(null,r,n.getDisplayNames)})}var Ye=function(e){Object(i.a)(n,e);var t=Object(c.a)(n);function n(){var e;return Object(a.a)(this,n),(e=t.apply(this,arguments)).cache={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},e.state={cache:e.cache,intl:Qe(Ge(e.props),e.cache),prevConfig:Ge(e.props)},e}return Object(o.a)(n,[{key:"render",value:function(){return ce(this.state.intl),u.createElement(fe,{value:this.state.intl},this.props.children)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevConfig,r=t.cache,a=Ge(e);return He(n,a)?null:{intl:Qe(a,r),prevConfig:a}}}]),n}(u.PureComponent);Ye.displayName="IntlProvider",Ye.defaultProps=se;var Ke,Xe=n("LtsZ"),Je=n("ZW6p"),Ze=n("2W6z"),$e=n.n(Ze),et=n("9kvl"),tt={},nt=function(e,t){return!Ke||t||e?e&&tt[e]?Qe(tt[e]):($e()(!e||!!tt[e],"The current popular language does not exist, please check the locales folder!"),tt["zh-CN"]?Qe(tt["zh-CN"]):Qe({locale:"zh-CN",messages:{}})):Ke},rt=function(e){Ke=nt(e,!0)},at=function(){var e=et.e.applyPlugins({key:"locale",type:Xe.a.modify,initialValue:{}});if("function"==typeof(null==e?void 0:e.getLocale))return e.getLocale();var t,n="undefined"!=typeof localStorage?window.localStorage.getItem("umi_locale"):"";return t="undefined"!=typeof navigator&&"string"==typeof navigator.language?navigator.language.split("-").join("-"):"",n||t||"zh-CN"},ot=function(){var e=at();return["he","ar","fa","ku"].filter((function(t){return e.startsWith(t)})).length?"rtl":"ltr"},it=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=new RegExp("^([a-z]{2})-?([A-Z]{2})?$"),r=et.e.applyPlugins({key:"locale",type:Xe.a.modify,initialValue:{}});if("function"!=typeof(null==r?void 0:r.setLocale)){if(void 0!==e&&!n.test(e))throw new Error("setLocale lang format error");if(at()!==e)if(void 0!==window.localStorage&&window.localStorage.setItem("umi_locale",e||""),rt(e),t)window.location.reload();else if(Je.d.emit(Je.a,e),window.dispatchEvent){var a=new Event("languagechange");window.dispatchEvent(a)}}else r.setLocale({lang:e,realReload:t,updater:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;return Je.d.emit(Je.a,t)}})}},FoZm: +/*!************************************!*\ + !*** ./node_modules/intl/index.js ***! + \************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(t){t.IntlPolyfill=n(/*! ./lib/core.js */"fL0r"),n(/*! ./locale-data/complete.js */1),t.Intl||(t.Intl=t.IntlPolyfill,t.IntlPolyfill.__applyLocaleSensitivePrototypes()),e.exports=t.IntlPolyfill}).call(this,n(/*! ./../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},FpZJ: +/*!*******************************************!*\ + !*** ./node_modules/has-symbols/shams.js ***! + \*******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},Fs9M: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/native-symbol.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/fails */"MVys");e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},FuvP: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.of.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Set",stat:!0},{of:n(/*! ../internals/collection-of */"qA1w")})},FzKp: +/*!*****************************************!*\ + !*** ./src/models/classrooms/boards.ts ***! + \*****************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/boards */"oXNe"),c={namespace:"boards",state:{name:"讨论",loading:!0,actionTabs:{},boardsDetail:{},boardsCategoryList:{}},effects:{getBoardsCategoryList: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.d,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{boardsCategoryList:Object(r.a)({},s.data)}});case 7:return e.abrupt("return",s.data);case 8:case"end":return e.stop()}}),e)})),getBoardsDetail: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.e,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{boardsDetail:Object(r.a)({},s.data)}});case 7:return e.abrupt("return",s.data);case 8:case"end":return e.stop()}}),e)})),setTopping: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,t.callback,a=n.call,n.put,e.next=4,a(i.i,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),escTopping: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,t.callback,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)})),getReplyList: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.f,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{replyList:Object(r.a)({},s.data)}});case 7:case"end":return e.stop()}}),e)})),createReply: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,t.callback,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)})),replyLike: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,t.callback,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)})),replyUnLike: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,t.callback,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)})),deleteReply: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,t.callback,a=n.call,n.put,e.next=4,a(i.b,r);case 4:return e.abrupt("return",e.sent);case 5: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 Object(r.a)(Object(r.a)({},e),t.payload)}},subscriptions:{setup:function(e){e.dispatch,e.history}}};t.a=c},"G+G9": +/*!**********************************!*\ + !*** ./src/models/user/index.ts ***! + \**********************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */"PpiC"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! umi */"9kvl"),u=n(/*! @/service/user */"jb+D"),s={namespace:"user",state:{name:"用户登录模块",showPopLogin:!1,showClosable:!1,userInfo:{},navigationInfo:{},loading:!0,actionTabs:{key:"",params:{},phone:""}},effects:{login:i.a.mark((function e(t,n){var r,o,s,l;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,n.put,s=r.to,l=Object(a.a)(r,["to"]),e.next=5,o(u.b,l);case 5:if(!e.sent.status)try{s?c.d.replace(s):location.reload()}catch(e){}case 7:case"end":return e.stop()}}),e)})),showPopLogin:i.a.mark((function e(t,n){var r,a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.put,e.next=4,a({type:"save",payload:{showPopLogin:r.showPopLogin,showClosable:r.showClosable}});case 4:case"end":return e.stop()}}),e)})),getUserInfo:i.a.mark((function e(t,n){var a,o,c,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,o=n.call,c=n.put,e.next=4,o(u.x,Object(r.a)({},a));case 4:return s=e.sent,localStorage.userInfo=JSON.stringify(s),e.next=8,c({type:"save",payload:{userInfo:Object(r.a)({},s)}});case 8:case"end":return e.stop()}}),e)})),getNavigationInfo:i.a.mark((function e(t,n){var a,o,c,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,o=n.call,c=n.put,e.next=4,o(u.q,Object(r.a)({},a));case 4:return s=e.sent,e.next=7,c({type:"save",payload:{navigationInfo:Object(r.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),setActionTabs:i.a.mark((function e(t,n){var a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,n.call,o=n.put,e.next=4,o({type:"save",payload:{actionTabs:Object(r.a)({},a)}});case 4:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return Object(r.a)(Object(r.a)({},e),t.payload)}}};t.a=s},GNqc: +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/array-buffer-native.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},GPZX: +/*!************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.reflect.delete-metadata.js ***! + \************************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/reflect-metadata */"ls1J"),o=n(/*! ../internals/an-object */"f1E4"),i=a.toKey,c=a.getMap,u=a.store;r({target:"Reflect",stat:!0},{deleteMetadata:function(e,t){var n=arguments.length<3?void 0:i(arguments[2]),r=c(o(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var a=u.get(t);return a.delete(n),!!a.size||u.delete(t)}})},GPrf: +/*!**************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/check-correctness-of-iteration.js ***! + \**************************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/well-known-symbol */"2kyd")("iterator"),a=!1;try{var o=0,i={next:function(){return{done:!!o++}},return:function(){a=!0}};i[r]=function(){return this},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},GYRj: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.math.log10.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=Math.log,o=Math.LOG10E;r({target:"Math",stat:!0},{log10:function(e){return a(e)*o}})},"Gw+j": +/*!*************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.symmetric-difference.js ***! + \*************************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/get-built-in */"29mP"),i=n(/*! ../internals/an-object */"f1E4"),c=n(/*! ../internals/a-function */"cT1L"),u=n(/*! ../internals/species-constructor */"/dTS"),s=n(/*! ../internals/iterate */"IuhT");r({target:"Set",proto:!0,real:!0,forced:a},{symmetricDifference:function(e){var t=i(this),n=new(u(t,o("Set")))(t),r=c(n.delete),a=c(n.add);return s(e,(function(e){r.call(n,e)||a.call(n,e)})),n}})},H4Hi: +/*!****************************************!*\ + !*** ./src/layouts/index.less?modules ***! + \****************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={loading:"loading___Pj8IT",layoutMainClass:"layoutMainClass___Z79Lq"}},H4fg: +/*!*******************************************************!*\ + !*** ./node_modules/rc-pagination/es/locale/en_US.js ***! + \*******************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";t.a={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"}},H8Ov: +/*!****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.symbol.to-primitive.js ***! + \****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/define-well-known-symbol */"I65O")("toPrimitive")},HBuW: +/*!********************************!*\ + !*** ./src/service/shixuns.ts ***! + \********************************/ +/*! exports provided: getShixunsList, getShixunsMenus, getShixunsDetail, getRightData, getChallengesData, execJupyter, execShixun, openChallenge, challengeMoveUp, challengeMoveDown, cancelCollect, collect, searchUserCourses, sendToCourse, cancelRelease, cancelPublic, applyPublic, release, getNewShixunsData, deleteAttachment, applyShixunMirror, submitShixuns, getShixunsJupyterLab, getAuditSituationData, updateAuditSituation, getCollaboratorsData, addCollaborator, addTeachGroupMember, getChangeManager, changeManager, deleteCollaborators, getRankingList, getSettingsData, getMirrorScript, getScriptContent, getCustomScript, updateSettingBasicInfo, getShixunQuote, deleteShixun, permanentClose, getDepartments, updatePermissionSetting, updateLearnSetting, updateSetting, getSetData, deleteDataSet, getChallengesNew, addChallengesNew, getChallengePractice, updateChallengesNew, getQuestionList, updateChallenges, deleteChallengesNew, getChallengesEdit, getChallengesAnswer, updateChallengesAnswer, addChallengesQuestion, updateChallengesQuestion, deleteChallengesQuestion, upChallengesQuestion, downChallengesQuestion, getEditChallengesQuestion, deleteGitFile, deleteGitFiles, moveGitFile, moveGitFiles, getRepository, getRepositorys, getSecretRepository, addRepositoryFile, addRepositoryFiles, getRepositoryCommit, getFileContent, getFileContents, updateRepositoryFile, updateRepositoryFiles, uploadGitFolder, resetMyGame, getInfoWithTPM, getTimeInfoWithTPM, resetWithTPM, saveWithTPM, activeWithTPM, getForkList, updateCollaboratorEditable, setSecretDir, getEnvironmentData, getEnvironmentDetail, createRepository, createRepositorys, createSecretRepository, existExercise, getMirrorApplies, mirrorAppliesPublish, mirrorAppliesOpenVnc, mirrorAppliesOpenWebssh, mirrorAppliesSaveImage, mirrorAppliesDeleteImage, mirrorAppliesExtendVnc, mirrorAppliesResetVncLink, getTaskPass, getInfoWithJupyterLab, updateJupyterLabSetting */ +/*! exports used: activeWithTPM, addChallengesNew, addChallengesQuestion, addCollaborator, addRepositoryFile, addRepositoryFiles, addTeachGroupMember, applyPublic, applyShixunMirror, cancelCollect, cancelPublic, cancelRelease, challengeMoveDown, challengeMoveUp, changeManager, collect, createRepository, createRepositorys, createSecretRepository, deleteAttachment, deleteChallengesNew, deleteChallengesQuestion, deleteCollaborators, deleteDataSet, deleteGitFile, deleteGitFiles, deleteShixun, downChallengesQuestion, execJupyter, execShixun, existExercise, getAuditSituationData, getChallengePractice, getChallengesAnswer, getChallengesData, getChallengesEdit, getChallengesNew, getChangeManager, getCollaboratorsData, getCustomScript, getDepartments, getEditChallengesQuestion, getEnvironmentData, getEnvironmentDetail, getFileContent, getFileContents, getForkList, getInfoWithJupyterLab, getInfoWithTPM, getMirrorApplies, getMirrorScript, getNewShixunsData, getQuestionList, getRankingList, getRepository, getRepositoryCommit, getRepositorys, getRightData, getScriptContent, getSecretRepository, getSetData, getSettingsData, getShixunQuote, getShixunsDetail, getShixunsJupyterLab, getShixunsList, getShixunsMenus, getTaskPass, getTimeInfoWithTPM, mirrorAppliesOpenVnc, mirrorAppliesOpenWebssh, mirrorAppliesPublish, mirrorAppliesSaveImage, moveGitFile, moveGitFiles, openChallenge, permanentClose, release, resetMyGame, resetWithTPM, saveWithTPM, searchUserCourses, sendToCourse, setSecretDir, submitShixuns, upChallengesQuestion, updateAuditSituation, updateChallenges, updateChallengesAnswer, updateChallengesNew, updateChallengesQuestion, updateCollaboratorEditable, updateJupyterLabSetting, updateLearnSetting, updatePermissionSetting, updateRepositoryFile, updateRepositoryFiles, updateSetting, updateSettingBasicInfo, uploadGitFolder */function(e,t,n){"use strict";n.d(t,"nb",(function(){return u})),n.d(t,"ob",(function(){return l})),n.d(t,"lb",(function(){return f})),n.d(t,"fb",(function(){return h})),n.d(t,"I",(function(){return b})),n.d(t,"C",(function(){return v})),n.d(t,"D",(function(){return _})),n.d(t,"xb",(function(){return w})),n.d(t,"n",(function(){return O})),n.d(t,"m",(function(){return E})),n.d(t,"j",(function(){return P})),n.d(t,"p",(function(){return T})),n.d(t,"Db",(function(){return I})),n.d(t,"Eb",(function(){return L})),n.d(t,"l",(function(){return R})),n.d(t,"k",(function(){return F})),n.d(t,"h",(function(){return z})),n.d(t,"zb",(function(){return q})),n.d(t,"Z",(function(){return W})),n.d(t,"t",(function(){return G})),n.d(t,"i",(function(){return Y})),n.d(t,"Gb",(function(){return X})),n.d(t,"mb",(function(){return Z})),n.d(t,"F",(function(){return ee})),n.d(t,"Ib",(function(){return ne})),n.d(t,"M",(function(){return ae})),n.d(t,"d",(function(){return ie})),n.d(t,"g",(function(){return ue})),n.d(t,"L",(function(){return le})),n.d(t,"o",(function(){return fe})),n.d(t,"w",(function(){return he})),n.d(t,"bb",(function(){return be})),n.d(t,"jb",(function(){return ve})),n.d(t,"Y",(function(){return _e})),n.d(t,"gb",(function(){return we})),n.d(t,"N",(function(){return Oe})),n.d(t,"Ub",(function(){return Ee})),n.d(t,"kb",(function(){return Pe})),n.d(t,"A",(function(){return Te})),n.d(t,"yb",(function(){return Ie})),n.d(t,"O",(function(){return Le})),n.d(t,"Qb",(function(){return Re})),n.d(t,"Pb",(function(){return Fe})),n.d(t,"Tb",(function(){return ze})),n.d(t,"ib",(function(){return qe})),n.d(t,"x",(function(){return We})),n.d(t,"K",(function(){return Ge})),n.d(t,"b",(function(){return Ye})),n.d(t,"G",(function(){return Xe})),n.d(t,"Lb",(function(){return Ze})),n.d(t,"ab",(function(){return et})),n.d(t,"Jb",(function(){return nt})),n.d(t,"u",(function(){return at})),n.d(t,"J",(function(){return it})),n.d(t,"H",(function(){return ut})),n.d(t,"Kb",(function(){return lt})),n.d(t,"c",(function(){return ft})),n.d(t,"Mb",(function(){return ht})),n.d(t,"v",(function(){return bt})),n.d(t,"Hb",(function(){return vt})),n.d(t,"B",(function(){return _t})),n.d(t,"P",(function(){return wt})),n.d(t,"y",(function(){return Ot})),n.d(t,"z",(function(){return Et})),n.d(t,"vb",(function(){return Pt})),n.d(t,"wb",(function(){return Tt})),n.d(t,"cb",(function(){return It})),n.d(t,"eb",(function(){return Lt})),n.d(t,"hb",(function(){return Rt})),n.d(t,"e",(function(){return Ft})),n.d(t,"f",(function(){return zt})),n.d(t,"db",(function(){return qt})),n.d(t,"S",(function(){return Wt})),n.d(t,"T",(function(){return Gt})),n.d(t,"Rb",(function(){return Yt})),n.d(t,"Sb",(function(){return Xt})),n.d(t,"Vb",(function(){return Zt})),n.d(t,"Ab",(function(){return en})),n.d(t,"W",(function(){return nn})),n.d(t,"qb",(function(){return an})),n.d(t,"Bb",(function(){return cn})),n.d(t,"Cb",(function(){return sn})),n.d(t,"a",(function(){return pn})),n.d(t,"U",(function(){return dn})),n.d(t,"Nb",(function(){return mn})),n.d(t,"Fb",(function(){return yn})),n.d(t,"Q",(function(){return gn})),n.d(t,"R",(function(){return xn})),n.d(t,"q",(function(){return jn})),n.d(t,"r",(function(){return kn})),n.d(t,"s",(function(){return Sn})),n.d(t,"E",(function(){return Cn})),n.d(t,"X",(function(){return An})),n.d(t,"tb",(function(){return Mn})),n.d(t,"rb",(function(){return Dn})),n.d(t,"sb",(function(){return Nn})),n.d(t,"ub",(function(){return Un})),n.d(t,"pb",(function(){return Vn})),n.d(t,"V",(function(){return Bn})),n.d(t,"Ob",(function(){return Hn}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/utils/fetch */"ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns.json",{method:"Get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/disciplines.json",{method:"Get",params:Object(r.a)({source:"shixun"},t||{})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,".json"),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/show_right.json"),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges.json"),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/jupyter_exec.json").concat(t.reset?"?reset=".concat(t.reset):""),{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/shixun_exec.json").concat(t.reset?"?reset=".concat(t.reset):""),{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return j.apply(this,arguments)}function j(){return(j=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)(t.url,{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return k.apply(this,arguments)}function k(){return(k=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.shixun_identifier,"/challenges/").concat(t.challenge_id,"/index_up.json"),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return S.apply(this,arguments)}function S(){return(S=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.shixun_identifier,"/challenges/").concat(t.challenge_id,"/index_down.json"),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/collections/cancel.json",{method:"Delete",body:{container_id:t.container_id,container_type:t.container_type}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return A.apply(this,arguments)}function A(){return(A=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/collections.json",{method:"Post",body:{container_id:t.container_id,container_type:t.container_type}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e){return M.apply(this,arguments)}function M(){return(M=Object(a.a)(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t||{}).id,e.abrupt("return",Object(c.a)("/api/shixuns/".concat(n,"/search_user_courses.json"),{method:"Get",params:t}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(e){return D.apply(this,arguments)}function D(){return(D=Object(a.a)(i.a.mark((function e(t){var n,r,a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(n=t||{}).id,a=n.course_id,e.abrupt("return",Object(c.a)("/api/shixuns/".concat(r,"/send_to_course.json"),{method:"Post",body:{course_id:a}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e){return N.apply(this,arguments)}function N(){return(N=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/cancel_publish.json"),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e){return U.apply(this,arguments)}function U(){return(U=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/cancel_apply_public.json"),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(e){return V.apply(this,arguments)}function V(){return(V=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/apply_public.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(e){return B.apply(this,arguments)}function B(){return(B=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/publish.json"),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function W(e){return H.apply(this,arguments)}function H(){return(H=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/jupyter_new.json",{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(e){return Q.apply(this,arguments)}function Q(){return(Q=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/attachments/".concat(t.id,".json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(e){return K.apply(this,arguments)}function K(){return(K=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/apply_shixun_mirror.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(e){return J.apply(this,arguments)}function J(){return(J=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(e){return $.apply(this,arguments)}function $(){return($=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/jupyter_lab_new.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(e){return te.apply(this,arguments)}function te(){return(te=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/review_newest_record.json"),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(e){return re.apply(this,arguments)}function re(){return(re=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/review_shixun.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ae(e){return oe.apply(this,arguments)}function oe(){return(oe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/collaborators.json"),{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ie(e){return ce.apply(this,arguments)}function ce(){return(ce=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/shixun_members_added.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ue(e){return se.apply(this,arguments)}function se(){return(se=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.identifier,"/add_members_group.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function le(e){return pe.apply(this,arguments)}function pe(){return(pe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/change_manager.json"),{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fe(e){return de.apply(this,arguments)}function de(){return(de=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/change_manager.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function he(e){return me.apply(this,arguments)}function me(){return(me=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/collaborators_delete.json?user_id=").concat(t.userId),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function be(e){return ye.apply(this,arguments)}function ye(){return(ye=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/ranking_list.json"),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ve(e){return ge.apply(this,arguments)}function ge(){return(ge=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/settings.json"),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _e(e){return xe.apply(this,arguments)}function xe(){return(xe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/get_mirror_script.json?mirror_id=".concat(t.mirror_id),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function we(e){return je.apply(this,arguments)}function je(){return(je=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/get_script_contents.json"),{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Oe(e){return ke.apply(this,arguments)}function ke(){return(ke=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/get_custom_script.json"),{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ee(e){return Se.apply(this,arguments)}function Se(){return(Se=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/update_for_jupyter.json"),{method:"put",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pe(e){return Ce.apply(this,arguments)}function Ce(){return(Ce=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/shixun_quotes.json"),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Te(e){return Ae.apply(this,arguments)}function Ae(){return(Ae=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,".json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ie(e){return Me.apply(this,arguments)}function Me(){return(Me=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/close.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Le(e){return De.apply(this,arguments)}function De(){return(De=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/departments.json",{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Re(e){return Ne.apply(this,arguments)}function Ne(){return(Ne=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/update_permission_setting.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fe(e){return Ue.apply(this,arguments)}function Ue(){return(Ue=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/update_learn_setting.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ze(e){return Ve.apply(this,arguments)}function Ve(){return(Ve=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/update_setting"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qe(e){return Be.apply(this,arguments)}function Be(){return(Be=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/get_data_sets.json"),{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function We(e){return He.apply(this,arguments)}function He(){return(He=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/destroy_data_sets.json"),{method:"Delete",body:{id:t.deleteId}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ge(e){return Qe.apply(this,arguments)}function Qe(){return(Qe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/new.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ye(e){return Ke.apply(this,arguments)}function Ke(){return(Ke=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.identifier,"/challenges.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xe(e){return Je.apply(this,arguments)}function Je(){return(Je=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/").concat(t.challengeId,"/edit.json?tab=").concat(t.tab),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ze(e){return $e.apply(this,arguments)}function $e(){return($e=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/").concat(t.challengesId,".json"),{method:"put",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function et(e){return tt.apply(this,arguments)}function tt(){return(tt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/").concat(t.challengesId,"/choose_questions.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nt(e){return rt.apply(this,arguments)}function rt(){return(rt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/move_position.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function at(e){return ot.apply(this,arguments)}function ot(){return(ot=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/").concat(t.challengesId,".json"),{method:"delete",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function it(e){return ct.apply(this,arguments)}function ct(){return(ct=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/").concat(t.challengesId,"/edit.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ut(e){return st.apply(this,arguments)}function st(){return(st=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/").concat(t.challengeId,"/answer.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lt(e){return pt.apply(this,arguments)}function pt(){return(pt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/").concat(t.challengeId,"/crud_answer.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ft(e){return dt.apply(this,arguments)}function dt(){return(dt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/").concat(t.challengesId,"/create_choose_question.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ht(e){return mt.apply(this,arguments)}function mt(){return(mt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/").concat(t.challengesId,"/update_choose_question.json?choose_id=").concat(t.questionId),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bt(e){return yt.apply(this,arguments)}function yt(){return(yt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/").concat(t.challengesId,"/destroy_challenge_choose.json"),{method:"Delete",body:{choose_id:t.questionId}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vt(e){return gt.apply(this,arguments)}function gt(){return(gt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/").concat(t.challengesId,"/choose_question_up_position.json"),{method:"post",body:{challenge_choose_id:t.questionId}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _t(e){return xt.apply(this,arguments)}function xt(){return(xt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/").concat(t.challengesId,"/choose_question_down_position.json"),{method:"post",body:{challenge_choose_id:t.questionId}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wt(e){return jt.apply(this,arguments)}function jt(){return(jt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/challenges/").concat(t.challengesId,"/edit_choose_question.json?choose_id=").concat(t.questionId),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ot(e){return kt.apply(this,arguments)}function kt(){return(kt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/delete_git_file.json"),{method:"Delete",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Et(e){return St.apply(this,arguments)}function St(){return(St=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/sci/projects/".concat(t.id,"/delete_git_file.json"),{method:"Delete",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pt(e){return Ct.apply(this,arguments)}function Ct(){return(Ct=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/mv_file.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Tt(e){return At.apply(this,arguments)}function At(){return(At=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/sci/projects/".concat(t.id,"/mv_file.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function It(e){return Mt.apply(this,arguments)}function Mt(){return(Mt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/repository.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lt(e){return Dt.apply(this,arguments)}function Dt(){return(Dt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/sci/projects/".concat(t.id,"/repository.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Rt(e){return Nt.apply(this,arguments)}function Nt(){return(Nt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/secret_repository.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ft(e){return Ut.apply(this,arguments)}function Ut(){return(Ut=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/add_file.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zt(e){return Vt.apply(this,arguments)}function Vt(){return(Vt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/sci/projects/".concat(t.id,"/add_file.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qt(e){return Bt.apply(this,arguments)}function Bt(){return(Bt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/commits.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wt(e){return Ht.apply(this,arguments)}function Ht(){return(Ht=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/file_content.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gt(e){return Qt.apply(this,arguments)}function Qt(){return(Qt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/sci/projects/".concat(t.id,"/file_content.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Yt(e){return Kt.apply(this,arguments)}function Kt(){return(Kt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/update_file.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xt(e){return Jt.apply(this,arguments)}function Jt(){return(Jt=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/sci/projects/".concat(t.id,"/update_file.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Zt(e){return $t.apply(this,arguments)}function $t(){return($t=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/upload_git_folder.json"),{method:"post",body:{path:t.path,secret_repository:t.secret_repository}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function en(e){return tn.apply(this,arguments)}function tn(){return(tn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/".concat(t.url),{method:"Get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nn(e){return rn.apply(this,arguments)}function rn(){return(rn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/jupyters/get_info_with_tpm.json",{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function an(e){return on.apply(this,arguments)}function on(){return(on=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/jupyters/timeinfo_with_tpm.json",{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function cn(e){return un.apply(this,arguments)}function un(){return(un=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/jupyters/reset_with_tpm.json",{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function sn(e){return ln.apply(this,arguments)}function ln(){return(ln=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/jupyters/save_with_tpm.json",{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pn(e){return fn.apply(this,arguments)}function fn(){return(fn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/jupyters/active_with_tpm.json",{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function dn(e){return hn.apply(this,arguments)}function hn(){return(hn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/fork_list.json"),{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mn(e){return bn.apply(this,arguments)}function bn(){return(bn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.identifier,"/change_editable.json"),{method:"put",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yn(e){return vn.apply(this,arguments)}function vn(){return(vn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/set_secret_dir.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gn(e){return _n.apply(this,arguments)}function _n(){return(_n=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/new.json",{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xn(e){return wn.apply(this,arguments)}function wn(){return(wn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/environment_info",{method:"Get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jn(e){return On.apply(this,arguments)}function On(){return(On=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/init_repository.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kn(e){return En.apply(this,arguments)}function En(){return(En=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/sci/projects/".concat(t.id,"/init_repository.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Sn(e){return Pn.apply(this,arguments)}function Pn(){return(Pn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/update_secret_repository.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Cn(e){return Tn.apply(this,arguments)}function Tn(){return(Tn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/exist_exercise.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function An(e){return In.apply(this,arguments)}function In(){return(In=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/mirror_applies/".concat(t.id,".json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mn(e){return Ln.apply(this,arguments)}function Ln(){return(Ln=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/mirror_applies/".concat(t.id,"/publish.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Dn(e){return Rn.apply(this,arguments)}function Rn(){return(Rn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/mirror_applies/".concat(t.id,"/open_vnc.json"),{method:"post",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nn(e){return Fn.apply(this,arguments)}function Fn(){return(Fn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/mirror_applies/".concat(t.id,"/open_webssh.json"),{method:"post",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Un(e){return zn.apply(this,arguments)}function zn(){return(zn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/mirror_applies/".concat(t.id,"/save_image.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vn(e){return qn.apply(this,arguments)}function qn(){return(qn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/get_task_pass.json",{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Bn(e){return Wn.apply(this,arguments)}function Wn(){return(Wn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/jupyters/get_info_with_jupyter_lab.json",{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Hn(e){return Gn.apply(this,arguments)}function Gn(){return(Gn=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/shixuns/".concat(t.id,"/update_jupyter_lab_setting.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},HKQd: +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/string-trim-forced.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/fails */"MVys"),a=n(/*! ../internals/whitespaces */"Tfd0");e.exports=function(e){return r((function(){return!!a[e]()||"​…᠎"!="​…᠎"[e]()||a[e].name!==e}))}},HQPm: +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.string.match-all.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ./es.string.match-all */"bPAU")},"HaE+": +/*!*********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e,t,n,r,a,o,i){try{var c=e[o](i),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,o){var i=e.apply(t,n);function c(e){r(i,a,o,c,u,"next",e)}function u(e){r(i,a,o,c,u,"throw",e)}c(void 0)}))}}n.d(t,"a",(function(){return a}))},HctQ: +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/object-define-properties.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/descriptors */"tny8"),a=n(/*! ../internals/object-define-property */"YfKC"),o=n(/*! ../internals/an-object */"f1E4"),i=n(/*! ../internals/object-keys */"P0e2");e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=i(t),c=r.length,u=0;c>u;)a.f(e,n=r[u++],t[n]);return e}},HhvW: +/*!**********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/create-property-descriptor.js ***! + \**********************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},HjuX: +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.entries.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/object-to-array */"CdV7").entries;r({target:"Object",stat:!0},{entries:function(e){return a(e)}})},"I5+W": +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.of.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-buffer-view-core */"FVwB"),a=n(/*! ../internals/typed-array-constructors-require-wrappers */"8OQV"),o=r.aTypedArrayConstructor;(0,r.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(o(this))(t);t>e;)n[e]=arguments[e++];return n}),a)},I5X1: +/*!*******************************************************!*\ + !*** ./src/.umi-production/plugin-model/useModel.tsx ***! + \*******************************************************/ +/*! exports provided: useModel */ +/*! exports used: useModel */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),a=n(/*! react */"q1tI"),o=n(/*! ./node_modules/@umijs/plugin-model/node_modules/fast-deep-equal/index.js */"1WJl"),i=n.n(o),c=n(/*! ./node_modules/@umijs/plugin-model/lib/helpers/constant */"FMtG");function u(e,t){var n=Object(a.useContext)(c.UmiContext),o=Object(a.useRef)(t);o.current=t;var u=Object(a.useState)((function(){return o.current?o.current(n.data[e]):n.data[e]})),s=Object(r.a)(u,2),l=s[0],p=s[1],f=Object(a.useRef)(l);return f.current=l,Object(a.useEffect)((function(){var r=function(e){if(t&&o.current){var n=o.current(e),r=f.current;i()(n,r)||p(n)}else p(e)};try{n.callbacks[e].add(r)}catch(t){n.callbacks[e]=new Set,n.callbacks[e].add(r)}return function(){n.callbacks[e].delete(r)}}),[e]),l}},I65O: +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/define-well-known-symbol.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/path */"nFn1"),a=n(/*! ../internals/has */"jtLI"),o=n(/*! ../internals/well-known-symbol-wrapped */"IjB0"),i=n(/*! ../internals/object-define-property */"YfKC").f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});a(t,e)||i(t,e,{value:o.f(e)})}},IA2H: +/*!***************************************************!*\ + !*** ./node_modules/rc-picker/es/locale/en_US.js ***! + \***************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";t.a={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}},"IC/V": +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.symbol.split.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/define-well-known-symbol */"I65O")("split")},IGnA: +/*!**********************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/object-get-own-property-names-external.js ***! + \**********************************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/to-indexed-object */"0qr0"),a=n(/*! ../internals/object-get-own-property-names */"uGHk").f,o={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return i&&"[object Window]"==o.call(e)?function(e){try{return a(e)}catch(e){return i.slice()}}(e):a(r(e))}},ITfd: +/*!***********************************************!*\ + !*** ./node_modules/hash.js/lib/hash/hmac.js ***! + \***********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ./utils */"w8CP"),a=n(/*! minimalistic-assert */"2j6C");function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,n))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),a(e.length<=this.blockSize);for(var t=e.length;t1?arguments[1]:void 0)}))},IbaC: +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.string.replace-all.js ***! + \*******************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/require-object-coercible */"FCfD"),o=n(/*! ../internals/is-regexp */"YON3"),i=n(/*! ../internals/regexp-flags */"k/J9"),c=n(/*! ../internals/well-known-symbol */"2kyd"),u=n(/*! ../internals/is-pure */"Zcjx"),s=c("replace"),l=RegExp.prototype;r({target:"String",proto:!0},{replaceAll:function e(t,n){var r,c,p,f,d,h,m,b,y=a(this);if(null!=t){if((r=o(t))&&!~String(a("flags"in l?t.flags:i.call(t))).indexOf("g"))throw TypeError("`.replaceAll` does not allow non-global regexes");if(void 0!==(c=t[s]))return c.call(t,y,n);if(u&&r)return String(y).replace(t,n)}if(p=String(y),""===(f=String(t)))return e.call(p,/(?:)/g,n);if(d=p.split(f),"function"!=typeof n)return d.join(String(n));for(m=(h=d[0]).length,b=1;bh;h++)if((b=l?g(r(v=e[h])[0],v[1]):g(e[h]))&&b instanceof s)return b;return new s(!1)}f=d.call(e)}for(y=f.next;!(v=y.call(f)).done;)if("object"==typeof(b=u(f,g,v.value,l))&&b&&b instanceof s)return b;return new s(!1)}).stop=function(e){return new s(!0,e)}},"Iw+M": +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.index-of.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-buffer-view-core */"FVwB"),a=n(/*! ../internals/array-includes */"/3zY").indexOf,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(e){return a(o(this),e,arguments.length>1?arguments[1]:void 0)}))},IyRk: +/*!*****************************!*\ + !*** (webpack)/4/global.js ***! + \*****************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){(function(t){e.exports=function(){var e={873:function(e){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t}},n={};function r(t){if(n[t])return n[t].exports;var a=n[t]={exports:{}},o=!0;try{e[t](a,a.exports,r),o=!1}finally{o&&delete n[t]}return a.exports}return r.ab=t+"/",r(873)}()}).call(this,"/")},IyrG: +/*!*********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.array-buffer.constructor.js ***! + \*********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/global */"ukPv"),o=n(/*! ../internals/array-buffer */"ZSlt"),i=n(/*! ../internals/set-species */"ssJt"),c=o.ArrayBuffer;r({global:!0,forced:a.ArrayBuffer!==c},{ArrayBuffer:c}),i("ArrayBuffer")},"J+Da": +/*!****************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/to-index.js ***! + \****************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/to-integer */"m0kY"),a=n(/*! ../internals/to-length */"oa35");e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=a(t);if(t!==n)throw RangeError("Wrong length or index");return n}},J3Yn: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/inspect-source.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/shared-store */"pb5k"),a=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return a.call(e)}),e.exports=r.inspectSource},J428: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.values.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/object-to-array */"CdV7").values;r({target:"Object",stat:!0},{values:function(e){return a(e)}})},J4zp: +/*!**************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./arrayWithHoles.js */"wTVA"),a=n(/*! ./iterableToArrayLimit.js */"m0LI"),o=n(/*! ./unsupportedIterableToArray.js */"ZhPi"),i=n(/*! ./nonIterableRest.js */"wkBT");e.exports=function(e,t){return r(e)||a(e,t)||o(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},JDCn: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.math.clz32.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=Math.floor,o=Math.log,i=Math.LOG2E;r({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-a(o(e+.5)*i):32}})},JI6M: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.trim.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/string-trim */"mTKU").trim;r({target:"String",proto:!0,forced:n(/*! ../internals/string-trim-forced */"HKQd")("trim")},{trim:function(){return a(this)}})},JO4c: +/*!*********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.reduce-right.js ***! + \*********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-buffer-view-core */"FVwB"),a=n(/*! ../internals/array-reduce */"9RRT").right,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(e){return a(o(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}))},JS3A: +/*!****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/a-possible-prototype.js ***! + \****************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/is-object */"tSXo");e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},JX7q: +/*!**************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***! + \**************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},JXee: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.math.fscale.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/math-scale */"YMoz"),o=n(/*! ../internals/math-fround */"jdp+");r({target:"Math",stat:!0},{fscale:function(e,t,n,r,i){return o(a(e,t,n,r,i))}})},JXem: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/iterators-core.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r,a,o,i=n(/*! ../internals/object-get-prototype-of */"Acmb"),c=n(/*! ../internals/create-non-enumerable-property */"lz10"),u=n(/*! ../internals/has */"jtLI"),s=n(/*! ../internals/well-known-symbol */"2kyd"),l=n(/*! ../internals/is-pure */"Zcjx"),p=s("iterator"),f=!1;[].keys&&("next"in(o=[].keys())?(a=i(i(o)))!==Object.prototype&&(r=a):f=!0),null==r&&(r={}),l||u(r,p)||c(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},Ji7U: +/*!*************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***! + \*************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(/*! ./setPrototypeOf.js */"s4An");function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Object(r.a)(e,t)}},JnaH: +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.math.sinh.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/fails */"MVys"),o=n(/*! ../internals/math-expm1 */"V61k"),i=Math.abs,c=Math.exp,u=Math.E;r({target:"Math",stat:!0,forced:a((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return i(e=+e)<1?(o(e)-o(-e))/2:(c(e-1)-c(-e-1))*(u/2)}})},JxQ3: +/*!**********************************************!*\ + !*** ./node_modules/object-inspect/index.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r="function"==typeof Map&&Map.prototype,a=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&a&&"function"==typeof a.get?a.get:null,i=r&&Map.prototype.forEach,c="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&c?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=c&&u&&"function"==typeof u.get?u.get:null,l=c&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,m=Object.prototype.toString,b=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,g=String.prototype.replace,_=String.prototype.toUpperCase,x=String.prototype.toLowerCase,w=RegExp.prototype.test,j=Array.prototype.concat,O=Array.prototype.join,k=Array.prototype.slice,E=Math.floor,S="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,A="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,I=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||w.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-E(-e):E(e);if(r!==e){var a=String(r),o=v.call(t,a.length+1);return g.call(a,n,"$&_")+"."+g.call(g.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return g.call(t,n,"$&_")}var D=n(/*! ./util.inspect */2).custom,R=D&&z(D)?D:null;function N(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function F(e){return g.call(String(e),/"/g,""")}function U(e){return!("[object Array]"!==B(e)||A&&"object"==typeof e&&A in e)}function z(e){if(T)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!C)return!1;try{return C.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,r,a){var c=n||{};if(q(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!q(c,"customInspect")||c.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=c.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,n){if(t.length>n.maxStringLength){var r=t.length-n.maxStringLength,a="... "+r+" more character"+(r>1?"s":"");return e(v.call(t,0,n.maxStringLength),n)+a}return N(g.call(g.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,H),"single",n)}(t,c);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var _=String(t);return m?L(t,_):_}if("bigint"==typeof t){var w=String(t)+"n";return m?L(t,w):w}var E=void 0===c.depth?5:c.depth;if(void 0===r&&(r=0),r>=E&&E>0&&"object"==typeof t)return U(t)?"[Array]":"[Object]";var P=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=O.call(Array(e.indent+1)," ")}return{base:n,prev:O.call(Array(t+1),n)}}(c,r);if(void 0===a)a=[];else if(W(a,t)>=0)return"[Circular]";function D(t,n,o){if(n&&(a=k.call(a)).push(n),o){var i={depth:c.depth};return q(c,"quoteStyle")&&(i.quoteStyle=c.quoteStyle),e(t,i,r+1,a)}return e(t,c,r+1,a)}if("function"==typeof t){var V=function(e){if(e.name)return e.name;var t=y.call(b.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),J=X(t,D);return"[Function"+(V?": "+V:" (anonymous)")+"]"+(J.length>0?" { "+O.call(J,", ")+" }":"")}if(z(t)){var Z=T?g.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(t);return"object"!=typeof t||T?Z:G(Z)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var $="<"+x.call(String(t.nodeName)),ee=t.attributes||[],te=0;te"}if(U(t)){if(0===t.length)return"[]";var ne=X(t,D);return P&&!function(e){for(var t=0;t=0)return!1;return!0}(ne)?"["+K(ne,P)+"]":"[ "+O.call(ne,", ")+" ]"}if(function(e){return!("[object Error]"!==B(e)||A&&"object"==typeof e&&A in e)}(t)){var re=X(t,D);return"cause"in t&&!I.call(t,"cause")?"{ ["+String(t)+"] "+O.call(j.call("[cause]: "+D(t.cause),re),", ")+" }":0===re.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(re,", ")+" }"}if("object"==typeof t&&u){if(R&&"function"==typeof t[R])return t[R]();if("symbol"!==u&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{s.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return i.call(t,(function(e,n){ae.push(D(n,t,!0)+" => "+D(e,t))})),Y("Map",o.call(t),ae,P)}if(function(e){if(!s||!e||"object"!=typeof e)return!1;try{s.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var oe=[];return l.call(t,(function(e){oe.push(D(e,t))})),Y("Set",s.call(t),oe,P)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Q("WeakMap");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Q("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return Q("WeakRef");if(function(e){return!("[object Number]"!==B(e)||A&&"object"==typeof e&&A in e)}(t))return G(D(Number(t)));if(function(e){if(!e||"object"!=typeof e||!S)return!1;try{return S.call(e),!0}catch(e){}return!1}(t))return G(D(S.call(t)));if(function(e){return!("[object Boolean]"!==B(e)||A&&"object"==typeof e&&A in e)}(t))return G(h.call(t));if(function(e){return!("[object String]"!==B(e)||A&&"object"==typeof e&&A in e)}(t))return G(D(String(t)));if(!function(e){return!("[object Date]"!==B(e)||A&&"object"==typeof e&&A in e)}(t)&&!function(e){return!("[object RegExp]"!==B(e)||A&&"object"==typeof e&&A in e)}(t)){var ie=X(t,D),ce=M?M(t)===Object.prototype:t instanceof Object||t.constructor===Object,ue=t instanceof Object?"":"null prototype",se=!ce&&A&&Object(t)===t&&A in t?v.call(B(t),8,-1):ue?"Object":"",le=(ce||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(se||ue?"["+O.call(j.call([],se||[],ue||[]),": ")+"] ":"");return 0===ie.length?le+"{}":P?le+"{"+K(ie,P)+"}":le+"{ "+O.call(ie,", ")+" }"}return String(t)};var V=Object.prototype.hasOwnProperty||function(e){return e in this};function q(e,t){return V.call(e,t)}function B(e){return m.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n=o)return e;switch(e){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(e){return"[Circular]"}break;default:return e}}));return i}return a}function f(e,t){return null==e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!=typeof e||e))}function d(e,t,n){var r=0,a=e.length;!function o(i){if(i&&i.length)n(i);else{var c=r;r+=1,c()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},_={integer:function(e){return _.number(e)&&parseInt(e,10)===e},float:function(e){return _.number(e)&&!_.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"==typeof e&&!_.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&!!e.match(g.email)&&e.length<255},url:function(e){return"string"==typeof e&&!!e.match(g.url)},hex:function(e){return"string"==typeof e&&!!e.match(g.hex)}};var x={required:v,whitespace:function(e,t,n,r,a){(/^\s+$/.test(t)||""===t)&&r.push(p(a.messages.whitespace,e.fullField))},type:function(e,t,n,r,a){if(e.required&&void 0===t)v(e,t,n,r,a);else{var o=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(o)>-1?_[o](t)||r.push(p(a.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&r.push(p(a.messages.types[o],e.fullField,e.type))}},range:function(e,t,n,r,a){var o="number"==typeof e.len,i="number"==typeof e.min,c="number"==typeof e.max,u=t,s=null,l="number"==typeof t,f="string"==typeof t,d=Array.isArray(t);if(l?s="number":f?s="string":d&&(s="array"),!s)return!1;d&&(u=t.length),f&&(u=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),o?u!==e.len&&r.push(p(a.messages[s].len,e.fullField,e.len)):i&&!c&&ue.max?r.push(p(a.messages[s].max,e.fullField,e.max)):i&&c&&(ue.max)&&r.push(p(a.messages[s].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,a){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(t)&&r.push(p(a.messages.enum,e.fullField,e.enum.join(", ")))},pattern:function(e,t,n,r,a){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(p(a.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"==typeof e.pattern){new RegExp(e.pattern).test(t)||r.push(p(a.messages.pattern.mismatch,e.fullField,t,e.pattern))}}};function w(e,t,n,r,a){var o=e.type,i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(f(t,o)&&!e.required)return n();x.required(e,t,r,i,a,o),f(t,o)||x.type(e,t,r,i,a)}n(i)}var j={string:function(e,t,n,r,a){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(f(t,"string")&&!e.required)return n();x.required(e,t,r,o,a,"string"),f(t,"string")||(x.type(e,t,r,o,a),x.range(e,t,r,o,a),x.pattern(e,t,r,o,a),!0===e.whitespace&&x.whitespace(e,t,r,o,a))}n(o)},method:function(e,t,n,r,a){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(f(t)&&!e.required)return n();x.required(e,t,r,o,a),void 0!==t&&x.type(e,t,r,o,a)}n(o)},number:function(e,t,n,r,a){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),f(t)&&!e.required)return n();x.required(e,t,r,o,a),void 0!==t&&(x.type(e,t,r,o,a),x.range(e,t,r,o,a))}n(o)},boolean:function(e,t,n,r,a){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(f(t)&&!e.required)return n();x.required(e,t,r,o,a),void 0!==t&&x.type(e,t,r,o,a)}n(o)},regexp:function(e,t,n,r,a){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(f(t)&&!e.required)return n();x.required(e,t,r,o,a),f(t)||x.type(e,t,r,o,a)}n(o)},integer:function(e,t,n,r,a){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(f(t)&&!e.required)return n();x.required(e,t,r,o,a),void 0!==t&&(x.type(e,t,r,o,a),x.range(e,t,r,o,a))}n(o)},float:function(e,t,n,r,a){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(f(t)&&!e.required)return n();x.required(e,t,r,o,a),void 0!==t&&(x.type(e,t,r,o,a),x.range(e,t,r,o,a))}n(o)},array:function(e,t,n,r,a){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();x.required(e,t,r,o,a,"array"),null!=t&&(x.type(e,t,r,o,a),x.range(e,t,r,o,a))}n(o)},object:function(e,t,n,r,a){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(f(t)&&!e.required)return n();x.required(e,t,r,o,a),void 0!==t&&x.type(e,t,r,o,a)}n(o)},enum:function(e,t,n,r,a){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(f(t)&&!e.required)return n();x.required(e,t,r,o,a),void 0!==t&&x.enum(e,t,r,o,a)}n(o)},pattern:function(e,t,n,r,a){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(f(t,"string")&&!e.required)return n();x.required(e,t,r,o,a),f(t,"string")||x.pattern(e,t,r,o,a)}n(o)},date:function(e,t,n,r,a){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(f(t,"date")&&!e.required)return n();var i;if(x.required(e,t,r,o,a),!f(t,"date"))i=t instanceof Date?t:new Date(t),x.type(e,i,r,o,a),i&&x.range(e,i.getTime(),r,o,a)}n(o)},url:w,hex:w,email:w,required:function(e,t,n,r,a){var o=[],i=Array.isArray(t)?"array":typeof t;x.required(e,t,r,o,a,i),n(o)},any:function(e,t,n,r,a){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(f(t)&&!e.required)return n();x.required(e,t,r,o,a)}n(o)}};function O(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var k=O();function E(e){this.rules=null,this._messages=k,this.define(e)}E.prototype={messages:function(e){return e&&(this._messages=y(O(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");var t,n;for(t in this.rules={},e)e.hasOwnProperty(t)&&(n=e[t],this.rules[t]=Array.isArray(n)?n:[n])},validate:function(e,t,r){var a=this;void 0===t&&(t={}),void 0===r&&(r=function(){});var o,i,c=e,u=t,s=r;if("function"==typeof u&&(s=u,u={}),!this.rules||0===Object.keys(this.rules).length)return s&&s(),Promise.resolve();if(u.messages){var f=this.messages();f===k&&(f=O()),y(f,u.messages),u.messages=f}else u.messages=this.messages();var d={};(u.keys||Object.keys(this.rules)).forEach((function(t){o=a.rules[t],i=c[t],o.forEach((function(r){var o=r;"function"==typeof o.transform&&(c===e&&(c=n({},c)),i=c[t]=o.transform(i)),(o="function"==typeof o?{validator:o}:n({},o)).validator=a.getValidationMethod(o),o.field=t,o.fullField=o.fullField||t,o.type=a.getType(o),o.validator&&(d[t]=d[t]||[],d[t].push({rule:o,value:i,source:c,field:t}))}))}));var h={};return m(d,u,(function(e,t){var r,a=e.rule,o=!("object"!==a.type&&"array"!==a.type||"object"!=typeof a.fields&&"object"!=typeof a.defaultField);function i(e,t){return n({},t,{fullField:a.fullField+"."+e})}function c(r){void 0===r&&(r=[]);var c=r;if(Array.isArray(c)||(c=[c]),!u.suppressWarning&&c.length&&E.warning("async-validator:",c),c.length&&void 0!==a.message&&(c=[].concat(a.message)),c=c.map(b(a)),u.first&&c.length)return h[a.field]=1,t(c);if(o){if(a.required&&!e.value)return void 0!==a.message?c=[].concat(a.message).map(b(a)):u.error&&(c=[u.error(a,p(u.messages.required,a.field))]),t(c);var s={};if(a.defaultField)for(var l in e.value)e.value.hasOwnProperty(l)&&(s[l]=a.defaultField);for(var f in s=n({},s,e.rule.fields))if(s.hasOwnProperty(f)){var d=Array.isArray(s[f])?s[f]:[s[f]];s[f]=d.map(i.bind(null,f))}var m=new E(s);m.messages(u.messages),e.rule.options&&(e.rule.options.messages=u.messages,e.rule.options.error=u.error),m.validate(e.value,e.rule.options||u,(function(e){var n=[];c&&c.length&&n.push.apply(n,c),e&&e.length&&n.push.apply(n,e),t(n.length?n:null)}))}else t(c)}o=o&&(a.required||!a.required&&e.value),a.field=e.field,a.asyncValidator?r=a.asyncValidator(a,e.value,c,e.source,u):a.validator&&(!0===(r=a.validator(a,e.value,c,e.source,u))?c():!1===r?c(a.message||a.field+" fails"):r instanceof Array?c(r):r instanceof Error&&c(r.message)),r&&r.then&&r.then((function(){return c()}),(function(e){return c(e)}))}),(function(e){!function(e){var t,n,r,a=[],o={};for(t=0;t=n.length?{value:void 0,done:!0}:(e=r(n,a),t.index+=e.length,{value:e,done:!1})}))},Kwbf: +/*!********************************************!*\ + !*** ./node_modules/rc-util/es/warning.js ***! + \********************************************/ +/*! exports provided: warning, note, resetWarned, call, warningOnce, noteOnce, default */ +/*! exports used: default, noteOnce, warning */function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return c}));var r={};function a(e,t){0}function o(e,t){0}function i(e,t,n){t||r[n]||(e(!1,n),r[n]=!0)}function c(e,t){i(o,e,t)}t.a=function(e,t){i(a,e,t)}},L5O0: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.weak-set.of.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"WeakSet",stat:!0},{of:n(/*! ../internals/collection-of */"qA1w")})},LJ80: +/*!***********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/copy-constructor-properties.js ***! + \***********************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/has */"jtLI"),a=n(/*! ../internals/own-keys */"cC5k"),o=n(/*! ../internals/object-get-own-property-descriptor */"g8rt"),i=n(/*! ../internals/object-define-property */"YfKC");e.exports=function(e,t){for(var n=a(t),c=i.f,u=o.f,s=0;s1?arguments[1]:void 0)}))},LpSC: +/*!***************************************************************!*\ + !*** ./node_modules/isomorphic-fetch/fetch-npm-browserify.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! whatwg-fetch */"bZMm"),e.exports=self.fetch.bind(self)},LtsZ: +/*!*******************************************************!*\ + !*** ./node_modules/@umijs/runtime/dist/index.esm.js ***! + \*******************************************************/ +/*! exports provided: createBrowserHistory, createHashHistory, createMemoryHistory, __RouterContext, Link, MemoryRouter, NavLink, Prompt, Redirect, Route, Router, StaticRouter, Switch, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, ApplyPluginsType, Plugin, dynamic, isBrowser */ +/*! exports used: ApplyPluginsType, Plugin, dynamic */function(e,t,n){"use strict";n.d(t,"a",(function(){return T})),n.d(t,"b",(function(){return I})),n.d(t,"c",(function(){return P}));var r=n(/*! react */"q1tI"),a=n(/*! use-subscription */"8L3h");function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw o}}}}var y=Object(r.createContext)(null),v=[],g=[],_=!1;function x(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function w(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(r){var a=x(e[r]);a.loading?t.loading=!0:(t.loaded[r]=a.loaded,t.error=a.error),n.push(a.promise),a.promise.then((function(e){t.loaded[r]=e})).catch((function(e){t.error=e}))}))}catch(e){t.error=e}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function j(e,t){return Object(r.createElement)((n=e)&&n.__esModule?n.default:n,t);var n}function O(e,t){var n=Object.assign({loader:null,loading:null,delay:200,timeout:null,render:j,webpack:null,modules:null},t),o=null;function i(){if(!o){var t=new k(e,n);o={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return o.promise()}if("undefined"==typeof window&&v.push(i),!_&&"undefined"!=typeof window&&"function"==typeof n.webpack){var c=n.webpack();g.push((function(e){var t,n=b(c);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(-1!==e.indexOf(r))return i()}}catch(e){n.e(e)}finally{n.f()}}))}var u=function(e,t){i();var c=Object(r.useContext)(y),u=Object(a.useSubscription)(o);return Object(r.useImperativeHandle)(t,(function(){return{retry:o.retry}})),c&&Array.isArray(n.modules)&&n.modules.forEach((function(e){c(e)})),u.loading||u.error?Object(r.createElement)(n.loading,{isLoading:u.loading,pastDelay:u.pastDelay,timedOut:u.timedOut,error:u.error,retry:o.retry}):u.loaded?n.render(u.loaded,e):null},s=Object(r.forwardRef)(u);return s.preload=function(){return i()},s.displayName="LoadableComponent",s}var k=function(){function e(t,n){s(this,e),this._loadFn=t,this._opts=n,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}return p(e,[{key:"promise",value:function(){return this._res.promise}},{key:"retry",value:function(){var e=this;this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};var t=this._res,n=this._opts;t.loading&&("number"==typeof n.delay&&(0===n.delay?this._state.pastDelay=!0:this._delay=setTimeout((function(){e._update({pastDelay:!0})}),n.delay)),"number"==typeof n.timeout&&(this._timeout=setTimeout((function(){e._update({timedOut:!0})}),n.timeout))),this._res.promise.then((function(){e._update(),e._clearTimeouts()})).catch((function(t){e._update(),e._clearTimeouts()})),this._update({})}},{key:"_update",value:function(e){this._state=i(i({},this._state),e),this._callbacks.forEach((function(e){return e()}))}},{key:"_clearTimeouts",value:function(){clearTimeout(this._delay),clearTimeout(this._timeout)}},{key:"getCurrentValue",value:function(){return i(i({},this._state),{},{error:this._res.error,loaded:this._res.loaded,loading:this._res.loading})}},{key:"subscribe",value:function(e){var t=this;return this._callbacks.add(e),function(){t._callbacks.delete(e)}}}]),e}();function E(e){return O(x,e)}function S(e,t){for(var n=[];e.length;){var r=e.pop();n.push(r(t))}return Promise.all(n).then((function(){if(e.length)return S(e,t)}))}function P(e){var t=E,n={loading:function(e){e.error,e.isLoading;return Object(r.createElement)("p",null,"loading...")}};if("function"==typeof e)n.loader=e;else{if("object"!==c(e))throw new Error("Unexpect arguments ".concat(e));n=i(i({},n),e)}return t(n)}function C(e,t){if(!e)throw new Error(t)}E.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return O(w,e)},E.preloadAll=function(){return new Promise((function(e,t){S(v).then(e,t)}))},E.preloadReady=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new Promise((function(t){var n=function(){return _=!0,t()};S(g,e).then(n,n)}))},"undefined"!=typeof window&&(window.__NEXT_PRELOADREADY=E.preloadReady);var T;function A(e){return!!e&&"object"===c(e)&&"function"==typeof e.then}!function(e){e.compose="compose",e.modify="modify",e.event="event"}(T||(T={}));var I=function(){function e(t){s(this,e),this.validKeys=void 0,this.hooks={},this.validKeys=(null==t?void 0:t.validKeys)||[]}return p(e,[{key:"register",value:function(e){var t=this;C(!!e.apply,"register failed, plugin.apply must supplied"),C(!!e.path,"register failed, plugin.path must supplied"),Object.keys(e.apply).forEach((function(n){C(t.validKeys.indexOf(n)>-1,"register failed, invalid key ".concat(n," from plugin ").concat(e.path,".")),t.hooks[n]||(t.hooks[n]=[]),t.hooks[n]=t.hooks[n].concat(e.apply[n])}))}},{key:"getHooks",value:function(e){var t=d(e.split(".")),n=t[0],r=t.slice(1),a=this.hooks[n]||[];return r.length&&(a=a.map((function(e){try{var t,n=e,a=b(r);try{for(a.s();!(t=a.n()).done;){n=n[t.value]}}catch(e){a.e(e)}finally{a.f()}return n}catch(e){return null}})).filter(Boolean)),a}},{key:"applyPlugins",value:function(e){var t=e.key,n=e.type,r=e.initialValue,a=e.args,o=e.async,s=this.getHooks(t)||[];switch(a&&C("object"===c(a),"applyPlugins failed, args must be plain object."),n){case T.modify:return o?s.reduce(function(){var e,n=(e=regeneratorRuntime.mark((function e(n,r){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(C("function"==typeof r||"object"===c(r)||A(r),"applyPlugins failed, all hooks for key ".concat(t," must be function, plain object or Promise.")),!A(n)){e.next=5;break}return e.next=4,n;case 4:n=e.sent;case 5:if("function"!=typeof r){e.next=16;break}if(!A(o=r(n,a))){e.next=13;break}return e.next=10,o;case 10:return e.abrupt("return",e.sent);case 13:return e.abrupt("return",o);case 14:e.next=21;break;case 16:if(!A(r)){e.next=20;break}return e.next=19,r;case 19:r=e.sent;case 20:return e.abrupt("return",i(i({},n),r));case 21:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){u(o,r,a,i,c,"next",e)}function c(e){u(o,r,a,i,c,"throw",e)}i(void 0)}))});return function(e,t){return n.apply(this,arguments)}}(),A(r)?r:Promise.resolve(r)):s.reduce((function(e,n){return C("function"==typeof n||"object"===c(n),"applyPlugins failed, all hooks for key ".concat(t," must be function or plain object.")),"function"==typeof n?n(e,a):i(i({},e),n)}),r);case T.event:return s.forEach((function(e){C("function"==typeof e,"applyPlugins failed, all hooks for key ".concat(t," must be function.")),e(a)}));case T.compose:return function(){return function(e){var t=e.fns,n=e.args;if(1===t.length)return t[0];var r=t.pop();return t.reduce((function(e,t){return function(){return t(e,n)}}),r)}({fns:s.concat(r),args:a})()}}}}]),e}()},LtxK: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.symbol.iterator.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/define-well-known-symbol */"I65O")("iterator")},LuSS: +/*!******************************************************************************!*\ + !*** ./node_modules/@ctrl/tinycolor/dist/module/format-input.js + 1 modules ***! + \******************************************************************************/ +/*! exports provided: inputToRGB, stringInputToObject, isValidCSSUnit */ +/*! exports used: inputToRGB */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ctrl/tinycolor/dist/module/conversion.js because of ./node_modules/@ant-design/icons/node_modules/@ant-design/colors/dist/index.esm.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ctrl/tinycolor/dist/module/util.js because of ./node_modules/@ant-design/icons/node_modules/@ant-design/colors/dist/index.esm.js */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("FER5"),a={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},o=n("b3aT");function i(e){var t={r:0,g:0,b:0},n=1,i=null,c=null,u=null,s=!1,f=!1;return"string"==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(a[e])e=a[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=l.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=l.rgba.exec(e))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=l.hsl.exec(e))return{h:n[1],s:n[2],l:n[3]};if(n=l.hsla.exec(e))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=l.hsv.exec(e))return{h:n[1],s:n[2],v:n[3]};if(n=l.hsva.exec(e))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=l.hex8.exec(e))return{r:Object(r.d)(n[1]),g:Object(r.d)(n[2]),b:Object(r.d)(n[3]),a:Object(r.a)(n[4]),format:t?"name":"hex8"};if(n=l.hex6.exec(e))return{r:Object(r.d)(n[1]),g:Object(r.d)(n[2]),b:Object(r.d)(n[3]),format:t?"name":"hex"};if(n=l.hex4.exec(e))return{r:Object(r.d)(n[1]+n[1]),g:Object(r.d)(n[2]+n[2]),b:Object(r.d)(n[3]+n[3]),a:Object(r.a)(n[4]+n[4]),format:t?"name":"hex8"};if(n=l.hex3.exec(e))return{r:Object(r.d)(n[1]+n[1]),g:Object(r.d)(n[2]+n[2]),b:Object(r.d)(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"==typeof e&&(p(e.r)&&p(e.g)&&p(e.b)?(t=Object(r.g)(e.r,e.g,e.b),s=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):p(e.h)&&p(e.s)&&p(e.v)?(i=Object(o.c)(e.s),c=Object(o.c)(e.v),t=Object(r.c)(e.h,i,c),s=!0,f="hsv"):p(e.h)&&p(e.s)&&p(e.l)&&(i=Object(o.c)(e.s),u=Object(o.c)(e.l),t=Object(r.b)(e.h,i,u),s=!0,f="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=Object(o.b)(n),{ok:s,format:e.format||f,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var c="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",u="[\\s|\\(]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")\\s*\\)?",s="[\\s|\\(]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")\\s*\\)?",l={CSS_UNIT:new RegExp(c),rgb:new RegExp("rgb"+u),rgba:new RegExp("rgba"+s),hsl:new RegExp("hsl"+u),hsla:new RegExp("hsla"+s),hsv:new RegExp("hsv"+u),hsva:new RegExp("hsva"+s),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 p(e){return Boolean(l.CSS_UNIT.exec(String(e)))}},M1bg: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.blink.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/create-html */"V85Q");r({target:"String",proto:!0,forced:n(/*! ../internals/string-html-forced */"NQQk")("blink")},{blink:function(){return a(this,"blink","","")}})},M3b6: +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/is-integer.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/is-object */"tSXo"),a=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&a(e)===e}},M5u2: +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.symbol.unscopables.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/define-well-known-symbol */"I65O")("unscopables")},M8HR: +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/regexp-sticky-helpers.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ./fails */"MVys");function a(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=a("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=a("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},MIOZ: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=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}}},MMxC: +/*!**************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/export.js ***! + \**************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv"),a=n(/*! ../internals/object-get-own-property-descriptor */"g8rt").f,o=n(/*! ../internals/create-non-enumerable-property */"lz10"),i=n(/*! ../internals/redefine */"NMFW"),c=n(/*! ../internals/set-global */"TMUv"),u=n(/*! ../internals/copy-constructor-properties */"LJ80"),s=n(/*! ../internals/is-forced */"kkxG");e.exports=function(e,t){var n,l,p,f,d,h=e.target,m=e.global,b=e.stat;if(n=m?r:b?r[h]||c(h,{}):(r[h]||{}).prototype)for(l in t){if(f=t[l],p=e.noTargetGet?(d=a(n,l))&&d.value:n[l],!s(m?l:h+(b?".":"#")+l,e.forced)&&void 0!==p){if(typeof f==typeof p)continue;u(f,p)}(e.sham||p&&p.sham)&&o(f,"sham",!0),i(n,l,f,e)}}},MNnm: +/*!**************************************************!*\ + !*** ./node_modules/rc-util/es/Dom/canUseDom.js ***! + \**************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}n.d(t,"a",(function(){return r}))},MRpI: +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.math.tanh.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/math-expm1 */"V61k"),o=Math.exp;r({target:"Math",stat:!0},{tanh:function(e){var t=a(e=+e),n=a(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},MVys: +/*!*************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/fails.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},Mgx3: +/*!******************************!*\ + !*** ./src/service/paths.ts ***! + \******************************/ +/*! exports provided: getCourseList, getIntelligentRecommendationsList, getCourseMenus, editCourse, submitCourse, getEditCourseData, getPathsDetail, getRightData, getCoureses, getStageData, updateTeamTitle, deleteMember, deleteCourses, memberMoveUp, memberMoveDowm, collect, cancelCollect, deletePath, applyPublish, cancelPublish, applyPublic, cancelPublic, getSendCourseList, sendToCourse, addSubjectMembers, addCourses, appointment, immediatelyRegister, getStatisticsInfo, getShixunUseData, getLearnData, getLearnStatistics, getShixunAnalyzeData, getStudentData, appendToStage, updateStage, satgeAddShixunToStage, selectShixunToStage, addVideoToStage, addCoursewareToStage, upCoursewareToStage, addBlankItems, addStage, addShixunToStage, upPosition, downPosition, deleteStage, getDiscusses, getCourseDiscusses, createDiscusses, stagesMovePosition, deleteStages, excellentDiscuss, postDiscuss, getSchoolOption, appplySchool */ +/*! exports used: addBlankItems, addCourses, addCoursewareToStage, addStage, addSubjectMembers, addVideoToStage, applyPublic, applyPublish, appointment, appplySchool, cancelCollect, cancelPublic, cancelPublish, collect, deleteCourses, deleteMember, deletePath, deleteStage, deleteStages, downPosition, editCourse, excellentDiscuss, getCoureses, getCourseDiscusses, getCourseList, getCourseMenus, getDiscusses, getEditCourseData, getLearnStatistics, getPathsDetail, getRightData, getSchoolOption, getSendCourseList, getShixunAnalyzeData, getStageData, getStatisticsInfo, getStudentData, immediatelyRegister, postDiscuss, satgeAddShixunToStage, selectShixunToStage, sendToCourse, stagesMovePosition, submitCourse, upCoursewareToStage, upPosition, updateStage, updateTeamTitle */function(e,t,n){"use strict";n.d(t,"y",(function(){return u})),n.d(t,"z",(function(){return l})),n.d(t,"u",(function(){return f})),n.d(t,"R",(function(){return h})),n.d(t,"B",(function(){return b})),n.d(t,"D",(function(){return v})),n.d(t,"E",(function(){return _})),n.d(t,"w",(function(){return w})),n.d(t,"I",(function(){return O})),n.d(t,"V",(function(){return E})),n.d(t,"p",(function(){return P})),n.d(t,"o",(function(){return T})),n.d(t,"n",(function(){return I})),n.d(t,"k",(function(){return L})),n.d(t,"q",(function(){return R})),n.d(t,"h",(function(){return F})),n.d(t,"m",(function(){return z})),n.d(t,"g",(function(){return q})),n.d(t,"l",(function(){return W})),n.d(t,"G",(function(){return G})),n.d(t,"P",(function(){return Y})),n.d(t,"e",(function(){return X})),n.d(t,"b",(function(){return Z})),n.d(t,"i",(function(){return ee})),n.d(t,"L",(function(){return ne})),n.d(t,"J",(function(){return ae})),n.d(t,"C",(function(){return ie})),n.d(t,"H",(function(){return ue})),n.d(t,"K",(function(){return le})),n.d(t,"U",(function(){return fe})),n.d(t,"N",(function(){return he})),n.d(t,"O",(function(){return be})),n.d(t,"f",(function(){return ve})),n.d(t,"c",(function(){return _e})),n.d(t,"S",(function(){return we})),n.d(t,"a",(function(){return Oe})),n.d(t,"d",(function(){return Ee})),n.d(t,"T",(function(){return Pe})),n.d(t,"t",(function(){return Te})),n.d(t,"r",(function(){return Ie})),n.d(t,"A",(function(){return Le})),n.d(t,"x",(function(){return Re})),n.d(t,"Q",(function(){return Fe})),n.d(t,"s",(function(){return ze})),n.d(t,"v",(function(){return qe})),n.d(t,"M",(function(){return We})),n.d(t,"F",(function(){return Ge})),n.d(t,"j",(function(){return Ye}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/utils/fetch */"ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths.json",{method:"Get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/disciplines.json",{method:"Get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,".json"),{method:"PUT",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/edit.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,".json"),{method:"get",params:{identifier:t.id}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/right_banner.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return j.apply(this,arguments)}function j(){return(j=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/spoc_courses.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return k.apply(this,arguments)}function k(){return(k=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return S.apply(this,arguments)}function S(){return(S=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/update_team_title.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/delete_member.json"),{method:"Delete",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return A.apply(this,arguments)}function A(){return(A=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/spoc_courses/").concat(null==t?void 0:t.courseid,".json"),{method:"Delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e){return M.apply(this,arguments)}function M(){return(M=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/collections.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(e){return D.apply(this,arguments)}function D(){return(D=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/collections/cancel.json",{method:"Delete",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e){return N.apply(this,arguments)}function N(){return(N=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,".json"),{method:"Delete",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e){return U.apply(this,arguments)}function U(){return(U=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/publish.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(e){return V.apply(this,arguments)}function V(){return(V=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/cancel_publish.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(e){return B.apply(this,arguments)}function B(){return(B=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/apply_public.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function W(e){return H.apply(this,arguments)}function H(){return(H=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/cancel_public.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(e){return Q.apply(this,arguments)}function Q(){return(Q=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/choose_course.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(e){return K.apply(this,arguments)}function K(){return(K=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/send_to_course.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(e){return J.apply(this,arguments)}function J(){return(J=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/add_subject_members.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(e){return $.apply(this,arguments)}function $(){return($=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/spoc_courses.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(e){return te.apply(this,arguments)}function te(){return(te=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/appointment.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(e){return re.apply(this,arguments)}function re(){return(re=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.id,"/join_excellent_course.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ae(e){return oe.apply(this,arguments)}function oe(){return(oe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/statistics_info.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ie(e){return ce.apply(this,arguments)}function ce(){return(ce=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/learning_statistics.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ue(e){return se.apply(this,arguments)}function se(){return(se=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/shixun_statistics.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function le(e){return pe.apply(this,arguments)}function pe(){return(pe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/study_analyze/").concat(t.type,".json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fe(e){return de.apply(this,arguments)}function de(){return(de=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages/".concat(t.id,".json"),{method:"put",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function he(e){return me.apply(this,arguments)}function me(){return(me=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages/".concat(t.id,"/add_shixun_to_stage.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function be(e){return ye.apply(this,arguments)}function ye(){return(ye=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages/".concat(t.id,"/select_shixun_to_stage.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ve(e){return ge.apply(this,arguments)}function ge(){return(ge=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages/".concat(t.id,"/add_video_to_stage.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _e(e){return xe.apply(this,arguments)}function xe(){return(xe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages/".concat(t.id,"/add_attachment_to_stage.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function we(e){return je.apply(this,arguments)}function je(){return(je=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stage_shixuns/".concat(t.id,".json"),{method:"put",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Oe(e){return ke.apply(this,arguments)}function ke(){return(ke=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages/".concat(t.id,"/add_blank_to_stage.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ee(e){return Se.apply(this,arguments)}function Se(){return(Se=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages.json?subject_id=".concat(t.pathId),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pe(e){return Ce.apply(this,arguments)}function Ce(){return(Ce=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages/".concat(t.id,"/up_position.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Te(e){return Ae.apply(this,arguments)}function Ae(){return(Ae=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages/".concat(t.id,"/down_position.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ie(e){return Me.apply(this,arguments)}function Me(){return(Me=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages/".concat(t.id,".json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Le(e){return De.apply(this,arguments)}function De(){return(De=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.pathId,"/discusses.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Re(e){return Ne.apply(this,arguments)}function Ne(){return(Ne=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/excellent_discusses.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fe(e){return Ue.apply(this,arguments)}function Ue(){return(Ue=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages/".concat(t.stage_id,"/items/move_position"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ze(e){return Ve.apply(this,arguments)}function Ve(){return(Ve=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages/".concat(t.stage_id,"/items/").concat(t.id),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qe(e){return Be.apply(this,arguments)}function Be(){return(Be=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.id,"/excellent_discuss"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function We(e){return He.apply(this,arguments)}function He(){return(He=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/paths/".concat(t.id,"/post_discuss"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ge(e){return Qe.apply(this,arguments)}function Qe(){return(Qe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/schools/for_option.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ye(e){return Ke.apply(this,arguments)}function Ke(){return(Ke=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/add_school_applies.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},MgzW: +/*!*********************************************!*\ + !*** ./node_modules/object-assign/index.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,c,u=i(e),s=1;sn;)a[n]=t[n++];return a},W=function(e,t){A(e,t,{get:function(){return C(this)[t]}})},H=function(e){var t;return e instanceof D||"ArrayBuffer"==(t=y(e))||"SharedArrayBuffer"==t},G=function(e,t){return q(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},Q=function(e,t){return G(e,t=m(t,!0))?l(2,e[t]):I(e,t)},Y=function(e,t,n){return!(G(e,t=m(t,!0))&&v(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?A(e,t,n):(e[t]=n.value,e)};o?(N||(E.f=Q,k.f=Y,W(z,"buffer"),W(z,"byteOffset"),W(z,"byteLength"),W(z,"length")),r({target:"Object",stat:!0,forced:!N},{getOwnPropertyDescriptor:Q,defineProperty:Y}),e.exports=function(e,t,n){var o=e.match(/\d+$/)[0]/8,c=e+(n?"Clamped":"")+"Array",u="get"+e,l="set"+e,m=a[c],b=m,y=b&&b.prototype,k={},E=function(e,t){A(e,t,{get:function(){return function(e,t){var n=C(e);return n.view[u](t*o+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var a=C(e);n&&(r=(r=M(r))<0?0:r>255?255:255&r),a.view[l](t*o+a.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};N?i&&(b=t((function(e,t,n,r){return s(e,b,c),P(v(t)?H(t)?void 0!==r?new m(t,h(n,o),r):void 0!==n?new m(t,h(n,o)):new m(t):q(t)?B(b,t):w.call(b,t):new m(d(t)),e,b)})),_&&_(b,U),j(x(m),(function(e){e in b||p(b,e,m[e])})),b.prototype=y):(b=t((function(e,t,n,r){s(e,b,c);var a,i,u,l=0,p=0;if(v(t)){if(!H(t))return q(t)?B(b,t):w.call(b,t);a=t,p=h(n,o);var m=t.byteLength;if(void 0===r){if(m%o)throw L("Wrong length");if((i=m-p)<0)throw L("Wrong length")}else if((i=f(r)*o)+p>m)throw L("Wrong length");u=i/o}else u=d(t),a=new D(i=u*o);for(T(e,{buffer:a,byteOffset:p,byteLength:i,length:u,view:new R(a)});l1?arguments[1]:void 0)}))},NMFW: +/*!****************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/redefine.js ***! + \****************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv"),a=n(/*! ../internals/create-non-enumerable-property */"lz10"),o=n(/*! ../internals/has */"jtLI"),i=n(/*! ../internals/set-global */"TMUv"),c=n(/*! ../internals/inspect-source */"J3Yn"),u=n(/*! ../internals/internal-state */"1aI8"),s=u.get,l=u.enforce,p=String(String).split("String");(e.exports=function(e,t,n,c){var u=!!c&&!!c.unsafe,s=!!c&&!!c.enumerable,f=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||a(n,"name",t),l(n).source=p.join("string"==typeof t?t:"")),e!==r?(u?!f&&e[t]&&(s=!0):delete e[t],s?e[t]=n:a(e,t,n)):s?e[t]=n:i(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||c(this)}))},NMu4: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/web.url.to-json.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";n(/*! ../internals/export */"MMxC")({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},NQQk: +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/string-html-forced.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/fails */"MVys");e.exports=function(e){return r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},"NQz/": +/*!******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.to-string.js ***! + \******************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-buffer-view-core */"FVwB").exportTypedArrayMethod,a=n(/*! ../internals/fails */"MVys"),o=n(/*! ../internals/global */"ukPv").Uint8Array,i=o&&o.prototype||{},c=[].toString,u=[].join;a((function(){c.call({})}))&&(c=function(){return u.call(this)});var s=i.toString!=c;r("toString",c,s)},NYJX: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.array.filter.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/array-iteration */"zv1X").filter,o=n(/*! ../internals/array-method-has-species-support */"jMDO"),i=n(/*! ../internals/array-method-uses-to-length */"kGMc"),c=o("filter"),u=i("filter");r({target:"Array",proto:!0,forced:!c||!u},{filter:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},NcLc: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/regexp-exec.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r,a,o=n(/*! ./regexp-flags */"k/J9"),i=n(/*! ./regexp-sticky-helpers */"M8HR"),c=RegExp.prototype.exec,u=String.prototype.replace,s=c,l=(r=/a/,a=/b*/g,c.call(r,"a"),c.call(a,"a"),0!==r.lastIndex||0!==a.lastIndex),p=i.UNSUPPORTED_Y||i.BROKEN_CARET,f=void 0!==/()??/.exec("")[1];(l||f||p)&&(s=function(e){var t,n,r,a,i=this,s=p&&i.sticky,d=o.call(i),h=i.source,m=0,b=e;return s&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),b=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(h="(?: "+h+")",b=" "+b,m++),n=new RegExp("^(?:"+h+")",d)),f&&(n=new RegExp("^"+h+"$(?!\\s)",d)),l&&(t=i.lastIndex),r=c.call(s?n:i,b),s?r?(r.input=r.input.slice(m),r[0]=r[0].slice(m),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:l&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),f&&r&&r.length>1&&u.call(r[0],n,(function(){for(a=1;a0?h[0]||s.data[0].ec_major_school_id:void 0}});case 14:case"end":return e.stop()}}),e)})),getYearList:l.a.mark((function e(t,n){var r,a,o,i,c,u,s,h;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,o=n.put,i=n.select,e.next=4,a(p.k,r.id);case 4:return c=e.sent,e.next=7,i((function(e){return e.user}));case 7:if(u=e.sent,s=u.userInfo,!c||!c.data){e.next=13;break}return h=d.a.getItem(null==s?void 0:s.login),e.next=13,o({type:"setMajorOrYearDataSource",payload:{key:f.b[1],value:c.data.map((function(e){return{label:e.year,value:e.ec_year_id}})),active:c.data.length>0?r.firstEnter?h[1]:c.data[0].ec_year_id:void 0}});case 13:case"end":return e.stop()}}),e)})),getGraduationResults:l.a.mark((function e(t,n){var r,a,u,s,h,m,b,y,v,g,_,x,w;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Object(i.a)(t),r=n.call,a=n.put,u=n.select,e.next=4,u((function(e){return e.engineeringNormList}));case 4:return s=e.sent,h=s.headerData,e.next=8,u((function(e){return e.user}));case 8:if(m=e.sent,b=m.userInfo,y=[],v=[],g="",!(_=h.active[f.b[1]])){e.next=21;break}return x=[h.active[f.b[0]],h.active[f.b[1]]],d.a.setItem(null==b?void 0:b.login,x),e.next=19,r(p.h,_);case 19:(w=e.sent)&&w.graduation_requirements&&(g=w.all_goal_value||"",y=w.graduation_requirements.map((function(e){var t=e.subitems,n=Object(o.a)(e,["subitems"]);return v.push(n.id),Object(c.a)(Object(c.a)({},n),{},{children:t})})));case 21:return e.next=23,a({type:"save",payload:{tabListData:y,all_goal_value:g,expandedRowKeys:v}});case 23:case"end":return e.stop()}}),e)})),exportGraduation:l.a.mark((function e(t,n){var r,a,o,c;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Object(i.a)(t),r=n.call,a=n.select,e.next=4,a((function(e){return e.engineeringNormList}));case 4:if(o=e.sent,!(c=o.headerData).active[f.b[1]]){e.next=9;break}return e.next=9,r(p.b,c.active[f.b[1]]);case 9:case"end":return e.stop()}}),e)})),compute:l.a.mark((function e(t,n){var r,i,c,u,s,f;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,i=n.call,c=n.put,u=r.all,s=Object(o.a)(r,["all"]),e.next=5,i(u?p.l:p.o,s);case 5:if(!(f=e.sent)||0!==f.status){e.next=12;break}return a.b.success("计算完成"),e.next=10,c({type:"getGraduationResults"});case 10:e.next=13;break;case 12:a.b.error(f.message);case 13:case"end":return e.stop()}}),e)})),getFormulas:l.a.mark((function e(t,n){var r,a,o,i,c,u;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.callback,a=n.call,o=n.select,e.next=4,o((function(e){return e.engineeringNormList}));case 4:if(i=e.sent,!(c=i.headerData).active[f.b[1]]){e.next=11;break}return e.next=9,a(p.f,c.active[f.b[1]]);case 9:u=e.sent,r(u);case 11:case"end":return e.stop()}}),e)})),setFormulas:l.a.mark((function e(t,n){var r,a,o,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=t.callback,o=n.call,e.next=4,o(p.p,r);case 4:i=e.sent,a(i);case 6:case"end":return e.stop()}}),e)})),putGoalValue:l.a.mark((function e(t,n){var r,o,i,c,u;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=n.call,i=n.put,e.next=4,o(p.q,r);case 4:if(!(c=e.sent)||0!==c.status){e.next=13;break}return a.b.success("保存成功"),e.next=9,i({type:"save",payload:{actionTabs:{key:"",params:{}}}});case 9:return e.next=11,i({type:"getGraduationResults"});case 11:e.next=16;break;case 13:u="保存失败",c&&c.message&&(u=c.message),a.b.error(u);case 16:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return Object(c.a)(Object(c.a)({},e),t.payload)},setMajorOrYearDataSource:function(e,t){var n=t.payload,r=e.headerData.active;return n.active&&(r=Object(c.a)(Object(c.a)({},r),{},Object(u.a)({},n.key,n.active))),Object(c.a)(Object(c.a)({},e),{},{headerData:Object(c.a)(Object(c.a)({},e.headerData),{},{dataSource:Object(c.a)(Object(c.a)({},e.headerData.dataSource),{},Object(u.a)({},n.key,Object(c.a)(Object(c.a)({},e.headerData.dataSource[n.key]),{},{dataList:n.value}))),active:r})})},setMajorOrYearActive:function(e,t){var n=t.payload;return Object(c.a)(Object(c.a)({},e),{},{headerData:Object(c.a)(Object(c.a)({},e.headerData),{},{active:Object(c.a)(Object(c.a)({},e.headerData.active),{},Object(u.a)({},n.key,n.value))})})}},subscriptions:{setup:function(e){var t=e.dispatch;return e.history.listen((function(e){"/"===e.pathname&&t({type:"query"})}))}}};t.a=h},PDVC: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.strike.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/create-html */"V85Q");r({target:"String",proto:!0,forced:n(/*! ../internals/string-html-forced */"NQQk")("strike")},{strike:function(){return a(this,"strike","","")}})},PHrn: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/array-for-each.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-iteration */"zv1X").forEach,a=n(/*! ../internals/array-method-is-strict */"R8iy"),o=n(/*! ../internals/array-method-uses-to-length */"kGMc"),i=a("forEach"),c=o("forEach");e.exports=i&&c?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},PJYZ: +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! + \**********************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},PPXv: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/get-map-iterator.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/is-pure */"Zcjx"),a=n(/*! ../internals/get-iterator */"qcmB");e.exports=r?a:function(e){return Map.prototype.entries.call(e)}},PUJJ: +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.is-superset-of.js ***! + \*******************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/an-object */"f1E4"),i=n(/*! ../internals/a-function */"cT1L"),c=n(/*! ../internals/iterate */"IuhT");r({target:"Set",proto:!0,real:!0,forced:a},{isSupersetOf:function(e){var t=o(this),n=i(t.has);return!c(e,(function(e){if(!1===n.call(t,e))return c.stop()})).stopped}})},PYwp: +/*!********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***! + \********************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},PaaY: +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.reduce.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-buffer-view-core */"FVwB"),a=n(/*! ../internals/array-reduce */"9RRT").left,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(e){return a(o(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}))},Pp3M: +/*!************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.map.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/collection */"/gva"),a=n(/*! ../internals/collection-strong */"vO0A");e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),a)},PpiC: +/*!*****************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules ***! + \*****************************************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n.d(t,"a",(function(){return r}))},Pq08: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.keys.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/to-object */"cTDu"),o=n(/*! ../internals/object-keys */"P0e2");r({target:"Object",stat:!0,forced:n(/*! ../internals/fails */"MVys")((function(){o(1)}))},{keys:function(e){return o(a(e))}})},PrET: +/*!*****************************************!*\ + !*** ./node_modules/call-bind/index.js ***! + \*****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! function-bind */"D3zA"),a=n(/*! get-intrinsic */"AM7I"),o=a("%Function.prototype.apply%"),i=a("%Function.prototype.call%"),c=a("%Reflect.apply%",!0)||r.call(i,o),u=a("%Object.getOwnPropertyDescriptor%",!0),s=a("%Object.defineProperty%",!0),l=a("%Math.max%");if(s)try{s({},"a",{value:1})}catch(e){s=null}e.exports=function(e){var t=c(r,i,arguments);if(u&&s){var n=u(t,"length");n.configurable&&s(t,"length",{value:1+l(0,e.length-(arguments.length-1))})}return t};var p=function(){return c(r,o,arguments)};s?s(e.exports,"apply",{value:p}):e.exports.apply=p},"Pv/L": +/*!*************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toArray.js ***! + \*************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(/*! @babel/runtime/helpers/esm/arrayWithHoles */"+kx5"),a=n(/*! @babel/runtime/helpers/esm/iterableToArray */"Y9hK"),o=n(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x"),i=n(/*! @babel/runtime/helpers/esm/nonIterableRest */"u6e6");function c(e){return Object(r.a)(e)||Object(a.a)(e)||Object(o.a)(e)||Object(i.a)()}},Q2Ig: +/*!********************************************************!*\ + !*** ./node_modules/node-libs-browser/mock/process.js ***! + \********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,a;t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},a="/",t.cwd=function(){return a},t.chdir=function(e){r||(r=n(/*! path */"33yf")),a=r.resolve(e,a)},t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},Q3OH: +/*!***********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.array.unscopables.flat-map.js ***! + \***********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/add-to-unscopables */"eNh0")("flatMap")},Q9SF: +/*!****************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! + \****************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},"QC+M": +/*!*******************************************!*\ + !*** ./node_modules/rc-util/es/Portal.js ***! + \*******************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! react */"q1tI"),a=n(/*! react-dom */"i8i4"),o=n.n(a),i=n(/*! ./Dom/canUseDom */"MNnm"),c=Object(r.forwardRef)((function(e,t){var n=e.didUpdate,a=e.getContainer,c=e.children,u=Object(r.useRef)();Object(r.useImperativeHandle)(t,(function(){return{}}));var s=Object(r.useRef)(!1);return!s.current&&Object(i.a)()&&(u.current=a(),s.current=!0),Object(r.useEffect)((function(){null==n||n(e)})),Object(r.useEffect)((function(){return function(){var e,t;null===(e=u.current)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(u.current)}}),[]),u.current?o.a.createPortal(c,u.current):null}));t.a=c},QCnb: +/*!*****************************************!*\ + !*** ./node_modules/scheduler/index.js ***! + \*****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";e.exports=n(/*! ./cjs/scheduler.production.min.js */"+wdc")},QILm: +/*!************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***! + \************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./objectWithoutPropertiesLoose.js */"8OQS");e.exports=function(e,t){if(null==e)return{};var n,a,o=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports.default=e.exports},QLaP: +/*!*******************************************!*\ + !*** ./node_modules/invariant/browser.js ***! + \*******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";e.exports=function(e,t,n,r,a,o,i,c){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,a,o,i,c],l=0;(u=new Error(t.replace(/%s/g,(function(){return s[l++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},QQ4S: +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/array-last-index-of.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/to-indexed-object */"0qr0"),a=n(/*! ../internals/to-integer */"m0kY"),o=n(/*! ../internals/to-length */"oa35"),i=n(/*! ../internals/array-method-is-strict */"R8iy"),c=n(/*! ../internals/array-method-uses-to-length */"kGMc"),u=Math.min,s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0,p=i("lastIndexOf"),f=c("indexOf",{ACCESSORS:!0,1:0}),d=l||!p||!f;e.exports=d?function(e){if(l)return s.apply(this,arguments)||0;var t=r(this),n=o(t.length),i=n-1;for(arguments.length>1&&(i=u(i,a(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:s},QSc6: +/*!******************************************!*\ + !*** ./node_modules/qs/lib/stringify.js ***! + \******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! side-channel */"VAJa"),a=n(/*! ./utils */"0jNN"),o=n(/*! ./formats */"sxOR"),i=Object.prototype.hasOwnProperty,c={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,s=String.prototype.split,l=Array.prototype.push,p=function(e,t){l.apply(e,u(t)?t:[t])},f=Date.prototype.toISOString,d=o.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:a.encode,encodeValuesOnly:!1,format:d,formatter:o.formatters[d],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},m={},b=function e(t,n,o,i,c,l,f,d,b,y,v,g,_,x,w){for(var j,O=t,k=w,E=0,S=!1;void 0!==(k=k.get(m))&&!S;){var P=k.get(t);if(E+=1,void 0!==P){if(P===E)throw new RangeError("Cyclic object value");S=!0}void 0===k.get(m)&&(E=0)}if("function"==typeof f?O=f(n,O):O instanceof Date?O=y(O):"comma"===o&&u(O)&&(O=a.maybeMap(O,(function(e){return e instanceof Date?y(e):e}))),null===O){if(i)return l&&!_?l(n,h.encoder,x,"key",v):n;O=""}if("string"==typeof(j=O)||"number"==typeof j||"boolean"==typeof j||"symbol"==typeof j||"bigint"==typeof j||a.isBuffer(O)){if(l){var C=_?n:l(n,h.encoder,x,"key",v);if("comma"===o&&_){for(var T=s.call(String(O),","),A="",I=0;I0?O.join(",")||null:void 0}];else if(u(f))M=f;else{var D=Object.keys(O);M=d?D.sort(d):D}for(var R=0;R0?_+g:""}},QTEQ: +/*!***************************************!*\ + !*** ./node_modules/flatten/index.js ***! + \***************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t){return(t="number"==typeof t?t:1/0)?function e(n,r){return n.reduce((function(n,a){return Array.isArray(a)&&r1?arguments[1]:void 0),n=o(this,this.constructor),r=0,u=t.length,s=new(c(n))(u);u>r;)s[r]=t[r++];return s}))},Rbmm: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.big.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/create-html */"V85Q");r({target:"String",proto:!0,forced:n(/*! ../internals/string-html-forced */"NQQk")("big")},{big:function(){return a(this,"big","","")}})},ReSd: +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.number.max-safe-integer.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},RhWa: +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.is-subset-of.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/get-built-in */"29mP"),i=n(/*! ../internals/an-object */"f1E4"),c=n(/*! ../internals/a-function */"cT1L"),u=n(/*! ../internals/get-iterator */"qcmB"),s=n(/*! ../internals/iterate */"IuhT");r({target:"Set",proto:!0,real:!0,forced:a},{isSubsetOf:function(e){var t=u(this),n=i(e),r=n.has;return"function"!=typeof r&&(n=new(o("Set"))(e),r=c(n.has)),!s(t,(function(e){if(!1===r.call(n,e))return s.stop()}),void 0,!1,!0).stopped}})},Rka6: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.map.find-key.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/an-object */"f1E4"),i=n(/*! ../internals/function-bind-context */"7BAe"),c=n(/*! ../internals/get-map-iterator */"PPXv"),u=n(/*! ../internals/iterate */"IuhT");r({target:"Map",proto:!0,real:!0,forced:a},{findKey:function(e){var t=o(this),n=c(t),r=i(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n){if(r(n,e,t))return u.stop(e)}),void 0,!0,!0).result}})},Rw1i: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.promise.finally.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/native-promise-constructor */"b6st"),i=n(/*! ../internals/fails */"MVys"),c=n(/*! ../internals/get-built-in */"29mP"),u=n(/*! ../internals/species-constructor */"/dTS"),s=n(/*! ../internals/promise-resolve */"U8/t"),l=n(/*! ../internals/redefine */"NMFW");r({target:"Promise",proto:!0,real:!0,forced:!!o&&i((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=u(this,c("Promise")),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}}),a||"function"!=typeof o||o.prototype.finally||l(o.prototype,"finally",c("Promise").prototype.finally)},S5nV: +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.math.rad-per-deg.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Math",stat:!0},{RAD_PER_DEG:180/Math.PI})},SGZ1: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.symbol.search.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/define-well-known-symbol */"I65O")("search")},Sb5z: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.is-sealed.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/fails */"MVys"),o=n(/*! ../internals/is-object */"tSXo"),i=Object.isSealed;r({target:"Object",stat:!0,forced:a((function(){i(1)}))},{isSealed:function(e){return!o(e)||!!i&&i(e)}})},Sf9Y: +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.number.from-string.js ***! + \*******************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/to-integer */"m0kY"),o=n(/*! ../internals/number-parse-int */"Ze4s"),i=/^[\da-z]+$/;r({target:"Number",stat:!0},{fromString:function(e,t){var n,r,c=1;if("string"!=typeof e)throw TypeError("Invalid number representation");if(!e.length)throw SyntaxError("Invalid number representation");if("-"==e.charAt(0)&&(c=-1,!(e=e.slice(1)).length))throw SyntaxError("Invalid number representation");if((n=void 0===t?10:a(t))<2||n>36)throw RangeError("Invalid radix");if(!i.test(e)||(r=o(e,n)).toString(n)!==e)throw SyntaxError("Invalid number representation");return c*r}})},SksO: +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},Sn4z: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/typed-array-from.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/to-object */"cTDu"),a=n(/*! ../internals/to-length */"oa35"),o=n(/*! ../internals/get-iterator-method */"9SZg"),i=n(/*! ../internals/is-array-iterator-method */"bF+Q"),c=n(/*! ../internals/function-bind-context */"7BAe"),u=n(/*! ../internals/array-buffer-view-core */"FVwB").aTypedArrayConstructor;e.exports=function(e){var t,n,s,l,p,f,d=r(e),h=arguments.length,m=h>1?arguments[1]:void 0,b=void 0!==m,y=o(d);if(null!=y&&!i(y))for(f=(p=y.call(d)).next,d=[];!(l=f.call(p)).done;)d.push(l.value);for(b&&h>2&&(m=c(m,arguments[2],2)),n=a(d.length),s=new(u(this))(n),t=0;n>t;t++)s[t]=b?m(d[t],t):d[t];return s}},SprQ: +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/correct-prototype-getter.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/fails */"MVys");e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},Srjj: +/*!****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/object-keys-internal.js ***! + \****************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/has */"jtLI"),a=n(/*! ../internals/to-indexed-object */"0qr0"),o=n(/*! ../internals/array-includes */"/3zY").indexOf,i=n(/*! ../internals/hidden-keys */"6ixQ");e.exports=function(e,t){var n,c=a(e),u=0,s=[];for(n in c)!r(i,n)&&r(c,n)&&s.push(n);for(;t.length>u;)r(c,n=t[u++])&&(~o(s,n)||s.push(n));return s}},"T/5g": +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.is-extensible.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/fails */"MVys"),o=n(/*! ../internals/is-object */"tSXo"),i=Object.isExtensible;r({target:"Object",stat:!0,forced:a((function(){i(1)}))},{isExtensible:function(e){return!!o(e)&&(!i||i(e))}})},T5T7: +/*!*******************************!*\ + !*** ./src/styles/reset.less ***! + \*******************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},T5bk: +/*!************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/toArray.js ***! + \************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(/*! ./arrayWithHoles.js */"DSFK"),a=n(/*! ./iterableToArray.js */"25BE"),o=n(/*! ./unsupportedIterableToArray.js */"BsWD"),i=n(/*! ./nonIterableRest.js */"PYwp");function c(e){return Object(r.a)(e)||Object(a.a)(e)||Object(o.a)(e)||Object(i.a)()}},TMUv: +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/set-global.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv"),a=n(/*! ../internals/create-non-enumerable-property */"lz10");e.exports=function(e,t){try{a(r,e,t)}catch(n){r[e]=t}return t}},TOwV: +/*!****************************************!*\ + !*** ./node_modules/react-is/index.js ***! + \****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";e.exports=n(/*! ./cjs/react-is.production.min.js */"qT12")},TPcJ: +/*!***********************************!*\ + !*** ./src/models/paths/index.ts ***! + \***********************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/paths */"Mgx3"),c={namespace:"pathsList",state:{name:"",loading:!0,actionTabs:{key:"",params:{}},listParams:{sort:"desc",order:"new",page:1,limit:16,keyword:""}},effects:{getCourse:o.a.mark((function e(t,n){var a,c,u,s,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,c=n.call,u=n.put,s=a,e.next=5,c(i.y,a);case 5:return l=e.sent,e.next=8,u({type:"save",payload:Object(r.a)({listParams:s},l)});case 8:return e.abrupt("return",l);case 9:case"end":return e.stop()}}),e)})),getMenus: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.z,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{menus:u}});case 7: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)})),clearListParams:o.a.mark((function e(t,n){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.payload,n.call,r=n.put,e.next=4,r({type:"save",payload:{listParams:{sort:"desc",order:"new",page:1,limit:16,keyword:""}}});case 4:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return 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=c},TSYQ: +/*!******************************************!*\ + !*** ./node_modules/classnames/index.js ***! + \******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r; +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t=0;t--){var n=e[t][i];n.modified||(Array.isArray(n.base)?T(n)&&O(n):C(n)&&O(n))}}function C(e){for(var t=e.base,n=e.draft,r=Object.keys(n),a=r.length-1;a>=0;a--){var o=r[a],c=t[o];if(void 0===c&&!m(t,o))return!0;var u=n[o],s=u&&u[i];if(s?s.base!==c:!b(u,c))return!0}return r.length!==Object.keys(t).length}function T(e){var t=e.draft;if(t.length!==e.base.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var A=Object.freeze({willFinalize:function(e,t,n){e.drafts.forEach((function(e){e[i].finalizing=!0})),n?c(t)&&t[i].scope===e&&P(e.drafts):(e.patches&&function e(t){if(!t||"object"!=typeof t)return;var n=t[i];if(!n)return;var r=n.base,a=n.draft,o=n.assigned;if(Array.isArray(t)){if(T(n)){if(O(n),o.length=!0,a.lengthl&&i[p-1]===c[p+s-1];)--p;for(var f=l;f=p;--b){var y=t.concat([b]);n[m+b-p]={op:"add",path:y,value:c[b]},h&&r.push({op:"remove",path:y})}h||r.push({op:"replace",path:t.concat(["length"]),value:i.length})}(e,t,n,r):function(e,t,n,r){var a=e.base,o=e.copy;d(e.assigned,(function(e,i){var c=a[e],u=o[e],s=i?e in a?"replace":"add":"remove";if(c!==u||"replace"!==s){var l=t.concat(e);n.push("remove"===s?{op:s,path:l}:{op:s,path:l,value:u}),r.push("add"===s?{op:"remove",path:l}:"remove"===s?{op:"add",path:l,value:c}:{op:"replace",path:l,value:c})}}))}(e,t,n,r)}function z(e,t){for(var n=0;n0;)n[r]=arguments[r+1];return o.produce(e,(function(e){return t.call.apply(t,[e,e].concat(n))}))}}if("function"!=typeof t)throw new Error("The first or second argument to `produce` must be a function");if(void 0!==n&&"function"!=typeof n)throw new Error("The third argument to `produce` must be a function or undefined");if(u(e)){var c=y.enter(),s=this.createProxy(e),l=!0;try{r=t.call(s,s),l=!1}finally{l?c.revoke():c.leave()}return r instanceof Promise?r.then((function(e){return c.usePatches(n),o.processResult(e,c)}),(function(e){throw c.revoke(),e})):(c.usePatches(n),this.processResult(r,c))}return void 0===(r=t(e))?e:r!==a?r:void 0},q.prototype.createDraft=function(e){if(!u(e))throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object");var t=y.enter(),n=this.createProxy(e);return n[i].isManual=!0,t.leave(),n},q.prototype.finishDraft=function(e,t){var n=e&&e[i];if(!n||!n.isManual)throw new Error("First argument to `finishDraft` must be a draft returned by `createDraft`");if(n.finalized)throw new Error("The given draft is already finalized");var r=n.scope;return r.usePatches(t),this.processResult(void 0,r)},q.prototype.setAutoFreeze=function(e){this.autoFreeze=e},q.prototype.setUseProxies=function(e){this.useProxies=e,l(this,e?F:A)},q.prototype.applyPatches=function(e,t){return c(e)?z(e,t):this.produce(e,(function(e){return z(e,t)}))},q.prototype.processResult=function(e,t){var n=t.drafts[0],r=void 0!==e&&e!==n;if(this.willFinalize(t,e,r),r){if(n[i].modified)throw t.revoke(),new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.");u(e)&&(e=this.finalize(e,null,t)),t.patches&&(t.patches.push({op:"replace",path:[],value:e}),t.inversePatches.push({op:"replace",path:[],value:n[i].base}))}else e=this.finalize(n,[],t);return t.revoke(),t.patches&&t.patchListener(t.patches,t.inversePatches),e!==a?e:void 0},q.prototype.finalize=function(e,t,n){var r=this,a=e[i];if(!a)return Object.isFrozen(e)?e:this.finalizeTree(e,null,n);if(a.scope!==n)return e;if(!a.modified)return a.base;if(!a.finalized){if(a.finalized=!0,this.finalizeTree(a.draft,t,n),this.onDelete)if(this.useProxies){var o=a.assigned;for(var c in o)o[c]||this.onDelete(a,c)}else{var u=a.base,s=a.copy;d(u,(function(e){m(s,e)||r.onDelete(a,e)}))}this.onCopy&&this.onCopy(a),this.autoFreeze&&n.canAutoFreeze&&Object.freeze(a.copy),t&&n.patches&&U(a,t,n.patches,n.inversePatches)}return a.copy},q.prototype.finalizeTree=function(e,t,n){var r=this,a=e[i];a&&(this.useProxies||(a.copy=f(a.draft,!0)),e=a.copy);var o=!!t&&!!n.patches,s=function(i,l,p){if(l===p)throw Error("Immer forbids circular references");var f=!!a&&p===e;if(c(l)){var m=f&&o&&!a.assigned[i]?t.concat(i):null;if(c(l=r.finalize(l,m,n))&&(n.canAutoFreeze=!1),Array.isArray(p)||h(p,i)?p[i]=l:Object.defineProperty(p,i,{value:l}),f&&l===a.base[i])return}else{if(f&&b(l,a.base[i]))return;u(l)&&!Object.isFrozen(l)&&d(l,s)}f&&r.onAssign&&r.onAssign(a,i,l)};return d(e,s),e};var B=new q,W=B.produce,H=B.setAutoFreeze.bind(B),G=B.setUseProxies.bind(B),Q=B.applyPatches.bind(B),Y=B.createDraft.bind(B),K=B.finishDraft.bind(B);t.default=W}.call(this,n(/*! ./../../node-libs-browser/mock/process.js */"Q2Ig"))},V0Bj: +/*!******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.symbol.observable.js ***! + \******************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/define-well-known-symbol */"I65O")("observable")},V0Rq: +/*!*********************************!*\ + !*** ./src/service/exercise.ts ***! + \*********************************/ +/*! exports provided: getExerciseList, getExerciseIdentityPhotos, getVideoPushUrl, queryIdentityPhotoState, getExerciseStatistics, getBrankList, saveBanks, getExerciseCourses, getCommonHeader, addExercise, putExercise, editExercise, getTagDiscipline, editExerciseQuestion, addExerciseQuestion, exeriseMoveUpDown, exeriseQuestionDelete, getEndGroups, getPublishGroups, getReviewExercise, putAdjustScore, putBatchAdjustScore, putExerciseAdjustScore, delayedTime, getWorkSetting, updateSetting, getReviewGroupExercise, exportList, getExerciseStartAnswer, getExerciseStart, updateExerciseAnswers, submitExerciseAnswer, submitSimulateExerciseAnswer, redoExercise, resetMyGame, startProgram, beginCommit, simulateBeginCommit, getExaminationIntelligentSettings, getRandomEditExercises, getObjectiveScores, getRedoModal, getUserExercise, getExerciseExportHeadData, allowCloseCamera, getExerciseUserInfo, recordScreen, unbindIp, checkIp, makeUpStudents, getCodeReviewDetail, changeScore, simulateExercise, startSimulateAnswer, exerciseLeftTime, commitScreenAt, setEcsAttachment */ +/*! exports used: addExercise, addExerciseQuestion, allowCloseCamera, beginCommit, changeScore, checkIp, commitScreenAt, delayedTime, editExercise, editExerciseQuestion, exerciseLeftTime, exeriseMoveUpDown, exeriseQuestionDelete, exportList, getBrankList, getCodeReviewDetail, getCommonHeader, getEndGroups, getExaminationIntelligentSettings, getExerciseCourses, getExerciseExportHeadData, getExerciseIdentityPhotos, getExerciseList, getExerciseStart, getExerciseStartAnswer, getExerciseStatistics, getExerciseUserInfo, getObjectiveScores, getPublishGroups, getRandomEditExercises, getRedoModal, getReviewExercise, getReviewGroupExercise, getTagDiscipline, getUserExercise, getWorkSetting, makeUpStudents, putAdjustScore, putBatchAdjustScore, putExercise, putExerciseAdjustScore, queryIdentityPhotoState, recordScreen, redoExercise, resetMyGame, saveBanks, setEcsAttachment, simulateBeginCommit, simulateExercise, startProgram, startSimulateAnswer, submitExerciseAnswer, submitSimulateExerciseAnswer, unbindIp, updateExerciseAnswers, updateSetting */function(e,t,n){"use strict";n.d(t,"w",(function(){return u})),n.d(t,"v",(function(){return l})),n.d(t,"P",(function(){return f})),n.d(t,"z",(function(){return h})),n.d(t,"o",(function(){return b})),n.d(t,"T",(function(){return v})),n.d(t,"t",(function(){return _})),n.d(t,"q",(function(){return w})),n.d(t,"a",(function(){return O})),n.d(t,"N",(function(){return E})),n.d(t,"i",(function(){return P})),n.d(t,"H",(function(){return T})),n.d(t,"j",(function(){return I})),n.d(t,"b",(function(){return L})),n.d(t,"l",(function(){return R})),n.d(t,"m",(function(){return F})),n.d(t,"r",(function(){return z})),n.d(t,"C",(function(){return q})),n.d(t,"F",(function(){return W})),n.d(t,"L",(function(){return G})),n.d(t,"M",(function(){return Y})),n.d(t,"O",(function(){return X})),n.d(t,"h",(function(){return Z})),n.d(t,"J",(function(){return ee})),n.d(t,"db",(function(){return ne})),n.d(t,"G",(function(){return ae})),n.d(t,"n",(function(){return ie})),n.d(t,"y",(function(){return ue})),n.d(t,"x",(function(){return se})),n.d(t,"cb",(function(){return le})),n.d(t,"Z",(function(){return fe})),n.d(t,"ab",(function(){return he})),n.d(t,"R",(function(){return be})),n.d(t,"S",(function(){return ve})),n.d(t,"X",(function(){return ge})),n.d(t,"d",(function(){return _e})),n.d(t,"V",(function(){return xe})),n.d(t,"s",(function(){return we})),n.d(t,"D",(function(){return je})),n.d(t,"B",(function(){return Oe})),n.d(t,"E",(function(){return ke})),n.d(t,"I",(function(){return Ee})),n.d(t,"u",(function(){return Se})),n.d(t,"c",(function(){return Pe})),n.d(t,"A",(function(){return Ce})),n.d(t,"Q",(function(){return Te})),n.d(t,"bb",(function(){return Ae})),n.d(t,"f",(function(){return Ie})),n.d(t,"K",(function(){return Me})),n.d(t,"p",(function(){return Le})),n.d(t,"e",(function(){return Re})),n.d(t,"W",(function(){return Fe})),n.d(t,"Y",(function(){return ze})),n.d(t,"k",(function(){return qe})),n.d(t,"g",(function(){return We})),n.d(t,"U",(function(){return Ge}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/utils/fetch */"ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/exercise_lists.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/exercise_identity_photos.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/query_identity_photo_state.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/exercise_result.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/question_banks/bank_list.json",{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/question_banks/save_banks.json",{method:"POST",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/exercises/publish_modal.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return j.apply(this,arguments)}function j(){return(j=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/common_header.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return k.apply(this,arguments)}function k(){return(k=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/exercises.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return S.apply(this,arguments)}function S(){return(S=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.exerciseId,".json"),{method:"put",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,".json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return A.apply(this,arguments)}function A(){return(A=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/tag_disciplines.json",{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e){return M.apply(this,arguments)}function M(){return(M=Object(a.a)(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,delete t.id,e.abrupt("return",Object(c.a)("/api/exercise_questions/".concat(n,".json"),{method:"put",body:Object(r.a)({},t)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(e){return D.apply(this,arguments)}function D(){return(D=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/exercise_questions.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e){return N.apply(this,arguments)}function N(){return(N=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercise_questions/".concat(t.id,"/up_down.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e){return U.apply(this,arguments)}function U(){return(U=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercise_questions/".concat(t.id,".json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(e){return V.apply(this,arguments)}function V(){return(V=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/exercises/end_modal.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(e){return B.apply(this,arguments)}function B(){return(B=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/publish_groups.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function W(e){return H.apply(this,arguments)}function H(){return(H=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.exerciseId,"/user_exercise_detail.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(e){return Q.apply(this,arguments)}function Q(){return(Q=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercise_questions/".concat(t.id,"/adjust_score.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(e){return K.apply(this,arguments)}function K(){return(K=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercise_questions/".concat(t.id,"/batch_adjust_score.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(e){return J.apply(this,arguments)}function J(){return(J=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.id,"/adjust_score.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(e){return $.apply(this,arguments)}function $(){return($=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.id,"/delayed_time.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(e){return te.apply(this,arguments)}function te(){return(te=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/exercise_setting.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(e){return re.apply(this,arguments)}function re(){return(re=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/commit_setting.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ae(e){return oe.apply(this,arguments)}function oe(){return(oe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.exerciseId,"/review_exercises_by_students.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ie(e){return ce.apply(this,arguments)}function ce(){return(ce=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/exercise_lists.xlsx"),{method:"get",params:Object(r.a)(Object(r.a)({},t),{},{export:!0})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ue(e){return Object(c.a)("/api/exercises/".concat(e.categoryId,"/start_answer.json"),{method:"get",params:Object(r.a)({},e)})}function se(e){return Object(c.a)("/api/exercises/".concat(e.categoryId,"/start.json"),{method:"get",params:Object(r.a)({},e)})}function le(e){return pe.apply(this,arguments)}function pe(){return(pe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercise_questions/".concat(t.questionId,"/exercise_answers.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fe(e){return de.apply(this,arguments)}function de(){return(de=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/commit_exercise.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function he(e){return me.apply(this,arguments)}function me(){return(me=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/simulate_commit_exercise.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function be(e){return ye.apply(this,arguments)}function ye(){return(ye=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/redo_exercise.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ve(e){return Object(c.a)("/api/".concat(e.url),{method:"get",params:Object(r.a)({},e)})}function ge(e){return Object(c.a)("/api/problems/".concat(e.id,"/start.json"),{method:"get",params:Object(r.a)({},e)})}function _e(e){return Object(c.a)("/api/exercises/".concat(e.id,"/begin_commit.json"),{method:"get",params:Object(r.a)({},e)})}function xe(e){return Object(c.a)("/api/exercises/".concat(e.id,"/simulate_begin_commit.json"),{method:"get",params:Object(r.a)({},e)})}function we(e){return Object(c.a)("/api/examination_intelligent_settings/optional_items.json",{method:"post",body:Object(r.a)({},e)})}function je(e){return console.log("params:",e),Object(c.a)("/api/exercises/".concat(e.categoryId,"/edit.json"),{method:"get",params:Object(r.a)({},e)})}function Oe(e){return Object(c.a)("/api/exercises/".concat(e.id,"/get_objective_scores.json"),{method:"get",params:Object(r.a)({},e)})}function ke(e){return Object(c.a)("/api/exercises/".concat(e.categoryId,"/redo_modal.json"),{method:"get",params:Object(r.a)({},e)})}function Ee(e){return Object(c.a)("/api/exercises/get_user_exercises.json",{method:"get",params:e})}function Se(e){return Object(c.a)("/api/exercises/".concat(e.id,"/exercise_header.json"),{method:"get",params:Object(r.a)({},e)})}function Pe(e){return Object(c.a)("/api/exercises/".concat(e.categoryId,"/allow_close_camera.json"),{method:"post",body:Object(r.a)({},e)})}function Ce(e){return Object(c.a)("/api/exercises/".concat(e.categoryId,"/get_exercise_user_info.json"),{method:"get",params:Object(r.a)({},e)})}function Te(e){return Object(c.a)("/api/exercises/".concat(e.id,"/record_screen"),{method:"post",params:Object(r.a)({},e)})}function Ae(e){return Object(c.a)("/api/exercises/".concat(e.id,"/unbind_ip.json"),{method:"post",body:Object(r.a)({},e)})}function Ie(e){return Object(c.a)("/api/exercises/".concat(e.id,"/check_ip.json"),{method:"get",params:Object(r.a)({},e)})}function Me(e){return Object(c.a)("/api/exercises/".concat(e.id,"/make_up_students.json"),{method:"get",params:Object(r.a)({},e)})}function Le(e){return De.apply(this,arguments)}function De(){return(De=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/exercises/code_review_detail.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Re(e){return Ne.apply(this,arguments)}function Ne(){return(Ne=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercise_questions/".concat(t.question_id,"/adjust_score.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fe(e){return Ue.apply(this,arguments)}function Ue(){return(Ue=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/examination_banks/".concat(t.categoryId,"/simulate_exercise.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ze(e){return Ve.apply(this,arguments)}function Ve(){return(Ve=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/simulate_start_answer.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qe(e){return Be.apply(this,arguments)}function Be(){return(Be=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/exercise_time.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function We(e){return He.apply(this,arguments)}function He(){return(He=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/exercises/".concat(t.categoryId,"/commit_screen_at.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ge(e){return Qe.apply(this,arguments)}function Qe(){return(Qe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/attachments/set_ecs_attachment.json",{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},V61k: +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/math-expm1.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=Math.expm1,r=Math.exp;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:r(e)-1}:n},V85Q: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/create-html.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/require-object-coercible */"FCfD"),a=/"/g;e.exports=function(e,t,n,o){var i=String(r(e)),c="<"+t;return""!==n&&(c+=" "+n+'="'+String(o).replace(a,""")+'"'),c+">"+i+""}},V93i: +/*!*********************************************************************************!*\ + !*** ./node_modules/history-with-query/node_modules/strict-uri-encode/index.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())}))}},VAJa: +/*!********************************************!*\ + !*** ./node_modules/side-channel/index.js ***! + \********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! get-intrinsic */"AM7I"),a=n(/*! call-bind/callBound */"VF6F"),o=n(/*! object-inspect */"JxQ3"),i=r("%TypeError%"),c=r("%WeakMap%",!0),u=r("%Map%",!0),s=a("WeakMap.prototype.get",!0),l=a("WeakMap.prototype.set",!0),p=a("WeakMap.prototype.has",!0),f=a("Map.prototype.get",!0),d=a("Map.prototype.set",!0),h=a("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new i("Side channel does not contain "+o(e))},get:function(r){if(c&&r&&("object"==typeof r||"function"==typeof r)){if(e)return s(e,r)}else if(u){if(t)return f(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(c&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(u){if(t)return h(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,a){c&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new c),l(e,r,a)):u?(t||(t=new u),d(t,r,a)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,a))}};return r}},VF6F: +/*!*********************************************!*\ + !*** ./node_modules/call-bind/callBound.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! get-intrinsic */"AM7I"),a=n(/*! ./ */"PrET"),o=a(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?a(n):n}},VQRL: +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.symbol.replace.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/define-well-known-symbol */"I65O")("replace")},VSU6: +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/array-fill.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/to-object */"cTDu"),a=n(/*! ../internals/to-absolute-index */"bIKR"),o=n(/*! ../internals/to-length */"oa35");e.exports=function(e){for(var t=r(this),n=o(t.length),i=arguments.length,c=a(i>1?arguments[1]:void 0,n),u=i>2?arguments[2]:void 0,s=void 0===u?n:a(u,n);s>c;)t[c++]=e;return t}},VTBJ: +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***! + \******************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(/*! ./defineProperty.js */"rePB");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(c&&u){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),s}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},VuYY: +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.observable.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/descriptors */"tny8"),o=n(/*! ../internals/set-species */"ssJt"),i=n(/*! ../internals/a-function */"cT1L"),c=n(/*! ../internals/an-object */"f1E4"),u=n(/*! ../internals/is-object */"tSXo"),s=n(/*! ../internals/an-instance */"igoe"),l=n(/*! ../internals/object-define-property */"YfKC").f,p=n(/*! ../internals/create-non-enumerable-property */"lz10"),f=n(/*! ../internals/redefine-all */"ujhg"),d=n(/*! ../internals/get-iterator */"qcmB"),h=n(/*! ../internals/iterate */"IuhT"),m=n(/*! ../internals/host-report-errors */"dnEI"),b=n(/*! ../internals/well-known-symbol */"2kyd"),y=n(/*! ../internals/internal-state */"1aI8"),v=b("observable"),g=y.get,_=y.set,x=function(e){return null==e?void 0:i(e)},w=function(e){var t=e.cleanup;if(t){e.cleanup=void 0;try{t()}catch(e){m(e)}}},j=function(e){return void 0===e.observer},O=function(e,t){if(!a){e.closed=!0;var n=t.subscriptionObserver;n&&(n.closed=!0)}t.observer=void 0},k=function(e,t){var n,r=_(this,{cleanup:void 0,observer:c(e),subscriptionObserver:void 0});a||(this.closed=!1);try{(n=x(e.start))&&n.call(e,this)}catch(e){m(e)}if(!j(r)){var o=r.subscriptionObserver=new E(this);try{var u=t(o),s=u;null!=u&&(r.cleanup="function"==typeof u.unsubscribe?function(){s.unsubscribe()}:i(u))}catch(e){return void o.error(e)}j(r)&&w(r)}};k.prototype=f({},{unsubscribe:function(){var e=g(this);j(e)||(O(this,e),w(e))}}),a&&l(k.prototype,"closed",{configurable:!0,get:function(){return j(g(this))}});var E=function(e){_(this,{subscription:e}),a||(this.closed=!1)};E.prototype=f({},{next:function(e){var t=g(g(this).subscription);if(!j(t)){var n=t.observer;try{var r=x(n.next);r&&r.call(n,e)}catch(e){m(e)}}},error:function(e){var t=g(this).subscription,n=g(t);if(!j(n)){var r=n.observer;O(t,n);try{var a=x(r.error);a?a.call(r,e):m(e)}catch(e){m(e)}w(n)}},complete:function(){var e=g(this).subscription,t=g(e);if(!j(t)){var n=t.observer;O(e,t);try{var r=x(n.complete);r&&r.call(n)}catch(e){m(e)}w(t)}}}),a&&l(E.prototype,"closed",{configurable:!0,get:function(){return j(g(g(this).subscription))}});var S=function(e){s(this,S,"Observable"),_(this,{subscriber:i(e)})};f(S.prototype,{subscribe:function(e){var t=arguments.length;return new k("function"==typeof e?{next:e,error:t>1?arguments[1]:void 0,complete:t>2?arguments[2]:void 0}:u(e)?e:{},g(this).subscriber)}}),f(S,{from:function(e){var t="function"==typeof this?this:S,n=x(c(e)[v]);if(n){var r=c(n.call(e));return r.constructor===t?r:new t((function(e){return r.subscribe(e)}))}var a=d(e);return new t((function(e){h(a,(function(t){if(e.next(t),e.closed)return h.stop()}),void 0,!1,!0),e.complete()}))},of:function(){for(var e="function"==typeof this?this:S,t=arguments.length,n=new Array(t),r=0;r1?arguments[1]:void 0,3),a=new(s(t,o("Map"))),f=c(a.set);return p(n,(function(e,n){f.call(a,r(n,e,t),n)}),void 0,!0,!0),a}})},W8MJ: +/*!************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/createClass.js ***! + \************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(e,t){for(var n=0;n0})).map((function(e,t){var n;return Object(r.a)(Object(r.a)({},e),{number:c[t+1],questions:null==e||null===(n=e.questions)||void 0===n?void 0:n.map((function(e){return Object(r.a)(Object(r.a)({},e),{},{shixun:e.examination_bank_shixun_challenges})}))})}))}}},s=n("6fQ5"),l={namespace:"paperlibrary",state:{paperData:void 0,disciplinesData:void 0,teachGroupData:void 0,courseOptions:[],actionTabs:{key:"",params:{}}},effects:{getDisciplines: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.g,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{disciplinesData:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getCustomDisciplines: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.f,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{disciplinesData:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getEditDisciplines:o.a.mark((function e(t,n){var a,c,u,l,p,f;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.g,a);case 4:return l=e.sent,p=null==l?void 0:l.disciplines,f=Object(s.a)(p),e.next=9,u({type:"save",payload:{courseOptions:f,disciplinesData:Object(r.a)({},l)}});case 9:return e.abrupt("return",l);case 10:case"end":return e.stop()}}),e)})),getTeachGroupData: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:{teachGroupData:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getPaperData:o.a.mark((function e(t,n){var r,a,c,s,l;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.h,r);case 4:return s=e.sent,l=u(s),e.next=8,c({type:"save",payload:{paperData:l}});case 8:return e.abrupt("return",s);case 9:case"end":return e.stop()}}),e)})),getPaperlibraryList: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.i,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),setPublic: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)})),handleDelete: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)})),getCourseList: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)})),sendToClass: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)})),adjustPosition: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)})),setScore: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)})),handleDeleteEditQuestion: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)})),batchSetScore: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)})),batchDelete: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.b,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),updatePaper: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.r,r);case 4:return e.abrupt("return",e.sent);case 5: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 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=l},WRkp: +/*!**********************************************!*\ + !*** ./node_modules/hash.js/lib/hash/sha.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";t.sha1=n(/*! ./sha/1 */"E+IA"),t.sha224=n(/*! ./sha/224 */"B/J0"),t.sha256=n(/*! ./sha/256 */"bu2F"),t.sha384=n(/*! ./sha/384 */"i5UE"),t.sha512=n(/*! ./sha/512 */"tSWc")},"WU/Z": +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.for-each.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-buffer-view-core */"FVwB"),a=n(/*! ../internals/array-iteration */"zv1X").forEach,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(e){a(o(this),e,arguments.length>1?arguments[1]:void 0)}))},WbBG: +/*!*************************************************************!*\ + !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},WkPL: +/*!*****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! + \*****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);no;)a.push(arguments[o++]);if(r=t,(d(t)||void 0!==e)&&!oe(e))return f(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!oe(t))return t}),a[1]=t,H.apply(null,a)}});W.prototype[z]||S(W.prototype,z,W.prototype.valueOf),R(W,"Symbol"),A[U]=!0},Xq8t: +/*!************************************!*\ + !*** ./src/models/forums/index.ts ***! + \************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/forums */"h+Ho"),c={namespace:"forumsList",state:{forumsData:{},listParams:{page:1,order:"updated_at"}},effects:{getForumsData:o.a.mark((function e(t,n){var a,c,u,s,l;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("shixun_discuss"===a.memoType?i.g:i.c,a);case 4:return s=e.sent,delete a.memoType,l=a,e.next=9,u({type:"save",payload:{listParams:l,forumsData:Object(r.a)({},s)}});case 9:return e.abrupt("return",s);case 10:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return 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=c},Xq8v: +/*!***********************************!*\ + !*** ./src/service/attachment.ts ***! + \***********************************/ +/*! exports provided: allAttachment, mineAttachment, fileImport, getDetail, updateFiles, updateVisits */ +/*! exports used: allAttachment, fileImport, getDetail, mineAttachment, updateFiles, updateVisits */function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"e",(function(){return b})),n.d(t,"f",(function(){return v}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/utils/fetch */"ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/files/public_with_course_and_project",{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/files/mine_with_course_and_project.json",{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/files/import.json",{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/files/".concat(t.id,".json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=Object(a.a)(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,delete t.id,e.abrupt("return",Object(c.a)("/api/files/".concat(n,".json"),{method:"put",body:Object(r.a)({},t)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/files/".concat(t.id,"/update_visits.json"),{method:"post"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},XuYy: +/*!***********************************!*\ + !*** ./src/models/user/detail.ts ***! + \***********************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/user */"jb+D"),c={namespace:"userDetail",state:{systemUpdate:void 0,homepageInfo:void 0,homeworkBanksDetail:{},actionTabs:{key:"",params:{}}},effects:{getHomeworkBanksDetail: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.p,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{homeworkBanksDetail:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getSystemUpdate: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.w,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{systemUpdate:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getHomepageInfo: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.o,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{homepageInfo:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),signed: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)})),getCourses: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)})),getShixuns: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.v,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getPaths: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.r,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getProjects: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.s,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getVideos: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.B,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getReviewVideos: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.u,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),deleteVideo: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)})),getQuestionBanks: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.t,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),topicsSetPublic: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)})),topicsDelete: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)})),topicGetCourseList: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)})),topicSendToClass: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.I,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),logWatchHistory: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.C,r);case 4:return c=e.sent,e.abrupt("return",null==c?void 0:c.log_id);case 6: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 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=c},"Xxk+": +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.weak-set.from.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"WeakSet",stat:!0},{from:n(/*! ../internals/collection-from */"aF2d")})},Y3g6: +/*!****************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/call-with-safe-iteration-closing.js ***! + \****************************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/an-object */"f1E4");e.exports=function(e,t,n,a){try{return a?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},Y9hK: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***! + \*********************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},YJ9l: +/*!****************************************************************************!*\ + !*** ./node_modules/history-with-query/node_modules/query-string/index.js ***! + \****************************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/slicedToArray */"5wUe"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/createForOfIteratorHelper */"bfL6"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/toConsumableArray */"R5yR"),i=n(/*! strict-uri-encode */"V93i"),c=n(/*! decode-uri-component */"8jRI"),u=n(/*! split-on-first */"8yz6"),s=n(/*! filter-obj */"c0go");function l(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function p(e,t){return t.encode?t.strict?i(e):encodeURIComponent(e):e}function f(e,t){return t.decode?c(e):e}function d(e){var t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function h(e){var t=(e=d(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function m(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function b(e,t){l((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return function(t,n,r){var a="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!a&&f(n,e).includes(e.arrayFormatSeparator);n=o?f(n,e):n;var i=a||o?n.split(e.arrayFormatSeparator).map((function(t){return f(t,e)})):null===n?n:f(n,e);r[t]=i};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),o=Object.create(null);if("string"!=typeof e)return o;if(!(e=e.trim().replace(/^[?#&]/,"")))return o;var i,c=a(e.split("&"));try{for(c.s();!(i=c.n()).done;){var s=i.value;if(""!==s){var p=u(t.decode?s.replace(/\+/g," "):s,"="),d=r(p,2),h=d[0],b=d[1];b=void 0===b?null:["comma","separator"].includes(t.arrayFormat)?b:f(b,t),n(f(h,t),b,o)}}}catch(e){c.e(e)}finally{c.f()}for(var y=0,v=Object.keys(o);y0})).join("&")},t.parseUrl=function(e,t){t=Object.assign({decode:!0},t);var n=u(e,"#"),a=r(n,2),o=a[0],i=a[1];return Object.assign({url:o.split("?")[0]||"",query:b(h(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:f(i,t)}:{})},t.stringifyUrl=function(e,n){n=Object.assign({encode:!0,strict:!0},n);var r=d(e.url).split("?")[0]||"",a=t.extract(e.url),o=t.parse(a,{sort:!1}),i=Object.assign(o,e.query),c=t.stringify(i,n);c&&(c="?".concat(c));var u=function(e){var t="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(u="#".concat(p(e.fragmentIdentifier,n))),"".concat(r).concat(c).concat(u)},t.pick=function(e,n,r){r=Object.assign({parseFragmentIdentifier:!0},r);var a=t.parseUrl(e,r),o=a.url,i=a.query,c=a.fragmentIdentifier;return t.stringifyUrl({url:o,query:s(i,n),fragmentIdentifier:c},r)},t.exclude=function(e,n,r){var a=Array.isArray(n)?function(e){return!n.includes(e)}:function(e,t){return!n(e,t)};return t.pick(e,a,r)}},YJpY: +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.array.flat-map.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/flatten-into-array */"hKmx"),o=n(/*! ../internals/to-object */"cTDu"),i=n(/*! ../internals/to-length */"oa35"),c=n(/*! ../internals/a-function */"cT1L"),u=n(/*! ../internals/array-species-create */"nMuc");r({target:"Array",proto:!0},{flatMap:function(e){var t,n=o(this),r=i(n.length);return c(e),(t=u(n,0)).length=a(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},YMoz: +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/math-scale.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=Math.scale||function(e,t,n,r,a){return 0===arguments.length||e!=e||t!=t||n!=n||r!=r||a!=a?NaN:e===1/0||e===-1/0?e:(e-t)*(a-r)/(n-t)+r}},YON3: +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/is-regexp.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/is-object */"tSXo"),a=n(/*! ../internals/classof-raw */"UwrT"),o=n(/*! ../internals/well-known-symbol */"2kyd")("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==a(e))}},YS25: +/*!********************************************************************!*\ + !*** ./node_modules/history-with-query/esm/history.js + 2 modules ***! + \********************************************************************/ +/*! 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/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: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.anchor.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/create-html */"V85Q");r({target:"String",proto:!0,forced:n(/*! ../internals/string-html-forced */"NQQk")("anchor")},{anchor:function(e){return a(this,"a","name",e)}})},YceZ: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.join.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/an-object */"f1E4"),i=n(/*! ../internals/get-set-iterator */"jbR1"),c=n(/*! ../internals/iterate */"IuhT");r({target:"Set",proto:!0,real:!0,forced:a},{join:function(e){var t=o(this),n=i(t),r=void 0===e?",":String(e),a=[];return c(n,a.push,a,!1,!0),a.join(r)}})},YdpX: +/*!**********************************!*\ + !*** ./src/styles/animated.less ***! + \**********************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},YfKC: +/*!******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/object-define-property.js ***! + \******************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/descriptors */"tny8"),a=n(/*! ../internals/ie8-dom-define */"/yC2"),o=n(/*! ../internals/an-object */"f1E4"),i=n(/*! ../internals/to-primitive */"gFfw"),c=Object.defineProperty;t.f=r?c:function(e,t,n){if(o(e),t=i(t,!0),o(n),a)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},YjZU: +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.reflect.construct.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/get-built-in */"29mP"),o=n(/*! ../internals/a-function */"cT1L"),i=n(/*! ../internals/an-object */"f1E4"),c=n(/*! ../internals/is-object */"tSXo"),u=n(/*! ../internals/object-create */"u+7+"),s=n(/*! ../internals/function-bind */"+SQA"),l=n(/*! ../internals/fails */"MVys"),p=a("Reflect","construct"),f=l((function(){function e(){}return!(p((function(){}),[],e)instanceof e)})),d=!l((function(){p((function(){}))})),h=f||d;r({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(e,t){o(e),i(t);var n=arguments.length<3?e:o(arguments[2]);if(d&&!f)return p(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(s.apply(e,r))}var a=n.prototype,l=u(c(a)?a:Object.prototype),h=Function.apply.call(e,l,t);return c(h)?h:l}})},YrtM: +/*!**************************************************!*\ + !*** ./node_modules/rc-util/es/hooks/useMemo.js ***! + \**************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(/*! react */"q1tI");function a(e,t,n){var a=r.useRef({});return"value"in a.current&&!n(a.current.condition,t)||(a.current.value=e(),a.current.condition=t),a.current.value}},"Z+8a": +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/collection-add-all.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/an-object */"f1E4"),a=n(/*! ../internals/a-function */"cT1L");e.exports=function(){for(var e=r(this),t=a(e.add),n=0,o=arguments.length;n1||"".split(/.?/).length?function(e,n){var r=String(i(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!a(e))return t.call(r,e,o);for(var c,u,s,l=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,m=new RegExp(e.source,f+"g");(c=p.call(m,r))&&!((u=m.lastIndex)>h&&(l.push(r.slice(h,c.index)),c.length>1&&c.index=o));)m.lastIndex===c.index&&m.lastIndex++;return h===r.length?!s&&m.test("")||l.push(""):l.push(r.slice(h)),l.length>o?l.slice(0,o):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var a=i(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,a,n):r.call(String(a),t,n)},function(e,a){var i=n(r,e,this,a,r!==t);if(i.done)return i.value;var p=o(e),f=String(this),d=c(p,RegExp),b=p.unicode,y=(p.ignoreCase?"i":"")+(p.multiline?"m":"")+(p.unicode?"u":"")+(m?"y":"g"),v=new d(m?p:"^(?:"+p.source+")",y),g=void 0===a?4294967295:a>>>0;if(0===g)return[];if(0===f.length)return null===l(v,f)?[f]:[];for(var _=0,x=0,w=[];x>8&255]},M=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},L=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},D=function(e){return C(e,23,4)},R=function(e){return C(e,52,8)},N=function(e,t){y(e.prototype,t,{get:function(){return x(this)[t]}})},F=function(e,t,n,r){var a=f(n),o=x(e);if(a+t>o.byteLength)throw P("Wrong index");var i=x(o.buffer).bytes,c=a+o.byteOffset,u=i.slice(c,c+t);return r?u:u.reverse()},U=function(e,t,n,r,a,o){var i=f(n),c=x(e);if(i+t>c.byteLength)throw P("Wrong index");for(var u=x(c.buffer).bytes,s=i+c.byteOffset,l=r(+a),p=0;pB;)(z=q[B++])in O||i(O,z,j[z]);V.constructor=O}m&&h(E)!==S&&m(E,S);var W=new k(new O(2)),H=E.setInt8;W.setInt8(0,2147483648),W.setInt8(1,2147483649),!W.getInt8(0)&&W.getInt8(1)||c(E,{setInt8:function(e,t){H.call(this,e,t<<24>>24)},setUint8:function(e,t){H.call(this,e,t<<24>>24)}},{unsafe:!0})}else O=function(e){s(this,O,"ArrayBuffer");var t=f(e);w(this,{bytes:v.call(new Array(t),0),byteLength:t}),a||(this.byteLength=t)},k=function(e,t,n){s(this,k,"DataView"),s(e,O,"DataView");var r=x(e).byteLength,o=l(t);if(o<0||o>r)throw P("Wrong offset");if(o+(n=void 0===n?r-o:p(n))>r)throw P("Wrong length");w(this,{buffer:e,byteLength:n,byteOffset:o}),a||(this.buffer=e,this.byteLength=n,this.byteOffset=o)},a&&(N(O,"byteLength"),N(k,"buffer"),N(k,"byteLength"),N(k,"byteOffset")),c(k.prototype,{getInt8:function(e){return F(this,1,e)[0]<<24>>24},getUint8:function(e){return F(this,1,e)[0]},getInt16:function(e){var t=F(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=F(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return L(F(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return L(F(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return T(F(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return T(F(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){U(this,1,e,A,t)},setUint8:function(e,t){U(this,1,e,A,t)},setInt16:function(e,t){U(this,2,e,I,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){U(this,2,e,I,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){U(this,4,e,M,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){U(this,4,e,M,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){U(this,4,e,D,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){U(this,8,e,R,t,arguments.length>2?arguments[2]:void 0)}});g(O,"ArrayBuffer"),g(k,"DataView"),e.exports={ArrayBuffer:O,DataView:k}},ZW6p: +/*!******************************************************!*\ + !*** ./src/.umi-production/plugin-locale/locale.tsx ***! + \******************************************************/ +/*! exports provided: event, LANG_CHANGE_EVENT, _onCreate, _LocaleContainer */ +/*! exports used: LANG_CHANGE_EVENT, _LocaleContainer, _onCreate, event */function(e,t,n){"use strict";n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return m})),n.d(t,"b",(function(){return b}));n(/*! antd/es/config-provider/style */"GNNt");var r=n(/*! antd/es/config-provider */"wEI+"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),i=n(/*! react */"q1tI"),c=n.n(i),u=n(/*! events */"+qE3"),s=n.n(u),l=n(/*! moment */"wd/R"),p=n.n(l),f=(n(/*! moment/locale/zh-cn */"XDpg"),n(/*! ./localeExports */"Fghh")),d=new s.a;d.setMaxListeners(5);var h=Symbol("LANG_CHANGE");function m(){var e,t=Object(f.d)();null!==p.a&&void 0!==p.a&&p.a.locale&&p.a.locale((null===(e=f.e[t])||void 0===e?void 0:e.momentLocale)||"zh-cn");Object(f.f)(t)}var b=function(e){var t,i=c.a.useState((function(){return Object(f.d)()})),u=Object(o.a)(i,2),s=u[0],l=u[1],m=c.a.useState((function(){return Object(f.c)(s,!0)})),b=Object(o.a)(m,2),y=b[0],v=b[1],g=function(e){var t;null!==p.a&&void 0!==p.a&&p.a.locale&&p.a.locale((null===(t=f.e[e])||void 0===t?void 0:t.momentLocale)||"en");l(e),v(Object(f.c)(e))};c.a.useLayoutEffect((function(){return d.on(h,g),function(){d.off(h,g)}}),[]);var _=Object(a.a)({},n(/*! antd/es/locale/zh_CN */"+Gva").default),x=Object(f.b)();return c.a.createElement(r.b,{direction:x,locale:(null===(t=f.e[s])||void 0===t?void 0:t.antd)||_},c.a.createElement(f.a,{value:y},e.children))}},ZahQ: +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.define-getter.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/descriptors */"tny8"),o=n(/*! ../internals/object-prototype-accessors-forced */"i7kj"),i=n(/*! ../internals/to-object */"cTDu"),c=n(/*! ../internals/a-function */"cT1L"),u=n(/*! ../internals/object-define-property */"YfKC");a&&r({target:"Object",proto:!0,forced:o},{__defineGetter__:function(e,t){u.f(i(this),e,{get:c(t),enumerable:!0,configurable:!0})}})},Zcjx: +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/is-pure.js ***! + \***************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=!1},Ze4s: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/number-parse-int.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv"),a=n(/*! ../internals/string-trim */"mTKU").trim,o=n(/*! ../internals/whitespaces */"Tfd0"),i=r.parseInt,c=/^[+-]?0[Xx]/,u=8!==i(o+"08")||22!==i(o+"0x16");e.exports=u?function(e,t){var n=a(String(e));return i(n,t>>>0||(c.test(n)?16:10))}:i},ZhPi: +/*!***************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! + \***************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./arrayLikeToArray.js */"WkPL");e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},ZkJ9: +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/native-weak-map.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv"),a=n(/*! ../internals/inspect-source */"J3Yn"),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(a(o))},Zkxe: +/*!******************************************!*\ + !*** ./src/models/problemset/preview.ts ***! + \******************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/problemset */"WCUW"),c=n(/*! ./util */"6fQ5"),u={namespace:"problemsetPreview",state:{disciplinesData:void 0,courseOptions:[],paperData:void 0,actionTabs:{key:"",params:{}}},effects:{getPaperData: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.x,r);case 4:return s=e.sent,l=Object(c.b)(s),e.next=8,u({type:"save",payload:{paperData:l}});case 8:return e.abrupt("return",s);case 9:case"end":return e.stop()}}),e)})),getEditDisciplines:o.a.mark((function e(t,n){var a,u,s,l,p,f;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,u=n.call,s=n.put,e.next=4,u(i.t,a);case 4:return l=e.sent,p=null==l?void 0:l.disciplines,f=Object(c.a)(p),e.next=9,s({type:"save",payload:{courseOptions:f,disciplinesData:Object(r.a)({},l)}});case 9:return e.abrupt("return",l);case 10:case"end":return e.stop()}}),e)})),setScore: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.Q,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),handleDelete: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)})),batchSetScore: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.i,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),batchDelete: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)})),adjustPosition: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)})),newPreviewProblemset: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)})),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 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=u},Zm9Q: +/*!*****************************************************!*\ + !*** ./node_modules/rc-util/es/Children/toArray.js ***! + \*****************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! react */"q1tI"),a=n.n(r),o=n(/*! react-is */"TOwV");function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return a.a.Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(i(e)):Object(o.isFragment)(e)&&e.props?n=n.concat(i(e.props.children,t)):n.push(e))})),n}},ZqBY: +/*!****************************************************!*\ + !*** ./node_modules/umi-request/dist/index.esm.js ***! + \****************************************************/ +/*! exports provided: default, Onion, RequestError, ResponseError, extend, fetch */ +/*! exports used: extend */ +/*! ModuleConcatenation bailout: Module uses injected variables (process) */function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Y}));var r=n(/*! qs */"Qyje");n(/*! isomorphic-fetch */"LpSC");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{global:!1,core:!1,defaultInstance:!1},a=!1,o=!1,c=!1;"number"==typeof r?(e&&Object({NODE_ENV:"production"}),a=!0,o=!1):"object"===i(r)&&r&&(o=r.global||!1,a=r.core||!1,c=r.defaultInstance||!1),o?t.globalMiddlewares.splice(t.globalMiddlewares.length-t.defaultGlobalMiddlewaresLength,0,n):a?t.coreMiddlewares.splice(t.coreMiddlewares.length-t.defaultCoreMiddlewaresLength,0,n):c?this.defaultMiddlewares.push(n):this.middlewares.push(n)}},{key:"execute",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=x([].concat(g(this.middlewares),g(this.defaultMiddlewares),g(t.globalMiddlewares),g(t.coreMiddlewares)));return n(e)}}]),t}();w.globalMiddlewares=[],w.defaultGlobalMiddlewaresLength=0,w.coreMiddlewares=[],w.defaultCoreMiddlewaresLength=0;var j=function(){function e(t){c(this,e),this.cache=new Map,this.timer={},this.extendOptions(t)}return s(e,[{key:"extendOptions",value:function(e){this.maxCache=e.maxCache||0}},{key:"get",value:function(e){return this.cache.get(JSON.stringify(e))}},{key:"set",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6e4;if(this.maxCache>0&&this.cache.size>=this.maxCache){var a=g(this.cache.keys())[0];this.cache.delete(a),this.timer[a]&&clearTimeout(this.timer[a])}var o=JSON.stringify(e);this.cache.set(o,t),r>0&&(this.timer[o]=setTimeout((function(){n.cache.delete(o),delete n.timer[o]}),r))}},{key:"delete",value:function(e){var t=JSON.stringify(e);return delete this.timer[t],this.cache.delete(t)}},{key:"clear",value:function(){return this.timer={},this.cache.clear()}}]),e}(),O=function(e){p(n,e);var t=v(n);function n(e,r){var a,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"RequestError";return c(this,n),(a=t.call(this,e)).name="RequestError",a.request=r,a.type=o,a}return n}(b(Error)),k=function(e){p(n,e);var t=v(n);function n(e,r,a,o){var i,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"ResponseError";return c(this,n),(i=t.call(this,r||e.statusText)).name="ResponseError",i.data=a,i.response=e,i.request=o,i.type=u,i}return n}(b(Error));function E(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsText(e,"GBK")}))}function S(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;try{return JSON.parse(e)}catch(a){if(t)throw new k(n,"JSON.parse fail",e,r,"ParseError")}return e}function P(e,t,n){return new Promise((function(r,a){setTimeout((function(){a(new O(t||"timeout of ".concat(e,"ms exceeded"),n,"Timeout"))}),e)}))}function C(e){return new Promise((function(t,n){e.cancelToken&&e.cancelToken.promise.then((function(e){n(e)}))}))}var T=Object.prototype.toString;function A(){var t;return void 0!==e&&"[object process]"===T.call(e)&&(t="NODE"),"undefined"!=typeof XMLHttpRequest&&(t="BROWSER"),t}function I(e){return"object"===i(e)&&"[object Array]"===Object.prototype.toString.call(e)}function M(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function L(e){return null!==e&&"object"===i(e)}function D(e,t){if(e)if("object"!==i(e)&&(e=[e]),I(e))for(var n=0;n=200&&n.status<300)return c?void(e.res={data:t,response:n}):void(e.res=t);throw new k(n,"http error",t,a,"HttpError")}}})).catch((function(t){if(t instanceof O||t instanceof k)throw t;var n=e.req,r=e.res;throw t.request=t.request||n,t.response=t.response||r,t.type=t.type||t.name,t.data=t.data||void 0,t}))}],q=[function(t,n){if(!t)return n();var r=t.req,a=(r=void 0===r?{}:r).options,o=void 0===a?{}:a,i=r.url,c=void 0===i?"":i,u=t.cache,s=t.responseInterceptors,l=o.timeout,p=void 0===l?0:l,f=o.timeoutMessage,d=o.__umiRequestCoreType__,h=void 0===d?"normal":d,m=o.useCache,b=void 0!==m&&m,y=o.method,v=void 0===y?"get":y,g=o.params,_=o.ttl,x=o.validateCache,w=void 0===x?U:x;if("normal"!==h)return e&&Object({NODE_ENV:"production"}),n();var j=fetch;if(!j)throw new Error("Global fetch not exist!");var O,k="BROWSER"===A(),E=w(c,o)&&b&&k;if(E){var S=u.get({url:c,params:g,method:v});if(S)return(S=S.clone()).useCache=!0,t.res=S,n()}return O=p>0?Promise.race([C(o),j(c,o),P(p,f,t.req)]):Promise.race([C(o),j(c,o)]),s.forEach((function(e){O=O.then((function(t){var n="function"==typeof t.clone?t.clone():t;return e(n,o)}))})),O.then((function(e){if(E&&200===e.status){var r=e.clone();r.useCache=!0,u.set({url:c,params:g,method:v},r,_)}return t.res=e,n()}))}];w.globalMiddlewares=V,w.defaultGlobalMiddlewaresLength=V.length,w.coreMiddlewares=q,w.defaultCoreMiddlewaresLength=q.length;var B=function(){function e(t){c(this,e),this.onion=new w([]),this.fetchIndex=0,this.mapCache=new j(t),this.initOptions=t,this.instanceRequestInterceptors=[],this.instanceResponseInterceptors=[]}return s(e,[{key:"use",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{global:!1,core:!1};return this.onion.use(e,t),this}},{key:"extendOptions",value:function(e){this.initOptions=F(this.initOptions,e),this.mapCache.extendOptions(e)}},{key:"dealRequestInterceptors",value:function(t){return[].concat(g(e.requestInterceptors),g(this.instanceRequestInterceptors)).reduce((function(e,n){return e.then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.req.url=e.url||t.req.url,t.req.options=e.options||t.req.options,n(t.req.url,t.req.options)}))}),Promise.resolve()).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.req.url=e.url||t.req.url,t.req.options=e.options||t.req.options,Promise.resolve()}))}},{key:"request",value:function(t,n){var r=this,a=this.onion,i={req:{url:t,options:o(o({},n),{},{url:t})},res:null,cache:this.mapCache,responseInterceptors:[].concat(g(e.responseInterceptors),g(this.instanceResponseInterceptors))};if("string"!=typeof t)throw new Error("url MUST be a string");return new Promise((function(e,t){r.dealRequestInterceptors(i).then((function(){return a.execute(i)})).then((function(){e(i.res)})).catch((function(n){var r=i.req.options.errorHandler;if(r)try{var a=r(n);e(a)}catch(e){t(e)}else t(n)}))}))}}],[{key:"requestUse",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{global:!0};if("function"!=typeof t)throw new TypeError("Interceptor must be function!");n.global?e.requestInterceptors.push(t):this.instanceRequestInterceptors.push(t)}},{key:"responseUse",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{global:!0};if("function"!=typeof t)throw new TypeError("Interceptor must be function!");n.global?e.responseInterceptors.push(t):this.instanceResponseInterceptors.push(t)}}]),e}();function W(e){this.message=e}function H(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new W(e),t(n.reason))}))}function G(e){return!(!e||!e.__CANCEL__)}B.requestInterceptors=[function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.prefix,r=t.suffix;return n&&(e="".concat(n).concat(e)),r&&(e="".concat(e).concat(r)),{url:e,options:t}}],B.responseInterceptors=[],W.prototype.toString=function(){return this.message?"Cancel: ".concat(this.message):"Cancel"},W.prototype.__CANCEL__=!0,H.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},H.source=function(){var e;return{token:new H((function(t){e=t})),cancel:e}};var Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new B(e),n=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=F(t.initOptions,n);return t.request(e,r)};n.use=t.use.bind(t),n.fetchIndex=t.fetchIndex,n.interceptors={request:{use:B.requestUse.bind(t)},response:{use:B.responseUse.bind(t)}};var r=["get","post","delete","put","patch","head","options","rpc"];return r.forEach((function(e){n[e]=function(t,r){return n(t,o(o({},r),{},{method:e}))}})),n.Cancel=W,n.CancelToken=H,n.isCancel=G,n.extendOptions=t.extendOptions.bind(t),n.middlewares={instance:t.onion.middlewares,defaultInstance:t.onion.defaultMiddlewares,global:w.globalMiddlewares,core:w.coreMiddlewares},n},Y=function(e){return Q(e)};Q({parseResponse:!1}),Q({})}).call(this,n(/*! ./../../node-libs-browser/mock/process.js */"Q2Ig"))},a1gu: +/*!**************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! + \**************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./typeof.js */"cDf5").default,a=n(/*! ./assertThisInitialized.js */"PJYZ");e.exports=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)},e.exports.__esModule=!0,e.exports.default=e.exports},a3WO: +/*!*********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>>24)|4278255360&(n[d]<<24|n[d]>>>8);n[u>>>5]|=128<>>9<<4)]=u;var h=c._ff,m=c._gg,b=c._hh,y=c._ii;for(d=0;d>>0,l=l+g>>>0,p=p+_>>>0,f=f+x>>>0}return r.endian([s,l,p,f])})._ff=function(e,t,n,r,a,o,i){var c=e+(t&n|~t&r)+(a>>>0)+i;return(c<>>32-o)+t},c._gg=function(e,t,n,r,a,o,i){var c=e+(t&r|n&~r)+(a>>>0)+i;return(c<>>32-o)+t},c._hh=function(e,t,n,r,a,o,i){var c=e+(t^n^r)+(a>>>0)+i;return(c<>>32-o)+t},c._ii=function(e,t,n,r,a,o,i){var c=e+(n^(t|~r))+(a>>>0)+i;return(c<>>32-o)+t},c._blocksize=16,c._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(c(e,t));return t&&t.asBytes?n:t&&t.asString?i.bytesToString(n):r.bytesToHex(n)}},aF2d: +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/collection-from.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/a-function */"cT1L"),a=n(/*! ../internals/function-bind-context */"7BAe"),o=n(/*! ../internals/iterate */"IuhT");e.exports=function(e){var t,n,i,c,u=arguments.length,s=u>1?arguments[1]:void 0;return r(this),(t=void 0!==s)&&r(s),null==e?new this:(n=[],t?(i=0,c=a(s,u>2?arguments[2]:void 0,2),o(e,(function(e){n.push(c(e,i++))}))):o(e,n.push,n),new this(n))}},aHGi: +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.symbol.to-string-tag.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/define-well-known-symbol */"I65O")("toStringTag")},aI7X: +/*!******************************************************!*\ + !*** ./node_modules/function-bind/implementation.js ***! + \******************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r="Function.prototype.bind called on incompatible ",a=Array.prototype.slice,o=Object.prototype.toString;e.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==o.call(t))throw new TypeError(r+t);for(var n,i=a.call(arguments,1),c=function(){if(this instanceof n){var r=t.apply(this,i.concat(a.call(arguments)));return Object(r)===r?r:this}return t.apply(e,i.concat(a.call(arguments)))},u=Math.max(0,t.length-i.length),s=[],l=0;l1)&&(e=1),e}function o(e){return e<=1?100*Number(e)+"%":e}function i(e){return 1===e.length?"0"+e:String(e)}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return i}))},b48C: +/*!*************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***! + \*************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=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}},e.exports.__esModule=!0,e.exports.default=e.exports},b6mv: +/*!********************************!*\ + !*** ./src/models/homePage.ts ***! + \********************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/home */"6CvP"),c={namespace:"homePage",state:{name:"首页",loading:!0},effects:{home: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.a,{payload:a});case 4:return s=e.sent,e.next=7,u({type:"save",payload:Object(r.a)({},s)});case 7:case"end":return e.stop()}}),e)})),query:o.a.mark((function e(t,n){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.payload,n.call,r=n.put,e.next=4,r({type:"save",payload:{name:"linlu"}});case 4:case"end":return e.stop()}}),e)})),getHomeNotice: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,t.callback,a=n.call,n.put,e.next=4,a(i.d,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)})),UploadNotice: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,t.callback,a=n.call,n.put,e.next=4,a(i.b,r);case 4:return c=e.sent,e.abrupt("return",c);case 6:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return 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=c},b6st: +/*!**********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/native-promise-constructor.js ***! + \**********************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv");e.exports=r.Promise},"b8+j": +/*!*********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.reflect.set-prototype-of.js ***! + \*********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/an-object */"f1E4"),o=n(/*! ../internals/a-possible-prototype */"JS3A"),i=n(/*! ../internals/object-set-prototype-of */"g1ZG");i&&r({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){a(e),o(t);try{return i(e,t),!0}catch(e){return!1}}})},bCY9: +/*!********************************************!*\ + !*** ./src/.umi-production/core/plugin.ts ***! + \********************************************/ +/*! exports provided: plugin */ +/*! exports used: plugin */function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=new(n(/*! ./node_modules/@umijs/runtime */"LtsZ").b)({validKeys:["modifyClientRenderOpts","patchRoutes","rootContainer","render","onRouteChange","__mfsu","dva","getInitialState","locale","locale","request"]})},bDgo: +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.number.is-integer.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Number",stat:!0},{isInteger:n(/*! ../internals/is-integer */"M3b6")})},"bF+Q": +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/is-array-iterator-method.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/well-known-symbol */"2kyd"),a=n(/*! ../internals/iterators */"5yw/"),o=r("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||i[o]===e)}},bIKR: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/to-absolute-index.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/to-integer */"m0kY"),a=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?a(n+t,0):o(n,t)}},bPAU: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.match-all.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/create-iterator-constructor */"uoF6"),o=n(/*! ../internals/require-object-coercible */"FCfD"),i=n(/*! ../internals/to-length */"oa35"),c=n(/*! ../internals/a-function */"cT1L"),u=n(/*! ../internals/an-object */"f1E4"),s=n(/*! ../internals/classof-raw */"UwrT"),l=n(/*! ../internals/is-regexp */"YON3"),p=n(/*! ../internals/regexp-flags */"k/J9"),f=n(/*! ../internals/create-non-enumerable-property */"lz10"),d=n(/*! ../internals/fails */"MVys"),h=n(/*! ../internals/well-known-symbol */"2kyd"),m=n(/*! ../internals/species-constructor */"/dTS"),b=n(/*! ../internals/advance-string-index */"xH5X"),y=n(/*! ../internals/internal-state */"1aI8"),v=n(/*! ../internals/is-pure */"Zcjx"),g=h("matchAll"),_=y.set,x=y.getterFor("RegExp String Iterator"),w=RegExp.prototype,j=w.exec,O="".matchAll,k=!!O&&!d((function(){"a".matchAll(/./)})),E=a((function(e,t,n,r){_(this,{type:"RegExp String Iterator",regexp:e,string:t,global:n,unicode:r,done:!1})}),"RegExp String",(function(){var e=x(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=function(e,t){var n,r=e.exec;if("function"==typeof r){if("object"!=typeof(n=r.call(e,t)))throw TypeError("Incorrect exec result");return n}return j.call(e,t)}(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""==String(r[0])&&(t.lastIndex=b(n,i(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),S=function(e){var t,n,r,a,o,c,s=u(this),l=String(e);return t=m(s,RegExp),void 0===(n=s.flags)&&s instanceof RegExp&&!("flags"in w)&&(n=p.call(s)),r=void 0===n?"":String(n),a=new t(t===RegExp?s.source:s,r),o=!!~r.indexOf("g"),c=!!~r.indexOf("u"),a.lastIndex=i(s.lastIndex),new E(a,l,o,c)};r({target:"String",proto:!0,forced:k},{matchAll:function(e){var t,n,r,a=o(this);if(null!=e){if(l(e)&&!~String(o("flags"in w?e.flags:p.call(e))).indexOf("g"))throw TypeError("`.matchAll` does not allow non-global regexes");if(k)return O.apply(a,arguments);if(void 0===(n=e[g])&&v&&"RegExp"==s(e)&&(n=S),null!=n)return c(n).call(e,a)}else if(k)return O.apply(a,arguments);return t=String(a),r=new RegExp(e,"g"),v?S.call(r,t):r[g](t)}}),v||g in w||f(w,g,S)},bQgK: +/*!*************************************************************!*\ + !*** ./node_modules/performance-now/lib/performance-now.js ***! + \*************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(t){(function(){var n,r,a,o,i,c;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,o=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),c=1e9*t.uptime(),i=o-c):Date.now?(e.exports=function(){return Date.now()-a},a=Date.now()):(e.exports=function(){return(new Date).getTime()-a},a=(new Date).getTime())}).call(this)}).call(this,n(/*! ./../../node-libs-browser/mock/process.js */"Q2Ig"))},bZMm: +/*!********************************************!*\ + !*** ./node_modules/whatwg-fetch/fetch.js ***! + \********************************************/ +/*! exports provided: Headers, Request, Response, DOMException, fetch */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./node_modules/isomorphic-fetch/fetch-npm-browserify.js (referenced with cjs require) */function(e,t,n){"use strict";n.r(t),n.d(t,"Headers",(function(){return h})),n.d(t,"Request",(function(){return x})),n.d(t,"Response",(function(){return j})),n.d(t,"DOMException",(function(){return k})),n.d(t,"fetch",(function(){return E}));var r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,a="URLSearchParams"in r,o="Symbol"in r&&"iterator"in Symbol,i="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),c="FormData"in r,u="ArrayBuffer"in r;if(u)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function p(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function f(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function m(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function b(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function y(e){var t=new FileReader,n=b(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:c&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:a&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=m(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(y)}),this.text=function(){var e,t,n,r=m(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=b(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function j(e,t){if(!(this instanceof j))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})},g.call(x.prototype),g.call(j.prototype),j.prototype.clone=function(){return new j(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},j.error=function(){var e=new j(null,{status:0,statusText:""});return e.type="error",e};var O=[301,302,303,307,308];j.redirect=function(e,t){if(-1===O.indexOf(t))throw new RangeError("Invalid status code");return new j(null,{status:t,headers:{location:e}})};var k=r.DOMException;try{new k}catch(e){(k=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),k.prototype.constructor=k}function E(e,t){return new Promise((function(n,a){var o=new x(e,t);if(o.signal&&o.signal.aborted)return a(new k("Aborted","AbortError"));var c=new XMLHttpRequest;function s(){c.abort()}c.onload=function(){var e,t,r={status:c.status,statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in c?c.responseURL:r.headers.get("X-Request-URL");var a="response"in c?c.response:c.responseText;setTimeout((function(){n(new j(a,r))}),0)},c.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.onabort=function(){setTimeout((function(){a(new k("Aborted","AbortError"))}),0)},c.open(o.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(o.url),!0),"include"===o.credentials?c.withCredentials=!0:"omit"===o.credentials&&(c.withCredentials=!1),"responseType"in c&&(i?c.responseType="blob":u&&o.headers.get("Content-Type")&&-1!==o.headers.get("Content-Type").indexOf("application/octet-stream")&&(c.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof h?o.headers.forEach((function(e,t){c.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){c.setRequestHeader(e,f(t.headers[e]))})),o.signal&&(o.signal.addEventListener("abort",s),c.onreadystatechange=function(){4===c.readyState&&o.signal.removeEventListener("abort",s)}),c.send(void 0===o._bodyInit?null:o._bodyInit)}))}E.polyfill=!0,r.fetch||(r.fetch=E,r.Headers=h,r.Request=x,r.Response=j)},bcvT: +/*!**********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/web.dom-collections.for-each.js ***! + \**********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv"),a=n(/*! ../internals/dom-iterables */"XX5T"),o=n(/*! ../internals/array-for-each */"PHrn"),i=n(/*! ../internals/create-non-enumerable-property */"lz10");for(var c in a){var u=r[c],s=u&&u.prototype;if(s&&s.forEach!==o)try{i(s,"forEach",o)}catch(e){s.forEach=o}}},bdgK: +/*!*************************************************************************!*\ + !*** ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js ***! + \*************************************************************************/ +/*! exports provided: default */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module uses injected variables (global) */function(e,t,n){"use strict";n.r(t),function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;i.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),s=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),x="undefined"!=typeof WeakMap?new WeakMap:new n,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new _(t,n,this);x.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=x.get(this))[e].apply(t,arguments)}}));var j=void 0!==a.ResizeObserver?a.ResizeObserver:w;t.default=j}.call(this,n(/*! ./../../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},beyn: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.trim-end.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/string-trim */"mTKU").end,o=n(/*! ../internals/string-trim-forced */"HKQd")("trimEnd"),i=o?function(){return a(this)}:"".trimEnd;r({target:"String",proto:!0,forced:o},{trimEnd:i,trimRight:i})},bfL6: +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./unsupportedIterableToArray */"mGKP");e.exports=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,o=function(){};return{s:o,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:o}}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 i,c=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return c=e.done,e},e:function(e){u=!0,i=e},f:function(){try{c||null==n.return||n.return()}finally{if(u)throw i}}}}},bkVK: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.link.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/create-html */"V85Q");r({target:"String",proto:!0,forced:n(/*! ../internals/string-html-forced */"NQQk")("link")},{link:function(e){return a(this,"a","href",e)}})},bmMU: +/*!**************************************************!*\ + !*** ./node_modules/react-fast-compare/index.js ***! + \**************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n="undefined"!=typeof Element,r="function"==typeof Map,a="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,t){try{return function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;var c,u,s,l;if(Array.isArray(t)){if((c=t.length)!=i.length)return!1;for(u=c;0!=u--;)if(!e(t[u],i[u]))return!1;return!0}if(r&&t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(l=t.entries();!(u=l.next()).done;)if(!i.has(u.value[0]))return!1;for(l=t.entries();!(u=l.next()).done;)if(!e(u.value[1],i.get(u.value[0])))return!1;return!0}if(a&&t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(l=t.entries();!(u=l.next()).done;)if(!i.has(u.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(i)){if((c=t.length)!=i.length)return!1;for(u=c;0!=u--;)if(t[u]!==i[u])return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if((c=(s=Object.keys(t)).length)!==Object.keys(i).length)return!1;for(u=c;0!=u--;)if(!Object.prototype.hasOwnProperty.call(i,s[u]))return!1;if(n&&t instanceof Element)return!1;for(u=c;0!=u--;)if(("_owner"!==s[u]&&"__v"!==s[u]&&"__o"!==s[u]||!t.$$typeof)&&!e(t[s[u]],i[s[u]]))return!1;return!0}return t!=t&&i!=i}(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},bntm: +/*!*********************************!*\ + !*** ./src/utils/fullscreen.ts ***! + \*********************************/ +/*! exports provided: requestFullScreen, exitFull, fullscreenChange, IsFull */ +/*! exports used: IsFull, exitFull, fullscreenChange, requestFullScreen */function(e,t,n){"use strict";function r(e){try{e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()}catch(e){console.log(e,":e")}}function a(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}n.d(t,"d",(function(){return r})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i}));var o=function(){return document.webkitExitFullscreen?"webkitfullscreenchange":document.exitFullscreen?"fullscreenchange":document.msExitFullscreen?"msfullscreenchange":document.mozCancelFullScreen?"mozfullscreenchange":void 0};function i(){var e=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement;document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return null!=e}},bu2F: +/*!**************************************************!*\ + !*** ./node_modules/hash.js/lib/hash/sha/256.js ***! + \**************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../utils */"w8CP"),a=n(/*! ../common */"7ckf"),o=n(/*! ./common */"qlaj"),i=n(/*! minimalistic-assert */"2j6C"),c=r.sum32,u=r.sum32_4,s=r.sum32_5,l=o.ch32,p=o.maj32,f=o.s0_256,d=o.s1_256,h=o.g0_256,m=o.g1_256,b=a.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}r.inherits(v,b),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r=0)return t[e].splice(a,1),!0}return!1},publish:function(e){if(!t[e])return!1;var n=Array.prototype.slice.call(arguments,1);return t[e].forEach((function(e){e.apply(null,n)})),this}};return e?Object.assign(e,n):n};t.a=r},dnEI: +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/host-report-errors.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv");e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},dnZx: +/*!*************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/web.url.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";n(/*! ../modules/es.string.iterator */"KvPC");var r,a=n(/*! ../internals/export */"MMxC"),o=n(/*! ../internals/descriptors */"tny8"),i=n(/*! ../internals/native-url */"lgSf"),c=n(/*! ../internals/global */"ukPv"),u=n(/*! ../internals/object-define-properties */"HctQ"),s=n(/*! ../internals/redefine */"NMFW"),l=n(/*! ../internals/an-instance */"igoe"),p=n(/*! ../internals/has */"jtLI"),f=n(/*! ../internals/object-assign */"qitQ"),d=n(/*! ../internals/array-from */"1H91"),h=n(/*! ../internals/string-multibyte */"eYKs").codeAt,m=n(/*! ../internals/string-punycode-to-ascii */"Di6M"),b=n(/*! ../internals/set-to-string-tag */"kiNa"),y=n(/*! ../modules/web.url-search-params */"5JgN"),v=n(/*! ../internals/internal-state */"1aI8"),g=c.URL,_=y.URLSearchParams,x=y.getState,w=v.set,j=v.getterFor("URL"),O=Math.floor,k=Math.pow,E=/[A-Za-z]/,S=/[\d+-.A-Za-z]/,P=/\d/,C=/^(0x|0X)/,T=/^[0-7]+$/,A=/^\d+$/,I=/^[\dA-Fa-f]+$/,M=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,L=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,D=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,R=/[\u0009\u000A\u000D]/g,N=function(e,t){var n,r,a;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(n=U(t.slice(1,-1))))return"Invalid host";e.host=n}else if(Q(e)){if(t=m(t),M.test(t))return"Invalid host";if(null===(n=F(t)))return"Invalid host";e.host=n}else{if(L.test(t))return"Invalid host";for(n="",r=d(t),a=0;a4)return e;for(n=[],r=0;r1&&"0"==a.charAt(0)&&(o=C.test(a)?16:8,a=a.slice(8==o?1:2)),""===a)i=0;else{if(!(10==o?A:8==o?T:I).test(a))return e;i=parseInt(a,o)}n.push(i)}for(r=0;r=k(256,5-t))return null}else if(i>255)return null;for(c=n.pop(),r=0;r6)return;for(r=0;f();){if(a=null,r>0){if(!("."==f()&&r<4))return;p++}if(!P.test(f()))return;for(;P.test(f());){if(o=parseInt(f(),10),null===a)a=o;else{if(0==a)return;a=10*a+o}if(a>255)return;p++}u[s]=256*u[s]+a,2!=++r&&4!=r||s++}if(4!=r)return;break}if(":"==f()){if(p++,!f())return}else if(f())return;u[s++]=t}else{if(null!==l)return;p++,l=++s}}if(null!==l)for(i=s-l,s=7;0!=s&&i>0;)c=u[s],u[s--]=u[l+i-1],u[l+--i]=c;else if(8!=s)return;return u},z=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=O(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,a=0,o=0;o<8;o++)0!==e[o]?(a>n&&(t=r,n=a),r=null,a=0):(null===r&&(r=o),++a);return a>n&&(t=r,n=a),t}(e),n=0;n<8;n++)a&&0===e[n]||(a&&(a=!1),r===n?(t+=n?":":"::",a=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},V={},q=f({},V,{" ":1,'"':1,"<":1,">":1,"`":1}),B=f({},q,{"#":1,"?":1,"{":1,"}":1}),W=f({},B,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),H=function(e,t){var n=h(e,0);return n>32&&n<127&&!p(t,e)?e:encodeURIComponent(e)},G={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Q=function(e){return p(G,e.scheme)},Y=function(e){return""!=e.username||""!=e.password},K=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},X=function(e,t){var n;return 2==e.length&&E.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},J=function(e){var t;return e.length>1&&X(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},Z=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&X(t[0],!0)||t.pop()},$=function(e){return"."===e||"%2e"===e.toLowerCase()},ee={},te={},ne={},re={},ae={},oe={},ie={},ce={},ue={},se={},le={},pe={},fe={},de={},he={},me={},be={},ye={},ve={},ge={},_e={},xe=function(e,t,n,a){var o,i,c,u,s,l=n||ee,f=0,h="",m=!1,b=!1,y=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(D,"")),t=t.replace(R,""),o=d(t);f<=o.length;){switch(i=o[f],l){case ee:if(!i||!E.test(i)){if(n)return"Invalid scheme";l=ne;continue}h+=i.toLowerCase(),l=te;break;case te:if(i&&(S.test(i)||"+"==i||"-"==i||"."==i))h+=i.toLowerCase();else{if(":"!=i){if(n)return"Invalid scheme";h="",l=ne,f=0;continue}if(n&&(Q(e)!=p(G,h)||"file"==h&&(Y(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=h,n)return void(Q(e)&&G[e.scheme]==e.port&&(e.port=null));h="","file"==e.scheme?l=de:Q(e)&&a&&a.scheme==e.scheme?l=re:Q(e)?l=ce:"/"==o[f+1]?(l=ae,f++):(e.cannotBeABaseURL=!0,e.path.push(""),l=ve)}break;case ne:if(!a||a.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(a.cannotBeABaseURL&&"#"==i){e.scheme=a.scheme,e.path=a.path.slice(),e.query=a.query,e.fragment="",e.cannotBeABaseURL=!0,l=_e;break}l="file"==a.scheme?de:oe;continue;case re:if("/"!=i||"/"!=o[f+1]){l=oe;continue}l=ue,f++;break;case ae:if("/"==i){l=se;break}l=ye;continue;case oe:if(e.scheme=a.scheme,i==r)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query;else if("/"==i||"\\"==i&&Q(e))l=ie;else if("?"==i)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query="",l=ge;else{if("#"!=i){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.path.pop(),l=ye;continue}e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query,e.fragment="",l=_e}break;case ie:if(!Q(e)||"/"!=i&&"\\"!=i){if("/"!=i){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,l=ye;continue}l=se}else l=ue;break;case ce:if(l=ue,"/"!=i||"/"!=h.charAt(f+1))continue;f++;break;case ue:if("/"!=i&&"\\"!=i){l=se;continue}break;case se:if("@"==i){m&&(h="%40"+h),m=!0,c=d(h);for(var v=0;v65535)return"Invalid port";e.port=Q(e)&&x===G[e.scheme]?null:x,h=""}if(n)return;l=be;continue}return"Invalid port"}h+=i;break;case de:if(e.scheme="file","/"==i||"\\"==i)l=he;else{if(!a||"file"!=a.scheme){l=ye;continue}if(i==r)e.host=a.host,e.path=a.path.slice(),e.query=a.query;else if("?"==i)e.host=a.host,e.path=a.path.slice(),e.query="",l=ge;else{if("#"!=i){J(o.slice(f).join(""))||(e.host=a.host,e.path=a.path.slice(),Z(e)),l=ye;continue}e.host=a.host,e.path=a.path.slice(),e.query=a.query,e.fragment="",l=_e}}break;case he:if("/"==i||"\\"==i){l=me;break}a&&"file"==a.scheme&&!J(o.slice(f).join(""))&&(X(a.path[0],!0)?e.path.push(a.path[0]):e.host=a.host),l=ye;continue;case me:if(i==r||"/"==i||"\\"==i||"?"==i||"#"==i){if(!n&&X(h))l=ye;else if(""==h){if(e.host="",n)return;l=be}else{if(u=N(e,h))return u;if("localhost"==e.host&&(e.host=""),n)return;h="",l=be}continue}h+=i;break;case be:if(Q(e)){if(l=ye,"/"!=i&&"\\"!=i)continue}else if(n||"?"!=i)if(n||"#"!=i){if(i!=r&&(l=ye,"/"!=i))continue}else e.fragment="",l=_e;else e.query="",l=ge;break;case ye:if(i==r||"/"==i||"\\"==i&&Q(e)||!n&&("?"==i||"#"==i)){if(".."===(s=(s=h).toLowerCase())||"%2e."===s||".%2e"===s||"%2e%2e"===s?(Z(e),"/"==i||"\\"==i&&Q(e)||e.path.push("")):$(h)?"/"==i||"\\"==i&&Q(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&X(h)&&(e.host&&(e.host=""),h=h.charAt(0)+":"),e.path.push(h)),h="","file"==e.scheme&&(i==r||"?"==i||"#"==i))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==i?(e.query="",l=ge):"#"==i&&(e.fragment="",l=_e)}else h+=H(i,B);break;case ve:"?"==i?(e.query="",l=ge):"#"==i?(e.fragment="",l=_e):i!=r&&(e.path[0]+=H(i,V));break;case ge:n||"#"!=i?i!=r&&("'"==i&&Q(e)?e.query+="%27":e.query+="#"==i?"%23":H(i,V)):(e.fragment="",l=_e);break;case _e:i!=r&&(e.fragment+=H(i,q))}f++}},we=function(e){var t,n,r=l(this,we,"URL"),a=arguments.length>1?arguments[1]:void 0,i=String(e),c=w(r,{type:"URL"});if(void 0!==a)if(a instanceof we)t=j(a);else if(n=xe(t={},String(a)))throw TypeError(n);if(n=xe(c,i,null,t))throw TypeError(n);var u=c.searchParams=new _,s=x(u);s.updateSearchParams(c.query),s.updateURL=function(){c.query=String(u)||null},o||(r.href=Oe.call(r),r.origin=ke.call(r),r.protocol=Ee.call(r),r.username=Se.call(r),r.password=Pe.call(r),r.host=Ce.call(r),r.hostname=Te.call(r),r.port=Ae.call(r),r.pathname=Ie.call(r),r.search=Me.call(r),r.searchParams=Le.call(r),r.hash=De.call(r))},je=we.prototype,Oe=function(){var e=j(this),t=e.scheme,n=e.username,r=e.password,a=e.host,o=e.port,i=e.path,c=e.query,u=e.fragment,s=t+":";return null!==a?(s+="//",Y(e)&&(s+=n+(r?":"+r:"")+"@"),s+=z(a),null!==o&&(s+=":"+o)):"file"==t&&(s+="//"),s+=e.cannotBeABaseURL?i[0]:i.length?"/"+i.join("/"):"",null!==c&&(s+="?"+c),null!==u&&(s+="#"+u),s},ke=function(){var e=j(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&Q(e)?t+"://"+z(e.host)+(null!==n?":"+n:""):"null"},Ee=function(){return j(this).scheme+":"},Se=function(){return j(this).username},Pe=function(){return j(this).password},Ce=function(){var e=j(this),t=e.host,n=e.port;return null===t?"":null===n?z(t):z(t)+":"+n},Te=function(){var e=j(this).host;return null===e?"":z(e)},Ae=function(){var e=j(this).port;return null===e?"":String(e)},Ie=function(){var e=j(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Me=function(){var e=j(this).query;return e?"?"+e:""},Le=function(){return j(this).searchParams},De=function(){var e=j(this).fragment;return e?"#"+e:""},Re=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&u(je,{href:Re(Oe,(function(e){var t=j(this),n=String(e),r=xe(t,n);if(r)throw TypeError(r);x(t.searchParams).updateSearchParams(t.query)})),origin:Re(ke),protocol:Re(Ee,(function(e){var t=j(this);xe(t,String(e)+":",ee)})),username:Re(Se,(function(e){var t=j(this),n=d(String(e));if(!K(t)){t.username="";for(var r=0;r children");r=e}})),r}var d=n("UwPn"),h={isAppearSupported:function(e){return e.transitionName&&e.transitionAppear||e.animation.appear},isEnterSupported:function(e){return e.transitionName&&e.transitionEnter||e.animation.enter},isLeaveSupported:function(e){return e.transitionName&&e.transitionLeave||e.animation.leave},allowAppearCallback:function(e){return e.transitionAppear||e.animation.appear},allowEnterCallback:function(e){return e.transitionEnter||e.animation.enter},allowLeaveCallback:function(e){return e.transitionLeave||e.animation.leave}},m=function(){function e(e,t){for(var n=0;n children");return a.a.createElement(g,{key:n.key,ref:function(t){e.childrenRefs[n.key]=t},animation:t.animation,transitionName:t.transitionName,transitionEnter:t.transitionEnter,transitionAppear:t.transitionAppear,transitionLeave:t.transitionLeave},n)})));var o=t.component;if(o){var i=t;return"string"==typeof o&&(i=_({className:t.className,style:t.style},t.componentProps)),a.a.createElement(o,i,r)}return r[0]||null}}]),t}(a.a.Component);k.isAnimate=!0,k.defaultProps={animation:{},component:"span",componentProps:{},transitionEnter:!0,transitionLeave:!0,transitionAppear:!1,onEnd:O,onEnter:O,onLeave:O,onAppear:O};var E=function(){var e=this;this.performEnter=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillEnter(e.handleDoneAdding.bind(e,t,"enter")))},this.performAppear=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillAppear(e.handleDoneAdding.bind(e,t,"appear")))},this.handleDoneAdding=function(t,n){var r=e.props;if(delete e.currentlyAnimatingKeys[t],!r.exclusive||r===e.nextProps){var a=l(j(r));e.isValidChildByKey(a,t)?"appear"===n?h.allowAppearCallback(r)&&(r.onAppear(t),r.onEnd(t,!0)):h.allowEnterCallback(r)&&(r.onEnter(t),r.onEnd(t,!0)):e.performLeave(t)}},this.performLeave=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillLeave(e.handleDoneLeaving.bind(e,t)))},this.handleDoneLeaving=function(t){var n=e.props;if(delete e.currentlyAnimatingKeys[t],!n.exclusive||n===e.nextProps){var r,a,o,i,c=l(j(n));if(e.isValidChildByKey(c,t))e.performEnter(t);else{var u=function(){h.allowLeaveCallback(n)&&(n.onLeave(t),n.onEnd(t,!1))};r=e.state.children,a=c,o=n.showProp,(i=r.length===a.length)&&r.forEach((function(e,t){var n=a[t];e&&n&&(e&&!n||!e&&n||e.key!==n.key||o&&e.props[o]!==n.props[o])&&(i=!1)})),i?u():e.setState({children:c},u)}}}},S=s(k),P=Object.assign||function(e){for(var t=1;t=s?e?"":void 0:(o=c.charCodeAt(u))<55296||o>56319||u+1===s||(i=c.charCodeAt(u+1))<56320||i>57343?e?c.charAt(u):o:e?c.slice(u,u+2):i-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},ecuC: +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.string.code-points.js ***! + \*******************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/create-iterator-constructor */"uoF6"),o=n(/*! ../internals/require-object-coercible */"FCfD"),i=n(/*! ../internals/internal-state */"1aI8"),c=n(/*! ../internals/string-multibyte */"eYKs"),u=c.codeAt,s=c.charAt,l=i.set,p=i.getterFor("String Iterator"),f=a((function(e){l(this,{type:"String Iterator",string:e,index:0})}),"String",(function(){var e,t=p(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=s(n,r),t.index+=e.length,{value:{codePoint:u(e,0),position:r},done:!1})}));r({target:"String",proto:!0},{codePoints:function(){return new f(String(o(this)))}})},edbT: +/*!***********************************************************!*\ + !*** ./node_modules/react-redux/es/utils/Subscription.js ***! + \***********************************************************/ +/*! exports provided: createSubscription */ +/*! exports used: createSubscription */function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(/*! ./batch */"TfIc");var a={notify:function(){},get:function(){return[]}};function o(e,t){var n,o=a;function i(){u.onStateChange&&u.onStateChange()}function c(){var a,c,u;n||(n=t?t.addNestedSub(i):e.subscribe(i),a=Object(r.a)(),c=null,u=null,o={clear:function(){c=null,u=null},notify:function(){a((function(){for(var e=c;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],t=c;t;)e.push(t),t=t.next;return e},subscribe:function(e){var t=!0,n=u={callback:e,next:null,prev:u};return n.prev?n.prev.next=n:c=n,function(){t&&null!==c&&(t=!1,n.next?n.next.prev=n.prev:u=n.prev,n.prev?n.prev.next=n.next:c=n.next)}}})}var u={addNestedSub:function(e){return c(),o.subscribe(e)},notifyNestedSubs:function(){o.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:c,tryUnsubscribe:function(){n&&(n(),n=void 0,o.clear(),o=a)},getListeners:function(){return o}};return u}},"egz/": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/math-log1p.js ***! + \******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=Math.log;e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:n(1+e)}},ehAy: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.array.find-index.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/array-iteration */"zv1X").findIndex,o=n(/*! ../internals/add-to-unscopables */"eNh0"),i=n(/*! ../internals/array-method-uses-to-length */"kGMc"),c=!0,u=i("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){c=!1})),r({target:"Array",proto:!0,forced:c||!u},{findIndex:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),o("findIndex")},en47: +/*!*********************************!*\ + !*** ./src/models/paths/new.ts ***! + \*********************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/paths */"Mgx3"),c={namespace:"newCourse",state:{actionTabs:{key:"",params:{}}},effects:{editCourse: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.u,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),submitCourse: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.R,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getEditCourseData: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.B,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),getSchoolOption: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)})),appplySchool: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)})),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 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=c},evbn: +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/uid.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},"f/k9": +/*!******************************************************************************!*\ + !*** ./node_modules/use-subscription/cjs/use-subscription.production.min.js ***! + \******************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict"; +/** @license React vundefined + * use-subscription.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r=n(/*! object-assign */"MgzW"),a=n(/*! react */"q1tI");t.useSubscription=function(e){var t=e.getCurrentValue,n=e.subscribe,o=a.useState((function(){return{getCurrentValue:t,subscribe:n,value:t()}}));e=o[0];var i=o[1];return o=e.value,e.getCurrentValue===t&&e.subscribe===n||(o=t(),i({getCurrentValue:t,subscribe:n,value:o})),a.useDebugValue(o),a.useEffect((function(){function e(){if(!a){var e=t();i((function(a){return a.getCurrentValue!==t||a.subscribe!==n||a.value===e?a:r({},a,{value:e})}))}}var a=!1,o=n(e);return e(),function(){a=!0,o()}}),[t,n]),o}},f1E4: +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/an-object.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/is-object */"tSXo");e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},fDrP: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.array.splice.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/to-absolute-index */"bIKR"),o=n(/*! ../internals/to-integer */"m0kY"),i=n(/*! ../internals/to-length */"oa35"),c=n(/*! ../internals/to-object */"cTDu"),u=n(/*! ../internals/array-species-create */"nMuc"),s=n(/*! ../internals/create-property */"arQb"),l=n(/*! ../internals/array-method-has-species-support */"jMDO"),p=n(/*! ../internals/array-method-uses-to-length */"kGMc"),f=l("splice"),d=p("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,m=Math.min;r({target:"Array",proto:!0,forced:!f||!d},{splice:function(e,t){var n,r,l,p,f,d,b=c(this),y=i(b.length),v=a(e,y),g=arguments.length;if(0===g?n=r=0:1===g?(n=0,r=y-v):(n=g-2,r=m(h(o(t),0),y-v)),y+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(l=u(b,r),p=0;py-r+n;p--)delete b[p-1]}else if(n>r)for(p=y-r;p>v;p--)d=p+n-1,(f=p+r-1)in b?b[d]=b[f]:delete b[d];for(p=0;p1?arguments[1]:void 0)}}),o("includes")},fIMf: +/*!*******************************************!*\ + !*** ./src/models/virtualSpaces/index.ts ***! + \*******************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/virtualSpaces */"m47v"),c={namespace:"virtualSpaces",state:{showMenu:!0,actionTabs:{key:"",params:{},module_id:""},virtualSpacesDetails:{},menus:[]},effects:{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)})),setShowMenu: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,n.call,a=n.put,e.next=4,a({type:"save",payload:{showMenu:r}});case 4:case"end":return e.stop()}}),e)})),getVirtualSpacesDetails: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.c,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{virtualSpacesDetails:Object(r.a)({},s)}});case 7:case"end":return e.stop()}}),e)})),getVirtualSpacesMenus: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.d,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{menus:u}});case 7:return e.abrupt("return",u);case 8:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return 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=c},fL0r: +/*!***************************************!*\ + !*** ./node_modules/intl/lib/core.js ***! + \***************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";(function(t){var n,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=(n="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,function(e,t,r,a){var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={}),t&&o)for(var c in o)void 0===t[c]&&(t[c]=o[c]);else t||(t=o||{});if(1===i)t.children=a;else if(i>1){for(var u=Array(i),s=0;s=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},possibleConstructorReturn:function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},selfGlobal:u,set:function e(t,n,r,a){var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);null!==i&&e(i,n,r,a)}else if("value"in o&&o.writable)o.value=r;else{var c=o.set;void 0!==c&&c.call(a,r)}return r},slicedToArray:s,slicedToArrayLoose:function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){for(var n,r=[],a=e[Symbol.iterator]();!(n=a.next()).done&&(r.push(n.value),!t||r.length!==t););return r}throw new TypeError("Invalid attempt to destructure non-iterable instance")},taggedTemplateLiteral:function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},taggedTemplateLiteralLoose:function(e,t){return e.raw=t,e},temporalRef:function(e,t,n){if(e===n)throw new ReferenceError(t+" is not defined - temporal dead zone");return e},temporalUndefined:{},toArray:function(e){return Array.isArray(e)?e:Array.from(e)},toConsumableArray:function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t="a"&&n<="z"&&(e=e.slice(0,t)+n.toUpperCase()+e.slice(t+1))}return e}function V(e){return!!L.test(e)&&(!D.test(e)&&!R.test(e))}function q(e){for(var t=void 0,n=void 0,r=1,a=(n=(e=e.toLowerCase()).split("-")).length;r1&&(t.sort(),e=e.replace(RegExp("(?:"+N.source+")+","i"),_.call(t,""))),d.call(U.tags,e)&&(e=U.tags[e]);for(var o=1,i=(n=e.split("-")).length;o-1)return n;var r=n.lastIndexOf("-");if(r<0)return;r>=2&&"-"===n.charAt(r-2)&&(r-=2),n=n.substring(0,r)}}function Q(e,t){for(var n=0,r=t.length,a=void 0,o=void 0,i=void 0;n2){var w=c[x+1];-1!==_.call(y,w)&&(g="-"+b+"-"+(v=w))}else{-1!==_(y,"true")&&(v="true")}}if(d.call(n,"[["+b+"]]")){var j=n["[["+b+"]]"];-1!==_.call(y,j)&&j!==v&&(v=j,g="")}l["[["+b+"]]"]=v,p+=g,f++}if(p.length>2){var O=i.indexOf("-x-");if(-1===O)i+=p;else{var E=i.substring(0,O),S=i.substring(O);i=E+p+S}i=q(i)}return l["[[locale]]"]=i,l}function K(e,t){for(var n=t.length,r=new E,a=0;ar)throw new RangeError("Value is not a number or outside accepted range");return Math.floor(o)}return a}var $={};Object.defineProperty($,"getCanonicalLocales",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=H(e),n=[],r=t.length,a=0;ao;o++){var i=n[o],c={};c.type=i["[[type]]"],c.value=i["[[value]]"],r[a]=c,a+=1}return r}function oe(e,t){var n=A(e),r=n["[[dataLocale]]"],a=n["[[numberingSystem]]"],o=j.NumberFormat["[[localeData]]"][r],i=o.symbols[a]||o.symbols.latn,c=void 0;!isNaN(t)&&t<0?(t=-t,c=n["[[negativePattern]]"]):c=n["[[positivePattern]]"];for(var u=new E,s=c.indexOf("{",0),l=0,p=0,f=c.length;s>-1&&sp){var h=c.substring(p,s);g.call(u,{"[[type]]":"literal","[[value]]":h})}var m=c.substring(s+1,l);if("number"===m)if(isNaN(t)){var b=i.nan;g.call(u,{"[[type]]":"nan","[[value]]":b})}else if(isFinite(t)){"percent"===n["[[style]]"]&&isFinite(t)&&(t*=100);var y=void 0;y=d.call(n,"[[minimumSignificantDigits]]")&&d.call(n,"[[maximumSignificantDigits]]")?ce(t,n["[[minimumSignificantDigits]]"],n["[[maximumSignificantDigits]]"]):ue(t,n["[[minimumIntegerDigits]]"],n["[[minimumFractionDigits]]"],n["[[maximumFractionDigits]]"]),se[a]?function(){var e=se[a];y=String(y).replace(/\d/g,(function(t){return e[t]}))}():y=String(y);var v=void 0,_=void 0,w=y.indexOf(".",0);if(w>0?(v=y.substring(0,w),_=y.substring(w+1,w.length)):(v=y,_=void 0),!0===n["[[useGrouping]]"]){var O=i.group,k=[],S=o.patterns.primaryGroupSize||3,P=o.patterns.secondaryGroupSize||S;if(v.length>S){var C=v.length-S,T=C%P,I=v.slice(0,T);for(I.length&&g.call(k,I);Ta;a++){r+=n[a]["[[value]]"]}return r}function ce(e,t,n){var r=n,a=void 0,o=void 0;if(0===e)a=_.call(Array(r+1),"0"),o=0;else{o=function(e){if("function"==typeof Math.log10)return Math.floor(Math.log10(e));var t=Math.round(Math.log(e)*Math.LOG10E);return t-(Number("1e"+t)>e)}(Math.abs(e));var i=Math.round(Math.exp(Math.abs(o-r+1)*Math.LN10));a=String(Math.round(o-r+1<0?e*i:e/i))}if(o>=r)return a+_.call(Array(o-r+1+1),"0");if(o===r-1)return a;if(o>=0?a=a.slice(0,o+1)+"."+a.slice(o+1):o<0&&(a="0."+_.call(Array(1-(o+1)),"0")+a),a.indexOf(".")>=0&&n>t){for(var c=n-t;c>0&&"0"===a.charAt(a.length-1);)a=a.slice(0,-1),c--;"."===a.charAt(a.length-1)&&(a=a.slice(0,-1))}return a}function ue(e,t,n,r){var a,o=r,i=Math.pow(10,o)*e,c=0===i?"0":i.toFixed(0),u=(a=c.indexOf("e"))>-1?c.slice(a+1):0;u&&(c=c.slice(0,a).replace(".",""),c+=_.call(Array(u-(c.length-1)+1),"0"));var s=void 0;if(0!==o){var l=c.length;if(l<=o)c=_.call(Array(o+1-l+1),"0")+c,l=o+1;var p=c.substring(0,l-o),f=c.substring(l-o,c.length);c=p+"."+f,s=p.length}else s=c.length;for(var d=r-n;d>0&&"0"===c.slice(-1);)c=c.slice(0,-1),d--;("."===c.slice(-1)&&(c=c.slice(0,-1)),sn&&(n=c,r=i),a++}return r}(c,w);else{var P=J(n,"hour12","boolean");c.hour12=void 0===P?x.hour12:P,_=function(e,t){var n=[];for(var r in Ee)d.call(Ee,r)&&void 0!==e["[["+r+"]]"]&&n.push(r);if(1===n.length){var a=function(e,t){var n;if(xe[e]&&xe[e][t])return n={originalPattern:xe[e][t],_:i({},e,t),extendedPattern:"{"+e+"}"},i(n,e,t),i(n,"pattern12","{"+e+"}"),i(n,"pattern","{"+e+"}"),n}(n[0],e["[["+n[0]+"]]"]);if(a)return a}var o=-1/0,c=void 0,u=0,s=t.length;for(;u=2||_>=2&&g<=1?x>0?p-=6:x<0&&(p-=8):x>1?p-=3:x<-1&&(p-=6)}}l._.hour12!==e.hour12&&(p-=1),p>o&&(o=p,c=l),u++}return c}(c,w)}for(var C in Ee)if(d.call(Ee,C)&&d.call(_,C)){var T=_[C];T=_._&&d.call(_._,C)?_._[C]:T,r["[["+C+"]]"]=T}var I=void 0,M=J(n,"hour12","boolean");if(r["[[hour]]"])if(M=void 0===M?x.hour12:M,r["[[hour12]]"]=M,!0===M){var L=x.hourNo0;r["[[hourNo0]]"]=L,I=_.pattern12}else I=_.pattern;else I=_.pattern;return r["[[pattern]]"]=I,r["[[boundFormat]]"]=void 0,r["[[initializedDateTimeFormat]]"]=!0,f&&(e.format=Pe.call(e)),a(),e}h($,"DateTimeFormat",{configurable:!0,writable:!0,value:Oe}),h(Oe,"prototype",{writable:!1});var Ee={weekday:["narrow","short","long"],era:["narrow","short","long"],year:["2-digit","numeric"],month:["2-digit","numeric","narrow","short","long"],day:["2-digit","numeric"],hour:["2-digit","numeric"],minute:["2-digit","numeric"],second:["2-digit","numeric"],timeZoneName:["short","long"]};function Se(e,t,n){if(void 0===e)e=null;else{var r=P(e);for(var a in e=new k,r)e[a]=r[a]}e=b(e);var o=!0;return"date"!==t&&"any"!==t||void 0===e.weekday&&void 0===e.year&&void 0===e.month&&void 0===e.day||(o=!1),"time"!==t&&"any"!==t||void 0===e.hour&&void 0===e.minute&&void 0===e.second||(o=!1),!o||"date"!==n&&"all"!==n||(e.year=e.month=e.day="numeric"),!o||"time"!==n&&"all"!==n||(e.hour=e.minute=e.second="numeric"),e}function Pe(){var e=null!==this&&"object"===l.typeof(this)&&A(this);if(!e||!e["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for format() is not an initialized Intl.DateTimeFormat object.");if(void 0===e["[[boundFormat]]"]){var t=w.call((function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0],t=void 0===e?Date.now():C(e);return Te(this,t)}),this);e["[[boundFormat]]"]=t}return e["[[boundFormat]]"]}function Ce(e,t){if(!isFinite(t))throw new RangeError("Invalid valid date passed to format");var n=e.__getInternalProperties(O);S();for(var r,a,o,i,c=n["[[locale]]"],u=new $.NumberFormat([c],{useGrouping:!1}),s=new $.NumberFormat([c],{minimumIntegerDigits:2,useGrouping:!1}),l=(r=t,n["[[calendar]]"],a=n["[[timeZone]]"],new k({"[[weekday]]":(o=new Date(r))[(i="get"+(a||""))+"Day"](),"[[era]]":+(o[i+"FullYear"]()>=0),"[[year]]":o[i+"FullYear"](),"[[month]]":o[i+"Month"](),"[[day]]":o[i+"Date"](),"[[hour]]":o[i+"Hours"](),"[[minute]]":o[i+"Minutes"](),"[[second]]":o[i+"Seconds"](),"[[inDST]]":!1})),p=n["[[pattern]]"],f=new E,d=0,h=p.indexOf("{"),m=0,b=n["[[dataLocale]]"],y=j.DateTimeFormat["[[localeData]]"][b].calendars,v=n["[[calendar]]"];-1!==h;){var _=void 0;if(-1===(m=p.indexOf("}",h)))throw new Error("Unclosed pattern");h>d&&g.call(f,{type:"literal",value:p.substring(d,h)});var x=p.substring(h+1,m);if(Ee.hasOwnProperty(x)){var w=n["[["+x+"]]"],P=l["[["+x+"]]"];if("year"===x&&P<=0?P=1-P:"month"===x?P++:"hour"===x&&!0===n["[[hour12]]"]&&0===(P%=12)&&!0===n["[[hourNo0]]"]&&(P=12),"numeric"===w)_=ie(u,P);else if("2-digit"===w)(_=ie(s,P)).length>2&&(_=_.slice(-2));else if(w in we)switch(x){case"month":_=je(y,v,"months",w,l["[["+x+"]]"]);break;case"weekday":try{_=je(y,v,"days",w,l["[["+x+"]]"])}catch(e){throw new Error("Could not find weekday data for locale "+c)}break;case"timeZoneName":_="";break;case"era":try{_=je(y,v,"eras",w,l["[["+x+"]]"])}catch(e){throw new Error("Could not find era data for locale "+c)}break;default:_=l["[["+x+"]]"]}g.call(f,{type:x,value:_})}else if("ampm"===x){_=je(y,v,"dayPeriods",l["[[hour]]"]>11?"pm":"am",null),g.call(f,{type:"dayPeriod",value:_})}else g.call(f,{type:"literal",value:p.substring(h,m+1)});d=m+1,h=p.indexOf("{",d)}return ma;a++){r+=n[a].value}return r}function Ae(e,t){for(var n=Ce(e,t),r=[],a=0;n.length>a;a++){var o=n[a];r.push({type:o.type,value:o.value})}return r}j.DateTimeFormat={"[[availableLocales]]":[],"[[relevantExtensionKeys]]":["ca","nu"],"[[localeData]]":{}},h($.DateTimeFormat,"supportedLocalesOf",{configurable:!0,writable:!0,value:w.call((function(e){if(!d.call(this,"[[availableLocales]]"))throw new TypeError("supportedLocalesOf() is not a constructor");var t=S(),n=arguments[1],r=this["[[availableLocales]]"],a=H(e);return t(),X(r,a,n)}),j.NumberFormat)}),h($.DateTimeFormat.prototype,"format",{configurable:!0,get:Pe}),Object.defineProperty($.DateTimeFormat.prototype,"formatToParts",{enumerable:!1,writable:!0,configurable:!0,value:function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0],t=null!==this&&"object"===l.typeof(this)&&A(this);if(!t||!t["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for formatToParts() is not an initialized Intl.DateTimeFormat object.");var n=void 0===e?Date.now():C(e);return Ae(this,n)}}),h($.DateTimeFormat.prototype,"resolvedOptions",{writable:!0,configurable:!0,value:function(){var e=void 0,t=new k,n=["locale","calendar","numberingSystem","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"],r=null!==this&&"object"===l.typeof(this)&&A(this);if(!r||!r["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for resolvedOptions() is not an initialized Intl.DateTimeFormat object.");for(var a=0,o=n.length;a2&&4===a[1].length&&g.call(r,a[0]+"-"+a[2]);for(;n=x.call(r);)g.call(j.NumberFormat["[[availableLocales]]"],n),j.NumberFormat["[[localeData]]"][n]=e.number,e.date&&(e.date.nu=e.number.nu,g.call(j.DateTimeFormat["[[availableLocales]]"],n),j.DateTimeFormat["[[localeData]]"][n]=e.date);void 0===F&&function(e){F=e}(t)}(e,e.locale)}}),h($,"__disableRegExpRestore",{value:function(){j.disableRegExpRestore=!0}}),e.exports=$}).call(this,n(/*! ./../../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},fQri: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.add-all.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/collection-add-all */"Z+8a");r({target:"Set",proto:!0,real:!0,forced:a},{addAll:function(){return o.apply(this,arguments)}})},fWQN: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***! + \********************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},fZJM: +/*!******************************************!*\ + !*** ./node_modules/hash.js/lib/hash.js ***! + \******************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=t;r.utils=n(/*! ./hash/utils */"w8CP"),r.common=n(/*! ./hash/common */"7ckf"),r.sha=n(/*! ./hash/sha */"WRkp"),r.ripemd=n(/*! ./hash/ripemd */"u0Sq"),r.hmac=n(/*! ./hash/hmac */"ITfd"),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},foSv: +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},"g+eg": +/*!****************************************!*\ + !*** ./src/pages/Engineering/util.tsx ***! + \****************************************/ +/*! exports provided: verifyModal, localSelect */ +/*! exports used: localSelect, verifyModal */function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}));n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),a=n(/*! @/utils/authority */"xKgJ"),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";r.a.confirm({centered:!0,width:520,okText:"确定",cancelText:"取消",title:"提示",content:t,onOk:e})},i={setItem:function(e,t){var n,r=e+"-engineering"+(null===(n=Object(a.x)())||void 0===n?void 0:n.school_id),o=JSON.stringify(t);localStorage.setItem(r,o)},getItem:function(e){var t,n=e+"-engineering"+(null===(t=Object(a.x)())||void 0===t?void 0:t.school_id),r=localStorage.getItem(n);return null!==r&&"[object Object]"!==r?JSON.parse(r):[]},clear:function(e){var t,n=e+"-engineering"+(null===(t=Object(a.x)())||void 0===t?void 0:t.school_id);localStorage.removeItem(n)}}},g1ZG: +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/object-set-prototype-of.js ***! + \*******************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/an-object */"f1E4"),a=n(/*! ../internals/a-possible-prototype */"JS3A");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),a(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},g8rt: +/*!******************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/object-get-own-property-descriptor.js ***! + \******************************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/descriptors */"tny8"),a=n(/*! ../internals/object-property-is-enumerable */"e3V2"),o=n(/*! ../internals/create-property-descriptor */"HhvW"),i=n(/*! ../internals/to-indexed-object */"0qr0"),c=n(/*! ../internals/to-primitive */"gFfw"),u=n(/*! ../internals/has */"jtLI"),s=n(/*! ../internals/ie8-dom-define */"/yC2"),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=i(e),t=c(t,!0),s)try{return l(e,t)}catch(e){}if(u(e,t))return o(!a.f.call(e,t),e[t])}},gFfw: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/to-primitive.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/is-object */"tSXo");e.exports=function(e,t){if(!r(e))return e;var n,a;if(t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;if("function"==typeof(n=e.valueOf)&&!r(a=n.call(e)))return a;if(!t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},gVIt: +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.copy-within.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-buffer-view-core */"FVwB"),a=n(/*! ../internals/array-copy-within */"AmH5"),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(e,t){return a.call(o(this),e,t,arguments.length>2?arguments[2]:void 0)}))},ggIM: +/*!****************************************!*\ + !*** ./src/models/classrooms/video.ts ***! + \****************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/video */"qdXH"),c={namespace:"video",state:{name:"资源",loading:!0,actionTabs:{},videoStatisticsList:{},videoDurationStatics:{},StudentvideoStatistics:{},videoPeopleStatics:{},videoStatistics:{},oneVideoStatisticsList:{}},effects:{getVideoStatisticsList: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,t.callback,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:{videoStatisticsList:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getVideoPeopleStatics: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,t.callback,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:{videoPeopleStatics:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getVideoDurationStatics: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.f,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{videoDurationStatics:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getVideoStatistics: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,t.callback,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:{videoStatistics:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getOneVideoStatisticsList: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.b,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{oneVideoStatisticsList:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);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)})),getStudentVideoStatisticsList: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,t.callback,c=n.call,u=n.put,e.next=4,c(i.d,a);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{StudentvideoStatistics:Object(r.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return Object(r.a)(Object(r.a)({},e),t.payload)}},subscriptions:{setup:function(e){e.dispatch,e.history}}};t.a=c},gweS: +/*!*********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.uint16-array.js ***! + \*********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/typed-array-constructor */"Mi8B")("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},"h+Ho": +/*!*******************************!*\ + !*** ./src/service/forums.ts ***! + \*******************************/ +/*! exports provided: getForumsData, getForumsShixunData, stickyOrCancel, deleteForums, getForumsNewData, getForumsEditData, newForums, updateForums, getForumsDetailData, watch, cancelWatch, rewardCode, like, reply, getMoreReply */ +/*! exports used: cancelWatch, deleteForums, getForumsData, getForumsDetailData, getForumsEditData, getForumsNewData, getForumsShixunData, getMoreReply, like, newForums, reply, rewardCode, stickyOrCancel, updateForums, watch */function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"g",(function(){return l})),n.d(t,"m",(function(){return f})),n.d(t,"b",(function(){return h})),n.d(t,"f",(function(){return b})),n.d(t,"e",(function(){return v})),n.d(t,"j",(function(){return _})),n.d(t,"n",(function(){return w})),n.d(t,"d",(function(){return O})),n.d(t,"o",(function(){return E})),n.d(t,"a",(function(){return P})),n.d(t,"l",(function(){return T})),n.d(t,"i",(function(){return I})),n.d(t,"k",(function(){return L})),n.d(t,"h",(function(){return R}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/utils/fetch */"ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/memos.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/discusses/forum_discusses.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/memos/".concat(t.id,"/sticky_or_cancel.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/memos/".concat(t.id,".json"),{method:"delete",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/memos/new.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/memos/".concat(t.id,"/edit.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/memos.json",{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return j.apply(this,arguments)}function j(){return(j=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/memos/".concat(t.id,".json"),{method:"put",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return k.apply(this,arguments)}function k(){return(k=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/memos/".concat(t.id,".json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return S.apply(this,arguments)}function S(){return(S=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.user_id,"/watch.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.user_id,"/watch.json"),{method:"delete",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return A.apply(this,arguments)}function A(){return(A=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/discusses/".concat(t.id,"/reward_code.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e){return M.apply(this,arguments)}function M(){return(M=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/discusses/".concat(t.id,"/plus.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(e){return D.apply(this,arguments)}function D(){return(D=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/memos/reply.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e){return N.apply(this,arguments)}function N(){return(N=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/memos/".concat(t.id,"/more_reply.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},h0XC: +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/nonIterableRest.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},hD9M: +/*!***************************************!*\ + !*** ./src/service/onlineLearning.ts ***! + \***************************************/ +/*! exports provided: getOnlineLearning, updateStage, addStage, satgeAddShixunToStage, selectShixunToStage, addVideoToStage, addCoursewareToStage, addShixunToStage, upPosition, downPosition, deleteStage, stagesMovePosition, deleteStages */ +/*! exports used: addCoursewareToStage, addStage, addVideoToStage, deleteStage, deleteStages, downPosition, getOnlineLearning, satgeAddShixunToStage, selectShixunToStage, stagesMovePosition, upPosition, updateStage */function(e,t,n){"use strict";n.d(t,"g",(function(){return u})),n.d(t,"l",(function(){return l})),n.d(t,"b",(function(){return f})),n.d(t,"h",(function(){return h})),n.d(t,"i",(function(){return b})),n.d(t,"c",(function(){return v})),n.d(t,"a",(function(){return _})),n.d(t,"k",(function(){return w})),n.d(t,"f",(function(){return O})),n.d(t,"d",(function(){return E})),n.d(t,"j",(function(){return P})),n.d(t,"e",(function(){return T}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/utils/fetch */"ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/online_learning.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_stages/".concat(t.id,".json"),{method:"put",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/course_stages.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_stages/".concat(t.id,"/add_shixun_to_stage.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_stages/".concat(t.id,"/select_shixun_to_stage.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_stages/".concat(t.id,"/add_video_to_stage.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_stages/".concat(t.id,"/add_attachment_to_stage.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return j.apply(this,arguments)}function j(){return(j=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_stages/".concat(t.id,"/up_position.json"),{method:"post"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return k.apply(this,arguments)}function k(){return(k=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_stages/".concat(t.id,"/down_position.json"),{method:"post"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return S.apply(this,arguments)}function S(){return(S=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_stages/".concat(t.id,".json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_stages/".concat(t.stage_id,"/items/move_position.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return A.apply(this,arguments)}function A(){return(A=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_stages/".concat(t.stage_id,"/items/").concat(t.id),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},hJwl: +/*!*************************************!*\ + !*** ./src/service/competitions.ts ***! + \*************************************/ +/*! exports provided: getCompetitionsList, addApplytojoincourse, competitionTeams, getStaff, getHeader, getItem, updateMdContent, getTeamList, getTeamDetail, UpTeam, ExitTeam, DeleteTeam, AddTeam, JoinTeam, getTeacher, getStudents, SubmitTeam, Reward, ChartRules, Charts, Results, TabResults, Prize, Accounts, getVerification, PhoneBind, EmailBind, Professional, Authentication, setleader, getShixun, getCourse, deletAttachments, getCertificateInfo */ +/*! exports used: Accounts, AddTeam, Authentication, ChartRules, Charts, DeleteTeam, EmailBind, ExitTeam, JoinTeam, PhoneBind, Prize, Professional, Results, Reward, SubmitTeam, TabResults, UpTeam, addApplytojoincourse, competitionTeams, deletAttachments, getCertificateInfo, getCompetitionsList, getCourse, getHeader, getItem, getShixun, getStaff, getStudents, getTeacher, getTeamDetail, getTeamList, getVerification, setleader, updateMdContent */function(e,t,n){"use strict";n.d(t,"v",(function(){return u})),n.d(t,"r",(function(){return l})),n.d(t,"s",(function(){return f})),n.d(t,"A",(function(){return h})),n.d(t,"x",(function(){return b})),n.d(t,"y",(function(){return v})),n.d(t,"H",(function(){return _})),n.d(t,"E",(function(){return w})),n.d(t,"D",(function(){return O})),n.d(t,"q",(function(){return E})),n.d(t,"h",(function(){return P})),n.d(t,"f",(function(){return T})),n.d(t,"b",(function(){return I})),n.d(t,"i",(function(){return L})),n.d(t,"C",(function(){return R})),n.d(t,"B",(function(){return F})),n.d(t,"o",(function(){return z})),n.d(t,"n",(function(){return q})),n.d(t,"d",(function(){return W})),n.d(t,"e",(function(){return G})),n.d(t,"m",(function(){return Y})),n.d(t,"p",(function(){return X})),n.d(t,"k",(function(){return Z})),n.d(t,"a",(function(){return ee})),n.d(t,"F",(function(){return ne})),n.d(t,"j",(function(){return ae})),n.d(t,"g",(function(){return ie})),n.d(t,"l",(function(){return ue})),n.d(t,"c",(function(){return le})),n.d(t,"G",(function(){return fe})),n.d(t,"z",(function(){return he})),n.d(t,"w",(function(){return be})),n.d(t,"t",(function(){return ve})),n.d(t,"u",(function(){return _e}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/utils/fetch */"ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions.json",{method:"Get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/apply_to_join_course.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/competition_teams.json"),{method:"post"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/competition_staff.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/common_header.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/".concat(t.url),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/update_md_content.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return j.apply(this,arguments)}function j(){return(j=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/competition_teams.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return k.apply(this,arguments)}function k(){return(k=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/competition_teams/").concat(t.Teannameid,"/edit.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return S.apply(this,arguments)}function S(){return(S=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/competition_teams/").concat(t.Teannameid,".json"),{method:"put",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/competition_teams/").concat(t.id,"/leave.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return A.apply(this,arguments)}function A(){return(A=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/competition_teams/").concat(t.id,".json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e){return M.apply(this,arguments)}function M(){return(M=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/competition_teams.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(e){return D.apply(this,arguments)}function D(){return(D=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/competition_teams/join.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e){return N.apply(this,arguments)}function N(){return(N=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/teachers.json?"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e){return U.apply(this,arguments)}function U(){return(U=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/students.json?"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(e){return V.apply(this,arguments)}function V(){return(V=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/competition_teams/").concat(t.teamid,"/crud_team_members.json?"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(e){return B.apply(this,arguments)}function B(){return(B=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/competition_reward.json?",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function W(e){return H.apply(this,arguments)}function H(){return(H=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/chart_rules.json?"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(e){return Q.apply(this,arguments)}function Q(){return(Q=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/charts.json?"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(e){return K.apply(this,arguments)}function K(){return(K=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/results.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(e){return J.apply(this,arguments)}function J(){return(J=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/md_tab_rules.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(e){return $.apply(this,arguments)}function $(){return($=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/prize.json?"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(e){return te.apply(this,arguments)}function te(){return(te=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/accounts/".concat(t.id,".json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(e){return re.apply(this,arguments)}function re(){return(re=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/accounts/get_verification_code.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ae(e){return oe.apply(this,arguments)}function oe(){return(oe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/accounts/".concat(t.userid,"/phone_bind.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ie(e){return ce.apply(this,arguments)}function ce(){return(ce=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/accounts/".concat(t.userid,"/email_bind.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ue(e){return se.apply(this,arguments)}function se(){return(se=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/accounts/".concat(t.userid,"/professional_auth_apply.json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function le(e){return pe.apply(this,arguments)}function pe(){return(pe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/accounts/".concat(t.userid,"/authentication_apply.json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fe(e){return de.apply(this,arguments)}function de(){return(de=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/prize_leader_account.json"),{method:"patch",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function he(e){return me.apply(this,arguments)}function me(){return(me=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/competition_teams/").concat(t.teamid,"/shixun_detail.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function be(e){return ye.apply(this,arguments)}function ye(){return(ye=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.identifier,"/competition_teams/").concat(t.teamid,"/course_detail.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ve(e){return ge.apply(this,arguments)}function ge(){return(ge=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/attachments/".concat(t.id,".json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _e(e){return xe.apply(this,arguments)}function xe(){return(xe=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/competitions/".concat(t.id,"/get_certificate_info.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},hKmx: +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/flatten-into-array.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/is-array */"Un+d"),a=n(/*! ../internals/to-length */"oa35"),o=n(/*! ../internals/function-bind-context */"7BAe"),i=function(e,t,n,c,u,s,l,p){for(var f,d=u,h=0,m=!!l&&o(l,p,3);h0&&r(f))d=i(e,t,f,a(f.length),d,s-1)-1;else{if(d>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[d]=f}d++}h++}return d};e.exports=i},"hOG+": +/*!*****************************!*\ + !*** (webpack)/4/module.js ***! + \*****************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){(function(t){e.exports=function(){var e={311:function(e){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}}},n={};function r(t){if(n[t])return n[t].exports;var a=n[t]={exports:{}},o=!0;try{e[t](a,a.exports,r),o=!1}finally{o&&delete n[t]}return a.exports}return r.ab=t+"/",r(311)}()}).call(this,"/")},hRxt: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/engine-v8-version.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,a,o=n(/*! ../internals/global */"ukPv"),i=n(/*! ../internals/engine-user-agent */"Qlla"),c=o.process,u=c&&c.versions,s=u&&u.v8;s?a=(r=s.split("."))[0]+r[1]:i&&(!(r=i.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/))&&(a=r[1]),e.exports=a&&+a},hYqy: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.math.degrees.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=180/Math.PI;r({target:"Math",stat:!0},{degrees:function(e){return e*a}})},haHa: +/*!*********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.is-disjoint-from.js ***! + \*********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/an-object */"f1E4"),i=n(/*! ../internals/a-function */"cT1L"),c=n(/*! ../internals/iterate */"IuhT");r({target:"Set",proto:!0,real:!0,forced:a},{isDisjointFrom:function(e){var t=o(this),n=i(t.has);return!c(e,(function(e){if(!0===n.call(t,e))return c.stop()})).stopped}})},hh8c: +/*!*************************!*\ + !*** ./src/global.less ***! + \*************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},hilM: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.array.slice.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-object */"tSXo"),o=n(/*! ../internals/is-array */"Un+d"),i=n(/*! ../internals/to-absolute-index */"bIKR"),c=n(/*! ../internals/to-length */"oa35"),u=n(/*! ../internals/to-indexed-object */"0qr0"),s=n(/*! ../internals/create-property */"arQb"),l=n(/*! ../internals/well-known-symbol */"2kyd"),p=n(/*! ../internals/array-method-has-species-support */"jMDO"),f=n(/*! ../internals/array-method-uses-to-length */"kGMc"),d=p("slice"),h=f("slice",{ACCESSORS:!0,0:0,1:2}),m=l("species"),b=[].slice,y=Math.max;r({target:"Array",proto:!0,forced:!d||!h},{slice:function(e,t){var n,r,l,p=u(this),f=c(p.length),d=i(e,f),h=i(void 0===t?f:t,f);if(o(p)&&("function"!=typeof(n=p.constructor)||n!==Array&&!o(n.prototype)?a(n)&&null===(n=n[m])&&(n=void 0):n=void 0,n===Array||void 0===n))return b.call(p,d,h);for(r=new(void 0===n?Array:n)(y(h-d,0)),l=0;d1?arguments[1]:void 0,3);return!u(n,(function(e){if(!r(e,e,t))return u.stop()}),void 0,!1,!0).stopped}})},"iUp/": +/*!************************************!*\ + !*** ./src/models/video/detail.ts ***! + \************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/service/video */"qdXH"),u=n(/*! @/service/paths */"Mgx3"),s=n(/*! @/service/onlineLearning */"hD9M"),l=function(){var e,t,n,r,a,o=window.location.href.split("/");if(o.includes("video")){var i=null===(e=o[o.length-1])||void 0===e?void 0:e.split("?")[0];i=Number(i);var c=null===(t=o[o.length-1])||void 0===t||null===(n=t.split("?")[1])||void 0===n?void 0:n.split("=")[1];return"subject_id"===(null===(r=o[o.length-1])||void 0===r||null===(a=r.split("?")[1])||void 0===a?void 0:a.split("=")[0])?{videoId:i,subject_id:c}:{videoId:i,course_id:c}}},p={namespace:"videoDetail",state:{detail:{},actionTabs:{key:"",params:{}},stages:[],cust_seq:0,queryParams:l(),videoList:[],attachmentList:[],selectParams:{checkBoxValue:!1,radioValue:1},active:{}},effects:{getVideoDetail:i.a.mark((function e(t,n){var r,o,u,s,l;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,o=t.callback,u=n.call,s=n.put,e.next=4,u(c.e,r);case 4:if(l=e.sent,!o){e.next=9;break}o(l),e.next=11;break;case 9:return e.next=11,s({type:"save",payload:{detail:Object(a.a)({},l)}});case 11:case"end":return e.stop()}}),e)})),setActionTabs:i.a.mark((function e(t,n){var r,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,n.call,o=n.put,e.next=4,o({type:"save",payload:{actionTabs:Object(a.a)({},r)}});case 4:case"end":return e.stop()}}),e)})),setSelectValue:i.a.mark((function e(t,n){var r,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,n.call,o=n.put,e.next=4,o({type:"save",payload:{selectParams:Object(a.a)({},r)}});case 4:case"end":return e.stop()}}),e)})),handleList:i.a.mark((function e(t,n){var o,c,u,s,p,f,d,h;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.payload,c=n.put,u=n.select,console.log("select;",u),e.next=5,u((function(e){return e.videoDetail}));case 5:return s=e.sent,p=s.videoList,f=s.attachmentList,d=o.videoId||o.attachmentId,h=[].concat(Object(r.a)(p),Object(r.a)(f)).find((function(e){return String(e.id)===String(d)})),console.log(h,l(),222),e.next=13,c({type:"save",payload:{active:h,queryParams:Object(a.a)(Object(a.a)({},l()),o)}});case 13:case"end":return e.stop()}}),e)})),getStageData:i.a.mark((function e(t,n){var r,a,o,s,l,p,f,d,h,m,b,y,v;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,o=n.put,s=n.select,e.next=4,a(c.c,r);case 4:return l=e.sent,e.next=7,a(u.D,{id:r.subject_id});case 7:return p=e.sent,e.next=10,s((function(e){return e.videoDetail}));case 10:return f=e.sent,d=f.queryParams,h=l.stages,b=[],y=[],v={},null==(m=void 0===h?[]:h)||m.forEach((function(e){e.items.forEach((function(e){String(e.id)===String(d.videoId)&&(v=e),"VideoItem"===e.item_type?b.push(e):"Attachment"===e.item_type&&y.push(e),e.children&&e.children.length&&e.children.forEach((function(e){String(e.id)===String(d.videoId)&&(v=e),"VideoItem"===e.item_type?b.push(e):"Attachment"===e.item_type&&y.push(e)}))}))})),window.filterVideoSign=[].concat(b),e.next=20,o({type:"save",payload:{stages:m,active:v,cust_seq:p.cust_seq,videoList:b,attachmentList:y}});case 20:case"end":return e.stop()}}),e)})),getCourseStageData:i.a.mark((function e(t,n){var r,a,o,c,u,l,p,f,d,h,m;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,o=n.put,c=n.select,e.next=4,a(s.g,r);case 4:return u=e.sent,e.next=7,c((function(e){return e.videoDetail}));case 7:return l=e.sent,p=l.queryParams,f=u.stages,d=[],h=[],m={},null==f||f.forEach((function(e){e.items.forEach((function(e){String(e.id)===String(p.videoId)&&(m=e),"VideoItem"===e.item_type?d.push(e):"Attachment"===e.item_type&&h.push(e),e.children&&e.children.length&&e.children.forEach((function(e){String(e.id)===String(p.videoId)&&(m=e),"VideoItem"===e.item_type?d.push(e):"Attachment"===e.item_type&&h.push(e)}))}))})),window.filterVideoSign=[].concat(d),e.next=17,o({type:"save",payload:{active:m,stages:f,cust_seq:!0,videoList:d,attachmentList:h}});case 17:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return Object(a.a)(Object(a.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=p},igoe: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/an-instance.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},izsi: +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.number.parse-float.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/number-parse-float */"rn5R");r({target:"Number",stat:!0,forced:Number.parseFloat!=a},{parseFloat:a})},jGFG: +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.slice.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-buffer-view-core */"FVwB"),a=n(/*! ../internals/species-constructor */"/dTS"),o=n(/*! ../internals/fails */"MVys"),i=r.aTypedArray,c=r.aTypedArrayConstructor,u=r.exportTypedArrayMethod,s=[].slice;u("slice",(function(e,t){for(var n=s.call(i(this),e,t),r=a(this,this.constructor),o=0,u=n.length,l=new(c(r))(u);u>o;)l[o]=n[o++];return l}),o((function(){new Int8Array(1).slice()})))},jHRr: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.map.find.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/an-object */"f1E4"),i=n(/*! ../internals/function-bind-context */"7BAe"),c=n(/*! ../internals/get-map-iterator */"PPXv"),u=n(/*! ../internals/iterate */"IuhT");r({target:"Map",proto:!0,real:!0,forced:a},{find:function(e){var t=o(this),n=c(t),r=i(e,arguments.length>1?arguments[1]:void 0,3);return u(n,(function(e,n){if(r(n,e,t))return u.stop(n)}),void 0,!0,!0).result}})},jIZW: +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.map.delete-all.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/collection-delete-all */"+X1D");r({target:"Map",proto:!0,real:!0,forced:a},{deleteAll:function(){return o.apply(this,arguments)}})},jMDO: +/*!****************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/array-method-has-species-support.js ***! + \****************************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/fails */"MVys"),a=n(/*! ../internals/well-known-symbol */"2kyd"),o=n(/*! ../internals/engine-v8-version */"hRxt"),i=a("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[i]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},"jb+D": +/*!*****************************!*\ + !*** ./src/service/user.ts ***! + \*****************************/ +/*! exports provided: LoginIn, LoginOut, getUserInfo, getNavigationInfo, getSystemUpdate, getHomepageInfo, signed, getCourses, getShixuns, getPaths, getProjects, getVideos, getReviewVideos, deleteVideo, logWatchHistory, getQuestionBanks, topicsSetPublic, topicsDelete, topicGetCourseList, topicSendToClass, getHomeworkBanksDetail, deleteQuestionBanks, batchPublish, cancelShixun, getEngineerUrl, postUserChoiceLearnPath, getUserPersona, getUserLearnPath, validateName, getValidateCode, register, wechatRegister, changPassword, resetPassword, LoginForPhone, createCourseFolder, deleteCourseFolder, editCourseFolder, moveCourseFolder, createUserFolder */ +/*! exports used: LoginForPhone, LoginIn, LoginOut, batchPublish, cancelShixun, changPassword, createCourseFolder, createUserFolder, deleteCourseFolder, deleteQuestionBanks, deleteVideo, editCourseFolder, getCourses, getEngineerUrl, getHomepageInfo, getHomeworkBanksDetail, getNavigationInfo, getPaths, getProjects, getQuestionBanks, getReviewVideos, getShixuns, getSystemUpdate, getUserInfo, getUserLearnPath, getUserPersona, getValidateCode, getVideos, logWatchHistory, moveCourseFolder, register, resetPassword, signed, topicGetCourseList, topicSendToClass, topicsDelete, topicsSetPublic, validateName */function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return l})),n.d(t,"x",(function(){return f})),n.d(t,"q",(function(){return h})),n.d(t,"w",(function(){return b})),n.d(t,"o",(function(){return v})),n.d(t,"G",(function(){return _})),n.d(t,"m",(function(){return w})),n.d(t,"v",(function(){return O})),n.d(t,"r",(function(){return E})),n.d(t,"s",(function(){return P})),n.d(t,"B",(function(){return T})),n.d(t,"u",(function(){return I})),n.d(t,"k",(function(){return L})),n.d(t,"C",(function(){return R})),n.d(t,"t",(function(){return F})),n.d(t,"K",(function(){return z})),n.d(t,"J",(function(){return q})),n.d(t,"H",(function(){return W})),n.d(t,"I",(function(){return G})),n.d(t,"p",(function(){return Y})),n.d(t,"j",(function(){return X})),n.d(t,"d",(function(){return Z})),n.d(t,"e",(function(){return ee})),n.d(t,"n",(function(){return ne})),n.d(t,"z",(function(){return ae})),n.d(t,"y",(function(){return ie})),n.d(t,"L",(function(){return ue})),n.d(t,"A",(function(){return se})),n.d(t,"E",(function(){return le})),n.d(t,"f",(function(){return pe})),n.d(t,"F",(function(){return fe})),n.d(t,"a",(function(){return de})),n.d(t,"g",(function(){return he})),n.d(t,"i",(function(){return be})),n.d(t,"l",(function(){return ve})),n.d(t,"D",(function(){return _e})),n.d(t,"h",(function(){return we}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/utils/fetch */"ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/accounts/login.json",{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/accounts/logout.json",{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/get_user_info.json",{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/get_navigation_info.json",{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(){return y.apply(this,arguments)}function y(){return(y=Object(a.a)(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/system_update.json",{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.username,"/homepage_info.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/attendance.json",{method:"post"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return j.apply(this,arguments)}function j(){return(j=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.username,"/courses.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return k.apply(this,arguments)}function k(){return(k=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.username,"/shixuns.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return S.apply(this,arguments)}function S(){return(S=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.username,"/subjects.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.username,"/projects.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return A.apply(this,arguments)}function A(){return(A=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.username,"/videos.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e){return M.apply(this,arguments)}function M(){return(M=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.username,"/videos/review.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(e){return D.apply(this,arguments)}function D(){return(D=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.username,"/videos/").concat(t.id,".json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e){return N.apply(this,arguments)}function N(){return(N=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/watch_video_histories.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e){return U.apply(this,arguments)}function U(){return(U=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/question_banks.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(e){return V.apply(this,arguments)}function V(){return(V=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/question_banks/multi_public.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(e){return B.apply(this,arguments)}function B(){return(B=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/question_banks/multi_delete.json",{method:"delete",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function W(e){return H.apply(this,arguments)}function H(){return(H=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/question_banks/my_courses.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(e){return Q.apply(this,arguments)}function Q(){return(Q=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/question_banks/send_to_course.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(e){return K.apply(this,arguments)}function K(){return(K=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/homework_banks/".concat(t.topicId,".json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(e){return J.apply(this,arguments)}function J(){return(J=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/question_banks/multi_delete.json",{method:"delete",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(e){return $.apply(this,arguments)}function $(){return($=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/".concat(t.username,"/videos/batch_publish.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(e){return te.apply(this,arguments)}function te(){return(te=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/myshixuns/".concat(t.identifier,"/cancel.json"),{method:"delete",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(){return re.apply(this,arguments)}function re(){return(re=Object(a.a)(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/get_engineer_url.json",{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ae(){return oe.apply(this,arguments)}function oe(){return(oe=Object(a.a)(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/intelligent_recommendations/persona.json",{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ie(){return ce.apply(this,arguments)}function ce(){return(ce=Object(a.a)(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/intelligent_recommendations/user_learn_path.json",{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ue(e){return Object(c.a)("/api/accounts/valid_email_and_phone.json",{method:"get",params:e})}function se(e){return Object(c.a)("/api/accounts/get_verification_code.json",{method:"get",params:e})}function le(e){return Object(c.a)("/api/accounts/register.json",{method:"post",body:Object(r.a)({},e)})}function pe(e){return Object(c.a)("/api/users/accounts/".concat(e.login,"/password.json"),{method:"put",body:Object(r.a)({},e)})}function fe(e){return Object(c.a)("/api/accounts/reset_password.json",{method:"post",body:Object(r.a)({},e)})}function de(e){return Object(c.a)("/api/accounts/login_for_phone.json",{method:"get",params:Object(r.a)({},e)})}function he(e){return me.apply(this,arguments)}function me(){return(me=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_folders.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function be(e){return ye.apply(this,arguments)}function ye(){return(ye=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_folders/".concat(t,".json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ve(e,t){return ge.apply(this,arguments)}function ge(){return(ge=Object(a.a)(i.a.mark((function e(t,n){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_folders/".concat(t,".json"),{method:"put",body:n}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _e(e,t){return xe.apply(this,arguments)}function xe(){return(xe=Object(a.a)(i.a.mark((function e(t,n){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_folders/".concat(t,"/move_folder.json"),{method:"post",body:n}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function we(e,t){return je.apply(this,arguments)}function je(){return(je=Object(a.a)(i.a.mark((function e(t,n){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_folders/".concat(t,"/create_user_folder.json"),{method:"post",body:n}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},jbR1: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/get-set-iterator.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/is-pure */"Zcjx"),a=n(/*! ../internals/get-iterator */"qcmB");e.exports=r?a:function(e){return Set.prototype.values.call(e)}},"jdp+": +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/math-fround.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/math-sign */"u93E"),a=Math.abs,o=Math.pow,i=o(2,-52),c=o(2,-23),u=o(2,127)*(2-c),s=o(2,-126);e.exports=Math.fround||function(e){var t,n,o=a(e),l=r(e);return ou||n!=n?l*(1/0):l*n}},jhyg: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.seal.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-object */"tSXo"),o=n(/*! ../internals/internal-metadata */"a5mf").onFreeze,i=n(/*! ../internals/freezing */"R/Zn"),c=n(/*! ../internals/fails */"MVys"),u=Object.seal;r({target:"Object",stat:!0,forced:c((function(){u(1)})),sham:!i},{seal:function(e){return u&&a(e)?u(o(e)):e}})},jksQ: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.set.map.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/get-built-in */"29mP"),i=n(/*! ../internals/an-object */"f1E4"),c=n(/*! ../internals/a-function */"cT1L"),u=n(/*! ../internals/function-bind-context */"7BAe"),s=n(/*! ../internals/species-constructor */"/dTS"),l=n(/*! ../internals/get-set-iterator */"jbR1"),p=n(/*! ../internals/iterate */"IuhT");r({target:"Set",proto:!0,real:!0,forced:a},{map:function(e){var t=i(this),n=l(t),r=u(e,arguments.length>1?arguments[1]:void 0,3),a=new(s(t,o("Set"))),f=c(a.add);return p(n,(function(e){f.call(a,r(e,e,t))}),void 0,!1,!0),a}})},joe6: +/*!***********************************************************!*\ + !*** ./node_modules/react-redux/es/components/Context.js ***! + \***********************************************************/ +/*! exports provided: ReactReduxContext, default */ +/*! exports used: ReactReduxContext */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(/*! react */"q1tI"),a=n.n(r).a.createContext(null)},jrin: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! + \********************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},jtLI: +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/has.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"k/J9": +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/regexp-flags.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/an-object */"f1E4");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},k1fw: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***! + \*******************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"jrin");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t1?arguments[1]:void 0)}))},leS6: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***! + \**********************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?r:n)(e)}},m3pO: +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/microtask.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,a,o,i,c,u,s,l,p=n(/*! ../internals/global */"ukPv"),f=n(/*! ../internals/object-get-own-property-descriptor */"g8rt").f,d=n(/*! ../internals/classof-raw */"UwrT"),h=n(/*! ../internals/task */"C3pJ").set,m=n(/*! ../internals/engine-is-ios */"xRZI"),b=p.MutationObserver||p.WebKitMutationObserver,y=p.process,v=p.Promise,g="process"==d(y),_=f(p,"queueMicrotask"),x=_&&_.value;x||(r=function(){var e,t;for(g&&(e=y.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(e){throw a?i():o=void 0,e}}o=void 0,e&&e.enter()},g?i=function(){y.nextTick(r)}:b&&!m?(c=!0,u=document.createTextNode(""),new b(r).observe(u,{characterData:!0}),i=function(){u.data=c=!c}):v&&v.resolve?(s=v.resolve(void 0),l=s.then,i=function(){l.call(s,r)}):i=function(){h.call(p,r)}),e.exports=x||function(e){var t={fn:e,next:void 0};o&&(o.next=t),a||(a=t,i()),o=t}},m3rI: +/*!**************************************!*\ + !*** ./src/utils/env.ts + 1 modules ***! + \**************************************/ +/*! exports provided: GlobalConfig, default */ +/*! exports used: default */function(e,t,n){"use strict";var r,a,o,i={PROXY_SERVER:"https://local-zhuhai.educoder.net",API_SERVER:"",OFFICE_SERVER:"https://officeserver.educoder.net",REPORT_SERVER:"http://192.168.1.57:3001",IMG_SERVER:"https://local-v7.educoder.net",FORGE:"https://code.educoder.net/",SSH_SERVER:"wss://webssh.educoder.net",QQLoginCB:encodeURIComponent("https://test-newweb.educoder.net")},c={local:{API_SERVER:"http://localhost:3000",IMG_SERVER:"https://testali-cdn.educoder.net/",REPORT_SERVER:"http://192.168.1.57:3001",FORGE:"https://test-oldweb.educoder.net/",SSH_SERVER:"wss://pre-webssh.educoder.net",QQLoginCB:encodeURIComponent("https://test-newweb.educoder.net")},dev:i,newReactTest:{API_SERVER:(r="https://test-data.educoder.net",a=document.domain,o=document.domain.split("."),o[0]=o[0]+"-data","test.educoder.net"!==a&&"localhost"!==a&&"test-ilearning.educoder.net"!==a&&(r=r.replace("test-data.educoder.net",o.join("."))),r),SSH_SERVER:"wss://webssh.educoder.net",IMG_SERVER:"https://new-testali-cdn.educoder.net",REPORT_SERVER:"http://192.168.1.57:3001",FORGE:"https://test-oldweb.educoder.net/",QQLoginCB:encodeURIComponent("https://test-data.educoder.net")},preNewBuild:{API_SERVER:"https://pre-data.educoder.net",IMG_SERVER:"https://preali-cdn.educoder.net",SSH_SERVER:"wss://pre-webssh.educoder.net",REPORT_SERVER:"http://192.168.1.57:3001",FORGE:"https://forge.educoder.net/",QQLoginCB:encodeURIComponent("https://pre.educoder.net")},newBuild:{API_SERVER:function(){var e="https://data.educoder.net";return"kepukehuan.educoder.net"===document.domain&&(e="https://kepukehuan-data.educoder.net"),e}(),SSH_SERVER:"wss://webssh.educoder.net",REPORT_SERVER:"http://192.168.1.57:3001",IMG_SERVER:"https://ali-cdn.educoder.net",FORGE:"https://code.educoder.net/",QQLoginCB:encodeURIComponent("https://www.educoder.net")},newTest:{API_SERVER:"https://test-data.educoder.net",IMG_SERVER:"https://test-data.educoder.net",REPORT_SERVER:"http://192.168.1.57:3001",SSH_SERVER:"wss://pre-webssh.educoder.net",FORGE:"http://test-oldweb.educoder.net/",QQLoginCB:encodeURIComponent("https://test-data.educoder.net")},test:{API_SERVER:"",IMG_SERVER:"",REPORT_SERVER:"http://192.168.1.57:3001",FORGE:"http://test-oldweb.educoder.net/",SSH_SERVER:"wss://pre-webssh.educoder.net",QQLoginCB:encodeURIComponent("https://test-newweb.educoder.net")},preBuild:{API_SERVER:"",IMG_SERVER:"https://preali-cdn.educoder.net",REPORT_SERVER:"http://192.168.1.57:3001",FORGE:"https://forge.educoder.net/",SSH_SERVER:"wss://pre-webssh.educoder.net",QQLoginCB:encodeURIComponent("https://test-newweb.educoder.net")},newWeb:{API_SERVER:"https://test-newweb.educoder.net",IMG_SERVER:"https://test-newweb.educoder.net/",REPORT_SERVER:"http://192.168.1.57:3001",FORGE:"http://test-oldweb.educoder.net/",SSH_SERVER:"wss://pre-webssh.educoder.net",QQLoginCB:encodeURIComponent("https://test-newweb.educoder.net")},build:{API_SERVER:"",IMG_SERVER:"",PROXY_SERVER:"",OFFICE_SERVER:"https://officeserver.educoder.net",REPORT_SERVER:"http://192.168.1.57:3001",FORGE:"https://forge.educoder.net/",SSH_SERVER:"wss://pre-webssh.educoder.net",QQLoginCB:encodeURIComponent("https://www.educoder.net")}};t.a=c[window.ENV||"dev"]},m47v: +/*!**************************************!*\ + !*** ./src/service/virtualSpaces.ts ***! + \**************************************/ +/*! exports provided: getVirtualSpacesDetails, getVirtualSpacesMenus, upvideos, Addmember, change_creator */ +/*! exports used: Addmember, change_creator, getVirtualSpacesDetails, getVirtualSpacesMenus, upvideos */function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return p})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return m}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/utils/fetch */"ErOA");function c(e){return u.apply(this,arguments)}function u(){return(u=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/virtual_classrooms/".concat(null==t?void 0:t.id,".json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function s(e){return l.apply(this,arguments)}function l(){return(l=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/virtual_classrooms/".concat(null==t?void 0:t.id,"/modules.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return f.apply(this,arguments)}function f(){return(f=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/virtual_classrooms/".concat(t.id,"/videos/batch_publish.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){return h.apply(this,arguments)}function h(){return(h=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/virtual_classrooms/".concat(t.virtual_spacesId,"/members.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e){return b.apply(this,arguments)}function b(){return(b=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/virtual_classrooms/".concat(t.virtual_spacesId,"/members/").concat(t.id,"/change_creator.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},m71J: +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.code-point-at.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/string-multibyte */"eYKs").codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return a(this,e)}})},mGKP: +/*!****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! + \****************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./arrayLikeToArray */"EdiO");e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},mLN8: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.array.flat.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/flatten-into-array */"hKmx"),o=n(/*! ../internals/to-object */"cTDu"),i=n(/*! ../internals/to-length */"oa35"),c=n(/*! ../internals/to-integer */"m0kY"),u=n(/*! ../internals/array-species-create */"nMuc");r({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=o(this),n=i(t.length),r=u(t,0);return r.length=a(r,t,t,n,0,void 0===e?1:c(e)),r}})},mMun: +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.number.constructor.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/descriptors */"tny8"),a=n(/*! ../internals/global */"ukPv"),o=n(/*! ../internals/is-forced */"kkxG"),i=n(/*! ../internals/redefine */"NMFW"),c=n(/*! ../internals/has */"jtLI"),u=n(/*! ../internals/classof-raw */"UwrT"),s=n(/*! ../internals/inherit-if-required */"+vfm"),l=n(/*! ../internals/to-primitive */"gFfw"),p=n(/*! ../internals/fails */"MVys"),f=n(/*! ../internals/object-create */"u+7+"),d=n(/*! ../internals/object-get-own-property-names */"uGHk").f,h=n(/*! ../internals/object-get-own-property-descriptor */"g8rt").f,m=n(/*! ../internals/object-define-property */"YfKC").f,b=n(/*! ../internals/string-trim */"mTKU").trim,y=a.Number,v=y.prototype,g="Number"==u(f(v)),_=function(e){var t,n,r,a,o,i,c,u,s=l(e,!1);if("string"==typeof s&&s.length>2)if(43===(t=(s=b(s)).charCodeAt(0))||45===t){if(88===(n=s.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(s.charCodeAt(1)){case 66:case 98:r=2,a=49;break;case 79:case 111:r=8,a=55;break;default:return+s}for(i=(o=s.slice(2)).length,c=0;ca)return NaN;return parseInt(o,r)}return+s};if(o("Number",!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var x,w=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof w&&(g?p((function(){v.valueOf.call(n)})):"Number"!=u(n))?s(new y(_(t)),n,w):_(t)},j=r?d(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),O=0;j.length>O;O++)c(y,x=j[O])&&!c(w,x)&&m(w,x,h(y,x));w.prototype=v,v.constructor=w,i(a,"Number",w)}},mTKU: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/string-trim.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/require-object-coercible */"FCfD"),a="["+n(/*! ../internals/whitespaces */"Tfd0")+"]",o=RegExp("^"+a+a+"*"),i=RegExp(a+a+"*$"),c=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(i,"")),n}};e.exports={start:c(1),end:c(2),trim:c(3)}},maeH: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.function.name.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/descriptors */"tny8"),a=n(/*! ../internals/object-define-property */"YfKC").f,o=Function.prototype,i=o.toString,c=/^\s*function ([^ (]*)/;r&&!("name"in o)&&a(o,"name",{configurable:!0,get:function(){try{return i.call(this).match(c)[1]}catch(e){return""}}})},mcGr: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.pad-start.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/string-pad */"2FZw").start;r({target:"String",proto:!0,forced:n(/*! ../internals/string-pad-webkit-bug */"y9mK")},{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},md7G: +/*!******************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***! + \******************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(/*! ./typeof.js */"U8pU"),a=n(/*! ./assertThisInitialized.js */"JX7q");function o(e,t){if(t&&("object"===Object(r.a)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Object(a.a)(e)}},mmNF: +/*!*****************************************!*\ + !*** ./node_modules/charenc/charenc.js ***! + \*****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n=e.student_data.goal_score?a:null),i.min.push(a>=e.student_data.goal_score?null:a),u.push(t.name),s.push(t.student_id),l.push(t.clazz)})),c[t+1]={name:t+1,average_score:e.student_data.average_score,goal_score:e.student_data.goal_score,xData:n,yData:i,name_data:u,student_ids:s,class_data:l,goal_scoreData:new Array(e.student_data.detail.length).fill(e.student_data.goal_score),average_scoreData:new Array(e.student_data.detail.length).fill(e.student_data.average_score)}})),n.history.forEach((function(e){i=Object(o.a)(Object(o.a)({},i),{},{xData:[].concat(Object(a.a)(i.xData),[e.year]),seriesData:[].concat(Object(a.a)(i.seriesData),[e.total_score])})})),Object(o.a)(Object(o.a)({},e),{},{name:n.course_name||"",tabListData:n.ec_course_target,echartsData:{barData:r,lineData:i,scatterData:c}})}},subscriptions:{setup:function(e){var t=e.dispatch;return e.history.listen((function(e){"/"===e.pathname&&t({type:"query"})}))}}};t.a=p},nkhd: +/*!****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.aggregate-error.js ***! + \****************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/descriptors */"tny8"),o=n(/*! ../internals/object-get-prototype-of */"Acmb"),i=n(/*! ../internals/object-set-prototype-of */"g1ZG"),c=n(/*! ../internals/object-create */"u+7+"),u=n(/*! ../internals/object-define-property */"YfKC"),s=n(/*! ../internals/create-property-descriptor */"HhvW"),l=n(/*! ../internals/iterate */"IuhT"),p=n(/*! ../internals/create-non-enumerable-property */"lz10"),f=n(/*! ../internals/internal-state */"1aI8"),d=f.set,h=f.getterFor("AggregateError"),m=function(e,t){var n=this;if(!(n instanceof m))return new m(e,t);i&&(n=i(new Error(t),o(n)));var r=[];return l(e,r.push,r),a?d(n,{errors:r,type:"AggregateError"}):n.errors=r,void 0!==t&&p(n,"message",String(t)),n};m.prototype=c(Error.prototype,{constructor:s(5,m),message:s(5,""),name:s(5,"AggregateError")}),a&&u.f(m.prototype,"errors",{get:function(){return h(this).errors},configurable:!0}),r({global:!0},{AggregateError:m})},nlPz: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.regexp.exec.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/regexp-exec */"NcLc");r({target:"RegExp",proto:!0,forced:/./.exec!==a},{exec:a})},nmq7: +/*!**************************************!*\ + !*** ./node_modules/qs/lib/parse.js ***! + \**************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ./utils */"0jNN"),a=Object.prototype.hasOwnProperty,o=Array.isArray,i={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},s=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,c=n.depth>0&&/(\[[^[\]]*])/.exec(o),s=c?o.slice(0,c.index):o,l=[];if(s){if(!n.plainObjects&&a.call(Object.prototype,s)&&!n.allowPrototypes)return;l.push(s)}for(var p=0;n.depth>0&&null!==(c=i.exec(o))&&p=0;--o){var i,c=e[o];if("[]"===c&&n.parseArrays)i=[].concat(a);else{i=n.plainObjects?Object.create(null):{};var s="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(s,10);n.parseArrays||""!==s?!isNaN(l)&&c!==s&&String(l)===s&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(i=[])[l]=a:"__proto__"!==s&&(i[s]=a):i={0:a}}a=i}return a}(l,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?i.charset:e.charset;return{allowDots:void 0===e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var n,s={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,p=t.parameterLimit===1/0?void 0:t.parameterLimit,f=l.split(t.delimiter,p),d=-1,h=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(b=o(b)?[b]:b),a.call(s,m)?s[m]=r.combine(s[m],b):s[m]=b}return s}(e,n):e,p=n.plainObjects?Object.create(null):{},f=Object.keys(l),d=0;d1?arguments[1]:void 0,3);return!u(n,(function(e,n){if(!r(n,e,t))return u.stop()}),void 0,!0,!0).stopped}})},oZsa: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***! + \********************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},oa35: +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/to-length.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/to-integer */"m0kY"),a=Math.min;e.exports=function(e){return e>0?a(r(e),9007199254740991):0}},oat3: +/*!**********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.last-index-of.js ***! + \**********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-buffer-view-core */"FVwB"),a=n(/*! ../internals/array-last-index-of */"QQ4S"),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(e){return a.apply(o(this),arguments)}))},"p/G/": +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.join.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-buffer-view-core */"FVwB"),a=r.aTypedArray,o=r.exportTypedArrayMethod,i=[].join;o("join",(function(e){return i.apply(a(this),arguments)}))},p1ln: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.assign.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/object-assign */"qitQ");r({target:"Object",stat:!0,forced:Object.assign!==a},{assign:a})},p5yU: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/web.queue-microtask.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/global */"ukPv"),o=n(/*! ../internals/microtask */"m3pO"),i=n(/*! ../internals/classof-raw */"UwrT"),c=a.process,u="process"==i(c);r({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){var t=u&&c.domain;o(t?t.bind(e):e)}})},p6E5: +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.weak-set.delete-all.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-pure */"Zcjx"),o=n(/*! ../internals/collection-delete-all */"+X1D");r({target:"WeakSet",proto:!0,real:!0,forced:a},{deleteAll:function(){return o.apply(this,arguments)}})},pVnL: +/*!********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/extends.js ***! + \********************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t0&&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 ***! + \*************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";e.exports=n(/*! ./cjs/react.production.min.js */"viRO")},qA1w: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/collection-of.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";e.exports=function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}},qDJ8: +/*!****************************************!*\ + !*** ./node_modules/isobject/index.js ***! + \****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict"; +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},qRPo: +/*!****************************************************!*\ + !*** ./node_modules/rc-util/lib/Dom/dynamicCSS.js ***! + \****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/interopRequireDefault */"TqRt");Object.defineProperty(t,"__esModule",{value:!0}),t.injectCSS=i,t.updateCSS=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=o(n);if(!c.has(r)){var a=i("",n),u=a.parentNode;c.set(r,u),u.removeChild(a)}var s=Array.from(c.get(r).children).find((function(e){return"STYLE"===e.tagName&&e["rc-util-key"]===t}));if(s){var l,p,f;if((null===(l=n.csp)||void 0===l?void 0:l.nonce)&&s.nonce!==(null===(p=n.csp)||void 0===p?void 0:p.nonce))s.nonce=null===(f=n.csp)||void 0===f?void 0:f.nonce;return s.innerHTML!==e&&(s.innerHTML=e),s}var d=i(e,n);return d["rc-util-key"]=t,d};var a=r(n(/*! ./canUseDom */"3Mug"));function o(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,a.default)())return null;var r,i=document.createElement("style");(null===(t=n.csp)||void 0===t?void 0:t.nonce)&&(i.nonce=null===(r=n.csp)||void 0===r?void 0:r.nonce);i.innerHTML=e;var c=o(n),u=c.firstChild;return n.prepend&&c.prepend?c.prepend(i):n.prepend&&u?c.insertBefore(i,u):c.appendChild(i),i}var c=new Map},qS6X: +/*!*******************************************!*\ + !*** ./src/models/classrooms/exercise.ts ***! + \*******************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty */"jrin"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/service/exercise */"V0Rq"),u={namespace:"exercise",state:{name:"普通试卷,随机试卷详情页面",loading:!0,exerciseList:{},userExerciseList:{},statisticsList:{},exerciseCoursesList:{},brankList:{},editData:{},endGroups:{},actionTabs:{removeEventListenerExitScreen:!1},publishGroups:{},commonHeader:{},reviewExercise:{},reviewGroupExercise:{},workSetting:{},editRandomExercises:{},redoModal:{},exerciseUserInfo:{},examinationIntelligentSettings:{},exerciseExportHeadData:{},codeReviewDetail:{},exerciseIdentityPhotos:{},checkDomain:"kepukehuan.educoder.net"===window.document.domain||"test-kepukehuan.educoder.net"===window.document.domain},effects:{getUserExercise:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.I,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{userExerciseList:Object(a.a)({},(null==s?void 0:s.data)||{})}});case 7:return console.log("getUserExercise-res:",s),e.abrupt("return",null==s?void 0:s.data);case 9:case"end":return e.stop()}}),e)})),getExerciseIdentityPhotos:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.v,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{exerciseIdentityPhotos:Object(a.a)({},(null==s?void 0:s.data)||{})}});case 7:return e.abrupt("return",null==s?void 0:s.data);case 8:case"end":return e.stop()}}),e)})),getExerciseExportHeadData:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.u,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{exerciseExportHeadData:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getExerciseUserInfo:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.A,r);case 4:if(0!==(null==(s=e.sent)?void 0:s.status)){e.next=8;break}return e.next=8,u({type:"save",payload:Object(a.a)({},{exerciseUserInfo:Object(a.a)({},s.data)})});case 8:return e.abrupt("return",s);case 9:case"end":return e.stop()}}),e)})),getExaminationIntelligentSettings:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.s,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{examinationIntelligentSettings:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getRandomEditExercises:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.D,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{editRandomExercises:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getExerciseList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.w,r);case 4:if(null!=(s=e.sent)&&s.total_exercise_users)try{localStorage.total_exercise_users=JSON.stringify(s.total_exercise_users)}catch(e){}return e.next=8,u({type:"save",payload:{exerciseList:Object(a.a)({},s)}});case 8:return e.abrupt("return",s);case 9:case"end":return e.stop()}}),e)})),getExerciseStatistics:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.z,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{statisticsList:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getBrankList:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.o,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{brankList:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),saveBanks:i.a.mark((function e(t,n){var r,a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,a=n.call,n.put,e.next=4,a(c.T,r);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})),getExerciseCourses:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.t,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{exerciseCoursesList:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),addExercise:i.a.mark((function e(t,n){var r,a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,a=n.call,n.put,e.next=4,a(c.a,r);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})),editExercise:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.i,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{editData:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getTagDiscipline:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.H,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{tagDisciplineData:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),editExerciseQuestion:i.a.mark((function e(t,n){var r,a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,a=n.call,n.put,e.next=4,a(c.j,r);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})),addExerciseQuestion:i.a.mark((function e(t,n){var r,a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,a=n.call,n.put,e.next=4,a(c.b,r);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})),exeriseMoveUpDown:i.a.mark((function e(t,n){var r,a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,a=n.call,n.put,e.next=4,a(c.l,r);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})),getEndGroups:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.r,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{endGroups:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getPublishGroups:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.C,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{publishGroups:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getCommonHeader:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.q,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{commonHeader:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getReviewExercise:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.F,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{reviewExercise:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),clearData:i.a.mark((function e(t,n){var a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.payload,t.callback,n.call,o=n.put,e.next=4,o({type:"save",payload:Object(r.a)({},a.key,{})});case 4:case"end":return e.stop()}}),e)})),getReviewGroupExercise:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.G,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{reviewGroupExercise:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getWorkSetting:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.J,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{workSetting:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getRedoModal:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.E,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{redoModal:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),getCodeReviewDetail:i.a.mark((function e(t,n){var r,o,u,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,o=n.call,u=n.put,e.next=4,o(c.p,r);case 4:return s=e.sent,e.next=7,u({type:"save",payload:{codeReviewDetail:Object(a.a)({},s)}});case 7:return e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})),changeScore:i.a.mark((function e(t,n){var r,a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,t.callback,a=n.call,n.put,e.next=4,a(c.e,r);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})),setActionTabs:i.a.mark((function e(t,n){var r,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,n.call,o=n.put,e.next=4,o({type:"save",payload:{actionTabs:Object(a.a)({},r)}});case 4:case"end":return e.stop()}}),e)}))},reducers:{save:function(e,t){return Object(a.a)(Object(a.a)({},e),t.payload)}},subscriptions:{setup:function(e){e.dispatch,e.history}}};t.a=u},qT12: +/*!**************************************************************!*\ + !*** ./node_modules/react-is/cjs/react-is.production.min.js ***! + \**************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict"; +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r="function"==typeof Symbol&&Symbol.for,a=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,c=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,b=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case p:case f:case i:case u:case c:case h:return e;default:switch(e=e&&e.$$typeof){case l:case d:case y:case b:case s:return e;default:return t}}case o:return t}}}function j(e){return w(e)===f}t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=l,t.ContextProvider=s,t.Element=a,t.ForwardRef=d,t.Fragment=i,t.Lazy=y,t.Memo=b,t.Portal=o,t.Profiler=u,t.StrictMode=c,t.Suspense=h,t.isAsyncMode=function(e){return j(e)||w(e)===p},t.isConcurrentMode=j,t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return w(e)===d},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===y},t.isMemo=function(e){return w(e)===b},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===u},t.isStrictMode=function(e){return w(e)===c},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===u||e===c||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===b||e.$$typeof===s||e.$$typeof===l||e.$$typeof===d||e.$$typeof===g||e.$$typeof===_||e.$$typeof===x||e.$$typeof===v)},t.typeOf=w},qcmB: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/get-iterator.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/an-object */"f1E4"),a=n(/*! ../internals/get-iterator-method */"9SZg");e.exports=function(e){var t=a(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},qdXH: +/*!******************************!*\ + !*** ./src/service/video.ts ***! + \******************************/ +/*! exports provided: getVideoStatisticsList, getVideoStatistics, getOneVideoStatisticsList, getStudentVideoStatisticsList, getVideoDetail, addVideoItems, getVideoEditData, getVideoEditDatas, starVideo, updateVideo, videoSendToCourse, getVideoMyCourses, viewVideo, addSchool, getVideoPeopleStatics, getVideoDurationStatics, getStageData */ +/*! exports used: addSchool, getOneVideoStatisticsList, getStageData, getStudentVideoStatisticsList, getVideoDetail, getVideoDurationStatics, getVideoEditDatas, getVideoMyCourses, getVideoPeopleStatics, getVideoStatistics, getVideoStatisticsList, starVideo, videoSendToCourse, viewVideo */function(e,t,n){"use strict";n.d(t,"k",(function(){return u})),n.d(t,"j",(function(){return l})),n.d(t,"b",(function(){return f})),n.d(t,"d",(function(){return h})),n.d(t,"e",(function(){return b})),n.d(t,"g",(function(){return v})),n.d(t,"l",(function(){return _})),n.d(t,"m",(function(){return w})),n.d(t,"h",(function(){return O})),n.d(t,"n",(function(){return E})),n.d(t,"a",(function(){return P})),n.d(t,"i",(function(){return T})),n.d(t,"f",(function(){return I})),n.d(t,"c",(function(){return L}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/utils/fetch */"ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/watch_video_histories.json"),{method:"Get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/watch_statics.json"),{method:"Get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/course_videos/".concat(t.videoId,"/watch_histories.json"),{method:"Get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/own_watch_histories.json"),{method:"Get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/video_items/".concat(t.id,".json"),{method:"Get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stage_shixuns/".concat(t.id,"/edit.json"),{method:"Get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/video_items/".concat(t.id,"/star.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return j.apply(this,arguments)}function j(){return(j=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/video_items/".concat(t.id,"/send_to_course.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return k.apply(this,arguments)}function k(){return(k=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/users/my_courses.json",{method:"Get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return S.apply(this,arguments)}function S(){return(S=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/video_items/".concat(t.id,"/view_video.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/video_items/".concat(t.id,"/add_school.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return A.apply(this,arguments)}function A(){return(A=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.course_id,"/video_people_statics.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e){return M.apply(this,arguments)}function M(){return(M=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.course_id,"/video_duration_statics.json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(e){return D.apply(this,arguments)}function D(){return(D=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/stages.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},qhky: +/*!************************************************!*\ + !*** ./node_modules/react-helmet/es/Helmet.js ***! + \************************************************/ +/*! exports provided: default, Helmet */ +/*! ModuleConcatenation bailout: Module uses injected variables (global) */function(e,t,n){"use strict";(function(e){var t,r,a,o,i=n(/*! prop-types */"17x9"),c=n.n(i),u=n(/*! react-side-effect */"8+s/"),s=n.n(u),l=n(/*! react-fast-compare */"bmMU"),p=n.n(l),f=n(/*! react */"q1tI"),d=n.n(f),h=n(/*! object-assign */"MgzW"),m=n.n(h),b="bodyAttributes",y="htmlAttributes",v="titleAttributes",g={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},_=(Object.keys(g).map((function(e){return g[e]})),"charset"),x="cssText",w="href",j="http-equiv",O="innerHTML",k="itemprop",E="name",S="property",P="rel",C="src",T="target",A={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},I="defaultTitle",M="defer",L="encodeSpecialCharacters",D="onChangeClientState",R="titleTemplate",N=Object.keys(A).reduce((function(e,t){return e[A[t]]=t,e}),{}),F=[g.NOSCRIPT,g.SCRIPT,g.STYLE],U="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},z=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},V=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},W=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},H=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},G=function(e){var t=J(e,g.TITLE),n=J(e,R);if(n&&t)return n.replace(/%s/g,(function(){return Array.isArray(t)?t.join(""):t}));var r=J(e,I);return t||r||void 0},Q=function(e){return J(e,D)||function(){}},Y=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return q({},e,t)}),{})},K=function(e,t){return t.filter((function(e){return void 0!==e[g.BASE]})).map((function(e){return e[g.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},Z=(t=Date.now(),function(e){var n=Date.now();n-t>16?(t=n,e(n)):setTimeout((function(){Z(e)}),0)}),$=function(e){return clearTimeout(e)},ee="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Z:e.requestAnimationFrame||Z,te="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||$:e.cancelAnimationFrame||$,ne=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},re=null,ae=function(e,t){var n=e.baseTag,r=e.bodyAttributes,a=e.htmlAttributes,o=e.linkTags,i=e.metaTags,c=e.noscriptTags,u=e.onChangeClientState,s=e.scriptTags,l=e.styleTags,p=e.title,f=e.titleAttributes;ce(g.BODY,r),ce(g.HTML,a),ie(p,f);var d={baseTag:ue(g.BASE,n),linkTags:ue(g.LINK,o),metaTags:ue(g.META,i),noscriptTags:ue(g.NOSCRIPT,c),scriptTags:ue(g.SCRIPT,s),styleTags:ue(g.STYLE,l)},h={},m={};Object.keys(d).forEach((function(e){var t=d[e],n=t.newTags,r=t.oldTags;n.length&&(h[e]=n),r.length&&(m[e]=d[e].oldTags)})),t&&t(),u(e,h,m)},oe=function(e){return Array.isArray(e)?e.join(""):e},ie=function(e,t){void 0!==e&&document.title!==e&&(document.title=oe(e)),ce(g.TITLE,t)},ce=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-react-helmet"),a=r?r.split(","):[],o=[].concat(a),i=Object.keys(t),c=0;c=0;p--)n.removeAttribute(o[p]);a.length===o.length?n.removeAttribute("data-react-helmet"):n.getAttribute("data-react-helmet")!==i.join(",")&&n.setAttribute("data-react-helmet",i.join(","))}},ue=function(e,t){var n=document.head||document.querySelector(g.HEAD),r=n.querySelectorAll(e+"[data-react-helmet]"),a=Array.prototype.slice.call(r),o=[],i=void 0;return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===O)n.innerHTML=t.innerHTML;else if(r===x)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var c=void 0===t[r]?"":t[r];n.setAttribute(r,c)}n.setAttribute("data-react-helmet","true"),a.some((function(e,t){return i=t,n.isEqualNode(e)}))?a.splice(i,1):o.push(n)})),a.forEach((function(e){return e.parentNode.removeChild(e)})),o.forEach((function(e){return n.appendChild(e)})),{oldTags:a,newTags:o}},se=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},le=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[A[n]||n]=e[n],t}),t)},pe=function(e,t,n){switch(e){case g.TITLE:return{toComponent:function(){return e=t.title,n=t.titleAttributes,(r={key:e})["data-react-helmet"]=!0,a=le(n,r),[d.a.createElement(g.TITLE,a,e)];var e,n,r,a},toString:function(){return function(e,t,n,r){var a=se(n),o=oe(t);return a?"<"+e+' data-react-helmet="true" '+a+">"+H(o,r)+"":"<"+e+' data-react-helmet="true">'+H(o,r)+""}(e,t.title,t.titleAttributes,n)}};case b:case y:return{toComponent:function(){return le(t)},toString:function(){return se(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r,a=((r={key:n})["data-react-helmet"]=!0,r);return Object.keys(t).forEach((function(e){var n=A[e]||e;if(n===O||n===x){var r=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:r}}else a[n]=t[e]})),d.a.createElement(e,a)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var a=Object.keys(r).filter((function(e){return!(e===O||e===x)})).reduce((function(e,t){var a=void 0===r[t]?t:t+'="'+H(r[t],n)+'"';return e?e+" "+a:a}),""),o=r.innerHTML||r.cssText||"",i=-1===F.indexOf(e);return t+"<"+e+' data-react-helmet="true" '+a+(i?"/>":">"+o+"")}),"")}(e,t,n)}}}},fe=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,o=e.linkTags,i=e.metaTags,c=e.noscriptTags,u=e.scriptTags,s=e.styleTags,l=e.title,p=void 0===l?"":l,f=e.titleAttributes;return{base:pe(g.BASE,t,r),bodyAttributes:pe(b,n,r),htmlAttributes:pe(y,a,r),link:pe(g.LINK,o,r),meta:pe(g.META,i,r),noscript:pe(g.NOSCRIPT,c,r),script:pe(g.SCRIPT,u,r),style:pe(g.STYLE,s,r),title:pe(g.TITLE,{title:p,titleAttributes:f},r)}},de=s()((function(e){return{baseTag:K([w,T],e),bodyAttributes:Y(b,e),defer:J(e,M),encode:J(e,L),htmlAttributes:Y(y,e),linkTags:X(g.LINK,[P,w],e),metaTags:X(g.META,[E,_,j,S,k],e),noscriptTags:X(g.NOSCRIPT,[O],e),onChangeClientState:Q(e),scriptTags:X(g.SCRIPT,[C,O],e),styleTags:X(g.STYLE,[x],e),title:G(e),titleAttributes:Y(v,e)}}),(function(e){re&&te(re),e.defer?re=ee((function(){ae(e,(function(){re=null}))})):(ae(e),re=null)}),fe)((function(){return null})),he=(r=de,o=a=function(e){function t(){return z(this,t),W(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return!p()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case g.SCRIPT:case g.NOSCRIPT:return{innerHTML:t};case g.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,a=e.newChildProps,o=e.nestedChildren;return q({},r,((t={})[n.type]=[].concat(r[n.type]||[],[q({},a,this.mapNestedChildrenToProps(n,o))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,a=e.newProps,o=e.newChildProps,i=e.nestedChildren;switch(r.type){case g.TITLE:return q({},a,((t={})[r.type]=i,t.titleAttributes=q({},o),t));case g.BODY:return q({},a,{bodyAttributes:q({},o)});case g.HTML:return q({},a,{htmlAttributes:q({},o)})}return q({},a,((n={})[r.type]=q({},o),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=q({},t);return Object.keys(e).forEach((function(t){var r;n=q({},n,((r={})[t]=e[t],r))})),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return d.a.Children.forEach(e,(function(e){if(e&&e.props){var a=e.props,o=a.children,i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[N[n]||n]=e[n],t}),t)}(B(a,["children"]));switch(n.warnOnInvalidChildren(e,o),e.type){case g.LINK:case g.META:case g.NOSCRIPT:case g.SCRIPT:case g.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:i,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:i,nestedChildren:o})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=B(e,["children"]),a=q({},n);return t&&(a=this.mapChildrenToProps(t,a)),d.a.createElement(r,a)},V(t,null,[{key:"canUseDOM",set:function(e){r.canUseDOM=e}}]),t}(d.a.Component),a.propTypes={base:c.a.object,bodyAttributes:c.a.object,children:c.a.oneOfType([c.a.arrayOf(c.a.node),c.a.node]),defaultTitle:c.a.string,defer:c.a.bool,encodeSpecialCharacters:c.a.bool,htmlAttributes:c.a.object,link:c.a.arrayOf(c.a.object),meta:c.a.arrayOf(c.a.object),noscript:c.a.arrayOf(c.a.object),onChangeClientState:c.a.func,script:c.a.arrayOf(c.a.object),style:c.a.arrayOf(c.a.object),title:c.a.string,titleAttributes:c.a.object,titleTemplate:c.a.string},a.defaultProps={defer:!0,encodeSpecialCharacters:!0},a.peek=r.peek,a.rewind=function(){var e=r.rewind();return e||(e=fe({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},o);he.renderStatic=he.rewind}).call(this,n(/*! ./../../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},qitQ: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/object-assign.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/descriptors */"tny8"),a=n(/*! ../internals/fails */"MVys"),o=n(/*! ../internals/object-keys */"P0e2"),i=n(/*! ../internals/object-get-own-property-symbols */"kyO0"),c=n(/*! ../internals/object-property-is-enumerable */"e3V2"),u=n(/*! ../internals/to-object */"cTDu"),s=n(/*! ../internals/indexed-object */"EzR6"),l=Object.assign,p=Object.defineProperty;e.exports=!l||a((function(){if(r&&1!==l({b:1},l(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||"abcdefghijklmnopqrst"!=o(l({},t)).join("")}))?function(e,t){for(var n=u(e),a=arguments.length,l=1,p=i.f,f=c.f;a>l;)for(var d,h=s(arguments[l++]),m=p?o(h).concat(p(h)):o(h),b=m.length,y=0;b>y;)d=m[y++],r&&!f.call(h,d)||(n[d]=h[d]);return n}:l},qkSU: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.promise.try.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/new-promise-capability */"LUyE"),o=n(/*! ../internals/perform */"WJ3H");r({target:"Promise",stat:!0},{try:function(e){var t=a.f(this),n=o(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}})},qlaj: +/*!*****************************************************!*\ + !*** ./node_modules/hash.js/lib/hash/sha/common.js ***! + \*****************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../utils */"w8CP").rotr32;function a(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function i(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?a(t,n,r):1===e||3===e?i(t,n,r):2===e?o(t,n,r):void 0},t.ch32=a,t.maj32=o,t.p32=i,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},qtVS: +/*!********************************!*\ + !*** ./src/service/teacher.ts ***! + \********************************/ +/*! exports provided: getList, getApplyList, getGraduationGroupList, getAllCourseGroups, setAllCourseGroups, joinGraduationGroup, createGraduationGroup, deleteCourseTeacher, deleteCourseStudents, changeMemberRole, changeCourseAdmin, teacherApplicationReview, getStudentsList */ +/*! exports used: changeCourseAdmin, changeMemberRole, createGraduationGroup, deleteCourseStudents, deleteCourseTeacher, getAllCourseGroups, getApplyList, getGraduationGroupList, getList, getStudentsList, joinGraduationGroup, setAllCourseGroups, teacherApplicationReview */function(e,t,n){"use strict";n.d(t,"i",(function(){return u})),n.d(t,"g",(function(){return l})),n.d(t,"h",(function(){return f})),n.d(t,"f",(function(){return h})),n.d(t,"l",(function(){return b})),n.d(t,"k",(function(){return v})),n.d(t,"c",(function(){return _})),n.d(t,"e",(function(){return w})),n.d(t,"d",(function(){return O})),n.d(t,"b",(function(){return E})),n.d(t,"a",(function(){return P})),n.d(t,"m",(function(){return T})),n.d(t,"j",(function(){return I}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/utils/fetch */"ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/teachers.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/apply_teachers.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/graduation_group_list.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/all_course_groups.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return y.apply(this,arguments)}function y(){return(y=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/set_course_group.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/join_graduation_group.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/create_graduation_group.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return j.apply(this,arguments)}function j(){return(j=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/delete_course_teacher.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return k.apply(this,arguments)}function k(){return(k=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/delete_from_course.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return S.apply(this,arguments)}function S(){return(S=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/change_member_role.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/change_course_admin.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return A.apply(this,arguments)}function A(){return(A=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/teacher_application_review.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e){return M.apply(this,arguments)}function M(){return(M=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/students.json"),{method:"get",params:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},quHW: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.reflect.apply.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/get-built-in */"29mP"),o=n(/*! ../internals/a-function */"cT1L"),i=n(/*! ../internals/an-object */"f1E4"),c=n(/*! ../internals/fails */"MVys"),u=a("Reflect","apply"),s=Function.apply;r({target:"Reflect",stat:!0,forced:!c((function(){u((function(){}))}))},{apply:function(e,t,n){return o(e),i(n),u?u(e,t,n):s.call(e,t,n)}})},qx4F: +/*!*****************************************************!*\ + !*** ./node_modules/rc-util/es/getScrollBarSize.js ***! + \*****************************************************/ +/*! exports provided: default, getTargetScrollBarSize */ +/*! exports used: default */function(e,t,n){"use strict";var r;function a(e){if("undefined"==typeof document)return 0;if(e||void 0===r){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),a=n.style;a.position="absolute",a.top="0",a.left="0",a.pointerEvents="none",a.visibility="hidden",a.width="200px",a.height="150px",a.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var o=t.offsetWidth;n.style.overflow="scroll";var i=t.offsetWidth;o===i&&(i=n.clientWidth),document.body.removeChild(n),r=o-i}return r}n.d(t,"a",(function(){return a}))},rE4C: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.is-frozen.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/fails */"MVys"),o=n(/*! ../internals/is-object */"tSXo"),i=Object.isFrozen;r({target:"Object",stat:!0,forced:a((function(){i(1)}))},{isFrozen:function(e){return!o(e)||!!i&&i(e)}})},rS2G: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.number.is-finite.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/export */"MMxC")({target:"Number",stat:!0},{isFinite:n(/*! ../internals/number-is-finite */"8Cw2")})},rUU2: +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.replace.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/fix-regexp-well-known-symbol-logic */"ENif"),a=n(/*! ../internals/an-object */"f1E4"),o=n(/*! ../internals/to-object */"cTDu"),i=n(/*! ../internals/to-length */"oa35"),c=n(/*! ../internals/to-integer */"m0kY"),u=n(/*! ../internals/require-object-coercible */"FCfD"),s=n(/*! ../internals/advance-string-index */"xH5X"),l=n(/*! ../internals/regexp-exec-abstract */"dagG"),p=Math.max,f=Math.min,d=Math.floor,h=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n,r){var b=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,y=r.REPLACE_KEEPS_$0,v=b?"$":"$0";return[function(n,r){var a=u(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,a,r):t.call(String(a),n,r)},function(e,r){if(!b&&y||"string"==typeof r&&-1===r.indexOf(v)){var o=n(t,e,this,r);if(o.done)return o.value}var u=a(e),d=String(this),h="function"==typeof r;h||(r=String(r));var m=u.global;if(m){var _=u.unicode;u.lastIndex=0}for(var x=[];;){var w=l(u,d);if(null===w)break;if(x.push(w),!m)break;""===String(w[0])&&(u.lastIndex=s(d,i(u.lastIndex),_))}for(var j,O="",k=0,E=0;E=k&&(O+=d.slice(k,P)+M,k=P+S.length)}return O+d.slice(k)}];function g(e,n,r,a,i,c){var u=r+e.length,s=a.length,l=m;return void 0!==i&&(i=o(i),l=h),t.call(c,l,(function(t,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":c=i[o.slice(1,-1)];break;default:var l=+o;if(0===l)return t;if(l>s){var p=d(l/10);return 0===p?t:p<=s?void 0===a[p-1]?o.charAt(1):a[p-1]+o.charAt(1):t}c=a[l-1]}return void 0===c?"":c}))}}))},rVgK: +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.string.at.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/string-multibyte */"eYKs").charAt;r({target:"String",proto:!0},{at:function(e){return a(this,e)}})},rYFv: +/*!**********************************************!*\ + !*** ./src/models/engineering/navigation.ts ***! + \**********************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r,a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty */"CiB2"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty */"jrin"),c=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),u=n.n(c),s=n(/*! @/service/engineering */"rbmi"),l=n(/*! ./evaluateList */"7KHo"),p=n(/*! @/pages/Engineering/util */"g+eg"),f={namespace:"engineeringNavigtion",state:{actionTabs:{key:"",params:{}},headerData:{title:"认证导航",dataSource:(r={},Object(i.a)(r,l.b[0],{width:235,placeholder:"请选择".concat(l.b[0]),loading:"engineeringNavigtion/getMajorList",dataList:[]}),Object(i.a)(r,l.b[1],{width:138,placeholder:"请选择".concat(l.b[1]),loading:"engineeringNavigtion/getYearList",dataList:[]}),r),active:{},name:"",tabBarContent:{user_name:"",user_school:"",user_type:""}},cardListData:{appraiseData:{norm:{title:"指标评价",result:"-",tabBarContent:[{icon:"icon-biyezhibiao",label:"毕业指标",value:"/engineering/graduationindex"},{icon:"icon-biyejuzhen",label:"毕业矩阵",value:"/engineering/graduatedMatrix"}],listData:[{key:"graduation_count",icon:"icon-biyeyaoqiu1",backgroundColor:"#F2EBFB",textColor:"#713BDB",label:"毕业要求",value:"-",unit:"项"},{key:"graduation_subitem_count",icon:"icon-zhibiaodian",backgroundColor:"#FEF3EF",textColor:"#FF8B58",label:"指标点",value:"-",unit:"项"},{key:"graduation_achieve_count",icon:"icon-dacheng",backgroundColor:"#D7F5E6",textColor:"#07C160",label:"已达成毕业要求",value:"-",unit:"项"},{key:"graduation_not_achieve_count",icon:"icon-weidacheng",backgroundColor:"#F5F5F5",textColor:"#7C8184",label:"未达成毕业要求",value:"-",unit:"项"}]},course:{title:"课程评价",result:"-",tabBarContent:[{icon:"icon-kechengliebiao",label:"课程列表",value:"/engineering/courseList"},{icon:"icon-kechengjuzhen",label:"课程矩阵",value:"/engineering/courseMatrix"}],listData:[{key:"course_count",icon:"icon-kechengshuliang",backgroundColor:"#E2F5FF",textColor:"#007AFF",label:"课程数量",value:"-",unit:"门"},{key:"course_target_count",icon:"icon-mubiao",backgroundColor:"#FEF8EF",textColor:"#FEB315",label:"课程目标",value:"-",unit:"项"},{key:"course_achieve_count",icon:"icon-dacheng",backgroundColor:"#D7F5E6",textColor:"#07C160",label:"已达成课程数量",value:"-",unit:"门"},{key:"course_not_achieve_count",icon:"icon-weidacheng",backgroundColor:"#F5F5F5",textColor:"#7C8184",label:"未达成课程数量",value:"-",unit:"门"}]}},teamData:{teach:{title:"授课团队",tabBarContent:"0人",listData:[]},work:{title:"工作团队",tabBarContent:"0人",listData:[]}}},totalListData:[{key:"student_count",title:"当前学生总数",value:0,icon:"icon-xuesheng1",backgroundColor:"rgba(201,236,255,0.51)",textColor:"#007AFF"},{key:"student_in_count",title:"转入学生总数",value:0,icon:"icon-zhuanru",backgroundColor:"rgba(119,241,174,0.4)",textColor:"#1FA363"},{key:"student_out_count",title:"转出学生总数",value:0,icon:"icon-zhuanchu",backgroundColor:"rgba(255,197,147,0.44)",textColor:"#FA6400"}]},effects:{setActionTabs:u.a.mark((function e(t,n){var r,a;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,n.call,a=n.put,e.next=4,a({type:"save",payload:{actionTabs:Object(o.a)({},r)}});case 4:case"end":return e.stop()}}),e)})),getMajorList:u.a.mark((function e(t,n){var r,o,i,c,f,d,h;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Object(a.a)(t),r=n.call,o=n.put,i=n.select,e.next=4,i((function(e){return e.user}));case 4:if(c=e.sent,null==(f=c.userInfo)||!f.school_id){e.next=14;break}return e.next=9,r(s.i,f.school_id);case 9:if(!(d=e.sent)||!d.data){e.next=14;break}return h=p.a.getItem(null==f?void 0:f.login),e.next=14,o({type:"setMajorOrYearDataSource",payload:{key:l.b[0],value:d.data.map((function(e){return{label:e.name,value:e.ec_major_school_id}})),active:d.data.length>0?h[0]||d.data[0].ec_major_school_id:void 0}});case 14:case"end":return e.stop()}}),e)})),getYearList:u.a.mark((function e(t,n){var r,a,o,i,c,f,d,h;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=n.call,o=n.put,i=n.select,e.next=4,a(s.k,r.id);case 4:return c=e.sent,e.next=7,i((function(e){return e.user}));case 7:if(f=e.sent,d=f.userInfo,!c||!c.data){e.next=13;break}return h=p.a.getItem(null==d?void 0:d.login),e.next=13,o({type:"setMajorOrYearDataSource",payload:{key:l.b[1],value:c.data.map((function(e){return{label:e.year,value:e.ec_year_id}})),active:c.data.length>0?r.firstEnter?h[1]:c.data[0].ec_year_id:void 0}});case 13:case"end":return e.stop()}}),e)})),getTopPage:u.a.mark((function e(t,n){var r,o,i,c,f,d,h,m,b,y;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Object(a.a)(t),r=n.call,o=n.put,i=n.select,e.next=4,i((function(e){return e.engineeringNavigtion}));case 4:return c=e.sent,f=c.headerData,e.next=8,i((function(e){return e.user}));case 8:if(d=e.sent,h=d.userInfo,m={},!f.active[l.b[1]]||!h.school_id){e.next=20;break}return b=[f.active[l.b[0]],f.active[l.b[1]]],p.a.setItem(null==h?void 0:h.login,b),e.next=16,r(s.j,{ec_year_id:f.active[l.b[1]],school_id:h.school_id});case 16:return(y=e.sent)&&y.data&&(m=y.data),e.next=20,o({type:"setTopPage",payload:m});case 20:case"end":return e.stop()}}),e)})),putTopPageName:u.a.mark((function e(t,n){var r,a,o,i,c;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.payload,a=t.callback,o=n.call,n.put,e.prev=2,e.next=5,o(s.r,r);case 5:i=e.sent,a(i),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(2),c="",e.t0&&(c=JSON.stringify(e.t0),e.t0.message&&(c=e.t0.message)),a({message:c,status:999});case 14:case"end":return e.stop()}}),e,null,[[2,9]])}))},reducers:{save:function(e,t){return Object(o.a)(Object(o.a)({},e),t.payload)},setMajorOrYearDataSource:function(e,t){var n=t.payload,r=e.headerData.active;return n.active&&(r=Object(o.a)(Object(o.a)({},r),{},Object(i.a)({},n.key,n.active))),Object(o.a)(Object(o.a)({},e),{},{headerData:Object(o.a)(Object(o.a)({},e.headerData),{},{dataSource:Object(o.a)(Object(o.a)({},e.headerData.dataSource),{},Object(i.a)({},n.key,Object(o.a)(Object(o.a)({},e.headerData.dataSource[n.key]),{},{dataList:n.value}))),active:r})})},setMajorOrYearActive:function(e,t){var n=t.payload;return Object(o.a)(Object(o.a)({},e),{},{headerData:Object(o.a)(Object(o.a)({},e.headerData),{},{active:Object(o.a)(Object(o.a)({},e.headerData.active),{},Object(i.a)({},n.key,n.value))})})},setTopPage:function(e,t){var n=t.payload;return Object(o.a)(Object(o.a)({},e),{},{headerData:Object(o.a)(Object(o.a)({},e.headerData),{},{name:n.name,tabBarContent:{user_name:n.user_name,user_school:n.user_school,user_type:n.user_type}}),cardListData:Object(o.a)(Object(o.a)({},e.cardListData),{},{appraiseData:Object(o.a)(Object(o.a)({},e.cardListData.appraiseData),{},{norm:Object(o.a)(Object(o.a)({},e.cardListData.appraiseData.norm),{},{result:n.graduaiton_result,listData:e.cardListData.appraiseData.norm.listData.map((function(e){return Object(o.a)(Object(o.a)({},e),{},{value:n[e.key]||0})}))}),course:Object(o.a)(Object(o.a)({},e.cardListData.appraiseData.course),{},{result:n.course_result,listData:e.cardListData.appraiseData.course.listData.map((function(e){return Object(o.a)(Object(o.a)({},e),{},{value:n[e.key]||0})}))})}),teamData:{teach:Object(o.a)(Object(o.a)({},e.cardListData.teamData.teach),{},{tabBarContent:"".concat(n.course_teachers?n.course_teachers.length:0,"人"),listData:n.course_teachers||[]}),work:Object(o.a)(Object(o.a)({},e.cardListData.teamData.work),{},{tabBarContent:"".concat(n.work_teachers?n.work_teachers.length:0,"人"),listData:n.work_teachers||[]})}}),totalListData:e.totalListData.map((function(e){return Object(o.a)(Object(o.a)({},e),{},{value:n[e.key]||0})}))})}},subscriptions:{setup:function(e){var t=e.dispatch;return e.history.listen((function(e){"/"===e.pathname&&t({type:"query"})}))}}};t.a=f},rbmi: +/*!******************************************************!*\ + !*** ./src/service/engineering/index.ts + 1 modules ***! + \******************************************************/ +/*! exports provided: getCourseResultsService, exportCourseService, getCourseResultDetailClass, getCourseResultDetailService, postComputeAllService, postComputeCourseSingleService, exportGraduationService, postComputeAllGraduationService, postComputeGraduationSingleService, getGraduationResultsService, getFormulasService, putFormulasService, getGraduationResultDetailService, putGoalValueService, getMajorListService, getYearListService, getTopPageService, putTopPageService */ +/*! 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/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: +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},"rhT+": +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/iterableToArray.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},rjJZ: +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/not-a-regexp.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/is-regexp */"YON3");e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},rn5R: +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/number-parse-float.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/global */"ukPv"),a=n(/*! ../internals/string-trim */"mTKU").trim,o=n(/*! ../internals/whitespaces */"Tfd0"),i=r.parseFloat,c=1/i(o+"-0")!=-1/0;e.exports=c?function(e){var t=a(String(e)),n=i(t);return 0===n&&"-"==t.charAt(0)?-0:n}:i},rpUR: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.ends-with.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r,a=n(/*! ../internals/export */"MMxC"),o=n(/*! ../internals/object-get-own-property-descriptor */"g8rt").f,i=n(/*! ../internals/to-length */"oa35"),c=n(/*! ../internals/not-a-regexp */"rjJZ"),u=n(/*! ../internals/require-object-coercible */"FCfD"),s=n(/*! ../internals/correct-is-regexp-logic */"C7V6"),l=n(/*! ../internals/is-pure */"Zcjx"),p="".endsWith,f=Math.min,d=s("endsWith");a({target:"String",proto:!0,forced:!!(l||d||(r=o(String.prototype,"endsWith"),!r||r.writable))&&!d},{endsWith:function(e){var t=String(u(this));c(e);var n=arguments.length>1?arguments[1]:void 0,r=i(t.length),a=void 0===n?r:f(i(n),r),o=String(e);return p?p.call(t,o,a):t.slice(a-o.length,a)===o}})},rtIu: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.set.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-buffer-view-core */"FVwB"),a=n(/*! ../internals/to-length */"oa35"),o=n(/*! ../internals/to-offset */"nCqj"),i=n(/*! ../internals/to-object */"cTDu"),c=n(/*! ../internals/fails */"MVys"),u=r.aTypedArray;(0,r.exportTypedArrayMethod)("set",(function(e){u(this);var t=o(arguments.length>1?arguments[1]:void 0,1),n=this.length,r=i(e),c=a(r.length),s=0;if(c+t>n)throw RangeError("Wrong length");for(;s=51&&/native code/.test(U))return!1;var e=U.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[L]=t,!(e.then((function(){}))instanceof t)})),K=Y||!w((function(e){U.all(e).catch((function(){}))})),X=function(e){var t;return!(!b(e)||"function"!=typeof(t=e.then))&&t},J=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;k((function(){for(var a=t.value,o=1==t.state,i=0;r.length>i;){var c,u,s,l=r[i++],p=o?l.ok:l.fail,f=l.resolve,d=l.reject,h=l.domain;try{p?(o||(2===t.rejection&&te(e,t),t.rejection=1),!0===p?c=a:(h&&h.enter(),c=p(a),h&&(h.exit(),s=!0)),c===l.promise?d(z("Promise-chain cycle")):(u=X(c))?u.call(c,f,d):f(c)):d(a)}catch(e){h&&!s&&h.exit(),d(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&$(e,t)}))}},Z=function(e,t,n){var r,a;Q?((r=V.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),s.dispatchEvent(r)):r={promise:t,reason:n},(a=s["on"+e])?a(r):"unhandledrejection"===e&&S("Unhandled promise rejection",n)},$=function(e,t){O.call(s,(function(){var n,r=t.value;if(ee(t)&&(n=C((function(){G?q.emit("unhandledRejection",r,e):Z("unhandledrejection",e,r)})),t.rejection=G||ee(t)?2:1,n.error))throw n.value}))},ee=function(e){return 1!==e.rejection&&!e.parent},te=function(e,t){O.call(s,(function(){G?q.emit("rejectionHandled",e):Z("rejectionhandled",e,t.value)}))},ne=function(e,t,n,r){return function(a){e(t,n,a,r)}},re=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,J(e,t,!0))},ae=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw z("Promise can't be resolved itself");var a=X(n);a?k((function(){var r={done:!1};try{a.call(n,ne(ae,e,r,t),ne(re,e,r,t))}catch(n){re(e,r,n,t)}})):(t.value=n,t.state=1,J(e,t,!1))}catch(n){re(e,{done:!1},n,t)}}};Y&&(U=function(e){v(this,U,D),y(e),r.call(this);var t=R(this);try{e(ne(ae,this,t),ne(re,this,t))}catch(e){re(this,t,e)}},(r=function(e){N(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(U.prototype,{then:function(e,t){var n=F(this),r=W(j(this,U));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=G?q.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&J(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new r,t=R(e);this.promise=e,this.resolve=ne(ae,e,t),this.reject=ne(re,e,t)},P.f=W=function(e){return e===U||e===o?new a(e):H(e)},u||"function"!=typeof p||(i=p.prototype.then,f(p.prototype,"then",(function(e,t){var n=this;return new U((function(e,t){i.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof B&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return E(U,B.apply(s,arguments))}}))),c({global:!0,wrap:!0,forced:Y},{Promise:U}),h(U,D,!1,!0),m(D),o=l(D),c({target:D,stat:!0,forced:Y},{reject:function(e){var t=W(this);return t.reject.call(void 0,e),t.promise}}),c({target:D,stat:!0,forced:u||Y},{resolve:function(e){return E(u&&this===o?U:this,e)}}),c({target:D,stat:!0,forced:K},{all:function(e){var t=this,n=W(t),r=n.resolve,a=n.reject,o=C((function(){var n=y(t.resolve),o=[],i=0,c=1;x(e,(function(e){var u=i++,s=!1;o.push(void 0),c++,n.call(t,e).then((function(e){s||(s=!0,o[u]=e,--c||r(o))}),a)})),--c||r(o)}));return o.error&&a(o.value),n.promise},race:function(e){var t=this,n=W(t),r=n.reject,a=C((function(){var a=y(t.resolve);x(e,(function(e){a.call(t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}})},s4An: +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},s7vb: +/*!********************************!*\ + !*** ./src/service/restful.ts ***! + \********************************/ +/*! exports provided: getRestful, getRestfulDetail, deleteRestFul */ +/*! exports used: deleteRestFul, getRestful, getRestfulDetail */function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return p}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/utils/fetch */"ErOA");function c(e){return u.apply(this,arguments)}function u(){return(u=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/restfuls.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function s(e){return l.apply(this,arguments)}function l(){return(l=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/restfuls/".concat(t.id,".json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return f.apply(this,arguments)}function f(){return(f=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/restfuls/".concat(t.id,".json"),{method:"delete",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},s8TD: +/*!****************************************!*\ + !*** ./src/components/Exercise/ip.tsx ***! + \****************************************/ +/*! exports provided: findLocalIp */ +/*! exports used: findLocalIp */function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toArray */"Pv/L"),a=(n(/*! antd/es/row/style */"14J3"),n(/*! antd/es/row */"BMrR")),o=(n(/*! antd/es/col/style */"jCWc"),n(/*! antd/es/col */"kPKH")),i=(n(/*! antd/es/modal/style */"2qtc"),n(/*! antd/es/modal */"kLXV")),c=n(/*! react */"q1tI"),u=n.n(c),s=n(/*! @/utils/validate */"dfu6"),l=function(e){return new Promise((function(t,n){if(window.RTCPeerConnection=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection,void 0===window.RTCPeerConnection)return n("WebRTC not supported by browser");var c=new RTCPeerConnection,l=[];c.createDataChannel(""),c.createOffer().then((function(e){return c.setLocalDescription(e)})).catch((function(e){return n(e)})),c.onicecandidate=function(c){console.log("event:",c);if(!c||!c.candidate){if(console.log("ips",l),0==l.length||!Object(s.a)(l[0])){var p=i.a.info({title:u.a.createElement(a.a,null,u.a.createElement(o.a,{flex:"1"},"提示"),u.a.createElement(o.a,null,u.a.createElement("span",{className:"iconfont icon-yiguanbi1 current c-grey-c",onClick:function(){return p.destroy()}}))),icon:null,width:500,className:"custom-modal-divider",content:u.a.createElement(a.a,null,u.a.createElement(o.a,null,"当前考试已启用限制考试访问IP(限制公共IP+内网IP)。",("inner"===e.ip_limit||e.ip_bind)&&u.a.createElement(u.a.Fragment,null,u.a.createElement("span",{className:"c-red"},"(只允许在Chrome谷歌浏览器作答,并且需要安装WebRTC Leak Prevent插件)"),u.a.createElement("br",null),u.a.createElement("a",{href:"https://www.educoder.net/forums/4478",target:"_blank"},"如何安装WebRTC Leak Prevent插件?"))))});return n("WebRTC disabled or restricted by browser")}var f=l.filter((function(e){return Object(s.a)(e)}));return f&&f.length?t(f.join("")):n("IP获取失败")}var d=c.candidate.candidate.split(" "),h=Object(r.a)(d),m=h[0],b=h[1],y=h[2],v=h[3],g=h[4],_=h[5],x=h[7],w=h.slice(8);if(console.log("event:",c),l.some((function(e){return e==g}))||l.push(g),console.log(" candidate: "+m.split(":")[1]),console.log(" component: "+["rtp","rtpc"][b-1]),console.log(" protocol: "+y),console.log(" priority: "+v),console.log(" ip: "+g),console.log(" port: "+_),console.log(" type: "+x),w.length){console.log("attributes: ");for(var j=0;j "+w[j]+": "+w[j+1])}}}))}},sFpY: +/*!******************************************************************!*\ + !*** ./node_modules/@umijs/plugin-model/lib/helpers/executor.js ***! + \******************************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";function r(e){return(r="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var c=a?Object.getOwnPropertyDescriptor(e,i):null;c&&(c.get||c.set)?Object.defineProperty(n,i,c):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(/*! react */"q1tI"));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}t.default=function(e){var t=e.hook,n=e.onUpdate,r=e.namespace,o=(0,a.useRef)(n);o.current=n;var i,c=(0,a.useRef)(!1);try{i=t()}catch(e){console.error("plugin-model: Invoking '".concat(r||"unknown","' model failed:"),e)}return(0,a.useMemo)((function(){o.current(i),c.current=!1}),[]),(0,a.useEffect)((function(){c.current?o.current(i):c.current=!0})),a.default.createElement(a.default.Fragment,null)}},sPVm: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.math.expm1.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/math-expm1 */"V61k");r({target:"Math",stat:!0,forced:a!=Math.expm1},{expm1:a})},sdAH: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.math.hypot.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=Math.hypot,o=Math.abs,i=Math.sqrt;r({target:"Math",stat:!0,forced:!!a&&a(1/0,NaN)!==1/0},{hypot:function(e,t){for(var n,r,a=0,c=0,u=arguments.length,s=0;c0?(r=n/s)*r:n;return s===1/0?1/0:s*i(a)}})},sgqd: +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.reflect.delete-property.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/an-object */"f1E4"),o=n(/*! ../internals/object-get-own-property-descriptor */"g8rt").f;r({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=o(a(e),t);return!(n&&!n.configurable)&&delete e[t]}})},ssJt: +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/set-species.js ***! + \*******************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/get-built-in */"29mP"),a=n(/*! ../internals/object-define-property */"YfKC"),o=n(/*! ../internals/well-known-symbol */"2kyd"),i=n(/*! ../internals/descriptors */"tny8"),c=o("species");e.exports=function(e){var t=r(e),n=a.f;i&&t&&!t[c]&&n(t,c,{configurable:!0,get:function(){return this}})}},sxOR: +/*!****************************************!*\ + !*** ./node_modules/qs/lib/formats.js ***! + \****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=String.prototype.replace,a=/%20/g,o="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return r.call(e,a,"+")},RFC3986:function(e){return String(e)}},RFC1738:o,RFC3986:i}},tB8F: +/*!*************************************************!*\ + !*** ./src/.umi-production/umi.ts + 12 modules ***! + \*************************************************/ +/*! 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/@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 */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-dva/runtime.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-locale/locale.tsx because of ./src/.umi-production/plugin-dva/dva.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-model/useModel.tsx because of ./src/.umi-production/plugin-dva/dva.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/layouts/Loading.tsx because of ./src/pages/Classrooms/Lists/PlaceholderPage/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/plugin-model/lib/helpers/constant.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/plugin-model/lib/helpers/dispatcher.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/plugin-model/lib/helpers/executor.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/runtime/dist/index.esm.js because of ./src/.umi-production/plugin-dva/dva.ts */ +/*! 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/moment/moment.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */ +/*! 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.r(t);var r={};n.r(r),n.d(r,"dva",(function(){return p}));var a={};n.r(a),n.d(a,"rootContainer",(function(){return y}));var o={};n.r(o),n.d(o,"rootContainer",(function(){return g}));var i={};n.r(i),n.d(i,"rootContainer",(function(){return T}));n("Xn8V"),n("6spV"),n("wpse"),n("KUpu"),n("8OGu"),n("LtxK"),n("n7Qr"),n("VQRL"),n("SGZ1"),n("nEGZ"),n("IC/V"),n("H8Ov"),n("aHGi"),n("M5u2"),n("0O5u"),n("Xf/b"),n("QpGB"),n("NYJX"),n("CWID"),n("ehAy"),n("mLN8"),n("YJpY"),n("dLjG"),n("fF/C"),n("FbcW"),n("oNMB"),n("+l9e"),n("yxVd"),n("vnQr"),n("5Blz"),n("hilM"),n("v/6r"),n("fDrP"),n("1vuE"),n("Q3OH"),n("IyrG"),n("4rKd"),n("X5kU"),n("maeH"),n("4Mzw"),n("Pp3M"),n("v0/P"),n("CkqQ"),n("5QGz"),n("66pj"),n("JDCn"),n("ls3p"),n("sPVm"),n("AGcU"),n("sdAH"),n("CSFr"),n("GYRj"),n("Bnwu"),n("kP48"),n("NEdc"),n("JnaH"),n("MRpI"),n("EgRx"),n("/8Wl"),n("mMun"),n("oLb5"),n("rS2G"),n("bDgo"),n("eCOq"),n("uVHs"),n("ReSd"),n("pkYH"),n("izsi"),n("lSoN"),n("xtlo"),n("p1ln"),n("ZahQ"),n("nZC5"),n("HjuX"),n("pZem"),n("A9H8"),n("DMUC"),n("B/G0"),n("DVom"),n("v3oe"),n("9zP7"),n("T/5g"),n("rE4C"),n("Sb5z"),n("Pq08"),n("Dyhc"),n("WQuA"),n("y4z8"),n("jhyg"),n("Qqe/"),n("J428"),n("s1ay"),n("Rw1i"),n("quHW"),n("YjZU"),n("uln6"),n("sgqd"),n("zsCH"),n("WIyh"),n("cnT9"),n("D1Ff"),n("WlFw"),n("QxII"),n("NHo6"),n("O9az"),n("b8+j"),n("yIAO"),n("nlPz"),n("2KAr"),n("3dhw"),n("zTPR"),n("m71J"),n("rpUR"),n("EnLX"),n("9/ry"),n("KvPC"),n("z9fm"),n("43iI"),n("mcGr"),n("8DXf"),n("OmS+"),n("rUU2"),n("6cL7"),n("ZDb2"),n("EOz7"),n("JI6M"),n("beyn"),n("A+b4"),n("Yanh"),n("Rbmm"),n("M1bg"),n("9Y4n"),n("yZgL"),n("hwEt"),n("xxWa"),n("R3M+"),n("bkVK"),n("aKgm"),n("PDVC"),n("P84e"),n("AQ/w"),n("3Us1"),n("eP3D"),n("Mn2j"),n("BtTS"),n("yiTY"),n("Uc1W"),n("y36+"),n("gweS"),n("URK0"),n("gVIt"),n("lV6h"),n("waHm"),n("RVXi"),n("Lj+q"),n("IVhM"),n("WU/Z"),n("1jPx"),n("8Lo7"),n("Iw+M"),n("FIIH"),n("p/G/"),n("oat3"),n("BLTA"),n("I5+W"),n("PaaY"),n("JO4c"),n("eDW+"),n("rtIu"),n("jGFG"),n("NId1"),n("IUJg"),n("F1NP"),n("ti1D"),n("NQz/"),n("UHn5"),n("/vMi"),n("nkhd"),n("+u1y"),n("9BQv"),n("Tz1E"),n("U9fH"),n("+4le"),n("jIZW"),n("oYEA"),n("7yTQ"),n("jHRr"),n("Rka6"),n("8Ubs"),n("FK48"),n("Auwt"),n("KAxK"),n("/0sN"),n("VvX1"),n("2aV/"),n("aKtI"),n("VUky"),n("9bAj"),n("xF6R"),n("Dbv2"),n("KHCi"),n("i/DM"),n("hYqy"),n("JXee"),n("+Hw1"),n("FBts"),n("3UWB"),n("S5nV"),n("xD7I"),n("aNdP"),n("UIoa"),n("Osgv"),n("FKIO"),n("Sf9Y"),n("VuYY"),n("ue5M"),n("80Z6"),n("qkSU"),n("xaQh"),n("GPZX"),n("eCow"),n("/R3g"),n("0pSW"),n("85tw"),n("UvYY"),n("DVoG"),n("aLaE"),n("fQri"),n("RDHo"),n("9Rzw"),n("iMhB"),n("/mKc"),n("u6Ie"),n("9znl"),n("+GPJ"),n("haHa"),n("RhWa"),n("PUJJ"),n("YceZ"),n("jksQ"),n("FuvP"),n("Uq4z"),n("+2a4"),n("Gw+j"),n("CO2k"),n("rVgK"),n("ecuC"),n("HQPm"),n("IbaC"),n("s00F"),n("V0Bj"),n("hwEL"),n("d/5L"),n("oJGl"),n("6FCX"),n("OAmA"),n("p6E5"),n("Xxk+"),n("L5O0"),n("bcvT"),n("CRpX"),n("aRU8"),n("p5yU"),n("dnZx"),n("NMu4"),n("5JgN"),n("VWci"),n("FoZm");var c=n("bCY9"),u=(n("miYZ"),n("tsqr")),s=n("wd/R"),l=n.n(s);n("/EoS"),n("4MGa"),n("22qN"),n("YdpX"),n("T5T7"),n("58Ye"),n("OIXA");l.a.locale("ZH-cn");var p={config:{onError:function(e){u.b.error(e.message,3)}}},f=n("L874"),d=n("q1tI"),h=n.n(d),m=n("I5X1");if("function"!=typeof m.a)throw new Error("[plugin-initial-state]: useModel is not a function, @umijs/plugin-model is required.");var b=function(e){var t=e.children,n=Object(d.useRef)(!1),r=(Object(m.a)("@@initialState")||{}).loading,a=void 0!==r&&r;return Object(d.useEffect)((function(){a||(n.current=!0)}),[a]),a&&!n.current?null:t};function y(e){return h.a.createElement(b,null,e)}var v=n("ZW6p");function g(e){return h.a.createElement(v.b,null,e)}var _=n("tJVT"),x=n("7xWI"),w=n.n(x),j=n("sFpY"),O=n.n(j),k=n("FMtG"),E={"@@initialState":function(){return{loading:!1,refresh:function(){}}}},S=new w.a,P=O.a,C=function(e){var t=e.children;return h.a.createElement(k.UmiContext.Provider,{value:S},Object.entries(E).map((function(e){return h.a.createElement(P,{key:e[0],namespace:e[0],hook:e[1],onUpdate:function(t){var n=e,r=Object(_.a)(n,1)[0];S.data[r]=t,S.update(r)}})})),t)};function T(e){return h.a.createElement(C,null,e)}c.a.register({apply:r,path:"E:/gonshi/ppte5yg23/src/app.tsx"}),c.a.register({apply:f,path:"E:/gonshi/ppte5yg23/src/.umi-production/plugin-dva/runtime.tsx"}),c.a.register({apply:a,path:"../plugin-initial-state/runtime"}),c.a.register({apply:o,path:"E:/gonshi/ppte5yg23/src/.umi-production/plugin-locale/runtime.tsx"}),c.a.register({apply:i,path:"../plugin-model/runtime"});var A=n("FfOG"),I=n("LtsZ"),M=n("Ty5D"),L=n("i8i4");n("wx14");function D(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var r=e.path?Object(M.f)(t,e):n.length?n[n.length-1].match:M.c.computeRootMatch(t);return r&&(n.push({route:e,match:r}),e.routes&&D(e.routes,t,n)),r})),n}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}(e,t)||W(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,t){if(e){if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw o}}}}function Q(e){return h.a.createElement(M.e.Consumer,null,(function(t){var n=e.location||t.location,r=e.computedMatch,a=N(N({},t),{},{location:n,match:r}),o=e.render;return h.a.createElement(M.e.Provider,{value:a},a.match?o(N(N({},e.layoutProps),a)):null)}))}var Y=["children"];function K(e){return h.a.createElement(M.e.Consumer,null,(function(t){var n,r=e.children,a=q(e,Y),o=e.location||t.location,i=null;return d.Children.forEach(r,(function(e){if(null===i&&Object(d.isValidElement)(e)){n=e;var r=e.props.path||e.props.from;i=r?Object(M.f)(o.pathname,N(N({},e.props),{},{path:r})):t.match}})),i?Object(d.cloneElement)(n,{location:o,computedMatch:i,layoutProps:a}):null}))}var X=["component"];function J(e){var t,n,r,a=e.route,o=e.index,i=e.opts,c={key:a.key||o,exact:a.exact,strict:a.strict,sensitive:a.sensitive,path:a.path};return a.redirect?h.a.createElement(M.a,V({},c,{from:a.path,to:a.redirect})):(!i.ssrProps||i.isServer||(null===(t=a.component)||void 0===t?void 0:t.wrapInitialPropsLoaded)||!(null===(n=a.component)||void 0===n?void 0:n.getInitialProps)&&!(null===(r=a.component)||void 0===r?void 0:r.preload)||(a.component=function(e,t){e.component;var n=q(e,X),r=e.component;function a(a){var o=B(Object(d.useState)((function(){return window.g_initialProps})),2),i=o[0],c=o[1];return Object(d.useEffect)((function(){var o=function(){var o=U(regeneratorRuntime.mark((function o(){var i,u,s,l,p;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(u=r,!r.preload){o.next=6;break}return o.next=4,r.preload();case 4:u=(u=o.sent).default||u;case 6:if(s=N(N({isServer:!1,match:null==a?void 0:a.match,history:null==a?void 0:a.history,route:e},t.getInitialPropsCtx||{}),n),!(null===(i=u)||void 0===i?void 0:i.getInitialProps)){o.next=15;break}return o.next=10,t.plugin.applyPlugins({key:"ssr.modifyGetInitialPropsCtx",type:I.a.modify,initialValue:s,async:!0});case 10:return l=o.sent,o.next=13,u.getInitialProps(l||s);case 13:p=o.sent,c(p);case 15:case"end":return o.stop()}}),o)})));return function(){return o.apply(this,arguments)}}();window.g_initialProps||o()}),[window.location.pathname,window.location.search]),h.a.createElement(r,V({},a,i))}return a.wrapInitialPropsLoaded=!0,a.displayName="ComponentWithInitialPropsFetch",a}(a,i)),h.a.createElement(Q,V({},c,{render:function(e){return function(e){var t=e.route,n=e.opts,r=e.props,a=Z(N(N({},n),{},{routes:t.routes||[],rootRoutes:n.rootRoutes}),{location:r.location}),o=t.component,i=t.wrappers;if(o){var c=n.isServer?{}:window.g_initialProps,u=N(N(N(N({},r),n.extraProps),n.pageInitialProps||c),{},{route:t,routes:n.rootRoutes}),s=h.a.createElement(o,u,a);if(i)for(var l=i.length-1;l>=0;)s=Object(d.createElement)(i[l],u,s),l-=1;return s}return a}({route:a,opts:i,props:e})}})))}function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.routes?h.a.createElement(K,t,e.routes.map((function(t,n){return J({route:t,index:n,opts:N(N({},e),{},{rootRoutes:e.rootRoutes||e.routes})})}))):null}var $=["history"];function ee(e){var t=e.history,n=q(e,$);return Object(d.useEffect)((function(){function r(t,r){var a=D(e.routes,t.pathname);"undefined"!=typeof document&&void 0!==n.defaultTitle&&(document.title=a.length&&a[a.length-1].route.title||n.defaultTitle||""),e.plugin.applyPlugins({key:"onRouteChange",type:I.a.event,args:{routes:e.routes,matchedRoutes:a,location:t,action:r}})}return window.g_useSSR&&(window.g_initialProps=null),r(t.location,"POP"),t.listen(r)}),[t]),h.a.createElement(M.c,{history:t},Z(n))}function te(e){return ne.apply(this,arguments)}function ne(){return(ne=U(regeneratorRuntime.mark((function e(t){var n,r,a,o,i,c,u,s,l=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=l.length>1&&void 0!==l[1]?l[1]:window.location.pathname,r=D(t,n),a=G(r),e.prev=3,a.s();case 5:if((o=a.n()).done){e.next=19;break}if(c=o.value,"string"==typeof(u=c.route).component||!(null===(i=u.component)||void 0===i?void 0:i.preload)){e.next=13;break}return e.next=11,u.component.preload();case 11:s=e.sent,u.component=s.default||s;case 13:if(!u.routes){e.next=17;break}return e.next=16,te(u.routes,n);case 16:u.routes=e.sent;case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t0=e.catch(3),a.e(e.t0);case 24:return e.prev=24,a.f(),e.finish(24);case 27:return e.abrupt("return",t);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27]])})))).apply(this,arguments)}function re(e){var t=e.plugin.applyPlugins({type:I.a.modify,key:"rootContainer",initialValue:h.a.createElement(ee,{history:e.history,routes:e.routes,plugin:e.plugin,ssrProps:e.ssrProps,defaultTitle:e.defaultTitle}),args:{history:e.history,routes:e.routes,plugin:e.plugin}});if(!e.rootElement)return t;var n="string"==typeof e.rootElement?document.getElementById(e.rootElement):e.rootElement,r=e.callback||function(){};window.g_useSSR?e.dynamicImport?te(e.routes).then((function(){Object(L.hydrate)(t,n,r)})):Object(L.hydrate)(t,n,r):Object(L.render)(t,n,r)}var ae=n("ltSN");function oe(){var e=[{path:"/",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__index */[n.e(0),n.e(3),n.e(9),n.e(10),n.e(24)]).then(n.bind(null,/*! @/layouts/index */"+ego"))},loading:ae.a}),routes:[{path:"/paperlibrary",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/paperlibrary",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paperlibrary__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(180)]).then(n.bind(null,/*! @/pages/Paperlibrary/index */"Ynr3"))},loading:ae.a}),exact:!0},{path:"/paperlibrary/see/:id",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paperlibrary__See__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(179)]).then(n.bind(null,/*! @/pages/Paperlibrary/See/index */"VN4U"))},loading:ae.a}),exact:!0},{path:"/paperlibrary/edit/:id",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paperlibrary__Edit__index */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(174)]).then(n.bind(null,/*! @/pages/Paperlibrary/Edit/index */"DXt6"))},loading:ae.a}),exact:!0},{path:"/paperlibrary/edit_select/:id",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Problemset__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(190)]).then(n.bind(null,/*! @/pages/Problemset/index */"JUtD"))},loading:ae.a}),exact:!0}]},{path:"/paths",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/paths",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paths__Index */[n.e(0),n.e(1),n.e(2),n.e(10),n.e(184)]).then(n.bind(null,/*! @/pages/Paths/Index */"fEdH"))},loading:ae.a}),exact:!0},{path:"/paths/higherVocationalEducation",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paths__HigherVocationalEducation__index */[n.e(0),n.e(183)]).then(n.bind(null,/*! @/pages/Paths/HigherVocationalEducation/index */"aPPP"))},loading:ae.a}),exact:!0},{path:"/paths/new",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paths__New */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(185)]).then(n.bind(null,/*! @/pages/Paths/New */"X8EC"))},loading:ae.a}),exact:!0},{path:"/paths/guidance",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Guidance */[n.e(0),n.e(5),n.e(7),n.e(147)]).then(n.bind(null,/*! @/pages/Guidance */"ObO0"))},loading:ae.a}),exact:!0},{path:"/paths/:pathId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paths__Detail__id */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(182)]).then(n.bind(null,/*! @/pages/Paths/Detail/[id] */"AZ8Y"))},loading:ae.a}),exact:!0},{path:"/paths/:pathId/statistics",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paths__Detail__Statistics */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(181)]).then(n.bind(null,/*! @/pages/Paths/Detail/Statistics */"NLfx"))},loading:ae.a}),exact:!0},{path:"/paths/:pathId/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paths__New */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(185)]).then(n.bind(null,/*! @/pages/Paths/New */"X8EC"))},loading:ae.a}),exact:!0}]},{path:"/classrooms",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/classrooms",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Index */[n.e(0),n.e(9),n.e(10),n.e(13),n.e(38)]).then(n.bind(null,/*! @/pages/Classrooms/Index */"OLqU"))},loading:ae.a}),exact:!0},{path:"/classrooms/examList",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__ExamList__index */[n.e(0),n.e(1),n.e(2),n.e(8),n.e(37)]).then(n.bind(null,/*! @/pages/Classrooms/ExamList/index */"KBoB"))},loading:ae.a}),exact:!0},{path:"/classrooms/classicCases",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__ClassicCases__index */[n.e(0),n.e(36)]).then(n.bind(null,/*! @/pages/Classrooms/ClassicCases/index */"VHPi"))},loading:ae.a}),exact:!0},{path:"/classrooms/index",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Index */[n.e(0),n.e(9),n.e(10),n.e(13),n.e(38)]).then(n.bind(null,/*! @/pages/Classrooms/Index */"OLqU"))},loading:ae.a}),exact:!0},{path:"/classrooms/new",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__New */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(115)]).then(n.bind(null,/*! @/pages/Classrooms/New */"PDLG"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__New */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(115)]).then(n.bind(null,/*! @/pages/Classrooms/New */"PDLG"))},loading:ae.a}),exact:!0},{path:"/classrooms/news/:subjectid/newgold/:id",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__New__StartClass */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(116)]).then(n.bind(null,/*! @/pages/Classrooms/New/StartClass */"GpDF"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/newgolds/settings",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__New__StartClass */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(116)]).then(n.bind(null,/*! @/pages/Classrooms/New/StartClass */"GpDF"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/shixun_homework/:categoryId/review_detail/:userId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__ShixunHomeworks__Detail__components__CodeReview__Detail__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(94)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/ShixunHomeworks/Detail/components/CodeReview/Detail/index */"OipY"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/shixun_homework/:categoryId/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__ShixunHomeworks__Detail__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(95)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/ShixunHomeworks/Detail/index */"TS7/"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/shixun_homework/:categoryId/:homeworkId/comment",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__ShixunHomeworks__Comment__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(92)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/ShixunHomeworks/Comment/index */"5gs/"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/shixun_homework/:categoryId/:homeworkId/commitsummary",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__ShixunHomeworks__Commitsummary__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(93)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/ShixunHomeworks/Commitsummary/index */"Q16u"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/group_homework/:categoryId/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__Detail__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(78)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/GroupHomework/Detail/index */"gbAR"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/common_homework/:categoryId/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__CommonHomework__Detail__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(48)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/CommonHomework/Detail/index */"J44v"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/common_homework/:categoryId/review/:userId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__CommonHomework__Review__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(51)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/CommonHomework/Review/index */"isY5"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/group_homework/:commonHomeworkId/review/:userId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__Review__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(81)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/GroupHomework/Review/index */"Sdqs"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/group_homework/:commonHomeworkId/post",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__SubmitWork__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(82)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/GroupHomework/SubmitWork/index */"Yoi/"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/group_homework/:commonHomeworkId/:homeworkId/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__EditWork__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(79)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/GroupHomework/EditWork/index */"5K9Z"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:categoryId/detail/:userId/review_detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__Detail__components__DuplicateChecking__CheckDetail */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(60)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Exercise/Detail/components/DuplicateChecking/CheckDetail */"1h7y"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:categoryId/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__Detail__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(61)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Exercise/Detail/index */"JNOM"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:categoryId/preview_select",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Problemset__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(190)]).then(n.bind(null,/*! @/pages/Problemset/index */"JUtD"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:categoryId/users/:login",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__Answer__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(59)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Exercise/Answer/index */"MvOs"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:categoryId/:login/initate_answer",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__ImitateAnswer__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(64)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Exercise/ImitateAnswer/index */"cQPA"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:categoryId/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__Edit__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(62)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Exercise/Edit/index */"E7pt"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:categoryId/random/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paperlibrary__Random__ExerciseEdit__index */[n.e(0),n.e(1),n.e(2),n.e(177)]).then(n.bind(null,/*! @/pages/Paperlibrary/Random/ExerciseEdit/index */"zytX"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:categoryId/random/preview",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paperlibrary__Random__PreviewEdit__index */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(178)]).then(n.bind(null,/*! @/pages/Paperlibrary/Random/PreviewEdit/index */"sDPU"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/add",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__Add__index */[n.e(0),n.e(4),n.e(3),n.e(16),n.e(57)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Exercise/Add/index */"0yVv"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:exerciseId/reviews/group",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__ReviewGroup__index */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(65)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Exercise/ReviewGroup/index */"E2MH"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:exerciseId/review/:userId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__Review__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(66)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Exercise/Review/index */"zrbX"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:exerciseId/export/:userId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__Export__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(63)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Exercise/Export/index */"mrIW"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:exerciseId/export_blank",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__Export__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(63)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Exercise/Export/index */"mrIW"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/graduation_topics/:categoryId/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Graduation__Topics__Detail__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(74)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Graduation/Topics/Detail/index */"b7x8"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/graduation_topics/:categoryId/add",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Graduation__Topics__Add__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(73)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Graduation/Topics/Add/index */"3Rgl"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/graduation_topics/:categoryId/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Graduation__Topics__Edit__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(75)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Graduation/Topics/Edit/index */"vKdk"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/graduation_tasks/:categoryId/add",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Graduation__Tasks__Add__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(69)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Graduation/Tasks/Add/index */"/P1P"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/graduation_tasks/:categoryId/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Graduation__Tasks__Edit__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(71)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Graduation/Tasks/Edit/index */"c5ks"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/graduation_tasks/:categoryId/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Graduation__Tasks__Detail__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(70)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Graduation/Tasks/Detail/index */"6UeF"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/common_homework/:categoryId/add",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__CommonHomework__Add__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(47)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/CommonHomework/Add/index */"gnOq"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/common_homework/:categoryId/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__CommonHomework__Edit__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(50)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/CommonHomework/Edit/index */"to1l"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/common_homework/:commonHomeworkId/post",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__CommonHomework__SubmitWork__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(52)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/CommonHomework/SubmitWork/index */"qduV"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/common_homework/:commonHomeworkId/:homeworkId/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__CommonHomework__EditWork__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(49)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/CommonHomework/EditWork/index */"yBfY"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/group_homework/:categoryId/add",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__Add__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(77)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/GroupHomework/Add/index */"tt94"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/group_homework/:categoryId/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__Edit__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(80)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/GroupHomework/Edit/index */"99tC"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/poll/:categoryId/add",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Polls__Add__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(87)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Polls/Add/index */"pFvy"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/poll/:categoryId/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Polls__Edit__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(90)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Polls/Edit/index */"0eFd"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/poll/:categoryId/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Polls__Detail__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(89)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Polls/Detail/index */"JHUA"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/poll/:categoryId/users/:login",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Polls__Answer__index */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(88)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Polls/Answer/index */"5b1O"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/board/:categoryId/Add",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Board__Add__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(43)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Board/Add/index */"KI3f"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/board/:categoryId/Edit/:boardId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Board__Edit__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(45)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Board/Edit/index */"5aFj"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/board/:categoryId/Detail/:boardId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Board__Detail__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(44)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Board/Detail/index */"0A3i"))},loading:ae.a}),exact:!0},{path:"/classrooms/:courseId/template/:templateId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Template__teacher__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(109)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Template/teacher/index */"saVb"))},loading:ae.a}),exact:!0},{path:"/classrooms/:courseId/common_homework/:homeworkId/lab-report/:reportId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Template__student__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(108)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Template/student/index */"rrYs"))},loading:ae.a}),exact:!0},{path:"/classrooms/guidance",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Guidance */[n.e(0),n.e(5),n.e(7),n.e(147)]).then(n.bind(null,/*! @/pages/Guidance */"ObO0"))},loading:ae.a}),exact:!0},{path:"/classrooms/:courseId/common_homework/:homeworkId/lab-report-view/:workId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Template__detail__index */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(106)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Template/detail/index */"65Jc"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:categoryId/users/:login/check",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__AnswerCheck__index */[n.e(0),n.e(4),n.e(6),n.e(17),n.e(58)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Exercise/AnswerCheck/index */"gctT"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/Studentdetail/:login",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Statistics__StudentDetail */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(98)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Statistics/StudentDetail */"TljI"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__ShixunDetail__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(22)]).then(n.bind(null,/*! @/layouts/ShixunDetail/index */"NRst"))},loading:ae.a}),routes:[{path:"/classrooms/:coursesId/shixun_homework/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__ShixunHomeworks__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(96)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/ShixunHomeworks/index */"cgge"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/shixun_homework",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__ShixunHomeworks__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(96)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/ShixunHomeworks/index */"cgge"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/graduation_topics/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Graduation__Topics__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(76)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Graduation/Topics/index */"xBOz"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/graduation_tasks/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Graduation__Tasks__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(72)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Graduation/Tasks/index */"qAxr"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/graduation_tasks/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Graduation__Tasks__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(72)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Graduation/Tasks/index */"qAxr"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(67)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Exercise/index */"NO2p"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exercise",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(67)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Exercise/index */"NO2p"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/poll/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Polls__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(91)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Polls/index */"A06Q"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/poll",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Polls__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(91)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Polls/index */"A06Q"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/common_homework/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__CommonHomework__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(53)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/CommonHomework/index */"hIhZ"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/common_homework",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__CommonHomework__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(53)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/CommonHomework/index */"hIhZ"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/group_homework/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(83)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/GroupHomework/index */"2doZ"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/group_homework",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(83)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/GroupHomework/index */"2doZ"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/teachers",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Teachers */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(105)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Teachers */"L/F1"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/students",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Students */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(104)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Students */"KsYo"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/attendance",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Attendance__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(42)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Attendance/index */"VmvX"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/attendance/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Attendance__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(42)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Attendance/index */"VmvX"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/attendance/:categoryId/:tabId/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Attendance__Detail__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(41)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Attendance/Detail/index */"kvwo"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/announcement",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Announcement__index */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(39)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Announcement/index */"kHcA"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/announcement/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Announcement__index */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(39)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Announcement/index */"kHcA"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/online_learning",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__OnlineLearning__index */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(85)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/OnlineLearning/index */"ADTG"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/online_learning/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__OnlineLearning__index */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(85)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/OnlineLearning/index */"ADTG"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/attachment/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Attachment__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(40)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Attachment/index */"QGk1"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/attachment",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Attachment__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(40)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Attachment/index */"QGk1"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/video",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Video__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(114)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Video/index */"iVQj"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/video/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Video__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(114)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Video/index */"iVQj"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/video/:categoryId/statistics",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Video__Statistics__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(112)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Video/Statistics/index */"5vIh"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/video/:username/upload",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Video__Upload__index */[n.e(0),n.e(6),n.e(11),n.e(113)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Video/Upload/index */"1v2r"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/video/:categoryId/statistics/:videoId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Video__Statistics__Detail__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(110)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Video/Statistics/Detail/index */"XeVE"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/live_video/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__LiveVideo__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(84)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/LiveVideo/index */"dxBZ"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/live_video",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__LiveVideo__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(84)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/LiveVideo/index */"dxBZ"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/video/:categoryId/studentstatistics",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Video__Statistics__StudentDetail__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(111)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Video/Statistics/StudentDetail/index */"QLuO"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/board/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Board__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(46)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Board/index */"KRdP"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/board",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Board__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(46)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Board/index */"KRdP"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/course_group",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__CourseGroup__List__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(55)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/CourseGroup/List/index */"VQsq"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/course_group/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__CourseGroup__List__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(55)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/CourseGroup/List/index */"VQsq"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/course_group/:categoryId/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__CourseGroup__Detail__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(54)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/CourseGroup/Detail/index */"zr3n"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/not_course_group/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__CourseGroup__NotList__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(56)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/CourseGroup/NotList/index */"sl2e"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/not_course_group",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__CourseGroup__NotList__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(56)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/CourseGroup/NotList/index */"sl2e"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/statistics/",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Statistics__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(103)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Statistics/index */"bTuv"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/statistics/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Statistics__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(103)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Statistics/index */"bTuv"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/statistics_video/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Statistics__VideoStatistics__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(102)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Statistics/VideoStatistics/index */"CQHe"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/statistics_quality/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Statistics__StatisticsQuality__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(97)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Statistics/StatisticsQuality/index */"CfqN"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/student_statistics/:categoryId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Statistics__StudentStatistics__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(100)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Statistics/StudentStatistics/index */"G1O7"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/student_statistics/:categoryId/:listId/:type",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Statistics__StudentStatistics__Detail__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(99)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Statistics/StudentStatistics/Detail/index */"w+VK"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/video_statistics/:categoryId/Student/:studentid",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Statistics__StudentVideo__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(101)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Statistics/StudentVideo/index */"cfGd"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId/exportlist/:type",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__ExportList__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(68)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/ExportList/index */"9Bz6"))},loading:ae.a}),exact:!0},{path:"/classrooms/:courseId/template",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Classrooms__Lists__Template__index */[n.e(0),n.e(1),n.e(2),n.e(8),n.e(107)]).then(n.bind(null,/*! @/pages/Classrooms/Lists/Template/index */"aQrL"))},loading:ae.a}),exact:!0},{path:"/classrooms/:coursesId",component:Object(I.c)({loader:function(){return n.e(/*! import() | p__Classrooms__Lists__PlaceholderPage */86).then(n.bind(null,/*! @/pages/Classrooms/Lists/PlaceholderPage */"gb4D"))},loading:ae.a}),exact:!0}]}]},{path:"/competitions",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/competitions/index",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Competitions__Index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(122)]).then(n.bind(null,/*! @/pages/Competitions/Index */"QgcY"))},loading:ae.a}),exact:!0},{path:"/competitions/exports",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Competitions__Exports__ */[n.e(0),n.e(9),n.e(18),n.e(121)]).then(n.bind(null,/*! @/pages/Competitions/Exports/ */"tYMO"))},loading:ae.a}),exact:!0},{path:"/competitions",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Competitions__Index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(122)]).then(n.bind(null,/*! @/pages/Competitions/Index */"QgcY"))},loading:ae.a}),exact:!0},{path:"/competitions/index/:identifier",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Competitions__Detail */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(118)]).then(n.bind(null,/*! @/pages/Competitions/Detail */"GRO8"))},loading:ae.a}),exact:!0},{path:"/competitions/index/:identifier/enroll",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Competitions__Entered */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(119)]).then(n.bind(null,/*! @/pages/Competitions/Entered */"Hm3h"))},loading:ae.a}),exact:!0},{path:"/competitions/index/:identifier/UpdateTeanname/:Teannameid",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Competitions__Update */[n.e(0),n.e(3),n.e(15),n.e(123)]).then(n.bind(null,/*! @/pages/Competitions/Update */"jmm4"))},loading:ae.a}),exact:!0},{path:"/competitions/index/:identifier/teamDetail/:Teamid",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Competitions__Entered__Assembly__TeamDateil */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(120)]).then(n.bind(null,/*! @/pages/Competitions/Entered/Assembly/TeamDateil */"mKwH"))},loading:ae.a}),exact:!0}]},{path:"/forums",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/forums",component:Object(I.c)({loader:function(){return n.e(/*! import() | p__Forums__Index__redirect */145).then(n.bind(null,/*! @/pages/Forums/Index/redirect */"Ij5S"))},loading:ae.a}),exact:!0},{path:"/forums/categories/:memoType",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Forums__Index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(144)]).then(n.bind(null,/*! @/pages/Forums/Index */"IeBn"))},loading:ae.a}),exact:!0},{path:"/forums/new",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Forums__New */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(146)]).then(n.bind(null,/*! @/pages/Forums/New */"CKgm"))},loading:ae.a}),exact:!0},{path:"/forums/:memoId/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Forums__New */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(146)]).then(n.bind(null,/*! @/pages/Forums/New */"CKgm"))},loading:ae.a}),exact:!0},{path:"/forums/:memoId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Forums__Detail__id */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(143)]).then(n.bind(null,/*! @/pages/Forums/Detail/[id] */"JkjM"))},loading:ae.a}),exact:!0}]},{path:"/problemset",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/problemset",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Problemset__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(190)]).then(n.bind(null,/*! @/pages/Problemset/index */"JUtD"))},loading:ae.a}),exact:!0},{path:"/problemset/newitem",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Problemset__NewItem__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(187)]).then(n.bind(null,/*! @/pages/Problemset/NewItem/index */"0dNJ"))},loading:ae.a}),exact:!0},{path:"/problemset/:type/:id",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Problemset__NewItem__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(187)]).then(n.bind(null,/*! @/pages/Problemset/NewItem/index */"0dNJ"))},loading:ae.a}),exact:!0},{path:"/problemset/preview",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Problemset__Preview__index */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(189)]).then(n.bind(null,/*! @/pages/Problemset/Preview/index */"DaK5"))},loading:ae.a}),exact:!0},{path:"/problemset/preview_new",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Problemset__Preview__New__index */[n.e(0),n.e(3),n.e(16),n.e(188)]).then(n.bind(null,/*! @/pages/Problemset/Preview/New/index */"JA47"))},loading:ae.a}),exact:!0},{path:"/problemset/preview_select",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Problemset__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(190)]).then(n.bind(null,/*! @/pages/Problemset/index */"JUtD"))},loading:ae.a}),exact:!0}]},{path:"/shixuns",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/shixuns",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Index */[n.e(0),n.e(1),n.e(2),n.e(10),n.e(228)]).then(n.bind(null,/*! @/pages/Shixuns/Index */"VgI9"))},loading:ae.a}),exact:!0},{path:"/shixuns/exports",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Exports */[n.e(0),n.e(5),n.e(7),n.e(18),n.e(227)]).then(n.bind(null,/*! @/pages/Shixuns/Exports */"kzkF"))},loading:ae.a}),exact:!0},{path:"/shixuns/new",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__New */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(229)]).then(n.bind(null,/*! @/pages/Shixuns/New */"dugo"))},loading:ae.a}),exact:!0},{path:"/shixuns/new/CreateImg",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__New__CreateImg */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(230)]).then(n.bind(null,/*! @/pages/Shixuns/New/CreateImg */"qK93"))},loading:ae.a}),exact:!0},{path:"/shixuns/new/:id/imagepreview",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__New__ImagePreview */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(231)]).then(n.bind(null,/*! @/pages/Shixuns/New/ImagePreview */"iJb0"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/Merge",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Merge__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(211)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Merge/index */"U2tx"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Edit */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(219)]).then(n.bind(null,/*! @/pages/Shixuns/Edit */"WO9J"))},loading:ae.a}),routes:[{path:"/shixuns/:id/edit/shixuns/:id/edit/warehouse",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Edit__body__Warehouse */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(226)]).then(n.bind(null,/*! @/pages/Shixuns/Edit/body/Warehouse */"ch0t"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/edit/newquestion",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Edit__body__Level__Challenges__NewQuestion */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(224)]).then(n.bind(null,/*! @/pages/Shixuns/Edit/body/Level/Challenges/NewQuestion */"5v/u"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/edit/:challengesId/editquestion",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Edit__body__Level__Challenges__EditQuestion */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(222)]).then(n.bind(null,/*! @/pages/Shixuns/Edit/body/Level/Challenges/EditQuestion */"UeE2"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/edit/:challengesId/editquestion/:questionId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Edit__body__Level__Challenges__EditQuestion */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(222)]).then(n.bind(null,/*! @/pages/Shixuns/Edit/body/Level/Challenges/EditQuestion */"UeE2"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/edit/new",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Edit__body__Level__Challenges__NewPractice */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(223)]).then(n.bind(null,/*! @/pages/Shixuns/Edit/body/Level/Challenges/NewPractice */"Ly88"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/edit/:challengesId/editcheckpoint",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Edit__body__Level__Challenges__NewPractice */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(223)]).then(n.bind(null,/*! @/pages/Shixuns/Edit/body/Level/Challenges/NewPractice */"Ly88"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/edit/:challengesId/tab=2",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Edit__body__Level__Challenges__EditPracticeSetting */[n.e(0),n.e(1),n.e(2),n.e(6),n.e(221)]).then(n.bind(null,/*! @/pages/Shixuns/Edit/body/Level/Challenges/EditPracticeSetting */"xdT8"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/edit/:challengesId/tab=3",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Edit__body__Level__Challenges__EditPracticeAnswer */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(220)]).then(n.bind(null,/*! @/pages/Shixuns/Edit/body/Level/Challenges/EditPracticeAnswer */"389U"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/edit/:challengesId/tab=4",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Edit__body__Level__Challenges__RankingSetting */[n.e(0),n.e(225)]).then(n.bind(null,/*! @/pages/Shixuns/Edit/body/Level/Challenges/RankingSetting */"/hLF"))},loading:ae.a}),exact:!0}]},{path:"/shixuns/:id",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__id */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(218)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/[id] */"Nv+3"))},loading:ae.a}),routes:[{path:"/shixuns/:id/challenges",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Challenges__index */[n.e(0),n.e(4),n.e(5),n.e(6),n.e(206)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Challenges/index */"HTtE"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/challenges/newquestion",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Challenges__NewQuestion */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(204)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Challenges/NewQuestion */"wxaI"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/challenges/:challengesId/editquestion",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Challenges__EditQuestion */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(202)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Challenges/EditQuestion */"kvPc"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/challenges/:challengesId/editquestion/:questionId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Challenges__EditQuestion */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(202)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Challenges/EditQuestion */"kvPc"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/challenges/new",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Challenges__NewPractice */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(203)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Challenges/NewPractice */"dNgX"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/challenges/:challengesId/editcheckpoint",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Challenges__NewPractice */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(203)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Challenges/NewPractice */"dNgX"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/challenges/:challengesId/tab=2",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Challenges__EditPracticeSetting */[n.e(0),n.e(1),n.e(2),n.e(9),n.e(201)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Challenges/EditPracticeSetting */"Yczt"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/challenges/:challengesId/tab=3",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Challenges__EditPracticeAnswer */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(200)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Challenges/EditPracticeAnswer */"5EEG"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/challenges/:challengesId/tab=4",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Challenges__RankingSetting */[n.e(0),n.e(9),n.e(205)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Challenges/RankingSetting */"mWt4"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/repository",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Repository__index */[n.e(0),n.e(4),n.e(1),n.e(6),n.e(216)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Repository/index */"C8/M"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/secret_repository",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Repository__index */[n.e(0),n.e(4),n.e(1),n.e(6),n.e(216)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Repository/index */"C8/M"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/collaborators",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Collaborators__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(207)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Collaborators/index */"FMhn"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/dataset",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Dataset__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(208)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Dataset/index */"SYY+"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/shixun_discuss",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Discuss__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(209)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Discuss/index */"cx3v"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/ranking_list",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__RankingList__index */[n.e(0),n.e(4),n.e(6),n.e(9),n.e(212)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/RankingList/index */"LiYo"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/settings",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Settings__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(217)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Settings/index */"2WWx"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/repository/:repoId/commits",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Repository__Commit__index */[n.e(0),n.e(4),n.e(6),n.e(9),n.e(214)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Repository/Commit/index */"gCRP"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/secret_repository/:repoId/commits",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Repository__Commit__index */[n.e(0),n.e(4),n.e(6),n.e(9),n.e(214)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Repository/Commit/index */"gCRP"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/repository/upload_file",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Repository__UploadFile__index */[n.e(0),n.e(6),n.e(215)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Repository/UploadFile/index */"wXW8"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/secret_repository/upload_file",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Repository__UploadFile__index */[n.e(0),n.e(6),n.e(215)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Repository/UploadFile/index */"wXW8"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/repository/add_file",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Repository__AddFile__index */[n.e(0),n.e(1),n.e(2),n.e(213)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Repository/AddFile/index */"baNF"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/secret_repository/add_file",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Repository__AddFile__index */[n.e(0),n.e(1),n.e(2),n.e(213)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Repository/AddFile/index */"baNF"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/repository/master/shixun_show/:fileId",exact:!1,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Repository__index */[n.e(0),n.e(4),n.e(1),n.e(6),n.e(216)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Repository/index */"C8/M"))},loading:ae.a})},{path:"/shixuns/:id/secret_repository/master/shixun_show/:fileId",exact:!1,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__Repository__index */[n.e(0),n.e(4),n.e(1),n.e(6),n.e(216)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/Repository/index */"C8/M"))},loading:ae.a})},{path:"/shixuns/:id/audit_situation",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__AuditSituation__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(199)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/AuditSituation/index */"VllQ"))},loading:ae.a}),exact:!0},{path:"/shixuns/:id/fork_list",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Shixuns__Detail__ForkList__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(210)]).then(n.bind(null,/*! @/pages/Shixuns/Detail/ForkList/index */"e2kQ"))},loading:ae.a}),exact:!0}]}]},{path:"/users",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/users/:username/videos/upload",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Videos__Upload__index */[n.e(0),n.e(3),n.e(6),n.e(11),n.e(259)]).then(n.bind(null,/*! @/pages/User/Detail/Videos/Upload/index */"kryb"))},loading:ae.a}),exact:!0},{path:"/users/:username/videos/protocol",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Videos__Protocol__index */[n.e(0),n.e(3),n.e(257)]).then(n.bind(null,/*! @/pages/User/Detail/Videos/Protocol/index */"MvYd"))},loading:ae.a}),exact:!0},{path:"/users/:username/videos/success",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Videos__Success__index */[n.e(0),n.e(3),n.e(258)]).then(n.bind(null,/*! @/pages/User/Detail/Videos/Success/index */"p0R4"))},loading:ae.a}),exact:!0},{path:"/users/:username/topicbank/:topicstype",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Topics__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(255)]).then(n.bind(null,/*! @/pages/User/Detail/Topics/index */"ZgjG"))},loading:ae.a}),exact:!0},{path:"/users/:username/topics/:topicId/:topictype/normal/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Topics__Detail__index */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(248)]).then(n.bind(null,/*! @/pages/User/Detail/Topics/Detail/index */"VdzU"))},loading:ae.a}),exact:!0},{path:"/users/:username/topics/:topicId/:topictype/group/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Topics__Detail__index */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(248)]).then(n.bind(null,/*! @/pages/User/Detail/Topics/Detail/index */"VdzU"))},loading:ae.a}),exact:!0},{path:"/users/:username/topics/:topicId/:topictype/normal/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Topics__Normal__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(252)]).then(n.bind(null,/*! @/pages/User/Detail/Topics/Normal/index */"R7cW"))},loading:ae.a}),exact:!0},{path:"/users/:username/topics/:topicId/:topictype/group/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Topics__Group__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(251)]).then(n.bind(null,/*! @/pages/User/Detail/Topics/Group/index */"6xqJ"))},loading:ae.a}),exact:!0},{path:"/users/:username/topics/:topicId/:topictype/exercise/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Topics__Exercise__Edit__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(250)]).then(n.bind(null,/*! @/pages/User/Detail/Topics/Exercise/Edit/index */"pr0Y"))},loading:ae.a}),exact:!0},{path:"/users/:username/topics/:topicId/:topictype/exercise/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Topics__Exercise__Detail__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(249)]).then(n.bind(null,/*! @/pages/User/Detail/Topics/Exercise/Detail/index */"NcEG"))},loading:ae.a}),exact:!0},{path:"/users/:username/topics/:topicId/:topictype/poll/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Topics__Poll__Edit__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(254)]).then(n.bind(null,/*! @/pages/User/Detail/Topics/Poll/Edit/index */"VSi8"))},loading:ae.a}),exact:!0},{path:"/users/:username/topics/:topicId/:topictype/poll/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Topics__Poll__Detail__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(253)]).then(n.bind(null,/*! @/pages/User/Detail/Topics/Poll/Detail/index */"/OCd"))},loading:ae.a}),exact:!0},{path:"/users/:username",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__id */[n.e(0),n.e(3),n.e(261)]).then(n.bind(null,/*! @/pages/User/Detail/[id] */"bp/9"))},loading:ae.a}),routes:[{path:"/users/:username",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Classrooms__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(235)]).then(n.bind(null,/*! @/pages/User/Detail/Classrooms/index */"NQ7k"))},loading:ae.a}),exact:!0},{path:"/users/:username/classrooms",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Classrooms__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(235)]).then(n.bind(null,/*! @/pages/User/Detail/Classrooms/index */"NQ7k"))},loading:ae.a}),exact:!0},{path:"/users/:username/shixuns",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Shixuns__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(246)]).then(n.bind(null,/*! @/pages/User/Detail/Shixuns/index */"0eau"))},loading:ae.a}),exact:!0},{path:"/users/:username/userPortrait",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__UserPortrait__index */[n.e(0),n.e(4),n.e(9),n.e(256)]).then(n.bind(null,/*! @/pages/User/Detail/UserPortrait/index */"Yej6"))},loading:ae.a}),exact:!0},{path:"/users/:username/learningPath",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__LearningPath__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(238)]).then(n.bind(null,/*! @/pages/User/Detail/LearningPath/index */"NFd+"))},loading:ae.a}),exact:!0},{path:"/users/:username/teach-group",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__TeachGroup__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(247)]).then(n.bind(null,/*! @/pages/User/Detail/TeachGroup/index */"UK/q"))},loading:ae.a}),exact:!0},{path:"/users/:username/experiment-img",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__ExperImentImg__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(237)]).then(n.bind(null,/*! @/pages/User/Detail/ExperImentImg/index */"03Vo"))},loading:ae.a}),exact:!0},{path:"/users/:username/experiment-img/:experid/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__ExperImentImg__Detail__index */[n.e(0),n.e(5),n.e(7),n.e(236)]).then(n.bind(null,/*! @/pages/User/Detail/ExperImentImg/Detail/index */"CF0a"))},loading:ae.a}),exact:!0},{path:"/users/:username/certificate",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Certificate__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(234)]).then(n.bind(null,/*! @/pages/User/Detail/Certificate/index */"Oe6r"))},loading:ae.a}),exact:!0},{path:"/users/:username/otherResources",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__OtherResources__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(243)]).then(n.bind(null,/*! @/pages/User/Detail/OtherResources/index */"epD4"))},loading:ae.a}),exact:!0},{path:"/users/:username/paths",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Paths__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(244)]).then(n.bind(null,/*! @/pages/User/Detail/Paths/index */"2nTg"))},loading:ae.a}),exact:!0},{path:"/users/:username/projects",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Projects__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(245)]).then(n.bind(null,/*! @/pages/User/Detail/Projects/index */"T+0Y"))},loading:ae.a}),exact:!0},{path:"/users/:username/videos",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Videos__index */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(260)]).then(n.bind(null,/*! @/pages/User/Detail/Videos/index */"XxMO"))},loading:ae.a}),exact:!0},{path:"/users/:username/topics/:topicstype",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Topics__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(255)]).then(n.bind(null,/*! @/pages/User/Detail/Topics/index */"ZgjG"))},loading:ae.a}),exact:!0},{path:"/users/:username/vspaces",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__virtualSpaces__index */[n.e(0),n.e(1),n.e(2),n.e(6),n.e(262)]).then(n.bind(null,/*! @/pages/User/Detail/virtualSpaces/index */"jjXQ"))},loading:ae.a}),exact:!0}]}]},{path:"/problems",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__index */[n.e(0),n.e(3),n.e(9),n.e(10),n.e(24)]).then(n.bind(null,/*! @/layouts/index */"+ego"))},loading:ae.a}),routes:[{path:"/problems/:id/edit",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Problems__OjForm__index */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(186)]).then(n.bind(null,/*! @/pages/Problems/OjForm/index */"PHyj"))},loading:ae.a})},{path:"/problems/new",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Problems__OjForm__index */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(186)]).then(n.bind(null,/*! @/pages/Problems/OjForm/index */"PHyj"))},loading:ae.a})},{path:"/problems/:id/oj/:save_identifier",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Question__OjProblem */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(194)]).then(n.bind(null,/*! @/pages/Question/OjProblem */"W7jJ"))},loading:ae.a}),exact:!0},{path:"/problems/:id/record-detail/:submitId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Question__OjProblem__RecordDetail */[n.e(0),n.e(5),n.e(7),n.e(20),n.e(195)]).then(n.bind(null,/*! @/pages/Question/OjProblem/RecordDetail */"OPwS"))},loading:ae.a}),exact:!0},{path:"/problems/add",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Question__AddOrEdit */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(191)]).then(n.bind(null,/*! @/pages/Question/AddOrEdit */"rWjI"))},loading:ae.a}),exact:!0},{path:"/problems/:id/ojedit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Question__AddOrEdit */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(191)]).then(n.bind(null,/*! @/pages/Question/AddOrEdit */"rWjI"))},loading:ae.a}),exact:!0},{path:"/problems",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/problems",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Question__Index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(193)]).then(n.bind(null,/*! @/pages/Question/Index */"y3Jh"))},loading:ae.a}),exact:!0},{path:"/problems/batchAdd",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Question__AddOrEdit__BatchAdd */[n.e(0),n.e(6),n.e(192)]).then(n.bind(null,/*! @/pages/Question/AddOrEdit/BatchAdd */"pSk9"))},loading:ae.a}),exact:!0}]}]},{path:"/engineering",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/engineering",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering */[n.e(0),n.e(3),n.e(126)]).then(n.bind(null,/*! @/pages/Engineering */"as6h"))},loading:ae.a}),routes:[{path:"/engineering/teacherList",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Lists__TeacherList */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(135)]).then(n.bind(null,/*! @/pages/Engineering/Lists/TeacherList */"dRIv"))},loading:ae.a}),exact:!0},{path:"/engineering/studentList",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Lists__StudentList */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(134)]).then(n.bind(null,/*! @/pages/Engineering/Lists/StudentList */"FAcQ"))},loading:ae.a}),exact:!0},{path:"/engineering/trainingProgram",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Lists__TrainingProgram */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(137)]).then(n.bind(null,/*! @/pages/Engineering/Lists/TrainingProgram */"mUbb"))},loading:ae.a}),exact:!0},{path:"/engineering/trainingProgram/add",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Lists__TrainingProgram__Add */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(138)]).then(n.bind(null,/*! @/pages/Engineering/Lists/TrainingProgram/Add */"BfvP"))},loading:ae.a}),exact:!0},{path:"/engineering/trainingProgram/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Lists__TrainingProgram__Edit */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(139)]).then(n.bind(null,/*! @/pages/Engineering/Lists/TrainingProgram/Edit */"AG+i"))},loading:ae.a}),exact:!0},{path:"/engineering/trainingObjectives",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Lists__TrainingObjectives */[n.e(0),n.e(1),n.e(2),n.e(6),n.e(136)]).then(n.bind(null,/*! @/pages/Engineering/Lists/TrainingObjectives */"bnOO"))},loading:ae.a}),exact:!0},{path:"/engineering/graduationindex",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Lists__GraduationIndex */[n.e(0),n.e(1),n.e(2),n.e(6),n.e(133)]).then(n.bind(null,/*! @/pages/Engineering/Lists/GraduationIndex */"g9Gb"))},loading:ae.a}),exact:!0},{path:"/engineering/graduatedMatrix",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Lists__GraduatedMatrix */[n.e(0),n.e(1),n.e(2),n.e(10),n.e(132)]).then(n.bind(null,/*! @/pages/Engineering/Lists/GraduatedMatrix */"DAqD"))},loading:ae.a}),exact:!0},{path:"/engineering/courseList",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Lists__CourseList */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(129)]).then(n.bind(null,/*! @/pages/Engineering/Lists/CourseList */"mMz9"))},loading:ae.a}),exact:!0},{path:"/engineering/cursesetting",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Lists__CurseSetting */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(131)]).then(n.bind(null,/*! @/pages/Engineering/Lists/CurseSetting */"5hVI"))},loading:ae.a}),exact:!0},{path:"/engineering/courseMatrix",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Lists__CourseMatrix */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(130)]).then(n.bind(null,/*! @/pages/Engineering/Lists/CourseMatrix */"3ICd"))},loading:ae.a}),exact:!0},{path:"/engineering/navigation",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Navigation__Home */[n.e(0),n.e(1),n.e(2),n.e(140)]).then(n.bind(null,/*! @/pages/Engineering/Navigation/Home */"zOaB"))},loading:ae.a}),exact:!0},{path:"/engineering/evaluate/course",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Evaluate__List */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(128)]).then(n.bind(null,/*! @/pages/Engineering/Evaluate/List */"b8A+"))},loading:ae.a}),exact:!0},{path:"/engineering/evaluate/course/:ec_year_id/:id",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Evaluate__Detail */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(127)]).then(n.bind(null,/*! @/pages/Engineering/Evaluate/Detail */"3+U2"))},loading:ae.a}),exact:!0},{path:"/engineering/evaluate/norm",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Engineering__Norm__List */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(142)]).then(n.bind(null,/*! @/pages/Engineering/Norm/List */"M7eO"))},loading:ae.a}),exact:!0},{path:"/engineering/evaluate/norm/:ec_year_id/:id",component:Object(I.c)({loader:function(){return n.e(/*! import() | p__Engineering__Norm__Detail */141).then(n.bind(null,/*! @/pages/Engineering/Norm/Detail */"4rn5"))},loading:ae.a}),exact:!0},{path:"/engineering/*",redirect:"/404",exact:!0}]}]},{path:"/vspaces",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/vspaces",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__virtualSpaces__Index */[n.e(0),n.e(1),n.e(2),n.e(6),n.e(273)]).then(n.bind(null,/*! @/pages/virtualSpaces/Index */"A0re"))},loading:ae.a}),exact:!0},{path:"/vspaces/:virtual_spacesId/syllabuses/add",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__virtualSpaces__Lists__Syllabuses__AddOrEdit */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(280)]).then(n.bind(null,/*! @/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit */"gHQ5"))},loading:ae.a}),exact:!0},{path:"/vspaces/:virtual_spacesId/syllabuses/:id/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__virtualSpaces__Lists__Syllabuses__AddOrEdit */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(280)]).then(n.bind(null,/*! @/pages/virtualSpaces/Lists/Syllabuses/AddOrEdit */"gHQ5"))},loading:ae.a}),exact:!0},{path:"/vspaces/:virtual_spacesId/",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__virtualDetail__index */[n.e(0),n.e(6),n.e(14),n.e(26)]).then(n.bind(null,/*! @/layouts/virtualDetail/index */"GY4K"))},loading:ae.a}),routes:[{path:"/vspaces/:virtual_spacesId/syllabuses",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__virtualSpaces__Lists__Syllabuses__index */[n.e(0),n.e(1),n.e(2),n.e(8),n.e(282)]).then(n.bind(null,/*! @/pages/virtualSpaces/Lists/Syllabuses/index */"Zxkz"))},loading:ae.a}),exact:!0},{path:"/vspaces/:virtual_spacesId/syllabuses/:id/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__virtualSpaces__Lists__Syllabuses__Detail */[n.e(0),n.e(5),n.e(7),n.e(281)]).then(n.bind(null,/*! @/pages/virtualSpaces/Lists/Syllabuses/Detail */"sUF3"))},loading:ae.a}),exact:!0},{path:"/vspaces/:virtual_spacesId/courses",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__virtualSpaces__Lists__Course__index */[n.e(0),n.e(1),n.e(2),n.e(8),n.e(275)]).then(n.bind(null,/*! @/pages/virtualSpaces/Lists/Course/index */"vJub"))},loading:ae.a}),exact:!0},{path:"/vspaces/:virtual_spacesId/shixuns",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__virtualSpaces__Lists__Shixuns__index */[n.e(0),n.e(1),n.e(2),n.e(8),n.e(279)]).then(n.bind(null,/*! @/pages/virtualSpaces/Lists/Shixuns/index */"khc3"))},loading:ae.a}),exact:!0},{path:"/vspaces/:virtual_spacesId/videos",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__virtualSpaces__Lists__Video__index */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(284)]).then(n.bind(null,/*! @/pages/virtualSpaces/Lists/Video/index */"+Ee2"))},loading:ae.a}),exact:!0},{path:"/vspaces/:virtual_spacesId/videos/:username/upload",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__virtualSpaces__Lists__Video__Upload__index */[n.e(0),n.e(6),n.e(11),n.e(283)]).then(n.bind(null,/*! @/pages/virtualSpaces/Lists/Video/Upload/index */"/heT"))},loading:ae.a}),exact:!0},{path:"/vspaces/:virtual_spacesId/members",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__virtualSpaces__Lists__Member__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(277)]).then(n.bind(null,/*! @/pages/virtualSpaces/Lists/Member/index */"1QoP"))},loading:ae.a}),exact:!0},{path:"/vspaces/:virtual_spacesId/notices",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__virtualSpaces__Lists__Notices__index */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(278)]).then(n.bind(null,/*! @/pages/virtualSpaces/Lists/Notices/index */"s/Zd"))},loading:ae.a}),exact:!0},{path:"/vspaces/:virtual_spacesId/managements",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__virtualSpaces__Lists__Managements__index */[n.e(0),n.e(6),n.e(14),n.e(276)]).then(n.bind(null,/*! @/pages/virtualSpaces/Lists/Managements/index */"v6re"))},loading:ae.a}),exact:!0},{path:"/vspaces/*",component:Object(I.c)({loader:function(){return n.e(/*! import() | p__virtualSpaces__Lists__Construction__index */274).then(n.bind(null,/*! @/pages/virtualSpaces/Lists/Construction/index */"1iAk"))},loading:ae.a}),exact:!0}]}]},{path:"/innovation",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/innovation/tasks/:taskId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Innovation__Tasks */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(164)]).then(n.bind(null,/*! @/pages/Innovation/Tasks */"4pCv"))},loading:ae.a}),exact:!0},{path:"/innovation",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Innovation */[n.e(0),n.e(3),n.e(155)]).then(n.bind(null,/*! @/pages/Innovation */"qLCv"))},loading:ae.a}),routes:[{path:"/innovation/project",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Innovation__PublicProject */[n.e(0),n.e(1),n.e(2),n.e(8),n.e(163)]).then(n.bind(null,/*! @/pages/Innovation/PublicProject */"vYR1"))},loading:ae.a}),exact:!0},{path:"/innovation/dataset",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Innovation__PublicDataSet */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(161)]).then(n.bind(null,/*! @/pages/Innovation/PublicDataSet */"aWJQ"))},loading:ae.a}),exact:!0},{path:"/innovation/mirror",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Innovation__PublicMirror */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(162)]).then(n.bind(null,/*! @/pages/Innovation/PublicMirror */"cVrb"))},loading:ae.a}),exact:!0},{path:"/innovation/my-project",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Innovation__MyProject */[n.e(0),n.e(1),n.e(2),n.e(8),n.e(160)]).then(n.bind(null,/*! @/pages/Innovation/MyProject */"2b0W"))},loading:ae.a}),exact:!0},{path:"/innovation/my-dataset",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Innovation__MyDataSet */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(158)]).then(n.bind(null,/*! @/pages/Innovation/MyDataSet */"KFWQ"))},loading:ae.a}),exact:!0},{path:"/innovation/my-mirror",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Innovation__MyMirror */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(159)]).then(n.bind(null,/*! @/pages/Innovation/MyMirror */"AzlG"))},loading:ae.a}),exact:!0},{path:"/innovation/project/create",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Innovation__Edit */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(157)]).then(n.bind(null,/*! @/pages/Innovation/Edit */"A8hF"))},loading:ae.a}),exact:!0},{path:"/innovation/project/edit/:id",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Innovation__Edit */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(157)]).then(n.bind(null,/*! @/pages/Innovation/Edit */"A8hF"))},loading:ae.a}),exact:!0},{path:"/innovation/project/detail/:taskId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Innovation__Detail */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(156)]).then(n.bind(null,/*! @/pages/Innovation/Detail */"zXvr"))},loading:ae.a}),exact:!0}]}]},{path:"/educoder-demo",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Demo__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(124)]).then(n.bind(null,/*! @/pages/Demo/index */"4K8j"))},loading:ae.a})},{path:"/otherlogin",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__OtherLogin */[n.e(0),n.e(12),n.e(264)]).then(n.bind(null,/*! @/pages/User/OtherLogin */"6y+p"))},loading:ae.a})},{path:"/otherloginqq",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__QQLogin */[n.e(0),n.e(265)]).then(n.bind(null,/*! @/pages/User/QQLogin */"/pIo"))},loading:ae.a})},{path:"/otherloginstart",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__WechatLogin */[n.e(0),n.e(268)]).then(n.bind(null,/*! @/pages/User/WechatLogin */"o5Na"))},loading:ae.a})},{path:"/tasks/:taskId",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__tasks__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(272)]).then(n.bind(null,/*! @/pages/tasks/index */"yi/R"))},loading:ae.a})},{path:"/tasks/:identifier/jupyter/",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__tasks__Jupyter */[n.e(0),n.e(4),n.e(5),n.e(7),n.e(271)]).then(n.bind(null,/*! @/pages/tasks/Jupyter */"sUu2"))},loading:ae.a})},{path:"/myproblems/:id/record-detail/:submitId",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__MyProblem__RecordDetail */[n.e(0),n.e(5),n.e(7),n.e(20),n.e(172)]).then(n.bind(null,/*! @/pages/MyProblem/RecordDetail */"xTsT"))},loading:ae.a})},{path:"/myproblems/:id",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__MyProblem__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(173)]).then(n.bind(null,/*! @/pages/MyProblem/index */"QUZ3"))},loading:ae.a})},{path:"/login",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__user */[n.e(0),n.e(3),n.e(9),n.e(13),n.e(25)]).then(n.bind(null,/*! @/layouts/user */"zCei"))},loading:ae.a}),routes:[{path:"/login",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Login */[n.e(0),n.e(263)]).then(n.bind(null,/*! @/pages/User/Login */"8orJ"))},loading:ae.a}),exact:!0}]},{path:"/user",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__user */[n.e(0),n.e(3),n.e(9),n.e(13),n.e(25)]).then(n.bind(null,/*! @/layouts/user */"zCei"))},loading:ae.a}),routes:[{path:"/user/login",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Login */[n.e(0),n.e(263)]).then(n.bind(null,/*! @/pages/User/Login */"8orJ"))},loading:ae.a}),exact:!0},{path:"/user/register",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Register */[n.e(0),n.e(12),n.e(266)]).then(n.bind(null,/*! @/pages/User/Register */"7rcX"))},loading:ae.a}),exact:!0},{path:"/user/reset-password",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__ResetPassword */[n.e(0),n.e(12),n.e(267)]).then(n.bind(null,/*! @/pages/User/ResetPassword */"LsG1"))},loading:ae.a}),exact:!0}]},{path:"/account",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/account/:username",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Account */[n.e(15),n.e(28)]).then(n.bind(null,/*! @/pages/Account */"m3a9"))},loading:ae.a}),routes:[{path:"/account/profile",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Account__Profile__index */[n.e(0),n.e(1),n.e(2),n.e(6),n.e(32)]).then(n.bind(null,/*! @/pages/Account/Profile/index */"4w5S"))},loading:ae.a}),exact:!0},{path:"/account/profile/edit",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Account__Profile__Edit__index */[n.e(0),n.e(1),n.e(2),n.e(6),n.e(31)]).then(n.bind(null,/*! @/pages/Account/Profile/Edit/index */"Z3SC"))},loading:ae.a}),exact:!0},{path:"/account/certification",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Account__Certification__index */[n.e(0),n.e(1),n.e(2),n.e(6),n.e(30)]).then(n.bind(null,/*! @/pages/Account/Certification/index */"doOU"))},loading:ae.a}),exact:!0},{path:"/account/secure",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Account__Secure__index */[n.e(0),n.e(34)]).then(n.bind(null,/*! @/pages/Account/Secure/index */"0NIp"))},loading:ae.a}),exact:!0},{path:"/account/binding",component:Object(I.c)({loader:function(){return n.e(/*! import() | p__Account__Binding__index */29).then(n.bind(null,/*! @/pages/Account/Binding/index */"JMrj"))},loading:ae.a}),exact:!0},{path:"/account/Results",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Account__Results__index */[n.e(0),n.e(33)]).then(n.bind(null,/*! @/pages/Account/Results/index */"a90+"))},loading:ae.a}),exact:!0}]}]},{path:"/ch/:id",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/ch/rest/edit/:categoryId/:id",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__RestFul__Edit__index */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(197)]).then(n.bind(null,/*! @/pages/RestFul/Edit/index */"VwnK"))},loading:ae.a}),exact:!0},{path:"/ch/rest/",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__RestFul */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(196)]).then(n.bind(null,/*! @/pages/RestFul */"Etsf"))},loading:ae.a})},{path:"/ch/rest/:id",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__RestFul */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(196)]).then(n.bind(null,/*! @/pages/RestFul */"Etsf"))},loading:ae.a}),exact:!0}]},{path:"/order",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/order",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Order__index */[n.e(0),n.e(1),n.e(2),n.e(8),n.e(239)]).then(n.bind(null,/*! @/pages/User/Detail/Order/index */"udqy"))},loading:ae.a}),exact:!0},{path:"/order/:courseId/information",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Order__pages__orderInformation__index */[n.e(0),n.e(240)]).then(n.bind(null,/*! @/pages/User/Detail/Order/pages/orderInformation/index */"kpVO"))},loading:ae.a}),exact:!0},{path:"/order/:courseId/pay",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Order__pages__orderPay__index */[n.e(0),n.e(17),n.e(241)]).then(n.bind(null,/*! @/pages/User/Detail/Order/pages/orderPay/index */"EiJb"))},loading:ae.a}),exact:!0},{path:"/order/:orderNum/result",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__User__Detail__Order__pages__result__index */[n.e(0),n.e(242)]).then(n.bind(null,/*! @/pages/User/Detail/Order/pages/result/index */"Mcyw"))},loading:ae.a}),exact:!0}]},{path:"/colleges",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/colleges/:id/statistics",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Colleges__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(117)]).then(n.bind(null,/*! @/pages/Colleges/index */"hk80"))},loading:ae.a}),exact:!0}]},{path:"/help",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/help/:id",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Help__Index */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(148)]).then(n.bind(null,/*! @/pages/Help/Index */"TNY5"))},loading:ae.a}),exact:!0}]},{path:"/messages",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/messages/:userId/user_tidings",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Messages__Tidings */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(167)]).then(n.bind(null,/*! @/pages/Messages/Tidings */"YmwD"))},loading:ae.a}),exact:!0},{path:"/messages/:userId/private_messages",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Messages__Private */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(166)]).then(n.bind(null,/*! @/pages/Messages/Private */"EjUQ"))},loading:ae.a}),exact:!0},{path:"/messages/:userId/message_detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Messages__Detail */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(165)]).then(n.bind(null,/*! @/pages/Messages/Detail */"fB9n"))},loading:ae.a}),exact:!0}]},{path:"/video",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/video/:videoId",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Video__Detail__id */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(269)]).then(n.bind(null,/*! @/pages/Video/Detail/[id] */"96GE"))},loading:ae.a}),exact:!0}]},{path:"/terminal",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Terminal__ */[n.e(0),n.e(6),n.e(19),n.e(232)]).then(n.bind(null,/*! @/pages/Terminal/ */"PYMJ"))},loading:ae.a}),exact:!0},{path:"/detail",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Editor */[n.e(19),n.e(125)]).then(n.bind(null,/*! @/pages/Editor */"6xWC"))},loading:ae.a}),exact:!0},{path:"/",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | layouts__SimpleLayouts */[n.e(0),n.e(3),n.e(5),n.e(7),n.e(23)]).then(n.bind(null,/*! @/layouts/SimpleLayouts */"H8y1"))},loading:ae.a}),routes:[{path:"/",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__index */[n.e(0),n.e(4),n.e(1),n.e(2),n.e(270)]).then(n.bind(null,/*! @/pages/index */"QeBL"))},loading:ae.a})},{path:"/api/*",component:Object(I.c)({loader:function(){return n.e(/*! import() | p__Api */35).then(n.bind(null,/*! @/pages/Api */"y3wM"))},loading:ae.a}),exact:!0},{path:"/search",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Search__index */[n.e(0),n.e(1),n.e(2),n.e(8),n.e(198)]).then(n.bind(null,/*! @/pages/Search/index */"XQ9l"))},loading:ae.a})},{path:"/moop_cases",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__MoopCases__index */[n.e(0),n.e(1),n.e(2),n.e(8),n.e(171)]).then(n.bind(null,/*! @/pages/MoopCases/index */"9Oz4"))},loading:ae.a})},{path:"/moop_cases/new",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__MoopCases__FormPanel */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(168)]).then(n.bind(null,/*! @/pages/MoopCases/FormPanel */"nojB"))},loading:ae.a})},{path:"/moop_cases/:caseId",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__MoopCases__InfoPanel */[n.e(0),n.e(5),n.e(7),n.e(169)]).then(n.bind(null,/*! @/pages/MoopCases/InfoPanel */"ymAh"))},loading:ae.a})},{path:"/moop_cases/:caseId/edit",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__MoopCases__FormPanel */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(168)]).then(n.bind(null,/*! @/pages/MoopCases/FormPanel */"nojB"))},loading:ae.a})},{path:"/moop_cases/:caseId/publish-success",exact:!0,component:Object(I.c)({loader:function(){return n.e(/*! import() | p__MoopCases__Success */170).then(n.bind(null,/*! @/pages/MoopCases/Success */"NbJ3"))},loading:ae.a})},{path:"/randompaper",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paperlibrary__Random__AddAndEdit__index */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(175)]).then(n.bind(null,/*! @/pages/Paperlibrary/Random/AddAndEdit/index */"Dvv+"))},loading:ae.a})},{path:"/randompaper/edit/:id",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paperlibrary__Random__AddAndEdit__index */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(175)]).then(n.bind(null,/*! @/pages/Paperlibrary/Random/AddAndEdit/index */"Dvv+"))},loading:ae.a})},{path:"/randompaper/detail/:id",exact:!0,component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Paperlibrary__Random__Detail__index */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(176)]).then(n.bind(null,/*! @/pages/Paperlibrary/Random/Detail/index */"MpT9"))},loading:ae.a})},{path:"/403",component:Object(I.c)({loader:function(){return n.e(/*! import() | p__HttpStatus__403 */149).then(n.bind(null,/*! @/pages/HttpStatus/403 */"BqfQ"))},loading:ae.a}),exact:!0},{path:"/500",component:Object(I.c)({loader:function(){return n.e(/*! import() | p__HttpStatus__500 */151).then(n.bind(null,/*! @/pages/HttpStatus/500 */"IKT+"))},loading:ae.a}),exact:!0},{path:"/404",component:Object(I.c)({loader:function(){return n.e(/*! import() | p__HttpStatus__404 */150).then(n.bind(null,/*! @/pages/HttpStatus/404 */"Qgpj"))},loading:ae.a}),exact:!0},{path:"/iwce",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__HttpStatus__HpcCourse */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(152)]).then(n.bind(null,/*! @/pages/HttpStatus/HpcCourse */"gkVt"))},loading:ae.a}),exact:!0},{path:"/Activities",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__HttpStatus__SixActivities */[n.e(0),n.e(3),n.e(153)]).then(n.bind(null,/*! @/pages/HttpStatus/SixActivities */"KLXD"))},loading:ae.a}),exact:!0},{path:"/iwce/:itemname",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__HttpStatus__HpcCourse */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(152)]).then(n.bind(null,/*! @/pages/HttpStatus/HpcCourse */"gkVt"))},loading:ae.a}),exact:!0},{path:"/hpc-course",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__HttpStatus__HpcCourse */[n.e(0),n.e(1),n.e(2),n.e(5),n.e(152)]).then(n.bind(null,/*! @/pages/HttpStatus/HpcCourse */"gkVt"))},loading:ae.a}),exact:!0},{path:"/user_agents",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__HttpStatus__UserAgents */[n.e(0),n.e(1),n.e(2),n.e(8),n.e(154)]).then(n.bind(null,/*! @/pages/HttpStatus/UserAgents */"CRnD"))},loading:ae.a}),exact:!0},{path:"/three",component:Object(I.c)({loader:function(){return Promise.all(/*! import() | p__Three */[n.e(0),n.e(1),n.e(2),n.e(3),n.e(233)]).then(n.bind(null,/*! @/pages/Three */"T+//"))},loading:ae.a}),exact:!0},{component:Object(I.c)({loader:function(){return n.e(/*! import() | p__HttpStatus__404 */150).then(n.bind(null,/*! @/pages/HttpStatus/404 */"Qgpj"))},loading:ae.a}),exact:!0},{component:Object(I.c)({loader:function(){return n.e(/*! import() | p__HttpStatus__404 */150).then(n.bind(null,/*! @/pages/HttpStatus/404 */"Qgpj"))},loading:ae.a})}]}]}];return c.a.applyPlugins({key:"patchRoutes",type:I.a.event,args:{routes:e}}),e}n("hh8c");Object(v.c)();var ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return c.a.applyPlugins({key:"render",type:I.a.compose,initialValue:function(){return re(c.a.applyPlugins({key:"modifyClientRenderOpts",type:I.a.modify,initialValue:{routes:e.routes||oe(),plugin:c.a,history:Object(A.a)(e.hot),isServer:Object({NODE_ENV:"production"}).__IS_SERVER,dynamicImport:!0,rootElement:"root",defaultTitle:"头歌实践教学平台"}}))},args:e})}();t.default=ie();window.g_umi={version:"3.5.23"}},tEiQ: +/*!******************************************************************!*\ + !*** ./node_modules/mini-create-react-context/dist/esm/index.js ***! + \******************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module uses injected variables (global) */function(e,t,n){"use strict";(function(e){var r=n(/*! react */"q1tI"),a=n.n(r),o=n(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),i=n(/*! prop-types */"17x9"),c=n.n(i),u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:{};function s(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var l=a.a.createContext||function(e,t){var n,a,i,l="__create-react-context-"+((u[i="__global_unique_id__"]=(u[i]||0)+1)+"__"),p=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=s(t.props.value),t}Object(o.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[l]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,a=e.value;((o=r)===(i=a)?0!==o||1/o==1/i:o!=o&&i!=i)?n=0:(n="function"==typeof t?t(r,a):1073741823,0!==(n|=0)&&this.emitter.set(e.value,n))}var o,i},r.render=function(){return this.props.children},n}(r.Component);p.childContextTypes=((n={})[l]=c.a.object.isRequired,n);var f=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(o.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?1073741823:t},r.componentDidMount=function(){this.context[l]&&this.context[l].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?1073741823:e},r.componentWillUnmount=function(){this.context[l]&&this.context[l].off(this.onUpdate)},r.getValue=function(){return this.context[l]?this.context[l].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return f.contextTypes=((a={})[l]=c.a.object,a),{Provider:p,Consumer:f}};t.a=l}).call(this,n(/*! ./../../../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},tJVT: +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules ***! + \*******************************************************************************************************************/ +/*! 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/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 ***! + \***************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./actions */"AU/w");function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t"+e+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;h=r?function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=s("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F);for(var n=i.length;n--;)delete h.prototype[i[n]];return h()};c[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=a(e),n=new f,f.prototype=null,n[p]=e):n=h(),void 0===t?n:o(n,t)}},u0Sq: +/*!*************************************************!*\ + !*** ./node_modules/hash.js/lib/hash/ripemd.js ***! + \*************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ./utils */"w8CP"),a=n(/*! ./common */"7ckf"),o=r.rotl32,i=r.sum32,c=r.sum32_3,u=r.sum32_4,s=a.BlockHash;function l(){if(!(this instanceof l))return new l;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function p(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function f(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function d(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(l,s),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],a=this.h[2],s=this.h[3],l=this.h[4],v=n,g=r,_=a,x=s,w=l,j=0;j<80;j++){var O=i(o(u(n,p(j,r,a,s),e[h[j]+t],f(j)),b[j]),l);n=l,l=s,s=o(a,10),a=r,r=O,O=i(o(u(v,p(79-j,g,_,x),e[m[j]+t],d(j)),y[j]),w),v=w,w=x,x=o(_,10),_=g,g=O}O=c(this.h[1],a,x),this.h[1]=c(this.h[2],s,w),this.h[2]=c(this.h[3],l,v),this.h[3]=c(this.h[4],n,g),this.h[4]=c(this.h[0],r,_),this.h[0]=O},l.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var h=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],b=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},u4tm: +/*!**********************************************************************!*\ + !*** ./node_modules/connected-react-router/esm/index.js + 5 modules ***! + \**********************************************************************/ +/*! exports provided: LOCATION_CHANGE, CALL_HISTORY_METHOD, onLocationChanged, push, replace, go, goBack, goForward, routerActions, routerMiddleware, ConnectedRouter, connectRouter, getLocation, getAction, getHash, getSearch, createMatchSelector */ +/*! 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-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?arguments[1]:void 0,3);return u(n,(function(e){if(r(e,e,t))return u.stop(e)}),void 0,!1,!0).result}})},u6e6: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***! + \*********************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},u93E: +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/math-sign.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},uGHk: +/*!*************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/object-get-own-property-names.js ***! + \*************************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/object-keys-internal */"Srjj"),a=n(/*! ../internals/enum-bug-keys */"De94").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,a)}},uMwj: +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/define-iterator.js ***! + \***********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/create-iterator-constructor */"uoF6"),o=n(/*! ../internals/object-get-prototype-of */"Acmb"),i=n(/*! ../internals/object-set-prototype-of */"g1ZG"),c=n(/*! ../internals/set-to-string-tag */"kiNa"),u=n(/*! ../internals/create-non-enumerable-property */"lz10"),s=n(/*! ../internals/redefine */"NMFW"),l=n(/*! ../internals/well-known-symbol */"2kyd"),p=n(/*! ../internals/is-pure */"Zcjx"),f=n(/*! ../internals/iterators */"5yw/"),d=n(/*! ../internals/iterators-core */"JXem"),h=d.IteratorPrototype,m=d.BUGGY_SAFARI_ITERATORS,b=l("iterator"),y=function(){return this};e.exports=function(e,t,n,l,d,v,g){a(n,t,l);var _,x,w,j=function(e){if(e===d&&P)return P;if(!m&&e in E)return E[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},O=t+" Iterator",k=!1,E=e.prototype,S=E[b]||E["@@iterator"]||d&&E[d],P=!m&&S||j(d),C="Array"==t&&E.entries||S;if(C&&(_=o(C.call(new e)),h!==Object.prototype&&_.next&&(p||o(_)===h||(i?i(_,h):"function"!=typeof _[b]&&u(_,b,y)),c(_,O,!0,!0),p&&(f[O]=y))),"values"==d&&S&&"values"!==S.name&&(k=!0,P=function(){return S.call(this)}),p&&!g||E[b]===P||u(E,b,P),f[t]=P,d)if(x={values:j("values"),keys:v?P:j("keys"),entries:j("entries")},g)for(w in x)(m||k||!(w in E))&&s(E,w,x[w]);else r({target:t,proto:!0,forced:m||k},x);return x}},uVHs: +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.number.is-safe-integer.js ***! + \*******************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-integer */"M3b6"),o=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(e){return a(e)&&o(e)<=9007199254740991}})},uciX: +/*!*********************************************************!*\ + !*** ./node_modules/rc-trigger/es/index.js + 5 modules ***! + \*********************************************************/ +/*! exports provided: generateTrigger, default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js because of ./node_modules/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./node_modules/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./node_modules/rc-field-form/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./node_modules/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./node_modules/rc-select/es/Select.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./node_modules/rc-field-form/es/index.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/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-align/es/index.js because of ./node_modules/rc-tabs/node_modules/rc-trigger/es/Popup/PopupInner.js */ +/*! 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/rc-util/es/Dom/addEventListener.js because of ./node_modules/antd/es/modal/Modal.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js because of ./node_modules/antd/es/modal/Modal.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js because of ./node_modules/antd/es/typography/Base.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Portal.js because of ./node_modules/antd/es/modal/Modal.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js because of ./node_modules/rc-resize-observer/es/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/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";var r=n("VTBJ"),a=n("1OyB"),o=n("vuIU"),i=n("JX7q"),c=n("Ji7U"),u=n("LK+K"),s=n("q1tI"),l=n.n(s),p=n("i8i4"),f=n.n(p),d=n("l4aY"),h=n("m+aA"),m=n("c+Xe"),b=n("zT1h"),y=n("QC+M"),v=n("TSYQ"),g=n.n(v);function _(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var x=n("Ff2n"),w=n("xEkU"),j=n.n(w),O=n("9mu1"),k=n("8XRh"),E=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.className,a=e.style,o=e.children,i=e.onMouseEnter,c=e.onMouseLeave,u=e.onMouseDown,l=e.onTouchStart,p=o;return s.Children.count(o)>1&&(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;a94906265.62425156?i(e)+u:a(e-1+c(e-1)*c(e+1))}})},v3oe: +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.get-prototype-of.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/fails */"MVys"),o=n(/*! ../internals/to-object */"cTDu"),i=n(/*! ../internals/object-get-prototype-of */"Acmb"),c=n(/*! ../internals/correct-prototype-getter */"SprQ");r({target:"Object",stat:!0,forced:a((function(){i(1)})),sham:!c},{getPrototypeOf:function(e){return i(o(e))}})},vCeJ: +/*!*************************************!*\ + !*** ./src/service/paperlibrary.ts ***! + \*************************************/ +/*! exports provided: getDisciplines, getCustomDisciplines, getPaperlibraryList, setPublic, setPrivate, handleDelete, getCourseList, sendToClass, getPaperData, setScore, setShixunScore, handleDeleteEditQuestion, batchSetScore, batchDelete, adjustPosition, updatePaper, getTeachGroupData, batchPublic */ +/*! exports used: adjustPosition, batchDelete, batchPublic, batchSetScore, getCourseList, getCustomDisciplines, getDisciplines, getPaperData, getPaperlibraryList, getTeachGroupData, handleDelete, handleDeleteEditQuestion, sendToClass, setPrivate, setPublic, setScore, setShixunScore, updatePaper */function(e,t,n){"use strict";n.d(t,"g",(function(){return c})),n.d(t,"f",(function(){return s})),n.d(t,"i",(function(){return p})),n.d(t,"o",(function(){return d})),n.d(t,"n",(function(){return m})),n.d(t,"k",(function(){return y})),n.d(t,"e",(function(){return g})),n.d(t,"m",(function(){return x})),n.d(t,"h",(function(){return j})),n.d(t,"p",(function(){return k})),n.d(t,"q",(function(){return S})),n.d(t,"l",(function(){return C})),n.d(t,"d",(function(){return A})),n.d(t,"b",(function(){return M})),n.d(t,"a",(function(){return D})),n.d(t,"r",(function(){return N})),n.d(t,"j",(function(){return U})),n.d(t,"c",(function(){return V}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/utils/fetch */"ErOA");function c(e){return u.apply(this,arguments)}function u(){return(u=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/disciplines.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function s(e){return l.apply(this,arguments)}function l(){return(l=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/disciplines/by_examination_banks.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return f.apply(this,arguments)}function f(){return(f=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/examination_banks.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){return h.apply(this,arguments)}function h(){return(h=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/examination_banks/".concat(t.id,"/set_public.json"),{method:"post"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e){return b.apply(this,arguments)}function b(){return(b=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/examination_banks/".concat(t.id,"/set_private.json"),{method:"post"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return v.apply(this,arguments)}function v(){return(v=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/examination_banks/".concat(t.id,".json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){return _.apply(this,arguments)}function _(){return(_=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/question_banks/my_courses.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(e){return w.apply(this,arguments)}function w(){return(w=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/examination_banks/".concat(t.id,"/send_to_course.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(e){return O.apply(this,arguments)}function O(){return(O=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/examination_banks/".concat(t.id,".json"),{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e){return E.apply(this,arguments)}function E(){return(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/examination_banks/".concat(t.id,"/examination_banks_item_banks/").concat(t.itemId,"/set_score"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(e){return P.apply(this,arguments)}function P(){return(P=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/examination_banks/".concat(t.id,"/examination_banks_item_banks/").concat(t.itemId,"/set_shixun_score.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(e){return T.apply(this,arguments)}function T(){return(T=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/examination_banks/".concat(t.id,"/examination_banks_item_banks/").concat(t.itemId,".json"),{method:"delete"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(e){return I.apply(this,arguments)}function I(){return(I=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/examination_banks/".concat(t.id,"/examination_banks_item_banks/batch_set_score.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e){return L.apply(this,arguments)}function L(){return(L=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/examination_banks/".concat(t.id,"/examination_banks_item_banks/destroy_by_item_type.json"),{method:"delete",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function D(e){return R.apply(this,arguments)}function R(){return(R=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/examination_banks/".concat(t.id,"/examination_banks_item_banks/").concat(t.itemId,"/adjust_position.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function N(e){return F.apply(this,arguments)}function F(){return(F=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/examination_banks/".concat(t.id,".json"),{method:"put",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(e){return z.apply(this,arguments)}function z(){return(z=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/teach_group_shares.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(e){return q.apply(this,arguments)}function q(){return(q=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/examination_banks/set_batch_public.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},vO0A: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/collection-strong.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/object-define-property */"YfKC").f,a=n(/*! ../internals/object-create */"u+7+"),o=n(/*! ../internals/redefine-all */"ujhg"),i=n(/*! ../internals/function-bind-context */"7BAe"),c=n(/*! ../internals/an-instance */"igoe"),u=n(/*! ../internals/iterate */"IuhT"),s=n(/*! ../internals/define-iterator */"uMwj"),l=n(/*! ../internals/set-species */"ssJt"),p=n(/*! ../internals/descriptors */"tny8"),f=n(/*! ../internals/internal-metadata */"a5mf").fastKey,d=n(/*! ../internals/internal-state */"1aI8"),h=d.set,m=d.getterFor;e.exports={getConstructor:function(e,t,n,s){var l=e((function(e,r){c(e,l,t),h(e,{type:t,index:a(null),first:void 0,last:void 0,size:0}),p||(e.size=0),null!=r&&u(r,e[s],e,n)})),d=m(t),b=function(e,t,n){var r,a,o=d(e),i=y(e,t);return i?i.value=n:(o.last=i={index:a=f(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=i),r&&(r.next=i),p?o.size++:e.size++,"F"!==a&&(o.index[a]=i)),e},y=function(e,t){var n,r=d(e),a=f(t);if("F"!==a)return r.index[a];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o(l.prototype,{clear:function(){for(var e=d(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,p?e.size=0:this.size=0},delete:function(e){var t=d(this),n=y(this,e);if(n){var r=n.next,a=n.previous;delete t.index[n.index],n.removed=!0,a&&(a.next=r),r&&(r.previous=a),t.first==n&&(t.first=r),t.last==n&&(t.last=a),p?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=d(this),r=i(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!y(this,e)}}),o(l.prototype,n?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return b(this,0===e?0:e,t)}}:{add:function(e){return b(this,e=0===e?0:e,e)}}),p&&r(l.prototype,"size",{get:function(){return d(this).size}}),l},setStrong:function(e,t,n){var r=t+" Iterator",a=m(t),o=m(r);s(e,t,(function(e,t){h(this,{type:r,target:e,state:a(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),l(t)}}},vRGJ: +/*!**********************************************!*\ + !*** ./node_modules/path-to-regexp/index.js ***! + \**********************************************/ +/*! no static exports found */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! isarray */"AqCL");e.exports=d,e.exports.parse=o,e.exports.compile=function(e,t){return c(o(e,t),t)},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=f;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,i=0,c="",l=t&&t.delimiter||"/";null!=(n=a.exec(e));){var p=n[0],f=n[1],d=n.index;if(c+=e.slice(i,d),i=d+p.length,f)c+=f[1];else{var h=e[i],m=n[2],b=n[3],y=n[4],v=n[5],g=n[6],_=n[7];c&&(r.push(c),c="");var x=null!=m&&null!=h&&h!==m,w="+"===g||"*"===g,j="?"===g||"*"===g,O=n[2]||l,k=y||v;r.push({name:b||o++,prefix:m||"",delimiter:O,optional:j,repeat:w,partial:x,asterisk:!!_,pattern:k?s(k):_?".*":"[^"+u(O)+"]+?"})}}return iA.length&&A.push(e)}function L(e,t,n){return null==e?0:function e(t,n,r,a){var c=typeof t;"undefined"!==c&&"boolean"!==c||(t=null);var u=!1;if(null===t)u=!0;else switch(c){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case i:u=!0}}if(u)return r(a,t,""===n?"."+D(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s1?arguments[1]:void 0)}})},vpQ4: +/*!*****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/objectSpread.js ***! + \*****************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(/*! ./defineProperty.js */"rePB");function a(e){for(var t=1;t=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function c(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=a,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a>6|192,n[r++]=63&i|128):o(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128)}else for(a=0;a>>0}return i},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,a=0;r>>24,n[a+1]=o>>>16&255,n[a+2]=o>>>8&255,n[a+3]=255&o):(n[a+3]=o>>>24,n[a+2]=o>>>16&255,n[a+1]=o>>>8&255,n[a]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,a){return e+t+n+r+a>>>0},t.sum64=function(e,t,n,r){var a=e[t],o=r+e[t+1]>>>0,i=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,a,o,i,c){var u=0,s=t;return u+=(s=s+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,r,a,o,i,c){return t+r+o+c>>>0},t.sum64_5_hi=function(e,t,n,r,a,o,i,c,u,s){var l=0,p=t;return l+=(p=p+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,r,a,o,i,c,u,s){return t+r+o+c+s>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},wCfY: +/*!**************************************!*\ + !*** ./src/models/classrooms/new.ts ***! + \**************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),i=n(/*! @/service/classrooms */"oUNq"),c={namespace:"newClassroom",state:{schoolList:[],searchCourseList:[],actionTabs:{key:"",params:{}}},effects:{getSchoolList: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.kb,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{schoolList:(null==u?void 0:u.school_names)||[]}});case 7:case"end":return e.stop()}}),e)})),getSearchCourseList: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.lb,r);case 4:return u=e.sent,e.next=7,c({type:"save",payload:{searchCourseList:(null==u?void 0:u.course_lists)||[]}});case 7:case"end":return e.stop()}}),e)})),submitCourses: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.Ab,r);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})),appplySchool: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)})),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)})),joincoursegroup: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)}))},reducers:{save:function(e,t){return Object(r.a)(Object(r.a)({},e),t.payload)}},subscriptions:{setup:function(e){e.dispatch,e.history}}};t.a=c},wTVA: +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! + \***************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},waHm: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.fill.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/array-buffer-view-core */"FVwB"),a=n(/*! ../internals/array-fill */"VSU6"),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(e){return a.apply(o(this),arguments)}))},wgJM: +/*!****************************************!*\ + !*** ./node_modules/rc-util/es/raf.js ***! + \****************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=function(e){return+setTimeout(e,16)},a=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(r=function(e){return window.requestAnimationFrame(e)},a=function(e){return window.cancelAnimationFrame(e)});var o=0,i=new Map;function c(e){i.delete(e)}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=o+=1;function a(t){if(0===t)c(n),e();else{var o=r((function(){a(t-1)}));i.set(n,o)}}return a(t),n}u.cancel=function(e){var t=i.get(e);return c(t),a(t)}},wgKq: +/*!*************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/use-symbol-as-uid.js ***! + \*************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/native-symbol */"Fs9M");e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},wkBT: +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***! + \****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},wpse: +/*!******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.symbol.async-iterator.js ***! + \******************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/define-well-known-symbol */"I65O")("asyncIterator")},wx14: +/*!************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***! + \************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t1?arguments[1]:void 0,3);return u(n,(function(e,n){if(r(n,e,t))return u.stop()}),void 0,!0,!0).stopped}})},xKgJ: +/*!********************************!*\ + !*** ./src/utils/authority.ts ***! + \********************************/ +/*! exports provided: getRoleAuth, isMainSite, courseIsEnd, getAuthentication, isAdmin, isAdminOrAssistant, isAdminOrAuthor, isSuperAdmin, isAdminOrCreator, isSuperAdmins, isAdminAndCreator, isAdminOrCreatorOrOperation, isAdminOrTeacher, isAssistant, isTeacher, isStudent, isAdminOrStudent, isAdmins, isNotMember, canCommonAdd, canCommonDelete, canCommonUpdate, isStudents, canCommonView, canCommonDownload, canShixunAdd, canShixunDelete, canShixunUpdate, canShixunView, canShixunSendToClassroom, canShixunViewAnswer, canShixunCancelPublic, canProblemsetAdd, canProblemsetDelete, canProblemsetUpdate, canProblemsetView, canProblemsetGroup, canProblemsetCancelPublic, canProblemsetCorrection, canProblemsetCollect, canProblemsetViewAnalysis, canPaperlibraryAdd, canPaperlibraryDelete, canPaperlibraryUpdate, canPaperlibraryView, canPaperlibraryCancelPublic, canPaperlibrarySendToClassroom, authentication, isCommonSuperAdmin, isCommonSuperAdminOrOperation, isCommonStudent, isCommonAdminOrCreator, isLogin, userInfo */ +/*! exports used: canShixunAdd, courseIsEnd, isAdmin, isAdminOrAssistant, isAdminOrAuthor, isAdminOrCreator, isAdminOrCreatorOrOperation, isAdminOrStudent, isAdminOrTeacher, isAdmins, isAssistant, isCommonAdminOrCreator, isCommonStudent, isCommonSuperAdmin, isCommonSuperAdminOrOperation, isLogin, isMainSite, isNotMember, isStudent, isStudents, isSuperAdmin, isSuperAdmins, isTeacher, userInfo */function(e,t,n){"use strict";n.d(t,"q",(function(){return u})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return f})),n.d(t,"u",(function(){return d})),n.d(t,"f",(function(){return h})),n.d(t,"v",(function(){return m})),n.d(t,"g",(function(){return b})),n.d(t,"i",(function(){return y})),n.d(t,"k",(function(){return v})),n.d(t,"w",(function(){return g})),n.d(t,"s",(function(){return _})),n.d(t,"h",(function(){return x})),n.d(t,"j",(function(){return w})),n.d(t,"r",(function(){return j})),n.d(t,"t",(function(){return O})),n.d(t,"a",(function(){return k})),n.d(t,"n",(function(){return E})),n.d(t,"o",(function(){return S})),n.d(t,"m",(function(){return P})),n.d(t,"l",(function(){return C})),n.d(t,"p",(function(){return T})),n.d(t,"x",(function(){return A}));var r,a,o=n(/*! umi */"9kvl");!function(e){e[e.SuperAdmin=1]="SuperAdmin",e[e.Operation=2]="Operation",e[e.CertifiedTeacher=5]="CertifiedTeacher",e[e.TrainingProduction=8]="TrainingProduction",e[e.UncertifiedTeacher=12]="UncertifiedTeacher",e[e.Student=15]="Student"}(r||(r={})),function(e){e[e.SuperAdmin=1]="SuperAdmin",e[e.Operation=2]="Operation",e[e.Admin=5]="Admin",e[e.Teacher=8]="Teacher",e[e.Assistant=12]="Assistant",e[e.Student=15]="Student"}(a||(a={}));var i=function(e){var t=Object(o.c)()._store.getState().user.userInfo;return e.some((function(e){return e==(null==t?void 0:t.role)}))},c=function(e){var t=Object(o.c)()._store.getState().user.userInfo;return!(null==t||!t.own)||e.some((function(e){var n;return e==(null==t||null===(n=t.course)||void 0===n?void 0:n.course_role)}))},u=function(){return Object(o.c)()._store.getState().user.userInfo.main_site},s=function(){var e,t=Object(o.c)()._store.getState().user.userInfo;return null==t||null===(e=t.course)||void 0===e?void 0:e.course_is_end},l=function(){return c([a.SuperAdmin,a.Operation,a.Admin,a.Teacher,a.Assistant])},p=function(){return c([a.SuperAdmin,a.Teacher,a.Admin,a.Assistant,a.Operation])},f=function(){return c([a.SuperAdmin,a.Teacher,a.Admin])},d=function(){return c([a.SuperAdmin])},h=function(){return c([a.SuperAdmin,a.Operation,a.Admin])},m=function(){return i([a.SuperAdmin,a.Operation])},b=function(){return c([a.SuperAdmin,a.Admin,a.Operation])},y=function(){return c([a.SuperAdmin,a.Operation,a.Admin,a.Teacher])},v=function(){return c([a.Assistant])},g=function(){return c([a.Teacher])},_=function(){return c([a.Student])},x=function(){return c([a.SuperAdmin,a.Operation,a.Admin,a.Teacher,a.Assistant,a.Student])},w=function(){return c([a.SuperAdmin,a.Operation,a.Admin,a.Teacher,a.Assistant])},j=function(){var e,t=Object(o.c)()._store.getState().user.userInfo;return null===(null==t||null===(e=t.course)||void 0===e?void 0:e.course_role)},O=function(){return i([a.Student])},k=function(){return i([r.SuperAdmin,r.Operation,r.CertifiedTeacher,r.TrainingProduction])},E=function(){return i([r.SuperAdmin])},S=function(){return i([r.SuperAdmin,r.Operation])},P=function(){return i([r.Student])},C=function(){return i([r.SuperAdmin,r.Operation,r.CertifiedTeacher])},T=function(){var e;return!(null===(e=Object(o.c)()._store.getState().user.userInfo)||void 0===e||!e.login)},A=function(){return Object(o.c)()._store.getState().user.userInfo}},xRZI: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/engine-is-ios.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/engine-user-agent */"Qlla");e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},xaQh: +/*!************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/esnext.reflect.define-metadata.js ***! + \************************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/reflect-metadata */"ls1J"),o=n(/*! ../internals/an-object */"f1E4"),i=a.toKey,c=a.set;r({target:"Reflect",stat:!0},{defineMetadata:function(e,t,n){var r=arguments.length<4?void 0:i(arguments[3]);c(e,t,o(n),r)}})},xtlo: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.number.to-fixed.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/to-integer */"m0kY"),o=n(/*! ../internals/this-number-value */"F52u"),i=n(/*! ../internals/string-repeat */"+rjg"),c=n(/*! ../internals/fails */"MVys"),u=1..toFixed,s=Math.floor,l=function(e,t,n){return 0===t?n:t%2==1?l(e,t-1,n*e):l(e*e,t/2,n)};r({target:"Number",proto:!0,forced:u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c((function(){u.call({})}))},{toFixed:function(e){var t,n,r,c,u=o(this),p=a(e),f=[0,0,0,0,0,0],d="",h="0",m=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*f[n],f[n]=r%1e7,r=s(r/1e7)},b=function(e){for(var t=6,n=0;--t>=0;)n+=f[t],f[t]=s(n/e),n=n%e*1e7},y=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==f[e]){var n=String(f[e]);t=""===t?n:t+i.call("0",7-n.length)+n}return t};if(p<0||p>20)throw RangeError("Incorrect fraction digits");if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(d="-",u=-u),u>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(u*l(2,69,1))-69)<0?u*l(2,-t,1):u/l(2,t,1),n*=4503599627370496,(t=52-t)>0){for(m(0,n),r=p;r>=7;)m(1e7,0),r-=7;for(m(l(10,r,1),0),r=t-1;r>=23;)b(1<<23),r-=23;b(1<0?d+((c=h.length)<=p?"0."+i.call("0",p-c)+h:h.slice(0,c-p)+"."+h.slice(c-p)):d+h}})},xxWa: +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.fontsize.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/create-html */"V85Q");r({target:"String",proto:!0,forced:n(/*! ../internals/string-html-forced */"NQQk")("fontsize")},{fontsize:function(e){return a(this,"font","size",e)}})},xxaU: +/*!**************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/shared.js ***! + \**************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/is-pure */"Zcjx"),a=n(/*! ../internals/shared-store */"pb5k");(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"y36+": +/*!****************************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.uint8-clamped-array.js ***! + \****************************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/typed-array-constructor */"Mi8B")("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0)},y4z8: +/*!**********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.object.prevent-extensions.js ***! + \**********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/is-object */"tSXo"),o=n(/*! ../internals/internal-metadata */"a5mf").onFreeze,i=n(/*! ../internals/freezing */"R/Zn"),c=n(/*! ../internals/fails */"MVys"),u=Object.preventExtensions;r({target:"Object",stat:!0,forced:c((function(){u(1)})),sham:!i},{preventExtensions:function(e){return u&&a(e)?u(o(e)):e}})},y9mK: +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/string-pad-webkit-bug.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/engine-user-agent */"Qlla");e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},yIAO: +/*!***************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.regexp.constructor.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/descriptors */"tny8"),a=n(/*! ../internals/global */"ukPv"),o=n(/*! ../internals/is-forced */"kkxG"),i=n(/*! ../internals/inherit-if-required */"+vfm"),c=n(/*! ../internals/object-define-property */"YfKC").f,u=n(/*! ../internals/object-get-own-property-names */"uGHk").f,s=n(/*! ../internals/is-regexp */"YON3"),l=n(/*! ../internals/regexp-flags */"k/J9"),p=n(/*! ../internals/regexp-sticky-helpers */"M8HR"),f=n(/*! ../internals/redefine */"NMFW"),d=n(/*! ../internals/fails */"MVys"),h=n(/*! ../internals/internal-state */"1aI8").set,m=n(/*! ../internals/set-species */"ssJt"),b=n(/*! ../internals/well-known-symbol */"2kyd")("match"),y=a.RegExp,v=y.prototype,g=/a/g,_=/a/g,x=new y(g)!==g,w=p.UNSUPPORTED_Y;if(r&&o("RegExp",!x||w||d((function(){return _[b]=!1,y(g)!=g||y(_)==_||"/a/i"!=y(g,"i")})))){for(var j=function(e,t){var n,r=this instanceof j,a=s(e),o=void 0===t;if(!r&&a&&e.constructor===j&&o)return e;x?a&&!o&&(e=e.source):e instanceof j&&(o&&(t=l.call(e)),e=e.source),w&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var c=i(x?new y(e,t):y(e,t),r?this:v,j);return w&&n&&h(c,{sticky:n}),c},O=function(e){e in j||c(j,e,{configurable:!0,get:function(){return y[e]},set:function(t){y[e]=t}})},k=u(y),E=0;k.length>E;)O(k[E++]);v.constructor=j,j.prototype=v,f(a,"RegExp",j)}m("RegExp")},yKVA: +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules ***! + \**************************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return a}))},yMj0: +/*!*************************************!*\ + !*** ./src/service/announcement.ts ***! + \*************************************/ +/*! exports provided: informUp, informDown, updateInforms, newInforms */ +/*! exports used: informDown, informUp, newInforms, updateInforms */function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return h}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),i=n.n(o),c=n(/*! @/utils/fetch */"ErOA");function u(e){return s.apply(this,arguments)}function s(){return(s=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/inform_up.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return p.apply(this,arguments)}function p(){return(p=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/inform_down.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/update_informs.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(c.a)("/api/courses/".concat(t.coursesId,"/new_informs.json"),{method:"post",body:Object(r.a)({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},yZgL: +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.string.fixed.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ../internals/export */"MMxC"),a=n(/*! ../internals/create-html */"V85Q");r({target:"String",proto:!0,forced:n(/*! ../internals/string-html-forced */"NQQk")("fixed")},{fixed:function(){return a(this,"tt","","")}})},yiTY: +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/modules/es.typed-array.int32-array.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){n(/*! ../internals/typed-array-constructor */"Mi8B")("Int32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},yj7k: +/*!************************************************************************************************!*\ + !*** ./node_modules/@umijs/babel-plugin-lock-core-js-3/node_modules/core-js/internals/html.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../internals/get-built-in */"29mP");e.exports=r("document","documentElement")},yl30: +/*!****************************************************************!*\ + !*** ./node_modules/react-dom/cjs/react-dom.production.min.js ***! + \****************************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict"; +/** @license React v16.12.0 + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r=n(/*! react */"q1tI"),a=n(/*! object-assign */"MgzW"),o=n(/*! scheduler */"QCnb");function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n