Temporary files before deleting them

This commit is contained in:
Suzanne Soy 2021-10-06 13:47:21 +01:00
parent c2e9a53d4e
commit ac9a6bfd06
4 changed files with 79515 additions and 0 deletions

1
2 Normal file

File diff suppressed because one or more lines are too long

546
_2 Normal file
View File

@ -0,0 +1,546 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<pre id="self-src"></pre>
<script src="sha256.js"></script>
<script>
function hexVarintToInteger(str) {
var s = String(str);
var total = 0;
var offset = 1;
for (var i = 0; i < s.length; i += 2) {
var byte = parseInt(s.substring(i, i+2), 16);
var isLast = null;
if (byte >= 128) {
byte -= 128;
isLast = false;
} else {
isLast = true;
}
total += byte * offset;
offset *= Math.pow(2,7);
}
return total;
}
function hexStringToIntegerList(str) {
var s = String(str);
var result = [];
for (var i = 0; i < s.length; i+=2) {
result[i/2] = parseInt(s.substring(i, i+2), 16);
}
return result;
}
function sha256IntegerListToMultihash(base, lst) {
// 0x20 is the length of the hash.
var i = 0;
var result = [];
if (base == 32) {
// For some reason these are present in the base32 CIDs but not in the base16 CIDs
result[i++] = parseInt('01', 16);
result[i++] = parseInt('70', 16);
}
result[i++] = parseInt('12', 16);
result[i++] = parseInt('20', 16);
for (var j = 0; j < lst.length; j++) {
result[j+i] = lst[j];
}
return result;
}
function integerListToLowercaseBase16Multibase(lst) {
var result = '';
for (var i = 0; i < lst.length; i++) {
var hex = lst[i].toString(16);
if (hex.length < 2) { hex = '0' + hex; }
result += hex;
}
return 'f' + result;
}
function int8ListToBitList(lst) {
var result = [];
for (var i = 0; i < lst.length; i++) {
result[i*8+0] = (lst[i] & 128) ? 1 : 0;
result[i*8+1] = (lst[i] & 64) ? 1 : 0;
result[i*8+2] = (lst[i] & 32) ? 1 : 0;
result[i*8+3] = (lst[i] & 16) ? 1 : 0;
result[i*8+4] = (lst[i] & 8) ? 1 : 0;
result[i*8+5] = (lst[i] & 4) ? 1 : 0;
result[i*8+6] = (lst[i] & 2) ? 1 : 0;
result[i*8+7] = (lst[i] & 1) ? 1 : 0;
}
return result;
}
function base32StringToBitList(str) {
var baseChars = 'abcdefghijklmnopqrstuvwxyz234567';
var s = String(str);
var result = [];
for (var i = 0; i < s.length; i++) {
var part = baseChars.indexOf(s[i]);
//for (var j = 0; j < 6; j++) {
// result[i*6+j] = (part & Math.pow(2, 6-1-j)) ? 1 : 0;
//}
result[i*5+0] = (part & 16) ? 1 : 0;
result[i*5+1] = (part & 8) ? 1 : 0;
result[i*5+2] = (part & 4) ? 1 : 0;
result[i*5+3] = (part & 2) ? 1 : 0;
result[i*5+4] = (part & 1) ? 1 : 0;
}
return result;
}
// https://gist.github.com/diafygi/90a3e80ca1c2793220e5/, wtfpl
var from_b58 = function(S,A){var d=[],b=[],i,j,c,n;for(i in S){j=0,c=A.indexOf(S[i]);if(c<0)return undefined;c||b.length^i?i:b.push(0);while(j in d||c){n=d[j];n=n?n*58+c:c;c=n>>8;d[j]=n%256;j++}}while(j--)b.push(d[j]);return new Uint8Array(b)};
function base58StringToHexString(str) {
var baseChars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
var ints = from_b58(String(str), baseChars);
var result = '';
for (var i = 0; i < ints.length; i++) {
var hex = ints[i].toString(16);
if (hex.length < 2) { hex = '0' + hex; }
result += hex;
}
return result;
}
function integerListToLowercaseBase32Multibase(lst) {
var baseChars = 'abcdefghijklmnopqrstuvwxyz234567';
var result = '';
var l = int8ListToBitList(lst);
for (var i = 0; i < l.length; i+= 5) {
var get = function(j) { return ((i+j) < l.length) ? l[i+j] : 0; };
var part = get(0) * 16 + get(1) * 8 + get(2) * 4 + get(3) * 2 + get(4) * 1;
result += baseChars[part];
}
return 'b' + result;
}
function base32StringToBase16LowercaseMultibase(str) {
var baseChars = '0123456789abcdef';
var result = '';
var l = base32StringToBitList(str);
for (var i = 0; i < l.length; i+= 4) {
var get = function(j) { return ((i+j) < l.length) ? l[i+j] : 0; };
var part = get(0) * 8 + get(1) * 4 + get(2) * 2 + get(3) * 1;
result += baseChars[part];
}
return 'f' + result;
}
function integerToHexVarint(i) {
// This function takes a JavaScript integer and returns a hexadecimal string representing that integer encoded as a protobuf varint according to the rules explained at
// https://developers.google.com/protocol-buffers/docs/encoding
var result = '';
if (i < 0) {
throw "Negative integers are supported by Varints but not by this implementation.";
} else if (i == 0) {
return '00';
} else {
while (i > 0) {
// Get the least significant 7 bits (0..127) of the integer and shift the rest
var leastSignificantBits = i & 127;
i = i >> 7;
// if this is not the last chunk, set the most significant bit to indicate that the value will be continued in the next byte(s).
if (i > 0) { leastSignificantBits |= 128; }
// Convert to hexadecimal and pad with 0 to get two digits if needed
var hex = leastSignificantBits.toString(16);
if (hex.length < 2) { hex = '0' + hex; }
result += hex;
}
return result;
}
}
function utf8StringToHex(str) {
// The input must already be a string for which .charCodeAt() always returns a value <256 (i.e. a string encoded into utf-8 and those values re-encoded into javascript's internal utf-16)
var s = String(str);
var result = '';
for (var i = 0; i < s.length; i++) {
var hex = s.charCodeAt(i).toString(16);
if (hex.length < 2) { hex = '0' + hex; }
result += hex;
}
return result;
}
function ipfsBlockWithLinks(object) {
// object should be an { "Links": links, "Data": hex-encoded string } object
// Aside from encoding differences, it should match the contents of the "ipfs object get --data-encoding=base64 Qm…hash" command
//
// "Links" should be an array of { 'Hash': cidv1Base16Lowercase, 'Size': Integer } objects.
// This functions returns a hexadecimal string which encodes the ipfs block with the given links.
// This is a partial implementation which is barely sufficient for re-hashing a file, many of the configurable values are hardcoded.
// A Qm…hash can be converted to a "CIDv1 base16 lowercase" hash on the command-line using the following code:
// ipfs cid format -v 1 -b base16 -f='%m' Qm…hash
//
// "File" should be the hex-encoded (base 16, lowercase, no prefix) data, or "false" when the entry is not a DAG leaf
//
// The "Data" field as given by the following command
// ipfs object get --data-encoding=base64 Qm…hash | jq -r '.Data' | base64 -d | xxd -ps
// is automatically generated using the "File" field if present and the various sizes etc.
var links = object.Links;
var fileHex = object.File;
var result = '';
for (var i = 0; i < links.length; i++) {
var cid = links[i].Hash;
var size = links[i].Size;
var name = links[i].Name;
var fileHex = object.File;
result += '12';
var encodedLink = ''
// Some sort of separator or terminator
encodedLink += '0a';
// size of the CID (32 bytes + 2 bytes header = 34 bytes = 22 in hex)
encodedLink += '22';
if (cid[0] != 'f' || cid.length != 69) {
if (cid[0] == 'Q' && cid[1] == 'm' && cid.length == 46) {
cid = 'f' + base58StringToHexString(cid);
if (cid[0] != 'f' || cid.length != 69) {
throw "Internal error";
}
} else {
throw "Expected a lowercase base16 CIDv1 or a Qm…hash in base58 (length 46). The base16 encoding should start with 'f'" +
/*+*/ " and have a length of 32 bytes (64 hexadecimal characters) plus the leading prefix 'f1220' (length of 69 characters in total)" +
/*+*/ " as described in https://github.com/multiformats/multibase. The given hash started with " + cid[0] + " and had a length of " + cid.length;
}
}
// Add the CID.
encodedLink += cid.substring(1);
// Add a second hardcoded part of the encoding.
encodedLink += '12';
// length of filename
encodedLink += integerToHexVarint(name.length);
encodedLink += utf8StringToHex(name);
encodedLink += '18';
// Add the size.
encodedLink += integerToHexVarint(size);
var encodedLinkSize = encodedLink.length/2
result += integerToHexVarint(encodedLinkSize);
result += encodedLink;
}
// Generate the "Data" field
var totalSize = (fileHex || '').length / 2;
for (var i = 0; i < object.Links.length; i++) {
totalSize += object.Links[i].ContentSize;
}
var encodedData = '';
if (object.isFile) {
// '08' '02'
encodedData += '08' + '02';
// field 12 seems to be optional (for DAG nodes with links (groups of blocks and directories))
if (fileHex !== false) {
encodedData += '12';
encodedData += integerToHexVarint(totalSize);
encodedData += fileHex;
}
// '18' [8f b0 15 = total size of contents of the file = 35022300]
encodedData += '18' + integerToHexVarint(totalSize);
for (var j = 0; j < object.Links.length; j++) {
// 20 [80 80 10 = size of contents of block 1 = 262144]
// 20 [8f b0 05 = size of contents of block 2 = 88079]
encodedData += '20';
encodedData += integerToHexVarint(object.Links[j].ContentSize);
}
} else {
// directory
encodedData += '08' + '01';
}
// Some sort of separator or terminator
result += '0a';
var encodedDataSize = encodedData.length / 2;
result += integerToHexVarint(encodedDataSize);
result += encodedData;
return result;
}
function ipfsHashWithLinks(base, object) {
var block = hexStringToIntegerList(ipfsBlockWithLinks(object));
var hash = sha256IntegerListToMultihash(base, sha256(block));
if (base == 16) {
return { "hash" : integerListToLowercaseBase16Multibase(hash), "block" : block };
} else {
return { "hash" : integerListToLowercaseBase32Multibase(hash), "block" : block };
}
}
// Replace the following string by "XXX_PLACEHOLDER_XXX", then convert the file to hexadecimal
// with hexLineWidth nibbles per line, each line formatted without any indentation as
// "abcdef00abcdef…" +
// except for the last line formatted as
// "abcdef00abcdef…";
// and the first line which starts immediately after the = sign.
var src1 = "3c68746d6c3e0a3c686561643e0a3c6d65746120687474702d65717569763d22436f6e74656e742d547970652220636f6e74656e743d22746578742f68746d6c3b20636861727365743d7574662d3822" +
"202f3e0a3c2f686561643e0a3c626f64793e0a3c7072652069643d2273656c662d737263223e3c2f7072653e0a3c736372697074207372633d227368613235362e6a73223e3c2f7363726970743e0a3c" +
"7363726970743e0a66756e6374696f6e20686578566172696e74546f496e74656765722873747229207b0a20207661722073203d20537472696e6728737472293b0a202076617220746f74616c203d20" +
"303b0a2020766172206f6666736574203d20313b0a2020666f7220287661722069203d20303b2069203c20732e6c656e6774683b2069202b3d203229207b0a202020207661722062797465203d207061" +
"727365496e7428732e737562737472696e6728692c20692b32292c203136293b0a202020207661722069734c617374203d206e756c6c3b0a202020206966202862797465203e3d2031323829207b0a20" +
"202020202062797465202d3d203132383b0a20202020202069734c617374203d2066616c73653b0a202020207d20656c7365207b0a20202020202069734c617374203d20747275653b0a202020207d0a" +
"20202020746f74616c202b3d2062797465202a206f66667365743b0a202020206f6666736574202a3d204d6174682e706f7728322c37293b0a20207d0a202072657475726e20746f74616c3b0a7d0a0a" +
"66756e6374696f6e20686578537472696e67546f496e74656765724c6973742873747229207b0a20207661722073203d20537472696e6728737472293b0a202076617220726573756c74203d205b5d3b" +
"0a2020666f7220287661722069203d20303b2069203c20732e6c656e6774683b20692b3d3229207b0a20202020726573756c745b692f325d203d207061727365496e7428732e737562737472696e6728" +
"692c20692b32292c203136293b0a20207d0a202072657475726e20726573756c743b0a7d0a0a66756e6374696f6e20736861323536496e74656765724c697374546f4d756c7469686173682862617365" +
"2c206c737429207b0a20202f2f203078323020697320746865206c656e677468206f662074686520686173682e0a20207661722069203d20303b0a202076617220726573756c74203d205b5d3b0a2020" +
"6966202862617365203d3d20333229207b0a202020202f2f20466f7220736f6d6520726561736f6e207468657365206172652070726573656e7420696e20746865206261736533322043494473206275" +
"74206e6f7420696e207468652062617365313620434944730a20202020726573756c745b692b2b5d203d207061727365496e7428273031272c203136293b0a20202020726573756c745b692b2b5d203d" +
"207061727365496e7428273730272c203136293b0a20207d0a2020726573756c745b692b2b5d203d207061727365496e7428273132272c203136293b0a2020726573756c745b692b2b5d203d20706172" +
"7365496e7428273230272c203136293b0a2020666f722028766172206a203d20303b206a203c206c73742e6c656e6774683b206a2b2b29207b0a20202020726573756c745b6a2b695d203d206c73745b" +
"6a5d3b0a20207d0a202072657475726e20726573756c743b0a7d0a0a66756e6374696f6e20696e74656765724c697374546f4c6f776572636173654261736531364d756c746962617365286c73742920" +
"7b0a202076617220726573756c74203d2027273b0a2020666f7220287661722069203d20303b2069203c206c73742e6c656e6774683b20692b2b29207b0a2020202076617220686578203d206c73745b" +
"695d2e746f537472696e67283136293b0a20202020696620286865782e6c656e677468203c203229207b20686578203d20273027202b206865783b207d0a20202020726573756c74202b3d206865783b" +
"0a20207d0a202072657475726e20276627202b20726573756c743b0a7d0a0a66756e6374696f6e20696e74384c697374546f4269744c697374286c737429207b0a202076617220726573756c74203d20" +
"5b5d3b0a2020666f7220287661722069203d20303b2069203c206c73742e6c656e6774683b20692b2b29207b0a20202020726573756c745b692a382b305d203d20286c73745b695d2026203132382920" +
"3f2031203a20303b0a20202020726573756c745b692a382b315d203d20286c73745b695d202620363429203f2031203a20303b0a20202020726573756c745b692a382b325d203d20286c73745b695d20" +
"2620333229203f2031203a20303b0a20202020726573756c745b692a382b335d203d20286c73745b695d202620313629203f2031203a20303b0a20202020726573756c745b692a382b345d203d20286c" +
"73745b695d2026203829203f2031203a20303b0a20202020726573756c745b692a382b355d203d20286c73745b695d2026203429203f2031203a20303b0a20202020726573756c745b692a382b365d20" +
"3d20286c73745b695d2026203229203f2031203a20303b0a20202020726573756c745b692a382b375d203d20286c73745b695d2026203129203f2031203a20303b0a20207d0a202072657475726e2072" +
"6573756c743b0a7d0a0a66756e6374696f6e20626173653332537472696e67546f4269744c6973742873747229207b0a202076617220626173654368617273203d20276162636465666768696a6b6c6d" +
"6e6f707172737475767778797a323334353637273b0a20207661722073203d20537472696e6728737472293b0a202076617220726573756c74203d205b5d3b0a2020666f7220287661722069203d2030" +
"3b2069203c20732e6c656e6774683b20692b2b29207b0a202020207661722070617274203d206261736543686172732e696e6465784f6628735b695d293b0a202020202f2f666f722028766172206a20" +
"3d20303b206a203c20363b206a2b2b29207b0a202020202f2f2020726573756c745b692a362b6a5d203d2028706172742026204d6174682e706f7728322c20362d312d6a2929203f2031203a20303b0a" +
"202020202f2f7d0a20202020726573756c745b692a352b305d203d202870617274202620313629203f2031203a20303b0a20202020726573756c745b692a352b315d203d202870617274202620382920" +
"3f2031203a20303b0a20202020726573756c745b692a352b325d203d2028706172742026203429203f2031203a20303b0a20202020726573756c745b692a352b335d203d202870617274202620322920" +
"3f2031203a20303b0a20202020726573756c745b692a352b345d203d2028706172742026203129203f2031203a20303b0a20207d0a202072657475726e20726573756c743b0a7d0a0a2f2f2068747470" +
"733a2f2f676973742e6769746875622e636f6d2f646961667967692f39306133653830636131633237393332323065352f2c20777466706c0a7661722066726f6d5f623538203d2066756e6374696f6e" +
"28532c41297b76617220643d5b5d2c623d5b5d2c692c6a2c632c6e3b666f72286920696e2053297b6a3d302c633d412e696e6465784f6628535b695d293b696628633c302972657475726e20756e6465" +
"66696e65643b637c7c622e6c656e6774685e693f693a622e707573682830293b7768696c65286a20696e20647c7c63297b6e3d645b6a5d3b6e3d6e3f6e2a35382b633a633b633d6e3e3e383b645b6a5d" +
"3d6e253235363b6a2b2b7d7d7768696c65286a2d2d29622e7075736828645b6a5d293b72657475726e206e65772055696e743841727261792862297d3b0a0a66756e6374696f6e206261736535385374" +
"72696e67546f486578537472696e672873747229207b0a202076617220626173654368617273203d202731323334353637383941424344454647484a4b4c4d4e505152535455565758595a6162636465" +
"666768696a6b6d6e6f707172737475767778797a273b0a202076617220696e7473203d2066726f6d5f62353828537472696e6728737472292c20626173654368617273293b0a20207661722072657375" +
"6c74203d2027273b0a2020666f7220287661722069203d20303b2069203c20696e74732e6c656e6774683b20692b2b29207b0a2020202076617220686578203d20696e74735b695d2e746f537472696e" +
"67283136293b0a20202020696620286865782e6c656e677468203c203229207b20686578203d20273027202b206865783b207d0a20202020726573756c74202b3d206865783b0a20207d0a2020726574" +
"75726e20726573756c743b0a7d0a0a66756e6374696f6e20696e74656765724c697374546f4c6f776572636173654261736533324d756c746962617365286c737429207b0a2020766172206261736543" +
"68617273203d20276162636465666768696a6b6c6d6e6f707172737475767778797a323334353637273b0a202076617220726573756c74203d2027273b0a2020766172206c203d20696e74384c697374" +
"546f4269744c697374286c7374293b0a0a2020666f7220287661722069203d20303b2069203c206c2e6c656e6774683b20692b3d203529207b0a2020202076617220676574203d2066756e6374696f6e" +
"286a29207b2072657475726e202828692b6a29203c206c2e6c656e67746829203f206c5b692b6a5d203a20303b207d3b0a202020207661722070617274203d20676574283029202a203136202b206765" +
"74283129202a2038202b20676574283229202a2034202b20676574283329202a2032202b20676574283429202a20313b0a20202020726573756c74202b3d206261736543686172735b706172745d3b0a" +
"20207d0a202072657475726e20276227202b20726573756c743b0a7d0a0a66756e6374696f6e20626173653332537472696e67546f4261736531364c6f776572636173654d756c746962617365287374" +
"7229207b0a202076617220626173654368617273203d202730313233343536373839616263646566273b0a202076617220726573756c74203d2027273b0a2020766172206c203d206261736533325374" +
"72696e67546f4269744c69737428737472293b0a0a2020666f7220287661722069203d20303b2069203c206c2e6c656e6774683b20692b3d203429207b0a2020202076617220676574203d2066756e63" +
"74696f6e286a29207b2072657475726e202828692b6a29203c206c2e6c656e67746829203f206c5b692b6a5d203a20303b207d3b0a202020207661722070617274203d20676574283029202a2038202b" +
"20676574283129202a2034202b20676574283229202a2032202b20676574283329202a20313b0a20202020726573756c74202b3d206261736543686172735b706172745d3b0a20207d0a202072657475" +
"726e20276627202b20726573756c743b0a7d0a0a66756e6374696f6e20696e7465676572546f486578566172696e74286929207b0a20202f2f20546869732066756e6374696f6e2074616b6573206120" +
"4a61766153637269707420696e746567657220616e642072657475726e7320612068657861646563696d616c20737472696e6720726570726573656e74696e67207468617420696e746567657220656e" +
"636f64656420617320612070726f746f62756620766172696e74206163636f7264696e6720746f207468652072756c6573206578706c61696e65642061740a20202f2f2068747470733a2f2f64657665" +
"6c6f706572732e676f6f676c652e636f6d2f70726f746f636f6c2d627566666572732f646f63732f656e636f64696e670a202076617220726573756c74203d2027273b0a20206966202869203c203029" +
"207b0a202020207468726f7720224e6567617469766520696e7465676572732061726520737570706f7274656420627920566172696e747320627574206e6f74206279207468697320696d706c656d65" +
"6e746174696f6e2e223b0a20207d20656c7365206966202869203d3d203029207b0a2020202072657475726e20273030273b0a20207d20656c7365207b0a202020207768696c65202869203e20302920" +
"7b0a2020202020202f2f2047657420746865206c65617374207369676e69666963616e74203720626974732028302e2e31323729206f662074686520696e746567657220616e64207368696674207468" +
"6520726573740a202020202020766172206c656173745369676e69666963616e7442697473203d20692026203132373b0a20202020202069203d2069203e3e20373b0a2020202020202f2f2069662074" +
"686973206973206e6f7420746865206c617374206368756e6b2c2073657420746865206d6f7374207369676e69666963616e742062697420746f20696e6469636174652074686174207468652076616c" +
"75652077696c6c20626520636f6e74696e75656420696e20746865206e65787420627974652873292e0a2020202020206966202869203e203029207b206c656173745369676e69666963616e74426974" +
"73207c3d203132383b207d0a2020202020202f2f20436f6e7665727420746f2068657861646563696d616c20616e64207061642077697468203020746f206765742074776f2064696769747320696620" +
"6e65656465640a20202020202076617220686578203d206c656173745369676e69666963616e74426974732e746f537472696e67283136293b0a202020202020696620286865782e6c656e677468203c" +
"203229207b20686578203d20273027202b206865783b207d0a202020202020726573756c74202b3d206865783b0a202020207d0a2020202072657475726e20726573756c743b0a20207d0a7d0a0a6675" +
"6e6374696f6e2075746638537472696e67546f4865782873747229207b0a20202f2f2054686520696e707574206d75737420616c7265616479206265206120737472696e6720666f7220776869636820" +
"2e63686172436f64654174282920616c776179732072657475726e7320612076616c7565203c3235362028692e652e206120737472696e6720656e636f64656420696e746f207574662d3820616e6420" +
"74686f73652076616c7565732072652d656e636f64656420696e746f206a617661736372697074277320696e7465726e616c207574662d3136290a20207661722073203d20537472696e672873747229" +
"3b0a202076617220726573756c74203d2027273b0a2020666f7220287661722069203d20303b2069203c20732e6c656e6774683b20692b2b29207b0a2020202076617220686578203d20732e63686172" +
"436f646541742869292e746f537472696e67283136293b0a20202020696620286865782e6c656e677468203c203229207b20686578203d20273027202b206865783b207d0a20202020726573756c7420" +
"2b3d206865783b0a20207d0a202072657475726e20726573756c743b0a7d0a0a66756e6374696f6e2069706673426c6f636b576974684c696e6b73286f626a65637429207b0a20202f2f206f626a6563" +
"742073686f756c6420626520616e207b20224c696e6b73223a206c696e6b732c202244617461223a206865782d656e636f64656420737472696e67207d206f626a6563740a20202f2f20417369646520" +
"66726f6d20656e636f64696e6720646966666572656e6365732c2069742073686f756c64206d617463682074686520636f6e74656e7473206f6620746865202269706673206f626a6563742067657420" +
"2d2d646174612d656e636f64696e673d62617365363420516de280a6686173682220636f6d6d616e640a20202f2f0a20202f2f20224c696e6b73222073686f756c6420626520616e206172726179206f" +
"66207b202748617368273a2063696476314261736531364c6f776572636173652c202753697a65273a20496e7465676572207d206f626a656374732e0a20202f2f20546869732066756e6374696f6e73" +
"2072657475726e7320612068657861646563696d616c20737472696e6720776869636820656e636f64657320746865206970667320626c6f636b20776974682074686520676976656e206c696e6b732e" +
"0a20202f2f20546869732069732061207061727469616c20696d706c656d656e746174696f6e20776869636820697320626172656c792073756666696369656e7420666f722072652d68617368696e67" +
"20612066696c652c206d616e79206f662074686520636f6e666967757261626c652076616c756573206172652068617264636f6465642e0a20202f2f204120516de280a6686173682063616e20626520" +
"636f6e76657274656420746f20612022434944763120626173653136206c6f77657263617365222068617368206f6e2074686520636f6d6d616e642d6c696e65207573696e672074686520666f6c6c6f" +
"77696e6720636f64653a0a20202f2f202020697066732063696420666f726d6174202d762031202d6220626173653136202d663d27256d2720516de280a6686173680a20202f2f0a20202f2f20224669" +
"6c65222073686f756c6420626520746865206865782d656e636f6465642028626173652031362c206c6f776572636173652c206e6f207072656669782920646174612c206f72202266616c7365222077" +
"68656e2074686520656e747279206973206e6f74206120444147206c6561660a20202f2f0a20202f2f2054686520224461746122206669656c6420617320676976656e2062792074686520666f6c6c6f" +
"77696e6720636f6d6d616e640a20202f2f20202069706673206f626a65637420676574202d2d646174612d656e636f64696e673d62617365363420516de280a668617368207c206a71202d7220272e44" +
"61746127207c20626173653634202d64207c20787864202d70730a20202f2f206973206175746f6d61746963616c6c792067656e657261746564207573696e6720746865202246696c6522206669656c" +
"642069662070726573656e7420616e642074686520766172696f75732073697a6573206574632e0a0a2020766172206c696e6b73203d206f626a6563742e4c696e6b733b0a20207661722066696c6548" +
"6578203d206f626a6563742e46696c653b0a202076617220726573756c74203d2027273b0a0a2020666f7220287661722069203d20303b2069203c206c696e6b732e6c656e6774683b20692b2b29207b" +
"0a2020202076617220636964203d206c696e6b735b695d2e486173683b0a202020207661722073697a65203d206c696e6b735b695d2e53697a653b0a20202020766172206e616d65203d206c696e6b73" +
"5b695d2e4e616d653b0a202020207661722066696c65486578203d206f626a6563742e46696c653b0a0a20202020726573756c74202b3d20273132273b0a0a2020202076617220656e636f6465644c69" +
"6e6b203d2027270a202020202f2f20536f6d6520736f7274206f6620736570617261746f72206f72207465726d696e61746f720a20202020656e636f6465644c696e6b202b3d20273061273b0a0a2020" +
"20202f2f2073697a65206f66207468652043494420283332206279746573202b203220627974657320686561646572203d203334206279746573203d20323220696e20686578290a20202020656e636f" +
"6465644c696e6b202b3d20273232273b0a0a20202020696620286369645b305d20213d20276627207c7c206369642e6c656e67746820213d20363929207b0a202020202020696620286369645b305d20" +
"3d3d20275127202626206369645b315d203d3d20276d27202626206369642e6c656e677468203d3d20343629207b0a2020202020202020636964203d20276627202b20626173653538537472696e6754" +
"6f486578537472696e6728636964293b0a2020202020202020696620286369645b305d20213d20276627207c7c206369642e6c656e67746820213d20363929207b0a202020202020202020207468726f" +
"772022496e7465726e616c206572726f72223b0a20202020202020207d0a2020202020207d20656c7365207b0a20202020202020207468726f77202245787065637465642061206c6f77657263617365" +
"20626173653136204349447631206f72206120516de280a66861736820696e2062617365353820286c656e677468203436292e205468652062617365313620656e636f64696e672073686f756c642073" +
"7461727420776974682027662722202b0a20202020202020202f2a2b2a2f202220616e6420686176652061206c656e677468206f66203332206279746573202836342068657861646563696d616c2063" +
"6861726163746572732920706c757320746865206c656164696e6720707265666978202766313232302720286c656e677468206f66203639206368617261637465727320696e20746f74616c2922202b" +
"0a20202020202020202f2a2b2a2f20222061732064657363726962656420696e2068747470733a2f2f6769746875622e636f6d2f6d756c7469666f726d6174732f6d756c7469626173652e2054686520" +
"676976656e2068617368207374617274656420776974682022202b206369645b305d202b202220616e64206861642061206c656e677468206f662022202b206369642e6c656e6774683b0a2020202020" +
"207d0a202020207d0a0a202020202f2f2041646420746865204349442e0a20202020656e636f6465644c696e6b202b3d206369642e737562737472696e672831293b0a0a202020202f2f204164642061" +
"207365636f6e642068617264636f6465642070617274206f662074686520656e636f64696e672e0a20202020656e636f6465644c696e6b202b3d20273132273b0a202020202f2f206c656e677468206f" +
"662066696c656e616d650a20202020656e636f6465644c696e6b202b3d20696e7465676572546f486578566172696e74286e616d652e6c656e677468293b0a20202020656e636f6465644c696e6b202b" +
"3d2075746638537472696e67546f486578286e616d65293b0a0a20202020656e636f6465644c696e6b202b3d20273138273b0a0a202020202f2f20416464207468652073697a652e0a20202020656e63" +
"6f6465644c696e6b202b3d20696e7465676572546f486578566172696e742873697a65293b0a0a2020202076617220656e636f6465644c696e6b53697a65203d20656e636f6465644c696e6b2e6c656e" +
"6774682f320a20202020726573756c74202b3d20696e7465676572546f486578566172696e7428656e636f6465644c696e6b53697a65293b0a20202020726573756c74202b3d20656e636f6465644c69" +
"6e6b3b0a20207d0a0a20202f2f2047656e65726174652074686520224461746122206669656c640a0a202076617220746f74616c53697a65203d202866696c65486578207c7c202727292e6c656e6774" +
"68202f20323b0a2020666f7220287661722069203d20303b2069203c206f626a6563742e4c696e6b732e6c656e6774683b20692b2b29207b0a20202020746f74616c53697a65202b3d206f626a656374" +
"2e4c696e6b735b695d2e436f6e74656e7453697a653b0a20207d0a0a202076617220656e636f64656444617461203d2027273b0a2020696620286f626a6563742e697346696c6529207b0a202020202f" +
"2f2020202020202020202020202027303827202020273032270a20202020656e636f64656444617461202b3d2027303827202b20273032273b0a202020202f2f206669656c64203132207365656d7320" +
"746f206265206f7074696f6e616c2028666f7220444147206e6f6465732077697468206c696e6b73202867726f757073206f6620626c6f636b7320616e64206469726563746f7269657329290a202020" +
"206966202866696c6548657820213d3d2066616c736529207b0a202020202020656e636f64656444617461202b3d20273132273b0a202020202020656e636f64656444617461202b3d20696e74656765" +
"72546f486578566172696e7428746f74616c53697a65293b0a202020202020656e636f64656444617461202b3d2066696c654865783b0a202020207d0a202020202f2f20202020202020202020202027" +
"313827205b3866206230203135203d20746f74616c2073697a65206f6620636f6e74656e7473206f66207468652066696c65203d2033353032323330305d0a20202020656e636f64656444617461202b" +
"3d2027313827202b20696e7465676572546f486578566172696e7428746f74616c53697a65293b0a20202020666f722028766172206a203d20303b206a203c206f626a6563742e4c696e6b732e6c656e" +
"6774683b206a2b2b29207b0a2020202020202f2f203230205b3830203830203130203d2073697a65206f6620636f6e74656e7473206f6620626c6f636b2031203d203236323134345d0a202020202020" +
"2f2f203230205b3866206230203035203d2073697a65206f6620636f6e74656e7473206f6620626c6f636b2032203d2038383037395d0a202020202020656e636f64656444617461202b3d2027323027" +
"3b0a202020202020656e636f64656444617461202b3d20696e7465676572546f486578566172696e74286f626a6563742e4c696e6b735b6a5d2e436f6e74656e7453697a65293b0a202020207d0a2020" +
"7d20656c7365207b0a202020202f2f206469726563746f72790a20202020656e636f64656444617461202b3d2027303827202b20273031273b0a20207d0a0a20202f2f20536f6d6520736f7274206f66" +
"20736570617261746f72206f72207465726d696e61746f720a2020726573756c74202b3d20273061273b0a202076617220656e636f6465644461746153697a65203d20656e636f646564446174612e6c" +
"656e677468202f20323b0a2020726573756c74202b3d20696e7465676572546f486578566172696e7428656e636f6465644461746153697a65293b0a2020726573756c74202b3d20656e636f64656444" +
"6174613b0a0a202072657475726e20726573756c743b0a7d0a0a66756e6374696f6e206970667348617368576974684c696e6b7328626173652c206f626a65637429207b0a202076617220626c6f636b" +
"203d20686578537472696e67546f496e74656765724c6973742869706673426c6f636b576974684c696e6b73286f626a65637429293b0a20207661722068617368203d20736861323536496e74656765" +
"724c697374546f4d756c74696861736828626173652c2073686132353628626c6f636b29293b0a20206966202862617365203d3d20313629207b0a2020202072657475726e207b20226861736822203a" +
"20696e74656765724c697374546f4c6f776572636173654261736531364d756c7469626173652868617368292c2022626c6f636b22203a20626c6f636b207d3b0a20207d20656c7365207b0a20202020" +
"72657475726e207b20226861736822203a20696e74656765724c697374546f4c6f776572636173654261736533324d756c7469626173652868617368292c2022626c6f636b22203a20626c6f636b207d" +
"3b0a20207d0a7d0a0a2f2f205265706c6163652074686520666f6c6c6f77696e6720737472696e6720627920225858585f504c414345484f4c4445525f585858222c207468656e20636f6e7665727420" +
"7468652066696c6520746f2068657861646563696d616c0a2f2f2077697468206865784c696e655769647468206e6962626c657320706572206c696e652c2065616368206c696e6520666f726d617474" +
"656420776974686f757420616e7920696e64656e746174696f6e2061730a2f2f20226162636465663030616263646566e280a622202b0a2f2f2065786365707420666f7220746865206c617374206c69" +
"6e6520666f726d61747465642061730a2f2f20226162636465663030616263646566e280a6223b0a2f2f20616e6420746865206669727374206c696e652077686963682073746172747320696d6d6564" +
"696174656c7920616674657220746865203d207369676e2e0a7661722073726331203d20225858585f504c414345484f4c4445525f585858223b0a766172206865784c696e655769647468203d203136" +
"303b0a0a66756e6374696f6e20666f726d617448657864756d70286865784c696e6557696474682c207372633129207b0a202076617220666f726d617474656448657864756d70203d205b5d3b0a2020" +
"766172206a203d20303b0a2020666f7220287661722069203d20303b2069203c20737263312e6c656e6774683b20692b3d6865784c696e65576964746829207b0a20202020666f726d61747465644865" +
"7864756d705b6a2b2b5d203d20737263312e737562737472696e6728692c20692b6865784c696e655769647468293b0a20207d0a202072657475726e20227661722073726331203d205c2222202b2066" +
"6f726d617474656448657864756d702e6a6f696e282722202b5c6e222729202b2027223b273b0a7d0a0a7661722073726332203d20737263312e7265706c6163652875746638537472696e67546f4865" +
"7828227661722073726331203d205c225858585f504c414345484f4c4445525f5858585c223b22292c2075746638537472696e67546f48657828666f726d617448657864756d70286865784c696e6557" +
"696474682c20737263312929293b0a0a646f63756d656e742e676574456c656d656e7442794964282773656c662d73726327292e696e6e657254657874203d20737263323b0a0a76617220696e646578" +
"5f68746d6c203d206970667348617368576974684c696e6b732831362c207b0a2020224c696e6b73223a205b5d2c0a202022697346696c65223a20747275652c0a20202246696c65223a20737263320a" +
"7d2c203136293b0a0a76617220726f6f74203d206970667348617368576974684c696e6b732833322c207b0a2020224c696e6b73223a205b0a202020207b0a202020202020224e616d65223a2022426c" +
"6f622e6a73222c0a2020202020202f2f20663132323034343932336634613863306139623361313730633336383934663165623038393062346363343061646135333836376664626634356462656338" +
"6632303639350a2020202020202248617368223a2022516d53784b6d7463427842526b6d6b4c47706e58414772526331366b50724a7835486d64737674364c5257655347222c0a202020202020225369" +
"7a65223a2032313833330a202020207d2c0a202020207b0a202020202020224e616d65223a202246696c6553617665722e6a73222c0a2020202020202248617368223a2022516d55676732484c6f3457" +
"396270663932436b48483657575646666732446d4e714a727a325a34364c37566d5571222c0a2020202020202253697a65223a20373336370a202020207d2c0a202020207b0a202020202020224e616d" +
"65223a20224a535a6970222c0a2020202020202248617368223a2022516d575732684450724d553565354b6753414d6971664d325957355253695a7a57694e4a5351377736336e67694c222c0a202020" +
"2020202253697a65223a203432323039340a202020207d2c0a202020207b0a202020202020224e616d65223a2022524541444d45222c0a2020202020202248617368223a2022516d5056705473673244" +
"6d56716e4357525675613376676756416f594c4b7a5a5050674766355a517a7a56557766222c0a2020202020202253697a65223a203436340a202020207d2c0a202020207b0a202020202020224e616d" +
"65223a202256697a2e6a73222c0a2020202020202248617368223a2022516d617855437531676e4677545470446f5441504233664d51516176314e4a5a725a374c47714c58454369644b6a222c0a2020" +
"202020202253697a65223a20333536343431300a202020207d2c0a202020207b0a202020202020224e616d65223a2022636f64656d6972726f722d352e36302e30222c0a202020202020224861736822" +
"3a2022516d58506241724d416964384d6243354737484379577a3250556b66534d575a615551706e713633783844773279222c0a2020202020202253697a65223a20343636393630340a202020207d2c" +
"0a202020207b0a202020202020224e616d65223a20226465706c6f792e7368222c0a2020202020202248617368223a2022516d5071627739666e574550384854436763317a6b4a745431367373345854" +
"344d673975365761794136784d6555222c0a2020202020202253697a65223a20313535330a202020207d2c0a202020207b0a202020202020224e616d65223a20226769742d7475746f7269616c2e6373" +
"73222c0a2020202020202248617368223a2022516d647357673452565a52336b524137784663686f574c4551517a4c707a5679737054744b776139717474444d46222c0a2020202020202253697a6522" +
"3a2031303834320a202020207d2c0a202020207b0a202020202020224e616d65223a20226769742d7475746f7269616c2e6a73222c0a2020202020202248617368223a2022516d6263414d4175477946" +
"756d7a347048744b4d6e525932567952417232745a6f6959424c664e593370326b436a222c0a2020202020202253697a65223a2034373038330a202020207d2c0a202020207b0a202020202020224e61" +
"6d65223a2022696e6465782e68746d6c222c0a2020202020202248617368223a20696e6465785f68746d6c2e686173682c0a2020202020202253697a65223a20696e6465785f68746d6c2e626c6f636b" +
"2e6c656e6774680a202020207d2c0a202020207b0a202020202020224e616d65223a202270616b6f222c0a2020202020202248617368223a2022516d52744a687532724a436535394a50533955697941" +
"6a613569555a4e6d4a386e7942696a645a704c4c45674739222c0a2020202020202253697a65223a203137383433310a202020207d2c0a202020207b0a202020202020224e616d65223a202273686131" +
"2e6a73222c0a2020202020202248617368223a2022516d5037485050595171774b58597944726b446d39764b7438465a4531577344554a4738634c6e6a466634613131222c0a2020202020202253697a" +
"65223a20373936360a202020207d0a20205d2c0a20202244617461223a20225c625c7530303031220a7d293b0a0a646f63756d656e742e777269746528273c6120687265663d22697066733a2f2f2720" +
"2b20726f6f742e68617368202b202722223e5065726d616c696e6b20746f20746869732066696c653a20697066733a2f2f272b726f6f742e686173682b273c2f613e27293b0a0a0a3c2f736372697074" +
"3e0a3c2f626f64793e0a3c2f68746d6c3e0a";
var hexLineWidth = 160;
function formatHexdump(hexLineWidth, src1) {
var formattedHexdump = [];
var j = 0;
for (var i = 0; i < src1.length; i+=hexLineWidth) {
formattedHexdump[j++] = src1.substring(i, i+hexLineWidth);
}
return "var src1 = \"" + formattedHexdump.join('" +\n"') + '";';
}
var src2 = src1.replace(utf8StringToHex("var src1 = \"XXX_PLACEHOLDER_XXX\";"), utf8StringToHex(formatHexdump(hexLineWidth, src1)));
document.getElementById('self-src').innerText = src2;
var index_html = ipfsHashWithLinks(16, {
"Links": [],
"isFile": true,
"File": src2
}, 16);
var root = ipfsHashWithLinks(32, {
"Links": [
{
"Name": "Blob.js",
// f122044923f4a8c0a9b3a170c36894f1eb0890b4cc40ada53867fdbf45dbec8f20695
"Hash": "QmSxKmtcBxBRkmkLGpnXAGrRc16kPrJx5Hmdsvt6LRWeSG",
"Size": 21833
},
{
"Name": "FileSaver.js",
"Hash": "QmUgg2HLo4W9bpf92CkHH6WWVFfg2DmNqJrz2Z46L7VmUq",
"Size": 7367
},
{
"Name": "JSZip",
"Hash": "QmWW2hDPrMU5e5KgSAMiqfM2YW5RSiZzWiNJSQ7w63ngiL",
"Size": 422094
},
{
"Name": "README",
"Hash": "QmPVpTsg2DmVqnCWRVua3vggVAoYLKzZPPgGf5ZQzzVUwf",
"Size": 464
},
{
"Name": "Viz.js",
"Hash": "QmaxUCu1gnFwTTpDoTAPB3fMQQav1NJZrZ7LGqLXECidKj",
"Size": 3564410
},
{
"Name": "codemirror-5.60.0",
"Hash": "QmXPbArMAid8MbC5G7HCyWz2PUkfSMWZaUQpnq63x8Dw2y",
"Size": 4669604
},
{
"Name": "deploy.sh",
"Hash": "QmPqbw9fnWEP8HTCgc1zkJtT16ss4XT4Mg9u6WayA6xMeU",
"Size": 1553
},
{
"Name": "git-tutorial.css",
"Hash": "QmdsWg4RVZR3kRA7xFchoWLEQQzLpzVyspTtKwa9qttDMF",
"Size": 10842
},
{
"Name": "git-tutorial.js",
"Hash": "QmbcAMAuGyFumz4pHtKMnRY2VyRAr2tZoiYBLfNY3p2kCj",
"Size": 47083
},
{
"Name": "index.html",
"Hash": index_html.hash,
"Size": index_html.block.length
},
{
"Name": "pako",
"Hash": "QmRtJhu2rJCe59JPS9UiyAja5iUZNmJ8nyBijdZpLLEgG9",
"Size": 178431
},
{
"Name": "sha1.js",
"Hash": "QmP7HPPYQqwKXYyDrkDm9vKt8FZE1WsDUJG8cLnjFf4a11",
"Size": 7966
}
],
"Data": "\b\u0001"
});
document.write('<a href="ipfs://' + root.hash + '"">Permalink to this file: ipfs://'+root.hash+'</a>');
</script>
</body>
</html>

1
a Normal file

File diff suppressed because one or more lines are too long

78967
i2.html Normal file

File diff suppressed because it is too large Load Diff