diff --git a/Blink/TermView.m b/Blink/TermView.m index e061d0ef1..76edaa457 100644 --- a/Blink/TermView.m +++ b/Blink/TermView.m @@ -221,35 +221,6 @@ - (void)addBrowserWebView:(NSURL *)url agent: (NSString *)agent injectUIO: (BOOL _browserView.UIDelegate = self; _browserView.navigationDelegate = self; - if (injectUIO) { - - _browserView.scrollView.delaysContentTouches = NO; - _browserView.scrollView.canCancelContentTouches = NO; - [_browserView.scrollView setScrollEnabled:NO]; - [_browserView.scrollView.panGestureRecognizer setEnabled:NO]; - // _gestureInteraction = [[WKWebViewGesturesInteraction alloc] initWithJsScrollerPath:@"t.scrollPort_.scroller_"]; - // [_webView addInteraction:_gestureInteraction]; - - UIPanGestureRecognizer *rec = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(_pan:)]; - rec.maximumNumberOfTouches = 1; - rec.cancelsTouchesInView = YES; - rec.allowedScrollTypesMask = UIScrollTypeMaskAll; - rec.allowedTouchTypes = @[@(UITouchTypeIndirectPointer)]; - rec.delegate = self; - - - UITapGestureRecognizer *rec2 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_pan2:)]; - // rec2.maximumNumberOfTouches = 1; - rec2.cancelsTouchesInView = YES; - // rec.allowedScrollTypesMask = UIScrollTypeMaskAll; - rec2.allowedTouchTypes = @[@(UITouchTypeIndirectPointer)]; - rec2.delegate = self; - - [_browserView addGestureRecognizer:rec]; - [_browserView addGestureRecognizer:rec2]; - - } - [self addSubview:_browserView]; [_browserView setOpaque:NO]; _browserView.backgroundColor = [UIColor clearColor]; diff --git a/Resources/blink-uio.min.js b/Resources/blink-uio.min.js index a018e6184..5f5f5b5ee 100644 --- a/Resources/blink-uio.min.js +++ b/Resources/blink-uio.min.js @@ -1 +1 @@ -function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _objectSpread(target){for(var i=1;iString.fromCharCode(a.charCodeAt(0)-64),_unknownKeyDef={keyCode:0,keyCap:"[Unidentified]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS};class KeyMap{getKeyDef(a1){var b=this._defs[a1];return b||(console.warn(`No definition for (keyCode ${a1})`),b=_unknownKeyDef,this.addKeyDef(a1,b)),b}addKeyDef(c1,d1){if(c1 in this._defs&&console.warn("Dup keyCode: ",c1),this._defs[c1]=d1,/^\[\w+\]$/.test(d1.keyCap)){let e=d1.keyCap.replace(/\W/g,"");this._reverseDefs[e]=d1}else{var f=d1.keyCap[0];this._reverseDefs[f]=d1,/0-9/.test(f)?this._reverseDefs["Digit"+f]=d1:/[a-z]/.test(f)&&(this._reverseDefs["Key"+f.toUpperCase()]=d1)}}reset(){this._defs={};const g=(a,b,c)=>"function"==typeof a?a.call(this,b,c):a,h=(a,b)=>(c,d)=>g(c.shift||c.ctrl||c.alt||c.meta?b:a,c,d),i=(a,b)=>(c,d)=>{let e=c.shift?b:a;return c.shift=!1,g(e,c,d)},j=(a,b)=>(c,d)=>g(c.alt?a:b,c,d),k=(a,b)=>(c,d)=>g(c.shift||c.ctrl||c.alt||c.meta?a:b,c,d),l=a=>(b,c)=>g(this._keyboard.hasSelection?this._onSel:a,b,c),m=a=>this.addKeyDef(a.keyCode,a);m(_unknownKeyDef),m({keyCode:27,code:"Escape",keyCap:"[Escape]",normal:l("\x1b"),ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:112,code:"F1",keyCap:"[F1]",normal:h("\x1bOP","\x1b[P"),ctrl:DEFAULT,alt:"\x1b[23~",meta:DEFAULT}),m({keyCode:113,code:"F2",keyCap:"[F2]",normal:h("\x1bOQ","\x1b[Q"),ctrl:DEFAULT,alt:"\x1b[24~",meta:DEFAULT}),m({keyCode:114,code:"F3",keyCap:"[F3]",normal:h("\x1bOR","\x1b[R"),ctrl:DEFAULT,alt:"\x1b[25~",meta:DEFAULT}),m({keyCode:115,code:"F4",keyCap:"[F4]",normal:h("\x1bOS","\x1b[S"),ctrl:DEFAULT,alt:"\x1b[26~",meta:DEFAULT}),m({keyCode:116,code:"F5",keyCap:"[F5]",normal:"\x1b[15~",ctrl:DEFAULT,alt:"\x1b[28~",meta:DEFAULT}),m({keyCode:117,code:"F6",keyCap:"[F6]",normal:"\x1b[17~",ctrl:DEFAULT,alt:"\x1b[29~",meta:DEFAULT}),m({keyCode:118,code:"F7",keyCap:"[F7]",normal:"\x1b[18~",ctrl:DEFAULT,alt:"\x1b[31~",meta:DEFAULT}),m({keyCode:119,code:"F8",keyCap:"[F8]",normal:"\x1b[19~",ctrl:DEFAULT,alt:"\x1b[32~",meta:DEFAULT}),m({keyCode:120,code:"F9",keyCap:"[F9]",normal:"\x1b[20~",ctrl:DEFAULT,alt:"\x1b[33~",meta:DEFAULT}),m({keyCode:121,code:"F10",keyCap:"[F10]",normal:"\x1b[21~",ctrl:DEFAULT,alt:"\x1b[34~",meta:DEFAULT}),m({keyCode:122,code:"F11",keyCap:"[F11]",normal:"\x1b[23~",ctrl:DEFAULT,alt:"\x1b[42~",meta:DEFAULT}),m({keyCode:123,code:"F12",keyCap:"[F12]",normal:"\x1b[24~",ctrl:DEFAULT,alt:"\x1b[43~",meta:DEFAULT});const n=this._onCtrlNum,o=this._onAltNum;m({keyCode:192,code:"Backquote",keyCap:"`~",normal:DEFAULT,ctrl:i(ctl("@"),ctl("^")),alt:DEFAULT,meta:DEFAULT}),m({keyCode:49,code:"Digit1",keyCap:"1!",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:50,code:"Digit2",keyCap:"2@",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:51,code:"Digit3",keyCap:"3#",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:52,code:"Digit4",keyCap:"4$",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:53,code:"Digit5",keyCap:"5%",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:54,code:"Digit6",keyCap:"6^",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:55,code:"Digit7",keyCap:"7&",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:56,code:"Digit8",keyCap:"8*",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:57,code:"Digit9",keyCap:"9(",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:48,code:"Digit0",keyCap:"0)",normal:DEFAULT,ctrl:DEFAULT,alt:o,meta:DEFAULT}),m({keyCode:189,code:"Minus",keyCap:"-_",normal:DEFAULT,ctrl:ctl("_"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:187,code:"Equal",keyCap:"=+",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:8,code:"Backspace",keyCap:"[Backspace]",normal:"\x7f",ctrl:"\b",alt:DEFAULT,meta:DEFAULT}),m({keyCode:9,code:"Tab",keyCap:"[Tab]",normal:i("\t","\x1b[Z"),ctrl:STRIP,alt:STRIP,meta:DEFAULT}),m({keyCode:81,code:"KeyQ",keyCap:"qQ",normal:DEFAULT,ctrl:ctl("Q"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:87,code:"KeyW",keyCap:"wW",normal:l(DEFAULT),ctrl:ctl("W"),alt:l(DEFAULT),meta:DEFAULT}),m({keyCode:69,code:"KeyE",keyCap:"eE",normal:DEFAULT,ctrl:ctl("E"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:82,code:"KeyR",keyCap:"rR",normal:DEFAULT,ctrl:ctl("R"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:84,code:"KeyT",keyCap:"tT",normal:DEFAULT,ctrl:ctl("T"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:89,code:"KeyY",keyCap:"yY",normal:l(DEFAULT),ctrl:ctl("Y"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:85,code:"KeyU",keyCap:"uU",normal:DEFAULT,ctrl:ctl("U"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:73,code:"KeyI",keyCap:"iI",normal:DEFAULT,ctrl:ctl("I"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:79,code:"KeyO",keyCap:"oO",normal:l(DEFAULT),ctrl:ctl("O"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:80,code:"KeyP",keyCap:"pP",normal:l(DEFAULT),ctrl:l(ctl("P")),alt:DEFAULT,meta:DEFAULT}),m({keyCode:219,code:"BracketLeft",keyCap:"[{",normal:DEFAULT,ctrl:ctl("["),alt:DEFAULT,meta:DEFAULT}),m({keyCode:221,code:"BracketRight",keyCap:"]}",normal:DEFAULT,ctrl:ctl("]"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:220,code:"Backslash",keyCap:"\\|",normal:DEFAULT,ctrl:ctl("\\"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:20,code:"CapsLock",keyCap:"[CapsLock]",normal:PASS,ctrl:PASS,alt:PASS,meta:DEFAULT}),m({keyCode:65,code:"KeyA",keyCap:"aA",normal:DEFAULT,ctrl:ctl("A"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:83,code:"KeyS",keyCap:"sS",normal:DEFAULT,ctrl:ctl("S"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:68,code:"KeyD",keyCap:"dD",normal:DEFAULT,ctrl:ctl("D"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:70,code:"KeyF",keyCap:"fF",normal:DEFAULT,ctrl:l(ctl("F")),alt:l(DEFAULT),meta:DEFAULT}),m({keyCode:71,code:"KeyG",keyCap:"gG",normal:DEFAULT,ctrl:ctl("G"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:72,code:"KeyH",keyCap:"hH",normal:l(DEFAULT),ctrl:ctl("H"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:74,code:"KeyJ",keyCap:"jJ",normal:l(DEFAULT),ctrl:ctl("J"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:75,code:"KeyK",keyCap:"kK",normal:l(DEFAULT),ctrl:ctl("K"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:76,code:"KeyL",keyCap:"lL",normal:l(DEFAULT),ctrl:ctl("L"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:186,code:"Semicolon",keyCap:";:",normal:DEFAULT,ctrl:STRIP,alt:DEFAULT,meta:DEFAULT}),m({keyCode:222,code:"Quote",keyCap:"'\"",normal:DEFAULT,ctrl:STRIP,alt:DEFAULT,meta:DEFAULT}),m({keyCode:13,code:"Enter",keyCap:"[Enter]",normal:"\r",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:16,code:"ShiftLeft",keyCap:"[Shift]",normal:PASS,ctrl:PASS,alt:PASS,meta:DEFAULT}),m({keyCode:90,code:"KeyZ",keyCap:"zZ",normal:DEFAULT,ctrl:ctl("Z"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:88,code:"KeyX",keyCap:"xX",normal:l(DEFAULT),ctrl:l(ctl("X")),alt:DEFAULT,meta:DEFAULT}),m({keyCode:67,code:"KeyC",keyCap:"cC",normal:DEFAULT,ctrl:ctl("C"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:86,code:"KeyV",keyCap:"vV",normal:DEFAULT,ctrl:ctl("V"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:66,code:"KeyB",keyCap:"bB",normal:l(DEFAULT),ctrl:l(ctl("B")),alt:l(DEFAULT),meta:DEFAULT}),m({keyCode:78,code:"KeyN",keyCap:"nN",normal:DEFAULT,ctrl:l(ctl("N")),alt:DEFAULT,meta:DEFAULT}),m({keyCode:77,code:"KeyM",keyCap:"mM",normal:DEFAULT,ctrl:ctl("M"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:188,code:"Comma",keyCap:",<",normal:DEFAULT,ctrl:j(STRIP,PASS),alt:DEFAULT,meta:DEFAULT}),m({keyCode:190,code:"Period",keyCap:".>",normal:DEFAULT,ctrl:j(STRIP,PASS),alt:DEFAULT,meta:DEFAULT}),m({keyCode:191,code:"Slash",keyCap:"/?",normal:DEFAULT,ctrl:i(ctl("_"),ctl("?")),alt:DEFAULT,meta:DEFAULT}),m({keyCode:17,code:"ControlLeft",keyCap:"[Control]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:18,code:"AltLeft",keyCap:"[Alt]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:91,code:"MetaLeft",keyCap:"[Meta]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:32,code:"Space",keyCap:" ",normal:DEFAULT,ctrl:ctl("@"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:93,code:"MetaRight",keyCap:"[Meta]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:42,code:"F13",keyCap:"[PRTSCR]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:145,code:"F14",keyCap:"[SCRLK]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:19,code:"F15",keyCap:"[BREAK]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:45,code:"Help",keyCap:"[Insert]",normal:"\x1b[2~",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:36,code:"Home",keyCap:"[Home]",normal:"\x1bOH",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:33,code:"PageUp",keyCap:"[PageUp]",normal:"\x1b[5~",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:46,code:"Delete",keyCap:"[DEL]",normal:"\x1b[3~",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:35,code:"End",keyCap:"[End]",normal:"\x1bOF",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:34,code:"PageDown",keyCap:"[PageDown]",normal:"\x1b[6~",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:38,code:"ArrowUp",keyCap:"[ArrowUp]",normal:l(k("\x1b[A","\x1bOA")),ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:40,code:"ArrowDown",keyCap:"[ArrowDown]",normal:l(k("\x1b[B","\x1bOB")),ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:39,code:"ArrowRight",keyCap:"[ArrowRight]",normal:l(k("\x1b[C","\x1bOC")),ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:37,code:"ArrowLeft",keyCap:"[ArrowLeft]",normal:l(k("\x1b[D","\x1bOD")),ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:144,code:"NumLock",keyCap:"[NumLock]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:12,code:"",keyCap:"[Clear]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:96,code:"Numpad0",keyCap:"[Numpad0]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:97,code:"Numpad1",keyCap:"[Numpad1]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:98,code:"Numpad2",keyCap:"[Numpad2]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:99,code:"Numpad3",keyCap:"[Numpad3]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:100,code:"Numpad4",keyCap:"[Numpad4]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:101,code:"Numpad5",keyCap:"[Numpad5]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:102,code:"Numpad6",keyCap:"[Numpad6]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:103,code:"Numpad7",keyCap:"[Numpad7]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:104,code:"Numpad8",keyCap:"[Numpad8]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:105,code:"Numpad9",keyCap:"[Numpad9]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:107,code:"NumpadAdd",keyCap:"[NumpadAdd]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:109,code:"NumpadSubtract",keyCap:"[NumpadSubtract]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:106,code:"NumpadMultiply",keyCap:"[NumpadMultiply]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:111,code:"NumpadDivide",keyCap:"[NumpadDivide]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:110,code:"NumpadDecimal",keyCap:"[NumpadDecimal]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),this._reverseDefs.Backqoute=this._defs[192],this._reverseDefs.BracketLeft=this._defs[229],this._reverseDefs.BracketRight=this._defs[221],this._reverseDefs.Slash=this._defs[191],this._reverseDefs.Space=this._defs[32]}keyCode(p1){let q=this._reverseDefs[p1];return q?q.keyCode:0}key(r1){let s=this._defs[r1];if(!s)return"";let t=s.keyCap;return/^\[\w+\]$/.test(t)?t.substr(1,t.length-2):t.substr(0,1)}code(u1){let v=this._defs[u1];return v?v.code:""}constructor(w1){this._defs={},this._reverseDefs={},this._onCtrlNum=(a,b)=>{switch(b.keyCap.substr(0,1)){case"1":return"1";case"2":return ctl("@");case"3":return ctl("[");case"4":return ctl("\\");case"5":return ctl("]");case"6":return ctl("^");case"7":return ctl("_");case"8":return"\x7f";case"9":return"9";default:return PASS}},this._onAltNum=(a,b)=>DEFAULT,this._onSel=(a2,b)=>{let{ArrowDown:c,ArrowLeft:d,ArrowRight:e,ArrowUp:f,Escape:g,h:h,j:i,k:j,l:k,o:l,b:m,f:n,n:o,p:p,w:q,x:r,y:s}=this._reverseDefs;const t=a=>op("selection",a),u={command:"copy"};if(b===d||b===h){let v=a2.shift?"word":"character";t({dir:"left",gran:v})}else if(b===e||b===k){let w=a2.shift?"word":"character";t({dir:"right",gran:w})}else b===f||b===j?t({dir:"left",gran:"line"}):b===c||b===i?t({dir:"right",gran:"line"}):b===l||b===r?t({command:"change"}):b===o&&a2.ctrl?t({dir:"right",gran:"line"}):b===p?a2.ctrl?t({dir:"left",gran:"line"}):a2.shift||a2.alt||a2.meta||t({command:"paste"}):b===m?a2.ctrl?t({dir:"left",gran:"character"}):(a2.alt,t({dir:"left",gran:"word"})):b===q?t(a2.alt?u:{dir:"right",gran:"word"}):b===n?a2.ctrl?t({dir:"right",gran:"character"}):a2.alt&&t({dir:"right",gran:"word"}):b===s?t(u):b===g&&t({command:"cancel"});return CANCEL},this._keyboard=w1,this.reset()}}function blink_uio_activate(){var b1=0,c2=!1,d2=!1;let e1=/^[a-z0-9\[\]\{\}~`\#\$-_=\+\|"|'\?]$/i;var f1=0;let g1=new KeyMap(null),h1=null,i1=0,j1=0,k1=0;function l1(a,b=document.activeElement){if(b){const[c,d]=[b.selectionStart,b.selectionEnd];b.setRangeText(a,c,d,"end"),b.dispatchEvent(new InputEvent("input"))}}function m1(a,b){var c;let d=_objectSpread({},b,{op:a});null===(c=window.webkit.messageHandlers._kb)|| void 0===c||c.postMessage(d)}function n1(a,b){var c;null===(c=window.webkit.messageHandlers.interOp)|| void 0===c||c.postMessage({op:a,data:b})}function o1(a){var b;if(0===a.indexOf("0:0:0:")){l1(a.replace("0:0:0:",""));return}var h=a.split(/:/g);let i=parseInt(h[0],10),j=parseInt(h[1],10),k=""==h[3]?":":h[3]||g1.key(j)||"",n=g1.code(j);if(4==h.length&&!i&&e1.test(k)){l1(k);return}let o=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,composed:!1,isComposing:!1,keyCode:j,key:k,code:n,metaKey:(1048576&i)==1048576,ctrlKey:(262144&i)==262144,altKey:(524288&i)==524288,shiftKey:c2||d2});f1=0,null===(b=document.activeElement)|| void 0===b||b.dispatchEvent(o),m1("out",{data:""})}function p(a){if(a.target===document.activeElement){var g,h=!1;if("ShiftLeft"===a.code?(c2=!0,h=!0):"ShiftRight"===a.code&&(d2=!0,h=!0),!a.__blink){let i=a.altKey||a.ctrlKey||a.shiftKey||a.metaKey;if(a.__noskip||i);else if(0===b1){a.repeat&&e1.test(a.key)?1==(f1+=1)?l1(a.key,document.activeElement):f1%=2:f1=0;return}if(0!==b1){let j=new KeyboardEvent("keydown",{bubbles:a.bubbles,cancelable:a.cancelable,composed:a.composed,key:a.key,code:a.code,location:a.location,repeat:a.repeat,ctrlKey:(262144&b1)==262144,shiftKey:a.shiftKey,altKey:(524288&b1)==524288,metaKey:(1048576&b1)==1048576,isComposing:a.isComposing,charCode:a.charCode,keyCode:a.keyCode,which:a.which});j.__blink=!0,a.preventDefault(),a.stopPropagation(),null===(g=document.activeElement)|| void 0===g||g.dispatchEvent(j)}h||m1("out",{data:""})}}}function q(a){a.target===document.activeElement&&("ShiftLeft"===a.code?c2=!1:"ShiftRight"===a.code&&(d2=!1))}function r(a){!!a&&(a.__blink||(a.tabIndex=-1,a.__blink=!0,a.autocapitalize="none",a.autocorrect=!1,a!==document.body&&(a.addEventListener("keydown",p,!0),a.addEventListener("keyup",q,!0))))}window.term_paste=function(a){l1(a)},window.term_getCurrentSelection=function(){const a=document.getSelection();if(!a||0===a.rangeCount||"Caret"===a.type)return{base:"",offset:0,text:""};const b=a.getRangeAt(0).getBoundingClientRect(),c=`{{${b.x}, ${b.y}},{${b.width},${b.height}}}`;return{base:a.baseNode.textContent,offset:a.baseOffset,text:a.toString()||"",rect:c}},document.addEventListener("selectionchange",function(){n1("selectionchange",term_getCurrentSelection())}),window._onKB=function(a,e){switch(a){case"state-reset":b1=0,c2=!1,d2=!1,f1=0;break;case"toolbar-mods":var g,h;b1=g=e,(h=document.activeElement)&&(0==g?h.readOnly=h.__readOnly:h.__readOnly=h.readOnly);break;case"toolbar-press":o1(e);break;case"press":o1(e);break}},document.ontouchstart=function(a){n1("browser-ready")},window.addEventListener("focusout",function(a){r(a.relatedTarget)},!0),window.addEventListener("focusin",function(a){if(r(a.target),a.target){let b=a.target.nodeName;if("TEXTAREA"===b){var c;let d=null===(c=a.target.parentElement)|| void 0===c?void 0:c.parentElement;d&&"code"==d.role?m1("hide-caret"):m1("show-caret");return}if("INPUT"===b){let e=a.target.type;if("text"===e||"url"===e||"search"==e||"password"==e||"email"==e||"tel"==e){m1("show-caret");return}}m1("hide-caret")}},!0),window.term_touch=function(a,b,c,d,e,f,g){var h=document.elementFromPoint(c,d)||document.body;let i=c+e,j=d+f;if("touchstart"===a){let k=new PointerEvent("pointerdown",{target:h,bubbles:!0,cancelable:!0,pointerType:"touch",pointerId:b,clientX:i,clientY:j,pageX:i,pageY:j,screenX:i,screenY:j,ctrlKey:262144&g,altKey:524288&g,shiftKey:131072&g,metaKey:1048576&g});h.dispatchEvent(k)}let l=new Touch({target:h,identifier:b,clientX:i,clientY:j,pageX:i,pageY:j,screenX:i,screenY:j}),m=new TouchEvent(a,{bubbles:!0,cancelable:!0,touches:[l],targetTouches:[l],changedTouches:[l],ctrlKey:262144&g,altKey:524288&g,shiftKey:131072&g,metaKey:1048576&g});document.dispatchEvent(m)},document.ontouchstart=function(a){if(!a){h1=null;return}if(!a.isTrusted){h1=null;return}if(!a.target){h1=null;return}if(a.target.classList.contains("action-label")){h1=null;return}if(!a.changedTouches&&!a.changedTouches.length){h1=null;return}if("direct"!==(h1=a.changedTouches[0]).touchType){h1=null;return}i1=a.timeStamp,j1=a.pageX,k1=a.pageY;let b=a.srcElement;if(b&&"A"==b.tagName&&b.dataset&&0==(b.dataset.href||"").indexOf("command:")){h1=null,a.preventDefault(),a.stopPropagation();var c=document.createEvent("MouseEvents");c.initEvent("click",!0,!0),a.srcElement.dispatchEvent(c);return}},document.ontouchend=function(a){let c=h1;if(h1=null,c&& !(Math.abs(a.pageX-j1)>20)&& !(Math.abs(a.pageY-k1)>20)&&c.identifier==a.changedTouches[0].identifier){let d=Math.abs(a.timeStamp-i1);if(!(d>900)){let e=a.srcElement;if(d<250&&e&&"A"==e.tagName&&(e.dataset&&0==(e.dataset.href||"").indexOf("command:")||e.parentElement&&e.parentElement.className&&0==e.parentElement.className.indexOf("codelens-decoration"))){a.preventDefault(),a.stopPropagation();var f=document.createEvent("MouseEvents");f.initEvent("mousedown",!0,!0),a.srcElement.dispatchEvent(f);return}if(!(d<250)||0!=b1||a.altKey||a.ctrlKey||a.metaKey||a.shiftKey){a.preventDefault(),a.stopPropagation();let g=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window,altKey:a.altKey||(524288&b1)==524288,ctrlKey:a.ctrlKey||(262144&b1)==262144,metaKey:a.metaKey||(1048576&b1)==1048576,shiftKey:a.shiftKey,pageX:j1,pageY:k1,screenX:j1,screenY:k1,clientX:j1,clientY:k1});a.srcElement.dispatchEvent(g)}}}},document.ontouchcancel=function(a){h1=null},document.onclick=function(a){h1=null},r(document.activeElement)}function __install_uio(){if(!window._onKB){blink_uio_activate(),document.body.contentEditable=!0,document.body.style="word-wrap: normal; position: inherit;";var a3=document.createElement("meta");a3.name="viewport",a3.content="viewport-fit=cover, width=device-width, height=device-height, initial-scale=1, user-scalable=no",document.getElementsByTagName("head")[0].appendChild(a3),document.querySelectorAll("[tabIndex]").forEach(function(a){a.tabIndex=-1});let b={op:"browser-ready"};window.webkit.messageHandlers.interOp.postMessage(b)}}window.addEventListener("DOMContentLoaded",a=>{var b=0;const c=setInterval(()=>{b+=1,document.getElementsByClassName("monaco-workbench").length>0&&(__install_uio(),clearInterval(c)),b>22000&&clearInterval(c)},50)}) \ No newline at end of file +function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _objectSpread(target){for(var i=1;iString.fromCharCode(a.charCodeAt(0)-64),_unknownKeyDef={keyCode:0,keyCap:"[Unidentified]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS};class KeyMap{getKeyDef(a1){var b=this._defs[a1];return b||(console.warn(`No definition for (keyCode ${a1})`),b=_unknownKeyDef,this.addKeyDef(a1,b)),b}addKeyDef(c1,d1){if(c1 in this._defs&&console.warn("Dup keyCode: ",c1),this._defs[c1]=d1,/^\[\w+\]$/.test(d1.keyCap)){let e=d1.keyCap.replace(/\W/g,"");this._reverseDefs[e]=d1}else{var f=d1.keyCap[0];this._reverseDefs[f]=d1,/0-9/.test(f)?this._reverseDefs["Digit"+f]=d1:/[a-z]/.test(f)&&(this._reverseDefs["Key"+f.toUpperCase()]=d1)}}reset(){this._defs={};const g=(a,b,c)=>"function"==typeof a?a.call(this,b,c):a,h=(a,b)=>(c,d)=>g(c.shift||c.ctrl||c.alt||c.meta?b:a,c,d),i=(a,b)=>(c,d)=>{let e=c.shift?b:a;return c.shift=!1,g(e,c,d)},j=(a,b)=>(c,d)=>g(c.alt?a:b,c,d),k=(a,b)=>(c,d)=>g(c.shift||c.ctrl||c.alt||c.meta?a:b,c,d),l=a=>(b,c)=>g(this._keyboard.hasSelection?this._onSel:a,b,c),m=a=>this.addKeyDef(a.keyCode,a);m(_unknownKeyDef),m({keyCode:27,code:"Escape",keyCap:"[Escape]",normal:l("\x1b"),ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:112,code:"F1",keyCap:"[F1]",normal:h("\x1bOP","\x1b[P"),ctrl:DEFAULT,alt:"\x1b[23~",meta:DEFAULT}),m({keyCode:113,code:"F2",keyCap:"[F2]",normal:h("\x1bOQ","\x1b[Q"),ctrl:DEFAULT,alt:"\x1b[24~",meta:DEFAULT}),m({keyCode:114,code:"F3",keyCap:"[F3]",normal:h("\x1bOR","\x1b[R"),ctrl:DEFAULT,alt:"\x1b[25~",meta:DEFAULT}),m({keyCode:115,code:"F4",keyCap:"[F4]",normal:h("\x1bOS","\x1b[S"),ctrl:DEFAULT,alt:"\x1b[26~",meta:DEFAULT}),m({keyCode:116,code:"F5",keyCap:"[F5]",normal:"\x1b[15~",ctrl:DEFAULT,alt:"\x1b[28~",meta:DEFAULT}),m({keyCode:117,code:"F6",keyCap:"[F6]",normal:"\x1b[17~",ctrl:DEFAULT,alt:"\x1b[29~",meta:DEFAULT}),m({keyCode:118,code:"F7",keyCap:"[F7]",normal:"\x1b[18~",ctrl:DEFAULT,alt:"\x1b[31~",meta:DEFAULT}),m({keyCode:119,code:"F8",keyCap:"[F8]",normal:"\x1b[19~",ctrl:DEFAULT,alt:"\x1b[32~",meta:DEFAULT}),m({keyCode:120,code:"F9",keyCap:"[F9]",normal:"\x1b[20~",ctrl:DEFAULT,alt:"\x1b[33~",meta:DEFAULT}),m({keyCode:121,code:"F10",keyCap:"[F10]",normal:"\x1b[21~",ctrl:DEFAULT,alt:"\x1b[34~",meta:DEFAULT}),m({keyCode:122,code:"F11",keyCap:"[F11]",normal:"\x1b[23~",ctrl:DEFAULT,alt:"\x1b[42~",meta:DEFAULT}),m({keyCode:123,code:"F12",keyCap:"[F12]",normal:"\x1b[24~",ctrl:DEFAULT,alt:"\x1b[43~",meta:DEFAULT});const n=this._onCtrlNum,o=this._onAltNum;m({keyCode:192,code:"Backquote",keyCap:"`~",normal:DEFAULT,ctrl:i(ctl("@"),ctl("^")),alt:DEFAULT,meta:DEFAULT}),m({keyCode:49,code:"Digit1",keyCap:"1!",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:50,code:"Digit2",keyCap:"2@",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:51,code:"Digit3",keyCap:"3#",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:52,code:"Digit4",keyCap:"4$",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:53,code:"Digit5",keyCap:"5%",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:54,code:"Digit6",keyCap:"6^",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:55,code:"Digit7",keyCap:"7&",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:56,code:"Digit8",keyCap:"8*",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:57,code:"Digit9",keyCap:"9(",normal:DEFAULT,ctrl:n,alt:o,meta:DEFAULT}),m({keyCode:48,code:"Digit0",keyCap:"0)",normal:DEFAULT,ctrl:DEFAULT,alt:o,meta:DEFAULT}),m({keyCode:189,code:"Minus",keyCap:"-_",normal:DEFAULT,ctrl:ctl("_"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:187,code:"Equal",keyCap:"=+",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:8,code:"Backspace",keyCap:"[Backspace]",normal:"\x7f",ctrl:"\b",alt:DEFAULT,meta:DEFAULT}),m({keyCode:9,code:"Tab",keyCap:"[Tab]",normal:i("\t","\x1b[Z"),ctrl:STRIP,alt:STRIP,meta:DEFAULT}),m({keyCode:81,code:"KeyQ",keyCap:"qQ",normal:DEFAULT,ctrl:ctl("Q"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:87,code:"KeyW",keyCap:"wW",normal:l(DEFAULT),ctrl:ctl("W"),alt:l(DEFAULT),meta:DEFAULT}),m({keyCode:69,code:"KeyE",keyCap:"eE",normal:DEFAULT,ctrl:ctl("E"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:82,code:"KeyR",keyCap:"rR",normal:DEFAULT,ctrl:ctl("R"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:84,code:"KeyT",keyCap:"tT",normal:DEFAULT,ctrl:ctl("T"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:89,code:"KeyY",keyCap:"yY",normal:l(DEFAULT),ctrl:ctl("Y"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:85,code:"KeyU",keyCap:"uU",normal:DEFAULT,ctrl:ctl("U"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:73,code:"KeyI",keyCap:"iI",normal:DEFAULT,ctrl:ctl("I"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:79,code:"KeyO",keyCap:"oO",normal:l(DEFAULT),ctrl:ctl("O"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:80,code:"KeyP",keyCap:"pP",normal:l(DEFAULT),ctrl:l(ctl("P")),alt:DEFAULT,meta:DEFAULT}),m({keyCode:219,code:"BracketLeft",keyCap:"[{",normal:DEFAULT,ctrl:ctl("["),alt:DEFAULT,meta:DEFAULT}),m({keyCode:221,code:"BracketRight",keyCap:"]}",normal:DEFAULT,ctrl:ctl("]"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:220,code:"Backslash",keyCap:"\\|",normal:DEFAULT,ctrl:ctl("\\"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:20,code:"CapsLock",keyCap:"[CapsLock]",normal:PASS,ctrl:PASS,alt:PASS,meta:DEFAULT}),m({keyCode:65,code:"KeyA",keyCap:"aA",normal:DEFAULT,ctrl:ctl("A"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:83,code:"KeyS",keyCap:"sS",normal:DEFAULT,ctrl:ctl("S"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:68,code:"KeyD",keyCap:"dD",normal:DEFAULT,ctrl:ctl("D"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:70,code:"KeyF",keyCap:"fF",normal:DEFAULT,ctrl:l(ctl("F")),alt:l(DEFAULT),meta:DEFAULT}),m({keyCode:71,code:"KeyG",keyCap:"gG",normal:DEFAULT,ctrl:ctl("G"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:72,code:"KeyH",keyCap:"hH",normal:l(DEFAULT),ctrl:ctl("H"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:74,code:"KeyJ",keyCap:"jJ",normal:l(DEFAULT),ctrl:ctl("J"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:75,code:"KeyK",keyCap:"kK",normal:l(DEFAULT),ctrl:ctl("K"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:76,code:"KeyL",keyCap:"lL",normal:l(DEFAULT),ctrl:ctl("L"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:186,code:"Semicolon",keyCap:";:",normal:DEFAULT,ctrl:STRIP,alt:DEFAULT,meta:DEFAULT}),m({keyCode:222,code:"Quote",keyCap:"'\"",normal:DEFAULT,ctrl:STRIP,alt:DEFAULT,meta:DEFAULT}),m({keyCode:13,code:"Enter",keyCap:"[Enter]",normal:"\r",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:16,code:"ShiftLeft",keyCap:"[Shift]",normal:PASS,ctrl:PASS,alt:PASS,meta:DEFAULT}),m({keyCode:90,code:"KeyZ",keyCap:"zZ",normal:DEFAULT,ctrl:ctl("Z"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:88,code:"KeyX",keyCap:"xX",normal:l(DEFAULT),ctrl:l(ctl("X")),alt:DEFAULT,meta:DEFAULT}),m({keyCode:67,code:"KeyC",keyCap:"cC",normal:DEFAULT,ctrl:ctl("C"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:86,code:"KeyV",keyCap:"vV",normal:DEFAULT,ctrl:ctl("V"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:66,code:"KeyB",keyCap:"bB",normal:l(DEFAULT),ctrl:l(ctl("B")),alt:l(DEFAULT),meta:DEFAULT}),m({keyCode:78,code:"KeyN",keyCap:"nN",normal:DEFAULT,ctrl:l(ctl("N")),alt:DEFAULT,meta:DEFAULT}),m({keyCode:77,code:"KeyM",keyCap:"mM",normal:DEFAULT,ctrl:ctl("M"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:188,code:"Comma",keyCap:",<",normal:DEFAULT,ctrl:j(STRIP,PASS),alt:DEFAULT,meta:DEFAULT}),m({keyCode:190,code:"Period",keyCap:".>",normal:DEFAULT,ctrl:j(STRIP,PASS),alt:DEFAULT,meta:DEFAULT}),m({keyCode:191,code:"Slash",keyCap:"/?",normal:DEFAULT,ctrl:i(ctl("_"),ctl("?")),alt:DEFAULT,meta:DEFAULT}),m({keyCode:17,code:"ControlLeft",keyCap:"[Control]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:18,code:"AltLeft",keyCap:"[Alt]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:91,code:"MetaLeft",keyCap:"[Meta]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:32,code:"Space",keyCap:" ",normal:DEFAULT,ctrl:ctl("@"),alt:DEFAULT,meta:DEFAULT}),m({keyCode:93,code:"MetaRight",keyCap:"[Meta]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:42,code:"F13",keyCap:"[PRTSCR]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:145,code:"F14",keyCap:"[SCRLK]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:19,code:"F15",keyCap:"[BREAK]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:45,code:"Help",keyCap:"[Insert]",normal:"\x1b[2~",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:36,code:"Home",keyCap:"[Home]",normal:"\x1bOH",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:33,code:"PageUp",keyCap:"[PageUp]",normal:"\x1b[5~",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:46,code:"Delete",keyCap:"[DEL]",normal:"\x1b[3~",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:35,code:"End",keyCap:"[End]",normal:"\x1bOF",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:34,code:"PageDown",keyCap:"[PageDown]",normal:"\x1b[6~",ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:38,code:"ArrowUp",keyCap:"[ArrowUp]",normal:l(k("\x1b[A","\x1bOA")),ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:40,code:"ArrowDown",keyCap:"[ArrowDown]",normal:l(k("\x1b[B","\x1bOB")),ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:39,code:"ArrowRight",keyCap:"[ArrowRight]",normal:l(k("\x1b[C","\x1bOC")),ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:37,code:"ArrowLeft",keyCap:"[ArrowLeft]",normal:l(k("\x1b[D","\x1bOD")),ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:144,code:"NumLock",keyCap:"[NumLock]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:12,code:"",keyCap:"[Clear]",normal:PASS,ctrl:PASS,alt:PASS,meta:PASS}),m({keyCode:96,code:"Numpad0",keyCap:"[Numpad0]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:97,code:"Numpad1",keyCap:"[Numpad1]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:98,code:"Numpad2",keyCap:"[Numpad2]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:99,code:"Numpad3",keyCap:"[Numpad3]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:100,code:"Numpad4",keyCap:"[Numpad4]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:101,code:"Numpad5",keyCap:"[Numpad5]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:102,code:"Numpad6",keyCap:"[Numpad6]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:103,code:"Numpad7",keyCap:"[Numpad7]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:104,code:"Numpad8",keyCap:"[Numpad8]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:105,code:"Numpad9",keyCap:"[Numpad9]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:107,code:"NumpadAdd",keyCap:"[NumpadAdd]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:109,code:"NumpadSubtract",keyCap:"[NumpadSubtract]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:106,code:"NumpadMultiply",keyCap:"[NumpadMultiply]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:111,code:"NumpadDivide",keyCap:"[NumpadDivide]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),m({keyCode:110,code:"NumpadDecimal",keyCap:"[NumpadDecimal]",normal:DEFAULT,ctrl:DEFAULT,alt:DEFAULT,meta:DEFAULT}),this._reverseDefs.Backqoute=this._defs[192],this._reverseDefs.BracketLeft=this._defs[229],this._reverseDefs.BracketRight=this._defs[221],this._reverseDefs.Slash=this._defs[191],this._reverseDefs.Space=this._defs[32]}keyCode(p1){let q=this._reverseDefs[p1];return q?q.keyCode:0}key(r1){let s=this._defs[r1];if(!s)return"";let t=s.keyCap;return/^\[\w+\]$/.test(t)?t.substr(1,t.length-2):t.substr(0,1)}code(u1){let v=this._defs[u1];return v?v.code:""}constructor(w1){this._defs={},this._reverseDefs={},this._onCtrlNum=(a,b)=>{switch(b.keyCap.substr(0,1)){case"1":return"1";case"2":return ctl("@");case"3":return ctl("[");case"4":return ctl("\\");case"5":return ctl("]");case"6":return ctl("^");case"7":return ctl("_");case"8":return"\x7f";case"9":return"9";default:return PASS}},this._onAltNum=(a,b)=>DEFAULT,this._onSel=(a2,b)=>{let{ArrowDown:c,ArrowLeft:d,ArrowRight:e,ArrowUp:f,Escape:g,h:h,j:i,k:j,l:k,o:l,b:m,f:n,n:o,p:p,w:q,x:r,y:s}=this._reverseDefs;const t=a=>op("selection",a),u={command:"copy"};if(b===d||b===h){let v=a2.shift?"word":"character";t({dir:"left",gran:v})}else if(b===e||b===k){let w=a2.shift?"word":"character";t({dir:"right",gran:w})}else b===f||b===j?t({dir:"left",gran:"line"}):b===c||b===i?t({dir:"right",gran:"line"}):b===l||b===r?t({command:"change"}):b===o&&a2.ctrl?t({dir:"right",gran:"line"}):b===p?a2.ctrl?t({dir:"left",gran:"line"}):a2.shift||a2.alt||a2.meta||t({command:"paste"}):b===m?a2.ctrl?t({dir:"left",gran:"character"}):(a2.alt,t({dir:"left",gran:"word"})):b===q?t(a2.alt?u:{dir:"right",gran:"word"}):b===n?a2.ctrl?t({dir:"right",gran:"character"}):a2.alt&&t({dir:"right",gran:"word"}):b===s?t(u):b===g&&t({command:"cancel"});return CANCEL},this._keyboard=w1,this.reset()}}function blink_uio_activate(){var b1=0,c2=!1,d2=!1;let e1=/^[a-z0-9\[\]\{\}~`\#\$-_=\+\|"|'\?]$/i;var f=0;let g1=new KeyMap(null);function h1(a,b=document.activeElement){if(b){const[c,d]=[b.selectionStart,b.selectionEnd];b.setRangeText(a,c,d,"end"),b.dispatchEvent(new InputEvent("input"))}}function i(a,b){var c;let d=_objectSpread({},b,{op:a});null===(c=window.webkit.messageHandlers._kb)|| void 0===c||c.postMessage(d)}function j1(a){var b;if(0===a.indexOf("0:0:0:")){h1(a.replace("0:0:0:",""));return}var j=a.split(/:/g);let k=parseInt(j[0],10),l=parseInt(j[1],10),m=""==j[3]?":":j[3]||g1.key(l)||"",n=g1.code(l);if(4==j.length&&!k&&e1.test(m)){h1(m);return}let o=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,composed:!1,isComposing:!1,keyCode:l,key:m,code:n,metaKey:(1048576&k)==1048576,ctrlKey:(262144&k)==262144,altKey:(524288&k)==524288,shiftKey:c2||d2});f=0,null===(b=document.activeElement)|| void 0===b||b.dispatchEvent(o),i("out",{data:""})}function k1(a){if(a.target===document.activeElement){var g,j=!1;if("ShiftLeft"===a.code?(c2=!0,j=!0):"ShiftRight"===a.code&&(d2=!0,j=!0),!a.__blink){let k=a.altKey||a.ctrlKey||a.shiftKey||a.metaKey;if(a.__noskip||k);else if(0===b1){a.repeat&&e1.test(a.key)?1==(f+=1)?h1(a.key,document.activeElement):f%=2:f=0;return}if(0!==b1){let l=new KeyboardEvent("keydown",{bubbles:a.bubbles,cancelable:a.cancelable,composed:a.composed,key:a.key,code:a.code,location:a.location,repeat:a.repeat,ctrlKey:(262144&b1)==262144,shiftKey:a.shiftKey,altKey:(524288&b1)==524288,metaKey:(1048576&b1)==1048576,isComposing:a.isComposing,charCode:a.charCode,keyCode:a.keyCode,which:a.which});l.__blink=!0,a.preventDefault(),a.stopPropagation(),null===(g=document.activeElement)|| void 0===g||g.dispatchEvent(l)}j||i("out",{data:""})}}}function l1(a){a.target===document.activeElement&&("ShiftLeft"===a.code?c2=!1:"ShiftRight"===a.code&&(d2=!1))}function m1(a){!!a&&(a.__blink||(a.tabIndex=-1,a.__blink=!0,a.autocapitalize="none",a.autocorrect=!1,a!==document.body&&(a.addEventListener("keydown",k1,!0),a.addEventListener("keyup",l1,!0))))}window.term_paste=function(a){h1(a)},window.term_getCurrentSelection=function(){const a=document.getSelection();if(!a||0===a.rangeCount||"Caret"===a.type)return{base:"",offset:0,text:""};const b=a.getRangeAt(0).getBoundingClientRect(),c=`{{${b.x}, ${b.y}},{${b.width},${b.height}}}`;return{base:a.baseNode.textContent,offset:a.baseOffset,text:a.toString()||"",rect:c}},document.addEventListener("selectionchange",function(){var a,b;a=term_getCurrentSelection(),null===(b=window.webkit.messageHandlers.interOp)|| void 0===b||b.postMessage({op:"selectionchange",data:a})}),window._onKB=function(a,e){switch(a){case"state-reset":b1=0,c2=!1,d2=!1,f=0;break;case"toolbar-mods":var g,h;b1=g=e,(h=document.activeElement)&&(0==g?h.readOnly=h.__readOnly:h.__readOnly=h.readOnly);break;case"toolbar-press":j1(e);break;case"press":j1(e);break}},window.addEventListener("focusout",function(a){m1(a.relatedTarget)},!0),window.addEventListener("focusin",function(a){if(m1(a.target),a.target){let b=a.target.nodeName;if("TEXTAREA"===b){var c;let d=null===(c=a.target.parentElement)|| void 0===c?void 0:c.parentElement;d&&"code"==d.role?i("hide-caret"):i("show-caret");return}if("INPUT"===b){let e=a.target.type;if("text"===e||"url"===e||"search"==e||"password"==e||"email"==e||"tel"==e){i("show-caret");return}}i("hide-caret")}},!0),m1(document.activeElement)}function __install_uio(){if(!window._onKB){blink_uio_activate(),document.body.contentEditable=!0,document.body.style="word-wrap: normal; position: inherit;";var a=document.createElement("meta");a.name="viewport",a.content="viewport-fit=cover, width=device-width, height=device-height, initial-scale=1, user-scalable=no",document.getElementsByTagName("head")[0].appendChild(a);let b={op:"browser-ready"};window.webkit.messageHandlers.interOp.postMessage(b)}}window.addEventListener("DOMContentLoaded",a=>{var b=0;const c=setInterval(()=>{b+=1,document.getElementsByClassName("monaco-workbench").length>0&&(__install_uio(),clearInterval(c)),b>22000&&clearInterval(c)},50)}) \ No newline at end of file