UNPKG

decentralized-internet

Version:

An NPM library of programs to create decentralized web and distributed computing projects

1 lines 283 kB
for(var k in $estr=function(){return js.Boot.__string_rec(this,"")},"undefined"==typeof henkolib&&(henkolib={}),henkolib.events||(henkolib.events={}),henkolib.events.PublicEvent=function(){},henkolib.events.PublicEvent.__name__=["henkolib","events","PublicEvent"],henkolib.events.PublicEvent.prototype.subscribe=null,henkolib.events.PublicEvent.prototype.unsubscribe=null,henkolib.events.PublicEvent.prototype.__class__=henkolib.events.PublicEvent,"undefined"==typeof gridbee&&(gridbee={}),gridbee.worksource||(gridbee.worksource={}),gridbee.worksource.boinc||(gridbee.worksource.boinc={}),gridbee.worksource.boinc.webrpc||(gridbee.worksource.boinc.webrpc={}),gridbee.worksource.boinc.webrpc.result||(gridbee.worksource.boinc.webrpc.result={}),gridbee.worksource.boinc.webrpc.result.TeamMembrListRes=function(e){if(e!==$_&&e.hasNode.resolve("user")){this.Membr_arr=new Array;for(var r=e.nodes.resolve("user").iterator();r.hasNext();){var o=r.next();this.Membr_arr.push(new gridbee.worksource.boinc.webrpc.subclasses.TeamMembr(o))}}},gridbee.worksource.boinc.webrpc.result.TeamMembrListRes.__name__=["gridbee","worksource","boinc","webrpc","result","TeamMembrListRes"],gridbee.worksource.boinc.webrpc.result.TeamMembrListRes.prototype.Membr_arr=null,gridbee.worksource.boinc.webrpc.result.TeamMembrListRes.prototype.print=function(){null!=this.Membr_arr[0]?this.Membr_arr[0].print():haxe.Log.trace("No members",{fileName:"TeamMembrListRes.hx",lineNumber:40,className:"gridbee.worksource.boinc.webrpc.result.TeamMembrListRes",methodName:"print"})},gridbee.worksource.boinc.webrpc.result.TeamMembrListRes.prototype.__class__=gridbee.worksource.boinc.webrpc.result.TeamMembrListRes,henkolib.async||(henkolib.async={}),henkolib.async.AsyncResult=function(){},henkolib.async.AsyncResult.__name__=["henkolib","async","AsyncResult"],henkolib.async.AsyncResult.prototype.isCompleted=null,henkolib.async.AsyncResult.prototype.isError=null,henkolib.async.AsyncResult.prototype.getError=null,henkolib.async.AsyncResult.prototype.getProgress=null,henkolib.async.AsyncResult.prototype.getResult=null,henkolib.async.AsyncResult.prototype.getElapsedTime=null,henkolib.async.AsyncResult.prototype.onComplete=null,henkolib.async.AsyncResult.prototype.onError=null,henkolib.async.AsyncResult.prototype.onProgress=null,henkolib.async.AsyncResult.prototype.__class__=henkolib.async.AsyncResult,gridbee.Main=function(){},gridbee.Main.__name__=["gridbee","Main"],gridbee.Main.main=function(){},gridbee.Main.prototype.__class__=gridbee.Main,gridbee.js||(gridbee.js={}),gridbee.js.Event=function(){},gridbee.js.Event.__name__=["gridbee","js","Event"],gridbee.js.Event.prototype.__class__=gridbee.js.Event,henkolib.async.AsyncOperation=function(e){e!==$_&&(this.starttime=Date.now(),this.state=henkolib.async.AsyncState.Waiting,this.result=null,this.error=null,this.progress=0,this.onComplete=this.oncomplete=new henkolib.events.Event,this.onError=this.onerror=new henkolib.events.Event,this.onProgress=this.onprogress=new henkolib.events.Event)},henkolib.async.AsyncOperation.__name__=["henkolib","async","AsyncOperation"],henkolib.async.AsyncOperation.prototype.result=null,henkolib.async.AsyncOperation.prototype.error=null,henkolib.async.AsyncOperation.prototype.progress=null,henkolib.async.AsyncOperation.prototype.state=null,henkolib.async.AsyncOperation.prototype.starttime=null,henkolib.async.AsyncOperation.prototype.oncomplete=null,henkolib.async.AsyncOperation.prototype.onerror=null,henkolib.async.AsyncOperation.prototype.onprogress=null,henkolib.async.AsyncOperation.prototype.onComplete=null,henkolib.async.AsyncOperation.prototype.onError=null,henkolib.async.AsyncOperation.prototype.onProgress=null,henkolib.async.AsyncOperation.prototype.setResult=function(e){if(this.state==henkolib.async.AsyncState.Waiting){var r=this;haxe.Timer.delay(function(){r.result=e,r.state=henkolib.async.AsyncState.Completed,r.progress=1,r.onprogress.invoke(r.progress),r.oncomplete.invoke(e)},0)}else henkolib.log.Console.main.logError("Async operation result can only be set once!",null,null,{fileName:"AsyncOperation.hx",lineNumber:76,className:"henkolib.async.AsyncOperation",methodName:"setResult"})},henkolib.async.AsyncOperation.prototype.setError=function(e){this.state==henkolib.async.AsyncState.Waiting?(this.error=e,this.state=henkolib.async.AsyncState.Error,this.onerror.invoke(e)):henkolib.log.Console.main.logError("Async operation error can only be set once!",null,null,{fileName:"AsyncOperation.hx",lineNumber:90,className:"henkolib.async.AsyncOperation",methodName:"setError"})},henkolib.async.AsyncOperation.prototype.setProgress=function(e){e>this.progress&&(this.progress=e,this.onprogress.invoke(e))},henkolib.async.AsyncOperation.prototype.getElapsedTime=function(){return Date.fromTime(Date.now().getTime()-this.starttime.getTime())},henkolib.async.AsyncOperation.prototype.isCompleted=function(){return this.state==henkolib.async.AsyncState.Completed},henkolib.async.AsyncOperation.prototype.isError=function(){return this.state==henkolib.async.AsyncState.Error},henkolib.async.AsyncOperation.prototype.getState=function(){return this.state},henkolib.async.AsyncOperation.prototype.getError=function(){return this.state!=henkolib.async.AsyncState.Error&&henkolib.log.Console.main.logWarning("Async operation has not completed yet.",null,null,{fileName:"AsyncOperation.hx",lineNumber:125,className:"henkolib.async.AsyncOperation",methodName:"getError"}),this.error},henkolib.async.AsyncOperation.prototype.getProgress=function(){return this.progress},henkolib.async.AsyncOperation.prototype.getResult=function(){return this.state!=henkolib.async.AsyncState.Completed&&henkolib.log.Console.main.logWarning("Async operation has not completed yet.",null,null,{fileName:"AsyncOperation.hx",lineNumber:136,className:"henkolib.async.AsyncOperation",methodName:"getResult"}),this.result},henkolib.async.AsyncOperation.prototype.__class__=henkolib.async.AsyncOperation,henkolib.async.AsyncOperation.__interfaces__=[henkolib.async.AsyncResult],gridbee.core||(gridbee.core={}),gridbee.core.iface||(gridbee.core.iface={}),gridbee.core.iface.Persistent=function(){},gridbee.core.iface.Persistent.__name__=["gridbee","core","iface","Persistent"],gridbee.core.iface.Persistent.prototype.init=null,gridbee.core.iface.Persistent.prototype.isChanged=null,gridbee.core.iface.Persistent.prototype.hxSerialize=null,gridbee.core.iface.Persistent.prototype.hxUnserialize=null,gridbee.core.iface.Persistent.prototype.__class__=gridbee.core.iface.Persistent,gridbee.core.iface.Operable=function(){},gridbee.core.iface.Operable.__name__=["gridbee","core","iface","Operable"],gridbee.core.iface.Operable.prototype.operate=null,gridbee.core.iface.Operable.prototype.__class__=gridbee.core.iface.Operable,gridbee.core.work||(gridbee.core.work={}),gridbee.core.work.WorkSourcePool=function(e){e!==$_&&(this.worksources=new Array,this.targetactive=1,this.currentwsindex=0,this.init(),henkolib.log.Console.main.logNotice("WorkSourcePool created: targetactive = "+this.targetactive,null,null,{fileName:"WorkSourcePool.hx",lineNumber:42,className:"gridbee.core.work.WorkSourcePool",methodName:"new"}))},gridbee.core.work.WorkSourcePool.__name__=["gridbee","core","work","WorkSourcePool"],gridbee.core.work.WorkSourcePool.prototype.worksources=null,gridbee.core.work.WorkSourcePool.prototype.targetactive=null,gridbee.core.work.WorkSourcePool.prototype.currentwsindex=null,gridbee.core.work.WorkSourcePool.prototype.changed=null,gridbee.core.work.WorkSourcePool.prototype.init=function(){this.changed=!1,this.currentwsindex=0,this.changed=!1},gridbee.core.work.WorkSourcePool.prototype.addWorkSource=function(e){this.worksources.push(e),this.changed=!0},gridbee.core.work.WorkSourcePool.prototype.removeWorkSource=function(e){this.worksources.remove(e)},gridbee.core.work.WorkSourcePool.prototype.getWorkSources=function(){return this.worksources},gridbee.core.work.WorkSourcePool.prototype.setTargetActive=function(e){this.targetactive=e},gridbee.core.work.WorkSourcePool.prototype.getTargetActive=function(){return this.targetactive},gridbee.core.work.WorkSourcePool.prototype.getNumActive=function(){for(var e=0,r=0,o=this.worksources;r<o.length;){var t=o[r];++r,e+=t.getNumActive()}return e},gridbee.core.work.WorkSourcePool.prototype.stepToNext=function(){this.currentwsindex=(this.currentwsindex+1)%this.worksources.length},gridbee.core.work.WorkSourcePool.prototype.stepToPrev=function(){0==this.currentwsindex?this.currentwsindex=this.worksources.length-1:(this.currentwsindex,this.currentwsindex)},gridbee.core.work.WorkSourcePool.prototype.operate=function(){for(var e=0,r=this.worksources;e<r.length;){var o=r[e];++e,o.operate()}this.getNumActive()<this.targetactive&&this.worksources.length>0&&(this.stepToNext(),this.worksources[this.currentwsindex].startOne()),this.getNumActive()>this.targetactive&&(this.worksources[this.currentwsindex].terminateOne(),this.stepToPrev())},gridbee.core.work.WorkSourcePool.prototype.terminate=function(){for(var e=0,r=this.worksources;e<r.length;){var o=r[e];++e,o.terminate()}},gridbee.core.work.WorkSourcePool.prototype.isChanged=function(){for(var e=0,r=this.worksources;e<r.length;){var o=r[e];++e,o.isChanged()&&(this.changed=!0)}return this.changed},gridbee.core.work.WorkSourcePool.prototype.hxSerialize=function(e){e.serialize(this.worksources),e.serialize(this.targetactive),this.changed=!1},gridbee.core.work.WorkSourcePool.prototype.hxUnserialize=function(e){this.worksources=e.unserialize(),this.targetactive=e.unserialize(),this.init()},gridbee.core.work.WorkSourcePool.prototype.__class__=gridbee.core.work.WorkSourcePool,gridbee.core.work.WorkSourcePool.__interfaces__=[gridbee.core.iface.Persistent,gridbee.core.iface.Operable],gridbee.worksource.boinc.request||(gridbee.worksource.boinc.request={}),gridbee.worksource.boinc.request.Host=function(e){e!==$_&&(this.hostid=null,this.host_info=new gridbee.worksource.boinc.request.HostInfo)},gridbee.worksource.boinc.request.Host.__name__=["gridbee","worksource","boinc","request","Host"],gridbee.worksource.boinc.request.Host.prototype.hostid=null,gridbee.worksource.boinc.request.Host.prototype.host_info=null,gridbee.worksource.boinc.request.Host.prototype.toXmlString=function(e){null==e&&(e="");var r="";return null!=this.hostid&&(r+=e+"<hostid>"+this.hostid+"</hostid>\n"),null!=this.host_info&&(r+=this.host_info.toXmlString(e)),r},gridbee.worksource.boinc.request.Host.prototype.__class__=gridbee.worksource.boinc.request.Host,gridbee.worksource.boinc.BoincUploader=function(e){e!==$_&&(this.workunit=e.getUnitinfo(),this.boincworkunit=e,this.context=e.getContext(),this.results=new Array,this.status=new henkolib.async.AsyncOperation)},gridbee.worksource.boinc.BoincUploader.__name__=["gridbee","worksource","boinc","BoincUploader"],gridbee.worksource.boinc.BoincUploader.prototype.workunit=null,gridbee.worksource.boinc.BoincUploader.prototype.boincworkunit=null,gridbee.worksource.boinc.BoincUploader.prototype.context=null,gridbee.worksource.boinc.BoincUploader.prototype.results=null,gridbee.worksource.boinc.BoincUploader.prototype.status=null,gridbee.worksource.boinc.BoincUploader.prototype.uploadAll=function(){this.boincworkunit.setUploadingState(),henkolib.log.Console.main.logNotice("Uploading results.",null,null,{fileName:"BoincUploader.hx",lineNumber:55,className:"gridbee.worksource.boinc.BoincUploader",methodName:"uploadAll"});for(var e=this.context.getFileList(),r=0;r<e.length;){var o=e[r];++r;for(var t=0,n=this.workunit.result.file_ref;t<n.length;){var i=n[t];++t,i.open_name==o&&(this.results.push(new gridbee.worksource.boinc.BoincResult(this.boincworkunit,this.workunit.result,i,this.context.read(i.open_name))),!0)}}return this.status},gridbee.worksource.boinc.BoincUploader.prototype.isChanged=function(){for(var e=0,r=this.results;e<r.length;){var o=r[e];if(++e,o.isChanged())return!0}return!1},gridbee.worksource.boinc.BoincUploader.prototype.isCompleted=function(){return this.status.isCompleted()},gridbee.worksource.boinc.BoincUploader.prototype.getResult=function(){return this.status.isCompleted()?this.status.getResult():null},gridbee.worksource.boinc.BoincUploader.prototype.operate=function(){if(!this.status.isError()){for(var e=0,r=this.results;e<r.length;){var o=r[e];++e,o.operate()}var t=this.results.length>0,n=!1;for(e=0,r=this.results;e<r.length;){o=r[e];++e,t=t&&o.isCompleted(),n=n||o.isError()}t?this.status.isCompleted()||(this.status.setResult(this.boincworkunit),this.boincworkunit.setUploadedState(this.results)):n&&this.status.setError("Error while uploading results")}},gridbee.worksource.boinc.BoincUploader.prototype.__class__=gridbee.worksource.boinc.BoincUploader,gridbee.worksource.boinc.webrpc.result.CreditInfoRes=function(e){if(e!==$_&&(e.hasNode.resolve("id")&&(this.id=Std.parseInt(e.node.resolve("id").getInnerData())),e.hasNode.resolve("cpid")&&(this.cpid=e.node.resolve("cpid").getInnerData()),e.hasNode.resolve("create_time")&&(this.create_time=Std.parseInt(e.node.resolve("create_time").getInnerData())),e.hasNode.resolve("name")&&(this.name=e.node.resolve("name").getInnerData()),e.hasNode.resolve("country")&&(this.country=e.node.resolve("country").getInnerData()),e.hasNode.resolve("total_credit")&&(this.total_credit=Std.parseFloat(e.node.resolve("total_credit").getInnerData())),e.hasNode.resolve("expavg_credit")&&(this.expavg_credit=Std.parseFloat(e.node.resolve("expavg_credit").getInnerData())),e.hasNode.resolve("expavg_time")&&(this.expavg_time=Std.parseFloat(e.node.resolve("expavg_time").getInnerData())),e.hasNode.resolve("teamid")&&(this.teamid=Std.parseInt(e.node.resolve("teamid").getInnerData())),e.hasNode.resolve("url")&&(this.url=e.node.resolve("url").getInnerData()),e.hasNode.resolve("has_profile")&&("1"==e.node.resolve("has_profile").getInnerData()?this.has_profile=!0:"0"==e.node.resolve("has_profile").getInnerData()&&(this.has_profile=!1)),e.hasNode.resolve("host"))){this.host_arr=new Array;for(var r=e.nodes.resolve("host").iterator();r.hasNext();){var o=r.next();this.host_arr.push(new gridbee.worksource.boinc.webrpc.subclasses.Host(o))}}},gridbee.worksource.boinc.webrpc.result.CreditInfoRes.__name__=["gridbee","worksource","boinc","webrpc","result","CreditInfoRes"],gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.id=null,gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.cpid=null,gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.create_time=null,gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.name=null,gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.country=null,gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.total_credit=null,gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.expavg_credit=null,gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.expavg_time=null,gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.teamid=null,gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.url=null,gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.has_profile=null,gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.host_arr=null,gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.print=function(){haxe.Log.trace("id: "+this.id,{fileName:"CreditInfoRes.hx",lineNumber:75,className:"gridbee.worksource.boinc.webrpc.result.CreditInfoRes",methodName:"print"}),haxe.Log.trace("cpid:"+this.cpid,{fileName:"CreditInfoRes.hx",lineNumber:76,className:"gridbee.worksource.boinc.webrpc.result.CreditInfoRes",methodName:"print"}),haxe.Log.trace("create_time: "+this.create_time,{fileName:"CreditInfoRes.hx",lineNumber:77,className:"gridbee.worksource.boinc.webrpc.result.CreditInfoRes",methodName:"print"}),haxe.Log.trace("name: "+this.name,{fileName:"CreditInfoRes.hx",lineNumber:78,className:"gridbee.worksource.boinc.webrpc.result.CreditInfoRes",methodName:"print"}),haxe.Log.trace("country: "+this.country,{fileName:"CreditInfoRes.hx",lineNumber:79,className:"gridbee.worksource.boinc.webrpc.result.CreditInfoRes",methodName:"print"}),haxe.Log.trace("total_credit: "+this.total_credit,{fileName:"CreditInfoRes.hx",lineNumber:80,className:"gridbee.worksource.boinc.webrpc.result.CreditInfoRes",methodName:"print"}),haxe.Log.trace("expavg_credit: "+this.expavg_credit,{fileName:"CreditInfoRes.hx",lineNumber:81,className:"gridbee.worksource.boinc.webrpc.result.CreditInfoRes",methodName:"print"}),haxe.Log.trace("expavg_time: "+this.expavg_time,{fileName:"CreditInfoRes.hx",lineNumber:82,className:"gridbee.worksource.boinc.webrpc.result.CreditInfoRes",methodName:"print"}),haxe.Log.trace("teamid: "+this.teamid,{fileName:"CreditInfoRes.hx",lineNumber:83,className:"gridbee.worksource.boinc.webrpc.result.CreditInfoRes",methodName:"print"}),haxe.Log.trace("url: "+this.url,{fileName:"CreditInfoRes.hx",lineNumber:84,className:"gridbee.worksource.boinc.webrpc.result.CreditInfoRes",methodName:"print"}),haxe.Log.trace("has_profile: "+this.has_profile,{fileName:"CreditInfoRes.hx",lineNumber:85,className:"gridbee.worksource.boinc.webrpc.result.CreditInfoRes",methodName:"print"})},gridbee.worksource.boinc.webrpc.result.CreditInfoRes.prototype.__class__=gridbee.worksource.boinc.webrpc.result.CreditInfoRes,List=function(e){e!==$_&&(this.length=0)},List.__name__=["List"],List.prototype.h=null,List.prototype.q=null,List.prototype.length=null,List.prototype.add=function(e){var r=[e];null==this.h?this.h=r:this.q[1]=r,this.q=r,this.length++},List.prototype.push=function(e){var r=[e,this.h];this.h=r,null==this.q&&(this.q=r),this.length++},List.prototype.first=function(){return null==this.h?null:this.h[0]},List.prototype.last=function(){return null==this.q?null:this.q[0]},List.prototype.pop=function(){if(null==this.h)return null;var e=this.h[0];return this.h=this.h[1],null==this.h&&(this.q=null),this.length--,e},List.prototype.isEmpty=function(){return null==this.h},List.prototype.clear=function(){this.h=null,this.q=null,this.length=0},List.prototype.remove=function(e){for(var r=null,o=this.h;null!=o;){if(o[0]==e)return null==r?this.h=o[1]:r[1]=o[1],this.q==o&&(this.q=r),this.length--,!0;r=o,o=o[1]}return!1},List.prototype.iterator=function(){return{h:this.h,hasNext:function(){return null!=this.h},next:function(){if(null==this.h)return null;var e=this.h[0];return this.h=this.h[1],e}}},List.prototype.toString=function(){var e=new StringBuf,r=!0,o=this.h;for(e.b[e.b.length]="{";null!=o;)r?r=!1:e.b[e.b.length]=", ",e.add(Std.string(o[0])),o=o[1];return e.b[e.b.length]="}",e.b.join("")},List.prototype.join=function(e){for(var r=new StringBuf,o=!0,t=this.h;null!=t;)o?o=!1:r.b[r.b.length]=null==e?"null":e,r.add(t[0]),t=t[1];return r.b.join("")},List.prototype.filter=function(e){for(var r=new List,o=this.h;null!=o;){var t=o[0];o=o[1],e(t)&&r.add(t)}return r},List.prototype.map=function(e){for(var r=new List,o=this.h;null!=o;){var t=o[0];o=o[1],r.add(e(t))}return r},List.prototype.__class__=List,IntIter=function(e,r){e!==$_&&(this.min=e,this.max=r)},IntIter.__name__=["IntIter"],IntIter.prototype.min=null,IntIter.prototype.max=null,IntIter.prototype.hasNext=function(){return this.min<this.max},IntIter.prototype.next=function(){return this.min++},IntIter.prototype.__class__=IntIter,gridbee.worksource.boinc.reply||(gridbee.worksource.boinc.reply={}),gridbee.worksource.boinc.reply.ResultAck=function(e){e!==$_&&e.hasNode.resolve("name")&&(this.name=e.node.resolve("name").getInnerData())},gridbee.worksource.boinc.reply.ResultAck.__name__=["gridbee","worksource","boinc","reply","ResultAck"],gridbee.worksource.boinc.reply.ResultAck.prototype.name=null,gridbee.worksource.boinc.reply.ResultAck.prototype.__class__=gridbee.worksource.boinc.reply.ResultAck,gridbee.worksource.boinc.webrpc.result.AccountCreateRes=function(e){e!==$_&&e.hasNode.resolve("authenticator")&&(this.authenticator=e.node.resolve("authenticator").getInnerData())},gridbee.worksource.boinc.webrpc.result.AccountCreateRes.__name__=["gridbee","worksource","boinc","webrpc","result","AccountCreateRes"],gridbee.worksource.boinc.webrpc.result.AccountCreateRes.prototype.authenticator=null,gridbee.worksource.boinc.webrpc.result.AccountCreateRes.prototype.print=function(){haxe.Log.trace("authenticator: "+this.authenticator,{fileName:"AccountCreateRes.hx",lineNumber:34,className:"gridbee.worksource.boinc.webrpc.result.AccountCreateRes",methodName:"print"})},gridbee.worksource.boinc.webrpc.result.AccountCreateRes.prototype.__class__=gridbee.worksource.boinc.webrpc.result.AccountCreateRes,Hash=function(e){e!==$_&&(this.h={},null!=this.h.__proto__&&(this.h.__proto__=null,delete this.h.__proto__))},Hash.__name__=["Hash"],Hash.prototype.h=null,Hash.prototype.set=function(e,r){this.h["$"+e]=r},Hash.prototype.get=function(e){return this.h["$"+e]},Hash.prototype.exists=function(e){try{return e="$"+e,this.hasOwnProperty.call(this.h,e)}catch(o){for(var r in this.h)if(r==e)return!0;return!1}},Hash.prototype.remove=function(e){return!!this.exists(e)&&(delete this.h["$"+e],!0)},Hash.prototype.keys=function(){var e=new Array;for(var r in this.h)e.push(r.substr(1));return e.iterator()},Hash.prototype.iterator=function(){return{ref:this.h,it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){var e=this.it.next();return this.ref["$"+e]}}},Hash.prototype.toString=function(){var e=new StringBuf;e.b[e.b.length]="{";for(var r=this.keys();r.hasNext();){var o=r.next();e.b[e.b.length]=null==o?"null":o,e.b[e.b.length]=" => ",e.add(Std.string(this.get(o))),r.hasNext()&&(e.b[e.b.length]=", ")}return e.b[e.b.length]="}",e.b.join("")},Hash.prototype.__class__=Hash,IntHash=function(e){e!==$_&&(this.h={},null!=this.h.__proto__&&(this.h.__proto__=null,delete this.h.__proto__))},IntHash.__name__=["IntHash"],IntHash.prototype.h=null,IntHash.prototype.set=function(e,r){this.h[e]=r},IntHash.prototype.get=function(e){return this.h[e]},IntHash.prototype.exists=function(e){return null!=this.h[e]},IntHash.prototype.remove=function(e){return null!=this.h[e]&&(delete this.h[e],!0)},IntHash.prototype.keys=function(){var e=new Array;for(x in this.h)e.push(x);return e.iterator()},IntHash.prototype.iterator=function(){return{ref:this.h,it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){var e=this.it.next();return this.ref[e]}}},IntHash.prototype.toString=function(){var e=new StringBuf;e.b[e.b.length]="{";for(var r=this.keys();r.hasNext();){var o=r.next();e.b[e.b.length]=null==o?"null":o,e.b[e.b.length]=" => ",e.add(Std.string(this.get(o))),r.hasNext()&&(e.b[e.b.length]=", ")}return e.b[e.b.length]="}",e.b.join("")},IntHash.prototype.__class__=IntHash,henkolib.log||(henkolib.log={}),henkolib.log.LogSource=function(){},henkolib.log.LogSource.__name__=["henkolib","log","LogSource"],henkolib.log.LogSource.prototype.getScreenName=null,henkolib.log.LogSource.prototype.__class__=henkolib.log.LogSource,gridbee.core.iface.WorkSource=function(){},gridbee.core.iface.WorkSource.__name__=["gridbee","core","iface","WorkSource"],gridbee.core.iface.WorkSource.prototype.getWorkUnits=null,gridbee.core.iface.WorkSource.prototype.start=null,gridbee.core.iface.WorkSource.prototype.terminate=null,gridbee.core.iface.WorkSource.prototype.operate=null,gridbee.core.iface.WorkSource.prototype.getNumActive=null,gridbee.core.iface.WorkSource.prototype.startOne=null,gridbee.core.iface.WorkSource.prototype.terminateOne=null,gridbee.core.iface.WorkSource.prototype.onAddWorkunit=null,gridbee.core.iface.WorkSource.prototype.onRemoveWorkunit=null,gridbee.core.iface.WorkSource.prototype.getScreenName=null,gridbee.core.iface.WorkSource.prototype.isChanged=null,gridbee.core.iface.WorkSource.prototype.hxSerialize=null,gridbee.core.iface.WorkSource.prototype.hxUnserialize=null,gridbee.core.iface.WorkSource.prototype.__class__=gridbee.core.iface.WorkSource,gridbee.core.iface.WorkSource.__interfaces__=[gridbee.core.iface.Persistent,henkolib.log.LogSource,gridbee.core.iface.Operable],gridbee.core.work.BasicWorkSource=function(e){e!==$_&&(this.workpool=new gridbee.core.work.WorkUnitPool,this.init())},gridbee.core.work.BasicWorkSource.__name__=["gridbee","core","work","BasicWorkSource"],gridbee.core.work.BasicWorkSource.prototype.workpool=null,gridbee.core.work.BasicWorkSource.prototype.isRunning=null,gridbee.core.work.BasicWorkSource.prototype.onaddworkunit=null,gridbee.core.work.BasicWorkSource.prototype.onremoveworkunit=null,gridbee.core.work.BasicWorkSource.prototype.onAddWorkunit=null,gridbee.core.work.BasicWorkSource.prototype.onRemoveWorkunit=null,gridbee.core.work.BasicWorkSource.prototype.init=function(){this.isRunning=!1,this.onAddWorkunit=this.onaddworkunit=new henkolib.events.Event,this.onRemoveWorkunit=this.onremoveworkunit=new henkolib.events.Event},gridbee.core.work.BasicWorkSource.prototype.getWorkUnits=function(){return this.workpool.getWorkUnits()},gridbee.core.work.BasicWorkSource.prototype.start=function(){this.isRunning=!0},gridbee.core.work.BasicWorkSource.prototype.terminate=function(){this.isRunning=!1,this.workpool.terminateAll()},gridbee.core.work.BasicWorkSource.prototype.operate=function(){this.isRunning&&this.workpool.operate()},gridbee.core.work.BasicWorkSource.prototype.getNumActive=function(){return this.workpool.getNumActive()},gridbee.core.work.BasicWorkSource.prototype.startOne=function(){this.isRunning=!0,this.workpool.startOne()},gridbee.core.work.BasicWorkSource.prototype.terminateOne=function(){this.workpool.terminateOne()},gridbee.core.work.BasicWorkSource.prototype.getScreenName=function(){return"BasicWorkSource"},gridbee.core.work.BasicWorkSource.prototype.isChanged=function(){return this.workpool.isChanged()},gridbee.core.work.BasicWorkSource.prototype.hxSerialize=function(e){e.serialize(this.workpool)},gridbee.core.work.BasicWorkSource.prototype.hxUnserialize=function(e){this.workpool=e.unserialize(),this.init()},gridbee.core.work.BasicWorkSource.prototype.__class__=gridbee.core.work.BasicWorkSource,gridbee.core.work.BasicWorkSource.__interfaces__=[gridbee.core.iface.WorkSource],gridbee.worksource.boinc.BoincData=function(){},gridbee.worksource.boinc.BoincData.__name__=["gridbee","worksource","boinc","BoincData"],gridbee.worksource.boinc.BoincData.prototype.toXmlString=null,gridbee.worksource.boinc.BoincData.prototype.__class__=gridbee.worksource.boinc.BoincData,gridbee.worksource.boinc.request.ClientVersion=function(e,r,o){e!==$_&&(null==o&&(o=0),null==r&&(r=0),null==e&&(e=1),this.core_client_major_version=e,this.core_client_minor_version=r,this.core_client_release=o)},gridbee.worksource.boinc.request.ClientVersion.__name__=["gridbee","worksource","boinc","request","ClientVersion"],gridbee.worksource.boinc.request.ClientVersion.prototype.core_client_major_version=null,gridbee.worksource.boinc.request.ClientVersion.prototype.core_client_minor_version=null,gridbee.worksource.boinc.request.ClientVersion.prototype.core_client_release=null,gridbee.worksource.boinc.request.ClientVersion.prototype.toXmlString=function(e){null==e&&(e="");var r="";return null!=this.core_client_major_version&&(r+=e+"<core_client_major_version>"+this.core_client_major_version+"</core_client_major_version>\n"),null!=this.core_client_minor_version&&(r+=e+"<core_client_minor_version>"+this.core_client_minor_version+"</core_client_minor_version>\n"),null!=this.core_client_release&&(r+=e+"<core_client_release>"+this.core_client_release+"</core_client_release>\n"),r},gridbee.worksource.boinc.request.ClientVersion.prototype.__class__=gridbee.worksource.boinc.request.ClientVersion,gridbee.worksource.boinc.request.ClientVersion.__interfaces__=[gridbee.worksource.boinc.BoincData],gridbee.worksource.boinc.BoincWorkSource=function(e,r){e!==$_&&(this.projecturl=new String(""),this.projectname=new String(""),this.username=new String(""),this.uploadqueue=new Array,this.reportqueue=new Array,this.scheduler_url=e,this.authinfo=new gridbee.worksource.boinc.request.AuthInfo,this.authinfo.authenticator=r,this.benchmarkpool=new gridbee.core.work.WorkUnitPool,this.uploader=new gridbee.worksource.boinc.BoincUploaderPool,gridbee.core.info.BrowserInfo.NaCl()?(this.platform="nacl",henkolib.log.Console.main.logInformation("Setting platform to 'nacl'",null,this,{fileName:"BoincWorkSource.hx",lineNumber:104,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"new"})):(this.platform="javascript",henkolib.log.Console.main.logInformation("Setting platform to 'javascript'",null,this,{fileName:"BoincWorkSource.hx",lineNumber:109,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"new"})),this.host=new gridbee.worksource.boinc.request.Host,this.host.host_info.p_fpops=0,this.host.host_info.p_iops=0,gridbee.core.work.BasicWorkSource.call(this))},gridbee.worksource.boinc.BoincWorkSource.__name__=["gridbee","worksource","boinc","BoincWorkSource"],gridbee.worksource.boinc.BoincWorkSource.__super__=gridbee.core.work.BasicWorkSource,gridbee.core.work.BasicWorkSource.prototype)gridbee.worksource.boinc.BoincWorkSource.prototype[k]=gridbee.core.work.BasicWorkSource.prototype[k];for(var k in gridbee.worksource.boinc.BoincWorkSource.version=null,gridbee.worksource.boinc.BoincWorkSource.getVersion=function(){return gridbee.worksource.boinc.BoincWorkSource.version},gridbee.worksource.boinc.BoincWorkSource.prototype.projecturl=null,gridbee.worksource.boinc.BoincWorkSource.prototype.projectname=null,gridbee.worksource.boinc.BoincWorkSource.prototype.username=null,gridbee.worksource.boinc.BoincWorkSource.prototype.platform=null,gridbee.worksource.boinc.BoincWorkSource.prototype.scheduler_url=null,gridbee.worksource.boinc.BoincWorkSource.prototype.authinfo=null,gridbee.worksource.boinc.BoincWorkSource.prototype.host=null,gridbee.worksource.boinc.BoincWorkSource.prototype.uploadqueue=null,gridbee.worksource.boinc.BoincWorkSource.prototype.reportqueue=null,gridbee.worksource.boinc.BoincWorkSource.prototype.benchmarkpool=null,gridbee.worksource.boinc.BoincWorkSource.prototype.requestinprogress=null,gridbee.worksource.boinc.BoincWorkSource.prototype.uploader=null,gridbee.worksource.boinc.BoincWorkSource.prototype.init=function(){if(gridbee.core.work.BasicWorkSource.prototype.init.call(this),this.updateHostInfo(),this.uploader.onUpload.subscribe($closure(this,"wuUploaded")),0==this.host.host_info.p_fpops){this.benchmarkpool=new gridbee.core.work.WorkUnitPool;var e=new gridbee.worksource.boinc.benchmark.WhetstoneBenchmark,r=this;e.onComplete.subscribe(function(o){r.host.host_info.p_fpops=e.getFlops(),r.updateHostInfo(),r.benchmarkpool.removeCompleted(),henkolib.log.Console.main.logInformation("Benchmark successfully executed.",null,r,{fileName:"BoincWorkSource.hx",lineNumber:136,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"init"})}),e.onError.subscribe(function(e){henkolib.log.Console.main.logError("Benchmark error: "+e,null,r,{fileName:"BoincWorkSource.hx",lineNumber:140,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"init"}),r.benchmarkpool.removeCompleted()}),this.benchmarkpool.addFirst(e),this.onaddworkunit.invoke(e)}},gridbee.worksource.boinc.BoincWorkSource.prototype.isChanged=function(){return gridbee.core.work.BasicWorkSource.prototype.isChanged.call(this)||this.benchmarkpool.isChanged()||this.uploader.isChanged()},gridbee.worksource.boinc.BoincWorkSource.prototype.startOne=function(){if(0!=this.host.host_info.p_fpops){if(this.workpool.getNumInit()+this.workpool.getNumPassive()==0&&!this.requestinprogress){var e=this.requestWorks(),r=this;e.onComplete.subscribe(function(e){0==e.length&&(r.platform="javascript",henkolib.log.Console.main.logInformation("Setting platform to JavaScript",null,r,{fileName:"BoincWorkSource.hx",lineNumber:168,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"startOne"}));for(var o=0;o<e.length;){var t=e[o];++o,r.workpool.add(t),r.onaddworkunit.invoke(t),henkolib.log.Console.main.logInformation("New workunit recieved",null,r,{fileName:"BoincWorkSource.hx",lineNumber:174,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"startOne"})}}),e.onError.subscribe(function(e){henkolib.log.Console.main.logNotice(e,null,null,{fileName:"BoincWorkSource.hx",lineNumber:180,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"startOne"})})}gridbee.core.work.BasicWorkSource.prototype.startOne.call(this)}else this.benchmarkpool.startOne()},gridbee.worksource.boinc.BoincWorkSource.prototype.getSchedulerUrl=function(){return this.scheduler_url},gridbee.worksource.boinc.BoincWorkSource.prototype.getAuthkey=function(){return this.authinfo.authenticator},gridbee.worksource.boinc.BoincWorkSource.prototype.updateHostInfo=function(){gridbee.worksource.boinc.request.HostInfo.updateHostInfo(this.host.host_info)},gridbee.worksource.boinc.BoincWorkSource.prototype.getScreenName=function(){return"BOINC Server WorkSource ("+this.scheduler_url+")"},gridbee.worksource.boinc.BoincWorkSource.prototype.operate=function(){gridbee.core.work.BasicWorkSource.prototype.operate.call(this),this.uploader.operate();for(var e=this.workpool.removeCompleted(),r=0;r<e.length;){var o=e[r];++r,this.uploader.add(o)}},gridbee.worksource.boinc.BoincWorkSource.prototype.wuUploaded=function(e){this.reportWork(e)},gridbee.worksource.boinc.BoincWorkSource.prototype.requestWorks=function(){this.requestinprogress=!0;var e=new gridbee.worksource.boinc.request.SchedulerRequest(this.platform);e.setClientVersion(gridbee.worksource.boinc.BoincWorkSource.version),e.setPlatform(this.platform),e.setAuthInfo(this.authinfo),e.setHost(this.host),e.setWorkRequest(new gridbee.worksource.boinc.request.WorkRequest(10));for(var r=0,o=this.reportqueue;r<o.length;){var t=o[r];++r,henkolib.log.Console.main.logInformation("Reporting uploaded results to: "+this.getScreenName(),null,t,{fileName:"BoincWorkSource.hx",lineNumber:245,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"requestWorks"}),e.addResult(t.getBoincResult())}var n=new henkolib.async.AsyncOperation,i=this,s=gridbee.core.net.HTTPRequest.post(this.scheduler_url);return s.rawData(e.toXmlString()),s.errorCallback(function(e){n.setError(e),i.requestinprogress=!1}),s.successCallback(function(e){henkolib.log.Console.main.logInformation("Received Boinc Scheduler reply.",null,i,{fileName:"BoincWorkSource.hx",lineNumber:257,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"requestWorks"});var r=new haxe.xml.Fast(Xml.parse(e.content).firstElement()),o=new gridbee.worksource.boinc.reply.SchedulerReply(r);null!=o.hostid&&(i.host.hostid=o.hostid,henkolib.log.Console.main.logNotice("Registered new host: "+o.hostid,null,i,{fileName:"BoincWorkSource.hx",lineNumber:267,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"requestWorks"}),henkolib.log.Console.main.logNotice("Project name: "+o.project_name,null,i,{fileName:"BoincWorkSource.hx",lineNumber:268,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"requestWorks"}),henkolib.log.Console.main.logNotice("Username: "+o.user_name,null,i,{fileName:"BoincWorkSource.hx",lineNumber:269,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"requestWorks"}));for(var t=0,s=o.result_ack;t<s.length;){var a=s[t];++t,henkolib.log.Console.main.logInformation("Received result ack: "+a.name,null,i,{fileName:"BoincWorkSource.hx",lineNumber:277,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"requestWorks"});for(var c=0,l=i.reportqueue;c<l.length;){var u=l[c];++c,u.getWorkUnitResultName()==a.name&&(i.reportqueue.remove(u),henkolib.log.Console.main.logNotice("Reported result accepted. WorkUnit removed.",null,u,{fileName:"BoincWorkSource.hx",lineNumber:283,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"requestWorks"}),i.onremoveworkunit.invoke(u))}}for(t=0,s=o.message;t<s.length;){var p=s[t];++t,henkolib.log.Console.main.logNotice("BOINC "+p.priority+" priority message: "+p.message,null,i,{fileName:"BoincWorkSource.hx",lineNumber:294,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"requestWorks"})}var h=new Array;for(t=0,s=o.workunit;t<s.length;){var d=s[t];++t;for(c=0,l=o.app;c<l.length;){var b=l[c];++c,b.name==d.app_name&&(d.application=b)}for(c=0,l=o.app_version;c<l.length;){var g=l[c];if(++c,g.app_name==d.app_name){for(var _=0,m=g.file_ref;_<m.length;){var f=m[_];++_;for(var k=0,w=o.file_info;k<w.length;){var y=w[k];++k,y.name==f.file_name&&(f.file_info=y),f.main_program&&(g.main_program=f)}}d.application.version=g}}for(c=0,l=d.file_ref;c<l.length;){f=l[c];++c;for(_=0,m=o.file_info;_<m.length;){y=m[_];++_,y.name==f.file_name&&(f.file_info=y)}}for(c=0,l=o.result;c<l.length;){var x=l[c];if(++c,x.wu_name==d.name){for(_=0,m=x.file_ref;_<m.length;){f=m[_];++_;for(k=0,w=o.file_info;k<w.length;){y=w[k];++k,y.name==f.file_name&&(f.file_info=y)}}d.result=x;break}}var v="";for(c=0,l=o.app_version;c<l.length;){var N=l[c];++c,v=N.platform}var S=new gridbee.worksource.boinc.BoincWorkUnit(d,v);h.push(S)}n.setResult(h),i.requestinprogress=!1}),henkolib.log.Console.main.logInformation("Sending Boinc Scheduler request.",null,this,{fileName:"BoincWorkSource.hx",lineNumber:369,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"requestWorks"}),s.send(),n},gridbee.worksource.boinc.BoincWorkSource.prototype.reportWork=function(e){henkolib.log.Console.main.logInformation("Added to reporting queue: "+e.getScreenName(),null,this,{fileName:"BoincWorkSource.hx",lineNumber:377,className:"gridbee.worksource.boinc.BoincWorkSource",methodName:"reportWork"}),this.reportqueue.push(e)},gridbee.worksource.boinc.BoincWorkSource.prototype.hxSerialize=function(e){e.serialize(this.scheduler_url),e.serialize(this.authinfo),e.serialize(this.host),e.serialize(this.uploader),e.serialize(this.reportqueue),e.serialize(this.projecturl),e.serialize(this.projectname),e.serialize(this.username),e.serialize(this.platform),gridbee.core.work.BasicWorkSource.prototype.hxSerialize.call(this,e)},gridbee.worksource.boinc.BoincWorkSource.prototype.hxUnserialize=function(e){this.scheduler_url=e.unserialize(),this.authinfo=e.unserialize(),this.host=e.unserialize(),this.uploader=e.unserialize(),this.reportqueue=e.unserialize(),this.projecturl=e.unserialize(),this.projectname=e.unserialize(),this.username=e.unserialize(),this.platform=e.unserialize(),gridbee.core.work.BasicWorkSource.prototype.hxUnserialize.call(this,e)},gridbee.worksource.boinc.BoincWorkSource.prototype.__class__=gridbee.worksource.boinc.BoincWorkSource,gridbee.worksource.boinc.request.UploadFileInfo=function(e){e!==$_&&null!=e&&(this.name=e.name,this.generated_locally=e.generated_locally,this.upload_when_present=e.upload_when_present,this.max_nbytes=e.max_nbytes,this.url=e.url,this.xml_signature=e.xml_signature)},gridbee.worksource.boinc.request.UploadFileInfo.__name__=["gridbee","worksource","boinc","request","UploadFileInfo"],gridbee.worksource.boinc.request.UploadFileInfo.prototype.name=null,gridbee.worksource.boinc.request.UploadFileInfo.prototype.generated_locally=null,gridbee.worksource.boinc.request.UploadFileInfo.prototype.upload_when_present=null,gridbee.worksource.boinc.request.UploadFileInfo.prototype.max_nbytes=null,gridbee.worksource.boinc.request.UploadFileInfo.prototype.url=null,gridbee.worksource.boinc.request.UploadFileInfo.prototype.xml_signature=null,gridbee.worksource.boinc.request.UploadFileInfo.prototype.toXmlString=function(e){null==e&&(e="");var r=(e="")+"\t",o=e+"<file_info>\n";return null!=this.name&&(o+=r+"<name>"+this.name+"</name>\n"),this.generated_locally&&(o+=r+"<generated_locally/>\n"),this.upload_when_present&&(o+=r+"<upload_when_present/>\n"),null!=this.max_nbytes&&(o+=r+"<max_nbytes>"+this.max_nbytes+"</max_nbytes>\n"),null!=this.url&&(o+=r+"<url>"+this.url+"</url>\n"),null!=this.xml_signature&&(o+="<xml_signature>"+this.xml_signature+"</xml_signature>\n"),o+=e+"</file_info>\n"},gridbee.worksource.boinc.request.UploadFileInfo.prototype.__class__=gridbee.worksource.boinc.request.UploadFileInfo,gridbee.worksource.boinc.request.UploadFileInfo.__interfaces__=[gridbee.worksource.boinc.BoincData],gridbee.js.ProgressEvent=function(){},gridbee.js.ProgressEvent.__name__=["gridbee","js","ProgressEvent"],gridbee.js.ProgressEvent.prototype.lengthComputable=null,gridbee.js.ProgressEvent.prototype.loaded=null,gridbee.js.ProgressEvent.prototype.total=null,gridbee.js.ProgressEvent.prototype.__class__=gridbee.js.ProgressEvent,gridbee.js.ProgressEvent.__interfaces__=[gridbee.js.Event],gridbee.js.EventTarget=function(){},gridbee.js.EventTarget.__name__=["gridbee","js","EventTarget"],gridbee.js.EventTarget.prototype.addEventListener=null,gridbee.js.EventTarget.prototype.removeEventListener=null,gridbee.js.EventTarget.prototype.dispatchEvent=null,gridbee.js.EventTarget.prototype.__class__=gridbee.js.EventTarget,gridbee.js.XMLHttpRequestEventTarget=function(){},gridbee.js.XMLHttpRequestEventTarget.__name__=["gridbee","js","XMLHttpRequestEventTarget"],gridbee.js.XMLHttpRequestEventTarget.prototype.onloadstart=null,gridbee.js.XMLHttpRequestEventTarget.prototype.onprogress=null,gridbee.js.XMLHttpRequestEventTarget.prototype.onabort=null,gridbee.js.XMLHttpRequestEventTarget.prototype.onerror=null,gridbee.js.XMLHttpRequestEventTarget.prototype.onload=null,gridbee.js.XMLHttpRequestEventTarget.prototype.ontimeout=null,gridbee.js.XMLHttpRequestEventTarget.prototype.onloadend=null,gridbee.js.XMLHttpRequestEventTarget.prototype.__class__=gridbee.js.XMLHttpRequestEventTarget,gridbee.js.XMLHttpRequestEventTarget.__interfaces__=[gridbee.js.EventTarget],gridbee.js.XMLHttpRequestUpload=function(){},gridbee.js.XMLHttpRequestUpload.__name__=["gridbee","js","XMLHttpRequestUpload"],gridbee.js.XMLHttpRequestUpload.prototype.__class__=gridbee.js.XMLHttpRequestUpload,gridbee.js.XMLHttpRequestUpload.__interfaces__=[gridbee.js.XMLHttpRequestEventTarget],StringTools=function(){},StringTools.__name__=["StringTools"],StringTools.urlEncode=function(e){return encodeURIComponent(e)},StringTools.urlDecode=function(e){return decodeURIComponent(e.split("+").join(" "))},StringTools.htmlEscape=function(e){return e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;")},StringTools.htmlUnescape=function(e){return e.split("&gt;").join(">").split("&lt;").join("<").split("&amp;").join("&")},StringTools.startsWith=function(e,r){return e.length>=r.length&&e.substr(0,r.length)==r},StringTools.endsWith=function(e,r){var o=r.length,t=e.length;return t>=o&&e.substr(t-o,o)==r},StringTools.isSpace=function(e,r){var o=e.charCodeAt(r);return o>=9&&o<=13||32==o},StringTools.ltrim=function(e){for(var r=e.length,o=0;o<r&&StringTools.isSpace(e,o);)o++;return o>0?e.substr(o,r-o):e},StringTools.rtrim=function(e){for(var r=e.length,o=0;o<r&&StringTools.isSpace(e,r-o-1);)o++;return o>0?e.substr(0,r-o):e},StringTools.trim=function(e){return StringTools.ltrim(StringTools.rtrim(e))},StringTools.rpad=function(e,r,o){for(var t=e.length,n=r.length;t<o;)o-t<n?(e+=r.substr(0,o-t),t=o):(e+=r,t+=n);return e},StringTools.lpad=function(e,r,o){var t="",n=e.length;if(n>=o)return e;for(var i=r.length;n<o;)o-n<i?(t+=r.substr(0,o-n),n=o):(t+=r,n+=i);return t+e},StringTools.replace=function(e,r,o){return e.split(r).join(o)},StringTools.hex=function(e,r){var o="";do{o="0123456789ABCDEF".charAt(15&e)+o,e>>>=4}while(e>0);if(null!=r)for(;o.length<r;)o="0"+o;return o},StringTools.fastCodeAt=function(e,r){return e.cca(r)},StringTools.isEOF=function(e){return e!=e},StringTools.prototype.__class__=StringTools,henkolib.events.PublicSimpleEvent=function(){},henkolib.events.PublicSimpleEvent.__name__=["henkolib","events","PublicSimpleEvent"],henkolib.events.PublicSimpleEvent.prototype.subscribe=null,henkolib.events.PublicSimpleEvent.prototype.unsubscribe=null,henkolib.events.PublicSimpleEvent.prototype.__class__=henkolib.events.PublicSimpleEvent,henkolib.events.SimpleEvent=function(e){e!==$_&&(this.subscribed=new Array)},henkolib.events.SimpleEvent.__name__=["henkolib","events","SimpleEvent"],henkolib.events.SimpleEvent.prototype.subscribed=null,henkolib.events.SimpleEvent.prototype.subscribe=function(e){Reflect.isFunction(e)&&this.subscribed.push(e)},henkolib.events.SimpleEvent.prototype.unsubscribe=function(e){Reflect.isFunction(e)&&this.subscribed.remove(e)},henkolib.events.SimpleEvent.prototype.invoke=function(){for(var e=new Array,r=0,o=this.subscribed;r<o.length;){var t=o[r];++r,t.apply({},e)}},henkolib.events.SimpleEvent.prototype.__class__=henkolib.events.SimpleEvent,henkolib.events.SimpleEvent.__interfaces__=[henkolib.events.PublicSimpleEvent],"undefined"==typeof haxe&&(haxe={}),haxe.io||(haxe.io={}),haxe.io.Bytes=function(e,r){e!==$_&&(this.length=e,this.b=r)},haxe.io.Bytes.__name__=["haxe","io","Bytes"],haxe.io.Bytes.alloc=function(e){for(var r=new Array,o=0;o<e;){o++;r.push(0)}return new haxe.io.Bytes(e,r)},haxe.io.Bytes.ofString=function(e){for(var r=new Array,o=0,t=e.length;o<t;){var n=o++,i=e.cca(n);i<=127?r.push(i):i<=2047?(r.push(192|i>>6),r.push(128|63&i)):i<=65535?(r.push(224|i>>12),r.push(128|i>>6&63),r.push(128|63&i)):(r.push(240|i>>18),r.push(128|i>>12&63),r.push(128|i>>6&63),r.push(128|63&i))}return new haxe.io.Bytes(r.length,r)},haxe.io.Bytes.ofData=function(e){return new haxe.io.Bytes(e.length,e)},haxe.io.Bytes.prototype.length=null,haxe.io.Bytes.prototype.b=null,haxe.io.Bytes.prototype.get=function(e){return this.b[e]},haxe.io.Bytes.prototype.set=function(e,r){this.b[e]=255&r},haxe.io.Bytes.prototype.blit=function(e,r,o,t){if(e<0||o<0||t<0||e+t>this.length||o+t>r.length)throw haxe.io.Error.OutsideBounds;var n=this.b,i=r.b;if(n==i&&e>o)for(var s=t;s>0;)n[--s+e]=i[s+o];else for(var a=0;a<t;){n[(s=a++)+e]=i[s+o]}},haxe.io.Bytes.prototype.sub=function(e,r){if(e<0||r<0||e+r>this.length)throw haxe.io.Error.OutsideBounds;return new haxe.io.Bytes(r,this.b.slice(e,e+r))},haxe.io.Bytes.prototype.compare=function(e){for(var r=this.b,o=e.b,t=this.length<e.length?this.length:e.length,n=0;n<t;){var i=n++;if(r[i]!=o[i])return r[i]-o[i]}return this.length-e.length},haxe.io.Bytes.prototype.readString=function(e,r){if(e<0||r<0||e+r>this.length)throw haxe.io.Error.OutsideBounds;for(var o="",t=this.b,n=String.fromCharCode,i=e,s=e+r;i<s;){var a=t[i++];if(a<128){if(0==a)break;o+=n(a)}else if(a<224)o+=n((63&a)<<6|127&t[i++]);else if(a<240){o+=n((31&a)<<12|(127&t[i++])<<6|127&t[i++])}else{o+=n((15&a)<<18|(127&t[i++])<<12|t[i++]<<6&127|127&t[i++])}}return o},haxe.io.Bytes.prototype.toString=function(){return this.readString(0,this.length)},haxe.io.Bytes.prototype.toHex=function(){for(var e=new StringBuf,r=[],o="0123456789abcdef",t=0,n=o.length;t<n;){var i=t++;r.push(o.charCodeAt(i))}for(t=0,n=this.length;t<n;){i=t++;var s=this.b[i];e.b[e.b.length]=String.fromCharCode(r[s>>4]),e.b[e.b.length]=String.fromCharCode(r[15&s])}return e.b.join("")},haxe.io.Bytes.prototype.getData=function(){return this.b},haxe.io.Bytes.prototype.__class__=haxe.io.Bytes,gridbee.worksource.boinc.webrpc.result.AccountInfoRes=function(e){e!==$_&&(e.hasNode.resolve("id")&&(this.id=Std.parseInt(e.node.resolve("id").getInnerData())),e.hasNode.resolve("name")&&(this.name=e.node.resolve("name").getInnerData()),e.hasNode.resolve("country")&&(this.country=e.node.resolve("country").getInnerData()),e.hasNode.resolve("weak_auth")&&(this.weak_auth=e.node.resolve("weak_auth").getInnerData()),e.hasNode.resolve("postal_code")&&(this.postal_code=e.node.resolve("postal_code").getInnerData()),e.hasNode.resolve("global_prefs")&&(this.global_prefs=e.node.resolve("global_prefs").getInnerData()),e.hasNode.resolve("project_prefs")&&(this.project_prefs=e.node.resolve("project_prefs").getInnerData()),e.hasNode.resolve("url")&&(this.url=e.node.resolve("url").getInnerData()),e.hasNode.resolve("send_email")&&("1"==e.node.resolve("send_email").getInnerData()?this.send_email=!0:"0"==e.node.resolve("send_email").getInnerData()&&(this.send_email=!1)),e.hasNode.resolve("show_hosts")&&("1"==e.node.resolve("show_hosts").getInnerData()?this.show_hosts=!0:"0"==e.node.resolve("show_hosts").getInnerData()&&(this.show_hosts=!1)),e.hasNode.resolve("teamid")&&(this.teamid=Std.parseInt(e.node.resolve("teamid").getInnerData())),e.hasNode.resolve("venue")&&(this.venue=e.node.resolve("venue").getInnerData()),e.hasNode.resolve("teamfounder")?this.teamfounder=!0:this.teamfounder=!1)},gridbee.worksource.boinc.webrpc.result.AccountInfoRes.__name__=["gridbee","worksource","boinc","webrpc","result","AccountInfoRes"],gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.id=null,gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.name=null,gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.country=null,gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.weak_auth=null,gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.postal_code=null,gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.global_prefs=null,gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.project_prefs=null,gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.url=null,gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.send_email=null,gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.show_hosts=null,gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.teamid=null,gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.venue=null,gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.teamfounder=null,gridbee.worksource.boinc.webrpc.result.AccountInfoRes.prototype.print=function(){haxe.Log.trace("id: "+this.id,{fileName:"AccountInfoRes.hx",lineNumber:77,className:"gridbee.worksource.boinc.webrpc.result.AccountInfoRes",methodName:"print"}),haxe.Log.trace("name: "+this.name,{fileName:"AccountInfoRes.hx",lineNumber:78,className:"gridbee.worksource.boinc.webrpc.result.AccountInfoRes",methodName:"print"}),haxe.Log.trace("country: "+this.country,{fileName:"AccountInfoRes.hx",lineNumber:79,className:"gridbee.worksource.boinc.webrpc.result.AccountInfoRes",methodName:"print"}),haxe.Log.trace("weak_auth: "+this.weak_auth,{fileN