Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/embedpre.../assets/pdf/build
File: pdf.worker.js
if (this.buf1 === EOF) {
[13500] Fix | Delete
break;
[13501] Fix | Delete
}
[13502] Fix | Delete
dictMap[key] = this.getObj(cipherTransform);
[13503] Fix | Delete
}
[13504] Fix | Delete
if (lexer.beginInlineImagePos !== -1) {
[13505] Fix | Delete
dictLength = stream.pos - lexer.beginInlineImagePos;
[13506] Fix | Delete
}
[13507] Fix | Delete
const filter = this.xref.fetchIfRef(dictMap.F || dictMap.Filter);
[13508] Fix | Delete
let filterName;
[13509] Fix | Delete
if (filter instanceof Name) {
[13510] Fix | Delete
filterName = filter.name;
[13511] Fix | Delete
} else if (Array.isArray(filter)) {
[13512] Fix | Delete
const filterZero = this.xref.fetchIfRef(filter[0]);
[13513] Fix | Delete
if (filterZero instanceof Name) {
[13514] Fix | Delete
filterName = filterZero.name;
[13515] Fix | Delete
}
[13516] Fix | Delete
}
[13517] Fix | Delete
const startPos = stream.pos;
[13518] Fix | Delete
let length;
[13519] Fix | Delete
switch (filterName) {
[13520] Fix | Delete
case "DCT":
[13521] Fix | Delete
case "DCTDecode":
[13522] Fix | Delete
length = this.findDCTDecodeInlineStreamEnd(stream);
[13523] Fix | Delete
break;
[13524] Fix | Delete
case "A85":
[13525] Fix | Delete
case "ASCII85Decode":
[13526] Fix | Delete
length = this.findASCII85DecodeInlineStreamEnd(stream);
[13527] Fix | Delete
break;
[13528] Fix | Delete
case "AHx":
[13529] Fix | Delete
case "ASCIIHexDecode":
[13530] Fix | Delete
length = this.findASCIIHexDecodeInlineStreamEnd(stream);
[13531] Fix | Delete
break;
[13532] Fix | Delete
default:
[13533] Fix | Delete
length = this.findDefaultInlineStreamEnd(stream);
[13534] Fix | Delete
}
[13535] Fix | Delete
let cacheKey;
[13536] Fix | Delete
if (length < MAX_LENGTH_TO_CACHE && dictLength > 0) {
[13537] Fix | Delete
const initialStreamPos = stream.pos;
[13538] Fix | Delete
stream.pos = lexer.beginInlineImagePos;
[13539] Fix | Delete
cacheKey = getInlineImageCacheKey(stream.getBytes(dictLength + length));
[13540] Fix | Delete
stream.pos = initialStreamPos;
[13541] Fix | Delete
const cacheEntry = this.imageCache[cacheKey];
[13542] Fix | Delete
if (cacheEntry !== undefined) {
[13543] Fix | Delete
this.buf2 = Cmd.get("EI");
[13544] Fix | Delete
this.shift();
[13545] Fix | Delete
cacheEntry.reset();
[13546] Fix | Delete
return cacheEntry;
[13547] Fix | Delete
}
[13548] Fix | Delete
}
[13549] Fix | Delete
const dict = new Dict(this.xref);
[13550] Fix | Delete
for (const key in dictMap) {
[13551] Fix | Delete
dict.set(key, dictMap[key]);
[13552] Fix | Delete
}
[13553] Fix | Delete
let imageStream = stream.makeSubStream(startPos, length, dict);
[13554] Fix | Delete
if (cipherTransform) {
[13555] Fix | Delete
imageStream = cipherTransform.createStream(imageStream, length);
[13556] Fix | Delete
}
[13557] Fix | Delete
imageStream = this.filter(imageStream, dict, length);
[13558] Fix | Delete
imageStream.dict = dict;
[13559] Fix | Delete
if (cacheKey !== undefined) {
[13560] Fix | Delete
imageStream.cacheKey = `inline_img_${++this._imageId}`;
[13561] Fix | Delete
this.imageCache[cacheKey] = imageStream;
[13562] Fix | Delete
}
[13563] Fix | Delete
this.buf2 = Cmd.get("EI");
[13564] Fix | Delete
this.shift();
[13565] Fix | Delete
return imageStream;
[13566] Fix | Delete
}
[13567] Fix | Delete
#findStreamLength(startPos) {
[13568] Fix | Delete
const {
[13569] Fix | Delete
stream
[13570] Fix | Delete
} = this.lexer;
[13571] Fix | Delete
stream.pos = startPos;
[13572] Fix | Delete
const SCAN_BLOCK_LENGTH = 2048;
[13573] Fix | Delete
const signatureLength = "endstream".length;
[13574] Fix | Delete
const END_SIGNATURE = new Uint8Array([0x65, 0x6e, 0x64]);
[13575] Fix | Delete
const endLength = END_SIGNATURE.length;
[13576] Fix | Delete
const PARTIAL_SIGNATURE = [new Uint8Array([0x73, 0x74, 0x72, 0x65, 0x61, 0x6d]), new Uint8Array([0x73, 0x74, 0x65, 0x61, 0x6d]), new Uint8Array([0x73, 0x74, 0x72, 0x65, 0x61])];
[13577] Fix | Delete
const normalLength = signatureLength - endLength;
[13578] Fix | Delete
while (stream.pos < stream.end) {
[13579] Fix | Delete
const scanBytes = stream.peekBytes(SCAN_BLOCK_LENGTH);
[13580] Fix | Delete
const scanLength = scanBytes.length - signatureLength;
[13581] Fix | Delete
if (scanLength <= 0) {
[13582] Fix | Delete
break;
[13583] Fix | Delete
}
[13584] Fix | Delete
let pos = 0;
[13585] Fix | Delete
while (pos < scanLength) {
[13586] Fix | Delete
let j = 0;
[13587] Fix | Delete
while (j < endLength && scanBytes[pos + j] === END_SIGNATURE[j]) {
[13588] Fix | Delete
j++;
[13589] Fix | Delete
}
[13590] Fix | Delete
if (j >= endLength) {
[13591] Fix | Delete
let found = false;
[13592] Fix | Delete
for (const part of PARTIAL_SIGNATURE) {
[13593] Fix | Delete
const partLen = part.length;
[13594] Fix | Delete
let k = 0;
[13595] Fix | Delete
while (k < partLen && scanBytes[pos + j + k] === part[k]) {
[13596] Fix | Delete
k++;
[13597] Fix | Delete
}
[13598] Fix | Delete
if (k >= normalLength) {
[13599] Fix | Delete
found = true;
[13600] Fix | Delete
break;
[13601] Fix | Delete
}
[13602] Fix | Delete
if (k >= partLen) {
[13603] Fix | Delete
const lastByte = scanBytes[pos + j + k];
[13604] Fix | Delete
if (isWhiteSpace(lastByte)) {
[13605] Fix | Delete
info(`Found "${bytesToString([...END_SIGNATURE, ...part])}" when ` + "searching for endstream command.");
[13606] Fix | Delete
found = true;
[13607] Fix | Delete
}
[13608] Fix | Delete
break;
[13609] Fix | Delete
}
[13610] Fix | Delete
}
[13611] Fix | Delete
if (found) {
[13612] Fix | Delete
stream.pos += pos;
[13613] Fix | Delete
return stream.pos - startPos;
[13614] Fix | Delete
}
[13615] Fix | Delete
}
[13616] Fix | Delete
pos++;
[13617] Fix | Delete
}
[13618] Fix | Delete
stream.pos += scanLength;
[13619] Fix | Delete
}
[13620] Fix | Delete
return -1;
[13621] Fix | Delete
}
[13622] Fix | Delete
makeStream(dict, cipherTransform) {
[13623] Fix | Delete
const lexer = this.lexer;
[13624] Fix | Delete
let stream = lexer.stream;
[13625] Fix | Delete
lexer.skipToNextLine();
[13626] Fix | Delete
const startPos = stream.pos - 1;
[13627] Fix | Delete
let length = dict.get("Length");
[13628] Fix | Delete
if (!Number.isInteger(length)) {
[13629] Fix | Delete
info(`Bad length "${length && length.toString()}" in stream.`);
[13630] Fix | Delete
length = 0;
[13631] Fix | Delete
}
[13632] Fix | Delete
stream.pos = startPos + length;
[13633] Fix | Delete
lexer.nextChar();
[13634] Fix | Delete
if (this.tryShift() && isCmd(this.buf2, "endstream")) {
[13635] Fix | Delete
this.shift();
[13636] Fix | Delete
} else {
[13637] Fix | Delete
length = this.#findStreamLength(startPos);
[13638] Fix | Delete
if (length < 0) {
[13639] Fix | Delete
throw new FormatError("Missing endstream command.");
[13640] Fix | Delete
}
[13641] Fix | Delete
lexer.nextChar();
[13642] Fix | Delete
this.shift();
[13643] Fix | Delete
this.shift();
[13644] Fix | Delete
}
[13645] Fix | Delete
this.shift();
[13646] Fix | Delete
stream = stream.makeSubStream(startPos, length, dict);
[13647] Fix | Delete
if (cipherTransform) {
[13648] Fix | Delete
stream = cipherTransform.createStream(stream, length);
[13649] Fix | Delete
}
[13650] Fix | Delete
stream = this.filter(stream, dict, length);
[13651] Fix | Delete
stream.dict = dict;
[13652] Fix | Delete
return stream;
[13653] Fix | Delete
}
[13654] Fix | Delete
filter(stream, dict, length) {
[13655] Fix | Delete
let filter = dict.get("F", "Filter");
[13656] Fix | Delete
let params = dict.get("DP", "DecodeParms");
[13657] Fix | Delete
if (filter instanceof Name) {
[13658] Fix | Delete
if (Array.isArray(params)) {
[13659] Fix | Delete
warn("/DecodeParms should not be an Array, when /Filter is a Name.");
[13660] Fix | Delete
}
[13661] Fix | Delete
return this.makeFilter(stream, filter.name, length, params);
[13662] Fix | Delete
}
[13663] Fix | Delete
let maybeLength = length;
[13664] Fix | Delete
if (Array.isArray(filter)) {
[13665] Fix | Delete
const filterArray = filter;
[13666] Fix | Delete
const paramsArray = params;
[13667] Fix | Delete
for (let i = 0, ii = filterArray.length; i < ii; ++i) {
[13668] Fix | Delete
filter = this.xref.fetchIfRef(filterArray[i]);
[13669] Fix | Delete
if (!(filter instanceof Name)) {
[13670] Fix | Delete
throw new FormatError(`Bad filter name "${filter}"`);
[13671] Fix | Delete
}
[13672] Fix | Delete
params = null;
[13673] Fix | Delete
if (Array.isArray(paramsArray) && i in paramsArray) {
[13674] Fix | Delete
params = this.xref.fetchIfRef(paramsArray[i]);
[13675] Fix | Delete
}
[13676] Fix | Delete
stream = this.makeFilter(stream, filter.name, maybeLength, params);
[13677] Fix | Delete
maybeLength = null;
[13678] Fix | Delete
}
[13679] Fix | Delete
}
[13680] Fix | Delete
return stream;
[13681] Fix | Delete
}
[13682] Fix | Delete
makeFilter(stream, name, maybeLength, params) {
[13683] Fix | Delete
if (maybeLength === 0) {
[13684] Fix | Delete
warn(`Empty "${name}" stream.`);
[13685] Fix | Delete
return new NullStream();
[13686] Fix | Delete
}
[13687] Fix | Delete
try {
[13688] Fix | Delete
switch (name) {
[13689] Fix | Delete
case "Fl":
[13690] Fix | Delete
case "FlateDecode":
[13691] Fix | Delete
if (params) {
[13692] Fix | Delete
return new PredictorStream(new FlateStream(stream, maybeLength), maybeLength, params);
[13693] Fix | Delete
}
[13694] Fix | Delete
return new FlateStream(stream, maybeLength);
[13695] Fix | Delete
case "LZW":
[13696] Fix | Delete
case "LZWDecode":
[13697] Fix | Delete
let earlyChange = 1;
[13698] Fix | Delete
if (params) {
[13699] Fix | Delete
if (params.has("EarlyChange")) {
[13700] Fix | Delete
earlyChange = params.get("EarlyChange");
[13701] Fix | Delete
}
[13702] Fix | Delete
return new PredictorStream(new LZWStream(stream, maybeLength, earlyChange), maybeLength, params);
[13703] Fix | Delete
}
[13704] Fix | Delete
return new LZWStream(stream, maybeLength, earlyChange);
[13705] Fix | Delete
case "DCT":
[13706] Fix | Delete
case "DCTDecode":
[13707] Fix | Delete
return new JpegStream(stream, maybeLength, params);
[13708] Fix | Delete
case "JPX":
[13709] Fix | Delete
case "JPXDecode":
[13710] Fix | Delete
return new JpxStream(stream, maybeLength, params);
[13711] Fix | Delete
case "A85":
[13712] Fix | Delete
case "ASCII85Decode":
[13713] Fix | Delete
return new Ascii85Stream(stream, maybeLength);
[13714] Fix | Delete
case "AHx":
[13715] Fix | Delete
case "ASCIIHexDecode":
[13716] Fix | Delete
return new AsciiHexStream(stream, maybeLength);
[13717] Fix | Delete
case "CCF":
[13718] Fix | Delete
case "CCITTFaxDecode":
[13719] Fix | Delete
return new CCITTFaxStream(stream, maybeLength, params);
[13720] Fix | Delete
case "RL":
[13721] Fix | Delete
case "RunLengthDecode":
[13722] Fix | Delete
return new RunLengthStream(stream, maybeLength);
[13723] Fix | Delete
case "JBIG2Decode":
[13724] Fix | Delete
return new Jbig2Stream(stream, maybeLength, params);
[13725] Fix | Delete
}
[13726] Fix | Delete
warn(`Filter "${name}" is not supported.`);
[13727] Fix | Delete
return stream;
[13728] Fix | Delete
} catch (ex) {
[13729] Fix | Delete
if (ex instanceof MissingDataException) {
[13730] Fix | Delete
throw ex;
[13731] Fix | Delete
}
[13732] Fix | Delete
warn(`Invalid stream: "${ex}"`);
[13733] Fix | Delete
return new NullStream();
[13734] Fix | Delete
}
[13735] Fix | Delete
}
[13736] Fix | Delete
}
[13737] Fix | Delete
const specialChars = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
[13738] Fix | Delete
function toHexDigit(ch) {
[13739] Fix | Delete
if (ch >= 0x30 && ch <= 0x39) {
[13740] Fix | Delete
return ch & 0x0f;
[13741] Fix | Delete
}
[13742] Fix | Delete
if (ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66) {
[13743] Fix | Delete
return (ch & 0x0f) + 9;
[13744] Fix | Delete
}
[13745] Fix | Delete
return -1;
[13746] Fix | Delete
}
[13747] Fix | Delete
class Lexer {
[13748] Fix | Delete
constructor(stream, knownCommands = null) {
[13749] Fix | Delete
this.stream = stream;
[13750] Fix | Delete
this.nextChar();
[13751] Fix | Delete
this.strBuf = [];
[13752] Fix | Delete
this.knownCommands = knownCommands;
[13753] Fix | Delete
this._hexStringNumWarn = 0;
[13754] Fix | Delete
this.beginInlineImagePos = -1;
[13755] Fix | Delete
}
[13756] Fix | Delete
nextChar() {
[13757] Fix | Delete
return this.currentChar = this.stream.getByte();
[13758] Fix | Delete
}
[13759] Fix | Delete
peekChar() {
[13760] Fix | Delete
return this.stream.peekByte();
[13761] Fix | Delete
}
[13762] Fix | Delete
getNumber() {
[13763] Fix | Delete
let ch = this.currentChar;
[13764] Fix | Delete
let eNotation = false;
[13765] Fix | Delete
let divideBy = 0;
[13766] Fix | Delete
let sign = 1;
[13767] Fix | Delete
if (ch === 0x2d) {
[13768] Fix | Delete
sign = -1;
[13769] Fix | Delete
ch = this.nextChar();
[13770] Fix | Delete
if (ch === 0x2d) {
[13771] Fix | Delete
ch = this.nextChar();
[13772] Fix | Delete
}
[13773] Fix | Delete
} else if (ch === 0x2b) {
[13774] Fix | Delete
ch = this.nextChar();
[13775] Fix | Delete
}
[13776] Fix | Delete
if (ch === 0x0a || ch === 0x0d) {
[13777] Fix | Delete
do {
[13778] Fix | Delete
ch = this.nextChar();
[13779] Fix | Delete
} while (ch === 0x0a || ch === 0x0d);
[13780] Fix | Delete
}
[13781] Fix | Delete
if (ch === 0x2e) {
[13782] Fix | Delete
divideBy = 10;
[13783] Fix | Delete
ch = this.nextChar();
[13784] Fix | Delete
}
[13785] Fix | Delete
if (ch < 0x30 || ch > 0x39) {
[13786] Fix | Delete
const msg = `Invalid number: ${String.fromCharCode(ch)} (charCode ${ch})`;
[13787] Fix | Delete
if (isWhiteSpace(ch) || ch === -1) {
[13788] Fix | Delete
info(`Lexer.getNumber - "${msg}".`);
[13789] Fix | Delete
return 0;
[13790] Fix | Delete
}
[13791] Fix | Delete
throw new FormatError(msg);
[13792] Fix | Delete
}
[13793] Fix | Delete
let baseValue = ch - 0x30;
[13794] Fix | Delete
let powerValue = 0;
[13795] Fix | Delete
let powerValueSign = 1;
[13796] Fix | Delete
while ((ch = this.nextChar()) >= 0) {
[13797] Fix | Delete
if (ch >= 0x30 && ch <= 0x39) {
[13798] Fix | Delete
const currentDigit = ch - 0x30;
[13799] Fix | Delete
if (eNotation) {
[13800] Fix | Delete
powerValue = powerValue * 10 + currentDigit;
[13801] Fix | Delete
} else {
[13802] Fix | Delete
if (divideBy !== 0) {
[13803] Fix | Delete
divideBy *= 10;
[13804] Fix | Delete
}
[13805] Fix | Delete
baseValue = baseValue * 10 + currentDigit;
[13806] Fix | Delete
}
[13807] Fix | Delete
} else if (ch === 0x2e) {
[13808] Fix | Delete
if (divideBy === 0) {
[13809] Fix | Delete
divideBy = 1;
[13810] Fix | Delete
} else {
[13811] Fix | Delete
break;
[13812] Fix | Delete
}
[13813] Fix | Delete
} else if (ch === 0x2d) {
[13814] Fix | Delete
warn("Badly formatted number: minus sign in the middle");
[13815] Fix | Delete
} else if (ch === 0x45 || ch === 0x65) {
[13816] Fix | Delete
ch = this.peekChar();
[13817] Fix | Delete
if (ch === 0x2b || ch === 0x2d) {
[13818] Fix | Delete
powerValueSign = ch === 0x2d ? -1 : 1;
[13819] Fix | Delete
this.nextChar();
[13820] Fix | Delete
} else if (ch < 0x30 || ch > 0x39) {
[13821] Fix | Delete
break;
[13822] Fix | Delete
}
[13823] Fix | Delete
eNotation = true;
[13824] Fix | Delete
} else {
[13825] Fix | Delete
break;
[13826] Fix | Delete
}
[13827] Fix | Delete
}
[13828] Fix | Delete
if (divideBy !== 0) {
[13829] Fix | Delete
baseValue /= divideBy;
[13830] Fix | Delete
}
[13831] Fix | Delete
if (eNotation) {
[13832] Fix | Delete
baseValue *= 10 ** (powerValueSign * powerValue);
[13833] Fix | Delete
}
[13834] Fix | Delete
return sign * baseValue;
[13835] Fix | Delete
}
[13836] Fix | Delete
getString() {
[13837] Fix | Delete
let numParen = 1;
[13838] Fix | Delete
let done = false;
[13839] Fix | Delete
const strBuf = this.strBuf;
[13840] Fix | Delete
strBuf.length = 0;
[13841] Fix | Delete
let ch = this.nextChar();
[13842] Fix | Delete
while (true) {
[13843] Fix | Delete
let charBuffered = false;
[13844] Fix | Delete
switch (ch | 0) {
[13845] Fix | Delete
case -1:
[13846] Fix | Delete
warn("Unterminated string");
[13847] Fix | Delete
done = true;
[13848] Fix | Delete
break;
[13849] Fix | Delete
case 0x28:
[13850] Fix | Delete
++numParen;
[13851] Fix | Delete
strBuf.push("(");
[13852] Fix | Delete
break;
[13853] Fix | Delete
case 0x29:
[13854] Fix | Delete
if (--numParen === 0) {
[13855] Fix | Delete
this.nextChar();
[13856] Fix | Delete
done = true;
[13857] Fix | Delete
} else {
[13858] Fix | Delete
strBuf.push(")");
[13859] Fix | Delete
}
[13860] Fix | Delete
break;
[13861] Fix | Delete
case 0x5c:
[13862] Fix | Delete
ch = this.nextChar();
[13863] Fix | Delete
switch (ch) {
[13864] Fix | Delete
case -1:
[13865] Fix | Delete
warn("Unterminated string");
[13866] Fix | Delete
done = true;
[13867] Fix | Delete
break;
[13868] Fix | Delete
case 0x6e:
[13869] Fix | Delete
strBuf.push("\n");
[13870] Fix | Delete
break;
[13871] Fix | Delete
case 0x72:
[13872] Fix | Delete
strBuf.push("\r");
[13873] Fix | Delete
break;
[13874] Fix | Delete
case 0x74:
[13875] Fix | Delete
strBuf.push("\t");
[13876] Fix | Delete
break;
[13877] Fix | Delete
case 0x62:
[13878] Fix | Delete
strBuf.push("\b");
[13879] Fix | Delete
break;
[13880] Fix | Delete
case 0x66:
[13881] Fix | Delete
strBuf.push("\f");
[13882] Fix | Delete
break;
[13883] Fix | Delete
case 0x5c:
[13884] Fix | Delete
case 0x28:
[13885] Fix | Delete
case 0x29:
[13886] Fix | Delete
strBuf.push(String.fromCharCode(ch));
[13887] Fix | Delete
break;
[13888] Fix | Delete
case 0x30:
[13889] Fix | Delete
case 0x31:
[13890] Fix | Delete
case 0x32:
[13891] Fix | Delete
case 0x33:
[13892] Fix | Delete
case 0x34:
[13893] Fix | Delete
case 0x35:
[13894] Fix | Delete
case 0x36:
[13895] Fix | Delete
case 0x37:
[13896] Fix | Delete
let x = ch & 0x0f;
[13897] Fix | Delete
ch = this.nextChar();
[13898] Fix | Delete
charBuffered = true;
[13899] Fix | Delete
if (ch >= 0x30 && ch <= 0x37) {
[13900] Fix | Delete
x = (x << 3) + (ch & 0x0f);
[13901] Fix | Delete
ch = this.nextChar();
[13902] Fix | Delete
if (ch >= 0x30 && ch <= 0x37) {
[13903] Fix | Delete
charBuffered = false;
[13904] Fix | Delete
x = (x << 3) + (ch & 0x0f);
[13905] Fix | Delete
}
[13906] Fix | Delete
}
[13907] Fix | Delete
strBuf.push(String.fromCharCode(x));
[13908] Fix | Delete
break;
[13909] Fix | Delete
case 0x0d:
[13910] Fix | Delete
if (this.peekChar() === 0x0a) {
[13911] Fix | Delete
this.nextChar();
[13912] Fix | Delete
}
[13913] Fix | Delete
break;
[13914] Fix | Delete
case 0x0a:
[13915] Fix | Delete
break;
[13916] Fix | Delete
default:
[13917] Fix | Delete
strBuf.push(String.fromCharCode(ch));
[13918] Fix | Delete
break;
[13919] Fix | Delete
}
[13920] Fix | Delete
break;
[13921] Fix | Delete
default:
[13922] Fix | Delete
strBuf.push(String.fromCharCode(ch));
[13923] Fix | Delete
break;
[13924] Fix | Delete
}
[13925] Fix | Delete
if (done) {
[13926] Fix | Delete
break;
[13927] Fix | Delete
}
[13928] Fix | Delete
if (!charBuffered) {
[13929] Fix | Delete
ch = this.nextChar();
[13930] Fix | Delete
}
[13931] Fix | Delete
}
[13932] Fix | Delete
return strBuf.join("");
[13933] Fix | Delete
}
[13934] Fix | Delete
getName() {
[13935] Fix | Delete
let ch, previousCh;
[13936] Fix | Delete
const strBuf = this.strBuf;
[13937] Fix | Delete
strBuf.length = 0;
[13938] Fix | Delete
while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) {
[13939] Fix | Delete
if (ch === 0x23) {
[13940] Fix | Delete
ch = this.nextChar();
[13941] Fix | Delete
if (specialChars[ch]) {
[13942] Fix | Delete
warn("Lexer_getName: " + "NUMBER SIGN (#) should be followed by a hexadecimal number.");
[13943] Fix | Delete
strBuf.push("#");
[13944] Fix | Delete
break;
[13945] Fix | Delete
}
[13946] Fix | Delete
const x = toHexDigit(ch);
[13947] Fix | Delete
if (x !== -1) {
[13948] Fix | Delete
previousCh = ch;
[13949] Fix | Delete
ch = this.nextChar();
[13950] Fix | Delete
const x2 = toHexDigit(ch);
[13951] Fix | Delete
if (x2 === -1) {
[13952] Fix | Delete
warn(`Lexer_getName: Illegal digit (${String.fromCharCode(ch)}) ` + "in hexadecimal number.");
[13953] Fix | Delete
strBuf.push("#", String.fromCharCode(previousCh));
[13954] Fix | Delete
if (specialChars[ch]) {
[13955] Fix | Delete
break;
[13956] Fix | Delete
}
[13957] Fix | Delete
strBuf.push(String.fromCharCode(ch));
[13958] Fix | Delete
continue;
[13959] Fix | Delete
}
[13960] Fix | Delete
strBuf.push(String.fromCharCode(x << 4 | x2));
[13961] Fix | Delete
} else {
[13962] Fix | Delete
strBuf.push("#", String.fromCharCode(ch));
[13963] Fix | Delete
}
[13964] Fix | Delete
} else {
[13965] Fix | Delete
strBuf.push(String.fromCharCode(ch));
[13966] Fix | Delete
}
[13967] Fix | Delete
}
[13968] Fix | Delete
if (strBuf.length > 127) {
[13969] Fix | Delete
warn(`Name token is longer than allowed by the spec: ${strBuf.length}`);
[13970] Fix | Delete
}
[13971] Fix | Delete
return Name.get(strBuf.join(""));
[13972] Fix | Delete
}
[13973] Fix | Delete
_hexStringWarn(ch) {
[13974] Fix | Delete
const MAX_HEX_STRING_NUM_WARN = 5;
[13975] Fix | Delete
if (this._hexStringNumWarn++ === MAX_HEX_STRING_NUM_WARN) {
[13976] Fix | Delete
warn("getHexString - ignoring additional invalid characters.");
[13977] Fix | Delete
return;
[13978] Fix | Delete
}
[13979] Fix | Delete
if (this._hexStringNumWarn > MAX_HEX_STRING_NUM_WARN) {
[13980] Fix | Delete
return;
[13981] Fix | Delete
}
[13982] Fix | Delete
warn(`getHexString - ignoring invalid character: ${ch}`);
[13983] Fix | Delete
}
[13984] Fix | Delete
getHexString() {
[13985] Fix | Delete
const strBuf = this.strBuf;
[13986] Fix | Delete
strBuf.length = 0;
[13987] Fix | Delete
let ch = this.currentChar;
[13988] Fix | Delete
let isFirstHex = true;
[13989] Fix | Delete
let firstDigit, secondDigit;
[13990] Fix | Delete
this._hexStringNumWarn = 0;
[13991] Fix | Delete
while (true) {
[13992] Fix | Delete
if (ch < 0) {
[13993] Fix | Delete
warn("Unterminated hex string");
[13994] Fix | Delete
break;
[13995] Fix | Delete
} else if (ch === 0x3e) {
[13996] Fix | Delete
this.nextChar();
[13997] Fix | Delete
break;
[13998] Fix | Delete
} else if (specialChars[ch] === 1) {
[13999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function