mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-29 13:08:17 +00:00
27 lines
243 KiB
JavaScript
27 lines
243 KiB
JavaScript
"use strict";
|
|
(function() {
|
|
|
|
var $goVersion = "go1.18.6";
|
|
Error.stackTraceLimit=1/0;var $global,$module,$NaN=NaN;if("undefined"!=typeof window?$global=window:"undefined"!=typeof self?$global=self:"undefined"!=typeof global?($global=global).require=require:$global=this,void 0===$global||void 0===$global.Array)throw new Error("no global object found");if("undefined"!=typeof module&&($module=module),!$global.fs&&$global.require)try{var fs=$global.require("fs");"object"==typeof fs&&null!==fs&&0!==Object.keys(fs).length&&($global.fs=fs)}catch(e){}if(!$global.fs){var outputBuf="",decoder=new TextDecoder("utf-8");$global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync:function(e,n){var r=(outputBuf+=decoder.decode(n)).lastIndexOf("\n");return-1!=r&&(console.log(outputBuf.substr(0,r)),outputBuf=outputBuf.substr(r+1)),n.length},write:function(e,n,r,t,i,a){0===r&&t===n.length&&null===i?a(null,this.writeSync(e,n)):a(enosys())}}}var $throwRuntimeError,$linknames={},$packages={},$idCounter=0,$keys=function(e){return e?Object.keys(e):[]},$flushConsole=function(){},$throwNilPointerError=function(){$throwRuntimeError("invalid memory address or nil pointer dereference")},$call=function(e,n,r){return e.apply(n,r)},$makeFunc=function(e){return function(){return $externalize(e(this,new($sliceType($jsObjectPtr))($global.Array.prototype.slice.call(arguments,[]))),$emptyInterface)}},$unused=function(e){},$print=console.log;if(void 0!==$global.process&&$global.require)try{var util=$global.require("util");$print=function(){$global.process.stderr.write(util.format.apply(this,arguments))}}catch(e){}var $println=console.log,$initAllLinknames=function(){for(var e=$keys($packages),n=0;n<e.length;n++){var r=$packages[e[n]].$initLinknames;"function"==typeof r&&r()}},$mapArray=function(e,n){for(var r=new e.constructor(e.length),t=0;t<e.length;t++)r[t]=n(e[t]);return r},$methodVal=function(e,n){var r=e.$methodVals||{};e.$methodVals=r;var t=r[n];return void 0!==t?t:(t=e[n].bind(e),r[n]=t,t)},$methodExpr=function(e,n){var r=e.prototype[n];return void 0===r.$expr&&(r.$expr=function(){$stackDepthOffset--;try{return e.wrapped&&(arguments[0]=new e(arguments[0])),Function.call.apply(r,arguments)}finally{$stackDepthOffset++}}),r.$expr},$ifaceMethodExprs={},$ifaceMethodExpr=function(e){var n=$ifaceMethodExprs["$"+e];return void 0===n&&(n=$ifaceMethodExprs["$"+e]=function(){$stackDepthOffset--;try{return Function.call.apply(arguments[0][e],arguments)}finally{$stackDepthOffset++}}),n},$subslice=function(e,n,r,t){if(void 0===r&&(r=e.$length),void 0===t&&(t=e.$capacity),(n<0||r<n||t<r||r>e.$capacity||t>e.$capacity)&&$throwRuntimeError("slice bounds out of range"),e===e.constructor.nil)return e;var i=new e.constructor(e.$array);return i.$offset=e.$offset+n,i.$length=r-n,i.$capacity=t-n,i},$substring=function(e,n,r){return(n<0||r<n||r>e.length)&&$throwRuntimeError("slice bounds out of range"),e.substring(n,r)},$sliceToNativeArray=function(e){return e.$array.constructor!==Array?e.$array.subarray(e.$offset,e.$offset+e.$length):e.$array.slice(e.$offset,e.$offset+e.$length)},$sliceToGoArray=function(e,n){var r=n.elem;return void 0!==r&&e.$length<r.len&&$throwRuntimeError("cannot convert slice with length "+e.$length+" to pointer to array with length "+r.len),e==e.constructor.nil?n.nil:e.$array.constructor!==Array?e.$array.subarray(e.$offset,e.$offset+r.len):0==e.$offset&&e.$length==e.$capacity&&e.$length==r.len?e.$array:0==r.len?new r([]):void $throwRuntimeError("gopherjs: non-numeric slice to underlying array conversion is not supported for subslices")},$convertSliceType=function(e,n){return e==e.constructor.nil?n.nil:$subslice(new n(e.$array),e.$offset,e.$offset+e.$length)},$decodeRune=function(e,n){var r=e.charCodeAt(n);if(r<128)return[r,1];if(r!=r||r<192)return[65533,1];var t=e.charCodeAt(n+1);if(t!=t||t<128||192<=t)return[65533,1];if(r<224)return(a=(31&r)<<6|63&t)<=127?[65533,1]:[a,2];var i=e.charCodeAt(n+2);if(i!=i||i<128||192<=i)return[65533,1];if(r<240)return(a=(15&r)<<12|(63&t)<<6|63&i)<=2047?[65533,1]:55296<=a&&a<=57343?[65533,1]:[a,3];var a,o=e.charCodeAt(n+3);return o!=o||o<128||192<=o?[65533,1]:r<248?(a=(7&r)<<18|(63&t)<<12|(63&i)<<6|63&o)<=65535||1114111<a?[65533,1]:[a,4]:[65533,1]},$encodeRune=function(e){return(e<0||e>1114111||55296<=e&&e<=57343)&&(e=65533),e<=127?String.fromCharCode(e):e<=2047?String.fromCharCode(192|e>>6,128|63&e):e<=65535?String.fromCharCode(224|e>>12,128|e>>6&63,128|63&e):String.fromCharCode(240|e>>18,128|e>>12&63,128|e>>6&63,128|63&e)},$stringToBytes=function(e){for(var n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n},$bytesToString=function(e){if(0===e.$length)return"";for(var n="",r=0;r<e.$length;r+=1e4)n+=String.fromCharCode.apply(void 0,e.$array.subarray(e.$offset+r,e.$offset+Math.min(e.$length,r+1e4)));return n},$stringToRunes=function(e){for(var n,r=new Int32Array(e.length),t=0,i=0;i<e.length;i+=n[1],t++)n=$decodeRune(e,i),r[t]=n[0];return r.subarray(0,t)},$runesToString=function(e){if(0===e.$length)return"";for(var n="",r=0;r<e.$length;r++)n+=$encodeRune(e.$array[e.$offset+r]);return n},$copyString=function(e,n){for(var r=Math.min(n.length,e.$length),t=0;t<r;t++)e.$array[e.$offset+t]=n.charCodeAt(t);return r},$copySlice=function(e,n){var r=Math.min(n.$length,e.$length);return $copyArray(e.$array,n.$array,e.$offset,n.$offset,r,e.constructor.elem),r},$copyArray=function(e,n,r,t,i,a){if(0!==i&&(e!==n||r!==t))if(n.subarray)e.set(n.subarray(t,t+i),r);else{switch(a.kind){case $kindArray:case $kindStruct:if(e===n&&r>t){for(var o=i-1;o>=0;o--)a.copy(e[r+o],n[t+o]);return}for(o=0;o<i;o++)a.copy(e[r+o],n[t+o]);return}if(e===n&&r>t)for(o=i-1;o>=0;o--)e[r+o]=n[t+o];else for(o=0;o<i;o++)e[r+o]=n[t+o]}},$clone=function(e,n){var r=n.zero();return n.copy(r,e),r},$pointerOfStructConversion=function(e,n){void 0===e.$proxies&&(e.$proxies={},e.$proxies[e.constructor.string]=e);var r=e.$proxies[n.string];if(void 0===r){for(var t={},i=0;i<n.elem.fields.length;i++)!function(n){t[n]={get:function(){return e[n]},set:function(r){e[n]=r}}}(n.elem.fields[i].prop);(r=Object.create(n.prototype,t)).$val=r,e.$proxies[n.string]=r,r.$proxies=e.$proxies}return r},$append=function(e){return $internalAppend(e,arguments,1,arguments.length-1)},$appendSlice=function(e,n){if(n.constructor===String){var r=$stringToBytes(n);return $internalAppend(e,r,0,r.length)}return $internalAppend(e,n.$array,n.$offset,n.$length)},$internalAppend=function(e,n,r,t){if(0===t)return e;var i=e.$array,a=e.$offset,o=e.$length+t,c=e.$capacity;if(o>c)if(a=0,c=Math.max(o,e.$capacity<1024?2*e.$capacity:Math.floor(5*e.$capacity/4)),e.$array.constructor===Array){(i=e.$array.slice(e.$offset,e.$offset+e.$length)).length=c;for(var $=e.constructor.elem.zero,u=e.$length;u<c;u++)i[u]=$()}else(i=new e.$array.constructor(c)).set(e.$array.subarray(e.$offset,e.$offset+e.$length));$copyArray(i,n,a+e.$length,r,t,e.constructor.elem);var l=new e.constructor(i);return l.$offset=a,l.$length=o,l.$capacity=c,l},$equal=function(e,n,r){if(r===$jsObjectPtr)return e===n;switch(r.kind){case $kindComplex64:case $kindComplex128:return e.$real===n.$real&&e.$imag===n.$imag;case $kindInt64:case $kindUint64:return e.$high===n.$high&&e.$low===n.$low;case $kindArray:if(e.length!==n.length)return!1;for(var t=0;t<e.length;t++)if(!$equal(e[t],n[t],r.elem))return!1;return!0;case $kindStruct:for(t=0;t<r.fields.length;t++){var i=r.fields[t];if(!$equal(e[i.prop],n[i.prop],i.typ))return!1}return!0;case $kindInterface:return $interfaceIsEqual(e,n);default:return e===n}},$interfaceIsEqual=function(e,n){return e===$ifaceNil||n===$ifaceNil?e===n:e.constructor===n.constructor&&(e.constructor===$jsObjectPtr?e.object===n.object:(e.constructor.comparable||$throwRuntimeError("comparing uncomparable type "+e.constructor.string),$equal(e.$val,n.$val,e.constructor)))},$min=Math.min,$mod=function(e,n){return e%n},$parseInt=parseInt,$parseFloat=function(e){return void 0!==e&&null!==e&&e.constructor===Number?e:parseFloat(e)},$froundBuf=new Float32Array(1),$fround=Math.fround||function(e){return $froundBuf[0]=e,$froundBuf[0]},$imul=Math.imul||function(e,n){var r=65535&e,t=65535&n;return r*t+((e>>>16&65535)*t+r*(n>>>16&65535)<<16>>>0)>>0},$floatKey=function(e){return e!=e?"NaN$"+ ++$idCounter:String(e)},$flatten64=function(e){return 4294967296*e.$high+e.$low},$shiftLeft64=function(e,n){return 0===n?e:n<32?new e.constructor(e.$high<<n|e.$low>>>32-n,e.$low<<n>>>0):n<64?new e.constructor(e.$low<<n-32,0):new e.constructor(0,0)},$shiftRightInt64=function(e,n){return 0===n?e:n<32?new e.constructor(e.$high>>n,(e.$low>>>n|e.$high<<32-n)>>>0):n<64?new e.constructor(e.$high>>31,e.$high>>n-32>>>0):e.$high<0?new e.constructor(-1,4294967295):new e.constructor(0,0)},$shiftRightUint64=function(e,n){return 0===n?e:n<32?new e.constructor(e.$high>>>n,(e.$low>>>n|e.$high<<32-n)>>>0):n<64?new e.constructor(0,e.$high>>>n-32):new e.constructor(0,0)},$mul64=function(e,n){var r=e.$high>>>16,t=65535&e.$high,i=e.$low>>>16,a=65535&e.$low,o=n.$high>>>16,c=65535&n.$high,$=n.$low>>>16,u=65535&n.$low,l=0,s=0,f=0,d=0;f+=(d+=a*u)>>>16,s+=(f+=i*u)>>>16,f&=65535,s+=(f+=a*$)>>>16,l+=(s+=t*u)>>>16,s&=65535,l+=(s+=i*$)>>>16,s&=65535,l+=(s+=a*c)>>>16,l+=r*u+t*$+i*c+a*o;var p=((l&=65535)<<16|(s&=65535))>>>0,h=((f&=65535)<<16|(d&=65535))>>>0;return new e.constructor(p,h)},$div64=function(e,n,r){0===n.$high&&0===n.$low&&$throwRuntimeError("integer divide by zero");var t=1,i=1,a=e.$high,o=e.$low;a<0&&(t=-1,i=-1,a=-a,0!==o&&(a--,o=4294967296-o));var c=n.$high,$=n.$low;n.$high<0&&(t*=-1,c=-c,0!==$&&(c--,$=4294967296-$));for(var u=0,l=0,s=0;c<2147483648&&(a>c||a===c&&o>$);)c=(c<<1|$>>>31)>>>0,$=$<<1>>>0,s++;for(var f=0;f<=s;f++)u=u<<1|l>>>31,l=l<<1>>>0,(a>c||a===c&&o>=$)&&(a-=c,(o-=$)<0&&(a--,o+=4294967296),4294967296===++l&&(u++,l=0)),$=($>>>1|c<<31)>>>0,c>>>=1;return r?new e.constructor(a*i,o*i):new e.constructor(u*t,l*t)},$divComplex=function(e,n){var r=e.$real===1/0||e.$real===-1/0||e.$imag===1/0||e.$imag===-1/0,t=n.$real===1/0||n.$real===-1/0||n.$imag===1/0||n.$imag===-1/0,i=!r&&(e.$real!=e.$real||e.$imag!=e.$imag),a=!t&&(n.$real!=n.$real||n.$imag!=n.$imag);if(i||a)return new e.constructor(NaN,NaN);if(r&&!t)return new e.constructor(1/0,1/0);if(!r&&t)return new e.constructor(0,0);if(0===n.$real&&0===n.$imag)return 0===e.$real&&0===e.$imag?new e.constructor(NaN,NaN):new e.constructor(1/0,1/0);if(Math.abs(n.$real)<=Math.abs(n.$imag)){var o=n.$real/n.$imag,c=n.$real*o+n.$imag;return new e.constructor((e.$real*o+e.$imag)/c,(e.$imag*o-e.$real)/c)}o=n.$imag/n.$real,c=n.$imag*o+n.$real;return new e.constructor((e.$imag*o+e.$real)/c,(e.$imag-e.$real*o)/c)},$kindBool=1,$kindInt=2,$kindInt8=3,$kindInt16=4,$kindInt32=5,$kindInt64=6,$kindUint=7,$kindUint8=8,$kindUint16=9,$kindUint32=10,$kindUint64=11,$kindUintptr=12,$kindFloat32=13,$kindFloat64=14,$kindComplex64=15,$kindComplex128=16,$kindArray=17,$kindChan=18,$kindFunc=19,$kindInterface=20,$kindMap=21,$kindPtr=22,$kindSlice=23,$kindString=24,$kindStruct=25,$kindUnsafePointer=26,$methodSynthesizers=[],$addMethodSynthesizer=function(e){null!==$methodSynthesizers?$methodSynthesizers.push(e):e()},$synthesizeMethods=function(){$methodSynthesizers.forEach(function(e){e()}),$methodSynthesizers=null},$ifaceKeyFor=function(e){if(e===$ifaceNil)return"nil";var n=e.constructor;return n.string+"$"+n.keyFor(e.$val)},$identity=function(e){return e},$typeIDCounter=0,$idKey=function(e){return void 0===e.$id&&($idCounter++,e.$id=$idCounter),String(e.$id)},$arrayPtrCtor=function(){return function(e){this.$get=function(){return e},this.$set=function(e){typ.copy(this,e)},this.$val=e}},$newType=function(e,n,r,t,i,a,o){var c;switch(n){case $kindBool:case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindUnsafePointer:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=$identity;break;case $kindString:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=function(e){return"$"+e};break;case $kindFloat32:case $kindFloat64:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=function(e){return $floatKey(e)};break;case $kindInt64:(c=function(e,n){this.$high=e+Math.floor(Math.ceil(n)/4294967296)>>0,this.$low=n>>>0,this.$val=this}).keyFor=function(e){return e.$high+"$"+e.$low};break;case $kindUint64:(c=function(e,n){this.$high=e+Math.floor(Math.ceil(n)/4294967296)>>>0,this.$low=n>>>0,this.$val=this}).keyFor=function(e){return e.$high+"$"+e.$low};break;case $kindComplex64:(c=function(e,n){this.$real=$fround(e),this.$imag=$fround(n),this.$val=this}).keyFor=function(e){return e.$real+"$"+e.$imag};break;case $kindComplex128:(c=function(e,n){this.$real=e,this.$imag=n,this.$val=this}).keyFor=function(e){return e.$real+"$"+e.$imag};break;case $kindArray:(c=function(e){this.$val=e}).wrapped=!0,c.ptr=$newType(4,$kindPtr,"*"+r,!1,"",!1,$arrayPtrCtor()),c.init=function(e,n){c.elem=e,c.len=n,c.comparable=e.comparable,c.keyFor=function(n){return Array.prototype.join.call($mapArray(n,function(n){return String(e.keyFor(n)).replace(/\\/g,"\\\\").replace(/\$/g,"\\$")}),"$")},c.copy=function(n,r){$copyArray(n,r,0,0,r.length,e)},c.ptr.init(c),Object.defineProperty(c.ptr.nil,"nilCheck",{get:$throwNilPointerError})};break;case $kindChan:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=$idKey,c.init=function(e,n,r){c.elem=e,c.sendOnly=n,c.recvOnly=r};break;case $kindFunc:(c=function(e){this.$val=e}).wrapped=!0,c.init=function(e,n,r){c.params=e,c.results=n,c.variadic=r,c.comparable=!1};break;case $kindInterface:(c={implementedBy:{},missingMethodFor:{}}).keyFor=$ifaceKeyFor,c.init=function(e){c.methods=e,e.forEach(function(e){$ifaceNil[e.prop]=$throwNilPointerError})};break;case $kindMap:(c=function(e){this.$val=e}).wrapped=!0,c.init=function(e,n){c.key=e,c.elem=n,c.comparable=!1};break;case $kindPtr:(c=o||function(e,n,r){this.$get=e,this.$set=n,this.$target=r,this.$val=this}).keyFor=$idKey,c.init=function(e){c.elem=e,c.wrapped=e.kind===$kindArray,c.nil=new c($throwNilPointerError,$throwNilPointerError)};break;case $kindSlice:(c=function(e){e.constructor!==c.nativeArray&&(e=new c.nativeArray(e)),this.$array=e,this.$offset=0,this.$length=e.length,this.$capacity=e.length,this.$val=this}).init=function(e){c.elem=e,c.comparable=!1,c.nativeArray=$nativeArray(e.kind),c.nil=new c([])};break;case $kindStruct:(c=function(e){this.$val=e}).wrapped=!0,c.ptr=$newType(4,$kindPtr,"*"+r,!1,i,a,o),c.ptr.elem=c,c.ptr.prototype.$get=function(){return this},c.ptr.prototype.$set=function(e){c.copy(this,e)},c.init=function(e,n){c.pkgPath=e,c.fields=n,n.forEach(function(e){e.typ.comparable||(c.comparable=!1)}),c.keyFor=function(e){var r=e.$val;return $mapArray(n,function(e){return String(e.typ.keyFor(r[e.prop])).replace(/\\/g,"\\\\").replace(/\$/g,"\\$")}).join("$")},c.copy=function(e,r){for(var t=0;t<n.length;t++){var i=n[t];switch(i.typ.kind){case $kindArray:case $kindStruct:i.typ.copy(e[i.prop],r[i.prop]);continue;default:e[i.prop]=r[i.prop];continue}}};var r={};n.forEach(function(e){r[e.prop]={get:$throwNilPointerError,set:$throwNilPointerError}}),c.ptr.nil=Object.create(o.prototype,r),c.ptr.nil.$val=c.ptr.nil,$addMethodSynthesizer(function(){var e=function(e,n,r){void 0===e.prototype[n.prop]&&(e.prototype[n.prop]=function(){var e=this.$val[r.prop];return r.typ===$jsObjectPtr&&(e=new $jsObjectPtr(e)),void 0===e.$val&&(e=new r.typ(e)),e[n.prop].apply(e,arguments)})};n.forEach(function(n){n.embedded&&($methodSet(n.typ).forEach(function(r){e(c,r,n),e(c.ptr,r,n)}),$methodSet($ptrType(n.typ)).forEach(function(r){e(c.ptr,r,n)}))})})};break;default:$panic(new $String("invalid kind: "+n))}switch(n){case $kindBool:case $kindMap:c.zero=function(){return!1};break;case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindUnsafePointer:case $kindFloat32:case $kindFloat64:c.zero=function(){return 0};break;case $kindString:c.zero=function(){return""};break;case $kindInt64:case $kindUint64:case $kindComplex64:case $kindComplex128:var $=new c(0,0);c.zero=function(){return $};break;case $kindPtr:case $kindSlice:c.zero=function(){return c.nil};break;case $kindChan:c.zero=function(){return $chanNil};break;case $kindFunc:c.zero=function(){return $throwNilPointerError};break;case $kindInterface:c.zero=function(){return $ifaceNil};break;case $kindArray:c.zero=function(){var e=$nativeArray(c.elem.kind);if(e!==Array)return new e(c.len);for(var n=new Array(c.len),r=0;r<c.len;r++)n[r]=c.elem.zero();return n};break;case $kindStruct:c.zero=function(){return new c.ptr};break;default:$panic(new $String("invalid kind: "+n))}return c.id=$typeIDCounter,$typeIDCounter++,c.size=e,c.kind=n,c.string=r,c.named=t,c.pkg=i,c.exported=a,c.methods=[],c.methodSetCache=null,c.comparable=!0,c},$methodSet=function(e){if(null!==e.methodSetCache)return e.methodSetCache;var n={},r=e.kind===$kindPtr;if(r&&e.elem.kind===$kindInterface)return e.methodSetCache=[],[];for(var t=[{typ:r?e.elem:e,indirect:r}],i={};t.length>0;){var a=[],o=[];t.forEach(function(e){if(!i[e.typ.string])switch(i[e.typ.string]=!0,e.typ.named&&(o=o.concat(e.typ.methods),e.indirect&&(o=o.concat($ptrType(e.typ).methods))),e.typ.kind){case $kindStruct:e.typ.fields.forEach(function(n){if(n.embedded){var r=n.typ,t=r.kind===$kindPtr;a.push({typ:t?r.elem:r,indirect:e.indirect||t})}});break;case $kindInterface:o=o.concat(e.typ.methods)}}),o.forEach(function(e){void 0===n[e.name]&&(n[e.name]=e)}),t=a}return e.methodSetCache=[],Object.keys(n).sort().forEach(function(r){e.methodSetCache.push(n[r])}),e.methodSetCache},$Bool=$newType(1,$kindBool,"bool",!0,"",!1,null),$Int=$newType(4,$kindInt,"int",!0,"",!1,null),$Int8=$newType(1,$kindInt8,"int8",!0,"",!1,null),$Int16=$newType(2,$kindInt16,"int16",!0,"",!1,null),$Int32=$newType(4,$kindInt32,"int32",!0,"",!1,null),$Int64=$newType(8,$kindInt64,"int64",!0,"",!1,null),$Uint=$newType(4,$kindUint,"uint",!0,"",!1,null),$Uint8=$newType(1,$kindUint8,"uint8",!0,"",!1,null),$Uint16=$newType(2,$kindUint16,"uint16",!0,"",!1,null),$Uint32=$newType(4,$kindUint32,"uint32",!0,"",!1,null),$Uint64=$newType(8,$kindUint64,"uint64",!0,"",!1,null),$Uintptr=$newType(4,$kindUintptr,"uintptr",!0,"",!1,null),$Float32=$newType(4,$kindFloat32,"float32",!0,"",!1,null),$Float64=$newType(8,$kindFloat64,"float64",!0,"",!1,null),$Complex64=$newType(8,$kindComplex64,"complex64",!0,"",!1,null),$Complex128=$newType(16,$kindComplex128,"complex128",!0,"",!1,null),$String=$newType(8,$kindString,"string",!0,"",!1,null),$UnsafePointer=$newType(4,$kindUnsafePointer,"unsafe.Pointer",!0,"unsafe",!1,null),$nativeArray=function(e){switch(e){case $kindInt:return Int32Array;case $kindInt8:return Int8Array;case $kindInt16:return Int16Array;case $kindInt32:return Int32Array;case $kindUint:return Uint32Array;case $kindUint8:return Uint8Array;case $kindUint16:return Uint16Array;case $kindUint32:case $kindUintptr:return Uint32Array;case $kindFloat32:return Float32Array;case $kindFloat64:return Float64Array;default:return Array}},$toNativeArray=function(e,n){var r=$nativeArray(e);return r===Array?n:new r(n)},$arrayTypes={},$arrayType=function(e,n){var r=e.id+"$"+n,t=$arrayTypes[r];return void 0===t&&(t=$newType(12,$kindArray,"["+n+"]"+e.string,!1,"",!1,null),$arrayTypes[r]=t,t.init(e,n)),t},$chanType=function(e,n,r){var t=(r?"<-":"")+"chan"+(n?"<- ":" ");n||r||"<"!=e.string[0]?t+=e.string:t+="("+e.string+")";var i=n?"SendChan":r?"RecvChan":"Chan",a=e[i];return void 0===a&&(a=$newType(4,$kindChan,t,!1,"",!1,null),e[i]=a,a.init(e,n,r)),a},$Chan=function(e,n){(n<0||n>2147483647)&&$throwRuntimeError("makechan: size out of range"),this.$elem=e,this.$capacity=n,this.$buffer=[],this.$sendQueue=[],this.$recvQueue=[],this.$closed=!1},$chanNil=new $Chan(null,0);$chanNil.$sendQueue=$chanNil.$recvQueue={length:0,push:function(){},shift:function(){},indexOf:function(){return-1}};var $funcTypes={},$funcType=function(e,n,r){var t=$mapArray(e,function(e){return e.id}).join(",")+"$"+$mapArray(n,function(e){return e.id}).join(",")+"$"+r,i=$funcTypes[t];if(void 0===i){var a=$mapArray(e,function(e){return e.string});r&&(a[a.length-1]="..."+a[a.length-1].substr(2));var o="func("+a.join(", ")+")";1===n.length?o+=" "+n[0].string:n.length>1&&(o+=" ("+$mapArray(n,function(e){return e.string}).join(", ")+")"),i=$newType(4,$kindFunc,o,!1,"",!1,null),$funcTypes[t]=i,i.init(e,n,r)}return i},$interfaceTypes={},$interfaceType=function(e){var n=$mapArray(e,function(e){return e.pkg+","+e.name+","+e.typ.id}).join("$"),r=$interfaceTypes[n];if(void 0===r){var t="interface {}";0!==e.length&&(t="interface { "+$mapArray(e,function(e){return(""!==e.pkg?e.pkg+".":"")+e.name+e.typ.string.substr(4)}).join("; ")+" }"),r=$newType(8,$kindInterface,t,!1,"",!1,null),$interfaceTypes[n]=r,r.init(e)}return r},$emptyInterface=$interfaceType([]),$ifaceNil={},$error=$newType(8,$kindInterface,"error",!0,"",!1,null);$error.init([{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],!1)}]);var $panicValue,$jsObjectPtr,$jsErrorPtr,$mapTypes={},$mapType=function(e,n){var r=e.id+"$"+n.id,t=$mapTypes[r];return void 0===t&&(t=$newType(4,$kindMap,"map["+e.string+"]"+n.string,!1,"",!1,null),$mapTypes[r]=t,t.init(e,n)),t},$makeMap=function(e,n){for(var r={},t=0;t<n.length;t++){var i=n[t];r[e(i.k)]=i}return r},$ptrType=function(e){var n=e.ptr;return void 0===n&&(n=$newType(4,$kindPtr,"*"+e.string,!1,"",e.exported,null),e.ptr=n,n.init(e)),n},$newDataPointer=function(e,n){return n.elem.kind===$kindStruct?e:new n(function(){return e},function(n){e=n})},$indexPtr=function(e,n,r){if(e.buffer){var t=e.buffer.$ptr=e.buffer.$ptr||{},i=t[e.name]=t[e.name]||{},a=e.BYTES_PER_ELEMENT*n+e.byteOffset;return i[a]||(i[a]=new r(function(){return e[n]},function(r){e[n]=r}))}return e.$ptr=e.$ptr||{},e.$ptr[n]||(e.$ptr[n]=new r(function(){return e[n]},function(r){e[n]=r}))},$sliceType=function(e){var n=e.slice;return void 0===n&&(n=$newType(12,$kindSlice,"[]"+e.string,!1,"",!1,null),e.slice=n,n.init(e)),n},$makeSlice=function(e,n,r){r=r||n,(n<0||n>2147483647)&&$throwRuntimeError("makeslice: len out of range"),(r<0||r<n||r>2147483647)&&$throwRuntimeError("makeslice: cap out of range");var t=new e.nativeArray(r);if(e.nativeArray===Array)for(var i=0;i<r;i++)t[i]=e.elem.zero();var a=new e(t);return a.$length=n,a},$structTypes={},$structType=function(e,n){var r=$mapArray(n,function(e){return e.name+","+e.typ.id+","+e.tag}).join("$"),t=$structTypes[r];if(void 0===t){var i="struct { "+$mapArray(n,function(e){var n=e.typ.string+(""!==e.tag?' "'+e.tag.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"':"");return e.embedded?n:e.name+" "+n}).join("; ")+" }";0===n.length&&(i="struct {}"),t=$newType(0,$kindStruct,i,!1,"",!1,function(){this.$val=this;for(var e=0;e<n.length;e++){var r=n[e];if("_"!=r.name){var t=arguments[e];this[r.prop]=void 0!==t?t:r.typ.zero()}}}),$structTypes[r]=t,t.init(e,n)}return t},$assertType=function(e,n,r){var t,i=n.kind===$kindInterface,a="";if(e===$ifaceNil)t=!1;else if(i){var o=e.constructor.string;if(void 0===(t=n.implementedBy[o])){t=!0;for(var c=$methodSet(e.constructor),$=n.methods,u=0;u<$.length;u++){for(var l=$[u],s=!1,f=0;f<c.length;f++){var d=c[f];if(d.name===l.name&&d.pkg===l.pkg&&d.typ===l.typ){s=!0;break}}if(!s){t=!1,n.missingMethodFor[o]=l.name;break}}n.implementedBy[o]=t}t||(a=n.missingMethodFor[o])}else t=e.constructor===n;if(!t){if(r)return[n.zero(),!1];$panic(new $packages.runtime.TypeAssertionError.ptr($packages.runtime._type.ptr.nil,e===$ifaceNil?$packages.runtime._type.ptr.nil:new $packages.runtime._type.ptr(e.constructor.string),new $packages.runtime._type.ptr(n.string),a))}return i||(e=e.$val),n===$jsObjectPtr&&(e=e.object),r?[e,!0]:e},$stackDepthOffset=0,$getStackDepth=function(){var e=new Error;if(void 0!==e.stack)return $stackDepthOffset+e.stack.split("\n").length},$panicStackDepth=null,$callDeferred=function(e,n,r){if(!r&&null!==e&&-1==$curGoroutine.deferStack.indexOf(e))throw n;if(null===n){if(!$curGoroutine.asleep){$stackDepthOffset--;var t=$panicStackDepth,i=$panicValue,a=$curGoroutine.panicStack.pop();void 0!==a&&($panicStackDepth=$getStackDepth(),$panicValue=a);try{for(;;){if(null===e&&void 0===(e=$curGoroutine.deferStack[$curGoroutine.deferStack.length-1])){if($panicStackDepth=null,a.Object instanceof Error)throw a.Object;var o;throw o=a.constructor===$String?a.$val:void 0!==a.Error?a.Error():void 0!==a.String?a.String():a,new Error(o)}var c=e.pop();if(void 0===c){if($curGoroutine.deferStack.pop(),void 0!==a){e=null;continue}return}var $=c[0].apply(c[2],c[1]);if($&&void 0!==$.$blk){if(e.push([$.$blk,[],$]),r)throw null;return}if(void 0!==a&&null===$panicStackDepth){if(r)throw null;return}}}catch(n){if(r)throw n;$callDeferred(e,n,r)}finally{void 0!==a&&(null!==$panicStackDepth&&$curGoroutine.panicStack.push(a),$panicStackDepth=t,$panicValue=i),$stackDepthOffset++}}}else{var u=null;try{$panic(new $jsErrorPtr(n))}catch(e){u=e}$callDeferred(e,u)}},$panic=function(e){$curGoroutine.panicStack.push(e),$callDeferred(null,null,!0)},$recover=function(){return null===$panicStackDepth||void 0!==$panicStackDepth&&$panicStackDepth!==$getStackDepth()-2?$ifaceNil:($panicStackDepth=null,$panicValue)},$throw=function(e){throw e},$noGoroutine={asleep:!1,exit:!1,deferStack:[],panicStack:[]},$curGoroutine=$noGoroutine,$totalGoroutines=0,$awakeGoroutines=0,$checkForDeadlock=!0,$exportedFunctions=0,$mainFinished=!1,$go=function(e,n){$totalGoroutines++,$awakeGoroutines++;var $goroutine=function(){try{$curGoroutine=$goroutine;var r=e.apply(void 0,n);if(r&&void 0!==r.$blk)return e=function(){return r.$blk()},void(n=[]);$goroutine.exit=!0}catch(e){if(!$goroutine.exit)throw e}finally{$curGoroutine=$noGoroutine,$goroutine.exit&&($totalGoroutines--,$goroutine.asleep=!0),$goroutine.asleep&&($awakeGoroutines--,!$mainFinished&&0===$awakeGoroutines&&$checkForDeadlock&&0===$exportedFunctions&&(console.error("fatal error: all goroutines are asleep - deadlock!"),void 0!==$global.process&&$global.process.exit(2)))}};$goroutine.asleep=!1,$goroutine.exit=!1,$goroutine.deferStack=[],$goroutine.panicStack=[],$schedule($goroutine)},$scheduled=[],$runScheduled=function(){var e=setTimeout($runScheduled);try{for(var n,r=Date.now();void 0!==(n=$scheduled.shift());){n();var t=Date.now()-r;if(t>4||t<0)break}}finally{0==$scheduled.length&&clearTimeout(e)}},$schedule=function(e){e.asleep&&(e.asleep=!1,$awakeGoroutines++),$scheduled.push(e),$curGoroutine===$noGoroutine&&$runScheduled()},$setTimeout=function(e,n){return $awakeGoroutines++,setTimeout(function(){$awakeGoroutines--,e()},n)},$block=function(){$curGoroutine===$noGoroutine&&$throwRuntimeError("cannot block in JavaScript callback, fix by wrapping code in goroutine"),$curGoroutine.asleep=!0},$restore=function(e,n){return void 0!==e&&void 0!==e.$blk?e:n},$send=function(e,n){e.$closed&&$throwRuntimeError("send on closed channel");var r=e.$recvQueue.shift();if(void 0===r){if(!(e.$buffer.length<e.$capacity)){var t,i=$curGoroutine;return e.$sendQueue.push(function(e){return t=e,$schedule(i),n}),$block(),{$blk:function(){t&&$throwRuntimeError("send on closed channel")}}}e.$buffer.push(n)}else r([n,!0])},$recv=function(e){var n=e.$sendQueue.shift();void 0!==n&&e.$buffer.push(n(!1));var r=e.$buffer.shift();if(void 0!==r)return[r,!0];if(e.$closed)return[e.$elem.zero(),!1];var t=$curGoroutine,i={$blk:function(){return this.value}};return e.$recvQueue.push(function(e){i.value=e,$schedule(t)}),$block(),i},$close=function(e){for(e.$closed&&$throwRuntimeError("close of closed channel"),e.$closed=!0;;){var n=e.$sendQueue.shift();if(void 0===n)break;n(!0)}for(;;){var r=e.$recvQueue.shift();if(void 0===r)break;r([e.$elem.zero(),!1])}},$select=function(e){for(var n=[],r=-1,t=0;t<e.length;t++){var i,a=(i=e[t])[0];switch(i.length){case 0:r=t;break;case 1:(0!==a.$sendQueue.length||0!==a.$buffer.length||a.$closed)&&n.push(t);break;case 2:a.$closed&&$throwRuntimeError("send on closed channel"),(0!==a.$recvQueue.length||a.$buffer.length<a.$capacity)&&n.push(t)}}if(0!==n.length&&(r=n[Math.floor(Math.random()*n.length)]),-1!==r)switch((i=e[r]).length){case 0:return[r];case 1:return[r,$recv(i[0])];case 2:return $send(i[0],i[1]),[r]}var o=[],c=$curGoroutine,$={$blk:function(){return this.selection}},u=function(){for(var e=0;e<o.length;e++){var n=o[e],r=n[0],t=r.indexOf(n[1]);-1!==t&&r.splice(t,1)}};for(t=0;t<e.length;t++)!function(n){var r=e[n];switch(r.length){case 1:var t=function(e){$.selection=[n,e],u(),$schedule(c)};o.push([r[0].$recvQueue,t]),r[0].$recvQueue.push(t);break;case 2:t=function(){return r[0].$closed&&$throwRuntimeError("send on closed channel"),$.selection=[n],u(),$schedule(c),r[1]};o.push([r[0].$sendQueue,t]),r[0].$sendQueue.push(t)}}(t);return $block(),$},$needsExternalization=function(e){switch(e.kind){case $kindBool:case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindFloat32:case $kindFloat64:return!1;default:return e!==$jsObjectPtr}},$externalize=function(e,n,r){if(n===$jsObjectPtr)return e;switch(n.kind){case $kindBool:case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindFloat32:case $kindFloat64:return e;case $kindInt64:case $kindUint64:return $flatten64(e);case $kindArray:return $needsExternalization(n.elem)?$mapArray(e,function(e){return $externalize(e,n.elem,r)}):e;case $kindFunc:return $externalizeFunction(e,n,!1,r);case $kindInterface:return e===$ifaceNil?null:e.constructor===$jsObjectPtr?e.$val.object:$externalize(e.$val,e.constructor,r);case $kindMap:for(var t={},i=$keys(e),a=0;a<i.length;a++){var o=e[i[a]];t[$externalize(o.k,n.key,r)]=$externalize(o.v,n.elem,r)}return t;case $kindPtr:return e===n.nil?null:$externalize(e.$get(),n.elem,r);case $kindSlice:return $needsExternalization(n.elem)?$mapArray($sliceToNativeArray(e),function(e){return $externalize(e,n.elem,r)}):$sliceToNativeArray(e);case $kindString:if($isASCII(e))return e;var c,$="";for(a=0;a<e.length;a+=c[1]){var u=(c=$decodeRune(e,a))[0];if(u>65535){var l=Math.floor((u-65536)/1024)+55296,s=(u-65536)%1024+56320;$+=String.fromCharCode(l,s)}else $+=String.fromCharCode(u)}return $;case $kindStruct:var f=$packages.time;if(void 0!==f&&e.constructor===f.Time.ptr){var d=$div64(e.UnixNano(),new $Int64(0,1e6));return new Date($flatten64(d))}var p={},h=function(e,n){if(n===$jsObjectPtr)return e;switch(n.kind){case $kindPtr:return e===n.nil?p:h(e.$get(),n.elem);case $kindStruct:var r=n.fields[0];return h(e[r.prop],r.typ);case $kindInterface:return h(e.$val,e.constructor);default:return p}},k=h(e,n);if(k!==p)return k;if(void 0!==r)return r(e);k={};for(a=0;a<n.fields.length;a++){var y=n.fields[a];y.exported&&(k[y.name]=$externalize(e[y.prop],y.typ,r))}return k}$throwRuntimeError("cannot externalize "+n.string)},$externalizeFunction=function(e,n,r,t){return e===$throwNilPointerError?null:(void 0===e.$externalizeWrapper&&($checkForDeadlock=!1,e.$externalizeWrapper=function(){for(var i=[],a=0;a<n.params.length;a++){if(n.variadic&&a===n.params.length-1){for(var o=n.params[a].elem,c=[],$=a;$<arguments.length;$++)c.push($internalize(arguments[$],o,t));i.push(new n.params[a](c));break}i.push($internalize(arguments[a],n.params[a],t))}var u=e.apply(r?this:void 0,i);switch(n.results.length){case 0:return;case 1:return $externalize($copyIfRequired(u,n.results[0]),n.results[0],t);default:for(a=0;a<n.results.length;a++)u[a]=$externalize($copyIfRequired(u[a],n.results[a]),n.results[a],t);return u}}),e.$externalizeWrapper)},$internalize=function(e,n,r,t,i){if(n===$jsObjectPtr)return e;if(n===$jsObjectPtr.elem&&$throwRuntimeError("cannot internalize js.Object, use *js.Object instead"),e&&void 0!==e.__internal_object__)return $assertType(e.__internal_object__,n,!1);var a=$packages.time;if(void 0!==a&&n===a.Time)return null!==e&&void 0!==e&&e.constructor===Date||$throwRuntimeError("cannot internalize time.Time from "+typeof e+", must be Date"),a.Unix(new $Int64(0,0),new $Int64(0,1e6*e.getTime()));if(void 0===t&&(t=new Map),t.has(n)||t.set(n,new Map),t.get(n).has(e))return t.get(n).get(e);switch(n.kind){case $kindBool:return!!e;case $kindInt:return parseInt(e);case $kindInt8:return parseInt(e)<<24>>24;case $kindInt16:return parseInt(e)<<16>>16;case $kindInt32:return parseInt(e)>>0;case $kindUint:return parseInt(e);case $kindUint8:return parseInt(e)<<24>>>24;case $kindUint16:return parseInt(e)<<16>>>16;case $kindUint32:case $kindUintptr:return parseInt(e)>>>0;case $kindInt64:case $kindUint64:return new n(0,e);case $kindFloat32:case $kindFloat64:return parseFloat(e);case $kindArray:return e.length!==n.len&&$throwRuntimeError("got array with wrong size from JavaScript native"),$mapArray(e,function(e){return $internalize(e,n.elem,i)});case $kindFunc:return function(){for(var t=[],a=0;a<n.params.length;a++){if(n.variadic&&a===n.params.length-1){for(var o=n.params[a].elem,c=arguments[a],$=0;$<c.$length;$++)t.push($externalize(c.$array[c.$offset+$],o,i));break}t.push($externalize(arguments[a],n.params[a],i))}var u=e.apply(r,t);switch(n.results.length){case 0:return;case 1:return $internalize(u,n.results[0],i);default:for(a=0;a<n.results.length;a++)u[a]=$internalize(u[a],n.results[a],i);return u}};case $kindInterface:if(0!==n.methods.length&&$throwRuntimeError("cannot internalize "+n.string),null===e)return $ifaceNil;if(void 0===e)return new $jsObjectPtr(void 0);switch(e.constructor){case Int8Array:return new($sliceType($Int8))(e);case Int16Array:return new($sliceType($Int16))(e);case Int32Array:return new($sliceType($Int))(e);case Uint8Array:return new($sliceType($Uint8))(e);case Uint16Array:return new($sliceType($Uint16))(e);case Uint32Array:return new($sliceType($Uint))(e);case Float32Array:return new($sliceType($Float32))(e);case Float64Array:return new($sliceType($Float64))(e);case Array:return $internalize(e,$sliceType($emptyInterface),i);case Boolean:return new $Bool(!!e);case Date:return void 0===a?new $jsObjectPtr(e):new a.Time($internalize(e,a.Time,i));case function(){}.constructor:var o=$funcType([$sliceType($emptyInterface)],[$jsObjectPtr],!0);return new o($internalize(e,o,i));case Number:return new $Float64(parseFloat(e));case String:return new $String($internalize(e,$String,i));default:if($global.Node&&e instanceof $global.Node)return new $jsObjectPtr(e);var c=$mapType($String,$emptyInterface);return new c($internalize(e,c,r,t,i))}case $kindMap:var $={};t.get(n).set(e,$);for(var u=$keys(e),l=0;l<u.length;l++){var s=$internalize(u[l],n.key,r,t,i);$[n.key.keyFor(s)]={k:s,v:$internalize(e[u[l]],n.elem,r,t,i)}}return $;case $kindPtr:if(n.elem.kind===$kindStruct)return $internalize(e,n.elem,i);case $kindSlice:return new n($mapArray(e,function(e){return $internalize(e,n.elem,i)}));case $kindString:if(e=String(e),$isASCII(e))return e;var f="";for(l=0;l<e.length;){var d=e.charCodeAt(l);if(55296<=d&&d<=56319){var p=e.charCodeAt(l+1);f+=$encodeRune(1024*(d-55296)+p-56320+65536),l+=2}else f+=$encodeRune(d),l++}return f;case $kindStruct:var h={},k=function(n){if(n===$jsObjectPtr)return e;switch(n===$jsObjectPtr.elem&&$throwRuntimeError("cannot internalize js.Object, use *js.Object instead"),n.kind){case $kindPtr:return k(n.elem);case $kindStruct:var r=n.fields[0],t=k(r.typ);if(t!==h){var i=new n.ptr;return i[r.prop]=t,i}return h;default:return h}},y=k(n);if(y!==h)return y}$throwRuntimeError("cannot internalize "+n.string)},$copyIfRequired=function(e,n){if(e&&e.constructor&&e.constructor.copy)return new e.constructor($clone(e.$val,e.constructor));if(n.copy){var r=n.zero();return n.copy(r,e),r}return e},$isASCII=function(e){for(var n=0;n<e.length;n++)if(e.charCodeAt(n)>=128)return!1;return!0};
|
|
|
|
$packages["github.com/gopherjs/gopherjs/js"]=(function(){var $pkg={},$init,A,B,J,K,M,O,P,Q,R,S,T,E,G,H,L;A=$pkg.Object=$newType(0,$kindStruct,"js.Object",true,"github.com/gopherjs/gopherjs/js",true,function(object_){this.$val=this;if(arguments.length===0){this.object=null;return;}this.object=object_;});B=$pkg.Error=$newType(0,$kindStruct,"js.Error",true,"github.com/gopherjs/gopherjs/js",true,function(Object_){this.$val=this;if(arguments.length===0){this.Object=null;return;}this.Object=Object_;});J=$pkg.M=$newType(4,$kindMap,"js.M",true,"github.com/gopherjs/gopherjs/js",true,null);K=$pkg.S=$newType(12,$kindSlice,"js.S",true,"github.com/gopherjs/gopherjs/js",true,null);M=$sliceType($emptyInterface);O=$ptrType(A);P=$sliceType(O);Q=$funcType([P],[O],true);R=$funcType([],[O],false);S=$funcType([O],[],false);T=$ptrType(B);A.ptr.prototype.Get=function(a){var a,b;b=this;return b.object[$externalize(a,$String)];};A.prototype.Get=function(a){return this.$val.Get(a);};A.ptr.prototype.Set=function(a,b){var a,b,c;c=this;c.object[$externalize(a,$String)]=$externalize(b,$emptyInterface);};A.prototype.Set=function(a,b){return this.$val.Set(a,b);};A.ptr.prototype.Delete=function(a){var a,b;b=this;delete b.object[$externalize(a,$String)];};A.prototype.Delete=function(a){return this.$val.Delete(a);};A.ptr.prototype.Length=function(){var a;a=this;return $parseInt(a.object.length);};A.prototype.Length=function(){return this.$val.Length();};A.ptr.prototype.Index=function(a){var a,b;b=this;return b.object[a];};A.prototype.Index=function(a){return this.$val.Index(a);};A.ptr.prototype.SetIndex=function(a,b){var a,b,c;c=this;c.object[a]=$externalize(b,$emptyInterface);};A.prototype.SetIndex=function(a,b){return this.$val.SetIndex(a,b);};A.ptr.prototype.Call=function(a,b){var a,b,c,d;c=this;return(d=c.object,d[$externalize(a,$String)].apply(d,$externalize(b,M)));};A.prototype.Call=function(a,b){return this.$val.Call(a,b);};A.ptr.prototype.Invoke=function(a){var a,b;b=this;return b.object.apply(undefined,$externalize(a,M));};A.prototype.Invoke=function(a){return this.$val.Invoke(a);};A.ptr.prototype.New=function(a){var a,b;b=this;return new($global.Function.prototype.bind.apply(b.object,[undefined].concat($externalize(a,M))));};A.prototype.New=function(a){return this.$val.New(a);};A.ptr.prototype.Bool=function(){var a;a=this;return!!(a.object);};A.prototype.Bool=function(){return this.$val.Bool();};A.ptr.prototype.String=function(){var a;a=this;return $internalize(a.object,$String);};A.prototype.String=function(){return this.$val.String();};A.ptr.prototype.Int=function(){var a;a=this;return $parseInt(a.object)>>0;};A.prototype.Int=function(){return this.$val.Int();};A.ptr.prototype.Int64=function(){var a;a=this;return $internalize(a.object,$Int64);};A.prototype.Int64=function(){return this.$val.Int64();};A.ptr.prototype.Uint64=function(){var a;a=this;return $internalize(a.object,$Uint64);};A.prototype.Uint64=function(){return this.$val.Uint64();};A.ptr.prototype.Float=function(){var a;a=this;return $parseFloat(a.object);};A.prototype.Float=function(){return this.$val.Float();};A.ptr.prototype.Interface=function(){var a;a=this;return $internalize(a.object,$emptyInterface);};A.prototype.Interface=function(){return this.$val.Interface();};A.ptr.prototype.Unsafe=function(){var a;a=this;return a.object;};A.prototype.Unsafe=function(){return this.$val.Unsafe();};B.ptr.prototype.Error=function(){var a;a=this;return"JavaScript error: "+$internalize(a.Object.message,$String);};B.prototype.Error=function(){return this.$val.Error();};B.ptr.prototype.Stack=function(){var a;a=this;return $internalize(a.Object.stack,$String);};B.prototype.Stack=function(){return this.$val.Stack();};E=function(a){var a;return $makeFunc(a);};$pkg.MakeFunc=E;G=function(a){var a,b,c,d,e,f;b=a;c=new($global.Object)();c.__internal_object__=b;d=b.constructor.methods;e=0;while(true){if(!(e<$parseInt(d.length))){break;}f=[f];f[0]=d[e];if(!($internalize(f[0].pkg,$String)==="")){e=e+(1)>>0;continue;}c[$externalize($internalize(f[0].name,$String),$String)]=$externalize((function(f){return function(g){var g;return $externalizeFunction(b[$externalize($internalize(f[0].prop,$String),$String)],f[0].typ,$externalize(true,$Bool)).apply(b,$externalize(g,P));};})(f),Q);e=e+(1)>>0;}return c;};$pkg.MakeWrapper=G;H=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=[b];c=[c];b[0]=a;d=b[0].constructor;c[0]=new($global.Object)();e=(function(b,c){return function(e,f){var e,f;$global.Object.defineProperty(c[0],$externalize(e,$String),$externalize(f,J));};})(b,c);$r=e("__internal_object__",$makeMap($String.keyFor,[{k:"value",v:new $jsObjectPtr(b[0])}]));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=$internalize(d.string,$String);g=$internalize(d.pkg,$String);h="";if(f.charCodeAt(0)===42){h="*";}i=0;while(true){if(!(i<f.length)){break;}if(f.charCodeAt(i)===46){f=$substring(f,(i+1>>0));break;}i=i+(1)>>0;}j=g+"."+h+f;$r=e("$type",$makeMap($String.keyFor,[{k:"value",v:new $String(j)}]));$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}k=null;l=new($global.Array)();m=d.methods;if(!(m===undefined)){l=l.concat(m);}n=d.elem;if(!(n===undefined)){k=n.fields;l=l.concat(n.methods);}else{k=d.fields;}o=0;case 3:if(!(o<$parseInt(l.length))){$s=4;continue;}p=[p];p[0]=l[o];if(!($internalize(p[0].pkg,$String)==="")){o=o+(1)>>0;$s=3;continue;}$r=e($internalize(p[0].prop,$String),$makeMap($String.keyFor,[{k:"value",v:new Q((function(b,c,p){return function(q){var q;return $externalizeFunction(b[0][$externalize($internalize(p[0].prop,$String),$String)],p[0].typ,$externalize(true,$Bool),H).apply(b[0],$externalize(q,P));};})(b,c,p))}]));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}o=o+(1)>>0;$s=3;continue;case 4:if(!(k===undefined)){$s=6;continue;}$s=7;continue;case 6:q=0;case 8:if(!(q<$parseInt(k.length))){$s=9;continue;}r=[r];r[0]=k[q];if(!!!(r[0].exported)){q=q+(1)>>0;$s=8;continue;}$r=e($internalize(r[0].prop,$String),$makeMap($String.keyFor,[{k:"get",v:new R((function(b,c,r){return function(){var s;s=$copyIfRequired(b[0].$val[$externalize($internalize(r[0].prop,$String),$String)],r[0].typ);return $externalize(s,r[0].typ,H);};})(b,c,r))},{k:"set",v:new S((function(b,c,r){return function(s){var s,t;t=$internalize(s,r[0].typ,H);b[0].$val[$externalize($internalize(r[0].prop,$String),$String)]=t;};})(b,c,r))}]));$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}q=q+(1)>>0;$s=8;continue;case 9:case 7:$s=-1;return c[0];}return;}var $f={$blk:H,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s};return $f;};$pkg.MakeFullWrapper=H;L=function(){var a;a=new B.ptr(null);$unused(a);};O.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[O],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$emptyInterface],[],false)},{prop:"Delete",name:"Delete",pkg:"",typ:$funcType([$String],[],false)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[O],false)},{prop:"SetIndex",name:"SetIndex",pkg:"",typ:$funcType([$Int,$emptyInterface],[],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([$String,M],[O],true)},{prop:"Invoke",name:"Invoke",pkg:"",typ:$funcType([M],[O],true)},{prop:"New",name:"New",pkg:"",typ:$funcType([M],[O],true)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Unsafe",name:"Unsafe",pkg:"",typ:$funcType([],[$Uintptr],false)}];T.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Stack",name:"Stack",pkg:"",typ:$funcType([],[$String],false)}];A.init("github.com/gopherjs/gopherjs/js",[{prop:"object",name:"object",embedded:false,exported:false,typ:O,tag:""}]);B.init("",[{prop:"Object",name:"Object",embedded:true,exported:true,typ:O,tag:""}]);J.init($String,$emptyInterface);K.init($emptyInterface);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:L();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["runtime"]=(function(){var $pkg={},$init,A,C,D,AT,AZ,BD,AM,E,AU;A=$packages["github.com/gopherjs/gopherjs/js"];C=$pkg._type=$newType(0,$kindStruct,"runtime._type",true,"runtime",false,function(str_){this.$val=this;if(arguments.length===0){this.str="";return;}this.str=str_;});D=$pkg.TypeAssertionError=$newType(0,$kindStruct,"runtime.TypeAssertionError",true,"runtime",true,function(_interface_,concrete_,asserted_,missingMethod_){this.$val=this;if(arguments.length===0){this._interface=AZ.nil;this.concrete=AZ.nil;this.asserted=AZ.nil;this.missingMethod="";return;}this._interface=_interface_;this.concrete=concrete_;this.asserted=asserted_;this.missingMethod=missingMethod_;});AT=$pkg.errorString=$newType(8,$kindString,"runtime.errorString",true,"runtime",false,null);AZ=$ptrType(C);BD=$ptrType(D);C.ptr.prototype.string=function(){var a;a=this;return a.str;};C.prototype.string=function(){return this.$val.string();};C.ptr.prototype.pkgpath=function(){var a;a=this;return"";};C.prototype.pkgpath=function(){return this.$val.pkgpath();};D.ptr.prototype.RuntimeError=function(){};D.prototype.RuntimeError=function(){return this.$val.RuntimeError();};D.ptr.prototype.Error=function(){var a,b,c,d,e;a=this;b="interface";if(!(a._interface===AZ.nil)){b=a._interface.string();}c=a.asserted.string();if(a.concrete===AZ.nil){return"interface conversion: "+b+" is nil, not "+c;}d=a.concrete.string();if(a.missingMethod===""){e="interface conversion: "+b+" is "+d+", not "+c;if(d===c){if(!(a.concrete.pkgpath()===a.asserted.pkgpath())){e=e+(" (types from different packages)");}else{e=e+(" (types from different scopes)");}}return e;}return"interface conversion: "+d+" is not "+c+": missing method "+a.missingMethod;};D.prototype.Error=function(){return this.$val.Error();};E=function(){var a,b;a=$packages[$externalize("github.com/gopherjs/gopherjs/js",$String)];$jsObjectPtr=a.Object.ptr;$jsErrorPtr=a.Error.ptr;$throwRuntimeError=AU;AM=$internalize($goVersion,$String);b=$ifaceNil;b=new D.ptr(AZ.nil,AZ.nil,AZ.nil,"");$unused(b);};AT.prototype.RuntimeError=function(){var a;a=this.$val;};$ptrType(AT).prototype.RuntimeError=function(){return new AT(this.$get()).RuntimeError();};AT.prototype.Error=function(){var a;a=this.$val;return"runtime error: "+(a);};$ptrType(AT).prototype.Error=function(){return new AT(this.$get()).Error();};AU=function(a){var a;$panic(new AT((a)));};AZ.methods=[{prop:"string",name:"string",pkg:"runtime",typ:$funcType([],[$String],false)},{prop:"pkgpath",name:"pkgpath",pkg:"runtime",typ:$funcType([],[$String],false)}];BD.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AT.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];C.init("runtime",[{prop:"str",name:"str",embedded:false,exported:false,typ:$String,tag:""}]);D.init("runtime",[{prop:"_interface",name:"_interface",embedded:false,exported:false,typ:AZ,tag:""},{prop:"concrete",name:"concrete",embedded:false,exported:false,typ:AZ,tag:""},{prop:"asserted",name:"asserted",embedded:false,exported:false,typ:AZ,tag:""},{prop:"missingMethod",name:"missingMethod",embedded:false,exported:false,typ:$String,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}AM="";E();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["math/bits"]=(function(){var $pkg={},$init;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["math"]=(function(){var $pkg={},$init,B,A,IT,IU,IV,IW,FL,FM,FN,FO,FP,HH,EX,EY,FK,GA,GH,GK,GL,GM,GS,GT,GW,GX,GZ,HA,HD,HI,HL,HM;B=$packages["github.com/gopherjs/gopherjs/js"];A=$packages["math/bits"];IT=$arrayType($Uint32,2);IU=$arrayType($Float32,2);IV=$arrayType($Float64,1);IW=$structType("math",[{prop:"uint32array",name:"uint32array",embedded:false,exported:false,typ:IT,tag:""},{prop:"float32array",name:"float32array",embedded:false,exported:false,typ:IU,tag:""},{prop:"float64array",name:"float64array",embedded:false,exported:false,typ:IV,tag:""}]);EX=function(av,aw){var av,aw;if(GL(av,1)||GL(aw,1)){return GK(1);}else if(GM(av)||GM(aw)){return GW();}else if((av===0)&&(av===aw)){if(GZ(av)){return aw;}return av;}if(av>aw){return av;}return aw;};EY=function(av,aw){var av,aw;if(GL(av,-1)||GL(aw,-1)){return GK(-1);}else if(GM(av)||GM(aw)){return GW();}else if((av===0)&&(av===aw)){if(GZ(av)){return av;}return aw;}if(av<aw){return av;}return aw;};FK=function(av){var av,aw;return HM((aw=HL(av),new $Uint64(aw.$high&~2147483648,(aw.$low&~0)>>>0)));};$pkg.Abs=FK;GA=function(av){var av;return $parseFloat(FL.cos(av));};$pkg.Cos=GA;GH=function(av){var av;return $parseFloat(FL.floor(av));};$pkg.Floor=GH;GK=function(av){var av;if(av>=0){return FN;}else{return FO;}};$pkg.Inf=GK;GL=function(av,aw){var av,aw;if(av===FN){return aw>=0;}if(av===FO){return aw<=0;}return false;};$pkg.IsInf=GL;GM=function(av){var av,aw;aw=false;aw=!((av===av));return aw;};$pkg.IsNaN=GM;GS=function(av,aw){var av,aw;return EX(av,aw);};$pkg.Max=GS;GT=function(av,aw){var av,aw;return EY(av,aw);};$pkg.Min=GT;GW=function(){return FP;};$pkg.NaN=GW;GX=function(av,aw){var av,aw;if((av===1)||((av===-1)&&((aw===FN)||(aw===FO)))){return 1;}return $parseFloat(FL.pow(av,aw));};$pkg.Pow=GX;GZ=function(av){var av;return av<0||(1/av===FO);};$pkg.Signbit=GZ;HA=function(av){var av;return $parseFloat(FL.sin(av));};$pkg.Sin=HA;HD=function(av){var av;return $parseFloat(FL.sqrt(av));};$pkg.Sqrt=HD;HI=function(){var av;av=new($global.ArrayBuffer)(8);HH.uint32array=new($global.Uint32Array)(av);HH.float32array=new($global.Float32Array)(av);HH.float64array=new($global.Float64Array)(av);};HL=function(av){var av,aw,ax;HH.float64array[0]=av;return(aw=$shiftLeft64((new $Uint64(0,HH.uint32array[1])),32),ax=(new $Uint64(0,HH.uint32array[0])),new $Uint64(aw.$high+ax.$high,aw.$low+ax.$low));};$pkg.Float64bits=HL;HM=function(av){var av;HH.uint32array[0]=((av.$low>>>0));HH.uint32array[1]=(($shiftRightUint64(av,32).$low>>>0));return HH.float64array[0];};$pkg.Float64frombits=HM;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}HH=new IW.ptr(IT.zero(),IU.zero(),IV.zero());FL=$global.Math;FM=0;FN=1/FM;FO=-1/FM;FP=$parseFloat($NaN);HI();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["internal/goarch"]=(function(){var $pkg={},$init;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["internal/unsafeheader"]=(function(){var $pkg={},$init;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["internal/reflectlite"]=(function(){var $pkg={},$init,D,A,B,C,E,F,I,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AG,AH,AI,AT,AV,BL,BN,BO,BP,CU,CW,DU,DV,DW,DX,DY,DZ,EA,EC,ED,EE,EF,EG,EH,EI,EJ,EK,EL,EM,EN,EO,ES,ET,EU,EV,EW,EX,EY,EZ,AD,AR,BB,BD,BE,BF,BG,BH,BM,BQ,BS,BU,DH,DN,AK,AL,AM,AN,AP,AQ,AU,BA,BC,BI,BJ,BK,BR,BT,BV,BW,BX,BY,BZ,CB,CC,CF,CH,CJ,CM,CQ,CR,CV,CX,CY,CZ,DC,DD,DE,DF,DG,DI,DJ,DK,DL,DM;D=$packages["github.com/gopherjs/gopherjs/js"];A=$packages["internal/goarch"];B=$packages["internal/unsafeheader"];C=$packages["runtime"];E=$pkg.Value=$newType(0,$kindStruct,"reflectlite.Value",true,"internal/reflectlite",true,function(typ_,ptr_,flag_){this.$val=this;if(arguments.length===0){this.typ=DU.nil;this.ptr=0;this.flag=0;return;}this.typ=typ_;this.ptr=ptr_;this.flag=flag_;});F=$pkg.flag=$newType(4,$kindUintptr,"reflectlite.flag",true,"internal/reflectlite",false,null);I=$pkg.ValueError=$newType(0,$kindStruct,"reflectlite.ValueError",true,"internal/reflectlite",true,function(Method_,Kind_){this.$val=this;if(arguments.length===0){this.Method="";this.Kind=0;return;}this.Method=Method_;this.Kind=Kind_;});O=$pkg.Type=$newType(8,$kindInterface,"reflectlite.Type",true,"internal/reflectlite",true,null);P=$pkg.Kind=$newType(4,$kindUint,"reflectlite.Kind",true,"internal/reflectlite",true,null);Q=$pkg.tflag=$newType(1,$kindUint8,"reflectlite.tflag",true,"internal/reflectlite",false,null);R=$pkg.rtype=$newType(0,$kindStruct,"reflectlite.rtype",true,"internal/reflectlite",false,function(size_,ptrdata_,hash_,tflag_,align_,fieldAlign_,kind_,equal_,gcdata_,str_,ptrToThis_){this.$val=this;if(arguments.length===0){this.size=0;this.ptrdata=0;this.hash=0;this.tflag=0;this.align=0;this.fieldAlign=0;this.kind=0;this.equal=$throwNilPointerError;this.gcdata=EG.nil;this.str=0;this.ptrToThis=0;return;}this.size=size_;this.ptrdata=ptrdata_;this.hash=hash_;this.tflag=tflag_;this.align=align_;this.fieldAlign=fieldAlign_;this.kind=kind_;this.equal=equal_;this.gcdata=gcdata_;this.str=str_;this.ptrToThis=ptrToThis_;});S=$pkg.method=$newType(0,$kindStruct,"reflectlite.method",true,"internal/reflectlite",false,function(name_,mtyp_,ifn_,tfn_){this.$val=this;if(arguments.length===0){this.name=0;this.mtyp=0;this.ifn=0;this.tfn=0;return;}this.name=name_;this.mtyp=mtyp_;this.ifn=ifn_;this.tfn=tfn_;});T=$pkg.chanDir=$newType(4,$kindInt,"reflectlite.chanDir",true,"internal/reflectlite",false,null);U=$pkg.arrayType=$newType(0,$kindStruct,"reflectlite.arrayType",true,"internal/reflectlite",false,function(rtype_,elem_,slice_,len_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.elem=DU.nil;this.slice=DU.nil;this.len=0;return;}this.rtype=rtype_;this.elem=elem_;this.slice=slice_;this.len=len_;});V=$pkg.chanType=$newType(0,$kindStruct,"reflectlite.chanType",true,"internal/reflectlite",false,function(rtype_,elem_,dir_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.elem=DU.nil;this.dir=0;return;}this.rtype=rtype_;this.elem=elem_;this.dir=dir_;});W=$pkg.imethod=$newType(0,$kindStruct,"reflectlite.imethod",true,"internal/reflectlite",false,function(name_,typ_){this.$val=this;if(arguments.length===0){this.name=0;this.typ=0;return;}this.name=name_;this.typ=typ_;});X=$pkg.interfaceType=$newType(0,$kindStruct,"reflectlite.interfaceType",true,"internal/reflectlite",false,function(rtype_,pkgPath_,methods_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.pkgPath=new BO.ptr(EG.nil);this.methods=EK.nil;return;}this.rtype=rtype_;this.pkgPath=pkgPath_;this.methods=methods_;});Y=$pkg.mapType=$newType(0,$kindStruct,"reflectlite.mapType",true,"internal/reflectlite",false,function(rtype_,key_,elem_,bucket_,hasher_,keysize_,valuesize_,bucketsize_,flags_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.key=DU.nil;this.elem=DU.nil;this.bucket=DU.nil;this.hasher=$throwNilPointerError;this.keysize=0;this.valuesize=0;this.bucketsize=0;this.flags=0;return;}this.rtype=rtype_;this.key=key_;this.elem=elem_;this.bucket=bucket_;this.hasher=hasher_;this.keysize=keysize_;this.valuesize=valuesize_;this.bucketsize=bucketsize_;this.flags=flags_;});Z=$pkg.ptrType=$newType(0,$kindStruct,"reflectlite.ptrType",true,"internal/reflectlite",false,function(rtype_,elem_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.elem=DU.nil;return;}this.rtype=rtype_;this.elem=elem_;});AA=$pkg.sliceType=$newType(0,$kindStruct,"reflectlite.sliceType",true,"internal/reflectlite",false,function(rtype_,elem_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.elem=DU.nil;return;}this.rtype=rtype_;this.elem=elem_;});AB=$pkg.structField=$newType(0,$kindStruct,"reflectlite.structField",true,"internal/reflectlite",false,function(name_,typ_,offsetEmbed_){this.$val=this;if(arguments.length===0){this.name=new BO.ptr(EG.nil);this.typ=DU.nil;this.offsetEmbed=0;return;}this.name=name_;this.typ=typ_;this.offsetEmbed=offsetEmbed_;});AC=$pkg.structType=$newType(0,$kindStruct,"reflectlite.structType",true,"internal/reflectlite",false,function(rtype_,pkgPath_,fields_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.pkgPath=new BO.ptr(EG.nil);this.fields=EL.nil;return;}this.rtype=rtype_;this.pkgPath=pkgPath_;this.fields=fields_;});AG=$pkg.nameOff=$newType(4,$kindInt32,"reflectlite.nameOff",true,"internal/reflectlite",false,null);AH=$pkg.typeOff=$newType(4,$kindInt32,"reflectlite.typeOff",true,"internal/reflectlite",false,null);AI=$pkg.textOff=$newType(4,$kindInt32,"reflectlite.textOff",true,"internal/reflectlite",false,null);AT=$pkg.errorString=$newType(0,$kindStruct,"reflectlite.errorString",true,"internal/reflectlite",false,function(s_){this.$val=this;if(arguments.length===0){this.s="";return;}this.s=s_;});AV=$pkg.Method=$newType(0,$kindStruct,"reflectlite.Method",true,"internal/reflectlite",true,function(Name_,PkgPath_,Type_,Func_,Index_){this.$val=this;if(arguments.length===0){this.Name="";this.PkgPath="";this.Type=$ifaceNil;this.Func=new E.ptr(DU.nil,0,0);this.Index=0;return;}this.Name=Name_;this.PkgPath=PkgPath_;this.Type=Type_;this.Func=Func_;this.Index=Index_;});BL=$pkg.uncommonType=$newType(0,$kindStruct,"reflectlite.uncommonType",true,"internal/reflectlite",false,function(pkgPath_,mcount_,xcount_,moff_,_methods_){this.$val=this;if(arguments.length===0){this.pkgPath=0;this.mcount=0;this.xcount=0;this.moff=0;this._methods=ED.nil;return;}this.pkgPath=pkgPath_;this.mcount=mcount_;this.xcount=xcount_;this.moff=moff_;this._methods=_methods_;});BN=$pkg.funcType=$newType(0,$kindStruct,"reflectlite.funcType",true,"internal/reflectlite",false,function(rtype_,inCount_,outCount_,_in_,_out_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.inCount=0;this.outCount=0;this._in=DW.nil;this._out=DW.nil;return;}this.rtype=rtype_;this.inCount=inCount_;this.outCount=outCount_;this._in=_in_;this._out=_out_;});BO=$pkg.name=$newType(0,$kindStruct,"reflectlite.name",true,"internal/reflectlite",false,function(bytes_){this.$val=this;if(arguments.length===0){this.bytes=EG.nil;return;}this.bytes=bytes_;});BP=$pkg.nameData=$newType(0,$kindStruct,"reflectlite.nameData",true,"internal/reflectlite",false,function(name_,tag_,exported_){this.$val=this;if(arguments.length===0){this.name="";this.tag="";this.exported=false;return;}this.name=name_;this.tag=tag_;this.exported=exported_;});CU=$pkg.mapIter=$newType(0,$kindStruct,"reflectlite.mapIter",true,"internal/reflectlite",false,function(t_,m_,keys_,i_,last_){this.$val=this;if(arguments.length===0){this.t=$ifaceNil;this.m=null;this.keys=null;this.i=0;this.last=null;return;}this.t=t_;this.m=m_;this.keys=keys_;this.i=i_;this.last=last_;});CW=$pkg.TypeEx=$newType(8,$kindInterface,"reflectlite.TypeEx",true,"internal/reflectlite",true,null);DU=$ptrType(R);DV=$sliceType(BO);DW=$sliceType(DU);DX=$sliceType($String);DY=$sliceType($emptyInterface);DZ=$ptrType(D.Object);EA=$funcType([DY],[DZ],true);EC=$ptrType(BL);ED=$sliceType(S);EE=$ptrType(BN);EF=$sliceType(E);EG=$ptrType($Uint8);EH=$ptrType($UnsafePointer);EI=$sliceType(O);EJ=$sliceType(DZ);EK=$sliceType(W);EL=$sliceType(AB);EM=$ptrType(BP);EN=$structType("internal/reflectlite",[{prop:"str",name:"str",embedded:false,exported:false,typ:$String,tag:""}]);EO=$ptrType(CU);ES=$arrayType($Uintptr,2);ET=$sliceType($Uint8);EU=$ptrType(I);EV=$funcType([$UnsafePointer,$UnsafePointer],[$Bool],false);EW=$ptrType(X);EX=$funcType([$UnsafePointer,$Uintptr],[$Uintptr],false);EY=$ptrType(AB);EZ=$ptrType(AT);F.prototype.kind=function(){var m;m=this.$val;return((((m&31)>>>0)>>>0));};$ptrType(F).prototype.kind=function(){return new F(this.$get()).kind();};F.prototype.ro=function(){var m;m=this.$val;if(!((((m&96)>>>0)===0))){return 32;}return 0;};$ptrType(F).prototype.ro=function(){return new F(this.$get()).ro();};E.ptr.prototype.pointer=function(){var m;m=this;if(!((m.typ.size===4))||!m.typ.pointers()){$panic(new $String("can't call pointer on a non-pointer Value"));}if(!((((m.flag&128)>>>0)===0))){return(m.ptr).$get();}return m.ptr;};E.prototype.pointer=function(){return this.$val.pointer();};I.ptr.prototype.Error=function(){var m;m=this;if(m.Kind===0){return"reflect: call of "+m.Method+" on zero Value";}return"reflect: call of "+m.Method+" on "+new P(m.Kind).String()+" Value";};I.prototype.Error=function(){return this.$val.Error();};F.prototype.mustBeExported=function(){var m;m=this.$val;if(m===0){$panic(new I.ptr(DF(),0));}if(!((((m&96)>>>0)===0))){$panic(new $String("reflect: "+DF()+" using value obtained using unexported field"));}};$ptrType(F).prototype.mustBeExported=function(){return new F(this.$get()).mustBeExported();};F.prototype.mustBeAssignable=function(){var m;m=this.$val;if(m===0){$panic(new I.ptr(DF(),0));}if(!((((m&96)>>>0)===0))){$panic(new $String("reflect: "+DF()+" using value obtained using unexported field"));}if(((m&256)>>>0)===0){$panic(new $String("reflect: "+DF()+" using unaddressable value"));}};$ptrType(F).prototype.mustBeAssignable=function(){return new F(this.$get()).mustBeAssignable();};E.ptr.prototype.CanSet=function(){var m;m=this;return((m.flag&352)>>>0)===256;};E.prototype.CanSet=function(){return this.$val.CanSet();};E.ptr.prototype.IsValid=function(){var m;m=this;return!((m.flag===0));};E.prototype.IsValid=function(){return this.$val.IsValid();};E.ptr.prototype.Kind=function(){var m;m=this;return new F(m.flag).kind();};E.prototype.Kind=function(){return this.$val.Kind();};E.ptr.prototype.Type=function(){var m,n;m=this;n=m.flag;if(n===0){$panic(new I.ptr("reflectlite.Value.Type",0));}return m.typ;};E.prototype.Type=function(){return this.$val.Type();};AB.ptr.prototype.embedded=function(){var m;m=this;return!((((m.offsetEmbed&1)>>>0)===0));};AB.prototype.embedded=function(){return this.$val.embedded();};P.prototype.String=function(){var m;m=this.$val;if(((m>>0))<AD.$length){return((m<0||m>=AD.$length)?($throwRuntimeError("index out of range"),undefined):AD.$array[AD.$offset+m]);}return(0>=AD.$length?($throwRuntimeError("index out of range"),undefined):AD.$array[AD.$offset+0]);};$ptrType(P).prototype.String=function(){return new P(this.$get()).String();};R.ptr.prototype.String=function(){var m,n;m=this;n=$clone(m.nameOff(m.str),BO).name();if(!((((m.tflag&2)>>>0)===0))){return $substring(n,1);}return n;};R.prototype.String=function(){return this.$val.String();};R.ptr.prototype.Size=function(){var m;m=this;return m.size;};R.prototype.Size=function(){return this.$val.Size();};R.ptr.prototype.Kind=function(){var m;m=this;return((((m.kind&31)>>>0)>>>0));};R.prototype.Kind=function(){return this.$val.Kind();};R.ptr.prototype.pointers=function(){var m;m=this;return!((m.ptrdata===0));};R.prototype.pointers=function(){return this.$val.pointers();};R.ptr.prototype.common=function(){var m;m=this;return m;};R.prototype.common=function(){return this.$val.common();};R.ptr.prototype.exportedMethods=function(){var m,n;m=this;n=m.uncommon();if(n===EC.nil){return ED.nil;}return n.exportedMethods();};R.prototype.exportedMethods=function(){return this.$val.exportedMethods();};R.ptr.prototype.NumMethod=function(){var m,n;m=this;if(m.Kind()===20){n=(m.kindType);return n.NumMethod();}return m.exportedMethods().$length;};R.prototype.NumMethod=function(){return this.$val.NumMethod();};R.ptr.prototype.PkgPath=function(){var m,n;m=this;if(((m.tflag&4)>>>0)===0){return"";}n=m.uncommon();if(n===EC.nil){return"";}return $clone(m.nameOff(n.pkgPath),BO).name();};R.prototype.PkgPath=function(){return this.$val.PkgPath();};R.ptr.prototype.hasName=function(){var m;m=this;return!((((m.tflag&4)>>>0)===0));};R.prototype.hasName=function(){return this.$val.hasName();};R.ptr.prototype.Name=function(){var m,n,o;m=this;if(!m.hasName()){return"";}n=m.String();o=n.length-1>>0;while(true){if(!(o>=0&&!((n.charCodeAt(o)===46)))){break;}o=o-(1)>>0;}return $substring(n,(o+1>>0));};R.prototype.Name=function(){return this.$val.Name();};R.ptr.prototype.chanDir=function(){var m,n;m=this;if(!((m.Kind()===18))){$panic(new $String("reflect: chanDir of non-chan type"));}n=(m.kindType);return((n.dir>>0));};R.prototype.chanDir=function(){return this.$val.chanDir();};R.ptr.prototype.Elem=function(){var m,n,o,p,q,r,s;m=this;n=m.Kind();if(n===(17)){o=(m.kindType);return AP(o.elem);}else if(n===(18)){p=(m.kindType);return AP(p.elem);}else if(n===(21)){q=(m.kindType);return AP(q.elem);}else if(n===(22)){r=(m.kindType);return AP(r.elem);}else if(n===(23)){s=(m.kindType);return AP(s.elem);}$panic(new $String("reflect: Elem of invalid type"));};R.prototype.Elem=function(){return this.$val.Elem();};R.ptr.prototype.In=function(m){var m,n,o,p;n=this;if(!((n.Kind()===19))){$panic(new $String("reflect: In of non-func type"));}o=(n.kindType);return AP((p=o.in$(),((m<0||m>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+m])));};R.prototype.In=function(m){return this.$val.In(m);};R.ptr.prototype.Len=function(){var m,n;m=this;if(!((m.Kind()===17))){$panic(new $String("reflect: Len of non-array type"));}n=(m.kindType);return((n.len>>0));};R.prototype.Len=function(){return this.$val.Len();};R.ptr.prototype.NumIn=function(){var m,n;m=this;if(!((m.Kind()===19))){$panic(new $String("reflect: NumIn of non-func type"));}n=(m.kindType);return((n.inCount>>0));};R.prototype.NumIn=function(){return this.$val.NumIn();};R.ptr.prototype.NumOut=function(){var m,n;m=this;if(!((m.Kind()===19))){$panic(new $String("reflect: NumOut of non-func type"));}n=(m.kindType);return n.out().$length;};R.prototype.NumOut=function(){return this.$val.NumOut();};R.ptr.prototype.Out=function(m){var m,n,o,p;n=this;if(!((n.Kind()===19))){$panic(new $String("reflect: Out of non-func type"));}o=(n.kindType);return AP((p=o.out(),((m<0||m>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+m])));};R.prototype.Out=function(m){return this.$val.Out(m);};X.ptr.prototype.NumMethod=function(){var m;m=this;return m.methods.$length;};X.prototype.NumMethod=function(){return this.$val.NumMethod();};R.ptr.prototype.Implements=function(m){var{m,n,o,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=this;if($interfaceIsEqual(m,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.Implements"));}o=m.Kind();$s=3;case 3:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}if(!((o===20))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect: non-interface type passed to Type.Implements"));case 2:$s=-1;return AK($assertType(m,DU),n);}return;}var $f={$blk:R.ptr.prototype.Implements,$c:true,$r,m,n,o,$s};return $f;};R.prototype.Implements=function(m){return this.$val.Implements(m);};R.ptr.prototype.AssignableTo=function(m){var{m,n,o,p,q,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=this;if($interfaceIsEqual(m,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.AssignableTo"));}o=$assertType(m,DU);p=AL(o,n);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p||AK(o,n);$s=2;case 2:return q;}return;}var $f={$blk:R.ptr.prototype.AssignableTo,$c:true,$r,m,n,o,p,q,$s};return $f;};R.prototype.AssignableTo=function(m){return this.$val.AssignableTo(m);};AK=function(m,n){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(!((m.Kind()===20))){return false;}o=(m.kindType);if(o.methods.$length===0){return true;}if(n.Kind()===20){p=(n.kindType);q=0;r=0;while(true){if(!(r<p.methods.$length)){break;}t=(s=o.methods,((q<0||q>=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+q]));u=$clone(o.rtype.nameOff(t.name),BO);w=(v=p.methods,((r<0||r>=v.$length)?($throwRuntimeError("index out of range"),undefined):v.$array[v.$offset+r]));x=$clone(n.nameOff(w.name),BO);if($clone(x,BO).name()===$clone(u,BO).name()&&n.typeOff(w.typ)===o.rtype.typeOff(t.typ)){if(!$clone(u,BO).isExported()){y=$clone(u,BO).pkgPath();if(y===""){y=$clone(o.pkgPath,BO).name();}z=$clone(x,BO).pkgPath();if(z===""){z=$clone(p.pkgPath,BO).name();}if(!(y===z)){r=r+(1)>>0;continue;}}q=q+(1)>>0;if(q>=o.methods.$length){return true;}}r=r+(1)>>0;}return false;}aa=n.uncommon();if(aa===EC.nil){return false;}ab=0;ac=aa.methods();ad=0;while(true){if(!(ad<((aa.mcount>>0)))){break;}af=(ae=o.methods,((ab<0||ab>=ae.$length)?($throwRuntimeError("index out of range"),undefined):ae.$array[ae.$offset+ab]));ag=$clone(o.rtype.nameOff(af.name),BO);ah=$clone(((ad<0||ad>=ac.$length)?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+ad]),S);ai=$clone(n.nameOff(ah.name),BO);if($clone(ai,BO).name()===$clone(ag,BO).name()&&n.typeOff(ah.mtyp)===o.rtype.typeOff(af.typ)){if(!$clone(ag,BO).isExported()){aj=$clone(ag,BO).pkgPath();if(aj===""){aj=$clone(o.pkgPath,BO).name();}ak=$clone(ai,BO).pkgPath();if(ak===""){ak=$clone(n.nameOff(aa.pkgPath),BO).name();}if(!(aj===ak)){ad=ad+(1)>>0;continue;}}ab=ab+(1)>>0;if(ab>=o.methods.$length){return true;}}ad=ad+(1)>>0;}return false;};AL=function(m,n){var{m,n,o,p,$s,$r,$c}=$restore(this,{m,n});$s=$s||0;s:while(true){switch($s){case 0:if(m===n){$s=-1;return true;}if(m.hasName()&&n.hasName()||!((m.Kind()===n.Kind()))){$s=-1;return false;}o=AN(m,n,true);$s=1;case 1:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;$s=2;case 2:return p;}return;}var $f={$blk:AL,$c:true,$r,m,n,o,p,$s};return $f;};AM=function(m,n,o){var{m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m,n,o});$s=$s||0;s:while(true){switch($s){case 0:if(o){$s=-1;return $interfaceIsEqual(m,n);}q=m.Name();$s=4;case 4:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=n.Name();$s=5;case 5:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}if(!(q===r)){p=true;$s=3;continue s;}s=m.Kind();$s=6;case 6:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}t=n.Kind();$s=7;case 7:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}p=!((s===t));case 3:if(p){$s=1;continue;}$s=2;continue;case 1:$s=-1;return false;case 2:u=m.common();$s=8;case 8:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}v=u;w=n.common();$s=9;case 9:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}x=w;y=AN(v,x,false);$s=10;case 10:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=y;$s=11;case 11:return z;}return;}var $f={$blk:AM,$c:true,$r,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AN=function(m,n,o){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m,n,o});$s=$s||0;s:while(true){switch($s){case 0:if(m===n){$s=-1;return true;}p=m.Kind();if(!((p===n.Kind()))){$s=-1;return false;}if(1<=p&&p<=16||(p===24)||(p===26)){$s=-1;return true;}q=p;if(q===(17)){$s=2;continue;}if(q===(18)){$s=3;continue;}if(q===(19)){$s=4;continue;}if(q===(20)){$s=5;continue;}if(q===(21)){$s=6;continue;}if((q===(22))||(q===(23))){$s=7;continue;}if(q===(25)){$s=8;continue;}$s=9;continue;case 2:if(!(m.Len()===n.Len())){r=false;$s=10;continue s;}s=AM(m.Elem(),n.Elem(),o);$s=11;case 11:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;case 10:t=r;$s=12;case 12:return t;case 3:if(!(n.chanDir()===3)){u=false;$s=15;continue s;}v=AM(m.Elem(),n.Elem(),o);$s=16;case 16:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}u=v;case 15:if(u){$s=13;continue;}$s=14;continue;case 13:$s=-1;return true;case 14:if(!(n.chanDir()===m.chanDir())){w=false;$s=17;continue s;}x=AM(m.Elem(),n.Elem(),o);$s=18;case 18:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}w=x;case 17:y=w;$s=19;case 19:return y;case 4:z=(m.kindType);aa=(n.kindType);if(!((z.outCount===aa.outCount))||!((z.inCount===aa.inCount))){$s=-1;return false;}ab=0;case 20:if(!(ab<z.rtype.NumIn())){$s=21;continue;}ac=AM(z.rtype.In(ab),aa.rtype.In(ab),o);$s=24;case 24:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}if(!ac){$s=22;continue;}$s=23;continue;case 22:$s=-1;return false;case 23:ab=ab+(1)>>0;$s=20;continue;case 21:ad=0;case 25:if(!(ad<z.rtype.NumOut())){$s=26;continue;}ae=AM(z.rtype.Out(ad),aa.rtype.Out(ad),o);$s=29;case 29:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}if(!ae){$s=27;continue;}$s=28;continue;case 27:$s=-1;return false;case 28:ad=ad+(1)>>0;$s=25;continue;case 26:$s=-1;return true;case 5:af=(m.kindType);ag=(n.kindType);if((af.methods.$length===0)&&(ag.methods.$length===0)){$s=-1;return true;}$s=-1;return false;case 6:ai=AM(m.Key(),n.Key(),o);$s=31;case 31:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}if(!(ai)){ah=false;$s=30;continue s;}aj=AM(m.Elem(),n.Elem(),o);$s=32;case 32:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ah=aj;case 30:ak=ah;$s=33;case 33:return ak;case 7:al=AM(m.Elem(),n.Elem(),o);$s=34;case 34:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}am=al;$s=35;case 35:return am;case 8:an=(m.kindType);ao=(n.kindType);if(!((an.fields.$length===ao.fields.$length))){$s=-1;return false;}if(!($clone(an.pkgPath,BO).name()===$clone(ao.pkgPath,BO).name())){$s=-1;return false;}ap=an.fields;aq=0;case 36:if(!(aq<ap.$length)){$s=37;continue;}ar=aq;at=(as=an.fields,((ar<0||ar>=as.$length)?($throwRuntimeError("index out of range"),undefined):as.$array[as.$offset+ar]));av=(au=ao.fields,((ar<0||ar>=au.$length)?($throwRuntimeError("index out of range"),undefined):au.$array[au.$offset+ar]));if(!($clone(at.name,BO).name()===$clone(av.name,BO).name())){$s=-1;return false;}aw=AM(at.typ,av.typ,o);$s=40;case 40:if($c){$c=false;aw=aw.$blk();}if(aw&&aw.$blk!==undefined){break s;}if(!aw){$s=38;continue;}$s=39;continue;case 38:$s=-1;return false;case 39:if(o&&!($clone(at.name,BO).tag()===$clone(av.name,BO).tag())){$s=-1;return false;}if(!((at.offsetEmbed===av.offsetEmbed))){$s=-1;return false;}aq++;$s=36;continue;case 37:$s=-1;return true;case 9:case 1:$s=-1;return false;}return;}var $f={$blk:AN,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AP=function(m){var m;if(m===DU.nil){return $ifaceNil;}return m;};AQ=function(m){var m;return((m.kind&32)>>>0)===0;};E.ptr.prototype.object=function(){var m,n,o,p;m=this;if((m.typ.Kind()===17)||(m.typ.Kind()===25)){return m.ptr;}if(!((((m.flag&128)>>>0)===0))){n=m.ptr.$get();if(!(n===$ifaceNil)&&!(n.constructor===BI(m.typ))){switch(0){default:o=m.typ.Kind();if((o===(11))||(o===(6))){n=new(BI(m.typ))(n.$high,n.$low);}else if((o===(15))||(o===(16))){n=new(BI(m.typ))(n.$real,n.$imag);}else if(o===(23)){if(n===n.constructor.nil){n=BI(m.typ).nil;break;}p=new(BI(m.typ))(n.$array);p.$offset=n.$offset;p.$length=n.$length;p.$capacity=n.$capacity;n=p;}}}return n;}return m.ptr;};E.prototype.object=function(){return this.$val.object();};E.ptr.prototype.assignTo=function(m,n,o){var{m,n,o,p,q,r,s,t,u,$s,$r,$c}=$restore(this,{m,n,o});$s=$s||0;s:while(true){switch($s){case 0:p=this;if(!((((p.flag&512)>>>0)===0))){$s=1;continue;}$s=2;continue;case 1:q=DG(m,$clone(p,E));$s=3;case 3:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}E.copy(p,q);case 2:r=AL(n,p.typ);$s=8;case 8:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}if(r){$s=5;continue;}if(AK(n,p.typ)){$s=6;continue;}$s=7;continue;case 5:s=(((p.flag&384)>>>0)|new F(p.flag).ro())>>>0;s=(s|(((n.Kind()>>>0))))>>>0;$s=-1;return new E.ptr(n,p.ptr,s);case 6:if(o===0){o=CJ(n);}t=DD($clone(p,E));$s=9;case 9:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}u=t;if(n.NumMethod()===0){(o).$set(u);}else{DE(n,u,o);}$s=-1;return new E.ptr(n,o,148);case 7:case 4:$panic(new $String(m+": value of type "+p.typ.String()+" is not assignable to type "+n.String()));$s=-1;return new E.ptr(DU.nil,0,0);}return;}var $f={$blk:E.ptr.prototype.assignTo,$c:true,$r,m,n,o,p,q,r,s,t,u,$s};return $f;};E.prototype.assignTo=function(m,n,o){return this.$val.assignTo(m,n,o);};E.ptr.prototype.Cap=function(){var m,n,o;m=this;n=new F(m.flag).kind();o=n;if(o===(17)){return m.typ.Len();}else if((o===(18))||(o===(23))){return $parseInt($clone(m,E).object().$capacity)>>0;}$panic(new I.ptr("reflect.Value.Cap",n));};E.prototype.Cap=function(){return this.$val.Cap();};E.ptr.prototype.Index=function(m){var{aa,ab,ac,ad,ae,af,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:m=[m];n=[n];o=[o];p=[p];q=[q];r=[r];s=this;t=new F(s.flag).kind();u=t;if(u===(17)){$s=2;continue;}if(u===(23)){$s=3;continue;}if(u===(24)){$s=4;continue;}$s=5;continue;case 2:v=(s.typ.kindType);if(m[0]<0||m[0]>((v.len>>0))){$panic(new $String("reflect: array index out of range"));}q[0]=v.elem;w=(((((s.flag&384)>>>0)|new F(s.flag).ro())>>>0)|((q[0].Kind()>>>0)))>>>0;n[0]=s.ptr;if(!((((w&128)>>>0)===0))&&!((q[0].Kind()===17))&&!((q[0].Kind()===25))){$s=7;continue;}$s=8;continue;case 7:$s=-1;return new E.ptr(q[0],(new(BI(DL(q[0])))((function(m,n,o,p,q,r){return function(){return DI(q[0],n[0][m[0]]);};})(m,n,o,p,q,r),(function(m,n,o,p,q,r){return function(x){var x;n[0][m[0]]=DJ(q[0],x);};})(m,n,o,p,q,r))),w);case 8:x=BZ(q[0],DI(q[0],n[0][m[0]]),w);$s=9;case 9:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}y=x;$s=10;case 10:return y;case 3:z=$clone(s,E).object();if(m[0]<0||m[0]>=($parseInt(z.$length)>>0)){$panic(new $String("reflect: slice index out of range"));}aa=(s.typ.kindType);r[0]=aa.elem;ab=(((384|new F(s.flag).ro())>>>0)|((r[0].Kind()>>>0)))>>>0;m[0]=m[0]+(($parseInt(z.$offset)>>0))>>0;o[0]=z.$array;if(!((((ab&128)>>>0)===0))&&!((r[0].Kind()===17))&&!((r[0].Kind()===25))){$s=11;continue;}$s=12;continue;case 11:$s=-1;return new E.ptr(r[0],(new(BI(DL(r[0])))((function(m,n,o,p,q,r){return function(){return DI(r[0],o[0][m[0]]);};})(m,n,o,p,q,r),(function(m,n,o,p,q,r){return function(ac){var ac;o[0][m[0]]=DJ(r[0],ac);};})(m,n,o,p,q,r))),ab);case 12:ac=BZ(r[0],DI(r[0],o[0][m[0]]),ab);$s=13;case 13:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}ad=ac;$s=14;case 14:return ad;case 4:ae=(s.ptr).$get();if(m[0]<0||m[0]>=ae.length){$panic(new $String("reflect: string index out of range"));}af=(((new F(s.flag).ro()|8)>>>0)|128)>>>0;p[0]=ae.charCodeAt(m[0]);$s=-1;return new E.ptr(BD,((p.$ptr||(p.$ptr=new EG(function(){return this.$target[0];},function($v){this.$target[0]=$v;},p)))),af);case 5:$panic(new I.ptr("reflect.Value.Index",t));case 6:case 1:$s=-1;return new E.ptr(DU.nil,0,0);}return;}var $f={$blk:E.ptr.prototype.Index,$c:true,$r,aa,ab,ac,ad,ae,af,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};E.prototype.Index=function(m){return this.$val.Index(m);};E.ptr.prototype.InterfaceData=function(){var m;m=this;$panic(new $String("InterfaceData is not supported by GopherJS"));};E.prototype.InterfaceData=function(){return this.$val.InterfaceData();};E.ptr.prototype.IsNil=function(){var m,n,o;m=this;n=new F(m.flag).kind();o=n;if((o===(22))||(o===(23))){return $clone(m,E).object()===BI(m.typ).nil;}else if(o===(18)){return $clone(m,E).object()===$chanNil;}else if(o===(19)){return $clone(m,E).object()===$throwNilPointerError;}else if(o===(21)){return $clone(m,E).object()===false;}else if(o===(20)){return $clone(m,E).object()===$ifaceNil;}else if(o===(26)){return $clone(m,E).object()===0;}else{$panic(new I.ptr("reflect.Value.IsNil",n));}};E.prototype.IsNil=function(){return this.$val.IsNil();};E.ptr.prototype.Len=function(){var m,n,o;m=this;n=new F(m.flag).kind();o=n;if((o===(17))||(o===(24))){return $parseInt($clone(m,E).object().length);}else if(o===(23)){return $parseInt($clone(m,E).object().$length)>>0;}else if(o===(18)){return $parseInt($clone(m,E).object().$buffer.length)>>0;}else if(o===(21)){return $parseInt($keys($clone(m,E).object()).length);}else{$panic(new I.ptr("reflect.Value.Len",n));}};E.prototype.Len=function(){return this.$val.Len();};E.ptr.prototype.Pointer=function(){var m,n,o;m=this;n=new F(m.flag).kind();o=n;if((o===(18))||(o===(21))||(o===(22))||(o===(26))){if($clone(m,E).IsNil()){return 0;}return $clone(m,E).object();}else if(o===(19)){if($clone(m,E).IsNil()){return 0;}return 1;}else if(o===(23)){if($clone(m,E).IsNil()){return 0;}return $clone(m,E).object().$array;}else{$panic(new I.ptr("reflect.Value.Pointer",n));}};E.prototype.Pointer=function(){return this.$val.Pointer();};E.ptr.prototype.Set=function(m){var{m,n,o,p,q,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=this;new F(n.flag).mustBeAssignable();new F(m.flag).mustBeExported();o=$clone(m,E).assignTo("reflect.Set",n.typ,0);$s=1;case 1:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}E.copy(m,o);if(!((((n.flag&128)>>>0)===0))){$s=2;continue;}$s=3;continue;case 2:p=n.typ.Kind();if(p===(17)){$s=5;continue;}if(p===(20)){$s=6;continue;}if(p===(25)){$s=7;continue;}$s=8;continue;case 5:BI(n.typ).copy(n.ptr,m.ptr);$s=9;continue;case 6:q=DD($clone(m,E));$s=10;case 10:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}n.ptr.$set(q);$s=9;continue;case 7:BY(n.ptr,m.ptr,n.typ);$s=9;continue;case 8:n.ptr.$set($clone(m,E).object());case 9:case 4:$s=-1;return;case 3:n.ptr=m.ptr;$s=-1;return;}return;}var $f={$blk:E.ptr.prototype.Set,$c:true,$r,m,n,o,p,q,$s};return $f;};E.prototype.Set=function(m){return this.$val.Set(m);};E.ptr.prototype.SetBytes=function(m){var{m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=this;new F(n.flag).mustBeAssignable();new F(n.flag).mustBe(23);o=n.typ.Elem().Kind();$s=3;case 3:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}if(!((o===8))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.Value.SetBytes of non-byte slice"));case 2:p=m;if(!(n.typ.Name()==="")){q=true;$s=6;continue s;}r=n.typ.Elem().Name();$s=7;case 7:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}q=!(r==="");case 6:if(q){$s=4;continue;}$s=5;continue;case 4:s=new(BI(n.typ))(p.$array);s.$offset=p.$offset;s.$length=p.$length;s.$capacity=p.$capacity;p=s;case 5:n.ptr.$set(p);$s=-1;return;}return;}var $f={$blk:E.ptr.prototype.SetBytes,$c:true,$r,m,n,o,p,q,r,s,$s};return $f;};E.prototype.SetBytes=function(m){return this.$val.SetBytes(m);};E.ptr.prototype.SetCap=function(m){var m,n,o,p;n=this;new F(n.flag).mustBeAssignable();new F(n.flag).mustBe(23);o=n.ptr.$get();if(m<($parseInt(o.$length)>>0)||m>($parseInt(o.$capacity)>>0)){$panic(new $String("reflect: slice capacity out of range in SetCap"));}p=new(BI(n.typ))(o.$array);p.$offset=o.$offset;p.$length=o.$length;p.$capacity=m;n.ptr.$set(p);};E.prototype.SetCap=function(m){return this.$val.SetCap(m);};E.ptr.prototype.SetLen=function(m){var m,n,o,p;n=this;new F(n.flag).mustBeAssignable();new F(n.flag).mustBe(23);o=n.ptr.$get();if(m<0||m>($parseInt(o.$capacity)>>0)){$panic(new $String("reflect: slice length out of range in SetLen"));}p=new(BI(n.typ))(o.$array);p.$offset=o.$offset;p.$length=m;p.$capacity=o.$capacity;n.ptr.$set(p);};E.prototype.SetLen=function(m){return this.$val.SetLen(m);};E.ptr.prototype.Slice=function(m,n){var{m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m,n});$s=$s||0;s:while(true){switch($s){case 0:o=this;p=0;q=$ifaceNil;r=null;s=new F(o.flag).kind();t=s;if(t===(17)){$s=2;continue;}if(t===(23)){$s=3;continue;}if(t===(24)){$s=4;continue;}$s=5;continue;case 2:if(((o.flag&256)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}u=(o.typ.kindType);p=((u.len>>0));q=CH(u.elem);r=new(BI(q))($clone(o,E).object());$s=6;continue;case 3:q=o.typ;r=$clone(o,E).object();p=$parseInt(r.$capacity)>>0;$s=6;continue;case 4:v=(o.ptr).$get();if(m<0||n<m||n>v.length){$panic(new $String("reflect.Value.Slice: string slice index out of bounds"));}w=CC(new $String($substring(v,m,n)));$s=7;case 7:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}x=w;$s=8;case 8:return x;case 5:$panic(new I.ptr("reflect.Value.Slice",s));case 6:case 1:if(m<0||n<m||n>p){$panic(new $String("reflect.Value.Slice: slice index out of bounds"));}y=BZ(q,$subslice(r,m,n),new F(o.flag).ro());$s=9;case 9:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=y;$s=10;case 10:return z;}return;}var $f={$blk:E.ptr.prototype.Slice,$c:true,$r,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};E.prototype.Slice=function(m,n){return this.$val.Slice(m,n);};E.ptr.prototype.Slice3=function(m,n,o){var{m,n,o,p,q,r,s,t,u,v,w,x,$s,$r,$c}=$restore(this,{m,n,o});$s=$s||0;s:while(true){switch($s){case 0:p=this;q=0;r=$ifaceNil;s=null;t=new F(p.flag).kind();u=t;if(u===(17)){if(((p.flag&256)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}v=(p.typ.kindType);q=((v.len>>0));r=CH(v.elem);s=new(BI(r))($clone(p,E).object());}else if(u===(23)){r=p.typ;s=$clone(p,E).object();q=$parseInt(s.$capacity)>>0;}else{$panic(new I.ptr("reflect.Value.Slice3",t));}if(m<0||n<m||o<n||o>q){$panic(new $String("reflect.Value.Slice3: slice index out of bounds"));}w=BZ(r,$subslice(s,m,n,o),new F(p.flag).ro());$s=1;case 1:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}x=w;$s=2;case 2:return x;}return;}var $f={$blk:E.ptr.prototype.Slice3,$c:true,$r,m,n,o,p,q,r,s,t,u,v,w,x,$s};return $f;};E.prototype.Slice3=function(m,n,o){return this.$val.Slice3(m,n,o);};E.ptr.prototype.Close=function(){var m;m=this;new F(m.flag).mustBe(18);new F(m.flag).mustBeExported();$close($clone(m,E).object());};E.prototype.Close=function(){return this.$val.Close();};E.ptr.prototype.Elem=function(){var{m,n,o,p,q,r,s,t,u,v,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:m=this;n=new F(m.flag).kind();o=n;if(o===(20)){$s=2;continue;}if(o===(22)){$s=3;continue;}$s=4;continue;case 2:p=$clone(m,E).object();if(p===$ifaceNil){$s=-1;return new E.ptr(DU.nil,0,0);}q=BJ(p.constructor);r=BZ(q,p.$val,new F(m.flag).ro());$s=6;case 6:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=r;$s=7;case 7:return s;case 3:if($clone(m,E).IsNil()){$s=-1;return new E.ptr(DU.nil,0,0);}t=$clone(m,E).object();u=(m.typ.kindType);v=(((((m.flag&96)>>>0)|128)>>>0)|256)>>>0;v=(v|(((u.elem.Kind()>>>0))))>>>0;$s=-1;return new E.ptr(u.elem,(DI(u.elem,t)),v);case 4:$panic(new I.ptr("reflect.Value.Elem",n));case 5:case 1:$s=-1;return new E.ptr(DU.nil,0,0);}return;}var $f={$blk:E.ptr.prototype.Elem,$c:true,$r,m,n,o,p,q,r,s,t,u,v,$s};return $f;};E.prototype.Elem=function(){return this.$val.Elem();};E.ptr.prototype.NumField=function(){var m,n;m=this;new F(m.flag).mustBe(25);n=(m.typ.kindType);return n.fields.$length;};E.prototype.NumField=function(){return this.$val.NumField();};E.ptr.prototype.MapKeys=function(){var{m,n,o,p,q,r,s,t,u,v,w,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:m=this;new F(m.flag).mustBe(21);n=(m.typ.kindType);o=n.key;p=(new F(m.flag).ro()|((o.Kind()>>>0)))>>>0;q=$clone(m,E).pointer();r=0;if(!(q===0)){r=CZ(q);}s=CV(m.typ,q);t=$makeSlice(EF,r);u=0;u=0;case 1:if(!(u<t.$length)){$s=2;continue;}v=CX(s);$s=3;case 3:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}w=v;if(w===0){$s=2;continue;}E.copy(((u<0||u>=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+u]),DM(o,p,w));CY(s);u=u+(1)>>0;$s=1;continue;case 2:$s=-1;return $subslice(t,0,u);}return;}var $f={$blk:E.ptr.prototype.MapKeys,$c:true,$r,m,n,o,p,q,r,s,t,u,v,w,$s};return $f;};E.prototype.MapKeys=function(){return this.$val.MapKeys();};E.ptr.prototype.MapIndex=function(m){var{m,n,o,p,q,r,s,t,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=this;new F(n.flag).mustBe(21);o=(n.typ.kindType);p=$clone(m,E).assignTo("reflect.Value.MapIndex",o.key,0);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}E.copy(m,p);q=0;if(!((((m.flag&128)>>>0)===0))){q=m.ptr;}else{q=((m.$ptr_ptr||(m.$ptr_ptr=new EH(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},m))));}r=CR(n.typ,$clone(n,E).pointer(),q);if(r===0){$s=-1;return new E.ptr(DU.nil,0,0);}s=o.elem;t=new F((((n.flag|m.flag)>>>0))).ro();t=(t|(((s.Kind()>>>0))))>>>0;$s=-1;return DM(s,t,r);}return;}var $f={$blk:E.ptr.prototype.MapIndex,$c:true,$r,m,n,o,p,q,r,s,t,$s};return $f;};E.prototype.MapIndex=function(m){return this.$val.MapIndex(m);};E.ptr.prototype.Field=function(m){var{aa,ab,ac,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=[n];o=[o];p=[p];q=[q];r=this;if(!((new F(r.flag).kind()===25))){$panic(new I.ptr("reflect.Value.Field",new F(r.flag).kind()));}s=(r.typ.kindType);if(((m>>>0))>=((s.fields.$length>>>0))){$panic(new $String("reflect: Field index out of range"));}o[0]=$internalize(BI(r.typ).fields[m].prop,$String);u=(t=s.fields,((m<0||m>=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+m]));q[0]=u.typ;v=(((r.flag&416)>>>0)|((q[0].Kind()>>>0)))>>>0;if(!$clone(u.name,BO).isExported()){if(u.embedded()){v=(v|(64))>>>0;}else{v=(v|(32))>>>0;}}x=$clone((w=s.fields,((m<0||m>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+m])).name,BO).tag();if(!(x==="")&&!((m===0))){$s=1;continue;}$s=2;continue;case 1:n[0]=DK(x);if(!(n[0]==="")){$s=3;continue;}$s=4;continue;case 3:case 5:y=[y];z=$clone(r,E).Field(0);$s=7;case 7:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}E.copy(r,z);if(r.typ===DH){$s=8;continue;}$s=9;continue;case 8:y[0]=$clone(r,E).object().object;$s=-1;return new E.ptr(q[0],(new(BI(DL(q[0])))((function(n,o,p,q,y){return function(){return $internalize(y[0][$externalize(n[0],$String)],BI(q[0]));};})(n,o,p,q,y),(function(n,o,p,q,y){return function(aa){var aa;y[0][$externalize(n[0],$String)]=$externalize(aa,BI(q[0]));};})(n,o,p,q,y))),v);case 9:if(r.typ.Kind()===22){$s=10;continue;}$s=11;continue;case 10:aa=$clone(r,E).Elem();$s=12;case 12:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}E.copy(r,aa);case 11:$s=5;continue;case 6:case 4:case 2:p[0]=r.ptr;if(!((((v&128)>>>0)===0))&&!((q[0].Kind()===17))&&!((q[0].Kind()===25))){$s=13;continue;}$s=14;continue;case 13:$s=-1;return new E.ptr(q[0],(new(BI(DL(q[0])))((function(n,o,p,q){return function(){return DI(q[0],p[0][$externalize(o[0],$String)]);};})(n,o,p,q),(function(n,o,p,q){return function(ab){var ab;p[0][$externalize(o[0],$String)]=DJ(q[0],ab);};})(n,o,p,q))),v);case 14:ab=BZ(q[0],DI(q[0],p[0][$externalize(o[0],$String)]),v);$s=15;case 15:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}ac=ab;$s=16;case 16:return ac;}return;}var $f={$blk:E.ptr.prototype.Field,$c:true,$r,aa,ab,ac,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};E.prototype.Field=function(m){return this.$val.Field(m);};AT.ptr.prototype.Error=function(){var m;m=this;return m.s;};AT.prototype.Error=function(){return this.$val.Error();};AU=function(m){var m;if(m.length<2){return[m,$ifaceNil];}if((m.charCodeAt(0)===39)||(m.charCodeAt(0)===34)){if(m.charCodeAt((m.length-1>>0))===m.charCodeAt(0)){return[$substring(m,1,(m.length-1>>0)),$ifaceNil];}return["",$pkg.ErrSyntax];}return[m,$ifaceNil];};F.prototype.mustBe=function(m){var m,n;n=this.$val;if(!((((((n&31)>>>0)>>>0))===m))){$panic(new I.ptr(DF(),new F(n).kind()));}};$ptrType(F).prototype.mustBe=function(m){return new F(this.$get()).mustBe(m);};R.ptr.prototype.Comparable=function(){var{m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:m=this;n=m.Kind();if((n===(19))||(n===(23))||(n===(21))){$s=2;continue;}if(n===(17)){$s=3;continue;}if(n===(25)){$s=4;continue;}$s=5;continue;case 2:$s=-1;return false;case 3:o=m.Elem().Comparable();$s=6;case 6:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;$s=7;case 7:return p;case 4:q=0;case 8:if(!(q<m.NumField())){$s=9;continue;}r=$clone(m.Field(q),AB);s=r.typ.Comparable();$s=12;case 12:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}if(!s){$s=10;continue;}$s=11;continue;case 10:$s=-1;return false;case 11:q=q+(1)>>0;$s=8;continue;case 9:case 5:case 1:$s=-1;return true;}return;}var $f={$blk:R.ptr.prototype.Comparable,$c:true,$r,m,n,o,p,q,r,s,$s};return $f;};R.prototype.Comparable=function(){return this.$val.Comparable();};R.ptr.prototype.IsVariadic=function(){var m,n;m=this;if(!((m.Kind()===19))){$panic(new $String("reflect: IsVariadic of non-func type"));}n=(m.kindType);return!((((n.outCount&32768)>>>0)===0));};R.prototype.IsVariadic=function(){return this.$val.IsVariadic();};R.ptr.prototype.Field=function(m){var m,n,o,p;n=this;if(!((n.Kind()===25))){$panic(new $String("reflect: Field of non-struct type"));}o=(n.kindType);if(m<0||m>=o.fields.$length){$panic(new $String("reflect: Field index out of bounds"));}return(p=o.fields,((m<0||m>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+m]));};R.prototype.Field=function(m){return this.$val.Field(m);};R.ptr.prototype.Key=function(){var m,n;m=this;if(!((m.Kind()===21))){$panic(new $String("reflect: Key of non-map type"));}n=(m.kindType);return AP(n.key);};R.prototype.Key=function(){return this.$val.Key();};R.ptr.prototype.NumField=function(){var m,n;m=this;if(!((m.Kind()===25))){$panic(new $String("reflect: NumField of non-struct type"));}n=(m.kindType);return n.fields.$length;};R.prototype.NumField=function(){return this.$val.NumField();};R.ptr.prototype.Method=function(m){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=[n];o=new AV.ptr("","",$ifaceNil,new E.ptr(DU.nil,0,0),0);p=this;if(p.Kind()===20){$s=1;continue;}$s=2;continue;case 1:q=(p.kindType);r=q.rtype.Method(m);$s=3;case 3:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}AV.copy(o,r);s=o;$s=4;case 4:return s;case 2:t=p.exportedMethods();if(m<0||m>=t.$length){$panic(new $String("reflect: Method index out of range"));}u=$clone(((m<0||m>=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+m]),S);v=$clone(p.nameOff(u.name),BO);o.Name=$clone(v,BO).name();w=19;x=p.typeOff(u.mtyp);y=(x.kindType);z=$makeSlice(EI,0,(1+y.in$().$length>>0));z=$append(z,p);aa=y.in$();ab=0;while(true){if(!(ab<aa.$length)){break;}ac=((ab<0||ab>=aa.$length)?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+ab]);z=$append(z,ac);ab++;}ad=$makeSlice(EI,0,y.out().$length);ae=y.out();af=0;while(true){if(!(af<ae.$length)){break;}ag=((af<0||af>=ae.$length)?($throwRuntimeError("index out of range"),undefined):ae.$array[ae.$offset+af]);ad=$append(ad,ag);af++;}ah=CF(z,ad,y.rtype.IsVariadic());$s=5;case 5:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ai=ah;o.Type=ai;n[0]=$internalize($methodSet(p[$externalize(BE,$String)])[m].prop,$String);aj=D.MakeFunc((function(n){return function(aj,ak){var aj,ak,al;al=(0>=ak.$length?($throwRuntimeError("index out of range"),undefined):ak.$array[ak.$offset+0]);return new $jsObjectPtr(al[$externalize(n[0],$String)].apply(al,$externalize($subslice(ak,1),EJ)));};})(n));E.copy(o.Func,new E.ptr($assertType(ai,DU),(aj),w));o.Index=m;AV.copy(o,o);$s=-1;return o;}return;}var $f={$blk:R.ptr.prototype.Method,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};R.prototype.Method=function(m){return this.$val.Method(m);};BA=function(m){var{m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=[n];o=[o];p=[p];q=CC(m);$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=$clone(q,E);if(!(($clone(r,E).Kind()===23))){$panic(new I.ptr("Swapper",$clone(r,E).Kind()));}p[0]=(($clone(r,E).Len()>>>0));s=p[0];if(s===(0)){$s=-1;return(function(n,o,p){return function(t,u){var t,u;$panic(new $String("reflect: slice index out of range"));};})(n,o,p);}else if(s===(1)){$s=-1;return(function(n,o,p){return function(t,u){var t,u;if(!((t===0))||!((u===0))){$panic(new $String("reflect: slice index out of range"));}};})(n,o,p);}n[0]=m.$array;o[0]=$parseInt(m.$offset)>>0;$s=-1;return(function(n,o,p){return function(t,u){var t,u,v;if(((t>>>0))>=p[0]||((u>>>0))>=p[0]){$panic(new $String("reflect: slice index out of range"));}t=t+(o[0])>>0;u=u+(o[0])>>0;v=n[0][t];n[0][t]=n[0][u];n[0][u]=v;};})(n,o,p);}return;}var $f={$blk:BA,$c:true,$r,m,n,o,p,q,r,s,$s};return $f;};$pkg.Swapper=BA;BC=function(){var{m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:m=(function(m){var m;});$r=m((n=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),new n.constructor.elem(n)));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((o=new BL.ptr(0,0,0,0,ED.nil),new o.constructor.elem(o)));$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((p=new S.ptr(0,0,0,0),new p.constructor.elem(p)));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((q=new U.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),DU.nil,DU.nil,0),new q.constructor.elem(q)));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((r=new V.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),DU.nil,0),new r.constructor.elem(r)));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((s=new BN.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),0,0,DW.nil,DW.nil),new s.constructor.elem(s)));$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((t=new X.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),new BO.ptr(EG.nil),EK.nil),new t.constructor.elem(t)));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((u=new Y.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),DU.nil,DU.nil,DU.nil,$throwNilPointerError,0,0,0,0),new u.constructor.elem(u)));$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((v=new Z.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),DU.nil),new v.constructor.elem(v)));$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((w=new AA.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),DU.nil),new w.constructor.elem(w)));$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((x=new AC.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),new BO.ptr(EG.nil),EL.nil),new x.constructor.elem(x)));$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((y=new W.ptr(0,0),new y.constructor.elem(y)));$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((z=new AB.ptr(new BO.ptr(EG.nil),DU.nil,0),new z.constructor.elem(z)));$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}BB=true;BD=$assertType(CB(new $Uint8(0)),DU);$s=-1;return;}return;}var $f={$blk:BC,$c:true,$r,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};BI=function(m){var m;return m[$externalize(BE,$String)];};BJ=function(m){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(m[$externalize(BF,$String)]===undefined){n=new R.ptr(((($parseInt(m.size)>>0)>>>0)),0,0,0,0,0,((($parseInt(m.kind)>>0)<<24>>>24)),$throwNilPointerError,EG.nil,BT($clone(BR(BW(m.string),"",!!(m.exported)),BO)),0);n[$externalize(BE,$String)]=m;m[$externalize(BF,$String)]=n;o=$methodSet(m);if(!(($parseInt(o.length)===0))||!!(m.named)){n.tflag=(n.tflag|(1))>>>0;if(!!(m.named)){n.tflag=(n.tflag|(4))>>>0;}p=ED.nil;q=0;while(true){if(!(q<$parseInt(o.length))){break;}r=o[q];s=BW(r.pkg)==="";if(!s){q=q+(1)>>0;continue;}p=$append(p,new S.ptr(BT($clone(BR(BW(r.name),"",s),BO)),BV(BJ(r.typ)),0,0));q=q+(1)>>0;}t=((p.$length<<16>>>16));u=0;while(true){if(!(u<$parseInt(o.length))){break;}v=o[u];w=BW(v.pkg)==="";if(w){u=u+(1)>>0;continue;}p=$append(p,new S.ptr(BT($clone(BR(BW(v.name),"",w),BO)),BV(BJ(v.typ)),0,0));u=u+(1)>>0;}x=new BL.ptr(BT($clone(BR(BW(m.pkg),"",false),BO)),(($parseInt(o.length)<<16>>>16)),t,0,p);y=n;(BM||$throwRuntimeError("assignment to entry in nil map"))[DU.keyFor(y)]={k:y,v:x};x[$externalize(BE,$String)]=m;}z=n.Kind();if(z===(17)){BK(n,new U.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),BJ(m.elem),DU.nil,((($parseInt(m.len)>>0)>>>0))));}else if(z===(18)){aa=3;if(!!(m.sendOnly)){aa=2;}if(!!(m.recvOnly)){aa=1;}BK(n,new V.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),BJ(m.elem),((aa>>>0))));}else if(z===(19)){ab=m.params;ac=$makeSlice(DW,$parseInt(ab.length));ad=ac;ae=0;while(true){if(!(ae<ad.$length)){break;}af=ae;((af<0||af>=ac.$length)?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+af]=BJ(ab[af]));ae++;}ag=m.results;ah=$makeSlice(DW,$parseInt(ag.length));ai=ah;aj=0;while(true){if(!(aj<ai.$length)){break;}ak=aj;((ak<0||ak>=ah.$length)?($throwRuntimeError("index out of range"),undefined):ah.$array[ah.$offset+ak]=BJ(ag[ak]));aj++;}al=(($parseInt(ag.length)<<16>>>16));if(!!(m.variadic)){al=(al|(32768))>>>0;}BK(n,new BN.ptr($clone(n,R),(($parseInt(ab.length)<<16>>>16)),al,ac,ah));}else if(z===(20)){am=m.methods;an=$makeSlice(EK,$parseInt(am.length));ao=an;ap=0;while(true){if(!(ap<ao.$length)){break;}aq=ap;ar=am[aq];W.copy(((aq<0||aq>=an.$length)?($throwRuntimeError("index out of range"),undefined):an.$array[an.$offset+aq]),new W.ptr(BT($clone(BR(BW(ar.name),"",BW(ar.pkg)===""),BO)),BV(BJ(ar.typ))));ap++;}BK(n,new X.ptr($clone(n,R),$clone(BR(BW(m.pkg),"",false),BO),an));}else if(z===(21)){BK(n,new Y.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),BJ(m.key),BJ(m.elem),DU.nil,$throwNilPointerError,0,0,0,0));}else if(z===(22)){BK(n,new Z.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),BJ(m.elem)));}else if(z===(23)){BK(n,new AA.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),BJ(m.elem)));}else if(z===(25)){as=m.fields;at=$makeSlice(EL,$parseInt(as.length));au=at;av=0;while(true){if(!(av<au.$length)){break;}aw=av;ax=as[aw];ay=((aw>>>0))<<1>>>0;if(!!(ax.embedded)){ay=(ay|(1))>>>0;}AB.copy(((aw<0||aw>=at.$length)?($throwRuntimeError("index out of range"),undefined):at.$array[at.$offset+aw]),new AB.ptr($clone(BR(BW(ax.name),BW(ax.tag),!!(ax.exported)),BO),BJ(ax.typ),ay));av++;}BK(n,new AC.ptr($clone(n,R),$clone(BR(BW(m.pkgPath),"",false),BO),at));}}return((m[$externalize(BF,$String)]));};BK=function(m,n){var m,n;m[$externalize(BG,$String)]=n;n[$externalize(BH,$String)]=m;};BL.ptr.prototype.methods=function(){var m;m=this;return m._methods;};BL.prototype.methods=function(){return this.$val.methods();};BL.ptr.prototype.exportedMethods=function(){var m;m=this;return $subslice(m._methods,0,m.xcount,m.xcount);};BL.prototype.exportedMethods=function(){return this.$val.exportedMethods();};R.ptr.prototype.uncommon=function(){var m,n;m=this;return(n=BM[DU.keyFor(m)],n!==undefined?n.v:EC.nil);};R.prototype.uncommon=function(){return this.$val.uncommon();};BN.ptr.prototype.in$=function(){var m;m=this;return m._in;};BN.prototype.in$=function(){return this.$val.in$();};BN.ptr.prototype.out=function(){var m;m=this;return m._out;};BN.prototype.out=function(){return this.$val.out();};BO.ptr.prototype.name=function(){var m,n,o;m="";n=this;m=(o=BQ[EG.keyFor(n.bytes)],o!==undefined?o.v:EM.nil).name;return m;};BO.prototype.name=function(){return this.$val.name();};BO.ptr.prototype.tag=function(){var m,n,o;m="";n=this;m=(o=BQ[EG.keyFor(n.bytes)],o!==undefined?o.v:EM.nil).tag;return m;};BO.prototype.tag=function(){return this.$val.tag();};BO.ptr.prototype.pkgPath=function(){var m;m=this;return"";};BO.prototype.pkgPath=function(){return this.$val.pkgPath();};BO.ptr.prototype.isExported=function(){var m,n;m=this;return(n=BQ[EG.keyFor(m.bytes)],n!==undefined?n.v:EM.nil).exported;};BO.prototype.isExported=function(){return this.$val.isExported();};BR=function(m,n,o){var m,n,o,p,q;p=$newDataPointer(0,EG);q=p;(BQ||$throwRuntimeError("assignment to entry in nil map"))[EG.keyFor(q)]={k:q,v:new BP.ptr(m,n,o)};return new BO.ptr(p);};R.ptr.prototype.nameOff=function(m){var m,n,o;n=this;return(o=((m>>0)),((o<0||o>=BS.$length)?($throwRuntimeError("index out of range"),undefined):BS.$array[BS.$offset+o]));};R.prototype.nameOff=function(m){return this.$val.nameOff(m);};BT=function(m){var m,n;n=BS.$length;BS=$append(BS,m);return((n>>0));};R.ptr.prototype.typeOff=function(m){var m,n,o;n=this;return(o=((m>>0)),((o<0||o>=BU.$length)?($throwRuntimeError("index out of range"),undefined):BU.$array[BU.$offset+o]));};R.prototype.typeOff=function(m){return this.$val.typeOff(m);};BV=function(m){var m,n;n=BU.$length;BU=$append(BU,m);return((n>>0));};BW=function(m){var m,n;n=new EN.ptr("");n.str=m;return n.str;};BX=function(m){var m;return!!(BI(m).wrapped);};BY=function(m,n,o){var m,n,o,p,q,r;p=BI(o).fields;q=0;while(true){if(!(q<$parseInt(p.length))){break;}r=$internalize(p[q].prop,$String);m[$externalize(r,$String)]=n[$externalize(r,$String)];q=q+(1)>>0;}};BZ=function(m,n,o){var{m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m,n,o});$s=$s||0;s:while(true){switch($s){case 0:p=m.common();$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;t=m.Kind();$s=6;case 6:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}if(t===17){s=true;$s=5;continue s;}u=m.Kind();$s=7;case 7:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}s=u===25;case 5:if(s){r=true;$s=4;continue s;}v=m.Kind();$s=8;case 8:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}r=v===22;case 4:if(r){$s=2;continue;}$s=3;continue;case 2:w=m.Kind();$s=9;case 9:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}x=new E.ptr(q,(n),(o|((w>>>0)))>>>0);$s=10;case 10:return x;case 3:y=m.Kind();$s=11;case 11:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=new E.ptr(q,($newDataPointer(n,BI(q.ptrTo()))),(((o|((y>>>0)))>>>0)|128)>>>0);$s=12;case 12:return z;}return;}var $f={$blk:BZ,$c:true,$r,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};CB=function(m){var m;if(!BB){return new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);}if($interfaceIsEqual(m,$ifaceNil)){return $ifaceNil;}return BJ(m.constructor);};$pkg.TypeOf=CB;CC=function(m){var{m,n,o,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:if($interfaceIsEqual(m,$ifaceNil)){$s=-1;return new E.ptr(DU.nil,0,0);}n=BZ(BJ(m.constructor),m.$val,0);$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;$s=2;case 2:return o;}return;}var $f={$blk:CC,$c:true,$r,m,n,o,$s};return $f;};$pkg.ValueOf=CC;CF=function(m,n,o){var{aa,ab,ac,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m,n,o});$s=$s||0;s:while(true){switch($s){case 0:if(!(o)){p=false;$s=3;continue s;}if(m.$length===0){q=true;$s=4;continue s;}s=(r=m.$length-1>>0,((r<0||r>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+r])).Kind();$s=5;case 5:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}q=!((s===23));case 4:p=q;case 3:if(p){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.FuncOf: last arg of variadic func must be slice"));case 2:t=$makeSlice(EJ,m.$length);u=m;v=0;while(true){if(!(v<u.$length)){break;}w=v;x=((v<0||v>=u.$length)?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+v]);((w<0||w>=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+w]=BI(x));v++;}y=$makeSlice(EJ,n.$length);z=n;aa=0;while(true){if(!(aa<z.$length)){break;}ab=aa;ac=((aa<0||aa>=z.$length)?($throwRuntimeError("index out of range"),undefined):z.$array[z.$offset+aa]);((ab<0||ab>=y.$length)?($throwRuntimeError("index out of range"),undefined):y.$array[y.$offset+ab]=BI(ac));aa++;}$s=-1;return BJ($funcType($externalize(t,EJ),$externalize(y,EJ),$externalize(o,$Bool)));}return;}var $f={$blk:CF,$c:true,$r,aa,ab,ac,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};$pkg.FuncOf=CF;R.ptr.prototype.ptrTo=function(){var m;m=this;return BJ($ptrType(BI(m)));};R.prototype.ptrTo=function(){return this.$val.ptrTo();};CH=function(m){var m;return BJ($sliceType(BI(m)));};$pkg.SliceOf=CH;CJ=function(m){var m,n;n=m.Kind();if(n===(25)){return(new(BI(m).ptr)());}else if(n===(17)){return(BI(m).zero());}else{return($newDataPointer(BI(m).zero(),BI(m.ptrTo())));}};CM=function(m,n,o){var m,n,o;n.$set(o.$get());};CQ=function(m,n){var m,n,o,p;o=n;if(!(o.$get===undefined)){o=o.$get();}p=$internalize(BI(m.Key()).keyFor(o),$String);return[o,p];};CR=function(m,n,o){var m,n,o,p,q,r;p=CQ(m,o);q=p[1];r=n[$externalize(q,$String)];if(r===undefined){return 0;}return($newDataPointer(r.v,BI(DL(m.Elem()))));};CU.ptr.prototype.skipUntilValidKey=function(){var m,n;m=this;while(true){if(!(m.i<$parseInt(m.keys.length))){break;}n=m.keys[m.i];if(!(m.m[$externalize($internalize(n,$String),$String)]===undefined)){break;}m.i=m.i+(1)>>0;}};CU.prototype.skipUntilValidKey=function(){return this.$val.skipUntilValidKey();};CV=function(m,n){var m,n;return(new CU.ptr(m,n,$keys(n),0,null));};CX=function(m){var{m,n,o,p,q,r,s,t,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=($pointerOfStructConversion(m,EO));o=null;if(!(n.last===null)){o=n.last;}else{n.skipUntilValidKey();if(n.i===$parseInt(n.keys.length)){$s=-1;return 0;}p=n.keys[n.i];o=n.m[$externalize($internalize(p,$String),$String)];n.last=o;}q=$assertType(n.t,CW).Key();$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=DL(q);$s=2;case 2:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=BI(r);$s=3;case 3:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}t=($newDataPointer(o.k,s));$s=4;case 4:return t;}return;}var $f={$blk:CX,$c:true,$r,m,n,o,p,q,r,s,t,$s};return $f;};CY=function(m){var m,n;n=($pointerOfStructConversion(m,EO));n.last=null;n.i=n.i+(1)>>0;};CZ=function(m){var m;return $parseInt($keys(m).length);};DC=function(m,n,o){var m,n,o,p,q,r,s,t,u,v,w,x,y;p=DU.nil;q=EE.nil;r=0;s="";if(n.typ.Kind()===20){t=(n.typ.kindType);if(o<0||o>=t.methods.$length){$panic(new $String("reflect: internal error: invalid method index"));}v=(u=t.methods,((o<0||o>=u.$length)?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+o]));if(!$clone(t.rtype.nameOff(v.name),BO).isExported()){$panic(new $String("reflect: "+m+" of unexported method"));}q=(t.rtype.typeOff(v.typ).kindType);s=$clone(t.rtype.nameOff(v.name),BO).name();}else{w=n.typ.exportedMethods();if(((o>>>0))>=((w.$length>>>0))){$panic(new $String("reflect: internal error: invalid method index"));}x=$clone(((o<0||o>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+o]),S);if(!$clone(n.typ.nameOff(x.name),BO).isExported()){$panic(new $String("reflect: "+m+" of unexported method"));}q=(n.typ.typeOff(x.mtyp).kindType);s=$internalize($methodSet(BI(n.typ))[o].prop,$String);}y=$clone(n,E).object();if(BX(n.typ)){y=new(BI(n.typ))(y);}r=(y[$externalize(s,$String)]);return[p,q,r];};DD=function(m){var{m,n,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:if(m.flag===0){$panic(new I.ptr("reflect.Value.Interface",0));}if(!((((m.flag&512)>>>0)===0))){$s=1;continue;}$s=2;continue;case 1:n=DG("Interface",$clone(m,E));$s=3;case 3:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}E.copy(m,n);case 2:if(BX(m.typ)){$s=-1;return((new(BI(m.typ))($clone(m,E).object())));}$s=-1;return(($clone(m,E).object()));}return;}var $f={$blk:DD,$c:true,$r,m,n,$s};return $f;};DE=function(m,n,o){var m,n,o;o.$set(n);};DF=function(){return"?FIXME?";};DG=function(m,n){var{m,n,o,p,q,r,s,t,$s,$r,$c}=$restore(this,{m,n});$s=$s||0;s:while(true){switch($s){case 0:o=[o];p=[p];if(((n.flag&512)>>>0)===0){$panic(new $String("reflect: internal error: invalid use of makePartialFunc"));}q=DC(m,$clone(n,E),((n.flag>>0))>>10>>0);o[0]=q[2];p[0]=$clone(n,E).object();if(BX(n.typ)){p[0]=new(BI(n.typ))(p[0]);}r=D.MakeFunc((function(o,p){return function(r,s){var r,s;return new $jsObjectPtr(o[0].apply(p[0],$externalize(s,EJ)));};})(o,p));s=$clone(n,E).Type().common();$s=1;case 1:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}t=new E.ptr(s,(r),(new F(n.flag).ro()|19)>>>0);$s=2;case 2:return t;}return;}var $f={$blk:DG,$c:true,$r,m,n,o,p,q,r,s,t,$s};return $f;};DI=function(m,n){var m,n;if($interfaceIsEqual(m,DH)){return new(BI(DH))(n);}return n;};DJ=function(m,n){var m,n;if($interfaceIsEqual(m,DH)){return n.object;}return n;};DK=function(m){var m,n,o,p,q,r;while(true){if(!(!(m===""))){break;}n=0;while(true){if(!(n<m.length&&(m.charCodeAt(n)===32))){break;}n=n+(1)>>0;}m=$substring(m,n);if(m===""){break;}n=0;while(true){if(!(n<m.length&&!((m.charCodeAt(n)===32))&&!((m.charCodeAt(n)===58))&&!((m.charCodeAt(n)===34)))){break;}n=n+(1)>>0;}if((n+1>>0)>=m.length||!((m.charCodeAt(n)===58))||!((m.charCodeAt((n+1>>0))===34))){break;}o=($substring(m,0,n));m=$substring(m,(n+1>>0));n=1;while(true){if(!(n<m.length&&!((m.charCodeAt(n)===34)))){break;}if(m.charCodeAt(n)===92){n=n+(1)>>0;}n=n+(1)>>0;}if(n>=m.length){break;}p=($substring(m,0,(n+1>>0)));m=$substring(m,(n+1>>0));if(o==="js"){q=AU(p);r=q[0];return r;}}return"";};DL=function(m){var m;return $assertType(m,DU).ptrTo();};$pkg.PtrTo=DL;DM=function(m,n,o){var m,n,o,p;if(AQ(m)){p=CJ(m);CM(m,p,o);return new E.ptr(m,p,(n|128)>>>0);}return new E.ptr(m,(o).$get(),n);};E.methods=[{prop:"pointer",name:"pointer",pkg:"internal/reflectlite",typ:$funcType([],[$UnsafePointer],false)},{prop:"CanSet",name:"CanSet",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"IsValid",name:"IsValid",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[P],false)},{prop:"numMethod",name:"numMethod",pkg:"internal/reflectlite",typ:$funcType([],[$Int],false)},{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[O],false)},{prop:"object",name:"object",pkg:"internal/reflectlite",typ:$funcType([],[DZ],false)},{prop:"assignTo",name:"assignTo",pkg:"internal/reflectlite",typ:$funcType([$String,DU,$UnsafePointer],[E],false)},{prop:"call",name:"call",pkg:"internal/reflectlite",typ:$funcType([$String,EF],[EF],false)},{prop:"Cap",name:"Cap",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[E],false)},{prop:"InterfaceData",name:"InterfaceData",pkg:"",typ:$funcType([],[ES],false)},{prop:"IsNil",name:"IsNil",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Pointer",name:"Pointer",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([E],[],false)},{prop:"SetBytes",name:"SetBytes",pkg:"",typ:$funcType([ET],[],false)},{prop:"SetCap",name:"SetCap",pkg:"",typ:$funcType([$Int],[],false)},{prop:"SetLen",name:"SetLen",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Slice",name:"Slice",pkg:"",typ:$funcType([$Int,$Int],[E],false)},{prop:"Slice3",name:"Slice3",pkg:"",typ:$funcType([$Int,$Int,$Int],[E],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[E],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MapKeys",name:"MapKeys",pkg:"",typ:$funcType([],[EF],false)},{prop:"MapIndex",name:"MapIndex",pkg:"",typ:$funcType([E],[E],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[E],false)}];F.methods=[{prop:"kind",name:"kind",pkg:"internal/reflectlite",typ:$funcType([],[P],false)},{prop:"ro",name:"ro",pkg:"internal/reflectlite",typ:$funcType([],[F],false)},{prop:"mustBeExported",name:"mustBeExported",pkg:"internal/reflectlite",typ:$funcType([],[],false)},{prop:"mustBeAssignable",name:"mustBeAssignable",pkg:"internal/reflectlite",typ:$funcType([],[],false)},{prop:"mustBe",name:"mustBe",pkg:"internal/reflectlite",typ:$funcType([P],[],false)}];EU.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];P.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];DU.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[P],false)},{prop:"pointers",name:"pointers",pkg:"internal/reflectlite",typ:$funcType([],[$Bool],false)},{prop:"common",name:"common",pkg:"internal/reflectlite",typ:$funcType([],[DU],false)},{prop:"exportedMethods",name:"exportedMethods",pkg:"internal/reflectlite",typ:$funcType([],[ED],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"hasName",name:"hasName",pkg:"internal/reflectlite",typ:$funcType([],[$Bool],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"chanDir",name:"chanDir",pkg:"internal/reflectlite",typ:$funcType([],[T],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[O],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([$Int],[O],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumIn",name:"NumIn",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumOut",name:"NumOut",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Out",name:"Out",pkg:"",typ:$funcType([$Int],[O],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([O],[$Bool],false)},{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([O],[$Bool],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"IsVariadic",name:"IsVariadic",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"kindType",name:"kindType",pkg:"internal/reflectlite",typ:$funcType([],[DU],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[AB],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[O],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[AV],false)},{prop:"uncommon",name:"uncommon",pkg:"internal/reflectlite",typ:$funcType([],[EC],false)},{prop:"nameOff",name:"nameOff",pkg:"internal/reflectlite",typ:$funcType([AG],[BO],false)},{prop:"typeOff",name:"typeOff",pkg:"internal/reflectlite",typ:$funcType([AH],[DU],false)},{prop:"ptrTo",name:"ptrTo",pkg:"internal/reflectlite",typ:$funcType([],[DU],false)}];EW.methods=[{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)}];EY.methods=[{prop:"offset",name:"offset",pkg:"internal/reflectlite",typ:$funcType([],[$Uintptr],false)},{prop:"embedded",name:"embedded",pkg:"internal/reflectlite",typ:$funcType([],[$Bool],false)}];EZ.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];EC.methods=[{prop:"methods",name:"methods",pkg:"internal/reflectlite",typ:$funcType([],[ED],false)},{prop:"exportedMethods",name:"exportedMethods",pkg:"internal/reflectlite",typ:$funcType([],[ED],false)}];EE.methods=[{prop:"in$",name:"in",pkg:"internal/reflectlite",typ:$funcType([],[DW],false)},{prop:"out",name:"out",pkg:"internal/reflectlite",typ:$funcType([],[DW],false)}];BO.methods=[{prop:"data",name:"data",pkg:"internal/reflectlite",typ:$funcType([$Int,$String],[EG],false)},{prop:"hasTag",name:"hasTag",pkg:"internal/reflectlite",typ:$funcType([],[$Bool],false)},{prop:"readVarint",name:"readVarint",pkg:"internal/reflectlite",typ:$funcType([$Int],[$Int,$Int],false)},{prop:"name",name:"name",pkg:"internal/reflectlite",typ:$funcType([],[$String],false)},{prop:"tag",name:"tag",pkg:"internal/reflectlite",typ:$funcType([],[$String],false)},{prop:"pkgPath",name:"pkgPath",pkg:"internal/reflectlite",typ:$funcType([],[$String],false)},{prop:"isExported",name:"isExported",pkg:"internal/reflectlite",typ:$funcType([],[$Bool],false)}];EO.methods=[{prop:"skipUntilValidKey",name:"skipUntilValidKey",pkg:"internal/reflectlite",typ:$funcType([],[],false)}];E.init("internal/reflectlite",[{prop:"typ",name:"typ",embedded:false,exported:false,typ:DU,tag:""},{prop:"ptr",name:"ptr",embedded:false,exported:false,typ:$UnsafePointer,tag:""},{prop:"flag",name:"flag",embedded:true,exported:false,typ:F,tag:""}]);I.init("",[{prop:"Method",name:"Method",embedded:false,exported:true,typ:$String,tag:""},{prop:"Kind",name:"Kind",embedded:false,exported:true,typ:P,tag:""}]);O.init([{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([O],[$Bool],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[O],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([O],[$Bool],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[P],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"common",name:"common",pkg:"internal/reflectlite",typ:$funcType([],[DU],false)},{prop:"uncommon",name:"uncommon",pkg:"internal/reflectlite",typ:$funcType([],[EC],false)}]);R.init("internal/reflectlite",[{prop:"size",name:"size",embedded:false,exported:false,typ:$Uintptr,tag:""},{prop:"ptrdata",name:"ptrdata",embedded:false,exported:false,typ:$Uintptr,tag:""},{prop:"hash",name:"hash",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"tflag",name:"tflag",embedded:false,exported:false,typ:Q,tag:""},{prop:"align",name:"align",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"fieldAlign",name:"fieldAlign",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"kind",name:"kind",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"equal",name:"equal",embedded:false,exported:false,typ:EV,tag:""},{prop:"gcdata",name:"gcdata",embedded:false,exported:false,typ:EG,tag:""},{prop:"str",name:"str",embedded:false,exported:false,typ:AG,tag:""},{prop:"ptrToThis",name:"ptrToThis",embedded:false,exported:false,typ:AH,tag:""}]);S.init("internal/reflectlite",[{prop:"name",name:"name",embedded:false,exported:false,typ:AG,tag:""},{prop:"mtyp",name:"mtyp",embedded:false,exported:false,typ:AH,tag:""},{prop:"ifn",name:"ifn",embedded:false,exported:false,typ:AI,tag:""},{prop:"tfn",name:"tfn",embedded:false,exported:false,typ:AI,tag:""}]);U.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:DU,tag:""},{prop:"slice",name:"slice",embedded:false,exported:false,typ:DU,tag:""},{prop:"len",name:"len",embedded:false,exported:false,typ:$Uintptr,tag:""}]);V.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:DU,tag:""},{prop:"dir",name:"dir",embedded:false,exported:false,typ:$Uintptr,tag:""}]);W.init("internal/reflectlite",[{prop:"name",name:"name",embedded:false,exported:false,typ:AG,tag:""},{prop:"typ",name:"typ",embedded:false,exported:false,typ:AH,tag:""}]);X.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"pkgPath",name:"pkgPath",embedded:false,exported:false,typ:BO,tag:""},{prop:"methods",name:"methods",embedded:false,exported:false,typ:EK,tag:""}]);Y.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"key",name:"key",embedded:false,exported:false,typ:DU,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:DU,tag:""},{prop:"bucket",name:"bucket",embedded:false,exported:false,typ:DU,tag:""},{prop:"hasher",name:"hasher",embedded:false,exported:false,typ:EX,tag:""},{prop:"keysize",name:"keysize",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"valuesize",name:"valuesize",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"bucketsize",name:"bucketsize",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"flags",name:"flags",embedded:false,exported:false,typ:$Uint32,tag:""}]);Z.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:DU,tag:""}]);AA.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:DU,tag:""}]);AB.init("internal/reflectlite",[{prop:"name",name:"name",embedded:false,exported:false,typ:BO,tag:""},{prop:"typ",name:"typ",embedded:false,exported:false,typ:DU,tag:""},{prop:"offsetEmbed",name:"offsetEmbed",embedded:false,exported:false,typ:$Uintptr,tag:""}]);AC.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"pkgPath",name:"pkgPath",embedded:false,exported:false,typ:BO,tag:""},{prop:"fields",name:"fields",embedded:false,exported:false,typ:EL,tag:""}]);AT.init("internal/reflectlite",[{prop:"s",name:"s",embedded:false,exported:false,typ:$String,tag:""}]);AV.init("",[{prop:"Name",name:"Name",embedded:false,exported:true,typ:$String,tag:""},{prop:"PkgPath",name:"PkgPath",embedded:false,exported:true,typ:$String,tag:""},{prop:"Type",name:"Type",embedded:false,exported:true,typ:O,tag:""},{prop:"Func",name:"Func",embedded:false,exported:true,typ:E,tag:""},{prop:"Index",name:"Index",embedded:false,exported:true,typ:$Int,tag:""}]);BL.init("internal/reflectlite",[{prop:"pkgPath",name:"pkgPath",embedded:false,exported:false,typ:AG,tag:""},{prop:"mcount",name:"mcount",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"xcount",name:"xcount",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"moff",name:"moff",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"_methods",name:"_methods",embedded:false,exported:false,typ:ED,tag:""}]);BN.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:"reflect:\"func\""},{prop:"inCount",name:"inCount",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"outCount",name:"outCount",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"_in",name:"_in",embedded:false,exported:false,typ:DW,tag:""},{prop:"_out",name:"_out",embedded:false,exported:false,typ:DW,tag:""}]);BO.init("internal/reflectlite",[{prop:"bytes",name:"bytes",embedded:false,exported:false,typ:EG,tag:""}]);BP.init("internal/reflectlite",[{prop:"name",name:"name",embedded:false,exported:false,typ:$String,tag:""},{prop:"tag",name:"tag",embedded:false,exported:false,typ:$String,tag:""},{prop:"exported",name:"exported",embedded:false,exported:false,typ:$Bool,tag:""}]);CU.init("internal/reflectlite",[{prop:"t",name:"t",embedded:false,exported:false,typ:O,tag:""},{prop:"m",name:"m",embedded:false,exported:false,typ:DZ,tag:""},{prop:"keys",name:"keys",embedded:false,exported:false,typ:DZ,tag:""},{prop:"i",name:"i",embedded:false,exported:false,typ:$Int,tag:""},{prop:"last",name:"last",embedded:false,exported:false,typ:DZ,tag:""}]);CW.init([{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([O],[$Bool],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[O],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([O],[$Bool],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[O],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[P],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"common",name:"common",pkg:"internal/reflectlite",typ:$funcType([],[DU],false)},{prop:"uncommon",name:"uncommon",pkg:"internal/reflectlite",typ:$funcType([],[EC],false)}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=D.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}BD=DU.nil;BS=DV.nil;BU=DW.nil;AD=new DX(["invalid","bool","int","int8","int16","int32","int64","uint","uint8","uint16","uint32","uint64","uintptr","float32","float64","complex64","complex128","array","chan","func","interface","map","ptr","slice","string","struct","unsafe.Pointer"]);AR=$assertType($internalize($call,$emptyInterface),EA);$pkg.ErrSyntax=new AT.ptr("invalid syntax");BB=false;BE="_jsType";BF="_reflectType";BG="kindType";BH="_rtype";BM={};BQ={};DH=BJ($jsObjectPtr);DN=$assertType($internalize($select,$emptyInterface),EA);$r=BC();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["sort"]=(function(){var $pkg={},$init,A,V,AZ,BA,AN,AO,B,C,D,E,G,H,U,AP;A=$packages["internal/reflectlite"];V=$pkg.lessSwap=$newType(0,$kindStruct,"sort.lessSwap",true,"sort",false,function(Less_,Swap_){this.$val=this;if(arguments.length===0){this.Less=$throwNilPointerError;this.Swap=$throwNilPointerError;return;}this.Less=Less_;this.Swap=Swap_;});AZ=$funcType([$Int,$Int],[$Bool],false);BA=$funcType([$Int,$Int],[],false);B=function(a,b,c){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=b+1>>0;case 1:if(!(d<c)){$s=2;continue;}e=d;case 3:if(!(e>b)){f=false;$s=5;continue s;}g=a.Less(e,e-1>>0);$s=6;case 6:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;case 5:if(!(f)){$s=4;continue;}$r=a.Swap(e,e-1>>0);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e=e-(1)>>0;$s=3;continue;case 4:d=d+(1)>>0;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:B,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};C=function(a,b,c,d){var{a,b,c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;s:while(true){switch($s){case 0:e=b;case 1:f=($imul(2,e))+1>>0;if(f>=c){$s=2;continue;}if(!((f+1>>0)<c)){g=false;$s=5;continue s;}h=a.Less(d+f>>0,(d+f>>0)+1>>0);$s=6;case 6:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;case 5:if(g){$s=3;continue;}$s=4;continue;case 3:f=f+(1)>>0;case 4:i=a.Less(d+e>>0,d+f>>0);$s=9;case 9:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}if(!i){$s=7;continue;}$s=8;continue;case 7:$s=-1;return;case 8:$r=a.Swap(d+e>>0,d+f>>0);$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e=f;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:C,$c:true,$r,a,b,c,d,e,f,g,h,i,$s};return $f;};D=function(a,b,c){var{a,b,c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=b;e=0;f=c-b>>0;h=(g=((f-1>>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"));case 1:if(!(h>=0)){$s=2;continue;}$r=C($clone(a,V),h,f,d);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}h=h-(1)>>0;$s=1;continue;case 2:i=f-1>>0;case 4:if(!(i>=0)){$s=5;continue;}$r=a.Swap(d,d+i>>0);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C($clone(a,V),e,i,d);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}i=i-(1)>>0;$s=4;continue;case 5:$s=-1;return;}return;}var $f={$blk:D,$c:true,$r,a,b,c,d,e,f,g,h,i,$s};return $f;};E=function(a,b,c,d){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;s:while(true){switch($s){case 0:e=a.Less(b,c);$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}if(e){$s=1;continue;}$s=2;continue;case 1:$r=a.Swap(b,c);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:f=a.Less(d,b);$s=7;case 7:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(f){$s=5;continue;}$s=6;continue;case 5:$r=a.Swap(d,b);$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=a.Less(b,c);$s=11;case 11:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}if(g){$s=9;continue;}$s=10;continue;case 9:$r=a.Swap(b,c);$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 10:case 6:$s=-1;return;}return;}var $f={$blk:E,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};G=function(a,b,c){var{a,aa,ab,ac,ad,ae,af,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=0;e=0;f=((((((b+c>>0)>>>0))>>>1>>>0)>>0));if((c-b>>0)>40){$s=1;continue;}$s=2;continue;case 1:h=(g=((c-b>>0))/8,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"));$r=E($clone(a,V),b,b+h>>0,b+($imul(2,h))>>0);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E($clone(a,V),f,f-h>>0,f+h>>0);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E($clone(a,V),c-1>>0,(c-1>>0)-h>>0,(c-1>>0)-($imul(2,h))>>0);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$r=E($clone(a,V),b,f,c-1>>0);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}i=b;j=b+1>>0;k=c-1>>0;l=j;m=k;case 7:if(!(l<m)){n=false;$s=9;continue s;}o=a.Less(l,i);$s=10;case 10:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n=o;case 9:if(!(n)){$s=8;continue;}l=l+(1)>>0;$s=7;continue;case 8:p=l;case 11:case 13:if(!(p<m)){q=false;$s=15;continue s;}r=a.Less(i,p);$s=16;case 16:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}q=!r;case 15:if(!(q)){$s=14;continue;}p=p+(1)>>0;$s=13;continue;case 14:case 17:if(!(p<m)){s=false;$s=19;continue s;}t=a.Less(i,m-1>>0);$s=20;case 20:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}s=t;case 19:if(!(s)){$s=18;continue;}m=m-(1)>>0;$s=17;continue;case 18:if(p>=m){$s=12;continue;}$r=a.Swap(p,m-1>>0);$s=21;case 21:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}p=p+(1)>>0;m=m-(1)>>0;$s=11;continue;case 12:u=(c-m>>0)<5;if(!u&&(c-m>>0)<(v=((c-b>>0))/4,(v===v&&v!==1/0&&v!==-1/0)?v>>0:$throwRuntimeError("integer divide by zero"))){$s=22;continue;}$s=23;continue;case 22:w=0;x=a.Less(i,c-1>>0);$s=26;case 26:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}if(!x){$s=24;continue;}$s=25;continue;case 24:$r=a.Swap(m,c-1>>0);$s=27;case 27:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}m=m+(1)>>0;w=w+(1)>>0;case 25:y=a.Less(p-1>>0,i);$s=30;case 30:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}if(!y){$s=28;continue;}$s=29;continue;case 28:p=p-(1)>>0;w=w+(1)>>0;case 29:z=a.Less(f,i);$s=33;case 33:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}if(!z){$s=31;continue;}$s=32;continue;case 31:$r=a.Swap(f,p-1>>0);$s=34;case 34:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}p=p-(1)>>0;w=w+(1)>>0;case 32:u=w>1;case 23:if(u){$s=35;continue;}$s=36;continue;case 35:case 37:case 39:if(!(l<p)){aa=false;$s=41;continue s;}ab=a.Less(p-1>>0,i);$s=42;case 42:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}aa=!ab;case 41:if(!(aa)){$s=40;continue;}p=p-(1)>>0;$s=39;continue;case 40:case 43:if(!(l<p)){ac=false;$s=45;continue s;}ad=a.Less(l,i);$s=46;case 46:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}ac=ad;case 45:if(!(ac)){$s=44;continue;}l=l+(1)>>0;$s=43;continue;case 44:if(l>=p){$s=38;continue;}$r=a.Swap(l,p-1>>0);$s=47;case 47:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}l=l+(1)>>0;p=p-(1)>>0;$s=37;continue;case 38:case 36:$r=a.Swap(i,p-1>>0);$s=48;case 48:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}ae=p-1>>0;af=m;d=ae;e=af;$s=-1;return[d,e];}return;}var $f={$blk:G,$c:true,$r,a,aa,ab,ac,ad,ae,af,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};H=function(a,b,c,d){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;s:while(true){switch($s){case 0:case 1:if(!((c-b>>0)>12)){$s=2;continue;}if(d===0){$s=3;continue;}$s=4;continue;case 3:$r=D($clone(a,V),b,c);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;case 4:d=d-(1)>>0;f=G($clone(a,V),b,c);$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;g=e[0];h=e[1];if((g-b>>0)<(c-h>>0)){$s=7;continue;}$s=8;continue;case 7:$r=H($clone(a,V),b,g,d);$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}b=h;$s=9;continue;case 8:$r=H($clone(a,V),h,c,d);$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}c=g;case 9:$s=1;continue;case 2:if((c-b>>0)>1){$s=12;continue;}$s=13;continue;case 12:i=b+6>>0;case 14:if(!(i<c)){$s=15;continue;}j=a.Less(i,i-6>>0);$s=18;case 18:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}if(j){$s=16;continue;}$s=17;continue;case 16:$r=a.Swap(i,i-6>>0);$s=19;case 19:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 17:i=i+(1)>>0;$s=14;continue;case 15:$r=B($clone(a,V),b,c);$s=20;case 20:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 13:$s=-1;return;}return;}var $f={$blk:H,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};U=function(a){var a,b,c;b=0;c=a;while(true){if(!(c>0)){break;}b=b+(1)>>0;c=(c>>$min((1),31))>>0;}return $imul(b,2);};AP=function(a,b){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=AN(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=$clone(c,A.Value);e=AO(a);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;g=$clone(d,A.Value).Len();$r=H(new V.ptr(b,f),0,g,U(g));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:AP,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};$pkg.Slice=AP;V.init("",[{prop:"Less",name:"Less",embedded:false,exported:true,typ:AZ,tag:""},{prop:"Swap",name:"Swap",embedded:false,exported:true,typ:BA,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}AN=A.ValueOf;AO=A.Swapper;}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["resolv"]=(function(){var $pkg={},$init,A,B,C,D,O,Q,R,T,V,Y,AA,AB,AF,AH,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,L,P,S,U,W,X,Z,AC,AD,AE,AG,AI;A=$packages["math"];B=$packages["sort"];C=$pkg.Vector=$newType(12,$kindSlice,"resolv.Vector",true,"resolv",true,null);D=$pkg.Axis=$newType(4,$kindInt,"resolv.Axis",true,"resolv",true,null);O=$pkg.Space=$newType(0,$kindStruct,"resolv.Space",true,"resolv",true,function(Cells_,CellWidth_,CellHeight_){this.$val=this;if(arguments.length===0){this.Cells=AM.nil;this.CellWidth=0;this.CellHeight=0;return;}this.Cells=Cells_;this.CellWidth=CellWidth_;this.CellHeight=CellHeight_;});Q=$pkg.Shape=$newType(8,$kindInterface,"resolv.Shape",true,"resolv",true,null);R=$pkg.Line=$newType(0,$kindStruct,"resolv.Line",true,"resolv",true,function(Start_,End_){this.$val=this;if(arguments.length===0){this.Start=C.nil;this.End=C.nil;return;}this.Start=Start_;this.End=End_;});T=$pkg.ConvexPolygon=$newType(0,$kindStruct,"resolv.ConvexPolygon",true,"resolv",true,function(Points_,X_,Y_,Closed_){this.$val=this;if(arguments.length===0){this.Points=AQ.nil;this.X=0;this.Y=0;this.Closed=false;return;}this.Points=Points_;this.X=X_;this.Y=Y_;this.Closed=Closed_;});V=$pkg.ContactSet=$newType(0,$kindStruct,"resolv.ContactSet",true,"resolv",true,function(Points_,MTV_,Center_){this.$val=this;if(arguments.length===0){this.Points=AQ.nil;this.MTV=C.nil;this.Center=C.nil;return;}this.Points=Points_;this.MTV=MTV_;this.Center=Center_;});Y=$pkg.Circle=$newType(0,$kindStruct,"resolv.Circle",true,"resolv",true,function(X_,Y_,Radius_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;this.Radius=0;return;}this.X=X_;this.Y=Y_;this.Radius=Radius_;});AA=$pkg.Projection=$newType(0,$kindStruct,"resolv.Projection",true,"resolv",true,function(Min_,Max_){this.$val=this;if(arguments.length===0){this.Min=0;this.Max=0;return;}this.Min=Min_;this.Max=Max_;});AB=$pkg.Object=$newType(0,$kindStruct,"resolv.Object",true,"resolv",true,function(Shape_,Space_,X_,Y_,W_,H_,TouchingCells_,Data_,ignoreList_,tags_){this.$val=this;if(arguments.length===0){this.Shape=$ifaceNil;this.Space=AN.nil;this.X=0;this.Y=0;this.W=0;this.H=0;this.TouchingCells=AL.nil;this.Data=$ifaceNil;this.ignoreList=false;this.tags=AW.nil;return;}this.Shape=Shape_;this.Space=Space_;this.X=X_;this.Y=Y_;this.W=W_;this.H=H_;this.TouchingCells=TouchingCells_;this.Data=Data_;this.ignoreList=ignoreList_;this.tags=tags_;});AF=$pkg.Collision=$newType(0,$kindStruct,"resolv.Collision",true,"resolv",true,function(checkingObject_,dx_,dy_,Objects_,Cells_){this.$val=this;if(arguments.length===0){this.checkingObject=AO.nil;this.dx=0;this.dy=0;this.Objects=AP.nil;this.Cells=AL.nil;return;}this.checkingObject=checkingObject_;this.dx=dx_;this.dy=dy_;this.Objects=Objects_;this.Cells=Cells_;});AH=$pkg.Cell=$newType(0,$kindStruct,"resolv.Cell",true,"resolv",true,function(X_,Y_,Objects_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;this.Objects=AP.nil;return;}this.X=X_;this.Y=Y_;this.Objects=Objects_;});AJ=$sliceType($Float64);AK=$ptrType(AH);AL=$sliceType(AK);AM=$sliceType(AL);AN=$ptrType(O);AO=$ptrType(AB);AP=$sliceType(AO);AQ=$sliceType(C);AR=$ptrType(R);AS=$sliceType(AR);AT=$ptrType(Y);AU=$ptrType(T);AV=$ptrType(V);AW=$sliceType($String);AX=$ptrType(AF);AY=$sliceType(D);AZ=$mapType(AO,$Bool);C.prototype.Clone=function(){var a,b;a=this;b=$makeSlice(C,a.$length);$copySlice(b,a);return b;};$ptrType(C).prototype.Clone=function(){return this.$get().Clone();};C.prototype.Add=function(a){var a,b,c,d,e,f;b=this;c=b.$length;d=a;e=0;while(true){if(!(e<d.$length)){break;}f=e;if(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]).$length>c){AD($convertSliceType(b,AJ),1,$convertSliceType(b,AJ),$convertSliceType($subslice(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),0,c),AJ));}else{AD($convertSliceType(b,AJ),1,$convertSliceType(b,AJ),$convertSliceType(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),AJ));}e++;}return b;};$ptrType(C).prototype.Add=function(a){return this.$get().Add(a);};C.prototype.Sub=function(a){var a,b,c,d,e,f;b=this;c=b.$length;d=a;e=0;while(true){if(!(e<d.$length)){break;}f=e;if(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]).$length>c){AD($convertSliceType(b,AJ),-1,$convertSliceType($subslice(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),0,c),AJ),$convertSliceType(b,AJ));}else{AD($convertSliceType(b,AJ),-1,$convertSliceType(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),AJ),$convertSliceType(b,AJ));}e++;}return b;};$ptrType(C).prototype.Sub=function(a){return this.$get().Sub(a);};C.prototype.Scale=function(a){var a,b;b=this;AE($convertSliceType(b,AJ),a,$convertSliceType(b,AJ));return b;};$ptrType(C).prototype.Scale=function(a){return this.$get().Scale(a);};C.prototype.Equal=function(a){var a,b,c,d,e;b=this;if(!((b.$length===a.$length))){return false;}c=b;d=0;while(true){if(!(d<c.$length)){break;}e=d;if(A.Abs(((e<0||e>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+e])-((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]))>1e-08){return false;}d++;}return true;};$ptrType(C).prototype.Equal=function(a){return this.$get().Equal(a);};C.prototype.Magnitude=function(){var a;a=this;return A.Sqrt(a.Magnitude2());};$ptrType(C).prototype.Magnitude=function(){return this.$get().Magnitude();};C.prototype.Magnitude2=function(){var a,b,c,d,e;a=this;b=0;c=a;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=b+(e*e);d++;}return b;};$ptrType(C).prototype.Magnitude2=function(){return this.$get().Magnitude2();};C.prototype.Unit=function(){var a,b,c,d,e;a=this;b=a.Magnitude();if(b<1e-08){return a;}c=a;d=0;while(true){if(!(d<c.$length)){break;}e=d;((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]=((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e])/b);d++;}return a;};$ptrType(C).prototype.Unit=function(){return this.$get().Unit();};L=function(a,b){var a,b,c,d,e,f,g,h,i,j,k;c=0;d=a.$length;e=b.$length;f=c;g=d;h=e;if(g>h){b=$appendSlice(b,$convertSliceType($makeSlice(C,(g-h>>0)),AJ));}if(g<h){a=$appendSlice(a,$convertSliceType($makeSlice(C,(h-g>>0)),AJ));}i=a;j=0;while(true){if(!(j<i.$length)){break;}k=j;f=f+(((k<0||k>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+k])*((k<0||k>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+k]));j++;}return f;};$pkg.Dot=L;C.prototype.Dot=function(a){var a,b;b=this;return L(b,a);};$ptrType(C).prototype.Dot=function(a){return this.$get().Dot(a);};C.prototype.Cross=function(a){var a,b;b=this;if(!((b.$length===3))||!((a.$length===3))){return C.nil;}return new C([(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2])-(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]),(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])-(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]),(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2])-(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])]);};$ptrType(C).prototype.Cross=function(a){return this.$get().Cross(a);};C.prototype.Rotate=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;c=this;d=2;e=c.$length;f=d;g=e;if(g===0){return c;}if(b.$length>0){f=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]);}if((g===1)&&!((f===2))){c=$append(c,0,0);}if((g<2&&(f===2))||((g===2)&&!((f===2)))){c=$append(c,0);}h=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]);i=(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);j=h;k=i;l=A.Cos(a);m=A.Sin(a);n=l;o=m;p=f;if(p===(0)){q=(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]);(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=k*n-q*o);(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]=k*o+q*n);}else if(p===(1)){r=(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]);(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=j*n+r*o);(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]=-j*o+r*n);}else if(p===(2)){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=j*n-k*o);(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=j*o+k*n);}if(g>3){return $subslice(c,0,3);}return c;};$ptrType(C).prototype.Rotate=function(a,b){return this.$get().Rotate(a,b);};C.prototype.X=function(){var a;a=this;if(a.$length<1){return 0;}return(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]);};$ptrType(C).prototype.X=function(){return this.$get().X();};C.prototype.Y=function(){var a;a=this;if(a.$length<2){return 0;}return(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]);};$ptrType(C).prototype.Y=function(){return this.$get().Y();};C.prototype.Z=function(){var a;a=this;if(a.$length<3){return 0;}return(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]);};$ptrType(C).prototype.Z=function(){return this.$get().Z();};P=function(a,b,c,d){var a,b,c,d,e,f,g;e=new O.ptr(AM.nil,c,d);e.Resize((f=a/c,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero")),(g=b/d,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero")));return e;};$pkg.NewSpace=P;O.ptr.prototype.Add=function(a){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(b===AN.nil){$panic(new $String("ERROR: space is nil"));}c=a;d=0;case 1:if(!(d<c.$length)){$s=2;continue;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);e.Space=b;$r=e.Update();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d++;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:O.ptr.prototype.Add,$c:true,$r,a,b,c,d,e,$s};return $f;};O.prototype.Add=function(a){return this.$val.Add(a);};O.ptr.prototype.Remove=function(a){var a,b,c,d,e,f,g,h;b=this;if(b===AN.nil){$panic(new $String("ERROR: space is nil"));}c=a;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=e.TouchingCells;g=0;while(true){if(!(g<f.$length)){break;}h=((g<0||g>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);h.unregister(e);g++;}e.TouchingCells=new AL([]);e.Space=AN.nil;d++;}};O.prototype.Remove=function(a){return this.$val.Remove(a);};O.ptr.prototype.Objects=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;a=this;b=$makeMap(AO.keyFor,[]);c=new AP([]);d=a.Cells;e=0;while(true){if(!(e<d.$length)){break;}f=e;g=(h=a.Cells,((f<0||f>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+f]));i=0;while(true){if(!(i<g.$length)){break;}j=i;k=(l=(m=a.Cells,((f<0||f>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+f])),((j<0||j>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+j])).Objects;n=0;while(true){if(!(n<k.$length)){break;}o=((n<0||n>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+n]);p=(q=b[AO.keyFor(o)],q!==undefined?[q.v,true]:[false,false]);r=p[1];if(!r){c=$append(c,o);s=o;(b||$throwRuntimeError("assignment to entry in nil map"))[AO.keyFor(s)]={k:s,v:true};}n++;}i++;}e++;}return c;};O.prototype.Objects=function(){return this.$val.Objects();};O.ptr.prototype.Resize=function(a,b){var a,b,c,d,e,f,g;c=this;c.Cells=new AM([]);d=0;while(true){if(!(d<b)){break;}c.Cells=$append(c.Cells,new AL([]));e=0;while(true){if(!(e<a)){break;}(g=c.Cells,((d<0||d>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+d]=$append((f=c.Cells,((d<0||d>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+d])),AI(e,d))));e=e+(1)>>0;}d=d+(1)>>0;}};O.prototype.Resize=function(a,b){return this.$val.Resize(a,b);};O.ptr.prototype.Cell=function(a,b){var a,b,c,d,e,f;c=this;if(b>=0&&b<c.Cells.$length&&a>=0&&a<(d=c.Cells,((b<0||b>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+b])).$length){return(e=(f=c.Cells,((b<0||b>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+b])),((a<0||a>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+a]));}return AK.nil;};O.prototype.Cell=function(a,b){return this.$val.Cell(a,b);};O.ptr.prototype.CheckCells=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m;f=this;g=a;while(true){if(!(g<(a+c>>0))){break;}h=b;while(true){if(!(h<(b+d>>0))){break;}i=f.Cell(g,h);if(!(i===AK.nil)){if(e.$length>0){if(i.ContainsTags(e)){j=i.Objects;k=0;while(true){if(!(k<j.$length)){break;}l=((k<0||k>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]);if(l.HasTags(e)){return l;}k++;}}}else if(i.Occupied()){return(m=i.Objects,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0]));}}h=h+(1)>>0;}g=g+(1)>>0;}return AO.nil;};O.prototype.CheckCells=function(a,b,c,d,e){return this.$val.CheckCells(a,b,c,d,e);};O.ptr.prototype.CheckCellsWorld=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l;f=this;g=f.WorldToSpace(a,b);h=g[0];i=g[1];j=f.WorldToSpace(c,d);k=j[0];l=j[1];return f.CheckCells(h,i,k,l,e);};O.prototype.CheckCellsWorld=function(a,b,c,d,e){return this.$val.CheckCellsWorld(a,b,c,d,e);};O.ptr.prototype.UnregisterAllObjects=function(){var a,b,c,d,e,f,g;a=this;b=0;while(true){if(!(b<a.Cells.$length)){break;}c=0;while(true){if(!(c<(d=a.Cells,((b<0||b>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+b])).$length)){break;}g=(e=(f=a.Cells,((b<0||b>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+b])),((c<0||c>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+c]));a.Remove(g.Objects);c=c+(1)>>0;}b=b+(1)>>0;}};O.prototype.UnregisterAllObjects=function(){return this.$val.UnregisterAllObjects();};O.ptr.prototype.WorldToSpace=function(a,b){var a,b,c,d,e;c=this;d=((A.Floor(a/(c.CellWidth))>>0));e=((A.Floor(b/(c.CellHeight))>>0));return[d,e];};O.prototype.WorldToSpace=function(a,b){return this.$val.WorldToSpace(a,b);};O.ptr.prototype.SpaceToWorld=function(a,b){var a,b,c,d,e;c=this;d=(($imul(a,c.CellWidth)));e=(($imul(b,c.CellHeight)));return[d,e];};O.prototype.SpaceToWorld=function(a,b){return this.$val.SpaceToWorld(a,b);};O.ptr.prototype.Height=function(){var a;a=this;return a.Cells.$length;};O.prototype.Height=function(){return this.$val.Height();};O.ptr.prototype.Width=function(){var a,b;a=this;if(a.Cells.$length>0){return(b=a.Cells,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])).$length;}return 0;};O.prototype.Width=function(){return this.$val.Width();};O.ptr.prototype.CellsInLine=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;e=this;f=new AL([]);g=e.Cell(a,b);h=e.Cell(c,d);if(!(g===AK.nil)&&!(h===AK.nil)){i=new C([((c-a>>0)),((d-b>>0))]).Unit();(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0]=(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])*(((j=e.CellWidth/2,(j===j&&j!==1/0&&j!==-1/0)?j>>0:$throwRuntimeError("integer divide by zero")))));(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1]=(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1])*(((k=e.CellHeight/2,(k===k&&k!==1/0&&k!==-1/0)?k>>0:$throwRuntimeError("integer divide by zero")))));l=e.SpaceToWorld(a,b);m=l[0];n=l[1];q=new C([m+((o=e.CellWidth/2,(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"))),n+((p=e.CellHeight/2,(p===p&&p!==1/0&&p!==-1/0)?p>>0:$throwRuntimeError("integer divide by zero")))]);r=false;while(true){if(!(!(g===AK.nil))){break;}if(g===h){f=$append(f,g);break;}f=$append(f,g);if(r){(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]=(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1])+((1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1])));}else{(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0]=(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0])+((0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])));}s=e.WorldToSpace((0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0]),(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]));t=s[0];u=s[1];v=e.Cell(t,u);if(!(v===g)){g=v;}r=!r;}}return f;};O.prototype.CellsInLine=function(a,b,c,d){return this.$val.CellsInLine(a,b,c,d);};S=function(a,b,c,d){var a,b,c,d;return new R.ptr(new C([a,b]),new C([c,d]));};$pkg.NewLine=S;R.ptr.prototype.Project=function(a){var a,b;b=this;return b.Vector().Scale(a.Dot(b.Start.Sub(new AQ([b.End]))));};R.prototype.Project=function(a){return this.$val.Project(a);};R.ptr.prototype.Normal=function(){var a,b;a=this;b=a.Vector();return new C([(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]),-(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])]).Unit();};R.prototype.Normal=function(){return this.$val.Normal();};R.ptr.prototype.Vector=function(){var a;a=this;return a.End.Clone().Sub(new AQ([a.Start])).Unit();};R.prototype.Vector=function(){return this.$val.Vector();};R.ptr.prototype.IntersectionPointsLine=function(a){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=this;k=((c=b.End,(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]))-(d=b.Start,(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])))*((e=a.End,(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))-(f=a.Start,(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])))-((g=a.End,(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]))-(h=a.Start,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])))*((i=b.End,(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1]))-(j=b.Start,(1>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+1])));if(!((k===0))){t=((((l=b.Start,(1>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+1]))-(m=a.Start,(1>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+1])))*((n=a.End,(0>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+0]))-(o=a.Start,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0]))))-(((p=b.Start,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]))-(q=a.Start,(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0])))*((r=a.End,(1>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+1]))-(s=a.Start,(1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1]))))+1)/k;ac=((((u=b.Start,(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]))-(v=a.Start,(1>=v.$length?($throwRuntimeError("index out of range"),undefined):v.$array[v.$offset+1])))*((w=b.End,(0>=w.$length?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+0]))-(x=b.Start,(0>=x.$length?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+0]))))-(((y=b.Start,(0>=y.$length?($throwRuntimeError("index out of range"),undefined):y.$array[y.$offset+0]))-(z=a.Start,(0>=z.$length?($throwRuntimeError("index out of range"),undefined):z.$array[z.$offset+0])))*((aa=b.End,(1>=aa.$length?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+1]))-(ab=b.Start,(1>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+1]))))+1)/k;if((0<t&&t<1)&&(0<ac&&ac<1)){af=(ad=b.End,(0>=ad.$length?($throwRuntimeError("index out of range"),undefined):ad.$array[ad.$offset+0]))-(ae=b.Start,(0>=ae.$length?($throwRuntimeError("index out of range"),undefined):ae.$array[ae.$offset+0]));ai=(ag=b.End,(1>=ag.$length?($throwRuntimeError("index out of range"),undefined):ag.$array[ag.$offset+1]))-(ah=b.Start,(1>=ah.$length?($throwRuntimeError("index out of range"),undefined):ah.$array[ah.$offset+1]));return new C([(aj=b.Start,(0>=aj.$length?($throwRuntimeError("index out of range"),undefined):aj.$array[aj.$offset+0]))+(t*af),(ak=b.Start,(1>=ak.$length?($throwRuntimeError("index out of range"),undefined):ak.$array[ak.$offset+1]))+(t*ai)]);}}return C.nil;};R.prototype.IntersectionPointsLine=function(a){return this.$val.IntersectionPointsLine(a);};R.ptr.prototype.IntersectionPointsCircle=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;b=this;c=new AQ([]);d=new C([a.X,a.Y]);e=b.Start.Sub(new AQ([d]));f=b.End.Sub(new AQ([d]));g=f.Sub(new AQ([e]));h=(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])+(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]);i=2*(((0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])*(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]))+((1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])*(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])));j=((0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])*(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]))+((1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])*(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))-(a.Radius*a.Radius);k=i*i-(4*h*j);if(k<0){}else if(k===0){l=-i/(2*h);if(l>=0&&l<=1){c=$append(c,new C([(m=b.Start,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0]))+l*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(n=b.Start,(1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1]))+l*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])]));}}else{o=(-i+A.Sqrt(k))/(2*h);if(o>=0&&o<=1){c=$append(c,new C([(p=b.Start,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]))+o*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(q=b.Start,(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]))+o*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])]));}o=(-i-A.Sqrt(k))/(2*h);if(o>=0&&o<=1){c=$append(c,new C([(r=b.Start,(0>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+0]))+o*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(s=b.Start,(1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1]))+o*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])]));}}return c;};R.prototype.IntersectionPointsCircle=function(a){return this.$val.IntersectionPointsCircle(a);};U=function(a){var a,b;b=new T.ptr(new AQ([]),0,0,true);b.AddPoints(a);return b;};$pkg.NewConvexPolygon=U;T.ptr.prototype.Clone=function(){var a,b,c,d,e,f;a=this;b=new AQ([]);c=a.Points;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=$append(b,e.Clone());d++;}f=U(AJ.nil);f.X=a.X;f.Y=a.Y;f.AddPointsVec(b);f.Closed=a.Closed;return f;};T.prototype.Clone=function(){return this.$val.Clone();};T.ptr.prototype.AddPointsVec=function(a){var a,b;b=this;b.Points=$appendSlice(b.Points,a);};T.prototype.AddPointsVec=function(a){return this.$val.AddPointsVec(a);};T.ptr.prototype.AddPoints=function(a){var a,b,c,d;b=this;c=0;while(true){if(!(c<a.$length)){break;}b.Points=$append(b.Points,new C([((c<0||c>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c]),(d=c+1>>0,((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d]))]));c=c+(2)>>0;}};T.prototype.AddPoints=function(a){return this.$val.AddPoints(a);};T.ptr.prototype.Lines=function(){var a,b,c,d,e,f,g,h,i,j;a=this;b=new AS([]);c=a.Transformed();d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]);g=e;h=f;if(d<(c.$length-1>>0)){h=(i=d+1>>0,((i<0||i>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+i]));}else if(!a.Closed){break;}j=S((0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]),(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]),(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));b=$append(b,j);d=d+(1)>>0;}return b;};T.prototype.Lines=function(){return this.$val.Lines();};T.ptr.prototype.Transformed=function(){var a,b,c,d,e;a=this;b=new AQ([]);c=a.Points;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=$append(b,new C([(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])+a.X,(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])+a.Y]));d++;}return b;};T.prototype.Transformed=function(){return this.$val.Transformed();};T.ptr.prototype.Bounds=function(){var a,b,c,d,e,f,g,h;a=this;b=a.Transformed();e=new C([(c=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]),(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])),(d=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]),(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]))]);f=e.Clone();g=0;while(true){if(!(g<b.$length)){break;}h=((g<0||g>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+g]);if((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])<(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])){(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]=(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]));}else if((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])>(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0])){(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]=(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]));}if((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])<(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])){(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]=(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));}else if((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])>(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])){(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1]=(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));}g=g+(1)>>0;}return[e,f];};T.prototype.Bounds=function(){return this.$val.Bounds();};T.ptr.prototype.Position=function(){var a;a=this;return[a.X,a.Y];};T.prototype.Position=function(){return this.$val.Position();};T.ptr.prototype.SetPosition=function(a,b){var a,b,c;c=this;c.X=a;c.Y=b;};T.prototype.SetPosition=function(a,b){return this.$val.SetPosition(a,b);};T.ptr.prototype.SetPositionVec=function(a){var a,b;b=this;b.X=a.X();b.Y=a.Y();};T.prototype.SetPositionVec=function(a){return this.$val.SetPositionVec(a);};T.ptr.prototype.Move=function(a,b){var a,b,c;c=this;c.X=c.X+(a);c.Y=c.Y+(b);};T.prototype.Move=function(a,b){return this.$val.Move(a,b);};T.ptr.prototype.MoveVec=function(a){var a,b;b=this;b.X=b.X+(a.X());b.Y=b.Y+(a.Y());};T.prototype.MoveVec=function(a){return this.$val.MoveVec(a);};T.ptr.prototype.Center=function(){var a,b,c,d,e;a=this;b=new C([0,0]);c=a.Transformed();d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b.Add(new AQ([e]));d++;}(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])/((a.Transformed().$length)));(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]=(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])/((a.Transformed().$length)));return b;};T.prototype.Center=function(){return this.$val.Center();};T.ptr.prototype.Project=function(a){var a,b,c,d,e,f,g,h,i,j,k;b=this;a=a.Unit();c=b.Transformed();f=a.Dot(new C([(d=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]),(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])),(e=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]),(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))]));g=f;h=1;while(true){if(!(h<c.$length)){break;}k=a.Dot(new C([(i=((h<0||h>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+h]),(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])),(j=((h<0||h>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+h]),(1>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+1]))]));if(k<f){f=k;}else if(k>g){g=k;}h=h+(1)>>0;}return new AA.ptr(f,g);};T.prototype.Project=function(a){return this.$val.Project(a);};T.ptr.prototype.SATAxes=function(){var a,b,c,d,e;a=this;b=new AQ([]);c=a.Lines();d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=$append(b,e.Normal());d++;}return b;};T.prototype.SATAxes=function(){return this.$val.SATAxes();};T.ptr.prototype.PointInside=function(a){var a,b,c,d,e,f,g;b=this;c=S((0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]),(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]),(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])+9.99999999999e+11,(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]));d=0;e=b.Lines();f=0;while(true){if(!(f<e.$length)){break;}g=((f<0||f>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(!(g.IntersectionPointsLine(c)===C.nil)){d=d+(1)>>0;}f++;}return d===1;};T.prototype.PointInside=function(a){return this.$val.PointInside(a);};W=function(){return new V.ptr(new AQ([]),new C([0,0]),new C([0,0]));};$pkg.NewContactSet=W;V.ptr.prototype.LeftmostPoint=function(){var a,b,c,d,e;a=this;b=C.nil;c=a.Points;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===C.nil||(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])<(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])){b=e;}d++;}return b;};V.prototype.LeftmostPoint=function(){return this.$val.LeftmostPoint();};V.ptr.prototype.RightmostPoint=function(){var a,b,c,d,e;a=this;b=C.nil;c=a.Points;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===C.nil||(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])>(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])){b=e;}d++;}return b;};V.prototype.RightmostPoint=function(){return this.$val.RightmostPoint();};V.ptr.prototype.TopmostPoint=function(){var a,b,c,d,e;a=this;b=C.nil;c=a.Points;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===C.nil||(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])<(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])){b=e;}d++;}return b;};V.prototype.TopmostPoint=function(){return this.$val.TopmostPoint();};V.ptr.prototype.BottommostPoint=function(){var a,b,c,d,e;a=this;b=C.nil;c=a.Points;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===C.nil||(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])>(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])){b=e;}d++;}return b;};V.prototype.BottommostPoint=function(){return this.$val.BottommostPoint();};T.ptr.prototype.Intersection=function(a,b,c){var{a,aa,ab,ac,ad,ae,af,ag,ah,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=W();f=d.X;g=d.Y;d.X=d.X+(a);d.Y=d.Y+(b);h=$assertType(c,AT,true);i=h[0];j=h[1];if(j){k=d.Lines();l=0;while(true){if(!(l<k.$length)){break;}m=((l<0||l>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+l]);e.Points=$appendSlice(e.Points,m.IntersectionPointsCircle(i));l++;}}else{n=$assertType(c,AU,true);o=n[0];p=n[1];if(p){q=d.Lines();r=0;while(true){if(!(r<q.$length)){break;}s=((r<0||r>=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+r]);t=o.Lines();u=0;while(true){if(!(u<t.$length)){break;}v=((u<0||u>=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+u]);w=s.IntersectionPointsLine(v);if(!(w===C.nil)){e.Points=$append(e.Points,w);}u++;}r++;}}}if(e.Points.$length>0){$s=1;continue;}$s=2;continue;case 1:x=e.Points;y=0;while(true){if(!(y<x.$length)){break;}z=((y<0||y>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+y]);e.Center=e.Center.Add(new AQ([z]));y++;}(ab=e.Center,(0>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0]=(aa=e.Center,(0>=aa.$length?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+0]))/((e.Points.$length))));(ad=e.Center,(1>=ad.$length?($throwRuntimeError("index out of range"),undefined):ad.$array[ad.$offset+1]=(ac=e.Center,(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1]))/((e.Points.$length))));ae=d.calculateMTV(e,c);$s=4;case 4:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}af=ae;if(!(af===C.nil)){e.MTV=af;}$s=3;continue;case 2:e=AV.nil;case 3:if(!(e===AV.nil)&&(!((a===0))||!((b===0)))){ag=new C([a,b]).Magnitude();ah=e.MTV.Magnitude();e.MTV=e.MTV.Unit().Scale(ah-ag);}d.X=f;d.Y=g;$s=-1;return e;}return;}var $f={$blk:T.ptr.prototype.Intersection,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};T.prototype.Intersection=function(a,b,c){return this.$val.Intersection(a,b,c);};T.ptr.prototype.calculateMTV=function(a,b){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=[c];d=[d];e=this;f=new C([0,0]);g=new C([1.7976931348623157e+308,0]);h=b;if($assertType(h,AU,true)[1]){$s=1;continue;}if($assertType(h,AT,true)[1]){$s=2;continue;}$s=3;continue;case 1:i=h.$val;k=e.SATAxes();l=0;while(true){if(!(l<k.$length)){break;}m=((l<0||l>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+l]);if(!$clone(e.Project(m),AA).Overlapping($clone(i.Project(m),AA))){$s=-1;return C.nil;}n=$clone(e.Project(m),AA).Overlap($clone(i.Project(m),AA));if(g.Magnitude()>n){g=m.Scale(n);}l++;}o=i.SATAxes();p=0;while(true){if(!(p<o.$length)){break;}q=((p<0||p>=o.$length)?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+p]);if(!$clone(e.Project(q),AA).Overlapping($clone(i.Project(q),AA))){$s=-1;return C.nil;}r=$clone(e.Project(q),AA).Overlap($clone(i.Project(q),AA));if(g.Magnitude()>r){g=q.Scale(r);}p++;}$s=3;continue;case 2:j=h.$val;d[0]=$appendSlice(new AQ([]),e.Transformed());d[0]=$append(d[0],a.Center);c[0]=new C([j.X,j.Y]);$r=B.Slice(d[0],(function(c,d){return function(s,t){var s,t;return((s<0||s>=d[0].$length)?($throwRuntimeError("index out of range"),undefined):d[0].$array[d[0].$offset+s]).Sub(new AQ([c[0]])).Magnitude()<((t<0||t>=d[0].$length)?($throwRuntimeError("index out of range"),undefined):d[0].$array[d[0].$offset+t]).Sub(new AQ([c[0]])).Magnitude();};})(c,d));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=new C([(0>=c[0].$length?($throwRuntimeError("index out of range"),undefined):c[0].$array[c[0].$offset+0])-(s=(0>=d[0].$length?($throwRuntimeError("index out of range"),undefined):d[0].$array[d[0].$offset+0]),(0>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+0])),(1>=c[0].$length?($throwRuntimeError("index out of range"),undefined):c[0].$array[c[0].$offset+1])-(t=(0>=d[0].$length?($throwRuntimeError("index out of range"),undefined):d[0].$array[d[0].$offset+0]),(1>=t.$length?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+1]))]);g=g.Unit().Scale(g.Magnitude()-j.Radius);case 3:(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]=(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]));(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1]=(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]));$s=-1;return f;}return;}var $f={$blk:T.ptr.prototype.calculateMTV,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s};return $f;};T.prototype.calculateMTV=function(a,b){return this.$val.calculateMTV(a,b);};T.ptr.prototype.ContainedBy=function(a){var a,b,c,d,e,f,g,h,i,j;b=this;c=a;if($assertType(c,AU,true)[1]){d=c.$val;e=b.SATAxes();f=0;while(true){if(!(f<e.$length)){break;}g=((f<0||f>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(!$clone(b.Project(g),AA).IsInside($clone(d.Project(g),AA))){return false;}f++;}h=d.SATAxes();i=0;while(true){if(!(i<h.$length)){break;}j=((i<0||i>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);if(!$clone(b.Project(j),AA).IsInside($clone(d.Project(j),AA))){return false;}i++;}}return true;};T.prototype.ContainedBy=function(a){return this.$val.ContainedBy(a);};T.ptr.prototype.FlipH=function(){var a,b,c,d;a=this;b=a.Points;c=0;while(true){if(!(c<b.$length)){break;}d=((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0]=-(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0]));c++;}a.ReverseVertexOrder();};T.prototype.FlipH=function(){return this.$val.FlipH();};T.ptr.prototype.FlipV=function(){var a,b,c,d;a=this;b=a.Points;c=0;while(true){if(!(c<b.$length)){break;}d=((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]=-(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]));c++;}a.ReverseVertexOrder();};T.prototype.FlipV=function(){return this.$val.FlipV();};T.ptr.prototype.ReverseVertexOrder=function(){var a,b,c,d,e;a=this;c=new AQ([(b=a.Points,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]))]);d=a.Points.$length-1>>0;while(true){if(!(d>=1)){break;}c=$append(c,(e=a.Points,((d<0||d>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+d])));d=d-(1)>>0;}a.Points=c;};T.prototype.ReverseVertexOrder=function(){return this.$val.ReverseVertexOrder();};X=function(a,b,c,d){var a,b,c,d;return U(new AJ([a,b,a+c,b,a+c,b+d,a,b+d]));};$pkg.NewRectangle=X;Z=function(a,b,c){var a,b,c,d;d=new Y.ptr(a,b,c);return d;};$pkg.NewCircle=Z;Y.ptr.prototype.Clone=function(){var a;a=this;return Z(a.X,a.Y,a.Radius);};Y.prototype.Clone=function(){return this.$val.Clone();};Y.ptr.prototype.Bounds=function(){var a;a=this;return[new C([a.X-a.Radius,a.Y-a.Radius]),new C([a.X+a.Radius,a.Y+a.Radius])];};Y.prototype.Bounds=function(){return this.$val.Bounds();};Y.ptr.prototype.Intersection=function(a,b,c){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=AV.nil;f=d.X;g=d.Y;d.X=d.X+(a);d.Y=d.Y+(b);h=c;if($assertType(h,AU,true)[1]){$s=1;continue;}if($assertType(h,AT,true)[1]){$s=2;continue;}$s=3;continue;case 1:i=h.$val;k=i.Intersection(-a,-b,d);$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}e=k;if(!(e===AV.nil)){e.MTV=e.MTV.Scale(-1);}$s=3;continue;case 2:j=h.$val;e=W();e.Points=d.IntersectionPointsCircle(j);if(e.Points.$length===0){$s=-1;return AV.nil;}e.MTV=new C([d.X-j.X,d.Y-j.Y]);l=e.MTV.Magnitude();e.MTV=e.MTV.Unit().Scale(d.Radius+j.Radius-l);m=e.Points;n=0;while(true){if(!(n<m.$length)){break;}o=((n<0||n>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n]);e.Center=e.Center.Add(new AQ([o]));n++;}(q=e.Center,(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0]=(p=e.Center,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]))/((e.Points.$length))));(s=e.Center,(1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1]=(r=e.Center,(1>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+1]))/((e.Points.$length))));case 3:d.X=f;d.Y=g;$s=-1;return e;}return;}var $f={$blk:Y.ptr.prototype.Intersection,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s};return $f;};Y.prototype.Intersection=function(a,b,c){return this.$val.Intersection(a,b,c);};Y.ptr.prototype.Move=function(a,b){var a,b,c;c=this;c.X=c.X+(a);c.Y=c.Y+(b);};Y.prototype.Move=function(a,b){return this.$val.Move(a,b);};Y.ptr.prototype.MoveVec=function(a){var a,b;b=this;b.X=b.X+(a.X());b.Y=b.Y+(a.Y());};Y.prototype.MoveVec=function(a){return this.$val.MoveVec(a);};Y.ptr.prototype.SetPosition=function(a,b){var a,b,c;c=this;c.X=a;c.Y=b;};Y.prototype.SetPosition=function(a,b){return this.$val.SetPosition(a,b);};Y.ptr.prototype.SetPositionVec=function(a){var a,b;b=this;b.X=a.X();b.Y=a.Y();};Y.prototype.SetPositionVec=function(a){return this.$val.SetPositionVec(a);};Y.ptr.prototype.Position=function(){var a;a=this;return[a.X,a.Y];};Y.prototype.Position=function(){return this.$val.Position();};Y.ptr.prototype.PointInside=function(a){var a,b;b=this;return a.Sub(new AQ([new C([b.X,b.Y])])).Magnitude()<=b.Radius;};Y.prototype.PointInside=function(a){return this.$val.PointInside(a);};Y.ptr.prototype.IntersectionPointsCircle=function(a){var a,b,c,d,e,f,g;b=this;c=A.Sqrt(A.Pow(a.X-b.X,2)+A.Pow(a.Y-b.Y,2));if(c>b.Radius+a.Radius||c<A.Abs(b.Radius-a.Radius)||(c===0)&&(b.Radius===a.Radius)){return AQ.nil;}d=(A.Pow(b.Radius,2)-A.Pow(a.Radius,2)+A.Pow(c,2))/(2*c);e=A.Sqrt(A.Pow(b.Radius,2)-A.Pow(d,2));f=b.X+d*(a.X-b.X)/c;g=b.Y+d*(a.Y-b.Y)/c;return new AQ([new C([f+e*(a.Y-b.Y)/c,g-e*(a.X-b.X)/c]),new C([f-e*(a.Y-b.Y)/c,g+e*(a.X-b.X)/c])]);};Y.prototype.IntersectionPointsCircle=function(a){return this.$val.IntersectionPointsCircle(a);};AA.ptr.prototype.Overlapping=function(a){var a,b;b=this;return $clone(b,AA).Overlap($clone(a,AA))>0;};AA.prototype.Overlapping=function(a){return this.$val.Overlapping(a);};AA.ptr.prototype.Overlap=function(a){var a,b;b=this;return A.Min(b.Max,a.Max)-A.Max(b.Min,a.Min);};AA.prototype.Overlap=function(a){return this.$val.Overlap(a);};AA.ptr.prototype.IsInside=function(a){var a,b;b=this;return b.Min>=a.Min&&b.Max<=a.Max;};AA.prototype.IsInside=function(a){return this.$val.IsInside(a);};AC=function(a,b,c,d,e){var a,b,c,d,e,f;f=new AB.ptr($ifaceNil,AN.nil,a,b,c,d,AL.nil,$ifaceNil,$makeMap(AO.keyFor,[]),new AW([]));if(e.$length>0){f.AddTags(e);}return f;};$pkg.NewObject=AC;AB.ptr.prototype.Clone=function(){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=AC(a.X,a.Y,a.W,a.H,a.Tags());b.Data=a.Data;if(!($interfaceIsEqual(a.Shape,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:c=a.Shape.Clone();$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}$r=b.SetShape(c);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:d=a.ignoreList;e=0;f=$keys(d);while(true){if(!(e<f.length)){break;}g=d[f[e]];if(g===undefined){e++;continue;}h=g.k;b.AddToIgnoreList(h);e++;}$s=-1;return b;}return;}var $f={$blk:AB.ptr.prototype.Clone,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};AB.prototype.Clone=function(){return this.$val.Clone();};AB.ptr.prototype.Update=function(){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;if(!(a.Space===AN.nil)){b=a.Space;a.Space.Remove(new AP([a]));a.Space=b;c=a.BoundsToSpace(0,0);d=c[0];e=c[1];f=c[2];g=c[3];h=e;while(true){if(!(h<=g)){break;}i=d;while(true){if(!(i<=f)){break;}j=a.Space.Cell(i,h);if(!(j===AK.nil)){j.register(a);a.TouchingCells=$append(a.TouchingCells,j);}i=i+(1)>>0;}h=h+(1)>>0;}}if(!($interfaceIsEqual(a.Shape,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:$r=a.Shape.SetPosition(a.X,a.Y);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:AB.ptr.prototype.Update,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};AB.prototype.Update=function(){return this.$val.Update();};AB.ptr.prototype.AddTags=function(a){var a,b;b=this;b.tags=$appendSlice(b.tags,a);};AB.prototype.AddTags=function(a){return this.$val.AddTags(a);};AB.ptr.prototype.RemoveTags=function(a){var a,b,c,d,e,f,g,h,i;b=this;c=a;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=b.tags;g=0;while(true){if(!(g<f.$length)){break;}h=g;i=((g<0||g>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(i===e){b.tags=$appendSlice($subslice(b.tags,0,h),$subslice(b.tags,(h+1>>0)));break;}g++;}d++;}};AB.prototype.RemoveTags=function(a){return this.$val.RemoveTags(a);};AB.ptr.prototype.HasTags=function(a){var a,b,c,d,e,f,g,h;b=this;c=a;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=b.tags;g=0;while(true){if(!(g<f.$length)){break;}h=((g<0||g>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(h===e){return true;}g++;}d++;}return false;};AB.prototype.HasTags=function(a){return this.$val.HasTags(a);};AB.ptr.prototype.Tags=function(){var a;a=this;return $appendSlice(new AW([]),a.tags);};AB.prototype.Tags=function(){return this.$val.Tags();};AB.ptr.prototype.SetShape=function(a){var{a,b,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(!($interfaceIsEqual(b.Shape,a))){$s=1;continue;}$s=2;continue;case 1:b.Shape=a;$r=b.Update();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:AB.ptr.prototype.SetShape,$c:true,$r,a,b,$s};return $f;};AB.prototype.SetShape=function(a){return this.$val.SetShape(a);};AB.ptr.prototype.BoundsToSpace=function(a,b){var a,b,c,d,e,f,g,h,i;c=this;d=c.Space.WorldToSpace(c.X+a,c.Y+b);e=d[0];f=d[1];g=c.Space.WorldToSpace(c.X+c.W+a-1,c.Y+c.H+b-1);h=g[0];i=g[1];return[e,f,h,i];};AB.prototype.BoundsToSpace=function(a,b){return this.$val.BoundsToSpace(a,b);};AB.ptr.prototype.SharesCells=function(a){var a,b,c,d,e;b=this;c=b.TouchingCells;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.Contains(a)){return true;}d++;}return false;};AB.prototype.SharesCells=function(a){return this.$val.SharesCells(a);};AB.ptr.prototype.SharesCellsTags=function(a){var a,b,c,d,e;b=this;c=b.TouchingCells;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.ContainsTags(a)){return true;}d++;}return false;};AB.prototype.SharesCellsTags=function(a){return this.$val.SharesCellsTags(a);};AB.ptr.prototype.Center=function(){var a;a=this;return[a.X+(a.W/2),a.Y+(a.H/2)];};AB.prototype.Center=function(){return this.$val.Center();};AB.ptr.prototype.SetCenter=function(a,b){var a,b,c;c=this;c.X=a-(c.W/2);c.Y=b-(c.H/2);};AB.prototype.SetCenter=function(a,b){return this.$val.SetCenter(a,b);};AB.ptr.prototype.CellPosition=function(){var a,b;a=this;b=a.Center();return a.Space.WorldToSpace(b[0],b[1]);};AB.prototype.CellPosition=function(){return this.$val.CellPosition();};AB.ptr.prototype.SetRight=function(a){var a,b;b=this;b.X=a-b.W;};AB.prototype.SetRight=function(a){return this.$val.SetRight(a);};AB.ptr.prototype.SetBottom=function(a){var a,b;b=this;b.Y=a-b.H;};AB.prototype.SetBottom=function(a){return this.$val.SetBottom(a);};AB.ptr.prototype.Bottom=function(){var a;a=this;return a.Y+a.H;};AB.prototype.Bottom=function(){return this.$val.Bottom();};AB.ptr.prototype.Right=function(){var a;a=this;return a.X+a.W;};AB.prototype.Right=function(){return this.$val.Right();};AB.ptr.prototype.SetBounds=function(a,b){var a,b,c;c=this;c.X=(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]);c.Y=(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]);c.W=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])-c.X;c.H=(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])-c.Y;};AB.prototype.SetBounds=function(a,b){return this.$val.SetBounds(a,b);};AB.ptr.prototype.Check=function(a,b,c){var{a,aa,ab,ac,ad,ae,af,ag,ah,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=[d];e=[e];f=[f];g=[g];h=this;if(h.Space===AN.nil){$s=-1;return AX.nil;}d[0]=AG();d[0].checkingObject=h;if(a<0){a=A.Min(a,-1);}else if(a>0){a=A.Max(a,1);}if(b<0){b=A.Min(b,-1);}else if(b>0){b=A.Max(b,1);}d[0].dx=a;d[0].dy=b;i=h.BoundsToSpace(a,b);j=i[0];k=i[1];l=i[2];m=i[3];n=$makeMap(AO.keyFor,[]);o=$makeMap(AK.keyFor,[]);p=k;while(true){if(!(p<=m)){break;}q=j;while(true){if(!(q<=l)){break;}r=h.Space.Cell(q,p);if(!(r===AK.nil)){s=r.Objects;t=0;while(true){if(!(t<s.$length)){break;}u=((t<0||t>=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+t]);w=(v=h.ignoreList[AO.keyFor(u)],v!==undefined?v.v:false);if(u===h||w){t++;continue;}x=(y=n[AO.keyFor(u)],y!==undefined?[y.v,true]:[false,false]);z=x[1];if(((c.$length===0)||u.HasTags(c))&&!z){d[0].Objects=$append(d[0].Objects,u);aa=u;(n||$throwRuntimeError("assignment to entry in nil map"))[AO.keyFor(aa)]={k:aa,v:true};ab=(ac=o[AK.keyFor(r)],ac!==undefined?[ac.v,true]:[false,false]);ad=ab[1];if(!ad){d[0].Cells=$append(d[0].Cells,r);ae=r;(o||$throwRuntimeError("assignment to entry in nil map"))[AK.keyFor(ae)]={k:ae,v:true};}t++;continue;}t++;}}q=q+(1)>>0;}p=p+(1)>>0;}if(d[0].Objects.$length===0){$s=-1;return AX.nil;}af=d[0].checkingObject.Center();ag=af[0];ah=af[1];g[0]=new C([ag,ah]);$r=B.Slice(d[0].Objects,(function(d,e,f,g){return function(ai,aj){var ai,aj,ak,al,am,an,ao,ap,aq,ar;ak=(al=d[0].Objects,((ai<0||ai>=al.$length)?($throwRuntimeError("index out of range"),undefined):al.$array[al.$offset+ai])).Center();am=ak[0];an=ak[1];ao=(ap=d[0].Objects,((aj<0||aj>=ap.$length)?($throwRuntimeError("index out of range"),undefined):ap.$array[ap.$offset+aj])).Center();aq=ao[0];ar=ao[1];return new C([am,an]).Sub(new AQ([g[0]])).Magnitude2()<new C([aq,ar]).Sub(new AQ([g[0]])).Magnitude2();};})(d,e,f,g));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f[0]=d[0].checkingObject.Space.CellWidth;e[0]=d[0].checkingObject.Space.CellHeight;$r=B.Slice(d[0].Cells,(function(d,e,f,g){return function(ai,aj){var ai,aj,ak,al,am,an,ao,ap,aq,ar;return new C([((($imul((ak=d[0].Cells,((ai<0||ai>=ak.$length)?($throwRuntimeError("index out of range"),undefined):ak.$array[ak.$offset+ai])).X,f[0]))+((al=f[0]/2,(al===al&&al!==1/0&&al!==-1/0)?al>>0:$throwRuntimeError("integer divide by zero")))>>0)),((($imul((am=d[0].Cells,((ai<0||ai>=am.$length)?($throwRuntimeError("index out of range"),undefined):am.$array[am.$offset+ai])).Y,e[0]))+((an=e[0]/2,(an===an&&an!==1/0&&an!==-1/0)?an>>0:$throwRuntimeError("integer divide by zero")))>>0))]).Sub(new AQ([g[0]])).Magnitude2()<new C([((($imul((ao=d[0].Cells,((aj<0||aj>=ao.$length)?($throwRuntimeError("index out of range"),undefined):ao.$array[ao.$offset+aj])).X,f[0]))+((ap=f[0]/2,(ap===ap&&ap!==1/0&&ap!==-1/0)?ap>>0:$throwRuntimeError("integer divide by zero")))>>0)),((($imul((aq=d[0].Cells,((aj<0||aj>=aq.$length)?($throwRuntimeError("index out of range"),undefined):aq.$array[aq.$offset+aj])).Y,e[0]))+((ar=e[0]/2,(ar===ar&&ar!==1/0&&ar!==-1/0)?ar>>0:$throwRuntimeError("integer divide by zero")))>>0))]).Sub(new AQ([g[0]])).Magnitude2();};})(d,e,f,g));$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return d[0];}return;}var $f={$blk:AB.ptr.prototype.Check,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AB.prototype.Check=function(a,b,c){return this.$val.Check(a,b,c);};AB.ptr.prototype.Overlaps=function(a){var a,b;b=this;return a.X<=b.X+b.W&&a.X+a.W>=b.X&&a.Y<=b.Y+b.H&&a.Y+a.H>=b.Y;};AB.prototype.Overlaps=function(a){return this.$val.Overlaps(a);};AB.ptr.prototype.AddToIgnoreList=function(a){var a,b,c;b=this;c=a;(b.ignoreList||$throwRuntimeError("assignment to entry in nil map"))[AO.keyFor(c)]={k:c,v:true};};AB.prototype.AddToIgnoreList=function(a){return this.$val.AddToIgnoreList(a);};AB.ptr.prototype.RemoveFromIgnoreList=function(a){var a,b;b=this;delete b.ignoreList[AO.keyFor(a)];};AB.prototype.RemoveFromIgnoreList=function(a){return this.$val.RemoveFromIgnoreList(a);};AD=function(a,b,c,d){var a,b,c,d,e,f,g,h,i;e=d.$length;f=c;g=0;while(true){if(!(g<f.$length)){break;}h=g;i=((g<0||g>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(h===e){return;}((h<0||h>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+h]=b*i+((h<0||h>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+h]));g++;}};AE=function(a,b,c){var a,b,c,d,e,f;d=c;e=0;while(true){if(!(e<d.$length)){break;}f=e;((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]=((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f])*(b));e++;}};AG=function(){return new AF.ptr(AO.nil,0,0,new AP([]),AL.nil);};$pkg.NewCollision=AG;AF.ptr.prototype.HasTags=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e===b.checkingObject){d++;continue;}if(e.HasTags(a)){return true;}d++;}return false;};AF.prototype.HasTags=function(a){return this.$val.HasTags(a);};AF.ptr.prototype.ObjectsByTags=function(a){var a,b,c,d,e,f;b=this;c=new AP([]);d=b.Objects;e=0;while(true){if(!(e<d.$length)){break;}f=((e<0||e>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);if(f===b.checkingObject){e++;continue;}if(f.HasTags(a)){c=$append(c,f);}e++;}return c;};AF.prototype.ObjectsByTags=function(a){return this.$val.ObjectsByTags(a);};AF.ptr.prototype.ContactWithObject=function(a){var a,b,c;b=this;c=new C([0,0]);if(b.dx<0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=a.X+a.W-b.checkingObject.X);}else if(b.dx>0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=a.X-b.checkingObject.W-b.checkingObject.X);}if(b.dy<0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=a.Y+a.H-b.checkingObject.Y);}else if(b.dy>0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=a.Y-b.checkingObject.H-b.checkingObject.Y);}return c;};AF.prototype.ContactWithObject=function(a){return this.$val.ContactWithObject(a);};AF.ptr.prototype.ContactWithCell=function(a){var a,b,c,d,e;b=this;c=new C([0,0]);d=(($imul(a.X,b.checkingObject.Space.CellWidth)));e=(($imul(a.Y,b.checkingObject.Space.CellHeight)));if(b.dx<0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=d+(b.checkingObject.Space.CellWidth)-b.checkingObject.X);}else if(b.dx>0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=d-b.checkingObject.W-b.checkingObject.X);}if(b.dy<0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=e+(b.checkingObject.Space.CellHeight)-b.checkingObject.Y);}else if(b.dy>0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=e-b.checkingObject.H-b.checkingObject.Y);}return c;};AF.prototype.ContactWithCell=function(a){return this.$val.ContactWithCell(a);};AF.ptr.prototype.SlideAgainstCell=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;c=this;d=c.checkingObject.Space;f=(e=c.Cells,(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]));g=d.SpaceToWorld(f.X,f.Y);h=g[0];i=g[1];j=(d.CellWidth)/2;k=(d.CellHeight)/2;h=h+(j);i=i+(k);l=c.checkingObject.Center();m=l[0];n=l[1];o=m-h;p=n-i;q=d.Cell(f.X-1>>0,f.Y);r=d.Cell(f.X+1>>0,f.Y);s=d.Cell(f.X,f.Y-1>>0);t=d.Cell(f.X,f.Y+1>>0);u=new C([0,0]);if(!((c.dy===0))){if(o>0&&(r===AK.nil||!r.ContainsTags(b))){(0>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+0]=h+j-c.checkingObject.X);}else if(o<0&&(q===AK.nil||!q.ContainsTags(b))){(0>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+0]=h-j-(c.checkingObject.X+c.checkingObject.W));}else{return C.nil;}}if(!((c.dx===0))){if(p>0&&(t===AK.nil||!t.ContainsTags(b))){(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]=i+k-c.checkingObject.Y);}else if(p<0&&(s===AK.nil||!s.ContainsTags(b))){(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]=i-k-(c.checkingObject.Y+c.checkingObject.H));}else{return C.nil;}}return u;};AF.prototype.SlideAgainstCell=function(a,b){return this.$val.SlideAgainstCell(a,b);};AI=function(a,b){var a,b;return new AH.ptr(a,b,new AP([]));};AH.ptr.prototype.register=function(a){var a,b;b=this;if(!b.Contains(a)){b.Objects=$append(b.Objects,a);}};AH.prototype.register=function(a){return this.$val.register(a);};AH.ptr.prototype.unregister=function(a){var a,b,c,d,e,f,g,h,i;b=this;c=b.Objects;d=0;while(true){if(!(d<c.$length)){break;}e=d;f=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(f===a){(i=b.Objects,((e<0||e>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+e]=(g=b.Objects,h=b.Objects.$length-1>>0,((h<0||h>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]))));b.Objects=$subslice(b.Objects,0,(b.Objects.$length-1>>0));break;}d++;}};AH.prototype.unregister=function(a){return this.$val.unregister(a);};AH.ptr.prototype.Contains=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e===a){return true;}d++;}return false;};AH.prototype.Contains=function(a){return this.$val.Contains(a);};AH.ptr.prototype.ContainsTags=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.HasTags(a)){return true;}d++;}return false;};AH.prototype.ContainsTags=function(a){return this.$val.ContainsTags(a);};AH.ptr.prototype.Occupied=function(){var a;a=this;return a.Objects.$length>0;};AH.prototype.Occupied=function(){return this.$val.Occupied();};C.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[C],false)},{prop:"Add",name:"Add",pkg:"",typ:$funcType([AQ],[C],true)},{prop:"Sub",name:"Sub",pkg:"",typ:$funcType([AQ],[C],true)},{prop:"Scale",name:"Scale",pkg:"",typ:$funcType([$Float64],[C],false)},{prop:"Equal",name:"Equal",pkg:"",typ:$funcType([C],[$Bool],false)},{prop:"Magnitude",name:"Magnitude",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Magnitude2",name:"Magnitude2",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Unit",name:"Unit",pkg:"",typ:$funcType([],[C],false)},{prop:"Dot",name:"Dot",pkg:"",typ:$funcType([C],[$Float64],false)},{prop:"Cross",name:"Cross",pkg:"",typ:$funcType([C],[C],false)},{prop:"Rotate",name:"Rotate",pkg:"",typ:$funcType([$Float64,AY],[C],true)},{prop:"X",name:"X",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Y",name:"Y",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Z",name:"Z",pkg:"",typ:$funcType([],[$Float64],false)}];AN.methods=[{prop:"Add",name:"Add",pkg:"",typ:$funcType([AP],[],true)},{prop:"Remove",name:"Remove",pkg:"",typ:$funcType([AP],[],true)},{prop:"Objects",name:"Objects",pkg:"",typ:$funcType([],[AP],false)},{prop:"Resize",name:"Resize",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Cell",name:"Cell",pkg:"",typ:$funcType([$Int,$Int],[AK],false)},{prop:"CheckCells",name:"CheckCells",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int,AW],[AO],true)},{prop:"CheckCellsWorld",name:"CheckCellsWorld",pkg:"",typ:$funcType([$Float64,$Float64,$Float64,$Float64,AW],[AO],true)},{prop:"UnregisterAllObjects",name:"UnregisterAllObjects",pkg:"",typ:$funcType([],[],false)},{prop:"WorldToSpace",name:"WorldToSpace",pkg:"",typ:$funcType([$Float64,$Float64],[$Int,$Int],false)},{prop:"SpaceToWorld",name:"SpaceToWorld",pkg:"",typ:$funcType([$Int,$Int],[$Float64,$Float64],false)},{prop:"Height",name:"Height",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int],false)},{prop:"CellsInLine",name:"CellsInLine",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int],[AL],false)}];AR.methods=[{prop:"Project",name:"Project",pkg:"",typ:$funcType([C],[C],false)},{prop:"Normal",name:"Normal",pkg:"",typ:$funcType([],[C],false)},{prop:"Vector",name:"Vector",pkg:"",typ:$funcType([],[C],false)},{prop:"IntersectionPointsLine",name:"IntersectionPointsLine",pkg:"",typ:$funcType([AR],[C],false)},{prop:"IntersectionPointsCircle",name:"IntersectionPointsCircle",pkg:"",typ:$funcType([AT],[AQ],false)}];AU.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[Q],false)},{prop:"AddPointsVec",name:"AddPointsVec",pkg:"",typ:$funcType([AQ],[],true)},{prop:"AddPoints",name:"AddPoints",pkg:"",typ:$funcType([AJ],[],true)},{prop:"Lines",name:"Lines",pkg:"",typ:$funcType([],[AS],false)},{prop:"Transformed",name:"Transformed",pkg:"",typ:$funcType([],[AQ],false)},{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[C,C],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"SetPositionVec",name:"SetPositionVec",pkg:"",typ:$funcType([C],[],false)},{prop:"Move",name:"Move",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"MoveVec",name:"MoveVec",pkg:"",typ:$funcType([C],[],false)},{prop:"Center",name:"Center",pkg:"",typ:$funcType([],[C],false)},{prop:"Project",name:"Project",pkg:"",typ:$funcType([C],[AA],false)},{prop:"SATAxes",name:"SATAxes",pkg:"",typ:$funcType([],[AQ],false)},{prop:"PointInside",name:"PointInside",pkg:"",typ:$funcType([C],[$Bool],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,Q],[AV],false)},{prop:"calculateMTV",name:"calculateMTV",pkg:"resolv",typ:$funcType([AV,Q],[C],false)},{prop:"ContainedBy",name:"ContainedBy",pkg:"",typ:$funcType([Q],[$Bool],false)},{prop:"FlipH",name:"FlipH",pkg:"",typ:$funcType([],[],false)},{prop:"FlipV",name:"FlipV",pkg:"",typ:$funcType([],[],false)},{prop:"ReverseVertexOrder",name:"ReverseVertexOrder",pkg:"",typ:$funcType([],[],false)}];AV.methods=[{prop:"LeftmostPoint",name:"LeftmostPoint",pkg:"",typ:$funcType([],[C],false)},{prop:"RightmostPoint",name:"RightmostPoint",pkg:"",typ:$funcType([],[C],false)},{prop:"TopmostPoint",name:"TopmostPoint",pkg:"",typ:$funcType([],[C],false)},{prop:"BottommostPoint",name:"BottommostPoint",pkg:"",typ:$funcType([],[C],false)}];AT.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[Q],false)},{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[C,C],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,Q],[AV],false)},{prop:"Move",name:"Move",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"MoveVec",name:"MoveVec",pkg:"",typ:$funcType([C],[],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"SetPositionVec",name:"SetPositionVec",pkg:"",typ:$funcType([C],[],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"PointInside",name:"PointInside",pkg:"",typ:$funcType([C],[$Bool],false)},{prop:"IntersectionPointsCircle",name:"IntersectionPointsCircle",pkg:"",typ:$funcType([AT],[AQ],false)}];AA.methods=[{prop:"Overlapping",name:"Overlapping",pkg:"",typ:$funcType([AA],[$Bool],false)},{prop:"Overlap",name:"Overlap",pkg:"",typ:$funcType([AA],[$Float64],false)},{prop:"IsInside",name:"IsInside",pkg:"",typ:$funcType([AA],[$Bool],false)}];AO.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[AO],false)},{prop:"Update",name:"Update",pkg:"",typ:$funcType([],[],false)},{prop:"AddTags",name:"AddTags",pkg:"",typ:$funcType([AW],[],true)},{prop:"RemoveTags",name:"RemoveTags",pkg:"",typ:$funcType([AW],[],true)},{prop:"HasTags",name:"HasTags",pkg:"",typ:$funcType([AW],[$Bool],true)},{prop:"Tags",name:"Tags",pkg:"",typ:$funcType([],[AW],false)},{prop:"SetShape",name:"SetShape",pkg:"",typ:$funcType([Q],[],false)},{prop:"BoundsToSpace",name:"BoundsToSpace",pkg:"",typ:$funcType([$Float64,$Float64],[$Int,$Int,$Int,$Int],false)},{prop:"SharesCells",name:"SharesCells",pkg:"",typ:$funcType([AO],[$Bool],false)},{prop:"SharesCellsTags",name:"SharesCellsTags",pkg:"",typ:$funcType([AW],[$Bool],true)},{prop:"Center",name:"Center",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetCenter",name:"SetCenter",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"CellPosition",name:"CellPosition",pkg:"",typ:$funcType([],[$Int,$Int],false)},{prop:"SetRight",name:"SetRight",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"SetBottom",name:"SetBottom",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"Bottom",name:"Bottom",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Right",name:"Right",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"SetBounds",name:"SetBounds",pkg:"",typ:$funcType([C,C],[],false)},{prop:"Check",name:"Check",pkg:"",typ:$funcType([$Float64,$Float64,AW],[AX],true)},{prop:"Overlaps",name:"Overlaps",pkg:"",typ:$funcType([AO],[$Bool],false)},{prop:"AddToIgnoreList",name:"AddToIgnoreList",pkg:"",typ:$funcType([AO],[],false)},{prop:"RemoveFromIgnoreList",name:"RemoveFromIgnoreList",pkg:"",typ:$funcType([AO],[],false)}];AX.methods=[{prop:"HasTags",name:"HasTags",pkg:"",typ:$funcType([AW],[$Bool],true)},{prop:"ObjectsByTags",name:"ObjectsByTags",pkg:"",typ:$funcType([AW],[AP],true)},{prop:"ContactWithObject",name:"ContactWithObject",pkg:"",typ:$funcType([AO],[C],false)},{prop:"ContactWithCell",name:"ContactWithCell",pkg:"",typ:$funcType([AK],[C],false)},{prop:"SlideAgainstCell",name:"SlideAgainstCell",pkg:"",typ:$funcType([AK,AW],[C],true)}];AK.methods=[{prop:"register",name:"register",pkg:"resolv",typ:$funcType([AO],[],false)},{prop:"unregister",name:"unregister",pkg:"resolv",typ:$funcType([AO],[],false)},{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([AO],[$Bool],false)},{prop:"ContainsTags",name:"ContainsTags",pkg:"",typ:$funcType([AW],[$Bool],true)},{prop:"Occupied",name:"Occupied",pkg:"",typ:$funcType([],[$Bool],false)}];C.init($Float64);O.init("",[{prop:"Cells",name:"Cells",embedded:false,exported:true,typ:AM,tag:""},{prop:"CellWidth",name:"CellWidth",embedded:false,exported:true,typ:$Int,tag:""},{prop:"CellHeight",name:"CellHeight",embedded:false,exported:true,typ:$Int,tag:""}]);Q.init([{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[C,C],false)},{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[Q],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,Q],[AV],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)}]);R.init("",[{prop:"Start",name:"Start",embedded:false,exported:true,typ:C,tag:""},{prop:"End",name:"End",embedded:false,exported:true,typ:C,tag:""}]);T.init("",[{prop:"Points",name:"Points",embedded:false,exported:true,typ:AQ,tag:""},{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Closed",name:"Closed",embedded:false,exported:true,typ:$Bool,tag:""}]);V.init("",[{prop:"Points",name:"Points",embedded:false,exported:true,typ:AQ,tag:""},{prop:"MTV",name:"MTV",embedded:false,exported:true,typ:C,tag:""},{prop:"Center",name:"Center",embedded:false,exported:true,typ:C,tag:""}]);Y.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Radius",name:"Radius",embedded:false,exported:true,typ:$Float64,tag:""}]);AA.init("",[{prop:"Min",name:"Min",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Max",name:"Max",embedded:false,exported:true,typ:$Float64,tag:""}]);AB.init("resolv",[{prop:"Shape",name:"Shape",embedded:false,exported:true,typ:Q,tag:""},{prop:"Space",name:"Space",embedded:false,exported:true,typ:AN,tag:""},{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"W",name:"W",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"H",name:"H",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"TouchingCells",name:"TouchingCells",embedded:false,exported:true,typ:AL,tag:""},{prop:"Data",name:"Data",embedded:false,exported:true,typ:$emptyInterface,tag:""},{prop:"ignoreList",name:"ignoreList",embedded:false,exported:false,typ:AZ,tag:""},{prop:"tags",name:"tags",embedded:false,exported:false,typ:AW,tag:""}]);AF.init("resolv",[{prop:"checkingObject",name:"checkingObject",embedded:false,exported:false,typ:AO,tag:""},{prop:"dx",name:"dx",embedded:false,exported:false,typ:$Float64,tag:""},{prop:"dy",name:"dy",embedded:false,exported:false,typ:$Float64,tag:""},{prop:"Objects",name:"Objects",embedded:false,exported:true,typ:AP,tag:""},{prop:"Cells",name:"Cells",embedded:false,exported:true,typ:AL,tag:""}]);AH.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Int,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Int,tag:""},{prop:"Objects",name:"Objects",embedded:false,exported:true,typ:AP,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["jsexport/battle"]=(function(){var $pkg={},$init,A,B,C,D,E,F,H,I,J,M,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,L,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB;A=$packages["math"];B=$packages["resolv"];C=$pkg.Vec2D=$newType(0,$kindStruct,"battle.Vec2D",true,"jsexport/battle",true,function(X_,Y_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;return;}this.X=X_;this.Y=Y_;});D=$pkg.Polygon2D=$newType(0,$kindStruct,"battle.Polygon2D",true,"jsexport/battle",true,function(Anchor_,Points_){this.$val=this;if(arguments.length===0){this.Anchor=AS.nil;this.Points=AT.nil;return;}this.Anchor=Anchor_;this.Points=Points_;});E=$pkg.PlayerDownsync=$newType(0,$kindStruct,"battle.PlayerDownsync",true,"jsexport/battle",true,function(Id_,VirtualGridX_,VirtualGridY_,DirX_,DirY_,VelX_,VelY_,Speed_,BattleState_,JoinIndex_,ColliderRadius_,Removed_,Score_,LastMoveGmtMillis_,FramesToRecover_,Hp_,MaxHp_,CharacterState_,InAir_){this.$val=this;if(arguments.length===0){this.Id=0;this.VirtualGridX=0;this.VirtualGridY=0;this.DirX=0;this.DirY=0;this.VelX=0;this.VelY=0;this.Speed=0;this.BattleState=0;this.JoinIndex=0;this.ColliderRadius=0;this.Removed=false;this.Score=0;this.LastMoveGmtMillis=0;this.FramesToRecover=0;this.Hp=0;this.MaxHp=0;this.CharacterState=0;this.InAir=false;return;}this.Id=Id_;this.VirtualGridX=VirtualGridX_;this.VirtualGridY=VirtualGridY_;this.DirX=DirX_;this.DirY=DirY_;this.VelX=VelX_;this.VelY=VelY_;this.Speed=Speed_;this.BattleState=BattleState_;this.JoinIndex=JoinIndex_;this.ColliderRadius=ColliderRadius_;this.Removed=Removed_;this.Score=Score_;this.LastMoveGmtMillis=LastMoveGmtMillis_;this.FramesToRecover=FramesToRecover_;this.Hp=Hp_;this.MaxHp=MaxHp_;this.CharacterState=CharacterState_;this.InAir=InAir_;});F=$pkg.InputFrameDecoded=$newType(0,$kindStruct,"battle.InputFrameDecoded",true,"jsexport/battle",true,function(Dx_,Dy_,BtnALevel_,BtnBLevel_){this.$val=this;if(arguments.length===0){this.Dx=0;this.Dy=0;this.BtnALevel=0;this.BtnBLevel=0;return;}this.Dx=Dx_;this.Dy=Dy_;this.BtnALevel=BtnALevel_;this.BtnBLevel=BtnBLevel_;});H=$pkg.Barrier=$newType(0,$kindStruct,"battle.Barrier",true,"jsexport/battle",true,function(Boundary_){this.$val=this;if(arguments.length===0){this.Boundary=AU.nil;return;}this.Boundary=Boundary_;});I=$pkg.MeleeBullet=$newType(0,$kindStruct,"battle.MeleeBullet",true,"jsexport/battle",true,function(BattleLocalId_,StartupFrames_,ActiveFrames_,RecoveryFrames_,RecoveryFramesOnBlock_,RecoveryFramesOnHit_,HitboxOffset_,OriginatedRenderFrameId_,HitStunFrames_,BlockStunFrames_,Pushback_,ReleaseTriggerType_,Damage_,OffenderJoinIndex_,OffenderPlayerId_,SelfMoveforwardX_,SelfMoveforwardY_,HitboxSizeX_,HitboxSizeY_){this.$val=this;if(arguments.length===0){this.BattleLocalId=0;this.StartupFrames=0;this.ActiveFrames=0;this.RecoveryFrames=0;this.RecoveryFramesOnBlock=0;this.RecoveryFramesOnHit=0;this.HitboxOffset=0;this.OriginatedRenderFrameId=0;this.HitStunFrames=0;this.BlockStunFrames=0;this.Pushback=0;this.ReleaseTriggerType=0;this.Damage=0;this.OffenderJoinIndex=0;this.OffenderPlayerId=0;this.SelfMoveforwardX=0;this.SelfMoveforwardY=0;this.HitboxSizeX=0;this.HitboxSizeY=0;return;}this.BattleLocalId=BattleLocalId_;this.StartupFrames=StartupFrames_;this.ActiveFrames=ActiveFrames_;this.RecoveryFrames=RecoveryFrames_;this.RecoveryFramesOnBlock=RecoveryFramesOnBlock_;this.RecoveryFramesOnHit=RecoveryFramesOnHit_;this.HitboxOffset=HitboxOffset_;this.OriginatedRenderFrameId=OriginatedRenderFrameId_;this.HitStunFrames=HitStunFrames_;this.BlockStunFrames=BlockStunFrames_;this.Pushback=Pushback_;this.ReleaseTriggerType=ReleaseTriggerType_;this.Damage=Damage_;this.OffenderJoinIndex=OffenderJoinIndex_;this.OffenderPlayerId=OffenderPlayerId_;this.SelfMoveforwardX=SelfMoveforwardX_;this.SelfMoveforwardY=SelfMoveforwardY_;this.HitboxSizeX=HitboxSizeX_;this.HitboxSizeY=HitboxSizeY_;});J=$pkg.RoomDownsyncFrame=$newType(0,$kindStruct,"battle.RoomDownsyncFrame",true,"jsexport/battle",true,function(Id_,PlayersArr_,CountdownNanos_,MeleeBullets_,BackendUnconfirmedMask_,ShouldForceResync_){this.$val=this;if(arguments.length===0){this.Id=0;this.PlayersArr=AM.nil;this.CountdownNanos=new $Int64(0,0);this.MeleeBullets=AQ.nil;this.BackendUnconfirmedMask=new $Uint64(0,0);this.ShouldForceResync=false;return;}this.Id=Id_;this.PlayersArr=PlayersArr_;this.CountdownNanos=CountdownNanos_;this.MeleeBullets=MeleeBullets_;this.BackendUnconfirmedMask=BackendUnconfirmedMask_;this.ShouldForceResync=ShouldForceResync_;});M=$pkg.SatResult=$newType(0,$kindStruct,"battle.SatResult",true,"jsexport/battle",true,function(Overlap_,OverlapX_,OverlapY_,AContainedInB_,BContainedInA_,Axis_){this.$val=this;if(arguments.length===0){this.Overlap=0;this.OverlapX=0;this.OverlapY=0;this.AContainedInB=false;this.BContainedInA=false;this.Axis=B.Vector.nil;return;}this.Overlap=Overlap_;this.OverlapX=OverlapX_;this.OverlapY=OverlapY_;this.AContainedInB=AContainedInB_;this.BContainedInA=BContainedInA_;this.Axis=Axis_;});AC=$sliceType($Int32);AD=$sliceType(AC);AE=$ptrType(M);AF=$sliceType(C);AG=$sliceType($String);AH=$ptrType(B.Collision);AI=$ptrType(AF);AJ=$ptrType(E);AK=$ptrType(I);AL=$ptrType(B.ConvexPolygon);AM=$sliceType(AJ);AN=$sliceType(AI);AO=$sliceType($Uint64);AP=$ptrType(B.Object);AQ=$sliceType(AK);AR=$sliceType($Float64);AS=$ptrType(C);AT=$sliceType(AS);AU=$ptrType(D);L=function(a){var a,b,c,d,e,f,g,h;b=new $Uint64(a.$high&0,(a.$low&15)>>>0);d=(((c=$shiftRightUint64(a,4),new $Uint64(c.$high&0,(c.$low&1)>>>0)).$low>>0));f=(((e=$shiftRightUint64(a,5),new $Uint64(e.$high&0,(e.$low&1)>>>0)).$low>>0));return new F.ptr((g=(($flatten64(b)<0||$flatten64(b)>=$pkg.DIRECTION_DECODER.$length)?($throwRuntimeError("index out of range"),undefined):$pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset+$flatten64(b)]),(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])),(h=(($flatten64(b)<0||$flatten64(b)>=$pkg.DIRECTION_DECODER.$length)?($throwRuntimeError("index out of range"),undefined):$pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset+$flatten64(b)]),(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])),d,f);};N=function(a,b,c,d){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=[c];e=[e];f=[f];g=c[0].Position();e[0]=g[0];f[0]=g[1];$deferred.push([(function(c,e,f){return function(){c[0].SetPosition(e[0],f[0]);};})(c,e,f),[]]);c[0].SetPosition(e[0]+a,f[0]+b);h=new M.ptr(0,0,0,true,true,new B.Vector([0,0]));i=O(c[0],d,h);if(i){$s=1;continue;}$s=2;continue;case 1:j=h.Overlap*h.OverlapX;k=h.Overlap*h.OverlapY;l=j;m=k;n=[true,l,m,h];$s=4;case 4:return n;case 2:o=[false,0,0,h];$s=5;case 5:return o;case 3:$s=-1;return[false,0,0,AE.nil];}return;}}catch(err){$err=err;$s=-1;return[false,0,0,AE.nil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:N,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred};return $f;}}};$pkg.CalcPushbacks=N;O=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;d=a.Points.$length;e=b.Points.$length;f=d;g=e;if((1===f)&&(1===g)){if(!(AE.nil===c)){c.Overlap=0;}return((h=(i=a.Points,(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])),(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]))===(j=(k=b.Points,(0>=k.$length?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+0])),(0>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+0])))&&((l=(m=a.Points,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0])),(1>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+1]))===(n=(o=b.Points,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0])),(1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1])));}if(1<f){p=a.SATAxes();q=0;while(true){if(!(q<p.$length)){break;}r=((q<0||q>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]);if(P(a,b,r.Unit(),c)){return false;}q++;}}if(1<g){s=b.SATAxes();t=0;while(true){if(!(t<s.$length)){break;}u=((t<0||t>=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+t]);if(P(a,b,u.Unit(),c)){return false;}t++;}}return true;};P=function(a,b,c,d){var a,aa,ab,ac,ad,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=1.7e+308;f=-1.7e+308;g=1.7e+308;h=-1.7e+308;i=e;j=f;k=g;l=h;m=a.Points;n=0;while(true){if(!(n<m.$length)){break;}o=((n<0||n>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n]);p=((0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0])+a.X)*(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])+((1>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+1])+a.Y)*(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);if(i>p){i=p;}if(j<p){j=p;}n++;}q=b.Points;r=0;while(true){if(!(r<q.$length)){break;}s=((r<0||r>=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+r]);t=((0>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+0])+b.X)*(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])+((1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1])+b.Y)*(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);if(k>t){k=t;}if(l<t){l=t;}r++;}if(i>l||j<k){return true;}if(!(AE.nil===d)){u=0;if(i<k){d.AContainedInB=false;if(j<l){u=j-k;d.BContainedInA=false;}else{v=j-k;w=l-i;if(v<w){u=v;}else{u=-w;}}}else{d.BContainedInA=false;if(j>l){u=i-l;d.AContainedInB=false;}else{x=j-k;y=l-i;if(x<y){u=x;}else{u=-y;}}}z=d.Overlap;aa=u;if(u<0){aa=-u;}if(((0===(ab=d.Axis,(0>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0])))&&(0===(ac=d.Axis,(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1]))))||z>aa){ad=1;if(u<0){ad=-1;}d.Overlap=aa;d.OverlapX=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])*ad;d.OverlapY=(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1])*ad;}d.Axis=c;}return false;};Q=function(a,b,c){var a,b,c,d,e;d=((A.Floor(a*c)>>0));e=((A.Floor(b*c)>>0));return[d,e];};$pkg.WorldToVirtualGridPos=Q;R=function(a,b,c){var a,b,c,d,e;d=(a)*c;e=(b)*c;return[d,e];};$pkg.VirtualGridToWorldPos=R;S=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j;return[a-c-g+i,b-d-f+j];};$pkg.WorldToPolygonColliderBLPos=S;T=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j;return[a+c+g-i,b+d+f-j];};$pkg.PolygonColliderBLToWorldPos=T;U=function(a,b,c,d,e,f,g,h,i,j,k){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;l=T(a,b,c,d,e,f,g,h,i,j);m=l[0];n=l[1];return Q(m,n,k);};$pkg.PolygonColliderBLToVirtualGridPos=U;V=function(a,b,c,d,e,f,g,h,i,j,k){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;l=R(a,b,k);m=l[0];n=l[1];return S(m,n,c,d,e,f,g,h,i,j);};$pkg.VirtualGridToPolygonColliderBLPos=V;W=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=[f];f[0]=$makeSlice(AF,0,10);g=b.Check(0,0,new AG([]));$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;if(AH.nil===h){$s=-1;return(f.$ptr||(f.$ptr=new AI(function(){return this.$target[0];},function($v){this.$target[0]=$v;},f)));}i=h.Objects;j=0;case 2:if(!(j<i.$length)){$s=3;continue;}k=((j<0||j>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+j]);l=false;m=k.Data;if($assertType(m,AJ,true)[1]){}else if($assertType(m,AK,true)[1]){}else{l=true;}if(!l){j++;$s=2;continue;}n=$assertType(k.Shape,AL);p=N(0,0,c,n);$s=4;case 4:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;q=o[0];r=o[1];s=o[2];t=o[3];if(!q){j++;$s=2;continue;}u=(t.Overlap-d)*t.OverlapX;v=(t.Overlap-d)*t.OverlapY;r=u;s=v;f[0]=$append(f[0],new C.ptr(t.OverlapX,t.OverlapY));e.X=e.X+(r);e.Y=e.Y+(s);j++;$s=2;continue;case 3:$s=-1;return(f.$ptr||(f.$ptr=new AI(function(){return this.$target[0];},function($v){this.$target[0]=$v;},f)));}return;}var $f={$blk:W,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,$s};return $f;};X=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var{a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,c,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,d,da,db,dc,dd,de,df,dg,dh,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p});$s=$s||0;s:while(true){switch($s){case 0:q=c.PlayersArr.$length;r=$makeSlice(AM,q);s=c.PlayersArr;t=0;while(true){if(!(t<s.$length)){break;}u=t;v=((t<0||t>=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+t]);((u<0||u>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+u]=new E.ptr(v.Id,v.VirtualGridX,v.VirtualGridY,v.DirX,v.DirY,v.VelX,v.VelY,v.Speed,v.BattleState,v.JoinIndex,0,v.Removed,v.Score,0,v.FramesToRecover-1>>0,v.Hp,v.MaxHp,v.CharacterState,true));if(((u<0||u>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+u]).FramesToRecover<0){((u<0||u>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+u]).FramesToRecover=0;}t++;}w=$makeSlice(AF,q);x=$makeSlice(AN,q);if(!(AO.nil===a)){y=c.PlayersArr;z=0;while(true){if(!(z<y.$length)){break;}aa=z;ab=((z<0||z>=y.$length)?($throwRuntimeError("index out of range"),undefined):y.$array[y.$offset+z]);ac=ab.JoinIndex;ad=((aa<0||aa>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+aa]);if(0<ad.FramesToRecover){z++;continue;}af=L((ae=ac-1>>0,((ae<0||ae>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+ae])));ag=0;if(!(AO.nil===b)){ai=L((ah=ac-1>>0,((ah<0||ah>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+ah])));ag=ai.BtnBLevel;}if(af.BtnBLevel>ag){aj=false;if((4===ad.CharacterState)||(5===ad.CharacterState)||(6===ad.CharacterState)){aj=true;}ak=false;if((0===ad.CharacterState)||(1===ad.CharacterState)||(4===ad.CharacterState)){ak=true;}if(!aj&&ak){ad.VelY=h;}}if(!((0===af.Dx))||!((0===af.Dy))){ad.DirX=af.Dx;ad.DirY=af.Dy;ad.VelX=$imul(af.Dx,ab.Speed);ad.CharacterState=1;}else{ad.CharacterState=0;ad.VelX=0;}z++;}}al=c.PlayersArr;am=0;case 1:if(!(am<al.$length)){$s=2;continue;}an=am;ao=((am<0||am>=al.$length)?($throwRuntimeError("index out of range"),undefined):al.$array[al.$offset+am]);ap=ao.JoinIndex;aq=0;ar=0;(as=ap-1>>0,((as<0||as>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+as])).X=aq;(at=ap-1>>0,((at<0||at>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+at])).Y=ar;au=131072+ap>>0;aw=(av=e[$Int32.keyFor(au)],av!==undefined?av.v:AP.nil);ax=((an<0||an>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+an]);ay=ao.VirtualGridX+ao.VelX>>0;az=ao.VirtualGridY+ao.VelY>>0;ba=ay;bb=az;if(ax.VelY===h){bb=bb+(ax.VelY)>>0;}bc=V(ba,bb,aw.W*0.5,aw.H*0.5,0,0,0,0,k,l,p);aw.X=bc[0];aw.Y=bc[1];$r=aw.Update();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(ao.InAir){ax.VelX=ax.VelX+(f)>>0;ax.VelY=ax.VelY+(g)>>0;}am++;$s=1;continue;case 2:bd=c.PlayersArr;be=0;case 4:if(!(be<bd.$length)){$s=5;continue;}bf=be;bg=((be<0||be>=bd.$length)?($throwRuntimeError("index out of range"),undefined):bd.$array[bd.$offset+be]);bh=bg.JoinIndex;bi=131072+bh>>0;bk=(bj=e[$Int32.keyFor(bi)],bj!==undefined?bj.v:AP.nil);bl=$assertType(bk.Shape,AL);bn=W(bh,bk,bl,m,(bm=bh-1>>0,((bm<0||bm>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+bm])));$s=6;case 6:if($c){$c=false;bn=bn.$blk();}if(bn&&bn.$blk!==undefined){break s;}(bo=bh-1>>0,((bo<0||bo>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+bo]=bn));bp=((bf<0||bf>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+bf]);bq=false;br=bk.Check(0,0,new AG([]));$s=7;case 7:if($c){$c=false;br=br.$blk();}if(br&&br.$blk!==undefined){break s;}bs=br;if(!(AH.nil===bs)){$s=8;continue;}$s=9;continue;case 8:bt=bs.Objects;bu=0;case 10:if(!(bu<bt.$length)){$s=11;continue;}bv=((bu<0||bu>=bt.$length)?($throwRuntimeError("index out of range"),undefined):bt.$array[bt.$offset+bu]);bw=false;bx=false;by=false;bz=bw;ca=bx;cb=by;cc=bv.Data;if($assertType(cc,AJ,true)[1]){ca=true;}else if($assertType(cc,AK,true)[1]){cb=true;}else{bz=true;}if(cb){bu++;$s=10;continue;}cd=$assertType(bv.Shape,AL);cf=N(0,0,bl,cd);$s=12;case 12:if($c){$c=false;cf=cf.$blk();}if(cf&&cf.$blk!==undefined){break s;}ce=cf;cg=ce[0];ch=ce[1];ci=ce[2];cj=ce[3];if(!cg){bu++;$s=10;continue;}ck=cj.OverlapX*0+cj.OverlapY*-1;if(ca){cl=(cj.Overlap-m*2)*cj.OverlapX;cm=(cj.Overlap-m*2)*cj.OverlapY;ch=cl;ci=cm;}cn=(co=bh-1>>0,((co<0||co>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+co])).$get();cp=0;while(true){if(!(cp<cn.$length)){break;}cq=$clone(((cp<0||cp>=cn.$length)?($throwRuntimeError("index out of range"),undefined):cn.$array[cn.$offset+cp]),C);cr=ch*cq.X+ci*cq.Y;if(bz||(ca&&0>cr)){ch=ch-(cr*cq.X);ci=ci-(cr*cq.Y);}cp++;}cs=bh-1>>0;((cs<0||cs>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+cs]).X=((cs<0||cs>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+cs]).X+(ch);ct=bh-1>>0;((ct<0||ct>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+ct]).Y=((ct<0||ct>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+ct]).Y+(ci);if(n<ck){bq=true;}bu++;$s=10;continue;case 11:case 9:if(bq){bp.InAir=false;if(bg.InAir){bp.VelX=0;bp.VelY=0;bp.CharacterState=0;bp.FramesToRecover=0;}}if(bg.InAir){cu=bp.CharacterState;cv=cu;if((cv===(0))||(cv===(1))){bp.CharacterState=4;}else if(cv===(2)){bp.CharacterState=5;}else if(cv===(3)){bp.CharacterState=6;}}be++;$s=4;continue;case 5:cw=c.PlayersArr;cx=0;while(true){if(!(cx<cw.$length)){break;}cy=cx;cz=((cx<0||cx>=cw.$length)?($throwRuntimeError("index out of range"),undefined):cw.$array[cw.$offset+cx]);da=cz.JoinIndex;db=131072+da>>0;dd=(dc=e[$Int32.keyFor(db)],dc!==undefined?dc.v:AP.nil);de=((cy<0||cy>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+cy]);df=U(dd.X-(dg=da-1>>0,((dg<0||dg>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+dg])).X,dd.Y-(dh=da-1>>0,((dh<0||dh>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+dh])).Y,dd.W*0.5,dd.H*0.5,0,0,0,0,k,l,o);de.VirtualGridX=df[0];de.VirtualGridY=df[1];cx++;}$s=-1;return new J.ptr(c.Id+1>>0,r,new $Int64(0,0),AQ.nil,new $Uint64(0,0),false);}return;}var $f={$blk:X,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,c,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,d,da,db,dc,dd,de,df,dg,dh,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame=X;Y=function(a,b,c,d,e,f,g,h,i,j,k,l){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l});$s=$s||0;s:while(true){switch($s){case 0:m=S(a,b,c*0.5,d*0.5,e,f,g,h,i,j);n=m[0];o=m[1];p=Z(n,o,g+c+h,f+d+e,k,l);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;$s=2;case 2:return q;}return;}var $f={$blk:Y,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s};return $f;};$pkg.GenerateRectCollider=Y;Z=function(a,b,c,d,e,f){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c,d,e,f});$s=$s||0;s:while(true){switch($s){case 0:g=B.NewObject(a,b,c,d,new AG([f]));h=B.NewRectangle(0,0,c,d);$r=g.SetShape(h);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g.Data=e;$s=-1;return g;}return;}var $f={$blk:Z,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};AA=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=AB(a);g=0;h=0;i=g;j=h;k=B.NewConvexPolygon(AR.nil);l=f.Points;m=0;while(true){if(!(m<l.$length)){break;}n=m;o=((m<0||m>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);p=f.Points;q=0;while(true){if(!(q<p.$length)){break;}r=q;s=((q<0||q>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]);if(n===r){q++;continue;}if(A.Abs(s.X-o.X)>i){i=A.Abs(s.X-o.X);}if(A.Abs(s.Y-o.Y)>j){j=A.Abs(s.Y-o.Y);}q++;}m++;}t=0;while(true){if(!(t<f.Points.$length)){break;}v=(u=f.Points,((t<0||t>=u.$length)?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+t]));k.AddPoints(new AR([v.X,v.Y]));t=t+(1)>>0;}w=B.NewObject(f.Anchor.X+b,f.Anchor.Y+c,i,j,new AG([e]));$r=w.SetShape(k);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}w.Data=d;$s=-1;return w;}return;}var $f={$blk:AA,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s};return $f;};$pkg.GenerateConvexPolygonCollider=AA;AB=function(a){var a,b,c,d,e,f,g,h,i,j,k;b=new C.ptr(1.7e+308,1.7e+308);c=a.Points;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.X<b.X){b.X=e.X;}if(e.Y<b.Y){b.Y=e.Y;}d++;}f=new D.ptr(new C.ptr(a.Anchor.X+b.X,a.Anchor.Y+b.Y),$makeSlice(AT,a.Points.$length));g=a.Points;h=0;while(true){if(!(h<g.$length)){break;}i=h;j=((h<0||h>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]);(k=f.Points,((i<0||i>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+i]=new C.ptr(j.X-b.X,j.Y-b.Y)));h++;}return f;};$pkg.AlignPolygon2DToBoundingBox=AB;C.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""}]);D.init("",[{prop:"Anchor",name:"Anchor",embedded:false,exported:true,typ:AS,tag:""},{prop:"Points",name:"Points",embedded:false,exported:true,typ:AT,tag:""}]);E.init("",[{prop:"Id",name:"Id",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridX",name:"VirtualGridX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridY",name:"VirtualGridY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirX",name:"DirX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirY",name:"DirY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelX",name:"VelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelY",name:"VelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Speed",name:"Speed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BattleState",name:"BattleState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"JoinIndex",name:"JoinIndex",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ColliderRadius",name:"ColliderRadius",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Removed",name:"Removed",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Score",name:"Score",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"LastMoveGmtMillis",name:"LastMoveGmtMillis",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesToRecover",name:"FramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Hp",name:"Hp",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"MaxHp",name:"MaxHp",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CharacterState",name:"CharacterState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"InAir",name:"InAir",embedded:false,exported:true,typ:$Bool,tag:""}]);F.init("",[{prop:"Dx",name:"Dx",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Dy",name:"Dy",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BtnALevel",name:"BtnALevel",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BtnBLevel",name:"BtnBLevel",embedded:false,exported:true,typ:$Int32,tag:""}]);H.init("",[{prop:"Boundary",name:"Boundary",embedded:false,exported:true,typ:AU,tag:""}]);I.init("",[{prop:"BattleLocalId",name:"BattleLocalId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"StartupFrames",name:"StartupFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ActiveFrames",name:"ActiveFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFrames",name:"RecoveryFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFramesOnBlock",name:"RecoveryFramesOnBlock",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFramesOnHit",name:"RecoveryFramesOnHit",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxOffset",name:"HitboxOffset",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OriginatedRenderFrameId",name:"OriginatedRenderFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitStunFrames",name:"HitStunFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BlockStunFrames",name:"BlockStunFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Pushback",name:"Pushback",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"ReleaseTriggerType",name:"ReleaseTriggerType",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Damage",name:"Damage",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OffenderJoinIndex",name:"OffenderJoinIndex",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OffenderPlayerId",name:"OffenderPlayerId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SelfMoveforwardX",name:"SelfMoveforwardX",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"SelfMoveforwardY",name:"SelfMoveforwardY",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"HitboxSizeX",name:"HitboxSizeX",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"HitboxSizeY",name:"HitboxSizeY",embedded:false,exported:true,typ:$Float64,tag:""}]);J.init("",[{prop:"Id",name:"Id",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"PlayersArr",name:"PlayersArr",embedded:false,exported:true,typ:AM,tag:""},{prop:"CountdownNanos",name:"CountdownNanos",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"MeleeBullets",name:"MeleeBullets",embedded:false,exported:true,typ:AQ,tag:""},{prop:"BackendUnconfirmedMask",name:"BackendUnconfirmedMask",embedded:false,exported:true,typ:$Uint64,tag:""},{prop:"ShouldForceResync",name:"ShouldForceResync",embedded:false,exported:true,typ:$Bool,tag:""}]);M.init("",[{prop:"Overlap",name:"Overlap",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OverlapX",name:"OverlapX",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OverlapY",name:"OverlapY",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"AContainedInB",name:"AContainedInB",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"BContainedInA",name:"BContainedInA",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Axis",name:"Axis",embedded:false,exported:true,typ:B.Vector,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.DIRECTION_DECODER=new AD([new AC([0,0]),new AC([0,2]),new AC([0,-2]),new AC([2,0]),new AC([-2,0]),new AC([1,1]),new AC([-1,-1]),new AC([1,-1]),new AC([-1,1])]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["jsexport"]=(function(){var $pkg={},$init,A,B,C,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,D,E,F,G,H,J,K,L,M,N,O;A=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["jsexport/battle"];C=$packages["resolv"];P=$ptrType(B.Vec2D);Q=$sliceType(P);R=$ptrType(B.Polygon2D);S=$ptrType(B.PlayerDownsync);T=$sliceType(S);U=$ptrType(B.MeleeBullet);V=$sliceType(U);W=$ptrType(A.Object);X=$sliceType(W);Y=$funcType([$Float64,$Float64],[W],false);Z=$funcType([P,Q],[W],false);AA=$funcType([R],[W],false);AB=$funcType([$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Bool,$Float64],[W],false);AC=$funcType([$Int32,T,V],[W],false);AD=$funcType([$Int,$Int,$Int,$Int],[W],false);AE=$funcType([$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$emptyInterface,$String],[W],false);AF=$funcType([R,$Float64,$Float64,$emptyInterface,$String],[W],false);AG=$ptrType(C.Space);AH=$funcType([AG],[X],false);AI=$sliceType($Uint64);AJ=$ptrType(B.RoomDownsyncFrame);AK=$ptrType(C.Object);AL=$mapType($Int32,AK);AM=$funcType([AI,AI,AJ,AG,AL,$Int32,$Int32,$Int32,$Int32,$Uint32,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64],[W],false);AN=$funcType([$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64],[$Float64,$Float64],false);AO=$mapType($String,$emptyInterface);D=function(a,b,c,d){var a,b,c,d;return A.MakeWrapper(C.NewSpace(a,b,c,d));};$pkg.NewCollisionSpaceJs=D;E=function(a,b){var{a,b,c,d,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=A.MakeFullWrapper(new B.Vec2D.ptr(a,b));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;$s=2;case 2:return d;}return;}var $f={$blk:E,$c:true,$r,a,b,c,d,$s};return $f;};$pkg.NewVec2DJs=E;F=function(a,b){var{a,b,c,d,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=A.MakeFullWrapper(new B.Polygon2D.ptr(a,b));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;$s=2;case 2:return d;}return;}var $f={$blk:F,$c:true,$r,a,b,c,d,$s};return $f;};$pkg.NewPolygon2DJs=F;G=function(a){var a;return A.MakeWrapper(new B.Barrier.ptr(a));};$pkg.NewBarrierJs=G;H=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;return A.MakeWrapper(new B.PlayerDownsync.ptr(a,b,c,d,e,f,g,h,i,k,o,false,0,0,0,l,m,j,n));};$pkg.NewPlayerDownsyncJs=H;J=function(a,b,c){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=A.MakeFullWrapper(new B.RoomDownsyncFrame.ptr(a,b,new $Int64(0,0),c,new $Uint64(0,0),false));$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$s=2;case 2:return e;}return;}var $f={$blk:J,$c:true,$r,a,b,c,d,e,$s};return $f;};$pkg.NewRoomDownsyncFrameJs=J;K=function(a){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.Objects();c=$makeSlice(X,0,b.$length);d=b;e=0;case 1:if(!(e<d.$length)){$s=2;continue;}f=((e<0||e>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);g=A.MakeFullWrapper(f);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}c=$append(c,g);e++;$s=1;continue;case 2:$s=-1;return c;}return;}var $f={$blk:K,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};$pkg.GetCollisionSpaceObjsJs=K;L=function(a,b,c,d,e,f,g,h,i,j,k,l){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l});$s=$s||0;s:while(true){switch($s){case 0:m=B.GenerateRectCollider(a,b,c,d,e,f,g,h,i,j,k,l);$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=A.MakeFullWrapper(m);$s=2;case 2:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;$s=3;case 3:return o;}return;}var $f={$blk:L,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s};return $f;};$pkg.GenerateRectColliderJs=L;M=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=B.GenerateConvexPolygonCollider(a,b,c,d,e);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=A.MakeFullWrapper(f);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=3;case 3:return h;}return;}var $f={$blk:M,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};$pkg.GenerateConvexPolygonColliderJs=M;N=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p});$s=$s||0;s:while(true){switch($s){case 0:q=B.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=A.MakeFullWrapper(q);$s=2;case 2:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=r;$s=3;case 3:return s;}return;}var $f={$blk:N,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s};return $f;};$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs=N;O=function(){$global.gopkgs=$externalize($makeMap($String.keyFor,[{k:"NewVec2DJs",v:new Y(E)},{k:"NewPolygon2DJs",v:new Z(F)},{k:"NewBarrierJs",v:new AA(G)},{k:"NewPlayerDownsyncJs",v:new AB(H)},{k:"NewRoomDownsyncFrameJs",v:new AC(J)},{k:"NewCollisionSpaceJs",v:new AD(D)},{k:"GenerateRectColliderJs",v:new AE(L)},{k:"GenerateConvexPolygonColliderJs",v:new AF(M)},{k:"GetCollisionSpaceObjsJs",v:new AH(K)},{k:"ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs",v:new AM(N)},{k:"WorldToPolygonColliderBLPos",v:new AN(B.WorldToPolygonColliderBLPos)},{k:"PolygonColliderBLToWorldPos",v:new AN(B.PolygonColliderBLToWorldPos)}]),AO);};$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if($pkg===$mainPkg){O();$mainFinished=true;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$synthesizeMethods();
|
|
$initAllLinknames();
|
|
var $mainPkg = $packages["jsexport"];
|
|
$packages["runtime"].$init();
|
|
$go($mainPkg.$init, []);
|
|
$flushConsole();
|
|
|
|
}).call(this);
|
|
//# sourceMappingURL=jsexport.js.map
|