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.
13 lines
21 KiB
13 lines
21 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[124],{"6xWC":function(X,q,d){"use strict";d.r(q);var v=d("tJVT"),c=d("q1tI"),C=d.n(c);function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w(Object(r),!0).forEach(function(n){l(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function je(e,t){return ie(e)||Ce(e,t)||fe(e,t)||W()}function ie(e){if(Array.isArray(e))return e}function Ce(e,t){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,a=!1,i=void 0;try{for(var u=e[Symbol.iterator](),m;!(n=(m=u.next()).done)&&!(r.push(m.value),t&&r.length===t);n=!0);}catch(h){a=!0,i=h}finally{try{!n&&u.return!=null&&u.return()}finally{if(a)throw i}}return r}function fe(e,t){if(!e)return;if(typeof e=="string")return pe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pe(e,t)}function pe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function W(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function me(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?me(Object(r),!0).forEach(function(n){$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):me(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Te(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(a,i){return i(a)},n)}}function D(e){return function t(){for(var r=this,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return a.length>=e.length?e.apply(this,a):function(){for(var u=arguments.length,m=new Array(u),h=0;h<u;h++)m[h]=arguments[h];return t.apply(r,[].concat(a,m))}}}function T(e){return{}.toString.call(e).includes("Object")}function H(e){return!Object.keys(e).length}function L(e){return typeof e=="function"}function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e,t){return T(t)||s("changeType"),Object.keys(t).some(function(r){return!x(e,r)})&&s("changeField"),t}function S(e){L(e)||s("selectorType")}function U(e){L(e)||T(e)||s("handlerType"),T(e)&&Object.values(e).some(function(t){return!L(t)})&&s("handlersType")}function G(e){e||s("initialIsRequired"),T(e)||s("initialType"),H(e)&&s("initialContent")}function Y(e,t){throw new Error(e[t]||e.default)}var N={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},s=D(Y)(N),K={changes:p,selector:S,handler:U,initial:G};function V(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};K.initial(e),K.handler(t);var r={current:e},n=D(we)(r,t),a=D(ce)(r),i=D(K.changes)(e),u=D(ee)(r);function m(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(P){return P};return K.selector(B),B(r.current)}function h(B){Te(n,a,i,u)(B)}return[m,h]}function ee(e,t){return L(t)?t(e.current):t}function ce(e,t){return e.current=ge(ge({},e.current),t),t}function we(e,t,r){return L(t)?t(e.current):Object.keys(r).forEach(function(n){var a;return(a=t[n])===null||a===void 0?void 0:a.call(t,e.current[n])}),r}var De={create:V},he=De,J={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.25.2/min/vs"}},F=J;function I(e){return function t(){for(var r=this,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return a.length>=e.length?e.apply(this,a):function(){for(var u=arguments.length,m=new Array(u),h=0;h<u;h++)m[h]=arguments[h];return t.apply(r,[].concat(a,m))}}}var Q=I;function te(e){return{}.toString.call(e).includes("Object")}var rt=te;function nt(e){return e||Ke("configIsRequired"),rt(e)||Ke("configType"),e.urls?(ot(),{paths:{vs:e.urls.monacoBase}}):e}function ot(){console.warn(ze.deprecation)}function at(e,t){throw new Error(e[t]||e.default)}var ze={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
You are using deprecated way of configuration.
|
|
|
|
Instead of using
|
|
monaco.config({ urls: { monacoBase: '...' } })
|
|
use
|
|
monaco.config({ paths: { vs: '...' } })
|
|
|
|
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
`},Ke=Q(at)(ze),it={config:nt},ct=it,st=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(a){return r.reduceRight(function(i,u){return u(i)},a)}},ut=st;function Fe(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&(e[r]&&Object.assign(t[r],Fe(e[r],t[r])))}),z(z({},e),t)}var dt=Fe,lt={type:"cancelation",msg:"operation is manually canceled"};function ft(e){var t=!1,r=new Promise(function(n,a){e.then(function(i){return t?a(lt):n(i)}),e.catch(a)});return r.cancel=function(){return t=!0},r}var Je=ft,pt=he.create({config:F,isInitialized:!1,resolve:null,reject:null,monaco:null}),Xe=je(pt,2),se=Xe[0],ve=Xe[1];function mt(e){ve(function(t){return{config:dt(t.config,ct.config(e))}})}function gt(){var e=se(function(t){var r=t.isInitialized;return{isInitialized:r}});if(!e.isInitialized){if(window.monaco&&window.monaco.editor)return qe(window.monaco),Je(Promise.resolve(window.monaco));ut(ht,bt)(_t),ve({isInitialized:!0})}return Je(Ot)}function ht(e){return document.body.appendChild(e)}function vt(e){var t=document.createElement("script");return e&&(t.src=e),t}function bt(e){var t=se(function(n){var a=n.config,i=n.reject;return{config:a,reject:i}}),r=vt("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function _t(){var e=se(function(r){var n=r.config,a=r.resolve,i=r.reject;return{config:n,resolve:a,reject:i}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){qe(r),e.resolve(r)},function(r){e.reject(r)})}function qe(e){se().monaco||ve({monaco:e})}function Et(){return se(function(e){var t=e.monaco;return t})}var Ot=new Promise(function(e,t){return ve({resolve:e,reject:t})}),yt={config:mt,init:gt,__getMonacoInstance:Et},ue=yt,re=d("k1fw"),Mt=d("EH+i"),o=d.n(Mt),jt={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"};function Ct(e){var t=e.content;return C.a.createElement("div",{style:jt},t)}var Tt=Ct,wt={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Pe=wt;function Ge(e){var t=e.width,r=e.height,n=e.isEditorReady,a=e.loading,i=e._ref,u=e.className,m=e.wrapperClassName;return C.a.createElement("section",{style:Object(re.a)(Object(re.a)({},Pe.wrapper),{},{width:t,height:r}),className:m},!n&&C.a.createElement(Tt,{content:a}),C.a.createElement("div",{ref:i,style:Object(re.a)(Object(re.a)({},Pe.fullWidth),!n&&Pe.hide),className:u}))}Ge.propTypes={width:o.a.oneOfType([o.a.number,o.a.string]).isRequired,height:o.a.oneOfType([o.a.number,o.a.string]).isRequired,loading:o.a.oneOfType([o.a.element,o.a.string]).isRequired,isEditorReady:o.a.bool.isRequired,className:o.a.string,wrapperClassName:o.a.string};var Dt=Ge,Pt=Object(c.memo)(Dt),Ye=Pt;function At(e){Object(c.useEffect)(e,[])}var Ae=At;function St(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=Object(c.useRef)(!0);Object(c.useEffect)(n.current||!r?function(){n.current=!1}:e,t)}var k=St;function de(){}function Qe(e,t,r,n){return Nt(e,n)||Rt(e,t,r,n)}function Nt(e,t){return e.editor.getModel(Ze(e,t))}function Rt(e,t,r,n){return e.editor.createModel(t,r,n&&Ze(e,n))}function Ze(e,t){return e.Uri.parse(t)}function Lt(e){return e===void 0}function Se(e){var t=e.original,r=e.modified,n=e.language,a=e.originalLanguage,i=e.modifiedLanguage,u=e.originalModelPath,m=e.modifiedModelPath,h=e.keepCurrentOriginalModel,B=e.keepCurrentModifiedModel,P=e.theme,ne=e.loading,R=e.options,Re=e.height,Le=e.width,xe=e.className,Ue=e.wrapperClassName,Ie=e.beforeMount,ke=e.onMount,We=Object(c.useState)(!1),oe=Object(v.a)(We,2),M=oe[0],He=oe[1],_e=Object(c.useState)(!0),b=Object(v.a)(_e,2),Ee=b[0],Ve=b[1],A=Object(c.useRef)(null),y=Object(c.useRef)(null),Oe=Object(c.useRef)(null),j=Object(c.useRef)(ke),f=Object(c.useRef)(Ie);Ae(function(){var g=ue.init();return g.then(function(O){return(y.current=O)&&Ve(!1)}).catch(function(O){return(O==null?void 0:O.type)!=="cancelation"&&console.error("Monaco initialization: error:",O)}),function(){return A.current?Be():g.cancel()}}),k(function(){var g=A.current.getModifiedEditor();g.getOption(y.current.editor.EditorOption.readOnly)?g.setValue(r):r!==g.getValue()&&(g.executeEdits("",[{range:g.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),g.pushUndoStop())},[r],M),k(function(){A.current.getModel().original.setValue(t)},[t],M),k(function(){var g=A.current.getModel(),O=g.original,Z=g.modified;y.current.editor.setModelLanguage(O,a||n),y.current.editor.setModelLanguage(Z,i||n)},[n,a,i],M),k(function(){y.current.editor.setTheme(P)},[P],M),k(function(){A.current.updateOptions(R)},[R],M);var le=Object(c.useCallback)(function(){f.current(y.current);var g=y.current.editor.createModel(t,a||n,u&&y.current.Uri.parse(u)),O=y.current.editor.createModel(r,i||n,m&&y.current.Uri.parse(m));A.current.setModel({original:g,modified:O})},[n,r,i,t,a,u,m]),ye=Object(c.useCallback)(function(){A.current=y.current.editor.createDiffEditor(Oe.current,Object(re.a)({automaticLayout:!0},R)),le(),y.current.editor.setTheme(P),He(!0)},[R,P,le]);Object(c.useEffect)(function(){M&&j.current(A.current,y.current)},[M]),Object(c.useEffect)(function(){!Ee&&!M&&ye()},[Ee,M,ye]);function Be(){var g=A.current.getModel();if(!h){var O;(O=g.original)===null||O===void 0||O.dispose()}if(!B){var Z;(Z=g.modified)===null||Z===void 0||Z.dispose()}A.current.dispose()}return C.a.createElement(Ye,{width:Le,height:Re,isEditorReady:M,loading:ne,_ref:Oe,className:xe,wrapperClassName:Ue})}Se.propTypes={original:o.a.string,modified:o.a.string,language:o.a.string,originalLanguage:o.a.string,modifiedLanguage:o.a.string,originalModelPath:o.a.string,modifiedModelPath:o.a.string,keepCurrentOriginalModel:o.a.bool,keepCurrentModifiedModel:o.a.bool,theme:o.a.string,loading:o.a.oneOfType([o.a.element,o.a.string]),options:o.a.object,width:o.a.oneOfType([o.a.number,o.a.string]),height:o.a.oneOfType([o.a.number,o.a.string]),className:o.a.string,wrapperClassName:o.a.string,beforeMount:o.a.func,onMount:o.a.func},Se.defaultProps={theme:"light",loading:"Loading...",options:{},keepCurrentOriginalModel:!1,keepCurrentModifiedModel:!1,width:"100%",height:"100%",beforeMount:de,onMount:de};var xt=Se,Ut=Object(c.memo)(xt),Yt=Ut;function It(){var e=Object(c.useState)(ue.__getMonacoInstance()),t=Object(v.a)(e,2),r=t[0],n=t[1];return Ae(function(){var a;return r||(a=ue.init(),a.then(function(i){n(i)})),function(){var i;return(i=a)===null||i===void 0?void 0:i.cancel()}}),r}var Qt=It;function kt(e){var t=Object(c.useRef)();return Object(c.useEffect)(function(){t.current=e},[e]),t.current}var Wt=kt,Ht=he.create({backup:null}),$e=Object(v.a)(Ht,2),et=$e[0],Vt=$e[1],be=new Map;function Ne(e){var t=e.defaultValue,r=e.defaultLanguage,n=e.defaultPath,a=e.value,i=e.language,u=e.path,m=e.theme,h=e.line,B=e.loading,P=e.options,ne=e.overrideServices,R=e.saveViewState,Re=e.keepCurrentModel,Le=e.width,xe=e.height,Ue=e.className,Ie=e.wrapperClassName,ke=e.beforeMount,We=e.onMount,oe=e.onChange,M=e.onValidate,He=Object(c.useState)(!1),_e=Object(v.a)(He,2),b=_e[0],Ee=_e[1],Ve=Object(c.useState)(!0),A=Object(v.a)(Ve,2),y=A[0],Oe=A[1],j=Object(c.useRef)(null),f=Object(c.useRef)(null),le=Object(c.useRef)(null),ye=Object(c.useRef)(We),Be=Object(c.useRef)(ke),g=Object(c.useRef)(null),O=Object(c.useRef)(a),Z=Wt(u);Ae(function(){var _=ue.init();return _.then(function(E){return(j.current=E)&&Oe(!1)}).catch(function(E){return(E==null?void 0:E.type)!=="cancelation"&&console.error("Monaco initialization: error:",E)}),function(){return f.current?Gt():_.cancel()}}),k(function(){var _=Qe(j.current,t||a,r||i,u);_!==f.current.getModel()&&(R&&be.set(Z,f.current.saveViewState()),f.current.setModel(_),R&&f.current.restoreViewState(be.get(u)))},[u],b),k(function(){f.current.updateOptions(P)},[P],b),k(function(){f.current.getOption(j.current.editor.EditorOption.readOnly)?f.current.setValue(a):a!==f.current.getValue()&&(f.current.executeEdits("",[{range:f.current.getModel().getFullModelRange(),text:a,forceMoveMarkers:!0}]),f.current.pushUndoStop())},[a],b),k(function(){j.current.editor.setModelLanguage(f.current.getModel(),i)},[i],b),k(function(){Lt(h)||f.current.revealLine(h)},[h],b),k(function(){j.current.editor.setTheme(m)},[m],b);var tt=Object(c.useCallback)(function(){Be.current(j.current);var _=u||n,E=Qe(j.current,a||t,r||i,_);f.current=j.current.editor.create(le.current,Object(re.a)({model:E,automaticLayout:!0},P),ne),R&&f.current.restoreViewState(be.get(_)),j.current.editor.setTheme(m),et().backup||Vt({backup:j.current.editor.setModelMarkers}),Ee(!0)},[t,r,n,a,i,u,P,ne,R,m]);Object(c.useEffect)(function(){b&&ye.current(f.current,j.current)},[b]),Object(c.useEffect)(function(){!y&&!b&&tt()},[y,b,tt]),O.current=a,Object(c.useEffect)(function(){if(b&&oe){var _,E;(_=g.current)===null||_===void 0||_.dispose(),g.current=(E=f.current)===null||E===void 0?void 0:E.onDidChangeModelContent(function(Me){var ae=f.current.getValue();O.current!==ae&&oe(ae,Me)})}},[b,oe]),Object(c.useEffect)(function(){b&&(j.current.editor.setModelMarkers=function(_,E,Me){var ae;(ae=et().backup)===null||ae===void 0||ae.call(j.current.editor,_,E,Me),M==null||M(Me)})},[b,M]);function Gt(){var _;if((_=g.current)===null||_===void 0||_.dispose(),Re)R&&be.set(u,f.current.saveViewState());else{var E;(E=f.current.getModel())===null||E===void 0||E.dispose()}f.current.dispose()}return C.a.createElement(Ye,{width:Le,height:xe,isEditorReady:b,loading:B,_ref:le,className:Ue,wrapperClassName:Ie})}Ne.propTypes={defaultValue:o.a.string,defaultPath:o.a.string,defaultLanguage:o.a.string,value:o.a.string,language:o.a.string,path:o.a.string,theme:o.a.string,line:o.a.number,loading:o.a.oneOfType([o.a.element,o.a.string]),options:o.a.object,overrideServices:o.a.object,saveViewState:o.a.bool,keepCurrentModel:o.a.bool,width:o.a.oneOfType([o.a.number,o.a.string]),height:o.a.oneOfType([o.a.number,o.a.string]),className:o.a.string,wrapperClassName:o.a.string,beforeMount:o.a.func,onMount:o.a.func,onChange:o.a.func,onValidate:o.a.func},Ne.defaultProps={theme:"light",loading:"Loading...",options:{},overrideServices:{},saveViewState:!0,keepCurrentModel:!1,width:"100%",height:"100%",beforeMount:de,onMount:de,onValidate:de};var Bt=Ne,zt=Object(c.memo)(Bt),Kt=zt,Ft=d("9kvl"),Jt=d("Dqnf"),Xt=d("dhSg");ue.config({"vs/nls":{availableLanguages:{"*":"zh-cn"}}});var qt=function(t){var r=t.index,n=t.loading,a=t.dispatch,i=Object(c.useState)("// type your cod222e..."),u=Object(v.a)(i,2),m=u[0],h=u[1],B={selectOnLineNumbers:!0},P=function(){},ne=function(){};return Object(c.useEffect)(function(){setTimeout(function(){Xt.a.publish("create-socket",1)},500)},[]),C.a.createElement("div",null,C.a.createElement(Jt.a,{sshConfigData:{host:"106.75.231.63",port:"2021",ws_url:"wss://pre-webssh.educoder.net/ws",username:"root",password:"123123",game_id:4799882,webssh_url:"http://172.16.94.254:8890/bridge",secret:"Dron_123123",width:1004,height:603,rows:33,columns:104},sid:1}),C.a.createElement(Kt,{width:800,height:400,language:"javascript",theme:"hc-black",value:m,options:B,onChange:P,editorDidMount:ne}))},Zt=q.default=Object(Ft.a)(function(e){var t=e.index,r=e.loading;return{index:t,loading:r.models.index}})(qt)},"72Hr":function(X,q,d){"use strict";var v=d("qesp");function c(){}function C(){}C.resetWarningCache=c,X.exports=function(){function l(je,ie,Ce,fe,pe,W){if(W===v)return;var $=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw $.name="Invariant Violation",$}l.isRequired=l;function w(){return l}var z={array:l,bool:l,func:l,number:l,object:l,string:l,symbol:l,any:l,arrayOf:w,element:l,elementType:l,instanceOf:w,node:l,objectOf:w,oneOf:w,oneOfType:w,shape:w,exact:w,checkPropTypes:C,resetWarningCache:c};return z.PropTypes=z,z}},Dqnf:function(X,q,d){"use strict";var v=d("k1fw"),c=d("tJVT"),C=d("rAM+"),l=d("q1tI"),w=d.n(l),z=d("J66h"),je=d.n(z),ie=d("/POA"),Ce=d.n(ie),fe=d("q7KB"),pe=d.n(fe),W=d("dhSg"),$=d("bdgK");function me(D,T,H){var L=H._core._renderService.dimensions.actualCellWidth||9.5,x=H._core._renderService.dimensions.actualCellHeight||18,p=Math.floor(T/x),S=Math.floor(D/L);return[S,p]}function ge(D,T){var H=new $.default(function(L){var x=Object(C.a)(L),p;try{for(x.s();!(p=x.n()).done;){var S=p.value;if(S.target.offsetHeight>0||S.target.offsetWidth>0){var U=me(S.target.offsetWidth,S.target.offsetHeight,D),G=Object(c.a)(U,2),Y=G[0],N=G[1];console.log("cols, rows",Y,N),D.resize(Y,N),W.a.publish("ssh-xterm-resize",{columns:Y,rows:N,width:S.target.offsetWidth,height:S.target.offsetHeight})}}}catch(s){x.e(s)}finally{x.f()}});return H.observe(T),H}var Te=3e4;q.a=function(D){var T=D.sshConfigData,H=D.sid,L=Object(l.useState)(null),x=Object(c.a)(L,2),p=x[0],S=x[1],U=T.ws_url,G=T.password,Y=T.port,N=Object(l.useRef)(),s=Object(l.useRef)(),K=Object(l.useRef)(!1);return Object(l.useEffect)(function(){if(N.current&&U){var V=new ie.Terminal({fontSize:16,rendererType:"dom"});V.open(N.current),V.onData(function(ce){s.current&&(s.current.readyState===1&&(s.current.send(JSON.stringify({tp:"client",data:ce})),W.a.publish("on-operating-ssh")))}),V.write("Connecting..."),S(V);var ee=ge(V,N.current);return function(){V.dispose(),ee.unobserve(N.current)}}},[U,N.current]),Object(l.useEffect)(function(){if(p&&U){var V=function(){var F=new WebSocket(U);s.current=F,F.onopen=function(){var I=p.element.parentElement;if(I){var Q=I.offsetWidth,te=I.offsetHeight;console.log("init",{tp:"init",data:Object(v.a)(Object(v.a)({},T),{},{secret:G,width:Q,height:te,rows:p.rows,columns:p.cols})}),F.send(JSON.stringify({tp:"init",data:Object(v.a)(Object(v.a)({},T),{},{secret:G,width:Q,height:te,rows:p.rows,columns:p.cols})}))}p.focus()},F.onerror=function(I){console.log("------in socket error----",I,F,U)},F.onmessage=function(I){K.current||(p.write("\r"),setTimeout(function(){},1e3)),K.current=!0,console.log("event:",I);var Q=z.Base64.decode(I.data.toString()),te=p._core._renderService.dimensions.actualCellWidth||9.5;console.log("data:",Q,te,p),p.write(Q)},F.onclose=function(I){ee&&clearInterval(ee),p.write(`\r
|
|
connection closed`)}},ee=setInterval(function(){s.current&&s.current.send(JSON.stringify({tp:"h"}))},Te),ce=W.a.subscribe("create-socket",function(J){H===J&&(s.current&&s.current.readyState===1?p.focus():V(),p.focus())}),we=W.a.subscribe("close-socket",function(J){H===J&&(s.current&&(s.current.close(),K.current=!1,p.clear()),s.current=null)}),De=W.a.subscribe("ssh-xterm-resize",function(J){s.current&&s.current.readyState===1&&s.current.send(JSON.stringify({tp:"resize",data:Object(v.a)({},J)}))}),he=W.a.subscribe("ssh-add-connect-time",function(){s.current&&s.current.readyState===1&&s.current.send(JSON.stringify({tp:"overtime"}))});return function(){we(),ce(),De(),he(),s.current&&(s.current.close(),K.current=!1)}}},[p,U,Y]),w.a.createElement("div",{ref:N,className:"xterm-panel"},U?null:w.a.createElement("p",{style:{color:"#fff"}},"\u6B63\u5728\u8FDE\u63A5\u547D\u4EE4\u884C\u670D\u52A1..."))}},"EH+i":function(X,q,d){if(!1)var v,c;else X.exports=d("72Hr")()},qesp:function(X,q,d){"use strict";var v="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";X.exports=v}}]);
|