1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-cc5bb082"],{"0f7c":function(t,e,r){},"10be":function(t,e,r){"use strict";var n=r("dbd4");r.n(n).a},3793:function(t,e,r){"use strict";r.r(e);var n=r("a34a"),a=r.n(n),i=r("8593"),o=r("56b3"),s=r.n(o);function c(t,e,r,n,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,a)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function o(t){c(i,n,a,o,s,"next",t)}function s(t){c(i,n,a,o,s,"throw",t)}o(void 0)}))}}r("0f7c"),r("f9d4");var l={name:"opendir",data:function(){return{code:"",modals:!1,spinShow:!1,loading:!1,tabList:[],columns4:[{title:"文件/文件夹名",slot:"filename",minWidth:150,back:"返回上级"},{title:"文件/文件夹路径",key:"real_path",minWidth:150},{title:"文件/文件夹大小",key:"size",minWidth:100},{title:"是否可写",slot:"isWritable",minWidth:100},{title:"更新时间",key:"mtime",minWidth:150},{title:"Action",slot:"action",minWidth:150}],formItem:{dir:"",superior:0,filedir:""},rows:{},pathname:"",title:""}},mounted:function(){this.editor=s.a.fromTextArea(this.$refs.mycode,{value:"http://www.baidu.com",mode:"text/javascript",theme:"ambiance",indentUnit:4,smartIndent:!0,tabSize:4,readOnly:!1,showCursorWhenSelecting:!0,lineNumbers:!0})},created:function(){this.getList()},methods:{currentChange:function(t){t.isDir?this.open(t):this.edit(t)},getList:function(){var t=this;this.loading=!0,Object(i.K)(this.formItem).then(function(){var e=u(a.a.mark((function e(r){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.tabList=n.list,t.dir=n.dir,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},goBack:function(){this.formItem={dir:this.dir,superior:1,filedir:""},this.getList()},open:function(t){this.rows=t,this.formItem={dir:t.path,superior:0,filedir:t.filename},this.getList()},edit:function(t){var e=this;this.modals=!0,this.spinShow=!0,this.pathname=t.pathname,this.title=t.filename,Object(i.L)(t.pathname).then(function(){var t=u(a.a.mark((function t(r){var n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=r.data,e.code=n.content,e.editor.setValue(e.code),e.spinShow=!1;case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.spinShow=!1,e.$Message.error(t.msg)}))},savefile:function(){var t=this,e={comment:this.editor.getValue(),filepath:this.pathname};Object(i.R)(e).then(function(){var e=u(a.a.mark((function e(r){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$Message.success(r.msg),t.modals=!1;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))},undofile:function(){this.editor.undo()},redofile:function(){this.editor.redo()},refreshfile:function(){this.editor.refresh()}}},f=(r("10be"),r("2877")),d=Object(f.a)(l,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"i-layout-page-header"},[r("PageHeader",{staticClass:"product_tabs",attrs:{title:"文件管理","hidden-breadcrumb":""}})],1),r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("div",{staticClass:"backs",on:{click:t.goBack}},[r("Icon",{staticClass:"mr5",attrs:{type:"ios-folder-outline"}}),r("span",[t._v("返回上级")])],1),r("Table",{ref:"selection",staticClass:"mt20",attrs:{columns:t.columns4,data:t.tabList,loading:t.loading,"no-data-text":"暂无数据","highlight-row":"","no-filtered-data-text":"暂无筛选结果"},on:{"on-current-change":t.currentChange},scopedSlots:t._u([{key:"filename",fn:function(e){var n=e.row;return[n.isDir?r("Icon",{staticClass:"mr5",attrs:{type:"ios-folder-outline"}}):r("Icon",{staticClass:"mr5",attrs:{type:"ios-document-outline"}}),r("span",[t._v(t._s(n.filename))])]}},{key:"isWritable",fn:function(e){var n=e.row;return[r("span",{domProps:{textContent:t._s(n.isWritable?"是":"否")}})]}},{key:"action",fn:function(e){var n=e.row;return e.index,[n.isDir?r("a",{on:{click:function(e){return t.open(n)}}},[t._v("打开")]):r("a",{on:{click:function(e){return t.edit(n)}}},[t._v("编辑")])]}}])})],1),r("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:t.title,"mask-closable":!1,width:"900"},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[r("Button",{staticClass:"mr5 mb15",attrs:{type:"primary",id:"savefile"},on:{click:t.savefile}},[t._v("保存")]),r("Button",{staticClass:"mr5 mb15",attrs:{id:"undo"},on:{click:t.undofile}},[t._v("撤销")]),r("textarea",{directives:[{name:"model",rawName:"v-model",value:t.code,expression:"code"}],ref:"mycode",staticClass:"codesql public_text",domProps:{value:t.code},on:{input:function(e){e.target.composing||(t.code=e.target.value)}}}),t.spinShow?r("Spin",{attrs:{size:"large",fix:""}}):t._e()],1)],1)}),[],!1,null,"2fb5e427",null);e.default=d.exports},dbd4:function(t,e,r){},f9d4:function(t,e,r){!function(t){"use strict";t.defineMode("javascript",(function(e,r){var n,a,i=e.indentUnit,o=r.statementIndent,s=r.jsonld,c=r.json||s,u=r.typescript,l=r.wordCharacters||/[\w$\xa1-\uffff]/,f=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),r=t("keyword b"),n=t("keyword c"),a=t("keyword d"),i=t("operator"),o={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:t("new"),delete:n,void:n,throw:n,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:n,export:t("export"),import:t("import"),extends:n,await:n}}(),d=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(t,e,r){return n=t,a=r,e}function v(t,e){var r,n=t.next();if('"'==n||"'"==n)return e.tokenize=(r=n,function(t,e){var n,a=!1;if(s&&"@"==t.peek()&&t.match(m))return e.tokenize=v,p("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=r||a);)a=!a&&"\\"==n;return a||(e.tokenize=v),p("string","string")}),e.tokenize(t,e);if("."==n&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return p("number","number");if("."==n&&t.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return p(n);if("="==n&&t.eat(">"))return p("=>","operator");if("0"==n&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return p("number","number");if(/\d/.test(n))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),p("number","number");if("/"==n)return t.eat("*")?(e.tokenize=k,k(t,e)):t.eat("/")?(t.skipToEnd(),p("comment","comment")):Rt(t,e,1)?(function(t){for(var e,r=!1,n=!1;null!=(e=t.next());){if(!r){if("/"==e&&!n)return;"["==e?n=!0:n&&"]"==e&&(n=!1)}r=!r&&"\\"==e}}(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),p("regexp","string-2")):(t.eat("="),p("operator","operator",t.current()));if("`"==n)return e.tokenize=h,h(t,e);if("#"==n)return t.skipToEnd(),p("error","error");if("<"==n&&t.match("!--")||"-"==n&&t.match("->"))return t.skipToEnd(),p("comment","comment");if(d.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=n&&"="!=n||t.eat("="):/[<>*+\-]/.test(n)&&(t.eat(n),">"==n&&t.eat(n))),p("operator","operator",t.current());if(l.test(n)){t.eatWhile(l);var a=t.current();if("."!=e.lastType){if(f.propertyIsEnumerable(a)){var i=f[a];return p(i.type,i.style,a)}if("async"==a&&t.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return p("async","keyword",a)}return p("variable","variable",a)}}function k(t,e){for(var r,n=!1;r=t.next();){if("/"==r&&n){e.tokenize=v;break}n="*"==r}return p("comment","comment")}function h(t,e){for(var r,n=!1;null!=(r=t.next());){if(!n&&("`"==r||"$"==r&&t.eat("{"))){e.tokenize=v;break}n=!n&&"\\"==r}return p("quasi","string-2",t.current())}var y="([{}])";function b(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var r=t.string.indexOf("=>",t.start);if(!(r<0)){if(u){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var s=t.string.charAt(o),c=y.indexOf(s);if(c>=0&&c<3){if(!a){++o;break}if(0==--a){"("==s&&(i=!0);break}}else if(c>=3&&c<6)++a;else if(l.test(s))i=!0;else if(/["'\/`]/.test(s))for(;;--o){if(0==o)return;var f=t.string.charAt(o-1);if(f==s&&"\\"!=t.string.charAt(o-2)){o--;break}}else if(i&&!a){++o;break}}i&&!a&&(e.fatArrowAt=o)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function g(t,e,r,n,a,i){this.indented=t,this.column=e,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function x(t,e){for(var r=t.localVars;r;r=r.next)if(r.name==e)return!0;for(var n=t.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==e)return!0}var j={state:null,column:null,marked:null,cc:null};function M(){for(var t=arguments.length-1;t>=0;t--)j.cc.push(arguments[t])}function C(){return M.apply(null,arguments),!0}function I(t,e){for(var r=e;r;r=r.next)if(r.name==t)return!0;return!1}function _(t){var e=j.state;if(j.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var n=function t(e,r){if(r){if(r.block){var n=t(e,r.prev);return n?n==r.prev?r:new V(n,r.vars,!0):null}return I(e,r.vars)?r:new V(r.prev,new E(e,r.vars),!1)}return null}(t,e.context);if(null!=n)return void(e.context=n)}else if(!I(t,e.localVars))return void(e.localVars=new E(t,e.localVars));r.globalVars&&!I(t,e.globalVars)&&(e.globalVars=new E(t,e.globalVars))}function A(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function V(t,e,r){this.prev=t,this.vars=e,this.block=r}function E(t,e){this.name=t,this.next=e}var z=new E("this",new E("arguments",null));function T(){j.state.context=new V(j.state.context,j.state.localVars,!1),j.state.localVars=z}function $(){j.state.context=new V(j.state.context,j.state.localVars,!0),j.state.localVars=null}function S(){j.state.localVars=j.state.context.vars,j.state.context=j.state.context.prev}function O(t,e){var r=function(){var r=j.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new g(n,j.stream.column(),t,null,r.lexical,e)};return r.lex=!0,r}function W(){var t=j.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function P(t){return function e(r){return r==t?C():";"==t||"}"==r||")"==r||"]"==r?M():C(e)}}function L(t,e){return"var"==t?C(O("vardef",e),bt,P(";"),W):"keyword a"==t?C(O("form"),D,L,W):"keyword b"==t?C(O("form"),L,W):"keyword d"==t?j.stream.match(/^\s*$/,!1)?C():C(O("stat"),H,P(";"),W):"debugger"==t?C(P(";")):"{"==t?C(O("}"),$,ot,W,S):";"==t?C():"if"==t?("else"==j.state.lexical.info&&j.state.cc[j.state.cc.length-1]==W&&j.state.cc.pop()(),C(O("form"),D,L,W,Ct)):"function"==t?C(Vt):"for"==t?C(O("form"),It,L,W):"class"==t||u&&"interface"==e?(j.marked="keyword",C(O("form","class"==t?t:e),St,W)):"variable"==t?u&&"declare"==e?(j.marked="keyword",C(L)):u&&("module"==e||"enum"==e||"type"==e)&&j.stream.match(/^\s*\w/,!1)?(j.marked="keyword","enum"==e?C(Ft):"type"==e?C(zt,P("operator"),ft,P(";")):C(O("form"),wt,P("{"),O("}"),ot,W,W)):u&&"namespace"==e?(j.marked="keyword",C(O("form"),B,L,W)):u&&"abstract"==e?(j.marked="keyword",C(L)):C(O("stat"),Z):"switch"==t?C(O("form"),D,P("{"),O("}","switch"),$,ot,W,W,S):"case"==t?C(B,P(":")):"default"==t?C(P(":")):"catch"==t?C(O("form"),T,q,L,W,S):"export"==t?C(O("stat"),Lt,W):"import"==t?C(O("stat"),Bt,W):"async"==t?C(L):"@"==e?C(B,L):M(O("stat"),B,P(";"),W)}function q(t){if("("==t)return C(Tt,P(")"))}function B(t,e){return U(t,e,!1)}function N(t,e){return U(t,e,!0)}function D(t){return"("!=t?M():C(O(")"),B,P(")"),W)}function U(t,e,r){if(j.state.fatArrowAt==j.stream.start){var n=r?Q:G;if("("==t)return C(T,O(")"),at(Tt,")"),W,P("=>"),n,S);if("variable"==t)return M(T,wt,P("=>"),n,S)}var a=r?F:J;return w.hasOwnProperty(t)?C(a):"function"==t?C(Vt,a):"class"==t||u&&"interface"==e?(j.marked="keyword",C(O("form"),$t,W)):"keyword c"==t||"async"==t?C(r?N:B):"("==t?C(O(")"),H,P(")"),W,a):"operator"==t||"spread"==t?C(r?N:B):"["==t?C(O("]"),Jt,W,a):"{"==t?it(et,"}",null,a):"quasi"==t?M(K,a):"new"==t?C(function(t){return function(e){return"."==e?C(t?Y:X):"variable"==e&&u?C(kt,t?F:J):M(t?N:B)}}(r)):"import"==t?C(B):C()}function H(t){return t.match(/[;\}\)\],]/)?M():M(B)}function J(t,e){return","==t?C(B):F(t,e,!1)}function F(t,e,r){var n=0==r?J:F,a=0==r?B:N;return"=>"==t?C(T,r?Q:G,S):"operator"==t?/\+\+|--/.test(e)||u&&"!"==e?C(n):u&&"<"==e&&j.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?C(O(">"),at(ft,">"),W,n):"?"==e?C(B,P(":"),a):C(a):"quasi"==t?M(K,n):";"!=t?"("==t?it(N,")","call",n):"."==t?C(tt,n):"["==t?C(O("]"),H,P("]"),W,n):u&&"as"==e?(j.marked="keyword",C(ft,n)):"regexp"==t?(j.state.lastType=j.marked="operator",j.stream.backUp(j.stream.pos-j.stream.start-1),C(a)):void 0:void 0}function K(t,e){return"quasi"!=t?M():"${"!=e.slice(e.length-2)?C(K):C(B,R)}function R(t){if("}"==t)return j.marked="string-2",j.state.tokenize=h,C(K)}function G(t){return b(j.stream,j.state),M("{"==t?L:B)}function Q(t){return b(j.stream,j.state),M("{"==t?L:N)}function X(t,e){if("target"==e)return j.marked="keyword",C(J)}function Y(t,e){if("target"==e)return j.marked="keyword",C(F)}function Z(t){return":"==t?C(W,L):M(J,P(";"),W)}function tt(t){if("variable"==t)return j.marked="property",C()}function et(t,e){return"async"==t?(j.marked="property",C(et)):"variable"==t||"keyword"==j.style?(j.marked="property","get"==e||"set"==e?C(rt):(u&&j.state.fatArrowAt==j.stream.start&&(r=j.stream.match(/^\s*:\s*/,!1))&&(j.state.fatArrowAt=j.stream.pos+r[0].length),C(nt))):"number"==t||"string"==t?(j.marked=s?"property":j.style+" property",C(nt)):"jsonld-keyword"==t?C(nt):u&&A(e)?(j.marked="keyword",C(et)):"["==t?C(B,st,P("]"),nt):"spread"==t?C(N,nt):"*"==e?(j.marked="keyword",C(et)):":"==t?M(nt):void 0;var r}function rt(t){return"variable"!=t?M(nt):(j.marked="property",C(Vt))}function nt(t){return":"==t?C(N):"("==t?M(Vt):void 0}function at(t,e,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=j.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),C((function(r,n){return r==e||n==e?M():M(t)}),n)}return a==e||i==e?C():r&&r.indexOf(";")>-1?M(t):C(P(e))}return function(r,a){return r==e||a==e?C():M(t,n)}}function it(t,e,r){for(var n=3;n<arguments.length;n++)j.cc.push(arguments[n]);return C(O(e,r),at(t,e),W)}function ot(t){return"}"==t?C():M(L,ot)}function st(t,e){if(u){if(":"==t)return C(ft);if("?"==e)return C(st)}}function ct(t,e){if(u&&(":"==t||"in"==e))return C(ft)}function ut(t){if(u&&":"==t)return j.stream.match(/^\s*\w+\s+is\b/,!1)?C(B,lt,ft):C(ft)}function lt(t,e){if("is"==e)return j.marked="keyword",C()}function ft(t,e){return"keyof"==e||"typeof"==e||"infer"==e?(j.marked="keyword",C("typeof"==e?N:ft)):"variable"==t||"void"==e?(j.marked="type",C(vt)):"|"==e||"&"==e?C(ft):"string"==t||"number"==t||"atom"==t?C(vt):"["==t?C(O("]"),at(ft,"]",","),W,vt):"{"==t?C(O("}"),at(mt,"}",",;"),W,vt):"("==t?C(at(pt,")"),dt,vt):"<"==t?C(at(ft,">"),ft):void 0}function dt(t){if("=>"==t)return C(ft)}function mt(t,e){return"variable"==t||"keyword"==j.style?(j.marked="property",C(mt)):"?"==e||"number"==t||"string"==t?C(mt):":"==t?C(ft):"["==t?C(P("variable"),ct,P("]"),mt):"("==t?M(Et,mt):void 0}function pt(t,e){return"variable"==t&&j.stream.match(/^\s*[?:]/,!1)||"?"==e?C(pt):":"==t?C(ft):"spread"==t?C(pt):M(ft)}function vt(t,e){return"<"==e?C(O(">"),at(ft,">"),W,vt):"|"==e||"."==t||"&"==e?C(ft):"["==t?C(ft,P("]"),vt):"extends"==e||"implements"==e?(j.marked="keyword",C(ft)):"?"==e?C(ft,P(":"),ft):void 0}function kt(t,e){if("<"==e)return C(O(">"),at(ft,">"),W,vt)}function ht(){return M(ft,yt)}function yt(t,e){if("="==e)return C(ft)}function bt(t,e){return"enum"==e?(j.marked="keyword",C(Ft)):M(wt,st,jt,Mt)}function wt(t,e){return u&&A(e)?(j.marked="keyword",C(wt)):"variable"==t?(_(e),C()):"spread"==t?C(wt):"["==t?it(xt,"]"):"{"==t?it(gt,"}"):void 0}function gt(t,e){return"variable"!=t||j.stream.match(/^\s*:/,!1)?("variable"==t&&(j.marked="property"),"spread"==t?C(wt):"}"==t?M():"["==t?C(B,P("]"),P(":"),gt):C(P(":"),wt,jt)):(_(e),C(jt))}function xt(){return M(wt,jt)}function jt(t,e){if("="==e)return C(N)}function Mt(t){if(","==t)return C(bt)}function Ct(t,e){if("keyword b"==t&&"else"==e)return C(O("form","else"),L,W)}function It(t,e){return"await"==e?C(It):"("==t?C(O(")"),_t,W):void 0}function _t(t){return"var"==t?C(bt,At):"variable"==t?C(At):M(At)}function At(t,e){return")"==t?C():";"==t?C(At):"in"==e||"of"==e?(j.marked="keyword",C(B,At)):M(B,At)}function Vt(t,e){return"*"==e?(j.marked="keyword",C(Vt)):"variable"==t?(_(e),C(Vt)):"("==t?C(T,O(")"),at(Tt,")"),W,ut,L,S):u&&"<"==e?C(O(">"),at(ht,">"),W,Vt):void 0}function Et(t,e){return"*"==e?(j.marked="keyword",C(Et)):"variable"==t?(_(e),C(Et)):"("==t?C(T,O(")"),at(Tt,")"),W,ut,S):u&&"<"==e?C(O(">"),at(ht,">"),W,Et):void 0}function zt(t,e){return"keyword"==t||"variable"==t?(j.marked="type",C(zt)):"<"==e?C(O(">"),at(ht,">"),W):void 0}function Tt(t,e){return"@"==e&&C(B,Tt),"spread"==t?C(Tt):u&&A(e)?(j.marked="keyword",C(Tt)):u&&"this"==t?C(st,jt):M(wt,st,jt)}function $t(t,e){return"variable"==t?St(t,e):Ot(t,e)}function St(t,e){if("variable"==t)return _(e),C(Ot)}function Ot(t,e){return"<"==e?C(O(">"),at(ht,">"),W,Ot):"extends"==e||"implements"==e||u&&","==t?("implements"==e&&(j.marked="keyword"),C(u?ft:B,Ot)):"{"==t?C(O("}"),Wt,W):void 0}function Wt(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||u&&A(e))&&j.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(j.marked="keyword",C(Wt)):"variable"==t||"keyword"==j.style?(j.marked="property",C(u?Pt:Vt,Wt)):"number"==t||"string"==t?C(u?Pt:Vt,Wt):"["==t?C(B,st,P("]"),u?Pt:Vt,Wt):"*"==e?(j.marked="keyword",C(Wt)):u&&"("==t?M(Et,Wt):";"==t||","==t?C(Wt):"}"==t?C():"@"==e?C(B,Wt):void 0}function Pt(t,e){if("?"==e)return C(Pt);if(":"==t)return C(ft,jt);if("="==e)return C(N);var r=j.state.lexical.prev,n=r&&"interface"==r.info;return M(n?Et:Vt)}function Lt(t,e){return"*"==e?(j.marked="keyword",C(Ht,P(";"))):"default"==e?(j.marked="keyword",C(B,P(";"))):"{"==t?C(at(qt,"}"),Ht,P(";")):M(L)}function qt(t,e){return"as"==e?(j.marked="keyword",C(P("variable"))):"variable"==t?M(N,qt):void 0}function Bt(t){return"string"==t?C():"("==t?M(B):M(Nt,Dt,Ht)}function Nt(t,e){return"{"==t?it(Nt,"}"):("variable"==t&&_(e),"*"==e&&(j.marked="keyword"),C(Ut))}function Dt(t){if(","==t)return C(Nt,Dt)}function Ut(t,e){if("as"==e)return j.marked="keyword",C(Nt)}function Ht(t,e){if("from"==e)return j.marked="keyword",C(B)}function Jt(t){return"]"==t?C():M(at(N,"]"))}function Ft(){return M(O("form"),wt,P("{"),O("}"),at(Kt,"}"),W,W)}function Kt(){return M(wt,jt)}function Rt(t,e,r){return e.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(r||0)))}return S.lex=!0,W.lex=!0,{startState:function(t){var e={tokenize:v,lastType:"sof",cc:[],lexical:new g((t||0)-i,0,"block",!1),localVars:r.localVars,context:r.localVars&&new V(null,null,!1),indented:t||0};return r.globalVars&&"object"==typeof r.globalVars&&(e.globalVars=r.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),b(t,e)),e.tokenize!=k&&t.eatSpace())return null;var r=e.tokenize(t,e);return"comment"==n?r:(e.lastType="operator"!=n||"++"!=a&&"--"!=a?n:"incdec",function(t,e,r,n,a){var i=t.cc;for(j.state=t,j.stream=a,j.marked=null,j.cc=i,j.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){var o=i.length?i.pop():c?B:L;if(o(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return j.marked?j.marked:"variable"==r&&x(t,n)?"variable-2":e}}}(e,r,n,a,t))},indent:function(e,n){if(e.tokenize==k)return t.Pass;if(e.tokenize!=v)return 0;var a,s=n&&n.charAt(0),c=e.lexical;if(!/^\s*else\b/.test(n))for(var u=e.cc.length-1;u>=0;--u){var l=e.cc[u];if(l==W)c=c.prev;else if(l!=Ct)break}for(;("stat"==c.type||"form"==c.type)&&("}"==s||(a=e.cc[e.cc.length-1])&&(a==J||a==F)&&!/^[,\.=+\-*:?[\(]/.test(n));)c=c.prev;o&&")"==c.type&&"stat"==c.prev.type&&(c=c.prev);var f=c.type,m=s==f;return"vardef"==f?c.indented+("operator"==e.lastType||","==e.lastType?c.info.length+1:0):"form"==f&&"{"==s?c.indented:"form"==f?c.indented+i:"stat"==f?c.indented+(function(t,e){return"operator"==t.lastType||","==t.lastType||d.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}(e,n)?o||i:0):"switch"!=c.info||m||0==r.doubleIndentSwitch?c.align?c.column+(m?0:1):c.indented+(m?0:i):c.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:c?null:"/*",blockCommentEnd:c?null:"*/",blockCommentContinue:c?null:" * ",lineComment:c?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:c?"json":"javascript",jsonldMode:s,jsonMode:c,expressionAllowed:Rt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=B&&e!=N||t.cc.pop()}}})),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(r("56b3"))}}]);
|