You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Video__Detail__id.33d734...

5 lines
101 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[232,14],{"1ZF9":function(Be,Se,s){Be.exports=s.p+"static/Authorize.cc9c212f.png"},"96GE":function(Be,Se,s){"use strict";s.r(Se),s.d(Se,"formatQuery",function(){return dt});var rt=s("T2oS"),ze=s("W9HT"),Ie=s("k1fw"),nt=s("PpiC"),se=s("q1tI"),h=s.n(se),ne=s("9kvl"),at=s("JqQi"),ot=s.n(at),ut=s("5Dmo"),Z=s("3S7+"),Xe=s("+L6B"),Oe=s("2/Rp"),ve=s("pC0b"),Ne=s("GzdX"),Ke=s("9og8"),xe=s("tJVT"),Me=s("nUhQ"),Pe=s.n(Me),ae=s("2qtc"),Ue=s("kLXV"),tt=s("7Kak"),le=s("9yH6"),he=s("miYZ"),oe=s("tsqr"),He=s("5NDa"),ee=s("5rEg"),qe=s("Ty5D"),Ze=s("sWEp"),I=s.n(Ze),ke=s("qdXH");function Je(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Je=function(){return g};var g={},M=Object.prototype,D=M.hasOwnProperty,W=typeof Symbol=="function"?Symbol:{},ie=W.iterator||"@@iterator",Ve=W.asyncIterator||"@@asyncIterator",Ee=W.toStringTag||"@@toStringTag";function O(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{O({},"")}catch(t){O=function(r,n,o){return r[n]=o}}function Ce(t,e,r,n){var o=e&&e.prototype instanceof pe?e:pe,a=Object.create(o.prototype),u=new U(n||[]);return a._invoke=function(p,m,i){var d="suspendedStart";return function(R,we){if(d==="executing")throw new Error("Generator is already running");if(d==="completed"){if(R==="throw")throw we;return Q()}for(i.method=R,i.arg=we;;){var be=i.delegate;if(be){var We=Le(be,i);if(We){if(We===A)continue;return We}}if(i.method==="next")i.sent=i._sent=i.arg;else if(i.method==="throw"){if(d==="suspendedStart")throw d="completed",i.arg;i.dispatchException(i.arg)}else i.method==="return"&&i.abrupt("return",i.arg);d="executing";var Te=ge(p,m,i);if(Te.type==="normal"){if(d=i.done?"completed":"suspendedYield",Te.arg===A)continue;return{value:Te.arg,done:i.done}}Te.type==="throw"&&(d="completed",i.method="throw",i.arg=Te.arg)}}}(t,r,u),a}function ge(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}g.wrap=Ce;var A={};function pe(){}function V(){}function _(){}var k={};O(k,ie,function(){return this});var H=Object.getPrototypeOf,F=H&&H(H(Y([])));F&&F!==M&&D.call(F,ie)&&(k=F);var C=_.prototype=pe.prototype=Object.create(k);function me(t){["next","throw","return"].forEach(function(e){O(t,e,function(r){return this._invoke(e,r)})})}function z(t,e){function r(o,a,u,p){var m=ge(t[o],t,a);if(m.type!=="throw"){var i=m.arg,d=i.value;return d&&typeof d=="object"&&D.call(d,"__await")?e.resolve(d.__await).then(function(R){r("next",R,u,p)},function(R){r("throw",R,u,p)}):e.resolve(d).then(function(R){i.value=R,u(i)},function(R){return r("throw",R,u,p)})}p(m.arg)}var n;this._invoke=function(o,a){function u(){return new e(function(p,m){r(o,a,p,m)})}return n=n?n.then(u,u):u()}}function Le(t,e){var r=t.iterator[e.method];if(r===void 0){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=void 0,Le(t,e),e.method==="throw"))return A;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return A}var n=ge(r,t.iterator,e.arg);if(n.type==="throw")return e.method="throw",e.arg=n.arg,e.delegate=null,A;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,A):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,A)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function re(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function U(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function Y(t){if(t){var e=t[ie];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var r=-1,n=function o(){for(;++r<t.length;)if(D.call(t,r))return o.value=t[r],o.done=!1,o;return o.value=void 0,o.done=!0,o};return n.next=n}}return{next:Q}}function Q(){return{value:void 0,done:!0}}return V.prototype=_,O(C,"constructor",_),O(_,"constructor",V),V.displayName=O(_,Ee,"GeneratorFunction"),g.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===V||(e.displayName||e.name)==="GeneratorFunction")},g.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,O(t,Ee,"GeneratorFunction")),t.prototype=Object.create(C),t},g.awrap=function(t){return{__await:t}},me(z.prototype),O(z.prototype,Ve,function(){return this}),g.AsyncIterator=z,g.async=function(t,e,r,n,o){o===void 0&&(o=Promise);var a=new z(Ce(t,e,r,n),o);return g.isGeneratorFunction(e)?a:a.next().then(function(u){return u.done?u.value:a.next()})},me(C),O(C,Ee,"Generator"),O(C,ie,function(){return this}),O(C,"toString",function(){return"[object Generator]"}),g.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function n(){for(;e.length;){var o=e.pop();if(o in t)return n.value=o,n.done=!1,n}return n.done=!0,n}},g.values=Y,U.prototype={constructor:U,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(re),!e)for(var r in this)r.charAt(0)==="t"&&D.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(i,d){return u.type="throw",u.arg=e,r.next=i,d&&(r.method="next",r.arg=void 0),!!d}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var p=D.call(a,"catchLoc"),m=D.call(a,"finallyLoc");if(p&&m){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(p){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!m)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&D.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(e==="break"||e==="continue")&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var u=a?a.completion:{};return u.type=e,u.arg=r,a?(this.method="next",this.next=a.finallyLoc,A):this.complete(u)},complete:function(e,r){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&r&&(this.next=r),A},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),re(n),A}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===e){var o=n.completion;if(o.type==="throw"){var a=o.arg;re(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:Y(e),resultName:r,nextLoc:n},this.method==="next"&&(this.arg=void 0),A}},g}var Ge=ee.a.Search,de=function(M){var D,W=M.videoDetail,ie=M.globalSetting,Ve=M.loading,Ee=M.dispatch,O=Object(nt.a)(M,["videoDetail","globalSetting","loading","dispatch"]),Ce=Object(qe.m)(),ge=Object(qe.l)(),A=Object(se.useState)([]),pe=Object(xe.a)(A,2),V=pe[0],_=pe[1],k=Object(se.useState)(""),H=Object(xe.a)(k,2),F=H[0],C=H[1],me=Object(se.useState)(),z=Object(xe.a)(me,2),Le=z[0],B=z[1],re=Object(se.useState)(!1),U=Object(xe.a)(re,2),Y=U[0],Q=U[1],t=Object(se.useState)(!1),e=Object(xe.a)(t,2),r=e[0],n=e[1];Object(se.useEffect)(function(){W.actionTabs.key==="Banner-SendToClass"&&o()},[W.actionTabs.key]);var o=function(){var m=Object(Ke.a)(Je().mark(function i(){var d,R;return Je().wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return be.next=2,Object(ke.h)({});case 2:if(R=be.sent,!(R==null||((d=R.courses)===null||d===void 0)?void 0:d.length)){be.next=8;break}_((R==null?void 0:R.courses)||[]),n(!0),be.next=11;break;case 8:return p(),oe.b.info("\u60A8\u5F53\u524D\u6CA1\u6709\u7BA1\u7406\u4EFB\u4F55\u8BFE\u5802\uFF0C\u4E0D\u53EF\u53D1\u9001"),be.abrupt("return");case 11:case"end":return be.stop()}},i)}));return function(){return m.apply(this,arguments)}}(),a=function(i){_(V==null?void 0:V.map(function(d){return Object(Ie.a)(Object(Ie.a)({},d),{},{hide:!d.course_name.includes(i)})}))},u=function(){var m=Object(Ke.a)(Je().mark(function i(){var d;return Je().wrap(function(we){for(;;)switch(we.prev=we.next){case 0:if(Le){we.next=3;break}return Q(!0),we.abrupt("return");case 3:return we.next=5,Object(ke.n)({id:Ce.videoId,course_id:Le});case 5:d=we.sent,(d==null?void 0:d.status)===0&&(oe.b.success("\u53D1\u9001\u6210\u529F"),p(),ne.c===null||ne.c===void 0||ne.c.replace("/classrooms/".concat(Le,"/shixun_homework")));case 7:case"end":return we.stop()}},i)}));return function(){return m.apply(this,arguments)}}(),p=function(){C(""),B(null),Q(!1),Ee({type:"videoDetail/setActionTabs",payload:{}}),n(!1)};return h.a.createElement(Ue.a,{centered:!0,keyboard:!1,closable:!1,title:"\u53D1\u9001\u81F3\u8BFE\u5802",visible:r,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:u,onCancel:p},h.a.createElement("div",{className:I.a.wrap},h.a.createElement("div",{className:"mb10"},h.a.createElement(Ge,{placeholder:"\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:F,onChange:function(i){return C(i.target.value)},onSearch:function(i){C(i),a(i)}})),h.a.createElement("div",{className:I.a.radioWrap},h.a.createElement(le.a.Group,{value:Le,onChange:function(i){B(i.target.value),Q(!1)}},V==null||((D=V.filter(function(m){return!(m==null?void 0:m.hide)}))===null||D===void 0)?void 0:D.map(function(m,i){return h.a.createElement(le.a,{className:I.a.radio,value:m.course_id,key:i},m.course_name)}))),Y&&h.a.createElement("div",{className:I.a.colorFF0000},"\u8BF7\u9009\u62E9\u4F60\u8981\u53D1\u9001\u7684\u8BFE\u5802"),h.a.createElement("div",{className:I.a.title},"\u6E29\u99A8\u63D0\u793A\uFF1A\u5F53\u524D\u89C6\u9891\u9879\u76EE\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802")))},_e=Object(ne.a)(function(g){var M=g.videoDetail,D=g.loading,W=g.globalSetting;return{videoDetail:M,globalSetting:W,loading:D.models.index}})(de),P=s("sBCT"),c=s("1vsH"),l=s("NLgs"),E=s("Awhp"),L=s("KrTs"),b=s("O3gP"),j=s("lrIw"),q=s("oBTY"),ue=s("eoI0"),J=s.n(ue),$=s("HBuW");function X(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */X=function(){return g};var g={},M=Object.prototype,D=M.hasOwnProperty,W=typeof Symbol=="function"?Symbol:{},ie=W.iterator||"@@iterator",Ve=W.asyncIterator||"@@asyncIterator",Ee=W.toStringTag||"@@toStringTag";function O(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{O({},"")}catch(t){O=function(r,n,o){return r[n]=o}}function Ce(t,e,r,n){var o=e&&e.prototype instanceof pe?e:pe,a=Object.create(o.prototype),u=new U(n||[]);return a._invoke=function(p,m,i){var d="suspendedStart";return function(R,we){if(d==="executing")throw new Error("Generator is already running");if(d==="completed"){if(R==="throw")throw we;return Q()}for(i.method=R,i.arg=we;;){var be=i.delegate;if(be){var We=Le(be,i);if(We){if(We===A)continue;return We}}if(i.method==="next")i.sent=i._sent=i.arg;else if(i.method==="throw"){if(d==="suspendedStart")throw d="completed",i.arg;i.dispatchException(i.arg)}else i.method==="return"&&i.abrupt("return",i.arg);d="executing";var Te=ge(p,m,i);if(Te.type==="normal"){if(d=i.done?"completed":"suspendedYield",Te.arg===A)continue;return{value:Te.arg,done:i.done}}Te.type==="throw"&&(d="completed",i.method="throw",i.arg=Te.arg)}}}(t,r,u),a}function ge(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}g.wrap=Ce;var A={};function pe(){}function V(){}function _(){}var k={};O(k,ie,function(){return this});var H=Object.getPrototypeOf,F=H&&H(H(Y([])));F&&F!==M&&D.call(F,ie)&&(k=F);var C=_.prototype=pe.prototype=Object.create(k);function me(t){["next","throw","return"].forEach(function(e){O(t,e,function(r){return this._invoke(e,r)})})}function z(t,e){function r(o,a,u,p){var m=ge(t[o],t,a);if(m.type!=="throw"){var i=m.arg,d=i.value;return d&&typeof d=="object"&&D.call(d,"__await")?e.resolve(d.__await).then(function(R){r("next",R,u,p)},function(R){r("throw",R,u,p)}):e.resolve(d).then(function(R){i.value=R,u(i)},function(R){return r("throw",R,u,p)})}p(m.arg)}var n;this._invoke=function(o,a){function u(){return new e(function(p,m){r(o,a,p,m)})}return n=n?n.then(u,u):u()}}function Le(t,e){var r=t.iterator[e.method];if(r===void 0){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=void 0,Le(t,e),e.method==="throw"))return A;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return A}var n=ge(r,t.iterator,e.arg);if(n.type==="throw")return e.method="throw",e.arg=n.arg,e.delegate=null,A;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,A):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,A)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function re(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function U(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function Y(t){if(t){var e=t[ie];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var r=-1,n=function o(){for(;++r<t.length;)if(D.call(t,r))return o.value=t[r],o.done=!1,o;return o.value=void 0,o.done=!0,o};return n.next=n}}return{next:Q}}function Q(){return{value:void 0,done:!0}}return V.prototype=_,O(C,"constructor",_),O(_,"constructor",V),V.displayName=O(_,Ee,"GeneratorFunction"),g.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===V||(e.displayName||e.name)==="GeneratorFunction")},g.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,O(t,Ee,"GeneratorFunction")),t.prototype=Object.create(C),t},g.awrap=function(t){return{__await:t}},me(z.prototype),O(z.prototype,Ve,function(){return this}),g.AsyncIterator=z,g.async=function(t,e,r,n,o){o===void 0&&(o=Promise);var a=new z(Ce(t,e,r,n),o);return g.isGeneratorFunction(e)?a:a.next().then(function(u){return u.done?u.value:a.next()})},me(C),O(C,Ee,"Generator"),O(C,ie,function(){return this}),O(C,"toString",function(){return"[object Generator]"}),g.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function n(){for(;e.length;){var o=e.pop();if(o in t)return n.value=o,n.done=!1,n}return n.done=!0,n}},g.values=Y,U.prototype={constructor:U,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(re),!e)for(var r in this)r.charAt(0)==="t"&&D.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(i,d){return u.type="throw",u.arg=e,r.next=i,d&&(r.method="next",r.arg=void 0),!!d}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var p=D.call(a,"catchLoc"),m=D.call(a,"finallyLoc");if(p&&m){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(p){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!m)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&D.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(e==="break"||e==="continue")&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var u=a?a.completion:{};return u.type=e,u.arg=r,a?(this.method="next",this.next=a.finallyLoc,A):this.complete(u)},complete:function(e,r){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&r&&(this.next=r),A},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),re(n),A}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===e){var o=n.completion;if(o.type==="throw"){var a=o.arg;re(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:Y(e),resultName:r,nextLoc:n},this.method==="next"&&(this.arg=void 0),A}},g}var Ae=function(M){var D,W,ie=M.videoDetail,Ve=M.dispatch,Ee=Ve===void 0?function(){}:Ve,O=M.visible,Ce=M.onClose,ge=Ce===void 0?function(){}:Ce,A=ie.queryParams,pe=ie.queryParams,V=pe.subject_id,_=pe.videoId,k={videoId:_},H=Object(se.useState)(0),F=Object(xe.a)(H,2),C=F[0],me=F[1],z=Object(se.useState)(""),Le=Object(xe.a)(z,2),B=Le[0],re=Le[1],U=Object(se.useState)([]),Y=Object(xe.a)(U,2),Q=Y[0],t=Y[1],e=Object(se.useState)([]),r=Object(xe.a)(e,2),n=r[0],o=r[1];Object(se.useEffect)(function(){var i,d,R=((i=ie.detail)===null||i===void 0||((d=i.video_item)===null||d===void 0)?void 0:d.schools)||[];me((R==null?void 0:R.length)?1:0),o(R)},[(D=ie.detail)===null||D===void 0||((W=D.video_item)===null||W===void 0)?void 0:W.schools]);var a=function(){var i=Object(Ke.a)(X().mark(function d(R){var we;return X().wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return We.next=2,Object($.L)({q:R});case 2:we=We.sent,we&&t(we.shools_name||[]);case 4:case"end":return We.stop()}},d)}));return function(R){return i.apply(this,arguments)}}(),u=function(d){if(n.includes(d)){oe.b.info("\u8BF7\u52FF\u6307\u5B9A\u76F8\u540C\u7684\u5355\u4F4D");return}re(""),o([].concat(Object(q.a)(n),[d]))},p=function(){var i=Object(Ke.a)(X().mark(function d(){var R;return X().wrap(function(be){for(;;)switch(be.prev=be.next){case 0:if(!(C===1&&!(n==null?void 0:n.length))){be.next=2;break}return be.abrupt("return",oe.b.info("\u8BF7\u9009\u62E9\u6307\u5B9A\u5355\u4F4D\u516C\u5F00"));case 2:return be.next=4,Object(ke.a)(Object(Ie.a)(Object(Ie.a)({},A),{},{id:k.videoId,schools:C===0?[]:n,is_public:!(C===2)}));case 4:R=be.sent,(R==null?void 0:R.status)===0&&(oe.b.success("\u8BBE\u7F6E\u6210\u529F"),m());case 6:case"end":return be.stop()}},d)}));return function(){return i.apply(this,arguments)}}(),m=function(){ge(),Ee({type:"videoDetail/getVideoDetail",payload:Object(Ie.a)(Object(Ie.a)({},A),{},{id:k.videoId})})};return h.a.createElement(Ue.a,{centered:!0,maskClosable:!1,title:"\u6743\u9650\u8BBE\u7F6E",width:530,className:J.a.modal,visible:O,onOk:p,onCancel:m},h.a.createElement(h.a.Fragment,null,h.a.createElement(le.a.Group,{value:C,onChange:function(d){return me(d.target.value)}},h.a.createElement(le.a,{value:0},"\u5BF9\u6240\u6709\u5355\u4F4D\u516C\u5F00",h.a.createElement("span",null,"\uFF08\u9009\u4E2D\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF09")),h.a.createElement(le.a,{value:1},"\u5BF9\u6307\u5B9A\u5355\u4F4D\u516C\u5F00",h.a.createElement("span",null,"\uFF08\u9009\u4E2D\u540E\uFF0C\u4EC5\u5BF9\u4E0B\u65B9\u6307\u5B9A\u5355\u4F4D\u7528\u6237\u53EF\u89C1\uFF09")),h.a.createElement(le.a,{value:2},"\u4E0D\u516C\u5F00",h.a.createElement("span",null,"\uFF08\u9009\u4E2D\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u4E0D\u53EF\u89C1\uFF09"))),C===1&&h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{className:"mt10"},h.a.createElement(j.a,{showSearch:!0,className:J.a.selectSchool,placeholder:"\u8BF7\u8F93\u5165\u5E76\u9009\u62E9\u5355\u4F4D\u540D\u79F0",value:B,onChange:function(d){re(d),a(d)},onSelect:u,options:Q==null?void 0:Q.map(function(i){return{value:i}})})),h.a.createElement("div",{className:"mt10"},n==null?void 0:n.map(function(i,d){return h.a.createElement(L.a,{count:h.a.createElement("span",{className:J.a.delete,onClick:function(){return o(n.filter(function(we){return we!==i}))}},"x"),className:"mt10 mr20 current",key:d},h.a.createElement(Oe.a,{type:"primary",ghost:!0},i))})))))},y=Ae;function f(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */f=function(){return g};var g={},M=Object.prototype,D=M.hasOwnProperty,W=typeof Symbol=="function"?Symbol:{},ie=W.iterator||"@@iterator",Ve=W.asyncIterator||"@@asyncIterator",Ee=W.toStringTag||"@@toStringTag";function O(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{O({},"")}catch(t){O=function(r,n,o){return r[n]=o}}function Ce(t,e,r,n){var o=e&&e.prototype instanceof pe?e:pe,a=Object.create(o.prototype),u=new U(n||[]);return a._invoke=function(p,m,i){var d="suspendedStart";return function(R,we){if(d==="executing")throw new Error("Generator is already running");if(d==="completed"){if(R==="throw")throw we;return Q()}for(i.method=R,i.arg=we;;){var be=i.delegate;if(be){var We=Le(be,i);if(We){if(We===A)continue;return We}}if(i.method==="next")i.sent=i._sent=i.arg;else if(i.method==="throw"){if(d==="suspendedStart")throw d="completed",i.arg;i.dispatchException(i.arg)}else i.method==="return"&&i.abrupt("return",i.arg);d="executing";var Te=ge(p,m,i);if(Te.type==="normal"){if(d=i.done?"completed":"suspendedYield",Te.arg===A)continue;return{value:Te.arg,done:i.done}}Te.type==="throw"&&(d="completed",i.method="throw",i.arg=Te.arg)}}}(t,r,u),a}function ge(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}g.wrap=Ce;var A={};function pe(){}function V(){}function _(){}var k={};O(k,ie,function(){return this});var H=Object.getPrototypeOf,F=H&&H(H(Y([])));F&&F!==M&&D.call(F,ie)&&(k=F);var C=_.prototype=pe.prototype=Object.create(k);function me(t){["next","throw","return"].forEach(function(e){O(t,e,function(r){return this._invoke(e,r)})})}function z(t,e){function r(o,a,u,p){var m=ge(t[o],t,a);if(m.type!=="throw"){var i=m.arg,d=i.value;return d&&typeof d=="object"&&D.call(d,"__await")?e.resolve(d.__await).then(function(R){r("next",R,u,p)},function(R){r("throw",R,u,p)}):e.resolve(d).then(function(R){i.value=R,u(i)},function(R){return r("throw",R,u,p)})}p(m.arg)}var n;this._invoke=function(o,a){function u(){return new e(function(p,m){r(o,a,p,m)})}return n=n?n.then(u,u):u()}}function Le(t,e){var r=t.iterator[e.method];if(r===void 0){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=void 0,Le(t,e),e.method==="throw"))return A;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return A}var n=ge(r,t.iterator,e.arg);if(n.type==="throw")return e.method="throw",e.arg=n.arg,e.delegate=null,A;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,A):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,A)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function re(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function U(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function Y(t){if(t){var e=t[ie];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var r=-1,n=function o(){for(;++r<t.length;)if(D.call(t,r))return o.value=t[r],o.done=!1,o;return o.value=void 0,o.done=!0,o};return n.next=n}}return{next:Q}}function Q(){return{value:void 0,done:!0}}return V.prototype=_,O(C,"constructor",_),O(_,"constructor",V),V.displayName=O(_,Ee,"GeneratorFunction"),g.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===V||(e.displayName||e.name)==="GeneratorFunction")},g.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,O(t,Ee,"GeneratorFunction")),t.prototype=Object.create(C),t},g.awrap=function(t){return{__await:t}},me(z.prototype),O(z.prototype,Ve,function(){return this}),g.AsyncIterator=z,g.async=function(t,e,r,n,o){o===void 0&&(o=Promise);var a=new z(Ce(t,e,r,n),o);return g.isGeneratorFunction(e)?a:a.next().then(function(u){return u.done?u.value:a.next()})},me(C),O(C,Ee,"Generator"),O(C,ie,function(){return this}),O(C,"toString",function(){return"[object Generator]"}),g.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function n(){for(;e.length;){var o=e.pop();if(o in t)return n.value=o,n.done=!1,n}return n.done=!0,n}},g.values=Y,U.prototype={constructor:U,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(re),!e)for(var r in this)r.charAt(0)==="t"&&D.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(i,d){return u.type="throw",u.arg=e,r.next=i,d&&(r.method="next",r.arg=void 0),!!d}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var p=D.call(a,"catchLoc"),m=D.call(a,"finallyLoc");if(p&&m){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(p){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!m)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&D.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(e==="break"||e==="continue")&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var u=a?a.completion:{};return u.type=e,u.arg=r,a?(this.method="next",this.next=a.finallyLoc,A):this.complete(u)},complete:function(e,r){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&r&&(this.next=r),A},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),re(n),A}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===e){var o=n.completion;if(o.type==="throw"){var a=o.arg;re(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:Y(e),resultName:r,nextLoc:n},this.method==="next"&&(this.arg=void 0),A}},g}var T=function(M){var D=M.user,W=M.videoDetail,ie=M.globalSetting,Ve=M.loading,Ee=M.dispatch,O=Object(nt.a)(M,["user","videoDetail","globalSetting","loading","dispatch"]),Ce=W.queryParams,ge=W.queryParams,A=ge.subject_id,pe=ge.videoId,V={videoId:pe},_=Object(se.useState)(),k=Object(xe.a)(_,2),H=k[0],F=k[1],C=Object(se.useState)(),me=Object(xe.a)(C,2),z=me[0],Le=me[1],B=Object(se.useState)(!1),re=Object(xe.a)(B,2),U=re[0],Y=re[1],Q=function(){Ee({type:"videoDetail/setActionTabs",payload:{key:"Banner-SendToClass"}})},t=function(){var o=Object(Ke.a)(f().mark(function a(){var u,p,m;return f().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(!(((u=D.userInfo)===null||u===void 0?void 0:u.admin)||((p=D.userInfo)===null||p===void 0?void 0:p.is_teacher)&&Object(l.d)())){d.next=6;break}return d.next=3,Object(ke.g)(Object(Ie.a)({id:V.videoId},Ce));case 3:m=d.sent,Le(m==null?void 0:m.video_item),F(!0);case 6:case"end":return d.stop()}},a)}));return function(){return o.apply(this,arguments)}}(),e=function(){var o=Object(Ke.a)(f().mark(function a(u){var p;return f().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Object(ke.m)(Object(Ie.a)(Object(Ie.a)({},u),{},{id:V.videoId},Ce));case 2:return p=i.sent,(p==null?void 0:p.status)===0&&(F(!1),Ee({type:"videoDetail/getVideoDetail",payload:Object(Ie.a)({id:V.videoId},Ce)})),i.abrupt("return",p);case 5:case"end":return i.stop()}},a)}));return function(u){return o.apply(this,arguments)}}(),r=W.detail||{},n=r.video_item;return h.a.createElement("aside",{className:Pe.a.banner},h.a.createElement("aside",{className:Pe.a.wrap},h.a.createElement("p",{className:Pe.a.title},n==null?void 0:n.name),h.a.createElement("div",{className:Pe.a.contentWrap},h.a.createElement("span",{className:"font14 c-white"},h.a.createElement("span",{className:"mr10"},"\u5B66\u4E60\u4EBA\u6570\uFF1A"),h.a.createElement("span",null,(n==null?void 0:n.study_video_items_count)||0),h.a.createElement("span",{className:"ml100 mr10"},"\u5B66\u5458\u8BC4\u5206\uFF1A"),h.a.createElement(Ne.a,{allowHalf:!0,value:Object(c.v)(n==null?void 0:n.star),disabled:!0,className:Pe.a.rating})),h.a.createElement("div",null,(n==null?void 0:n.can_edit)&&h.a.createElement(Oe.a,{className:"".concat(Pe.a.button," ").concat(Pe.a.buttonTransparent," mr15"),onClick:function(){return Y(!0)}},"\u6743\u9650\u8BBE\u7F6E"),(n==null?void 0:n.can_edit)&&h.a.createElement(Oe.a,{className:"".concat(Pe.a.button," ").concat(Pe.a.buttonTransparent," mr15"),onClick:t},"\u7F16\u8F91"),h.a.createElement(Z.a,{title:"\u53EF\u5C06\u672C\u89C6\u9891\u53D1\u9001\u81F3\u6211\u7684\u8BFE\u5802\u4E2D\u7684\u89C6\u9891\u680F\u76EE",placement:"bottom"},h.a.createElement(Oe.a,{className:"".concat(Pe.a.button," ").concat(Pe.a.buttonTransparent," mr15"),onClick:Q},"\u53D1\u9001\u81F3"))))),h.a.createElement(_e,null),h.a.createElement(P.a,{editData:z,visible:H,onCancel:function(){return F(!1)},onOk:e}),h.a.createElement(y,{dispatch:Ee,videoDetail:W,visible:U,onClose:function(){return Y(!1)}}))},S=Object(ne.a)(function(g){var M=g.user,D=g.videoDetail,W=g.loading,ie=g.globalSetting;return{user:M,videoDetail:D,globalSetting:ie,loading:W}})(T),N=s("R9oj"),K=s("ECub"),De=s("sRBo"),Ye=s("kaz8"),Qe=s("J66h"),fe=s("hgre"),je=s("9Bee"),w=s("vZDz"),v=s.n(w),x=s("9VGf");function G(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */G=function(){return g};var g={},M=Object.prototype,D=M.hasOwnProperty,W=typeof Symbol=="function"?Symbol:{},ie=W.iterator||"@@iterator",Ve=W.asyncIterator||"@@asyncIterator",Ee=W.toStringTag||"@@toStringTag";function O(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{O({},"")}catch(t){O=function(r,n,o){return r[n]=o}}function Ce(t,e,r,n){var o=e&&e.prototype instanceof pe?e:pe,a=Object.create(o.prototype),u=new U(n||[]);return a._invoke=function(p,m,i){var d="suspendedStart";return function(R,we){if(d==="executing")throw new Error("Generator is already running");if(d==="completed"){if(R==="throw")throw we;return Q()}for(i.method=R,i.arg=we;;){var be=i.delegate;if(be){var We=Le(be,i);if(We){if(We===A)continue;return We}}if(i.method==="next")i.sent=i._sent=i.arg;else if(i.method==="throw"){if(d==="suspendedStart")throw d="completed",i.arg;i.dispatchException(i.arg)}else i.method==="return"&&i.abrupt("return",i.arg);d="executing";var Te=ge(p,m,i);if(Te.type==="normal"){if(d=i.done?"completed":"suspendedYield",Te.arg===A)continue;return{value:Te.arg,done:i.done}}Te.type==="throw"&&(d="completed",i.method="throw",i.arg=Te.arg)}}}(t,r,u),a}function ge(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}g.wrap=Ce;var A={};function pe(){}function V(){}function _(){}var k={};O(k,ie,function(){return this});var H=Object.getPrototypeOf,F=H&&H(H(Y([])));F&&F!==M&&D.call(F,ie)&&(k=F);var C=_.prototype=pe.prototype=Object.create(k);function me(t){["next","throw","return"].forEach(function(e){O(t,e,function(r){return this._invoke(e,r)})})}function z(t,e){function r(o,a,u,p){var m=ge(t[o],t,a);if(m.type!=="throw"){var i=m.arg,d=i.value;return d&&typeof d=="object"&&D.call(d,"__await")?e.resolve(d.__await).then(function(R){r("next",R,u,p)},function(R){r("throw",R,u,p)}):e.resolve(d).then(function(R){i.value=R,u(i)},function(R){return r("throw",R,u,p)})}p(m.arg)}var n;this._invoke=function(o,a){function u(){return new e(function(p,m){r(o,a,p,m)})}return n=n?n.then(u,u):u()}}function Le(t,e){var r=t.iterator[e.method];if(r===void 0){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=void 0,Le(t,e),e.method==="throw"))return A;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return A}var n=ge(r,t.iterator,e.arg);if(n.type==="throw")return e.method="throw",e.arg=n.arg,e.delegate=null,A;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,A):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,A)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function re(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function U(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function Y(t){if(t){var e=t[ie];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var r=-1,n=function o(){for(;++r<t.length;)if(D.call(t,r))return o.value=t[r],o.done=!1,o;return o.value=void 0,o.done=!0,o};return n.next=n}}return{next:Q}}function Q(){return{value:void 0,done:!0}}return V.prototype=_,O(C,"constructor",_),O(_,"constructor",V),V.displayName=O(_,Ee,"GeneratorFunction"),g.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===V||(e.displayName||e.name)==="GeneratorFunction")},g.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,O(t,Ee,"GeneratorFunction")),t.prototype=Object.create(C),t},g.awrap=function(t){return{__await:t}},me(z.prototype),O(z.prototype,Ve,function(){return this}),g.AsyncIterator=z,g.async=function(t,e,r,n,o){o===void 0&&(o=Promise);var a=new z(Ce(t,e,r,n),o);return g.isGeneratorFunction(e)?a:a.next().then(function(u){return u.done?u.value:a.next()})},me(C),O(C,Ee,"Generator"),O(C,ie,function(){return this}),O(C,"toString",function(){return"[object Generator]"}),g.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function n(){for(;e.length;){var o=e.pop();if(o in t)return n.value=o,n.done=!1,n}return n.done=!0,n}},g.values=Y,U.prototype={constructor:U,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(re),!e)for(var r in this)r.charAt(0)==="t"&&D.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(i,d){return u.type="throw",u.arg=e,r.next=i,d&&(r.method="next",r.arg=void 0),!!d}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var p=D.call(a,"catchLoc"),m=D.call(a,"finallyLoc");if(p&&m){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(p){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!m)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&D.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(e==="break"||e==="continue")&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var u=a?a.completion:{};return u.type=e,u.arg=r,a?(this.method="next",this.next=a.finallyLoc,A):this.complete(u)},complete:function(e,r){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&r&&(this.next=r),A},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),re(n),A}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===e){var o=n.completion;if(o.type==="throw"){var a=o.arg;re(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:Y(e),resultName:r,nextLoc:n},this.method==="next"&&(this.arg=void 0),A}},g}var te=function(M){var D=M.videoDetail,W=M.globalSetting,ie=M.loading,Ve=M.dispatch,Ee=Object(nt.a)(M,["videoDetail","globalSetting","loading","dispatch"]),O=D.queryParams,Ce=D.selectParams,ge=D.videoList,A=O.subject_id,pe=O.videoId,V=Ce.checkBoxValue,_=Ce.radioValue,k={videoId:pe},H={query:O},F=Object(se.useRef)(),C=Object(se.useRef)(),me=Object(se.useRef)(),z=Object(se.useRef)(5),Le=D.detail||{},B=Le.video_item;Object(x.a)(Object(Ke.a)(G().mark(function o(){return G().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!C.current){u.next=5;break}return console.log("videoRef lastUpdatedTime: ",F.current.getLastUpdatedTime()),console.log(F.current),u.next=5,re();case 5:case"end":return u.stop()}},o)})),z.current*1e3);var re=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,u=a?{is_f:1}:{};return Object(ke.o)(Object(Ie.a)(Object(Ie.a)({},u),{id:k.videoId,point:F.current.getLastUpdatedTime(),total:F.current.getDuration()}))},U=function(a){return console.log("handlLogWatchHistory: ",a),a.ed==="1"&&(C.current=!1,re(!0)),!C.current&&!a.ed&&(C.current=!0,z.current=F.current.getDuration()<=5?1:5,re()),Ve({type:"userDetail/logWatchHistory",payload:a})},Y=function(){C.current=!1},Q=function(){C.current=!0},t=function(){me.current=5,Ue.a.confirm({width:600,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u8BF7\u7ED9\u672C\u89C6\u9891\u8BC4\u5206",content:h.a.createElement("div",{className:"tc font14"},h.a.createElement(Ne.a,{defaultValue:me.current,onChange:function(u){return me.current=u},className:v.a.modalRating})),onOk:function(){var a=Object(Ke.a)(G().mark(function p(){var m;return G().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,Object(ke.l)({id:k.videoId,star:me.current});case 2:m=d.sent,m.status===0&&Ve({type:"videoDetail/getVideoDetail",payload:Object(Ie.a)({id:k.videoId},dt(H.query))});case 4:case"end":return d.stop()}},p)}));function u(){return a.apply(this,arguments)}return u}()})},e=function(a){var u=window.filterVideoSign,p=u.findIndex(function(be){return be.id===pe}),m=p===u.length-1;if(m)return;var i=u[p+1].id,d=u[p+1].can_view,R=u[p+1].link,we=u[p+1].is_public;if(window.checkBoxValue){if(R){window.open(R);return}if(!d){Ue.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:h.a.createElement("div",{className:"tc font14"},"\u4E0B\u4E00\u6761\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650")});return}if(!we){Ue.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:h.a.createElement("div",{className:"tc font14"},"\u4E0B\u4E00\u6761\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85")});return}Ve({type:"videoDetail/handleList",payload:{videoId:i}}),window.videoTimer=setTimeout(function(){a.current.play()},2e3)}},r=function(a,u){if(a==="checkBox"){var p=u.target.checked;window.checkBoxValue=p,Ve({type:"videoDetail/setSelectValue",payload:{radioValue:_,checkBoxValue:p}});return}Ve({type:"videoDetail/setSelectValue",payload:{checkBoxValue:V,radioValue:u.target.value}})},n=function(){var a=ge.findIndex(function(p){return p.id===pe}),u=a===ge.length-1;return u?h.a.createElement("div",null,"\u5F53\u524D\u5DF2\u662F\u6700\u540E\u4E00\u4E2A\u89C6\u9891"):h.a.createElement(Ye.a,{onChange:function(m){r("checkBox",m)},checked:V},"\u81EA\u52A8\u64AD\u653E\u4E0B\u4E00\u4E2A\u89C6\u9891")};return h.a.createElement("aside",{className:v.a.contentWrap},h.a.createElement("aside",{className:v.a.wrap},h.a.createElement("header",null,(B==null?void 0:B.description)&&h.a.createElement("span",{className:v.a.introName},"\u7B80\u4ECB"),Object(c.F)(B==null?void 0:B.my_star)?h.a.createElement(Oe.a,{type:"primary",ghost:!0,onClick:t},"\u8BC4\u5206"):h.a.createElement("span",null,h.a.createElement("span",{className:"ml100 mr10 font14"},"\u6211\u7684\u8BC4\u5206\uFF1A"),h.a.createElement(Ne.a,{value:B==null?void 0:B.my_star,disabled:!0,className:v.a.rating}))),h.a.createElement("div",{className:"mt20"},h.a.createElement(je.a,{value:(B==null?void 0:B.description)||""})),!(B==null?void 0:B.can_edit)&&!(B==null?void 0:B.is_public)?h.a.createElement(K.a,{description:"\u5F53\u524D\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85"}):h.a.createElement(fe.a,{ref:F,startTime:B==null?void 0:B.last_point,src:(B==null?void 0:B.is_link)?B==null?void 0:B.link:(B==null?void 0:B.play_url)&&Qe.Base64.decode(B==null?void 0:B.play_url),videoId:B==null?void 0:B.video_id,logWatchHistory:U,handlePause:Y,handlePlay:Q,videoSpeed:_,handlePlayEnded:e}),!(B==null?void 0:B.can_edit)&&!(B==null?void 0:B.is_public)?null:h.a.createElement("div",{className:v.a.footer},h.a.createElement("div",{className:v.a.checkBox},n()),h.a.createElement("div",{className:v.a.radioGroup},h.a.createElement(le.a.Group,{onChange:function(a){r("radio",a)},value:_},h.a.createElement(le.a,{value:1},"1.0X"),h.a.createElement(le.a,{value:1.5},"1.5X"),h.a.createElement(le.a,{value:2},"2.0X"))))))},ce=Object(ne.a)(function(g){var M=g.videoDetail,D=g.loading,W=g.globalSetting;return{videoDetail:M,globalSetting:W,loading:D}})(te),Fe=s("MRWH"),ye=s.n(Fe),it=s("V0Rq"),Re=s("m3rI");function $e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */$e=function(){return g};var g={},M=Object.prototype,D=M.hasOwnProperty,W=typeof Symbol=="function"?Symbol:{},ie=W.iterator||"@@iterator",Ve=W.asyncIterator||"@@asyncIterator",Ee=W.toStringTag||"@@toStringTag";function O(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{O({},"")}catch(t){O=function(r,n,o){return r[n]=o}}function Ce(t,e,r,n){var o=e&&e.prototype instanceof pe?e:pe,a=Object.create(o.prototype),u=new U(n||[]);return a._invoke=function(p,m,i){var d="suspendedStart";return function(R,we){if(d==="executing")throw new Error("Generator is already running");if(d==="completed"){if(R==="throw")throw we;return Q()}for(i.method=R,i.arg=we;;){var be=i.delegate;if(be){var We=Le(be,i);if(We){if(We===A)continue;return We}}if(i.method==="next")i.sent=i._sent=i.arg;else if(i.method==="throw"){if(d==="suspendedStart")throw d="completed",i.arg;i.dispatchException(i.arg)}else i.method==="return"&&i.abrupt("return",i.arg);d="executing";var Te=ge(p,m,i);if(Te.type==="normal"){if(d=i.done?"completed":"suspendedYield",Te.arg===A)continue;return{value:Te.arg,done:i.done}}Te.type==="throw"&&(d="completed",i.method="throw",i.arg=Te.arg)}}}(t,r,u),a}function ge(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}g.wrap=Ce;var A={};function pe(){}function V(){}function _(){}var k={};O(k,ie,function(){return this});var H=Object.getPrototypeOf,F=H&&H(H(Y([])));F&&F!==M&&D.call(F,ie)&&(k=F);var C=_.prototype=pe.prototype=Object.create(k);function me(t){["next","throw","return"].forEach(function(e){O(t,e,function(r){return this._invoke(e,r)})})}function z(t,e){function r(o,a,u,p){var m=ge(t[o],t,a);if(m.type!=="throw"){var i=m.arg,d=i.value;return d&&typeof d=="object"&&D.call(d,"__await")?e.resolve(d.__await).then(function(R){r("next",R,u,p)},function(R){r("throw",R,u,p)}):e.resolve(d).then(function(R){i.value=R,u(i)},function(R){return r("throw",R,u,p)})}p(m.arg)}var n;this._invoke=function(o,a){function u(){return new e(function(p,m){r(o,a,p,m)})}return n=n?n.then(u,u):u()}}function Le(t,e){var r=t.iterator[e.method];if(r===void 0){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=void 0,Le(t,e),e.method==="throw"))return A;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return A}var n=ge(r,t.iterator,e.arg);if(n.type==="throw")return e.method="throw",e.arg=n.arg,e.delegate=null,A;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,A):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,A)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function re(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function U(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function Y(t){if(t){var e=t[ie];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var r=-1,n=function o(){for(;++r<t.length;)if(D.call(t,r))return o.value=t[r],o.done=!1,o;return o.value=void 0,o.done=!0,o};return n.next=n}}return{next:Q}}function Q(){return{value:void 0,done:!0}}return V.prototype=_,O(C,"constructor",_),O(_,"constructor",V),V.displayName=O(_,Ee,"GeneratorFunction"),g.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===V||(e.displayName||e.name)==="GeneratorFunction")},g.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,O(t,Ee,"GeneratorFunction")),t.prototype=Object.create(C),t},g.awrap=function(t){return{__await:t}},me(z.prototype),O(z.prototype,Ve,function(){return this}),g.AsyncIterator=z,g.async=function(t,e,r,n,o){o===void 0&&(o=Promise);var a=new z(Ce(t,e,r,n),o);return g.isGeneratorFunction(e)?a:a.next().then(function(u){return u.done?u.value:a.next()})},me(C),O(C,Ee,"Generator"),O(C,ie,function(){return this}),O(C,"toString",function(){return"[object Generator]"}),g.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function n(){for(;e.length;){var o=e.pop();if(o in t)return n.value=o,n.done=!1,n}return n.done=!0,n}},g.values=Y,U.prototype={constructor:U,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(re),!e)for(var r in this)r.charAt(0)==="t"&&D.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(i,d){return u.type="throw",u.arg=e,r.next=i,d&&(r.method="next",r.arg=void 0),!!d}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var p=D.call(a,"catchLoc"),m=D.call(a,"finallyLoc");if(p&&m){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(p){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!m)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&D.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(e==="break"||e==="continue")&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var u=a?a.completion:{};return u.type=e,u.arg=r,a?(this.method="next",this.next=a.finallyLoc,A):this.complete(u)},complete:function(e,r){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&r&&(this.next=r),A},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),re(n),A}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===e){var o=n.completion;if(o.type==="throw"){var a=o.arg;re(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:Y(e),resultName:r,nextLoc:n},this.method==="next"&&(this.arg=void 0),A}},g}var et=[{name:"\u5B9E\u8DF5\u9879\u76EE",type:"Shixun",icon:h.a.createElement("i",{className:"iconfont icon-shixun2 font20"})},{name:"\u89C6\u9891\u9879\u76EE",type:"VideoItem",icon:h.a.createElement("i",{className:"iconfont icon-shipin font20"})},{name:"\u6559\u5B66\u8BFE\u4EF6",type:"Attachment",icon:h.a.createElement("i",{className:"iconfont icon-jiaoxueanli font20"})},{name:"\u7A7A\u76EE\u5F55",type:"StageCatalog",icon:h.a.createElement("i",{className:"iconfont icon-kongbai font20"})}],ct=function(M){var D=M.dispatch,W=M.videoDetail,ie=M.user,Ve=Object(nt.a)(M,["dispatch","videoDetail","user"]),Ee=W.queryParams,O=W.stages,Ce=W.videoList,ge=W.cust_seq,A=Ee.subject_id,pe=Ee.videoId,V=Ee.course_id;Object(se.useEffect)(function(){D(A?{type:"videoDetail/getStageData",payload:{subject_id:A}}:{type:"videoDetail/getCourseStageData",payload:{coursesId:V}})},[]);var _=function(){var re=Object(Ke.a)($e().mark(function U(Y,Q){var t;return $e().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(D({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF0C\u8BF7\u7A0D\u540E..."}}),!Q){r.next=7;break}return r.next=4,Object($.z)({id:Y});case 4:r.t0=r.sent,r.next=10;break;case 7:return r.next=9,Object($.A)({id:Y});case 9:r.t0=r.sent;case 10:if(t=r.t0,D({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),!((t==null?void 0:t.game_identifier)||(t==null?void 0:t.identifier))){r.next=15;break}return Object(c.I)(Q?"/tasks/".concat(t==null?void 0:t.identifier,"/jupyter"):"/tasks/".concat(t.game_identifier)),r.abrupt("return");case 15:(t==null?void 0:t.status)===2?H(t==null?void 0:t.message):(t==null?void 0:t.status)===3&&k(t==null?void 0:t.message);case 16:case"end":return r.stop()}},U)}));return function(Y,Q){return re.apply(this,arguments)}}(),k=function(U){Ue.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:h.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",U,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},H=function re(U){var Y;U=((Y=U)===null||Y===void 0?void 0:Y.includes(".json"))?U:"".concat(U,".json"),Ue.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:h.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var Q=Object(Ke.a)($e().mark(function e(){var r,n;return $e().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Object(it.O)({url:U});case 2:if(r=a.sent,r){a.next=5;break}return a.abrupt("return");case 5:return oe.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),a.next=8,Object($.A)({id:r.shixun_identifier});case 8:if(n=a.sent,!(n==null?void 0:n.game_identifier)){a.next=12;break}return Object(c.I)("/tasks/".concat(n.game_identifier)),a.abrupt("return");case 12:(n==null?void 0:n.status)===2?re(n==null?void 0:n.message):(n==null?void 0:n.status)===3&&k(n==null?void 0:n.message);case 13:case"end":return a.stop()}},e)}));function t(){return Q.apply(this,arguments)}return t}()})},F=W.detail||{},C=F.video_item,me=function(U){if((U==null?void 0:U.item_type)==="StageCatalog")return;clearTimeout(window.videoTimer);var Y=U.id,Q=U.item_type,t=U.identifier,e=U.is_jupyter,r=U.url,n=U.link;if(Q==="VideoItem"&&!n){var o,a;if(!((o=ie.userInfo)===null||o===void 0?void 0:o.admin)&&!((a=ie.userInfo)===null||a===void 0?void 0:a.business)&&!U.can_view){Ue.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:h.a.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650")});return}if(!C.can_edit&&!U.is_public){Ue.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:h.a.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85")});return}D({type:"videoDetail/handleList",payload:{videoId:Y}});return}if(Q==="VideoItem"&&!!n){U.link&&Object(ke.o)({is_f:1,id:U.id,point:0,total:0}),window.open(n);return}if(Q==="Shixun"){_(t,e);return}window.open(Re.a.IMG_SERVER+r)},z=function(U){var Y=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],Q=["","\u5341","\u767E","\u5343","\u4E07"];U=parseInt(U);var t=function(o){for(var a=o.toString().split("").reverse(),u="",p=0;p<a.length;p++)u=(p==0&&a[p]==0||p>0&&a[p]==0&&a[p-1]==0?"":Y[a[p]]+(a[p]==0?Q[0]:Q[p]))+u;return u},e=Math.floor(U/1e4),r=U%1e4;return r.toString().length<4&&(r="0"+r),e?t(e)+"\u4E07"+t(r):t(U)},Le=function(U,Y,Q,t){var e=U.name,r=U.item_type,n=U.id,o="".concat(Y+1,"-").concat(Q+1,"-").concat(t+1),a=et.find(function(m){return m.type===r}).icon,u=r==="VideoItem"?ye.a.brght:ye.a.gray,p=pe===n?"".concat(u," ").concat(ye.a.active):u;return h.a.createElement("div",{key:o,onClick:function(){return me(U)},className:p,style:{paddingLeft:52}},h.a.createElement("span",{className:ye.a.s1},a),!!ge&&h.a.createElement("span",{className:ye.a.s2},o),h.a.createElement("span",{className:ye.a.s3},"\u203B ",e))},B=function(U,Y,Q){var t=U.name,e=U.item_type,r=U.id,n=U.children,o="".concat(Y+1,"-").concat(Q+1),a=et.find(function(m){return m.type===e}).icon,u=e==="VideoItem"?ye.a.brght:ye.a.gray,p=pe===r?"".concat(u," ").concat(ye.a.active):u;return h.a.createElement(se.Fragment,{key:o},h.a.createElement("div",{onClick:function(){return me(U)},className:p},h.a.createElement("span",{className:ye.a.s1},a),!!ge&&h.a.createElement("span",{className:ye.a.s2},o),h.a.createElement("span",{className:ye.a.s3},"\u203B ",t)),!!n.length&&n.map(function(m,i){return Le(m,Y,Q,i)}))};return h.a.createElement("aside",{className:ye.a.list},O.map(function(re,U){var Y=re.stage_name,Q=re.shixuns_list,t=Q===void 0?[]:Q,e=re.items,r=e===void 0?[]:e,n=Object(q.a)(r);return h.a.createElement("aside",{key:U,className:ye.a.box},h.a.createElement("div",{className:ye.a.title},z(U+1),"\u3001",Y),n.map(function(o,a){return B(o,U,a)}),U!==O.length-1&&h.a.createElement("div",{className:ye.a.line}))}))},lt=Object(ne.a)(function(g){var M=g.user,D=g.videoDetail,W=g.loading,ie=g.globalSetting;return{user:M,videoDetail:D,globalSetting:ie,loading:W}})(ct),dt=function(M){var D=M.subject_id;return{subject_id:D,course_id:D}},st=function(M){var D=M.videoDetail,W=M.globalSetting,ie=M.loading,Ve=M.dispatch,Ee=Object(nt.a)(M,["videoDetail","globalSetting","loading","dispatch"]),O=D.queryParams,Ce=O.subject_id,ge=O.videoId,A={videoId:ge},pe={query:O};return Object(se.useEffect)(function(){if(console.log("\u9A8C\u8BC1\u6D4B\u8BD5\u73AF\u5883"),!A.videoId)return;Ve({type:"videoDetail/getVideoDetail",payload:Object(Ie.a)(Object(Ie.a)({},O),{},{id:A.videoId})})},[A.videoId]),Object(se.useEffect)(function(){var V,_;document.title=((V=D.detail)===null||V===void 0||((_=V.video_item)===null||_===void 0)?void 0:_.name)||"EduCoder"},[D]),h.a.createElement(ze.a,{spinning:!1},h.a.createElement("section",{className:ot.a.bg},h.a.createElement(S,null),h.a.createElement("div",{className:ot.a.container},h.a.createElement(lt,null),h.a.createElement(ce,null))))},ft=Se.default=Object(ne.a)(function(g){var M=g.videoDetail,D=g.loading,W=g.globalSetting;return{videoDetail:M,globalSetting:W,loading:D}})(st)},"9Bee":function(Be,Se,s){"use strict";var rt=s("k1fw"),ze=s("q1tI"),Ie=s.n(ze),nt=s("vg9a"),se=s("tJVT"),h=s("DlQD"),ne=s.n(h),at=s("rUJ1");function ot(P,c){var l=P.match(/^(\s+)(?:```)/);if(l===null)return c;var E=l[1];return c.split(`
`).map(function(L){var b=L.match(/^\s+/);if(b===null)return L;var j=Object(se.a)(b,1),q=j[0];return q.length>=E.length?L.slice(E.length):L}).join(`
`)}var ut=[],Z=["<ul>"],Xe=new ne.a.Renderer,Oe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ve(){ut.length=0,Z=["<ul>"]}var Ne={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Ke(P,c,l,E){if(c>=P.length||P[c].level<=l)return c;var L=P[c];E.push("<li><a href='#"+L.anchor+"'>"+L.text+"</a>"),c++;var b=[];return c=Ke(P,c,L.level,b),b.length>0&&(E.push("<ul>"),b.forEach(function(j){E.push(j)}),E.push("</ul>")),E.push("</li>"),c=Ke(P,c,l,E),c}function xe(){return Ke(ut,0,0,Z),Z.push("</ul>"),Z.join("")}var Me={heading:function(c){var l=Oe.exec(c);if(l)return{type:"heading",raw:l[0],depth:l[1].length,text:l[2]}},fences:function(c){var l=this.rules.block.fences.exec(c);if(l){var E=l[0],L=ot(E,l[3]||""),b=l[2]?l[2].trim():l[2];if(["latex","katex","math"].indexOf(b)>=0){var j=Ue(),q=L;L=j,tt[j]={type:"block",expression:q}}return{type:"code",raw:E,lang:b,text:L}}}},Pe=/(?:\${2})([^\n`]+?)(?:\${2})/gi,ae=0,Ue=function(){return"__special_katext_id_".concat(ae++,"__")},tt={};function le(){return tt}function he(){ae=0,tt={}}function oe(P){return P=P.replace(Pe,function(c,l){var E=Ue();return tt[E]={type:"inline",expression:l},E}),P}var He=Xe.listitem;Xe.listitem=function(P){return He(oe(P))};var ee=Xe.paragraph;Xe.paragraph=function(P){return ee(oe(P))};var qe=Xe.tablecell;Xe.tablecell=function(P,c){return qe(oe(P),c)},Xe.code=function(P,c,l){var E=(c||"").match(/\S*/)[0];return E?["latex","katex","math"].indexOf(E)>=0?"<p class='editormd-tex'>".concat(P,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(c,'">').concat(l?P:Object(at.escape)(P,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(l?P:Object(at.escape)(P,!0))+"</code></pre>"},Xe.heading=function(P,c,l){var E=this.options.headerPrefix+l.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ut.push({anchor:E,level:c,text:P}),"<h"+c+' id="'+E+'">'+P+"</h"+c+">"},ne.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),ne.a.use({tokenizer:Me,renderer:Xe});var Ze=ne.a,I=s("SJMd"),ke=s("m3rI"),Je=s("Oy/b"),Ge=/<pre[^>]*>/g;function de(P){var c=document.createElement("div");return c.innerHTML=P,c.childNodes.length===0?"":c.childNodes[0].nodeValue}var _e=Se.a=function(P){var c=P.value,l=c===void 0?"":c,E=P.className,L=P.showTextOnly,b=P.showLines,j=P.style,q=j===void 0?{}:j,ue=String(l),J=Object(ze.useMemo)(function(){try{var y=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,f=/\"\/api\/attachments\/|\"\/attachments\/download\//g,T=/\(\s+\/files\/uploads\/|\(\/files\/uploads\//g;ue=ue.replace(y,"("+ke.a.API_SERVER+"/api/attachments/").replace(f,'"'+ke.a.API_SERVER+"/api/attachments/").replace(T,'"'+ke.a.API_SERVER+"/files/uploads/")}catch(De){}var S=Ze(ue);setTimeout(function(){return Ae()},300);var N=le();if(ue.match(/\[TOC\]/)&&(S=S.replace("<p>[TOC]</p>",xe()),ve()),S=S.replace(/(__special_katext_id_\d+__)/g,function(De,Ye){var Qe=N[Ye],fe=Qe.type,je=Qe.expression;return Object(Je.renderToString)(de(je)||"",{displayMode:fe==="block",throwOnError:!1,output:"html"})}),S=S.replace(/▁/g,"\u2581\u2581\u2581"),he(),L){var K=document.createElement("div");return K.innerHTML=S,K.innerText}return S},[ue]),$=Object(ze.useRef)();Ne.WebkitLineClamp=b,b&&(q=Object(rt.a)(Object(rt.a)({},q),Ne));function X(y){var f=y.target;if(f.tagName.toUpperCase()==="A"){var T=f.getAttribute("href");if(T.startsWith("#")){y.preventDefault();var S=document.getElementById(T.replace("#",""));S&&S.scrollIntoView(!0)}}}var Ae=function(){};return Object(ze.useEffect)(function(){if($.current&&J&&(J.match(Ge)&&window.PR.prettyPrint()),$.current)return $.current.addEventListener("click",X),function(){$.current.removeEventListener("click",X),he(),ve()}},[J,$.current,X]),Ie.a.createElement(Ie.a.Fragment,null,Ie.a.createElement("div",{ref:$,style:Object(rt.a)({},q),className:"".concat(E||""," markdown-body "),dangerouslySetInnerHTML:{__html:J}}))}},"9VGf":function(Be,Se,s){"use strict";s.d(Se,"a",function(){return Ie});var rt=s("q1tI"),ze=s.n(rt);function Ie(nt,se){var h=Object(rt.useRef)();Object(rt.useEffect)(function(){h.current=nt}),Object(rt.useEffect)(function(){function ne(){h.current()}if(se!==null){var at=setInterval(ne,se);return function(){return clearInterval(at)}}},[se])}},JqQi:function(Be,Se,s){Be.exports={bg:"bg___31owl",container:"container___2NGOo"}},MRWH:function(Be,Se,s){Be.exports={flex_box_center:"flex_box_center___30XbU",flex_space_between:"flex_space_between___3jfWA",flex_box_vertical_center:"flex_box_vertical_center___27kWs",flex_box_center_end:"flex_box_center_end___1RoAS",flex_box_column:"flex_box_column____3Jvr",list:"list___2NJ_T",box:"box___36KCF",title:"title___Kd2ce",gray:"gray___14ob6",brght:"brght___GgzyD",s1:"s1___IhDpz",s2:"s2___3hR0s",s3:"s3___23SCF",active:"active___2_5D5",line:"line___3Croa"}},NLgs:function(Be,Se,s){"use strict";s.d(Se,"e",function(){return Ke}),s.d(Se,"f",function(){return xe}),s.d(Se,"d",function(){return Pe}),s.d(Se,"c",function(){return ae}),s.d(Se,"a",function(){return Ue}),s.d(Se,"b",function(){return tt});var rt=s("miYZ"),ze=s("tsqr"),Ie=s("9og8"),nt=s("2qtc"),se=s("kLXV"),h=s("q1tI"),ne=s.n(h),at=s("9kvl"),ot=s("xKgJ"),ut=s("1vsH"),Z=s("RCxd"),Xe=s("mOS8"),Oe=s.n(Xe),ve=s("m3rI");function Ne(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Ne=function(){return le};var le={},he=Object.prototype,oe=he.hasOwnProperty,He=typeof Symbol=="function"?Symbol:{},ee=He.iterator||"@@iterator",qe=He.asyncIterator||"@@asyncIterator",Ze=He.toStringTag||"@@toStringTag";function I(y,f,T){return Object.defineProperty(y,f,{value:T,enumerable:!0,configurable:!0,writable:!0}),y[f]}try{I({},"")}catch(y){I=function(T,S,N){return T[S]=N}}function ke(y,f,T,S){var N=f&&f.prototype instanceof de?f:de,K=Object.create(N.prototype),De=new $(S||[]);return K._invoke=function(Ye,Qe,fe){var je="suspendedStart";return function(w,v){if(je==="executing")throw new Error("Generator is already running");if(je==="completed"){if(w==="throw")throw v;return Ae()}for(fe.method=w,fe.arg=v;;){var x=fe.delegate;if(x){var G=q(x,fe);if(G){if(G===Ge)continue;return G}}if(fe.method==="next")fe.sent=fe._sent=fe.arg;else if(fe.method==="throw"){if(je==="suspendedStart")throw je="completed",fe.arg;fe.dispatchException(fe.arg)}else fe.method==="return"&&fe.abrupt("return",fe.arg);je="executing";var te=Je(Ye,Qe,fe);if(te.type==="normal"){if(je=fe.done?"completed":"suspendedYield",te.arg===Ge)continue;return{value:te.arg,done:fe.done}}te.type==="throw"&&(je="completed",fe.method="throw",fe.arg=te.arg)}}}(y,T,De),K}function Je(y,f,T){try{return{type:"normal",arg:y.call(f,T)}}catch(S){return{type:"throw",arg:S}}}le.wrap=ke;var Ge={};function de(){}function _e(){}function P(){}var c={};I(c,ee,function(){return this});var l=Object.getPrototypeOf,E=l&&l(l(X([])));E&&E!==he&&oe.call(E,ee)&&(c=E);var L=P.prototype=de.prototype=Object.create(c);function b(y){["next","throw","return"].forEach(function(f){I(y,f,function(T){return this._invoke(f,T)})})}function j(y,f){function T(N,K,De,Ye){var Qe=Je(y[N],y,K);if(Qe.type!=="throw"){var fe=Qe.arg,je=fe.value;return je&&typeof je=="object"&&oe.call(je,"__await")?f.resolve(je.__await).then(function(w){T("next",w,De,Ye)},function(w){T("throw",w,De,Ye)}):f.resolve(je).then(function(w){fe.value=w,De(fe)},function(w){return T("throw",w,De,Ye)})}Ye(Qe.arg)}var S;this._invoke=function(N,K){function De(){return new f(function(Ye,Qe){T(N,K,Ye,Qe)})}return S=S?S.then(De,De):De()}}function q(y,f){var T=y.iterator[f.method];if(T===void 0){if(f.delegate=null,f.method==="throw"){if(y.iterator.return&&(f.method="return",f.arg=void 0,q(y,f),f.method==="throw"))return Ge;f.method="throw",f.arg=new TypeError("The iterator does not provide a 'throw' method")}return Ge}var S=Je(T,y.iterator,f.arg);if(S.type==="throw")return f.method="throw",f.arg=S.arg,f.delegate=null,Ge;var N=S.arg;return N?N.done?(f[y.resultName]=N.value,f.next=y.nextLoc,f.method!=="return"&&(f.method="next",f.arg=void 0),f.delegate=null,Ge):N:(f.method="throw",f.arg=new TypeError("iterator result is not an object"),f.delegate=null,Ge)}function ue(y){var f={tryLoc:y[0]};1 in y&&(f.catchLoc=y[1]),2 in y&&(f.finallyLoc=y[2],f.afterLoc=y[3]),this.tryEntries.push(f)}function J(y){var f=y.completion||{};f.type="normal",delete f.arg,y.completion=f}function $(y){this.tryEntries=[{tryLoc:"root"}],y.forEach(ue,this),this.reset(!0)}function X(y){if(y){var f=y[ee];if(f)return f.call(y);if(typeof y.next=="function")return y;if(!isNaN(y.length)){var T=-1,S=function N(){for(;++T<y.length;)if(oe.call(y,T))return N.value=y[T],N.done=!1,N;return N.value=void 0,N.done=!0,N};return S.next=S}}return{next:Ae}}function Ae(){return{value:void 0,done:!0}}return _e.prototype=P,I(L,"constructor",P),I(P,"constructor",_e),_e.displayName=I(P,Ze,"GeneratorFunction"),le.isGeneratorFunction=function(y){var f=typeof y=="function"&&y.constructor;return!!f&&(f===_e||(f.displayName||f.name)==="GeneratorFunction")},le.mark=function(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,P):(y.__proto__=P,I(y,Ze,"GeneratorFunction")),y.prototype=Object.create(L),y},le.awrap=function(y){return{__await:y}},b(j.prototype),I(j.prototype,qe,function(){return this}),le.AsyncIterator=j,le.async=function(y,f,T,S,N){N===void 0&&(N=Promise);var K=new j(ke(y,f,T,S),N);return le.isGeneratorFunction(f)?K:K.next().then(function(De){return De.done?De.value:K.next()})},b(L),I(L,Ze,"Generator"),I(L,ee,function(){return this}),I(L,"toString",function(){return"[object Generator]"}),le.keys=function(y){var f=[];for(var T in y)f.push(T);return f.reverse(),function S(){for(;f.length;){var N=f.pop();if(N in y)return S.value=N,S.done=!1,S}return S.done=!0,S}},le.values=X,$.prototype={constructor:$,reset:function(f){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(J),!f)for(var T in this)T.charAt(0)==="t"&&oe.call(this,T)&&!isNaN(+T.slice(1))&&(this[T]=void 0)},stop:function(){this.done=!0;var f=this.tryEntries[0].completion;if(f.type==="throw")throw f.arg;return this.rval},dispatchException:function(f){if(this.done)throw f;var T=this;function S(fe,je){return De.type="throw",De.arg=f,T.next=fe,je&&(T.method="next",T.arg=void 0),!!je}for(var N=this.tryEntries.length-1;N>=0;--N){var K=this.tryEntries[N],De=K.completion;if(K.tryLoc==="root")return S("end");if(K.tryLoc<=this.prev){var Ye=oe.call(K,"catchLoc"),Qe=oe.call(K,"finallyLoc");if(Ye&&Qe){if(this.prev<K.catchLoc)return S(K.catchLoc,!0);if(this.prev<K.finallyLoc)return S(K.finallyLoc)}else if(Ye){if(this.prev<K.catchLoc)return S(K.catchLoc,!0)}else{if(!Qe)throw new Error("try statement without catch or finally");if(this.prev<K.finallyLoc)return S(K.finallyLoc)}}}},abrupt:function(f,T){for(var S=this.tryEntries.length-1;S>=0;--S){var N=this.tryEntries[S];if(N.tryLoc<=this.prev&&oe.call(N,"finallyLoc")&&this.prev<N.finallyLoc){var K=N;break}}K&&(f==="break"||f==="continue")&&K.tryLoc<=T&&T<=K.finallyLoc&&(K=null);var De=K?K.completion:{};return De.type=f,De.arg=T,K?(this.method="next",this.next=K.finallyLoc,Ge):this.complete(De)},complete:function(f,T){if(f.type==="throw")throw f.arg;return f.type==="break"||f.type==="continue"?this.next=f.arg:f.type==="return"?(this.rval=this.arg=f.arg,this.method="return",this.next="end"):f.type==="normal"&&T&&(this.next=T),Ge},finish:function(f){for(var T=this.tryEntries.length-1;T>=0;--T){var S=this.tryEntries[T];if(S.finallyLoc===f)return this.complete(S.completion,S.afterLoc),J(S),Ge}},catch:function(f){for(var T=this.tryEntries.length-1;T>=0;--T){var S=this.tryEntries[T];if(S.tryLoc===f){var N=S.completion;if(N.type==="throw"){var K=N.arg;J(S)}return K}}throw new Error("illegal catch attempt")},delegateYield:function(f,T,S){return this.delegate={iterator:X(f),resultName:T,nextLoc:S},this.method==="next"&&(this.arg=void 0),Ge}},le}var Ke=function(he){return!!(xe(he)&&Me())},xe=function(he){return Object(ot.p)()?!0:(he({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},Me=function(){var he,oe=Object(at.b)()._store.getState(),He=oe.user;return((he=He.userInfo)===null||he===void 0?void 0:he.profile_completed)?!0:(se.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:ne.a.createElement("div",{className:"tc font16"},"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){at.c.push("/account/profile/edit")}}),!1)},Pe=function(){var he,oe=Object(at.b)()._store.getState(),He=oe.user;return((he=He.userInfo)===null||he===void 0?void 0:he.professional_certification)?!0:(se.a.confirm({title:"\u63D0\u793A",centered:!0,content:ne.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(ut.I)("/account/certification")}}),!1)},ae=function(){return Object(ot.a)()?!0:(se.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",content:ne.a.createElement("div",{className:"tc",style:{marginLeft:-38}},ne.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650"),ne.a.createElement("img",{src:Object(ot.t)()?s("WdTA"):"".concat(ve.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200}),ne.a.createElement("div",{className:"tc"},"\u7FA4\u53F7\uFF1A",Object(ot.t)()?"693542422":"612934990")),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(ut.I)("//shang.qq.com/wpa/qunwpa?idkey=2f2043d88c1bd61d182b98bf1e061c6185e23055bec832c07d8148fe11c5a6cd")}}),!1)},Ue=function(he,oe){return he?!0:(se.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:ne.a.createElement("div",null,ne.a.createElement("p",null,oe||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),ne.a.createElement("div",{style:{marginLeft:"110px"}},ne.a.createElement("img",{src:s("1ZF9"),width:200}),ne.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(ut.I)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},tt=function(he){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",He=Object(at.b)()._store.getState(),ee=He.shixunsDetail.detail;return(ee==null?void 0:ee.public)===2||(ee==null?void 0:ee.public)===1||(ee==null?void 0:ee.shixun_status)===3?(se.a.info({centered:!0,icon:ne.a.createElement(Z.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:ne.a.createElement("div",{className:"tc",style:{marginLeft:-38}},ne.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},ne.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(ee==null?void 0:ee.public)===2?"\u5DF2\u516C\u5F00":(ee==null?void 0:ee.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",oe,"\u3002"),ne.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),ne.a.createElement("img",{style:{border:"4px solid #1890FF",borderRadius:"4px"},src:Oe.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(ee==null?void 0:ee.shixun_status)===2?(se.a.confirm({centered:!0,icon:ne.a.createElement(Z.a,null),title:"\u63D0\u793A",content:ne.a.createElement("div",null,ne.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",oe,"\u3002"),ne.a.createElement("br",null),ne.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){se.a.confirm({width:440,centered:!0,icon:ne.a.createElement(Z.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var Ze=Object(Ie.a)(Ne().mark(function ke(){var Je;return Ne().wrap(function(de){for(;;)switch(de.prev=de.next){case 0:return de.next=2,he({type:"shixunsDetail/cancelRelease",payload:{id:ee==null?void 0:ee.identifier}});case 2:Je=de.sent,Je.status!==401&&(ze.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),he({type:"shixunsDetail/getShixunsDetail",payload:{id:ee==null?void 0:ee.identifier}}),he({type:"practiceSetting/getCommonData",payload:{id:ee==null?void 0:ee.identifier}}));case 4:case"end":return de.stop()}},ke)}));function I(){return Ze.apply(this,arguments)}return I}()})}}),!0):!1}},WdTA:function(Be,Se,s){Be.exports=s.p+"static/studnetqun.a5754d96.png"},eoI0:function(Be,Se,s){Be.exports={selectSchool:"selectSchool___2Vrh7",delete:"delete___qM8Jm"}},hgre:function(Be,Se,s){"use strict";var rt=s("9og8"),ze=s("q1tI"),Ie=s.n(ze),nt=s("GUcZ"),se=s("ulZh"),h=s.n(se);function ne(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ne=function(){return Z};var Z={},Xe=Object.prototype,Oe=Xe.hasOwnProperty,ve=typeof Symbol=="function"?Symbol:{},Ne=ve.iterator||"@@iterator",Ke=ve.asyncIterator||"@@asyncIterator",xe=ve.toStringTag||"@@toStringTag";function Me(c,l,E){return Object.defineProperty(c,l,{value:E,enumerable:!0,configurable:!0,writable:!0}),c[l]}try{Me({},"")}catch(c){Me=function(E,L,b){return E[L]=b}}function Pe(c,l,E,L){var b=l&&l.prototype instanceof tt?l:tt,j=Object.create(b.prototype),q=new de(L||[]);return j._invoke=function(ue,J,$){var X="suspendedStart";return function(Ae,y){if(X==="executing")throw new Error("Generator is already running");if(X==="completed"){if(Ae==="throw")throw y;return P()}for($.method=Ae,$.arg=y;;){var f=$.delegate;if(f){var T=ke(f,$);if(T){if(T===Ue)continue;return T}}if($.method==="next")$.sent=$._sent=$.arg;else if($.method==="throw"){if(X==="suspendedStart")throw X="completed",$.arg;$.dispatchException($.arg)}else $.method==="return"&&$.abrupt("return",$.arg);X="executing";var S=ae(ue,J,$);if(S.type==="normal"){if(X=$.done?"completed":"suspendedYield",S.arg===Ue)continue;return{value:S.arg,done:$.done}}S.type==="throw"&&(X="completed",$.method="throw",$.arg=S.arg)}}}(c,E,q),j}function ae(c,l,E){try{return{type:"normal",arg:c.call(l,E)}}catch(L){return{type:"throw",arg:L}}}Z.wrap=Pe;var Ue={};function tt(){}function le(){}function he(){}var oe={};Me(oe,Ne,function(){return this});var He=Object.getPrototypeOf,ee=He&&He(He(_e([])));ee&&ee!==Xe&&Oe.call(ee,Ne)&&(oe=ee);var qe=he.prototype=tt.prototype=Object.create(oe);function Ze(c){["next","throw","return"].forEach(function(l){Me(c,l,function(E){return this._invoke(l,E)})})}function I(c,l){function E(b,j,q,ue){var J=ae(c[b],c,j);if(J.type!=="throw"){var $=J.arg,X=$.value;return X&&typeof X=="object"&&Oe.call(X,"__await")?l.resolve(X.__await).then(function(Ae){E("next",Ae,q,ue)},function(Ae){E("throw",Ae,q,ue)}):l.resolve(X).then(function(Ae){$.value=Ae,q($)},function(Ae){return E("throw",Ae,q,ue)})}ue(J.arg)}var L;this._invoke=function(b,j){function q(){return new l(function(ue,J){E(b,j,ue,J)})}return L=L?L.then(q,q):q()}}function ke(c,l){var E=c.iterator[l.method];if(E===void 0){if(l.delegate=null,l.method==="throw"){if(c.iterator.return&&(l.method="return",l.arg=void 0,ke(c,l),l.method==="throw"))return Ue;l.method="throw",l.arg=new TypeError("The iterator does not provide a 'throw' method")}return Ue}var L=ae(E,c.iterator,l.arg);if(L.type==="throw")return l.method="throw",l.arg=L.arg,l.delegate=null,Ue;var b=L.arg;return b?b.done?(l[c.resultName]=b.value,l.next=c.nextLoc,l.method!=="return"&&(l.method="next",l.arg=void 0),l.delegate=null,Ue):b:(l.method="throw",l.arg=new TypeError("iterator result is not an object"),l.delegate=null,Ue)}function Je(c){var l={tryLoc:c[0]};1 in c&&(l.catchLoc=c[1]),2 in c&&(l.finallyLoc=c[2],l.afterLoc=c[3]),this.tryEntries.push(l)}function Ge(c){var l=c.completion||{};l.type="normal",delete l.arg,c.completion=l}function de(c){this.tryEntries=[{tryLoc:"root"}],c.forEach(Je,this),this.reset(!0)}function _e(c){if(c){var l=c[Ne];if(l)return l.call(c);if(typeof c.next=="function")return c;if(!isNaN(c.length)){var E=-1,L=function b(){for(;++E<c.length;)if(Oe.call(c,E))return b.value=c[E],b.done=!1,b;return b.value=void 0,b.done=!0,b};return L.next=L}}return{next:P}}function P(){return{value:void 0,done:!0}}return le.prototype=he,Me(qe,"constructor",he),Me(he,"constructor",le),le.displayName=Me(he,xe,"GeneratorFunction"),Z.isGeneratorFunction=function(c){var l=typeof c=="function"&&c.constructor;return!!l&&(l===le||(l.displayName||l.name)==="GeneratorFunction")},Z.mark=function(c){return Object.setPrototypeOf?Object.setPrototypeOf(c,he):(c.__proto__=he,Me(c,xe,"GeneratorFunction")),c.prototype=Object.create(qe),c},Z.awrap=function(c){return{__await:c}},Ze(I.prototype),Me(I.prototype,Ke,function(){return this}),Z.AsyncIterator=I,Z.async=function(c,l,E,L,b){b===void 0&&(b=Promise);var j=new I(Pe(c,l,E,L),b);return Z.isGeneratorFunction(l)?j:j.next().then(function(q){return q.done?q.value:j.next()})},Ze(qe),Me(qe,xe,"Generator"),Me(qe,Ne,function(){return this}),Me(qe,"toString",function(){return"[object Generator]"}),Z.keys=function(c){var l=[];for(var E in c)l.push(E);return l.reverse(),function L(){for(;l.length;){var b=l.pop();if(b in c)return L.value=b,L.done=!1,L}return L.done=!0,L}},Z.values=_e,de.prototype={constructor:de,reset:function(l){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Ge),!l)for(var E in this)E.charAt(0)==="t"&&Oe.call(this,E)&&!isNaN(+E.slice(1))&&(this[E]=void 0)},stop:function(){this.done=!0;var l=this.tryEntries[0].completion;if(l.type==="throw")throw l.arg;return this.rval},dispatchException:function(l){if(this.done)throw l;var E=this;function L($,X){return q.type="throw",q.arg=l,E.next=$,X&&(E.method="next",E.arg=void 0),!!X}for(var b=this.tryEntries.length-1;b>=0;--b){var j=this.tryEntries[b],q=j.completion;if(j.tryLoc==="root")return L("end");if(j.tryLoc<=this.prev){var ue=Oe.call(j,"catchLoc"),J=Oe.call(j,"finallyLoc");if(ue&&J){if(this.prev<j.catchLoc)return L(j.catchLoc,!0);if(this.prev<j.finallyLoc)return L(j.finallyLoc)}else if(ue){if(this.prev<j.catchLoc)return L(j.catchLoc,!0)}else{if(!J)throw new Error("try statement without catch or finally");if(this.prev<j.finallyLoc)return L(j.finallyLoc)}}}},abrupt:function(l,E){for(var L=this.tryEntries.length-1;L>=0;--L){var b=this.tryEntries[L];if(b.tryLoc<=this.prev&&Oe.call(b,"finallyLoc")&&this.prev<b.finallyLoc){var j=b;break}}j&&(l==="break"||l==="continue")&&j.tryLoc<=E&&E<=j.finallyLoc&&(j=null);var q=j?j.completion:{};return q.type=l,q.arg=E,j?(this.method="next",this.next=j.finallyLoc,Ue):this.complete(q)},complete:function(l,E){if(l.type==="throw")throw l.arg;return l.type==="break"||l.type==="continue"?this.next=l.arg:l.type==="return"?(this.rval=this.arg=l.arg,this.method="return",this.next="end"):l.type==="normal"&&E&&(this.next=E),Ue},finish:function(l){for(var E=this.tryEntries.length-1;E>=0;--E){var L=this.tryEntries[E];if(L.finallyLoc===l)return this.complete(L.completion,L.afterLoc),Ge(L),Ue}},catch:function(l){for(var E=this.tryEntries.length-1;E>=0;--E){var L=this.tryEntries[E];if(L.tryLoc===l){var b=L.completion;if(b.type==="throw"){var j=b.arg;Ge(L)}return j}}throw new Error("illegal catch attempt")},delegateYield:function(l,E,L){return this.delegate={iterator:_e(l),resultName:E,nextLoc:L},this.method==="next"&&(this.arg=void 0),Ue}},Z}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function at(Z,Xe){return Z-Xe}function ot(Z){Z.sort(at);for(var Xe=0,Oe=0;Oe<Z.length-1;Oe++){var ve=Math.abs(Z[Oe+1]-Z[Oe]);ve<21&&(Xe+=ve)}return Xe}var ut=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;Se.a=Object(ze.forwardRef)(function(Z,Xe){var Oe,ve=Z.src,Ne=Z.videoId,Ke=Z.logWatchHistory,xe=Z.courseId,Me=xe===void 0?null:xe,Pe=Z.startTime,ae=Z.handlePause,Ue=ae===void 0?function(){}:ae,tt=Z.handlePlay,le=tt===void 0?function(){}:tt,he=Z.handlePlayEnded,oe=he===void 0?function(){}:he,He=Z.videoSpeed,ee=He===void 0?1:He,qe=ve==null||((Oe=ve.split("."))===null||Oe===void 0)?void 0:Oe.pop(),Ze=qe==="flv",I=Object(ze.useRef)(),ke=navigator.userAgent.toLowerCase().match(ut),Je=ke?ke[0]:"pc",Ge=Object(ze.useRef)(!1),de=0,_e=0,P=0,c=null,l=!1,E=20,L=1,b=!1,j=!1,q=[];Object(ze.useImperativeHandle)(Xe,function(){return{getLastUpdatedTime:function(){return I.current.currentTime},getDuration:function(){return I.current.duration}}});var ue=Object(ze.useCallback)(function(J){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X={point:I.current.currentTime};c?(X.log_id=c,X.watch_duration=ot(q),X.total_duration=_e):(Me?(X.video_id=parseInt(Ne,10),X.course_id=Me):X.video_id=Ne,X.duration=de,X.device=Je),$&&(X.ed="1");function Ae(){return y.apply(this,arguments)}function y(){return y=Object(rt.a)(ne().mark(function f(){var T;return ne().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return b=!0,N.next=3,Ke(X);case 3:T=N.sent,c=T,b=!1,J&&J();case 7:case"end":return N.stop()}},f)})),y.apply(this,arguments)}Ae()},[Ne,Me]);return Object(ze.useEffect)(function(){var J=null;return nt.a.isSupported&&Ze&&ve&&(ve==null?void 0:ve.indexOf(".m3u8"))<0?(J=nt.a.createPlayer({type:"flv",volume:.8,cors:!0,url:ve,muted:!1}),I.current&&(J.attachMediaElement(I.current),J.load())):I.current.setAttribute("src",ve),function(){J&&(J.unload(),J.pause(),J.destroy(),J=null)}},[I,Ze,ve]),Object(ze.useEffect)(function(){function J(){le(),Pe&&!Ge.current&&(I.current.currentTime=Pe),Ge.current=!0,q.push(I.current.currentTime),l||(l=!0,ue())}function $(){return X.apply(this,arguments)}function X(){return X=Object(rt.a)(ne().mark(function N(){return ne().wrap(function(De){for(;;)switch(De.prev=De.next){case 0:q.push(I.current.currentTime),ue(function(){c=null,P=0,l=!1,b=!1,j=!1,q=[],_e=0,L=1},!0);case 2:case"end":return De.stop()}},N)})),X.apply(this,arguments)}function Ae(){if(!j){var N=I.current.currentTime,K=N-P;Math.abs(K)<10?(_e+=Math.abs(K),P=N,b||_e-L*E>=0&&(L++,q.push(P),ue())):(P=N,ue())}}function y(){j=!0}function f(){I.current.playing&&q.push(I.current.currentTime,P),P=I.current.currentTime,j=!1}function T(){de=I.current.duration,de<=20&&(E=de/3),I.current.addEventListener("play",J)}function S(){Ue()}return I.current.addEventListener("canplay",T),I.current.addEventListener("ended",$),I.current.addEventListener("seeking",y),I.current.addEventListener("seeked",f),I.current.addEventListener("timeupdate",Ae),I.current.addEventListener("pause",S),function(){I.current.removeEventListener("canplay",T),I.current.removeEventListener("play",J),I.current.removeEventListener("ended",$),I.current.removeEventListener("seeking",y),I.current.removeEventListener("seeked",f),I.current.removeEventListener("timeupdate",Ae),I.current.removeEventListener("pause",S),I.current.playing&&(q.push(P,I.current.currentTime),ue())}},[I,ve]),Object(ze.useEffect)(function(){if(I.current.onended=function(){oe(I)},I.current.oncontextmenu=function(){return!1},I.current.playbackRate=ee,ve.indexOf(".m3u8")>-1){if(I.current.canPlayType("application/vnd.apple.mpegurl"))I.current.src=ve;else if(h.a.isSupported()){var J=new h.a;J.loadSource(ve),J.attachMedia(I.current)}}},[ve,ee]),Ie.a.createElement("video",{ref:I,controls:!0,autoPlay:!1,controlsList:"nodownload",muted:!1})})},kwm0:function(Be,Se,s){Be.exports={modal:"modal___1jX7c",uploadWrap:"uploadWrap___3-sVK",upload:"upload___2LemY",uploadLink:"uploadLink___j9Fsx",fileProgress:"fileProgress___11p3K",fileCancel:"fileCancel___3Mx9l",videoName:"videoName___2a-ZN",contentItem:"contentItem___1gUuj"}},mOS8:function(Be,Se,s){Be.exports=s.p+"static/403Qrcode.6c17b6f4.png"},nUhQ:function(Be,Se,s){Be.exports={flex_box_center:"flex_box_center___1OQ1z",flex_space_between:"flex_space_between___22uwF",flex_box_vertical_center:"flex_box_vertical_center___1xWAr",flex_box_center_end:"flex_box_center_end___1QTe3",flex_box_column:"flex_box_column___lWxZG",banner:"banner___1Hzq6",wrap:"wrap___1D5RS",title:"title___1LzGm",contentWrap:"contentWrap___19oxo",button:"button___3chJs",rating:"rating___3ODxx"}},sBCT:function(Be,Se,s){"use strict";var rt=s("DZo9"),ze=s("8z0m"),Ie=s("+L6B"),nt=s("2/Rp"),se=s("MXD1"),h=s("CFYs"),ne=s("9og8"),at=s("2qtc"),ot=s("kLXV"),ut=s("miYZ"),Z=s("tsqr"),Xe=s("y8nQ"),Oe=s("Vl3Y"),ve=s("tJVT"),Ne=s("k1fw"),Ke=s("oBTY"),xe=s("5NDa"),Me=s("5rEg"),Pe=s("q1tI"),ae=s.n(Pe),Ue=s("Ty5D"),tt=s("55Ip"),le=s("9kvl"),he=s("kwm0"),oe=s.n(he),He=s("Aky1"),ee=s("h/US"),qe=s("m3rI");function Ze(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Ze=function(){return de};var de={},_e=Object.prototype,P=_e.hasOwnProperty,c=typeof Symbol=="function"?Symbol:{},l=c.iterator||"@@iterator",E=c.asyncIterator||"@@asyncIterator",L=c.toStringTag||"@@toStringTag";function b(w,v,x){return Object.defineProperty(w,v,{value:x,enumerable:!0,configurable:!0,writable:!0}),w[v]}try{b({},"")}catch(w){b=function(x,G,te){return x[G]=te}}function j(w,v,x,G){var te=v&&v.prototype instanceof J?v:J,ce=Object.create(te.prototype),Fe=new Qe(G||[]);return ce._invoke=function(ye,it,Re){var $e="suspendedStart";return function(et,ct){if($e==="executing")throw new Error("Generator is already running");if($e==="completed"){if(et==="throw")throw ct;return je()}for(Re.method=et,Re.arg=ct;;){var lt=Re.delegate;if(lt){var dt=K(lt,Re);if(dt){if(dt===ue)continue;return dt}}if(Re.method==="next")Re.sent=Re._sent=Re.arg;else if(Re.method==="throw"){if($e==="suspendedStart")throw $e="completed",Re.arg;Re.dispatchException(Re.arg)}else Re.method==="return"&&Re.abrupt("return",Re.arg);$e="executing";var st=q(ye,it,Re);if(st.type==="normal"){if($e=Re.done?"completed":"suspendedYield",st.arg===ue)continue;return{value:st.arg,done:Re.done}}st.type==="throw"&&($e="completed",Re.method="throw",Re.arg=st.arg)}}}(w,x,Fe),ce}function q(w,v,x){try{return{type:"normal",arg:w.call(v,x)}}catch(G){return{type:"throw",arg:G}}}de.wrap=j;var ue={};function J(){}function $(){}function X(){}var Ae={};b(Ae,l,function(){return this});var y=Object.getPrototypeOf,f=y&&y(y(fe([])));f&&f!==_e&&P.call(f,l)&&(Ae=f);var T=X.prototype=J.prototype=Object.create(Ae);function S(w){["next","throw","return"].forEach(function(v){b(w,v,function(x){return this._invoke(v,x)})})}function N(w,v){function x(te,ce,Fe,ye){var it=q(w[te],w,ce);if(it.type!=="throw"){var Re=it.arg,$e=Re.value;return $e&&typeof $e=="object"&&P.call($e,"__await")?v.resolve($e.__await).then(function(et){x("next",et,Fe,ye)},function(et){x("throw",et,Fe,ye)}):v.resolve($e).then(function(et){Re.value=et,Fe(Re)},function(et){return x("throw",et,Fe,ye)})}ye(it.arg)}var G;this._invoke=function(te,ce){function Fe(){return new v(function(ye,it){x(te,ce,ye,it)})}return G=G?G.then(Fe,Fe):Fe()}}function K(w,v){var x=w.iterator[v.method];if(x===void 0){if(v.delegate=null,v.method==="throw"){if(w.iterator.return&&(v.method="return",v.arg=void 0,K(w,v),v.method==="throw"))return ue;v.method="throw",v.arg=new TypeError("The iterator does not provide a 'throw' method")}return ue}var G=q(x,w.iterator,v.arg);if(G.type==="throw")return v.method="throw",v.arg=G.arg,v.delegate=null,ue;var te=G.arg;return te?te.done?(v[w.resultName]=te.value,v.next=w.nextLoc,v.method!=="return"&&(v.method="next",v.arg=void 0),v.delegate=null,ue):te:(v.method="throw",v.arg=new TypeError("iterator result is not an object"),v.delegate=null,ue)}function De(w){var v={tryLoc:w[0]};1 in w&&(v.catchLoc=w[1]),2 in w&&(v.finallyLoc=w[2],v.afterLoc=w[3]),this.tryEntries.push(v)}function Ye(w){var v=w.completion||{};v.type="normal",delete v.arg,w.completion=v}function Qe(w){this.tryEntries=[{tryLoc:"root"}],w.forEach(De,this),this.reset(!0)}function fe(w){if(w){var v=w[l];if(v)return v.call(w);if(typeof w.next=="function")return w;if(!isNaN(w.length)){var x=-1,G=function te(){for(;++x<w.length;)if(P.call(w,x))return te.value=w[x],te.done=!1,te;return te.value=void 0,te.done=!0,te};return G.next=G}}return{next:je}}function je(){return{value:void 0,done:!0}}return $.prototype=X,b(T,"constructor",X),b(X,"constructor",$),$.displayName=b(X,L,"GeneratorFunction"),de.isGeneratorFunction=function(w){var v=typeof w=="function"&&w.constructor;return!!v&&(v===$||(v.displayName||v.name)==="GeneratorFunction")},de.mark=function(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,X):(w.__proto__=X,b(w,L,"GeneratorFunction")),w.prototype=Object.create(T),w},de.awrap=function(w){return{__await:w}},S(N.prototype),b(N.prototype,E,function(){return this}),de.AsyncIterator=N,de.async=function(w,v,x,G,te){te===void 0&&(te=Promise);var ce=new N(j(w,v,x,G),te);return de.isGeneratorFunction(v)?ce:ce.next().then(function(Fe){return Fe.done?Fe.value:ce.next()})},S(T),b(T,L,"Generator"),b(T,l,function(){return this}),b(T,"toString",function(){return"[object Generator]"}),de.keys=function(w){var v=[];for(var x in w)v.push(x);return v.reverse(),function G(){for(;v.length;){var te=v.pop();if(te in w)return G.value=te,G.done=!1,G}return G.done=!0,G}},de.values=fe,Qe.prototype={constructor:Qe,reset:function(v){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Ye),!v)for(var x in this)x.charAt(0)==="t"&&P.call(this,x)&&!isNaN(+x.slice(1))&&(this[x]=void 0)},stop:function(){this.done=!0;var v=this.tryEntries[0].completion;if(v.type==="throw")throw v.arg;return this.rval},dispatchException:function(v){if(this.done)throw v;var x=this;function G(Re,$e){return Fe.type="throw",Fe.arg=v,x.next=Re,$e&&(x.method="next",x.arg=void 0),!!$e}for(var te=this.tryEntries.length-1;te>=0;--te){var ce=this.tryEntries[te],Fe=ce.completion;if(ce.tryLoc==="root")return G("end");if(ce.tryLoc<=this.prev){var ye=P.call(ce,"catchLoc"),it=P.call(ce,"finallyLoc");if(ye&&it){if(this.prev<ce.catchLoc)return G(ce.catchLoc,!0);if(this.prev<ce.finallyLoc)return G(ce.finallyLoc)}else if(ye){if(this.prev<ce.catchLoc)return G(ce.catchLoc,!0)}else{if(!it)throw new Error("try statement without catch or finally");if(this.prev<ce.finallyLoc)return G(ce.finallyLoc)}}}},abrupt:function(v,x){for(var G=this.tryEntries.length-1;G>=0;--G){var te=this.tryEntries[G];if(te.tryLoc<=this.prev&&P.call(te,"finallyLoc")&&this.prev<te.finallyLoc){var ce=te;break}}ce&&(v==="break"||v==="continue")&&ce.tryLoc<=x&&x<=ce.finallyLoc&&(ce=null);var Fe=ce?ce.completion:{};return Fe.type=v,Fe.arg=x,ce?(this.method="next",this.next=ce.finallyLoc,ue):this.complete(Fe)},complete:function(v,x){if(v.type==="throw")throw v.arg;return v.type==="break"||v.type==="continue"?this.next=v.arg:v.type==="return"?(this.rval=this.arg=v.arg,this.method="return",this.next="end"):v.type==="normal"&&x&&(this.next=x),ue},finish:function(v){for(var x=this.tryEntries.length-1;x>=0;--x){var G=this.tryEntries[x];if(G.finallyLoc===v)return this.complete(G.completion,G.afterLoc),Ye(G),ue}},catch:function(v){for(var x=this.tryEntries.length-1;x>=0;--x){var G=this.tryEntries[x];if(G.tryLoc===v){var te=G.completion;if(te.type==="throw"){var ce=te.arg;Ye(G)}return ce}}throw new Error("illegal catch attempt")},delegateYield:function(v,x,G){return this.delegate={iterator:fe(v),resultName:x,nextLoc:G},this.method==="next"&&(this.arg=void 0),ue}},de}var I=Me.a.TextArea,ke=1024,Je=function(_e,P){var c,l=P.payload||{},E=l.uploadInfo,L=E===void 0?{}:E;switch(P.type){case"addVideo":return{videoList:[].concat(Object(Ke.a)(_e.videoList),[{name:L.file.name,size:L.file.size,type:L.file.type,fileHash:L.fileHash,state:L.state,videoId:L.videoId,loaded:L.loaded||0,title:""}])};case"removeVideo":return{videoList:_e.videoList.filter(function(b){return b.name!==P.payload.name})};case"removeAll":return{videoList:[]};case"updateProgress":return{videoList:_e.videoList.map(function(b){return b.name===P.payload.uploadInfo.file.name?Object(Ne.a)(Object(Ne.a)({},b),{loaded:P.payload.progressPercent,videoId:L.videoId,fileHash:L.fileHash}):b})};case"updateTitle":return{videoList:(c=_e.videoList)===null||c===void 0?void 0:c.map(function(b){return b.name===P.payload.item.name?Object(Ne.a)(Object(Ne.a)({},b),{title:P.payload.title}):b})};default:return{videoList:[]}}},Ge=function(_e){var P,c=_e.user,l=_e.globalSetting,E=_e.loading,L=_e.dispatch,b=_e.visible,j=_e.editData,q=_e.onCancel,ue=q===void 0?function(){}:q,J=_e.onOk,$=J===void 0?function(){}:J,X=Object(Ue.m)(),Ae=Oe.a.useForm(),y=Object(ve.a)(Ae,1),f=y[0],T=Object(Pe.useReducer)(Je,{videoList:[]}),S=Object(ve.a)(T,2),N=S[0],K=S[1],De=Object(Pe.useState)(!1),Ye=Object(ve.a)(De,2),Qe=Ye[0],fe=Ye[1],je=Object(Pe.useRef)(),w=Object(Pe.useState)(),v=Object(ve.a)(w,2),x=v[0],G=v[1],te=Object(Pe.useState)(!1),ce=Object(ve.a)(te,2),Fe=ce[0],ye=ce[1],it=Object(Pe.useState)(!1),Re=Object(ve.a)(it,2),$e=Re[0],et=Re[1],ct=Object(Pe.useState)([]),lt=Object(ve.a)(ct,2),dt=lt[0],st=lt[1],ft=Object(Pe.useState)([]),g=Object(ve.a)(ft,2),M=g[0],D=g[1];Object(Pe.useEffect)(function(){if(!j)return;ye(j.is_link),G(j.link),!j.is_link&&K({type:"addVideo",payload:{uploadInfo:{file:{name:j.file_name},videoId:j.video_id,loaded:100}}}),f.setFieldsValue({name:j.name,description:j.description,attachment_id:j==null?void 0:j.attachment_id})},[j]);var W=function(){var _=document.getElementById("fileUpload");_.value=""},ie=function(_){var k;ye(!1);var H=_.target.files[0];if(!H){W();return}var F=H.name.toLowerCase();if(F&&F.indexOf(".avi")==-1&&F.indexOf(".flv")==-1&&F.indexOf(".f4v")==-1&&F.indexOf(".m4v")==-1&&F.indexOf(".mov")==-1&&F.indexOf(".mp4")==-1&&F.indexOf(".rmvb")==-1&&F.indexOf(".swf")==-1&&F.indexOf(".webm")==-1&&F.indexOf(".wmv")==-1){Z.b.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),W();return}if(H.size>ke*1024*1024){Z.b.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71G"),W();return}if((k=N.videoList)===null||k===void 0?void 0:k.find(function(C){return C.name===H.name})){Z.b.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),W();return}Ee(H)},Ve=function(_,k){ot.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:ae.a.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",k?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:function(){W(),K({type:"removeVideo",payload:{name:_}})}})},Ee=function(_){var k,H='{"Vod":{}}';if(fe(!0),je.current){je.current.addFile(_,null,null,null,H);return}Object(He.a)((k=c.userInfo)===null||k===void 0?void 0:k.login,{create:!je,addFileSuccess:function(C){K({type:"addVideo",payload:{uploadInfo:C}})},onUploadProgress:function(C,me,z){var Le=Math.ceil(z*100);K({type:"updateProgress",payload:{uploadInfo:C,progressPercent:Le}}),W()},onUploadFailed:function(C){Z.b.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:function(C){fe(!1)},onUploadSucceed:function(C){fe(!1)},onUploadError:function(C){fe(!1)},gotUploader:function(C){C.addFile(_,null,null,null,H),je.current=C}})},O=function(){var V=Object(ne.a)(Ze().mark(function _(){var k,H,F,C;return Ze().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,f.validateFields();case 2:if(!(!Fe&&!((k=N.videoList)===null||k===void 0?void 0:k.length)||Fe&&!x)){z.next=5;break}return Z.b.info("\u8BF7\u5148\u4E0A\u4F20\u89C6\u9891\u6216\u8005\u6DFB\u52A0\u5916\u94FE"),z.abrupt("return");case 5:et(!0),F=Fe?{link:x}:{video_id:(H=N.videoList)===null||H===void 0?void 0:H[0].videoId};debugger;return z.next=10,$(Object(Ne.a)(Object(Ne.a)({},F),{name:f.getFieldValue("name"),attachment_id:f.getFieldValue("attachment_id"),description:f.getFieldValue("description")}));case 10:C=z.sent,et(!1),C.id&&Ce();case 13:case"end":return z.stop()}},_)}));return function(){return V.apply(this,arguments)}}(),Ce=function(){f.resetFields(),K({type:"removeAll"}),G(null),ye(null)},ge=function(){ue(),Ce()},A={name:"file",multiple:!0,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*",action:qe.a.API_SERVER+"/api/attachments.json",withCredentials:!0,onRemove:function(_){D([])},onChange:function(_){var k=_.file.status;if(k!=="uploading",k==="removed"&&st(_.fileList),k==="done"){var H,F,C;st(_==null||((H=_.fileList)===null||H===void 0)?void 0:H.slice(-1)),K({type:"addVideo",payload:{uploadInfo:{videoId:_==null||((F=_.fileList[0])===null||F===void 0||((C=F.response)===null||C===void 0))?void 0:C.id,loaded:100,file:Object(Ne.a)({},_==null?void 0:_.fileList[0])}}}),ye(!1),Z.b.success("".concat(_.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))}else k==="error"&&Z.b.error("".concat(_.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(_){var k=_.size/1024/1024<1e3;return k||Z.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),k}},pe=function(){var _,k,H,F,C,me,z,Le,B,re,U,Y;return ae.a.createElement(ae.a.Fragment,null,!Fe&&!!((_=N.videoList)===null||_===void 0?void 0:_.length)&&ae.a.createElement("div",{className:oe.a.fileProgress},((k=N.videoList)===null||k===void 0||((H=k[0])===null||H===void 0)?void 0:H.loaded)==100?ae.a.createElement("div",{className:"".concat(oe.a.videoName," font14")},(F=N.videoList)===null||F===void 0||((C=F[0])===null||C===void 0)?void 0:C.name):ae.a.createElement(h.a,{style:{width:"80%"},percent:(me=N.videoList)===null||me===void 0||((z=me[0])===null||z===void 0)?void 0:z.loaded,status:((Le=N.videoList)===null||Le===void 0||((B=Le[0])===null||B===void 0)?void 0:B.loaded)==100?"normal":"active"}),ae.a.createElement("div",{className:oe.a.fileCancel,onClick:function(){var t,e,r,n;return Ve((t=N.videoList)===null||t===void 0||((e=t[0])===null||e===void 0)?void 0:e.name,((r=N.videoList)===null||r===void 0||((n=r[0])===null||n===void 0)?void 0:n.loaded)==100)}},((re=N.videoList)===null||re===void 0||((U=re[0])===null||U===void 0)?void 0:U.loaded)===100?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20")),!((Y=N.videoList)===null||Y===void 0?void 0:Y.length)&&ae.a.createElement("div",{className:oe.a.uploadWrap},ae.a.createElement("label",{htmlFor:"fileUpload",style:{marginRight:"30px"}},ae.a.createElement(ze.a,A,ae.a.createElement(nt.a,{className:oe.a.upload,disabled:(M==null?void 0:M.length)>0},ae.a.createElement("i",{className:"iconfont icon-shangchuanshipin1 mr5"}),"\u4E0A\u4F20\u89C6\u9891"))),ae.a.createElement("label",{className:"".concat(oe.a.upload," ").concat(oe.a.uploadLink),onClick:function(){return ye(!0)}},ae.a.createElement("i",{className:"iconfont icon-lianjie1 mr5"}),"\u6DFB\u52A0\u5916\u94FE")),Fe&&ae.a.createElement(Me.a,{className:"mt5",placeholder:"\u8BF7\u8F93\u5165\u89C6\u9891\u94FE\u63A5",value:x,onChange:function(t){return G(t.target.value)}}))};return ae.a.createElement(ot.a,{centered:!0,maskClosable:!1,title:j?"\u7F16\u8F91\u89C6\u9891\u9879\u76EE":"\u65B0\u5EFA\u89C6\u9891\u9879\u76EE",width:740,className:oe.a.modal,visible:b,confirmLoading:$e,onOk:O,onCancel:ge},ae.a.createElement(Oe.a,{form:f},ae.a.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:ie,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}),ae.a.createElement(Oe.a.Item,{label:"\u9879\u76EE\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0"}]},ae.a.createElement(Me.a,{maxLength:40,placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC740\u5B57\u7684\u9879\u76EE\u540D\u79F0"})),ae.a.createElement(Oe.a.Item,{label:"\u9879\u76EE\u5185\u5BB9",name:"content",className:oe.a.contentItem},pe()),ae.a.createElement(Oe.a.Item,{name:"attachment_id",label:"\u4E0A\u4F20\u5C01\u9762\u56FE:"},ae.a.createElement(ee.a,{getFileProgress:function(_){if(_.file.status==="uploading"){et(!0);return}_.file.status==="done"&&et(!1)}})),ae.a.createElement(Oe.a.Item,{label:"\u9879\u76EE\u7B80\u4ECB",name:"description",className:"ml8"},ae.a.createElement(I,{rows:5,maxLength:800,placeholder:"\u8BF7\u8F93\u5165\u672C\u89C6\u9891\u7B80\u4ECB\uFF0C\u6700\u591A\u4E0D\u8D85\u8FC7800\u5B57"})),ae.a.createElement("div",{className:"c-grey-999"},ae.a.createElement("div",null,"\u6CE8\u610F\uFF1A"),ae.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",ae.a.createElement(tt.Link,{to:"/users/".concat((P=c.userInfo)===null||P===void 0?void 0:P.login,"/videos/protocol"),target:"_blank",className:oe.a.colorBlue},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),ae.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),ae.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"),ae.a.createElement("div",null,"4\u3001\u5982\u679C\u89C6\u9891\u6765\u81EA\u4E8E\u5916\u90E8\u94FE\u63A5\uFF0C\u672C\u7F51\u7AD9\u4E0D\u63D0\u4F9B\u64AD\u653E\u9875\u9762\uFF0C\u65E0\u6CD5\u63D0\u4F9B\u7EDF\u8BA1\u6570\u636E\u3002"))))};Se.a=Object(le.a)(function(de){var _e=de.user,P=de.loading,c=de.globalSetting;return{user:_e,globalSetting:c,loading:P}})(Ge)},sWEp:function(Be,Se,s){Be.exports={wrap:"wrap___3nJXB",title:"title___3AYM5",radioWrap:"radioWrap___dbSML",radio:"radio___3h-_z",colorFF0000:"colorFF0000___2d_ZE",pagination:"pagination___3WP6s"}},vZDz:function(Be,Se,s){Be.exports={contentWrap:"contentWrap___3Fc2r",footer:"footer___4nxVN",radioGroup:"radioGroup___359yE",wrap:"wrap___1OqR3",introName:"introName___3saG-",rating:"rating___3X95K",modalRating:"modalRating___A4qeN"}}}]);