-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhtml5lib.js
1 lines (1 loc) · 12.5 KB
/
html5lib.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="html5lib.data";var REMOTE_PACKAGE_BASE="html5lib.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","html5lib-1.0.1-py3.7.egg-info",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages","html5lib",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","treeadapters",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","_trie",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","treebuilders",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","filters",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","treewalkers",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:234184,cachedIndexes:[-1,-1],cachedChunks:[null,null],offsets:[0,841,1344,1687,2866,3852,5174,6385,7745,8925,10286,11660,12721,13806,14635,15362,16198,16914,17583,18415,19010,19589,20677,21722,22858,23985,24954,25839,26792,27643,28419,29400,30275,31196,32132,33041,33958,34879,35806,36741,37655,38572,39461,40412,41226,42029,42952,43880,44814,45726,46560,47504,48407,49382,50767,52234,53436,54441,55703,56782,57622,58745,60070,61180,62288,63291,63691,64399,65130,65937,66889,67879,68673,69629,70624,71539,72561,73596,74370,75221,75879,76756,77604,78462,79413,80356,81077,82064,83013,83843,84731,85711,86757,87491,88434,89311,90307,91193,92010,92948,93743,94737,95738,96611,97589,98258,99095,100014,100943,101864,102712,103510,104258,104874,106023,107167,108317,109625,110792,111949,113077,114441,115613,116472,117517,118534,119572,120525,121629,122537,123630,124881,126213,127530,128955,130482,132013,132949,133987,135311,136296,137444,138447,139494,140302,140973,141749,142435,143223,143854,144519,145059,145534,146203,146870,147328,147937,148707,149625,150342,150951,151693,152450,153357,153819,154324,154964,155559,156351,157180,157696,158304,158819,159323,159814,160631,161875,163098,164225,165463,166456,167375,168172,169309,170475,171528,172619,173603,174518,175496,176460,177270,178650,179803,181022,182066,183157,184310,185334,186361,187494,188917,189766,190740,191695,192534,193643,194739,195747,196673,197588,198501,199444,200386,201504,201966,202452,203103,203830,204535,205285,206066,207103,208075,209124,210358,211355,212595,213403,214598,215347,216280,217159,218099,218957,219715,220661,221721,223034,224137,224890,226178,227117,228061,228917,229851,230953,232025,233283,233978],sizes:[841,503,343,1179,986,1322,1211,1360,1180,1361,1374,1061,1085,829,727,836,716,669,832,595,579,1088,1045,1136,1127,969,885,953,851,776,981,875,921,936,909,917,921,927,935,914,917,889,951,814,803,923,928,934,912,834,944,903,975,1385,1467,1202,1005,1262,1079,840,1123,1325,1110,1108,1003,400,708,731,807,952,990,794,956,995,915,1022,1035,774,851,658,877,848,858,951,943,721,987,949,830,888,980,1046,734,943,877,996,886,817,938,795,994,1001,873,978,669,837,919,929,921,848,798,748,616,1149,1144,1150,1308,1167,1157,1128,1364,1172,859,1045,1017,1038,953,1104,908,1093,1251,1332,1317,1425,1527,1531,936,1038,1324,985,1148,1003,1047,808,671,776,686,788,631,665,540,475,669,667,458,609,770,918,717,609,742,757,907,462,505,640,595,792,829,516,608,515,504,491,817,1244,1223,1127,1238,993,919,797,1137,1166,1053,1091,984,915,978,964,810,1380,1153,1219,1044,1091,1153,1024,1027,1133,1423,849,974,955,839,1109,1096,1008,926,915,913,943,942,1118,462,486,651,727,705,750,781,1037,972,1049,1234,997,1240,808,1195,749,933,879,940,858,758,946,1060,1313,1103,753,1288,939,944,856,934,1102,1072,1258,695,206],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,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_html5lib.data")}Module["addRunDependency"]("datafile_html5lib.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/html5lib-1.0.1-py3.7.egg-info/SOURCES.txt",start:0,end:6411,audio:0},{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/top_level.txt",start:6411,end:6420,audio:0},{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/dependency_links.txt",start:6420,end:6421,audio:0},{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/requires.txt",start:6421,end:6692,audio:0},{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/PKG-INFO",start:6692,end:25461,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/constants.py",start:25461,end:108979,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/__init__.py",start:108979,end:110124,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_utils.py",start:110124,end:114127,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/html5parser.py",start:114127,end:233078,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_inputstream.py",start:233078,end:265577,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_ihatexml.py",start:265577,end:282282,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_tokenizer.py",start:282282,end:358850,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/serializer.py",start:358850,end:374596,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treeadapters/genshi.py",start:374596,end:376311,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treeadapters/__init__.py",start:376311,end:376961,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treeadapters/sax.py",start:376961,end:378737,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_trie/_base.py",start:378737,end:379667,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_trie/__init__.py",start:379667,end:379956,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_trie/datrie.py",start:379956,end:381122,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_trie/py.py",start:381122,end:382885,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/dom.py",start:382885,end:391720,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/__init__.py",start:391720,end:395312,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/base.py",start:395312,end:409879,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/etree_lxml.py",start:409879,end:424001,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/etree.py",start:424001,end:436753,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/whitespace.py",start:436753,end:437967,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/sanitizer.py",start:437967,end:464203,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/__init__.py",start:464203,end:464203,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/inject_meta_charset.py",start:464203,end:467148,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/base.py",start:467148,end:467434,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/alphabeticalattributes.py",start:467434,end:468353,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/lint.py",start:468353,end:471984,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/optionaltags.py",start:471984,end:482572,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/genshi.py",start:482572,end:484881,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/dom.py",start:484881,end:486294,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/__init__.py",start:486294,end:492008,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/base.py",start:492008,end:499484,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/etree_lxml.py",start:499484,end:505781,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/etree.py",start:505781,end:510319,audio:0}],remote_package_size:238280,package_uuid:"f30d60c5-f700-49d6-9564-0478619998b4"})})();