1;(function () { 2 3 var object = typeof exports != 'undefined' ? exports : this; // #8: web workers 4 var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; 5 6 function InvalidCharacterError(message) { 7 this.message = message; 8 } 9 InvalidCharacterError.prototype = new Error; 10 InvalidCharacterError.prototype.name = 'InvalidCharacterError'; 11 12 // encoder 13 // [https://gist.github.com/999166] by [https://github.com/nignag] 14 object.btoa || ( 15 object.btoa = function (input) { 16 var str = String(input); 17 for ( 18 // initialize result and counter 19 var block, charCode, idx = 0, map = chars, output = ''; 20 // if the next str index does not exist: 21 // change the mapping table to "=" 22 // check if d has no fractional digits 23 str.charAt(idx | 0) || (map = '=', idx % 1); 24 // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 25 output += map.charAt(63 & block >> 8 - idx % 1 * 8) 26 ) { 27 charCode = str.charCodeAt(idx += 3/4); 28 if (charCode > 0xFF) { 29 throw new InvalidCharacterError("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range."); 30 } 31 block = block << 8 | charCode; 32 } 33 return output; 34 }); 35 36 // decoder 37 // [https://gist.github.com/1020396] by [https://github.com/atk] 38 object.atob || ( 39 object.atob = function (input) { 40 var str = String(input).replace(/=+$/, ''); 41 if (str.length % 4 == 1) { 42 throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded."); 43 } 44 for ( 45 // initialize result and counters 46 var bc = 0, bs, buffer, idx = 0, output = ''; 47 // get next character 48 buffer = str.charAt(idx++); 49 // character found in table? initialize bit storage and add its ascii value; 50 ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, 51 // and if not first of each 4 characters, 52 // convert the first 8 bits to one ascii character 53 bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0 54 ) { 55 // try to find character in table (0-63, not found => -1) 56 buffer = chars.indexOf(buffer); 57 } 58 return output; 59 }); 60 61}());
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.