| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e356db48"],{"0f7c":function(t,e,r){},"19a8":function(t,e,r){},2596:function(t,e,r){"use strict";var n=r("19a8"),a=r.n(n);a.a},3793:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"i-layout-page-header"},[r("div",{staticClass:"i-layout-page-header"},[r("span",{staticClass:"ivu-page-header-title"},[t._v(t._s(t.$route.meta.title))])])]),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;e.index;return[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)},a=[],i=(r("96cf"),r("1da1")),o=r("8593"),u=r("56b3"),c=r.n(u);r("0f7c");r("f9d4");var s={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=c.a.fromTextArea(this.$refs.mycode,{value:"http://www.crmeb.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),console.log(t)},getList:function(){var t=this;this.loading=!0,Object(o["C"])(this.formItem).then(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){while(1)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(o["D"])(t.pathname).then(function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(r){var n;return regeneratorRuntime.wrap((function(t){while(1)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(o["F"])(e).then(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){while(1)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()}}},l=s,f=(r("2596"),r("2877")),d=Object(f["a"])(l,n,a,!1,null,"7de7380d",null);e["default"]=d.exports},8593:function(t,e,r){"use strict";r.d(e,"j",(function(){return a})),r.d(e,"h",(function(){return i})),r.d(e,"i",(function(){return o})),r.d(e,"I",(function(){return u})),r.d(e,"n",(function(){return c})),r.d(e,"l",(function(){return s})),r.d(e,"m",(function(){return l})),r.d(e,"k",(function(){return f})),r.d(e,"B",(function(){return d})),r.d(e,"t",(function(){return m})),r.d(e,"A",(function(){return p})),r.d(e,"y",(function(){return h})),r.d(e,"v",(function(){return v})),r.d(e,"w",(function(){return k})),r.d(e,"x",(function(){return b})),r.d(e,"z",(function(){return y})),r.d(e,"G",(function(){return g})),r.d(e,"J",(function(){return w})),r.d(e,"o",(function(){return x})),r.d(e,"d",(function(){return j})),r.d(e,"f",(function(){return O})),r.d(e,"c",(function(){return _})),r.d(e,"e",(function(){return E})),r.d(e,"g",(function(){return M})),r.d(e,"r",(function(){return T})),r.d(e,"p",(function(){return C})),r.d(e,"q",(function(){return I})),r.d(e,"C",(function(){return A})),r.d(e,"D",(function(){return V})),r.d(e,"F",(function(){return z})),r.d(e,"E",(function(){return $})),r.d(e,"a",(function(){return S})),r.d(e,"b",(function(){return W})),r.d(e,"s",(function(){return P})),r.d(e,"H",(function(){return G})),r.d(e,"u",(function(){return q}));var n=r("6b6c");function a(t){return Object(n["a"])({url:"setting/config_class",method:"get",params:t})}function i(t){return Object(n["a"])({url:"setting/config_class/create",method:"get"})}function o(t){return Object(n["a"])({url:"setting/config_class/".concat(t,"/edit"),method:"get"})}function u(t){return Object(n["a"])({url:"setting/config_class/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function c(t){return Object(n["a"])({url:"setting/config",method:"get",params:t})}function s(t){return Object(n["a"])({url:"setting/config/create",method:"get",params:t})}function l(t){return Object(n["a"])({url:"/setting/config/".concat(t,"/edit"),method:"get"})}function f(t,e){return Object(n["a"])({url:"setting/config/set_status/".concat(t,"/").concat(e),method:"PUT"})}function d(t){return Object(n["a"])({url:"setting/group",method:"get",params:t})}function m(t){return Object(n["a"])({url:t.url,method:t.method,data:t.datas})}function p(t){return Object(n["a"])({url:"setting/group/".concat(t),method:"get"})}function h(t,e){return Object(n["a"])({url:e,method:"get",params:t})}function v(t,e){return Object(n["a"])({url:e,method:"get",params:t})}function k(t,e){return Object(n["a"])({url:e,method:"get",params:t})}function b(t,e){return Object(n["a"])({url:e,method:"get",params:t})}function y(t){return Object(n["a"])({url:t,method:"PUT"})}function g(t){return Object(n["a"])({url:"system/log/search_admin",method:"GET"})}function w(t){return Object(n["a"])({url:"system/log",method:"GET",params:t})}function x(){return Object(n["a"])({url:"system/file",method:"GET"})}function j(){return Object(n["a"])({url:"system/backup",method:"GET"})}function O(t){return Object(n["a"])({url:"system/backup/read",method:"GET",params:t})}function _(t){return Object(n["a"])({url:"system/backup/backup",method:"put",data:t})}function E(t){return Object(n["a"])({url:"system/backup/optimize",method:"put",data:t})}function M(t){return Object(n["a"])({url:"system/backup/repair",method:"put",data:t})}function T(t){return Object(n["a"])({url:"system/backup/file_list",method:"GET"})}function C(t){return Object(n["a"])({url:"backup/download",method:"get",params:t})}function I(t){return Object(n["a"])({url:"system/backup/import",method:"POST",data:t})}function A(t){return Object(n["a"])({url:"system/file/opendir",method:"GET",params:t})}function V(t){return Object(n["a"])({url:"system/file/openfile?filepath=".concat(t),method:"GET"})}function z(t){return Object(n["a"])({url:"system/file/savefile",method:"post",data:t})}function $(t){return Object(n["a"])({url:"system/replace_site_url",method:"post",data:t})}function S(){return Object(n["a"])({url:"auth",method:"get"})}function W(t){return Object(n["a"])({url:"auth_apply",method:"post",data:t})}function P(){return Object(n["a"])({url:"setting/get_kf_adv",method:"get"})}function G(t){return Object(n["a"])({url:"setting/set_kf_adv",method:"post",data:t})}function q(){return Object(n["a"])({url:"setting/group_all",method:"get"})}},f9d4:function(t,e,r){(function(t){t(r("56b3"))})((function(t){"use strict";t.defineMode("javascript",(function(e,r){var n,a,i=e.indentUnit,o=r.statementIndent,u=r.jsonld,c=r.json||u,s=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){var e,r=!1,n=!1;while(null!=(e=t.next())){if(!r){if("/"==e&&!n)return;"["==e?n=!0:n&&"]"==e&&(n=!1)}r=!r&&"\\"==e}}function h(t,e,r){return n=t,a=r,e}function v(t,e){var r=t.next();if('"'==r||"'"==r)return e.tokenize=k(r),e.tokenize(t,e);if("."==r&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return h("number","number");if("."==r&&t.match(".."))return h("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return h(r);if("="==r&&t.eat(">"))return h("=>","operator");if("0"==r&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return h("number","number");if(/\d/.test(r))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),h("number","number");if("/"==r)return t.eat("*")?(e.tokenize=b,b(t,e)):t.eat("/")?(t.skipToEnd(),h("comment","comment")):te(t,e,1)?(p(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),h("regexp","string-2")):(t.eat("="),h("operator","operator",t.current()));if("`"==r)return e.tokenize=y,y(t,e);if("#"==r&&"!"==t.peek())return t.skipToEnd(),h("meta","meta");if("#"==r&&t.eatWhile(l))return h("variable","property");if("<"==r&&t.match("!--")||"-"==r&&t.match("->"))return t.skipToEnd(),h("comment","comment");if(d.test(r))return">"==r&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=r&&"="!=r||t.eat("="):/[<>*+\-]/.test(r)&&(t.eat(r),">"==r&&t.eat(r))),"?"==r&&t.eat(".")?h("."):h("operator","operator",t.current());if(l.test(r)){t.eatWhile(l);var n=t.current();if("."!=e.lastType){if(f.propertyIsEnumerable(n)){var a=f[n];return h(a.type,a.style,n)}if("async"==n&&t.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return h("async","keyword",n)}return h("variable","variable",n)}}function k(t){return function(e,r){var n,a=!1;if(u&&"@"==e.peek()&&e.match(m))return r.tokenize=v,h("jsonld-keyword","meta");while(null!=(n=e.next())){if(n==t&&!a)break;a=!a&&"\\"==n}return a||(r.tokenize=v),h("string","string")}}function b(t,e){var r,n=!1;while(r=t.next()){if("/"==r&&n){e.tokenize=v;break}n="*"==r}return h("comment","comment")}function y(t,e){var r,n=!1;while(null!=(r=t.next())){if(!n&&("`"==r||"$"==r&&t.eat("{"))){e.tokenize=v;break}n=!n&&"\\"==r}return h("quasi","string-2",t.current())}var g="([{}])";function w(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var r=t.string.indexOf("=>",t.start);if(!(r<0)){if(s){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 u=t.string.charAt(o),c=g.indexOf(u);if(c>=0&&c<3){if(!a){++o;break}if(0==--a){"("==u&&(i=!0);break}}else if(c>=3&&c<6)++a;else if(l.test(u))i=!0;else if(/["'\/`]/.test(u))for(;;--o){if(0==o)return;var f=t.string.charAt(o-1);if(f==u&&"\\"!=t.string.charAt(o-2)){o--;break}}else if(i&&!a){++o;break}}i&&!a&&(e.fatArrowAt=o)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function j(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 O(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}function _(t,e,r,n,a){var i=t.cc;E.state=t,E.stream=a,E.marked=null,E.cc=i,E.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);while(1){var o=i.length?i.pop():c?D:R;if(o(r,n)){while(i.length&&i[i.length-1].lex)i.pop()();return E.marked?E.marked:"variable"==r&&O(t,n)?"variable-2":e}}}var E={state:null,column:null,marked:null,cc:null};function M(){for(var t=arguments.length-1;t>=0;t--)E.cc.push(arguments[t])}function T(){return M.apply(null,arguments),!0}function C(t,e){for(var r=e;r;r=r.next)if(r.name==t)return!0;return!1}function I(t){var e=E.state;if(E.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var n=A(t,e.context);if(null!=n)return void(e.context=n)}else if(!C(t,e.localVars))return void(e.localVars=new $(t,e.localVars));r.globalVars&&!C(t,e.globalVars)&&(e.globalVars=new $(t,e.globalVars))}function A(t,e){if(e){if(e.block){var r=A(t,e.prev);return r?r==e.prev?e:new z(r,e.vars,!0):null}return C(t,e.vars)?e:new z(e.prev,new $(t,e.vars),!1)}return null}function V(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function z(t,e,r){this.prev=t,this.vars=e,this.block=r}function $(t,e){this.name=t,this.next=e}var S=new $("this",new $("arguments",null));function W(){E.state.context=new z(E.state.context,E.state.localVars,!1),E.state.localVars=S}function P(){E.state.context=new z(E.state.context,E.state.localVars,!0),E.state.localVars=null}function G(){E.state.localVars=E.state.context.vars,E.state.context=E.state.context.prev}function q(t,e){var r=function(){var r=E.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 j(n,E.stream.column(),t,null,r.lexical,e)};return r.lex=!0,r}function L(){var t=E.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function B(t){function e(r){return r==t?T():";"==t||"}"==r||")"==r||"]"==r?M():T(e)}return e}function R(t,e){return"var"==t?T(q("vardef",e),Ot,B(";"),L):"keyword a"==t?T(q("form"),F,R,L):"keyword b"==t?T(q("form"),R,L):"keyword d"==t?E.stream.match(/^\s*$/,!1)?T():T(q("stat"),H,B(";"),L):"debugger"==t?T(B(";")):"{"==t?T(q("}"),P,ft,L,G):";"==t?T():"if"==t?("else"==E.state.lexical.info&&E.state.cc[E.state.cc.length-1]==L&&E.state.cc.pop()(),T(q("form"),F,R,L,It)):"function"==t?T($t):"for"==t?T(q("form"),At,R,L):"class"==t||s&&"interface"==e?(E.marked="keyword",T(q("form","class"==t?t:e),qt,L)):"variable"==t?s&&"declare"==e?(E.marked="keyword",T(R)):s&&("module"==e||"enum"==e||"type"==e)&&E.stream.match(/^\s*\w/,!1)?(E.marked="keyword","enum"==e?T(Xt):"type"==e?T(Wt,B("operator"),vt,B(";")):T(q("form"),_t,B("{"),q("}"),ft,L,L)):s&&"namespace"==e?(E.marked="keyword",T(q("form"),D,R,L)):s&&"abstract"==e?(E.marked="keyword",T(R)):T(q("stat"),at):"switch"==t?T(q("form"),F,B("{"),q("}","switch"),P,ft,L,L,G):"case"==t?T(D,B(":")):"default"==t?T(B(":")):"catch"==t?T(q("form"),W,U,R,L,G):"export"==t?T(q("stat"),Ut,L):"import"==t?T(q("stat"),Nt,L):"async"==t?T(R):"@"==e?T(D,R):M(q("stat"),D,B(";"),L)}function U(t){if("("==t)return T(Pt,B(")"))}function D(t,e){return J(t,e,!1)}function N(t,e){return J(t,e,!0)}function F(t){return"("!=t?M():T(q(")"),H,B(")"),L)}function J(t,e,r){if(E.state.fatArrowAt==E.stream.start){var n=r?tt:Z;if("("==t)return T(W,q(")"),st(Pt,")"),L,B("=>"),n,G);if("variable"==t)return M(W,_t,B("=>"),n,G)}var a=r?Q:K;return x.hasOwnProperty(t)?T(a):"function"==t?T($t,a):"class"==t||s&&"interface"==e?(E.marked="keyword",T(q("form"),Gt,L)):"keyword c"==t||"async"==t?T(r?N:D):"("==t?T(q(")"),H,B(")"),L,a):"operator"==t||"spread"==t?T(r?N:D):"["==t?T(q("]"),Qt,L,a):"{"==t?lt(ot,"}",null,a):"quasi"==t?M(X,a):"new"==t?T(et(r)):"import"==t?T(D):T()}function H(t){return t.match(/[;\}\)\],]/)?M():M(D)}function K(t,e){return","==t?T(H):Q(t,e,!1)}function Q(t,e,r){var n=0==r?K:Q,a=0==r?D:N;return"=>"==t?T(W,r?tt:Z,G):"operator"==t?/\+\+|--/.test(e)||s&&"!"==e?T(n):s&&"<"==e&&E.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?T(q(">"),st(vt,">"),L,n):"?"==e?T(D,B(":"),a):T(a):"quasi"==t?M(X,n):";"!=t?"("==t?lt(N,")","call",n):"."==t?T(it,n):"["==t?T(q("]"),H,B("]"),L,n):s&&"as"==e?(E.marked="keyword",T(vt,n)):"regexp"==t?(E.state.lastType=E.marked="operator",E.stream.backUp(E.stream.pos-E.stream.start-1),T(a)):void 0:void 0}function X(t,e){return"quasi"!=t?M():"${"!=e.slice(e.length-2)?T(X):T(D,Y)}function Y(t){if("}"==t)return E.marked="string-2",E.state.tokenize=y,T(X)}function Z(t){return w(E.stream,E.state),M("{"==t?R:D)}function tt(t){return w(E.stream,E.state),M("{"==t?R:N)}function et(t){return function(e){return"."==e?T(t?nt:rt):"variable"==e&&s?T(wt,t?Q:K):M(t?N:D)}}function rt(t,e){if("target"==e)return E.marked="keyword",T(K)}function nt(t,e){if("target"==e)return E.marked="keyword",T(Q)}function at(t){return":"==t?T(L,R):M(K,B(";"),L)}function it(t){if("variable"==t)return E.marked="property",T()}function ot(t,e){return"async"==t?(E.marked="property",T(ot)):"variable"==t||"keyword"==E.style?(E.marked="property","get"==e||"set"==e?T(ut):(s&&E.state.fatArrowAt==E.stream.start&&(r=E.stream.match(/^\s*:\s*/,!1))&&(E.state.fatArrowAt=E.stream.pos+r[0].length),T(ct))):"number"==t||"string"==t?(E.marked=u?"property":E.style+" property",T(ct)):"jsonld-keyword"==t?T(ct):s&&V(e)?(E.marked="keyword",T(ot)):"["==t?T(D,dt,B("]"),ct):"spread"==t?T(N,ct):"*"==e?(E.marked="keyword",T(ot)):":"==t?M(ct):void 0;var r}function ut(t){return"variable"!=t?M(ct):(E.marked="property",T($t))}function ct(t){return":"==t?T(N):"("==t?M($t):void 0}function st(t,e,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=E.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),T((function(r,n){return r==e||n==e?M():M(t)}),n)}return a==e||i==e?T():r&&r.indexOf(";")>-1?M(t):T(B(e))}return function(r,a){return r==e||a==e?T():M(t,n)}}function lt(t,e,r){for(var n=3;n<arguments.length;n++)E.cc.push(arguments[n]);return T(q(e,r),st(t,e),L)}function ft(t){return"}"==t?T():M(R,ft)}function dt(t,e){if(s){if(":"==t)return T(vt);if("?"==e)return T(dt)}}function mt(t,e){if(s&&(":"==t||"in"==e))return T(vt)}function pt(t){if(s&&":"==t)return E.stream.match(/^\s*\w+\s+is\b/,!1)?T(D,ht,vt):T(vt)}function ht(t,e){if("is"==e)return E.marked="keyword",T()}function vt(t,e){return"keyof"==e||"typeof"==e||"infer"==e?(E.marked="keyword",T("typeof"==e?N:vt)):"variable"==t||"void"==e?(E.marked="type",T(gt)):"|"==e||"&"==e?T(vt):"string"==t||"number"==t||"atom"==t?T(gt):"["==t?T(q("]"),st(vt,"]",","),L,gt):"{"==t?T(q("}"),st(bt,"}",",;"),L,gt):"("==t?T(st(yt,")"),kt,gt):"<"==t?T(st(vt,">"),vt):void 0}function kt(t){if("=>"==t)return T(vt)}function bt(t,e){return"variable"==t||"keyword"==E.style?(E.marked="property",T(bt)):"?"==e||"number"==t||"string"==t?T(bt):":"==t?T(vt):"["==t?T(B("variable"),mt,B("]"),bt):"("==t?M(St,bt):void 0}function yt(t,e){return"variable"==t&&E.stream.match(/^\s*[?:]/,!1)||"?"==e?T(yt):":"==t?T(vt):"spread"==t?T(yt):M(vt)}function gt(t,e){return"<"==e?T(q(">"),st(vt,">"),L,gt):"|"==e||"."==t||"&"==e?T(vt):"["==t?T(vt,B("]"),gt):"extends"==e||"implements"==e?(E.marked="keyword",T(vt)):"?"==e?T(vt,B(":"),vt):void 0}function wt(t,e){if("<"==e)return T(q(">"),st(vt,">"),L,gt)}function xt(){return M(vt,jt)}function jt(t,e){if("="==e)return T(vt)}function Ot(t,e){return"enum"==e?(E.marked="keyword",T(Xt)):M(_t,dt,Tt,Ct)}function _t(t,e){return s&&V(e)?(E.marked="keyword",T(_t)):"variable"==t?(I(e),T()):"spread"==t?T(_t):"["==t?lt(Mt,"]"):"{"==t?lt(Et,"}"):void 0}function Et(t,e){return"variable"!=t||E.stream.match(/^\s*:/,!1)?("variable"==t&&(E.marked="property"),"spread"==t?T(_t):"}"==t?M():"["==t?T(D,B("]"),B(":"),Et):T(B(":"),_t,Tt)):(I(e),T(Tt))}function Mt(){return M(_t,Tt)}function Tt(t,e){if("="==e)return T(N)}function Ct(t){if(","==t)return T(Ot)}function It(t,e){if("keyword b"==t&&"else"==e)return T(q("form","else"),R,L)}function At(t,e){return"await"==e?T(At):"("==t?T(q(")"),Vt,L):void 0}function Vt(t){return"var"==t?T(Ot,zt):"variable"==t?T(zt):M(zt)}function zt(t,e){return")"==t?T():";"==t?T(zt):"in"==e||"of"==e?(E.marked="keyword",T(D,zt)):M(D,zt)}function $t(t,e){return"*"==e?(E.marked="keyword",T($t)):"variable"==t?(I(e),T($t)):"("==t?T(W,q(")"),st(Pt,")"),L,pt,R,G):s&&"<"==e?T(q(">"),st(xt,">"),L,$t):void 0}function St(t,e){return"*"==e?(E.marked="keyword",T(St)):"variable"==t?(I(e),T(St)):"("==t?T(W,q(")"),st(Pt,")"),L,pt,G):s&&"<"==e?T(q(">"),st(xt,">"),L,St):void 0}function Wt(t,e){return"keyword"==t||"variable"==t?(E.marked="type",T(Wt)):"<"==e?T(q(">"),st(xt,">"),L):void 0}function Pt(t,e){return"@"==e&&T(D,Pt),"spread"==t?T(Pt):s&&V(e)?(E.marked="keyword",T(Pt)):s&&"this"==t?T(dt,Tt):M(_t,dt,Tt)}function Gt(t,e){return"variable"==t?qt(t,e):Lt(t,e)}function qt(t,e){if("variable"==t)return I(e),T(Lt)}function Lt(t,e){return"<"==e?T(q(">"),st(xt,">"),L,Lt):"extends"==e||"implements"==e||s&&","==t?("implements"==e&&(E.marked="keyword"),T(s?vt:D,Lt)):"{"==t?T(q("}"),Bt,L):void 0}function Bt(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||s&&V(e))&&E.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(E.marked="keyword",T(Bt)):"variable"==t||"keyword"==E.style?(E.marked="property",T(Rt,Bt)):"number"==t||"string"==t?T(Rt,Bt):"["==t?T(D,dt,B("]"),Rt,Bt):"*"==e?(E.marked="keyword",T(Bt)):s&&"("==t?M(St,Bt):";"==t||","==t?T(Bt):"}"==t?T():"@"==e?T(D,Bt):void 0}function Rt(t,e){if("?"==e)return T(Rt);if(":"==t)return T(vt,Tt);if("="==e)return T(N);var r=E.state.lexical.prev,n=r&&"interface"==r.info;return M(n?St:$t)}function Ut(t,e){return"*"==e?(E.marked="keyword",T(Kt,B(";"))):"default"==e?(E.marked="keyword",T(D,B(";"))):"{"==t?T(st(Dt,"}"),Kt,B(";")):M(R)}function Dt(t,e){return"as"==e?(E.marked="keyword",T(B("variable"))):"variable"==t?M(N,Dt):void 0}function Nt(t){return"string"==t?T():"("==t?M(D):M(Ft,Jt,Kt)}function Ft(t,e){return"{"==t?lt(Ft,"}"):("variable"==t&&I(e),"*"==e&&(E.marked="keyword"),T(Ht))}function Jt(t){if(","==t)return T(Ft,Jt)}function Ht(t,e){if("as"==e)return E.marked="keyword",T(Ft)}function Kt(t,e){if("from"==e)return E.marked="keyword",T(D)}function Qt(t){return"]"==t?T():M(st(N,"]"))}function Xt(){return M(q("form"),_t,B("{"),q("}"),st(Yt,"}"),L,L)}function Yt(){return M(_t,Tt)}function Zt(t,e){return"operator"==t.lastType||","==t.lastType||d.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function te(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 G.lex=!0,L.lex=!0,{startState:function(t){var e={tokenize:v,lastType:"sof",cc:[],lexical:new j((t||0)-i,0,"block",!1),localVars:r.localVars,context:r.localVars&&new z(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(),w(t,e)),e.tokenize!=b&&t.eatSpace())return null;var r=e.tokenize(t,e);return"comment"==n?r:(e.lastType="operator"!=n||"++"!=a&&"--"!=a?n:"incdec",_(e,r,n,a,t))},indent:function(e,n){if(e.tokenize==b)return t.Pass;if(e.tokenize!=v)return 0;var a,u=n&&n.charAt(0),c=e.lexical;if(!/^\s*else\b/.test(n))for(var s=e.cc.length-1;s>=0;--s){var l=e.cc[s];if(l==L)c=c.prev;else if(l!=It)break}while(("stat"==c.type||"form"==c.type)&&("}"==u||(a=e.cc[e.cc.length-1])&&(a==K||a==Q)&&!/^[,\.=+\-*:?[\(]/.test(n)))c=c.prev;o&&")"==c.type&&"stat"==c.prev.type&&(c=c.prev);var f=c.type,d=u==f;return"vardef"==f?c.indented+("operator"==e.lastType||","==e.lastType?c.info.length+1:0):"form"==f&&"{"==u?c.indented:"form"==f?c.indented+i:"stat"==f?c.indented+(Zt(e,n)?o||i:0):"switch"!=c.info||d||0==r.doubleIndentSwitch?c.align?c.column+(d?0:1):c.indented+(d?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:u,jsonMode:c,expressionAllowed:te,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=D&&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})}))}}]);
|