h5educoderbuild/static/js/main.ee933ae1.chunk.js

1 line
5.7 KiB
JavaScript

(this.webpackJsonph5=this.webpackJsonph5||[]).push([[0],{104:function(e,n,t){},106:function(e,n,t){},176:function(e,n,t){"use strict";t.r(n);var r=t(0),a=t.n(r),o=t(16),c=t.n(o),i=(t(104),t(105),t(106),t(58)),u=t(15),s=t(61),l=t(62),d=t(65),f=t(63),p=t(66),h=function(e){function n(e){var t;return Object(s.a)(this,n),(t=Object(d.a)(this,Object(f.a)(n).call(this,e))).state={hasError:!1},t}return Object(p.a)(n,e),Object(l.a)(n,[{key:"componentDidCatch",value:function(){}},{key:"render",value:function(){return this.state.hasError?a.a.createElement("h1",null,"Something went wrong."):this.props.children}}],[{key:"getDerivedStateFromError",value:function(){return{hasError:!0}}}]),n}(a.a.Component),m=t(59),w=Object(r.lazy)((function(){return Promise.all([t.e(4),t.e(7)]).then(t.bind(null,435))}));Object(m.c)(),Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)),c.a.render(a.a.createElement((function(){return a.a.createElement("div",{className:"app"},a.a.createElement(h,null,a.a.createElement(i.a,{basename:"/h5educoderbuild"},a.a.createElement(r.Suspense,{fallback:a.a.createElement("div",null)},a.a.createElement(u.c,null,a.a.createElement(u.a,{path:"/educodermd/:identifier/:educoder_session/:autologin_trustie",component:w}))))))}),null),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){}))},59:function(e,n,t){"use strict";t.d(n,"d",(function(){return O})),t.d(n,"c",(function(){return E})),t.d(n,"b",(function(){return q})),t.d(n,"a",(function(){return $})),t(97);var r,a=t(19),o=t.n(a),c=t(30),i=t.n(c),u=t(40),s=t(31),l=t.n(s),d=t(37),f=t.n(d),p=t(92),h=t.n(p),m=t(55),w=t.n(m),v=t(93),b=t.n(v),x=!1,k=!1;function y(){return g.apply(this,arguments)}function g(){return(g=Object(u.a)(i.a.mark((function e(n){var t,a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1===x)return e.next=3,fetch(n);e.next=10;break;case 3:return t=e.sent,e.next=6,t.json();case 6:0===(a=e.sent).status&&(r=a.message),x=!0,window.setTimeout((function(){x=!1}),2e3);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){e.map((function(e,n){"educoder_session"===e.id?(l.a.save("_educoder_session",e.value,{path:"/"}),l.a.save("_educoder_session",e.value,{domain:".educoder.net",path:"/"})):(l.a.save("autologin_trustie",e.value,{path:"/"}),l.a.save("autologin_trustie",e.value,{domain:".educoder.net",path:"/"}))}))}function _(e){var n=[function(e){var n=e[1];return"/tasks/".concat(n,"/choose_build.json")}],t=e.url;if(-1!==t.indexOf(".json"))return e;e.withCredentials=!1;var r,a,o=t.split("?"),c=o[0];return(r={}[c])||[/\/api\/v1\/games\/(\w*)\/choose_build/i].forEach((function(t,i){var u=c.match(t);if(u){var s=n[i];return r=s&&s(u),a="".concat(r,"?").concat(o[1]),e.url=a,e}})),e}function E(){var e="https://test-newweb.educoder.net",n={};window.setfalseInRequestMap=function(e){n[e]=!1},f.a.interceptors.request.use(function(){var t=Object(u.a)(i.a.mark((function t(a){var o,c;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(-1!=a.url.indexOf(e)||-1!=a.url.indexOf(":"))return t.abrupt("return",a);t.next=2;break;case 2:return _(a),o="/api".concat(a.url),a.params&&null!=a.params.redirect_uri&&-1!=a.params.redirect_uri.indexOf("otherloginqq")&&(o="".concat(a.url)),t.next=7,y("".concat(e,"/api/main/first_stamp.json"));case 7:if(c=h()("79e33abd4b6588941ab7622aed1e67e8"+r),"true"!="".concat(a[0])&&("3000"===window.location.port?(a.url="".concat(e).concat(o),-1==a.url.indexOf("?")?a.url="".concat(a.url,"?debug=").concat("","&randomcode=").concat(r,"&client_key=").concat(c):a.url="".concat(a.url,"&debug=").concat("","&randomcode=").concat(r,"&client_key=").concat(c)):(a.url=o,-1==a.url.indexOf("?")?a.url="".concat(a.url,"?randomcode=").concat(r,"&client_key=").concat(c):a.url="".concat(a.url,"&randomcode=").concat(r,"&client_key=").concat(c))),"post"!==a.method){t.next=12;break}if(!0===n[a.url])return t.abrupt("return",!1);t.next=12;break;case 12:return-1===a.url.indexOf("update_file")&&(n[a.url]=!0,window.setTimeout("setfalseInRequestMap('"+a.url+"')",900)),t.abrupt("return",a);case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),(function(e){return Promise.reject(e)})),f.a.interceptors.response.use((function(e){if(void 0!==e){var t=e.data,r=t.status,a=t.message;if(-1===r)throw window.location.pathname.startsWith("/tasks/"),o.a.info(a||"\u670d\u52a1\u5668\u5f02\u5e38\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u3002"),new f.a.Cancel("Operation canceled by the user.");return 403!==r&&"403"!==r||o.a.info("\u8bbf\u95ee\u5f02\u5e38\uff0c\u65e0\u6743\u9650\u3002"),404===r&&o.a.info("\u8bbf\u95ee\u5f02\u5e38\uff0c\u63a5\u53e3404\u3002"),500===r&&o.a.info("\u8bbf\u95ee\u5f02\u5e38\uff0c\u63a5\u53e3500\u3002"),501===r&&(!1===k&&(k=!0,o.a.info(a||"\u8bbf\u95ee\u5f02\u5e38\uff0c\u8bf7\u6c42\u4e0d\u5408\u7406")),window.setTimeout((function(){k=!1}),2e3)),n[e.config.url]=!1,e}}))}window._debugType="",w.a.extension("prettify",(function(){return[{type:"output",filter:function(e){return e.replace(/(<pre[^>]*>)?[\n\s]?<code([^>]*)>/gi,(function(e,n,t){return n?'<pre class="prettyprint linenums"><code'+t+">":' <code class="prettyprint">'}))}}]}));var j=new w.a.Converter({tables:!0,extensions:["prettify",b()({throwOnError:!1,displayMode:!1,errorColor:"#1500ff"})]}),C=/(?:`?\$\$)([^ `\r\n]+)(?:\$\$`?)/gi;function q(e){var n=e.replace(C,(function(e,n){return"```latex\n"+n+"\n```"}));return j.makeHtml(n)}var $=0<location.href.indexOf("test-")||0<location.href.indexOf("localhost")?"https://test-newweb.educoder.net":"https://www.educoder.net"},99:function(e,n,t){e.exports=t(176)}},[[99,1,3]]]);