This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
py.js
1 lines (1 loc) · 10.8 KB
/
py.js
1
var Module=typeof pyodide._module!=="undefined"?pyodide._module:{};Module.checkABI(1);if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0;Module.finishedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){var loadPackage=function(metadata){var PACKAGE_PATH;if(typeof window==="object"){PACKAGE_PATH=window["encodeURIComponent"](window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/")}else if(typeof location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}else{throw"using preloaded data can only be done on a web page or in a web worker"}var PACKAGE_NAME="py.data";var REMOTE_PACKAGE_BASE="py.data";if(typeof Module["locateFilePackage"]==="function"&&!Module["locateFile"]){Module["locateFile"]=Module["locateFilePackage"];err("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)")}var REMOTE_PACKAGE_NAME=Module["locateFile"]?Module["locateFile"](REMOTE_PACKAGE_BASE,""):REMOTE_PACKAGE_BASE;var REMOTE_PACKAGE_SIZE=metadata.remote_package_size;var PACKAGE_UUID=metadata.package_uuid;function fetchRemotePackage(packageName,packageSize,callback,errback){var xhr=new XMLHttpRequest;xhr.open("GET",packageName,true);xhr.responseType="arraybuffer";xhr.onprogress=function(event){var url=packageName;var size=packageSize;if(event.total)size=event.total;if(event.loaded){if(!xhr.addedTotal){xhr.addedTotal=true;if(!Module.dataFileDownloads)Module.dataFileDownloads={};Module.dataFileDownloads[url]={loaded:event.loaded,total:size}}else{Module.dataFileDownloads[url].loaded=event.loaded}var total=0;var loaded=0;var num=0;for(var download in Module.dataFileDownloads){var data=Module.dataFileDownloads[download];total+=data.total;loaded+=data.loaded;num++}total=Math.ceil(total*Module.expectedDataFileDownloads/num);if(Module["setStatus"])Module["setStatus"]("Downloading data... ("+loaded+"/"+total+")")}else if(!Module.dataFileDownloads){if(Module["setStatus"])Module["setStatus"]("Downloading data...")}};xhr.onerror=function(event){throw new Error("NetworkError for: "+packageName)};xhr.onload=function(event){if(xhr.status==200||xhr.status==304||xhr.status==206||xhr.status==0&&xhr.response){var packageData=xhr.response;callback(packageData)}else{throw new Error(xhr.statusText+" : "+xhr.responseURL)}};xhr.send(null)}function handleError(error){console.error("package error:",error)}var fetchedCallback=null;var fetched=Module["getPreloadedPackage"]?Module["getPreloadedPackage"](REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE):null;if(!fetched)fetchRemotePackage(REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE,function(data){if(fetchedCallback){fetchedCallback(data);fetchedCallback=null}else{fetched=data}},handleError);function runWithFS(){function assert(check,msg){if(!check)throw msg+(new Error).stack}Module["FS_createPath"]("/","lib",true,true);Module["FS_createPath"]("/lib","python3.7",true,true);Module["FS_createPath"]("/lib/python3.7","site-packages",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages","py-1.5.4-py3.7.egg-info",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages","py",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/py","_io",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/py","_path",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/py","_log",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/py","_vendored_packages",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/py","_code",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/py","_process",true,true);function DataRequest(start,end,audio){this.start=start;this.end=end;this.audio=audio}DataRequest.prototype={requests:{},open:function(mode,name){this.name=name;this.requests[name]=this;Module["addRunDependency"]("fp "+this.name)},send:function(){},onload:function(){var byteArray=this.byteArray.subarray(this.start,this.end);this.finish(byteArray)},finish:function(byteArray){var that=this;Module["FS_createPreloadedFile"](this.name,null,byteArray,true,true,function(){Module["removeRunDependency"]("fp "+that.name)},function(){if(that.audio){Module["removeRunDependency"]("fp "+that.name)}else{err("Preloading file "+that.name+" failed")}},false,true);this.requests[this.name]=null}};function processPackageData(arrayBuffer){Module.finishedDataFileDownloads++;assert(arrayBuffer,"Loading data file failed.");assert(arrayBuffer instanceof ArrayBuffer,"bad input to processPackageData");var byteArray=new Uint8Array(arrayBuffer);var curr;var compressedData={data:null,cachedOffset:153608,cachedIndexes:[-1,-1],cachedChunks:[null,null],offsets:[0,1019,2036,3323,4439,5687,6969,8476,9530,10697,12055,12973,13864,14870,16032,17145,18353,19625,20693,21949,23058,24093,25194,26624,27678,28989,30209,31234,32242,33588,34761,35993,37156,38360,39382,40490,41584,42777,43827,44729,45820,47048,48204,49403,50398,51628,52754,53736,54964,56226,57458,58508,59745,60985,62207,63393,64516,65675,66772,68057,69140,70390,71531,72872,73945,74910,75905,76851,78134,79399,80709,81751,82739,83990,85117,86321,87394,88694,89834,90879,92105,93134,94333,95759,96993,98239,99422,100544,101835,103072,104072,105211,106223,107146,108359,109419,110631,111862,113134,114446,115816,117142,118290,119291,120118,121027,122115,123493,124616,125440,126242,127203,128135,129150,130338,131660,132903,134069,135268,136513,137780,138933,140019,141083,142283,143420,144478,145385,146291,147533,148878,150144,151386,152631],sizes:[1019,1017,1287,1116,1248,1282,1507,1054,1167,1358,918,891,1006,1162,1113,1208,1272,1068,1256,1109,1035,1101,1430,1054,1311,1220,1025,1008,1346,1173,1232,1163,1204,1022,1108,1094,1193,1050,902,1091,1228,1156,1199,995,1230,1126,982,1228,1262,1232,1050,1237,1240,1222,1186,1123,1159,1097,1285,1083,1250,1141,1341,1073,965,995,946,1283,1265,1310,1042,988,1251,1127,1204,1073,1300,1140,1045,1226,1029,1199,1426,1234,1246,1183,1122,1291,1237,1e3,1139,1012,923,1213,1060,1212,1231,1272,1312,1370,1326,1148,1001,827,909,1088,1378,1123,824,802,961,932,1015,1188,1322,1243,1166,1199,1245,1267,1153,1086,1064,1200,1137,1058,907,906,1242,1345,1266,1242,1245,977],successes:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]};compressedData.data=byteArray;assert(typeof Module.LZ4==="object","LZ4 not present - was your app build with -s LZ4=1 ?");Module.LZ4.loadPackage({metadata:metadata,compressedData:compressedData});Module["removeRunDependency"]("datafile_py.data")}Module["addRunDependency"]("datafile_py.data");if(!Module.preloadResults)Module.preloadResults={};Module.preloadResults[PACKAGE_NAME]={fromCache:false};if(fetched){processPackageData(fetched);fetched=null}else{fetchedCallback=processPackageData}}if(Module["calledRun"]){runWithFS()}else{if(!Module["preRun"])Module["preRun"]=[];Module["preRun"].push(runWithFS)}};loadPackage({files:[{filename:"/lib/python3.7/site-packages/py-1.5.4-py3.7.egg-info/SOURCES.txt",start:0,end:3555,audio:0},{filename:"/lib/python3.7/site-packages/py-1.5.4-py3.7.egg-info/not-zip-safe",start:3555,end:3556,audio:0},{filename:"/lib/python3.7/site-packages/py-1.5.4-py3.7.egg-info/PKG-INFO",start:3556,end:6628,audio:0},{filename:"/lib/python3.7/site-packages/py-1.5.4-py3.7.egg-info/dependency_links.txt",start:6628,end:6629,audio:0},{filename:"/lib/python3.7/site-packages/py-1.5.4-py3.7.egg-info/top_level.txt",start:6629,end:6632,audio:0},{filename:"/lib/python3.7/site-packages/py/_version.py",start:6632,end:6748,audio:0},{filename:"/lib/python3.7/site-packages/py/_error.py",start:6748,end:9665,audio:0},{filename:"/lib/python3.7/site-packages/py/test.py",start:9665,end:9887,audio:0},{filename:"/lib/python3.7/site-packages/py/_std.py",start:9887,end:10518,audio:0},{filename:"/lib/python3.7/site-packages/py/__metainfo.py",start:10518,end:10573,audio:0},{filename:"/lib/python3.7/site-packages/py/_xmlgen.py",start:10573,end:18937,audio:0},{filename:"/lib/python3.7/site-packages/py/__init__.py",start:18937,end:24959,audio:0},{filename:"/lib/python3.7/site-packages/py/_builtin.py",start:24959,end:31480,audio:0},{filename:"/lib/python3.7/site-packages/py/_io/saferepr.py",start:31480,end:33963,audio:0},{filename:"/lib/python3.7/site-packages/py/_io/capture.py",start:33963,end:45603,audio:0},{filename:"/lib/python3.7/site-packages/py/_io/terminalwriter.py",start:45603,end:59089,audio:0},{filename:"/lib/python3.7/site-packages/py/_io/__init__.py",start:59089,end:59118,audio:0},{filename:"/lib/python3.7/site-packages/py/_path/cacheutil.py",start:59118,end:62451,audio:0},{filename:"/lib/python3.7/site-packages/py/_path/local.py",start:62451,end:97777,audio:0},{filename:"/lib/python3.7/site-packages/py/_path/svnwc.py",start:97777,end:141602,audio:0},{filename:"/lib/python3.7/site-packages/py/_path/common.py",start:141602,end:156228,audio:0},{filename:"/lib/python3.7/site-packages/py/_path/svnurl.py",start:156228,end:170943,audio:0},{filename:"/lib/python3.7/site-packages/py/_path/__init__.py",start:170943,end:170975,audio:0},{filename:"/lib/python3.7/site-packages/py/_log/warning.py",start:170975,end:173540,audio:0},{filename:"/lib/python3.7/site-packages/py/_log/log.py",start:173540,end:179543,audio:0},{filename:"/lib/python3.7/site-packages/py/_log/__init__.py",start:179543,end:179617,audio:0},{filename:"/lib/python3.7/site-packages/py/_vendored_packages/apipkg.py",start:179617,end:186037,audio:0},{filename:"/lib/python3.7/site-packages/py/_vendored_packages/iniconfig.py",start:186037,end:191245,audio:0},{filename:"/lib/python3.7/site-packages/py/_vendored_packages/__init__.py",start:191245,end:191245,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/source.py",start:191245,end:205295,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/_assertionnew.py",start:205295,end:216745,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/_assertionold.py",start:216745,end:234614,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/code.py",start:234614,end:262106,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/assertion.py",start:262106,end:265280,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/__init__.py",start:265280,end:265326,audio:0},{filename:"/lib/python3.7/site-packages/py/_code/_py2traceback.py",start:265326,end:268091,audio:0},{filename:"/lib/python3.7/site-packages/py/_process/cmdexec.py",start:268091,end:269905,audio:0},{filename:"/lib/python3.7/site-packages/py/_process/killproc.py",start:269905,end:270553,audio:0},{filename:"/lib/python3.7/site-packages/py/_process/forkedfunc.py",start:270553,end:274245,audio:0},{filename:"/lib/python3.7/site-packages/py/_process/__init__.py",start:274245,end:274285,audio:0}],remote_package_size:157704,package_uuid:"c71020e4-ee19-4d86-b21a-ee327889eb31"})})();