Files
ijmuv-blog-release/frontend/assets/vbscript-ekGC3C_A.js
2026-05-08 13:39:01 +08:00

1 line
5.3 KiB
JavaScript

function e(e){var t=`error`;function n(e){return RegExp(`^((`+e.join(`)|(`)+`))\\b`,`i`)}var r=RegExp(`^[\\+\\-\\*/&\\\\\\^<>=]`),i=RegExp(`^((<>)|(<=)|(>=))`),a=RegExp(`^[\\.,]`),o=RegExp(`^[\\(\\)]`),s=RegExp(`^[A-Za-z][_A-Za-z0-9]*`),c=[`class`,`sub`,`select`,`while`,`if`,`function`,`property`,`with`,`for`],l=[`else`,`elseif`,`case`],u=[`next`,`loop`,`wend`],d=n([`and`,`or`,`not`,`xor`,`is`,`mod`,`eqv`,`imp`]),f=[`dim`,`redim`,`then`,`until`,`randomize`,`byval`,`byref`,`new`,`property`,`exit`,`in`,`const`,`private`,`public`,`get`,`set`,`let`,`stop`,`on error resume next`,`on error goto 0`,`option explicit`,`call`,`me`],p=[`true`,`false`,`nothing`,`empty`,`null`],m=`abs.array.asc.atn.cbool.cbyte.ccur.cdate.cdbl.chr.cint.clng.cos.csng.cstr.date.dateadd.datediff.datepart.dateserial.datevalue.day.escape.eval.execute.exp.filter.formatcurrency.formatdatetime.formatnumber.formatpercent.getlocale.getobject.getref.hex.hour.inputbox.instr.instrrev.int.fix.isarray.isdate.isempty.isnull.isnumeric.isobject.join.lbound.lcase.left.len.loadpicture.log.ltrim.rtrim.trim.maths.mid.minute.month.monthname.msgbox.now.oct.replace.rgb.right.rnd.round.scriptengine.scriptenginebuildversion.scriptenginemajorversion.scriptengineminorversion.second.setlocale.sgn.sin.space.split.sqr.strcomp.string.strreverse.tan.time.timer.timeserial.timevalue.typename.ubound.ucase.unescape.vartype.weekday.weekdayname.year`.split(`.`),h=`vbBlack.vbRed.vbGreen.vbYellow.vbBlue.vbMagenta.vbCyan.vbWhite.vbBinaryCompare.vbTextCompare.vbSunday.vbMonday.vbTuesday.vbWednesday.vbThursday.vbFriday.vbSaturday.vbUseSystemDayOfWeek.vbFirstJan1.vbFirstFourDays.vbFirstFullWeek.vbGeneralDate.vbLongDate.vbShortDate.vbLongTime.vbShortTime.vbObjectError.vbOKOnly.vbOKCancel.vbAbortRetryIgnore.vbYesNoCancel.vbYesNo.vbRetryCancel.vbCritical.vbQuestion.vbExclamation.vbInformation.vbDefaultButton1.vbDefaultButton2.vbDefaultButton3.vbDefaultButton4.vbApplicationModal.vbSystemModal.vbOK.vbCancel.vbAbort.vbRetry.vbIgnore.vbYes.vbNo.vbCr.VbCrLf.vbFormFeed.vbLf.vbNewLine.vbNullChar.vbNullString.vbTab.vbVerticalTab.vbUseDefault.vbTrue.vbFalse.vbEmpty.vbNull.vbInteger.vbLong.vbSingle.vbDouble.vbCurrency.vbDate.vbString.vbObject.vbError.vbBoolean.vbVariant.vbDataObject.vbDecimal.vbByte.vbArray`.split(`.`),g=[`WScript`,`err`,`debug`,`RegExp`],_=[`description`,`firstindex`,`global`,`helpcontext`,`helpfile`,`ignorecase`,`length`,`number`,`pattern`,`source`,`value`,`count`],v=[`clear`,`execute`,`raise`,`replace`,`test`,`write`,`writeline`,`close`,`open`,`state`,`eof`,`update`,`addnew`,`end`,`createobject`,`quit`],y=[`server`,`response`,`request`,`session`,`application`],b=[`buffer`,`cachecontrol`,`charset`,`contenttype`,`expires`,`expiresabsolute`,`isclientconnected`,`pics`,`status`,`clientcertificate`,`cookies`,`form`,`querystring`,`servervariables`,`totalbytes`,`contents`,`staticobjects`,`codepage`,`lcid`,`sessionid`,`timeout`,`scripttimeout`],x=[`addheader`,`appendtolog`,`binarywrite`,`end`,`flush`,`redirect`,`binaryread`,`remove`,`removeall`,`lock`,`unlock`,`abandon`,`getlasterror`,`htmlencode`,`mappath`,`transfer`,`urlencode`],S=v.concat(_);g=g.concat(h),e.isASP&&(g=g.concat(y),S=S.concat(x,b));var C=n(f),w=n(p),T=n(m),E=n(g),D=n(S),O=`"`,k=n(c),A=n(l),j=n(u),M=n([`end`]),N=n([`do`]),P=n([`on error resume next`,`exit`]),F=n([`rem`]);function I(e,t){t.currentIndent++}function L(e,t){t.currentIndent--}function R(e,n){if(e.eatSpace())return null;if(e.peek()===`'`||e.match(F))return e.skipToEnd(),`comment`;if(e.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!e.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var c=!1;if((e.match(/^\d*\.\d+/i)||e.match(/^\d+\.\d*/)||e.match(/^\.\d+/))&&(c=!0),c)return e.eat(/J/i),`number`;var l=!1;if(e.match(/^&H[0-9a-f]+/i)||e.match(/^&O[0-7]+/i)?l=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),l=!0):e.match(/^0(?![\dx])/i)&&(l=!0),l)return e.eat(/L/i),`number`}return e.match(O)?(n.tokenize=z(e.current()),n.tokenize(e,n)):e.match(i)||e.match(r)||e.match(d)?`operator`:e.match(a)?null:e.match(o)?`bracket`:e.match(P)?(n.doInCurrentLine=!0,`keyword`):e.match(N)?(I(e,n),n.doInCurrentLine=!0,`keyword`):e.match(k)?(n.doInCurrentLine?n.doInCurrentLine=!1:I(e,n),`keyword`):e.match(A)?`keyword`:e.match(M)?(L(e,n),L(e,n),`keyword`):e.match(j)?(n.doInCurrentLine?n.doInCurrentLine=!1:L(e,n),`keyword`):e.match(C)?`keyword`:e.match(w)?`atom`:e.match(D)?`variableName.special`:e.match(T)||e.match(E)?`builtin`:e.match(s)?`variable`:(e.next(),t)}function z(e){var t=e.length==1,n=`string`;return function(r,i){for(;!r.eol();){if(r.eatWhile(/[^'"]/),r.match(e))return i.tokenize=R,n;r.eat(/['"]/)}return t&&(i.tokenize=R),n}}function B(e,n){var r=n.tokenize(e,n),i=e.current();return i===`.`?(r=n.tokenize(e,n),i=e.current(),r&&(r.substr(0,8)===`variable`||r===`builtin`||r===`keyword`)?((r===`builtin`||r===`keyword`)&&(r=`variable`),S.indexOf(i.substr(1))>-1&&(r=`keyword`),r):t):r}return{name:`vbscript`,startState:function(){return{tokenize:R,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1,ignoreKeyword:!1}},token:function(e,t){e.sol()&&(t.currentIndent+=t.nextLineIndent,t.nextLineIndent=0,t.doInCurrentLine=0);var n=B(e,t);return t.lastToken={style:n,content:e.current()},n===null&&(n=null),n},indent:function(e,t,n){var r=t.replace(/^\s+|\s+$/g,``);return r.match(j)||r.match(M)||r.match(A)?n.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*n.unit}}}var t=e({});e({isASP:!0});export{t as vbScript};