mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-12-23 15:31:52 +00:00
3 lines
61 KiB
JavaScript
3 lines
61 KiB
JavaScript
/*! monaco-markdown v0.0.12 | github.com/traff/monaco-markdown */
|
||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("monaco-editor")):"function"==typeof define&&define.amd?define("MonacoMarkdown",["vs/editor/editor.main"],t):"object"==typeof exports?exports.MonacoMarkdown=t(require("monaco-editor")):e.MonacoMarkdown=t(e.monaco)}(window,function(n){return r=[function(e,t){e.exports=n},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SnippetString=t.TextEditorSelectionChangeKind=t.TextEditorRevealType=t.WorkspaceEdit=t.TextEdit=t.EndOfLine=t.Selection=t.Range=t.Position=t.values=void 0;var o=n(9);function a(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}t.values=a;var s=(c.Min=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)throw new TypeError;for(var n=e[0],r=1;r<e.length;r++){var i=e[r];i.isBefore(n)&&(n=i)}return n},c.Max=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)throw new TypeError;for(var n=e[0],r=1;r<e.length;r++){var i=e[r];i.isAfter(n)&&(n=i)}return n},c.isPosition=function(e){if(!e)return!1;if(e instanceof c)return!0;var t=e.line,e=e.character;return"number"==typeof t&&"number"==typeof e},Object.defineProperty(c.prototype,"line",{get:function(){return this._line},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"character",{get:function(){return this._character},enumerable:!1,configurable:!0}),c.prototype.isBefore=function(e){return this._line<e._line||!(e._line<this._line)&&this._character<e._character},c.prototype.isBeforeOrEqual=function(e){return this._line<e._line||!(e._line<this._line)&&this._character<=e._character},c.prototype.isAfter=function(e){return!this.isBeforeOrEqual(e)},c.prototype.isAfterOrEqual=function(e){return!this.isBefore(e)},c.prototype.isEqual=function(e){return this._line===e._line&&this._character===e._character},c.prototype.compareTo=function(e){return this._line<e._line?-1:this._line>e.line?1:this._character<e._character?-1:this._character>e._character?1:0},c.prototype.translate=function(e,t){if(void 0===t&&(t=0),null===e||null===t)throw o.illegalArgument();var n;return void 0===e?n=0:"number"==typeof e?n=e:(n="number"==typeof e.lineDelta?e.lineDelta:0,t="number"==typeof e.characterDelta?e.characterDelta:0),0===n&&0===t?this:new c(this.line+n,this.character+t)},c.prototype.with=function(e,t){if(void 0===t&&(t=this.character),null===e||null===t)throw o.illegalArgument();var n;return void 0===e?n=this.line:"number"==typeof e?n=e:(n=("number"==typeof e.line?e:this).line,t=("number"==typeof e.character?e:this).character),n===this.line&&t===this.character?this:new c(n,t)},c.prototype.toJSON=function(){return{line:this.line,character:this.character}},c);function c(e,t){if(e<0)throw o.illegalArgument("line must be non-negative");if(t<0)throw o.illegalArgument("character must be non-negative");this._line=e,this._character=t}t.Position=s;var l=(u.isRange=function(e){return e instanceof u||!!e&&(s.isPosition(e.start)&&s.isPosition(e.end))},Object.defineProperty(u.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),u.prototype.contains=function(e){return e instanceof u?this.contains(e._start)&&this.contains(e._end):e instanceof s&&(!e.isBefore(this._start)&&!this._end.isBefore(e))},u.prototype.isEqual=function(e){return this._start.isEqual(e._start)&&this._end.isEqual(e._end)},u.prototype.intersection=function(e){var t=s.Max(e.start,this._start),e=s.Min(e.end,this._end);if(!t.isAfter(e))return new u(t,e)},u.prototype.union=function(e){return this.contains(e)?this:e.contains(this)?e:new u(s.Min(e.start,this._start),s.Max(e.end,this.end))},Object.defineProperty(u.prototype,"isEmpty",{get:function(){return this._start.isEqual(this._end)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isSingleLine",{get:function(){return this._start.line===this._end.line},enumerable:!1,configurable:!0}),u.prototype.with=function(e,t){if(void 0===t&&(t=this.end),null===e||null===t)throw o.illegalArgument();var n;return e?s.isPosition(e)?n=e:(n=e.start||this.start,t=e.end||this.end):n=this.start,n.isEqual(this._start)&&t.isEqual(this.end)?this:new u(n,t)},u.prototype.toJSON=function(){return[this.start,this.end]},u);function u(e,t,n,r){var i,o;if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r?(i=new s(e,t),o=new s(n,r)):e instanceof s&&t instanceof s&&(i=e,o=t),!i||!o)throw new Error("Invalid arguments");i.isBefore(o)?(this._start=i,this._end=o):(this._start=o,this._end=i)}t.Range=l;var d,i=(i(p,d=l),p.isSelection=function(e){return e instanceof p||!!e&&(l.isRange(e)&&s.isPosition(e.anchor)&&s.isPosition(e.active)&&"boolean"==typeof e.isReversed)},Object.defineProperty(p.prototype,"anchor",{get:function(){return this._anchor},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"active",{get:function(){return this._active},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isReversed",{get:function(){return this._anchor===this._end},enumerable:!1,configurable:!0}),p.prototype.toJSON=function(){return{start:this.start,end:this.end,active:this.active,anchor:this.anchor}},p);function p(e,t,n,r){var i,o,a=this;if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r?(i=new s(e,t),o=new s(n,r)):e instanceof s&&t instanceof s&&(i=e,o=t),!i||!o)throw new Error("Invalid arguments");return(a=d.call(this,i,o)||this)._anchor=i,a._active=o,a}t.Selection=i,(i=t.EndOfLine||(t.EndOfLine={}))[i.LF=1]="LF",i[i.CRLF=2]="CRLF";var g=(f.isTextEdit=function(e){return e instanceof f||!!e&&(l.isRange(e)&&"string"==typeof e.newText)},f.replace=function(e,t){return new f(e,t)},f.insert=function(e,t){return f.replace(new l(e,e),t)},f.delete=function(e){return f.replace(e,"")},f.setEndOfLine=function(e){var t=new f(new l(new s(0,0),new s(0,0)),"");return t.newEol=e,t},Object.defineProperty(f.prototype,"range",{get:function(){return this._range},set:function(e){if(e&&!l.isRange(e))throw o.illegalArgument("range");this._range=e},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"newText",{get:function(){return this._newText||""},set:function(e){if(e&&"string"!=typeof e)throw o.illegalArgument("newText");this._newText=e},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"newEol",{get:function(){return this._newEol},set:function(e){if(e&&"number"!=typeof e)throw o.illegalArgument("newEol");this._newEol=e},enumerable:!1,configurable:!0}),f.prototype.toJSON=function(){return{range:this.range,newText:this.newText,newEol:this._newEol}},f);function f(e,t){this.range=e,this._newText=t}t.TextEdit=g;h.prototype.renameFile=function(e,t,n){this._edits.push({_type:1,from:e,to:t,options:n})},h.prototype.createFile=function(e,t){this._edits.push({_type:1,from:void 0,to:e,options:t})},h.prototype.deleteFile=function(e,t){this._edits.push({_type:1,from:e,to:void 0,options:t})},h.prototype.replace=function(e,t,n){this._edits.push({_type:2,uri:e,edit:new g(t,n)})},h.prototype.insert=function(e,t,n){this.replace(e,new l(t,t),n)},h.prototype.delete=function(e,t){this.replace(e,t,"")},h.prototype.has=function(e){for(var t=0,n=this._edits;t<n.length;t++){var r=n[t];if(2===r._type&&r.uri.toString()===e.toString())return!0}return!1},h.prototype.set=function(e,t){if(t)for(var n=0,r=t;n<r.length;n++){var i=r[n];i&&this._edits.push({_type:2,uri:e,edit:i})}else for(var o=0;o<this._edits.length;o++){var a=this._edits[o];2===a._type&&a.uri.toString()===e.toString()&&(this._edits[o]=void 0)}},h.prototype.get=function(e){for(var t=[],n=0,r=this._edits;n<r.length;n++){var i=r[n];2===i._type&&i.uri.toString()===e.toString()&&t.push(i.edit)}return t},h.prototype.entries=function(){for(var e=new Map,t=0,n=this._edits;t<n.length;t++){var r,i=n[t];2===i._type&&((r=e.get(i.uri.toString()))||(r=[i.uri,[]],e.set(i.uri.toString(),r)),r[1].push(i.edit))}return a(e)},h.prototype._allEntries=function(){for(var e=[],t=0,n=this._edits;t<n.length;t++){var r=n[t];1===r._type?e.push([r.from,r.to,r.options]):e.push([r.uri,[r.edit]])}return e},Object.defineProperty(h.prototype,"size",{get:function(){return this.entries().length},enumerable:!1,configurable:!0}),h.prototype.toJSON=function(){return this.entries()},i=h;function h(){this._edits=new Array}t.WorkspaceEdit=i,(i=t.TextEditorRevealType||(t.TextEditorRevealType={}))[i.Default=0]="Default",i[i.InCenter=1]="InCenter",i[i.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",i[i.AtTop=3]="AtTop",(i=t.TextEditorSelectionChangeKind||(t.TextEditorSelectionChangeKind={}))[i.Keyboard=1]="Keyboard",i[i.Mouse=2]="Mouse",i[i.Command=3]="Command";m.isSnippetString=function(e){return e instanceof m||!!e&&"string"==typeof e.value},m._escape=function(e){return e.replace(/\$|}|\\/g,"\\$&")},m.prototype.appendText=function(e){return this.value+=m._escape(e),this},m.prototype.appendTabstop=function(e){return void 0===e&&(e=this._tabstop++),this.value+="$",this.value+=e,this},m.prototype.appendPlaceholder=function(e,t){var n;return void 0===t&&(t=this._tabstop++),e="function"==typeof e?((n=new m)._tabstop=this._tabstop,e(n),this._tabstop=n._tabstop,n.value):m._escape(e),this.value+="${",this.value+=t,this.value+=":",this.value+=e,this.value+="}",this},m.prototype.appendVariable=function(e,t){var n;return"function"==typeof t?((n=new m)._tabstop=this._tabstop,t(n),this._tabstop=n._tabstop,t=n.value):"string"==typeof t&&(t=t.replace(/\$|}/g,"\\$&")),this.value+="${",this.value+=e,t&&(this.value+=":",this.value+=t),this.value+="}",this},i=m;function m(e){this._tabstop=1,this.value=e||""}t.SnippetString=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextEditorEdit=t.TextEditor=t.TextDocument=t.getWordDefinitionFor=t.setWordDefinitionFor=void 0;var a=n(1),r=n(0),i=n(10),o=n(11),s=n(3),c=new Map;function l(e){return c.get(e)}t.setWordDefinitionFor=function(e,t){c.set(e,t)},t.getWordDefinitionFor=l;var u=(Object.defineProperty(d.prototype,"eol",{get:function(){switch(this.model.getEOL()){case"\n":return a.EndOfLine.LF;case"\r\n":return a.EndOfLine.CRLF;default:throw new Error("invalid argument")}},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fileName",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isClosed",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isDirty",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isUntitled",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"lineCount",{get:function(){return this.model.getLineCount()},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"_lines",{get:function(){return this.model.getLinesContent()},enumerable:!1,configurable:!0}),d.prototype.getText=function(e){return e?this.model.getValueInRange(s.Range.from(e)):this.model.getValue()},d.prototype.lineAt=function(e){var t;if(e instanceof a.Position?t=e.line:"number"==typeof e&&(t=e),"number"!=typeof t||t<0||t>=this._lines.length)throw new Error("Illegal value for `line`");var n,r,i,o=this._textLines[t];return o&&o.lineNumber===t&&o.text===this._lines[t]||(n=this._lines[t],r=/^(\s*)/.exec(n)[1].length,i=new a.Range(t,0,t,n.length),e=t<this._lines.length-1?new a.Range(t,0,t+1,0):i,o=Object.freeze({lineNumber:t,range:i,rangeIncludingLineBreak:e,text:n,firstNonWhitespaceCharacterIndex:r,isEmptyOrWhitespace:r===n.length}),this._textLines[t]=o),o},d.prototype.offsetAt=function(e){return this.model.getOffsetAt(s.Position.from(e))},d.prototype.positionAt=function(e){return s.Position.to(this.model.getPositionAt(e))},d.prototype.save=function(){throw new Error("Not implemented")},d.prototype.validateRange=function(e){if(!(e instanceof a.Range))throw new Error("Invalid argument");var t=this.validatePosition(e.start),n=this.validatePosition(e.end);return t===e.start&&n===e.end?e:new a.Range(t.line,t.character,n.line,n.character)},d.prototype.validatePosition=function(e){if(!(e instanceof a.Position))throw new Error("Invalid argument");var t,n=e.line,r=e.character,i=!1;return n<0?i=!(r=n=0):n>=this._lines.length?(n=this._lines.length-1,r=this._lines[n].length,i=!0):(t=this._lines[n].length,r<0?i=!(r=0):t<r&&(r=t,i=!0)),i?new a.Position(n,r):e},d.prototype.getWordRangeAtPosition=function(e,t){e=this.validatePosition(e);t?i.regExpLeadsToEndlessLoop(t)&&(console.warn("[getWordRangeAtPosition]: ignoring custom regexp '"+t.source+"' because it matches the empty string."),t=l(this.languageId)):t=l(this.languageId);t=o.getWordAtText(e.character+1,o.ensureValidWordDefinition(t),this._lines[e.line],0);if(t)return new a.Range(e.line,t.startColumn-1,e.line,t.endColumn-1)},d);function d(e){this._textLines=[],this.model=e,this.languageId=p(e)}function p(e){return e.getLanguageId()}t.TextDocument=u;Object.defineProperty(g.prototype,"languageId",{get:function(){return p(this.editor.getModel())},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"document",{get:function(){return new u(this.editor.getModel())},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"selection",{get:function(){return s.Selection.to(this.editor.getSelection())},set:function(e){this.editor.setSelection(s.Selection.from(e))},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"selections",{get:function(){return this.editor.getSelections().map(function(e){return s.Selection.to(e)})},set:function(e){this.editor.setSelections(e.map(function(e){return s.Selection.from(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"visibleRanges",{get:function(){return this.editor.getVisibleRanges().map(function(e){return s.Range.to(e)})},enumerable:!1,configurable:!0}),g.prototype.edit=function(e,t){if(void 0===t&&(t={undoStopBefore:!0,undoStopAfter:!0}),this._disposed)return Promise.reject(new Error("TextEditor#edit not possible on closed editors"));t=new m(this.document,t);return e(t),this._applyEdit(t)},g.prototype._applyEdit=function(e){e=e.finalize();if(0===e.edits.length&&!e.setEndOfLine)return Promise.resolve(null);var t=e.edits.map(function(e){return e.range});t.sort(function(e,t){return e.end.line===t.end.line?e.end.character===t.end.character?e.start.line===t.start.line?e.start.character-t.start.character:e.start.line-t.start.line:e.end.character-t.end.character:e.end.line-t.end.line});for(var n=0,r=t.length-1;n<r;n++){var i=t[n].end;if(t[n+1].start.isBefore(i))return Promise.reject(new Error("Overlapping ranges are not allowed!"))}e=e.edits.map(function(e){return{range:s.Range.from(e.range),text:e.text,forceMoveMarkers:e.forceMoveMarkers}});return this.editor.getModel().pushEditOperations(this.editor.getSelections(),e,function(){return[]}),Promise.resolve(null)},g.prototype.revealRange=function(e,t){!function(e,t,n){switch(n){case a.TextEditorRevealType.Default:case void 0:e.revealRange(t,r.editor.ScrollType.Smooth);break;case a.TextEditorRevealType.InCenter:e.revealRangeInCenter(t,r.editor.ScrollType.Smooth);break;case a.TextEditorRevealType.InCenterIfOutsideViewport:e.revealRangeInCenterIfOutsideViewport(t,r.editor.ScrollType.Smooth);break;case a.TextEditorRevealType.AtTop:e.revealRangeAtTop(t,r.editor.ScrollType.Smooth);break;default:console.warn("Unknown revealType: "+n)}}(this.editor,s.Range.from(e),t)},g.prototype.applyEdit=function(e,t){return t=t||[],this.editor.getModel().pushEditOperations(this.editor.getSelections(),s.WorkspaceEdit.from(e),function(){return t.map(function(e){return s.Selection.from(e)})}),Promise.resolve(null)},g.prototype.addAction=function(e){this.editor.addAction(e)},g.prototype.executeCommand=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];switch(e){case"type":return this.editor.trigger("keyboard",e,t[0]),Promise.resolve();case"tab":case"deleteLeft":return this.editor.trigger("keyboard",e,void 0),Promise.resolve();default:var r=this.editor.getAction(e);if(r){if(r.isSupported())return r.run()}else new Error("unknown action id "+e)}},g.prototype.getConfiguration=function(e){if(""!==e)return new f},n=g;function g(e){this._disposed=!1,this.editor=e}t.TextEditor=n;var f=(h.prototype.get=function(e){},h);function h(){}var m=(b.prototype.finalize=function(){return this._finalized=!0,{documentVersionId:this._documentVersionId,edits:this._collectedEdits,setEndOfLine:this._setEndOfLine,undoStopBefore:this._undoStopBefore,undoStopAfter:this._undoStopAfter}},b.prototype._throwIfFinalized=function(){if(this._finalized)throw new Error("Edit is only valid while callback runs")},b.prototype.replace=function(e,t){this._throwIfFinalized();var n=null;if(e instanceof a.Position)n=new a.Range(e,e);else{if(!(e instanceof a.Range))throw new Error("Unrecognized location");n=e}this._pushEdit(n,t,!1)},b.prototype.insert=function(e,t){this._throwIfFinalized(),this._pushEdit(new a.Range(e,e),t,!0)},b.prototype.delete=function(e){this._throwIfFinalized();if(!(e instanceof a.Range))throw new Error("Unrecognized location");this._pushEdit(e,null,!0)},b.prototype._pushEdit=function(e,t,n){e=this._document.validateRange(e);this._collectedEdits.push({range:e,text:t,forceMoveMarkers:n})},b.prototype.setEndOfLine=function(e){if(this._throwIfFinalized(),e!==a.EndOfLine.LF&&e!==a.EndOfLine.CRLF)throw new Error("Illegal argument endOfLine");this._setEndOfLine=e},b);function b(e,t){this._collectedEdits=[],this._setEndOfLine=void 0,this._finalized=!1,this._document=e,this._documentVersionId=e.version,this._undoStopBefore=t.undoStopBefore,this._undoStopAfter=t.undoStopAfter}t.TextEditorEdit=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceEdit=t.EndOfLine=t.Position=t.Range=t.Selection=void 0;var l,r=n(0),i=n(1);(n=t.Selection||(t.Selection={})).to=function(e){var t=e.selectionStartLineNumber,n=e.selectionStartColumn,r=e.positionLineNumber,e=e.positionColumn,n=new i.Position(t-1,n-1),e=new i.Position(r-1,e-1);return new i.Selection(n,e)},n.from=function(e){var t=e.anchor,e=e.active;return new r.Selection(t.line+1,t.character+1,e.line+1,e.character+1)},(n=l=t.Range||(t.Range={})).from=function(e){if(e){var t=e.start,e=e.end;return new r.Range(t.line+1,t.character+1,e.line+1,e.character+1)}},n.to=function(e){if(e){var t=e.startLineNumber,n=e.startColumn,r=e.endLineNumber,e=e.endColumn;return new i.Range(t-1,n-1,r-1,e-1)}},(n=t.Position||(t.Position={})).to=function(e){return new i.Position(e.lineNumber-1,e.column-1)},n.from=function(e){return{lineNumber:e.line+1,column:e.character+1}},(n=t.EndOfLine||(t.EndOfLine={})).from=function(e){return e===i.EndOfLine.CRLF?r.editor.EndOfLineSequence.CRLF:e===i.EndOfLine.LF?r.editor.EndOfLineSequence.LF:void 0},n.to=function(e){return e===r.editor.EndOfLineSequence.CRLF?i.EndOfLine.CRLF:e===r.editor.EndOfLineSequence.LF?i.EndOfLine.LF:void 0},(t.WorkspaceEdit||(t.WorkspaceEdit={})).from=function(e){for(var t=[],n=0,r=e._allEntries();n<r.length;n++){var i=r[n],o=i[0],i=i[1];if(!Array.isArray(i))throw new Error("Not implemented for "+o);for(var a=0,s=i;a<s.length;a++){var c=s[a];t.push({range:l.from(c.range),text:c.newText,forceMoveMarkers:!1})}}return t}},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.isSingleLink=t.activateFormatting=t.addKeybinding=void 0;var i=n(0),o=n(5),h=n(1);function a(t,e,n,r,i,o,a){t.addAction({contextMenuGroupId:a=void 0===a?"markdown.extension.editing":a,contextMenuOrder:0,id:"markdown.extension.editing."+e,keybindingContext:o,keybindings:r,label:i,precondition:"",run:function(e){n(t)}})}t.addKeybinding=a,t.activateFormatting=function(e){a(e,"toggleBold",l,[i.KeyMod.CtrlCmd|i.KeyCode.KeyB],"Toggle bold"),a(e,"toggleItalic",u,[i.KeyMod.CtrlCmd|i.KeyCode.KeyI],"Toggle italic"),a(e,"toggleCodeSpan",d,[i.KeyMod.CtrlCmd|i.KeyCode.Backquote],"Toggle code span"),a(e,"toggleStrikethrough",p,[i.KeyMod.Alt|i.KeyCode.KeyS],"Toggle strikethrough"),a(e,"toggleMath",y,[i.KeyMod.CtrlCmd|i.KeyCode.KeyM],"Toggle math"),a(e,"toggleMathReverse",x,[i.KeyMod.CtrlCmd|i.KeyMod.Shift|i.KeyCode.KeyM],"Toggle math reverse"),a(e,"toggleHeadingUp",m,[i.KeyMod.WinCtrl|i.KeyMod.Shift|i.KeyCode.BracketLeft],"Heading up"),a(e,"toggleHeadingDown",b,[i.KeyMod.WinCtrl|i.KeyMod.Shift|i.KeyCode.BracketRight],"Heading down"),a(e,"toggleList",_,[i.KeyMod.CtrlCmd|i.KeyCode.KeyL],"Toggle list")};var s,c=(s="\\u00a1-\\uffff",new RegExp("^(?:[a-z0-9\\.\\-\\+]*)://(?:[^\\s:@/]+(?::[^\\s:@/]*)?@)?(?:(?:25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}|\\[[0-9a-f:\\.]+\\]|([a-z"+s+"0-9](?:[a-z"+s+"0-9-]{0,61}[a-z"+s+"0-9])?(?:\\.(?!-)[a-z"+s+"0-9-]{1,63})*\\.(?!-)(?:[a-z"+s+"-]{2,63}|xn--[a-z0-9]{1,59})\\.?|localhost))(?::\\d{2,5})?(?:[/?#][^\\s]*)?$","i"));function l(e){return S(e,"**")}function u(e){return S(e,"_")}function d(e){return S(e,"`")}function p(e){return S(e,"~~")}var g,f="######";function m(e){var n=e.selection.active.line,r=e.document.lineAt(n).text;return e.edit(function(e){var t;r.startsWith("#")?r.startsWith(f)?(t=r.startsWith(f+" ")?f.length+1:f.length,e.delete(new h.Range(new h.Position(n,0),new h.Position(n,t)))):e.insert(new h.Position(n,0),"#"):e.insert(new h.Position(n,0),"# ")})}function b(e){var t=e.selection.active.line,n=e.document.lineAt(t).text;e.edit(function(e){n.startsWith("# ")?e.delete(new h.Range(new h.Position(t,0),new h.Position(t,2))):n.startsWith("#")?e.delete(new h.Range(new h.Position(t,0),new h.Position(t,1))):e.insert(new h.Position(t,0),f+" ")})}(n=g=g||{})[n.NONE=0]="NONE",n[n.INLINE=1]="INLINE",n[n.SINGLE_DISPLAYED=2]="SINGLE_DISPLAYED",n[n.MULTI_DISPLAYED=3]="MULTI_DISPLAYED";var v=[g.NONE,g.INLINE,g.MULTI_DISPLAYED,g.SINGLE_DISPLAYED],w=(new(Array.bind.apply(Array,r([void 0],v)))).reverse();function y(e){E(e,v)}function x(e){E(e,w)}function E(e,t){var n,r,i,o,a,s,c;e.selection.isEmpty&&(n=e.selection.active,r="$|$"===T(r=e,i=n,"$")?g.INLINE:"$$ | $$"===T(r,i,"$$ "," $$")?g.SINGLE_DISPLAYED:""===r.document.lineAt(i.line).text&&0<i.line&&"$$"===r.document.lineAt(i.line-1).text&&i.line<r.document.lineCount-1&&"$$"===r.document.lineAt(i.line+1).text?g.MULTI_DISPLAYED:g.NONE,i=t.indexOf(r),o=e,a=n,s=r,c=t[(i+1)%t.length],o.edit(function(e){var t;switch(s){case g.NONE:t=new h.Range(a,a);break;case g.INLINE:t=new h.Range(new h.Position(a.line,a.character-1),new h.Position(a.line,a.character+1));break;case g.SINGLE_DISPLAYED:t=new h.Range(new h.Position(a.line,a.character-3),new h.Position(a.line,a.character+3));break;case g.MULTI_DISPLAYED:t=new h.Range(new h.Position(a.line-1,0),new h.Position(a.line+1,2))}e.delete(t)}).then(function(){o.edit(function(e){var t,n=o.selection.active;switch(c){case g.NONE:t="";break;case g.INLINE:t="$$";break;case g.SINGLE_DISPLAYED:t="$$ $$";break;case g.MULTI_DISPLAYED:t="$$\n\n$$"}e.insert(n,t)}).then(function(){var e,t=o.selection.active;switch(c){case g.NONE:e=t;break;case g.INLINE:e=t.with(t.line,t.character-1);break;case g.SINGLE_DISPLAYED:e=t.with(t.line,t.character-3);break;case g.MULTI_DISPLAYED:e=t.with(t.line-1,0)}o.selection=new h.Selection(e,e)})}))}function _(e){var n=e.document,r=new h.WorkspaceEdit;return e.selections.forEach(function(e){if(e.isEmpty)k(n,e.active.line,r);else for(var t=e.start.line;t<=e.end.line;t++)k(n,t,r)}),e.applyEdit(r,[]).then(function(){return o.fixMarker(e)})}function k(e,t,n){var r=e.lineAt(t).text,i=0===r.trim().length?r.length:r.indexOf(r.trim()),r=r.substr(i);r.startsWith("- ")?n.replace(e.uri,new h.Range(t,i,t,i+2),"* "):r.startsWith("* ")?n.replace(e.uri,new h.Range(t,i,t,i+2),"+ "):r.startsWith("+ ")?n.replace(e.uri,new h.Range(t,i,t,i+2),"1. "):/^\d\. /.test(r)?n.replace(e.uri,new h.Range(t,i+1,t,i+2),")"):/^\d\) /.test(r)?n.delete(e.uri,new h.Range(t,i,t,i+3)):n.insert(e.uri,new h.Position(t,i),"- ")}function S(s,c,l){null==l&&(l=c);var e=s.selections,u=new h.WorkspaceEdit,d=[],p=e.slice();e.forEach(function(n,e){var t,r,i,o=n.active,a=d.map(function(e){var t=e[0],e=e[1];return n.start.line==t.line&&n.start.character>=t.character?e:0}).reduce(function(e,t){return e+t},0);n.isEmpty?"~~"!==c&&T(s,o,c)===c+"text|"+l?(t=o.with({character:o.character+a+l.length}),p[e]=new h.Selection(t,t)):T(s,o,c)===c+"|"+l?(r=o.with({character:o.character-c.length}),i=o.with({character:o.character+l.length}),L(s,u,d,p,e,a,o,new h.Range(r,i),!1,c)):(null==(r=s.document.getWordRangeAtPosition(o))&&(r=n),i=s.document.lineAt(o.line),"~~"===c&&/^\s*[\*\+\-] (\[[ x]\] )? */g.test(i.text)&&(r=i.range.with(new h.Position(o.line,i.text.match(/^\s*[\*\+\-] (\[[ x]\] )? */g)[0].length))),L(s,u,d,p,e,a,o,r,!1,c)):L(s,u,d,p,e,a,o,n,!0,c)});var t=s.selection&&!s.selection.isEmpty;return s.applyEdit(u,p).then(function(){t||(s.selections=p)})}function L(e,t,n,r,i,o,a,s,c,l,u){null==u&&(u=l);var d=e.document.getText(s),p=r[i],g=(l+u).length,f=a.with({character:a.character+o}),f=function(e,t,n){null==n&&(n=t);return e.startsWith(t)&&e.endsWith(n)}(d,l)?(t.replace(e.document.uri,s,d.substr(l.length,d.length-g)),n.push([s.end,-g]),c?new h.Selection(p.start.with({character:p.start.character+o}),p.end.with({character:p.end.character+o-g})):(f=s.isEmpty?a.with({character:a.character+o+l.length}):a.character==s.end.character?a.with({character:a.character+o-g}):a.with({character:a.character+o-l.length}),new h.Selection(f,f))):(t.replace(e.document.uri,s,l+d+u),n.push([s.end,g]),c?new h.Selection(p.start.with({character:p.start.character+o}),p.end.with({character:p.end.character+o+g})):(f=!s.isEmpty&&a.character==s.end.character?a.with({character:a.character+o+g}):a.with({character:a.character+o+l.length}),new h.Selection(f,f)));r[i]=f}function T(e,t,n,r){var i=t.character-n.length,o=t.character+(r=null==r?n:r).length,i=e.document.getText(new h.Range(t.line,i=i<0?0:i,t.line,t.character));return e.document.getText(new h.Range(t.line,t.character,t.line,o))==r?i==n?n+"|"+r:n+"text|"+r:"|"}t.isSingleLink=function(e){return c.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deactivate=t.fixMarker=t.activateListEditing=void 0;var h=n(6),r=n(0),m=n(1),i=n(4);function o(e){l(e,"shift")}function a(e){c(e,"shift")}function s(e){c(e,"ctrl")}function c(t,n){var r,i=t.selection.active,o=t.document.lineAt(i.line),e=o.text.substr(0,i.character),a=o.text.substr(i.character),s=i;if("ctrl"==n&&(s=o.range.end),"shift"==n||h.isInFencedCodeBlock(t.document,i.line))return b(t,"enter",n);if(/^(>|([-+*]|[0-9]+[.)])( +\[[ x]\])?)$/.test(e.trim())&&0==a.trim().length)return t.edit(function(e){e.delete(o.range),e.insert(o.range.end,"\n")}).then(function(){t.revealRange(t.selection)}).then(function(){return w(t,v(t))});if(/^> /.test(e))return t.edit(function(e){e.insert(s,"\n> ")}).then(function(){var e;"ctrl"!=n||i.isEqual(s)||(e=i.with(o.lineNumber+1,2),t.selection=new m.Selection(e,e))}).then(function(){t.revealRange(t.selection)});if(null!==(r=/^(\s*[-+*] +(\[[ x]\] +)?)/.exec(e)))return t.edit(function(e){e.insert(s,"\n"+r[1].replace("[x]","[ ]"))}).then(function(){var e;"ctrl"!=n||i.isEqual(s)||(e=i.with(o.lineNumber+1,r[1].length),t.selection=new m.Selection(e,e))}).then(function(){t.revealRange(t.selection)});if(null===(r=/^(\s*)([0-9]+)([.)])( +)((\[[ x]\] +)?)/.exec(e)))return b(t,"enter",n);var c=t.getConfiguration("markdown.extension.orderedList").get("marker"),l="1",u=r[1],d=r[2],p=r[3],g=r[4],a=r[5].replace("[x]","[ ]"),e=(d+p+g).length,f=u+(l="ordered"==c?String(Number(d)+1):l)+p+(g=" ".repeat(Math.max(1,e-(l+p).length)))+a;return t.edit(function(e){e.insert(s,"\n"+f)},{undoStopBefore:!0,undoStopAfter:!1}).then(function(){var e;"ctrl"!=n||i.isEqual(s)||(e=i.with(o.lineNumber+1,f.length),t.selection=new m.Selection(e,e))}).then(function(){return w(t)}).then(function(){t.revealRange(t.selection)})}function l(e,t){var n=e.selection.start,r=e.document.lineAt(n.line).text;if(h.isInFencedCodeBlock(e.document,n.line))return b(e,"tab",t);r=/^\s*([-+*]|[0-9]+[.)]) +(\[[ x]\] +)?/.exec(r);return r&&("shift"===t||!e.selection.isEmpty||e.selection.isEmpty&&n.character<=r[0].length)?("shift"===t?d:function(e){if("adaptive"===e.getConfiguration("markdown.extension.list").get("indentationSize"))try{for(var t=e.selection,n=p(e,t.start.line,e.document.lineAt(t.start.line).firstNonWhitespaceCharacterIndex),r=new m.WorkspaceEdit,i=t.start.line;i<=t.end.line&&(i!==t.end.line||t.isEmpty||0!==t.end.character);i++)0!==e.document.lineAt(i).text.length&&r.insert(e.document.uri,new m.Position(i,0)," ".repeat(n));return e.applyEdit(r)}catch(e){}return e.executeCommand("editor.action.indentLines")})(e).then(function(){return w(e)}):b(e,"tab",t)}function u(e){var t,n=e.selection.active,r=e.document,i=r.lineAt(n.line).text.substr(0,n.character);return h.isInFencedCodeBlock(r,n.line)?b(e,"backspace"):e.selection.isEmpty?/^\s+([-+*]|[0-9]+[.)]) $/.test(i)?d(e).then(function(){return w(e)}):/^([-+*]|[0-9]+[.)]) $/.test(i)?e.edit(function(e){e.replace(new m.Range(n.with({character:0}),n)," ".repeat(i.length))}).then(function(){return w(e,v(e))}):/^\s*([-+*]|[0-9]+[.)]) +(\[[ x]\] )$/.test(i)?(r=e,t=new m.Range(n.with({character:i.length-4}),n),r.edit(function(e){e.delete(t)},{undoStopBefore:!0,undoStopAfter:!1}).then(function(){return w(e,v(e))})):b(e,"backspace"):b(e,"backspace").then(function(){return w(e,v(e))})}function b(e,t,n){switch(t){case"enter":return"ctrl"===n?e.executeCommand("editor.action.insertLineAfter"):e.executeCommand("type",{source:"keyboard",text:"\n"});case"tab":return e.getConfiguration("emmet").get("triggerExpansionOnTab")?e.executeCommand("editor.emmet.action.expandAbbreviation"):"shift"===n?e.executeCommand("editor.action.outdentLines"):e.executeCommand("tab");case"backspace":return e.executeCommand("deleteLeft")}}function d(e){if("adaptive"===e.getConfiguration("markdown.extension.list").get("indentationSize"))try{for(var t=e.selection,n=p(e,t.start.line,e.document.lineAt(t.start.line).firstNonWhitespaceCharacterIndex),r=new m.WorkspaceEdit,i=t.start.line;i<=t.end.line&&(i!==t.end.line||t.isEmpty||0!==t.end.character);i++){var o=e.document.lineAt(i).text,a=void 0;0<(a=0===o.trim().length?o.length:e.document.lineAt(i).firstNonWhitespaceCharacterIndex)&&r.delete(e.document.uri,new m.Range(i,0,i,Math.min(n,a)))}return e.applyEdit(r)}catch(e){}return e.executeCommand("editor.action.outdentLines")}function p(e,t,n){for(;0<=--t;){var r,i=e.document.lineAt(t).text;if(null!==(r=/^(\s*)(([-+*]|[0-9]+[.)]) +)(\[[ x]\] +)?/.exec(i))&&r[1].length<=n)return r[2].length}throw"No previous Markdown list item"}function v(e,t){for(void 0===t&&(t=e.selection.start.line);t<e.document.lineCount;){var n=e.document.lineAt(t).text;if(null!==/^\s*[0-9]+[.)] +/.exec(n))return t;t++}}function w(r,i){if(!((i=void 0===i&&(void 0===(i=v(r))||i>r.selection.end.line)?r.selection.active.line:i)<0||r.document.lineCount<=i)){var e=r.document.lineAt(i).text;if(null!==(a=/^(\s*)([0-9]+)([.)])( +)/.exec(e))){var t=a[1],n=a[2],o=a[3],e=a[4],a=function(e,t,n){for(;0<=--t;){var r=e.document.lineAt(t).text,i=void 0;if(null!==(i=/^(\s*)(([0-9]+)[.)] +)/.exec(r))){var o=i[1],a=i[3];if(o.length===n)return Number(a)+1;if(!o.includes("\t")&&o.length+i[2].length<=n||o.includes("\t")&&o.length+1<=n)return 1}else if(null!==(i=/^(\s*)\S/.exec(r))&&i[1].length<=n)break}return 1}(r,i,t.length),s=n.length+o.length+e.length,c=String(a);return r.edit(function(e){n!==c&&(c+=o+" ".repeat(Math.max(1,s-(c+o).length)),e.replace(new m.Range(i,t.length,i,t.length+s),c))},{undoStopBefore:!1,undoStopAfter:!1}).then(function(){for(var e=i+1,t=" ".repeat(s);r.document.lineCount>e;){var n=r.document.lineAt(e).text;if(/^\s*[0-9]+[.)] +/.test(n))return w(r,e);if(/^\s*$/.test(n))e++;else{if(s<=4&&!n.startsWith(t))return;e++}}})}}}t.activateListEditing=function(e){var t="editorTextFocus && !editorReadonly && !suggestWidgetVisible";i.addKeybinding(e,"onEnterKey",c,[r.KeyCode.Enter],"",t,null),i.addKeybinding(e,"onCtrlEnterKey",s,[r.KeyCode.Enter|r.KeyMod.CtrlCmd],"",t,null),i.addKeybinding(e,"onShiftEnterKey",a,[r.KeyCode.Enter|r.KeyMod.Shift],"",t,null),i.addKeybinding(e,"onTabKey",l,[r.KeyCode.Tab],"",t,null),i.addKeybinding(e,"onShiftTabKey",o,[r.KeyCode.Tab|r.KeyMod.Shift],"",t,null),i.addKeybinding(e,"onBackspaceKey",u,[r.KeyCode.Backspace],"",t,null)},t.fixMarker=w,t.deactivate=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.slugify=t.extractText=t.isInFencedCodeBlock=void 0;var r=n(1);function i(e){return e.replace(/\[([^\]]+?)\]\([^\)]+?\)/g,function(e,t){return t}).replace(/( )/g,function(e){return" "}).replace(/(<!--[^>]*?-->)/g,"").replace(/<span[^>]*>(.*?)<\/span>/g,function(e,t){return t}).replace(/ +/g," ")}t.isInFencedCodeBlock=function(e,t){return null!=(t=e.getText(new r.Range(new r.Position(0,0),new r.Position(t,0))).match(/^```[\w ]*$/gm))&&t.length%2!=0},t.extractText=i;var o=/[^0-9A-Z_a-z\- ª²-³µ¹-º¼-¾À-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ\u0300-ʹͶ-ͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ\u0483-ԣԱ-Ֆՙա-և\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7א-תװ-ײ\u0610-\u061aء-\u065e٠-٩ٮ-ۓە-\u06dc\u06de-\u06e8\u06ea-ۼۿܐ-\u074aݍ-ޱ߀-ߵߺ\u0901-ह\u093c-\u094dॐ-\u0954क़-\u0963०-९ॱ-ॲॻ-ॿ\u0981-\u0983অ-ঌএ-ঐও-নপ-রলশ-হ\u09bc-\u09c4\u09c7-\u09c8\u09cb-ৎ\u09d7ড়-ঢ়য়-\u09e3০-ৱ৴-৹\u0a01-\u0a03ਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹ\u0a3c\u0a3e-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51ਖ਼-ੜਫ਼੦-\u0a75\u0a81-\u0a83અ-ઍએ-ઑઓ-નપ-રલ-ળવ-હ\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acdૐૠ-\u0ae3૦-૯\u0b01-\u0b03ଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହ\u0b3c-\u0b44\u0b47-\u0b48\u0b4b-\u0b4d\u0b56-\u0b57ଡ଼-ଢ଼ୟ-\u0b63୦-୯ୱ\u0b82-ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹ\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcdௐ\u0bd7௦-௲\u0c01-\u0c03అ-ఌఎ-ఐఒ-నప-ళవ-హఽ-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56ౘ-ౙౠ-\u0c63౦-౯౸-౾\u0c82-\u0c83ಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5-\u0cd6ೞೠ-\u0ce3೦-೯\u0d02-\u0d03അ-ഌഎ-ഐഒ-നപ-ഹഽ-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57ൠ-\u0d63൦-൵ൺ-ൿ\u0d82-\u0d83අ-ඖක-නඳ-රලව-ෆ\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2-\u0df3ก-\u0e3aเ-\u0e4e๐-๙ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-\u0eb9\u0ebb-ຽເ-ໄໆ\u0ec8-\u0ecd໐-໙ໜ-ໝༀ\u0f18-\u0f19༠-༳\u0f35\u0f37\u0f39\u0f3e-ཇཉ-ཬ\u0f71-\u0f84\u0f86-ྋ\u0f90-\u0f97\u0f99-\u0fbc\u0fc6က-၉ၐ-႙Ⴀ-Ⴥა-ჺჼᄀ-ᅙᅟ-ᆢᆨ-ᇹሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ\u135f፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪ\u16ee-\u16f0ᜀ-ᜌᜎ-\u1714ᜠ-\u1734ᝀ-\u1753ᝠ-ᝬᝮ-ᝰ\u1772-\u1773ក-ឳ\u17b6-\u17d3ៗៜ-\u17dd០-៩៰-៹\u180b-\u180d᠐-᠙ᠠ-ᡷᢀ-ᢪᤀ-ᤜ\u1920-\u192b\u1930-\u193b᥆-ᥭᥰ-ᥴᦀ-ᦩ\u19b0-\u19c9᧐-᧙ᨀ-\u1a1b\u1b00-ᭋ᭐-᭙\u1b6b-\u1b73\u1b80-\u1baaᮮ-᮹ᰀ-\u1c37᱀-᱉ᱍ-ᱽᴀ-\u1de6\u1dfe-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿-⁀⁔⁰-ⁱ⁴-⁹ⁿ-₉ₐ-ₔ\u20d0-\u20f0ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ⅓-\u2188①-⒛⓪-⓿❶-➓Ⰰ-Ⱞⰰ-ⱞⱠ-Ɐⱱ-ⱽⲀ-ⳤ⳽ⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ\u2de0-\u2dffⸯ々-\u3007\u3021-\u302f〱-〵\u3038-〼ぁ-ゖ\u3099-\u309aゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎ㆒-㆕ㆠ-ㆷㇰ-ㇿ㈠-㈩㉑-㉟㊀-㊉㊱-㊿㐀-䶵一-鿃ꀀ-ꒌꔀ-ꘌꘐ-ꘫꙀ-ꙟꙢ-\ua672\ua67c-\ua67dꙿ-ꚗꜗ-ꜟꜢ-ꞈꞋ-ꞌꟻ-\ua827ꡀ-ꡳ\ua880-\ua8c4꣐-꣙꤀-\ua92dꤰ-\ua953ꨀ-\uaa36ꩀ-\uaa4d꩐-꩙가-힣豈-鶴侮-頻並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ\ufe00-\ufe0f\ufe20-\ufe26︳-︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]/gu;t.slugify=function(e){return i(e.trim()).replace(o,"").replace(/ /g,"-").replace(/[A-Z]/g,function(e){return e.toLowerCase()})}},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.all=t.begin_args=t._begin=t._c3=t._c2=t._c1=void 0;t._c1=Array.from(new Set(r(["lparen","rparen","lceil","rceil","uparrow","lbrack","rbrack","lfloor","rfloor","downarrow","updownarrow","langle","rangle","lgroup","rgroup","Uparrow","vert","ulcorner","urcorner","Downarrow","Vert","llcorner","lrcorner","Updownarrow","lvert","rvert","lVert","rVert","backslash","lang","rang","lt","gt"],["left","big","bigl","bigm","bigr","middle","Big","Bigl","Bigm","Bigr","right","bigg","biggl","biggm","biggr","Bigg","Biggl","Biggm","Biggr"],["Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega","varGamma","varDelta","varTheta","varLambda","varXi","varPi","varSigma","varUpsilon","varPhi","varPsi","varOmega","alpha","beta","gamma","delta","epsilon","zeta","eta","theta","iota","kappa","lambda","mu","nu","xi","omicron","pi","rho","sigma","tau","upsilon","phi","chi","psi","omega","varepsilon","varkappa","vartheta","thetasym","varpi","varrho","varsigma","varphi","digamma"],["imath","nabla","Im","Reals","jmath","partial","image","wp","aleph","Game","Bbbk","weierp","alef","Finv","N","Z","alefsym","cnums","natnums","beth","Complex","R","gimel","ell","Re","daleth","hbar","real","eth","hslash","reals"],["thinspace","medspace","thickspace","enspace","quad","qquad","negthinspace","negmedspace","nobreakspace","negthickspace"],["atop"],["forall","complement","therefore","emptyset","exists","subset","because","empty","exist","supset","mapsto","varnothing","nexists","mid","to","implies","in","land","gets","impliedby","isin","lor","leftrightarrow","iff","notin","ni","notni","neg","lnot"],["sum","prod","bigotimes","bigvee","int","coprod","bigoplus","bigwedge","iint","intop","bigodot","bigcap","iiint","smallint","biguplus","bigcup","oint","oiint","oiiint","bigsqcup"],["cdot","gtrdot","pmod","cdotp","intercal","pod","centerdot","land","rhd","circ","leftthreetimes","rightthreetimes","amalg","circledast","ldotp","rtimes","And","circledcirc","lor","setminus","ast","circleddash","lessdot","smallsetminus","barwedge","Cup","lhd","sqcap","bigcirc","cup","ltimes","sqcup","bmod","curlyvee","times","boxdot","curlywedge","mp","unlhd","boxminus","div","odot","unrhd","boxplus","divideontimes","ominus","uplus","boxtimes","dotplus","oplus","vee","bullet","doublebarwedge","otimes","veebar","Cap","doublecap","oslash","wedge","cap","doublecup","pm","plusmn","wr"],["choose"],["over","above"],["arcsin","cotg","ln","det","arccos","coth","log","gcd","arctan","csc","sec","inf","arctg","ctg","sin","lim","arcctg","cth","sinh","liminf","arg","deg","sh","limsup","ch","dim","tan","max","cos","exp","tanh","min","cosec","hom","tg","Pr","cosh","ker","th","sup","cot","lg","argmax","argmin","limits"],["eqcirc","lesseqgtr","sqsupset","eqcolon","lesseqqgtr","sqsupseteq","Eqcolon","lessgtr","Subset","eqqcolon","lesssim","subset","approx","Eqqcolon","ll","subseteq","sube","approxeq","eqsim","lll","subseteqq","asymp","eqslantgtr","llless","succ","backepsilon","eqslantless","lt","succapprox","backsim","equiv","mid","succcurlyeq","backsimeq","fallingdotseq","models","succeq","between","frown","multimap","succsim","bowtie","ge","owns","Supset","bumpeq","geq","parallel","supset","Bumpeq","geqq","perp","supseteq","circeq","geqslant","pitchfork","supseteqq","colonapprox","gg","prec","thickapprox","Colonapprox","ggg","precapprox","thicksim","coloneq","gggtr","preccurlyeq","trianglelefteq","Coloneq","gt","preceq","triangleq","coloneqq","gtrapprox","precsim","trianglerighteq","Coloneqq","gtreqless","propto","varpropto","colonsim","gtreqqless","risingdotseq","vartriangle","Colonsim","gtrless","shortmid","vartriangleleft","cong","gtrsim","shortparallel","vartriangleright","curlyeqprec","in","sim","vcentcolon","curlyeqsucc","Join","simeq","vdash","dashv","le","smallfrown","vDash","dblcolon","leq","smallsmile","Vdash","doteq","leqq","smile","Vvdash","Doteq","leqslant","sqsubset","doteqdot","lessapprox","sqsubseteq"],["gnapprox","ngeqslant","nsubseteq","precneqq","gneq","ngtr","nsubseteqq","precnsim","gneqq","nleq","nsucc","subsetneq","gnsim","nleqq","nsucceq","subsetneqq","gvertneqq","nleqslant","nsupseteq","succnapprox","lnapprox","nless","nsupseteqq","succneqq","lneq","nmid","ntriangleleft","succnsim","lneqq","notin","ntrianglelefteq","supsetneq","lnsim","notni","ntriangleright","supsetneqq","lvertneqq","nparallel","ntrianglerighteq","varsubsetneq","ncong","nprec","nvdash","varsubsetneqq","ne","npreceq","nvDash","varsupsetneq","neq","nshortmid","nVDash","varsupsetneqq","ngeq","nshortparallel","nVdash","ngeqq","nsim","precnapprox"],["circlearrowleft","leftharpoonup","rArr","circlearrowright","leftleftarrows","rarr","curvearrowleft","leftrightarrow","restriction","curvearrowright","Leftrightarrow","rightarrow","Darr","leftrightarrows","Rightarrow","dArr","leftrightharpoons","rightarrowtail","darr","leftrightsquigarrow","rightharpoondown","dashleftarrow","Lleftarrow","rightharpoonup","dashrightarrow","longleftarrow","rightleftarrows","downarrow","Longleftarrow","rightleftharpoons","Downarrow","longleftrightarrow","rightrightarrows","downdownarrows","Longleftrightarrow","rightsquigarrow","downharpoonleft","longmapsto","Rrightarrow","downharpoonright","longrightarrow","Rsh","gets","Longrightarrow","searrow","Harr","looparrowleft","swarrow","hArr","looparrowright","to","harr","Lrarr","twoheadleftarrow","hookleftarrow","lrArr","twoheadrightarrow","hookrightarrow","lrarr","Uarr","iff","Lsh","uArr","impliedby","mapsto","uarr","implies","nearrow","uparrow","Larr","nleftarrow","Uparrow","lArr","nLeftarrow","updownarrow","larr","nleftrightarrow","Updownarrow","leadsto","nLeftrightarrow","upharpoonleft","leftarrow","nrightarrow","upharpoonright","Leftarrow","nRightarrow","upuparrows","leftarrowtail","nwarrow","leftharpoondown","Rarr"],["rm","bf","it","sf","tt"],["Huge","huge","LARGE","Large","large","normalsize","small","footnotesize","scriptsize","tiny"],["displaystyle","textstyle","scriptstyle","scriptscriptstyle","limits","nolimits","verb"],["cdots","LaTeX","ddots","TeX","ldots","nabla","vdots","infty","dotsb","infin","dotsc","checkmark","dotsi","dag","dotsm","dagger","dotso","sdot","ddag","mathellipsis","ddagger","Box","Dagger","lq","square","angle","blacksquare","measuredangle","rq","triangle","sphericalangle","triangledown","top","triangleleft","bot","triangleright","colon","bigtriangledown","backprime","bigtriangleup","pounds","prime","blacktriangle","mathsterling","blacktriangledown","blacktriangleleft","yen","blacktriangleright","surd","diamond","degree","Diamond","lozenge","mho","blacklozenge","diagdown","star","diagup","bigstar","flat","clubsuit","natural","copyright","clubs","sharp","circledR","diamondsuit","heartsuit","diamonds","hearts","circledS","spadesuit","spades","maltese"]))),t._c2=Array.from(new Set(r(["tilde","mathring","widetilde","overgroup","utilde","undergroup","acute","vec","Overrightarrow","bar","overleftarrow","overrightarrow","breve","underleftarrow","underrightarrow","check","overleftharpoon","overrightharpoon","dot","overleftrightarrow","overbrace","ddot","underleftrightarrow","underbrace","grave","overline","overlinesegment","hat","underline","underlinesegment","widehat","widecheck"],["cancel","overbrace","bcancel","underbrace","xcancel","not =","sout","boxed","tag","tag*"],["mathllap","mathrlap","mathclap","llap","rlap","clap","smash"],["kern","mkern","mskip","hskip","hspace","hspace*","phantom","hphantom","vphantom"],["operatorname"],["sqrt"],["xleftarrow","xrightarrow","xLeftarrow","xRightarrow","xleftrightarrow","xLeftrightarrow","xhookleftarrow","xhookrightarrow","xtwoheadleftarrow","xtwoheadrightarrow","xleftharpoonup","xrightharpoonup","xleftharpoondown","xrightharpoondown","xleftrightharpoons","xrightleftharpoons","xtofrom","xmapsto","xlongequal"],["mathrm","mathbf","mathit","mathnormal","textbf","textit","textrm","bold","Bbb","textnormal","boldsymbol","mathbb","text","bm","frak","mathsf","mathtt","mathfrak","textsf","texttt","mathcal","mathscr"],["mathbin","mathclose","mathinner","mathop","mathopen","mathord","mathpunct","mathrel"]))),t._c3=Array.from(new Set(r(["stackrel","overset","underset","raisebox"],["binom","dbinom","tbinom","brace","brack"],["frac","dfrac","tfrac","cfrac","genfrac"],["color","textcolor","colorbox"]))),t._begin=["begin","end"],t.begin_args=["aligned","alignedat","array","bmatrix","Bmatrix","cases","darray","dcases","gathered","matrix","pmatrix","vmatrix","Vmatrix"],t.all=r(t._c1,t._c2,t._c3,t._begin).map(function(e){return"\\"+e})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoMarkdownExtension=void 0;var r=n(4),i=n(2),o=n(5),a=n(12),s=n(14),c=n(15),n=(l.prototype.activate=function(e){e=new i.TextEditor(e);r.activateFormatting(e),o.activateListEditing(e),a.activateCompletion(e),s.activateTableFormatter(e),i.setWordDefinitionFor(e.languageId,/(-?\d*\.\d\w*)|([^\!\@\#\%\^\&\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s\,\。\《\》\?\;\:\‘\“\’\”\(\)\【\】\、]+)/g)},l);function l(){}t.MonacoMarkdownExtension=n,c.activateMarkdownMath()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorMessage=t.disposed=t.readonly=t.illegalState=t.illegalArgument=t.canceled=t.isPromiseCanceledError=t.transformErrorForSerialization=t.onUnexpectedExternalError=t.onUnexpectedError=t.setUnexpectedErrorHandler=t.errorHandler=t.ErrorHandler=void 0;var r=(i.prototype.addListener=function(e){var t=this;return this.listeners.push(e),function(){t._removeListener(e)}},i.prototype.emit=function(t){this.listeners.forEach(function(e){e(t)})},i.prototype._removeListener=function(e){this.listeners.splice(this.listeners.indexOf(e),1)},i.prototype.setUnexpectedErrorHandler=function(e){this.unexpectedErrorHandler=e},i.prototype.getUnexpectedErrorHandler=function(){return this.unexpectedErrorHandler},i.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},i.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},i);function i(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}t.ErrorHandler=r,t.errorHandler=new r,t.setUnexpectedErrorHandler=function(e){t.errorHandler.setUnexpectedErrorHandler(e)},t.onUnexpectedError=function(e){a(e)||t.errorHandler.onUnexpectedError(e)},t.onUnexpectedExternalError=function(e){a(e)||t.errorHandler.onUnexpectedExternalError(e)},t.transformErrorForSerialization=function(e){return e instanceof Error?{$isError:!0,name:e.name,message:e.message,stack:e.stacktrace||e.stack}:e};var o="Canceled";function a(e){return e instanceof Error&&e.name===o&&e.message===o}t.isPromiseCanceledError=a,t.canceled=function(){var e=new Error(o);return e.name=e.message,e},t.illegalArgument=function(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")},t.illegalState=function(e){return e?new Error("Illegal state: "+e):new Error("Illegal state")},t.readonly=function(e){return e?new Error("readonly property '"+e+" cannot be changed'"):new Error("readonly property cannot be changed")},t.disposed=function(e){return(e=new Error(e+" has been disposed")).name="DISPOSED",e},t.getErrorMessage=function(e){return e?e.message||(e.stack?e.stack.split("\n")[0]:String(e)):"Error"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regExpLeadsToEndlessLoop=void 0,t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}},function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.getWordAtText=o.ensureValidWordDefinition=o.DEFAULT_WORD_REGEXP=o.USUAL_WORD_SEPARATORS=void 0,o.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",o.DEFAULT_WORD_REGEXP=function(e){void 0===e&&(e="");for(var t="(-?\\d*\\.\\d\\w*)|([^",n=0,r=o.USUAL_WORD_SEPARATORS;n<r.length;n++){var i=r[n];0<=e.indexOf(i)||(t+="\\"+i)}return t+="\\s]+)",new RegExp(t,"g")}(),o.ensureValidWordDefinition=function(e){var t,n=o.DEFAULT_WORD_REGEXP;return(n=e&&e instanceof RegExp?e.global?e:(t="g",e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),new RegExp(e.source,t)):n).lastIndex=0,n},o.getWordAtText=function(e,t,n,r){t.lastIndex=0;var i=t.exec(n);return i?(r=(0<=i[0].indexOf(" ")?function(e,t,n,r){var i,o=e-1-r;for(t.lastIndex=0;i=t.exec(n);){var a=i.index||0;if(o<a)return null;if(t.lastIndex>=o)return{word:i[0],startColumn:r+1+a,endColumn:r+1+t.lastIndex}}return null}:function(e,t,n,r){var i,o=e-1-r,e=n.lastIndexOf(" ",o-1)+1;for(t.lastIndex=e;i=t.exec(n);){var a=i.index||0;if(a<=o&&t.lastIndex>=o)return{word:i[0],startColumn:r+1+a,endColumn:r+1+t.lastIndex}}return null})(e,t,n,r),t.lastIndex=0,r):null}},function(e,t,n){"use strict";var i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.activateCompletion=void 0;var f=n(3),h=n(0),m=n(2),b=n(1),v=n(6),w=n(13),o=n(7),r=!1;function y(e){return{suggestions:e.map(function(e,t){return Object.assign({},e)})}}function x(e,t){return{label:e,kind:t,additionalTextEdits:void 0,command:void 0,commitCharacters:void 0,detail:void 0,documentation:void 0,filterText:void 0,insertTextRules:void 0,preselect:!1,range:void 0,sortText:void 0,insertText:void 0}}t.activateCompletion=function(e){var t;r||(t=new a,h.languages.registerCompletionItemProvider(e.languageId,t),r=!0)};var a=(s.prototype.provideCompletionItems=function(e,t,n,r){var i,a=new m.TextDocument(e),o=f.Position.to(t),s=a.lineAt(o.line).text.substring(0,o.character),c=a.lineAt(o.line).text.substring(o.character);if(null!==s.match(/\\[^$]*$/)){if(/(^|[^\$])\$(|[^ \$].*)\\\w*$/.test(s)&&c.includes("$"))return y(this.mathCompletions);e=a.getText(new b.Range(new b.Position(0,0),o)),t=a.getText().substr(a.offsetAt(o));return null!==(i=e.match(/\$\$/g))&&i.length%2!=0&&t.includes("$$")?y(this.mathCompletions):y([])}if(/\[[^\]]*?\]\[[^\]]*$/.test(s)){var l=s.lastIndexOf("["),u=new b.Range(o.with({character:l+1}),o);return new Promise(function(e,t){var n=a.getText().split(/\r?\n/),o=n.reduce(function(e,t){for(var n=/\[[^\]]+\]\[([^\]]*?)\]/g;null!==(r=n.exec(t));){var r=r[1];e.has(r)||e.set(r,0),e.set(r,e.get(r)+1)}return e},new Map);e(y(n.reduce(function(e,t){var n,r,i;return null!==(n=/^\[([^\]]*?)\]: (\S*)( .*)?/.exec(t))&&(i=x(r=n[1],h.languages.CompletionItemKind.Reference),t=o.get(r)||0,i.insertText=r,i.documentation={value:n[2]},i.detail=1===t?"1 usage":t+" usages",i.sortText=0===t?"0-"+r:i.sortText="1-"+r,i.range=f.Range.from(u),e.push(i)),e},[])))})}if(/\[[^\]]*\]\(#[^\)]*$/.test(s)){var l=s.lastIndexOf("("),s=o,d=!1;if(/^([^\) ]+\s*|^\s*)\)/.test(c))s=o.with({character:+s.character+c.indexOf(")")});else{for(var p=0;p<c.length&&-1!=" \t\n\r\v".indexOf(c.charAt(p));)p++;s=o.with({character:+s.character+p}),d=!0}var g=new b.Range(o.with({character:l+1}),s);return new Promise(function(e,t){e(y(w.buildToc(a).reduce(function(e,t){var n=x("#"+v.slugify(t.text),h.languages.CompletionItemKind.Reference),r=("string"==typeof n.label?n:n.label).label;return n.insertText=d?r+")":r,n.documentation=t.text,n.range=f.Range.from(g),e.push(n),e},[])))})}return y([])},s);function s(){this.triggerCharacters=["(","\\","/","[","#"];var e=o._c1.map(function(e){var t=x("\\"+e,h.languages.CompletionItemKind.Function);return t.insertText=e,t}),t=o._c2.map(function(e){var t=x("\\"+e,h.languages.CompletionItemKind.Function);return t.insertText=new b.SnippetString(e+"{$1}").value,t.insertTextRules=h.languages.CompletionItemInsertTextRule.InsertAsSnippet,t}),n=o._c3.map(function(e){var t=x("\\"+e,h.languages.CompletionItemKind.Function);return t.insertText=new b.SnippetString(e+"{$1}{$2}").value,t.insertTextRules=h.languages.CompletionItemInsertTextRule.InsertAsSnippet,t}),r=x("\\begin",h.languages.CompletionItemKind.Snippet);r.insertText=new b.SnippetString("begin{${1|aligned,alignedat,array,bmatrix,Bmatrix,cases,darray,dcases,gathered,matrix,pmatrix,vmatrix,Vmatrix|}}\n\t$2\n\\end{$1}").value,r.insertTextRules=h.languages.CompletionItemInsertTextRule.InsertAsSnippet,this.mathCompletions=i(e,t,n,[r]),this.mathCompletions.forEach(function(e){e.sortText=("string"==typeof e.label?e:e.label).label.replace(/[a-zA-Z]/g,function(e){return/[a-z]/.test(e)?"0"+e:"1"+e.toLowerCase()})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildToc=void 0,t.buildToc=function(e){return(e=e.getText().replace(/^```[\W\w]+?^```/gm,"").replace(/<!-- omit in (toc|TOC) -->/g,"< omit in toc >").replace(/<!--[\W\w]+?-->/,"").replace(/^---[\W\w]+?(\r?\n)---/,"").split(/\r?\n/g)).forEach(function(e,t,n){t<n.length-1&&e.match(/^ {0,3}\S.*$/)&&n[t+1].match(/^ {0,3}(=+|-{2,}) *$/)&&(n[t]=(n[t+1].includes("=")?"# ":"## ")+e)}),e.filter(function(e){return e.startsWith("#")&&e.includes("# ")&&!e.includes("< omit in toc >")}).map(function(e){e=/^(#+) (.*)/.exec(e);return{level:e[1].length,text:e[2].replace(/#+$/,"").trim()}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deactivate=t.activateTableFormatter=void 0;var r=n(0),a=n(2),p=n(1),s=n(3);t.activateTableFormatter=function(e){r.languages.registerDocumentFormattingEditProvider(e.languageId,new i)},t.deactivate=function(){};var i=(o.prototype.provideDocumentFormattingEdits=function(e,t,n){var r=this,i=[],o=new a.TextDocument(e),e=this.detectTables(o.getText());return null!==e?(e.forEach(function(e){i.push({range:s.Range.from(r.getRange(o,e)),text:r.formatTable(e,o,t)})}),i):[]},o.prototype.detectTables=function(e){var t="\\r?\\n",n="\\|?.*\\|.*\\|?",n=new RegExp(n+t+"[ \\t]*\\|?( *:?-+:? *\\|)+( *:?-+:? *\\|?)[ \\t]*(?:"+t+n+")*","g");return e.match(n)},o.prototype.getRange=function(e,t){var n=e.getText(),r=e.positionAt(n.indexOf(t)),t=e.positionAt(n.indexOf(t)+t.length);return new p.Range(r,t)},o.prototype.getTableIndentation=function(e,t){var n=new RegExp(/^(\s*)\S/u),n=e.match(n)[1].length,n=Math.round(n/t.tabSize);return" ".repeat(t.tabSize*n)},o.prototype.formatTable=function(e,t,n){for(var r=this,i=this.getTableIndentation(e,n),o=[],a=new RegExp(/^\s*(\S.*)$/gmu),s=null;null!==(s=a.exec(e));)o.push(s[1].trim());var c=[],l=[],u=new RegExp(/(?:((?:\\\||`.*?`|[^\|])*)\|)/gu),d=/[\u3000-\u9fff\uff01-\uff60]/g,n=o.map(function(e,t){(e=e.startsWith("|")?e.slice(1):e).endsWith("|")||(e+="|");for(var n=null,r=[],i=0;null!==(n=u.exec(e));){var o=n[1].trim();r.push(o),1!=t&&(o=d.test(o)?o.length+o.match(d).length:o.length,c[i]=c[i]>o?c[i]:o),i++}return r});return n[1]=n[1].map(function(e,t){return/:-+:/.test(e)?(c[t]=Math.max(c[t],5),l[t]="c",":"+"-".repeat(c[t]-2)+":"):/:-+/.test(e)?(c[t]=Math.max(c[t],4),l[t]="l",":"+"-".repeat(c[t]-1)):/-+:/.test(e)?(c[t]=Math.max(c[t],4),l[t]="r","-".repeat(c[t]-1)+":"):/-+/.test(e)?(c[t]=Math.max(c[t],3),l[t]="l","-".repeat(c[t])):void(l[t]="l")}),n.map(function(e){e=e.map(function(e,t){var n=c[t];return d.test(e)&&(n-=e.match(d).length),r.alignText(e,l[t],n)});return i+"| "+e.join(" | ")+" |"}).join(t.eol===p.EndOfLine.LF?"\n":"\r\n")},o.prototype.alignText=function(e,t,n){return"c"===t&&n>e.length?(" ".repeat(Math.floor((n-e.length)/2))+e+" ".repeat(n)).slice(0,n):"r"===t?(" ".repeat(n)+e).slice(-n):(e+" ".repeat(n)).slice(0,n)},o);function o(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.activateMarkdownMath=void 0;var r=n(16),i=n(17);t.activateMarkdownMath=function(){r.registerLanguage({id:"markdown-math",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:function(){return Promise.resolve({conf:i.conf,language:i.language})}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerLanguage=t.loadLanguage=void 0;var r=n(0),i={};var o={};function a(e){var t;return o[e]||(o[e]=(0,i[t=e].loader)().then(function(e){r.languages.setMonarchTokensProvider(t,e.language),r.languages.setLanguageConfiguration(t,e.conf)})),o[e]}t.loadLanguage=a,t.registerLanguage=function(e){var t=e.id;i[t]=e,r.languages.register(e),r.languages.onLanguage(t,function(){a(t)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.language=t.conf=void 0;n=n(7);t.conf={comments:{blockComment:["\x3c!--","--\x3e"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*\x3c!--\\s*#?region\\b.*--\x3e"),end:new RegExp("^\\s*\x3c!--\\s*#?endregion\\b.*--\x3e")}}},t.language={defaultToken:"",tokenPostfix:".md",control:/[\\`*_\[\]{}()#+\-\.!]/,noncontrol:/[^\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,jsescapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],latexKeywords:n.all,latexBeginKeywords:n.begin_args,tokenizer:{root:[[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/,["white","keyword","keyword","keyword"]],[/^\s*(=+|\-+)\s*$/,"keyword"],[/^\s*((\*[ ]?)+)\s*$/,"meta.separator"],[/^\s*>+/,"comment"],[/^\s*([\*\-+:]|\d+\.)\s/,"keyword"],[/^(\t|[ ]{4})[^ ].*$/,"string"],[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/,{token:"string",next:"@codeblock"}],[/^\s*```\s*((?:\w|[\/\-#])+).*$/,{token:"string",next:"@codeblockgh",nextEmbedded:"$1"}],[/^\s*```\s*$/,{token:"string",next:"@codeblock"}],[/(^\${2})/,{token:"comment.math",next:"math",bracket:"@open"}],{include:"@linecontent"}],codeblock:[[/^\s*~~~\s*$/,{token:"string",next:"@pop"}],[/^\s*```\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblockgh:[[/```\s*$/,{token:"variable.source",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,"variable.source"]],linecontent:[[/&\w+;/,"string.escape"],[/@escapes/,"escape"],[/\b__([^\\_]|@escapes|_(?!_))+__\b/,"strong"],[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/,"strong"],[/\b_[^_]+_\b/,"emphasis"],[/\*([^\\*]|@escapes)+\*/,"emphasis"],[/`([^\\`]|@escapes)+`/,"variable"],[/\{+[^}]+\}+/,"string.target"],[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/,["string.link","","string.link"]],[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/,"string.link"],[/(\$\$)([^$]*)(\$\$)/,[{token:"comment.math",bracket:"@open"},{token:"@rematch",next:"mathInline",goBack:2},{token:"comment.math",bracket:"@close"}]],[/(\$)([^$]+)(\$)/,[{token:"comment.math",bracket:"@open"},{token:"@rematch",next:"mathInline",goBack:1},{token:"comment.math",bracket:"@close"}]],{include:"html"}],html:[[/<(\w+)\/>/,"tag"],[/<(\w+)/,{cases:{"@empty":{token:"tag",next:"@tag.$1"},"@default":{token:"tag",next:"@tag.$1"}}}],[/<\/(\w+)\s*>/,{token:"tag"}],[/<!--/,"comment","@comment"]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,"comment","@pop"],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]],tag:[[/[ \t\r\n]+/,"white"],[/(type)(\s*=\s*)(")([^"]+)(")/,["attribute.name.html","delimiter.html","string.html",{token:"string.html",switchTo:"@tag.$S2.$4"},"string.html"]],[/(type)(\s*=\s*)(')([^']+)(')/,["attribute.name.html","delimiter.html","string.html",{token:"string.html",switchTo:"@tag.$S2.$4"},"string.html"]],[/(\w+)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name.html","delimiter.html","string.html"]],[/\w+/,"attribute.name.html"],[/\/>/,"tag","@pop"],[/>/,{cases:{"$S2==style":{token:"tag",switchTo:"embeddedStyle",nextEmbedded:"text/css"},"$S2==script":{cases:{$S3:{token:"tag",switchTo:"embeddedScript",nextEmbedded:"$S3"},"@default":{token:"tag",switchTo:"embeddedScript",nextEmbedded:"text/javascript"}}},"@default":{token:"tag",next:"@pop"}}}]],embeddedStyle:[[/[^<]+/,""],[/<\/style\s*>/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/</,""]],embeddedScript:[[/[^<]+/,""],[/<\/script\s*>/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/</,""]],math:[[/(\${2})/,{token:"comment.math",next:"@pop",bracket:"@close"}],{include:"latex"}],mathInline:[[/\${1,2}/,{token:"comment.math",next:"@pop",bracket:"@close"}],{include:"latex"}],latex:[[/(\\begin)({)/,["keyword",{token:"",next:"latexBeginArg"}]],[/(\\end)({)/,["keyword",{token:"",next:"latexBeginArg"}]],[/\\\w+/,{cases:{"@latexKeywords":"keyword","@default":""}}]],latexBeginArg:[[/\w+/,{cases:{"@latexBeginKeywords":"keyword","@default":""}}],[/}/,{token:"",next:"@pop",bracket:"@close"}]]}}}],o={},i.m=r,i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=8);function i(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var r,o});
|